@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
|
@@ -162,11 +162,11 @@ export declare class BkPanel extends LitElement {
|
|
|
162
162
|
private strip;
|
|
163
163
|
private i18n;
|
|
164
164
|
private slots;
|
|
165
|
-
private busyState;
|
|
166
165
|
/** The `collapsed` value that the markup sets. The panel goes back to it when the stored entry is removed. */
|
|
167
166
|
private authored?;
|
|
168
167
|
private stored;
|
|
169
168
|
private internals;
|
|
169
|
+
private busyState;
|
|
170
170
|
private split;
|
|
171
171
|
/** Fraction that the panel had in the split before collapsing, and the data-min that it had. */
|
|
172
172
|
private restoreFr;
|
|
@@ -35,7 +35,6 @@ class BkPanel extends LitElement {
|
|
|
35
35
|
};
|
|
36
36
|
i18n = new LocalizeController(this);
|
|
37
37
|
slots = new SlotController(this);
|
|
38
|
-
busyState = new BusyController(this, this.i18n);
|
|
39
38
|
/** The `collapsed` value that the markup sets. The panel goes back to it when the stored entry is removed. */
|
|
40
39
|
authored;
|
|
41
40
|
stored = new StateController(this, () => this.persistKey && `panel:${this.persistKey}`, {
|
|
@@ -45,6 +44,7 @@ class BkPanel extends LitElement {
|
|
|
45
44
|
}
|
|
46
45
|
});
|
|
47
46
|
internals = this.attachInternals();
|
|
47
|
+
busyState = new BusyController(this, this.i18n, this.internals);
|
|
48
48
|
split = null;
|
|
49
49
|
/** Fraction that the panel had in the split before collapsing, and the data-min that it had. */
|
|
50
50
|
restoreFr = 0;
|
|
@@ -130,9 +130,9 @@ class BkPanel extends LitElement {
|
|
|
130
130
|
}
|
|
131
131
|
.body:focus-visible { outline: var(--bk-focus-ring); outline-offset: var(--bk-focus-offset-inset); }
|
|
132
132
|
/* A filler runs edge to edge and scrolls inside: the body is a flex column with the content as its rest. */
|
|
133
|
-
:host(
|
|
134
|
-
:host(
|
|
135
|
-
:host(
|
|
133
|
+
:host(:state(fills)) .body { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
|
|
134
|
+
:host(:state(fills)) .content { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; }
|
|
135
|
+
:host(:state(fills)) .content ::slotted(:is(bk-split, bk-columns, bk-pane, bk-split-grid, bk-message-list)) { flex: 1; min-height: 0; min-width: 0; }
|
|
136
136
|
/* A conversation fills the body but keeps the padding of the body inside its scroller: the messages do not touch the edges. */
|
|
137
137
|
.content ::slotted(bk-message-list) { --bk-message-list-padding: var(--_bk-panel-pad); }
|
|
138
138
|
:host([tone="neutral"]) { --_bk-panel-tone: var(--bk-neutral-soft); }
|
|
@@ -266,7 +266,8 @@ class BkPanel extends LitElement {
|
|
|
266
266
|
checkFill = () => {
|
|
267
267
|
const slot = this.renderRoot.querySelector(".content slot");
|
|
268
268
|
const children = slot?.assignedElements() ?? [];
|
|
269
|
-
|
|
269
|
+
const fills = children.some((el) => FILLING.has(el.localName) || Number.parseFloat(getComputedStyle(el).flexGrow) > 0);
|
|
270
|
+
fills ? this.internals.states.add("fills") : this.internals.states.delete("fills");
|
|
270
271
|
};
|
|
271
272
|
updated(changed) {
|
|
272
273
|
const toggle = this.renderRoot.querySelector(".toggle");
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "./bk-button.js";
|
|
3
|
+
import "./bk-icon.js";
|
|
4
|
+
import "../icons/set/chevron-left.js";
|
|
5
|
+
import "../icons/set/chevron-right.js";
|
|
6
|
+
export type { NavigateDetail } from "../internal/link.js";
|
|
7
|
+
export type PeriodNavSize = "sm" | "md" | "lg";
|
|
8
|
+
/**
|
|
9
|
+
* Navigation between periods of a dashboard: a link to the previous period, the range as text, a link to the
|
|
10
|
+
* next period, a link to the current period and a note about the state of the period.
|
|
11
|
+
* For views by day, week or month. The pages of a document use `bk-page-pager`.
|
|
12
|
+
*
|
|
13
|
+
* ```html
|
|
14
|
+
* <bk-period-nav previous-href="?week=2026-W23" next-href="?week=2026-W25" current-href="?week=2026-W26">
|
|
15
|
+
* Mon, Jun 8 – Sun, Jun 14
|
|
16
|
+
* <span slot="note">Week still running, 3 of 7 days.</span>
|
|
17
|
+
* </bk-period-nav>
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* The app formats the range and the note. The element places them and names the links. Each link is a real `<a>`,
|
|
21
|
+
* so it works without JavaScript and follows the link resolver of the app.
|
|
22
|
+
*
|
|
23
|
+
* Without `next-href` the period is the newest one. The next button then stays in its place as a disabled
|
|
24
|
+
* native button, so the row does not move. Without `current-href` the current button does not show. Set it only
|
|
25
|
+
* when the user is not on the current period. The arrows follow the writing direction.
|
|
26
|
+
*
|
|
27
|
+
* @slot - The range of the period as text.
|
|
28
|
+
* @slot note - A note about the state of the period. It wraps under the row in a narrow place.
|
|
29
|
+
* @csspart nav - The `<nav>`.
|
|
30
|
+
* @csspart previous - The previous button.
|
|
31
|
+
* @csspart next - The next button.
|
|
32
|
+
* @csspart current - The button for the current period.
|
|
33
|
+
* @csspart range - The range text.
|
|
34
|
+
* @csspart note - The note.
|
|
35
|
+
* @cssprop --bk-period-nav-gap - Space between the parts of the row (default --bk-space-cluster).
|
|
36
|
+
* @cssprop --bk-period-nav-range-fg - Colour of the range (default --bk-text).
|
|
37
|
+
* @cssprop --bk-period-nav-range-size - Size of the range (default --bk-type-body).
|
|
38
|
+
* @cssprop --bk-period-nav-range-weight - Weight of the range (default --bk-weight-medium).
|
|
39
|
+
* @cssprop --bk-period-nav-note-fg - Colour of the note (default --bk-text-muted).
|
|
40
|
+
* @cssprop --bk-period-nav-note-size - Size of the note (default --bk-type-small).
|
|
41
|
+
*
|
|
42
|
+
* @keyboard Tab - Move focus to the next enabled button.
|
|
43
|
+
* @keyboard Enter - Follow the link of the focused button.
|
|
44
|
+
* @a11y A `navigation` landmark named "Period navigation" (`label`). The buttons are links with an icon and the names "Previous period" and "Next period"; the arrows are hidden. At the newest period the next button is a native disabled button. The current button shows its name as text.
|
|
45
|
+
* @fires {CustomEvent<NavigateDetail>} navigate - The user makes a plain click on a link (primary button, no modifier key). `detail.href` is the resolved address. Bubbles, composed, cancelable: `preventDefault()` stops the browser, and the router of the app handles the navigation.
|
|
46
|
+
* @tag bk-period-nav
|
|
47
|
+
*/
|
|
48
|
+
export declare class BkPeriodNav extends LitElement {
|
|
49
|
+
static properties: {
|
|
50
|
+
previousHref: {
|
|
51
|
+
attribute: string;
|
|
52
|
+
};
|
|
53
|
+
nextHref: {
|
|
54
|
+
attribute: string;
|
|
55
|
+
};
|
|
56
|
+
currentHref: {
|
|
57
|
+
attribute: string;
|
|
58
|
+
};
|
|
59
|
+
label: {};
|
|
60
|
+
previousLabel: {
|
|
61
|
+
attribute: string;
|
|
62
|
+
};
|
|
63
|
+
nextLabel: {
|
|
64
|
+
attribute: string;
|
|
65
|
+
};
|
|
66
|
+
currentLabel: {
|
|
67
|
+
attribute: string;
|
|
68
|
+
};
|
|
69
|
+
size: {
|
|
70
|
+
reflect: boolean;
|
|
71
|
+
useDefault: boolean;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/** Address of the previous period. Unset: the previous button is disabled. */
|
|
75
|
+
previousHref: string | undefined;
|
|
76
|
+
/** Address of the next period. Unset: the next button is disabled. */
|
|
77
|
+
nextHref: string | undefined;
|
|
78
|
+
/** Address of the current period. Unset: no button for the current period. */
|
|
79
|
+
currentHref: string | undefined;
|
|
80
|
+
/** Name of the landmark (default "Period navigation"). */
|
|
81
|
+
label: string | undefined;
|
|
82
|
+
/** Name of the previous button (default "Previous period"). */
|
|
83
|
+
previousLabel: string | undefined;
|
|
84
|
+
/** Name of the next button (default "Next period"). */
|
|
85
|
+
nextLabel: string | undefined;
|
|
86
|
+
/** Text of the current button (default "Current period"). */
|
|
87
|
+
currentLabel: string | undefined;
|
|
88
|
+
/** Size of the buttons: `sm`, `md` (default) or `lg`. */
|
|
89
|
+
size: PeriodNavSize;
|
|
90
|
+
private i18n;
|
|
91
|
+
private slots;
|
|
92
|
+
constructor();
|
|
93
|
+
static styles: import("lit").CSSResult[];
|
|
94
|
+
private arrow;
|
|
95
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
96
|
+
}
|
|
97
|
+
declare global {
|
|
98
|
+
interface HTMLElementTagNameMap {
|
|
99
|
+
"bk-period-nav": BkPeriodNav;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=bk-period-nav.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { LitElement, css, html, nothing } from "lit";
|
|
2
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
3
|
+
import { define } from "../internal/define.js";
|
|
4
|
+
import { LocalizeController } from "../i18n.js";
|
|
5
|
+
import { SlotController } from "../internal/slots.js";
|
|
6
|
+
import { base } from "../internal/styles.js";
|
|
7
|
+
import "./bk-button.js";
|
|
8
|
+
import "./bk-icon.js";
|
|
9
|
+
import "../icons/set/chevron-left.js";
|
|
10
|
+
import "../icons/set/chevron-right.js";
|
|
11
|
+
class BkPeriodNav extends LitElement {
|
|
12
|
+
static properties = {
|
|
13
|
+
previousHref: { attribute: "previous-href" },
|
|
14
|
+
nextHref: { attribute: "next-href" },
|
|
15
|
+
currentHref: { attribute: "current-href" },
|
|
16
|
+
label: {},
|
|
17
|
+
previousLabel: { attribute: "previous-label" },
|
|
18
|
+
nextLabel: { attribute: "next-label" },
|
|
19
|
+
currentLabel: { attribute: "current-label" },
|
|
20
|
+
size: { reflect: true, useDefault: true }
|
|
21
|
+
};
|
|
22
|
+
i18n = new LocalizeController(this);
|
|
23
|
+
slots = new SlotController(this);
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
this.size = "md";
|
|
27
|
+
}
|
|
28
|
+
static styles = [base, css`
|
|
29
|
+
:host { display: block; }
|
|
30
|
+
nav {
|
|
31
|
+
display: flex; flex-wrap: wrap; align-items: center;
|
|
32
|
+
gap: var(--bk-period-nav-gap, var(--bk-space-cluster));
|
|
33
|
+
}
|
|
34
|
+
.step { display: inline-flex; max-inline-size: 100%; align-items: center; gap: var(--bk-period-nav-gap, var(--bk-space-cluster)); }
|
|
35
|
+
.range {
|
|
36
|
+
color: var(--bk-period-nav-range-fg, var(--bk-text)); font-size: var(--bk-period-nav-range-size, var(--bk-type-body));
|
|
37
|
+
font-weight: var(--bk-period-nav-range-weight, var(--bk-weight-medium)); line-height: var(--bk-line-height-body);
|
|
38
|
+
font-variant-numeric: tabular-nums; text-wrap: balance;
|
|
39
|
+
}
|
|
40
|
+
.note {
|
|
41
|
+
color: var(--bk-period-nav-note-fg, var(--bk-text-muted)); font-size: var(--bk-period-nav-note-size, var(--bk-type-small));
|
|
42
|
+
line-height: var(--bk-line-height-body); flex: 1 1 auto;
|
|
43
|
+
}
|
|
44
|
+
.note[hidden] { display: none; }
|
|
45
|
+
bk-icon:dir(rtl) { scale: -1 1; }
|
|
46
|
+
`];
|
|
47
|
+
arrow(kind, href, label) {
|
|
48
|
+
return html`<bk-button part=${kind} size=${this.size} variant="outline" label=${label} href=${ifDefined(href || void 0)} ?disabled=${!href}
|
|
49
|
+
rel=${ifDefined(href ? kind === "previous" ? "prev" : "next" : void 0)}>
|
|
50
|
+
<bk-icon name=${kind === "previous" ? "chevron-left" : "chevron-right"} aria-hidden="true"></bk-icon>
|
|
51
|
+
</bk-button>`;
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
return html`<nav part="nav" aria-label=${this.label || this.i18n.t("periodNavLabel")}>
|
|
55
|
+
<span class="step">
|
|
56
|
+
${this.arrow("previous", this.previousHref, this.previousLabel || this.i18n.t("periodPrevious"))}
|
|
57
|
+
<span class="range" part="range"><slot></slot></span>
|
|
58
|
+
${this.arrow("next", this.nextHref, this.nextLabel || this.i18n.t("periodNext"))}
|
|
59
|
+
</span>
|
|
60
|
+
${this.currentHref ? html`<bk-button part="current" size=${this.size} variant="outline" href=${this.currentHref}>${this.currentLabel || this.i18n.t("periodCurrent")}</bk-button>` : nothing}
|
|
61
|
+
<span class="note" part="note" ?hidden=${!this.slots.has("note")}><slot name="note"></slot></span>
|
|
62
|
+
</nav>`;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
define("bk-period-nav", BkPeriodNav);
|
|
66
|
+
export {
|
|
67
|
+
BkPeriodNav
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=bk-period-nav.js.map
|
|
@@ -5,6 +5,16 @@ export type { NavigateDetail } from "../internal/link.js";
|
|
|
5
5
|
import "../icons/set/error.js";
|
|
6
6
|
import "../icons/set/image.js";
|
|
7
7
|
import "../icons/set/refresh.js";
|
|
8
|
+
/** Detail of the `load` event of `bk-picture`. */
|
|
9
|
+
export interface PictureLoadDetail {
|
|
10
|
+
src: string;
|
|
11
|
+
naturalWidth: number;
|
|
12
|
+
naturalHeight: number;
|
|
13
|
+
}
|
|
14
|
+
/** Detail of the `error` event of `bk-picture`. */
|
|
15
|
+
export interface PictureErrorDetail {
|
|
16
|
+
src: string;
|
|
17
|
+
}
|
|
8
18
|
/**
|
|
9
19
|
* A picture in a layout: a hero image, a product photo, a portrait, a picture in an article. It
|
|
10
20
|
* fills the width of its column and keeps an aspect ratio. It uses the corner radius of the containers and
|
|
@@ -29,7 +39,8 @@ import "../icons/set/refresh.js";
|
|
|
29
39
|
* that changes its picture does not flash the placeholder.
|
|
30
40
|
* - An image that cannot load shows a message and a button that loads it again (`error-label` and
|
|
31
41
|
* `retry-label` change the texts). A picture narrower than `--bk-picture-error-min-width` (a
|
|
32
|
-
* thumbnail in a list row) shows
|
|
42
|
+
* thumbnail in a list row) shows the error icon, with the message as its name and tooltip, and an icon-only
|
|
43
|
+
* retry button.
|
|
33
44
|
* - A picture without `src` and without content in the default slot shows an empty frame: the
|
|
34
45
|
* placeholder background, the corners, the ratio and a quiet image icon. The `empty` slot replaces
|
|
35
46
|
* the icon. Without `ratio`, an empty frame has the ratio 4/3.
|
|
@@ -49,7 +60,7 @@ import "../icons/set/refresh.js";
|
|
|
49
60
|
* @csspart image - The `<img>` made from `src`.
|
|
50
61
|
* @csspart caption - The caption.
|
|
51
62
|
* @csspart link - The link that covers the frame of a picture with `href`.
|
|
52
|
-
* @csspart error - The message and the retry button of an image that cannot load (
|
|
63
|
+
* @csspart error - The message and the retry button of an image that cannot load (the icon and an icon-only button in a small picture).
|
|
53
64
|
* @csspart placeholder - The content of an empty frame: the image icon or the `empty` slot.
|
|
54
65
|
* @cssprop --bk-picture-width - Width of the picture (default auto: the width of its column).
|
|
55
66
|
* @cssprop --bk-picture-radius - Corner radius (default --bk-radius-container, else --bk-radius-lg).
|
|
@@ -57,7 +68,7 @@ import "../icons/set/refresh.js";
|
|
|
57
68
|
* @cssprop --bk-picture-loaded-bg - Background behind a loaded image, seen through a transparent image (default none).
|
|
58
69
|
* @cssprop --bk-picture-placeholder-color - Colour of the icon of an empty frame and of the error icon in a small picture (default --bk-text-faint).
|
|
59
70
|
* @cssprop --bk-picture-placeholder-icon-size - Size of the icon of an empty frame and of the error icon in a small picture (default --bk-icon-lg).
|
|
60
|
-
* @cssprop --bk-picture-error-min-width - Below this width, an image that cannot load shows
|
|
71
|
+
* @cssprop --bk-picture-error-min-width - Below this width, an image that cannot load shows the error icon and an icon-only retry button (default 5 × --bk-control-md).
|
|
61
72
|
* @cssprop --bk-picture-ratio - Aspect ratio when `ratio` is not set (default auto: the image's own).
|
|
62
73
|
* @cssprop --bk-picture-caption-gap - Space between the picture and its caption (default --bk-space-lines).
|
|
63
74
|
* @cssprop --bk-picture-caption-fg - Colour of the caption (default --bk-text-muted).
|
|
@@ -70,7 +81,9 @@ import "../icons/set/refresh.js";
|
|
|
70
81
|
* native link named by `alt`, and the image itself is decoration. With a caption the
|
|
71
82
|
* element renders a `<figure>` with a `<figcaption>`. The message of an image that cannot load is
|
|
72
83
|
* visible text. The retry button is a native button. In a small picture the error icon is an image
|
|
73
|
-
* with the message as its name and tooltip. The icon of an empty frame is decoration.
|
|
84
|
+
* with the message as its name and tooltip, and the retry button has the retry text as its name. The icon of an empty frame is decoration.
|
|
85
|
+
* @fires {CustomEvent<PictureLoadDetail>} load - Fires when the image of `src` has loaded. `detail` is `{ src, naturalWidth, naturalHeight }`. It bubbles and is composed: the native `load` of the inner `<img>` does not leave the shadow root. A viewer reads the size of the stage from it. An image that comes from the cache fires it too.
|
|
86
|
+
* @fires {CustomEvent<PictureErrorDetail>} error - Fires when the image of `src` cannot load. `detail` is `{ src }`. It bubbles and is composed. A gallery tile reads it to show its own state. A retry that fails fires it again.
|
|
74
87
|
* @fires {CustomEvent<NavigateDetail>} navigate - Fires on a plain click on the link (primary button, no modifier key, no other `target`, no `download`). `detail.href` is the resolved address. It bubbles, is composed and is cancelable. `preventDefault()` stops the browser, and the router of the app handles the navigation.
|
|
75
88
|
* @tag bk-picture
|
|
76
89
|
*/
|
|
@@ -4,6 +4,7 @@ import { keyed } from "lit/directives/keyed.js";
|
|
|
4
4
|
import { styleMap } from "../internal/style-map.js";
|
|
5
5
|
import { LocalizeController } from "../i18n.js";
|
|
6
6
|
import { define } from "../internal/define.js";
|
|
7
|
+
import { emitDetail } from "../internal/events.js";
|
|
7
8
|
import { LinkController } from "../internal/link.js";
|
|
8
9
|
import { resizeObserver } from "../internal/server.js";
|
|
9
10
|
import { SlotController } from "../internal/slots.js";
|
|
@@ -71,6 +72,7 @@ class BkPicture extends LitElement {
|
|
|
71
72
|
/* The size inherits into an icon in the empty slot too. */
|
|
72
73
|
--bk-icon-size: var(--bk-picture-placeholder-icon-size, var(--bk-icon-lg));
|
|
73
74
|
}
|
|
75
|
+
.error.compact { grid-auto-flow: column; place-content: center; gap: var(--bk-space-1); }
|
|
74
76
|
.error-probe { position: absolute; inline-size: var(--bk-picture-error-min-width, calc(5 * var(--bk-control-md))); block-size: 0; visibility: hidden; pointer-events: none; }
|
|
75
77
|
img, ::slotted(:is(img, video, svg)) {
|
|
76
78
|
display: block; inline-size: 100%; block-size: auto; max-inline-size: 100%;
|
|
@@ -145,12 +147,16 @@ class BkPicture extends LitElement {
|
|
|
145
147
|
onLoad() {
|
|
146
148
|
this.loaded = true;
|
|
147
149
|
this.previous = "";
|
|
150
|
+
const img = this.renderRoot.querySelector("img.image");
|
|
151
|
+
emitDetail(this, "load", { src: this.src, naturalWidth: img?.naturalWidth ?? 0, naturalHeight: img?.naturalHeight ?? 0 });
|
|
148
152
|
}
|
|
149
153
|
onError() {
|
|
150
154
|
this.failed = true;
|
|
151
155
|
this.previous = "";
|
|
156
|
+
emitDetail(this, "error", { src: this.src });
|
|
152
157
|
}
|
|
153
|
-
retry() {
|
|
158
|
+
retry(event) {
|
|
159
|
+
event.stopPropagation();
|
|
154
160
|
this.failed = false;
|
|
155
161
|
this.attempt++;
|
|
156
162
|
}
|
|
@@ -176,6 +182,7 @@ class BkPicture extends LitElement {
|
|
|
176
182
|
${empty ? html`<div class="placeholder" part="placeholder"><slot name="empty"><bk-icon name="image"></bk-icon></slot></div>` : nothing}
|
|
177
183
|
${!this.failed ? nothing : compact ? html`<div class="error compact" part="error">
|
|
178
184
|
<bk-icon name="error" label=${message} title=${message}></bk-icon>
|
|
185
|
+
<bk-button size="sm" variant="ghost" icon="refresh" label=${this.retryLabel || this.i18n.t("pictureRetry")} @click=${this.retry}></bk-button>
|
|
179
186
|
</div>` : html`<div class="error" part="error">
|
|
180
187
|
<bk-icon name="error"></bk-icon>
|
|
181
188
|
<span>${message}</span>
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { type PropertyValues } from "lit";
|
|
1
2
|
import { ChoiceItem } from "../internal/choice-item.js";
|
|
2
3
|
import "./bk-icon.js";
|
|
3
4
|
export type { NavigateDetail } from "../internal/link.js";
|
|
4
5
|
/**
|
|
5
6
|
* One option of a `<bk-segmented>`. Use it only as a direct child of `<bk-segmented>`. The group
|
|
6
|
-
* sets its
|
|
7
|
+
* sets its `checked` state and its tab stop. The segment shows them on its inner box: the box is the
|
|
8
|
+
* role="radio" with `aria-checked` and the roving `tabindex`. The group writes no attributes on the
|
|
9
|
+
* segment, so the server HTML of an app stays as the app wrote it.
|
|
7
10
|
*
|
|
8
11
|
* For an icon-only segment set `icon` and `label` (the accessible name and tooltip) and leave the
|
|
9
12
|
* content empty. `count` adds a small number badge after the label.
|
|
@@ -23,7 +26,7 @@ export type { NavigateDetail } from "../internal/link.js";
|
|
|
23
26
|
* @slot - Label.
|
|
24
27
|
* @slot start - Leading content. The `icon` attribute is a shorthand for a `<bk-icon>` here.
|
|
25
28
|
* @slot end - Trailing content. The `count` attribute is a shorthand for a count badge here.
|
|
26
|
-
* @csspart base - The segment box (a `<span
|
|
29
|
+
* @csspart base - The segment box (a `<span>` with role="radio", or an `<a>` with `href`).
|
|
27
30
|
* @csspart count - The count badge.
|
|
28
31
|
*
|
|
29
32
|
* @fires {CustomEvent<NavigateDetail>} navigate - A plain click on the link (primary button, no modifier key, no other `target`, no `download`); `detail.href` is the resolved address. The event bubbles and is composed. It is cancelable: `preventDefault()` stops the browser, and the router of the app handles the navigation.
|
|
@@ -42,13 +45,15 @@ export declare class BkSegmentedItem extends ChoiceItem {
|
|
|
42
45
|
reflect: boolean;
|
|
43
46
|
};
|
|
44
47
|
target: {};
|
|
48
|
+
rel: {};
|
|
49
|
+
download: {};
|
|
45
50
|
disabled: {
|
|
46
51
|
type: BooleanConstructor;
|
|
47
52
|
reflect: boolean;
|
|
48
53
|
};
|
|
49
54
|
checked: {
|
|
50
55
|
type: BooleanConstructor;
|
|
51
|
-
|
|
56
|
+
attribute: boolean;
|
|
52
57
|
};
|
|
53
58
|
collapse: {
|
|
54
59
|
reflect: boolean;
|
|
@@ -56,10 +61,25 @@ export declare class BkSegmentedItem extends ChoiceItem {
|
|
|
56
61
|
};
|
|
57
62
|
/** Fold to icon and count when the nearest size container is narrow: `""`/`md` (640px), `sm` (480px), `lg` (960px). */
|
|
58
63
|
collapse: "" | "sm" | "md" | "lg" | null | undefined;
|
|
59
|
-
/** `<bk-segmented>` sets it on the chosen segment. Do not set it yourself. */
|
|
64
|
+
/** `<bk-segmented>` sets it on the chosen segment (the state `:state(checked)`). Do not set it yourself. */
|
|
60
65
|
checked: boolean;
|
|
66
|
+
private internals;
|
|
67
|
+
private group;
|
|
61
68
|
constructor();
|
|
69
|
+
/**
|
|
70
|
+
* `<bk-segmented>` calls this method: `radio` makes the inner box a radio, `tabStop` makes it the tab stop of the
|
|
71
|
+
* group, `disabled` is the disabled state of the group.
|
|
72
|
+
*/
|
|
73
|
+
setGroupState(o: {
|
|
74
|
+
radio: boolean;
|
|
75
|
+
tabStop: boolean;
|
|
76
|
+
disabled: boolean;
|
|
77
|
+
}): void;
|
|
62
78
|
protected get current(): boolean;
|
|
79
|
+
protected get labelOnHost(): boolean;
|
|
80
|
+
/** The inner box is the radio: it has the role, the ARIA state, the name and the roving tabindex. */
|
|
81
|
+
protected renderBox(cls: string, inner: unknown): unknown;
|
|
82
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
63
83
|
protected get tip(): string | undefined;
|
|
64
84
|
static styles: import("lit").CSSResult[];
|
|
65
85
|
}
|
|
@@ -1,25 +1,57 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
1
|
+
import { css, html } from "lit";
|
|
2
2
|
import { define } from "../internal/define.js";
|
|
3
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
3
4
|
import { ChoiceItem, choiceItemStyles } from "../internal/choice-item.js";
|
|
4
5
|
import { collapseRules, visuallyHidden } from "../internal/styles.js";
|
|
5
6
|
import "./bk-icon.js";
|
|
7
|
+
import { ownText } from "../internal/own-text.js";
|
|
6
8
|
class BkSegmentedItem extends ChoiceItem {
|
|
7
9
|
static properties = {
|
|
8
10
|
...ChoiceItem.properties,
|
|
9
|
-
checked: { type: Boolean,
|
|
11
|
+
checked: { type: Boolean, attribute: false },
|
|
10
12
|
collapse: { reflect: true }
|
|
11
13
|
};
|
|
14
|
+
internals = this.attachInternals();
|
|
15
|
+
group = { radio: false, tabStop: false, disabled: false };
|
|
12
16
|
constructor() {
|
|
13
17
|
super();
|
|
14
18
|
this.checked = false;
|
|
15
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* `<bk-segmented>` calls this method: `radio` makes the inner box a radio, `tabStop` makes it the tab stop of the
|
|
22
|
+
* group, `disabled` is the disabled state of the group.
|
|
23
|
+
*/
|
|
24
|
+
setGroupState(o) {
|
|
25
|
+
const g = this.group;
|
|
26
|
+
if (g.radio === o.radio && g.tabStop === o.tabStop && g.disabled === o.disabled)
|
|
27
|
+
return;
|
|
28
|
+
this.group = { ...o };
|
|
29
|
+
this.requestUpdate();
|
|
30
|
+
}
|
|
16
31
|
get current() {
|
|
17
32
|
return this.checked;
|
|
18
33
|
}
|
|
34
|
+
get labelOnHost() {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
/** The inner box is the radio: it has the role, the ARIA state, the name and the roving tabindex. */
|
|
38
|
+
renderBox(cls, inner) {
|
|
39
|
+
const g = this.group;
|
|
40
|
+
if (!g.radio || this.href)
|
|
41
|
+
return super.renderBox(cls, inner);
|
|
42
|
+
return html`<span class=${cls} part="base" title=${ifDefined(this.tip)} role="radio" aria-checked=${this.checked ? "true" : "false"}
|
|
43
|
+
aria-disabled=${ifDefined(this.disabled || g.disabled ? "true" : void 0)} aria-label=${ifDefined(this.label || void 0)}
|
|
44
|
+
tabindex=${g.tabStop ? "0" : "-1"}>${inner}</span>`;
|
|
45
|
+
}
|
|
46
|
+
willUpdate(changed) {
|
|
47
|
+
super.willUpdate(changed);
|
|
48
|
+
if (changed.has("checked"))
|
|
49
|
+
this.checked ? this.internals.states.add("checked") : this.internals.states.delete("checked");
|
|
50
|
+
}
|
|
19
51
|
get tip() {
|
|
20
52
|
if (this.label || this.collapse == null)
|
|
21
53
|
return this.label;
|
|
22
|
-
const text =
|
|
54
|
+
const text = ownText(this).trim();
|
|
23
55
|
return text || void 0;
|
|
24
56
|
}
|
|
25
57
|
// Size-dependent values come as private --_bk-seg-* variables from <bk-segmented>.
|
|
@@ -46,12 +78,12 @@ class BkSegmentedItem extends ChoiceItem {
|
|
|
46
78
|
--_bk-ci-count-selected-fg: var(--bk-segmented-count-selected-fg, var(--bk-count-selected-fg));
|
|
47
79
|
}
|
|
48
80
|
/* The thumb behind the chosen segment is its surface: no hover or pressed fill on top. */
|
|
49
|
-
:host(
|
|
81
|
+
:host(:state(checked)) { --_bk-ci-hover-fg: var(--_bk-ci-selected-fg); --_bk-ci-hover-bg: transparent; --_bk-ci-pressed-bg: transparent; }
|
|
50
82
|
.item { block-size: var(--_bk-ci-height); }
|
|
51
83
|
/* Keep the hit area at least 24px tall in the small size (WCAG 2.5.8) */
|
|
52
84
|
.item::before { content: ""; position: absolute; inset: calc(-1 * var(--_bk-seg-pad, var(--bk-space-0))) 0; }
|
|
53
85
|
@media (forced-colors: active) {
|
|
54
|
-
:host(
|
|
86
|
+
:host(:state(checked)) .item { forced-color-adjust: none; background: Highlight; color: HighlightText; }
|
|
55
87
|
}
|
|
56
88
|
`, collapseRules((host) => `${host} .label { ${visuallyHidden} }`)];
|
|
57
89
|
}
|
|
@@ -164,18 +164,7 @@ class BkSegmented extends FormControl {
|
|
|
164
164
|
const link = this.linkMode;
|
|
165
165
|
for (const seg of this.segments) {
|
|
166
166
|
seg.checked = seg === selected;
|
|
167
|
-
|
|
168
|
-
for (const a of ["role", "aria-checked", "tabindex", "aria-disabled"])
|
|
169
|
-
seg.removeAttribute(a);
|
|
170
|
-
continue;
|
|
171
|
-
}
|
|
172
|
-
seg.setAttribute("role", "radio");
|
|
173
|
-
seg.setAttribute("aria-checked", String(seg === selected));
|
|
174
|
-
seg.tabIndex = !disabled && seg === entry ? 0 : -1;
|
|
175
|
-
if (disabled || seg.disabled)
|
|
176
|
-
seg.setAttribute("aria-disabled", "true");
|
|
177
|
-
else
|
|
178
|
-
seg.removeAttribute("aria-disabled");
|
|
167
|
+
seg.setGroupState({ radio: !link, tabStop: !disabled && seg === entry, disabled });
|
|
179
168
|
}
|
|
180
169
|
Promise.all(this.segments.map((s) => s.updateComplete)).then(() => this.placeThumb());
|
|
181
170
|
}
|
|
@@ -255,7 +244,7 @@ class BkSegmented extends FormControl {
|
|
|
255
244
|
const at = enabled.indexOf(seg);
|
|
256
245
|
const target = enabled[(at + dir + enabled.length) % enabled.length];
|
|
257
246
|
for (const s of this.segments)
|
|
258
|
-
s.
|
|
247
|
+
s.setGroupState({ radio: true, tabStop: s === target, disabled: false });
|
|
259
248
|
target.focus();
|
|
260
249
|
this.pick(target);
|
|
261
250
|
};
|
|
@@ -63,7 +63,7 @@ import "../icons/set/chevron-down.js";
|
|
|
63
63
|
* @cssprop --bk-select-cascade-chevron-color - Chevron colour (default --bk-text-muted).
|
|
64
64
|
* @cssprop --bk-select-cascade-popup-bg - Popup background (default --bk-layer-overlay-bg).
|
|
65
65
|
* @cssprop --bk-select-cascade-popup-border - Popup border colour (default --bk-layer-overlay-border).
|
|
66
|
-
* @cssprop --bk-select-cascade-popup-radius - Popup corner radius (default --bk-radius
|
|
66
|
+
* @cssprop --bk-select-cascade-popup-radius - Popup corner radius (default --bk-row-radius + the padding + the border: concentric with the rows).
|
|
67
67
|
* @cssprop --bk-select-cascade-popup-shadow - Popup shadow (default --bk-layer-overlay-shadow).
|
|
68
68
|
* @cssprop --bk-select-cascade-popup-padding - Space between popup edge and columns (default --bk-space-1).
|
|
69
69
|
* @cssprop --bk-select-cascade-popup-offset - Gap between box and popup, read on open (default --bk-space-1).
|
|
@@ -77,7 +77,7 @@ import "../icons/set/search.js";
|
|
|
77
77
|
* @cssprop --bk-select-tree-chevron-color - Chevron colour (default --bk-text-muted).
|
|
78
78
|
* @cssprop --bk-select-tree-popup-bg - Popup background (default --bk-layer-overlay-bg).
|
|
79
79
|
* @cssprop --bk-select-tree-popup-border - Popup border colour (default --bk-layer-overlay-border).
|
|
80
|
-
* @cssprop --bk-select-tree-popup-radius - Popup corner radius (default --bk-radius
|
|
80
|
+
* @cssprop --bk-select-tree-popup-radius - Popup corner radius (default --bk-row-radius + the padding + the border: concentric with the rows).
|
|
81
81
|
* @cssprop --bk-select-tree-popup-shadow - Popup shadow (default --bk-layer-overlay-shadow).
|
|
82
82
|
* @cssprop --bk-select-tree-popup-padding - Space between popup edge and rows (default --bk-space-1).
|
|
83
83
|
* @cssprop --bk-select-tree-popup-offset - Gap between box and popup, read on open (default --bk-space-1).
|
|
@@ -104,7 +104,7 @@ export type SelectValueTemplate = (option: SelectOption) => unknown;
|
|
|
104
104
|
* @cssprop --bk-select-chevron-color - Chevron colour (default --bk-text-muted).
|
|
105
105
|
* @cssprop --bk-select-popup-bg - Popup background (default --bk-layer-overlay-bg).
|
|
106
106
|
* @cssprop --bk-select-popup-border - Popup border colour (default --bk-layer-overlay-border).
|
|
107
|
-
* @cssprop --bk-select-popup-radius - Popup corner radius (default --bk-radius
|
|
107
|
+
* @cssprop --bk-select-popup-radius - Popup corner radius (default --bk-row-radius + the padding + the border: concentric with the rows).
|
|
108
108
|
* @cssprop --bk-select-popup-shadow - Popup shadow (default --bk-layer-overlay-shadow).
|
|
109
109
|
* @cssprop --bk-select-popup-padding - Space between popup edge and options (default --bk-space-1).
|
|
110
110
|
* @cssprop --bk-select-popup-offset - Gap between box and popup, read on open (default --bk-space-1).
|
|
@@ -102,7 +102,8 @@ class BkSelect extends ChoiceField {
|
|
|
102
102
|
static styles = [...choiceFieldStyles("select"), css`
|
|
103
103
|
.box { position: relative; cursor: pointer; user-select: none; }
|
|
104
104
|
/* fit: the box takes the width of the longest option; the hidden labels share one grid cell with the shown one. */
|
|
105
|
-
|
|
105
|
+
/* max-content, not fit-content: in an auto table cell fit-content is the min-content width, and the chevron covers the text. */
|
|
106
|
+
:host([fit]) { inline-size: var(--bk-field-width, max-content); max-inline-size: 100%; }
|
|
106
107
|
:host([fit]) .value { flex: none; min-width: max-content; }
|
|
107
108
|
.fit { display: grid; }
|
|
108
109
|
.fit > * { grid-area: 1 / 1; display: flex; align-items: center; gap: var(--bk-space-inline); white-space: nowrap; }
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LitElement, type PropertyValues } from "lit";
|
|
2
|
-
import "./bk-drawer.js";
|
|
3
2
|
import "./bk-icon.js";
|
|
4
3
|
import "./bk-button.js";
|
|
5
4
|
import "./bk-nav-item.js";
|
|
@@ -49,12 +48,16 @@ export declare class ShellAppToggleEvent extends ToggleEventBase {
|
|
|
49
48
|
* page padding beside it (`--bk-app-page-padding-inline`, below the breakpoint
|
|
50
49
|
* `--bk-app-page-padding-narrow`), like the footer. `<main>` adds no padding, no page width and no gap.
|
|
51
50
|
* When the main content fills the space it is given (a `<bk-pane>`, `<bk-split>` or `<bk-columns>`
|
|
52
|
-
* directly in it), the shell is a workspace (
|
|
51
|
+
* directly in it), the shell is a workspace (the custom state `:state(workspace)`): it fills the viewport
|
|
53
52
|
* (`--bk-app-viewport-height`, 100dvh). Nothing scrolls the document. `<main>` has no padding or maximum width, and the content
|
|
54
53
|
* scrolls inside. A `<bk-pane>` there is the page. It has the page padding and gap and keeps its header and content
|
|
55
54
|
* in the page width (`--bk-width-page`, in the middle; a split or columns in it fill the pane). Its `header`
|
|
56
55
|
* (page header, breadcrumbs) stays in view. Its content scrolls or fills the rest (a
|
|
57
56
|
* `<bk-tabs>` with a preview in its panel, a `<bk-split>`). A split and columns fill the pane edge to edge.
|
|
57
|
+
* **Columns that flow.** A `<bk-columns>` directly in the shell flows in the document while the shell is narrow, or
|
|
58
|
+
* while the element is narrower than its `stack-above`. Then the shell is a page and not a workspace (the custom
|
|
59
|
+
* state `:state(flow)`): the document scrolls, the header stays in view, and `scroll-key` restores the position of the
|
|
60
|
+
* document. `<main>` adds no padding and no page width, because the columns have their own padding.
|
|
58
61
|
*
|
|
59
62
|
* **Navigation.** Put a vertical `<bk-nav>` in `sidebar` (with an optional `sidebar-header` brand row and
|
|
60
63
|
* `sidebar-footer` items at the bottom), or a horizontal one in `nav` (top-nav apps), or both.
|
|
@@ -73,7 +76,7 @@ export declare class ShellAppToggleEvent extends ToggleEventBase {
|
|
|
73
76
|
* - Below `breakpoint` (the own width of the shell, default 900px), or when the `nav` does not fit beside the rest of the header, a menu button in the header opens a
|
|
74
77
|
* modal drawer. The drawer contains `sidebar-header`, `nav`, `sidebar`, `sidebar-footer` and `drawer` (content that
|
|
75
78
|
* only the drawer shows). Navs in the drawer have `drawer` (vertical, full labels). The focus moves to the
|
|
76
|
-
* current nav item. Esc, the scrim or a followed link closes the drawer.
|
|
79
|
+
* current nav item. Esc, the scrim or a followed link closes the drawer. The shell has the custom state `:state(narrow)` meanwhile.
|
|
77
80
|
* - **Bottom navigation.** `nav-placement="bottom"` shows a bar at the bottom of the screen on a phone (below
|
|
78
81
|
* `breakpoint`, or when the `nav` does not fit the header). Each top-level `<bk-nav-item>` of the `nav` (else of the
|
|
79
82
|
* `sidebar`) becomes an entry with its icon above its label, all of the same width. The `nav` moves into the bar and
|
|
@@ -369,7 +372,7 @@ export declare class BkShellApp extends LitElement {
|
|
|
369
372
|
narrow: boolean;
|
|
370
373
|
/** True while the shell is narrower than `aside-breakpoint` (the aside is an overlay). CSS selects it with `:state(aside-overlay)`. Read-only. */
|
|
371
374
|
asideOverlay: boolean;
|
|
372
|
-
/** True while the main content fills the shell (a `<bk-pane>`, `<bk-split>` or `<bk-columns>` directly in it): the shell fills the viewport. CSS selects it with `:state(workspace)`. Read-only. */
|
|
375
|
+
/** True while the main content fills the shell (a `<bk-pane>`, `<bk-split>` or `<bk-columns>` that does not flow, directly in it): the shell fills the viewport. CSS selects it with `:state(workspace)`. Read-only. */
|
|
373
376
|
workspace: boolean;
|
|
374
377
|
/** True while the main content is only `<bk-page-section>`s and `<bk-page-hero>`s: the sections are the page, `<main>` adds no padding. CSS selects it with `:state(sections)`. Read-only. */
|
|
375
378
|
get sections(): boolean;
|
|
@@ -396,7 +399,7 @@ export declare class BkShellApp extends LitElement {
|
|
|
396
399
|
private statusbarHeight;
|
|
397
400
|
/** Measured: the bottom navigation bar, which the sticky status bar and the sticky regions stand above. */
|
|
398
401
|
private bottomNavHeight;
|
|
399
|
-
/** Custom states (narrow, aside-overlay, workspace, nav-center, flat-sidebar, sections): the host keeps only the attributes of the app. */
|
|
402
|
+
/** Custom states (narrow, aside-overlay, workspace, nav-center, flat-sidebar, sections, flow): the host keeps only the attributes of the app. */
|
|
400
403
|
private internals;
|
|
401
404
|
/** The entries of the aside edge menu, set when it opens. */
|
|
402
405
|
private asideMoves;
|
|
@@ -419,6 +422,8 @@ export declare class BkShellApp extends LitElement {
|
|
|
419
422
|
private draggingAside;
|
|
420
423
|
private resizeObserver?;
|
|
421
424
|
private children$;
|
|
425
|
+
/** The attributes of the direct children: `slot` moves a child to another region; `mode` of a `<bk-columns>` makes the shell a page or a workspace. */
|
|
426
|
+
private childAttrs$;
|
|
422
427
|
/** Elements with `data-aside-toggle` / `data-sidebar-toggle` we put ARIA on. */
|
|
423
428
|
private asideTriggers;
|
|
424
429
|
private sidebarTriggers;
|
|
@@ -538,6 +543,8 @@ export declare class BkShellApp extends LitElement {
|
|
|
538
543
|
/** Closes the navigation drawer. */
|
|
539
544
|
hideNavigation(): void;
|
|
540
545
|
private fireToggle;
|
|
546
|
+
/** The drawers are in use: the shell is narrow, or the aside is an overlay. */
|
|
547
|
+
private get drawers();
|
|
541
548
|
protected willUpdate(changed: PropertyValues): void;
|
|
542
549
|
/** Turns a custom state on or off. */
|
|
543
550
|
private setState;
|
|
@@ -546,7 +553,7 @@ export declare class BkShellApp extends LitElement {
|
|
|
546
553
|
protected updated(changed: PropertyValues): void;
|
|
547
554
|
/** Placed `<bk-button variant="ghost">`s and `<bk-nav-item>`s follow the state like the shell's own toggle. */
|
|
548
555
|
private syncToggleLook;
|
|
549
|
-
/** `updateComplete` includes the drawers
|
|
556
|
+
/** `updateComplete` includes the drawers (their load and their own update that opens and closes them) and the load of the handle menu. */
|
|
550
557
|
protected getUpdateComplete(): Promise<boolean>;
|
|
551
558
|
/** The width of the sidebar's kept scroll bar room, which its end padding gives up. */
|
|
552
559
|
private measureScrollbar;
|