@bk2k/ui 0.6.8 → 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 +56 -2
- package/CHANGELOG.md +136 -0
- package/USAGE.md +89 -26
- 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.js +2 -1
- 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 +37 -14
- package/dist/components/bk-button.js +52 -16
- 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 +17 -0
- package/dist/components/bk-chart-bar.js +25 -4
- 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 +1 -1
- package/dist/components/bk-combobox.js +2 -1
- 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 +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.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-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-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 +425 -2
- 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 +1 -1
- package/dist/components/bk-table.js +9 -12
- 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 +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 +3 -0
- package/dist/index.js +3 -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.js +3 -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.js +2 -5
- 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 +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/jsx.d.ts +141 -52
- package/dist/reset.css +10 -0
- package/dist/standalone/all.js +226 -222
- 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 +62 -30
- 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 +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 +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 +9 -8
- 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 +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 +88 -47
- 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 +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 +4 -4
- 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 +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 +318 -41
- package/dist/standalone/bk-split.js +4 -4
- 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 -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 +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-B1bQxOZp.js → bk-alert-offline-Clw0ZSsH.js} +3 -3
- package/dist/standalone/chunks/{bk-carousel-BCwIQhG5.js → bk-carousel-Biz7t8sL.js} +4 -4
- package/dist/standalone/chunks/{bk-diagram-DWK8CvRZ.js → bk-diagram-D_fQf6SF.js} +5 -5
- package/dist/standalone/chunks/{bk-dialog-DX0cPJ1o.js → bk-dialog-DwZyUUHh.js} +59 -25
- package/dist/standalone/chunks/{bk-icon-DssFsNuB.js → bk-icon-Bp_flKdv.js} +4 -3
- package/dist/standalone/chunks/{bk-image-editor-DXEj9gCu.js → bk-image-editor-BADsoLRL.js} +5 -5
- package/dist/standalone/chunks/{bk-input-date-range-Cbx_lpf0.js → bk-input-date-range-DHcJ8-5g.js} +2 -2
- package/dist/standalone/chunks/{bk-input-rich-ZB68vziu.js → bk-input-rich-CFhW6vRa.js} +6 -6
- package/dist/standalone/chunks/{bk-input-text-DD32uWNO.js → bk-input-text-DviyLBqj.js} +63 -54
- package/dist/standalone/chunks/{bk-model-viewer-Dr81ahVv.js → bk-model-viewer-w_Ah4Tvs.js} +4 -4
- package/dist/standalone/chunks/{bk-qr-code-QaYvZwOR.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-BSeO_rPs.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-CGvE4tyb.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-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-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-CyXQIJ2x.js → form-control-CHpfKAKa.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-BgYUbGO2.js} +26 -19
- package/dist/standalone/chunks/{heading-text-CV5gBf7k.js → heading-text-CgnCa_q2.js} +1 -1
- 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/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-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-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-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-BK-B4m5A.js → summary-W5s0TFqV.js} +1 -1
- package/dist/standalone/chunks/{text-field-4IUUpRHE.js → text-field-CqhJSAwZ.js} +4 -4
- package/dist/standalone/chunks/{toggle-control-ioV2jhNY.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 +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/link-CWSMsx04.js +0 -60
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
|
|
2
2
|
import { t as i } from "./chunks/style-map-BMvn17E7.js";
|
|
3
3
|
import { t as a } from "./chunks/repeat-Dxf3qZZl.js";
|
|
4
|
-
import { i as o, n as s, r as c, t as l } from "./chunks/define-
|
|
4
|
+
import { i as o, n as s, r as c, t as l } from "./chunks/define-DkVeu7e9.js";
|
|
5
5
|
import { n as u } from "./chunks/events-DQ4e9cPN.js";
|
|
6
|
-
import { t as d } from "./chunks/i18n-
|
|
7
|
-
import { t as f } from "./chunks/
|
|
8
|
-
import {
|
|
6
|
+
import { t as d } from "./chunks/i18n-DFfGgd3d.js";
|
|
7
|
+
import { t as f } from "./chunks/announcer-D1zrRWwO.js";
|
|
8
|
+
import { i as p, r as m } from "./chunks/drag-DT4__0t9.js";
|
|
9
|
+
import { t as h } from "./chunks/light-styles-CFbyUU7I.js";
|
|
10
|
+
import { t as g } from "./chunks/state-XYmTmnOw.js";
|
|
11
|
+
import { d as _, t as v } from "./chunks/styles-CaeyhYDA.js";
|
|
9
12
|
// dist/components/bk-split-grid.js
|
|
10
|
-
var
|
|
13
|
+
var y = () => matchMedia("(prefers-reduced-motion: reduce)").matches, b = 260, x = 220, S = 150, C = "cubic-bezier(0.2, 0, 0, 1)", w = r`
|
|
14
|
+
@layer bk.components {
|
|
15
|
+
bk-split-grid [data-split-grid-handle] { cursor: var(--bk-split-grid-handle-cursor, grab); touch-action: none; }
|
|
16
|
+
bk-split-grid[dragging] [data-split-grid-handle] { cursor: var(--bk-split-grid-dragging-cursor, grabbing); }
|
|
17
|
+
}
|
|
18
|
+
`, T = "a[href], button, summary, input, select, textarea", E = (e) => e ? e.split(/[\s,]+/).map((e) => parseFloat(e)).filter((e) => Number.isFinite(e)) : void 0, D = (e, t) => Array.isArray(e) && e.length === t && e.every((e) => typeof e == "number" && e > 0), O = (e) => {
|
|
11
19
|
let t = e.reduce((e, t) => e + t, 0);
|
|
12
20
|
return e.map((e) => e / t);
|
|
13
|
-
},
|
|
21
|
+
}, k = (e) => Array(e).fill(1 / e), A = (e, t) => e.slice(0, t).reduce((e, t) => e + t, 0), j = (e, t, n) => `calc(${e * 100}% + var(--_bk-split-grid-gap) * ${t - e * (n - 1)})`, M = (e, t, n = e.length) => j(A(e, t), t, n), N = (e, t, n = e.length) => j(A(e, t + 1), t, n), P = (e, t) => j(A(e, t + 1), t + .5, e.length), F = class extends n {
|
|
14
22
|
static shadowRootOptions = {
|
|
15
23
|
...n.shadowRootOptions,
|
|
16
24
|
slotAssignment: "manual"
|
|
@@ -33,23 +41,23 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
33
41
|
},
|
|
34
42
|
areas: { reflect: !0 },
|
|
35
43
|
sizes: { converter: {
|
|
36
|
-
fromAttribute:
|
|
44
|
+
fromAttribute: E,
|
|
37
45
|
toAttribute: (e) => e?.join(" ")
|
|
38
46
|
} },
|
|
39
47
|
defaultSizes: {
|
|
40
48
|
attribute: "default-sizes",
|
|
41
|
-
converter: { fromAttribute:
|
|
49
|
+
converter: { fromAttribute: E }
|
|
42
50
|
},
|
|
43
51
|
rowSizes: {
|
|
44
52
|
attribute: "row-sizes",
|
|
45
53
|
converter: {
|
|
46
|
-
fromAttribute:
|
|
54
|
+
fromAttribute: E,
|
|
47
55
|
toAttribute: (e) => e?.join(" ")
|
|
48
56
|
}
|
|
49
57
|
},
|
|
50
58
|
defaultRowSizes: {
|
|
51
59
|
attribute: "default-row-sizes",
|
|
52
|
-
converter: { fromAttribute:
|
|
60
|
+
converter: { fromAttribute: E }
|
|
53
61
|
},
|
|
54
62
|
minRow: {
|
|
55
63
|
type: Number,
|
|
@@ -73,14 +81,14 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
73
81
|
rfr: { state: !0 }
|
|
74
82
|
};
|
|
75
83
|
i18n = new d(this);
|
|
76
|
-
stored = new
|
|
77
|
-
storedRows = new
|
|
84
|
+
stored = new g(this, () => this.persistKey && `split-grid:${this.persistKey}:${this.layoutKey}`);
|
|
85
|
+
storedRows = new g(this, () => this.persistKey && `split-grid:${this.persistKey}:${this.layoutKey}:rows:${this.rowCount}`);
|
|
78
86
|
width = 0;
|
|
79
87
|
gapPx = 0;
|
|
80
88
|
lastBoxes = null;
|
|
81
89
|
resizing = !1;
|
|
82
90
|
constructor() {
|
|
83
|
-
super(), this.min = 320, this.minRow = 160, this.cols = 0, this.rows = 0, this.stackBelow = 0, this.fit = 0, this.fr = [], this.rfr = [], this.scrolling = !1;
|
|
91
|
+
super(), this.min = 320, this.minRow = 160, this.cols = 0, this.rows = 0, this.stackBelow = 0, this.fit = 0, this.fr = [], this.rfr = [], this.scrolling = !1, this.addEventListener("pointerdown", this.onPaneDown), this.addEventListener("keydown", this.onPaneKey), this.addEventListener("focusin", this.onPaneFocusIn), this.addEventListener("focusout", this.onPaneFocusOut), this.addEventListener("dragstart", this.onNativeDrag);
|
|
84
92
|
}
|
|
85
93
|
get panes() {
|
|
86
94
|
return [...s(this)?.children ?? []].filter((e) => e instanceof HTMLElement && !e.hidden && ![
|
|
@@ -149,7 +157,7 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
149
157
|
}
|
|
150
158
|
defaults(e) {
|
|
151
159
|
let t = e === "col" ? this.columnCount : this.rowCount, n = e === "col" ? this.defaultSizes : this.defaultRowSizes;
|
|
152
|
-
return
|
|
160
|
+
return D(n, t) ? O(n) : k(t);
|
|
153
161
|
}
|
|
154
162
|
mutations = c(() => this.requestUpdate());
|
|
155
163
|
sizer = o(([e]) => {
|
|
@@ -179,10 +187,10 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
179
187
|
attributes: !0,
|
|
180
188
|
subtree: !1,
|
|
181
189
|
attributeFilter: ["hidden"]
|
|
182
|
-
}), this.observePanes(), this.sizer.observe(this);
|
|
190
|
+
}), this.observePanes(), this.sizer.observe(this), h(this, w);
|
|
183
191
|
}
|
|
184
192
|
disconnectedCallback() {
|
|
185
|
-
super.disconnectedCallback(), this.mutations.disconnect(), this.paneObserver.disconnect(), this.sizer.disconnect(), this.gridSizer.disconnect();
|
|
193
|
+
super.disconnectedCallback(), this.endDrag(!1), this.mutations.disconnect(), this.paneObserver.disconnect(), this.sizer.disconnect(), this.gridSizer.disconnect();
|
|
186
194
|
}
|
|
187
195
|
paneObserver = c(() => this.requestUpdate());
|
|
188
196
|
observePanes() {
|
|
@@ -198,24 +206,25 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
198
206
|
shownRows = 0;
|
|
199
207
|
willUpdate(e) {
|
|
200
208
|
let t = this.panes, n = this.zoomedPane, r = t.length !== this.shown.length || t.some((e, t) => e !== this.shown[t]) || n !== this.shownZoom;
|
|
201
|
-
r && this.observePanes();
|
|
209
|
+
r && this.observePanes(), r && this.drag && (this.panesChanged = !0);
|
|
202
210
|
let i = this.columnCount, a = this.rowCount;
|
|
203
211
|
if (!this.resizing) {
|
|
204
212
|
let e = this.stored.value ?? this.sizes;
|
|
205
|
-
this.fr =
|
|
213
|
+
this.fr = D(e, i) ? O(e) : this.defaults("col");
|
|
206
214
|
let t = this.storedRows.value ?? this.rowSizes;
|
|
207
|
-
this.rfr =
|
|
215
|
+
this.rfr = D(t, a) ? O(t) : this.defaults("row");
|
|
208
216
|
}
|
|
209
217
|
this.hasUpdated && (r || i !== this.shownCols || a !== this.shownRows || e.has("areas") || e.has("rows") || e.has("cols")) && (this.lastBoxes = this.boxes()), this.shown = t, this.shownZoom = n, this.shownCols = i, this.shownRows = a;
|
|
210
218
|
}
|
|
211
219
|
updated() {
|
|
220
|
+
this.panesChanged && (this.panesChanged = !1, this.endDrag(!1));
|
|
212
221
|
let e = this.cells();
|
|
213
222
|
e.forEach(([e, t]) => {
|
|
214
223
|
let n = t.querySelector("slot");
|
|
215
224
|
n.assignedElements()[0] !== e && n.assign(e);
|
|
216
225
|
});
|
|
217
226
|
let t = this.lastBoxes;
|
|
218
|
-
if (this.lastBoxes = null, this.measure(), !t ||
|
|
227
|
+
if (this.lastBoxes = null, this.measure(), !t || y()) return;
|
|
219
228
|
for (let [n, r] of e) {
|
|
220
229
|
if (r.hidden) continue;
|
|
221
230
|
let e = r.getBoundingClientRect(), i = t.get(n);
|
|
@@ -227,8 +236,8 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
227
236
|
opacity: 1,
|
|
228
237
|
transform: "none"
|
|
229
238
|
}], {
|
|
230
|
-
duration:
|
|
231
|
-
easing:
|
|
239
|
+
duration: x,
|
|
240
|
+
easing: C
|
|
232
241
|
});
|
|
233
242
|
continue;
|
|
234
243
|
}
|
|
@@ -240,8 +249,8 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
240
249
|
transformOrigin: "top left",
|
|
241
250
|
transform: "none"
|
|
242
251
|
}], {
|
|
243
|
-
duration:
|
|
244
|
-
easing:
|
|
252
|
+
duration: b,
|
|
253
|
+
easing: C
|
|
245
254
|
});
|
|
246
255
|
}
|
|
247
256
|
let n = this.renderRoot.getAnimations();
|
|
@@ -254,7 +263,7 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
254
263
|
return new Map(this.cells().filter(([, e]) => !e.hidden).map(([e, t]) => [e, t.getBoundingClientRect()]));
|
|
255
264
|
}
|
|
256
265
|
async leave(e) {
|
|
257
|
-
if (
|
|
266
|
+
if (y()) return;
|
|
258
267
|
let t = this.cells().filter(([t]) => e.includes(t)).map(([, e]) => e.animate([{
|
|
259
268
|
opacity: 1,
|
|
260
269
|
transform: "none"
|
|
@@ -262,12 +271,256 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
262
271
|
opacity: 0,
|
|
263
272
|
transform: "scale(0.96)"
|
|
264
273
|
}], {
|
|
265
|
-
duration:
|
|
274
|
+
duration: S,
|
|
266
275
|
easing: "ease-in",
|
|
267
276
|
fill: "forwards"
|
|
268
277
|
}));
|
|
269
278
|
await Promise.all(t.map((e) => e.finished.catch(() => void 0))), setTimeout(() => t.forEach((e) => e.cancel()), 500);
|
|
270
279
|
}
|
|
280
|
+
drag = null;
|
|
281
|
+
panesChanged = !1;
|
|
282
|
+
restoreFocus = 0;
|
|
283
|
+
paneOf(e) {
|
|
284
|
+
return e.composedPath().find((e) => e instanceof HTMLElement && e.parentElement === this && this.shown.includes(e)) ?? null;
|
|
285
|
+
}
|
|
286
|
+
handleOf(e, t) {
|
|
287
|
+
let n = e.composedPath(), r = n.indexOf(t), i = n.slice(0, r < 0 ? n.length : r + 1).find((e) => e instanceof HTMLElement && e.hasAttribute("data-split-grid-handle"));
|
|
288
|
+
if (!i) return null;
|
|
289
|
+
for (let e of n) {
|
|
290
|
+
if (e === i) break;
|
|
291
|
+
if (e instanceof HTMLElement && e.matches("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]") && !i.shadowRoot?.contains(e)) return null;
|
|
292
|
+
}
|
|
293
|
+
return i;
|
|
294
|
+
}
|
|
295
|
+
nameOf(e, t) {
|
|
296
|
+
return (e.dataset.splitGridLabel || e.getAttribute("aria-label") || (t ?? e.querySelector("[data-split-grid-handle]"))?.textContent || "").replace(/\s+/g, " ").trim().slice(0, 80);
|
|
297
|
+
}
|
|
298
|
+
say(e, t, n) {
|
|
299
|
+
f(this.i18n.t(e, {
|
|
300
|
+
item: this.nameOf(t.pane, t.handle),
|
|
301
|
+
position: n + 1,
|
|
302
|
+
total: this.shown.length
|
|
303
|
+
}));
|
|
304
|
+
}
|
|
305
|
+
cellOf(e) {
|
|
306
|
+
return this.renderRoot.querySelectorAll(".cell")[e] ?? null;
|
|
307
|
+
}
|
|
308
|
+
setTarget(e, t) {
|
|
309
|
+
t !== e.to && (e.to !== e.from && this.cellOf(e.to)?.classList.remove("target"), e.to = t, t !== e.from && this.cellOf(t)?.classList.add("target"));
|
|
310
|
+
}
|
|
311
|
+
onPaneDown = (e) => {
|
|
312
|
+
if (this.drag || e.button !== 0 || !e.isPrimary) return;
|
|
313
|
+
let t = this.paneOf(e), n = t && this.handleOf(e, t);
|
|
314
|
+
if (!t || !n) return;
|
|
315
|
+
let r = this.shown.indexOf(t);
|
|
316
|
+
this.drag = {
|
|
317
|
+
keyboard: !1,
|
|
318
|
+
pane: t,
|
|
319
|
+
handle: n,
|
|
320
|
+
from: r,
|
|
321
|
+
to: r,
|
|
322
|
+
started: !1,
|
|
323
|
+
id: e.pointerId,
|
|
324
|
+
x0: e.clientX,
|
|
325
|
+
y0: e.clientY,
|
|
326
|
+
x: e.clientX,
|
|
327
|
+
y: e.clientY,
|
|
328
|
+
offX: 0,
|
|
329
|
+
offY: 0,
|
|
330
|
+
raf: 0,
|
|
331
|
+
rects: null,
|
|
332
|
+
box: null,
|
|
333
|
+
outside: !1
|
|
334
|
+
}, window.addEventListener("pointermove", this.onDragMove, !0), window.addEventListener("pointerup", this.onDragUp, !0), window.addEventListener("pointercancel", this.onDragCancel, !0);
|
|
335
|
+
};
|
|
336
|
+
startDrag(e) {
|
|
337
|
+
e.started = !0;
|
|
338
|
+
try {
|
|
339
|
+
e.handle.setPointerCapture(e.id);
|
|
340
|
+
} catch {}
|
|
341
|
+
this.setAttribute("dragging", ""), this.cellOf(e.from)?.classList.add("dragging"), getSelection()?.removeAllRanges(), document.addEventListener("selectstart", m, !0), window.addEventListener("touchmove", m, { passive: !1 }), window.addEventListener("keydown", this.onDragKey, !0), window.addEventListener("scroll", this.onDragScroll, !0), e.handle.addEventListener("lostpointercapture", this.onDragCancel), this.measureDrag(e);
|
|
342
|
+
let t = this.renderRoot.querySelector(".ghost");
|
|
343
|
+
if (!t) return;
|
|
344
|
+
let n = e.handle.getBoundingClientRect();
|
|
345
|
+
t.textContent = this.nameOf(e.pane, e.handle), t.style.inlineSize = `${Math.round(n.width)}px`, t.style.minBlockSize = `${Math.round(n.height)}px`, t.style.transform = `translate(${Math.round(n.left)}px, ${Math.round(n.top)}px)`, t.showPopover?.();
|
|
346
|
+
let r = t.getBoundingClientRect();
|
|
347
|
+
e.offX = Math.min(Math.max(e.x0 - n.left, 0), r.width), e.offY = Math.min(Math.max(e.y0 - n.top, 0), r.height);
|
|
348
|
+
}
|
|
349
|
+
measureDrag(e) {
|
|
350
|
+
e.rects = [...this.renderRoot.querySelectorAll(".cell")].map((e) => e.hidden ? null : e.getBoundingClientRect()), e.box = (this.renderRoot.querySelector(".scroller") ?? this).getBoundingClientRect();
|
|
351
|
+
}
|
|
352
|
+
onDragScroll = () => {
|
|
353
|
+
this.drag && (this.drag.rects = null);
|
|
354
|
+
};
|
|
355
|
+
onDragMove = (e) => {
|
|
356
|
+
let t = this.drag;
|
|
357
|
+
if (t && !t.keyboard && e.pointerId === t.id) {
|
|
358
|
+
if (t.x = e.clientX, t.y = e.clientY, !t.started) {
|
|
359
|
+
if (Math.hypot(t.x - t.x0, t.y - t.y0) < 4) return;
|
|
360
|
+
this.startDrag(t);
|
|
361
|
+
}
|
|
362
|
+
e.preventDefault(), t.raf ||= requestAnimationFrame(() => this.dragFrame(t));
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
dragFrame(e, t = !1) {
|
|
366
|
+
if (e.raf = 0, this.drag !== e) return;
|
|
367
|
+
e.rects || this.measureDrag(e);
|
|
368
|
+
let n = this.renderRoot.querySelector(".ghost");
|
|
369
|
+
n && (n.style.transform = `translate(${Math.round(e.x - e.offX)}px, ${Math.round(e.y - e.offY)}px)`);
|
|
370
|
+
let r = e.box;
|
|
371
|
+
if (!(e.x >= r.left && e.x <= r.right && e.y >= r.top && e.y <= r.bottom)) {
|
|
372
|
+
this.setTarget(e, e.from), e.outside = !0, t || this.emitOutside("dragoutside", e, !1);
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
let i = e.rects.findIndex((t) => !!t && e.x >= t.left && e.x <= t.right && e.y >= t.top && e.y <= t.bottom);
|
|
376
|
+
this.setTarget(e, i < 0 ? e.from : i), e.outside && (e.outside = !1, this.emitOutside("dragoutside", e, !0));
|
|
377
|
+
}
|
|
378
|
+
emitOutside(e, t, n) {
|
|
379
|
+
let r = {
|
|
380
|
+
pane: t.pane,
|
|
381
|
+
clientX: t.x,
|
|
382
|
+
clientY: t.y
|
|
383
|
+
};
|
|
384
|
+
e === "dropoutside" ? u(this, e, r) : u(this, e, {
|
|
385
|
+
...r,
|
|
386
|
+
inside: n
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
onDragUp = (e) => {
|
|
390
|
+
let t = this.drag;
|
|
391
|
+
t && !t.keyboard && e.pointerId === t.id && (t.started ? (t.x = e.clientX, t.y = e.clientY, cancelAnimationFrame(t.raf), this.dragFrame(t, !0), p(), this.endDrag(!0)) : this.endDrag(!1));
|
|
392
|
+
};
|
|
393
|
+
onDragCancel = (e) => {
|
|
394
|
+
let t = this.drag;
|
|
395
|
+
t && !t.keyboard && e.pointerId === t.id && this.endDrag(!1);
|
|
396
|
+
};
|
|
397
|
+
onDragKey = (e) => {
|
|
398
|
+
e.key === "Escape" && this.drag?.started && !this.drag.keyboard && (e.preventDefault(), e.stopPropagation(), this.endDrag(!1));
|
|
399
|
+
};
|
|
400
|
+
onNativeDrag = (e) => {
|
|
401
|
+
this.drag && !this.drag.keyboard && e.preventDefault();
|
|
402
|
+
};
|
|
403
|
+
endDrag(e) {
|
|
404
|
+
let t = this.drag;
|
|
405
|
+
if (!t || (this.drag = null, cancelAnimationFrame(t.raf), window.removeEventListener("pointermove", this.onDragMove, !0), window.removeEventListener("pointerup", this.onDragUp, !0), window.removeEventListener("pointercancel", this.onDragCancel, !0), window.removeEventListener("keydown", this.onDragKey, !0), window.removeEventListener("scroll", this.onDragScroll, !0), window.removeEventListener("touchmove", m), document.removeEventListener("selectstart", m, !0), t.handle.removeEventListener("lostpointercapture", this.onDragCancel), !t.started && !t.keyboard)) return;
|
|
406
|
+
t.handle.hasPointerCapture?.(t.id) && t.handle.releasePointerCapture(t.id), this.removeAttribute("dragging");
|
|
407
|
+
for (let e of this.renderRoot.querySelectorAll(".cell")) e.classList.remove("dragging", "target");
|
|
408
|
+
let n = this.renderRoot.querySelector(".ghost");
|
|
409
|
+
if (n?.matches(":popover-open") && n.hidePopover(), t.outside) {
|
|
410
|
+
e && this.emitOutside("dropoutside", t, !1), this.emitOutside("dragoutside", t, !0);
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
if (!e || t.to === t.from) {
|
|
414
|
+
t.keyboard && this.say(e ? "sortableDropped" : "sortableCancelled", t, t.from);
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
let r = this.shown.filter((e) => e !== t.pane);
|
|
418
|
+
if (r.splice(t.to, 0, t.pane), !u(this, "reorder", {
|
|
419
|
+
pane: t.pane,
|
|
420
|
+
from: t.from,
|
|
421
|
+
to: t.to,
|
|
422
|
+
order: r
|
|
423
|
+
}, !0)) this.say("sortableCancelled", t, t.from);
|
|
424
|
+
else if (this.say("sortableDropped", t, t.to), t.keyboard) {
|
|
425
|
+
let e = t.handle;
|
|
426
|
+
cancelAnimationFrame(this.restoreFocus), this.updateComplete.then(() => {
|
|
427
|
+
this.restoreFocus = requestAnimationFrame(() => {
|
|
428
|
+
e.isConnected && !e.matches(":focus-within") && e.focus({ preventScroll: !0 });
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
keyHandle(e, t) {
|
|
434
|
+
let n = this.handleOf(e, t);
|
|
435
|
+
return n && e.composedPath()[0] === n && !n.matches(T) ? n : null;
|
|
436
|
+
}
|
|
437
|
+
onPaneFocusIn = (e) => {
|
|
438
|
+
let t = this.paneOf(e), n = t && this.keyHandle(e, t);
|
|
439
|
+
n && !n.hasAttribute("aria-description") && n.setAttribute("aria-description", this.i18n.t("sortableInstructions"));
|
|
440
|
+
};
|
|
441
|
+
onPaneFocusOut = (e) => {
|
|
442
|
+
let t = this.drag;
|
|
443
|
+
if (!t?.keyboard) return;
|
|
444
|
+
let n = e.relatedTarget;
|
|
445
|
+
n && t.pane.contains(n) || this.endDrag(!1);
|
|
446
|
+
};
|
|
447
|
+
onPaneKey = (e) => {
|
|
448
|
+
let t = this.drag;
|
|
449
|
+
if (!t) {
|
|
450
|
+
if (e.key !== " " && e.key !== "Enter" || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return;
|
|
451
|
+
let t = this.paneOf(e), n = t && this.keyHandle(e, t);
|
|
452
|
+
if (!t || !n || this.zoomedPane || this.shown.length < 2) return;
|
|
453
|
+
e.preventDefault(), e.stopPropagation();
|
|
454
|
+
let r = this.shown.indexOf(t);
|
|
455
|
+
this.drag = {
|
|
456
|
+
keyboard: !0,
|
|
457
|
+
pane: t,
|
|
458
|
+
handle: n,
|
|
459
|
+
from: r,
|
|
460
|
+
to: r,
|
|
461
|
+
started: !0,
|
|
462
|
+
id: -1,
|
|
463
|
+
x0: 0,
|
|
464
|
+
y0: 0,
|
|
465
|
+
x: 0,
|
|
466
|
+
y: 0,
|
|
467
|
+
offX: 0,
|
|
468
|
+
offY: 0,
|
|
469
|
+
raf: 0,
|
|
470
|
+
rects: null,
|
|
471
|
+
box: null,
|
|
472
|
+
outside: !1
|
|
473
|
+
}, this.cellOf(r)?.classList.add("dragging"), this.say("sortablePickedUp", this.drag, r);
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
if (!t.keyboard) return;
|
|
477
|
+
let n = this.shown.length - 1, r = this.matches(":dir(rtl)"), i = t.to;
|
|
478
|
+
switch (e.key) {
|
|
479
|
+
case " ":
|
|
480
|
+
case "Enter":
|
|
481
|
+
e.preventDefault(), e.stopPropagation(), this.endDrag(!0);
|
|
482
|
+
return;
|
|
483
|
+
case "Escape":
|
|
484
|
+
e.preventDefault(), e.stopPropagation(), this.endDrag(!1);
|
|
485
|
+
return;
|
|
486
|
+
case "Tab":
|
|
487
|
+
this.endDrag(!1);
|
|
488
|
+
return;
|
|
489
|
+
case r ? "ArrowRight" : "ArrowLeft":
|
|
490
|
+
i = Math.max(0, i - 1);
|
|
491
|
+
break;
|
|
492
|
+
case r ? "ArrowLeft" : "ArrowRight":
|
|
493
|
+
i = Math.min(n, i + 1);
|
|
494
|
+
break;
|
|
495
|
+
case "ArrowUp":
|
|
496
|
+
i = this.vertical(i, -1);
|
|
497
|
+
break;
|
|
498
|
+
case "ArrowDown":
|
|
499
|
+
i = this.vertical(i, 1);
|
|
500
|
+
break;
|
|
501
|
+
case "Home":
|
|
502
|
+
i = 0;
|
|
503
|
+
break;
|
|
504
|
+
case "End":
|
|
505
|
+
i = n;
|
|
506
|
+
break;
|
|
507
|
+
default: return;
|
|
508
|
+
}
|
|
509
|
+
e.preventDefault(), e.stopPropagation(), i !== t.to && (this.setTarget(t, i), this.cellOf(i)?.scrollIntoView({
|
|
510
|
+
block: "nearest",
|
|
511
|
+
inline: "nearest"
|
|
512
|
+
}), this.say("sortableMoved", t, i));
|
|
513
|
+
};
|
|
514
|
+
vertical(e, t) {
|
|
515
|
+
let n = [...this.renderRoot.querySelectorAll(".cell")].map((e) => e.getBoundingClientRect()), r = n[e];
|
|
516
|
+
if (!r) return e;
|
|
517
|
+
let i = r.left + r.width / 2, a = e, o = 1e400;
|
|
518
|
+
return n.forEach((n, s) => {
|
|
519
|
+
if (s === e || n.width === 0 || !(t < 0 ? n.bottom <= r.top + 1 : n.top >= r.bottom - 1)) return;
|
|
520
|
+
let c = Math.abs(t < 0 ? r.top - n.bottom : n.top - r.bottom) * 4 + Math.abs(n.left + n.width / 2 - i);
|
|
521
|
+
c < o && (o = c, a = s);
|
|
522
|
+
}), a;
|
|
523
|
+
}
|
|
271
524
|
emitSizes(e) {
|
|
272
525
|
u(this, e, {
|
|
273
526
|
sizes: [...this.fr],
|
|
@@ -307,7 +560,7 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
307
560
|
onDividerDown(e) {
|
|
308
561
|
if (e.button !== 0) return;
|
|
309
562
|
e.preventDefault();
|
|
310
|
-
let { el: t, axis: n, i: r } = this.dividerOf(e), i = this.renderRoot.querySelector(".grid").getBoundingClientRect(), a = this.matches(":dir(rtl)"), o = this.room(n), s =
|
|
563
|
+
let { el: t, axis: n, i: r } = this.dividerOf(e), i = this.renderRoot.querySelector(".grid").getBoundingClientRect(), a = this.matches(":dir(rtl)"), o = this.room(n), s = A(this.tracks(n), r), c = !0;
|
|
311
564
|
try {
|
|
312
565
|
t.setPointerCapture(e.pointerId);
|
|
313
566
|
} catch {
|
|
@@ -353,8 +606,8 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
353
606
|
return n ? n.replace("{index}", String(t)) : this.i18n.t(e === "col" ? "resizeColumn" : "resizeRow", { index: t });
|
|
354
607
|
}
|
|
355
608
|
static styles = [
|
|
356
|
-
|
|
357
|
-
|
|
609
|
+
v,
|
|
610
|
+
_,
|
|
358
611
|
r`
|
|
359
612
|
:host {
|
|
360
613
|
--_bk-split-grid-gap: var(--bk-split-grid-gap, var(--bk-space-components));
|
|
@@ -394,14 +647,38 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
394
647
|
@media (hover: hover) { .divider:hover::after { background: var(--bk-split-grid-divider-color, var(--bk-line-hover)); } }
|
|
395
648
|
.divider.active::after, .divider:focus-visible::after { background: var(--bk-split-grid-divider-active, var(--bk-accent-solid)); }
|
|
396
649
|
@media (prefers-reduced-motion: reduce) { .divider::after { transition: none; } }
|
|
650
|
+
|
|
651
|
+
/* Moving a pane: the lifted pane, the drop mark and the ghost that follows the pointer. */
|
|
652
|
+
:host([dragging]) { user-select: none; -webkit-user-select: none; }
|
|
653
|
+
.cell.dragging { opacity: var(--bk-split-grid-drag-opacity, 0.45); }
|
|
654
|
+
.cell.target {
|
|
655
|
+
outline: var(--bk-split-grid-drop-width, var(--bk-focus-width)) solid var(--bk-split-grid-drop-color, var(--bk-accent-solid));
|
|
656
|
+
outline-offset: var(--bk-focus-offset);
|
|
657
|
+
border-radius: var(--bk-split-grid-drop-radius, var(--bk-radius-container, var(--bk-radius-lg)));
|
|
658
|
+
}
|
|
659
|
+
.ghost {
|
|
660
|
+
position: fixed; inset: 0 auto auto 0; margin: 0; pointer-events: none;
|
|
661
|
+
max-inline-size: var(--bk-split-grid-ghost-max-width, var(--bk-measure-display));
|
|
662
|
+
align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
|
|
663
|
+
padding: 0 var(--bk-split-grid-ghost-padding, var(--bk-space-3));
|
|
664
|
+
color: var(--bk-split-grid-ghost-color, var(--bk-text)); font: inherit; font-size: var(--bk-type-small); font-weight: var(--bk-weight-medium);
|
|
665
|
+
line-height: var(--bk-line-height-body);
|
|
666
|
+
background: var(--bk-split-grid-ghost-bg, var(--bk-layer-overlay-bg));
|
|
667
|
+
border: var(--bk-border-width) solid var(--bk-split-grid-ghost-border, var(--bk-layer-overlay-border));
|
|
668
|
+
border-radius: var(--bk-split-grid-ghost-radius, var(--bk-radius-md));
|
|
669
|
+
box-shadow: var(--bk-split-grid-ghost-shadow, var(--bk-layer-overlay-shadow), var(--bk-ring-focus));
|
|
670
|
+
cursor: var(--bk-split-grid-dragging-cursor, grabbing);
|
|
671
|
+
}
|
|
672
|
+
.ghost:popover-open { display: flex; }
|
|
397
673
|
@media (forced-colors: active) {
|
|
398
674
|
.divider.active::after, .divider:focus-visible::after { background: Highlight; }
|
|
675
|
+
.cell.target { outline-color: Highlight; }
|
|
399
676
|
}
|
|
400
677
|
`
|
|
401
678
|
];
|
|
402
679
|
render() {
|
|
403
|
-
let n = this.shown, r = this.shownZoom, o = this.stacked, s = this.columnCount, c = this.rowCount, l = this.template, u = l ? this.letters(l) : [], d = this.fr.length === s ? this.fr :
|
|
404
|
-
return e`<div class="scroller" part="scroller" role=${this.scrolling ? "region" : t} tabindex=${this.scrolling ? "0" : t}
|
|
680
|
+
let n = this.shown, r = this.shownZoom, o = this.stacked, s = this.columnCount, c = this.rowCount, l = this.template, u = l ? this.letters(l) : [], d = this.fr.length === s ? this.fr : k(s), f = this.rowsShare, p = f || this.rows <= 0 ? c : Math.max(1, Math.min(this.rows, n.length)), m = f && this.rfr.length === c ? this.rfr : Array(c).fill(1 / p), h = !!r || o, g = h ? "minmax(0, 1fr)" : d.map((e) => `minmax(0, ${e}fr)`).join(" "), _ = "var(--_bk-split-grid-gap)", v = h ? {} : f ? { gridTemplateRows: m.map((e) => `minmax(0, ${e}fr)`).join(" ") } : this.rows > 0 ? { gridAutoRows: `calc((100% - ${_} * ${Math.min(this.rows, n.length) - 1}) / ${Math.min(this.rows, n.length)})` } : {}, y = h || s < 2 ? "0" : `calc(${this.min / Math.min(...d)}px + ${_} * ${s - 1})`, b = f ? `calc(${this.minRow / Math.min(...m)}px + ${_} * ${c - 1})` : "0", x = l ? { gridTemplateAreas: l.map((e) => `"${e}"`).join(" ") } : {}, S = (e) => String(Math.round(e * 100)), C = (e) => Math.max(1, (e === "col" ? this.width : this.gridHeight) - this.gapPx * ((e === "col" ? s : c) - 1)), w = (e, t, n) => t === 0 ? "0" : M(e, t, n), T = (e, t, n) => t === e.length - 1 && n === e.length ? "0" : `calc(100% - ${N(e, t, n)})`;
|
|
681
|
+
return e`<div class="scroller" part="scroller" @scroll=${this.onDragScroll} role=${this.scrolling ? "region" : t} tabindex=${this.scrolling ? "0" : t}
|
|
405
682
|
aria-label=${this.scrolling ? this.label || this.i18n.t("content") : t}><div class="grid ${o ? "stacked" : ""}" style=${i({
|
|
406
683
|
gridTemplateColumns: g,
|
|
407
684
|
minWidth: y,
|
|
@@ -411,22 +688,22 @@ var h = () => matchMedia("(prefers-reduced-motion: reduce)").matches, g = 260, _
|
|
|
411
688
|
})}>
|
|
412
689
|
${a(n, (e) => e, (t, n) => e`<div class="cell" part="cell" style=${i({ gridArea: l ? u[n] : void 0 })} ?hidden=${!!r && r !== t}><slot></slot></div>`)}
|
|
413
690
|
${this.segments().map(({ axis: t, index: n, from: r, to: a }) => {
|
|
414
|
-
let o = t === "col" ? d : m, c = t === "col" ? m : d, { lo: l, hi: u } = this.bounds(t, n,
|
|
415
|
-
insetInlineStart:
|
|
416
|
-
insetBlockStart:
|
|
417
|
-
insetBlockEnd:
|
|
691
|
+
let o = t === "col" ? d : m, c = t === "col" ? m : d, { lo: l, hi: u } = this.bounds(t, n, C(t)), f = t === "col" ? {
|
|
692
|
+
insetInlineStart: P(o, n),
|
|
693
|
+
insetBlockStart: w(c, r, p),
|
|
694
|
+
insetBlockEnd: T(c, a, p)
|
|
418
695
|
} : {
|
|
419
|
-
insetBlockStart:
|
|
420
|
-
insetInlineStart:
|
|
421
|
-
insetInlineEnd:
|
|
696
|
+
insetBlockStart: P(o, n),
|
|
697
|
+
insetInlineStart: w(c, r, s),
|
|
698
|
+
insetInlineEnd: T(c, a, s)
|
|
422
699
|
};
|
|
423
700
|
return e`<div class="divider ${t}" part="divider" role="separator" tabindex="0" aria-orientation=${t === "col" ? "vertical" : "horizontal"}
|
|
424
701
|
aria-label=${this.dividerLabel(t, n + 1)} aria-valuenow=${S(o[n])} aria-valuemin=${S(l)} aria-valuemax=${S(u)}
|
|
425
702
|
data-axis=${t} data-index=${n} style=${i(f)}
|
|
426
703
|
@pointerdown=${this.onDividerDown} @keydown=${this.onDividerKey} @dblclick=${this.onDividerReset}><span class="bk-grip" aria-hidden="true"></span></div>`;
|
|
427
704
|
})}
|
|
428
|
-
</div></div>`;
|
|
705
|
+
</div></div><div class="ghost" part="ghost" popover="manual" aria-hidden="true"></div>`;
|
|
429
706
|
}
|
|
430
707
|
};
|
|
431
|
-
l("bk-split-grid",
|
|
432
|
-
export {
|
|
708
|
+
l("bk-split-grid", F);
|
|
709
|
+
export { F as BkSplitGrid };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
|
|
2
|
-
import { i, n as a, r as o, t as s } from "./chunks/define-
|
|
2
|
+
import { i, n as a, r as o, t as s } from "./chunks/define-DkVeu7e9.js";
|
|
3
3
|
import { n as c } from "./chunks/events-DQ4e9cPN.js";
|
|
4
|
-
import { i as l, n as u, t as d } from "./chunks/handle-menu-
|
|
4
|
+
import { i as l, n as u, t as d } from "./chunks/handle-menu-BgYUbGO2.js";
|
|
5
5
|
import "./bk-menu-context.js";
|
|
6
6
|
import "./bk-menu-divider.js";
|
|
7
7
|
import "./bk-menu-item.js";
|
|
8
|
-
import { t as f } from "./chunks/i18n-
|
|
8
|
+
import { t as f } from "./chunks/i18n-DFfGgd3d.js";
|
|
9
9
|
import { i as p } from "./chunks/anchor-CNX3nt2F.js";
|
|
10
10
|
import { t as m } from "./chunks/state-XYmTmnOw.js";
|
|
11
|
-
import { d as h, t as g } from "./chunks/styles-
|
|
11
|
+
import { d as h, t as g } from "./chunks/styles-CaeyhYDA.js";
|
|
12
12
|
import "./bk-button.js";
|
|
13
13
|
import "./chunks/chevron-left-BHF34JzQ.js";
|
|
14
14
|
import "./chunks/grid-BV0_DQ5v.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, t, u as n } from "./chunks/lit-D8x-qXgH.js";
|
|
2
|
-
import { t as r } from "./chunks/define-
|
|
2
|
+
import { t as r } from "./chunks/define-DkVeu7e9.js";
|
|
3
3
|
// dist/components/bk-stack.js
|
|
4
4
|
var i = class extends t {
|
|
5
5
|
static properties = { align: { reflect: !0 } };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { a as e, t, u as n } from "./chunks/lit-D8x-qXgH.js";
|
|
2
|
-
import { t as r } from "./chunks/define-
|
|
3
|
-
import { t as i } from "./chunks/
|
|
2
|
+
import { t as r } from "./chunks/define-DkVeu7e9.js";
|
|
3
|
+
import { t as i } from "./chunks/host-vars-DTKbhBPu.js";
|
|
4
|
+
import { t as a } from "./chunks/styles-CaeyhYDA.js";
|
|
4
5
|
// dist/components/bk-stat-group.js
|
|
5
|
-
var
|
|
6
|
+
var o = class extends t {
|
|
6
7
|
static properties = {
|
|
7
8
|
divided: {
|
|
8
9
|
type: Boolean,
|
|
@@ -13,7 +14,7 @@ var a = class extends t {
|
|
|
13
14
|
constructor() {
|
|
14
15
|
super(), this.divided = !1;
|
|
15
16
|
}
|
|
16
|
-
static styles = [
|
|
17
|
+
static styles = [a, n`
|
|
17
18
|
/* flow-root: the negative margins of the row stay inside (clip alone does not stop them collapsing). */
|
|
18
19
|
:host {
|
|
19
20
|
display: flow-root; min-width: 0;
|
|
@@ -43,11 +44,11 @@ var a = class extends t {
|
|
|
43
44
|
@media (forced-colors: active) { :host([divided]) ::slotted(*) { border-color: CanvasText; } }
|
|
44
45
|
`];
|
|
45
46
|
willUpdate(e) {
|
|
46
|
-
e.has("min") && (this
|
|
47
|
+
e.has("min") && i(this, { "--_bk-stat-group-min": this.min || "" });
|
|
47
48
|
}
|
|
48
49
|
render() {
|
|
49
50
|
return e`<div class="row" part="row"><slot></slot></div>`;
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
|
-
r("bk-stat-group",
|
|
53
|
-
export {
|
|
53
|
+
r("bk-stat-group", o);
|
|
54
|
+
export { o as BkStatGroup };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
|
|
2
|
-
import { t as i } from "./chunks/define-
|
|
3
|
-
import { t as a } from "./chunks/i18n-
|
|
4
|
-
import { t as o, x as s } from "./chunks/styles-
|
|
2
|
+
import { t as i } from "./chunks/define-DkVeu7e9.js";
|
|
3
|
+
import { t as a } from "./chunks/i18n-DFfGgd3d.js";
|
|
4
|
+
import { t as o, x as s } from "./chunks/styles-CaeyhYDA.js";
|
|
5
5
|
import { t as c } from "./chunks/slots-BHTtBbPo.js";
|
|
6
|
-
import { r as l } from "./chunks/chart-tokens-
|
|
7
|
-
import { t as u } from "./chunks/i18n-
|
|
6
|
+
import { r as l } from "./chunks/chart-tokens-DQ4hVSmn.js";
|
|
7
|
+
import { t as u } from "./chunks/i18n-DQAcbHkY.js";
|
|
8
8
|
import { i as d, n as f, r as p, t as m } from "./chunks/delta-C3KtTv5o.js";
|
|
9
|
-
import "./chunks/bk-icon-
|
|
9
|
+
import "./chunks/bk-icon-Bp_flKdv.js";
|
|
10
10
|
import "./chunks/trending-down-CFdPp8Q2.js";
|
|
11
11
|
import "./chunks/trending-up-CJCof9CA.js";
|
|
12
12
|
// dist/components/bk-stat.js
|
|
@@ -15,6 +15,7 @@ var h = class extends n {
|
|
|
15
15
|
static properties = {
|
|
16
16
|
label: {},
|
|
17
17
|
value: {},
|
|
18
|
+
valueText: { attribute: "value-text" },
|
|
18
19
|
unit: {},
|
|
19
20
|
valueFormat: {
|
|
20
21
|
attribute: "value-format",
|
|
@@ -33,6 +34,7 @@ var h = class extends n {
|
|
|
33
34
|
attribute: "delta-format",
|
|
34
35
|
type: Object
|
|
35
36
|
},
|
|
37
|
+
deltaText: { attribute: "delta-text" },
|
|
36
38
|
deltaLabel: { attribute: "delta-label" },
|
|
37
39
|
inverted: {
|
|
38
40
|
type: Boolean,
|
|
@@ -105,6 +107,7 @@ var h = class extends n {
|
|
|
105
107
|
`
|
|
106
108
|
];
|
|
107
109
|
formattedValue() {
|
|
110
|
+
if (this.valueText) return this.valueText;
|
|
108
111
|
let e = this.value;
|
|
109
112
|
if (e == null || e === "") return "–";
|
|
110
113
|
let t = typeof e == "number" ? e : Number(e);
|
|
@@ -113,14 +116,14 @@ var h = class extends n {
|
|
|
113
116
|
renderDelta() {
|
|
114
117
|
let n = this.delta;
|
|
115
118
|
if (n == null || !Number.isFinite(n)) return t;
|
|
116
|
-
let r = this.i18n.locale, i = m(n), a = f(i, this.inverted), o = p(r, n, this.deltaFormat), s = u(r, i === "up" ? "statUp" : i === "down" ? "statDown" : "statFlat");
|
|
119
|
+
let r = this.i18n.locale, i = m(n), a = f(i, this.inverted), o = this.deltaText || p(r, n, this.deltaFormat), s = u(r, i === "up" ? "statUp" : i === "down" ? "statDown" : "statFlat");
|
|
117
120
|
return e`<div class="delta" part="delta">
|
|
118
121
|
<span class="change ${a}" part="change">${i === "flat" ? t : e`<bk-icon name=${i === "up" ? "trending-up" : "trending-down"} size="sm"></bk-icon>`}<span class="sr-only">${s} </span>${o}</span>
|
|
119
122
|
${this.deltaLabel ? e`<span class="period">${this.deltaLabel}</span>` : t}
|
|
120
123
|
</div>`;
|
|
121
124
|
}
|
|
122
125
|
render() {
|
|
123
|
-
let n = !!this.note || this.slots.has(""), r = e`<span class="label" part="label">${this.label}</span>`, i = e`<span class="figure"><span class="value" part="value">${this.formattedValue()}</span>${this.unit ? e`<span class="unit" part="unit">${this.unit}</span>` : t}</span>`, a = this.renderDelta(), o = this.order === "value-first" ? [
|
|
126
|
+
let n = !!this.note || this.slots.has(""), r = e`<span class="label" part="label"><slot name="label">${this.label}</slot></span>`, i = e`<span class="figure"><span class="value" part="value"><slot name="value">${this.formattedValue()}</slot></span>${this.unit ? e`<span class="unit" part="unit">${this.unit}</span>` : t}</span>`, a = this.renderDelta(), o = this.order === "value-first" ? [
|
|
124
127
|
i,
|
|
125
128
|
r,
|
|
126
129
|
a
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
|
|
2
|
-
import { t as i } from "./chunks/define-
|
|
3
|
-
import { t as a } from "./chunks/styles-
|
|
4
|
-
import "./chunks/bk-icon-
|
|
2
|
+
import { t as i } from "./chunks/define-DkVeu7e9.js";
|
|
3
|
+
import { t as a } from "./chunks/styles-CaeyhYDA.js";
|
|
4
|
+
import "./chunks/bk-icon-Bp_flKdv.js";
|
|
5
5
|
import "./chunks/info-DxwIeCXS.js";
|
|
6
6
|
import "./chunks/warning-BxRrPipZ.js";
|
|
7
7
|
// dist/components/bk-status-dot.js
|