@koobiq/components 20.4.1 → 21.0.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/accordion/accordion-trigger.scss +3 -10
- package/accordion/accordion.scss +4 -6
- package/actions-panel/actions-panel-container.scss +45 -1
- package/alert/alert.component.scss +3 -2
- package/app-switcher/_app-switcher-theme.scss +0 -4
- package/app-switcher/app-switcher-dropdown-app.scss +3 -2
- package/app-switcher/app-switcher-dropdown-site.scss +2 -1
- package/app-switcher/{kbq-app-switcher-list-item.scss → app-switcher-list-item.scss} +18 -4
- package/app-switcher/app-switcher-tokens.scss +15 -0
- package/app-switcher/app-switcher.scss +14 -4
- package/autocomplete/autocomplete.scss +7 -6
- package/badge/badge.component.scss +5 -8
- package/breadcrumbs/breadcrumbs.scss +25 -10
- package/button/_button-base.scss +30 -7
- package/button/_button-theme.scss +16 -0
- package/button/button-group.scss +7 -0
- package/button/button-tokens.scss +0 -2
- package/button/button.scss +34 -2
- package/button-toggle/_button-toggle-theme.scss +7 -2
- package/button-toggle/button-toggle.scss +65 -15
- package/checkbox/_checkbox-theme.scss +4 -3
- package/checkbox/checkbox.scss +3 -6
- package/clamped-text/clamped-text.scss +6 -2
- package/code-block/code-block-tokens.scss +0 -224
- package/code-block/code-block.scss +20 -9
- package/content-panel/content-panel-aside.scss +3 -2
- package/content-panel/content-panel-container.scss +37 -0
- package/content-panel/content-panel.scss +4 -3
- package/core/highlight/_highlight-theme.scss +3 -1
- package/core/option/action-container.scss +2 -2
- package/core/option/action.scss +2 -1
- package/core/option/option.scss +2 -1
- package/core/pop-up/_pop-up.scss +0 -37
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +5 -10
- package/core/styles/_core.scss +3 -0
- package/core/styles/_koobiq-theme.scss +5 -6
- package/core/styles/common/_animation.scss +44 -16
- package/core/styles/common/_groups-mixins.scss +21 -19
- package/core/styles/common/_groups.scss +4 -32
- package/core/styles/common/_index.scss +0 -2
- package/core/styles/common/_link.scss +117 -0
- package/core/styles/common/_list.scss +0 -26
- package/core/styles/common/_overlay.scss +8 -10
- package/core/styles/common/_rtl.scss +0 -14
- package/core/styles/common/_select.scss +33 -15
- package/core/styles/common/_squircle.scss +63 -0
- package/core/styles/common/_tokens.scss +0 -11
- package/core/styles/common/_vendor-prefixes.scss +0 -20
- package/core/styles/functions/_timing.scss +0 -22
- package/core/styles/theming/_scrollbar-theme.scss +6 -1
- package/core/styles/theming/_theming.scss +13 -65
- package/core/styles/typography/_index.scss +0 -1
- package/core/styles/typography/_typography.scss +0 -143
- package/core/styles/visual/_body.scss +1 -6
- package/core/styles/visual/_layout.scss +0 -12
- package/datepicker/calendar-body.scss +3 -1
- package/datepicker/calendar-header.scss +0 -1
- package/datepicker/datepicker-content.scss +33 -1
- package/datepicker/datepicker-toggle.scss +0 -38
- package/dl/dl-tokens.scss +10 -0
- package/dl/dl.scss +113 -13
- package/dropdown/_dropdown-theme.scss +4 -16
- package/dropdown/dropdown-item.scss +4 -10
- package/dropdown/dropdown.scss +2 -1
- package/empty-state/_empty-state-theme.scss +10 -4
- package/empty-state/empty-state-tokens.scss +4 -4
- package/empty-state/empty-state.scss +4 -0
- package/fesm2022/koobiq-components-accordion.mjs +347 -229
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +302 -187
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +39 -39
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +677 -367
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +620 -253
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +46 -48
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +221 -169
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +565 -196
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +332 -116
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +172 -132
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +165 -158
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +755 -601
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +260 -143
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +4342 -1595
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +1713 -1606
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +73 -36
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +447 -89
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +703 -599
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +20 -20
- package/fesm2022/koobiq-components-dynamic-translation.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +46 -31
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +116 -60
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +550 -290
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +2810 -2538
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +79 -24
- package/fesm2022/koobiq-components-flag.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +389 -525
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +366 -136
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +429 -212
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +601 -459
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link-deprecated.mjs +196 -0
- package/fesm2022/koobiq-components-link-deprecated.mjs.map +1 -0
- package/fesm2022/koobiq-components-link.mjs +328 -125
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +583 -433
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +167 -68
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +55 -78
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +853 -475
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +895 -556
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +680 -310
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +46 -64
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +684 -285
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +87 -33
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +52 -43
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +450 -231
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-resizer.mjs +127 -21
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar-deprecated.mjs +299 -0
- package/fesm2022/koobiq-components-scrollbar-deprecated.mjs.map +1 -0
- package/fesm2022/koobiq-components-scrollbar.mjs +745 -222
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +288 -126
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +883 -693
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +207 -88
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +689 -296
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +815 -41
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +109 -88
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter-deprecated.mjs +591 -0
- package/fesm2022/koobiq-components-splitter-deprecated.mjs.map +1 -0
- package/fesm2022/koobiq-components-splitter.mjs +890 -501
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +63 -49
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +1062 -603
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +886 -733
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +213 -185
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +299 -147
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +233 -245
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +344 -142
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +229 -145
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +486 -165
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +177 -130
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +657 -214
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +61 -32
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +719 -488
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +1506 -558
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +290 -135
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/dropzone.scss +31 -3
- package/file-upload/file-upload-tokens.scss +2 -22
- package/file-upload/file-upload.scss +6 -0
- package/file-upload/multiple-file-upload.component.scss +14 -12
- package/file-upload/single-file-upload.component.scss +3 -2
- package/filter-bar/filters.scss +7 -0
- package/filter-bar/pipes/base-pipe.scss +3 -3
- package/filter-bar/pipes/pipe-date.scss +8 -1
- package/flag/flag-tokens.scss +22 -0
- package/flag/flag.scss +34 -21
- package/form-field/{_fiedset-theme.scss → _fieldset-theme.scss} +1 -5
- package/form-field/_form-field-theme.scss +4 -9
- package/form-field/cleaner.scss +3 -1
- package/form-field/fieldset.scss +3 -4
- package/form-field/form-field.scss +26 -21
- package/form-field/password-toggle.scss +3 -1
- package/icon/_icon-button-theme.scss +7 -0
- package/icon/_icon-theme.scss +10 -7
- package/icon/icon-button.scss +0 -2
- package/icon/icon-tokens.scss +12 -9
- package/inline-edit/inline-edit.scss +40 -54
- package/input/input.scss +4 -0
- package/link/{_link-theme.scss → deprecated/_link-theme.scss} +11 -6
- package/link/deprecated/link-tokens.scss +27 -0
- package/link/link-tokens.scss +6 -25
- package/link/link.scss +137 -0
- package/list/list.scss +3 -2
- package/loader-overlay/_loader-overlay-theme.scss +19 -10
- package/loader-overlay/loader-overlay-tokens.scss +0 -2
- package/loader-overlay/loader-overlay.scss +7 -1
- package/markdown/_markdown-theme.scss +16 -0
- package/markdown/markdown-tokens.scss +5 -0
- package/markdown/markdown.scss +2 -1
- package/modal/_modal-animation.scss +23 -14
- package/modal/modal-tokens.scss +2 -1
- package/modal/modal.scss +35 -31
- package/navbar/_navbar-item_horizontal.scss +8 -6
- package/navbar/_navbar-item_vertical.scss +18 -6
- package/navbar/_navbar-theme.scss +9 -1
- package/navbar/navbar-brand.scss +8 -6
- package/navbar/navbar-divider.scss +1 -1
- package/navbar/navbar-item.scss +8 -9
- package/navbar/navbar-toggle.scss +3 -3
- package/navbar/navbar-tokens.scss +14 -0
- package/navbar/navbar.scss +1 -2
- package/navbar/vertical-navbar.scss +2 -2
- package/notification-center/_notification-center-theme.scss +11 -6
- package/notification-center/notification-center-tokens.scss +33 -0
- package/notification-center/notification-center.scss +58 -20
- package/notification-center/notification-item.scss +15 -6
- package/package.json +112 -81
- package/popover/popover-tokens.scss +0 -2
- package/popover/popover.scss +41 -19
- package/prebuilt-themes/theme.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +20 -3
- package/progress-bar/progress-bar-tokens.scss +3 -0
- package/progress-bar/progress-bar.scss +36 -8
- package/progress-spinner/progress-spinner.scss +4 -3
- package/radio/_radio-theme.scss +21 -4
- package/radio/radio-tokens.scss +7 -3
- package/radio/radio.scss +55 -8
- package/schematics/collection.json +399 -7
- package/schematics/migrations/accordion-state-saving-default/README.md +60 -0
- package/schematics/migrations/accordion-state-saving-default/data.js +75 -0
- package/schematics/migrations/accordion-state-saving-default/index.js +60 -0
- package/schematics/migrations/accordion-state-saving-default/schema.json +15 -0
- package/schematics/migrations/actions-panel-overlay-container/README.md +35 -0
- package/schematics/migrations/actions-panel-overlay-container/data.js +47 -0
- package/schematics/migrations/actions-panel-overlay-container/index.js +54 -0
- package/schematics/migrations/actions-panel-overlay-container/schema.json +15 -0
- package/schematics/migrations/alert-signals/README.md +13 -7
- package/schematics/migrations/alert-signals/data.js +3 -0
- package/schematics/migrations/alert-signals/index.js +70 -203
- package/schematics/migrations/angular-animations-removal/README.md +46 -0
- package/schematics/migrations/angular-animations-removal/data.js +150 -0
- package/schematics/migrations/angular-animations-removal/index.js +20 -0
- package/schematics/migrations/angular-animations-removal/schema.json +15 -0
- package/schematics/migrations/app-switcher-signals/README.md +88 -0
- package/schematics/migrations/app-switcher-signals/data.js +136 -0
- package/schematics/migrations/app-switcher-signals/index.js +365 -0
- package/schematics/migrations/app-switcher-signals/schema.json +20 -0
- package/schematics/migrations/autocomplete-panel-width-auto/README.md +2 -2
- package/schematics/migrations/autocomplete-panel-width-auto/index.js +1 -1
- package/schematics/migrations/autocomplete-signals/README.md +92 -0
- package/schematics/migrations/autocomplete-signals/data.js +149 -0
- package/schematics/migrations/autocomplete-signals/index.js +706 -0
- package/schematics/migrations/autocomplete-signals/schema.json +20 -0
- package/schematics/migrations/badge-signals/README.md +77 -0
- package/schematics/migrations/badge-signals/data.js +109 -0
- package/schematics/migrations/badge-signals/index.js +693 -0
- package/schematics/migrations/badge-signals/schema.json +20 -0
- package/schematics/migrations/button-state-and-styles/README.md +129 -0
- package/schematics/migrations/button-state-and-styles/data.js +136 -0
- package/schematics/migrations/button-state-and-styles/index.js +220 -0
- package/schematics/migrations/button-state-and-styles/schema.json +20 -0
- package/schematics/migrations/button-supported-colors/README.md +73 -0
- package/schematics/migrations/button-supported-colors/data.js +106 -0
- package/schematics/migrations/button-supported-colors/index.js +260 -0
- package/schematics/migrations/button-supported-colors/schema.json +20 -0
- package/schematics/migrations/button-toggle-signals-and-aria/README.md +137 -0
- package/schematics/migrations/button-toggle-signals-and-aria/data.js +200 -0
- package/schematics/migrations/button-toggle-signals-and-aria/index.js +496 -0
- package/schematics/migrations/button-toggle-signals-and-aria/schema.json +20 -0
- package/schematics/migrations/button-truncation/README.md +110 -0
- package/schematics/migrations/button-truncation/data.js +88 -0
- package/schematics/migrations/button-truncation/index.js +269 -0
- package/schematics/migrations/button-truncation/schema.json +20 -0
- package/schematics/migrations/checkbox-signals/README.md +76 -0
- package/schematics/migrations/checkbox-signals/data.js +114 -0
- package/schematics/migrations/checkbox-signals/index.js +634 -0
- package/schematics/migrations/checkbox-signals/schema.json +20 -0
- package/schematics/migrations/clamped-text-disclosure/README.md +62 -0
- package/schematics/migrations/clamped-text-disclosure/data.js +101 -0
- package/schematics/migrations/clamped-text-disclosure/index.js +59 -0
- package/schematics/migrations/clamped-text-disclosure/schema.json +15 -0
- package/schematics/migrations/code-block-signals/README.md +84 -0
- package/schematics/migrations/code-block-signals/data.js +121 -0
- package/schematics/migrations/code-block-signals/index.js +700 -0
- package/schematics/migrations/code-block-signals/schema.json +20 -0
- package/schematics/migrations/color-signals/README.md +46 -0
- package/schematics/migrations/color-signals/data.js +131 -0
- package/schematics/migrations/color-signals/index.js +19 -0
- package/schematics/migrations/color-signals/schema.json +20 -0
- package/schematics/migrations/core-mixins-removal/README.md +20 -0
- package/schematics/migrations/core-mixins-removal/data.js +27 -0
- package/schematics/migrations/core-mixins-removal/index.js +17 -0
- package/schematics/migrations/core-mixins-removal/schema.json +15 -0
- package/schematics/migrations/css-selectors/README.md +2 -2
- package/schematics/migrations/css-selectors/index.js +1 -1
- package/schematics/migrations/datepicker-signals/README.md +24 -0
- package/schematics/migrations/datepicker-signals/data.js +49 -0
- package/schematics/migrations/datepicker-signals/index.js +17 -0
- package/schematics/migrations/datepicker-signals/schema.json +15 -0
- package/schematics/migrations/deprecated-icons/README.md +2 -2
- package/schematics/migrations/deprecated-icons/index.js +1 -1
- package/schematics/migrations/design-tokens-v4/README.md +75 -0
- package/schematics/migrations/design-tokens-v4/index.js +59 -0
- package/schematics/migrations/design-tokens-v4/schema.json +15 -0
- package/schematics/migrations/divider-signals-and-aria/README.md +47 -0
- package/schematics/migrations/divider-signals-and-aria/data.js +62 -0
- package/schematics/migrations/divider-signals-and-aria/index.js +211 -0
- package/schematics/migrations/divider-signals-and-aria/schema.json +15 -0
- package/schematics/migrations/dl-attribute-coercion/README.md +59 -0
- package/schematics/migrations/dl-attribute-coercion/data.js +85 -0
- package/schematics/migrations/dl-attribute-coercion/index.js +161 -0
- package/schematics/migrations/dl-attribute-coercion/schema.json +15 -0
- package/schematics/migrations/dl-standalone-names/README.md +49 -0
- package/schematics/migrations/dl-standalone-names/data.js +44 -0
- package/schematics/migrations/dl-standalone-names/index.js +321 -0
- package/schematics/migrations/dl-standalone-names/schema.json +20 -0
- package/schematics/migrations/dropdown-demote-overlay/README.md +137 -0
- package/schematics/migrations/dropdown-demote-overlay/data.js +84 -0
- package/schematics/migrations/dropdown-demote-overlay/index.js +288 -0
- package/schematics/migrations/dropdown-demote-overlay/schema.json +20 -0
- package/schematics/migrations/dropdown-signals/README.md +83 -0
- package/schematics/migrations/dropdown-signals/data.js +152 -0
- package/schematics/migrations/dropdown-signals/index.js +19 -0
- package/schematics/migrations/dropdown-signals/schema.json +20 -0
- package/schematics/migrations/empty-state-error-color/README.md +84 -0
- package/schematics/migrations/empty-state-error-color/data.js +85 -0
- package/schematics/migrations/empty-state-error-color/index.js +71 -0
- package/schematics/migrations/empty-state-error-color/schema.json +15 -0
- package/schematics/migrations/empty-state-size-attr/README.md +2 -2
- package/schematics/migrations/empty-state-size-attr/index.js +1 -1
- package/schematics/migrations/file-upload-cva-and-primitives/README.md +70 -0
- package/schematics/migrations/file-upload-cva-and-primitives/data.js +97 -0
- package/schematics/migrations/file-upload-cva-and-primitives/index.js +60 -0
- package/schematics/migrations/file-upload-cva-and-primitives/schema.json +15 -0
- package/schematics/migrations/file-upload-deprecated-outputs/README.md +90 -0
- package/schematics/migrations/file-upload-deprecated-outputs/data.js +20 -0
- package/schematics/migrations/file-upload-deprecated-outputs/index.js +70 -0
- package/schematics/migrations/file-upload-deprecated-outputs/schema.json +20 -0
- package/schematics/migrations/filter-bar-rename-action/README.md +183 -0
- package/schematics/migrations/filter-bar-rename-action/data.js +151 -0
- package/schematics/migrations/filter-bar-rename-action/index.js +177 -0
- package/schematics/migrations/filter-bar-rename-action/schema.json +20 -0
- package/schematics/migrations/filter-bar-signals/README.md +27 -16
- package/schematics/migrations/filter-bar-signals/data.js +1 -2
- package/schematics/migrations/filter-bar-signals/index.js +100 -195
- package/schematics/migrations/filter-bar-state-saving-default/README.md +53 -0
- package/schematics/migrations/filter-bar-state-saving-default/data.js +87 -0
- package/schematics/migrations/filter-bar-state-saving-default/index.js +61 -0
- package/schematics/migrations/filter-bar-state-saving-default/schema.json +15 -0
- package/schematics/migrations/flag-inner-html/README.md +67 -0
- package/schematics/migrations/flag-inner-html/data.js +58 -0
- package/schematics/migrations/flag-inner-html/index.js +61 -0
- package/schematics/migrations/flag-inner-html/schema.json +15 -0
- package/schematics/migrations/form-field-signals/README.md +125 -0
- package/schematics/migrations/form-field-signals/data.js +288 -0
- package/schematics/migrations/form-field-signals/index.js +382 -0
- package/schematics/migrations/form-field-signals/schema.json +20 -0
- package/schematics/migrations/icon-semantics-and-api/README.md +65 -0
- package/schematics/migrations/icon-semantics-and-api/data.js +97 -0
- package/schematics/migrations/icon-semantics-and-api/index.js +64 -0
- package/schematics/migrations/icon-semantics-and-api/schema.json +15 -0
- package/schematics/migrations/icons-replacement/README.md +5 -5
- package/schematics/migrations/icons-replacement/index.js +1 -1
- package/schematics/migrations/inline-edit-a11y-and-types/README.md +82 -0
- package/schematics/migrations/inline-edit-a11y-and-types/data.js +117 -0
- package/schematics/migrations/inline-edit-a11y-and-types/index.js +97 -0
- package/schematics/migrations/inline-edit-a11y-and-types/schema.json +20 -0
- package/schematics/migrations/input-number-surface/README.md +140 -0
- package/schematics/migrations/input-number-surface/data.js +135 -0
- package/schematics/migrations/input-number-surface/index.js +292 -0
- package/schematics/migrations/input-number-surface/schema.json +20 -0
- package/schematics/migrations/input-signals/README.md +20 -0
- package/schematics/migrations/input-signals/data.js +30 -0
- package/schematics/migrations/input-signals/index.js +17 -0
- package/schematics/migrations/input-signals/schema.json +15 -0
- package/schematics/migrations/link-deprecated-path/README.md +144 -0
- package/schematics/migrations/link-deprecated-path/index.js +19 -0
- package/schematics/migrations/link-deprecated-path/schema.json +20 -0
- package/schematics/migrations/link-signals/README.md +71 -0
- package/schematics/migrations/link-signals/data.js +116 -0
- package/schematics/migrations/link-signals/index.js +415 -0
- package/schematics/migrations/link-signals/schema.json +20 -0
- package/schematics/migrations/list-signals/README.md +22 -0
- package/schematics/migrations/list-signals/data.js +35 -0
- package/schematics/migrations/list-signals/index.js +17 -0
- package/schematics/migrations/list-signals/schema.json +15 -0
- package/schematics/migrations/list-tree-multiple-input/README.md +105 -0
- package/schematics/migrations/list-tree-multiple-input/data.js +74 -0
- package/schematics/migrations/list-tree-multiple-input/index.js +221 -0
- package/schematics/migrations/list-tree-multiple-input/schema.json +20 -0
- package/schematics/migrations/loader-overlay-signals/README.md +62 -0
- package/schematics/migrations/loader-overlay-signals/data.js +101 -0
- package/schematics/migrations/loader-overlay-signals/index.js +697 -0
- package/schematics/migrations/loader-overlay-signals/schema.json +20 -0
- package/schematics/migrations/loader-overlay-size-attr/README.md +2 -2
- package/schematics/migrations/loader-overlay-size-attr/index.js +1 -1
- package/schematics/migrations/locale-configuration-providers/README.md +163 -0
- package/schematics/migrations/locale-configuration-providers/data.js +257 -0
- package/schematics/migrations/locale-configuration-providers/index.js +294 -0
- package/schematics/migrations/locale-configuration-providers/schema.json +20 -0
- package/schematics/migrations/mandatory-peer-dependencies/README.md +70 -0
- package/schematics/migrations/mandatory-peer-dependencies/index.js +42 -0
- package/schematics/migrations/mandatory-peer-dependencies/schema.json +15 -0
- package/schematics/migrations/markdown-signals/README.md +58 -0
- package/schematics/migrations/markdown-signals/data.js +79 -0
- package/schematics/migrations/markdown-signals/index.js +639 -0
- package/schematics/migrations/markdown-signals/schema.json +20 -0
- package/schematics/migrations/modal-dialog-semantics/README.md +106 -0
- package/schematics/migrations/modal-dialog-semantics/data.js +110 -0
- package/schematics/migrations/modal-dialog-semantics/index.js +58 -0
- package/schematics/migrations/modal-dialog-semantics/schema.json +15 -0
- package/schematics/migrations/modal-signals/README.md +88 -0
- package/schematics/migrations/modal-signals/data.js +132 -0
- package/schematics/migrations/modal-signals/index.js +19 -0
- package/schematics/migrations/modal-signals/schema.json +20 -0
- package/schematics/migrations/navbar-signals-and-aria/README.md +111 -0
- package/schematics/migrations/navbar-signals-and-aria/data.js +198 -0
- package/schematics/migrations/navbar-signals-and-aria/index.js +568 -0
- package/schematics/migrations/navbar-signals-and-aria/schema.json +20 -0
- package/schematics/migrations/new-icons-pack/README.md +10 -10
- package/schematics/migrations/new-icons-pack/index.js +1 -1
- package/schematics/migrations/notification-center-signals/README.md +67 -0
- package/schematics/migrations/notification-center-signals/data.js +66 -0
- package/schematics/migrations/notification-center-signals/index.js +61 -0
- package/schematics/migrations/notification-center-signals/schema.json +15 -0
- package/schematics/migrations/option-signals/README.md +37 -0
- package/schematics/migrations/option-signals/data.js +86 -0
- package/schematics/migrations/option-signals/index.js +19 -0
- package/schematics/migrations/option-signals/schema.json +20 -0
- package/schematics/migrations/popover-leave-delay/README.md +51 -0
- package/schematics/migrations/popover-leave-delay/data.js +61 -0
- package/schematics/migrations/popover-leave-delay/index.js +54 -0
- package/schematics/migrations/popover-leave-delay/schema.json +15 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/README.md +54 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/data.js +76 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/index.js +58 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/schema.json +15 -0
- package/schematics/migrations/progress-spinner-signals/README.md +72 -0
- package/schematics/migrations/progress-spinner-signals/data.js +83 -0
- package/schematics/migrations/progress-spinner-signals/index.js +694 -0
- package/schematics/migrations/progress-spinner-signals/schema.json +20 -0
- package/schematics/migrations/query-list-signals/README.md +32 -0
- package/schematics/migrations/query-list-signals/data.js +70 -0
- package/schematics/migrations/query-list-signals/index.js +17 -0
- package/schematics/migrations/query-list-signals/schema.json +15 -0
- package/schematics/migrations/radio-signals-and-aria/README.md +82 -0
- package/schematics/migrations/radio-signals-and-aria/data.js +163 -0
- package/schematics/migrations/radio-signals-and-aria/index.js +39 -0
- package/schematics/migrations/radio-signals-and-aria/schema.json +20 -0
- package/schematics/migrations/read-state-dwell-handlers/README.md +125 -0
- package/schematics/migrations/read-state-dwell-handlers/data.js +45 -0
- package/schematics/migrations/read-state-dwell-handlers/index.js +215 -0
- package/schematics/migrations/read-state-dwell-handlers/schema.json +20 -0
- package/schematics/migrations/scrollbar-deprecated-path/README.md +128 -0
- package/schematics/migrations/scrollbar-deprecated-path/index.js +20 -0
- package/schematics/migrations/scrollbar-deprecated-path/schema.json +20 -0
- package/schematics/migrations/select-signal-inputs/README.md +61 -0
- package/schematics/migrations/select-signal-inputs/data.js +99 -0
- package/schematics/migrations/select-signal-inputs/index.js +57 -0
- package/schematics/migrations/select-signal-inputs/schema.json +15 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/README.md +57 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/data.js +111 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/index.js +57 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/schema.json +15 -0
- package/schematics/migrations/signal-inputs-subclasses/README.md +28 -0
- package/schematics/migrations/signal-inputs-subclasses/data.js +69 -0
- package/schematics/migrations/signal-inputs-subclasses/index.js +17 -0
- package/schematics/migrations/signal-inputs-subclasses/schema.json +15 -0
- package/schematics/migrations/split-button-optional-disabled/README.md +47 -0
- package/schematics/migrations/split-button-optional-disabled/data.js +53 -0
- package/schematics/migrations/split-button-optional-disabled/index.js +57 -0
- package/schematics/migrations/split-button-optional-disabled/schema.json +15 -0
- package/schematics/migrations/splitter-deprecated-path/README.md +136 -0
- package/schematics/migrations/splitter-deprecated-path/index.js +20 -0
- package/schematics/migrations/splitter-deprecated-path/schema.json +20 -0
- package/schematics/migrations/state-saving-default/README.md +67 -0
- package/schematics/migrations/state-saving-default/data.js +88 -0
- package/schematics/migrations/state-saving-default/index.js +62 -0
- package/schematics/migrations/state-saving-default/schema.json +15 -0
- package/schematics/migrations/table-cell-content/README.md +55 -0
- package/schematics/migrations/table-cell-content/data.js +66 -0
- package/schematics/migrations/table-cell-content/index.js +66 -0
- package/schematics/migrations/table-cell-content/schema.json +15 -0
- package/schematics/migrations/tabs-signals-and-aria/README.md +93 -0
- package/schematics/migrations/tabs-signals-and-aria/data.js +139 -0
- package/schematics/migrations/tabs-signals-and-aria/index.js +65 -0
- package/schematics/migrations/tabs-signals-and-aria/schema.json +15 -0
- package/schematics/migrations/tag-list-cleaner/README.md +58 -0
- package/schematics/migrations/tag-list-cleaner/data.js +42 -0
- package/schematics/migrations/tag-list-cleaner/index.js +196 -0
- package/schematics/migrations/tag-list-cleaner/schema.json +20 -0
- package/schematics/migrations/tag-slots/README.md +41 -0
- package/schematics/migrations/tag-slots/index.js +190 -0
- package/schematics/migrations/tag-slots/schema.json +20 -0
- package/schematics/migrations/tags-signals/README.md +85 -0
- package/schematics/migrations/tags-signals/data.js +103 -0
- package/schematics/migrations/tags-signals/index.js +673 -0
- package/schematics/migrations/tags-signals/schema.json +20 -0
- package/schematics/migrations/textarea-signals/README.md +72 -0
- package/schematics/migrations/textarea-signals/data.js +121 -0
- package/schematics/migrations/textarea-signals/index.js +379 -0
- package/schematics/migrations/textarea-signals/schema.json +20 -0
- package/schematics/migrations/time-range-title-for/README.md +164 -0
- package/schematics/migrations/time-range-title-for/data.js +139 -0
- package/schematics/migrations/time-range-title-for/index.js +163 -0
- package/schematics/migrations/time-range-title-for/schema.json +20 -0
- package/schematics/migrations/timepicker-signals/README.md +78 -0
- package/schematics/migrations/timepicker-signals/data.js +82 -0
- package/schematics/migrations/timepicker-signals/index.js +709 -0
- package/schematics/migrations/timepicker-signals/schema.json +20 -0
- package/schematics/migrations/timezone-grouping-utils/README.md +73 -0
- package/schematics/migrations/timezone-grouping-utils/data.js +101 -0
- package/schematics/migrations/timezone-grouping-utils/index.js +64 -0
- package/schematics/migrations/timezone-grouping-utils/schema.json +15 -0
- package/schematics/migrations/title-encapsulation/README.md +49 -0
- package/schematics/migrations/title-encapsulation/data.js +69 -0
- package/schematics/migrations/title-encapsulation/index.js +57 -0
- package/schematics/migrations/title-encapsulation/schema.json +15 -0
- package/schematics/migrations/toast-stack-and-defaults/README.md +102 -0
- package/schematics/migrations/toast-stack-and-defaults/data.js +79 -0
- package/schematics/migrations/toast-stack-and-defaults/index.js +53 -0
- package/schematics/migrations/toast-stack-and-defaults/schema.json +15 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/README.md +53 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/data.js +89 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/index.js +60 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/schema.json +15 -0
- package/schematics/migrations/top-bar-container-selectors/README.md +111 -0
- package/schematics/migrations/top-bar-container-selectors/data.js +56 -0
- package/schematics/migrations/top-bar-container-selectors/index.js +84 -0
- package/schematics/migrations/top-bar-container-selectors/schema.json +20 -0
- package/schematics/migrations/tree-select-signals/README.md +61 -0
- package/schematics/migrations/tree-select-signals/data.js +106 -0
- package/schematics/migrations/tree-select-signals/index.js +58 -0
- package/schematics/migrations/tree-select-signals/schema.json +15 -0
- package/schematics/migrations/tree-signals/README.md +82 -0
- package/schematics/migrations/tree-signals/data.js +123 -0
- package/schematics/migrations/tree-signals/index.js +54 -0
- package/schematics/migrations/tree-signals/schema.json +15 -0
- package/schematics/migrations/tree-state-saving-default/README.md +66 -0
- package/schematics/migrations/tree-state-saving-default/data.js +78 -0
- package/schematics/migrations/tree-state-saving-default/index.js +60 -0
- package/schematics/migrations/tree-state-saving-default/schema.json +15 -0
- package/schematics/migrations/username-pipe-injection/README.md +59 -0
- package/schematics/migrations/username-pipe-injection/data.js +78 -0
- package/schematics/migrations/username-pipe-injection/index.js +58 -0
- package/schematics/migrations/username-pipe-injection/schema.json +15 -0
- package/schematics/migrations/v20-upgrade/README.md +36 -16
- package/schematics/migrations/v20-upgrade/data.js +124 -77
- package/schematics/migrations/v20-upgrade/index.js +6 -213
- package/schematics/migrations/v21-upgrade/README.md +271 -0
- package/schematics/migrations/v21-upgrade/data.js +1371 -0
- package/schematics/migrations/v21-upgrade/index.js +94 -0
- package/schematics/migrations/v21-upgrade/schema.json +20 -0
- package/schematics/migrations/zoneless-change-detection/README.md +30 -0
- package/schematics/migrations/zoneless-change-detection/data.js +29 -0
- package/schematics/migrations/zoneless-change-detection/index.js +20 -0
- package/schematics/migrations/zoneless-change-detection/schema.json +15 -0
- package/schematics/migrations.json +392 -2
- package/schematics/ng-add/index.js +515 -14
- package/schematics/ng-add/schema.json +15 -0
- package/schematics/utils/deprecated-path-migration.js +61 -0
- package/schematics/utils/package-config.js +9 -105
- package/scrollbar/{_scrollbar-component-theme.scss → deprecated/_scrollbar-component-theme.scss} +1 -1
- package/scrollbar/{scrollbar.component.scss → deprecated/scrollbar.component.scss} +1 -1
- package/scrollbar/native-scrollbar.scss +68 -0
- package/scrollbar/scrollbar-tokens.scss +13 -22
- package/scrollbar/scrollbar-track.scss +94 -0
- package/scrollbar/scrollbar-viewport.scss +33 -0
- package/scrollbar/scrollbar.scss +24 -0
- package/search-expandable/search-expandable-tokens.scss +4 -0
- package/search-expandable/search-expandable.scss +4 -2
- package/select/_select-theme.scss +3 -16
- package/select/select.scss +0 -6
- package/sidebar/sidebar.scss +20 -0
- package/sidepanel/_sidepanel-theme.scss +1 -1
- package/sidepanel/sidepanel-tokens.scss +7 -1
- package/sidepanel/sidepanel.scss +41 -5
- package/skeleton/skeleton-presets.scss +350 -0
- package/skeleton/skeleton-tokens.scss +127 -0
- package/skeleton/skeleton.scss +53 -45
- package/split-button/_split-button-theme.scss +4 -4
- package/split-button/split-button.scss +2 -6
- package/splitter/{_splitter-theme.scss → deprecated/_splitter-theme.scss} +1 -1
- package/splitter/deprecated/splitter.scss +51 -0
- package/splitter/splitter-tokens.scss +19 -0
- package/splitter/splitter.scss +148 -28
- package/table/_table-theme.scss +13 -12
- package/table/table-tokens.scss +8 -0
- package/table/table.scss +47 -22
- package/tabs/_tabs-common.scss +14 -14
- package/tabs/_tabs-theme.scss +4 -5
- package/tabs/tab-body.scss +49 -1
- package/tabs/tab-header.scss +2 -1
- package/tags/tag-list.scss +4 -0
- package/tags/tag.scss +19 -1
- package/time-range/time-range.scss +9 -0
- package/timezone/timezone-option.component.scss +4 -7
- package/timezone/timezone-select.component.scss +3 -0
- package/toast/_toast-theme.scss +1 -4
- package/toast/toast-container.component.scss +19 -13
- package/toast/toast-tokens.scss +12 -6
- package/toast/toast.component.scss +42 -19
- package/toggle/_toggle-theme.scss +4 -10
- package/toggle/toggle.scss +67 -26
- package/tooltip/_tooltip-theme.scss +7 -1
- package/tooltip/tooltip-tokens.scss +1 -2
- package/tooltip/tooltip.scss +55 -9
- package/top-bar/top-bar-tokens.scss +13 -2
- package/top-bar/top-bar.scss +24 -19
- package/tree/_tree-theme.scss +0 -1
- package/tree/toggle.scss +5 -9
- package/tree/tree-option.scss +2 -4
- package/tree/tree-tokens.scss +2 -1
- package/tree/tree.scss +3 -5
- package/tree-select/_tree-select-theme.scss +4 -15
- package/tree-select/tree-select-tokens.scss +16 -0
- package/tree-select/tree-select.scss +0 -6
- package/{accordion/index.d.ts → types/koobiq-components-accordion.d.ts} +102 -84
- package/{actions-panel/index.d.ts → types/koobiq-components-actions-panel.d.ts} +44 -59
- package/{alert/index.d.ts → types/koobiq-components-alert.d.ts} +8 -3
- package/types/koobiq-components-app-switcher.d.ts +406 -0
- package/types/koobiq-components-autocomplete.d.ts +443 -0
- package/{badge/index.d.ts → types/koobiq-components-badge.d.ts} +25 -20
- package/{breadcrumbs/index.d.ts → types/koobiq-components-breadcrumbs.d.ts} +97 -46
- package/types/koobiq-components-button-toggle.d.ts +340 -0
- package/types/koobiq-components-button.d.ts +296 -0
- package/types/koobiq-components-checkbox.d.ts +172 -0
- package/types/koobiq-components-clamped-text.d.ts +184 -0
- package/{code-block/index.d.ts → types/koobiq-components-code-block.d.ts} +114 -79
- package/{content-panel/index.d.ts → types/koobiq-components-content-panel.d.ts} +81 -25
- package/{core/index.d.ts → types/koobiq-components-core.d.ts} +2827 -865
- package/{datepicker/index.d.ts → types/koobiq-components-datepicker.d.ts} +161 -116
- package/types/koobiq-components-divider.d.ts +43 -0
- package/types/koobiq-components-dl.d.ts +235 -0
- package/{dropdown/index.d.ts → types/koobiq-components-dropdown.d.ts} +245 -239
- package/types/koobiq-components-ellipsis-center.d.ts +85 -0
- package/types/koobiq-components-empty-state.d.ts +106 -0
- package/{file-upload/index.d.ts → types/koobiq-components-file-upload.d.ts} +214 -107
- package/{filter-bar/index.d.ts → types/koobiq-components-filter-bar.d.ts} +410 -495
- package/types/koobiq-components-flag.d.ts +68 -0
- package/{form-field/index.d.ts → types/koobiq-components-form-field.d.ts} +167 -191
- package/types/koobiq-components-icon.d.ts +333 -0
- package/{inline-edit/index.d.ts → types/koobiq-components-inline-edit.d.ts} +109 -46
- package/types/koobiq-components-input.d.ts +477 -0
- package/types/koobiq-components-link-deprecated.d.ts +101 -0
- package/types/koobiq-components-link.d.ts +176 -0
- package/{list/index.d.ts → types/koobiq-components-list.d.ts} +162 -99
- package/types/koobiq-components-loader-overlay.d.ts +101 -0
- package/{markdown/index.d.ts → types/koobiq-components-markdown.d.ts} +16 -24
- package/types/koobiq-components-modal.d.ts +666 -0
- package/types/koobiq-components-navbar.d.ts +569 -0
- package/types/koobiq-components-notification-center.d.ts +500 -0
- package/{overflow-items/index.d.ts → types/koobiq-components-overflow-items.d.ts} +8 -22
- package/types/koobiq-components-popover.d.ts +468 -0
- package/types/koobiq-components-progress-bar.d.ts +67 -0
- package/{progress-spinner/index.d.ts → types/koobiq-components-progress-spinner.d.ts} +33 -10
- package/types/koobiq-components-radio.d.ts +294 -0
- package/{resizer/index.d.ts → types/koobiq-components-resizer.d.ts} +37 -2
- package/{scrollbar/index.d.ts → types/koobiq-components-scrollbar-deprecated.d.ts} +18 -1
- package/types/koobiq-components-scrollbar.d.ts +154 -0
- package/types/koobiq-components-search-expandable.d.ts +164 -0
- package/{select/index.d.ts → types/koobiq-components-select.d.ts} +360 -167
- package/types/koobiq-components-sidebar.d.ts +152 -0
- package/types/koobiq-components-sidepanel.d.ts +436 -0
- package/types/koobiq-components-skeleton.d.ts +234 -0
- package/types/koobiq-components-split-button.d.ts +65 -0
- package/{splitter/index.d.ts → types/koobiq-components-splitter-deprecated.d.ts} +44 -1
- package/types/koobiq-components-splitter.d.ts +406 -0
- package/types/koobiq-components-table.d.ts +44 -0
- package/types/koobiq-components-tabs.d.ts +888 -0
- package/{tags/index.d.ts → types/koobiq-components-tags.d.ts} +249 -133
- package/types/koobiq-components-textarea.d.ts +178 -0
- package/{time-range/index.d.ts → types/koobiq-components-time-range.d.ts} +135 -62
- package/types/koobiq-components-timepicker.d.ts +223 -0
- package/types/koobiq-components-timezone.d.ts +266 -0
- package/types/koobiq-components-title.d.ts +184 -0
- package/types/koobiq-components-toast.d.ts +289 -0
- package/types/koobiq-components-toggle.d.ts +121 -0
- package/types/koobiq-components-tooltip.d.ts +610 -0
- package/types/koobiq-components-top-bar.d.ts +61 -0
- package/types/koobiq-components-tree-select.d.ts +667 -0
- package/types/koobiq-components-tree.d.ts +1290 -0
- package/types/koobiq-components-username.d.ts +340 -0
- package/username/_username-theme.scss +35 -0
- package/username/username.scss +10 -34
- package/app-switcher/index.d.ts +0 -276
- package/autocomplete/index.d.ts +0 -286
- package/button/index.d.ts +0 -153
- package/button-toggle/index.d.ts +0 -162
- package/checkbox/index.d.ts +0 -163
- package/clamped-text/index.d.ts +0 -146
- package/core/styles/_tokens.scss +0 -7
- package/core/styles/common/_clearfix.scss +0 -13
- package/core/styles/common/_popup.scss +0 -6
- package/core/styles/functions/_index.scss +0 -3
- package/core/styles/functions/_number.scss +0 -60
- package/core/styles/functions/_string.scss +0 -18
- package/core/styles/theming/scrollbar-tokens.scss +0 -25
- package/core/styles/typography/_typography-utils.scss +0 -84
- package/divider/index.d.ts +0 -20
- package/dl/index.d.ts +0 -45
- package/ellipsis-center/index.d.ts +0 -71
- package/empty-state/index.d.ts +0 -45
- package/flag/index.d.ts +0 -44
- package/icon/index.d.ts +0 -200
- package/input/index.d.ts +0 -354
- package/link/index.d.ts +0 -56
- package/loader-overlay/index.d.ts +0 -57
- package/modal/index.d.ts +0 -339
- package/navbar/index.d.ts +0 -372
- package/notification-center/index.d.ts +0 -323
- package/popover/index.d.ts +0 -182
- package/prebuilt-themes/dark-theme.css +0 -1
- package/prebuilt-themes/light-theme.css +0 -1
- package/progress-bar/index.d.ts +0 -31
- package/radio/index.d.ts +0 -203
- package/search-expandable/index.d.ts +0 -101
- package/sidebar/index.d.ts +0 -94
- package/sidepanel/index.d.ts +0 -272
- package/skeleton/index.d.ts +0 -26
- package/split-button/index.d.ts +0 -46
- package/table/index.d.ts +0 -25
- package/tabs/index.d.ts +0 -677
- package/textarea/index.d.ts +0 -138
- package/timepicker/index.d.ts +0 -197
- package/timezone/index.d.ts +0 -125
- package/title/index.d.ts +0 -139
- package/toast/index.d.ts +0 -187
- package/toggle/index.d.ts +0 -104
- package/tooltip/index.d.ts +0 -335
- package/top-bar/index.d.ts +0 -33
- package/tree/index.d.ts +0 -802
- package/tree-select/index.d.ts +0 -475
- package/username/index.d.ts +0 -194
- /package/{dynamic-translation/index.d.ts → types/koobiq-components-dynamic-translation.d.ts} +0 -0
- /package/{index.d.ts → types/koobiq-components.d.ts} +0 -0
|
@@ -1,541 +1,930 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FocusMonitor, _IdGenerator, CdkMonitorFocus } from '@angular/cdk/a11y';
|
|
2
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
3
|
+
import { SharedResizeObserver } from '@angular/cdk/observers/private';
|
|
2
4
|
import { Platform } from '@angular/cdk/platform';
|
|
3
5
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { inject,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { InjectionToken, inject, input, numberAttribute, booleanAttribute, model, viewChild, computed, isDevMode, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, DestroyRef, contentChildren, signal, afterNextRender, NgModule } from '@angular/core';
|
|
7
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
8
|
+
import { kbqInjectA11yLocaleConfiguration, kbqInjectNativeElement, KBQ_WINDOW, hasModifierKey } from '@koobiq/components/core';
|
|
9
|
+
import * as i1 from '@koobiq/components/resizer';
|
|
10
|
+
import { KbqResizer, KbqResizable } from '@koobiq/components/resizer';
|
|
11
|
+
import { startWith } from 'rxjs/operators';
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
13
|
+
const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
14
|
+
/** A number, bare or followed by `px` or `%` — the only size strings a panel understands. */
|
|
15
|
+
const SPLITTER_SIZE_PATTERN = /^([+-]?(?:\d+(?:\.\d+)?|\.\d+))(px|%)?$/i;
|
|
16
|
+
/**
|
|
17
|
+
* Resolves a declared size against the splitter's own size along the resize axis.
|
|
18
|
+
*
|
|
19
|
+
* Numbers and `<number>px` strings are pixels, `<number>%` is a share of `total`. Returns `null` for a size that
|
|
20
|
+
* is not set or is anything else, another unit included: reading `10rem` as ten pixels would quietly hand the
|
|
21
|
+
* panel a limit nobody asked for. `null` is how a panel says "take whatever is left".
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
function resolveSplitterSize(size, total) {
|
|
26
|
+
if (size === null || size === undefined)
|
|
27
|
+
return null;
|
|
28
|
+
if (typeof size === 'number')
|
|
29
|
+
return Number.isFinite(size) ? size : null;
|
|
30
|
+
const [, value, unit] = SPLITTER_SIZE_PATTERN.exec(size.trim()) ?? [];
|
|
31
|
+
if (value === undefined)
|
|
32
|
+
return null;
|
|
33
|
+
return unit === '%' ? (parseFloat(value) / 100) * total : parseFloat(value);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Clamps every panel to its own limits and then spends whatever that left over, so the sizes add up to
|
|
37
|
+
* `total` again.
|
|
38
|
+
*
|
|
39
|
+
* The residual is handed out in passes rather than in one proportional step: a panel that reaches a limit
|
|
40
|
+
* mid-pass stops taking, and the next pass shares what it refused among the panels that still have room.
|
|
41
|
+
* At most one pass per panel can end that way, so the loop is bounded by the panel count.
|
|
42
|
+
*
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
function fitSplitterSizes(sizes, min, max, total) {
|
|
46
|
+
const next = sizes.map((size, index) => clamp(size, min[index], max[index]));
|
|
47
|
+
for (let pass = 0; pass <= next.length; pass++) {
|
|
48
|
+
const diff = total - sumOf(next);
|
|
49
|
+
if (Math.abs(diff) < EPSILON)
|
|
50
|
+
break;
|
|
51
|
+
const open = next
|
|
52
|
+
.map((_, index) => index)
|
|
53
|
+
.filter((index) => (diff > 0 ? next[index] < max[index] : next[index] > min[index]));
|
|
54
|
+
if (!open.length)
|
|
55
|
+
break;
|
|
56
|
+
const step = diff / open.length;
|
|
57
|
+
open.forEach((index) => (next[index] = clamp(next[index] + step, min[index], max[index])));
|
|
58
|
+
}
|
|
59
|
+
return next;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Pins every collapsed panel to its strip and shares what that frees among the open panels, in equal parts.
|
|
63
|
+
*
|
|
64
|
+
* A collapsed panel's layout entry holds the size it returns to rather than the strip it shows, which is what
|
|
65
|
+
* lets expanding restore that size. The difference is handed out here, before any limit applies, so that
|
|
66
|
+
* {@link keepSplitterRestoreSizes} can take exactly the same amounts back whenever sizes are written again.
|
|
67
|
+
*/
|
|
68
|
+
function collapseSplitterSizes(sizes, collapsed, strips) {
|
|
69
|
+
const open = collapsed.filter((isCollapsed) => !isCollapsed).length;
|
|
70
|
+
const freed = sizes.reduce((sum, size, index) => (collapsed[index] ? sum + size - strips[index] : sum), 0);
|
|
71
|
+
return sizes.map((size, index) => (collapsed[index] ? strips[index] : size + (open ? freed / open : 0)));
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The inverse of {@link collapseSplitterSizes}: puts each size in `restore` back into its collapsed panel's entry
|
|
75
|
+
* and takes what that adds from the open panels in the same equal parts. The entries keep adding up to what
|
|
76
|
+
* `sizes` did and render exactly as `sizes` do, while expanding a panel later returns it to its `restore` size.
|
|
77
|
+
*/
|
|
78
|
+
function keepSplitterRestoreSizes(sizes, collapsed, restore) {
|
|
79
|
+
const open = collapsed.filter((isCollapsed) => !isCollapsed).length;
|
|
80
|
+
const added = restore.reduce((sum, size, index) => (size === undefined ? sum : sum + size - sizes[index]), 0);
|
|
81
|
+
return sizes.map((size, index) => restore[index] ?? (collapsed[index] ? size : size - (open ? added / open : 0)));
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Moves the boundary that follows `index` by `delta` pixels and returns the new sizes.
|
|
85
|
+
*
|
|
86
|
+
* The panels on one side of the boundary take the delta and the ones on the other side give it up, each walking
|
|
87
|
+
* outwards from the boundary: a panel sitting at its limit hands the remainder to the next one instead of
|
|
88
|
+
* stopping the drag. Walking outwards on the taking side too is what keeps a boundary reachable when the panel
|
|
89
|
+
* right beside it is pinned — otherwise a neighbour at its maximum would freeze a boundary that the panels
|
|
90
|
+
* further out could still move, and the drag would do nothing at all.
|
|
91
|
+
*/
|
|
92
|
+
function resizeSplitterSizesAt(sizes, index, delta, min, max) {
|
|
93
|
+
const next = [...sizes];
|
|
94
|
+
if (index < 0 || index >= sizes.length - 1)
|
|
95
|
+
return next;
|
|
96
|
+
// Nearest to the boundary first, so the panel beside it always absorbs as much as it can before the next.
|
|
97
|
+
const leading = Array.from({ length: index + 1 }, (_, offset) => index - offset);
|
|
98
|
+
const trailing = Array.from({ length: sizes.length - index - 1 }, (_, offset) => index + 1 + offset);
|
|
99
|
+
const growing = delta > 0;
|
|
100
|
+
const roomOf = (indices, grow) => indices.reduce((room, panel) => room + (grow ? max[panel] - sizes[panel] : sizes[panel] - min[panel]), 0);
|
|
101
|
+
// The boundary travels as far as the tighter of its two sides allows.
|
|
102
|
+
const travel = Math.min(Math.abs(delta), roomOf(leading, growing), roomOf(trailing, !growing));
|
|
103
|
+
const spend = (indices, grow) => {
|
|
104
|
+
let remaining = travel;
|
|
105
|
+
for (const panel of indices) {
|
|
106
|
+
if (remaining <= EPSILON)
|
|
107
|
+
break;
|
|
108
|
+
const taken = Math.min(remaining, grow ? max[panel] - sizes[panel] : sizes[panel] - min[panel]);
|
|
109
|
+
next[panel] = sizes[panel] + (grow ? taken : -taken);
|
|
110
|
+
remaining -= taken;
|
|
56
111
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return {
|
|
62
|
-
x: this.elementRef.nativeElement.offsetLeft,
|
|
63
|
-
y: this.elementRef.nativeElement.offsetTop
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
setStyle(property, value) {
|
|
67
|
-
this.renderer.setStyle(this.elementRef.nativeElement, property, value);
|
|
68
|
-
}
|
|
69
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqGutterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
70
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqGutterDirective, isStandalone: true, selector: "kbq-gutter", inputs: { direction: "direction", order: "order", size: "size" }, host: { listeners: { "mousedown": "dragged = true" }, properties: { "class.kbq-gutter_vertical": "isVertical", "class.kbq-gutter_dragged": "dragged" }, classAttribute: "kbq-gutter" }, ngImport: i0 }); }
|
|
112
|
+
};
|
|
113
|
+
spend(leading, growing);
|
|
114
|
+
spend(trailing, !growing);
|
|
115
|
+
return next;
|
|
71
116
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Snaps a target size onto the nearest snap point it is close enough to, or returns it unchanged.
|
|
119
|
+
*
|
|
120
|
+
* Each point carries its own tolerance, because the panels around a separator both contribute points and each
|
|
121
|
+
* of them says how far its own pull reaches. Two points exactly as close as one another are settled by
|
|
122
|
+
* declaration order, so a target sitting midway between them picks the same one however it got there.
|
|
123
|
+
*
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
126
|
+
function snapSplitterSize(target, snapPoints) {
|
|
127
|
+
let snapped = target;
|
|
128
|
+
let closest = Number.POSITIVE_INFINITY;
|
|
129
|
+
for (const { size, tolerance } of snapPoints) {
|
|
130
|
+
if (!Number.isFinite(size))
|
|
131
|
+
continue;
|
|
132
|
+
const distance = Math.abs(size - target);
|
|
133
|
+
if (distance > tolerance || distance >= closest)
|
|
134
|
+
continue;
|
|
135
|
+
closest = distance;
|
|
136
|
+
snapped = size;
|
|
137
|
+
}
|
|
138
|
+
return snapped;
|
|
139
|
+
}
|
|
140
|
+
/** How far one arrow key press moves a separator, in pixels. */
|
|
141
|
+
const KEYBOARD_STEP = 8;
|
|
142
|
+
/** Sizes closer than this are the same size. */
|
|
143
|
+
const EPSILON = 0.01;
|
|
144
|
+
const sumOf = (sizes) => sizes.reduce((sum, size) => sum + size, 0);
|
|
145
|
+
const KBQ_SPLITTER_DEFAULT_OPTIONS = {
|
|
146
|
+
appearance: 'divider',
|
|
147
|
+
snapTolerance: 32
|
|
148
|
+
};
|
|
149
|
+
/** Injection token holding the current {@link KbqSplitterOptions}. */
|
|
150
|
+
const KBQ_SPLITTER_OPTIONS = new InjectionToken('KBQ_SPLITTER_OPTIONS', {
|
|
151
|
+
factory: () => KBQ_SPLITTER_DEFAULT_OPTIONS
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* Overrides the default splitter options within the given injector scope — the whole application from
|
|
155
|
+
* `bootstrapApplication`, or one subtree from the `providers` of a component or a route.
|
|
156
|
+
*/
|
|
157
|
+
function kbqSplitterOptionsProvider(options) {
|
|
158
|
+
return {
|
|
159
|
+
provide: KBQ_SPLITTER_OPTIONS,
|
|
160
|
+
useValue: { ...KBQ_SPLITTER_DEFAULT_OPTIONS, ...options }
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Contract a {@link KbqSplitterPanel} resolves to reach the splitter that projects it.
|
|
165
|
+
*
|
|
166
|
+
* @docs-private
|
|
167
|
+
*/
|
|
168
|
+
const KBQ_SPLITTER = new InjectionToken('KBQ_SPLITTER');
|
|
169
|
+
/**
|
|
170
|
+
* A resizable region of a {@link KbqSplitter}.
|
|
171
|
+
*
|
|
172
|
+
* Every panel but the last renders the separator that follows it, so the separator sits between the two
|
|
173
|
+
* panels it resizes in the tab order as well as on screen.
|
|
174
|
+
*/
|
|
175
|
+
class KbqSplitterPanel {
|
|
91
176
|
constructor() {
|
|
92
|
-
|
|
93
|
-
this.
|
|
94
|
-
this.
|
|
95
|
-
this.
|
|
96
|
-
this.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
this.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
this.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
177
|
+
/** @docs-private */
|
|
178
|
+
this.splitter = inject(KBQ_SPLITTER);
|
|
179
|
+
this.options = inject(KBQ_SPLITTER_OPTIONS);
|
|
180
|
+
this.focusMonitor = inject(FocusMonitor);
|
|
181
|
+
this.a11yLocaleConfiguration = kbqInjectA11yLocaleConfiguration();
|
|
182
|
+
/** @docs-private */
|
|
183
|
+
this.element = kbqInjectNativeElement();
|
|
184
|
+
/**
|
|
185
|
+
* Identifies the panel to the `aria-controls` of its own separator, and gives a host something to point
|
|
186
|
+
* `aria-labelledby` or a fragment link at. Generated when omitted.
|
|
187
|
+
*/
|
|
188
|
+
this.id = input(inject(_IdGenerator).getId('kbq-splitter-panel-'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
189
|
+
/**
|
|
190
|
+
* Size the panel starts at, in pixels (`240`, `'240px'`) or as a share of the splitter (`'30%'`).
|
|
191
|
+
* Panels that leave it unset share whatever the sized ones did not claim.
|
|
192
|
+
*/
|
|
193
|
+
this.size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
194
|
+
/** Smallest size the panel may be dragged to. Defaults to `0`. */
|
|
195
|
+
this.minSize = input(undefined, ...(ngDevMode ? [{ debugName: "minSize" }] : /* istanbul ignore next */ []));
|
|
196
|
+
/** Largest size the panel may be dragged to. Unbounded when omitted. */
|
|
197
|
+
this.maxSize = input(undefined, ...(ngDevMode ? [{ debugName: "maxSize" }] : /* istanbul ignore next */ []));
|
|
198
|
+
/**
|
|
199
|
+
* Sizes a drag is pulled onto when it is released near one. `minSize` and `maxSize` become snap points too
|
|
200
|
+
* as soon as either panel around a separator declares any snap size.
|
|
201
|
+
*
|
|
202
|
+
* The layout the panels start at settles onto them as well, so a splitter is never handed to the user
|
|
203
|
+
* sitting between two of its own snap points.
|
|
204
|
+
*/
|
|
205
|
+
this.snapSizes = input([], ...(ngDevMode ? [{ debugName: "snapSizes" }] : /* istanbul ignore next */ []));
|
|
206
|
+
/**
|
|
207
|
+
* How close to one of this panel's {@link snapSizes} a drag has to be released for it to be pulled in, in
|
|
208
|
+
* pixels. Raise it to make the snap points reach further — past half the gap between two of them the panel
|
|
209
|
+
* can only ever land on a snap size.
|
|
210
|
+
*
|
|
211
|
+
* Defaults to the app-wide {@link KBQ_SPLITTER_OPTIONS}.
|
|
212
|
+
*/
|
|
213
|
+
this.snapTolerance = input(this.options.snapTolerance, { ...(ngDevMode ? { debugName: "snapTolerance" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
214
|
+
/**
|
|
215
|
+
* Whether dragging the panel past half of its `minSize` collapses it to `collapsedSize` instead of
|
|
216
|
+
* stopping at the minimum.
|
|
217
|
+
*/
|
|
218
|
+
this.collapsible = input(false, { ...(ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
219
|
+
/** Size the panel takes while collapsed. `0` — the default — hides it completely. */
|
|
220
|
+
this.collapsedSize = input(0, ...(ngDevMode ? [{ debugName: "collapsedSize" }] : /* istanbul ignore next */ []));
|
|
221
|
+
/**
|
|
222
|
+
* Whether the panel is collapsed. Two-way, so a host can collapse and restore the panel itself — which is
|
|
223
|
+
* the only way back for a panel whose `collapsedSize` is `0` and which therefore has no separator to grab.
|
|
224
|
+
*/
|
|
225
|
+
this.collapsed = model(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
226
|
+
/** Accessible name of the separator that follows the panel; falls back to the localized default. */
|
|
227
|
+
this.separatorAriaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "separatorAriaLabel" }] : /* istanbul ignore next */ []));
|
|
228
|
+
/** The panel's own separator; a subtree search would find a nested splitter's separators first. */
|
|
229
|
+
this.separator = viewChild('separator', ...(ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []));
|
|
230
|
+
/** @docs-private */
|
|
231
|
+
this.index = computed(() => this.splitter.panels().indexOf(this), ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
|
|
232
|
+
/**
|
|
233
|
+
* Whether the panel renders no separator. The last panel has nothing after it to resize against, and a
|
|
234
|
+
* panel that reached the splitter through the element injector without being one of its content children —
|
|
235
|
+
* a wrapper element or another component's template stands between them — has no place in the group at
|
|
236
|
+
* all, so it must not offer a handle whose ARIA values would resolve against an index of `-1`.
|
|
237
|
+
*
|
|
238
|
+
* @docs-private
|
|
239
|
+
*/
|
|
240
|
+
this.last = computed(() => {
|
|
241
|
+
const index = this.index();
|
|
242
|
+
return index === -1 || index === this.splitter.panels().length - 1;
|
|
243
|
+
}, ...(ngDevMode ? [{ debugName: "last" }] : /* istanbul ignore next */ []));
|
|
244
|
+
/** @docs-private */
|
|
245
|
+
this.disabled = computed(() => this.splitter.disabled(), ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
246
|
+
/** A separator is oriented across the axis its splitter lays panels out along. @docs-private */
|
|
247
|
+
this.separatorOrientation = computed(() => this.splitter.orientation() === 'horizontal' ? 'vertical' : 'horizontal', ...(ngDevMode ? [{ debugName: "separatorOrientation" }] : /* istanbul ignore next */ []));
|
|
248
|
+
/** @docs-private */
|
|
249
|
+
this.separatorCursor = computed(() => this.splitter.separatorCursor(this.index()), ...(ngDevMode ? [{ debugName: "separatorCursor" }] : /* istanbul ignore next */ []));
|
|
250
|
+
/** @docs-private */
|
|
251
|
+
this.separatorValues = computed(() => this.splitter.separatorValues(this.index()), ...(ngDevMode ? [{ debugName: "separatorValues" }] : /* istanbul ignore next */ []));
|
|
252
|
+
/** @docs-private */
|
|
253
|
+
this.resolvedSeparatorAriaLabel = computed(() => this.separatorAriaLabel() || this.a11yLocaleConfiguration().resizePanels, ...(ngDevMode ? [{ debugName: "resolvedSeparatorAriaLabel" }] : /* istanbul ignore next */ []));
|
|
254
|
+
/** Unsupported sizes already reported, so a check that runs again does not repeat itself. */
|
|
255
|
+
this.reportedSizes = new Set();
|
|
256
|
+
// A size in another unit is ignored, which would otherwise leave the panel without the limit its template
|
|
257
|
+
// asks for and nothing to say why.
|
|
258
|
+
if (isDevMode())
|
|
259
|
+
effect(() => this.reportUnsupportedSizes());
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Demotes the separator's focus origin to the pointer when a drag starts, so the keyboard-focus frame
|
|
263
|
+
* stays hidden for the whole drag and does not linger afterwards. Keyboard focus keeps the frame.
|
|
264
|
+
*
|
|
265
|
+
* `preventScroll` because half of the separator reaches past the panel it belongs to: once the panel beyond
|
|
266
|
+
* it is collapsed to nothing, that half hangs outside the splitter itself, and revealing it would scroll
|
|
267
|
+
* whatever clipping box the splitter sits in — leaving the panels shifted by half a hit area, with a blank
|
|
268
|
+
* strip along the edge that nothing scrolls back.
|
|
269
|
+
*
|
|
270
|
+
* @docs-private
|
|
271
|
+
*/
|
|
272
|
+
handleResizeStart({ width, height }) {
|
|
273
|
+
const separator = this.separator();
|
|
274
|
+
if (separator)
|
|
275
|
+
this.focusMonitor.focusVia(separator.nativeElement, 'mouse', { preventScroll: true });
|
|
276
|
+
// The resizer adds the travel to the size it measured at the press, which is the panel's content box.
|
|
277
|
+
// Measured from the track instead, padding and sub-pixel rounding would land as a jump on the first move.
|
|
278
|
+
this.splitter.handleResizeStart(this.index(), this.splitter.orientation() === 'horizontal' ? width : height);
|
|
279
|
+
}
|
|
280
|
+
/** @docs-private */
|
|
281
|
+
handleSizeChange({ width, height }) {
|
|
282
|
+
this.splitter.handleResizeTo(this.index(), this.splitter.orientation() === 'horizontal' ? width : height);
|
|
283
|
+
}
|
|
284
|
+
/** @docs-private */
|
|
285
|
+
handleSeparatorKeydown(event) {
|
|
286
|
+
this.splitter.handleSeparatorKeydown(this.index(), event);
|
|
287
|
+
}
|
|
288
|
+
/** @docs-private */
|
|
289
|
+
handleSeparatorDblClick(event) {
|
|
290
|
+
event.preventDefault();
|
|
291
|
+
this.splitter.handleSeparatorDblClick(this.index());
|
|
292
|
+
}
|
|
293
|
+
reportUnsupportedSizes() {
|
|
294
|
+
const sizes = [
|
|
295
|
+
['size', this.size()],
|
|
296
|
+
['minSize', this.minSize()],
|
|
297
|
+
['maxSize', this.maxSize()],
|
|
298
|
+
['collapsedSize', this.collapsedSize()],
|
|
299
|
+
...this.snapSizes().map((size) => ['snapSizes', size])
|
|
300
|
+
];
|
|
301
|
+
for (const [name, size] of sizes) {
|
|
302
|
+
const key = `${name}=${size}`;
|
|
303
|
+
if (size === undefined || resolveSplitterSize(size, 0) !== null || this.reportedSizes.has(key))
|
|
304
|
+
continue;
|
|
305
|
+
this.reportedSizes.add(key);
|
|
306
|
+
// eslint-disable-next-line no-console
|
|
307
|
+
console.warn(`kbq-splitter-panel: \`${name}\` "${size}" is ignored. A size is a number of pixels, ` +
|
|
308
|
+
'a "<number>px" string or a "<number>%" share of the splitter.');
|
|
309
|
+
}
|
|
144
310
|
}
|
|
145
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
146
|
-
/** @nocollapse */ static { this.ɵ
|
|
311
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitterPanel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
312
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqSplitterPanel, isStandalone: true, selector: "kbq-splitter-panel", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, minSize: { classPropertyName: "minSize", publicName: "minSize", isSignal: true, isRequired: false, transformFunction: null }, maxSize: { classPropertyName: "maxSize", publicName: "maxSize", isSignal: true, isRequired: false, transformFunction: null }, snapSizes: { classPropertyName: "snapSizes", publicName: "snapSizes", isSignal: true, isRequired: false, transformFunction: null }, snapTolerance: { classPropertyName: "snapTolerance", publicName: "snapTolerance", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, collapsedSize: { classPropertyName: "collapsedSize", publicName: "collapsedSize", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, separatorAriaLabel: { classPropertyName: "separatorAriaLabel", publicName: "separatorAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange" }, host: { attributes: { "tabindex": "-1" }, properties: { "attr.id": "id()", "class.kbq-splitter-panel_collapsed": "collapsed()" }, classAttribute: "kbq-splitter-panel" }, viewQueries: [{ propertyName: "separator", first: true, predicate: ["separator"], descendants: true, isSignal: true }], exportAs: ["kbqSplitterPanel"], hostDirectives: [{ directive: i1.KbqResizable }], ngImport: i0, template: `
|
|
313
|
+
<div class="kbq-splitter-panel__content">
|
|
314
|
+
<ng-content />
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
@if (!last()) {
|
|
318
|
+
<div
|
|
319
|
+
#separator
|
|
320
|
+
cdkMonitorElementFocus
|
|
321
|
+
class="kbq-splitter-panel__separator"
|
|
322
|
+
role="separator"
|
|
323
|
+
[attr.aria-controls]="id()"
|
|
324
|
+
[attr.aria-disabled]="disabled() || null"
|
|
325
|
+
[attr.aria-label]="resolvedSeparatorAriaLabel()"
|
|
326
|
+
[attr.aria-orientation]="separatorOrientation()"
|
|
327
|
+
[attr.aria-valuemax]="separatorValues().max"
|
|
328
|
+
[attr.aria-valuemin]="separatorValues().min"
|
|
329
|
+
[attr.aria-valuenow]="separatorValues().now"
|
|
330
|
+
[attr.tabindex]="disabled() ? -1 : 0"
|
|
331
|
+
[cursor]="separatorCursor()"
|
|
332
|
+
[disableSizeUpdate]="true"
|
|
333
|
+
[kbqResizer]="splitter.resizerDirection()"
|
|
334
|
+
(dblclick)="handleSeparatorDblClick($event)"
|
|
335
|
+
(keydown)="handleSeparatorKeydown($event)"
|
|
336
|
+
(lostpointercapture)="splitter.handleResizeEnd()"
|
|
337
|
+
(resizeStart)="handleResizeStart($event)"
|
|
338
|
+
(sizeChange)="handleSizeChange($event)"
|
|
339
|
+
></div>
|
|
340
|
+
}
|
|
341
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: KbqResizer, selector: "[kbqResizer]", inputs: ["kbqResizer", "cursor", "disableSizeUpdate"], outputs: ["resizeStart", "sizeChange"], exportAs: ["kbqResizer"] }, { kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
147
342
|
}
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
149
|
-
type:
|
|
343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitterPanel, decorators: [{
|
|
344
|
+
type: Component,
|
|
150
345
|
args: [{
|
|
151
|
-
selector: 'kbq-
|
|
346
|
+
selector: 'kbq-splitter-panel',
|
|
347
|
+
imports: [KbqResizer, CdkMonitorFocus],
|
|
348
|
+
template: `
|
|
349
|
+
<div class="kbq-splitter-panel__content">
|
|
350
|
+
<ng-content />
|
|
351
|
+
</div>
|
|
352
|
+
|
|
353
|
+
@if (!last()) {
|
|
354
|
+
<div
|
|
355
|
+
#separator
|
|
356
|
+
cdkMonitorElementFocus
|
|
357
|
+
class="kbq-splitter-panel__separator"
|
|
358
|
+
role="separator"
|
|
359
|
+
[attr.aria-controls]="id()"
|
|
360
|
+
[attr.aria-disabled]="disabled() || null"
|
|
361
|
+
[attr.aria-label]="resolvedSeparatorAriaLabel()"
|
|
362
|
+
[attr.aria-orientation]="separatorOrientation()"
|
|
363
|
+
[attr.aria-valuemax]="separatorValues().max"
|
|
364
|
+
[attr.aria-valuemin]="separatorValues().min"
|
|
365
|
+
[attr.aria-valuenow]="separatorValues().now"
|
|
366
|
+
[attr.tabindex]="disabled() ? -1 : 0"
|
|
367
|
+
[cursor]="separatorCursor()"
|
|
368
|
+
[disableSizeUpdate]="true"
|
|
369
|
+
[kbqResizer]="splitter.resizerDirection()"
|
|
370
|
+
(dblclick)="handleSeparatorDblClick($event)"
|
|
371
|
+
(keydown)="handleSeparatorKeydown($event)"
|
|
372
|
+
(lostpointercapture)="splitter.handleResizeEnd()"
|
|
373
|
+
(resizeStart)="handleResizeStart($event)"
|
|
374
|
+
(sizeChange)="handleSizeChange($event)"
|
|
375
|
+
></div>
|
|
376
|
+
}
|
|
377
|
+
`,
|
|
378
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
379
|
+
encapsulation: ViewEncapsulation.None,
|
|
152
380
|
host: {
|
|
153
|
-
class: 'kbq-
|
|
154
|
-
|
|
155
|
-
'[
|
|
156
|
-
|
|
381
|
+
class: 'kbq-splitter-panel',
|
|
382
|
+
tabindex: '-1',
|
|
383
|
+
'[attr.id]': 'id()',
|
|
384
|
+
'[class.kbq-splitter-panel_collapsed]': 'collapsed()'
|
|
385
|
+
},
|
|
386
|
+
hostDirectives: [KbqResizable],
|
|
387
|
+
exportAs: 'kbqSplitterPanel'
|
|
157
388
|
}]
|
|
158
|
-
}], propDecorators: {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
389
|
+
}], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], minSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSize", required: false }] }], maxSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSize", required: false }] }], snapSizes: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapSizes", required: false }] }], snapTolerance: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapTolerance", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], collapsedSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedSize", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], separatorAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "separatorAriaLabel", required: false }] }], separator: [{ type: i0.ViewChild, args: ['separator', { isSignal: true }] }] } });
|
|
390
|
+
/**
|
|
391
|
+
* Splits an area into panels the user can resize by dragging the separators between them.
|
|
392
|
+
*
|
|
393
|
+
* Panels must be direct children of the splitter — a wrapper element around them hides them from the group.
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
* ```html
|
|
397
|
+
* <kbq-splitter>
|
|
398
|
+
* <kbq-splitter-panel [minSize]="100">…</kbq-splitter-panel>
|
|
399
|
+
* <kbq-splitter-panel>…</kbq-splitter-panel>
|
|
400
|
+
* </kbq-splitter>
|
|
401
|
+
* ```
|
|
402
|
+
*/
|
|
403
|
+
class KbqSplitter {
|
|
170
404
|
constructor() {
|
|
171
|
-
this.
|
|
172
|
-
this.
|
|
173
|
-
this.
|
|
174
|
-
this.
|
|
175
|
-
this.
|
|
176
|
-
this.
|
|
177
|
-
this.
|
|
178
|
-
|
|
179
|
-
this.
|
|
180
|
-
|
|
181
|
-
this.
|
|
182
|
-
|
|
183
|
-
this.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
this.
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
this.
|
|
258
|
-
|
|
259
|
-
this.
|
|
405
|
+
this.nativeElement = kbqInjectNativeElement();
|
|
406
|
+
this.destroyRef = inject(DestroyRef);
|
|
407
|
+
this.platform = inject(Platform);
|
|
408
|
+
this.window = inject(KBQ_WINDOW);
|
|
409
|
+
this.resizeObserver = inject(SharedResizeObserver);
|
|
410
|
+
this.directionality = inject(Directionality, { optional: true });
|
|
411
|
+
this.options = inject(KBQ_SPLITTER_OPTIONS);
|
|
412
|
+
/** Direction the panels are laid out in. */
|
|
413
|
+
this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
414
|
+
/** How the separators are drawn. Defaults to the app-wide {@link KBQ_SPLITTER_OPTIONS}. */
|
|
415
|
+
this.appearance = input(this.options.appearance, ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
|
|
416
|
+
/** Whether the panels can be resized at all. */
|
|
417
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
418
|
+
/**
|
|
419
|
+
* Sizes of the panels as percentages of the splitter, in panel order.
|
|
420
|
+
*
|
|
421
|
+
* Two-way and, while `null`, derived from what the panels declare — so a host reads it to persist a
|
|
422
|
+
* layout, writes it to restore one, and shares the same signal between two splitters to keep their panels
|
|
423
|
+
* the same width. Setting it back to `null` returns the panels to their declared sizes.
|
|
424
|
+
*/
|
|
425
|
+
this.layout = model(null, ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
426
|
+
/** @docs-private */
|
|
427
|
+
this.panels = contentChildren(KbqSplitterPanel, { ...(ngDevMode ? { debugName: "panels" } : /* istanbul ignore next */ {}), descendants: false });
|
|
428
|
+
/** Boundary a drag is moving right now, or `null` when no drag is in progress. */
|
|
429
|
+
this.dragBoundary = signal(null, ...(ngDevMode ? [{ debugName: "dragBoundary" }] : /* istanbul ignore next */ []));
|
|
430
|
+
/** Whether a separator is being dragged right now. @docs-private */
|
|
431
|
+
this.dragging = computed(() => this.dragBoundary() !== null, ...(ngDevMode ? [{ debugName: "dragging" }] : /* istanbul ignore next */ []));
|
|
432
|
+
/** Splitter size along the resize axis, in pixels; `0` until the first measurement. */
|
|
433
|
+
this.containerSize = signal(0, ...(ngDevMode ? [{ debugName: "containerSize" }] : /* istanbul ignore next */ []));
|
|
434
|
+
/** Sizes and layout captured when the drag began; every move is measured against these, so clamping cannot drift. */
|
|
435
|
+
this.dragSnapshot = null;
|
|
436
|
+
// `valueSignal` rather than the plain `value` getter: the getter is not reactive, so a `dir` flipped at
|
|
437
|
+
// runtime would leave every computed below it holding the direction the app booted with.
|
|
438
|
+
this.rtl = computed(() => this.directionality?.valueSignal() === 'rtl', ...(ngDevMode ? [{ debugName: "rtl" }] : /* istanbul ignore next */ []));
|
|
439
|
+
/** A disabled splitter reports no direction, which is how `KbqResizer` ignores a drag. @docs-private */
|
|
440
|
+
this.resizerDirection = computed(() => {
|
|
441
|
+
if (this.disabled())
|
|
442
|
+
return [0, 0];
|
|
443
|
+
if (this.orientation() === 'vertical')
|
|
444
|
+
return [0, 1];
|
|
445
|
+
// In RTL the first panel sits on the right, so growing it moves the boundary west.
|
|
446
|
+
return this.rtl() ? [-1, 0] : [1, 0];
|
|
447
|
+
}, ...(ngDevMode ? [{ debugName: "resizerDirection" }] : /* istanbul ignore next */ []));
|
|
448
|
+
/** Smallest size of each panel while it is not collapsed, in pixels. */
|
|
449
|
+
this.expandedMinSizes = computed(() => {
|
|
450
|
+
const total = this.containerSize();
|
|
451
|
+
return this.panels().map((panel) => Math.max(0, resolveSplitterSize(panel.minSize(), total) ?? 0));
|
|
452
|
+
}, ...(ngDevMode ? [{ debugName: "expandedMinSizes" }] : /* istanbul ignore next */ []));
|
|
453
|
+
/** Largest size of each panel while it is not collapsed, in pixels. */
|
|
454
|
+
this.expandedMaxSizes = computed(() => {
|
|
455
|
+
const total = this.containerSize();
|
|
456
|
+
const min = this.expandedMinSizes();
|
|
457
|
+
return this.panels().map((panel, index) => {
|
|
458
|
+
const max = resolveSplitterSize(panel.maxSize(), total) ?? Number.POSITIVE_INFINITY;
|
|
459
|
+
// A maximum below the minimum would make every clamp order-dependent; the minimum wins.
|
|
460
|
+
return Math.max(min[index], max);
|
|
461
|
+
});
|
|
462
|
+
}, ...(ngDevMode ? [{ debugName: "expandedMaxSizes" }] : /* istanbul ignore next */ []));
|
|
463
|
+
/** Size a collapsed panel is pinned to, in pixels. */
|
|
464
|
+
this.collapsedSizes = computed(() => {
|
|
465
|
+
const total = this.containerSize();
|
|
466
|
+
return this.panels().map((panel) => Math.max(0, resolveSplitterSize(panel.collapsedSize(), total) ?? 0));
|
|
467
|
+
}, ...(ngDevMode ? [{ debugName: "collapsedSizes" }] : /* istanbul ignore next */ []));
|
|
468
|
+
/**
|
|
469
|
+
* Panels the drag in progress may take through the gap between their collapsed size and their minimum.
|
|
470
|
+
*
|
|
471
|
+
* Only the two around the boundary being dragged. A collapsible panel further out is being pushed rather
|
|
472
|
+
* than aimed at, and letting a push carry one into its gap would collapse it without the user ever having
|
|
473
|
+
* pointed at it.
|
|
474
|
+
*/
|
|
475
|
+
this.freePanels = computed(() => {
|
|
476
|
+
const boundary = this.dragBoundary();
|
|
477
|
+
return this.panels().map((panel, index) => boundary !== null && panel.collapsible() && (index === boundary || index === boundary + 1));
|
|
478
|
+
}, ...(ngDevMode ? [{ debugName: "freePanels" }] : /* istanbul ignore next */ []));
|
|
479
|
+
/**
|
|
480
|
+
* Smallest size of each panel in pixels; a collapsed panel is pinned to its collapsed size.
|
|
481
|
+
*
|
|
482
|
+
* The sizes a collapsible panel may take are its collapsed size and everything from its minimum up, with a
|
|
483
|
+
* gap in between that it never occupies. Pinning it by `collapsed` is what keeps a drag out of that gap: the
|
|
484
|
+
* panel stops at the minimum and waits there while the pointer crosses, and `collapsed` flips it to the strip
|
|
485
|
+
* once the pointer passes the midpoint.
|
|
486
|
+
*/
|
|
487
|
+
this.minSizes = computed(() => this.panels().map((panel, index) => panel.collapsed() ? this.collapsedSizes()[index] : this.expandedMinSizes()[index]), ...(ngDevMode ? [{ debugName: "minSizes" }] : /* istanbul ignore next */ []));
|
|
488
|
+
/** Largest size of each panel in pixels; a collapsed panel is pinned to its collapsed size. */
|
|
489
|
+
this.maxSizes = computed(() => this.panels().map((panel, index) => panel.collapsed() ? this.collapsedSizes()[index] : this.expandedMaxSizes()[index]), ...(ngDevMode ? [{ debugName: "maxSizes" }] : /* istanbul ignore next */ []));
|
|
490
|
+
/** Sizes seeded from what the panels declare — where the splitter starts and what a reset returns to. */
|
|
491
|
+
this.defaultSizes = computed(() => {
|
|
492
|
+
const panels = this.panels();
|
|
493
|
+
const total = this.containerSize();
|
|
494
|
+
if (!panels.length || total <= 0)
|
|
495
|
+
return panels.map(() => 0);
|
|
496
|
+
const declared = panels.map((panel) => panel.collapsed()
|
|
497
|
+
? (resolveSplitterSize(panel.collapsedSize(), total) ?? 0)
|
|
498
|
+
: resolveSplitterSize(panel.size(), total));
|
|
499
|
+
const flexible = declared.map((_, index) => index).filter((index) => declared[index] === null);
|
|
500
|
+
const claimed = declared.reduce((sum, size) => sum + (size ?? 0), 0);
|
|
501
|
+
const share = flexible.length ? Math.max(0, total - claimed) / flexible.length : 0;
|
|
502
|
+
return this.settleOnSnapPoints(fitSplitterSizes(declared.map((size) => size ?? share), this.minSizes(), this.maxSizes(), total), total);
|
|
503
|
+
}, ...(ngDevMode ? [{ debugName: "defaultSizes" }] : /* istanbul ignore next */ []));
|
|
504
|
+
/** Current size of every panel in pixels. */
|
|
505
|
+
this.sizes = computed(() => {
|
|
506
|
+
const layout = this.layout();
|
|
507
|
+
const total = this.containerSize();
|
|
508
|
+
if (!layout || layout.length !== this.panels().length || total <= 0)
|
|
509
|
+
return this.defaultSizes();
|
|
510
|
+
return fitSplitterSizes(collapseSplitterSizes(layout.map((share) => (share / 100) * total), this.panels().map((panel) => panel.collapsed()), this.collapsedSizes()), this.minSizes(), this.maxSizes(), total);
|
|
511
|
+
}, ...(ngDevMode ? [{ debugName: "sizes" }] : /* istanbul ignore next */ []));
|
|
512
|
+
/**
|
|
513
|
+
* Tracks are percentages of the splitter's content box, which is exactly what `containerSize` measures, so
|
|
514
|
+
* `size / total` renders as `size` pixels whatever padding the host puts on the splitter.
|
|
515
|
+
*
|
|
516
|
+
* Not `fr`: a flex factor carries only a ratio, and CSS Grid normalizes the factors by their sum. Sizes
|
|
517
|
+
* that cannot add up to the container — every panel pinned to a minimum too large to fit, or every panel
|
|
518
|
+
* capped below it — would then be silently rescaled to fill it, violating the very `minSize`/`maxSize` the
|
|
519
|
+
* layout was computed from, while `aria-valuenow` and the drag arithmetic went on reporting the sizes the
|
|
520
|
+
* component believed it had applied. Percentages under- or overflow instead, which is visible.
|
|
521
|
+
*
|
|
522
|
+
* Equal tracks stand in until the first measurement, which is the only layout that cannot be wrong before
|
|
523
|
+
* the splitter has a size to resolve `%` and `px` against.
|
|
524
|
+
*
|
|
525
|
+
* @docs-private
|
|
526
|
+
*/
|
|
527
|
+
this.gridTemplate = computed(() => {
|
|
528
|
+
const count = this.panels().length;
|
|
529
|
+
if (!count)
|
|
530
|
+
return null;
|
|
531
|
+
if (this.containerSize() <= 0)
|
|
532
|
+
return `repeat(${count}, minmax(0, 1fr))`;
|
|
533
|
+
const total = this.containerSize();
|
|
534
|
+
return this.sizes()
|
|
535
|
+
.map((size) => `${((Math.max(0, size) / total) * 100).toFixed(4)}%`)
|
|
536
|
+
.join(' ');
|
|
537
|
+
}, ...(ngDevMode ? [{ debugName: "gridTemplate" }] : /* istanbul ignore next */ []));
|
|
538
|
+
// `afterNextRender` runs in the browser only, so no explicit platform guard is needed here.
|
|
539
|
+
afterNextRender(() => {
|
|
540
|
+
this.resizeObserver
|
|
541
|
+
.observe(this.nativeElement)
|
|
542
|
+
.pipe(startWith(null), takeUntilDestroyed(this.destroyRef))
|
|
543
|
+
.subscribe(() => this.measure());
|
|
544
|
+
});
|
|
545
|
+
// Swapping the axis changes which dimension every size resolves against, and no resize observation
|
|
546
|
+
// fires for it: the splitter's own box may not have changed at all.
|
|
547
|
+
effect(() => {
|
|
548
|
+
this.orientation();
|
|
549
|
+
if (this.platform.isBrowser)
|
|
550
|
+
this.measure();
|
|
260
551
|
});
|
|
261
552
|
}
|
|
262
|
-
|
|
263
|
-
|
|
553
|
+
/** @docs-private */
|
|
554
|
+
separatorCursor(index) {
|
|
555
|
+
const horizontal = this.orientation() === 'horizontal';
|
|
556
|
+
if (this.disabled())
|
|
557
|
+
return 'default';
|
|
558
|
+
const { grow, shrink } = this.boundaryRoom(index);
|
|
559
|
+
const rtl = this.rtl();
|
|
560
|
+
// Which way the pointer travels to grow the leading panel, so the one-sided cursors point at the room
|
|
561
|
+
// that is actually left rather than at the panel that owns it.
|
|
562
|
+
const growCursor = horizontal ? (rtl ? 'w-resize' : 'e-resize') : 's-resize';
|
|
563
|
+
const shrinkCursor = horizontal ? (rtl ? 'e-resize' : 'w-resize') : 'n-resize';
|
|
564
|
+
if (grow < EPSILON && shrink < EPSILON)
|
|
565
|
+
return 'default';
|
|
566
|
+
if (shrink < EPSILON)
|
|
567
|
+
return growCursor;
|
|
568
|
+
if (grow < EPSILON)
|
|
569
|
+
return shrinkCursor;
|
|
570
|
+
return horizontal ? 'col-resize' : 'row-resize';
|
|
571
|
+
}
|
|
572
|
+
/** @docs-private */
|
|
573
|
+
separatorValues(index) {
|
|
574
|
+
const total = this.containerSize();
|
|
575
|
+
if (total <= 0)
|
|
576
|
+
return { now: 0, min: 0, max: 100 };
|
|
577
|
+
const sizes = this.sizes();
|
|
578
|
+
const { grow, shrink } = this.panelRoom(index);
|
|
579
|
+
const toPercent = (size) => Math.round((size / total) * 100);
|
|
580
|
+
return {
|
|
581
|
+
now: toPercent(sizes[index]),
|
|
582
|
+
min: toPercent(sizes[index] - shrink),
|
|
583
|
+
max: toPercent(sizes[index] + grow)
|
|
584
|
+
};
|
|
264
585
|
}
|
|
265
|
-
|
|
266
|
-
|
|
586
|
+
/** @docs-private */
|
|
587
|
+
handleResizeStart(index, origin) {
|
|
588
|
+
// Without a measurement every size resolves to zero, and a drag would read as one that collapses every
|
|
589
|
+
// collapsible panel it touches. A splitter with no size has nothing to resize anyway.
|
|
590
|
+
if (this.disabled() || this.containerSize() <= 0)
|
|
267
591
|
return;
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
592
|
+
const sizes = [...this.sizes()];
|
|
593
|
+
this.dragSnapshot = {
|
|
594
|
+
index,
|
|
595
|
+
sizes,
|
|
596
|
+
total: this.containerSize(),
|
|
597
|
+
layout: this.layout(),
|
|
598
|
+
origin: origin ?? sizes[index],
|
|
599
|
+
moved: false
|
|
273
600
|
};
|
|
274
|
-
|
|
275
|
-
const rightArea = this.areas[rightAreaIndex];
|
|
276
|
-
leftArea.initialSize = leftArea.area.getSize();
|
|
277
|
-
rightArea.initialSize = rightArea.area.getSize();
|
|
278
|
-
let currentGutter;
|
|
279
|
-
if (this.useGhost) {
|
|
280
|
-
const gutterOrder = leftAreaIndex * 2 + 1;
|
|
281
|
-
currentGutter = this.gutters().find((gutter) => gutter.order === gutterOrder);
|
|
282
|
-
if (currentGutter) {
|
|
283
|
-
const gutterPosition = currentGutter.getPosition();
|
|
284
|
-
const ghost = this.ghost();
|
|
285
|
-
ghost.direction = currentGutter.direction;
|
|
286
|
-
ghost.size = currentGutter.size;
|
|
287
|
-
ghost.x = gutterPosition.x;
|
|
288
|
-
ghost.y = gutterPosition.y;
|
|
289
|
-
ghost.visible = true;
|
|
290
|
-
this.setStyle("cursor" /* StyleProperty.Cursor */, currentGutter.direction === Direction.Vertical ? 'row-resize' : 'col-resize');
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
else {
|
|
294
|
-
this.areas.forEach((item) => {
|
|
295
|
-
const size = item.area.getSize();
|
|
296
|
-
item.area.disableFlex();
|
|
297
|
-
item.area.setSize(size);
|
|
298
|
-
});
|
|
299
|
-
}
|
|
300
|
-
this.listeners.push(this.renderer.listen('document', 'mouseup', () => this.onMouseUp(leftArea, rightArea, currentGutter)));
|
|
301
|
-
this.ngZone.runOutsideAngular(() => {
|
|
302
|
-
this.listeners.push(this.renderer.listen('document', 'mousemove', (e) => this.onMouseMove(e, startPoint, leftArea, rightArea, currentGutter)));
|
|
303
|
-
});
|
|
304
|
-
this._isDragging = true;
|
|
601
|
+
this.dragBoundary.set(index);
|
|
305
602
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
indexToRemove = index;
|
|
311
|
-
return true;
|
|
312
|
-
}
|
|
313
|
-
return false;
|
|
314
|
-
});
|
|
315
|
-
if (indexToRemove === -1) {
|
|
603
|
+
/** @docs-private */
|
|
604
|
+
handleResizeTo(index, size) {
|
|
605
|
+
const snapshot = this.dragSnapshot;
|
|
606
|
+
if (!snapshot || snapshot.index !== index || !this.matchesSnapshot(snapshot))
|
|
316
607
|
return;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
this.
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
608
|
+
const delta = size - snapshot.origin;
|
|
609
|
+
// Until the pointer travels, the press is not a drag: writing the layout for it would take the layout over
|
|
610
|
+
// from the panels for a gesture that may never move.
|
|
611
|
+
if (!snapshot.moved && Math.abs(delta) < EPSILON)
|
|
612
|
+
return;
|
|
613
|
+
snapshot.moved = true;
|
|
614
|
+
const pins = this.pinsFor(index, delta, snapshot);
|
|
615
|
+
const free = this.freePanels();
|
|
616
|
+
// Live, the way `NSSplitView` collapses a subview the moment its divider passes the midpoint: whatever a
|
|
617
|
+
// host binds to `collapsed` has to agree with the screen for the whole gesture, not catch up on release.
|
|
618
|
+
// Compared first, so a host hears `collapsedChange` once per crossing rather than on every move.
|
|
619
|
+
this.panels().forEach((panel, panelIndex) => {
|
|
620
|
+
if (free[panelIndex] && panel.collapsed() !== pins[panelIndex])
|
|
621
|
+
panel.collapsed.set(pins[panelIndex]);
|
|
329
622
|
});
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
623
|
+
this.applySizes(resizeSplitterSizesAt(snapshot.sizes, index, delta, this.minSizes(), this.maxSizes()));
|
|
624
|
+
}
|
|
625
|
+
/** @docs-private */
|
|
626
|
+
handleResizeEnd() {
|
|
627
|
+
const snapshot = this.dragSnapshot;
|
|
628
|
+
this.dragSnapshot = null;
|
|
629
|
+
// A press that never travelled leaves everything as it was: settling or snapping it would rewrite a layout
|
|
630
|
+
// nobody touched, or hand one still derived from the panels over to the host.
|
|
631
|
+
if (!snapshot?.moved || snapshot.total <= 0 || !this.matchesSnapshot(snapshot))
|
|
632
|
+
return this.endDrag();
|
|
633
|
+
const collapsed = this.settleCollapse(snapshot);
|
|
634
|
+
this.endDrag();
|
|
635
|
+
// A panel that just collapsed has taken the whole boundary with it; there is nothing left to snap.
|
|
636
|
+
if (collapsed)
|
|
333
637
|
return;
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
const
|
|
340
|
-
if (
|
|
341
|
-
const gutterPosition = currentGutter.getPosition();
|
|
342
|
-
const leftPos = leftArea.area.getPosition();
|
|
343
|
-
const rightPos = rightArea.area.getPosition();
|
|
344
|
-
const rightMin = rightArea.area.getMinSize() || 0;
|
|
345
|
-
const leftMin = leftArea.area.getMinSize() || 0;
|
|
346
|
-
const key = this.isVertical() ? 'y' : 'x';
|
|
347
|
-
const minPos = leftPos[key] - leftMin;
|
|
348
|
-
const maxPos = rightPos[key] + (rightArea.area.getSize() || 0) - rightMin - currentGutter.size;
|
|
349
|
-
const newPos = gutterPosition[key] - offset;
|
|
350
|
-
this.ghost()[key] = newPos < minPos ? minPos : Math.min(newPos, maxPos);
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
this.resizeAreas(leftArea, rightArea, offset);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
resizeAreas(leftArea, rightArea, sizeOffset) {
|
|
357
|
-
const newLeftAreaSize = leftArea.initialSize - sizeOffset;
|
|
358
|
-
const newRightAreaSize = rightArea.initialSize + sizeOffset;
|
|
359
|
-
const minLeftAreaSize = leftArea.area.getMinSize();
|
|
360
|
-
const minRightAreaSize = rightArea.area.getMinSize();
|
|
361
|
-
if (newLeftAreaSize < minLeftAreaSize || newRightAreaSize < minRightAreaSize) {
|
|
638
|
+
// Snapping happens here rather than on every move: the boundary follows the pointer exactly for the
|
|
639
|
+
// whole drag and lands on the nearest snap point only once it is let go. Pulling mid-drag instead would
|
|
640
|
+
// freeze the panel for as long as the pointer stayed near a point and then jump when it broke free —
|
|
641
|
+
// and the specification names `scroll-snap-type: proximity`, which likewise settles on release.
|
|
642
|
+
const sizes = this.sizes();
|
|
643
|
+
const delta = this.snapDelta(snapshot.index, 0, { sizes, total: snapshot.total });
|
|
644
|
+
if (Math.abs(delta) < EPSILON)
|
|
362
645
|
return;
|
|
363
|
-
|
|
364
|
-
else if (newLeftAreaSize <= 0) {
|
|
365
|
-
leftArea.area.setSize(0);
|
|
366
|
-
rightArea.area.setSize(rightArea.initialSize + leftArea.initialSize);
|
|
367
|
-
}
|
|
368
|
-
else if (newRightAreaSize <= 0) {
|
|
369
|
-
leftArea.area.setSize(rightArea.initialSize + leftArea.initialSize);
|
|
370
|
-
rightArea.area.setSize(0);
|
|
371
|
-
}
|
|
372
|
-
else {
|
|
373
|
-
leftArea.area.setSize(newLeftAreaSize);
|
|
374
|
-
rightArea.area.setSize(newRightAreaSize);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
onMouseUp(leftArea, rightArea, currentGutter) {
|
|
378
|
-
while (this.listeners.length > 0) {
|
|
379
|
-
const unsubscribe = this.listeners.pop();
|
|
380
|
-
if (unsubscribe) {
|
|
381
|
-
unsubscribe();
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
if (this.useGhost && currentGutter) {
|
|
385
|
-
const gutterPosition = currentGutter.getPosition();
|
|
386
|
-
const ghost = this.ghost();
|
|
387
|
-
const offset = ghost.direction === Direction.Vertical ? gutterPosition.y - ghost.y : gutterPosition.x - ghost.x;
|
|
388
|
-
this.resizeAreas(leftArea, rightArea, offset);
|
|
389
|
-
this.ghost().visible = false;
|
|
390
|
-
this.setStyle("cursor" /* StyleProperty.Cursor */, 'unset');
|
|
391
|
-
}
|
|
392
|
-
this._isDragging = false;
|
|
393
|
-
this.updateGutter();
|
|
394
|
-
// TODO: The 'emit' function requires a mandatory void argument
|
|
395
|
-
this.gutterPositionChange.emit();
|
|
396
|
-
this.changeDetectorRef.markForCheck();
|
|
646
|
+
this.applySizes(resizeSplitterSizesAt(sizes, snapshot.index, delta, this.minSizes(), this.maxSizes()));
|
|
397
647
|
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
}, exportAs: 'kbqSplitter', preserveWhitespaces: false, template: "<ng-content />\n\n@for (area of areas; track area) {\n @if (!$last) {\n <kbq-gutter\n [attr.disabled]=\"disabled || null\"\n [direction]=\"direction\"\n [order]=\"$index * 2 + 1\"\n [size]=\"gutterSize\"\n [style.display]=\"hideGutters ? 'none' : 'flex'\"\n (mousedown)=\"onMouseDown($event, $index, $index + 1)\"\n />\n }\n}\n\n@if (useGhost) {\n <kbq-gutter-ghost />\n}\n", styles: [".kbq-splitter{display:flex;position:relative;flex-wrap:nowrap;align-items:stretch;overflow:hidden}.kbq-splitter .kbq-splitter-area{overflow:hidden}.kbq-splitter .kbq-splitter-area_resizing{pointer-events:none}.kbq-gutter{display:flex;flex-grow:0;flex-shrink:0;justify-content:center;align-items:center;overflow:hidden}.kbq-gutter.kbq-gutter_vertical>.kbq-icon{transform:rotate(90deg)}.kbq-gutter-ghost{position:absolute;z-index:999;display:none;overflow:hidden}.kbq-gutter-ghost.kbq-gutter-ghost_vertical>.kbq-icon{transform:rotate(90deg)}.kbq-gutter-ghost.kbq-gutter-ghost_visible{display:block}.kbq-gutter{cursor:col-resize}.kbq-gutter:hover,.kbq-gutter.kbq-gutter_dragged{background-color:var(--kbq-states-background-transparent-hover)}.kbq-gutter.kbq-gutter_vertical{cursor:row-resize}.kbq-gutter[disabled]{background-color:var(--kbq-states-background-disabled);cursor:default}.kbq-gutter-ghost{background:var(--kbq-states-background-transparent-active)}\n"] }]
|
|
409
|
-
}], propDecorators: { gutterPositionChange: [{ type: i0.Output, args: ["gutterPositionChange"] }], gutters: [{ type: i0.ViewChildren, args: [i0.forwardRef(() => KbqGutterDirective), { isSignal: true }] }], ghost: [{ type: i0.ViewChild, args: [i0.forwardRef(() => KbqGutterGhostDirective), { isSignal: true }] }], areaRefs: [{
|
|
410
|
-
type: ContentChildren,
|
|
411
|
-
args: [forwardRef(() => KbqSplitterAreaDirective)]
|
|
412
|
-
}], hideGutters: [{
|
|
413
|
-
type: Input
|
|
414
|
-
}], direction: [{
|
|
415
|
-
type: Input
|
|
416
|
-
}], disabled: [{
|
|
417
|
-
type: Input
|
|
418
|
-
}], useGhost: [{
|
|
419
|
-
type: Input
|
|
420
|
-
}], gutterSize: [{
|
|
421
|
-
type: Input
|
|
422
|
-
}] } });
|
|
423
|
-
class KbqSplitterAreaDirective {
|
|
424
|
-
constructor() {
|
|
425
|
-
this.elementRef = inject(ElementRef);
|
|
426
|
-
this.renderer = inject(Renderer2);
|
|
427
|
-
this.splitter = inject(KbqSplitterComponent);
|
|
428
|
-
this.sizeChange = output();
|
|
429
|
-
this.window = inject(KBQ_WINDOW);
|
|
430
|
-
this.platform = inject(Platform);
|
|
431
|
-
this.emitSizeChange = () => {
|
|
432
|
-
this.sizeChange.emit(this.getSize());
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
isResizing() {
|
|
436
|
-
return this.splitter.isDragging;
|
|
437
|
-
}
|
|
438
|
-
disableFlex() {
|
|
439
|
-
this.renderer.removeStyle(this.elementRef.nativeElement, 'flex');
|
|
440
|
-
}
|
|
441
|
-
ngAfterViewInit() {
|
|
442
|
-
this.splitter.addArea(this);
|
|
443
|
-
this.removeStyle("max-width" /* StyleProperty.MaxWidth */);
|
|
444
|
-
if (this.splitter.direction === Direction.Vertical) {
|
|
445
|
-
this.setStyle("width" /* StyleProperty.Width */, '100%');
|
|
446
|
-
this.removeStyle("height" /* StyleProperty.Height */);
|
|
447
|
-
}
|
|
448
|
-
else {
|
|
449
|
-
this.setStyle("height" /* StyleProperty.Height */, '100%');
|
|
450
|
-
this.removeStyle("width" /* StyleProperty.Width */);
|
|
648
|
+
/** @docs-private */
|
|
649
|
+
handleSeparatorKeydown(index, event) {
|
|
650
|
+
// A modified press belongs to the browser: Cmd+Left is Back, Ctrl+Home scrolls to the top. `Shift` is
|
|
651
|
+
// the exception — `Shift+F6` walks the panels backwards.
|
|
652
|
+
if (hasModifierKey(event, 'altKey', 'ctrlKey', 'metaKey'))
|
|
653
|
+
return;
|
|
654
|
+
if (event.key === 'F6') {
|
|
655
|
+
event.preventDefault();
|
|
656
|
+
// From a separator, "next" is the panel it opens onto and "previous" the one it closes.
|
|
657
|
+
return this.focusPanel(event.shiftKey ? index : index + 1);
|
|
451
658
|
}
|
|
452
|
-
this.
|
|
453
|
-
}
|
|
454
|
-
ngOnDestroy() {
|
|
455
|
-
this.splitter.removeArea(this);
|
|
456
|
-
}
|
|
457
|
-
setOrder(order) {
|
|
458
|
-
this.setStyle("order" /* StyleProperty.Order */, order);
|
|
459
|
-
}
|
|
460
|
-
setSize(size) {
|
|
461
|
-
if (isNaN(size)) {
|
|
659
|
+
if (this.disabled())
|
|
462
660
|
return;
|
|
661
|
+
const horizontal = this.orientation() === 'horizontal';
|
|
662
|
+
// In RTL a horizontal splitter grows its leading panel as the boundary travels west, so the arrow that
|
|
663
|
+
// moves the boundary right is the one that shrinks it.
|
|
664
|
+
const sign = horizontal && this.rtl() ? -1 : 1;
|
|
665
|
+
const panel = this.panels()[index];
|
|
666
|
+
switch (event.key) {
|
|
667
|
+
case 'ArrowLeft':
|
|
668
|
+
if (!horizontal)
|
|
669
|
+
return;
|
|
670
|
+
return this.commitKeydown(event, () => this.resizeBy(index, -KEYBOARD_STEP * sign));
|
|
671
|
+
case 'ArrowRight':
|
|
672
|
+
if (!horizontal)
|
|
673
|
+
return;
|
|
674
|
+
return this.commitKeydown(event, () => this.resizeBy(index, KEYBOARD_STEP * sign));
|
|
675
|
+
case 'ArrowUp':
|
|
676
|
+
if (horizontal)
|
|
677
|
+
return;
|
|
678
|
+
return this.commitKeydown(event, () => this.resizeBy(index, -KEYBOARD_STEP));
|
|
679
|
+
case 'ArrowDown':
|
|
680
|
+
if (horizontal)
|
|
681
|
+
return;
|
|
682
|
+
return this.commitKeydown(event, () => this.resizeBy(index, KEYBOARD_STEP));
|
|
683
|
+
case 'Home':
|
|
684
|
+
return this.commitKeydown(event, () => {
|
|
685
|
+
const min = this.expandedMinSizes()[index];
|
|
686
|
+
// A panel already at its minimum has nowhere left to go but away, when it may collapse.
|
|
687
|
+
if (panel.collapsible() && this.sizes()[index] <= min + EPSILON)
|
|
688
|
+
return panel.collapsed.set(true);
|
|
689
|
+
this.resizeBy(index, min - this.sizes()[index]);
|
|
690
|
+
});
|
|
691
|
+
case 'End':
|
|
692
|
+
return this.commitKeydown(event, () => {
|
|
693
|
+
// Expand first, so the size the panel is grown from is a real one and not its collapsed
|
|
694
|
+
// strip — but only where collapsing was the splitter's to do in the first place.
|
|
695
|
+
if (panel.collapsible())
|
|
696
|
+
panel.collapsed.set(false);
|
|
697
|
+
// `resizeBy` is bounded by what the trailing panels can give up, so the splitter's own size
|
|
698
|
+
// is a safe stand-in for an unbounded maximum.
|
|
699
|
+
const max = Math.min(this.expandedMaxSizes()[index], this.containerSize());
|
|
700
|
+
this.resizeBy(index, max - this.sizes()[index]);
|
|
701
|
+
});
|
|
702
|
+
case 'Enter':
|
|
703
|
+
if (!panel.collapsible())
|
|
704
|
+
return;
|
|
705
|
+
return this.commitKeydown(event, () => panel.collapsed.update((collapsed) => !collapsed));
|
|
706
|
+
default:
|
|
707
|
+
return;
|
|
463
708
|
}
|
|
464
|
-
this.setStyle(this.getSizeProperty(), coerceCssPixelValue(coerceNumberProperty(size)));
|
|
465
|
-
}
|
|
466
|
-
getSize() {
|
|
467
|
-
if (!this.platform.isBrowser)
|
|
468
|
-
return 0;
|
|
469
|
-
return this.elementRef.nativeElement[this.getOffsetSizeProperty()];
|
|
470
709
|
}
|
|
471
|
-
|
|
710
|
+
/** @docs-private */
|
|
711
|
+
handleSeparatorDblClick(index) {
|
|
712
|
+
if (this.disabled())
|
|
713
|
+
return;
|
|
714
|
+
// First return the whole group to the sizes its panels declare; from there, take the leading panel down
|
|
715
|
+
// to its minimum, which is the optional second step of the double-click behaviour.
|
|
716
|
+
if (this.layout() !== null)
|
|
717
|
+
return this.layout.set(null);
|
|
718
|
+
this.resizeBy(index, this.minSizes()[index] - this.sizes()[index]);
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Whether the panels are still the ones the drag was measured against.
|
|
722
|
+
*
|
|
723
|
+
* A host that adds or removes a panel mid-drag invalidates every index the snapshot holds: the captured
|
|
724
|
+
* sizes stop lining up with `minSizes`/`maxSizes`, which turns the arithmetic into `NaN`, and a boundary
|
|
725
|
+
* index no longer names the panel the user took hold of.
|
|
726
|
+
*/
|
|
727
|
+
matchesSnapshot(snapshot) {
|
|
728
|
+
return snapshot.sizes.length === this.panels().length;
|
|
729
|
+
}
|
|
730
|
+
commitKeydown(event, action) {
|
|
731
|
+
event.preventDefault();
|
|
732
|
+
action();
|
|
733
|
+
}
|
|
734
|
+
/** Moves focus onto a panel, which is how `F6` walks the regions of the splitter. */
|
|
735
|
+
focusPanel(index) {
|
|
736
|
+
this.panels().at(index)?.element.focus();
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* Room on each side of the boundary after `index`, in pixels.
|
|
740
|
+
*
|
|
741
|
+
* Measured against the expanded limits rather than the collapse pin, because a collapsed panel can still be
|
|
742
|
+
* dragged back out — reporting it as immovable would leave the cursor saying otherwise.
|
|
743
|
+
*/
|
|
744
|
+
sideRoom(index) {
|
|
745
|
+
const sizes = this.sizes();
|
|
746
|
+
const min = this.expandedMinSizes();
|
|
747
|
+
const max = this.expandedMaxSizes();
|
|
748
|
+
const room = (available) => Math.max(0, available);
|
|
749
|
+
const sumOver = (panels, take) => sumOf(panels.map(take));
|
|
750
|
+
const leading = Array.from({ length: index + 1 }, (_, offset) => offset);
|
|
751
|
+
const trailing = Array.from({ length: sizes.length - index - 1 }, (_, offset) => index + 1 + offset);
|
|
472
752
|
return {
|
|
473
|
-
|
|
474
|
-
|
|
753
|
+
leadingGrow: sumOver(leading, (panel) => room(max[panel] - sizes[panel])),
|
|
754
|
+
leadingShrink: sumOver(leading, (panel) => room(sizes[panel] - min[panel])),
|
|
755
|
+
trailingGive: sumOver(trailing, (panel) => room(sizes[panel] - min[panel])),
|
|
756
|
+
trailingTake: sumOver(trailing, (panel) => room(max[panel] - sizes[panel]))
|
|
475
757
|
};
|
|
476
758
|
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
return this.isVertical() ? "height" /* StyleProperty.Height */ : "width" /* StyleProperty.Width */;
|
|
492
|
-
}
|
|
493
|
-
setStyle(style, value) {
|
|
494
|
-
this.renderer.setStyle(this.elementRef.nativeElement, style, value);
|
|
759
|
+
/**
|
|
760
|
+
* How far the boundary after `index` can still travel each way — what the cursor advertises.
|
|
761
|
+
*
|
|
762
|
+
* Both sides are summed across every panel, because the drag walks outwards from the boundary: a neighbour
|
|
763
|
+
* pinned at its limit passes the delta on, so the boundary is still movable when it alone is stuck.
|
|
764
|
+
*/
|
|
765
|
+
boundaryRoom(index) {
|
|
766
|
+
if (index < 0 || index >= this.sizes().length - 1)
|
|
767
|
+
return { grow: 0, shrink: 0 };
|
|
768
|
+
const { leadingGrow, leadingShrink, trailingGive, trailingTake } = this.sideRoom(index);
|
|
769
|
+
return {
|
|
770
|
+
grow: Math.min(leadingGrow, trailingGive),
|
|
771
|
+
shrink: Math.min(leadingShrink, trailingTake)
|
|
772
|
+
};
|
|
495
773
|
}
|
|
496
|
-
|
|
497
|
-
|
|
774
|
+
/**
|
|
775
|
+
* How far the panel at `index` itself can still be resized — what `aria-valuemin` / `aria-valuemax` report.
|
|
776
|
+
*
|
|
777
|
+
* Narrower than {@link boundaryRoom} on purpose: the boundary may keep moving by handing the delta to panels
|
|
778
|
+
* further out, and those moves leave the pane this separator controls exactly where it was.
|
|
779
|
+
*/
|
|
780
|
+
panelRoom(index) {
|
|
781
|
+
const sizes = this.sizes();
|
|
782
|
+
if (index < 0 || index >= sizes.length - 1)
|
|
783
|
+
return { grow: 0, shrink: 0 };
|
|
784
|
+
const { trailingGive, trailingTake } = this.sideRoom(index);
|
|
785
|
+
const room = (available) => Math.max(0, available);
|
|
786
|
+
return {
|
|
787
|
+
grow: room(Math.min(this.expandedMaxSizes()[index] - sizes[index], trailingGive)),
|
|
788
|
+
shrink: room(Math.min(sizes[index] - this.expandedMinSizes()[index], trailingTake))
|
|
789
|
+
};
|
|
498
790
|
}
|
|
499
|
-
|
|
500
|
-
|
|
791
|
+
resizeBy(index, delta) {
|
|
792
|
+
this.applySizes(resizeSplitterSizesAt(this.sizes(), index, delta, this.minSizes(), this.maxSizes()));
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Settles a seeded layout onto the snap points its panels declare, boundary by boundary, exactly as
|
|
796
|
+
* releasing a drag on each of them would.
|
|
797
|
+
*
|
|
798
|
+
* Only the seeded sizes go through this. A layout handed to the splitter is authoritative — settling that
|
|
799
|
+
* one would both overwrite a restored layout and pull the boundary onto a point mid-drag, since every move
|
|
800
|
+
* writes `layout`.
|
|
801
|
+
*/
|
|
802
|
+
settleOnSnapPoints(sizes, total) {
|
|
803
|
+
const min = this.minSizes();
|
|
804
|
+
const max = this.maxSizes();
|
|
805
|
+
return sizes.reduce((settled, _, index) => {
|
|
806
|
+
if (index >= settled.length - 1)
|
|
807
|
+
return settled;
|
|
808
|
+
const delta = this.snapDelta(index, 0, { sizes: settled, total });
|
|
809
|
+
return Math.abs(delta) < EPSILON ? settled : resizeSplitterSizesAt(settled, index, delta, min, max);
|
|
810
|
+
}, sizes);
|
|
811
|
+
}
|
|
812
|
+
/** Pulls the drag onto the nearest snap point declared by either panel around the separator. */
|
|
813
|
+
snapDelta(index, delta, snapshot) {
|
|
814
|
+
const panels = this.panels();
|
|
815
|
+
const leading = panels[index];
|
|
816
|
+
const trailing = panels[index + 1];
|
|
817
|
+
if (!leading.snapSizes().length && !trailing?.snapSizes().length)
|
|
818
|
+
return delta;
|
|
819
|
+
// A size declared on the trailing panel is a position of the same boundary, so it is mapped into a size
|
|
820
|
+
// for the leading one before it can compete with the leading panel's own points.
|
|
821
|
+
const pairSize = snapshot.sizes[index] + (snapshot.sizes[index + 1] ?? 0);
|
|
822
|
+
const snapPointsOf = (panel, toLeadingSize) => [...panel.snapSizes(), panel.minSize(), panel.maxSize()]
|
|
823
|
+
.map((size) => resolveSplitterSize(size, snapshot.total))
|
|
824
|
+
.filter((size) => size !== null)
|
|
825
|
+
.map((size) => ({ size: toLeadingSize(size), tolerance: panel.snapTolerance() }));
|
|
826
|
+
const target = snapSplitterSize(snapshot.sizes[index] + delta, [
|
|
827
|
+
...snapPointsOf(leading, (size) => size),
|
|
828
|
+
...(trailing ? snapPointsOf(trailing, (size) => pairSize - size) : [])
|
|
829
|
+
]);
|
|
830
|
+
return target - snapshot.sizes[index];
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* Which side of its gap each panel around the dragged boundary is held on.
|
|
834
|
+
*
|
|
835
|
+
* Decided from the size the pointer is asking for rather than the one on screen, because a panel held at
|
|
836
|
+
* its minimum or on its collapsed strip has stopped moving — only where the pointer went says what the user
|
|
837
|
+
* means. Half the minimum is the midpoint of the gap, so the same distance decides the panel whichever
|
|
838
|
+
* direction it came from.
|
|
839
|
+
*/
|
|
840
|
+
pinsFor(index, delta, snapshot) {
|
|
841
|
+
const min = this.expandedMinSizes();
|
|
842
|
+
const aimed = {
|
|
843
|
+
[index]: snapshot.sizes[index] + delta,
|
|
844
|
+
[index + 1]: (snapshot.sizes[index + 1] ?? 0) - delta
|
|
845
|
+
};
|
|
846
|
+
return this.panels().map((_, panel) => panel in aimed && aimed[panel] < min[panel] / 2);
|
|
847
|
+
}
|
|
848
|
+
/** Clears the drag, so the panels go back to their settled limits. */
|
|
849
|
+
endDrag() {
|
|
850
|
+
this.dragBoundary.set(null);
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* Hands every collapsible panel around the boundary that ended the drag collapsed the share it had before the
|
|
854
|
+
* gesture. `collapsed` itself already changed during the drag; only the size it returns to is left to fix.
|
|
855
|
+
*
|
|
856
|
+
* Returns whether anything is collapsed.
|
|
857
|
+
*/
|
|
858
|
+
settleCollapse(snapshot) {
|
|
859
|
+
const panels = this.panels();
|
|
860
|
+
const collapsing = [snapshot.index, snapshot.index + 1].filter((index) => panels[index]?.collapsible() && panels[index].collapsed());
|
|
861
|
+
const layout = this.layout();
|
|
862
|
+
if (!collapsing.length)
|
|
863
|
+
return false;
|
|
864
|
+
// A drag that travelled has written the layout already; without one there is no entry to hand a share to.
|
|
865
|
+
if (!layout)
|
|
866
|
+
return true;
|
|
867
|
+
// Hand a collapsing panel back the share it had before the gesture, so expanding it later returns it to
|
|
868
|
+
// that size rather than to the sliver the drag squeezed it down to on its way out. What that adds comes out
|
|
869
|
+
// of the open panels, which keeps them on screen exactly where the drag left them.
|
|
870
|
+
this.layout.set(keepSplitterRestoreSizes(layout, panels.map((panel) => panel.collapsed()), layout.map((_, index) => collapsing.includes(index)
|
|
871
|
+
? (snapshot.layout?.[index] ?? (snapshot.sizes[index] / snapshot.total) * 100)
|
|
872
|
+
: undefined)));
|
|
873
|
+
return true;
|
|
874
|
+
}
|
|
875
|
+
applySizes(sizes) {
|
|
876
|
+
const total = this.containerSize();
|
|
877
|
+
if (total <= 0)
|
|
878
|
+
return;
|
|
879
|
+
const free = this.freePanels();
|
|
880
|
+
const previous = this.layout();
|
|
881
|
+
const collapsed = this.panels().map((panel) => panel.collapsed());
|
|
882
|
+
this.layout.set(keepSplitterRestoreSizes(sizes.map((size) => (size / total) * 100), collapsed,
|
|
883
|
+
// A collapsed panel keeps the share it had before it collapsed, so expanding restores that size
|
|
884
|
+
// instead of the strip it is pinned to while collapsed. A panel the drag is free to move is the
|
|
885
|
+
// exception: it is the one being aimed at, so what it records is where it actually is.
|
|
886
|
+
collapsed.map((isCollapsed, index) => (isCollapsed && !free[index] ? previous?.[index] : undefined))));
|
|
887
|
+
}
|
|
888
|
+
measure() {
|
|
889
|
+
const style = this.window.getComputedStyle(this.nativeElement);
|
|
890
|
+
// `clientWidth`/`clientHeight` are the padding box, and the tracks only ever fill the content box.
|
|
891
|
+
const size = this.orientation() === 'horizontal'
|
|
892
|
+
? this.nativeElement.clientWidth - parseFloat(style.paddingLeft) - parseFloat(style.paddingRight)
|
|
893
|
+
: this.nativeElement.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom);
|
|
894
|
+
this.containerSize.set(Math.max(0, size || 0));
|
|
895
|
+
}
|
|
896
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitter, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
897
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.25", type: KbqSplitter, isStandalone: true, selector: "kbq-splitter", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { layout: "layoutChange" }, host: { properties: { "class.kbq-splitter_vertical": "orientation() === 'vertical'", "class.kbq-splitter_disabled": "disabled()", "class.kbq-splitter_dragging": "dragging()", "class.kbq-splitter_transparent": "appearance() === 'transparent'", "class.kbq-splitter_handle": "appearance() === 'handle'", "style.grid-template-columns": "orientation() === 'horizontal' ? gridTemplate() : null", "style.grid-template-rows": "orientation() === 'vertical' ? gridTemplate() : null" }, classAttribute: "kbq-splitter" }, providers: [{ provide: KBQ_SPLITTER, useExisting: KbqSplitter }], queries: [{ propertyName: "panels", predicate: KbqSplitterPanel, isSignal: true }], exportAs: ["kbqSplitter"], ngImport: i0, template: '<ng-content />', isInline: true, styles: [".kbq-splitter{display:grid;position:relative;min-width:0;min-height:0;overflow:clip;grid-template-rows:minmax(0,1fr)}.kbq-splitter.kbq-splitter_vertical{grid-template-rows:none;grid-template-columns:minmax(0,1fr)}.kbq-splitter.kbq-splitter_dragging .kbq-splitter-panel__content{pointer-events:none;-webkit-user-select:none;user-select:none}.kbq-splitter-panel{position:relative;min-width:0;min-height:0;outline:none}.kbq-splitter-panel:focus-visible{outline:var(--kbq-splitter-size-focus-outline-width) solid var(--kbq-splitter-focus-outline-color);outline-offset:calc(-1 * var(--kbq-splitter-size-focus-outline-width))}.kbq-splitter-panel__content{display:flex;flex-direction:column;block-size:100%;inline-size:100%;overflow:hidden}.kbq-splitter-panel__separator{position:absolute;z-index:1;inset-block:0;inset-inline-end:calc(var(--kbq-splitter-size-hit-area) / -2);inline-size:var(--kbq-splitter-size-hit-area);touch-action:none;outline:none}.kbq-splitter-panel__separator:after{position:absolute;inset-block:0;inset-inline:0;inline-size:var(--kbq-splitter-size-line-width);margin-inline:auto;background-color:var(--kbq-splitter-line-color);content:\"\"}.kbq-splitter-panel__separator:is(:hover,.kbq-hover):after{background-color:var(--kbq-splitter-state-hover-line-color)}.kbq-splitter-panel__separator:is(:active,.kbq-active):after{inline-size:var(--kbq-splitter-size-active-line-width);background-color:var(--kbq-splitter-state-active-line-color)}.kbq-splitter-panel__separator.cdk-keyboard-focused{outline:var(--kbq-splitter-size-focus-outline-width) solid var(--kbq-splitter-focus-outline-color);outline-offset:calc(-1 * var(--kbq-splitter-size-focus-outline-width))}.kbq-splitter_disabled>.kbq-splitter-panel>.kbq-splitter-panel__separator{pointer-events:none}.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator{inset-block:auto;inset-inline:0;inset-block-end:calc(var(--kbq-splitter-size-hit-area) / -2);inline-size:auto;block-size:var(--kbq-splitter-size-hit-area)}.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{inset-block:0;inset-inline:0;inline-size:auto;block-size:var(--kbq-splitter-size-line-width);margin-inline:0;margin-block:auto}.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator:is(:active,.kbq-active):after{inline-size:auto;block-size:var(--kbq-splitter-size-active-line-width)}.kbq-splitter_transparent>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{opacity:0}.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{inset-block:0;inline-size:var(--kbq-splitter-size-handle-thickness);block-size:var(--kbq-splitter-size-handle-length);margin-block:auto;border-radius:var(--kbq-splitter-size-handle-border-radius);background-color:var(--kbq-splitter-handle-color)}.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator:is(:hover,.kbq-hover):after,.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator:is(:active,.kbq-active):after,.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator.cdk-keyboard-focused:after{background-color:var(--kbq-splitter-state-active-handle-color)}.kbq-splitter_handle.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{inset-inline:0;inline-size:var(--kbq-splitter-size-handle-length);block-size:var(--kbq-splitter-size-handle-thickness);margin-inline:auto;margin-block:auto}\n", ".kbq-splitter{--kbq-splitter-size-line-width: 1px;--kbq-splitter-size-active-line-width: 3px;--kbq-splitter-size-focus-outline-width: 2px;--kbq-splitter-size-hit-area: calc(2 * var(--kbq-size-s) + var(--kbq-splitter-size-line-width));--kbq-splitter-size-handle-length: var(--kbq-size-3xl);--kbq-splitter-size-handle-thickness: var(--kbq-size-xxs);--kbq-splitter-size-handle-border-radius: var(--kbq-size-3xs);--kbq-splitter-line-color: var(--kbq-line-contrast-less);--kbq-splitter-state-hover-line-color: var(--kbq-line-contrast-fade);--kbq-splitter-state-active-line-color: var(--kbq-states-line-focus-theme);--kbq-splitter-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-splitter-handle-color: var(--kbq-line-contrast-fade);--kbq-splitter-state-active-handle-color: var(--kbq-states-line-focus-theme)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
501
898
|
}
|
|
502
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
503
|
-
type:
|
|
504
|
-
args: [{
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
class: '
|
|
508
|
-
'[class.kbq-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
899
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitter, decorators: [{
|
|
900
|
+
type: Component,
|
|
901
|
+
args: [{ selector: 'kbq-splitter', template: '<ng-content />', providers: [{ provide: KBQ_SPLITTER, useExisting: KbqSplitter }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
902
|
+
class: 'kbq-splitter',
|
|
903
|
+
'[class.kbq-splitter_vertical]': "orientation() === 'vertical'",
|
|
904
|
+
'[class.kbq-splitter_disabled]': 'disabled()',
|
|
905
|
+
'[class.kbq-splitter_dragging]': 'dragging()',
|
|
906
|
+
'[class.kbq-splitter_transparent]': "appearance() === 'transparent'",
|
|
907
|
+
'[class.kbq-splitter_handle]': "appearance() === 'handle'",
|
|
908
|
+
'[style.grid-template-columns]': "orientation() === 'horizontal' ? gridTemplate() : null",
|
|
909
|
+
'[style.grid-template-rows]': "orientation() === 'vertical' ? gridTemplate() : null"
|
|
910
|
+
}, exportAs: 'kbqSplitter', styles: [".kbq-splitter{display:grid;position:relative;min-width:0;min-height:0;overflow:clip;grid-template-rows:minmax(0,1fr)}.kbq-splitter.kbq-splitter_vertical{grid-template-rows:none;grid-template-columns:minmax(0,1fr)}.kbq-splitter.kbq-splitter_dragging .kbq-splitter-panel__content{pointer-events:none;-webkit-user-select:none;user-select:none}.kbq-splitter-panel{position:relative;min-width:0;min-height:0;outline:none}.kbq-splitter-panel:focus-visible{outline:var(--kbq-splitter-size-focus-outline-width) solid var(--kbq-splitter-focus-outline-color);outline-offset:calc(-1 * var(--kbq-splitter-size-focus-outline-width))}.kbq-splitter-panel__content{display:flex;flex-direction:column;block-size:100%;inline-size:100%;overflow:hidden}.kbq-splitter-panel__separator{position:absolute;z-index:1;inset-block:0;inset-inline-end:calc(var(--kbq-splitter-size-hit-area) / -2);inline-size:var(--kbq-splitter-size-hit-area);touch-action:none;outline:none}.kbq-splitter-panel__separator:after{position:absolute;inset-block:0;inset-inline:0;inline-size:var(--kbq-splitter-size-line-width);margin-inline:auto;background-color:var(--kbq-splitter-line-color);content:\"\"}.kbq-splitter-panel__separator:is(:hover,.kbq-hover):after{background-color:var(--kbq-splitter-state-hover-line-color)}.kbq-splitter-panel__separator:is(:active,.kbq-active):after{inline-size:var(--kbq-splitter-size-active-line-width);background-color:var(--kbq-splitter-state-active-line-color)}.kbq-splitter-panel__separator.cdk-keyboard-focused{outline:var(--kbq-splitter-size-focus-outline-width) solid var(--kbq-splitter-focus-outline-color);outline-offset:calc(-1 * var(--kbq-splitter-size-focus-outline-width))}.kbq-splitter_disabled>.kbq-splitter-panel>.kbq-splitter-panel__separator{pointer-events:none}.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator{inset-block:auto;inset-inline:0;inset-block-end:calc(var(--kbq-splitter-size-hit-area) / -2);inline-size:auto;block-size:var(--kbq-splitter-size-hit-area)}.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{inset-block:0;inset-inline:0;inline-size:auto;block-size:var(--kbq-splitter-size-line-width);margin-inline:0;margin-block:auto}.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator:is(:active,.kbq-active):after{inline-size:auto;block-size:var(--kbq-splitter-size-active-line-width)}.kbq-splitter_transparent>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{opacity:0}.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{inset-block:0;inline-size:var(--kbq-splitter-size-handle-thickness);block-size:var(--kbq-splitter-size-handle-length);margin-block:auto;border-radius:var(--kbq-splitter-size-handle-border-radius);background-color:var(--kbq-splitter-handle-color)}.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator:is(:hover,.kbq-hover):after,.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator:is(:active,.kbq-active):after,.kbq-splitter_handle>.kbq-splitter-panel>.kbq-splitter-panel__separator.cdk-keyboard-focused:after{background-color:var(--kbq-splitter-state-active-handle-color)}.kbq-splitter_handle.kbq-splitter_vertical>.kbq-splitter-panel>.kbq-splitter-panel__separator:after{inset-inline:0;inline-size:var(--kbq-splitter-size-handle-length);block-size:var(--kbq-splitter-size-handle-thickness);margin-inline:auto;margin-block:auto}\n", ".kbq-splitter{--kbq-splitter-size-line-width: 1px;--kbq-splitter-size-active-line-width: 3px;--kbq-splitter-size-focus-outline-width: 2px;--kbq-splitter-size-hit-area: calc(2 * var(--kbq-size-s) + var(--kbq-splitter-size-line-width));--kbq-splitter-size-handle-length: var(--kbq-size-3xl);--kbq-splitter-size-handle-thickness: var(--kbq-size-xxs);--kbq-splitter-size-handle-border-radius: var(--kbq-size-3xs);--kbq-splitter-line-color: var(--kbq-line-contrast-less);--kbq-splitter-state-hover-line-color: var(--kbq-line-contrast-fade);--kbq-splitter-state-active-line-color: var(--kbq-states-line-focus-theme);--kbq-splitter-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-splitter-handle-color: var(--kbq-line-contrast-fade);--kbq-splitter-state-active-handle-color: var(--kbq-states-line-focus-theme)}\n"] }]
|
|
911
|
+
}], ctorParameters: () => [], propDecorators: { orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }, { type: i0.Output, args: ["layoutChange"] }], panels: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KbqSplitterPanel), { ...{ descendants: false }, isSignal: true }] }] } });
|
|
512
912
|
|
|
913
|
+
const COMPONENTS = [KbqSplitter, KbqSplitterPanel];
|
|
914
|
+
/**
|
|
915
|
+
* Convenience module for `NgModule` consumers. Everything it re-exports is standalone, so importing
|
|
916
|
+
* `KbqSplitter` and `KbqSplitterPanel` directly is the preferred way in — the library's own examples do that.
|
|
917
|
+
*/
|
|
513
918
|
class KbqSplitterModule {
|
|
514
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
515
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
516
|
-
|
|
517
|
-
KbqGutterGhostDirective,
|
|
518
|
-
KbqSplitterAreaDirective,
|
|
519
|
-
KbqSplitterComponent], exports: [KbqGutterDirective,
|
|
520
|
-
KbqSplitterAreaDirective,
|
|
521
|
-
KbqSplitterComponent] }); }
|
|
522
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqSplitterModule, imports: [KbqIconModule] }); }
|
|
919
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
920
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitterModule, imports: [KbqSplitter, KbqSplitterPanel], exports: [KbqSplitter, KbqSplitterPanel] }); }
|
|
921
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitterModule }); }
|
|
523
922
|
}
|
|
524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
923
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqSplitterModule, decorators: [{
|
|
525
924
|
type: NgModule,
|
|
526
925
|
args: [{
|
|
527
|
-
imports:
|
|
528
|
-
|
|
529
|
-
KbqGutterDirective,
|
|
530
|
-
KbqGutterGhostDirective,
|
|
531
|
-
KbqSplitterAreaDirective,
|
|
532
|
-
KbqSplitterComponent
|
|
533
|
-
],
|
|
534
|
-
exports: [
|
|
535
|
-
KbqGutterDirective,
|
|
536
|
-
KbqSplitterAreaDirective,
|
|
537
|
-
KbqSplitterComponent
|
|
538
|
-
]
|
|
926
|
+
imports: COMPONENTS,
|
|
927
|
+
exports: COMPONENTS
|
|
539
928
|
}]
|
|
540
929
|
}] });
|
|
541
930
|
|
|
@@ -543,5 +932,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
543
932
|
* Generated bundle index. Do not edit.
|
|
544
933
|
*/
|
|
545
934
|
|
|
546
|
-
export {
|
|
935
|
+
export { KBQ_SPLITTER, KBQ_SPLITTER_OPTIONS, KbqSplitter, KbqSplitterModule, KbqSplitterPanel, fitSplitterSizes, kbqSplitterOptionsProvider, resizeSplitterSizesAt, resolveSplitterSize, snapSplitterSize };
|
|
547
936
|
//# sourceMappingURL=koobiq-components-splitter.mjs.map
|