@bk2k/ui 0.6.8 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BUILDING.md +56 -2
- package/CHANGELOG.md +199 -0
- package/USAGE.md +102 -28
- package/custom-elements.json +1 -1
- package/dist/charts/chart-tokens.js +1 -1
- package/dist/charts/fields.d.ts +20 -0
- package/dist/charts/fields.js +27 -0
- package/dist/charts/frame.d.ts +2 -0
- package/dist/charts/frame.js +2 -1
- package/dist/clipboard.js +1 -0
- package/dist/components/bk-alert.js +3 -2
- package/dist/components/bk-avatar-group.js +4 -6
- package/dist/components/bk-avatar.d.ts +10 -0
- package/dist/components/bk-avatar.js +17 -0
- package/dist/components/bk-bar.js +2 -0
- package/dist/components/bk-button-group.js +1 -1
- package/dist/components/bk-button-top.js +2 -1
- package/dist/components/bk-button.d.ts +42 -14
- package/dist/components/bk-button.js +67 -20
- package/dist/components/bk-card.d.ts +7 -0
- package/dist/components/bk-card.js +21 -2
- package/dist/components/bk-carousel-controls.d.ts +2 -0
- package/dist/components/bk-carousel-controls.js +4 -2
- package/dist/components/bk-chart-area.d.ts +10 -0
- package/dist/components/bk-chart-bar.d.ts +17 -0
- package/dist/components/bk-chart-bar.js +25 -4
- package/dist/components/bk-chart-line.d.ts +28 -0
- package/dist/components/bk-chart-line.js +27 -7
- package/dist/components/bk-chip-group.d.ts +2 -2
- package/dist/components/bk-chip-group.js +4 -0
- package/dist/components/bk-chip.d.ts +55 -8
- package/dist/components/bk-chip.js +46 -8
- package/dist/components/bk-code.js +6 -2
- package/dist/components/bk-columns.d.ts +11 -0
- package/dist/components/bk-columns.js +8 -1
- package/dist/components/bk-combobox.d.ts +3 -3
- package/dist/components/bk-combobox.js +9 -21
- package/dist/components/bk-delta.d.ts +10 -0
- package/dist/components/bk-delta.js +8 -6
- package/dist/components/bk-dialog.d.ts +12 -5
- package/dist/components/bk-dialog.js +14 -6
- package/dist/components/bk-disclosure.js +4 -2
- package/dist/components/bk-drop-target.d.ts +7 -1
- package/dist/components/bk-drop-target.js +20 -4
- package/dist/components/bk-error-summary.d.ts +5 -0
- package/dist/components/bk-error-summary.js +13 -4
- package/dist/components/bk-facts.js +3 -2
- package/dist/components/bk-footnote.d.ts +73 -0
- package/dist/components/bk-footnote.js +97 -0
- package/dist/components/bk-footnotes-item.d.ts +92 -0
- package/dist/components/bk-footnotes-item.js +139 -0
- package/dist/components/bk-footnotes.d.ts +51 -0
- package/dist/components/bk-footnotes.js +43 -0
- package/dist/components/bk-icon.js +2 -2
- package/dist/components/bk-image-compare.d.ts +69 -6
- package/dist/components/bk-image-compare.js +116 -32
- package/dist/components/bk-image-crop.d.ts +3 -3
- package/dist/components/bk-image-editor.d.ts +1 -1
- package/dist/components/bk-image-viewer.d.ts +178 -11
- package/dist/components/bk-image-viewer.js +310 -52
- package/dist/components/bk-input-color.d.ts +2 -5
- package/dist/components/bk-input-color.js +0 -14
- package/dist/components/bk-input-file.d.ts +17 -0
- package/dist/components/bk-input-file.js +18 -8
- package/dist/components/bk-input-inline.d.ts +15 -6
- package/dist/components/bk-input-inline.js +22 -6
- package/dist/components/bk-input-number.js +2 -1
- package/dist/components/bk-input-search.d.ts +1 -1
- package/dist/components/bk-input-search.js +2 -1
- package/dist/components/bk-input-tags.d.ts +219 -0
- package/dist/components/bk-input-tags.js +293 -0
- package/dist/components/bk-input-text.d.ts +20 -0
- package/dist/components/bk-input-text.js +34 -4
- package/dist/components/bk-input-time.js +2 -1
- package/dist/components/bk-item.js +2 -1
- package/dist/components/bk-lightbox.d.ts +37 -4
- package/dist/components/bk-lightbox.js +13 -3
- package/dist/components/bk-link.d.ts +9 -1
- package/dist/components/bk-link.js +14 -4
- package/dist/components/bk-menu-item.d.ts +40 -0
- package/dist/components/bk-menu-item.js +57 -9
- package/dist/components/bk-menu-label.js +2 -1
- package/dist/components/bk-menu-list.d.ts +1 -0
- package/dist/components/bk-menu-list.js +10 -0
- package/dist/components/bk-menu.d.ts +8 -1
- package/dist/components/bk-menu.js +16 -5
- package/dist/components/bk-message-feedback.d.ts +4 -3
- package/dist/components/bk-message-feedback.js +7 -5
- package/dist/components/bk-message-list.js +2 -1
- package/dist/components/bk-message-source.d.ts +1 -2
- package/dist/components/bk-message-source.js +3 -11
- package/dist/components/bk-message.js +2 -0
- package/dist/components/bk-nav-group.js +1 -1
- package/dist/components/bk-nav-item.d.ts +18 -0
- package/dist/components/bk-nav-item.js +18 -5
- package/dist/components/bk-nav.d.ts +1 -1
- package/dist/components/bk-page-cta.d.ts +2 -0
- package/dist/components/bk-page-cta.js +10 -1
- package/dist/components/bk-page-section.d.ts +1 -1
- package/dist/components/bk-page-section.js +3 -9
- package/dist/components/bk-pane.d.ts +1 -0
- package/dist/components/bk-pane.js +7 -5
- package/dist/components/bk-panel.d.ts +1 -1
- package/dist/components/bk-panel.js +6 -5
- package/dist/components/bk-picture.d.ts +17 -4
- package/dist/components/bk-picture.js +8 -1
- package/dist/components/bk-segmented-item.d.ts +24 -4
- package/dist/components/bk-segmented-item.js +37 -5
- package/dist/components/bk-segmented.js +2 -13
- package/dist/components/bk-select-cascade.d.ts +1 -1
- package/dist/components/bk-select-tree.d.ts +1 -1
- package/dist/components/bk-select.d.ts +1 -1
- package/dist/components/bk-shell-app.d.ts +10 -4
- package/dist/components/bk-shell-app.js +32 -9
- package/dist/components/bk-shell-sites.d.ts +2 -1
- package/dist/components/bk-shell-sites.js +3 -5
- package/dist/components/bk-sortable.js +7 -17
- package/dist/components/bk-split-grid.d.ts +104 -3
- package/dist/components/bk-split-grid.js +430 -2
- package/dist/components/bk-stat-group.js +2 -1
- package/dist/components/bk-stat.d.ts +19 -0
- package/dist/components/bk-stat.js +8 -4
- package/dist/components/bk-steps.js +2 -1
- package/dist/components/bk-surface.d.ts +2 -0
- package/dist/components/bk-surface.js +6 -3
- package/dist/components/bk-table.d.ts +3 -1
- package/dist/components/bk-table.js +10 -13
- package/dist/components/bk-tabs-item.d.ts +45 -7
- package/dist/components/bk-tabs-item.js +51 -20
- package/dist/components/bk-tabs-panel.d.ts +6 -3
- package/dist/components/bk-tabs-panel.js +6 -0
- package/dist/components/bk-tabs.d.ts +52 -8
- package/dist/components/bk-tabs.js +181 -97
- package/dist/components/bk-text.js +2 -1
- package/dist/components/bk-toast-group.d.ts +3 -1
- package/dist/components/bk-toast-group.js +11 -1
- package/dist/components/bk-tooltip.d.ts +3 -1
- package/dist/components/bk-tooltip.js +2 -1
- package/dist/components/bk-video.js +2 -2
- package/dist/components/bk-zoom.d.ts +3 -1
- package/dist/components/confirm.d.ts +15 -0
- package/dist/components/confirm.js +27 -4
- package/dist/i18n/de.js +12 -1
- package/dist/i18n/en.d.ts +2 -0
- package/dist/i18n/en.js +3 -0
- package/dist/i18n.d.ts +16 -2
- package/dist/i18n.js +28 -4
- package/dist/icons/brands-static.d.ts +3 -0
- package/dist/icons/brands-static.js +5 -0
- package/dist/icons/core.d.ts +1 -0
- package/dist/icons/core.js +2 -0
- package/dist/icons/load-static.d.ts +3 -0
- package/dist/icons/load-static.js +5 -0
- package/dist/icons/load.js +1 -0
- package/dist/icons/registry.js +1 -1
- package/dist/icons/set/save-as.d.ts +3 -0
- package/dist/icons/set/save-as.js +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/internal/announcer.d.ts +14 -1
- package/dist/internal/announcer.js +33 -12
- package/dist/internal/backdrop.d.ts +19 -0
- package/dist/internal/backdrop.js +29 -0
- package/dist/internal/busy.d.ts +3 -2
- package/dist/internal/busy.js +4 -5
- package/dist/internal/choice-field.js +1 -1
- package/dist/internal/choice-item.d.ts +17 -6
- package/dist/internal/choice-item.js +20 -9
- package/dist/internal/cloak.js +4 -0
- package/dist/internal/crop-frame.d.ts +1 -1
- package/dist/internal/crop-frame.js +2 -7
- package/dist/internal/date-field.js +2 -1
- package/dist/internal/define.d.ts +9 -0
- package/dist/internal/define.js +47 -1
- package/dist/internal/drag.d.ts +11 -0
- package/dist/internal/drag.js +23 -0
- package/dist/internal/elements.d.ts +6 -0
- package/dist/internal/elements.js +5 -0
- package/dist/internal/english-static.d.ts +3 -0
- package/dist/internal/english-static.js +5 -0
- package/dist/internal/english.d.ts +8 -0
- package/dist/internal/english.js +6 -0
- package/dist/internal/footnotes.d.ts +56 -0
- package/dist/internal/footnotes.js +143 -0
- package/dist/internal/handle-menu.js +2 -5
- package/dist/internal/hue.d.ts +8 -0
- package/dist/internal/hue.js +15 -4
- package/dist/internal/late/bk-shell-app.d.ts +4 -0
- package/dist/internal/late/bk-shell-app.js +7 -0
- package/dist/internal/late/bk-table.d.ts +4 -0
- package/dist/internal/late/bk-table.js +17 -0
- package/dist/internal/late/bk-tabs.d.ts +4 -0
- package/dist/internal/late/bk-tabs.js +8 -0
- package/dist/internal/late/handle-menu.d.ts +4 -0
- package/dist/internal/late/handle-menu.js +9 -0
- package/dist/internal/late/static.d.ts +7 -0
- package/dist/internal/late/static.js +5 -0
- package/dist/internal/late.d.ts +8 -3
- package/dist/internal/late.js +19 -4
- package/dist/internal/link.d.ts +2 -0
- package/dist/internal/link.js +11 -1
- package/dist/internal/own-text.d.ts +8 -0
- package/dist/internal/own-text.js +7 -0
- package/dist/internal/scope.js +1 -1
- package/dist/internal/scroll-lock.d.ts +4 -1
- package/dist/internal/scroll-lock.js +17 -4
- package/dist/internal/slider.js +2 -1
- package/dist/internal/styles.js +3 -0
- package/dist/internal/submit.d.ts +23 -0
- package/dist/internal/submit.js +57 -0
- package/dist/internal/tags.d.ts +15 -0
- package/dist/internal/tags.js +44 -0
- package/dist/internal/text-field.d.ts +2 -0
- package/dist/internal/text-field.js +8 -0
- package/dist/internal/toggle-control.js +3 -1
- package/dist/jsx.d.ts +222 -54
- package/dist/kit.d.ts +1 -0
- package/dist/kit.js +3 -0
- package/dist/reset.css +10 -0
- package/dist/standalone/all.js +226 -221
- package/dist/standalone/appearance.js +1 -1
- package/dist/standalone/bk-accordion-item.js +4 -4
- package/dist/standalone/bk-accordion.js +2 -2
- package/dist/standalone/bk-action-bar.js +3 -3
- package/dist/standalone/bk-alert-offline.js +1 -2
- package/dist/standalone/bk-alert.js +17 -13
- package/dist/standalone/bk-app-state.js +1 -1
- package/dist/standalone/bk-attachment.js +4 -4
- package/dist/standalone/bk-avatar-group.js +12 -10
- package/dist/standalone/bk-avatar.js +15 -5
- package/dist/standalone/bk-badge.js +2 -2
- package/dist/standalone/bk-bar.js +3 -1
- package/dist/standalone/bk-brand.js +3 -3
- package/dist/standalone/bk-breadcrumbs.js +5 -5
- package/dist/standalone/bk-button-copy.js +7 -7
- package/dist/standalone/bk-button-group.js +5 -5
- package/dist/standalone/bk-button-share.js +7 -7
- package/dist/standalone/bk-button-top.js +9 -8
- package/dist/standalone/bk-button.js +74 -34
- package/dist/standalone/bk-calendar-event.js +1 -1
- package/dist/standalone/bk-calendar-week.js +3 -3
- package/dist/standalone/bk-calendar.js +4 -4
- package/dist/standalone/bk-card.js +26 -7
- package/dist/standalone/bk-carousel-controls.js +7 -6
- package/dist/standalone/bk-carousel-item.js +2 -2
- package/dist/standalone/bk-carousel.js +1 -1
- package/dist/standalone/bk-chart-area.js +1 -1
- package/dist/standalone/bk-chart-bar-list.js +8 -8
- package/dist/standalone/bk-chart-bar.js +145 -117
- package/dist/standalone/bk-chart-bridge.js +7 -7
- package/dist/standalone/bk-chart-bullet.js +6 -6
- package/dist/standalone/bk-chart-calendar.js +7 -7
- package/dist/standalone/bk-chart-heatmap.js +7 -7
- package/dist/standalone/bk-chart-histogram.js +5 -5
- package/dist/standalone/bk-chart-legend.js +6 -6
- package/dist/standalone/bk-chart-line.js +128 -107
- package/dist/standalone/bk-chart-mark.js +1 -1
- package/dist/standalone/bk-chart-scatter.js +6 -6
- package/dist/standalone/bk-chart-sparkline.js +6 -6
- package/dist/standalone/bk-chart-stacked-bar.js +7 -7
- package/dist/standalone/bk-chart-tracker.js +6 -6
- package/dist/standalone/bk-chart-waterfall.js +6 -6
- package/dist/standalone/bk-checkbox-group.js +7 -7
- package/dist/standalone/bk-checkbox.js +4 -4
- package/dist/standalone/bk-chip-group.js +11 -7
- package/dist/standalone/bk-chip.js +59 -18
- package/dist/standalone/bk-cluster.js +1 -1
- package/dist/standalone/bk-code-diff.js +4 -4
- package/dist/standalone/bk-code-stack.js +4 -4
- package/dist/standalone/bk-code.js +10 -6
- package/dist/standalone/bk-color-panel.js +5 -5
- package/dist/standalone/bk-columns.js +13 -5
- package/dist/standalone/bk-combobox.js +23 -31
- package/dist/standalone/bk-command-menu.js +6 -6
- package/dist/standalone/bk-command-palette.js +8 -7
- package/dist/standalone/bk-composer.js +6 -6
- package/dist/standalone/bk-delta.js +11 -10
- package/dist/standalone/bk-diagram.js +1 -1
- package/dist/standalone/bk-dialog.js +1 -1
- package/dist/standalone/bk-disclosure.js +7 -5
- package/dist/standalone/bk-divider.js +5 -5
- package/dist/standalone/bk-drawer.js +3 -3
- package/dist/standalone/bk-drop-target.js +12 -6
- package/dist/standalone/bk-empty-state.js +3 -3
- package/dist/standalone/bk-error-summary.js +9 -6
- package/dist/standalone/bk-facts-item.js +2 -2
- package/dist/standalone/bk-facts.js +9 -8
- package/dist/standalone/bk-feature.js +3 -3
- package/dist/standalone/bk-fieldset.js +3 -3
- package/dist/standalone/bk-filter-bar.js +4 -4
- package/dist/standalone/bk-folder-browser.js +4 -4
- package/dist/standalone/bk-footnote.js +82 -0
- package/dist/standalone/bk-footnotes-item.js +122 -0
- package/dist/standalone/bk-footnotes.js +37 -0
- package/dist/standalone/bk-form-guard.js +2 -2
- package/dist/standalone/bk-form-steps.js +3 -3
- package/dist/standalone/bk-grid.js +1 -1
- package/dist/standalone/bk-icon-tile.js +3 -3
- package/dist/standalone/bk-icon.js +1 -1
- package/dist/standalone/bk-image-compare.js +127 -58
- package/dist/standalone/bk-image-crop.js +6 -6
- package/dist/standalone/bk-image-editor.js +1 -1
- package/dist/standalone/bk-image-viewer.js +283 -92
- package/dist/standalone/bk-input-code.js +4 -4
- package/dist/standalone/bk-input-color.js +4 -14
- package/dist/standalone/bk-input-date-range.js +2 -2
- package/dist/standalone/bk-input-date.js +2 -2
- package/dist/standalone/bk-input-file.js +22 -15
- package/dist/standalone/bk-input-group.js +4 -4
- package/dist/standalone/bk-input-inline.js +17 -10
- package/dist/standalone/bk-input-number.js +9 -8
- package/dist/standalone/bk-input-rating.js +6 -6
- package/dist/standalone/bk-input-rich.js +1 -1
- package/dist/standalone/bk-input-search.js +23 -22
- package/dist/standalone/bk-input-slider-range.js +5 -5
- package/dist/standalone/bk-input-slider.js +5 -5
- package/dist/standalone/bk-input-tags.js +224 -0
- package/dist/standalone/bk-input-text.js +1 -1
- package/dist/standalone/bk-input-time-zone.js +1 -1
- package/dist/standalone/bk-input-time.js +29 -28
- package/dist/standalone/bk-item-group.js +3 -3
- package/dist/standalone/bk-item.js +12 -11
- package/dist/standalone/bk-kbd-shortcuts.js +4 -3
- package/dist/standalone/bk-kbd.js +68 -1
- package/dist/standalone/bk-lightbox.js +24 -7
- package/dist/standalone/bk-lines.js +1 -1
- package/dist/standalone/bk-link.js +33 -19
- package/dist/standalone/bk-listbox-columns.js +8 -8
- package/dist/standalone/bk-listbox-item.js +1 -1
- package/dist/standalone/bk-listbox-search.js +7 -7
- package/dist/standalone/bk-listbox-transfer.js +6 -6
- package/dist/standalone/bk-listbox.js +7 -7
- package/dist/standalone/bk-logo-wall.js +2 -2
- package/dist/standalone/bk-logo.js +4 -4
- package/dist/standalone/bk-menu-bar.js +3 -3
- package/dist/standalone/bk-menu-context.js +1 -1
- package/dist/standalone/bk-menu-divider.js +2 -2
- package/dist/standalone/bk-menu-item.js +73 -29
- package/dist/standalone/bk-menu-label.js +7 -6
- package/dist/standalone/bk-menu-list.js +10 -4
- package/dist/standalone/bk-menu.js +19 -10
- package/dist/standalone/bk-message-approval.js +4 -4
- package/dist/standalone/bk-message-branches.js +3 -3
- package/dist/standalone/bk-message-citation.js +10 -10
- package/dist/standalone/bk-message-feedback.js +10 -6
- package/dist/standalone/bk-message-list.js +6 -5
- package/dist/standalone/bk-message-reasoning.js +5 -5
- package/dist/standalone/bk-message-source.js +13 -21
- package/dist/standalone/bk-message-tool-group.js +5 -5
- package/dist/standalone/bk-message-tool.js +5 -5
- package/dist/standalone/bk-message.js +6 -4
- package/dist/standalone/bk-meter.js +3 -3
- package/dist/standalone/bk-model-viewer.js +1 -1
- package/dist/standalone/bk-nav-divider.js +2 -2
- package/dist/standalone/bk-nav-group.js +9 -9
- package/dist/standalone/bk-nav-item.js +31 -23
- package/dist/standalone/bk-nav-toc.js +3 -3
- package/dist/standalone/bk-nav.js +3 -3
- package/dist/standalone/bk-overflow.js +3 -3
- package/dist/standalone/bk-page-cta.js +13 -4
- package/dist/standalone/bk-page-footer-column.js +2 -2
- package/dist/standalone/bk-page-footer.js +3 -3
- package/dist/standalone/bk-page-header.js +3 -3
- package/dist/standalone/bk-page-hero.js +3 -3
- package/dist/standalone/bk-page-pager.js +5 -5
- package/dist/standalone/bk-page-section.js +6 -6
- package/dist/standalone/bk-pagination.js +6 -6
- package/dist/standalone/bk-pane.js +10 -9
- package/dist/standalone/bk-panel.js +9 -10
- package/dist/standalone/bk-period-nav.js +4 -4
- package/dist/standalone/bk-picture.js +1 -166
- package/dist/standalone/bk-popover-help.js +3 -3
- package/dist/standalone/bk-popover.js +2 -2
- package/dist/standalone/bk-presence-cursor.js +3 -3
- package/dist/standalone/bk-preview.js +4 -4
- package/dist/standalone/bk-progress.js +3 -3
- package/dist/standalone/bk-prose.js +3 -3
- package/dist/standalone/bk-qr-code.js +1 -1
- package/dist/standalone/bk-radio-group.js +7 -7
- package/dist/standalone/bk-radio.js +3 -3
- package/dist/standalone/bk-rating.js +5 -5
- package/dist/standalone/bk-scroll.js +3 -3
- package/dist/standalone/bk-segmented-item.js +40 -16
- package/dist/standalone/bk-segmented.js +17 -15
- package/dist/standalone/bk-select-cascade.js +3 -3
- package/dist/standalone/bk-select-tree.js +4 -4
- package/dist/standalone/bk-select.js +5 -5
- package/dist/standalone/bk-shell-app.js +1 -1221
- package/dist/standalone/bk-shell-centered.js +2 -2
- package/dist/standalone/bk-shell-sites.js +5 -7
- package/dist/standalone/bk-skeleton.js +2 -2
- package/dist/standalone/bk-sortable.js +55 -60
- package/dist/standalone/bk-spinner.js +2 -2
- package/dist/standalone/bk-split-grid.js +324 -44
- package/dist/standalone/bk-split.js +8 -8
- package/dist/standalone/bk-stack.js +1 -1
- package/dist/standalone/bk-stat-group.js +8 -7
- package/dist/standalone/bk-stat.js +12 -9
- package/dist/standalone/bk-status-dot.js +3 -3
- package/dist/standalone/bk-steps-item.js +5 -5
- package/dist/standalone/bk-steps.js +8 -7
- package/dist/standalone/bk-surface.js +1 -1
- package/dist/standalone/bk-swatch-group.js +8 -8
- package/dist/standalone/bk-swatch-palette.js +1 -1
- package/dist/standalone/bk-swatch.js +2 -2
- package/dist/standalone/bk-switch.js +4 -4
- package/dist/standalone/bk-table.js +1 -1937
- package/dist/standalone/bk-tabs-item.js +58 -35
- package/dist/standalone/bk-tabs-panel.js +7 -3
- package/dist/standalone/bk-tabs.js +3 -352
- package/dist/standalone/bk-tasks-item.js +4 -4
- package/dist/standalone/bk-tasks.js +2 -2
- package/dist/standalone/bk-testimonial.js +3 -3
- package/dist/standalone/bk-text.js +21 -20
- package/dist/standalone/bk-time-countdown.js +4 -4
- package/dist/standalone/bk-time-relative.js +3 -3
- package/dist/standalone/bk-timeline-item.js +4 -4
- package/dist/standalone/bk-timeline.js +2 -2
- package/dist/standalone/bk-toast-group.js +1 -1
- package/dist/standalone/bk-toast.js +4 -4
- package/dist/standalone/bk-toolbar.js +2 -2
- package/dist/standalone/bk-tooltip.js +8 -7
- package/dist/standalone/bk-tree-item.js +6 -6
- package/dist/standalone/bk-tree.js +5 -5
- package/dist/standalone/bk-video.js +6 -6
- package/dist/standalone/bk-visually-hidden.js +2 -2
- package/dist/standalone/bk-zoom.js +5 -5
- package/dist/standalone/chunks/announcer-6tMlCOq1.js +41 -0
- package/dist/standalone/chunks/{appearance-waHnV0kk.js → appearance-CBOJXbmC.js} +1 -1
- package/dist/standalone/chunks/{bk-alert-offline-B1bQxOZp.js → bk-alert-offline-hCLuG-RM.js} +3 -3
- package/dist/standalone/chunks/{bk-carousel-BCwIQhG5.js → bk-carousel-_dudBMVq.js} +4 -4
- package/dist/standalone/chunks/{bk-diagram-DWK8CvRZ.js → bk-diagram-BB2odomE.js} +5 -5
- package/dist/standalone/chunks/{bk-dialog-DX0cPJ1o.js → bk-dialog-DcvwnOtN.js} +59 -25
- package/dist/standalone/chunks/{bk-icon-DssFsNuB.js → bk-icon-D4kI4F18.js} +4 -3
- package/dist/standalone/chunks/{bk-image-editor-DXEj9gCu.js → bk-image-editor-SRVkHI-4.js} +5 -5
- package/dist/standalone/chunks/{bk-input-date-range-Cbx_lpf0.js → bk-input-date-range-C0Vd-p0T.js} +2 -2
- package/dist/standalone/chunks/{bk-input-rich-ZB68vziu.js → bk-input-rich-AmDv87E5.js} +6 -6
- package/dist/standalone/chunks/{bk-input-text-DD32uWNO.js → bk-input-text-2n89GDIT.js} +73 -54
- package/dist/standalone/chunks/{bk-model-viewer-Dr81ahVv.js → bk-model-viewer-BoNYBd6W.js} +4 -4
- package/dist/standalone/chunks/bk-picture-CA5gLxgZ.js +186 -0
- package/dist/standalone/chunks/{bk-qr-code-QaYvZwOR.js → bk-qr-code-CSFfc8As.js} +3 -3
- package/dist/standalone/chunks/bk-shell-app-BlCOG25y.js +1236 -0
- package/dist/standalone/chunks/{bk-surface-DkIhrWMt.js → bk-surface-BULRdKam.js} +9 -7
- package/dist/standalone/chunks/{bk-swatch-palette-BNNXTP3w.js → bk-swatch-palette-Cqj85tSW.js} +6 -6
- package/dist/standalone/chunks/bk-table-DWlD7yoM.js +1945 -0
- package/dist/standalone/chunks/bk-tabs-STkr3-E1.js +422 -0
- package/dist/standalone/chunks/{bk-toast-group-BSeO_rPs.js → bk-toast-group-5nZg7BaJ.js} +27 -24
- package/dist/standalone/chunks/{brush-Bn3lPdHN.js → brush-DALmXSru.js} +18 -2
- package/dist/standalone/chunks/{busy-B7Mxemwm.js → busy-eG3uHonz.js} +5 -4
- package/dist/standalone/chunks/{chart-tokens-D1Exf7BW.js → chart-tokens-DQ4hVSmn.js} +2 -2
- package/dist/standalone/chunks/{choice-field-CGvE4tyb.js → choice-field-B0oe_9fI.js} +6 -6
- package/dist/standalone/chunks/{choice-item-B6-9ZRlf.js → choice-item-Cx-nm1js.js} +17 -8
- package/dist/standalone/chunks/{clipboard-Crzt1Sh9.js → clipboard-RqIeP9Uz.js} +1 -1
- package/dist/standalone/chunks/{clipboard-BKlrP5rj.js → clipboard-UVLSkL4C.js} +1 -1
- package/dist/standalone/chunks/{crop-frame-poLCGrBG.js → crop-frame-Z9N0QML4.js} +1 -11
- package/dist/standalone/chunks/{date-field-BlI6grfT.js → date-field-Dy1_qxNv.js} +48 -47
- package/dist/standalone/chunks/define-6OfuRn5c.js +60 -0
- package/dist/standalone/chunks/drag-DT4__0t9.js +12 -0
- package/dist/standalone/chunks/footnotes-BeisMxLk.js +94 -0
- package/dist/standalone/chunks/{form-control-CyXQIJ2x.js → form-control-Bmk0SRDX.js} +2 -2
- package/dist/standalone/chunks/{frame-abXBnl8a.js → frame-xIMVEUCi.js} +5 -4
- package/dist/standalone/chunks/{handle-menu-ZVR_msk2.js → handle-menu-BAe9fPYJ.js} +14 -33
- package/dist/standalone/chunks/{heading-text-CV5gBf7k.js → heading-text-B2kF-b8p.js} +1 -1
- package/dist/standalone/chunks/hue-vLbNdAEl.js +20 -0
- package/dist/standalone/chunks/{i18n-B6Al9xCK.js → i18n-DFfGgd3d.js} +49 -34
- package/dist/standalone/chunks/{i18n-BI16HQmm.js → i18n-DQAcbHkY.js} +1 -1
- package/dist/standalone/chunks/late-CPQ_RbU-.js +30 -0
- package/dist/standalone/chunks/link--YWr8exL.js +69 -0
- package/dist/standalone/chunks/{marks-0kbeB4n8.js → marks-pOUDNUf1.js} +2 -2
- package/dist/standalone/chunks/{options-DMEc8rQt.js → options-ySaDL-dW.js} +2 -2
- package/dist/standalone/chunks/own-text-mpZVnMyX.js +5 -0
- package/dist/standalone/chunks/{palettes-CKLHSIPx.js → palettes-J4bQ21ks.js} +2 -2
- package/dist/standalone/chunks/{popover-base-ac49G87f.js → popover-base-hxo-Vh6E.js} +2 -2
- package/dist/standalone/chunks/{prose-BG4oQH-i.js → prose-BiuJgiah.js} +1 -1
- package/dist/standalone/chunks/{ramp-ggoyjMvC.js → ramp-CGDOcqBZ.js} +1 -1
- package/dist/standalone/chunks/save-as-DBGZjczB.js +6 -0
- package/dist/standalone/chunks/shortcuts-DPxCSO4M.js +210 -0
- package/dist/standalone/chunks/{slider-BWT8Fmwz.js → slider-jp3d-Ld-.js} +15 -14
- package/dist/standalone/chunks/{stars-BN9M_9Q1.js → stars-BAUc_LqI.js} +1 -1
- package/dist/standalone/chunks/{styles-DwSR-9a3.js → styles-CaeyhYDA.js} +3 -0
- package/dist/standalone/chunks/submit-BjBGB8OW.js +42 -0
- package/dist/standalone/chunks/{summary-BK-B4m5A.js → summary-W5s0TFqV.js} +1 -1
- package/dist/standalone/chunks/tags-CMLAGsVw.js +37 -0
- package/dist/standalone/chunks/{text-field-4IUUpRHE.js → text-field-CufOGdfr.js} +17 -11
- package/dist/standalone/chunks/{toggle-control-ioV2jhNY.js → toggle-control-Cgqp1jhf.js} +5 -3
- package/dist/standalone/chunks/{tokens-BuahF1lF.js → tokens-C_ul7pL9.js} +4 -3
- package/dist/standalone/chunks/{virtual-B-1oN14Y.js → virtual-D-qgACnE.js} +1 -1
- package/dist/standalone/confirm.js +27 -14
- package/dist/standalone/i18n-de.js +13 -2
- package/dist/standalone/icons.js +100 -98
- package/dist/standalone/links.js +1 -1
- package/dist/standalone/reset.css +10 -0
- package/dist/standalone/toast.js +1 -1
- package/dist/standalone/tokens.css +6 -5
- package/dist/tokens.css +6 -5
- package/dist/tokens.js +4 -3
- package/package.json +25 -2
- package/dist/standalone/chunks/announcer-haFcvqbe.js +0 -25
- package/dist/standalone/chunks/bk-kbd-B_TlKzWj.js +0 -275
- package/dist/standalone/chunks/define-CzVPD4Zi.js +0 -30
- package/dist/standalone/chunks/hue-Jvb-141g.js +0 -14
- package/dist/standalone/chunks/keyed-CZ2AaouM.js +0 -16
- package/dist/standalone/chunks/link-CWSMsx04.js +0 -60
|
@@ -34,12 +34,28 @@ export interface ImageViewerChangeDetail {
|
|
|
34
34
|
/** Index of the image now shown. */
|
|
35
35
|
index: number;
|
|
36
36
|
}
|
|
37
|
+
/** Detail of the `page` event: the picture that the user asks for in the list of the app. */
|
|
38
|
+
export interface ImageViewerPageDetail {
|
|
39
|
+
direction: "previous" | "next";
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The zoom and the visible part of the image: `zoom` is a factor of the fitted size (1 shows the whole image).
|
|
43
|
+
* `x` and `y` are the point in the centre of the view, as fractions of the width and the height of the image.
|
|
44
|
+
* The values do not depend on the resolution: two viewers with the same picture at different sizes show the same part.
|
|
45
|
+
*/
|
|
46
|
+
export interface ImageViewerView {
|
|
47
|
+
zoom: number;
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
}
|
|
37
51
|
/**
|
|
38
52
|
* An image viewer with zoom, pan, swipe, a counter, captions and an optional filmstrip.
|
|
39
53
|
*
|
|
40
|
-
* It renders inline
|
|
41
|
-
*
|
|
42
|
-
*
|
|
54
|
+
* It renders inline. With a height (on the viewer or its container) it fills that height. Without a height, the
|
|
55
|
+
* viewer is as high as the image at its width: the shape comes from `width` and `height` of the item, else from the
|
|
56
|
+
* full image as soon as the browser knows its size, else from the thumbnail. Cap the height with `max-height`
|
|
57
|
+
* (or `--bk-image-viewer-max-height`). `<bk-lightbox>` shows the viewer full-screen in a modal `<bk-dialog>`. The
|
|
58
|
+
* viewer is dark in both themes (`--bk-media-backdrop`), so photos look the same in light and dark.
|
|
43
59
|
*
|
|
44
60
|
* ```html
|
|
45
61
|
* <bk-image-viewer style="height: 480px" filmstrip></bk-image-viewer>
|
|
@@ -54,8 +70,50 @@ export interface ImageViewerChangeDetail {
|
|
|
54
70
|
*
|
|
55
71
|
* Keys (while the viewer has focus; it is a focusable region): ← → go to the previous or next image (they pan when
|
|
56
72
|
* zoomed, and ↑ ↓ pan too). Home/End go to the first or last image. + and − zoom, 0 fits the image, and 1 shows the actual size. Pointer: double-click or
|
|
57
|
-
* double-tap toggles the zoom.
|
|
73
|
+
* double-tap toggles the zoom. Ctrl + wheel or a pinch zooms around the pointer. The plain wheel scrolls the page
|
|
74
|
+
* while the image is fitted, and zooms while it is zoomed. Drag pans when zoomed. Swipe
|
|
58
75
|
* left or right switches images. The full image loads only when it is shown. The viewer preloads the neighbouring images.
|
|
76
|
+
* Previous and next stop at the first and the last image. With `loop` they wrap around.
|
|
77
|
+
*
|
|
78
|
+
* **Paging.** While the next image loads, the last image stays in view, so paging through large images shows no empty
|
|
79
|
+
* frame. If the load takes longer than `--bk-loading-delay`, a spinner shows over the last image. The thumbnail of
|
|
80
|
+
* `src` shows only when there is no last image.
|
|
81
|
+
*
|
|
82
|
+
* **The shape of the image.** With `shaped` the box of the viewer takes the shape of the image. The width follows the
|
|
83
|
+
* ratio of the image under the cap `--bk-image-viewer-max-height`. The box is never wider than its container and never
|
|
84
|
+
* larger than the natural size of the image (`width` of the item, else the loaded image). The toolbar lies over the top
|
|
85
|
+
* of the image, and the caption and the filmstrip stay under it. Give the viewer no height. A 400 × 1200 image in a
|
|
86
|
+
* 1200 px container with a cap of 600 px gives a box of 200 × 600 px.
|
|
87
|
+
*
|
|
88
|
+
* **The list of the app.** Set `pageable` when the app shows one picture and has the list itself. The previous and
|
|
89
|
+
* next buttons then show also for one item, and the viewer fires `page` when the user asks for the previous or next
|
|
90
|
+
* picture: with the buttons, the arrow keys or a swipe. The app then sets `items` to the other picture. Set `first`
|
|
91
|
+
* and `last` at the ends of the list: they turn off the previous or the next button. With several items, the viewer
|
|
92
|
+
* pages its own items first and fires `page` at their ends (not with `loop`).
|
|
93
|
+
*
|
|
94
|
+
* ```js
|
|
95
|
+
* viewer.addEventListener("page", (e) => show(position + (e.detail.direction === "next" ? 1 : -1)));
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* **Immersive.** Set `immersive` when the viewer is the main content of the screen or of a dialog
|
|
99
|
+
* (`<bk-lightbox>` sets it). Then the plain wheel always zooms, because there is no page to scroll. A click
|
|
100
|
+
* (mouse or pen) steps the zoom at the pointer: 2×, 4×, then back to the fitted size. A double tap stays the zoom
|
|
101
|
+
* gesture of touch. The keys of the viewer also work while the focus is anywhere in the surrounding dialog (`<dialog>`,
|
|
102
|
+
* `<bk-dialog>` or `role="dialog"`). A field or a widget that uses the key itself (a text field, a slider, a listbox,
|
|
103
|
+
* tabs) keeps it, and so does a key that a handler already used (`preventDefault()`).
|
|
104
|
+
*
|
|
105
|
+
* **Mirror two viewers.** `view` is the zoom and the visible part in fractions of the image, so it does not depend on
|
|
106
|
+
* the resolution. The viewer fires `viewchange` when the user changes the view. Set `view` of the other viewer in
|
|
107
|
+
* the handler. Setting `view` fires no event, so two viewers can mirror each other:
|
|
108
|
+
*
|
|
109
|
+
* ```js
|
|
110
|
+
* a.addEventListener("viewchange", () => (b.view = a.view));
|
|
111
|
+
* b.addEventListener("viewchange", () => (a.view = b.view));
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* **The size of the image.** `naturalWidth` and `naturalHeight` give the size of the shown image in pixels, as on an
|
|
115
|
+
* `<img>`. The viewer fires `load` when the shown image has loaded. Put a badge with the size in the `actions` slot,
|
|
116
|
+
* and format the numbers with `Intl.NumberFormat`.
|
|
59
117
|
*
|
|
60
118
|
* **Pan without dragging.** While the image is zoomed, a group of four arrow buttons (`pan` part) at the
|
|
61
119
|
* bottom of the image moves the image in steps (the same step as the arrow keys). A double click or double tap
|
|
@@ -77,6 +135,7 @@ export interface ImageViewerChangeDetail {
|
|
|
77
135
|
* @csspart caption - The caption under the image.
|
|
78
136
|
* @csspart filmstrip - The row of thumbnails (with `filmstrip`).
|
|
79
137
|
* @csspart thumb - One filmstrip button.
|
|
138
|
+
* @cssprop --bk-image-viewer-max-height - Maximum height of the viewer, for a viewer without a height that takes the shape of the image (default none). With `shaped` it is the maximum height of the image: a length, and the width follows.
|
|
80
139
|
* @cssprop --bk-image-viewer-color-scheme - Colour scheme inside; global tokens resolve in it (default dark).
|
|
81
140
|
* @cssprop --bk-image-viewer-bg - Background (default --bk-media-backdrop).
|
|
82
141
|
* @cssprop --bk-image-viewer-fg - Text and icon colour (default --bk-on-media).
|
|
@@ -97,15 +156,18 @@ export interface ImageViewerChangeDetail {
|
|
|
97
156
|
* @cssprop --bk-image-viewer-thumb-bg - Background behind loading thumbnails (default --bk-surface-2).
|
|
98
157
|
* @fires {CustomEvent<ImageViewerChangeDetail>} change - The user moved to another image. `event.detail.index` is the new index. The event bubbles and is composed.
|
|
99
158
|
* @fires {Event} dismiss - A single tap or click beside the (unzoomed) image. `<bk-lightbox>` closes on this event. The event bubbles and is composed.
|
|
159
|
+
* @fires {CustomEvent<ImageViewerView>} viewchange - The user changed the zoom or the visible part (at most once per frame). `event.detail` is the new `view`. Setting `view`, `resetZoom()`, `actualSize()` and a change of the image fire no event. The event bubbles and is composed.
|
|
160
|
+
* @fires {CustomEvent<ImageViewerPageDetail>} page - With `pageable`: the user asks for the previous or the next picture of the list of the app (a button, ← →, a swipe), and the viewer has no own item in that direction. `event.detail.direction` is `previous` or `next`. The app sets `items` to that picture. The event bubbles, is composed and is cancelable, as every event that navigates: `defaultPrevented` tells a later listener that a handler took the request. The viewer itself has no default action.
|
|
161
|
+
* @fires {Event} load - The shown image has loaded (once for each image, also from the cache of the browser). `naturalWidth` and `naturalHeight` are known. The event does not bubble, as the `load` of an `<img>`.
|
|
100
162
|
*
|
|
101
163
|
* @tag bk-image-viewer
|
|
102
|
-
* @keyboard ←, → - The previous or next image. In a zoomed image: pan.
|
|
164
|
+
* @keyboard ←, → - The previous or next image (they stop at the ends without `loop`; with `pageable` they fire `page`). In a zoomed image: pan.
|
|
103
165
|
* @keyboard ↑, ↓ - In a zoomed image: pan.
|
|
104
166
|
* @keyboard Home, End - The first or last image.
|
|
105
167
|
* @keyboard Plus, Minus - Zoom in or out.
|
|
106
168
|
* @keyboard 0 - Fit the image to the view.
|
|
107
169
|
* @keyboard 1 - Show the image at its actual size.
|
|
108
|
-
* @a11y The viewer is a focusable `region` with a name (`label`, otherwise the text of the library). A polite live region announces the position ("2 of 5"). Every pointer gesture has a button and a key.
|
|
170
|
+
* @a11y The viewer is a focusable `region` with a name (`label`, otherwise the text of the library). A polite live region announces the position ("2 of 5"). Every pointer gesture has a button and a key. Without `loop`, the previous button is off on the first image and the next button on the last (with `pageable`: with `first` and `last`); the region gets the focus of an off button. With `immersive` the keys also work from the other controls of the surrounding dialog, except from fields and widgets that use the key.
|
|
109
171
|
*/
|
|
110
172
|
export declare class BkImageViewer extends LitElement {
|
|
111
173
|
static shadowRootOptions: ShadowRootInit;
|
|
@@ -120,6 +182,30 @@ export declare class BkImageViewer extends LitElement {
|
|
|
120
182
|
type: BooleanConstructor;
|
|
121
183
|
reflect: boolean;
|
|
122
184
|
};
|
|
185
|
+
loop: {
|
|
186
|
+
type: BooleanConstructor;
|
|
187
|
+
reflect: boolean;
|
|
188
|
+
};
|
|
189
|
+
immersive: {
|
|
190
|
+
type: BooleanConstructor;
|
|
191
|
+
reflect: boolean;
|
|
192
|
+
};
|
|
193
|
+
shaped: {
|
|
194
|
+
type: BooleanConstructor;
|
|
195
|
+
reflect: boolean;
|
|
196
|
+
};
|
|
197
|
+
pageable: {
|
|
198
|
+
type: BooleanConstructor;
|
|
199
|
+
reflect: boolean;
|
|
200
|
+
};
|
|
201
|
+
first: {
|
|
202
|
+
type: BooleanConstructor;
|
|
203
|
+
reflect: boolean;
|
|
204
|
+
};
|
|
205
|
+
last: {
|
|
206
|
+
type: BooleanConstructor;
|
|
207
|
+
reflect: boolean;
|
|
208
|
+
};
|
|
123
209
|
label: {};
|
|
124
210
|
prevLabel: {
|
|
125
211
|
attribute: string;
|
|
@@ -157,6 +243,12 @@ export declare class BkImageViewer extends LitElement {
|
|
|
157
243
|
ratio: {
|
|
158
244
|
state: boolean;
|
|
159
245
|
};
|
|
246
|
+
thumbRatio: {
|
|
247
|
+
state: boolean;
|
|
248
|
+
};
|
|
249
|
+
naturalSize: {
|
|
250
|
+
state: boolean;
|
|
251
|
+
};
|
|
160
252
|
};
|
|
161
253
|
/** The images. */
|
|
162
254
|
items: ImageViewerItem[];
|
|
@@ -164,6 +256,27 @@ export declare class BkImageViewer extends LitElement {
|
|
|
164
256
|
index: number;
|
|
165
257
|
/** Shows a row of thumbnails under the image. */
|
|
166
258
|
filmstrip: boolean;
|
|
259
|
+
/** Previous and next wrap around: after the last image comes the first. Without it, they stop at the ends. */
|
|
260
|
+
loop: boolean;
|
|
261
|
+
/**
|
|
262
|
+
* The viewer is the main content of the screen or of its dialog (`<bk-lightbox>` sets it). The plain wheel zooms,
|
|
263
|
+
* a click steps the zoom, and the keys of the viewer work while the focus is anywhere in the surrounding dialog.
|
|
264
|
+
*/
|
|
265
|
+
immersive: boolean;
|
|
266
|
+
/**
|
|
267
|
+
* The box takes the shape of the image: under `--bk-image-viewer-max-height` the width follows the ratio of the image.
|
|
268
|
+
* The box is never wider than its container and never larger than the natural size of the image.
|
|
269
|
+
*/
|
|
270
|
+
shaped: boolean;
|
|
271
|
+
/**
|
|
272
|
+
* The app has the list of pictures. The previous and next buttons show also for one item, and the viewer fires `page`
|
|
273
|
+
* when the user asks for a picture beyond its own items.
|
|
274
|
+
*/
|
|
275
|
+
pageable: boolean;
|
|
276
|
+
/** With `pageable`: the shown picture is the first of the list of the app. The previous button is off. */
|
|
277
|
+
first: boolean;
|
|
278
|
+
/** With `pageable`: the shown picture is the last of the list of the app. The next button is off. */
|
|
279
|
+
last: boolean;
|
|
167
280
|
/** Accessible name of the viewer region (default: i18n `imageViewer`). */
|
|
168
281
|
label: string;
|
|
169
282
|
/** Accessible name of the previous button (default from i18n). */
|
|
@@ -187,7 +300,20 @@ export declare class BkImageViewer extends LitElement {
|
|
|
187
300
|
private zoomed;
|
|
188
301
|
/** Aspect ratio (width / height) of the full image. It is 0 while unknown. */
|
|
189
302
|
private ratio;
|
|
303
|
+
/** Aspect ratio of the thumbnail. It gives the height of the viewer until the shape of the full image is known. */
|
|
304
|
+
private thumbRatio;
|
|
305
|
+
/** Width of the full image in image pixels (`width` of the item, else the loaded image). It is 0 while unknown. */
|
|
306
|
+
private naturalSize;
|
|
190
307
|
private pz;
|
|
308
|
+
/** While true, a change of the view is not a change of the user: no `viewchange`. */
|
|
309
|
+
private quiet;
|
|
310
|
+
private viewChanged;
|
|
311
|
+
/** A view that the app set before the image had its shape. The viewer applies it again when the shape is known. */
|
|
312
|
+
private pendingView;
|
|
313
|
+
/** The image of the last `load` event (index and URL). */
|
|
314
|
+
private loadedKey;
|
|
315
|
+
/** The surrounding dialog whose keys the viewer handles (`immersive`). */
|
|
316
|
+
private keyScope;
|
|
191
317
|
private swipeX;
|
|
192
318
|
private smooth;
|
|
193
319
|
private raf;
|
|
@@ -204,6 +330,10 @@ export declare class BkImageViewer extends LitElement {
|
|
|
204
330
|
private lastTap;
|
|
205
331
|
private preloaded;
|
|
206
332
|
private observed;
|
|
333
|
+
/** The picture in the frame, and the last picture while it loads. */
|
|
334
|
+
private shot;
|
|
335
|
+
private previousShot;
|
|
336
|
+
private loader;
|
|
207
337
|
private resizer;
|
|
208
338
|
private i18n;
|
|
209
339
|
constructor();
|
|
@@ -212,28 +342,60 @@ export declare class BkImageViewer extends LitElement {
|
|
|
212
342
|
private get image();
|
|
213
343
|
/** Focuses the viewer region, so its keys work. */
|
|
214
344
|
focus(options?: FocusOptions): void;
|
|
215
|
-
/** Moves to the previous image
|
|
345
|
+
/** Moves to the previous image. It wraps around with `loop`, else it stops at the first image. */
|
|
216
346
|
previous(): void;
|
|
217
|
-
/** Moves to the next image
|
|
347
|
+
/** Moves to the next image. It wraps around with `loop`, else it stops at the last image. */
|
|
218
348
|
next(): void;
|
|
219
|
-
/** Returns to the fitted size. */
|
|
349
|
+
/** Returns to the fitted size. It fires no `viewchange`. */
|
|
220
350
|
resetZoom(): void;
|
|
221
|
-
/**
|
|
351
|
+
/**
|
|
352
|
+
* The zoom and the visible part of the image (`ImageViewerView`). Set it to show the same part as another
|
|
353
|
+
* viewer, for example in `viewchange` of that viewer. Setting it fires no `viewchange`. A view that you set
|
|
354
|
+
* before the image has its shape applies again when the shape is known.
|
|
355
|
+
*/
|
|
356
|
+
get view(): ImageViewerView;
|
|
357
|
+
set view(v: Partial<ImageViewerView>);
|
|
358
|
+
/** The width of the shown image in image pixels, as `naturalWidth` of an `<img>`. It is 0 while unknown. */
|
|
359
|
+
get naturalWidth(): number;
|
|
360
|
+
/** The height of the shown image in image pixels, as `naturalHeight` of an `<img>`. It is 0 while unknown. */
|
|
361
|
+
get naturalHeight(): number;
|
|
362
|
+
/** Shows the image at its actual size: one image pixel per screen pixel. It fires no `viewchange`. */
|
|
222
363
|
actualSize(): void;
|
|
364
|
+
private zoomFit;
|
|
365
|
+
private zoomActual;
|
|
223
366
|
/** The image shown now. */
|
|
224
367
|
get current(): ImageViewerItem | undefined;
|
|
225
368
|
/** The scale (relative to the fitted size) at which one image pixel is one screen pixel. */
|
|
226
369
|
private get actualScale();
|
|
370
|
+
connectedCallback(): void;
|
|
227
371
|
disconnectedCallback(): void;
|
|
228
372
|
protected willUpdate(changed: PropertyValues<this>): void;
|
|
229
373
|
protected updated(changed: PropertyValues<this>): void;
|
|
374
|
+
/** Runs `fn` without a `viewchange`: a change that the app or the viewer makes, not the user. */
|
|
375
|
+
private silently;
|
|
376
|
+
private onViewChange;
|
|
377
|
+
/** The factors from fractions of the frame to fractions of the fitted image. */
|
|
378
|
+
private pictureScale;
|
|
379
|
+
private applyPendingView;
|
|
380
|
+
private bindKeyScope;
|
|
381
|
+
private unbindKeyScope;
|
|
382
|
+
/** A key in the dialog outside the viewer. A field or a widget that uses the key itself keeps it. */
|
|
383
|
+
private onScopeKey;
|
|
230
384
|
/**
|
|
231
385
|
* Reads the size of the full image as soon as the browser knows it (from the file header, long
|
|
232
386
|
* before the whole image has loaded), so the placeholder can use its shape.
|
|
233
387
|
*/
|
|
234
388
|
private watchSize;
|
|
235
389
|
private preloadNeighbours;
|
|
390
|
+
/** Moves to image `i`. It wraps around with `loop`, else it stops at the ends. Returns false when the image stays. */
|
|
236
391
|
private go;
|
|
392
|
+
/**
|
|
393
|
+
* Where a step in direction `dir` goes: `own` to an item of the viewer, `app` to the list of the app (`pageable`),
|
|
394
|
+
* false when there is nothing in that direction.
|
|
395
|
+
*/
|
|
396
|
+
private canStep;
|
|
397
|
+
/** The previous (-1) or next (1) picture: an item of the viewer, else a `page` event for the list of the app. */
|
|
398
|
+
private step;
|
|
237
399
|
/** How far a key or a pan button moves the image, in px. */
|
|
238
400
|
private get panStep();
|
|
239
401
|
private onKey;
|
|
@@ -253,11 +415,16 @@ export declare class BkImageViewer extends LitElement {
|
|
|
253
415
|
private onPointerDown;
|
|
254
416
|
private onPointerMove;
|
|
255
417
|
private onPointerUp;
|
|
256
|
-
/**
|
|
418
|
+
/**
|
|
419
|
+
* A double tap or double click toggles the zoom. A single tap beside the image closes the viewer.
|
|
420
|
+
* In an `immersive` viewer a click (mouse or pen) steps the zoom: 2×, 4×, then the fitted size.
|
|
421
|
+
*/
|
|
257
422
|
private onTap;
|
|
258
423
|
private onImageLoad;
|
|
259
424
|
/** Fits the loaded image into the frame. It does not change reactive state. */
|
|
260
425
|
private placeImage;
|
|
426
|
+
/** The thumbnail gives the height of the viewer until the shape of the full image is known. */
|
|
427
|
+
private onThumbLoad;
|
|
261
428
|
private onImageError;
|
|
262
429
|
render(): import("lit-html").TemplateResult<1>;
|
|
263
430
|
private renderViewer;
|