@bk2k/ui 0.6.8 → 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/BUILDING.md +56 -2
- package/CHANGELOG.md +199 -0
- package/USAGE.md +102 -28
- package/custom-elements.json +1 -1
- package/dist/charts/chart-tokens.js +1 -1
- package/dist/charts/fields.d.ts +20 -0
- package/dist/charts/fields.js +27 -0
- package/dist/charts/frame.d.ts +2 -0
- package/dist/charts/frame.js +2 -1
- package/dist/clipboard.js +1 -0
- package/dist/components/bk-alert.js +3 -2
- package/dist/components/bk-avatar-group.js +4 -6
- package/dist/components/bk-avatar.d.ts +10 -0
- package/dist/components/bk-avatar.js +17 -0
- package/dist/components/bk-bar.js +2 -0
- package/dist/components/bk-button-group.js +1 -1
- package/dist/components/bk-button-top.js +2 -1
- package/dist/components/bk-button.d.ts +42 -14
- package/dist/components/bk-button.js +67 -20
- package/dist/components/bk-card.d.ts +7 -0
- package/dist/components/bk-card.js +21 -2
- package/dist/components/bk-carousel-controls.d.ts +2 -0
- package/dist/components/bk-carousel-controls.js +4 -2
- package/dist/components/bk-chart-area.d.ts +10 -0
- package/dist/components/bk-chart-bar.d.ts +17 -0
- package/dist/components/bk-chart-bar.js +25 -4
- package/dist/components/bk-chart-line.d.ts +28 -0
- package/dist/components/bk-chart-line.js +27 -7
- package/dist/components/bk-chip-group.d.ts +2 -2
- package/dist/components/bk-chip-group.js +4 -0
- package/dist/components/bk-chip.d.ts +55 -8
- package/dist/components/bk-chip.js +46 -8
- package/dist/components/bk-code.js +6 -2
- package/dist/components/bk-columns.d.ts +11 -0
- package/dist/components/bk-columns.js +8 -1
- package/dist/components/bk-combobox.d.ts +3 -3
- package/dist/components/bk-combobox.js +9 -21
- package/dist/components/bk-delta.d.ts +10 -0
- package/dist/components/bk-delta.js +8 -6
- package/dist/components/bk-dialog.d.ts +12 -5
- package/dist/components/bk-dialog.js +14 -6
- package/dist/components/bk-disclosure.js +4 -2
- package/dist/components/bk-drop-target.d.ts +7 -1
- package/dist/components/bk-drop-target.js +20 -4
- package/dist/components/bk-error-summary.d.ts +5 -0
- package/dist/components/bk-error-summary.js +13 -4
- package/dist/components/bk-facts.js +3 -2
- package/dist/components/bk-footnote.d.ts +73 -0
- package/dist/components/bk-footnote.js +97 -0
- package/dist/components/bk-footnotes-item.d.ts +92 -0
- package/dist/components/bk-footnotes-item.js +139 -0
- package/dist/components/bk-footnotes.d.ts +51 -0
- package/dist/components/bk-footnotes.js +43 -0
- package/dist/components/bk-icon.js +2 -2
- package/dist/components/bk-image-compare.d.ts +69 -6
- package/dist/components/bk-image-compare.js +116 -32
- package/dist/components/bk-image-crop.d.ts +3 -3
- package/dist/components/bk-image-editor.d.ts +1 -1
- package/dist/components/bk-image-viewer.d.ts +178 -11
- package/dist/components/bk-image-viewer.js +310 -52
- 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-inline.d.ts +15 -6
- package/dist/components/bk-input-inline.js +22 -6
- package/dist/components/bk-input-number.js +2 -1
- package/dist/components/bk-input-search.d.ts +1 -1
- package/dist/components/bk-input-search.js +2 -1
- 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 +20 -0
- package/dist/components/bk-input-text.js +34 -4
- package/dist/components/bk-input-time.js +2 -1
- package/dist/components/bk-item.js +2 -1
- package/dist/components/bk-lightbox.d.ts +37 -4
- package/dist/components/bk-lightbox.js +13 -3
- package/dist/components/bk-link.d.ts +9 -1
- package/dist/components/bk-link.js +14 -4
- package/dist/components/bk-menu-item.d.ts +40 -0
- package/dist/components/bk-menu-item.js +57 -9
- package/dist/components/bk-menu-label.js +2 -1
- package/dist/components/bk-menu-list.d.ts +1 -0
- package/dist/components/bk-menu-list.js +10 -0
- package/dist/components/bk-menu.d.ts +8 -1
- package/dist/components/bk-menu.js +16 -5
- package/dist/components/bk-message-feedback.d.ts +4 -3
- package/dist/components/bk-message-feedback.js +7 -5
- package/dist/components/bk-message-list.js +2 -1
- package/dist/components/bk-message-source.d.ts +1 -2
- package/dist/components/bk-message-source.js +3 -11
- package/dist/components/bk-message.js +2 -0
- package/dist/components/bk-nav-group.js +1 -1
- package/dist/components/bk-nav-item.d.ts +18 -0
- package/dist/components/bk-nav-item.js +18 -5
- package/dist/components/bk-nav.d.ts +1 -1
- package/dist/components/bk-page-cta.d.ts +2 -0
- package/dist/components/bk-page-cta.js +10 -1
- package/dist/components/bk-page-section.d.ts +1 -1
- package/dist/components/bk-page-section.js +3 -9
- package/dist/components/bk-pane.d.ts +1 -0
- package/dist/components/bk-pane.js +7 -5
- package/dist/components/bk-panel.d.ts +1 -1
- package/dist/components/bk-panel.js +6 -5
- package/dist/components/bk-picture.d.ts +17 -4
- package/dist/components/bk-picture.js +8 -1
- package/dist/components/bk-segmented-item.d.ts +24 -4
- package/dist/components/bk-segmented-item.js +37 -5
- package/dist/components/bk-segmented.js +2 -13
- package/dist/components/bk-select-cascade.d.ts +1 -1
- package/dist/components/bk-select-tree.d.ts +1 -1
- package/dist/components/bk-select.d.ts +1 -1
- package/dist/components/bk-shell-app.d.ts +10 -4
- package/dist/components/bk-shell-app.js +32 -9
- package/dist/components/bk-shell-sites.d.ts +2 -1
- package/dist/components/bk-shell-sites.js +3 -5
- package/dist/components/bk-sortable.js +7 -17
- package/dist/components/bk-split-grid.d.ts +104 -3
- package/dist/components/bk-split-grid.js +430 -2
- package/dist/components/bk-stat-group.js +2 -1
- package/dist/components/bk-stat.d.ts +19 -0
- package/dist/components/bk-stat.js +8 -4
- package/dist/components/bk-steps.js +2 -1
- package/dist/components/bk-surface.d.ts +2 -0
- package/dist/components/bk-surface.js +6 -3
- package/dist/components/bk-table.d.ts +3 -1
- package/dist/components/bk-table.js +10 -13
- package/dist/components/bk-tabs-item.d.ts +45 -7
- package/dist/components/bk-tabs-item.js +51 -20
- package/dist/components/bk-tabs-panel.d.ts +6 -3
- package/dist/components/bk-tabs-panel.js +6 -0
- package/dist/components/bk-tabs.d.ts +52 -8
- package/dist/components/bk-tabs.js +181 -97
- package/dist/components/bk-text.js +2 -1
- package/dist/components/bk-toast-group.d.ts +3 -1
- package/dist/components/bk-toast-group.js +11 -1
- package/dist/components/bk-tooltip.d.ts +3 -1
- package/dist/components/bk-tooltip.js +2 -1
- package/dist/components/bk-video.js +2 -2
- package/dist/components/bk-zoom.d.ts +3 -1
- package/dist/components/confirm.d.ts +15 -0
- package/dist/components/confirm.js +27 -4
- package/dist/i18n/de.js +12 -1
- package/dist/i18n/en.d.ts +2 -0
- package/dist/i18n/en.js +3 -0
- package/dist/i18n.d.ts +16 -2
- package/dist/i18n.js +28 -4
- package/dist/icons/brands-static.d.ts +3 -0
- package/dist/icons/brands-static.js +5 -0
- package/dist/icons/core.d.ts +1 -0
- package/dist/icons/core.js +2 -0
- package/dist/icons/load-static.d.ts +3 -0
- package/dist/icons/load-static.js +5 -0
- package/dist/icons/load.js +1 -0
- package/dist/icons/registry.js +1 -1
- package/dist/icons/set/save-as.d.ts +3 -0
- package/dist/icons/set/save-as.js +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/internal/announcer.d.ts +14 -1
- package/dist/internal/announcer.js +33 -12
- package/dist/internal/backdrop.d.ts +19 -0
- package/dist/internal/backdrop.js +29 -0
- package/dist/internal/busy.d.ts +3 -2
- package/dist/internal/busy.js +4 -5
- package/dist/internal/choice-field.js +1 -1
- package/dist/internal/choice-item.d.ts +17 -6
- package/dist/internal/choice-item.js +20 -9
- package/dist/internal/cloak.js +4 -0
- package/dist/internal/crop-frame.d.ts +1 -1
- package/dist/internal/crop-frame.js +2 -7
- package/dist/internal/date-field.js +2 -1
- package/dist/internal/define.d.ts +9 -0
- package/dist/internal/define.js +47 -1
- package/dist/internal/drag.d.ts +11 -0
- package/dist/internal/drag.js +23 -0
- package/dist/internal/elements.d.ts +6 -0
- package/dist/internal/elements.js +5 -0
- package/dist/internal/english-static.d.ts +3 -0
- package/dist/internal/english-static.js +5 -0
- package/dist/internal/english.d.ts +8 -0
- package/dist/internal/english.js +6 -0
- package/dist/internal/footnotes.d.ts +56 -0
- package/dist/internal/footnotes.js +143 -0
- package/dist/internal/handle-menu.js +2 -5
- package/dist/internal/hue.d.ts +8 -0
- package/dist/internal/hue.js +15 -4
- package/dist/internal/late/bk-shell-app.d.ts +4 -0
- package/dist/internal/late/bk-shell-app.js +7 -0
- package/dist/internal/late/bk-table.d.ts +4 -0
- package/dist/internal/late/bk-table.js +17 -0
- package/dist/internal/late/bk-tabs.d.ts +4 -0
- package/dist/internal/late/bk-tabs.js +8 -0
- package/dist/internal/late/handle-menu.d.ts +4 -0
- package/dist/internal/late/handle-menu.js +9 -0
- package/dist/internal/late/static.d.ts +7 -0
- package/dist/internal/late/static.js +5 -0
- package/dist/internal/late.d.ts +8 -3
- package/dist/internal/late.js +19 -4
- package/dist/internal/link.d.ts +2 -0
- package/dist/internal/link.js +11 -1
- package/dist/internal/own-text.d.ts +8 -0
- package/dist/internal/own-text.js +7 -0
- package/dist/internal/scope.js +1 -1
- package/dist/internal/scroll-lock.d.ts +4 -1
- package/dist/internal/scroll-lock.js +17 -4
- package/dist/internal/slider.js +2 -1
- package/dist/internal/styles.js +3 -0
- package/dist/internal/submit.d.ts +23 -0
- package/dist/internal/submit.js +57 -0
- 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 +222 -54
- package/dist/kit.d.ts +1 -0
- package/dist/kit.js +3 -0
- package/dist/reset.css +10 -0
- package/dist/standalone/all.js +226 -221
- package/dist/standalone/appearance.js +1 -1
- package/dist/standalone/bk-accordion-item.js +4 -4
- package/dist/standalone/bk-accordion.js +2 -2
- package/dist/standalone/bk-action-bar.js +3 -3
- package/dist/standalone/bk-alert-offline.js +1 -2
- package/dist/standalone/bk-alert.js +17 -13
- package/dist/standalone/bk-app-state.js +1 -1
- package/dist/standalone/bk-attachment.js +4 -4
- package/dist/standalone/bk-avatar-group.js +12 -10
- package/dist/standalone/bk-avatar.js +15 -5
- package/dist/standalone/bk-badge.js +2 -2
- package/dist/standalone/bk-bar.js +3 -1
- package/dist/standalone/bk-brand.js +3 -3
- package/dist/standalone/bk-breadcrumbs.js +5 -5
- package/dist/standalone/bk-button-copy.js +7 -7
- package/dist/standalone/bk-button-group.js +5 -5
- package/dist/standalone/bk-button-share.js +7 -7
- package/dist/standalone/bk-button-top.js +9 -8
- package/dist/standalone/bk-button.js +74 -34
- package/dist/standalone/bk-calendar-event.js +1 -1
- package/dist/standalone/bk-calendar-week.js +3 -3
- package/dist/standalone/bk-calendar.js +4 -4
- package/dist/standalone/bk-card.js +26 -7
- package/dist/standalone/bk-carousel-controls.js +7 -6
- package/dist/standalone/bk-carousel-item.js +2 -2
- 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 +8 -8
- package/dist/standalone/bk-chart-bar.js +145 -117
- package/dist/standalone/bk-chart-bridge.js +7 -7
- package/dist/standalone/bk-chart-bullet.js +6 -6
- package/dist/standalone/bk-chart-calendar.js +7 -7
- package/dist/standalone/bk-chart-heatmap.js +7 -7
- package/dist/standalone/bk-chart-histogram.js +5 -5
- package/dist/standalone/bk-chart-legend.js +6 -6
- package/dist/standalone/bk-chart-line.js +128 -107
- package/dist/standalone/bk-chart-mark.js +1 -1
- package/dist/standalone/bk-chart-scatter.js +6 -6
- package/dist/standalone/bk-chart-sparkline.js +6 -6
- package/dist/standalone/bk-chart-stacked-bar.js +7 -7
- package/dist/standalone/bk-chart-tracker.js +6 -6
- package/dist/standalone/bk-chart-waterfall.js +6 -6
- package/dist/standalone/bk-checkbox-group.js +7 -7
- package/dist/standalone/bk-checkbox.js +4 -4
- package/dist/standalone/bk-chip-group.js +11 -7
- package/dist/standalone/bk-chip.js +59 -18
- package/dist/standalone/bk-cluster.js +1 -1
- package/dist/standalone/bk-code-diff.js +4 -4
- package/dist/standalone/bk-code-stack.js +4 -4
- package/dist/standalone/bk-code.js +10 -6
- package/dist/standalone/bk-color-panel.js +5 -5
- package/dist/standalone/bk-columns.js +13 -5
- package/dist/standalone/bk-combobox.js +23 -31
- package/dist/standalone/bk-command-menu.js +6 -6
- package/dist/standalone/bk-command-palette.js +8 -7
- package/dist/standalone/bk-composer.js +6 -6
- package/dist/standalone/bk-delta.js +11 -10
- package/dist/standalone/bk-diagram.js +1 -1
- package/dist/standalone/bk-dialog.js +1 -1
- package/dist/standalone/bk-disclosure.js +7 -5
- package/dist/standalone/bk-divider.js +5 -5
- package/dist/standalone/bk-drawer.js +3 -3
- package/dist/standalone/bk-drop-target.js +12 -6
- package/dist/standalone/bk-empty-state.js +3 -3
- package/dist/standalone/bk-error-summary.js +9 -6
- package/dist/standalone/bk-facts-item.js +2 -2
- package/dist/standalone/bk-facts.js +9 -8
- package/dist/standalone/bk-feature.js +3 -3
- package/dist/standalone/bk-fieldset.js +3 -3
- package/dist/standalone/bk-filter-bar.js +4 -4
- package/dist/standalone/bk-folder-browser.js +4 -4
- package/dist/standalone/bk-footnote.js +82 -0
- package/dist/standalone/bk-footnotes-item.js +122 -0
- package/dist/standalone/bk-footnotes.js +37 -0
- package/dist/standalone/bk-form-guard.js +2 -2
- package/dist/standalone/bk-form-steps.js +3 -3
- package/dist/standalone/bk-grid.js +1 -1
- package/dist/standalone/bk-icon-tile.js +3 -3
- package/dist/standalone/bk-icon.js +1 -1
- package/dist/standalone/bk-image-compare.js +127 -58
- package/dist/standalone/bk-image-crop.js +6 -6
- package/dist/standalone/bk-image-editor.js +1 -1
- package/dist/standalone/bk-image-viewer.js +283 -92
- package/dist/standalone/bk-input-code.js +4 -4
- package/dist/standalone/bk-input-color.js +4 -14
- 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 +22 -15
- package/dist/standalone/bk-input-group.js +4 -4
- package/dist/standalone/bk-input-inline.js +17 -10
- package/dist/standalone/bk-input-number.js +9 -8
- package/dist/standalone/bk-input-rating.js +6 -6
- package/dist/standalone/bk-input-rich.js +1 -1
- package/dist/standalone/bk-input-search.js +23 -22
- package/dist/standalone/bk-input-slider-range.js +5 -5
- package/dist/standalone/bk-input-slider.js +5 -5
- 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 +29 -28
- package/dist/standalone/bk-item-group.js +3 -3
- package/dist/standalone/bk-item.js +12 -11
- package/dist/standalone/bk-kbd-shortcuts.js +4 -3
- package/dist/standalone/bk-kbd.js +68 -1
- package/dist/standalone/bk-lightbox.js +24 -7
- package/dist/standalone/bk-lines.js +1 -1
- package/dist/standalone/bk-link.js +33 -19
- package/dist/standalone/bk-listbox-columns.js +8 -8
- package/dist/standalone/bk-listbox-item.js +1 -1
- package/dist/standalone/bk-listbox-search.js +7 -7
- package/dist/standalone/bk-listbox-transfer.js +6 -6
- package/dist/standalone/bk-listbox.js +7 -7
- package/dist/standalone/bk-logo-wall.js +2 -2
- package/dist/standalone/bk-logo.js +4 -4
- package/dist/standalone/bk-menu-bar.js +3 -3
- package/dist/standalone/bk-menu-context.js +1 -1
- package/dist/standalone/bk-menu-divider.js +2 -2
- package/dist/standalone/bk-menu-item.js +73 -29
- package/dist/standalone/bk-menu-label.js +7 -6
- package/dist/standalone/bk-menu-list.js +10 -4
- package/dist/standalone/bk-menu.js +19 -10
- package/dist/standalone/bk-message-approval.js +4 -4
- package/dist/standalone/bk-message-branches.js +3 -3
- package/dist/standalone/bk-message-citation.js +10 -10
- package/dist/standalone/bk-message-feedback.js +10 -6
- package/dist/standalone/bk-message-list.js +6 -5
- package/dist/standalone/bk-message-reasoning.js +5 -5
- package/dist/standalone/bk-message-source.js +13 -21
- package/dist/standalone/bk-message-tool-group.js +5 -5
- package/dist/standalone/bk-message-tool.js +5 -5
- package/dist/standalone/bk-message.js +6 -4
- package/dist/standalone/bk-meter.js +3 -3
- package/dist/standalone/bk-model-viewer.js +1 -1
- package/dist/standalone/bk-nav-divider.js +2 -2
- package/dist/standalone/bk-nav-group.js +9 -9
- package/dist/standalone/bk-nav-item.js +31 -23
- package/dist/standalone/bk-nav-toc.js +3 -3
- package/dist/standalone/bk-nav.js +3 -3
- package/dist/standalone/bk-overflow.js +3 -3
- package/dist/standalone/bk-page-cta.js +13 -4
- package/dist/standalone/bk-page-footer-column.js +2 -2
- package/dist/standalone/bk-page-footer.js +3 -3
- package/dist/standalone/bk-page-header.js +3 -3
- package/dist/standalone/bk-page-hero.js +3 -3
- package/dist/standalone/bk-page-pager.js +5 -5
- package/dist/standalone/bk-page-section.js +6 -6
- package/dist/standalone/bk-pagination.js +6 -6
- package/dist/standalone/bk-pane.js +10 -9
- package/dist/standalone/bk-panel.js +9 -10
- package/dist/standalone/bk-period-nav.js +4 -4
- package/dist/standalone/bk-picture.js +1 -166
- package/dist/standalone/bk-popover-help.js +3 -3
- package/dist/standalone/bk-popover.js +2 -2
- package/dist/standalone/bk-presence-cursor.js +3 -3
- package/dist/standalone/bk-preview.js +4 -4
- package/dist/standalone/bk-progress.js +3 -3
- package/dist/standalone/bk-prose.js +3 -3
- package/dist/standalone/bk-qr-code.js +1 -1
- package/dist/standalone/bk-radio-group.js +7 -7
- package/dist/standalone/bk-radio.js +3 -3
- package/dist/standalone/bk-rating.js +5 -5
- package/dist/standalone/bk-scroll.js +3 -3
- package/dist/standalone/bk-segmented-item.js +40 -16
- package/dist/standalone/bk-segmented.js +17 -15
- package/dist/standalone/bk-select-cascade.js +3 -3
- package/dist/standalone/bk-select-tree.js +4 -4
- package/dist/standalone/bk-select.js +5 -5
- package/dist/standalone/bk-shell-app.js +1 -1221
- package/dist/standalone/bk-shell-centered.js +2 -2
- package/dist/standalone/bk-shell-sites.js +5 -7
- package/dist/standalone/bk-skeleton.js +2 -2
- package/dist/standalone/bk-sortable.js +55 -60
- package/dist/standalone/bk-spinner.js +2 -2
- package/dist/standalone/bk-split-grid.js +324 -44
- package/dist/standalone/bk-split.js +8 -8
- package/dist/standalone/bk-stack.js +1 -1
- package/dist/standalone/bk-stat-group.js +8 -7
- package/dist/standalone/bk-stat.js +12 -9
- package/dist/standalone/bk-status-dot.js +3 -3
- package/dist/standalone/bk-steps-item.js +5 -5
- package/dist/standalone/bk-steps.js +8 -7
- package/dist/standalone/bk-surface.js +1 -1
- package/dist/standalone/bk-swatch-group.js +8 -8
- package/dist/standalone/bk-swatch-palette.js +1 -1
- package/dist/standalone/bk-swatch.js +2 -2
- package/dist/standalone/bk-switch.js +4 -4
- package/dist/standalone/bk-table.js +1 -1937
- package/dist/standalone/bk-tabs-item.js +58 -35
- package/dist/standalone/bk-tabs-panel.js +7 -3
- package/dist/standalone/bk-tabs.js +3 -352
- package/dist/standalone/bk-tasks-item.js +4 -4
- package/dist/standalone/bk-tasks.js +2 -2
- package/dist/standalone/bk-testimonial.js +3 -3
- package/dist/standalone/bk-text.js +21 -20
- package/dist/standalone/bk-time-countdown.js +4 -4
- package/dist/standalone/bk-time-relative.js +3 -3
- package/dist/standalone/bk-timeline-item.js +4 -4
- package/dist/standalone/bk-timeline.js +2 -2
- package/dist/standalone/bk-toast-group.js +1 -1
- package/dist/standalone/bk-toast.js +4 -4
- package/dist/standalone/bk-toolbar.js +2 -2
- package/dist/standalone/bk-tooltip.js +8 -7
- package/dist/standalone/bk-tree-item.js +6 -6
- package/dist/standalone/bk-tree.js +5 -5
- package/dist/standalone/bk-video.js +6 -6
- package/dist/standalone/bk-visually-hidden.js +2 -2
- package/dist/standalone/bk-zoom.js +5 -5
- package/dist/standalone/chunks/announcer-6tMlCOq1.js +41 -0
- package/dist/standalone/chunks/{appearance-waHnV0kk.js → appearance-CBOJXbmC.js} +1 -1
- package/dist/standalone/chunks/{bk-alert-offline-B1bQxOZp.js → bk-alert-offline-hCLuG-RM.js} +3 -3
- package/dist/standalone/chunks/{bk-carousel-BCwIQhG5.js → bk-carousel-_dudBMVq.js} +4 -4
- package/dist/standalone/chunks/{bk-diagram-DWK8CvRZ.js → bk-diagram-BB2odomE.js} +5 -5
- package/dist/standalone/chunks/{bk-dialog-DX0cPJ1o.js → bk-dialog-DcvwnOtN.js} +59 -25
- package/dist/standalone/chunks/{bk-icon-DssFsNuB.js → bk-icon-D4kI4F18.js} +4 -3
- package/dist/standalone/chunks/{bk-image-editor-DXEj9gCu.js → bk-image-editor-SRVkHI-4.js} +5 -5
- package/dist/standalone/chunks/{bk-input-date-range-Cbx_lpf0.js → bk-input-date-range-C0Vd-p0T.js} +2 -2
- package/dist/standalone/chunks/{bk-input-rich-ZB68vziu.js → bk-input-rich-AmDv87E5.js} +6 -6
- package/dist/standalone/chunks/{bk-input-text-DD32uWNO.js → bk-input-text-2n89GDIT.js} +73 -54
- package/dist/standalone/chunks/{bk-model-viewer-Dr81ahVv.js → bk-model-viewer-BoNYBd6W.js} +4 -4
- package/dist/standalone/chunks/bk-picture-CA5gLxgZ.js +186 -0
- package/dist/standalone/chunks/{bk-qr-code-QaYvZwOR.js → bk-qr-code-CSFfc8As.js} +3 -3
- package/dist/standalone/chunks/bk-shell-app-BlCOG25y.js +1236 -0
- package/dist/standalone/chunks/{bk-surface-DkIhrWMt.js → bk-surface-BULRdKam.js} +9 -7
- package/dist/standalone/chunks/{bk-swatch-palette-BNNXTP3w.js → bk-swatch-palette-Cqj85tSW.js} +6 -6
- package/dist/standalone/chunks/bk-table-DWlD7yoM.js +1945 -0
- package/dist/standalone/chunks/bk-tabs-STkr3-E1.js +422 -0
- package/dist/standalone/chunks/{bk-toast-group-BSeO_rPs.js → bk-toast-group-5nZg7BaJ.js} +27 -24
- package/dist/standalone/chunks/{brush-Bn3lPdHN.js → brush-DALmXSru.js} +18 -2
- package/dist/standalone/chunks/{busy-B7Mxemwm.js → busy-eG3uHonz.js} +5 -4
- package/dist/standalone/chunks/{chart-tokens-D1Exf7BW.js → chart-tokens-DQ4hVSmn.js} +2 -2
- package/dist/standalone/chunks/{choice-field-CGvE4tyb.js → choice-field-B0oe_9fI.js} +6 -6
- package/dist/standalone/chunks/{choice-item-B6-9ZRlf.js → choice-item-Cx-nm1js.js} +17 -8
- package/dist/standalone/chunks/{clipboard-Crzt1Sh9.js → clipboard-RqIeP9Uz.js} +1 -1
- package/dist/standalone/chunks/{clipboard-BKlrP5rj.js → clipboard-UVLSkL4C.js} +1 -1
- package/dist/standalone/chunks/{crop-frame-poLCGrBG.js → crop-frame-Z9N0QML4.js} +1 -11
- package/dist/standalone/chunks/{date-field-BlI6grfT.js → date-field-Dy1_qxNv.js} +48 -47
- package/dist/standalone/chunks/define-6OfuRn5c.js +60 -0
- package/dist/standalone/chunks/drag-DT4__0t9.js +12 -0
- package/dist/standalone/chunks/footnotes-BeisMxLk.js +94 -0
- package/dist/standalone/chunks/{form-control-CyXQIJ2x.js → form-control-Bmk0SRDX.js} +2 -2
- package/dist/standalone/chunks/{frame-abXBnl8a.js → frame-xIMVEUCi.js} +5 -4
- package/dist/standalone/chunks/{handle-menu-ZVR_msk2.js → handle-menu-BAe9fPYJ.js} +14 -33
- package/dist/standalone/chunks/{heading-text-CV5gBf7k.js → heading-text-B2kF-b8p.js} +1 -1
- package/dist/standalone/chunks/hue-vLbNdAEl.js +20 -0
- package/dist/standalone/chunks/{i18n-B6Al9xCK.js → i18n-DFfGgd3d.js} +49 -34
- package/dist/standalone/chunks/{i18n-BI16HQmm.js → i18n-DQAcbHkY.js} +1 -1
- package/dist/standalone/chunks/late-CPQ_RbU-.js +30 -0
- package/dist/standalone/chunks/link--YWr8exL.js +69 -0
- package/dist/standalone/chunks/{marks-0kbeB4n8.js → marks-pOUDNUf1.js} +2 -2
- package/dist/standalone/chunks/{options-DMEc8rQt.js → options-ySaDL-dW.js} +2 -2
- package/dist/standalone/chunks/own-text-mpZVnMyX.js +5 -0
- package/dist/standalone/chunks/{palettes-CKLHSIPx.js → palettes-J4bQ21ks.js} +2 -2
- package/dist/standalone/chunks/{popover-base-ac49G87f.js → popover-base-hxo-Vh6E.js} +2 -2
- package/dist/standalone/chunks/{prose-BG4oQH-i.js → prose-BiuJgiah.js} +1 -1
- package/dist/standalone/chunks/{ramp-ggoyjMvC.js → ramp-CGDOcqBZ.js} +1 -1
- package/dist/standalone/chunks/save-as-DBGZjczB.js +6 -0
- package/dist/standalone/chunks/shortcuts-DPxCSO4M.js +210 -0
- package/dist/standalone/chunks/{slider-BWT8Fmwz.js → slider-jp3d-Ld-.js} +15 -14
- package/dist/standalone/chunks/{stars-BN9M_9Q1.js → stars-BAUc_LqI.js} +1 -1
- package/dist/standalone/chunks/{styles-DwSR-9a3.js → styles-CaeyhYDA.js} +3 -0
- package/dist/standalone/chunks/submit-BjBGB8OW.js +42 -0
- package/dist/standalone/chunks/{summary-BK-B4m5A.js → summary-W5s0TFqV.js} +1 -1
- package/dist/standalone/chunks/tags-CMLAGsVw.js +37 -0
- package/dist/standalone/chunks/{text-field-4IUUpRHE.js → text-field-CufOGdfr.js} +17 -11
- package/dist/standalone/chunks/{toggle-control-ioV2jhNY.js → toggle-control-Cgqp1jhf.js} +5 -3
- package/dist/standalone/chunks/{tokens-BuahF1lF.js → tokens-C_ul7pL9.js} +4 -3
- package/dist/standalone/chunks/{virtual-B-1oN14Y.js → virtual-D-qgACnE.js} +1 -1
- package/dist/standalone/confirm.js +27 -14
- package/dist/standalone/i18n-de.js +13 -2
- package/dist/standalone/icons.js +100 -98
- package/dist/standalone/links.js +1 -1
- package/dist/standalone/reset.css +10 -0
- package/dist/standalone/toast.js +1 -1
- package/dist/standalone/tokens.css +6 -5
- package/dist/tokens.css +6 -5
- package/dist/tokens.js +4 -3
- package/package.json +25 -2
- package/dist/standalone/chunks/announcer-haFcvqbe.js +0 -25
- package/dist/standalone/chunks/bk-kbd-B_TlKzWj.js +0 -275
- package/dist/standalone/chunks/define-CzVPD4Zi.js +0 -30
- package/dist/standalone/chunks/hue-Jvb-141g.js +0 -14
- package/dist/standalone/chunks/keyed-CZ2AaouM.js +0 -16
- package/dist/standalone/chunks/link-CWSMsx04.js +0 -60
package/USAGE.md
CHANGED
|
@@ -23,6 +23,32 @@ import "@bk2k/ui/i18n/de.js"; // the German texts, for an app in German
|
|
|
23
23
|
`import "@bk2k/ui"` (the whole library) still contains every icon.
|
|
24
24
|
- **German.** A page in German without `@bk2k/ui/i18n/de.js` shows English texts and logs a warning with the line to
|
|
25
25
|
add. `import "@bk2k/ui"` still contains German.
|
|
26
|
+
- **A bundle without code splitting** (one file for each page, for example an embedded web UI on a device with little
|
|
27
|
+
storage). Such a bundler puts each late load into the file: every icon, the elements of all optional features, and
|
|
28
|
+
the English texts. Build with the condition `bk-static` to remove them:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
esbuild page.js --bundle --minify --format=esm --conditions=bk-static
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Vite: `resolve: { conditions: ["bk-static", ...defaultClientConditions] }` (import `defaultClientConditions` from
|
|
35
|
+
`vite`). Rollup: `nodeResolve({ exportConditions: ["bk-static"] })`. webpack: `resolve.conditionNames`. The condition
|
|
36
|
+
selects other modules in the `imports` of the package. Without the condition, nothing changes. With it, the app
|
|
37
|
+
imports what the package does not load:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import "@bk2k/ui/icons/home.js"; // each icon that the markup names
|
|
41
|
+
import "@bk2k/ui/bk-checkbox.js"; // each element of a feature in use (here: <bk-table selection="multiple">)
|
|
42
|
+
import "@bk2k/ui/i18n/de.js"; // each language of the app, English too ("@bk2k/ui/i18n/en.js")
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- A name without an icon import logs a warning and shows no icon. The icons that an element draws itself stay.
|
|
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`. `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.
|
|
49
|
+
- English is not built in. A text that no loaded catalog contains shows its key and logs a warning.
|
|
50
|
+
- The brand marks (`github`, `linux`, …) are not registered. Register the marks that the page uses:
|
|
51
|
+
`registerIcons({ github: brandIcons.github })`, with `brandIcons` from `@bk2k/ui/icons/brands.js`.
|
|
26
52
|
- **Pages without a bundler** load `icons.js` and `i18n-de.js` from `dist/standalone/` the same way.
|
|
27
53
|
- **Use 0.6.1 or later.** In 0.6.0 a bundler (Vite, Rollup, webpack) removes the icons of the elements and the German
|
|
28
54
|
texts.
|
|
@@ -157,6 +183,10 @@ import { openLightbox } from "@bk2k/ui/bk-lightbox.js";
|
|
|
157
183
|
|
|
158
184
|
Importing any component also adds the design tokens to the page. You set up nothing else.
|
|
159
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
|
+
|
|
160
190
|
A bundled app loads its scripts after the HTML. Link `@bk2k/ui/tokens.css` in the `<head>` of the page, so the page
|
|
161
191
|
does not show the elements as plain text until their scripts run: `tokens.css` hides each element of the library until
|
|
162
192
|
it is defined. Do not import it from the JavaScript of the app: in development (Vite) that CSS loads only after the
|
|
@@ -195,6 +225,7 @@ building blocks from `@bk2k/ui/kit.js`. It then behaves and looks like the contr
|
|
|
195
225
|
| `fieldTemplate`, `describedBy`, `requiredMarker`, `optionalMarker` | the label, hint, error and required marker of a field |
|
|
196
226
|
| `SlotController`, `slotHasContent` | a slot without content uses no space |
|
|
197
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) |
|
|
198
229
|
| `Typeahead` | type the first letters to move to an item |
|
|
199
230
|
| `emit`, `emitDetail`, `emitLifecycle`, `emitToggle` | fire events with the flags of the conventions |
|
|
200
231
|
| `anchorPopover`, `setTriggerAria` | place a `[popover]` at its trigger; the ARIA of the trigger |
|
|
@@ -218,7 +249,8 @@ scroll: its header and sidebar stay in view while the page moves. Print needs th
|
|
|
218
249
|
put the whole page on paper. Do not set `html, body { overflow: hidden; height: 100% }` in the CSS of the
|
|
219
250
|
app: the page then cannot scroll and its end is cut off. An app that must not scroll the document puts its
|
|
220
251
|
content into a workspace. A `bk-pane` (or a `bk-split`, `bk-columns`) as the main content fills the viewport
|
|
221
|
-
and scrolls inside.
|
|
252
|
+
and scrolls inside. A `bk-columns` that flows (a narrow shell, or columns narrower than `stack-above`) makes the
|
|
253
|
+
shell a page again: the document scrolls (`:state(flow)`).
|
|
222
254
|
|
|
223
255
|
## Pages without a bundler
|
|
224
256
|
|
|
@@ -374,12 +406,13 @@ import type { BkCombobox } from "@bk2k/ui/bk-combobox.js";
|
|
|
374
406
|
|
|
375
407
|
### Attributes that change the server HTML
|
|
376
408
|
|
|
377
|
-
React warns in hydration when an element changed the HTML of the server before.
|
|
378
|
-
their hosts. A state that the element finds itself is a custom state
|
|
379
|
-
`bk-table:state(cards)`), not an attribute.
|
|
409
|
+
React warns in hydration when an element changed the HTML of the server before. Most elements do not change the
|
|
410
|
+
attributes of their hosts or of the children of the app. A state that the element finds itself is a custom state
|
|
411
|
+
(`bk-shell-app:state(sections)`, `bk-table:state(cards)`, `bk-segmented-item:state(checked)`), not an attribute.
|
|
412
|
+
BUILDING.md ("Server rendering and hydration") lists the elements that still write attributes, and when.
|
|
380
413
|
|
|
381
414
|
- `bk-shell-app` measures its width and its content. It shows the result as the custom states `:state(narrow)`,
|
|
382
|
-
`:state(aside-overlay)`, `:state(workspace)` and `:state(
|
|
415
|
+
`:state(aside-overlay)`, `:state(workspace)`, `:state(sections)` and `:state(flow)`. Select `bk-shell-app:state(narrow)` in the CSS
|
|
383
416
|
of the app, not `bk-shell-app[narrow]`.
|
|
384
417
|
- The shell sets the properties `collapsed` and `drawer` on the navs and brands in its sidebar and drawer. A `bk-nav`
|
|
385
418
|
shows them as `:state(collapsed)` and `:state(drawer)`. The shell writes no attribute on them.
|
|
@@ -434,6 +467,8 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
434
467
|
- Write an attribute with its name and its values (`variant="solid"`, `sticky-header`). React 19 sets a
|
|
435
468
|
property when the element has a property of that name. Set data with the property (`rows={rows}`,
|
|
436
469
|
`data={points}`, `renderRow={fn}`). A `ref` has the type of the element class.
|
|
470
|
+
- Write `prefix` text with the property `prefixText` (`prefixText="€"`). `prefix` is a read-only member of every
|
|
471
|
+
element: React sets it as a property, and the browser throws an error. The types do not have `prefix`.
|
|
437
472
|
- Listen to an event with `on` and its exact name: `onchange`, `onselect`, `ontoggle`, `onsort`. The handler receives
|
|
438
473
|
the native event (`event.detail`), also for an event that does not bubble.
|
|
439
474
|
- `onChange` and `onInput` work too, but they receive a synthetic event without `detail`. `onSelect`,
|
|
@@ -447,23 +482,24 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
447
482
|
| Tag | For |
|
|
448
483
|
|---|---|
|
|
449
484
|
| `bk-app-state` | root of an app; contains the central state store (the UI state of the components below and the app data); one adapter persists it (`localStorage` by default); see [State](#state); `persist-scope="url"` on an element with `persist-key` stores its entry in the query string; `urlAdapter({ keys })` does this for chosen keys |
|
|
450
|
-
| `bk-shell-app` | app frame; slots `header`/`header-end`/`nav`/`sidebar`/`sidebar-header`/`sidebar-footer`/`aside`/`statusbar`/`banner` (a `bk-alert banner` or a `bk-shell-sites`)/`footer`; one flat surface with a line between the regions and no frame around the page; with a top nav and no sidebar it is also the frame of a public site; the global `--bk-app-*` tokens style it. Header: the header is `--bk-height-header` high; below the breakpoint it is the optional `--bk-height-header-narrow` high (a site sets a higher header on wide screens); a shell without header content shows no header; any `data-sidebar-toggle` element is the toggle. When the header does not fit: first a header search becomes narrower, down to `--bk-measure-min`; then header items with `data-header-priority="N"` are hidden (lowest first); then the `nav` moves into the drawer; hidden header items do not move into the drawer, so add a copy in the `drawer` slot if a narrow screen needs them; the shell measures again when the content of the header changes. Page modes: page mode needs the document to scroll (no `overflow: hidden` on `html`/`body`); the default is a page; it is a page of sections when the main content is only `bk-page-section`s and `bk-page-hero`s (no page padding, because the sections have it; custom state `:state(sections)`); it is a workspace (fills the viewport) when the main content is a `bk-pane`/`bk-split`/`bk-columns
|
|
485
|
+
| `bk-shell-app` | app frame; slots `header`/`header-end`/`nav`/`sidebar`/`sidebar-header`/`sidebar-footer`/`aside`/`statusbar`/`banner` (a `bk-alert banner` or a `bk-shell-sites`)/`footer`; one flat surface with a line between the regions and no frame around the page; with a top nav and no sidebar it is also the frame of a public site; the global `--bk-app-*` tokens style it. Header: the header is `--bk-height-header` high; below the breakpoint it is the optional `--bk-height-header-narrow` high (a site sets a higher header on wide screens); a shell without header content shows no header; any `data-sidebar-toggle` element is the toggle. When the header does not fit: first a header search becomes narrower, down to `--bk-measure-min`; then header items with `data-header-priority="N"` are hidden (lowest first); then the `nav` moves into the drawer; hidden header items do not move into the drawer, so add a copy in the `drawer` slot if a narrow screen needs them; the shell measures again when the content of the header changes. Page modes: page mode needs the document to scroll (no `overflow: hidden` on `html`/`body`); the default is a page; it is a page of sections when the main content is only `bk-page-section`s and `bk-page-hero`s (no page padding, because the sections have it; custom state `:state(sections)`); it is a workspace (fills the viewport) when the main content is a `bk-pane`/`bk-split`/`bk-columns`; a `bk-columns` that flows (a narrow shell) makes it a page again (`:state(flow)`). Features: collapsible rail (`sidebar-collapsed`, `persist-key`); mobile drawer; `aside-open` (+ `data-aside-toggle`); `aside-resizable` (drag, arrow keys, or a click on the inner edge for a menu of Wider/Narrower/Reset, between `--bk-app-aside-min` and `--bk-app-aside-max`; `aside-width`; persisted; fires `resize` with `detail.sizes` `[main, aside]`). Search: a `data-header-search` field in `header` (after the brand) or in `header-end` (before the end controls) collapses to an icon below the breakpoint (open: a full header row, Cancel, `search-scopes` slot); `search-shortcut` (default `Mod+K`, `none` turns it off) sets the focus in the field and opens it on a narrow screen; `<bk-kbd slot="end" shortcut="header-search">` in the field shows the keys. Other: `<bk-page-header snap>` shows its heading in the header when it scrolls out of view; `transitions` + `transition()` cross-fade the content; safe areas (`--bk-safe-*`, `viewport-fit=cover`) keep the regions out of the notch and the home bar; `nav-placement="bottom"` shows the `nav` items as a bar at the bottom of a phone (icon above label, 3–5 items; the drawer contains the other items); `nav-placement="below"` shows the `nav` in a second row of the header (`--bk-height-header-nav`; if unset, it is as high as the header band; `--bk-shell-app-sticky-top` includes it); the knob `--bk-app-nav-align: center` centres the `nav` in the header |
|
|
451
486
|
| `bk-shell-sites` | a dark row of links to the other sites of an organisation, in the `banner` slot of `bk-shell-app`; the links are plain `<a>` elements, the current site has `aria-current="page"`, tools and the account are in the `end` slot; one line as wide as the header; it scrolls sideways when the links do not fit; `label` (default i18n `sites`) |
|
|
452
487
|
| `bk-shell-centered` | frame of a page with one task (sign in, onboarding, error page): `header`, centred content, `footer`, and an optional `media` slot beside the content from 900px up; the global `--bk-app-*` tokens style it |
|
|
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) |
|
|
488
|
+
| `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; `hint` is a tooltip on hover and keyboard focus and the accessible description (in the rail under the label; never on touch, so put needed information into `description`); a link with `target="_blank"` shows the `external` icon and says "(opens in a new tab)", like `bk-link` and `bk-menu-item`; 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
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 |
|
|
455
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` |
|
|
456
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 |
|
|
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 |
|
|
457
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 |
|
|
458
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 |
|
|
459
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 |
|
|
460
496
|
| `bk-page-cta` | narrow centred call-to-action box: `heading`, text, `actions` slot; `variant="card"` (default; a surface from the raised layer, `--bk-page-cta-bg`) or `variant="plain"` (no background, border or shadow; on the canvas or in a tinted `bk-page-section` band) |
|
|
461
497
|
| `bk-brand` | app name with its mark (`start` slot), a link with `href`; in the rail of a collapsed `bk-shell-app` only the mark shows; add `translate="no"` to stop a page translator from changing the name |
|
|
462
498
|
| `bk-panel` | pane frame for workspaces: heading, actions, toolbar, a body that scrolls on its own, footer, collapsible strip; in a `bk-split`, a collapsible panel collapses automatically while the `data-min` of the open panes do not fit, and opens again when they fit; `busy` shows a veil over the panel and blocks it while it reloads |
|
|
463
|
-
| `bk-columns` | page of independently scrolling columns (`start` / default / `end` slots); the columns stack on narrow screens |
|
|
499
|
+
| `bk-columns` | page of independently scrolling columns (`start` / default / `end` slots); the columns stack on narrow screens; directly in `bk-shell-app` they flow in the document while the shell is narrow, and the shell is then a page |
|
|
464
500
|
| `bk-pane` | uses the full size of its container: the `header`/`footer` regions stay in view, and the content scrolls or fills the rest (`bk-split`, `bk-tabs`, another pane); in a workspace `bk-shell-app` it is the page; `busy` shows a veil over the pane and blocks it while it reloads |
|
|
465
501
|
| `bk-split` | resizable panes (`sizes`, `data-min`, `data-max`, `data-collapsible` (`="toggle"`: opens only through `toggle()`, no divider while closed), `data-keep-size` (keeps its px while the split resizes), `persist-key`); dividers that resize by keyboard (a click opens a menu of 25/50/75 %, collapse and reset, so no drag is needed); `orientation="auto"`; `float-below`: an end pane floats and closes on Escape or a press beside it; `toggle(pane)`, `release(pane)`; `stack-below` + `show="list\|detail"`: one pane at a time on a compact width, with a Back button (fires `change` with `detail.show`) |
|
|
466
|
-
| `bk-split-grid` | panes of equal rank that fill it side by side, as a tiling window manager (conversations, documents, logs); each pane scrolls inside. Layout: as many columns as fit at `min`; `cols`/`rows`; an `areas` template ("a b, a c"; the app switches layouts by setting it). Resize: resizable columns and rows (`sizes`, `default-sizes`, `row-sizes`, `default-row-sizes`, `min-row`, `persist-key`); a divider runs only where two panes meet. A pane with `data-zoomed` fills the split; `leave(panes)` fades out; `stack-below`. For cards on a scrolling page, use `bk-grid` or `bk-sortable orientation="grid"` |
|
|
502
|
+
| `bk-split-grid` | panes of equal rank that fill it side by side, as a tiling window manager (conversations, documents, logs); each pane scrolls inside. Layout: as many columns as fit at `min`; `cols`/`rows`; an `areas` template ("a b, a c"; the app switches layouts by setting it). Resize: resizable columns and rows (`sizes`, `default-sizes`, `row-sizes`, `default-row-sizes`, `min-row`, `persist-key`); a divider runs only where two panes meet. Move: a `data-split-grid-handle` in a pane (a header) drags the pane; a drop on another pane fires the cancelable `reorder` (`detail` `{ pane, from, to, order }`, the app renders the order); outside the grid `dragoutside` (each frame, `inside: true` at the end) and `dropoutside`; Escape cancels; a focusable handle moves with Space and the arrow keys. A pane with `data-zoomed` fills the split; `leave(panes)` fades out; `stack-below`. For cards on a scrolling page, use `bk-grid` or `bk-sortable orientation="grid"` |
|
|
467
503
|
| `bk-sortable` | reorders its children by pointer drag or keyboard (Space, arrows, Space; announced); handles (`data-sortable-handle`; a click on one opens a menu of moves, so no drag is needed); `orientation` vertical/horizontal/grid; `group` moves items between lists; items with `data-sortable-disabled` do not move; cancelable `reorder` `{ item, from, to, fromList, toList }`; the app renders again (or uses `move` for static markup) |
|
|
468
504
|
| `bk-stack` | vertical layout, spaced by the global `--bk-space-flow` (no gap per element) |
|
|
469
505
|
| `bk-lines` | lines that belong together (a caption over its content), spaced by `--bk-space-lines` |
|
|
@@ -474,16 +510,17 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
474
510
|
| `bk-page-header` | page title with `eyebrow`, `description`, and slots `breadcrumbs`/`badges`/`meta`/`actions`; `snap` sets `collapsed` and fires `toggle` when the header scrolls out of view (a shell shows the heading in its header) |
|
|
475
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) |
|
|
476
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 |
|
|
477
|
-
| `bk-tabs` + `bk-tabs-item` + `bk-tabs-panel` | tabs paired by `value`; tabs that do not fit move into a "More" menu; `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; a user switch first fires a cancelable `select` (cancel it to stay on the tab), then `change` (not cancelable) |
|
|
478
|
-
| `bk-button` | button or link (`href`); `variant` (solid/soft/outline/ghost/quiet) × `tone` (neutral/accent/info/success/warning/danger); `type="submit"` works in forms; `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) |
|
|
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) |
|
|
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 |
|
|
479
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`) |
|
|
480
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"`) |
|
|
481
|
-
| `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` |
|
|
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="…">` |
|
|
482
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) |
|
|
483
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 |
|
|
484
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 |
|
|
485
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 |
|
|
486
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` |
|
|
487
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 |
|
|
488
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 |
|
|
489
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` |
|
|
@@ -496,14 +533,14 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
496
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 |
|
|
497
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` |
|
|
498
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` |
|
|
499
|
-
| `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 = []` |
|
|
500
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 |
|
|
501
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 |
|
|
502
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) |
|
|
503
540
|
| `bk-swatch-group` | a choice of one colour from a few that the app provides: a row of swatches (APG radio group), form-associated; `<option value="#e03131">Red</option>` children or `.colors`; `clearable` adds a swatch for no colour (`none-label`); `shape`, `size` |
|
|
504
541
|
| `bk-color-panel` | inline colour picker: saturation/brightness area (2D slider), preview, hue and opacity sliders, format switch (`formats`), value field, swatches (also the content of `bk-input-color`) |
|
|
505
542
|
| `bk-segmented` + `bk-segmented-item` | segmented control (one of a few options), form-associated; segments with `href` become a link nav; `count` badges; `collapse` on a segment folds it to its icon or dot and count in a narrow size container |
|
|
506
|
-
| `bk-input-inline` | text that turns into a field; `save` event with `{ value, done(error?) }` for async saves; to edit any field in place, set a form control in the `edit` slot (select, date, text area) and the read view in the `display` slot |
|
|
543
|
+
| `bk-input-inline` | text that turns into a field; Enter, Tab out of it and a click outside save, Esc cancels; `save` event with `{ value, done(error?) }` for async saves (also for an empty value); to edit any field in place, set a form control in the `edit` slot (select, date, text area) and the read view in the `display` slot |
|
|
507
544
|
| `bk-radio-group` + `bk-radio` | radio buttons (one of a few visible options), form-associated; `description` line; `start`/`end` slots; `orientation="horizontal"`; `variant="card"` for choice cards; `readonly` for an answer that is already set |
|
|
508
545
|
| `bk-checkbox`, `bk-switch` | boolean fields; the label is the text content or `label`; `size="sm\|md\|lg"`; `label-position="start"` shows the label first and the control at the end; `state-labels` on a switch writes On/Off in the track |
|
|
509
546
|
| `bk-checkbox-group` | several `bk-checkbox` as one field: one `name`, one value for each checked box; `label`/`hint`/`error`; `required` (at least one); `min`/`max`; `orientation="horizontal"`; `variant="card"` shows every box as a choice card (`start`/`end` slots, the hint as description); `readonly`; `select-all` (a tri-state box above the others) |
|
|
@@ -514,8 +551,8 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
514
551
|
| `bk-form-guard` | behaviour around a `<form>`: warns on `beforeunload`, on in-app navigation, and before a `bk-dialog`/`bk-drawer` with a dirty form closes; `guardUnsaved(form)` for forms without markup; reflects `dirty` |
|
|
515
552
|
| `bk-form-steps` | behaviour around a `<form>` with `data-step` elements: one step at a time, Back/Next, validation on Next, `data-when="field=value"` skips steps, progress text and a slotted `bk-steps`, cancelable `step` event, `persist-key`, `shortcuts` |
|
|
516
553
|
| `bk-error-summary` | error summary of a form (GOV.UK pattern): after a failed submit it lists the invalid fields as links that focus them; it receives focus and updates while the user corrects the fields; `for` = the form id, else the closest form; `report()` for server-side errors |
|
|
517
|
-
| `bk-chip` | status or tag; `tone` × `variant` (soft/solid/outline); `removable` fires `remove`; `href` (+ `target`/`rel`/`download`) makes it a real link |
|
|
518
|
-
| `bk-chip-group` | chips as one Tab stop (arrow keys); Backspace/Delete fires the `remove` of a removable chip and moves the focus to the next chip; `selection="multiple"` (toggle buttons, `aria-pressed`) or `"single"` (listbox) for filter chips, which are then form-associated (`name`, `value`/`values`, `required`); the value of a chip is its `value` attribute, else its text |
|
|
554
|
+
| `bk-chip` | status or tag; `tone` × `variant` (soft/solid/outline/dashed/text; `text` is a plain label without fill, border and inline padding); `end` slot after the text and the `count`; `removable` fires `remove`; `removed` shows a taken-out chip (struck through, muted, hidden "Removed"; with `removable` the button restores it and fires `restore`, the app clears `removed`); `href` (+ `target`/`rel`/`download`) makes it a real link |
|
|
555
|
+
| `bk-chip-group` | chips as one Tab stop (arrow keys); Backspace/Delete fires the `remove` of a removable chip (`restore` on a `removed` one) and moves the focus to the next chip; `selection="multiple"` (toggle buttons, `aria-pressed`) or `"single"` (listbox) for filter chips, which are then form-associated (`name`, `value`/`values`, `required`); the value of a chip is its `value` attribute, else its text |
|
|
519
556
|
| `bk-filter-bar` | the active filters as removable chips (a `bk-chip-group`) and Clear all; the app sets `items` (`{ key, label }`) and handles `remove` (`{ key }`) and `clear`; `start`/`end` slots (add filter, save view); announces the count; `bk-table` shows its filters in one |
|
|
520
557
|
| `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
558
|
| `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`) |
|
|
@@ -531,7 +568,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
531
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 |
|
|
532
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` |
|
|
533
570
|
| `bk-badge` | a visual with a small badge on its corner (for example, the owner on the logo of a project) |
|
|
534
|
-
| `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 })` opens it from script; `actions` slot for toolbar buttons; `current` is the image that it shows |
|
|
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` |
|
|
535
572
|
| `bk-empty-state` | `icon`, `heading`, `size` (`lg` for a page that shows only this state), text, `actions` slot |
|
|
536
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 |
|
|
537
574
|
| `bk-spinner` | loading indicator (1em); `variant="pulse"`: a pulse line with a running beat, for something alive that works |
|
|
@@ -556,7 +593,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
556
593
|
| `bk-button-share` | shares `url` (default the page) with the system share sheet, or copies the link if there is no share sheet (icon and name change to "Copy link", then "Link copied"); `heading`, `text`; slot text makes it a labelled button; `share` event with `{ method, url }` |
|
|
557
594
|
| `bk-button-top` | floating back-to-top button: shows after `threshold` px of scrolling the document or the element in `for`; scrolls (instant with reduced motion); moves the focus to the start; avoids the safe areas, the keyboard, the status bar and the bottom nav |
|
|
558
595
|
| `bk-status-dot` | status dot with `tone`, `pulse` |
|
|
559
|
-
| `bk-delta` | a change inline in text or in a table cell, with tabular figures at the size of the text: `value` with a mark ("▲ 12"), green when good, `inverted` when down is good; 0 is a quiet "–"; `new` shows "New"; `notation="compact"` (12.3K; the exact value is for screen readers and in the tooltip); `variant="count"` for a figure that only grows ("+12") with `label` ("since midnight"); `variant="rank"`: `previous` → `value` ("#12 → #5 ▲ 7"; rank 1 is the best); `tiers="3 10 50"` colours the new rank by its tier |
|
|
596
|
+
| `bk-delta` | a change inline in text or in a table cell, with tabular figures at the size of the text: `value` with a mark ("▲ 12"), green when good, `inverted` when down is good; 0 is a quiet "–"; `new` shows "New"; `notation="compact"` (12.3K; the exact value is for screen readers and in the tooltip); `variant="count"` for a figure that only grows ("+12") with `label` ("since midnight"); `variant="rank"`: `previous` → `value` ("#12 → #5 ▲ 7"; rank 1 is the best); `tiers="3 10 50"` colours the new rank by its tier; `value-text="1.234"` shows a change that the app has formatted (the direction and the tone come from `value`; not for `rank`) |
|
|
560
597
|
| `bk-steps` + `bk-steps-item` | progress or phase list: step `state` done, current, pending or error (check, spinner, number, cross); `heading`, `description`, `end` meta; `orientation="horizontal"` for a wizard row (with descriptions: columns of the same width; in a container narrower than 32rem the steps are in a column); tokens for a highlighted current row and a bare spinner; `href` (a real link) or `selectable` (a button) makes a step openable and fires a cancelable `select`; `disabled` makes it wait (wizard, task list, record path); states `skipped` and `cancelled`; an `output` slot (a `bk-code live`) that the title opens, open while the step is not done, for job runs (Patterns/Jobs) |
|
|
561
598
|
| `bk-tasks` + `bk-tasks-item` | tasks with their state, each a row that opens to its output: the job history of an app, the steps of a job, background tasks. `state` pending, running, waiting, done, error, skipped or cancelled (a symbol; the state word for screen readers is `state-text`); `heading`, `description`, `end` (a duration), `level`, `open`; the content is a `bk-code variant="plain"` or a nested `bk-tasks` with the same indent as the row; `divided` for hairlines between the rows; arrow keys move between the rows (Patterns/Jobs) |
|
|
562
599
|
| `bk-timeline` + `bk-timeline-item` | events on a line: `heading`, `description`, `time` (formatted with `Intl`) or `end`, `tone` dot or `marker` slot, `current`; the default slot is for content below, or a `bk-card` beside the marker (no heading; the current card uses the tone border); `time-zone` on an item writes its date-time in that zone |
|
|
@@ -570,18 +607,18 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
570
607
|
| `bk-time-relative` | self-updating "3 minutes ago", durations and dates in the page locale; `time-zone` (IANA) writes the absolute date in that zone |
|
|
571
608
|
| `bk-time-countdown` | time down to `to` (or up from `from`): `<time>` with `format="clock"` (04:12) or `text`; no live region for each second; polite announcements at 1 minute, 10 seconds and the end (`silent` turns them off); `end` event; `urgent` for the last minute; stops while the tab is hidden |
|
|
572
609
|
| `bk-kbd` | keycaps, platform-aware: `<bk-kbd keys="Mod+K">` |
|
|
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) |
|
|
610
|
+
| `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); `target="_blank"` shows the `external` icon and says "(opens in a new tab)" (`::part(new-tab)` hides the icon) |
|
|
574
611
|
| `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 |
|
|
575
612
|
| `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 |
|
|
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 |
|
|
613
|
+
| `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); `alert` (or `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 |
|
|
577
614
|
| `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 |
|
|
578
615
|
| `bk-toast` | one notification as inline content (tone, heading, actions, dismiss) |
|
|
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`) |
|
|
616
|
+
| `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 (also a `bk-dialog` or `bk-drawer` in a shadow root, for example the navigation drawer of `bk-shell-app`, and also with toasts that show already), so the toasts are not inert; `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`) |
|
|
580
617
|
| `bk-popover` | non-modal panel: `<bk-button slot="trigger">` + content; `placement`; `for="<id>"` anchors it to an element by id without a trigger slot (a coachmark); `hover` (+ `delay`, `close-delay`): preview card for a link (WCAG 1.4.13); `selection-for="<id>"`: toolbar at the selected text; below `--bk-sheet-below` (40rem) it opens as a bottom sheet (`sheet="never\|always"`); `<button commandfor="id" command="--toggle">` works without script |
|
|
581
618
|
| `bk-popover-help` | info button that opens a short note on click (toggletip): `heading`, `label`, default slot |
|
|
582
619
|
| `bk-drop-target` | wraps content that accepts a drop: `accept` (data types), `effect`; dashed outline while an accepted drag is over it (`:state(receiving)`); the `drop` event is native |
|
|
583
620
|
| `bk-menu-list` | inline menu of `bk-menu-item`s (for example, a list of actions in a sidebar); `bk-menu` shows the same in a popover; `variant="tiles"`: a grid of pictures (the `preview` of the items) with captions; an item with `current` marks what is open or entered now |
|
|
584
|
-
| `bk-menu` + `bk-menu-item` (+ `-divider`, `-label`) | menu button; fires `select` with `{ value }`; items with `icon`, `tone="danger"`, a nested `bk-menu-list` in `slot="submenu"` (submenu), `type="checkbox"`, `href`, `shortcut`, `description` (second line); `filter` adds a search field (it searches label, description and section label; Enter selects the first match); the `
|
|
621
|
+
| `bk-menu` + `bk-menu-item` (+ `-divider`, `-label`) | menu button; fires `select` with `{ value }`; items with `icon`, `tone="danger"`, a nested `bk-menu-list` in `slot="submenu"` (submenu), `type="checkbox"`, `href`, `shortcut`, `description` (second line); `removable` (a remove button and Delete fire `remove` with `{ value, item }`, the app removes the item); `filter` adds a search field (it searches label, description and section label; Enter selects the first match); the `header` slot stays above the scrolling items (for example who is signed in; plain text, not an item), the `footer` slot stays below them; `variant="tiles"` |
|
|
585
622
|
| `bk-menu-context` | menu for right-click, long press or Shift+F10 on the area in `slot="target"`; the items are those of a `bk-menu`; `contextTarget` (set it before `open`), `showAt(x, y)`, `disabled`; the innermost menu has priority |
|
|
586
623
|
| `bk-message` + `bk-message-list` | chat messages: `from` user, assistant or system; `variant` auto (user bubble at the end, others plain), bubble or plain; `author` + `time` (Intl) header; slots `start`, `header`, `meta`, `actions` (shown on hover or focus) and `status`; `status` sending, streaming or error (fires `retry`). The list is a scrolling `role="log"`. It keeps the newest message in view while the reader is at the end. It shows a floating "Go to latest" (with the count of new messages) above the list. With `pin-prompt`, it shows the latest user message as a bar at the top, above the visible part, while that message is out of view (the message that the visible part answers) |
|
|
587
624
|
| `bk-message-tool` | a tool call in a message: `name`, `state` pending, running, waiting, done, error or denied (icon and text, announced on change; `error` opens it); it opens to the `input` and `output` slots |
|
|
@@ -593,11 +630,11 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
593
630
|
| `bk-message-branches` | "‹ 2 of 3 ›" between the versions of an answer: `index`, `count`; fires `change`; the position is a polite status |
|
|
594
631
|
| `bk-composer` | chat input: autogrowing field + toolbar (`start`, `end` and `header` slots; `above`: a strip with its own surface at the top of the box) + send button. Enter sends (`send-on="mod-enter"` for Ctrl/⌘+Enter). The cancelable `send` event has `{ value }` and empties the field. `busy` adds a stop button (`stop`). `sending` shows a spinner in the send button and sends nothing a second time (the app saves the message). `maxlength` limits the text. `triggers="/@"` + a `completions({ trigger, query, start })` function show option rows above the box (Enter and Tab choose; cancelable `complete`); with `inline`, they show in the box under the field (where a popup has no room). An option with `token: true` stays one unit (Backspace removes it whole; `tokens`; `send` detail `tokens`). `history` (+ `history-key`) recalls sent messages with ↑/↓. Pasted or dropped files fire `attach` with `{ files }` (put the chips in `header`). `optional` sends without text. It is form-associated |
|
|
595
632
|
| `bk-command-menu` | inline command search + grouped results (content of the palette, usable anywhere) |
|
|
596
|
-
| `bk-picture` | a picture in a layout: 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);
|
|
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` |
|
|
597
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 |
|
|
598
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 |
|
|
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` |
|
|
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 |
|
|
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 |
|
|
601
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") |
|
|
602
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 |
|
|
603
640
|
| `bk-command-palette` | ⌘K palette and global search: `items` and/or async `search(query)`; fires `select` |
|
|
@@ -605,7 +642,7 @@ A React 19 app uses the elements directly. The package has their JSX types in `j
|
|
|
605
642
|
| `bk-swatch-palette` | a small picture of a palette (`palette` or `.colors`) in the scheme around it; its host is a scope root |
|
|
606
643
|
| `bk-tooltip` | wraps the target or uses `for="id"`: `<bk-tooltip content="Copy"><bk-button variant="ghost" …></bk-tooltip>`; `shortcut="Mod+K"` adds keycaps and `aria-keyshortcuts` |
|
|
607
644
|
| `bk-visually-hidden` | content for screen readers only; `focusable` shows it while the focus is inside, like a skip link (the move button of a pane) |
|
|
608
|
-
| `confirmDialog()` | `await confirmDialog({ heading, message, danger, confirmLabel })` → boolean; `danger` opens an alert dialog |
|
|
645
|
+
| `confirmDialog()` | `await confirmDialog({ heading, message, danger, confirmLabel, action })` → boolean; `danger` opens an alert dialog (the focus starts on Cancel; Enter activates the focused button); `action: () => Promise` runs on confirm: the confirm button shows `loading`, Cancel is disabled, Esc and the backdrop do not dismiss, the dialog closes and resolves true when the action fulfils, and a rejection stays open with the error message in a `bk-alert` so the user can try again |
|
|
609
646
|
| `chooseDialog()` | `await chooseDialog({ heading, message, confirmLabel, choices: [{ value, label, icon }] })` → the chosen `value`, `"confirm"` or `null` |
|
|
610
647
|
| `promptDialog()` | `await promptDialog({ heading, label, value, hint, placeholder, required, trim, validate, confirmLabel })` → the text, or `null` for Cancel and Esc; Enter confirms; the text has no spaces at its ends (`trim`, default true); an empty required field (also one with only spaces) stays open; `validate(value)` returns a message that shows in the field, or null |
|
|
611
648
|
|
|
@@ -686,7 +723,7 @@ attempt) and `:state(user-valid)`. It also has the read-only properties `touched
|
|
|
686
723
|
them. Use `bk-input-text:state(user-invalid) { … }` to show a problem only after the user touched the field.
|
|
687
724
|
|
|
688
725
|
The text-box fields (`bk-input-text`, `bk-input-number`, `bk-input-time`, `bk-input-date`,
|
|
689
|
-
`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`,
|
|
690
727
|
`size`, the `start`/`end` slots with the `icon` shorthand, `prefix`/`suffix` text and `clearable`. The `prefix`
|
|
691
728
|
and `suffix` text is not part of the value, and a screen reader reads it in the description. `clearable` has
|
|
692
729
|
`clear-label`. Its button is not in the tab order, and it fires `input` and `change`. The shared tokens are
|
|
@@ -837,6 +874,8 @@ setting of an app. The app composes the control and applies the choice in `chang
|
|
|
837
874
|
| Theme | `bk-segmented` with three `bk-segmented-item icon`, or a `bk-menu` of `bk-menu-item type="radio"` | `setTheme(value)` |
|
|
838
875
|
| Palette | `bk-radio-group variant="card"`, each `bk-radio` with a `bk-swatch-palette` in `start` | `setPalette(value)` |
|
|
839
876
|
| Text size | `bk-segmented` with the factors of the app | `setTextScale(value)` |
|
|
877
|
+
| Reduce animations | `bk-menu-item type="checkbox"` in the menu of the theme, or a `bk-switch` | `--bk-motion: 0` on `<html>` (all durations become 0) |
|
|
878
|
+
| Underline links | `bk-menu-item type="checkbox"` in the menu of the theme, or a `bk-switch` | `--bk-link-underline: currentColor` on `<html>` |
|
|
840
879
|
|
|
841
880
|
**In the sidebar.** Put the theme in the footer row of `bk-shell-app`. A `bk-nav` in `sidebar-footer` contains a
|
|
842
881
|
`bk-menu`, and its trigger is a `bk-nav-item`. The item is in line with Settings and with the collapse toggle of
|
|
@@ -850,10 +889,17 @@ the shell. In the rail it shows only its icon, with its label as a tooltip.
|
|
|
850
889
|
<bk-menu-item type="radio" value="system" checked>System</bk-menu-item>
|
|
851
890
|
<bk-menu-item type="radio" value="light">Light</bk-menu-item>
|
|
852
891
|
<bk-menu-item type="radio" value="dark">Dark</bk-menu-item>
|
|
892
|
+
<bk-menu-divider></bk-menu-divider>
|
|
893
|
+
<bk-menu-item type="checkbox" value="motion">Reduce animations</bk-menu-item>
|
|
894
|
+
<bk-menu-item type="checkbox" value="underline">Underline links</bk-menu-item>
|
|
853
895
|
</bk-menu>
|
|
854
896
|
</bk-nav>
|
|
855
897
|
```
|
|
856
898
|
|
|
899
|
+
The menu of the theme is the place for the preferences of the look: the theme, then the preferences as checkbox
|
|
900
|
+
items. Apply a checkbox item in `select`: `event.detail.item.checked` is its new state. Store the choice as the app
|
|
901
|
+
stores its other settings.
|
|
902
|
+
|
|
857
903
|
The test `src/tokens.test.ts` checks the contrast of every derived token for a range of brand colours.
|
|
858
904
|
|
|
859
905
|
**Character knobs.** The default look is neutral. An app gives it a character with a few knobs.
|
|
@@ -952,6 +998,26 @@ Light/dark: the page follows the OS. Force one theme with `<html data-theme="dar
|
|
|
952
998
|
subtree can set its own `data-theme`. Derived tokens use `light-dark()`, and overrides of derived
|
|
953
999
|
tokens can use it too: `--bk-accent-solid: light-dark(#2457ff, #8aa4ff);`.
|
|
954
1000
|
|
|
1001
|
+
### A CSS reset in the app
|
|
1002
|
+
|
|
1003
|
+
A global reset such as the preflight of Tailwind (`*, ::before, ::after { margin: 0; padding: 0; border: 0 solid }`)
|
|
1004
|
+
is a rule of the page. A rule of the page beats the `:host` rules of a shadow root, whatever the layers. So the reset
|
|
1005
|
+
removes the padding and border of `bk-surface`, the margin of `bk-empty-state` and the same of other elements.
|
|
1006
|
+
`@bk2k/ui/reset.css` reverts the margin, padding and border of the reset on every element of the library. The
|
|
1007
|
+
`:host` rules apply again. The utilities of the app in later layers still win.
|
|
1008
|
+
|
|
1009
|
+
Import it after the reset, in the layer of the reset. Tailwind 4 declares `@layer theme, base, components, utilities;`
|
|
1010
|
+
and puts its reset in `base`, so the file (it uses `@layer base`) fits:
|
|
1011
|
+
|
|
1012
|
+
```css
|
|
1013
|
+
@import "tailwindcss";
|
|
1014
|
+
@import "@bk2k/ui/reset.css";
|
|
1015
|
+
```
|
|
1016
|
+
|
|
1017
|
+
The rule uses `:where()`, so it has no specificity. It wins over the reset by its order in the same layer. For a reset in
|
|
1018
|
+
another layer, copy the rule from the file and change the layer name. The file lists the tags of the library at build
|
|
1019
|
+
time, so a new element is in it at once.
|
|
1020
|
+
|
|
955
1021
|
### One scheme only
|
|
956
1022
|
|
|
957
1023
|
An app can support only light or only dark. Write both of these, so the page is right before scripts run and on the server:
|
|
@@ -981,7 +1047,7 @@ adding the tokens a second time.
|
|
|
981
1047
|
|
|
982
1048
|
These are content components. Put them in a `bk-surface` or a `bk-card`: `bk-chart-bar` (vertical/horizontal,
|
|
983
1049
|
grouped/stacked/percent), `bk-chart-line` (+ `variant="area"`; reference lines are `bk-chart-mark` children), `bk-chart-sparkline`, `bk-chart-histogram`,
|
|
984
|
-
`bk-chart-stacked-bar` (one whole split into parts: a segmented progress bar. `max` leaves the rest empty, `rest-label` names it, and `show-total` shows the sum after the bar. A part with `pattern: "hatched"` is striped, a part with `tone` uses the colour of its meaning, and a part with `caption` has a second line in the legend), `bk-chart-bridge` (a bridge, in finance often called a waterfall: a start, steps up and down, `kind: "total"` subtotals, and `end-label` for the end; `min` starts the scale above zero), `bk-chart-bar-list` (ranked rows with a bar, share and value: "where does it go"; a row can have an `icon`, its own `color` and an `href`), `bk-chart-bullet` (one value against a reference in one row: a bar, a marker, an optional band `band-from`/`band-to` and the deviation "+38 %"; `better="higher|lower"` sets the tone, and `neutral="0.1"` gives no verdict inside ±10 %; rows with the same `max` are in line), `bk-chart-waterfall` (nested spans of a run on a time line: a tree grid with bars and durations, `select`), `bk-stat` (KPI tile: value, unit, delta with trend, `start` slot, `order`; a centred `bk-page-section` centres all its rows),
|
|
1050
|
+
`bk-chart-stacked-bar` (one whole split into parts: a segmented progress bar. `max` leaves the rest empty, `rest-label` names it, and `show-total` shows the sum after the bar. A part with `pattern: "hatched"` is striped, a part with `tone` uses the colour of its meaning, and a part with `caption` has a second line in the legend), `bk-chart-bridge` (a bridge, in finance often called a waterfall: a start, steps up and down, `kind: "total"` subtotals, and `end-label` for the end; `min` starts the scale above zero), `bk-chart-bar-list` (ranked rows with a bar, share and value: "where does it go"; a row can have an `icon`, its own `color` and an `href`), `bk-chart-bullet` (one value against a reference in one row: a bar, a marker, an optional band `band-from`/`band-to` and the deviation "+38 %"; `better="higher|lower"` sets the tone, and `neutral="0.1"` gives no verdict inside ±10 %; rows with the same `max` are in line), `bk-chart-waterfall` (nested spans of a run on a time line: a tree grid with bars and durations, `select`), `bk-stat` (KPI tile: value, unit, delta with trend, `start` slot, `order`; `value-text`/`delta-text` show text that the app has formatted ("345.867"), as `aria-valuetext` does; the `label` and `value` slots take rich content instead of the attributes, for example a `bk-footnote` marker; a centred `bk-page-section` centres all its rows),
|
|
985
1051
|
`bk-stat-group` (a wrapping row of stats, `divided` by hairlines),
|
|
986
1052
|
`bk-chart-legend`.
|
|
987
1053
|
|
|
@@ -1013,6 +1079,10 @@ More charts: `bk-chart-area` (stacked layers over time, `variant="percent"` for
|
|
|
1013
1079
|
hides the series, and the value axis fits the visible ones. `hidden: true` in a series starts it hidden. The
|
|
1014
1080
|
last visible series stays on. The chart fires `change` with `{ visible }` (the keys) and stores them with
|
|
1015
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.
|
|
1016
1086
|
- `variant="minimal"` on `bk-chart-bar` shows the baseline and the categories only, with no grid or value axis.
|
|
1017
1087
|
This is the quiet form for small charts in the own layout of an app (use it with `labels`).
|
|
1018
1088
|
- Clickable categories on `bk-chart-bar` (a week strip): `href="?day={x}"` makes each category a real link
|
|
@@ -1020,6 +1090,10 @@ More charts: `bk-chart-area` (stacked layers over time, `variant="percent"` for
|
|
|
1020
1090
|
The link resolver resolves each address. A plain click fires `navigate`. `clickable` makes each category a button
|
|
1021
1091
|
that fires a cancelable `select` `{ category, index }`. `current` marks the chosen category: a bold label and a mark
|
|
1022
1092
|
under it. The other bars use `--bk-chart-bar-rest`.
|
|
1093
|
+
- `tooltip-fields="prints likes"` on `bk-chart-bar` and `bk-chart-line` (also `bk-chart-area`) lists more fields of the row in
|
|
1094
|
+
the tooltip, in the data table and in the screen-reader name of each mark, without drawing them. The property
|
|
1095
|
+
`tooltipFields` also takes `{ key, label, format }` objects: `label` names the field, and `format` are
|
|
1096
|
+
`Intl.NumberFormat` options (the default is the plain number format of the locale).
|
|
1023
1097
|
- `detail="<field>"` on `bk-chart-bar` shows a second label under each category (a date, for example).
|
|
1024
1098
|
`detail-label` names its column in the data table.
|
|
1025
1099
|
- A null value on `bk-chart-bar` draws no bar, only a short outline at the baseline. A category without any value
|