@bk2k/ui 0.6.7 → 0.7.0
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 +88 -2
- package/CHANGELOG.md +193 -0
- package/USAGE.md +102 -33
- 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 +4 -2
- package/dist/clipboard.js +1 -0
- package/dist/components/bk-alert.js +2 -1
- 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 +55 -17
- package/dist/components/bk-button.js +71 -24
- package/dist/components/bk-card.d.ts +4 -0
- package/dist/components/bk-card.js +15 -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 +6 -0
- package/dist/components/bk-chart-bar.d.ts +63 -9
- package/dist/components/bk-chart-bar.js +152 -41
- package/dist/components/bk-chart-line.d.ts +13 -0
- package/dist/components/bk-chart-line.js +11 -1
- 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 +53 -8
- package/dist/components/bk-chip.js +43 -7
- 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 +30 -6
- package/dist/components/bk-combobox.js +63 -20
- package/dist/components/bk-delta.d.ts +10 -0
- package/dist/components/bk-delta.js +8 -6
- package/dist/components/bk-dialog.d.ts +16 -6
- package/dist/components/bk-dialog.js +20 -8
- 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-item.js +8 -6
- package/dist/components/bk-facts.d.ts +6 -4
- package/dist/components/bk-facts.js +22 -10
- 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 +33 -5
- package/dist/components/bk-image-compare.js +72 -24
- 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 +107 -11
- package/dist/components/bk-image-viewer.js +205 -34
- 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-text.d.ts +11 -0
- package/dist/components/bk-input-text.js +17 -3
- package/dist/components/bk-input-time-zone.d.ts +3 -0
- package/dist/components/bk-input-time.js +2 -1
- package/dist/components/bk-item.js +2 -1
- package/dist/components/bk-lightbox.d.ts +12 -3
- package/dist/components/bk-lightbox.js +6 -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-model-viewer.d.ts +12 -1
- package/dist/components/bk-model-viewer.js +15 -2
- 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.js +2 -0
- 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-period-nav.d.ts +102 -0
- package/dist/components/bk-period-nav.js +69 -0
- 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-select.js +2 -1
- package/dist/components/bk-shell-app.d.ts +13 -6
- package/dist/components/bk-shell-app.js +47 -11
- package/dist/components/bk-shell-sites.d.ts +2 -1
- package/dist/components/bk-shell-sites.js +3 -5
- package/dist/components/bk-sortable.d.ts +3 -0
- package/dist/components/bk-sortable.js +10 -17
- package/dist/components/bk-split-grid.d.ts +104 -3
- package/dist/components/bk-split-grid.js +425 -2
- package/dist/components/bk-split.d.ts +3 -0
- package/dist/components/bk-split.js +3 -0
- package/dist/components/bk-stat-group.js +2 -1
- package/dist/components/bk-stat.d.ts +17 -0
- package/dist/components/bk-stat.js +7 -3
- 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 +17 -13
- package/dist/components/bk-table.js +94 -15
- 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 +50 -7
- package/dist/components/bk-tabs.js +168 -96
- 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 +19 -1
- package/dist/i18n/en.d.ts +2 -0
- package/dist/i18n/en.js +3 -0
- package/dist/i18n.d.ts +23 -2
- package/dist/i18n.js +35 -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 +8 -1
- package/dist/internal/announcer.js +26 -10
- 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.d.ts +3 -0
- package/dist/internal/cloak.js +7 -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/drag.d.ts +11 -0
- package/dist/internal/drag.js +23 -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.d.ts +2 -3
- package/dist/internal/handle-menu.js +11 -3
- 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/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 +20 -0
- package/dist/internal/late.js +45 -0
- 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/jsx.d.ts +176 -56
- 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 +13 -12
- 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 +14 -4
- 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 +5 -5
- package/dist/standalone/bk-button-group.js +5 -5
- package/dist/standalone/bk-button-share.js +5 -5
- 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 +20 -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 +253 -166
- 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 +116 -103
- 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 +4 -4
- package/dist/standalone/bk-checkbox.js +4 -4
- package/dist/standalone/bk-chip-group.js +9 -5
- package/dist/standalone/bk-chip.js +56 -17
- 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 +53 -33
- package/dist/standalone/bk-command-menu.js +6 -6
- package/dist/standalone/bk-command-palette.js +6 -5
- 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 +2 -2
- 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 +10 -8
- package/dist/standalone/bk-facts.js +28 -16
- 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 +88 -47
- package/dist/standalone/bk-image-crop.js +6 -6
- package/dist/standalone/bk-image-editor.js +2 -1
- package/dist/standalone/bk-image-viewer.js +180 -59
- package/dist/standalone/bk-input-code.js +4 -4
- package/dist/standalone/bk-input-color.js +4 -4
- 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 +5 -5
- 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-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 +11 -7
- package/dist/standalone/bk-lines.js +1 -1
- package/dist/standalone/bk-link.js +33 -19
- package/dist/standalone/bk-listbox-columns.js +6 -6
- package/dist/standalone/bk-listbox-item.js +1 -1
- package/dist/standalone/bk-listbox-search.js +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 +3 -3
- 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 +6 -6
- 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 +5 -3
- 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 +69 -0
- package/dist/standalone/bk-picture.js +24 -15
- package/dist/standalone/bk-popover-help.js +3 -3
- package/dist/standalone/bk-popover.js +2 -2
- package/dist/standalone/bk-presence-cursor.js +2 -2
- 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 +4 -4
- 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 +15 -13
- package/dist/standalone/bk-select-cascade.js +3 -3
- package/dist/standalone/bk-select-tree.js +4 -4
- package/dist/standalone/bk-select.js +7 -6
- package/dist/standalone/bk-shell-app.js +1 -1217
- 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 +58 -60
- package/dist/standalone/bk-spinner.js +2 -2
- package/dist/standalone/bk-split-grid.js +318 -41
- package/dist/standalone/bk-split.js +9 -6
- package/dist/standalone/bk-stack.js +1 -1
- package/dist/standalone/bk-stat-group.js +8 -7
- package/dist/standalone/bk-stat.js +11 -8
- 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 +4 -4
- 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 -1887
- package/dist/standalone/bk-tabs-item.js +58 -35
- package/dist/standalone/bk-tabs-panel.js +7 -3
- package/dist/standalone/bk-tabs.js +160 -98
- 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 +19 -18
- 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 +3 -3
- 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-D1zrRWwO.js +36 -0
- package/dist/standalone/chunks/{appearance-waHnV0kk.js → appearance-CBOJXbmC.js} +1 -1
- package/dist/standalone/chunks/{bk-alert-offline-BoMEYxnE.js → bk-alert-offline-Clw0ZSsH.js} +3 -3
- package/dist/standalone/chunks/{bk-carousel-B7-9OanA.js → bk-carousel-Biz7t8sL.js} +4 -4
- package/dist/standalone/chunks/{bk-diagram-CpOpicmo.js → bk-diagram-D_fQf6SF.js} +5 -5
- package/dist/standalone/chunks/{bk-dialog-a2BtUBf2.js → bk-dialog-DwZyUUHh.js} +65 -27
- package/dist/standalone/chunks/{bk-icon-DssFsNuB.js → bk-icon-Bp_flKdv.js} +4 -3
- package/dist/standalone/chunks/{bk-image-editor-z_Uj83fy.js → bk-image-editor-BADsoLRL.js} +5 -5
- package/dist/standalone/chunks/{bk-input-date-range-BQkbPlSJ.js → bk-input-date-range-DHcJ8-5g.js} +2 -2
- package/dist/standalone/chunks/{bk-input-rich-Dte_b4Ev.js → bk-input-rich-CFhW6vRa.js} +6 -6
- package/dist/standalone/chunks/{bk-input-text-CUNQG1ah.js → bk-input-text-DviyLBqj.js} +63 -54
- package/dist/standalone/chunks/{bk-model-viewer-D1XJPgAG.js → bk-model-viewer-w_Ah4Tvs.js} +22 -8
- package/dist/standalone/chunks/{bk-qr-code-CbI9rdOK.js → bk-qr-code-CYMovNVl.js} +3 -3
- package/dist/standalone/chunks/bk-shell-app-B2lxHit8.js +1235 -0
- package/dist/standalone/chunks/{bk-surface-DkIhrWMt.js → bk-surface-D7e0tErs.js} +9 -7
- package/dist/standalone/chunks/{bk-swatch-palette-BNNXTP3w.js → bk-swatch-palette-x13JgJQi.js} +6 -6
- package/dist/standalone/chunks/bk-table-CP8n_jy7.js +1944 -0
- package/dist/standalone/chunks/{bk-toast-group-Cix-Urgi.js → bk-toast-group-CoL6W7uk.js} +27 -24
- package/dist/standalone/chunks/{brush-Bn3lPdHN.js → brush-DALmXSru.js} +18 -2
- package/dist/standalone/chunks/{busy-B7Mxemwm.js → busy-BUB22mGY.js} +5 -4
- package/dist/standalone/chunks/{chart-tokens-D1Exf7BW.js → chart-tokens-DQ4hVSmn.js} +2 -2
- package/dist/standalone/chunks/{choice-field-BnuK9mp_.js → choice-field-poOTerh1.js} +6 -6
- package/dist/standalone/chunks/{choice-item-B6-9ZRlf.js → choice-item-Cx-nm1js.js} +17 -8
- package/dist/standalone/chunks/clipboard-RqIeP9Uz.js +29 -0
- package/dist/standalone/chunks/clipboard-UVLSkL4C.js +34 -0
- package/dist/standalone/chunks/{crop-frame-poLCGrBG.js → crop-frame-Z9N0QML4.js} +1 -11
- package/dist/standalone/chunks/{date-field-BQ5k-DDL.js → date-field-B-fCXa2D.js} +48 -47
- package/dist/standalone/chunks/{define-CzVPD4Zi.js → define-DkVeu7e9.js} +1 -1
- 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-D7dqSP9M.js → form-control-CHpfKAKa.js} +2 -2
- package/dist/standalone/chunks/{frame-BW1nKuoM.js → frame-xIMVEUCi.js} +7 -4
- package/dist/standalone/chunks/handle-menu-BgYUbGO2.js +56 -0
- package/dist/standalone/chunks/{heading-text-CV5gBf7k.js → heading-text-CgnCa_q2.js} +1 -1
- package/dist/standalone/chunks/{i18n-CNsBRNPu.js → i18n-DFfGgd3d.js} +56 -34
- package/dist/standalone/chunks/{i18n-CrZgrRu9.js → i18n-DQAcbHkY.js} +1 -1
- package/dist/standalone/chunks/link--YWr8exL.js +69 -0
- package/dist/standalone/chunks/{marks-CdqbbJpM.js → marks-pOUDNUf1.js} +2 -2
- package/dist/standalone/chunks/{options-DMEc8rQt.js → options-BdC8-KKM.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-oDhxsYMr.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-EclrETaQ.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-BgKEjDQx.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-BwL-Gp8w.js → summary-W5s0TFqV.js} +1 -1
- package/dist/standalone/chunks/{text-field-CTp2b-Ai.js → text-field-CqhJSAwZ.js} +4 -4
- package/dist/standalone/chunks/{toggle-control-DXkgmz7R.js → toggle-control-lvZbQtGW.js} +2 -2
- package/dist/standalone/chunks/{tokens-BuahF1lF.js → tokens-C_ul7pL9.js} +4 -3
- package/dist/standalone/chunks/{virtual-B-1oN14Y.js → virtual-C_h6sHnm.js} +1 -1
- package/dist/standalone/confirm.js +27 -14
- package/dist/standalone/i18n-de.js +20 -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 +9 -5
- package/dist/tokens.css +9 -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-B7bz8hmV.js +0 -275
- package/dist/standalone/chunks/clipboard-DBGdJ-1S.js +0 -61
- package/dist/standalone/chunks/handle-menu-DsxWvv4D.js +0 -22
- package/dist/standalone/chunks/link-CWSMsx04.js +0 -60
|
@@ -71,6 +71,7 @@ export declare class BkMenuList extends LitElement {
|
|
|
71
71
|
/** The item that is the Tab stop. */
|
|
72
72
|
private current;
|
|
73
73
|
constructor();
|
|
74
|
+
private onRemove;
|
|
74
75
|
static styles: import("lit").CSSResult[];
|
|
75
76
|
/** The items of this list (not of nested menus), in order; works for slotted (re-slotted) children too. */
|
|
76
77
|
get items(): BkMenuItem[];
|
|
@@ -41,6 +41,16 @@ class BkMenuList extends LitElement {
|
|
|
41
41
|
if (item)
|
|
42
42
|
this.setTabStop(item);
|
|
43
43
|
});
|
|
44
|
+
this.addEventListener("remove", (e) => this.onRemove(e), true);
|
|
45
|
+
}
|
|
46
|
+
onRemove(e) {
|
|
47
|
+
const item = this.itemFromEvent(e);
|
|
48
|
+
if (!item || !item.matches(":focus-within"))
|
|
49
|
+
return;
|
|
50
|
+
const items = this.enabledItems;
|
|
51
|
+
const i = items.indexOf(item);
|
|
52
|
+
const next = items[i + 1] ?? items[i - 1];
|
|
53
|
+
next?.focus();
|
|
44
54
|
}
|
|
45
55
|
static styles = [base, css`
|
|
46
56
|
:host {
|
|
@@ -50,6 +50,8 @@ export type { MenuSelectDetail } from "./bk-menu-list.js";
|
|
|
50
50
|
* Enter in the field chooses the first match. Closing the menu clears the field.
|
|
51
51
|
*
|
|
52
52
|
* The `footer` slot stays in view below the items while a long list scrolls, for example for further options or a note.
|
|
53
|
+
* The `header` slot stays in view above them, for example for the name and the email address of the signed-in user.
|
|
54
|
+
* Its content is plain text, not an item: the keyboard skips it. It starts where the labels of the items start.
|
|
53
55
|
* Its content starts where the items start. The label of a field in it (a `<bk-segmented label>`)
|
|
54
56
|
* looks like a `<bk-menu-label>`.
|
|
55
57
|
*
|
|
@@ -58,16 +60,18 @@ export type { MenuSelectDetail } from "./bk-menu-list.js";
|
|
|
58
60
|
*
|
|
59
61
|
* @slot trigger - The button that opens the menu.
|
|
60
62
|
* @slot - `<bk-menu-item>`, `<bk-menu-divider>` and `<bk-menu-label>` elements (they show in the inner `<bk-menu-list>`).
|
|
63
|
+
* @slot header - Content above the items that stays in view while they scroll (not an item).
|
|
61
64
|
* @slot footer - Content below the items that stays in view while they scroll.
|
|
62
65
|
* @csspart anchor - Wrapper element of the trigger slot.
|
|
63
66
|
* @csspart menu - The floating menu panel (the overlay surface).
|
|
64
67
|
* @csspart list - The `<bk-menu-list>` inside the panel.
|
|
65
68
|
* @csspart filter - The wrapper element of the filter field.
|
|
69
|
+
* @csspart header - The wrapper element of the header slot.
|
|
66
70
|
* @csspart footer - The wrapper element of the footer slot.
|
|
67
71
|
* @cssprop --bk-menu-bg - Background (default --bk-layer-overlay-bg).
|
|
68
72
|
* @cssprop --bk-menu-fg - Text colour (default --bk-text).
|
|
69
73
|
* @cssprop --bk-menu-border - Border colour (default --bk-layer-overlay-border).
|
|
70
|
-
* @cssprop --bk-menu-radius - Corner radius (default --bk-radius
|
|
74
|
+
* @cssprop --bk-menu-radius - Corner radius (default --bk-row-radius + the padding + the border: concentric with the rows).
|
|
71
75
|
* @cssprop --bk-menu-shadow - Shadow (default --bk-layer-overlay-shadow).
|
|
72
76
|
* @cssprop --bk-menu-row-pad - Block padding of the items (default --bk-row-pad).
|
|
73
77
|
* @cssprop --bk-menu-padding - Inner padding (default --bk-space-1).
|
|
@@ -76,6 +80,7 @@ export type { MenuSelectDetail } from "./bk-menu-list.js";
|
|
|
76
80
|
* @cssprop --bk-menu-max-width - Maximum width (default --bk-popup-width-md; --bk-popup-width-xl when an item has a `description`).
|
|
77
81
|
* @cssprop --bk-menu-max-height - Maximum height before the items scroll (default the space in the window on the side that
|
|
78
82
|
* the menu opens to; it opens on the side with more space).
|
|
83
|
+
* @cssprop --bk-menu-header-border - Line below the header (default --bk-line).
|
|
79
84
|
* @cssprop --bk-menu-footer-border - Line above the footer (default --bk-line).
|
|
80
85
|
* @cssprop --bk-menu-item-* - Item tokens. See `<bk-menu-item>`.
|
|
81
86
|
* @fires {CustomEvent<MenuSelectDetail>} select - The user chose an item in the inner list. `detail` is `{ value, item }`. The event bubbles and is cancelable. `preventDefault()` keeps the menu open.
|
|
@@ -135,6 +140,8 @@ export declare class BkMenu extends PopoverBase {
|
|
|
135
140
|
filterLabel: string | undefined;
|
|
136
141
|
private query;
|
|
137
142
|
private slots;
|
|
143
|
+
/** The state `described`: an item has a second line. */
|
|
144
|
+
protected readonly internals: ElementInternals;
|
|
138
145
|
/** Items that the filter hid, so it shows exactly those again. */
|
|
139
146
|
private filtered;
|
|
140
147
|
constructor();
|
|
@@ -23,6 +23,8 @@ class BkMenu extends PopoverBase {
|
|
|
23
23
|
query: { state: true }
|
|
24
24
|
};
|
|
25
25
|
slots = new SlotController(this);
|
|
26
|
+
/** The state `described`: an item has a second line. */
|
|
27
|
+
internals = this.attachInternals();
|
|
26
28
|
/** Items that the filter hid, so it shows exactly those again. */
|
|
27
29
|
filtered = /* @__PURE__ */ new Set();
|
|
28
30
|
constructor() {
|
|
@@ -47,7 +49,7 @@ class BkMenu extends PopoverBase {
|
|
|
47
49
|
--_bk-popup-bg: var(--bk-menu-bg);
|
|
48
50
|
--_bk-popup-fg: var(--bk-menu-fg);
|
|
49
51
|
--_bk-popup-border: var(--bk-menu-border);
|
|
50
|
-
--_bk-popup-radius: var(--bk-menu-radius);
|
|
52
|
+
--_bk-popup-radius: var(--bk-menu-radius, var(--_bk-popup-row-radius));
|
|
51
53
|
--_bk-popup-shadow: var(--bk-menu-shadow);
|
|
52
54
|
--_bk-popup-padding: var(--bk-menu-padding);
|
|
53
55
|
--_bk-popup-offset: var(--bk-menu-offset);
|
|
@@ -61,12 +63,12 @@ class BkMenu extends PopoverBase {
|
|
|
61
63
|
--_bk-menu-bleed: var(--bk-menu-padding, var(--bk-space-1));
|
|
62
64
|
}
|
|
63
65
|
/* Items with a second line can grow wider before they wrap (the panel stays as wide as its content). */
|
|
64
|
-
:host(
|
|
66
|
+
:host(:state(described)) .panel {
|
|
65
67
|
--_bk-popup-max-width: var(--bk-menu-max-width, var(--bk-popup-width-xl));
|
|
66
68
|
}
|
|
67
69
|
/* Tiles take the width their row needs; the viewport still bounds it. */
|
|
68
70
|
:host([variant="tiles"]) .panel { --_bk-popup-max-width: var(--bk-menu-max-width, 100vw); }
|
|
69
|
-
/* The panel is a column: filter, the items (they scroll), footer. */
|
|
71
|
+
/* The panel is a column: header, filter, the items (they scroll), footer. */
|
|
70
72
|
.panel:popover-open { display: flex; flex-direction: column; overflow: hidden; }
|
|
71
73
|
/* The list scrolls from panel edge to panel edge, so a bleeding divider stays inside it and
|
|
72
74
|
never makes it scroll sideways. */
|
|
@@ -92,6 +94,13 @@ class BkMenu extends PopoverBase {
|
|
|
92
94
|
--bk-field-label-color: var(--bk-menu-label-color, var(--bk-group-label-color, var(--bk-text-muted)));
|
|
93
95
|
}
|
|
94
96
|
.footer[hidden] { display: none; }
|
|
97
|
+
.header {
|
|
98
|
+
flex: none; min-width: 0; margin: calc(-1 * var(--_bk-menu-bleed)) calc(-1 * var(--_bk-menu-bleed)) var(--bk-space-1);
|
|
99
|
+
/* The header's content starts where the labels and the items of the list start. */
|
|
100
|
+
padding: var(--bk-space-2) calc(var(--bk-row-pad-inline) + var(--_bk-menu-bleed));
|
|
101
|
+
border-bottom: var(--bk-border-width) solid var(--bk-menu-header-border, var(--bk-line));
|
|
102
|
+
}
|
|
103
|
+
.header[hidden] { display: none; }
|
|
95
104
|
`];
|
|
96
105
|
get panelPart() {
|
|
97
106
|
return "menu";
|
|
@@ -215,7 +224,8 @@ class BkMenu extends PopoverBase {
|
|
|
215
224
|
super.willUpdate(changed);
|
|
216
225
|
if (changed.has("filter"))
|
|
217
226
|
this.popupRole = this.filter ? "dialog" : "menu";
|
|
218
|
-
|
|
227
|
+
const described = this.items.some((i) => !!i.description || !!i.querySelector(':scope > [slot="description"]'));
|
|
228
|
+
described ? this.internals.states.add("described") : this.internals.states.delete("described");
|
|
219
229
|
}
|
|
220
230
|
/** The menu handles Esc and Tab. The list handles every other key (the menu forwards them while the panel itself has the focus). */
|
|
221
231
|
onPanelKeydown(e) {
|
|
@@ -268,7 +278,8 @@ class BkMenu extends PopoverBase {
|
|
|
268
278
|
renderPanel() {
|
|
269
279
|
const label = this.filterLabel || this.i18n.t("menuFilter");
|
|
270
280
|
const empty = this.filter && this.query.trim() && !this.visibleItems().length;
|
|
271
|
-
return html
|
|
281
|
+
return html`<div class="header" part="header" ?hidden=${!this.slots.has("header")}><slot name="header"></slot></div>
|
|
282
|
+
${this.filter ? html`<div class="filter" part="filter">
|
|
272
283
|
<bk-input-text type="search" size="sm" aria-label=${label} placeholder=${label} autocomplete="off"
|
|
273
284
|
@input=${this.onFilterInput} @keydown=${this.onFilterKeydown}><bk-icon slot="start" name="search"></bk-icon></bk-input-text></div>` : nothing}
|
|
274
285
|
<bk-menu-list part="list" role=${ifDefined(this.filter ? void 0 : "none")} label=${ifDefined(this.filter ? this.label || void 0 : void 0)} variant=${ifDefined(this.variant === "tiles" ? "tiles" : void 0)}><slot></slot></bk-menu-list>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from "lit";
|
|
1
|
+
import { LitElement, type PropertyValues } from "lit";
|
|
2
2
|
import "./bk-icon.js";
|
|
3
3
|
import "./bk-tooltip.js";
|
|
4
4
|
import "../icons/set/group.js";
|
|
@@ -25,7 +25,7 @@ export type MessageFeedbackValue = "up" | "down" | "";
|
|
|
25
25
|
* - The `comment` slot shows after a rating, for example a field or a button that asks for more.
|
|
26
26
|
*
|
|
27
27
|
* Content, no surface. In the `actions` of a `bk-message`, it shows with the other actions on
|
|
28
|
-
* hover or focus. With a rating, it stays visible (the component
|
|
28
|
+
* hover or focus. With a rating, it stays visible (the component has the state `:state(rated)` while it has a value).
|
|
29
29
|
*
|
|
30
30
|
* @slot comment - Shows after a rating, for example a button "Tell us more".
|
|
31
31
|
* @csspart group - The radio group.
|
|
@@ -72,11 +72,12 @@ export declare class BkMessageFeedback extends LitElement {
|
|
|
72
72
|
disabled: boolean;
|
|
73
73
|
private i18n;
|
|
74
74
|
private slots;
|
|
75
|
+
private internals;
|
|
75
76
|
constructor();
|
|
76
77
|
static styles: import("lit").CSSResult[];
|
|
77
78
|
private choose;
|
|
78
79
|
private onKeydown;
|
|
79
|
-
protected
|
|
80
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
80
81
|
private renderButton;
|
|
81
82
|
render(): import("lit-html").TemplateResult<1>;
|
|
82
83
|
}
|
|
@@ -21,6 +21,7 @@ class BkMessageFeedback extends LitElement {
|
|
|
21
21
|
};
|
|
22
22
|
i18n = new LocalizeController(this);
|
|
23
23
|
slots = new SlotController(this);
|
|
24
|
+
internals = this.attachInternals();
|
|
24
25
|
constructor() {
|
|
25
26
|
super();
|
|
26
27
|
this.value = "";
|
|
@@ -28,6 +29,9 @@ class BkMessageFeedback extends LitElement {
|
|
|
28
29
|
}
|
|
29
30
|
static styles = [base, interactive, css`
|
|
30
31
|
:host { display: inline-flex; align-items: center; gap: var(--bk-space-1); min-width: 0; }
|
|
32
|
+
/* A rating stays in view in the actions row of a bk-message, which hides its actions until hover. The important
|
|
33
|
+
declaration of the own shadow root wins over the ::slotted rule of the message. */
|
|
34
|
+
:host(:state(rated)) { opacity: 1 !important; }
|
|
31
35
|
.group { display: inline-flex; gap: var(--bk-space-0); }
|
|
32
36
|
button {
|
|
33
37
|
display: inline-grid; place-items: center; margin: 0; padding: 0; border: 0; background: transparent; font: inherit;
|
|
@@ -61,11 +65,9 @@ class BkMessageFeedback extends LitElement {
|
|
|
61
65
|
this.choose(next, false);
|
|
62
66
|
this.updateComplete.then(() => this.renderRoot.querySelector(`[data-value="${next}"]`)?.focus());
|
|
63
67
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
else
|
|
68
|
-
delete this.dataset.reveal;
|
|
68
|
+
willUpdate(changed) {
|
|
69
|
+
super.willUpdate(changed);
|
|
70
|
+
this.value ? this.internals.states.add("rated") : this.internals.states.delete("rated");
|
|
69
71
|
}
|
|
70
72
|
renderButton(value) {
|
|
71
73
|
const checked = this.value === value;
|
|
@@ -50,9 +50,10 @@ class BkMessageList extends LitElement {
|
|
|
50
50
|
.messages {
|
|
51
51
|
display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--bk-message-list-gap, var(--bk-space-flow));
|
|
52
52
|
max-inline-size: var(--bk-message-list-max-width, none); margin-inline: auto;
|
|
53
|
+
/* A message with a header starts a turn: bk-message reads this gap (no :state() inside ::slotted()). */
|
|
54
|
+
--_bk-message-turn-gap: var(--bk-message-list-turn-gap, var(--bk-space-3));
|
|
53
55
|
}
|
|
54
56
|
/* A message with a header starts a turn: it gets more room above than the next message of the same author. */
|
|
55
|
-
::slotted(bk-message:state(headed):not(:first-child)) { margin-block-start: var(--bk-message-list-turn-gap, var(--bk-space-3)); }
|
|
56
57
|
.sentinel { block-size: 1px; margin-block-start: -1px; }
|
|
57
58
|
.jump { position: absolute; inset-block-end: var(--bk-space-3); inset-inline-start: 50%; translate: -50% 0; z-index: 1; }
|
|
58
59
|
:host(:dir(rtl)) .jump { translate: 50% 0; }
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
export type { NavigateDetail } from "../internal/link.js";
|
|
3
|
-
|
|
4
|
-
export declare function sourceHost(href: string | undefined): string;
|
|
3
|
+
export { sourceHost } from "../internal/link.js";
|
|
5
4
|
/**
|
|
6
5
|
* A source of an answer: a page, a file, a search result. It is a real link.
|
|
7
6
|
*
|
|
@@ -2,18 +2,10 @@ import { LitElement, css, html, nothing } from "lit";
|
|
|
2
2
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
3
3
|
import { LocalizeController } from "../i18n.js";
|
|
4
4
|
import { define } from "../internal/define.js";
|
|
5
|
-
import { LinkController } from "../internal/link.js";
|
|
5
|
+
import { LinkController, sourceHost } from "../internal/link.js";
|
|
6
6
|
import { SlotController } from "../internal/slots.js";
|
|
7
7
|
import { base, interactive, srOnly } from "../internal/styles.js";
|
|
8
|
-
|
|
9
|
-
if (!href)
|
|
10
|
-
return "";
|
|
11
|
-
try {
|
|
12
|
-
return new URL(href, globalThis.location?.href).hostname.replace(/^www\./, "");
|
|
13
|
-
} catch {
|
|
14
|
-
return "";
|
|
15
|
-
}
|
|
16
|
-
}
|
|
8
|
+
import { sourceHost as sourceHost2 } from "../internal/link.js";
|
|
17
9
|
class BkMessageSource extends LitElement {
|
|
18
10
|
static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true };
|
|
19
11
|
static properties = {
|
|
@@ -100,6 +92,6 @@ class BkMessageSource extends LitElement {
|
|
|
100
92
|
define("bk-message-source", BkMessageSource);
|
|
101
93
|
export {
|
|
102
94
|
BkMessageSource,
|
|
103
|
-
sourceHost
|
|
95
|
+
sourceHost2 as sourceHost
|
|
104
96
|
};
|
|
105
97
|
//# sourceMappingURL=bk-message-source.js.map
|
|
@@ -32,6 +32,8 @@ class BkMessage extends LitElement {
|
|
|
32
32
|
this.time = "";
|
|
33
33
|
}
|
|
34
34
|
static styles = [base, css`
|
|
35
|
+
/* In a bk-message-list, a message with a header starts a turn: it gets more room above it. */
|
|
36
|
+
:host(:state(headed):not(:first-child)) { margin-block-start: var(--_bk-message-turn-gap, 0px); }
|
|
35
37
|
:host {
|
|
36
38
|
display: block; min-width: 0;
|
|
37
39
|
--_bk-message-bubble-bg: var(--bk-message-bubble-bg, var(--bk-layer-sunken-bg));
|
|
@@ -59,6 +59,9 @@ export interface ModelViewerChangeDetail {
|
|
|
59
59
|
* The status line shows the position and the name: "2 of 9 · Wall bracket".
|
|
60
60
|
* - The `details` slot is beside the view: the parameters or the description of the model.
|
|
61
61
|
* Below `--bk-model-viewer-stack-below` (the width of the viewer) it is under the view.
|
|
62
|
+
* - The view has the ratio `--bk-model-viewer-ratio`, or the height `--bk-model-viewer-height`. With `fill`, the viewer
|
|
63
|
+
* takes the height of its container instead, for example the body of a `<bk-dialog size="full">`. The view takes the height
|
|
64
|
+
* that the row under it leaves, and the details scroll when they are taller. The container needs a definite height.
|
|
62
65
|
* - While a model loads, a quiet spinner shows after `--bk-loading-delay`. A model that cannot load
|
|
63
66
|
* shows a message and a button that loads it again.
|
|
64
67
|
* - The viewer draws only when something changes. It frees the renderer, the geometries and the
|
|
@@ -81,7 +84,9 @@ export interface ModelViewerChangeDetail {
|
|
|
81
84
|
* @cssprop --bk-model-viewer-part-color - Colour of the part when it has no `color` (default --bk-model-part).
|
|
82
85
|
* @cssprop --bk-model-viewer-radius - Corner radius of the view (default --bk-radius-container, else --bk-radius-lg).
|
|
83
86
|
* @cssprop --bk-model-viewer-ratio - Aspect ratio of the view (default 4/3).
|
|
84
|
-
* @cssprop --bk-model-viewer-height - Height of the view instead of the ratio (default auto).
|
|
87
|
+
* @cssprop --bk-model-viewer-height - Height of the view instead of the ratio (default auto). With `fill`, the view takes the height that the bar leaves.
|
|
88
|
+
* @cssprop --bk-model-viewer-min-height - With `fill`: the minimum height of the view (default 10rem). A lower container scrolls.
|
|
89
|
+
* @cssprop --bk-model-viewer-details-height - With `fill`, when the details are under the view: their maximum height, a length or a percentage of the viewer (default 40%). Taller details scroll.
|
|
85
90
|
* @cssprop --bk-model-viewer-gap - Space between the view and the details (default --bk-space-components).
|
|
86
91
|
* @cssprop --bk-model-viewer-bar-gap - Space between the view and the row under it (default --bk-space-2).
|
|
87
92
|
* @cssprop --bk-model-viewer-tools-gap - Space between the buttons under the view (default --bk-space-1).
|
|
@@ -104,6 +109,10 @@ export declare class BkModelViewer extends LitElement {
|
|
|
104
109
|
type: {};
|
|
105
110
|
label: {};
|
|
106
111
|
color: {};
|
|
112
|
+
fill: {
|
|
113
|
+
type: BooleanConstructor;
|
|
114
|
+
reflect: boolean;
|
|
115
|
+
};
|
|
107
116
|
items: {
|
|
108
117
|
attribute: boolean;
|
|
109
118
|
};
|
|
@@ -140,6 +149,8 @@ export declare class BkModelViewer extends LitElement {
|
|
|
140
149
|
label: string;
|
|
141
150
|
/** Colour of the part, any CSS colour (default `--bk-model-viewer-part-color`). It replaces the colours of a 3MF or OBJ file. */
|
|
142
151
|
color: string | undefined;
|
|
152
|
+
/** The viewer fills the height of its container: the view takes the height that the row under it leaves. The container needs a definite height. */
|
|
153
|
+
fill: boolean;
|
|
143
154
|
/** Several models; the viewer shows the one at `index`. */
|
|
144
155
|
items: ModelViewerItem[];
|
|
145
156
|
/** Index of the shown item. */
|
|
@@ -68,6 +68,7 @@ class BkModelViewer extends LitElement {
|
|
|
68
68
|
type: {},
|
|
69
69
|
label: {},
|
|
70
70
|
color: {},
|
|
71
|
+
fill: { type: Boolean, reflect: true },
|
|
71
72
|
items: { attribute: false },
|
|
72
73
|
index: { type: Number },
|
|
73
74
|
prevLabel: { attribute: "prev-label" },
|
|
@@ -102,6 +103,7 @@ class BkModelViewer extends LitElement {
|
|
|
102
103
|
super();
|
|
103
104
|
this.src = "";
|
|
104
105
|
this.label = "";
|
|
106
|
+
this.fill = false;
|
|
105
107
|
this.items = [];
|
|
106
108
|
this.index = 0;
|
|
107
109
|
this.prevLabel = "";
|
|
@@ -118,7 +120,9 @@ class BkModelViewer extends LitElement {
|
|
|
118
120
|
.layout.side { grid-template-columns: minmax(0, 1fr) var(--bk-model-viewer-details-width, 20rem); }
|
|
119
121
|
.main { display: grid; gap: var(--bk-model-viewer-bar-gap, var(--bk-space-2)); min-inline-size: 0; }
|
|
120
122
|
.stage {
|
|
121
|
-
|
|
123
|
+
/* The stage fills its column. With a height, the ratio does not apply: a grid item with a ratio and a height
|
|
124
|
+
takes its width from the height, not from the column. */
|
|
125
|
+
position: relative; overflow: hidden; inline-size: 100%;
|
|
122
126
|
aspect-ratio: var(--bk-model-viewer-ratio, 4/3); block-size: var(--bk-model-viewer-height, auto);
|
|
123
127
|
border-radius: var(--bk-model-viewer-radius, var(--bk-radius-container, var(--bk-radius-lg)));
|
|
124
128
|
background: var(--bk-model-viewer-bg, var(--bk-layer-sunken-bg));
|
|
@@ -156,6 +160,14 @@ class BkModelViewer extends LitElement {
|
|
|
156
160
|
:host(:dir(rtl)) .nav bk-button { scale: -1 1; }
|
|
157
161
|
.details { min-inline-size: 0; }
|
|
158
162
|
.details[hidden] { display: none; }
|
|
163
|
+
/* fill: the viewer takes the height of its container. The view stretches over the row that the bar leaves, and
|
|
164
|
+
the details scroll on their own. A minimum height keeps the view usable in a low container: then the container scrolls. */
|
|
165
|
+
:host([fill]) { block-size: 100%; }
|
|
166
|
+
:host([fill]) .layout { block-size: 100%; grid-template-rows: 1fr; align-items: stretch; }
|
|
167
|
+
:host([fill]) .layout.below { grid-template-rows: 1fr fit-content(var(--bk-model-viewer-details-height, 40%)); }
|
|
168
|
+
:host([fill]) .main { grid-template-rows: 1fr auto; }
|
|
169
|
+
:host([fill]) .stage { aspect-ratio: auto; min-block-size: var(--bk-model-viewer-min-height, 10rem); }
|
|
170
|
+
:host([fill]) .details { overflow: auto; overscroll-behavior: contain; }
|
|
159
171
|
@media (forced-colors: active) { .stage { border: var(--bk-border-width) solid CanvasText; } }
|
|
160
172
|
`];
|
|
161
173
|
/** The model to show: the item at `index`, else the attributes of the element. */
|
|
@@ -509,7 +521,8 @@ class BkModelViewer extends LitElement {
|
|
|
509
521
|
const details = this.slots.has("details");
|
|
510
522
|
const help = this.many ? `${this.i18n.t("modelViewerHelp")} ${this.i18n.t("modelViewerStepHelp")}` : this.i18n.t("modelViewerHelp");
|
|
511
523
|
const tool = (icon, label, run) => html`<bk-button variant="ghost" size="sm" icon=${icon} label=${label} ?disabled=${!ready} @click=${run}></bk-button>`;
|
|
512
|
-
|
|
524
|
+
const layout = details ? this.stacked ? "below" : "side" : "";
|
|
525
|
+
return html`<div class="layout ${layout}" part="base">
|
|
513
526
|
<div class="main">
|
|
514
527
|
<div class="stage" part="stage">
|
|
515
528
|
<div class="view ${ready ? "ready" : ""}" part="view" role="application" tabindex=${shows ? "0" : "-1"} ?hidden=${!shows}
|
|
@@ -248,7 +248,7 @@ class BkNavGroup extends LitElement {
|
|
|
248
248
|
--_bk-popup-bg: var(--bk-nav-flyout-bg);
|
|
249
249
|
--_bk-popup-fg: initial;
|
|
250
250
|
--_bk-popup-border: var(--bk-nav-flyout-border);
|
|
251
|
-
--_bk-popup-radius: var(--bk-nav-flyout-radius);
|
|
251
|
+
--_bk-popup-radius: var(--bk-nav-flyout-radius, var(--_bk-popup-row-radius));
|
|
252
252
|
--_bk-popup-shadow: var(--bk-nav-flyout-shadow);
|
|
253
253
|
--_bk-popup-padding: var(--bk-nav-flyout-padding);
|
|
254
254
|
--_bk-popup-offset: var(--bk-nav-flyout-offset, var(--bk-space-2));
|
|
@@ -3,6 +3,7 @@ import { type TriggerAria } from "../internal/anchor.js";
|
|
|
3
3
|
import "./bk-icon.js";
|
|
4
4
|
import "./bk-tooltip.js";
|
|
5
5
|
import "../icons/set/description.js";
|
|
6
|
+
import "../icons/set/external.js";
|
|
6
7
|
import "../icons/set/label.js";
|
|
7
8
|
export type { NavigateDetail } from "../internal/link.js";
|
|
8
9
|
/**
|
|
@@ -44,6 +45,15 @@ export declare function navLook(el: Element): {
|
|
|
44
45
|
* `description` (or the `description` slot) is a second, quieter line under the label, for example what a
|
|
45
46
|
* project is about. The component cuts only the second line when it does not fit.
|
|
46
47
|
*
|
|
48
|
+
* `hint` is a short extra text, for example what a tool does ("Text to image"). It is the accessible description of
|
|
49
|
+
* the item, so a screen reader announces it. A tooltip shows it on hover and on keyboard focus; in the rail the
|
|
50
|
+
* tooltip shows it under the label. A tooltip never shows on a touch screen. Put information that the user needs
|
|
51
|
+
* into `description`, which is always visible.
|
|
52
|
+
*
|
|
53
|
+
* A link with `target="_blank"` shows the `external` icon after the label, and a screen reader hears
|
|
54
|
+
* "(opens in a new tab)" (i18n `opensInNewTab`). To hide the icon, set `bk-nav-item::part(new-tab) { display: none }`.
|
|
55
|
+
* The rail shows only the icon of the item; the text stays.
|
|
56
|
+
*
|
|
47
57
|
* @slot - Label.
|
|
48
58
|
* @slot description - Second line under the label instead of `description`.
|
|
49
59
|
* @slot start - Leading content; the `icon` attribute is a shorthand for a `<bk-icon>` here. In a two-line item, an
|
|
@@ -57,9 +67,13 @@ export declare function navLook(el: Element): {
|
|
|
57
67
|
* @csspart link - The `<a>`.
|
|
58
68
|
* @csspart count - The count badge.
|
|
59
69
|
* @csspart initial - The first letter of the label that an item without an icon shows in the rail.
|
|
70
|
+
* @csspart new-tab - The icon after the label of a link with `target="_blank"`.
|
|
71
|
+
* @csspart hint - The hint in the tooltip.
|
|
72
|
+
* @cssprop --bk-nav-item-new-tab-size - Size of the icon of a link with `target="_blank"` (default --bk-icon-xs).
|
|
60
73
|
*
|
|
61
74
|
* @fires {CustomEvent<NavigateDetail>} navigate - The user makes a plain click on the link (primary button, no modifier key, no other `target`, no `download`). `detail.href` is the resolved address. Bubbles, composed, cancelable: `preventDefault()` stops the browser, and the router of the app handles the navigation.
|
|
62
75
|
* @tag bk-nav-item
|
|
76
|
+
* @a11y A link (`<a>`) with `href`, else a button. `current` sets `aria-current="page"`. In the rail the label is the accessible name, with the count. `hint` is the accessible description. A link with `target="_blank"` adds "(opens in a new tab)" to its name.
|
|
63
77
|
*/
|
|
64
78
|
export declare class BkNavItem extends LitElement {
|
|
65
79
|
static shadowRootOptions: ShadowRootInit;
|
|
@@ -76,6 +90,7 @@ export declare class BkNavItem extends LitElement {
|
|
|
76
90
|
icon: {};
|
|
77
91
|
count: {};
|
|
78
92
|
description: {};
|
|
93
|
+
hint: {};
|
|
79
94
|
current: {
|
|
80
95
|
type: BooleanConstructor;
|
|
81
96
|
reflect: boolean;
|
|
@@ -111,6 +126,8 @@ export declare class BkNavItem extends LitElement {
|
|
|
111
126
|
count: string | number | undefined;
|
|
112
127
|
/** Second line under the label. */
|
|
113
128
|
description: string | undefined;
|
|
129
|
+
/** Short extra text: a tooltip on hover and keyboard focus, and the accessible description. */
|
|
130
|
+
hint: string | undefined;
|
|
114
131
|
/** The page you are on: `aria-current="page"` and the selected style. */
|
|
115
132
|
current: boolean;
|
|
116
133
|
/** Not navigable; skipped by the Tab key. */
|
|
@@ -133,6 +150,7 @@ export declare class BkNavItem extends LitElement {
|
|
|
133
150
|
private labelEl?;
|
|
134
151
|
private labelSize;
|
|
135
152
|
private links;
|
|
153
|
+
private i18n;
|
|
136
154
|
/** The role `listitem` and the states `collapsed` and `horizontal`: the host has only the attributes of the app. */
|
|
137
155
|
private internals;
|
|
138
156
|
constructor();
|
|
@@ -7,8 +7,9 @@ import { base, countBadge, interactive, srOnly } from "../internal/styles.js";
|
|
|
7
7
|
import "./bk-icon.js";
|
|
8
8
|
import "./bk-tooltip.js";
|
|
9
9
|
import { lightDom, resizeObserver } from "../internal/server.js";
|
|
10
|
-
import { localeOf } from "../i18n.js";
|
|
10
|
+
import { LocalizeController, localeOf } from "../i18n.js";
|
|
11
11
|
import "../icons/set/description.js";
|
|
12
|
+
import "../icons/set/external.js";
|
|
12
13
|
import "../icons/set/label.js";
|
|
13
14
|
const MEDIA = "bk-avatar, bk-logo, bk-badge, bk-icon-tile, bk-picture, img";
|
|
14
15
|
function initialOf(text, locale) {
|
|
@@ -55,6 +56,7 @@ class BkNavItem extends LitElement {
|
|
|
55
56
|
icon: {},
|
|
56
57
|
count: {},
|
|
57
58
|
description: {},
|
|
59
|
+
hint: {},
|
|
58
60
|
current: { type: Boolean, reflect: true },
|
|
59
61
|
disabled: { type: Boolean, reflect: true },
|
|
60
62
|
collapsed: { type: Boolean },
|
|
@@ -71,6 +73,7 @@ class BkNavItem extends LitElement {
|
|
|
71
73
|
labelEl;
|
|
72
74
|
labelSize = resizeObserver(() => this.measure());
|
|
73
75
|
links = new LinkController(this);
|
|
76
|
+
i18n = new LocalizeController(this);
|
|
74
77
|
/** The role `listitem` and the states `collapsed` and `horizontal`: the host has only the attributes of the app. */
|
|
75
78
|
internals = this.attachInternals();
|
|
76
79
|
constructor() {
|
|
@@ -184,6 +187,10 @@ class BkNavItem extends LitElement {
|
|
|
184
187
|
/* Its box is as tall as the first line and centres what it holds: an icon, a small dot or a pulse all sit on the line. */
|
|
185
188
|
.link.two .icon { margin-block-start: var(--bk-space-1); block-size: 1lh; align-items: center; }
|
|
186
189
|
.end { display: inline-flex; align-items: center; flex: none; }
|
|
190
|
+
.new-tab { flex: none; --bk-icon-size: var(--bk-nav-item-new-tab-size, var(--bk-icon-xs)); color: inherit; }
|
|
191
|
+
:host(:dir(rtl)) .new-tab { scale: -1 1; }
|
|
192
|
+
.link.two .new-tab { align-self: flex-start; margin-block-start: calc(var(--bk-space-1) + round(calc((1lh - var(--bk-nav-item-new-tab-size, var(--bk-icon-xs))) / 2), 1px)); }
|
|
193
|
+
.tip-hint { display: block; font-weight: var(--bk-weight-regular); }
|
|
187
194
|
/* The first letter of an item without an icon (rail): a box of one icon, the glyph centred on whole pixels, in the icon colour. */
|
|
188
195
|
.initial {
|
|
189
196
|
display: grid; place-items: center;
|
|
@@ -308,9 +315,14 @@ class BkNavItem extends LitElement {
|
|
|
308
315
|
const hasCount = this.hasCount;
|
|
309
316
|
const collapsed = this.collapsed;
|
|
310
317
|
const name = collapsed && this.text ? hasCount ? `${this.text} ${this.count}` : this.text : this.truncated && this.text ? this.text : void 0;
|
|
318
|
+
const newTab = this.href !== void 0 && this.target === "_blank";
|
|
319
|
+
const newTabText = newTab ? this.i18n.t("opensInNewTab") : "";
|
|
320
|
+
const label = name && newTab ? this.i18n.t("opensInNewTabNamed", { label: name }) : name;
|
|
321
|
+
const hint = this.hint?.trim() || "";
|
|
311
322
|
const inner = html`
|
|
312
323
|
<span class="icon" ?hidden=${!this.hasStart && !(collapsed && (hasCount || this.initial))}><slot name="start" @slotchange=${this.onLabelSlot}>${this.icon ? html`<bk-icon name=${this.icon}></bk-icon>` : nothing}</slot>${this.initial ? html`<span class="initial" part="initial" aria-hidden="true">${this.initial}</span>` : nothing}${collapsed && hasCount ? html`<span class="dot" aria-hidden="true"></span>` : nothing}</span>
|
|
313
324
|
${this.hasDescription && !collapsed ? html`<span class="text"><span class="label"><slot @slotchange=${this.onLabelSlot}></slot></span><span class="description"><slot name="description" @slotchange=${this.onLabelSlot}>${this.description}</slot></span></span>` : html`<span class="label ${collapsed ? "sr-only" : ""}"><slot @slotchange=${this.onLabelSlot}></slot></span><slot name="description" hidden @slotchange=${this.onLabelSlot}></slot>`}
|
|
325
|
+
${newTab ? html`<bk-icon class="new-tab" part="new-tab" name="external" ?hidden=${collapsed}></bk-icon><span class="sr-only">${newTabText}</span>` : nothing}
|
|
314
326
|
<span class="end ${collapsed ? "sr-only" : ""}" ?hidden=${!this.hasEnd}><slot name="end" @slotchange=${this.onLabelSlot}>${hasCount ? html`<span class="count" part="count">${this.count}</span>` : nothing}</slot></span>
|
|
315
327
|
`;
|
|
316
328
|
const f = this.forwarded;
|
|
@@ -318,19 +330,20 @@ class BkNavItem extends LitElement {
|
|
|
318
330
|
const controls = controlsList(f.controls);
|
|
319
331
|
const expanded = ifDefined(f.expanded === void 0 || f.expanded === null ? void 0 : String(f.expanded));
|
|
320
332
|
const link = this.href === void 0 ? html`<button type="button" id="link" class="link interactive ${this.hasDescription && !collapsed ? "two" : ""}" part="link" ?disabled=${this.disabled}
|
|
321
|
-
aria-current=${ifDefined(this.current ? "page" : void 0)} aria-label=${ifDefined(
|
|
333
|
+
aria-current=${ifDefined(this.current ? "page" : void 0)} aria-label=${ifDefined(label)} aria-haspopup=${popup} aria-expanded=${expanded} .ariaControlsElements=${controls}>${inner}</button>` : html`<a id="link" class="link interactive ${this.hasDescription && !collapsed ? "two" : ""}" part="link"
|
|
322
334
|
href=${ifDefined(this.disabled ? void 0 : this.links.href(this.href))} @click=${this.links.click} target=${ifDefined(this.target)}
|
|
323
335
|
rel=${ifDefined(this.rel ?? (this.target === "_blank" ? "noopener noreferrer" : void 0))}
|
|
324
336
|
role=${ifDefined(this.disabled ? "link" : void 0)} aria-disabled=${ifDefined(this.disabled ? "true" : void 0)}
|
|
325
|
-
aria-current=${ifDefined(this.current ? "page" : void 0)} aria-label=${ifDefined(
|
|
337
|
+
aria-current=${ifDefined(this.current ? "page" : void 0)} aria-label=${ifDefined(label)} aria-haspopup=${popup} aria-expanded=${expanded} .ariaControlsElements=${controls}>${inner}</a>`;
|
|
326
338
|
if (!collapsed) {
|
|
327
339
|
const actions = this.hasActions && !this.disabled;
|
|
328
|
-
const
|
|
340
|
+
const placement = this.horizontal ? "bottom" : "end";
|
|
341
|
+
const tip = this.truncated && this.text ? html`<bk-tooltip for="link" placement=${placement} delay="500" offset="8"><span slot="content"><span aria-hidden="true">${this.text}</span>${hint ? html` <span class="tip-hint" part="hint">${hint}</span>` : nothing}</span></bk-tooltip>` : hint ? html`<bk-tooltip for="link" placement=${placement} delay="500" offset="8" content=${hint}></bk-tooltip>` : nothing;
|
|
329
342
|
return html`<div class="row ${actions ? "has-actions" : ""} ${this.hasDescription ? "two" : ""}">${link}<span class="actions" ?hidden=${!actions}><slot name="actions" @slotchange=${this.onLabelSlot}></slot></span></div>${tip}`;
|
|
330
343
|
}
|
|
331
344
|
if (!this.text)
|
|
332
345
|
return link;
|
|
333
|
-
return html`<bk-tooltip placement="end" delay="250" offset="8">${link}<span slot="content">${this.text}${hasCount ? html` <span class="count tip-count">${this.count}</span>` : nothing}</span></bk-tooltip>`;
|
|
346
|
+
return html`<bk-tooltip placement="end" delay="250" offset="8">${link}<span slot="content"><span aria-hidden="true">${this.text}${hasCount ? html` <span class="count tip-count">${this.count}</span>` : nothing}</span>${hint ? html` <span class="tip-hint" part="hint">${hint}</span>` : nothing}</span></bk-tooltip>`;
|
|
334
347
|
}
|
|
335
348
|
}
|
|
336
349
|
define("bk-nav-item", BkNavItem);
|
|
@@ -106,7 +106,7 @@ import "./bk-nav-divider.js";
|
|
|
106
106
|
* @cssprop --bk-nav-flyout-width - Min width of a group's flyout (rail) or dropdown (horizontal) (default --bk-popup-min-width).
|
|
107
107
|
* @cssprop --bk-nav-flyout-bg - Flyout background (default --bk-layer-overlay-bg).
|
|
108
108
|
* @cssprop --bk-nav-flyout-border - Flyout border colour (default --bk-layer-overlay-border).
|
|
109
|
-
* @cssprop --bk-nav-flyout-radius - Flyout corner radius (default --bk-radius
|
|
109
|
+
* @cssprop --bk-nav-flyout-radius - Flyout corner radius (default --bk-row-radius + the padding + the border: concentric with the rows).
|
|
110
110
|
* @cssprop --bk-nav-flyout-shadow - Flyout shadow (default --bk-layer-overlay-shadow).
|
|
111
111
|
* @cssprop --bk-nav-flyout-padding - Flyout inner padding (default --bk-space-1).
|
|
112
112
|
* @cssprop --bk-nav-panel-width - Width of the dropdown of a group with a `panel` slot, a mega menu (default --bk-width-narrow).
|
|
@@ -24,6 +24,8 @@ class BkPageCta extends LitElement {
|
|
|
24
24
|
:host { display: block; max-inline-size: var(--bk-page-cta-width, var(--bk-width-narrow)); margin-inline: auto; }
|
|
25
25
|
.box {
|
|
26
26
|
display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--bk-page-cta-gap, var(--bk-space-3));
|
|
27
|
+
/* The content is centred as in a centred band: a stat or a stack centres all its rows, not only the text. */
|
|
28
|
+
--_bk-page-section-items: center; --_bk-page-section-justify: center;
|
|
27
29
|
padding: var(--bk-page-cta-padding-block, var(--bk-space-10)) var(--bk-page-cta-padding-inline, var(--bk-space-8));
|
|
28
30
|
background: var(--bk-page-cta-bg, var(--bk-layer-raised-bg)); color: var(--bk-page-cta-fg, var(--bk-text));
|
|
29
31
|
border: var(--bk-border-width) solid var(--bk-page-cta-border, var(--bk-layer-raised-border));
|
|
@@ -259,7 +259,7 @@ export declare class BkPageSection extends LitElement {
|
|
|
259
259
|
constructor();
|
|
260
260
|
static styles: import("lit").CSSResult[];
|
|
261
261
|
/** The section is a scope while it is a band, so the section derives the colours of the band in it. */
|
|
262
|
-
private
|
|
262
|
+
private internals;
|
|
263
263
|
/**
|
|
264
264
|
* The band before it on the same background (`sm`, `md`, `lg` of a section, or `hero`), or null:
|
|
265
265
|
* no space above (see `.joined`).
|
|
@@ -90,7 +90,7 @@ class BkPageSection extends LitElement {
|
|
|
90
90
|
:host([layer="base"]) { --_bk-page-section-bg: var(--bk-layer-base-bg); }
|
|
91
91
|
:host([layer="sunken"]) { --_bk-page-section-bg: var(--bk-layer-sunken-bg); }
|
|
92
92
|
:host([layer="raised"]) { --_bk-page-section-bg: var(--bk-layer-raised-bg); }
|
|
93
|
-
/* Bands: the section is a scope (
|
|
93
|
+
/* Bands: the section is a scope (the state bk-scope), so the section derives the colours below again inside it. */
|
|
94
94
|
:host([band]) { --_bk-page-section-bg: var(--bk-bg); color: var(--bk-text); }
|
|
95
95
|
/* The ink band is a dark band: the dark canvas of the palette, a step above the dark page, with its full chroma. */
|
|
96
96
|
:host([band="ink"]:not([variant="soft"])) { color-scheme: dark; --bk-bg-dark: var(--bk-ink-lightness, 0.22); --bk-dark-true: 1; }
|
|
@@ -198,7 +198,7 @@ class BkPageSection extends LitElement {
|
|
|
198
198
|
@media (forced-colors: active) { :host { border-color: CanvasText; } }
|
|
199
199
|
`];
|
|
200
200
|
/** The section is a scope while it is a band, so the section derives the colours of the band in it. */
|
|
201
|
-
|
|
201
|
+
internals = this.attachInternals();
|
|
202
202
|
/**
|
|
203
203
|
* The band before it on the same background (`sm`, `md`, `lg` of a section, or `hero`), or null:
|
|
204
204
|
* no space above (see `.joined`).
|
|
@@ -285,13 +285,7 @@ class BkPageSection extends LitElement {
|
|
|
285
285
|
this.joined = this.joinsPrevious();
|
|
286
286
|
if (!changed.has("band"))
|
|
287
287
|
return;
|
|
288
|
-
|
|
289
|
-
this.setAttribute("data-bk-scope", "");
|
|
290
|
-
this.scoped = true;
|
|
291
|
-
} else if (!this.band && this.scoped) {
|
|
292
|
-
this.removeAttribute("data-bk-scope");
|
|
293
|
-
this.scoped = false;
|
|
294
|
-
}
|
|
288
|
+
this.band ? this.internals.states.add("bk-scope") : this.internals.states.delete("bk-scope");
|
|
295
289
|
}
|
|
296
290
|
render() {
|
|
297
291
|
const s = this.slots;
|
|
@@ -88,6 +88,7 @@ export declare class BkPane extends LitElement {
|
|
|
88
88
|
private scrolling;
|
|
89
89
|
private i18n;
|
|
90
90
|
private slots;
|
|
91
|
+
private internals;
|
|
91
92
|
private busyState;
|
|
92
93
|
private observed;
|
|
93
94
|
/** The content area and the slotted content: either changing size can start or end overflow. */
|
|
@@ -15,7 +15,8 @@ class BkPane extends LitElement {
|
|
|
15
15
|
};
|
|
16
16
|
i18n = new LocalizeController(this);
|
|
17
17
|
slots = new SlotController(this);
|
|
18
|
-
|
|
18
|
+
internals = this.attachInternals();
|
|
19
|
+
busyState = new BusyController(this, this.i18n, this.internals);
|
|
19
20
|
observed = [];
|
|
20
21
|
/** The content area and the slotted content: either changing size can start or end overflow. */
|
|
21
22
|
sizes = resizeObserver(() => this.measure());
|
|
@@ -49,15 +50,15 @@ class BkPane extends LitElement {
|
|
|
49
50
|
.region.top { border-block-end: var(--bk-pane-header-divider, none); }
|
|
50
51
|
.region.bottom { border-block-start: var(--bk-pane-footer-divider, none); }
|
|
51
52
|
/* The content width: header, content and footer in the middle; fillers run edge to edge. */
|
|
52
|
-
:host(:not(
|
|
53
|
+
:host(:not(:state(fills))) .header, :host(:not(:state(fills))) .footer {
|
|
53
54
|
box-sizing: border-box; inline-size: 100%; max-inline-size: var(--bk-pane-content-width, none); margin-inline: auto;
|
|
54
55
|
}
|
|
55
56
|
/* Beside content that fills, header and footer keep their content in the region width (a log that centres its own
|
|
56
57
|
column, and the composer under it in the same column); their padding comes on top. */
|
|
57
|
-
:host(
|
|
58
|
+
:host(:state(fills)) .header, :host(:state(fills)) .footer {
|
|
58
59
|
box-sizing: content-box; max-inline-size: var(--bk-pane-region-width, none); margin-inline: auto;
|
|
59
60
|
}
|
|
60
|
-
:host(:not(
|
|
61
|
+
:host(:not(:state(fills))) .body ::slotted(*) {
|
|
61
62
|
box-sizing: border-box; inline-size: 100%; max-inline-size: var(--bk-pane-content-width, none); margin-inline: auto;
|
|
62
63
|
}
|
|
63
64
|
/* A flex column, like a workspace main: a child with flex: 1 takes the rest. Also the containing
|
|
@@ -96,7 +97,8 @@ class BkPane extends LitElement {
|
|
|
96
97
|
if (!body || !slot)
|
|
97
98
|
return;
|
|
98
99
|
const children = slot.assignedElements();
|
|
99
|
-
|
|
100
|
+
const fills = children.some((el) => FILLING.has(el.localName) || Number.parseFloat(getComputedStyle(el).flexGrow) > 0);
|
|
101
|
+
fills ? this.internals.states.add("fills") : this.internals.states.delete("fills");
|
|
100
102
|
const next = [body, ...children];
|
|
101
103
|
for (const el of this.observed)
|
|
102
104
|
if (!next.includes(el))
|