@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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
class BackdropPress {
|
|
2
|
+
dialog;
|
|
3
|
+
pressed = false;
|
|
4
|
+
constructor(dialog) {
|
|
5
|
+
this.dialog = dialog;
|
|
6
|
+
}
|
|
7
|
+
/** True when the point is outside the panel of the dialog. */
|
|
8
|
+
outside(e) {
|
|
9
|
+
const d = this.dialog();
|
|
10
|
+
if (!d || e.target !== d)
|
|
11
|
+
return false;
|
|
12
|
+
const r = d.getBoundingClientRect();
|
|
13
|
+
return !(e.clientX >= r.left && e.clientX <= r.right && e.clientY >= r.top && e.clientY <= r.bottom);
|
|
14
|
+
}
|
|
15
|
+
/** Remembers if the press started on the backdrop. */
|
|
16
|
+
press(e) {
|
|
17
|
+
this.pressed = this.outside(e);
|
|
18
|
+
}
|
|
19
|
+
/** True when this click is a click on the backdrop and the press started there too. Resets the press. */
|
|
20
|
+
isBackdropClick(e) {
|
|
21
|
+
const pressed = this.pressed;
|
|
22
|
+
this.pressed = false;
|
|
23
|
+
return pressed && this.outside(e);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
BackdropPress
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=backdrop.js.map
|
package/dist/internal/busy.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type BusyHost = ReactiveControllerHost & HTMLElement & {
|
|
|
10
10
|
* `busy` on a region (card, panel, pane): the content stays, but a veil and a spinner cover it and the user cannot use it
|
|
11
11
|
* while it reloads. Shared by `bk-card`, `bk-panel` and `bk-pane`.
|
|
12
12
|
*
|
|
13
|
-
* - `aria-busy
|
|
13
|
+
* - `aria-busy` (through the ElementInternals of the host) follows `busy` at once. The host gets no attribute.
|
|
14
14
|
* - The veil, the inert content and the announcement follow after `--bk-loading-delay` and stay
|
|
15
15
|
* `--bk-loading-min` (see `LoadingController`), so a fast reload does not flash.
|
|
16
16
|
* - Focus inside the region moves to the region itself when the content turns inert.
|
|
@@ -21,10 +21,11 @@ export type BusyHost = ReactiveControllerHost & HTMLElement & {
|
|
|
21
21
|
export declare class BusyController implements ReactiveController {
|
|
22
22
|
private host;
|
|
23
23
|
private i18n;
|
|
24
|
+
private internals;
|
|
24
25
|
private loader;
|
|
25
26
|
private wasVisible;
|
|
26
27
|
private ownTabindex;
|
|
27
|
-
constructor(host: BusyHost, i18n: LocalizeController);
|
|
28
|
+
constructor(host: BusyHost, i18n: LocalizeController, internals: ElementInternals);
|
|
28
29
|
/** The content is inert (and the veil shows). */
|
|
29
30
|
get inert(): boolean;
|
|
30
31
|
hostUpdate(): void;
|
package/dist/internal/busy.js
CHANGED
|
@@ -5,12 +5,14 @@ import "../components/bk-spinner.js";
|
|
|
5
5
|
class BusyController {
|
|
6
6
|
host;
|
|
7
7
|
i18n;
|
|
8
|
+
internals;
|
|
8
9
|
loader;
|
|
9
10
|
wasVisible = false;
|
|
10
11
|
ownTabindex = false;
|
|
11
|
-
constructor(host, i18n) {
|
|
12
|
+
constructor(host, i18n, internals) {
|
|
12
13
|
this.host = host;
|
|
13
14
|
this.i18n = i18n;
|
|
15
|
+
this.internals = internals;
|
|
14
16
|
this.loader = new LoadingController(host);
|
|
15
17
|
host.addController(this);
|
|
16
18
|
}
|
|
@@ -21,10 +23,7 @@ class BusyController {
|
|
|
21
23
|
hostUpdate() {
|
|
22
24
|
const { host } = this;
|
|
23
25
|
this.loader.set(host.busy);
|
|
24
|
-
|
|
25
|
-
host.setAttribute("aria-busy", "true");
|
|
26
|
-
else if (host.getAttribute("aria-busy") === "true")
|
|
27
|
-
host.removeAttribute("aria-busy");
|
|
26
|
+
this.internals.ariaBusy = host.busy ? "true" : null;
|
|
28
27
|
const visible = this.loader.visible;
|
|
29
28
|
if (visible && !this.wasVisible) {
|
|
30
29
|
if (host.matches(":focus-within")) {
|
|
@@ -37,7 +37,7 @@ function choiceFieldStyles(prefix) {
|
|
|
37
37
|
--_bk-popup-bg: var(${p}-popup-bg);
|
|
38
38
|
--_bk-popup-fg: initial;
|
|
39
39
|
--_bk-popup-border: var(${p}-popup-border);
|
|
40
|
-
--_bk-popup-radius: var(${p}-popup-radius);
|
|
40
|
+
--_bk-popup-radius: var(${p}-popup-radius, var(--_bk-popup-row-radius));
|
|
41
41
|
--_bk-popup-shadow: var(${p}-popup-shadow);
|
|
42
42
|
--_bk-popup-padding: var(${p}-popup-padding);
|
|
43
43
|
--_bk-popup-offset: var(${p}-popup-offset);
|
|
@@ -14,9 +14,10 @@ import "../icons/set/link.js";
|
|
|
14
14
|
export declare const choiceItemStyles: import("lit").CSSResult[];
|
|
15
15
|
/**
|
|
16
16
|
* Base of one option in a row of choices: `<bk-tabs-item>` (role tab, state `selected`) and
|
|
17
|
-
* `<bk-segmented-item>` (role radio, state `checked`). The
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* `<bk-segmented-item>` (role radio, state `checked`). The subclass declares the state property and returns
|
|
18
|
+
* it from `current`. The parent gives each item its state through a method of the item (`setTabState()`,
|
|
19
|
+
* `setGroupState()`). The item renders the role, the ARIA state, the name and the roving `tabindex` on its inner box
|
|
20
|
+
* (`renderBox`, `labelOnHost` false), so the parent writes no attributes on the element of the app.
|
|
20
21
|
*
|
|
21
22
|
* With `href` the item renders a real link; the current link gets `aria-current="page"`.
|
|
22
23
|
*/
|
|
@@ -33,6 +34,8 @@ export declare abstract class ChoiceItem extends LitElement {
|
|
|
33
34
|
reflect: boolean;
|
|
34
35
|
};
|
|
35
36
|
target: {};
|
|
37
|
+
rel: {};
|
|
38
|
+
download: {};
|
|
36
39
|
disabled: {
|
|
37
40
|
type: BooleanConstructor;
|
|
38
41
|
reflect: boolean;
|
|
@@ -48,8 +51,12 @@ export declare abstract class ChoiceItem extends LitElement {
|
|
|
48
51
|
label: string | undefined;
|
|
49
52
|
/** Renders a link instead of a choice (link mode, router-driven). */
|
|
50
53
|
href: string | undefined;
|
|
51
|
-
/** Link target in link mode (`_blank` adds `rel="noopener noreferrer"`). */
|
|
54
|
+
/** Link target in link mode (`_blank` adds `rel="noopener noreferrer"` when `rel` is not set). */
|
|
52
55
|
target: string | undefined;
|
|
56
|
+
/** Link `rel` in link mode. */
|
|
57
|
+
rel: string | undefined;
|
|
58
|
+
/** File name for a download in link mode. */
|
|
59
|
+
download: string | undefined;
|
|
53
60
|
/** Not selectable and skipped by the arrow keys. */
|
|
54
61
|
disabled: boolean;
|
|
55
62
|
/** True when the parent marked this option as the chosen one. */
|
|
@@ -58,13 +65,17 @@ export declare abstract class ChoiceItem extends LitElement {
|
|
|
58
65
|
/** The parent fires `navigate` on the item after its own choice (`navigateClick`). */
|
|
59
66
|
protected links: LinkController;
|
|
60
67
|
constructor();
|
|
68
|
+
/** True when the host has the role of the option and so takes the `aria-label`. A subclass that renders the role inside returns false. */
|
|
69
|
+
protected get labelOnHost(): boolean;
|
|
61
70
|
protected willUpdate(changed: PropertyValues): void;
|
|
62
|
-
/** Focuses the option
|
|
71
|
+
/** Focuses the option: its link in link mode, its inner box when the box has the role (`labelOnHost` false). */
|
|
63
72
|
focus(options?: FocusOptions): void;
|
|
64
73
|
/** Tooltip: the `label`. */
|
|
65
74
|
protected get tip(): string | undefined;
|
|
75
|
+
/** The box of an option that is not a link. A subclass that renders the role inside adds the ARIA attributes here. */
|
|
76
|
+
protected renderBox(cls: string, inner: unknown): unknown;
|
|
66
77
|
/** A subclass adds a mark between the label and the count here. */
|
|
67
78
|
protected renderMark(): unknown;
|
|
68
|
-
render():
|
|
79
|
+
render(): unknown;
|
|
69
80
|
}
|
|
70
81
|
//# sourceMappingURL=choice-item.d.ts.map
|
|
@@ -20,8 +20,9 @@ const choiceItemStyles = [base, countBadge, css`
|
|
|
20
20
|
:host(:not([disabled])) .item:hover { color: var(--_bk-ci-hover-fg); background: var(--_bk-ci-hover-bg); }
|
|
21
21
|
}
|
|
22
22
|
:host(:not([disabled])) .item:active { color: var(--_bk-ci-hover-fg); background: var(--_bk-ci-pressed-bg); }
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
/* The link or the inner box takes the focus: the ring only for keyboard focus, inside the item (the row clips). */
|
|
24
|
+
.item:focus { outline: none; }
|
|
25
|
+
:host(:focus-visible) .item, .item:focus-visible { outline: var(--bk-focus-ring); outline-offset: var(--bk-focus-offset-inset); }
|
|
25
26
|
:host([disabled]) .item { opacity: var(--bk-disabled-opacity); cursor: not-allowed; background: transparent; }
|
|
26
27
|
.icon-only { padding: 0; }
|
|
27
28
|
.icon-only .label { display: none; }
|
|
@@ -43,6 +44,8 @@ class ChoiceItem extends LitElement {
|
|
|
43
44
|
label: {},
|
|
44
45
|
href: { reflect: true },
|
|
45
46
|
target: {},
|
|
47
|
+
rel: {},
|
|
48
|
+
download: {},
|
|
46
49
|
disabled: { type: Boolean, reflect: true }
|
|
47
50
|
};
|
|
48
51
|
ownLabel = false;
|
|
@@ -53,11 +56,15 @@ class ChoiceItem extends LitElement {
|
|
|
53
56
|
this.value = "";
|
|
54
57
|
this.disabled = false;
|
|
55
58
|
}
|
|
59
|
+
/** True when the host has the role of the option and so takes the `aria-label`. A subclass that renders the role inside returns false. */
|
|
60
|
+
get labelOnHost() {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
56
63
|
willUpdate(changed) {
|
|
57
64
|
super.willUpdate(changed);
|
|
58
65
|
if (!changed.has("label") && !changed.has("href"))
|
|
59
66
|
return;
|
|
60
|
-
if (this.label && !this.href) {
|
|
67
|
+
if (this.label && !this.href && this.labelOnHost) {
|
|
61
68
|
this.setAttribute("aria-label", this.label);
|
|
62
69
|
this.ownLabel = true;
|
|
63
70
|
} else if (this.ownLabel) {
|
|
@@ -65,11 +72,11 @@ class ChoiceItem extends LitElement {
|
|
|
65
72
|
this.ownLabel = false;
|
|
66
73
|
}
|
|
67
74
|
}
|
|
68
|
-
/** Focuses the option
|
|
75
|
+
/** Focuses the option: its link in link mode, its inner box when the box has the role (`labelOnHost` false). */
|
|
69
76
|
focus(options) {
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
72
|
-
|
|
77
|
+
const inner = this.href ? this.renderRoot?.querySelector("a") : !this.labelOnHost ? this.renderRoot?.querySelector("span.item") : null;
|
|
78
|
+
if (inner)
|
|
79
|
+
inner.focus(options);
|
|
73
80
|
else
|
|
74
81
|
super.focus(options);
|
|
75
82
|
}
|
|
@@ -77,6 +84,10 @@ class ChoiceItem extends LitElement {
|
|
|
77
84
|
get tip() {
|
|
78
85
|
return this.label;
|
|
79
86
|
}
|
|
87
|
+
/** The box of an option that is not a link. A subclass that renders the role inside adds the ARIA attributes here. */
|
|
88
|
+
renderBox(cls, inner) {
|
|
89
|
+
return html`<span class=${cls} part="base" title=${ifDefined(this.tip)}>${inner}</span>`;
|
|
90
|
+
}
|
|
80
91
|
/** A subclass adds a mark between the label and the count here. */
|
|
81
92
|
renderMark() {
|
|
82
93
|
return nothing;
|
|
@@ -90,12 +101,12 @@ class ChoiceItem extends LitElement {
|
|
|
90
101
|
<slot name="end">${this.renderMark()}${hasCount ? html`<span class="count${current ? " selected" : ""}" part="count">${this.count}</span>` : nothing}</slot>`;
|
|
91
102
|
if (this.href) {
|
|
92
103
|
return html`<a class=${cls} part="base" href=${ifDefined(this.disabled ? void 0 : this.links.href(this.href))} target=${ifDefined(this.target)}
|
|
93
|
-
rel=${ifDefined(this.target === "_blank" ? "noopener noreferrer" : void 0)}
|
|
104
|
+
rel=${ifDefined(this.rel ?? (this.target === "_blank" ? "noopener noreferrer" : void 0))} download=${ifDefined(this.download)}
|
|
94
105
|
role=${ifDefined(this.disabled ? "link" : void 0)} aria-disabled=${ifDefined(this.disabled ? "true" : void 0)}
|
|
95
106
|
aria-current=${ifDefined(current ? "page" : void 0)}
|
|
96
107
|
aria-label=${ifDefined(this.label)} title=${ifDefined(this.tip)}>${inner}</a>`;
|
|
97
108
|
}
|
|
98
|
-
return
|
|
109
|
+
return this.renderBox(cls, inner);
|
|
99
110
|
}
|
|
100
111
|
}
|
|
101
112
|
export {
|
package/dist/internal/cloak.d.ts
CHANGED
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
* for all elements in it. An app that renders its own markup on a server (React, any framework
|
|
12
12
|
* without Declarative Shadow DOM) sets it, so the page shows that markup at once.
|
|
13
13
|
*
|
|
14
|
+
* Before its module runs, a `bk-table` is a block that is never wider than its container: the table of the server
|
|
15
|
+
* scrolls in it and does not widen the page.
|
|
16
|
+
*
|
|
14
17
|
* The token stays undeclared: the rule reads it with a fallback, so a value on any ancestor applies.
|
|
15
18
|
* `scripts/tokens-css.mjs` writes the rule into `dist/tokens.css`; `cloak` in `base.ts` brings it into
|
|
16
19
|
* the shadow root of an app's own component.
|
package/dist/internal/cloak.js
CHANGED
|
@@ -69,6 +69,9 @@ const cloakTags = [
|
|
|
69
69
|
"bk-fieldset",
|
|
70
70
|
"bk-filter-bar",
|
|
71
71
|
"bk-folder-browser",
|
|
72
|
+
"bk-footnote",
|
|
73
|
+
"bk-footnotes",
|
|
74
|
+
"bk-footnotes-item",
|
|
72
75
|
"bk-form-guard",
|
|
73
76
|
"bk-form-steps",
|
|
74
77
|
"bk-grid",
|
|
@@ -142,6 +145,7 @@ const cloakTags = [
|
|
|
142
145
|
"bk-page-section",
|
|
143
146
|
"bk-pagination",
|
|
144
147
|
"bk-pane",
|
|
148
|
+
"bk-period-nav",
|
|
145
149
|
"bk-panel",
|
|
146
150
|
"bk-picture",
|
|
147
151
|
"bk-popover",
|
|
@@ -207,6 +211,9 @@ const cloakCss = `@layer bk.tokens {
|
|
|
207
211
|
animation: bk-cloak-timeout 0s var(--bk-cloak-timeout, 3s) forwards;
|
|
208
212
|
}
|
|
209
213
|
@keyframes bk-cloak-timeout { to { visibility: visible; } }
|
|
214
|
+
/* A table of the server is never wider than its container before its module runs: also a hidden table takes
|
|
215
|
+
space, and a wide one makes the whole page scroll sideways on a phone. It scrolls in its own box. */
|
|
216
|
+
bk-table:not(:defined) { display: block; max-inline-size: 100%; overflow-x: auto; }
|
|
210
217
|
}`;
|
|
211
218
|
export {
|
|
212
219
|
cloakCss,
|
|
@@ -92,7 +92,7 @@ export declare class CropFrame implements ReactiveController {
|
|
|
92
92
|
pointerMove(e: PointerEvent, stage: HTMLElement): void;
|
|
93
93
|
/** The frame after a drag of a grip: the opposite side stays; with a ratio the frame keeps its shape. */
|
|
94
94
|
private resize;
|
|
95
|
-
/** The end of a press
|
|
95
|
+
/** The end of a press. A click without a drag changes nothing: the frame moves only on a drag. */
|
|
96
96
|
pointerUp(e: PointerEvent): void;
|
|
97
97
|
/**
|
|
98
98
|
* The keys: the arrows move the frame, Shift and the arrows change its width or height, Plus and Minus zoom the
|
|
@@ -210,18 +210,13 @@ class CropFrame {
|
|
|
210
210
|
const y = d.hy > 0 ? ay : d.hy < 0 ? ay - h : s.y + s.h / 2 - h / 2;
|
|
211
211
|
return this.clamp({ x, y, w, h });
|
|
212
212
|
}
|
|
213
|
-
/** The end of a press
|
|
213
|
+
/** The end of a press. A click without a drag changes nothing: the frame moves only on a drag. */
|
|
214
214
|
pointerUp(e) {
|
|
215
215
|
const d = this.drag;
|
|
216
216
|
if (!d || e.pointerId !== d.id)
|
|
217
217
|
return;
|
|
218
218
|
this.drag = void 0;
|
|
219
|
-
if (
|
|
220
|
-
const s = d.start;
|
|
221
|
-
this.sel = this.clamp({ ...s, x: d.px - s.w / 2, y: d.py - s.h / 2 });
|
|
222
|
-
this.keepInView();
|
|
223
|
-
this.options.changed("change");
|
|
224
|
-
} else if (d.moved) {
|
|
219
|
+
if (d.moved) {
|
|
225
220
|
this.keepInView();
|
|
226
221
|
this.options.changed("change");
|
|
227
222
|
}
|
|
@@ -10,6 +10,7 @@ import { popupMotion, popupSurface } from "./styles.js";
|
|
|
10
10
|
import { TextField } from "./text-field.js";
|
|
11
11
|
import "../components/bk-calendar.js";
|
|
12
12
|
import "../components/bk-icon.js";
|
|
13
|
+
import { submitImplicitly } from "./submit.js";
|
|
13
14
|
import "../icons/set/calendar.js";
|
|
14
15
|
const DIGIT_ZEROS = [1632, 1776, 1984, 2406, 2534, 2662, 2790, 2918, 3046, 3174, 3302, 3430, 3664, 3792, 3872, 4160, 6112, 6160, 65296];
|
|
15
16
|
function asciiDigits(text) {
|
|
@@ -453,7 +454,7 @@ class DateField extends TextField {
|
|
|
453
454
|
return;
|
|
454
455
|
const form = this.internals.form;
|
|
455
456
|
if (form)
|
|
456
|
-
setTimeout(() => form
|
|
457
|
+
setTimeout(() => submitImplicitly(form));
|
|
457
458
|
}
|
|
458
459
|
/* ---------- popup ---------- */
|
|
459
460
|
onTriggerPointerdown() {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Distance (px) that a mouse or pen moves before a press becomes a drag. A shorter movement stays a click. */
|
|
2
|
+
export declare const DRAG_THRESHOLD = 4;
|
|
3
|
+
/** Fields where a press selects text instead of starting a drag. */
|
|
4
|
+
export declare const EDITABLE = "input, textarea, select, [contenteditable]:not([contenteditable='false'])";
|
|
5
|
+
/** Controls that keep their own press and click inside a drag handle (a button in the header of a pane). */
|
|
6
|
+
export declare const INTERACTIVE = "a[href], button, summary, label, input, textarea, select, [contenteditable]:not([contenteditable='false']), [role=button], [role=link], [role=menuitem], [role=checkbox], [role=switch], [role=tab], [role=slider], [role=textbox]";
|
|
7
|
+
/** Calls `preventDefault()`. A listener for events that a drag stops (text selection, touch scrolling). */
|
|
8
|
+
export declare function preventEvent(e: Event): void;
|
|
9
|
+
/** Stops the click that follows the release of a drag: the release must not click the element under the pointer. */
|
|
10
|
+
export declare function suppressClick(): void;
|
|
11
|
+
//# sourceMappingURL=drag.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const DRAG_THRESHOLD = 4;
|
|
2
|
+
const EDITABLE = "input, textarea, select, [contenteditable]:not([contenteditable='false'])";
|
|
3
|
+
const INTERACTIVE = `a[href], button, summary, label, ${EDITABLE}, [role=button], [role=link], [role=menuitem], [role=checkbox], [role=switch], [role=tab], [role=slider], [role=textbox]`;
|
|
4
|
+
function preventEvent(e) {
|
|
5
|
+
e.preventDefault();
|
|
6
|
+
}
|
|
7
|
+
function stopClick(e) {
|
|
8
|
+
e.preventDefault();
|
|
9
|
+
e.stopPropagation();
|
|
10
|
+
window.removeEventListener("click", stopClick, true);
|
|
11
|
+
}
|
|
12
|
+
function suppressClick() {
|
|
13
|
+
window.addEventListener("click", stopClick, true);
|
|
14
|
+
setTimeout(() => window.removeEventListener("click", stopClick, true), 0);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
DRAG_THRESHOLD,
|
|
18
|
+
EDITABLE,
|
|
19
|
+
INTERACTIVE,
|
|
20
|
+
preventEvent,
|
|
21
|
+
suppressClick
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=drag.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { en } from "../i18n.js";
|
|
2
|
+
/**
|
|
3
|
+
* The catalog that i18n.ts uses as the built-in English texts. The condition `bk-static` replaces this module with
|
|
4
|
+
* english-static.ts: then an app loads English like any other language (`import "@bk2k/ui/i18n/en.js"`).
|
|
5
|
+
* A function, not a value: i18n.ts calls it after `en` exists (the two modules import each other).
|
|
6
|
+
*/
|
|
7
|
+
export declare const builtInEnglish: () => typeof en | undefined;
|
|
8
|
+
//# sourceMappingURL=english.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** The place of a marker: the number of its note, and its position among the markers of the note. */
|
|
2
|
+
export interface FootnoteRef {
|
|
3
|
+
/** The number of the note. */
|
|
4
|
+
number: number;
|
|
5
|
+
/** The position of the marker among the markers of the note, from 0. */
|
|
6
|
+
index: number;
|
|
7
|
+
/** The number of markers of the note. */
|
|
8
|
+
count: number;
|
|
9
|
+
/** The note. */
|
|
10
|
+
note: FootnoteNote;
|
|
11
|
+
}
|
|
12
|
+
/** A marker (`bk-footnote`). */
|
|
13
|
+
export interface FootnoteMarker extends HTMLElement {
|
|
14
|
+
/** The id of the note. */
|
|
15
|
+
readonly note: string;
|
|
16
|
+
/** Gives the marker its place, or `undefined` when the page has no note with its id. */
|
|
17
|
+
setFootnoteRef(ref: FootnoteRef | undefined): void;
|
|
18
|
+
/** Moves the focus to the marker and shows it. */
|
|
19
|
+
reveal(): void;
|
|
20
|
+
}
|
|
21
|
+
/** A note (`bk-footnotes-item`). */
|
|
22
|
+
export interface FootnoteNote extends HTMLElement {
|
|
23
|
+
/** Gives the note its number and its markers. */
|
|
24
|
+
setFootnoteState(number: number | undefined, markers: FootnoteMarker[]): void;
|
|
25
|
+
/** Moves the focus to the note and shows it. */
|
|
26
|
+
reveal(): void;
|
|
27
|
+
}
|
|
28
|
+
/** Registers a connected marker. */
|
|
29
|
+
export declare function addFootnoteMarker(marker: FootnoteMarker): void;
|
|
30
|
+
/** Removes a disconnected marker. */
|
|
31
|
+
export declare function removeFootnoteMarker(marker: FootnoteMarker): void;
|
|
32
|
+
/** Registers a connected note. */
|
|
33
|
+
export declare function addFootnoteNote(note: FootnoteNote): void;
|
|
34
|
+
/** Removes a disconnected note. */
|
|
35
|
+
export declare function removeFootnoteNote(note: FootnoteNote): void;
|
|
36
|
+
/** Numbers the markers and the notes again in a microtask (once for all changes of a task). */
|
|
37
|
+
export declare function scheduleFootnotes(): void;
|
|
38
|
+
/** Resolves when the numbers are current. */
|
|
39
|
+
export declare function footnotesSettled(): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Marks the element that a footnote link jumped to (`:state(target)`, as `:target` for a fragment). Only one element
|
|
42
|
+
* of the page is the target: the mark of the earlier target goes away.
|
|
43
|
+
*/
|
|
44
|
+
export declare function markFootnoteTarget(el: HTMLElement, internals: ElementInternals): void;
|
|
45
|
+
/** Removes the mark of a target that leaves the page. */
|
|
46
|
+
export declare function clearFootnoteTarget(el: HTMLElement): void;
|
|
47
|
+
/**
|
|
48
|
+
* Shows the target of a footnote link: it moves the focus to `focusable` and scrolls `el` into view. The scroll is
|
|
49
|
+
* smooth, except with reduced motion. `scroll-margin` of `el` keeps it clear of a sticky header.
|
|
50
|
+
*/
|
|
51
|
+
export declare function revealFootnoteTarget(el: HTMLElement, internals: ElementInternals, focusable: HTMLElement | null | undefined): void;
|
|
52
|
+
/** The letter of the n-th marker of a note (from 0): a, b, …, z, aa, ab, … */
|
|
53
|
+
export declare function footnoteLetter(index: number): string;
|
|
54
|
+
/** A plain click: the primary button and no modifier key. Other clicks keep the default of the browser. */
|
|
55
|
+
export declare function isPlainClick(e: MouseEvent): boolean;
|
|
56
|
+
//# sourceMappingURL=footnotes.d.ts.map
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { isServer } from "lit";
|
|
2
|
+
const markers = /* @__PURE__ */ new Set();
|
|
3
|
+
const notes = /* @__PURE__ */ new Set();
|
|
4
|
+
let pending;
|
|
5
|
+
function addFootnoteMarker(marker) {
|
|
6
|
+
markers.add(marker);
|
|
7
|
+
scheduleFootnotes();
|
|
8
|
+
}
|
|
9
|
+
function removeFootnoteMarker(marker) {
|
|
10
|
+
markers.delete(marker);
|
|
11
|
+
scheduleFootnotes();
|
|
12
|
+
}
|
|
13
|
+
function addFootnoteNote(note) {
|
|
14
|
+
notes.add(note);
|
|
15
|
+
scheduleFootnotes();
|
|
16
|
+
}
|
|
17
|
+
function removeFootnoteNote(note) {
|
|
18
|
+
notes.delete(note);
|
|
19
|
+
scheduleFootnotes();
|
|
20
|
+
}
|
|
21
|
+
function scheduleFootnotes() {
|
|
22
|
+
if (isServer || pending)
|
|
23
|
+
return;
|
|
24
|
+
pending = Promise.resolve().then(() => {
|
|
25
|
+
pending = void 0;
|
|
26
|
+
numberFootnotes();
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function footnotesSettled() {
|
|
30
|
+
return pending ?? Promise.resolve();
|
|
31
|
+
}
|
|
32
|
+
function flatParent(node) {
|
|
33
|
+
if (node instanceof Element && node.assignedSlot)
|
|
34
|
+
return node.assignedSlot;
|
|
35
|
+
if (node instanceof ShadowRoot)
|
|
36
|
+
return node.host;
|
|
37
|
+
return node.parentNode;
|
|
38
|
+
}
|
|
39
|
+
function flatPath(node) {
|
|
40
|
+
const path = [];
|
|
41
|
+
for (let n = node; n; n = flatParent(n))
|
|
42
|
+
path.push(n);
|
|
43
|
+
return path.reverse();
|
|
44
|
+
}
|
|
45
|
+
function compareFlat(a, b) {
|
|
46
|
+
let i = 0;
|
|
47
|
+
while (i < a.length && i < b.length && a[i] === b[i])
|
|
48
|
+
i++;
|
|
49
|
+
if (i === a.length)
|
|
50
|
+
return -1;
|
|
51
|
+
if (i === b.length)
|
|
52
|
+
return 1;
|
|
53
|
+
const x = a[i], y = b[i];
|
|
54
|
+
if (x instanceof ShadowRoot)
|
|
55
|
+
return -1;
|
|
56
|
+
if (y instanceof ShadowRoot)
|
|
57
|
+
return 1;
|
|
58
|
+
return x.compareDocumentPosition(y) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
59
|
+
}
|
|
60
|
+
function inFlatOrder(nodes) {
|
|
61
|
+
const paths = /* @__PURE__ */ new Map();
|
|
62
|
+
for (const n of nodes)
|
|
63
|
+
paths.set(n, flatPath(n));
|
|
64
|
+
return [...paths.keys()].sort((a, b) => compareFlat(paths.get(a), paths.get(b)));
|
|
65
|
+
}
|
|
66
|
+
function numberFootnotes() {
|
|
67
|
+
const ordered = inFlatOrder(notes);
|
|
68
|
+
const byId = /* @__PURE__ */ new Map();
|
|
69
|
+
for (const note of ordered)
|
|
70
|
+
if (note.id && !byId.has(note.id))
|
|
71
|
+
byId.set(note.id, note);
|
|
72
|
+
const listOf = (note) => note.closest("bk-footnotes");
|
|
73
|
+
const counters = /* @__PURE__ */ new Map();
|
|
74
|
+
const numbers = /* @__PURE__ */ new Map();
|
|
75
|
+
const refs = /* @__PURE__ */ new Map();
|
|
76
|
+
const next = (note) => {
|
|
77
|
+
const list = listOf(note);
|
|
78
|
+
const n = (counters.get(list) ?? 0) + 1;
|
|
79
|
+
counters.set(list, n);
|
|
80
|
+
numbers.set(note, n);
|
|
81
|
+
refs.set(note, []);
|
|
82
|
+
};
|
|
83
|
+
const placed = [];
|
|
84
|
+
for (const marker of inFlatOrder(markers)) {
|
|
85
|
+
const note = marker.note ? byId.get(marker.note) : void 0;
|
|
86
|
+
if (note && !numbers.has(note))
|
|
87
|
+
next(note);
|
|
88
|
+
if (note)
|
|
89
|
+
refs.get(note).push(marker);
|
|
90
|
+
placed.push([marker, note]);
|
|
91
|
+
}
|
|
92
|
+
for (const note of ordered)
|
|
93
|
+
if (byId.get(note.id) === note && !numbers.has(note))
|
|
94
|
+
next(note);
|
|
95
|
+
for (const [marker, note] of placed) {
|
|
96
|
+
const all = note && refs.get(note);
|
|
97
|
+
marker.setFootnoteRef(note && all ? { number: numbers.get(note), index: all.indexOf(marker), count: all.length, note } : void 0);
|
|
98
|
+
}
|
|
99
|
+
for (const note of notes)
|
|
100
|
+
note.setFootnoteState(numbers.get(note), refs.get(note) ?? []);
|
|
101
|
+
}
|
|
102
|
+
let target;
|
|
103
|
+
function markFootnoteTarget(el, internals) {
|
|
104
|
+
if (target && target.el !== el)
|
|
105
|
+
target.internals.states.delete("target");
|
|
106
|
+
target = { el, internals };
|
|
107
|
+
internals.states.add("target");
|
|
108
|
+
}
|
|
109
|
+
function clearFootnoteTarget(el) {
|
|
110
|
+
if (target?.el !== el)
|
|
111
|
+
return;
|
|
112
|
+
target.internals.states.delete("target");
|
|
113
|
+
target = void 0;
|
|
114
|
+
}
|
|
115
|
+
function revealFootnoteTarget(el, internals, focusable) {
|
|
116
|
+
markFootnoteTarget(el, internals);
|
|
117
|
+
focusable?.focus({ preventScroll: true });
|
|
118
|
+
const calm = matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
119
|
+
el.scrollIntoView({ block: "nearest", behavior: calm ? "instant" : "smooth" });
|
|
120
|
+
}
|
|
121
|
+
function footnoteLetter(index) {
|
|
122
|
+
let s = "";
|
|
123
|
+
for (let n = index + 1; n > 0; n = Math.floor((n - 1) / 26))
|
|
124
|
+
s = String.fromCharCode(97 + (n - 1) % 26) + s;
|
|
125
|
+
return s;
|
|
126
|
+
}
|
|
127
|
+
function isPlainClick(e) {
|
|
128
|
+
return e.button === 0 && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey;
|
|
129
|
+
}
|
|
130
|
+
export {
|
|
131
|
+
addFootnoteMarker,
|
|
132
|
+
addFootnoteNote,
|
|
133
|
+
clearFootnoteTarget,
|
|
134
|
+
footnoteLetter,
|
|
135
|
+
footnotesSettled,
|
|
136
|
+
isPlainClick,
|
|
137
|
+
markFootnoteTarget,
|
|
138
|
+
removeFootnoteMarker,
|
|
139
|
+
removeFootnoteNote,
|
|
140
|
+
revealFootnoteTarget,
|
|
141
|
+
scheduleFootnotes
|
|
142
|
+
};
|
|
143
|
+
//# sourceMappingURL=footnotes.js.map
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { type LitElement } from "lit";
|
|
2
|
-
import "../components/bk-menu-context.js";
|
|
3
|
-
import "../components/bk-menu-item.js";
|
|
4
|
-
import "../components/bk-menu-divider.js";
|
|
5
2
|
/** One entry of a handle menu: a move or a size step that also exists for the keyboard. */
|
|
6
3
|
export interface HandleAction {
|
|
7
4
|
key: string;
|
|
@@ -12,6 +9,8 @@ export interface HandleAction {
|
|
|
12
9
|
divider?: boolean;
|
|
13
10
|
run: () => void;
|
|
14
11
|
}
|
|
12
|
+
/** Loads the elements of the menu. Returns the promise while the load runs, undefined after it. */
|
|
13
|
+
export declare function loadHandleMenu(): Promise<void> | undefined;
|
|
15
14
|
/**
|
|
16
15
|
* The menu behind a handle or a divider: the single-pointer way to do what a drag does (WCAG 2.2
|
|
17
16
|
* SC 2.5.7). The host renders it in its own shadow root and opens it with `openHandleMenu()`.
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import { css, html, nothing } from "lit";
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
|
|
2
|
+
import { LateLoad } from "./late.js";
|
|
3
|
+
import { lateParts } from "#bk/internal/late/handle-menu.js";
|
|
4
|
+
const menuParts = new LateLoad(lateParts, "bk-menu-context", "bk-menu-item", "bk-menu-divider");
|
|
5
|
+
function loadHandleMenu() {
|
|
6
|
+
return menuParts.start();
|
|
7
|
+
}
|
|
5
8
|
function handleMenu(name, actions) {
|
|
6
9
|
const choose = (e) => {
|
|
7
10
|
e.stopPropagation();
|
|
8
11
|
actions.find((a) => a.key === e.detail.value)?.run();
|
|
9
12
|
};
|
|
13
|
+
void loadHandleMenu();
|
|
10
14
|
return html`<bk-menu-context class="handle-menu" label=${name} @select=${choose}>${actions.map((a) => html`${a.divider ? html`<bk-menu-divider></bk-menu-divider>` : nothing}<bk-menu-item value=${a.key} ?disabled=${a.disabled}>${a.label}</bk-menu-item>`)}</bk-menu-context>`;
|
|
11
15
|
}
|
|
12
16
|
const handleMenuStyles = css`
|
|
13
17
|
.handle-menu { position: absolute; inset: 0 auto auto 0; inline-size: 0; block-size: 0; overflow: visible; }
|
|
18
|
+
/* The menu loads late: until then its items stay out of view. */
|
|
19
|
+
.handle-menu:not(:defined) { display: none; }
|
|
14
20
|
`;
|
|
15
21
|
async function openHandleMenu(host, anchor, point) {
|
|
22
|
+
await loadHandleMenu();
|
|
16
23
|
await host.updateComplete;
|
|
17
24
|
const menu = host.renderRoot.querySelector(".handle-menu");
|
|
18
25
|
if (!menu)
|
|
@@ -24,6 +31,7 @@ async function openHandleMenu(host, anchor, point) {
|
|
|
24
31
|
export {
|
|
25
32
|
handleMenu,
|
|
26
33
|
handleMenuStyles,
|
|
34
|
+
loadHandleMenu,
|
|
27
35
|
openHandleMenu
|
|
28
36
|
};
|
|
29
37
|
//# sourceMappingURL=handle-menu.js.map
|