@koobiq/components 20.4.2 → 21.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +791 -609
- 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 +2871 -2595
- 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 +400 -149
- 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 +463 -143
- 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 +734 -488
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +1700 -617
- 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 +415 -18
- package/schematics/migrations/accordion-state-saving-default/README.md +60 -0
- package/schematics/migrations/accordion-state-saving-default/data.cjs +75 -0
- package/schematics/migrations/accordion-state-saving-default/index.cjs +61 -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.cjs +47 -0
- package/schematics/migrations/actions-panel-overlay-container/index.cjs +55 -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 → data.cjs} +3 -0
- package/schematics/migrations/alert-signals/index.cjs +221 -0
- package/schematics/migrations/angular-animations-removal/README.md +46 -0
- package/schematics/migrations/angular-animations-removal/data.cjs +150 -0
- package/schematics/migrations/angular-animations-removal/index.cjs +21 -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.cjs +136 -0
- package/schematics/migrations/app-switcher-signals/index.cjs +366 -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 → index.cjs} +6 -5
- package/schematics/migrations/autocomplete-signals/README.md +92 -0
- package/schematics/migrations/autocomplete-signals/data.cjs +149 -0
- package/schematics/migrations/autocomplete-signals/index.cjs +707 -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.cjs +109 -0
- package/schematics/migrations/badge-signals/index.cjs +694 -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.cjs +136 -0
- package/schematics/migrations/button-state-and-styles/index.cjs +221 -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.cjs +106 -0
- package/schematics/migrations/button-supported-colors/index.cjs +261 -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.cjs +200 -0
- package/schematics/migrations/button-toggle-signals-and-aria/index.cjs +497 -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.cjs +88 -0
- package/schematics/migrations/button-truncation/index.cjs +270 -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.cjs +114 -0
- package/schematics/migrations/checkbox-signals/index.cjs +635 -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.cjs +101 -0
- package/schematics/migrations/clamped-text-disclosure/index.cjs +60 -0
- package/schematics/migrations/clamped-text-disclosure/schema.json +15 -0
- package/schematics/migrations/code-block-highlight-js-core/README.md +53 -0
- package/schematics/migrations/code-block-highlight-js-core/data.cjs +64 -0
- package/schematics/migrations/code-block-highlight-js-core/index.cjs +319 -0
- package/schematics/migrations/code-block-highlight-js-core/schema.json +20 -0
- package/schematics/migrations/code-block-signals/README.md +84 -0
- package/schematics/migrations/code-block-signals/data.cjs +121 -0
- package/schematics/migrations/code-block-signals/index.cjs +701 -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.cjs +131 -0
- package/schematics/migrations/color-signals/index.cjs +20 -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.cjs +27 -0
- package/schematics/migrations/core-mixins-removal/index.cjs +18 -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 → index.cjs} +4 -3
- package/schematics/migrations/datepicker-signals/README.md +24 -0
- package/schematics/migrations/datepicker-signals/data.cjs +49 -0
- package/schematics/migrations/datepicker-signals/index.cjs +18 -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 → index.cjs} +8 -7
- package/schematics/migrations/design-tokens-v4/README.md +75 -0
- package/schematics/migrations/design-tokens-v4/index.cjs +60 -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.cjs +62 -0
- package/schematics/migrations/divider-signals-and-aria/index.cjs +212 -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.cjs +85 -0
- package/schematics/migrations/dl-attribute-coercion/index.cjs +162 -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.cjs +44 -0
- package/schematics/migrations/dl-standalone-names/index.cjs +322 -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.cjs +84 -0
- package/schematics/migrations/dropdown-demote-overlay/index.cjs +289 -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.cjs +152 -0
- package/schematics/migrations/dropdown-signals/index.cjs +20 -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.cjs +85 -0
- package/schematics/migrations/empty-state-error-color/index.cjs +72 -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 → index.cjs} +6 -5
- package/schematics/migrations/file-upload-cva-and-primitives/README.md +70 -0
- package/schematics/migrations/file-upload-cva-and-primitives/data.cjs +97 -0
- package/schematics/migrations/file-upload-cva-and-primitives/index.cjs +61 -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.cjs +20 -0
- package/schematics/migrations/file-upload-deprecated-outputs/index.cjs +71 -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.cjs +151 -0
- package/schematics/migrations/filter-bar-rename-action/index.cjs +178 -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 → data.cjs} +1 -2
- package/schematics/migrations/filter-bar-signals/index.cjs +225 -0
- package/schematics/migrations/filter-bar-state-saving-default/README.md +53 -0
- package/schematics/migrations/filter-bar-state-saving-default/data.cjs +87 -0
- package/schematics/migrations/filter-bar-state-saving-default/index.cjs +62 -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.cjs +58 -0
- package/schematics/migrations/flag-inner-html/index.cjs +62 -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.cjs +288 -0
- package/schematics/migrations/form-field-signals/index.cjs +383 -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.cjs +97 -0
- package/schematics/migrations/icon-semantics-and-api/index.cjs +65 -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 → index.cjs} +4 -3
- package/schematics/migrations/inline-edit-a11y-and-types/README.md +82 -0
- package/schematics/migrations/inline-edit-a11y-and-types/data.cjs +117 -0
- package/schematics/migrations/inline-edit-a11y-and-types/index.cjs +98 -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.cjs +135 -0
- package/schematics/migrations/input-number-surface/index.cjs +293 -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.cjs +30 -0
- package/schematics/migrations/input-signals/index.cjs +18 -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.cjs +20 -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.cjs +116 -0
- package/schematics/migrations/link-signals/index.cjs +416 -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.cjs +35 -0
- package/schematics/migrations/list-signals/index.cjs +18 -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.cjs +74 -0
- package/schematics/migrations/list-tree-multiple-input/index.cjs +222 -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.cjs +101 -0
- package/schematics/migrations/loader-overlay-signals/index.cjs +698 -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 → index.cjs} +6 -5
- package/schematics/migrations/locale-configuration-providers/README.md +163 -0
- package/schematics/migrations/locale-configuration-providers/data.cjs +257 -0
- package/schematics/migrations/locale-configuration-providers/index.cjs +295 -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.cjs +43 -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.cjs +79 -0
- package/schematics/migrations/markdown-signals/index.cjs +640 -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.cjs +110 -0
- package/schematics/migrations/modal-dialog-semantics/index.cjs +59 -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.cjs +132 -0
- package/schematics/migrations/modal-signals/index.cjs +20 -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.cjs +198 -0
- package/schematics/migrations/navbar-signals-and-aria/index.cjs +569 -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 → index.cjs} +8 -7
- package/schematics/migrations/notification-center-signals/README.md +67 -0
- package/schematics/migrations/notification-center-signals/data.cjs +66 -0
- package/schematics/migrations/notification-center-signals/index.cjs +62 -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.cjs +86 -0
- package/schematics/migrations/option-signals/index.cjs +20 -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.cjs +61 -0
- package/schematics/migrations/popover-leave-delay/index.cjs +55 -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.cjs +76 -0
- package/schematics/migrations/progress-bar-percentage-and-aria/index.cjs +59 -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.cjs +83 -0
- package/schematics/migrations/progress-spinner-signals/index.cjs +695 -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.cjs +70 -0
- package/schematics/migrations/query-list-signals/index.cjs +18 -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.cjs +163 -0
- package/schematics/migrations/radio-signals-and-aria/index.cjs +40 -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.cjs +45 -0
- package/schematics/migrations/read-state-dwell-handlers/index.cjs +216 -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.cjs +21 -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.cjs +99 -0
- package/schematics/migrations/select-signal-inputs/index.cjs +58 -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.cjs +111 -0
- package/schematics/migrations/sidepanel-non-modal-behavior/index.cjs +58 -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.cjs +69 -0
- package/schematics/migrations/signal-inputs-subclasses/index.cjs +18 -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.cjs +53 -0
- package/schematics/migrations/split-button-optional-disabled/index.cjs +58 -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.cjs +21 -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.cjs +88 -0
- package/schematics/migrations/state-saving-default/index.cjs +63 -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.cjs +66 -0
- package/schematics/migrations/table-cell-content/index.cjs +67 -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.cjs +139 -0
- package/schematics/migrations/tabs-signals-and-aria/index.cjs +66 -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.cjs +42 -0
- package/schematics/migrations/tag-list-cleaner/index.cjs +197 -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.cjs +191 -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.cjs +103 -0
- package/schematics/migrations/tags-signals/index.cjs +674 -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.cjs +121 -0
- package/schematics/migrations/textarea-signals/index.cjs +380 -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.cjs +139 -0
- package/schematics/migrations/time-range-title-for/index.cjs +164 -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.cjs +82 -0
- package/schematics/migrations/timepicker-signals/index.cjs +710 -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.cjs +101 -0
- package/schematics/migrations/timezone-grouping-utils/index.cjs +65 -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.cjs +69 -0
- package/schematics/migrations/title-encapsulation/index.cjs +58 -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.cjs +79 -0
- package/schematics/migrations/toast-stack-and-defaults/index.cjs +54 -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.cjs +89 -0
- package/schematics/migrations/tooltip-pointer-events-and-types/index.cjs +61 -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.cjs +56 -0
- package/schematics/migrations/top-bar-container-selectors/index.cjs +85 -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.cjs +106 -0
- package/schematics/migrations/tree-select-signals/index.cjs +59 -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.cjs +123 -0
- package/schematics/migrations/tree-signals/index.cjs +55 -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.cjs +78 -0
- package/schematics/migrations/tree-state-saving-default/index.cjs +61 -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.cjs +78 -0
- package/schematics/migrations/username-pipe-injection/index.cjs +59 -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 → data.cjs} +124 -77
- package/schematics/migrations/v20-upgrade/index.cjs +19 -0
- package/schematics/migrations/v21-upgrade/README.md +271 -0
- package/schematics/migrations/v21-upgrade/data.cjs +1371 -0
- package/schematics/migrations/v21-upgrade/index.cjs +95 -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.cjs +29 -0
- package/schematics/migrations/zoneless-change-detection/index.cjs +21 -0
- package/schematics/migrations/zoneless-change-detection/schema.json +15 -0
- package/schematics/migrations.json +401 -6
- package/schematics/ng-add/index.cjs +266 -0
- package/schematics/ng-add/schema.json +15 -0
- package/schematics/utils/{angular-parsing.js → angular-parsing.cjs} +2 -2
- package/schematics/utils/deprecated-path-migration.cjs +62 -0
- package/schematics/utils/html-config.cjs +148 -0
- package/schematics/utils/{icon-migration.js → icon-migration.cjs} +2 -2
- package/schematics/utils/list-item-pattern.cjs +16 -0
- package/schematics/utils/{package-config.js → package-config.cjs} +3 -32
- package/schematics/utils/project-files.cjs +25 -0
- package/schematics/utils/replacement-driver.cjs +337 -0
- package/schematics/utils/safe-rule.cjs +23 -0
- package/schematics/utils/signal-members-migration.cjs +779 -0
- package/schematics/utils/tag-patterns.cjs +21 -0
- package/schematics/utils/template-ref-access.cjs +155 -0
- package/schematics/utils/{typescript.js → typescript.cjs} +1 -1
- package/schematics/utils/warn-only-migration.cjs +52 -0
- package/schematics/utils/workspace-styles.cjs +123 -0
- 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} +150 -88
- 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 +670 -0
- package/types/koobiq-components-tree.d.ts +1339 -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/schematics/migrations/alert-signals/index.js +0 -353
- package/schematics/migrations/filter-bar-signals/index.js +0 -319
- package/schematics/migrations/v20-upgrade/index.js +0 -225
- package/schematics/ng-add/index.js +0 -39
- 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 -178
- 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/schematics/migrations/css-selectors/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/deprecated-icons/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/icons-replacement/{data.js → data.cjs} +0 -0
- /package/schematics/migrations/new-icons-pack/{data.js → data.cjs} +0 -0
- /package/schematics/utils/{ast.js → ast.cjs} +0 -0
- /package/schematics/utils/{messages.js → messages.cjs} +0 -0
- /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,228 +1,25 @@
|
|
|
1
|
+
import { FocusKeyManager, CdkMonitorFocus, FocusMonitor, A11yModule } from '@angular/cdk/a11y';
|
|
1
2
|
import { Directionality } from '@angular/cdk/bidi';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
3
|
+
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
4
|
+
import { hasModifierKey, ENTER, SPACE } from '@angular/cdk/keycodes';
|
|
5
|
+
import { SharedResizeObserver } from '@angular/cdk/observers/private';
|
|
6
|
+
import { normalizePassiveListenerOptions, Platform } from '@angular/cdk/platform';
|
|
7
|
+
import { DOCUMENT } from '@angular/common';
|
|
4
8
|
import * as i0 from '@angular/core';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { untracked, input, booleanAttribute, signal, EventEmitter, inject, DestroyRef, ElementRef, ChangeDetectorRef, NgZone, Injector, afterNextRender, Directive, output, viewChild, computed, MAX_ANIMATION_TIMEOUT, ViewEncapsulation, ChangeDetectionStrategy, Component, forwardRef, TemplateRef, Renderer2, contentChild, contentChildren, InjectionToken, ViewContainerRef, isDevMode, NgModule } from '@angular/core';
|
|
10
|
+
import { takeUntilDestroyed, outputFromObservable } from '@angular/core/rxjs-interop';
|
|
11
|
+
import * as i1$1 from '@koobiq/components/core';
|
|
12
|
+
import { kbqOptionalNumberAttribute, KBQ_WINDOW, kbqAnimationsDisabled, HOME, END, UP_ARROW, DOWN_ARROW, RIGHT_ARROW, LEFT_ARROW, kbqHasScrollOverflow, kbqGetScrollOverflowTolerance, kbqAnimationsSettled, kbqQueryListFrom, isUndefined, PopUpPlacements, KBQ_SELECT_SCROLL_STRATEGY, KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER, KbqStateSaving, KBQ_PARENT_ANIMATION_COMPONENT } from '@koobiq/components/core';
|
|
13
|
+
import { KBQ_SCROLLBAR_OPTIONS, KbqScrollbarViewport } from '@koobiq/components/scrollbar';
|
|
14
|
+
import { Subject, ReplaySubject, fromEvent, of, merge, timer, Subscription } from 'rxjs';
|
|
15
|
+
import { auditTime, debounceTime, takeUntil, startWith } from 'rxjs/operators';
|
|
16
|
+
import { CdkPortalOutlet, CdkPortal, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
11
17
|
import { KbqTooltipTrigger, KbqToolTipModule } from '@koobiq/components/tooltip';
|
|
12
18
|
import { CdkObserveContent } from '@angular/cdk/observers';
|
|
13
|
-
import { normalizePassiveListenerOptions, Platform } from '@angular/cdk/platform';
|
|
14
19
|
import * as i1 from '@koobiq/components/icon';
|
|
15
20
|
import { KbqIconModule } from '@koobiq/components/icon';
|
|
16
|
-
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
17
|
-
import { hasModifierKey, ENTER, SPACE } from '@angular/cdk/keycodes';
|
|
18
|
-
import { SharedResizeObserver } from '@angular/cdk/observers/private';
|
|
19
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
20
21
|
import { KBQ_DROPDOWN_SCROLL_STRATEGY } from '@koobiq/components/dropdown';
|
|
21
|
-
|
|
22
|
-
const kbqTabsAnimations = {
|
|
23
|
-
/** Animation translates a tab along the X axis. */
|
|
24
|
-
translateTab: trigger('translateTab', [
|
|
25
|
-
// Note: transitions to `none` instead of 0, because some browsers might blur the content.
|
|
26
|
-
state('center, void, left-origin-center, right-origin-center', style({ transform: 'none' })),
|
|
27
|
-
// If the tab is either on the left or right, we additionally add a `min-height` of 1px
|
|
28
|
-
// in order to ensure that the element has a height before its state changes. This is
|
|
29
|
-
// necessary because Chrome does seem to skip the transition in RTL mode if the element does
|
|
30
|
-
// not have a static height and is not rendered. See related issue: #9465
|
|
31
|
-
state('left', style({ transform: 'translate3d(-100%, 0, 0)', minHeight: '1px' })),
|
|
32
|
-
state('right', style({ transform: 'translate3d(100%, 0, 0)', minHeight: '1px' })),
|
|
33
|
-
transition('* => left, * => right, left => center, right => center', animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')),
|
|
34
|
-
transition('void => left-origin-center', [
|
|
35
|
-
style({ transform: 'translate3d(-100%, 0, 0)' }),
|
|
36
|
-
animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')
|
|
37
|
-
]),
|
|
38
|
-
transition('void => right-origin-center', [
|
|
39
|
-
style({ transform: 'translate3d(100%, 0, 0)' }),
|
|
40
|
-
animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')
|
|
41
|
-
])
|
|
42
|
-
])
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Wrapper for the contents of a tab.
|
|
47
|
-
* @docs-private
|
|
48
|
-
*/
|
|
49
|
-
class KbqTabBody {
|
|
50
|
-
/** The shifted index position of the tab body, where zero represents the active center tab. */
|
|
51
|
-
// TODO: Skipped for migration because:
|
|
52
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
53
|
-
set position(position) {
|
|
54
|
-
this.positionIndex = position;
|
|
55
|
-
this.computePositionAnimationState();
|
|
56
|
-
}
|
|
57
|
-
constructor() {
|
|
58
|
-
this.elementRef = inject(ElementRef);
|
|
59
|
-
this.dir = inject(Directionality, { optional: true });
|
|
60
|
-
this.destroyRef = inject(DestroyRef);
|
|
61
|
-
/** Event emitted when the tab begins to animate towards the center as the active tab. */
|
|
62
|
-
this.onCentering = output();
|
|
63
|
-
/** Event emitted before the centering of the tab begins. */
|
|
64
|
-
this.beforeCentering = new EventEmitter();
|
|
65
|
-
/** Event emitted before the centering of the tab begins. */
|
|
66
|
-
this.afterLeavingCenter = new EventEmitter();
|
|
67
|
-
/** Event emitted when the tab completes its animation towards the center. */
|
|
68
|
-
this.onCentered = output();
|
|
69
|
-
/** The portal host inside of this container into which the tab body content will be loaded. */
|
|
70
|
-
this.portalHost = viewChild.required(CdkPortalOutlet);
|
|
71
|
-
/** The tab body content to display. */
|
|
72
|
-
this.content = input(undefined, ...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
73
|
-
// Note that the default value will always be overwritten by `KbqTabBody`, but we need one
|
|
74
|
-
// anyway to prevent the animations module from throwing an error if the body is used on its own.
|
|
75
|
-
/** Duration for the tab's animation. */
|
|
76
|
-
this.animationDuration = input('0ms', ...(ngDevMode ? [{ debugName: "animationDuration" }] : []));
|
|
77
|
-
/** Subscription to the directionality change observable. */
|
|
78
|
-
this.dirChangeSubscription = Subscription.EMPTY;
|
|
79
|
-
const changeDetectorRef = inject(ChangeDetectorRef);
|
|
80
|
-
if (this.dir && changeDetectorRef) {
|
|
81
|
-
this.dirChangeSubscription = this.dir.change.subscribe((direction) => {
|
|
82
|
-
this.computePositionAnimationState(direction);
|
|
83
|
-
changeDetectorRef.markForCheck();
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* After initialized, check if the content is centered and has an origin. If so, set the
|
|
89
|
-
* special position states that transition the tab from the left or right before centering.
|
|
90
|
-
*/
|
|
91
|
-
ngOnInit() {
|
|
92
|
-
if (this.bodyPosition === 'center' && this.origin != null) {
|
|
93
|
-
this.bodyPosition = this.computePositionFromOrigin();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
ngOnDestroy() {
|
|
97
|
-
this.dirChangeSubscription.unsubscribe();
|
|
98
|
-
}
|
|
99
|
-
onTranslateTabStarted(e) {
|
|
100
|
-
// Both animation callbacks still fire when the body is destroyed mid-animation.
|
|
101
|
-
if (this.destroyRef.destroyed)
|
|
102
|
-
return;
|
|
103
|
-
const isCentering = this.isCenterPosition(e.toState);
|
|
104
|
-
this.beforeCentering.emit(isCentering);
|
|
105
|
-
if (isCentering) {
|
|
106
|
-
this.onCentering.emit(this.elementRef.nativeElement.clientHeight);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
onTranslateTabComplete(e) {
|
|
110
|
-
if (this.destroyRef.destroyed)
|
|
111
|
-
return;
|
|
112
|
-
// If the transition to the center is complete, emit an event.
|
|
113
|
-
if (this.isCenterPosition(e.toState) && this.isCenterPosition(this.bodyPosition)) {
|
|
114
|
-
// TODO: The 'emit' function requires a mandatory void argument
|
|
115
|
-
this.onCentered.emit();
|
|
116
|
-
}
|
|
117
|
-
if (this.isCenterPosition(e.fromState) && !this.isCenterPosition(this.bodyPosition)) {
|
|
118
|
-
this.afterLeavingCenter.emit();
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
/** The text direction of the containing app. */
|
|
122
|
-
getLayoutDirection() {
|
|
123
|
-
return this.dir && this.dir.value === 'rtl' ? 'rtl' : 'ltr';
|
|
124
|
-
}
|
|
125
|
-
/** Whether the provided position state is considered center, regardless of origin. */
|
|
126
|
-
isCenterPosition(position) {
|
|
127
|
-
return position === 'center' || position === 'left-origin-center' || position === 'right-origin-center';
|
|
128
|
-
}
|
|
129
|
-
/** Computes the position state that will be used for the tab-body animation trigger. */
|
|
130
|
-
computePositionAnimationState(dir = this.getLayoutDirection()) {
|
|
131
|
-
if (this.positionIndex < 0) {
|
|
132
|
-
this.bodyPosition = dir === 'ltr' ? 'left' : 'right';
|
|
133
|
-
}
|
|
134
|
-
else if (this.positionIndex > 0) {
|
|
135
|
-
this.bodyPosition = dir === 'ltr' ? 'right' : 'left';
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
this.bodyPosition = 'center';
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Computes the position state based on the specified origin position. This is used if the
|
|
143
|
-
* tab is becoming visible immediately after creation.
|
|
144
|
-
*/
|
|
145
|
-
computePositionFromOrigin() {
|
|
146
|
-
const dir = this.getLayoutDirection();
|
|
147
|
-
if ((dir === 'ltr' && this.origin <= 0) || (dir === 'rtl' && this.origin > 0)) {
|
|
148
|
-
return 'left-origin-center';
|
|
149
|
-
}
|
|
150
|
-
return 'right-origin-center';
|
|
151
|
-
}
|
|
152
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTabBody, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
153
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.30", type: KbqTabBody, isStandalone: true, selector: "kbq-tab-body", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: false, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, origin: { classPropertyName: "origin", publicName: "origin", isSignal: false, isRequired: false, transformFunction: null }, animationDuration: { classPropertyName: "animationDuration", publicName: "animationDuration", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onCentering: "onCentering", beforeCentering: "beforeCentering", afterLeavingCenter: "afterLeavingCenter", onCentered: "onCentered" }, host: { classAttribute: "kbq-tab-body" }, viewQueries: [{ propertyName: "portalHost", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #content\n cdkScrollable\n class=\"kbq-tab-body__content kbq-scrollbar kbq-hide-nested-popup\"\n [@translateTab]=\"{\n value: bodyPosition,\n params: { animationDuration: animationDuration() }\n }\"\n (@translateTab.done)=\"onTranslateTabComplete($event)\"\n (@translateTab.start)=\"onTranslateTabStarted($event)\"\n>\n <ng-template kbqTabBodyHost />\n</div>\n", styles: [".kbq-tab-body__content{height:100%;overflow:auto}.kbq-tab-body__content .kbq-tab-group_dynamic-height{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => CdkScrollable), selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "directive", type: i0.forwardRef(() => KbqTabBodyPortal), selector: "[kbqTabBodyHost]" }], animations: [kbqTabsAnimations.translateTab], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
154
|
-
}
|
|
155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTabBody, decorators: [{
|
|
156
|
-
type: Component,
|
|
157
|
-
args: [{ selector: 'kbq-tab-body', imports: [CdkScrollable, forwardRef((() => KbqTabBodyPortal))], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
158
|
-
class: 'kbq-tab-body'
|
|
159
|
-
}, animations: [kbqTabsAnimations.translateTab], template: "<div\n #content\n cdkScrollable\n class=\"kbq-tab-body__content kbq-scrollbar kbq-hide-nested-popup\"\n [@translateTab]=\"{\n value: bodyPosition,\n params: { animationDuration: animationDuration() }\n }\"\n (@translateTab.done)=\"onTranslateTabComplete($event)\"\n (@translateTab.start)=\"onTranslateTabStarted($event)\"\n>\n <ng-template kbqTabBodyHost />\n</div>\n", styles: [".kbq-tab-body__content{height:100%;overflow:auto}.kbq-tab-body__content .kbq-tab-group_dynamic-height{overflow:hidden}\n"] }]
|
|
160
|
-
}], ctorParameters: () => [], propDecorators: { position: [{
|
|
161
|
-
type: Input
|
|
162
|
-
}], onCentering: [{ type: i0.Output, args: ["onCentering"] }], beforeCentering: [{
|
|
163
|
-
type: Output
|
|
164
|
-
}], afterLeavingCenter: [{
|
|
165
|
-
type: Output
|
|
166
|
-
}], onCentered: [{ type: i0.Output, args: ["onCentered"] }], portalHost: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], origin: [{
|
|
167
|
-
type: Input
|
|
168
|
-
}], animationDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationDuration", required: false }] }] } });
|
|
169
|
-
/**
|
|
170
|
-
* The portal host directive for the contents of the tab.
|
|
171
|
-
* @docs-private
|
|
172
|
-
*/
|
|
173
|
-
class KbqTabBodyPortal extends CdkPortalOutlet {
|
|
174
|
-
constructor() {
|
|
175
|
-
super(...arguments);
|
|
176
|
-
this.host = inject(KbqTabBody);
|
|
177
|
-
/** Subscription to events for when the tab body begins centering. */
|
|
178
|
-
this.centeringSub = Subscription.EMPTY;
|
|
179
|
-
/** Subscription to events for when the tab body finishes leaving from center position. */
|
|
180
|
-
this.leavingSub = Subscription.EMPTY;
|
|
181
|
-
}
|
|
182
|
-
/** Set initial visibility or set up subscription for changing visibility. */
|
|
183
|
-
ngOnInit() {
|
|
184
|
-
super.ngOnInit();
|
|
185
|
-
this.centeringSub = this.host.beforeCentering
|
|
186
|
-
.pipe(startWith(this.host.isCenterPosition(this.host.bodyPosition)))
|
|
187
|
-
.subscribe((isCentering) => {
|
|
188
|
-
if (isCentering && !this.hasAttached()) {
|
|
189
|
-
this.attach(this.host.content());
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
this.leavingSub = this.host.afterLeavingCenter.subscribe(() => {
|
|
193
|
-
this.detach();
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
/** Clean up centering subscription. */
|
|
197
|
-
ngOnDestroy() {
|
|
198
|
-
super.ngOnDestroy();
|
|
199
|
-
this.centeringSub.unsubscribe();
|
|
200
|
-
this.leavingSub.unsubscribe();
|
|
201
|
-
}
|
|
202
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTabBodyPortal, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
203
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqTabBodyPortal, isStandalone: true, selector: "[kbqTabBodyHost]", usesInheritance: true, ngImport: i0 }); }
|
|
204
|
-
}
|
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTabBodyPortal, decorators: [{
|
|
206
|
-
type: Directive,
|
|
207
|
-
args: [{
|
|
208
|
-
selector: '[kbqTabBodyHost]'
|
|
209
|
-
}]
|
|
210
|
-
}] });
|
|
211
|
-
|
|
212
|
-
/** Decorates the `ng-template` tags and reads out the template from it. */
|
|
213
|
-
class KbqTabContent {
|
|
214
|
-
constructor() {
|
|
215
|
-
this.template = inject(TemplateRef);
|
|
216
|
-
}
|
|
217
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTabContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
218
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqTabContent, isStandalone: true, selector: "[kbqTabContent]", ngImport: i0 }); }
|
|
219
|
-
}
|
|
220
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTabContent, decorators: [{
|
|
221
|
-
type: Directive,
|
|
222
|
-
args: [{
|
|
223
|
-
selector: '[kbqTabContent]'
|
|
224
|
-
}]
|
|
225
|
-
}] });
|
|
22
|
+
import { CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
226
23
|
|
|
227
24
|
/** Config used to bind passive event listeners */
|
|
228
25
|
const passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true });
|
|
@@ -264,24 +61,27 @@ const DRAGGING_CLASS = 'kbq-tab-header__scroll-container_dragging';
|
|
|
264
61
|
const NON_DRAGGABLE_TARGET_SELECTOR = 'button, [kbq-icon-button], input, select, textarea';
|
|
265
62
|
/**
|
|
266
63
|
* Base class for a tab header that supported pagination.
|
|
64
|
+
*
|
|
267
65
|
* @docs-private
|
|
268
66
|
*/
|
|
269
67
|
class KbqPaginatedTabHeader {
|
|
270
68
|
/** The index of the active tab. */
|
|
271
|
-
// TODO: Skipped for migration because:
|
|
272
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
273
69
|
get selectedIndex() {
|
|
274
|
-
return this.
|
|
70
|
+
return this.selectedIndexState();
|
|
275
71
|
}
|
|
276
72
|
set selectedIndex(value) {
|
|
277
73
|
const coercedValue = coerceNumberProperty(value);
|
|
278
|
-
this.selectedIndexChanged = this.
|
|
279
|
-
this.
|
|
74
|
+
this.selectedIndexChanged = untracked(this.selectedIndexState) !== coercedValue;
|
|
75
|
+
this.selectedIndexState.set(coercedValue);
|
|
280
76
|
this.keyManager?.updateActiveItem(coercedValue);
|
|
281
77
|
}
|
|
282
78
|
/** Tracks which element has focus; used for keyboard navigation */
|
|
283
79
|
get focusIndex() {
|
|
284
|
-
|
|
80
|
+
// Before `ngAfterContentInit` builds the key manager the selection is where focus would land —
|
|
81
|
+
// `updateActiveItem(this.selectedIndex)` is the first thing that runs once it exists. Falling
|
|
82
|
+
// back to `0` instead would hand the roving `tabindex="0"` to the first tab on the very first
|
|
83
|
+
// render of any group that does not open on it.
|
|
84
|
+
return this.keyManager ? this.keyManager.activeItemIndex : this.selectedIndex;
|
|
285
85
|
}
|
|
286
86
|
/** When the focus index is set, we must manually send focus to the correct label */
|
|
287
87
|
set focusIndex(value) {
|
|
@@ -290,20 +90,49 @@ class KbqPaginatedTabHeader {
|
|
|
290
90
|
}
|
|
291
91
|
this.keyManager.setActiveItem(value);
|
|
292
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Whether pagination should be disabled. This can be used to avoid unnecessary
|
|
95
|
+
* layout recalculations if it's known that pagination won't be required.
|
|
96
|
+
*
|
|
97
|
+
* A vertical header never paginates, so `vertical` forces this on without overwriting the value
|
|
98
|
+
* the consumer set — turning `vertical` back off restores it.
|
|
99
|
+
*/
|
|
100
|
+
get disablePagination() {
|
|
101
|
+
return this._disablePagination || this._vertical;
|
|
102
|
+
}
|
|
103
|
+
set disablePagination(value) {
|
|
104
|
+
this._disablePagination = value;
|
|
105
|
+
}
|
|
293
106
|
/** Whether the tabs should be displayed vertically. */
|
|
294
|
-
// TODO: Skipped for migration because:
|
|
295
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
296
107
|
set vertical(value) {
|
|
297
108
|
this._vertical = value;
|
|
298
|
-
if (this._vertical) {
|
|
299
|
-
this.disablePagination = true;
|
|
300
|
-
}
|
|
301
109
|
}
|
|
302
110
|
get vertical() {
|
|
303
111
|
return this._vertical;
|
|
304
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Scrollbar mode for the tab strip. Only a vertical header scrolls in a direction the user is meant
|
|
115
|
+
* to see, so a horizontal one asks for `hidden`: the native scrollbar stays suppressed and no custom
|
|
116
|
+
* track is built for a strip that is paginated and dragged instead of scrolled by hand.
|
|
117
|
+
*
|
|
118
|
+
* Follows `vertical` itself: the `kbq-tab-group_vertical` class the stylesheet keys `overflow-y: auto`
|
|
119
|
+
* on is bound to the same value. The class of a nav bar is its own host binding, applied only after
|
|
120
|
+
* its content hooks, so reading the class from here would miss it on the first check.
|
|
121
|
+
*/
|
|
122
|
+
get scrollbarMode() {
|
|
123
|
+
return this.vertical ? this.scrollbarOptions.mode : 'hidden';
|
|
124
|
+
}
|
|
305
125
|
constructor() {
|
|
306
|
-
|
|
126
|
+
/** @docs-private */
|
|
127
|
+
this.selectedIndexInput = input(undefined, { ...(ngDevMode ? { debugName: "selectedIndexInput" } : /* istanbul ignore next */ {}), alias: 'selectedIndex',
|
|
128
|
+
transform: kbqOptionalNumberAttribute });
|
|
129
|
+
/** @docs-private */
|
|
130
|
+
this.disablePaginationInput = input(undefined, { ...(ngDevMode ? { debugName: "disablePaginationInput" } : /* istanbul ignore next */ {}), alias: 'disablePagination',
|
|
131
|
+
transform: booleanAttribute });
|
|
132
|
+
/** @docs-private */
|
|
133
|
+
this.verticalInput = input(undefined, { ...(ngDevMode ? { debugName: "verticalInput" } : /* istanbul ignore next */ {}), alias: 'vertical',
|
|
134
|
+
transform: booleanAttribute });
|
|
135
|
+
this.selectedIndexState = signal(0, ...(ngDevMode ? [{ debugName: "selectedIndexState" }] : /* istanbul ignore next */ []));
|
|
307
136
|
/** Event emitted when the option is selected. */
|
|
308
137
|
this.selectFocusedIndex = new EventEmitter();
|
|
309
138
|
/** Event emitted when a label is focused. */
|
|
@@ -314,18 +143,23 @@ class KbqPaginatedTabHeader {
|
|
|
314
143
|
this.disableScrollAfter = true;
|
|
315
144
|
/** Whether the tab list can be scrolled more towards the beginning of the tab label list. */
|
|
316
145
|
this.disableScrollBefore = true;
|
|
317
|
-
|
|
318
|
-
* Whether pagination should be disabled. This can be used to avoid unnecessary
|
|
319
|
-
* layout recalculations if it's known that pagination won't be required.
|
|
320
|
-
*/
|
|
321
|
-
// TODO: Skipped for migration because:
|
|
322
|
-
// Your application code writes to the input. This prevents migration.
|
|
323
|
-
this.disablePagination = false;
|
|
146
|
+
this._disablePagination = false;
|
|
324
147
|
this._vertical = false;
|
|
148
|
+
/** `disablePagination` as of the last content check — see `ngAfterContentChecked`. */
|
|
149
|
+
this.previousDisablePagination = false;
|
|
325
150
|
/** Stream that will stop the automated scrolling. */
|
|
326
151
|
this.stopScrolling = new Subject();
|
|
327
152
|
/** Whether the header should scroll to the selected index after the view has been checked. */
|
|
328
153
|
this.selectedIndexChanged = false;
|
|
154
|
+
/** Whether DOM focus currently sits on one of the items. */
|
|
155
|
+
this.focusWasInside = false;
|
|
156
|
+
/**
|
|
157
|
+
* Index of the item that last took DOM focus, or `-1`. Recorded from the `focusin` target rather
|
|
158
|
+
* than read back from `keyManager.activeItemIndex`, because the `selectedIndex` setter writes that
|
|
159
|
+
* field too — and on an `items.changes` tick a subscriber registered earlier (`KbqTabNavBar`'s
|
|
160
|
+
* `updateActiveLink`) repoints it at the *active* item before focus restoration gets to run.
|
|
161
|
+
*/
|
|
162
|
+
this.focusedItemIndex = -1;
|
|
329
163
|
/** State of the in-progress mouse/pen drag gesture, if any. */
|
|
330
164
|
this.dragState = null;
|
|
331
165
|
/** `requestAnimationFrame` handle for an in-progress inertia coast, if any. */
|
|
@@ -351,6 +185,12 @@ class KbqPaginatedTabHeader {
|
|
|
351
185
|
* doesn't exist yet when it's emitted.
|
|
352
186
|
*/
|
|
353
187
|
this.scrollCorrectionRequest = new ReplaySubject(1);
|
|
188
|
+
/**
|
|
189
|
+
* The latest scroll-correction request, repeated once webfonts finish loading: a label measured in the
|
|
190
|
+
* fallback face moves when the real one swaps in. Dropped once a correction has measured with no font
|
|
191
|
+
* loading, and as soon as the user moves the strip, so the repeat never pulls it back from where they took it.
|
|
192
|
+
*/
|
|
193
|
+
this.lastScrollCorrection = null;
|
|
354
194
|
this.destroyRef = inject(DestroyRef);
|
|
355
195
|
this.elementRef = inject(ElementRef);
|
|
356
196
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
@@ -359,13 +199,49 @@ class KbqPaginatedTabHeader {
|
|
|
359
199
|
this.dir = inject(Directionality, { optional: true });
|
|
360
200
|
this.window = inject(KBQ_WINDOW);
|
|
361
201
|
this.sharedResizeObserver = inject(SharedResizeObserver);
|
|
362
|
-
|
|
202
|
+
this.document = inject(DOCUMENT);
|
|
203
|
+
this.scrollbarOptions = inject(KBQ_SCROLLBAR_OPTIONS);
|
|
204
|
+
this.injector = inject(Injector);
|
|
205
|
+
/** Whether the underline of the active tab moves without motion. */
|
|
206
|
+
this.animationsDisabled = kbqAnimationsDisabled();
|
|
207
|
+
const nativeElement = this.elementRef.nativeElement;
|
|
208
|
+
// Bind these on the outside since they don't change anything in the view.
|
|
363
209
|
this.ngZone.runOutsideAngular(() => {
|
|
364
|
-
fromEvent(
|
|
210
|
+
fromEvent(nativeElement, 'mouseleave')
|
|
365
211
|
.pipe(takeUntilDestroyed())
|
|
366
212
|
.subscribe(() => this.stopInterval());
|
|
213
|
+
fromEvent(nativeElement, 'focusin')
|
|
214
|
+
.pipe(takeUntilDestroyed())
|
|
215
|
+
.subscribe(({ target }) => {
|
|
216
|
+
this.focusWasInside = true;
|
|
217
|
+
this.focusedItemIndex = this.indexOfItemContaining(target);
|
|
218
|
+
});
|
|
219
|
+
// Only a move onto a known element outside gives up ownership: a destroyed item reports
|
|
220
|
+
// no `relatedTarget` at all, and that case is what the restore below exists for.
|
|
221
|
+
fromEvent(nativeElement, 'focusout')
|
|
222
|
+
.pipe(takeUntilDestroyed())
|
|
223
|
+
.subscribe(({ relatedTarget }) => {
|
|
224
|
+
if (relatedTarget && !nativeElement.contains(relatedTarget)) {
|
|
225
|
+
this.focusWasInside = false;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
367
228
|
});
|
|
368
229
|
}
|
|
230
|
+
ngOnChanges(changes) {
|
|
231
|
+
// A bound input is handed to its member; unbound, it leaves what code wrote.
|
|
232
|
+
if (changes['selectedIndexInput'])
|
|
233
|
+
this.selectedIndex = this.selectedIndexInput() ?? 0;
|
|
234
|
+
if (changes['disablePaginationInput']) {
|
|
235
|
+
const disablePagination = this.disablePaginationInput();
|
|
236
|
+
if (disablePagination !== undefined)
|
|
237
|
+
this.disablePagination = disablePagination;
|
|
238
|
+
}
|
|
239
|
+
if (changes['verticalInput']) {
|
|
240
|
+
const vertical = this.verticalInput();
|
|
241
|
+
if (vertical !== undefined)
|
|
242
|
+
this.vertical = vertical;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
369
245
|
/** Called when the user has selected an item via the keyboard. */
|
|
370
246
|
ngAfterViewInit() {
|
|
371
247
|
// We need to handle these events manually, because we want to bind passive event listeners.
|
|
@@ -390,10 +266,14 @@ class KbqPaginatedTabHeader {
|
|
|
390
266
|
this.updateScrollState();
|
|
391
267
|
this.scrollProgress.next();
|
|
392
268
|
});
|
|
393
|
-
// Any wheel/trackpad input should immediately take over from a running inertia coast
|
|
269
|
+
// Any wheel/trackpad input should immediately take over from a running inertia coast, and from
|
|
270
|
+
// a correction waiting to be repeated.
|
|
394
271
|
fromEvent(container, 'wheel', passiveEventListenerOptions)
|
|
395
272
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
396
|
-
.subscribe(() =>
|
|
273
|
+
.subscribe(() => {
|
|
274
|
+
this.cancelInertia();
|
|
275
|
+
this.lastScrollCorrection = null;
|
|
276
|
+
});
|
|
397
277
|
fromEvent(container, 'pointerdown')
|
|
398
278
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
399
279
|
.subscribe((event) => this.handlePointerDown(event));
|
|
@@ -435,15 +315,40 @@ class KbqPaginatedTabHeader {
|
|
|
435
315
|
.subscribe(() => this.updatePagination());
|
|
436
316
|
this.scrollCorrectionRequest
|
|
437
317
|
.pipe(debounceTime(SCROLL_CORRECTION_DEBOUNCE), takeUntilDestroyed(this.destroyRef))
|
|
438
|
-
.subscribe(({ index, behavior }) =>
|
|
318
|
+
.subscribe(({ index, behavior }) => {
|
|
319
|
+
this.scrollCorrection(index, behavior);
|
|
320
|
+
// Measured with no font left loading, the labels are in their final faces. Kept any longer, the
|
|
321
|
+
// request would let a font loaded later for unrelated text pull the strip back to the selection.
|
|
322
|
+
if (this.document.fonts?.status !== 'loading')
|
|
323
|
+
this.lastScrollCorrection = null;
|
|
324
|
+
});
|
|
325
|
+
// A webfont that arrives after the strip was measured resizes the labels without resizing the scroll
|
|
326
|
+
// box or changing the text, so neither observer above sees it. Re-measuring also re-renders the
|
|
327
|
+
// underline, which reads the selected label's offsets from the template.
|
|
328
|
+
if (this.platform.isBrowser && this.document.fonts) {
|
|
329
|
+
const fonts = this.document.fonts;
|
|
330
|
+
// Audited like a resize: faces arrive in bursts, and every header on the page measures on each one.
|
|
331
|
+
this.ngZone.runOutsideAngular(() => fromEvent(fonts, 'loadingdone')
|
|
332
|
+
.pipe(auditTime(RESIZE_AUDIT_TIME), takeUntilDestroyed(this.destroyRef))
|
|
333
|
+
.subscribe(() => {
|
|
334
|
+
if (this.disablePagination)
|
|
335
|
+
return;
|
|
336
|
+
this.ngZone.run(() => this.updatePagination());
|
|
337
|
+
if (this.lastScrollCorrection)
|
|
338
|
+
this.scrollCorrectionRequest.next(this.lastScrollCorrection);
|
|
339
|
+
}));
|
|
340
|
+
}
|
|
439
341
|
}
|
|
440
342
|
ngAfterContentInit() {
|
|
441
343
|
const dirChange = this.dir ? this.dir.change : of('ltr');
|
|
442
344
|
const realign = () => {
|
|
443
345
|
this.updatePagination();
|
|
346
|
+
// The ink bar reads `offsetLeft`/`offsetWidth` from the template, so the deferred first
|
|
347
|
+
// measurement only reaches the DOM if the view is re-checked after it.
|
|
348
|
+
this.changeDetectorRef.markForCheck();
|
|
444
349
|
};
|
|
445
350
|
this.keyManager = new FocusKeyManager(this.items).withHorizontalOrientation(this.getLayoutDirection());
|
|
446
|
-
this.keyManager.updateActiveItem(this.
|
|
351
|
+
this.keyManager.updateActiveItem(this.selectedIndex);
|
|
447
352
|
// Defer the first call in order to allow for slower browsers to lay out the elements.
|
|
448
353
|
// This helps in cases where the user lands directly on a page with paginated tabs.
|
|
449
354
|
if (typeof this.window.requestAnimationFrame !== 'undefined') {
|
|
@@ -467,22 +372,48 @@ class KbqPaginatedTabHeader {
|
|
|
467
372
|
// event in order to provide a public event that notifies about focus changes. Also we realign
|
|
468
373
|
// the tabs container by scrolling the new focused tab into the visible section.
|
|
469
374
|
this.keyManager.change.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((newFocusIndex) => {
|
|
375
|
+
// `change` only fires for deliberate focus moves (`setActiveItem`), never for the
|
|
376
|
+
// bookkeeping `updateActiveItem` the `selectedIndex` setter does — which is exactly the
|
|
377
|
+
// distinction `focusedItemIndex` has to preserve.
|
|
378
|
+
this.focusedItemIndex = newFocusIndex;
|
|
470
379
|
this.indexFocused.emit(newFocusIndex);
|
|
471
380
|
this.setTabFocus(newFocusIndex);
|
|
472
381
|
});
|
|
382
|
+
this.items.changes
|
|
383
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
384
|
+
.subscribe(() => this.restoreFocusAfterItemsChange());
|
|
473
385
|
}
|
|
474
386
|
ngAfterContentChecked() {
|
|
387
|
+
// Diff the derived value rather than a flag on one of its two inputs: `disablePagination` is
|
|
388
|
+
// `_disablePagination || _vertical`, so watching only `vertical` left a header whose
|
|
389
|
+
// `[disablePagination]` binding was toggled at runtime with stale paginator state.
|
|
390
|
+
const disablePagination = this.disablePagination;
|
|
475
391
|
// If the number of tab labels have changed, check if scrolling should be enabled
|
|
476
|
-
if (this.tabLabelCount !== this.items.length) {
|
|
392
|
+
if (this.tabLabelCount !== this.items.length || this.previousDisablePagination !== disablePagination) {
|
|
393
|
+
this.previousDisablePagination = disablePagination;
|
|
394
|
+
// Read before `tabLabelCount` moves. Gated on growth rather than on any change: losing a tab
|
|
395
|
+
// cannot start the strip scrolling, so re-announcing it there would be noise.
|
|
396
|
+
const gainedTabs = this.items.length > (this.tabLabelCount ?? 0);
|
|
477
397
|
this.updatePagination();
|
|
478
398
|
this.tabLabelCount = this.items.length;
|
|
479
|
-
|
|
399
|
+
// Briefly reveals the scrollbar when the strip arrives or gains tabs, so whether it scrolls
|
|
400
|
+
// is answered on sight rather than only once the pointer enters it. Vertical only: a
|
|
401
|
+
// horizontal strip is paginated and dragged, runs in `hidden` mode and has no scrollbar to
|
|
402
|
+
// announce.
|
|
403
|
+
//
|
|
404
|
+
// Deferred to after the render: the viewport builds its track from an effect, and effects
|
|
405
|
+
// flush after this hook, so flashing here directly would push into a subject nothing is
|
|
406
|
+
// listening to yet and the very first reveal — the one that matters — would be dropped.
|
|
407
|
+
if (gainedTabs && this.vertical && this.platform.isBrowser) {
|
|
408
|
+
afterNextRender(() => this.scrollbarViewport.flashScrollIndicators(), {
|
|
409
|
+
injector: this.injector
|
|
410
|
+
});
|
|
411
|
+
}
|
|
480
412
|
}
|
|
481
413
|
// If the selected index has changed, scroll to the label.
|
|
482
414
|
if (this.selectedIndexChanged) {
|
|
483
415
|
this.selectedIndexChanged = false;
|
|
484
|
-
this.
|
|
485
|
-
this.changeDetectorRef.markForCheck();
|
|
416
|
+
this.requestScrollCorrection(this.selectedIndex, 'smooth');
|
|
486
417
|
}
|
|
487
418
|
}
|
|
488
419
|
ngOnDestroy() {
|
|
@@ -536,10 +467,7 @@ class KbqPaginatedTabHeader {
|
|
|
536
467
|
this.currentTextContent = textContent || '';
|
|
537
468
|
// The content observer runs outside the `NgZone` by default, which
|
|
538
469
|
// means that we need to bring the callback back in ourselves.
|
|
539
|
-
this.ngZone.run(() =>
|
|
540
|
-
this.updatePagination();
|
|
541
|
-
this.changeDetectorRef.markForCheck();
|
|
542
|
-
});
|
|
470
|
+
this.ngZone.run(() => this.updatePagination());
|
|
543
471
|
}
|
|
544
472
|
}
|
|
545
473
|
/**
|
|
@@ -579,7 +507,7 @@ class KbqPaginatedTabHeader {
|
|
|
579
507
|
// below is the only thing driving the scroll position.
|
|
580
508
|
item.elementRef.nativeElement.focus({ preventScroll: true });
|
|
581
509
|
if (this.showPaginationControls) {
|
|
582
|
-
this.
|
|
510
|
+
this.requestScrollCorrection(tabIndex, 'auto');
|
|
583
511
|
}
|
|
584
512
|
}
|
|
585
513
|
/** The layout direction of the containing app. */
|
|
@@ -594,6 +522,7 @@ class KbqPaginatedTabHeader {
|
|
|
594
522
|
* should be called sparingly.
|
|
595
523
|
*/
|
|
596
524
|
scrollHeader(direction) {
|
|
525
|
+
this.lastScrollCorrection = null;
|
|
597
526
|
const container = this.tabListContainer.nativeElement;
|
|
598
527
|
const viewLength = container.clientWidth;
|
|
599
528
|
const amount = (direction === 'before' ? -1 : 1) * viewLength * SCROLL_DISTANCE;
|
|
@@ -640,6 +569,7 @@ class KbqPaginatedTabHeader {
|
|
|
640
569
|
/**
|
|
641
570
|
* Handles the user pressing down on one of the paginators.
|
|
642
571
|
* Starts scrolling the header after a certain amount of time.
|
|
572
|
+
*
|
|
643
573
|
* @param direction In which direction the paginator should be scrolled.
|
|
644
574
|
*/
|
|
645
575
|
handlePaginatorPress(direction, mouseEvent) {
|
|
@@ -668,6 +598,40 @@ class KbqPaginatedTabHeader {
|
|
|
668
598
|
this.scrollHeader(direction);
|
|
669
599
|
});
|
|
670
600
|
}
|
|
601
|
+
/** Index of the item owning `target`, or `-1` — `target` is the item itself or something inside it. */
|
|
602
|
+
indexOfItemContaining(target) {
|
|
603
|
+
if (!target || !this.items) {
|
|
604
|
+
return -1;
|
|
605
|
+
}
|
|
606
|
+
return this.items.toArray().findIndex(({ elementRef }) => elementRef.nativeElement.contains(target));
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Moves focus onto the neighbouring item when the one that held it was removed. Without this the
|
|
610
|
+
* destroyed element takes focus down to `<body>` and a keyboard user has to tab in from the top of
|
|
611
|
+
* the document again (WCAG 2.4.3).
|
|
612
|
+
*/
|
|
613
|
+
restoreFocusAfterItemsChange() {
|
|
614
|
+
if (!this.focusWasInside || !this.keyManager) {
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
const items = this.items.toArray();
|
|
618
|
+
const { activeElement } = this.document;
|
|
619
|
+
// The element holding focus is still one of the items, so nothing was lost. Testing against the
|
|
620
|
+
// query list rather than `document.activeElement === body` because the query list is updated
|
|
621
|
+
// before the removed element is actually detached.
|
|
622
|
+
if (activeElement && items.some(({ elementRef }) => elementRef.nativeElement === activeElement)) {
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
const previousIndex = Math.max(0, Math.min(items.length - 1, this.focusedItemIndex));
|
|
626
|
+
const index = items[previousIndex] && !items[previousIndex].disabled
|
|
627
|
+
? previousIndex
|
|
628
|
+
: items.findIndex((item) => !item.disabled);
|
|
629
|
+
if (index === -1) {
|
|
630
|
+
this.focusWasInside = false;
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
this.keyManager.setActiveItem(index);
|
|
634
|
+
}
|
|
671
635
|
/**
|
|
672
636
|
* The tab list's scroll position expressed independently of reading direction: `0` at the
|
|
673
637
|
* start of the tab list, growing towards the end — mirrors native `scrollLeft`'s RTL-dependent
|
|
@@ -679,6 +643,7 @@ class KbqPaginatedTabHeader {
|
|
|
679
643
|
}
|
|
680
644
|
/**
|
|
681
645
|
* Scrolls the header to a given logical position (see {@link logicalScrollPosition}).
|
|
646
|
+
*
|
|
682
647
|
* @param value Logical position to scroll to.
|
|
683
648
|
* @param behavior Scroll animation behavior; `'auto'` jumps instantly, `'smooth'` animates.
|
|
684
649
|
*/
|
|
@@ -689,6 +654,11 @@ class KbqPaginatedTabHeader {
|
|
|
689
654
|
const left = this.getLayoutDirection() === 'rtl' ? -value : value;
|
|
690
655
|
this.tabListContainer.nativeElement.scrollTo({ left, behavior });
|
|
691
656
|
}
|
|
657
|
+
/** Queues a {@link scrollCorrection} behind the debounce, and keeps it to repeat once webfonts load. */
|
|
658
|
+
requestScrollCorrection(index, behavior) {
|
|
659
|
+
this.lastScrollCorrection = { index, behavior };
|
|
660
|
+
this.scrollCorrectionRequest.next(this.lastScrollCorrection);
|
|
661
|
+
}
|
|
692
662
|
/**
|
|
693
663
|
* Moves the tab list such that the desired tab label (marked by index) is moved into view.
|
|
694
664
|
*
|
|
@@ -763,8 +733,10 @@ class KbqPaginatedTabHeader {
|
|
|
763
733
|
return;
|
|
764
734
|
// Any press on the strip takes over from a running inertia coast, whatever the pointer
|
|
765
735
|
// type — otherwise a tap on a touch-panning device, or a press on a nested control, would
|
|
766
|
-
// leave the previous coast running underneath it.
|
|
736
|
+
// leave the previous coast running underneath it. The same goes for a correction waiting to
|
|
737
|
+
// be repeated; a press that changes the selection queues a fresh one.
|
|
767
738
|
this.cancelInertia();
|
|
739
|
+
this.lastScrollCorrection = null;
|
|
768
740
|
// Touch keeps its existing interaction model (pagination arrows); only mouse/pen drag here.
|
|
769
741
|
if (this.dragState || event.pointerType === 'touch' || event.button !== 0)
|
|
770
742
|
return;
|
|
@@ -935,189 +907,261 @@ class KbqPaginatedTabHeader {
|
|
|
935
907
|
clampVelocity(velocity) {
|
|
936
908
|
return Math.max(-MAX_INERTIA_VELOCITY, Math.min(MAX_INERTIA_VELOCITY, velocity));
|
|
937
909
|
}
|
|
938
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
939
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
910
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqPaginatedTabHeader, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
911
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqPaginatedTabHeader, isStandalone: true, inputs: { selectedIndexInput: { classPropertyName: "selectedIndexInput", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null }, disablePaginationInput: { classPropertyName: "disablePaginationInput", publicName: "disablePagination", isSignal: true, isRequired: false, transformFunction: null }, verticalInput: { classPropertyName: "verticalInput", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
|
|
940
912
|
}
|
|
941
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
913
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqPaginatedTabHeader, decorators: [{
|
|
942
914
|
type: Directive
|
|
943
|
-
}], ctorParameters: () => [], propDecorators: { selectedIndex: [{
|
|
944
|
-
type: Input,
|
|
945
|
-
args: [{ transform: numberAttribute }]
|
|
946
|
-
}], disablePagination: [{
|
|
947
|
-
type: Input,
|
|
948
|
-
args: [{ transform: booleanAttribute }]
|
|
949
|
-
}], vertical: [{
|
|
950
|
-
type: Input,
|
|
951
|
-
args: [{ transform: booleanAttribute }]
|
|
952
|
-
}] } });
|
|
915
|
+
}], ctorParameters: () => [], propDecorators: { selectedIndexInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIndex", required: false }] }], disablePaginationInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disablePagination", required: false }] }], verticalInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "vertical", required: false }] }] } });
|
|
953
916
|
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
917
|
+
/**
|
|
918
|
+
* Wrapper for the contents of a tab.
|
|
919
|
+
*
|
|
920
|
+
* @docs-private
|
|
921
|
+
*/
|
|
922
|
+
class KbqTabBody {
|
|
923
|
+
/** The shifted index position of the tab body, where zero represents the active center tab. */
|
|
924
|
+
set position(position) {
|
|
925
|
+
this.positionIndex = position;
|
|
926
|
+
this.computePositionAnimationState();
|
|
961
927
|
}
|
|
962
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTabLabel, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
963
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqTabLabel, isStandalone: true, selector: "[kbq-tab-label], [kbqTabLabel]", inputs: { iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: KBQ_TAB_LABEL, useExisting: KbqTabLabel }], usesInheritance: true, ngImport: i0 }); }
|
|
964
|
-
}
|
|
965
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTabLabel, decorators: [{
|
|
966
|
-
type: Directive,
|
|
967
|
-
args: [{
|
|
968
|
-
selector: '[kbq-tab-label], [kbqTabLabel]',
|
|
969
|
-
providers: [{ provide: KBQ_TAB_LABEL, useExisting: KbqTabLabel }]
|
|
970
|
-
}]
|
|
971
|
-
}], propDecorators: { iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }] } });
|
|
972
|
-
|
|
973
|
-
class KbqTab {
|
|
974
928
|
constructor() {
|
|
975
|
-
this.
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
this.
|
|
983
|
-
|
|
984
|
-
this.
|
|
985
|
-
/**
|
|
986
|
-
this.
|
|
987
|
-
|
|
988
|
-
this.
|
|
989
|
-
/**
|
|
990
|
-
this.
|
|
991
|
-
/**
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
this.
|
|
1001
|
-
/**
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
this.
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
929
|
+
this.elementRef = inject(ElementRef);
|
|
930
|
+
this.dir = inject(Directionality, { optional: true });
|
|
931
|
+
this.destroyRef = inject(DestroyRef);
|
|
932
|
+
this.injector = inject(Injector);
|
|
933
|
+
/** Whether the tab body translates without motion. */
|
|
934
|
+
this.animationsDisabled = kbqAnimationsDisabled();
|
|
935
|
+
/** @docs-private */
|
|
936
|
+
this.positionInput = input(undefined, { ...(ngDevMode ? { debugName: "positionInput" } : /* istanbul ignore next */ {}), alias: 'position' });
|
|
937
|
+
/** @docs-private */
|
|
938
|
+
this.originInput = input(undefined, { ...(ngDevMode ? { debugName: "originInput" } : /* istanbul ignore next */ {}), alias: 'origin' });
|
|
939
|
+
/** Event emitted when the tab begins to animate towards the center as the active tab. */
|
|
940
|
+
this.onCentering = output();
|
|
941
|
+
/** Event emitted before the centering of the tab begins. */
|
|
942
|
+
this.beforeCentering = new EventEmitter();
|
|
943
|
+
/** @docs-private */
|
|
944
|
+
this.beforeCenteringOutput = outputFromObservable(this.beforeCentering, { alias: 'beforeCentering' });
|
|
945
|
+
/** Event emitted once the tab has finished moving away from the center. Carries no payload. */
|
|
946
|
+
this.afterLeavingCenter = new EventEmitter();
|
|
947
|
+
/** @docs-private */
|
|
948
|
+
this.afterLeavingCenterOutput = outputFromObservable(this.afterLeavingCenter, { alias: 'afterLeavingCenter' });
|
|
949
|
+
/** Event emitted when the tab completes its animation towards the center. */
|
|
950
|
+
this.onCentered = output();
|
|
951
|
+
/** The portal host inside of this container into which the tab body content will be loaded. */
|
|
952
|
+
this.portalHost = viewChild.required(CdkPortalOutlet);
|
|
953
|
+
/** The tab body content to display. */
|
|
954
|
+
this.content = input(undefined, ...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
955
|
+
/** Duration for the tab's animation. */
|
|
956
|
+
this.animationDuration = input('0ms', ...(ngDevMode ? [{ debugName: "animationDuration" }] : /* istanbul ignore next */ []));
|
|
957
|
+
/** The duration as CSS time: a bare number, which CSS rejects, is taken as milliseconds. */
|
|
958
|
+
this.cssAnimationDuration = computed(() => {
|
|
959
|
+
const duration = this.animationDuration();
|
|
960
|
+
return /^\d+$/.test(duration) ? `${duration}ms` : duration;
|
|
961
|
+
}, ...(ngDevMode ? [{ debugName: "cssAnimationDuration" }] : /* istanbul ignore next */ []));
|
|
962
|
+
/** Subscription to the directionality change observable. */
|
|
963
|
+
this.dirChangeSubscription = Subscription.EMPTY;
|
|
964
|
+
this.contentElement = viewChild.required('content', { read: ElementRef });
|
|
965
|
+
const changeDetectorRef = inject(ChangeDetectorRef);
|
|
966
|
+
if (this.dir && changeDetectorRef) {
|
|
967
|
+
this.dirChangeSubscription = this.dir.change.subscribe((direction) => {
|
|
968
|
+
this.computePositionAnimationState(direction);
|
|
969
|
+
changeDetectorRef.markForCheck();
|
|
970
|
+
});
|
|
971
|
+
}
|
|
1012
972
|
}
|
|
1013
|
-
|
|
1014
|
-
|
|
973
|
+
ngOnChanges(changes) {
|
|
974
|
+
// A bound input is handed to its member; unbound, it leaves what code wrote.
|
|
975
|
+
if (changes['positionInput']) {
|
|
976
|
+
const position = this.positionInput();
|
|
977
|
+
if (position !== undefined)
|
|
978
|
+
this.position = position;
|
|
979
|
+
}
|
|
980
|
+
if (changes['originInput']) {
|
|
981
|
+
const origin = this.originInput();
|
|
982
|
+
if (origin !== undefined)
|
|
983
|
+
this.origin = origin;
|
|
984
|
+
}
|
|
1015
985
|
}
|
|
1016
|
-
|
|
1017
|
-
|
|
986
|
+
/**
|
|
987
|
+
* After initialized, check if the content is centered and has an origin. If so, set the
|
|
988
|
+
* special position states that transition the tab from the left or right before centering.
|
|
989
|
+
*/
|
|
990
|
+
ngOnInit() {
|
|
991
|
+
if (this.bodyPosition === 'center' && this.origin != null) {
|
|
992
|
+
this.bodyPosition = this.computePositionFromOrigin();
|
|
993
|
+
}
|
|
994
|
+
this.initialPosition = this.bodyPosition;
|
|
995
|
+
this.translateOnRender();
|
|
1018
996
|
}
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
get tooltipTitle() {
|
|
1022
|
-
return this.overflowTooltipTitle + this._tooltipTitle;
|
|
997
|
+
ngOnDestroy() {
|
|
998
|
+
this.dirChangeSubscription.unsubscribe();
|
|
1023
999
|
}
|
|
1024
|
-
|
|
1025
|
-
|
|
1000
|
+
/** The text direction of the containing app. */
|
|
1001
|
+
getLayoutDirection() {
|
|
1002
|
+
return this.dir && this.dir.value === 'rtl' ? 'rtl' : 'ltr';
|
|
1026
1003
|
}
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
return this._disabled;
|
|
1004
|
+
/** Whether the provided position state is considered center, regardless of origin. */
|
|
1005
|
+
isCenterPosition(position) {
|
|
1006
|
+
return position === 'center' || position === 'left-origin-center' || position === 'right-origin-center';
|
|
1031
1007
|
}
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1008
|
+
/** Computes the position state that the tab body translates to. */
|
|
1009
|
+
computePositionAnimationState(dir = this.getLayoutDirection()) {
|
|
1010
|
+
if (this.positionIndex < 0) {
|
|
1011
|
+
this.bodyPosition = dir === 'ltr' ? 'left' : 'right';
|
|
1035
1012
|
}
|
|
1013
|
+
else if (this.positionIndex > 0) {
|
|
1014
|
+
this.bodyPosition = dir === 'ltr' ? 'right' : 'left';
|
|
1015
|
+
}
|
|
1016
|
+
else {
|
|
1017
|
+
this.bodyPosition = 'center';
|
|
1018
|
+
}
|
|
1019
|
+
this.translateOnRender();
|
|
1036
1020
|
}
|
|
1037
|
-
/**
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1021
|
+
/**
|
|
1022
|
+
* Starts the translation to the current position once it has rendered, and ends it once its transition
|
|
1023
|
+
* has: the content is attached as the body starts centering and detached once it has left the center.
|
|
1024
|
+
* Positions set within one frame translate once, from the last rendered one. The first frame starts from the
|
|
1025
|
+
* position the body was created at when it has moved on from it: the content of a body created centered is
|
|
1026
|
+
* attached at once, rendered or not.
|
|
1027
|
+
*/
|
|
1028
|
+
translateOnRender() {
|
|
1029
|
+
if (this.translationRender)
|
|
1030
|
+
return;
|
|
1031
|
+
this.translationRender = afterNextRender(() => {
|
|
1032
|
+
this.translationRender = undefined;
|
|
1033
|
+
const to = this.bodyPosition;
|
|
1034
|
+
const from = this.renderedPosition ?? (to === this.initialPosition ? undefined : this.initialPosition);
|
|
1035
|
+
if (from === to)
|
|
1036
|
+
return;
|
|
1037
|
+
this.renderedPosition = to;
|
|
1038
|
+
this.translationStarted(to);
|
|
1039
|
+
const settled = kbqAnimationsSettled(this.contentElement().nativeElement, this.injector.get(MAX_ANIMATION_TIMEOUT));
|
|
1040
|
+
if (!settled)
|
|
1041
|
+
return this.translationDone(from, to);
|
|
1042
|
+
settled.then(() => {
|
|
1043
|
+
if (!this.destroyRef.destroyed)
|
|
1044
|
+
this.translationDone(from, to);
|
|
1045
|
+
});
|
|
1046
|
+
}, { injector: this.injector });
|
|
1043
1047
|
}
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1048
|
+
translationStarted(to) {
|
|
1049
|
+
const isCentering = this.isCenterPosition(to);
|
|
1050
|
+
this.beforeCentering.emit(isCentering);
|
|
1051
|
+
if (isCentering) {
|
|
1052
|
+
this.onCentering.emit(this.elementRef.nativeElement.clientHeight);
|
|
1047
1053
|
}
|
|
1048
|
-
return '';
|
|
1049
1054
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1055
|
+
translationDone(from, to) {
|
|
1056
|
+
// A later translation may have started since, so the current position has the last word.
|
|
1057
|
+
if (this.isCenterPosition(to) && this.isCenterPosition(this.bodyPosition)) {
|
|
1058
|
+
this.onCentered.emit();
|
|
1059
|
+
}
|
|
1060
|
+
if (from !== undefined && this.isCenterPosition(from) && !this.isCenterPosition(this.bodyPosition)) {
|
|
1061
|
+
this.afterLeavingCenter.emit();
|
|
1062
|
+
}
|
|
1052
1063
|
}
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1064
|
+
/**
|
|
1065
|
+
* Computes the position state based on the specified origin position. This is used if the
|
|
1066
|
+
* tab is becoming visible immediately after creation.
|
|
1067
|
+
*/
|
|
1068
|
+
computePositionFromOrigin() {
|
|
1069
|
+
const dir = this.getLayoutDirection();
|
|
1070
|
+
if ((dir === 'ltr' && this.origin <= 0) || (dir === 'rtl' && this.origin > 0)) {
|
|
1071
|
+
return 'left-origin-center';
|
|
1056
1072
|
}
|
|
1073
|
+
return 'right-origin-center';
|
|
1074
|
+
}
|
|
1075
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabBody, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1076
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.25", type: KbqTabBody, isStandalone: true, selector: "kbq-tab-body", inputs: { positionInput: { classPropertyName: "positionInput", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, originInput: { classPropertyName: "originInput", publicName: "origin", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, animationDuration: { classPropertyName: "animationDuration", publicName: "animationDuration", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onCentering: "onCentering", beforeCenteringOutput: "beforeCentering", afterLeavingCenterOutput: "afterLeavingCenter", onCentered: "onCentered" }, host: { classAttribute: "kbq-tab-body" }, viewQueries: [{ propertyName: "portalHost", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }, { propertyName: "contentElement", first: true, predicate: ["content"], descendants: true, read: ElementRef, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div\n #content\n kbqScrollbarViewport\n class=\"kbq-tab-body__content kbq-hide-nested-popup\"\n [class]=\"`kbq-tab-body__content_${bodyPosition}`\"\n [class.kbq-animations-disabled]=\"animationsDisabled\"\n [style.--kbq-tab-body-animation-duration]=\"cssAnimationDuration()\"\n>\n <ng-template kbqTabBodyHost />\n</div>\n", styles: ["@charset \"UTF-8\";.kbq-tab-body__content{height:100%;overflow:auto;transform:none;transition:transform var(--kbq-tab-body-animation-duration) cubic-bezier(.35,0,.25,1)}.kbq-tab-group_dynamic-height .kbq-tab-body__content{overflow:hidden}.kbq-tab-body__content.kbq-tab-body__content_left{transform:translate3d(-100%,0,0);min-height:1px}.kbq-tab-body__content.kbq-tab-body__content_right{transform:translate3d(100%,0,0);min-height:1px}.kbq-tab-body__content.kbq-tab-body__content_left-origin-center{animation:kbq-tab-body-from-left var(--kbq-tab-body-animation-duration) cubic-bezier(.35,0,.25,1)}.kbq-tab-body__content.kbq-tab-body__content_right-origin-center{animation:kbq-tab-body-from-right var(--kbq-tab-body-animation-duration) cubic-bezier(.35,0,.25,1)}.kbq-tab-body__content.kbq-tab-body__content_left.kbq-animations-disabled,.kbq-tab-body__content.kbq-tab-body__content_right.kbq-animations-disabled,.kbq-tab-body__content.kbq-tab-body__content_left-origin-center.kbq-animations-disabled,.kbq-tab-body__content.kbq-tab-body__content_right-origin-center.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tab-body__content.kbq-tab-body__content_left,.kbq-tab-body__content.kbq-tab-body__content_right,.kbq-tab-body__content.kbq-tab-body__content_left-origin-center,.kbq-tab-body__content.kbq-tab-body__content_right-origin-center{animation:none;transition:none}}.kbq-tab-body__content.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tab-body__content{animation:none;transition:none}}@keyframes kbq-tab-body-from-left{0%{transform:translate3d(-100%,0,0)}}@keyframes kbq-tab-body-from-right{0%{transform:translate3d(100%,0,0)}}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => KbqScrollbarViewport), selector: "[kbqScrollbarViewport]", inputs: ["kbqScrollbarMode", "kbqScrollbarHideDelay"] }, { kind: "directive", type: i0.forwardRef(() => KbqTabBodyPortal), selector: "[kbqTabBodyHost]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1077
|
+
}
|
|
1078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabBody, decorators: [{
|
|
1079
|
+
type: Component,
|
|
1080
|
+
args: [{ selector: 'kbq-tab-body', imports: [KbqScrollbarViewport, forwardRef((() => KbqTabBodyPortal))], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1081
|
+
class: 'kbq-tab-body'
|
|
1082
|
+
}, template: "<div\n #content\n kbqScrollbarViewport\n class=\"kbq-tab-body__content kbq-hide-nested-popup\"\n [class]=\"`kbq-tab-body__content_${bodyPosition}`\"\n [class.kbq-animations-disabled]=\"animationsDisabled\"\n [style.--kbq-tab-body-animation-duration]=\"cssAnimationDuration()\"\n>\n <ng-template kbqTabBodyHost />\n</div>\n", styles: ["@charset \"UTF-8\";.kbq-tab-body__content{height:100%;overflow:auto;transform:none;transition:transform var(--kbq-tab-body-animation-duration) cubic-bezier(.35,0,.25,1)}.kbq-tab-group_dynamic-height .kbq-tab-body__content{overflow:hidden}.kbq-tab-body__content.kbq-tab-body__content_left{transform:translate3d(-100%,0,0);min-height:1px}.kbq-tab-body__content.kbq-tab-body__content_right{transform:translate3d(100%,0,0);min-height:1px}.kbq-tab-body__content.kbq-tab-body__content_left-origin-center{animation:kbq-tab-body-from-left var(--kbq-tab-body-animation-duration) cubic-bezier(.35,0,.25,1)}.kbq-tab-body__content.kbq-tab-body__content_right-origin-center{animation:kbq-tab-body-from-right var(--kbq-tab-body-animation-duration) cubic-bezier(.35,0,.25,1)}.kbq-tab-body__content.kbq-tab-body__content_left.kbq-animations-disabled,.kbq-tab-body__content.kbq-tab-body__content_right.kbq-animations-disabled,.kbq-tab-body__content.kbq-tab-body__content_left-origin-center.kbq-animations-disabled,.kbq-tab-body__content.kbq-tab-body__content_right-origin-center.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tab-body__content.kbq-tab-body__content_left,.kbq-tab-body__content.kbq-tab-body__content_right,.kbq-tab-body__content.kbq-tab-body__content_left-origin-center,.kbq-tab-body__content.kbq-tab-body__content_right-origin-center{animation:none;transition:none}}.kbq-tab-body__content.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tab-body__content{animation:none;transition:none}}@keyframes kbq-tab-body-from-left{0%{transform:translate3d(-100%,0,0)}}@keyframes kbq-tab-body-from-right{0%{transform:translate3d(100%,0,0)}}\n"] }]
|
|
1083
|
+
}], ctorParameters: () => [], propDecorators: { positionInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], originInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "origin", required: false }] }], onCentering: [{ type: i0.Output, args: ["onCentering"] }], beforeCenteringOutput: [{ type: i0.Output, args: ["beforeCentering"] }], afterLeavingCenterOutput: [{ type: i0.Output, args: ["afterLeavingCenter"] }], onCentered: [{ type: i0.Output, args: ["onCentered"] }], portalHost: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }] }], content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: false }] }], animationDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationDuration", required: false }] }], contentElement: [{ type: i0.ViewChild, args: ['content', { ...{ read: ElementRef }, isSignal: true }] }] } });
|
|
1084
|
+
/**
|
|
1085
|
+
* The portal host directive for the contents of the tab.
|
|
1086
|
+
*
|
|
1087
|
+
* @docs-private
|
|
1088
|
+
*/
|
|
1089
|
+
class KbqTabBodyPortal extends CdkPortalOutlet {
|
|
1090
|
+
constructor() {
|
|
1091
|
+
super(...arguments);
|
|
1092
|
+
this.host = inject(KbqTabBody);
|
|
1093
|
+
/** Subscription to events for when the tab body begins centering. */
|
|
1094
|
+
this.centeringSub = Subscription.EMPTY;
|
|
1095
|
+
/** Subscription to events for when the tab body finishes leaving from center position. */
|
|
1096
|
+
this.leavingSub = Subscription.EMPTY;
|
|
1057
1097
|
}
|
|
1098
|
+
/** Set initial visibility or set up subscription for changing visibility. */
|
|
1058
1099
|
ngOnInit() {
|
|
1059
|
-
|
|
1100
|
+
super.ngOnInit();
|
|
1101
|
+
this.centeringSub = this.host.beforeCentering
|
|
1102
|
+
.pipe(startWith(this.host.isCenterPosition(this.host.bodyPosition)))
|
|
1103
|
+
.subscribe((isCentering) => {
|
|
1104
|
+
if (isCentering && !this.hasAttached()) {
|
|
1105
|
+
this.attach(this.host.content());
|
|
1106
|
+
}
|
|
1107
|
+
});
|
|
1108
|
+
this.leavingSub = this.host.afterLeavingCenter.subscribe(() => {
|
|
1109
|
+
this.detach();
|
|
1110
|
+
});
|
|
1060
1111
|
}
|
|
1112
|
+
/** Clean up centering subscription. */
|
|
1061
1113
|
ngOnDestroy() {
|
|
1062
|
-
|
|
1114
|
+
super.ngOnDestroy();
|
|
1115
|
+
this.centeringSub.unsubscribe();
|
|
1116
|
+
this.leavingSub.unsubscribe();
|
|
1063
1117
|
}
|
|
1064
|
-
/**
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
}
|
|
1118
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabBodyPortal, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1119
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTabBodyPortal, isStandalone: true, selector: "[kbqTabBodyHost]", usesInheritance: true, ngImport: i0 }); }
|
|
1120
|
+
}
|
|
1121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabBodyPortal, decorators: [{
|
|
1122
|
+
type: Directive,
|
|
1123
|
+
args: [{
|
|
1124
|
+
selector: '[kbqTabBodyHost]'
|
|
1125
|
+
}]
|
|
1126
|
+
}] });
|
|
1127
|
+
|
|
1128
|
+
/** Decorates the `ng-template` tags and reads out the template from it. */
|
|
1129
|
+
class KbqTabContent {
|
|
1130
|
+
constructor() {
|
|
1131
|
+
// TODO: the library reads the template with `{ read: TemplateRef }`; kept as public API at the DS-2196 review.
|
|
1132
|
+
this.template = inject(TemplateRef);
|
|
1078
1133
|
}
|
|
1079
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1080
|
-
/** @nocollapse */ static { this.ɵ
|
|
1081
|
-
...[KBQ_SELECT_SCROLL_STRATEGY, KBQ_DROPDOWN_SCROLL_STRATEGY].map(((token) => KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER(token, ((overlay) => (() => overlay.scrollStrategies.close())))))
|
|
1082
|
-
], queries: [{ propertyName: "explicitContent", first: true, predicate: KbqTabContent, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "templateLabel", first: true, predicate: KBQ_TAB_LABEL, descendants: true }], viewQueries: [{ propertyName: "implicitContent", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], exportAs: ["kbqTab"], usesOnChanges: true, ngImport: i0, template: '<ng-template><ng-content /></ng-template>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1134
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1135
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqTabContent, isStandalone: true, selector: "[kbqTabContent]", ngImport: i0 }); }
|
|
1083
1136
|
}
|
|
1084
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1085
|
-
type:
|
|
1137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabContent, decorators: [{
|
|
1138
|
+
type: Directive,
|
|
1086
1139
|
args: [{
|
|
1087
|
-
selector: '
|
|
1088
|
-
// Create a template for the content of the <kbq-tab> so that we can grab a reference to this
|
|
1089
|
-
// TemplateRef and use it in a Portal to render the tab content in the appropriate place in the
|
|
1090
|
-
// tab-group.
|
|
1091
|
-
template: '<ng-template><ng-content /></ng-template>',
|
|
1092
|
-
providers: [
|
|
1093
|
-
...[KBQ_SELECT_SCROLL_STRATEGY, KBQ_DROPDOWN_SCROLL_STRATEGY].map(((token) => KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER(token, ((overlay) => (() => overlay.scrollStrategies.close())))))
|
|
1094
|
-
],
|
|
1095
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1096
|
-
encapsulation: ViewEncapsulation.None,
|
|
1097
|
-
exportAs: 'kbqTab'
|
|
1140
|
+
selector: '[kbqTabContent]'
|
|
1098
1141
|
}]
|
|
1099
|
-
}]
|
|
1100
|
-
type: ContentChild,
|
|
1101
|
-
args: [KBQ_TAB_LABEL]
|
|
1102
|
-
}], explicitContent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTabContent), { ...{ read: TemplateRef }, isSignal: true }] }], implicitContent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], tooltipTitle: [{
|
|
1103
|
-
type: Input
|
|
1104
|
-
}], disabled: [{
|
|
1105
|
-
type: Input,
|
|
1106
|
-
args: [{ transform: booleanAttribute }]
|
|
1107
|
-
}], tooltipPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPlacement", required: false }] }], textLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], empty: [{ type: i0.Input, args: [{ isSignal: true, alias: "empty", required: false }] }], tabId: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabId", required: false }] }] } });
|
|
1142
|
+
}] });
|
|
1108
1143
|
|
|
1109
1144
|
/**
|
|
1110
1145
|
* Used in the `kbq-tab-group` view to display tab labels.
|
|
1146
|
+
*
|
|
1111
1147
|
* @docs-private
|
|
1112
1148
|
*/
|
|
1113
1149
|
class KbqTabLabelWrapper {
|
|
1114
1150
|
constructor() {
|
|
1115
1151
|
this.elementRef = inject(ElementRef);
|
|
1116
1152
|
this.renderer = inject(Renderer2);
|
|
1153
|
+
this.labelContentQuery = contentChild('labelContent', ...(ngDevMode ? [{ debugName: "labelContentQuery" }] : /* istanbul ignore next */ []));
|
|
1154
|
+
/** @docs-private */
|
|
1155
|
+
this.tabInput = input(undefined, { ...(ngDevMode ? { debugName: "tabInput" } : /* istanbul ignore next */ {}), alias: 'tab' });
|
|
1156
|
+
/** @docs-private */
|
|
1157
|
+
this.disabledInput = input(undefined, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
1158
|
+
transform: booleanAttribute });
|
|
1117
1159
|
this._disabled = false;
|
|
1118
1160
|
}
|
|
1119
|
-
|
|
1120
|
-
|
|
1161
|
+
/** The element of the label content, measured to tell whether the label overflows. */
|
|
1162
|
+
get labelContent() {
|
|
1163
|
+
return this.labelContentQuery();
|
|
1164
|
+
}
|
|
1121
1165
|
get disabled() {
|
|
1122
1166
|
return this._disabled;
|
|
1123
1167
|
}
|
|
@@ -1126,6 +1170,19 @@ class KbqTabLabelWrapper {
|
|
|
1126
1170
|
this._disabled = value;
|
|
1127
1171
|
}
|
|
1128
1172
|
}
|
|
1173
|
+
ngOnChanges(changes) {
|
|
1174
|
+
// A bound input is handed to its member; unbound, it leaves what code wrote.
|
|
1175
|
+
if (changes['tabInput']) {
|
|
1176
|
+
const tab = this.tabInput();
|
|
1177
|
+
if (tab !== undefined)
|
|
1178
|
+
this.tab = tab;
|
|
1179
|
+
}
|
|
1180
|
+
if (changes['disabledInput']) {
|
|
1181
|
+
const disabled = this.disabledInput();
|
|
1182
|
+
if (disabled !== undefined)
|
|
1183
|
+
this.disabled = disabled;
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1129
1186
|
ngAfterViewInit() {
|
|
1130
1187
|
this.addClassModifierForIcons(Array.from(this.elementRef.nativeElement.querySelectorAll('.kbq-icon')));
|
|
1131
1188
|
}
|
|
@@ -1141,6 +1198,7 @@ class KbqTabLabelWrapper {
|
|
|
1141
1198
|
focus() {
|
|
1142
1199
|
this.elementRef.nativeElement.focus({ preventScroll: true });
|
|
1143
1200
|
}
|
|
1201
|
+
// TODO: nothing in the library uses it; kept as public API at the DS-2196 review. Document or deprecate it.
|
|
1144
1202
|
getOffsetLeft() {
|
|
1145
1203
|
return this.elementRef.nativeElement.offsetLeft;
|
|
1146
1204
|
}
|
|
@@ -1154,7 +1212,9 @@ class KbqTabLabelWrapper {
|
|
|
1154
1212
|
return this.labelContent.nativeElement.scrollWidth > this.labelContent.nativeElement.clientWidth;
|
|
1155
1213
|
}
|
|
1156
1214
|
getInnerText() {
|
|
1157
|
-
|
|
1215
|
+
// `textContent` rather than `innerText`, which jsdom does not implement. Trimmed, because it keeps the
|
|
1216
|
+
// whitespace the template puts around the label text.
|
|
1217
|
+
return this.labelContent.nativeElement.textContent?.trim() || '';
|
|
1158
1218
|
}
|
|
1159
1219
|
addClassModifierForIcons(icons) {
|
|
1160
1220
|
const twoIcons = 2;
|
|
@@ -1177,27 +1237,21 @@ class KbqTabLabelWrapper {
|
|
|
1177
1237
|
this.renderer.addClass(this.elementRef.nativeElement, 'kbq-tab-label_with-icon-right');
|
|
1178
1238
|
}
|
|
1179
1239
|
}
|
|
1180
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1181
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1240
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabLabelWrapper, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1241
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.25", type: KbqTabLabelWrapper, isStandalone: true, selector: "[kbqTabLabelWrapper]", inputs: { tabInput: { classPropertyName: "tabInput", publicName: "tab", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.kbq-disabled": "disabled", "attr.aria-disabled": "disabled" } }, queries: [{ propertyName: "labelContentQuery", first: true, predicate: ["labelContent"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0 }); }
|
|
1182
1242
|
}
|
|
1183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabLabelWrapper, decorators: [{
|
|
1184
1244
|
type: Directive,
|
|
1185
1245
|
args: [{
|
|
1186
1246
|
selector: '[kbqTabLabelWrapper]',
|
|
1187
1247
|
host: {
|
|
1188
1248
|
'[class.kbq-disabled]': 'disabled',
|
|
1189
|
-
|
|
1249
|
+
// A bare `disabled` attribute is only defined for form controls and is read by no assistive
|
|
1250
|
+
// technology; the CSS hook is `.kbq-disabled`.
|
|
1251
|
+
'[attr.aria-disabled]': 'disabled'
|
|
1190
1252
|
}
|
|
1191
1253
|
}]
|
|
1192
|
-
}], propDecorators: { labelContent: [{
|
|
1193
|
-
type: ContentChild,
|
|
1194
|
-
args: ['labelContent']
|
|
1195
|
-
}], tab: [{
|
|
1196
|
-
type: Input
|
|
1197
|
-
}], disabled: [{
|
|
1198
|
-
type: Input,
|
|
1199
|
-
args: [{ transform: booleanAttribute }]
|
|
1200
|
-
}] } });
|
|
1254
|
+
}], propDecorators: { labelContentQuery: [{ type: i0.ContentChild, args: ['labelContent', { isSignal: true }] }], tabInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "tab", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
1201
1255
|
|
|
1202
1256
|
/** Corresponds to `--kbq-tabs-size-tab-item-padding-horizontal` on text/icon+text tabs. */
|
|
1203
1257
|
const TAB_PADDING$1 = 12;
|
|
@@ -1206,15 +1260,46 @@ const TAB_PADDING$1 = 12;
|
|
|
1206
1260
|
* When the tabs list's width exceeds the width of the header container,
|
|
1207
1261
|
* then arrows will be displayed to allow the user to scroll
|
|
1208
1262
|
* left and right across the header.
|
|
1263
|
+
*
|
|
1209
1264
|
* @docs-private
|
|
1210
1265
|
*/
|
|
1211
1266
|
class KbqTabHeader extends KbqPaginatedTabHeader {
|
|
1212
1267
|
constructor() {
|
|
1213
1268
|
super(...arguments);
|
|
1214
1269
|
/** Whether the tabs are underlined. */
|
|
1215
|
-
this.underlined = input(false, ...(ngDevMode ?
|
|
1270
|
+
this.underlined = input(false, { ...(ngDevMode ? { debugName: "underlined" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1271
|
+
this.itemsQuery = contentChildren(KbqTabLabelWrapper, { ...(ngDevMode ? { debugName: "itemsQuery" } : /* istanbul ignore next */ {}), descendants: false });
|
|
1272
|
+
this.itemsList = kbqQueryListFrom(this.itemsQuery);
|
|
1273
|
+
this.tabListContainerQuery = viewChild.required('tabListContainer');
|
|
1274
|
+
this.scrollbarViewportQuery = viewChild.required('tabListContainer', { read: KbqScrollbarViewport });
|
|
1275
|
+
this.tabListQuery = viewChild.required('tabList');
|
|
1276
|
+
this.nextPaginatorQuery = viewChild.required('nextPaginator');
|
|
1277
|
+
this.previousPaginatorQuery = viewChild.required('previousPaginator');
|
|
1216
1278
|
this.isBrowser = inject(Platform).isBrowser;
|
|
1217
1279
|
}
|
|
1280
|
+
/** The label wrappers of the tabs. */
|
|
1281
|
+
get items() {
|
|
1282
|
+
return this.itemsList();
|
|
1283
|
+
}
|
|
1284
|
+
/** The scroll container of the tab labels. */
|
|
1285
|
+
get tabListContainer() {
|
|
1286
|
+
return this.tabListContainerQuery();
|
|
1287
|
+
}
|
|
1288
|
+
get scrollbarViewport() {
|
|
1289
|
+
return this.scrollbarViewportQuery();
|
|
1290
|
+
}
|
|
1291
|
+
/** The element that holds the tab labels. */
|
|
1292
|
+
get tabList() {
|
|
1293
|
+
return this.tabListQuery();
|
|
1294
|
+
}
|
|
1295
|
+
/** The pagination arrow towards the end of the tab list. */
|
|
1296
|
+
get nextPaginator() {
|
|
1297
|
+
return this.nextPaginatorQuery();
|
|
1298
|
+
}
|
|
1299
|
+
/** The pagination arrow towards the beginning of the tab list. */
|
|
1300
|
+
get previousPaginator() {
|
|
1301
|
+
return this.previousPaginatorQuery();
|
|
1302
|
+
}
|
|
1218
1303
|
get activeTabOffsetWidth() {
|
|
1219
1304
|
if (!this.isBrowser)
|
|
1220
1305
|
return undefined;
|
|
@@ -1236,43 +1321,200 @@ class KbqTabHeader extends KbqPaginatedTabHeader {
|
|
|
1236
1321
|
get activeTabDisabled() {
|
|
1237
1322
|
return !!this.items.get(this.selectedIndex)?.disabled;
|
|
1238
1323
|
}
|
|
1324
|
+
ngAfterContentChecked() {
|
|
1325
|
+
super.ngAfterContentChecked();
|
|
1326
|
+
// The labels belong to the view of the tab group, so a change of their size or state gives this view no
|
|
1327
|
+
// notice: the underline is measured again whenever the group is checked, as it was before OnPush.
|
|
1328
|
+
const underline = `${this.activeTabOffsetLeft}:${this.activeTabOffsetWidth}:${this.activeTabDisabled}`;
|
|
1329
|
+
if (underline !== this.checkedUnderline) {
|
|
1330
|
+
this.checkedUnderline = underline;
|
|
1331
|
+
this.changeDetectorRef.markForCheck();
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1239
1334
|
itemSelected(event) {
|
|
1240
1335
|
event.preventDefault();
|
|
1241
1336
|
}
|
|
1242
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1243
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.30", type: KbqTabHeader, isStandalone: true, selector: "kbq-tab-header", inputs: { underlined: { classPropertyName: "underlined", publicName: "underlined", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectFocusedIndex: "selectFocusedIndex", indexFocused: "indexFocused" }, host: { properties: { "class.kbq-tab-header_vertical": "vertical", "class.kbq-tab-header_underlined": "underlined()", "class.kbq-tab-header__pagination-controls_enabled": "showPaginationControls", "class.kbq-tab-header_rtl": "getLayoutDirection() == 'rtl'" }, classAttribute: "kbq-tab-header" }, queries: [{ propertyName: "items", predicate: KbqTabLabelWrapper }], viewQueries: [{ propertyName: "tabListContainer", first: true, predicate: ["tabListContainer"], descendants: true, static: true }, { propertyName: "tabList", first: true, predicate: ["tabList"], descendants: true, static: true }, { propertyName: "nextPaginator", first: true, predicate: ["nextPaginator"], descendants: true }, { propertyName: "previousPaginator", first: true, predicate: ["previousPaginator"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n #previousPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_before\"\n [class.kbq-disabled]=\"disableScrollBefore\"\n (click)=\"handlePaginatorClick('before')\"\n (mousedown)=\"handlePaginatorPress('before', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-left_16\" color=\"contrast\"></i>\n</div>\n\n<div\n #tabListContainer\n class=\"kbq-tab-header__container kbq-tab-header__scroll-container\"\n [class.kbq-tab-header__scroll-container_overflow-before]=\"!disableScrollBefore\"\n [class.kbq-tab-header__scroll-container_overflow-after]=\"!disableScrollAfter\"\n (keydown)=\"handleKeydown($event)\"\n>\n <div #tabList class=\"kbq-tab-list\" (cdkObserveContent)=\"onContentChanges()\">\n <div class=\"kbq-tab-list__content\">\n <ng-content />\n <div\n class=\"kbq-tab-list__active-tab-underline\"\n [class.kbq-disabled]=\"activeTabDisabled\"\n [style.left.px]=\"activeTabOffsetLeft\"\n [style.width.px]=\"activeTabOffsetWidth\"\n ></div>\n </div>\n </div>\n</div>\n\n<div\n #nextPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_after\"\n [class.kbq-disabled]=\"disableScrollAfter\"\n (click)=\"handlePaginatorClick('after')\"\n (mousedown)=\"handlePaginatorPress('after', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast\"></i>\n</div>\n", styles: [".kbq-tab-header__pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;inset-block:0;display:none;justify-content:center;align-items:center;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:manipulation;padding:0 var(--kbq-size-m);opacity:1;visibility:visible}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__pagination{display:flex}.kbq-tab-header__pagination:not(.kbq-disabled){cursor:pointer}.kbq-tab-header__pagination.kbq-disabled{opacity:0;visibility:hidden;pointer-events:none}.kbq-tab-header__pagination_before{inset-inline-start:0}.kbq-tab-header__pagination_after{inset-inline-end:0}.kbq-tab-header__scroll-container{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;--mask-size: calc(var(--kbq-size-m) * 2 + 16px);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.kbq-tab-header__scroll-container::-webkit-scrollbar{display:none}.kbq-tab-group_vertical .kbq-tab-header__scroll-container{overflow-x:hidden;overflow-y:auto;scrollbar-width:auto}.kbq-tab-group_vertical .kbq-tab-header__scroll-container::-webkit-scrollbar{display:block}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__scroll-container{cursor:grab}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_dragging{cursor:grabbing}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content{padding:var(--kbq-size-s) 0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label:first-child:not(.kbq-tab-label_icon-only),.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-link:first-child{margin-inline-start:calc(-1 * var(--kbq-tabs-size-tab-item-padding-horizontal))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label_icon-only:first-child{margin-inline-start:0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical):after{content:\"\";position:absolute;left:0;bottom:0;right:0;height:1px;background:var(--kbq-line-contrast-less)}.kbq-tab-list__active-tab-underline{display:none}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline{display:block;position:absolute;bottom:0;height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:var(--kbq-line-contrast);transition:all .2s ease-in-out}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline.kbq-disabled{background:var(--kbq-states-icon-disabled)}.kbq-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0;border-radius:var(--kbq-tabs-size-tab-stack-horizontal-border-radius)}.kbq-tab-group:not(.kbq-tab-group_on-surface) .kbq-tab-header.kbq-tab-header_underlined{border-radius:0}.kbq-tab-header.kbq-tab-header_underlined:not(.kbq-tab-header__pagination-controls_enabled){overflow:visible}.kbq-tab-list__content{display:flex}.kbq-tab-group_align-labels-center .kbq-tab-list__content{justify-content:center}.kbq-tab-group_align-labels-end .kbq-tab-list__content{justify-content:flex-end}.kbq-tab-header_vertical .kbq-tab-list__content{flex-direction:column}.kbq-tab-header__container{display:flex;flex-grow:1;z-index:1}.kbq-tab-header_underlined:not(.kbq-tab-header__pagination-controls_enabled) .kbq-tab-header__container{overflow:visible}.kbq-tab-list{position:relative;width:100%}.kbq-tab-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;text-align:center;white-space:nowrap;cursor:pointer;padding:calc(var(--kbq-tabs-size-tab-item-padding-vertical) - var(--kbq-tabs-size-tab-item-focus-outline-width)) calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));border-width:var(--kbq-tabs-size-tab-item-focus-outline-width);border-style:solid;border-color:transparent;border-radius:var(--kbq-tabs-size-tab-item-border-radius);outline:none}.kbq-tab-label.kbq-selected{cursor:default}.kbq-tab-label.cdk-keyboard-focused{z-index:1}.kbq-tab-label.kbq-disabled{pointer-events:none}.kbq-tab-label .kbq-tab-label__content{display:flex;align-items:center;overflow:hidden;gap:var(--kbq-tabs-size-tab-item-content-gap-horizontal)}.kbq-tab-label.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{content:\"\";position:absolute;inset:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width))) calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width))}.kbq-tab-label.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):not(.kbq-tab-label_icon-only):after{content:\"\";position:absolute;left:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:transparent;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-label.kbq-tab-label_icon-only{width:var(--kbq-size-3xl);height:var(--kbq-size-3xl);padding:0!important;margin-inline:var(--kbq-size-xxs);box-sizing:content-box}.kbq-tab-label.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical){width:var(--kbq-tabs-size-tab-item-underlined-icon-only-size);height:var(--kbq-tabs-size-tab-item-underlined-icon-only-size)}.kbq-tab-label.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)))}.kbq-tab-label.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):after{top:auto;bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;left:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-label.kbq-tab-label_icon-only:not(.kbq-tab-label_vertical):after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));background:transparent}.kbq-tab-label.kbq-tab-label_vertical{justify-content:flex-start}.kbq-tab-label.kbq-tab-label_vertical .kbq-tab-label__content:not(.kbq-tab-label__template){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kbq-tab-label.kbq-tab-label_vertical.kbq-tab-label_icon-only{margin-inline:0;justify-content:center}.kbq-tab-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-tab-group_stretch-labels .kbq-tab-label{flex-basis:0;flex-grow:1}\n"], dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "directive", type: CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1337
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabHeader, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1338
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.25", type: KbqTabHeader, isStandalone: true, selector: "kbq-tab-header", inputs: { underlined: { classPropertyName: "underlined", publicName: "underlined", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectFocusedIndex: "selectFocusedIndex", indexFocused: "indexFocused" }, host: { properties: { "class.kbq-tab-header_vertical": "vertical", "class.kbq-tab-header_underlined": "underlined()", "class.kbq-tab-header__pagination-controls_enabled": "showPaginationControls", "class.kbq-tab-header_rtl": "getLayoutDirection() == 'rtl'" }, classAttribute: "kbq-tab-header" }, queries: [{ propertyName: "itemsQuery", predicate: KbqTabLabelWrapper, isSignal: true }], viewQueries: [{ propertyName: "tabListContainerQuery", first: true, predicate: ["tabListContainer"], descendants: true, isSignal: true }, { propertyName: "scrollbarViewportQuery", first: true, predicate: ["tabListContainer"], descendants: true, read: KbqScrollbarViewport, isSignal: true }, { propertyName: "tabListQuery", first: true, predicate: ["tabList"], descendants: true, isSignal: true }, { propertyName: "nextPaginatorQuery", first: true, predicate: ["nextPaginator"], descendants: true, isSignal: true }, { propertyName: "previousPaginatorQuery", first: true, predicate: ["previousPaginator"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #previousPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_before\"\n [class.kbq-disabled]=\"disableScrollBefore\"\n (click)=\"handlePaginatorClick('before')\"\n (mousedown)=\"handlePaginatorPress('before', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-left_16\" color=\"contrast\"></i>\n</div>\n\n<div\n #tabListContainer\n kbqScrollbarViewport\n class=\"kbq-tab-header__container kbq-tab-header__scroll-container\"\n [kbqScrollbarMode]=\"scrollbarMode\"\n [class.kbq-tab-header__scroll-container_overflow-before]=\"!disableScrollBefore\"\n [class.kbq-tab-header__scroll-container_overflow-after]=\"!disableScrollAfter\"\n (keydown)=\"handleKeydown($event)\"\n>\n <div #tabList class=\"kbq-tab-list\" (cdkObserveContent)=\"onContentChanges()\">\n <div class=\"kbq-tab-list__content\" role=\"tablist\" [attr.aria-orientation]=\"vertical ? 'vertical' : null\">\n <ng-content />\n <div\n aria-hidden=\"true\"\n class=\"kbq-tab-list__active-tab-underline\"\n [class.kbq-animations-disabled]=\"animationsDisabled\"\n [class.kbq-disabled]=\"activeTabDisabled\"\n [style.left.px]=\"activeTabOffsetLeft\"\n [style.width.px]=\"activeTabOffsetWidth\"\n ></div>\n </div>\n </div>\n</div>\n\n<div\n #nextPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_after\"\n [class.kbq-disabled]=\"disableScrollAfter\"\n (click)=\"handlePaginatorClick('after')\"\n (mousedown)=\"handlePaginatorPress('after', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast\"></i>\n</div>\n", styles: ["@charset \"UTF-8\";.kbq-tab-header__pagination{-webkit-user-select:none;user-select:none;position:absolute;inset-block:0;display:none;justify-content:center;align-items:center;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:manipulation;padding:0 var(--kbq-size-m);opacity:1;visibility:visible}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__pagination{display:flex}.kbq-tab-header__pagination:not(.kbq-disabled){cursor:pointer}.kbq-tab-header__pagination.kbq-disabled{opacity:0;visibility:hidden;pointer-events:none}.kbq-tab-header__pagination_before{inset-inline-start:0}.kbq-tab-header__pagination_after{inset-inline-end:0}.kbq-tab-header__scroll-container{-webkit-user-select:none;user-select:none;--mask-size: calc(var(--kbq-size-m) * 2 + 16px);overflow-x:auto;overflow-y:hidden}.kbq-tab-group_vertical .kbq-tab-header__scroll-container{overflow-x:hidden;overflow-y:auto}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__scroll-container{cursor:grab}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_dragging{cursor:grabbing}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content{padding:var(--kbq-size-s) 0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label:first-child:not(.kbq-tab-label_icon-only),.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-link:first-child{margin-inline-start:calc(-1 * var(--kbq-tabs-size-tab-item-padding-horizontal))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label_icon-only:first-child{margin-inline-start:0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical):after{content:\"\";position:absolute;left:0;bottom:0;right:0;height:1px;background:var(--kbq-line-contrast-less)}.kbq-tab-list__active-tab-underline{display:none}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline{display:block;position:absolute;bottom:0;height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:var(--kbq-line-contrast);transition:all .2s ease-in-out}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline.kbq-disabled{background:var(--kbq-states-icon-disabled)}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline{animation:none;transition:none}}.kbq-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0;border-radius:var(--kbq-tabs-size-tab-stack-horizontal-border-radius)}@supports (corner-shape: squircle){.kbq-tab-header{corner-shape:squircle;border-radius:clamp(var(--kbq-tabs-size-tab-stack-horizontal-border-radius) * 1.85,var(--kbq-tabs-size-tab-stack-horizontal-border-radius) * 2.3 - 3.6px,var(--kbq-tabs-size-tab-stack-horizontal-border-radius) * 2)}}.kbq-tab-group:not(.kbq-tab-group_on-surface) .kbq-tab-header.kbq-tab-header_underlined{border-radius:0}.kbq-tab-header.kbq-tab-header_underlined:not(.kbq-tab-header__pagination-controls_enabled){overflow:visible}.kbq-tab-list__content{display:flex}.kbq-tab-group_align-labels-center .kbq-tab-list__content{justify-content:center}.kbq-tab-group_align-labels-end .kbq-tab-list__content{justify-content:flex-end}.kbq-tab-header_vertical .kbq-tab-list__content{flex-direction:column}.kbq-tab-header__container{display:flex;flex-grow:1;z-index:1}.kbq-tab-header_underlined:not(.kbq-tab-header__pagination-controls_enabled) .kbq-tab-header__container{overflow:visible}.kbq-tab-list{position:relative;width:100%}.kbq-tab-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;text-align:center;white-space:nowrap;cursor:pointer;padding:calc(var(--kbq-tabs-size-tab-item-padding-vertical) - var(--kbq-tabs-size-tab-item-focus-outline-width)) calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));border-width:var(--kbq-tabs-size-tab-item-focus-outline-width);border-style:solid;border-color:transparent;border-radius:var(--kbq-tabs-size-tab-item-border-radius)}@supports (corner-shape: squircle){.kbq-tab-label{corner-shape:squircle;border-radius:clamp(var(--kbq-tabs-size-tab-item-border-radius) * 1.85,var(--kbq-tabs-size-tab-item-border-radius) * 2.3 - 3.6px,var(--kbq-tabs-size-tab-item-border-radius) * 2)}}.kbq-tab-label{outline:none}.kbq-tab-label.kbq-selected{cursor:default}.kbq-tab-label.cdk-keyboard-focused{z-index:1}.kbq-tab-label.kbq-disabled{pointer-events:none}.kbq-tab-label .kbq-tab-label__content{display:flex;align-items:center;overflow:hidden;gap:var(--kbq-tabs-size-tab-item-content-gap-horizontal)}.kbq-tab-label.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{content:\"\";position:absolute;inset:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width))) calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width))}.kbq-tab-label.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):not(.kbq-tab-label_icon-only):after{content:\"\";position:absolute;left:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:transparent;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-label.kbq-tab-label_icon-only{width:var(--kbq-size-3xl);height:var(--kbq-size-3xl);padding:0;margin-inline:var(--kbq-size-xxs);box-sizing:content-box}.kbq-tab-label.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical){width:var(--kbq-tabs-size-tab-item-underlined-icon-only-size);height:var(--kbq-tabs-size-tab-item-underlined-icon-only-size)}.kbq-tab-label.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)))}.kbq-tab-label.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):after{top:auto;bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;left:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-label.kbq-tab-label_icon-only:not(.kbq-tab-label_vertical):after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));background:transparent}.kbq-tab-label.kbq-tab-label_vertical{justify-content:flex-start}.kbq-tab-label.kbq-tab-label_vertical .kbq-tab-label__content:not(.kbq-tab-label__template){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kbq-tab-label.kbq-tab-label_vertical.kbq-tab-label_icon-only{margin-inline:0;justify-content:center}.kbq-tab-label{-webkit-user-select:none;user-select:none}.kbq-tab-group_stretch-labels .kbq-tab-label{flex-basis:0;flex-grow:1}\n"], dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1.KbqIcon, selector: "[kbq-icon]", inputs: ["aria-hidden", "iconSize", "autoColor", "kbq-icon"] }, { kind: "directive", type: CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }, { kind: "directive", type: KbqScrollbarViewport, selector: "[kbqScrollbarViewport]", inputs: ["kbqScrollbarMode", "kbqScrollbarHideDelay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1244
1339
|
}
|
|
1245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabHeader, decorators: [{
|
|
1246
1341
|
type: Component,
|
|
1247
|
-
args: [{ selector: 'kbq-tab-header', imports: [KbqIconModule, CdkObserveContent], changeDetection: ChangeDetectionStrategy.
|
|
1342
|
+
args: [{ selector: 'kbq-tab-header', imports: [KbqIconModule, CdkObserveContent, KbqScrollbarViewport], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1248
1343
|
class: 'kbq-tab-header',
|
|
1249
1344
|
'[class.kbq-tab-header_vertical]': 'vertical',
|
|
1250
1345
|
'[class.kbq-tab-header_underlined]': 'underlined()',
|
|
1251
1346
|
'[class.kbq-tab-header__pagination-controls_enabled]': 'showPaginationControls',
|
|
1252
1347
|
'[class.kbq-tab-header_rtl]': "getLayoutDirection() == 'rtl'"
|
|
1253
|
-
}, outputs: ['selectFocusedIndex', 'indexFocused'], template: "<div\n #previousPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_before\"\n [class.kbq-disabled]=\"disableScrollBefore\"\n (click)=\"handlePaginatorClick('before')\"\n (mousedown)=\"handlePaginatorPress('before', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-left_16\" color=\"contrast\"></i>\n</div>\n\n<div\n #tabListContainer\n class=\"kbq-tab-header__container kbq-tab-header__scroll-container\"\n [class.kbq-tab-header__scroll-container_overflow-before]=\"!disableScrollBefore\"\n [class.kbq-tab-header__scroll-container_overflow-after]=\"!disableScrollAfter\"\n (keydown)=\"handleKeydown($event)\"\n>\n <div #tabList class=\"kbq-tab-list\" (cdkObserveContent)=\"onContentChanges()\">\n <div class=\"kbq-tab-list__content\">\n <ng-content />\n <div\n class=\"kbq-tab-list__active-tab-underline\"\n [class.kbq-disabled]=\"activeTabDisabled\"\n [style.left.px]=\"activeTabOffsetLeft\"\n [style.width.px]=\"activeTabOffsetWidth\"\n ></div>\n </div>\n </div>\n</div>\n\n<div\n #nextPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_after\"\n [class.kbq-disabled]=\"disableScrollAfter\"\n (click)=\"handlePaginatorClick('after')\"\n (mousedown)=\"handlePaginatorPress('after', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast\"></i>\n</div>\n", styles: [".kbq-tab-header__pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;inset-block:0;display:none;justify-content:center;align-items:center;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:manipulation;padding:0 var(--kbq-size-m);opacity:1;visibility:visible}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__pagination{display:flex}.kbq-tab-header__pagination:not(.kbq-disabled){cursor:pointer}.kbq-tab-header__pagination.kbq-disabled{opacity:0;visibility:hidden;pointer-events:none}.kbq-tab-header__pagination_before{inset-inline-start:0}.kbq-tab-header__pagination_after{inset-inline-end:0}.kbq-tab-header__scroll-container{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;--mask-size: calc(var(--kbq-size-m) * 2 + 16px);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.kbq-tab-header__scroll-container::-webkit-scrollbar{display:none}.kbq-tab-group_vertical .kbq-tab-header__scroll-container{overflow-x:hidden;overflow-y:auto;scrollbar-width:auto}.kbq-tab-group_vertical .kbq-tab-header__scroll-container::-webkit-scrollbar{display:block}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__scroll-container{cursor:grab}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_dragging{cursor:grabbing}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content{padding:var(--kbq-size-s) 0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label:first-child:not(.kbq-tab-label_icon-only),.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-link:first-child{margin-inline-start:calc(-1 * var(--kbq-tabs-size-tab-item-padding-horizontal))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label_icon-only:first-child{margin-inline-start:0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical):after{content:\"\";position:absolute;left:0;bottom:0;right:0;height:1px;background:var(--kbq-line-contrast-less)}.kbq-tab-list__active-tab-underline{display:none}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline{display:block;position:absolute;bottom:0;height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:var(--kbq-line-contrast);transition:all .2s ease-in-out}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline.kbq-disabled{background:var(--kbq-states-icon-disabled)}.kbq-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0;border-radius:var(--kbq-tabs-size-tab-stack-horizontal-border-radius)}.kbq-tab-group:not(.kbq-tab-group_on-surface) .kbq-tab-header.kbq-tab-header_underlined{border-radius:0}.kbq-tab-header.kbq-tab-header_underlined:not(.kbq-tab-header__pagination-controls_enabled){overflow:visible}.kbq-tab-list__content{display:flex}.kbq-tab-group_align-labels-center .kbq-tab-list__content{justify-content:center}.kbq-tab-group_align-labels-end .kbq-tab-list__content{justify-content:flex-end}.kbq-tab-header_vertical .kbq-tab-list__content{flex-direction:column}.kbq-tab-header__container{display:flex;flex-grow:1;z-index:1}.kbq-tab-header_underlined:not(.kbq-tab-header__pagination-controls_enabled) .kbq-tab-header__container{overflow:visible}.kbq-tab-list{position:relative;width:100%}.kbq-tab-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;text-align:center;white-space:nowrap;cursor:pointer;padding:calc(var(--kbq-tabs-size-tab-item-padding-vertical) - var(--kbq-tabs-size-tab-item-focus-outline-width)) calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));border-width:var(--kbq-tabs-size-tab-item-focus-outline-width);border-style:solid;border-color:transparent;border-radius:var(--kbq-tabs-size-tab-item-border-radius);outline:none}.kbq-tab-label.kbq-selected{cursor:default}.kbq-tab-label.cdk-keyboard-focused{z-index:1}.kbq-tab-label.kbq-disabled{pointer-events:none}.kbq-tab-label .kbq-tab-label__content{display:flex;align-items:center;overflow:hidden;gap:var(--kbq-tabs-size-tab-item-content-gap-horizontal)}.kbq-tab-label.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{content:\"\";position:absolute;inset:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width))) calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width))}.kbq-tab-label.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):not(.kbq-tab-label_icon-only):after{content:\"\";position:absolute;left:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:transparent;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-label.kbq-tab-label_icon-only{width:var(--kbq-size-3xl);height:var(--kbq-size-3xl);padding:0!important;margin-inline:var(--kbq-size-xxs);box-sizing:content-box}.kbq-tab-label.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical){width:var(--kbq-tabs-size-tab-item-underlined-icon-only-size);height:var(--kbq-tabs-size-tab-item-underlined-icon-only-size)}.kbq-tab-label.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)))}.kbq-tab-label.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):after{top:auto;bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;left:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-label.kbq-tab-label_icon-only:not(.kbq-tab-label_vertical):after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));background:transparent}.kbq-tab-label.kbq-tab-label_vertical{justify-content:flex-start}.kbq-tab-label.kbq-tab-label_vertical .kbq-tab-label__content:not(.kbq-tab-label__template){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kbq-tab-label.kbq-tab-label_vertical.kbq-tab-label_icon-only{margin-inline:0;justify-content:center}.kbq-tab-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-tab-group_stretch-labels .kbq-tab-label{flex-basis:0;flex-grow:1}\n"] }]
|
|
1254
|
-
}], propDecorators: { underlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "underlined", required: false }] }],
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1348
|
+
}, outputs: ['selectFocusedIndex', 'indexFocused'], template: "<div\n #previousPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_before\"\n [class.kbq-disabled]=\"disableScrollBefore\"\n (click)=\"handlePaginatorClick('before')\"\n (mousedown)=\"handlePaginatorPress('before', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-left_16\" color=\"contrast\"></i>\n</div>\n\n<div\n #tabListContainer\n kbqScrollbarViewport\n class=\"kbq-tab-header__container kbq-tab-header__scroll-container\"\n [kbqScrollbarMode]=\"scrollbarMode\"\n [class.kbq-tab-header__scroll-container_overflow-before]=\"!disableScrollBefore\"\n [class.kbq-tab-header__scroll-container_overflow-after]=\"!disableScrollAfter\"\n (keydown)=\"handleKeydown($event)\"\n>\n <div #tabList class=\"kbq-tab-list\" (cdkObserveContent)=\"onContentChanges()\">\n <div class=\"kbq-tab-list__content\" role=\"tablist\" [attr.aria-orientation]=\"vertical ? 'vertical' : null\">\n <ng-content />\n <div\n aria-hidden=\"true\"\n class=\"kbq-tab-list__active-tab-underline\"\n [class.kbq-animations-disabled]=\"animationsDisabled\"\n [class.kbq-disabled]=\"activeTabDisabled\"\n [style.left.px]=\"activeTabOffsetLeft\"\n [style.width.px]=\"activeTabOffsetWidth\"\n ></div>\n </div>\n </div>\n</div>\n\n<div\n #nextPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_after\"\n [class.kbq-disabled]=\"disableScrollAfter\"\n (click)=\"handlePaginatorClick('after')\"\n (mousedown)=\"handlePaginatorPress('after', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast\"></i>\n</div>\n", styles: ["@charset \"UTF-8\";.kbq-tab-header__pagination{-webkit-user-select:none;user-select:none;position:absolute;inset-block:0;display:none;justify-content:center;align-items:center;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:manipulation;padding:0 var(--kbq-size-m);opacity:1;visibility:visible}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__pagination{display:flex}.kbq-tab-header__pagination:not(.kbq-disabled){cursor:pointer}.kbq-tab-header__pagination.kbq-disabled{opacity:0;visibility:hidden;pointer-events:none}.kbq-tab-header__pagination_before{inset-inline-start:0}.kbq-tab-header__pagination_after{inset-inline-end:0}.kbq-tab-header__scroll-container{-webkit-user-select:none;user-select:none;--mask-size: calc(var(--kbq-size-m) * 2 + 16px);overflow-x:auto;overflow-y:hidden}.kbq-tab-group_vertical .kbq-tab-header__scroll-container{overflow-x:hidden;overflow-y:auto}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__scroll-container{cursor:grab}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_dragging{cursor:grabbing}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content{padding:var(--kbq-size-s) 0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label:first-child:not(.kbq-tab-label_icon-only),.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-link:first-child{margin-inline-start:calc(-1 * var(--kbq-tabs-size-tab-item-padding-horizontal))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label_icon-only:first-child{margin-inline-start:0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical):after{content:\"\";position:absolute;left:0;bottom:0;right:0;height:1px;background:var(--kbq-line-contrast-less)}.kbq-tab-list__active-tab-underline{display:none}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline{display:block;position:absolute;bottom:0;height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:var(--kbq-line-contrast);transition:all .2s ease-in-out}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline.kbq-disabled{background:var(--kbq-states-icon-disabled)}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline{animation:none;transition:none}}.kbq-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0;border-radius:var(--kbq-tabs-size-tab-stack-horizontal-border-radius)}@supports (corner-shape: squircle){.kbq-tab-header{corner-shape:squircle;border-radius:clamp(var(--kbq-tabs-size-tab-stack-horizontal-border-radius) * 1.85,var(--kbq-tabs-size-tab-stack-horizontal-border-radius) * 2.3 - 3.6px,var(--kbq-tabs-size-tab-stack-horizontal-border-radius) * 2)}}.kbq-tab-group:not(.kbq-tab-group_on-surface) .kbq-tab-header.kbq-tab-header_underlined{border-radius:0}.kbq-tab-header.kbq-tab-header_underlined:not(.kbq-tab-header__pagination-controls_enabled){overflow:visible}.kbq-tab-list__content{display:flex}.kbq-tab-group_align-labels-center .kbq-tab-list__content{justify-content:center}.kbq-tab-group_align-labels-end .kbq-tab-list__content{justify-content:flex-end}.kbq-tab-header_vertical .kbq-tab-list__content{flex-direction:column}.kbq-tab-header__container{display:flex;flex-grow:1;z-index:1}.kbq-tab-header_underlined:not(.kbq-tab-header__pagination-controls_enabled) .kbq-tab-header__container{overflow:visible}.kbq-tab-list{position:relative;width:100%}.kbq-tab-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;text-align:center;white-space:nowrap;cursor:pointer;padding:calc(var(--kbq-tabs-size-tab-item-padding-vertical) - var(--kbq-tabs-size-tab-item-focus-outline-width)) calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));border-width:var(--kbq-tabs-size-tab-item-focus-outline-width);border-style:solid;border-color:transparent;border-radius:var(--kbq-tabs-size-tab-item-border-radius)}@supports (corner-shape: squircle){.kbq-tab-label{corner-shape:squircle;border-radius:clamp(var(--kbq-tabs-size-tab-item-border-radius) * 1.85,var(--kbq-tabs-size-tab-item-border-radius) * 2.3 - 3.6px,var(--kbq-tabs-size-tab-item-border-radius) * 2)}}.kbq-tab-label{outline:none}.kbq-tab-label.kbq-selected{cursor:default}.kbq-tab-label.cdk-keyboard-focused{z-index:1}.kbq-tab-label.kbq-disabled{pointer-events:none}.kbq-tab-label .kbq-tab-label__content{display:flex;align-items:center;overflow:hidden;gap:var(--kbq-tabs-size-tab-item-content-gap-horizontal)}.kbq-tab-label.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{content:\"\";position:absolute;inset:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width))) calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width))}.kbq-tab-label.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):not(.kbq-tab-label_icon-only):after{content:\"\";position:absolute;left:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:transparent;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-label.kbq-tab-label_icon-only{width:var(--kbq-size-3xl);height:var(--kbq-size-3xl);padding:0;margin-inline:var(--kbq-size-xxs);box-sizing:content-box}.kbq-tab-label.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical){width:var(--kbq-tabs-size-tab-item-underlined-icon-only-size);height:var(--kbq-tabs-size-tab-item-underlined-icon-only-size)}.kbq-tab-label.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)))}.kbq-tab-label.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):after{top:auto;bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;left:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-label.kbq-tab-label_icon-only:not(.kbq-tab-label_vertical):after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));background:transparent}.kbq-tab-label.kbq-tab-label_vertical{justify-content:flex-start}.kbq-tab-label.kbq-tab-label_vertical .kbq-tab-label__content:not(.kbq-tab-label__template){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kbq-tab-label.kbq-tab-label_vertical.kbq-tab-label_icon-only{margin-inline:0;justify-content:center}.kbq-tab-label{-webkit-user-select:none;user-select:none}.kbq-tab-group_stretch-labels .kbq-tab-label{flex-basis:0;flex-grow:1}\n"] }]
|
|
1349
|
+
}], propDecorators: { underlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "underlined", required: false }] }], itemsQuery: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KbqTabLabelWrapper), { ...{ descendants: false }, isSignal: true }] }], tabListContainerQuery: [{ type: i0.ViewChild, args: ['tabListContainer', { isSignal: true }] }], scrollbarViewportQuery: [{ type: i0.ViewChild, args: ['tabListContainer', { ...{ read: KbqScrollbarViewport }, isSignal: true }] }], tabListQuery: [{ type: i0.ViewChild, args: ['tabList', { isSignal: true }] }], nextPaginatorQuery: [{ type: i0.ViewChild, args: ['nextPaginator', { isSignal: true }] }], previousPaginatorQuery: [{ type: i0.ViewChild, args: ['previousPaginator', { isSignal: true }] }] } });
|
|
1350
|
+
|
|
1351
|
+
const KBQ_TAB_LABEL = new InjectionToken('KbqTabLabel');
|
|
1352
|
+
/** Used to flag tab labels for use with the portal directive */
|
|
1353
|
+
class KbqTabLabel extends CdkPortal {
|
|
1354
|
+
constructor() {
|
|
1355
|
+
super(...arguments);
|
|
1356
|
+
/** Whether the tab contains only an icon without a label. */
|
|
1357
|
+
this.iconOnly = input(false, { ...(ngDevMode ? { debugName: "iconOnly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1358
|
+
}
|
|
1359
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabLabel, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1360
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqTabLabel, isStandalone: true, selector: "[kbq-tab-label], [kbqTabLabel]", inputs: { iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: KBQ_TAB_LABEL, useExisting: KbqTabLabel }], usesInheritance: true, ngImport: i0 }); }
|
|
1361
|
+
}
|
|
1362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabLabel, decorators: [{
|
|
1363
|
+
type: Directive,
|
|
1364
|
+
args: [{
|
|
1365
|
+
selector: '[kbq-tab-label], [kbqTabLabel]',
|
|
1366
|
+
providers: [{ provide: KBQ_TAB_LABEL, useExisting: KbqTabLabel }]
|
|
1367
|
+
}]
|
|
1368
|
+
}], propDecorators: { iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }] } });
|
|
1369
|
+
|
|
1370
|
+
class KbqTab {
|
|
1371
|
+
constructor() {
|
|
1372
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
1373
|
+
this.templateLabelQuery = contentChild(KBQ_TAB_LABEL, ...(ngDevMode ? [{ debugName: "templateLabelQuery" }] : /* istanbul ignore next */ []));
|
|
1374
|
+
/**
|
|
1375
|
+
* Template provided in the tab content that will be used if present, used to enable lazy-loading
|
|
1376
|
+
*/
|
|
1377
|
+
this.explicitContent = contentChild(KbqTabContent, { ...(ngDevMode ? { debugName: "explicitContent" } : /* istanbul ignore next */ {}), read: TemplateRef });
|
|
1378
|
+
/** Template inside the KbqTab view that contains an `<ng-content>`. */
|
|
1379
|
+
this.implicitContent = viewChild.required(TemplateRef);
|
|
1380
|
+
/** @docs-private */
|
|
1381
|
+
this.tooltipTitleInput = input(undefined, { ...(ngDevMode ? { debugName: "tooltipTitleInput" } : /* istanbul ignore next */ {}), alias: 'tooltipTitle' });
|
|
1382
|
+
/** @docs-private */
|
|
1383
|
+
this.disabledInput = input(undefined, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
1384
|
+
transform: booleanAttribute });
|
|
1385
|
+
this._tooltipTitle = '';
|
|
1386
|
+
this._disabled = false;
|
|
1387
|
+
/** Placement of the tooltip shown for a truncated or empty label. */
|
|
1388
|
+
this.tooltipPlacement = input(PopUpPlacements.Right, ...(ngDevMode ? [{ debugName: "tooltipPlacement" }] : /* istanbul ignore next */ []));
|
|
1389
|
+
/** Plain text label for the tab, used when there is no template label. */
|
|
1390
|
+
this.textLabel = input('', { ...(ngDevMode ? { debugName: "textLabel" } : /* istanbul ignore next */ {}), alias: 'label' });
|
|
1391
|
+
this.empty = input(false, { ...(ngDevMode ? { debugName: "empty" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1392
|
+
this.tabId = input(undefined, ...(ngDevMode ? [{ debugName: "tabId" }] : /* istanbul ignore next */ []));
|
|
1393
|
+
/** Emits whenever the internal state of the tab changes. */
|
|
1394
|
+
this.stateChanges = new Subject();
|
|
1395
|
+
/**
|
|
1396
|
+
* The relatively indexed position where 0 represents the center, negative is left, and positive
|
|
1397
|
+
* represents the right.
|
|
1398
|
+
*/
|
|
1399
|
+
this.position = null;
|
|
1400
|
+
/**
|
|
1401
|
+
* The initial relatively index origin of the tab if it was created and selected after there
|
|
1402
|
+
* was already a selected tab. Provides context of what position the tab should originate from.
|
|
1403
|
+
*/
|
|
1404
|
+
this.origin = null;
|
|
1405
|
+
this.activeState = signal(false, ...(ngDevMode ? [{ debugName: "activeState" }] : /* istanbul ignore next */ []));
|
|
1406
|
+
this._overflowTooltipTitle = '';
|
|
1407
|
+
/** Portal that will be the hosted content of the tab */
|
|
1408
|
+
this.contentPortal = null;
|
|
1409
|
+
}
|
|
1410
|
+
/** @docs-private */
|
|
1411
|
+
get content() {
|
|
1412
|
+
return this.contentPortal;
|
|
1413
|
+
}
|
|
1414
|
+
/** The label template of the tab: the `kbqTabLabel` in its content, or else the one assigned in code. */
|
|
1415
|
+
get templateLabel() {
|
|
1416
|
+
return this.templateLabelQuery() ?? this._templateLabel;
|
|
1417
|
+
}
|
|
1418
|
+
set templateLabel(value) {
|
|
1419
|
+
this.setTemplateLabelInput(value);
|
|
1420
|
+
}
|
|
1421
|
+
get tooltipTitle() {
|
|
1422
|
+
return this.overflowTooltipTitle + this._tooltipTitle;
|
|
1423
|
+
}
|
|
1424
|
+
set tooltipTitle(value) {
|
|
1425
|
+
this._tooltipTitle = value;
|
|
1426
|
+
}
|
|
1427
|
+
/** Whether the tab is disabled: it cannot be selected and has no interactive states. */
|
|
1428
|
+
get disabled() {
|
|
1429
|
+
return this._disabled;
|
|
1430
|
+
}
|
|
1431
|
+
set disabled(value) {
|
|
1432
|
+
if (value !== this.disabled) {
|
|
1433
|
+
this._disabled = value;
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
/** Whether the tab label contains only an icon (no text). */
|
|
1437
|
+
get iconOnlyLabel() {
|
|
1438
|
+
return this.templateLabel?.iconOnly() ?? false;
|
|
1439
|
+
}
|
|
1440
|
+
/** Whether the tab is currently active. A template that reads it is updated when it changes. */
|
|
1441
|
+
get isActive() {
|
|
1442
|
+
return this.activeState();
|
|
1443
|
+
}
|
|
1444
|
+
set isActive(value) {
|
|
1445
|
+
this.activeState.set(value);
|
|
1446
|
+
}
|
|
1447
|
+
get isOverflown() {
|
|
1448
|
+
return !!this._overflowTooltipTitle;
|
|
1449
|
+
}
|
|
1450
|
+
get overflowTooltipTitle() {
|
|
1451
|
+
if (this.isOverflown) {
|
|
1452
|
+
return `${this._overflowTooltipTitle}\n`;
|
|
1453
|
+
}
|
|
1454
|
+
return '';
|
|
1455
|
+
}
|
|
1456
|
+
set overflowTooltipTitle(value) {
|
|
1457
|
+
this._overflowTooltipTitle = value;
|
|
1458
|
+
}
|
|
1459
|
+
ngOnChanges(changes) {
|
|
1460
|
+
// A bound input is handed to its member, except that `undefined` resets a member
|
|
1461
|
+
// typed without it to its default; unbound, it leaves what code wrote.
|
|
1462
|
+
if (changes['tooltipTitleInput']) {
|
|
1463
|
+
this.tooltipTitle = this.tooltipTitleInput() ?? '';
|
|
1464
|
+
}
|
|
1465
|
+
if (changes['disabledInput']) {
|
|
1466
|
+
const disabled = this.disabledInput();
|
|
1467
|
+
if (disabled !== undefined)
|
|
1468
|
+
this.disabled = disabled;
|
|
1469
|
+
}
|
|
1470
|
+
if (changes['textLabel'] || changes['disabledInput'] || changes['tooltipTitleInput']) {
|
|
1471
|
+
this.stateChanges.next();
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
ngOnInit() {
|
|
1475
|
+
this.contentPortal = new TemplatePortal(this.explicitContent() || this.implicitContent(), this.viewContainerRef);
|
|
1476
|
+
}
|
|
1477
|
+
ngOnDestroy() {
|
|
1478
|
+
this.stateChanges.complete();
|
|
1479
|
+
}
|
|
1480
|
+
/**
|
|
1481
|
+
* Keeps a label template assigned in code, used while the content of the tab has none. A falsy value is
|
|
1482
|
+
* ignored.
|
|
1483
|
+
*
|
|
1484
|
+
* @docs-private
|
|
1485
|
+
*/
|
|
1486
|
+
setTemplateLabelInput(value) {
|
|
1487
|
+
if (value) {
|
|
1488
|
+
this._templateLabel = value;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTab, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1492
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.25", type: KbqTab, isStandalone: true, selector: "kbq-tab", inputs: { tooltipTitleInput: { classPropertyName: "tooltipTitleInput", publicName: "tooltipTitle", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tooltipPlacement: { classPropertyName: "tooltipPlacement", publicName: "tooltipPlacement", isSignal: true, isRequired: false, transformFunction: null }, textLabel: { classPropertyName: "textLabel", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, empty: { classPropertyName: "empty", publicName: "empty", isSignal: true, isRequired: false, transformFunction: null }, tabId: { classPropertyName: "tabId", publicName: "tabId", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
1493
|
+
...[KBQ_SELECT_SCROLL_STRATEGY, KBQ_DROPDOWN_SCROLL_STRATEGY].map(((token) => KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER(token, ((overlay) => (() => overlay.scrollStrategies.close())))))
|
|
1494
|
+
], queries: [{ propertyName: "templateLabelQuery", first: true, predicate: KBQ_TAB_LABEL, descendants: true, isSignal: true }, { propertyName: "explicitContent", first: true, predicate: KbqTabContent, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "implicitContent", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], exportAs: ["kbqTab"], usesOnChanges: true, ngImport: i0, template: '<ng-template><ng-content /></ng-template>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1495
|
+
}
|
|
1496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTab, decorators: [{
|
|
1497
|
+
type: Component,
|
|
1498
|
+
args: [{
|
|
1499
|
+
selector: 'kbq-tab',
|
|
1500
|
+
// Create a template for the content of the <kbq-tab> so that we can grab a reference to this
|
|
1501
|
+
// TemplateRef and use it in a Portal to render the tab content in the appropriate place in the
|
|
1502
|
+
// tab-group.
|
|
1503
|
+
template: '<ng-template><ng-content /></ng-template>',
|
|
1504
|
+
providers: [
|
|
1505
|
+
...[KBQ_SELECT_SCROLL_STRATEGY, KBQ_DROPDOWN_SCROLL_STRATEGY].map(((token) => KBQ_CUSTOM_SCROLL_STRATEGY_PROVIDER(token, ((overlay) => (() => overlay.scrollStrategies.close())))))
|
|
1506
|
+
],
|
|
1507
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1508
|
+
encapsulation: ViewEncapsulation.None,
|
|
1509
|
+
exportAs: 'kbqTab'
|
|
1510
|
+
}]
|
|
1511
|
+
}], propDecorators: { templateLabelQuery: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KBQ_TAB_LABEL), { isSignal: true }] }], explicitContent: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqTabContent), { ...{ read: TemplateRef }, isSignal: true }] }], implicitContent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], tooltipTitleInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipTitle", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], tooltipPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltipPlacement", required: false }] }], textLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], empty: [{ type: i0.Input, args: [{ isSignal: true, alias: "empty", required: false }] }], tabId: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabId", required: false }] }] } });
|
|
1270
1512
|
|
|
1271
1513
|
class KbqAlignTabsCenterCssStyler {
|
|
1272
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1273
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1514
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAlignTabsCenterCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1515
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqAlignTabsCenterCssStyler, isStandalone: true, selector: "kbq-tab-group[kbq-align-tabs-center], [kbq-tab-nav-bar][kbq-align-tabs-center], [kbqTabNavBar][kbq-align-tabs-center]", host: { classAttribute: "kbq-tab-group_align-labels-center" }, ngImport: i0 }); }
|
|
1274
1516
|
}
|
|
1275
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAlignTabsCenterCssStyler, decorators: [{
|
|
1276
1518
|
type: Directive,
|
|
1277
1519
|
args: [{
|
|
1278
1520
|
selector: 'kbq-tab-group[kbq-align-tabs-center], [kbq-tab-nav-bar][kbq-align-tabs-center], [kbqTabNavBar][kbq-align-tabs-center]',
|
|
@@ -1280,10 +1522,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1280
1522
|
}]
|
|
1281
1523
|
}] });
|
|
1282
1524
|
class KbqAlignTabsEndCssStyler {
|
|
1283
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1284
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1525
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAlignTabsEndCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1526
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqAlignTabsEndCssStyler, isStandalone: true, selector: "kbq-tab-group[kbq-align-tabs-end], [kbq-tab-nav-bar][kbq-align-tabs-end], [kbqTabNavBar][kbq-align-tabs-end]", host: { classAttribute: "kbq-tab-group_align-labels-end" }, ngImport: i0 }); }
|
|
1285
1527
|
}
|
|
1286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1528
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqAlignTabsEndCssStyler, decorators: [{
|
|
1287
1529
|
type: Directive,
|
|
1288
1530
|
args: [{
|
|
1289
1531
|
selector: 'kbq-tab-group[kbq-align-tabs-end], [kbq-tab-nav-bar][kbq-align-tabs-end], [kbqTabNavBar][kbq-align-tabs-end]',
|
|
@@ -1291,49 +1533,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1291
1533
|
}]
|
|
1292
1534
|
}] });
|
|
1293
1535
|
class KbqStretchTabsCssStyler {
|
|
1294
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1295
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1536
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqStretchTabsCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1537
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqStretchTabsCssStyler, isStandalone: true, selector: "kbq-tab-group[kbq-stretch-tabs], [kbq-tab-nav-bar][kbq-stretch-tabs], [kbqTabNavBar][kbq-stretch-tabs]", host: { classAttribute: "kbq-tab-group_stretch-labels" }, ngImport: i0 }); }
|
|
1296
1538
|
}
|
|
1297
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1539
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqStretchTabsCssStyler, decorators: [{
|
|
1298
1540
|
type: Directive,
|
|
1299
1541
|
args: [{
|
|
1300
1542
|
selector: 'kbq-tab-group[kbq-stretch-tabs], [kbq-tab-nav-bar][kbq-stretch-tabs], [kbqTabNavBar][kbq-stretch-tabs]',
|
|
1301
1543
|
host: { class: 'kbq-tab-group_stretch-labels' }
|
|
1302
1544
|
}]
|
|
1303
1545
|
}] });
|
|
1546
|
+
/**
|
|
1547
|
+
* @deprecated No-op. The vertical layout class is bound from `KbqTabGroup`/`KbqTabNavBar` themselves,
|
|
1548
|
+
* so it follows the `vertical` value instead of merely the presence of the attribute. Will be removed
|
|
1549
|
+
* in a future major version — stop importing it.
|
|
1550
|
+
*/
|
|
1304
1551
|
class KbqVerticalTabsCssStyler {
|
|
1305
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1306
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
1552
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqVerticalTabsCssStyler, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1553
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: KbqVerticalTabsCssStyler, isStandalone: true, selector: "kbq-tab-group[vertical], [kbq-tab-nav-bar][vertical], [kbqTabNavBar][vertical]", ngImport: i0 }); }
|
|
1307
1554
|
}
|
|
1308
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1555
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqVerticalTabsCssStyler, decorators: [{
|
|
1309
1556
|
type: Directive,
|
|
1310
1557
|
args: [{
|
|
1311
|
-
selector: 'kbq-tab-group[vertical], [kbq-tab-nav-bar][vertical], [kbqTabNavBar][vertical]'
|
|
1312
|
-
host: { class: 'kbq-tab-group_vertical' }
|
|
1558
|
+
selector: 'kbq-tab-group[vertical], [kbq-tab-nav-bar][vertical], [kbqTabNavBar][vertical]'
|
|
1313
1559
|
}]
|
|
1314
1560
|
}] });
|
|
1315
1561
|
/** Used to generate unique ID's for each tab component */
|
|
1316
1562
|
let nextId = 0;
|
|
1563
|
+
/** Debounce applied to header resizes before the tab labels are re-measured for overflow. */
|
|
1564
|
+
const RESIZE_DEBOUNCE_INTERVAL = 100;
|
|
1317
1565
|
/** A simple change event emitted on focus or selection changes. */
|
|
1318
1566
|
class KbqTabChangeEvent {
|
|
1319
1567
|
}
|
|
1320
1568
|
/** Injection token that can be used to provide the default options the tabs module. */
|
|
1321
1569
|
const KBQ_TABS_CONFIG = new InjectionToken('KBQ_TABS_CONFIG');
|
|
1570
|
+
/**
|
|
1571
|
+
* Coerces a raw persisted payload into a `KbqTabsState`, returning `null` for anything unrecognizable.
|
|
1572
|
+
*
|
|
1573
|
+
* Web storage is origin-wide and user-writable, so a payload is never trusted — without this, an entry
|
|
1574
|
+
* such as `{"index": "first"}` would reach `clampTabIndex` and select nothing.
|
|
1575
|
+
*/
|
|
1576
|
+
const normalizeTabsState = (parsed) => {
|
|
1577
|
+
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed))
|
|
1578
|
+
return null;
|
|
1579
|
+
const { tabId, index } = parsed;
|
|
1580
|
+
if (typeof index !== 'number' || !Number.isInteger(index) || index < 0)
|
|
1581
|
+
return null;
|
|
1582
|
+
return { tabId: typeof tabId === 'string' ? tabId : null, index };
|
|
1583
|
+
};
|
|
1322
1584
|
/**
|
|
1323
1585
|
* Tab-group component. Supports basic tab pairs (label + content) and includes keyboard navigation.
|
|
1324
1586
|
*/
|
|
1325
1587
|
class KbqTabGroup {
|
|
1588
|
+
/** The tabs of the group. */
|
|
1589
|
+
get tabs() {
|
|
1590
|
+
return this.tabsList();
|
|
1591
|
+
}
|
|
1326
1592
|
/** The index of the active tab. */
|
|
1327
|
-
// TODO: Skipped for migration because:
|
|
1328
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1329
1593
|
get selectedIndex() {
|
|
1330
|
-
return this.
|
|
1594
|
+
return this.selectedIndexState();
|
|
1331
1595
|
}
|
|
1332
1596
|
set selectedIndex(value) {
|
|
1333
1597
|
this.activeTab = value;
|
|
1334
1598
|
}
|
|
1335
|
-
// TODO: Skipped for migration because:
|
|
1336
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1337
1599
|
get activeTab() {
|
|
1338
1600
|
switch (typeof this.attributeToSelectBy) {
|
|
1339
1601
|
case 'number':
|
|
@@ -1348,38 +1610,50 @@ class KbqTabGroup {
|
|
|
1348
1610
|
case 'function':
|
|
1349
1611
|
return this.attributeToSelectBy(this.tabs.toArray());
|
|
1350
1612
|
default:
|
|
1351
|
-
return this.
|
|
1613
|
+
return this.getDefaultTab();
|
|
1352
1614
|
}
|
|
1353
1615
|
}
|
|
1354
1616
|
set activeTab(value) {
|
|
1617
|
+
// `selectedIndex` assigns through here too, so this one flag covers both inputs.
|
|
1618
|
+
this.attributeWritten = true;
|
|
1355
1619
|
this.attributeToSelectBy = value;
|
|
1356
1620
|
}
|
|
1357
|
-
// TODO: Skipped for migration because:
|
|
1358
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1359
|
-
get disabled() {
|
|
1360
|
-
return this._disabled;
|
|
1361
|
-
}
|
|
1362
|
-
set disabled(value) {
|
|
1363
|
-
if (value !== this.disabled) {
|
|
1364
|
-
this._disabled = value;
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
1621
|
constructor() {
|
|
1368
1622
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
1369
|
-
this.
|
|
1623
|
+
this.destroyRef = inject(DestroyRef);
|
|
1624
|
+
this.resizeObserver = inject(SharedResizeObserver);
|
|
1625
|
+
this.platform = inject(Platform);
|
|
1626
|
+
/**
|
|
1627
|
+
* Persistence of the selected tab, applied as a host directive. `useStateSaving` and `stateSavingKey`
|
|
1628
|
+
* are its inputs, forwarded onto the tab group.
|
|
1629
|
+
*/
|
|
1630
|
+
this.stateSaving = inject(KbqStateSaving);
|
|
1631
|
+
this.tabsQuery = contentChildren(KbqTab, ...(ngDevMode ? [{ debugName: "tabsQuery" }] : /* istanbul ignore next */ []));
|
|
1632
|
+
this.tabsList = kbqQueryListFrom(this.tabsQuery);
|
|
1370
1633
|
this.tabBodyWrapper = viewChild.required('tabBodyWrapper');
|
|
1371
1634
|
this.tabHeader = viewChild.required('tabHeader');
|
|
1372
|
-
|
|
1373
|
-
this.
|
|
1374
|
-
|
|
1375
|
-
this.
|
|
1635
|
+
/** Whether the tab strip background should be transparent. */
|
|
1636
|
+
this.transparent = input(false, { ...(ngDevMode ? { debugName: "transparent" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1637
|
+
/** Whether the group is rendered on a surface rather than on the page background. */
|
|
1638
|
+
this.onSurface = input(false, { ...(ngDevMode ? { debugName: "onSurface" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1639
|
+
/** Whether the selected tab is marked with an underline instead of a filled background. */
|
|
1640
|
+
this.underlined = input(false, { ...(ngDevMode ? { debugName: "underlined" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1641
|
+
/** Whether the tab strip is laid out vertically, alongside the content instead of above it. */
|
|
1642
|
+
this.vertical = input(false, { ...(ngDevMode ? { debugName: "vertical" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1376
1643
|
/** Whether the tab group should grow to the size of the active tab. */
|
|
1377
|
-
this.dynamicHeight = input(false, ...(ngDevMode ?
|
|
1644
|
+
this.dynamicHeight = input(false, { ...(ngDevMode ? { debugName: "dynamicHeight" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1645
|
+
/** @docs-private */
|
|
1646
|
+
this.selectedIndexInput = input(undefined, { ...(ngDevMode ? { debugName: "selectedIndexInput" } : /* istanbul ignore next */ {}), alias: 'selectedIndex',
|
|
1647
|
+
transform: kbqOptionalNumberAttribute });
|
|
1648
|
+
/** @docs-private */
|
|
1649
|
+
this.activeTabInput = input(undefined, { ...(ngDevMode ? { debugName: "activeTabInput" } : /* istanbul ignore next */ {}), alias: 'activeTab' });
|
|
1650
|
+
/** @docs-private */
|
|
1651
|
+
this.headerPositionInput = input(undefined, { ...(ngDevMode ? { debugName: "headerPositionInput" } : /* istanbul ignore next */ {}), alias: 'headerPosition' });
|
|
1652
|
+
/** @docs-private */
|
|
1653
|
+
this.animationDurationInput = input(undefined, { ...(ngDevMode ? { debugName: "animationDurationInput" } : /* istanbul ignore next */ {}), alias: 'animationDuration' });
|
|
1654
|
+
this.selectedIndexState = signal(undefined, ...(ngDevMode ? [{ debugName: "selectedIndexState" }] : /* istanbul ignore next */ []));
|
|
1378
1655
|
/** Position of the tab header. */
|
|
1379
|
-
// TODO: Skipped for migration because:
|
|
1380
|
-
// Your application code writes to the input. This prevents migration.
|
|
1381
1656
|
this.headerPosition = 'above';
|
|
1382
|
-
this._disabled = false;
|
|
1383
1657
|
/** Output to enable support for two-way binding on `[(selectedIndex)]` */
|
|
1384
1658
|
this.selectedIndexChange = output();
|
|
1385
1659
|
/** Event emitted when the tab selection has changed. */
|
|
@@ -1391,45 +1665,76 @@ class KbqTabGroup {
|
|
|
1391
1665
|
/** Event emitted when the tab selection has changed. */
|
|
1392
1666
|
this.selectedTabChange = output();
|
|
1393
1667
|
this.attributeToSelectBy = null;
|
|
1668
|
+
/**
|
|
1669
|
+
* Whether anything has assigned `activeTab` or `selectedIndex`. Snapshotted while initializing, where
|
|
1670
|
+
* only an input binding can have done so, and read from then on as "the application drives the
|
|
1671
|
+
* selection" — which suppresses persistence.
|
|
1672
|
+
*/
|
|
1673
|
+
this.attributeWritten = false;
|
|
1674
|
+
this.controlled = false;
|
|
1675
|
+
/** Whether the dev-mode warning about a tab with no `tabId` has already been logged. */
|
|
1676
|
+
this.warnedAboutTabId = false;
|
|
1394
1677
|
/** Snapshot of the height of the tab body wrapper before another tab is activated. */
|
|
1395
1678
|
this.tabBodyWrapperHeight = 0;
|
|
1396
1679
|
/** Subscription to tabs being added/removed. */
|
|
1397
1680
|
this.tabsSubscription = Subscription.EMPTY;
|
|
1398
1681
|
/** Subscription to changes in the tab labels. */
|
|
1399
1682
|
this.tabLabelSubscription = Subscription.EMPTY;
|
|
1400
|
-
this.
|
|
1401
|
-
this.resizeDebounceInterval = 100;
|
|
1402
|
-
this.checkOverflow = () => {
|
|
1403
|
-
this.tabHeader().items.forEach((headerTab) => headerTab.checkOverflow());
|
|
1404
|
-
};
|
|
1405
|
-
const defaultConfig = inject(KBQ_TABS_CONFIG, { optional: true });
|
|
1683
|
+
this.defaultAnimationDuration = inject(KBQ_TABS_CONFIG, { optional: true })?.animationDuration || '0ms';
|
|
1406
1684
|
this.groupId = nextId++;
|
|
1407
|
-
this.animationDuration =
|
|
1408
|
-
|
|
1685
|
+
this.animationDuration = this.defaultAnimationDuration;
|
|
1686
|
+
// The state lives under the new key now, so restore from it.
|
|
1687
|
+
this.stateSaving.keyChanges.subscribe(() => this.applySavedState());
|
|
1688
|
+
// `checkOverflow` writes `tab.overflowTooltipTitle`, which the same view reads through
|
|
1689
|
+
// `[kbqTooltipDisabled]`. Deferring it past the render keeps the write out of the checked cycle.
|
|
1690
|
+
afterNextRender(() => {
|
|
1691
|
+
this.checkOverflow();
|
|
1692
|
+
this.changeDetectorRef.markForCheck();
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
ngOnChanges(changes) {
|
|
1696
|
+
// A bound input is handed to its member, except that `undefined` resets a member
|
|
1697
|
+
// typed without it to its default; unbound, it leaves what code wrote.
|
|
1698
|
+
// Assigned through `activeTab`, because the `selectedIndex` setter takes no `null` — the default, which selects
|
|
1699
|
+
// the first enabled tab.
|
|
1700
|
+
if (changes['selectedIndexInput'])
|
|
1701
|
+
this.activeTab = this.selectedIndexInput() ?? null;
|
|
1702
|
+
// A bound `undefined` is handed over too: binding `activeTab` at all lets the application drive the
|
|
1703
|
+
// selection, which turns the state saving off.
|
|
1704
|
+
if (changes['activeTabInput']) {
|
|
1705
|
+
this.activeTab = this.activeTabInput() ?? null;
|
|
1706
|
+
}
|
|
1707
|
+
if (changes['headerPositionInput']) {
|
|
1708
|
+
this.headerPosition = this.headerPositionInput() ?? 'above';
|
|
1709
|
+
}
|
|
1710
|
+
if (changes['animationDurationInput']) {
|
|
1711
|
+
this.animationDuration = this.animationDurationInput() ?? this.defaultAnimationDuration;
|
|
1712
|
+
}
|
|
1409
1713
|
}
|
|
1410
1714
|
ngAfterContentInit() {
|
|
1411
1715
|
this.subscribeToTabLabels();
|
|
1716
|
+
this.restoreState();
|
|
1412
1717
|
// Subscribe to changes in the amount of tabs, in order to be
|
|
1413
1718
|
// able to re-render the content as new tabs are added or removed.
|
|
1414
1719
|
this.tabsSubscription = this.tabs.changes.subscribe(() => {
|
|
1415
|
-
// const indexToSelect = this.clampTabIndex(this.indexToSelect);
|
|
1416
1720
|
const indexToSelect = this.getTabIndexToSelect();
|
|
1417
1721
|
// Maintain the previously-selected tab if a new tab is added or removed and there is no
|
|
1418
1722
|
// explicit change that selects a different tab.
|
|
1419
|
-
if (indexToSelect === this.
|
|
1723
|
+
if (indexToSelect === this.selectedIndexState()) {
|
|
1420
1724
|
const tabs = this.tabs.toArray();
|
|
1421
1725
|
for (let i = 0; i < tabs.length; i++) {
|
|
1422
1726
|
if (tabs[i].isActive) {
|
|
1423
|
-
// Assign both to the `activeTab` and
|
|
1727
|
+
// Assign both to the `activeTab` and the selected index so we don't fire a changed
|
|
1424
1728
|
// event, otherwise the consumer may end up in an infinite loop in some edge cases like
|
|
1425
1729
|
// adding a tab within the `selectedIndexChange` event.
|
|
1426
|
-
this.
|
|
1730
|
+
this.selectedIndexState.set(i);
|
|
1427
1731
|
this.onSelectFocusedIndex(i);
|
|
1428
1732
|
break;
|
|
1429
1733
|
}
|
|
1430
1734
|
}
|
|
1431
1735
|
}
|
|
1432
1736
|
this.subscribeToTabLabels();
|
|
1737
|
+
// Also marks the ancestors, whose check runs `ngAfterContentChecked` and positions the tabs.
|
|
1433
1738
|
this.changeDetectorRef.markForCheck();
|
|
1434
1739
|
});
|
|
1435
1740
|
}
|
|
@@ -1440,13 +1745,16 @@ class KbqTabGroup {
|
|
|
1440
1745
|
* a new selected tab should transition in (from the left or right).
|
|
1441
1746
|
*/
|
|
1442
1747
|
ngAfterContentChecked() {
|
|
1748
|
+
// Brings `tabs` up to date first, so that its `changes` subscribers, which keep the selected tab when tabs are
|
|
1749
|
+
// added or removed, run before the selection is computed.
|
|
1750
|
+
this.tabsList();
|
|
1443
1751
|
// Don't clamp the `indexToSelect` immediately in the setter because it can happen that
|
|
1444
1752
|
// the amount of tabs changes before the actual change detection runs.
|
|
1445
1753
|
const indexToSelect = this.getTabIndexToSelect();
|
|
1446
1754
|
// If there is a change in selected index, emit a change event. Should not trigger if
|
|
1447
1755
|
// the selected index has not yet been initialized.
|
|
1448
|
-
if (this.
|
|
1449
|
-
const isFirstRun = this.
|
|
1756
|
+
if (this.selectedIndexState() !== indexToSelect) {
|
|
1757
|
+
const isFirstRun = this.selectedIndexState() == null;
|
|
1450
1758
|
if (!isFirstRun) {
|
|
1451
1759
|
this.selectedTabChange.emit(this.createChangeEvent(indexToSelect));
|
|
1452
1760
|
}
|
|
@@ -1463,27 +1771,36 @@ class KbqTabGroup {
|
|
|
1463
1771
|
}
|
|
1464
1772
|
});
|
|
1465
1773
|
}
|
|
1774
|
+
const selectedIndex = this.selectedIndexState();
|
|
1466
1775
|
// Setup the position for each tab and optionally setup an origin on the next selected tab.
|
|
1467
1776
|
this.tabs.forEach((tab, index) => {
|
|
1468
1777
|
tab.position = index - indexToSelect;
|
|
1469
1778
|
// If there is already a selected tab, then set up an origin for the next selected tab
|
|
1470
1779
|
// if it doesn't have one already.
|
|
1471
|
-
if (
|
|
1472
|
-
tab.origin = indexToSelect -
|
|
1780
|
+
if (selectedIndex != null && tab.position === 0 && !tab.origin) {
|
|
1781
|
+
tab.origin = indexToSelect - selectedIndex;
|
|
1473
1782
|
}
|
|
1474
1783
|
});
|
|
1475
|
-
|
|
1476
|
-
this._selectedIndex = indexToSelect;
|
|
1477
|
-
this.changeDetectorRef.markForCheck();
|
|
1478
|
-
}
|
|
1784
|
+
this.selectedIndexState.set(indexToSelect);
|
|
1479
1785
|
}
|
|
1480
1786
|
ngAfterViewInit() {
|
|
1481
|
-
this.
|
|
1787
|
+
if (!this.platform.isBrowser)
|
|
1788
|
+
return;
|
|
1789
|
+
// An element observer also catches container resizes, which no window resize event reports.
|
|
1790
|
+
this.resizeObserver
|
|
1791
|
+
.observe(this.tabHeader().elementRef.nativeElement)
|
|
1792
|
+
.pipe(debounceTime(RESIZE_DEBOUNCE_INTERVAL), takeUntilDestroyed(this.destroyRef))
|
|
1793
|
+
.subscribe(() => {
|
|
1794
|
+
// Read the current value: only vertical labels are truncated, and `vertical` can change.
|
|
1795
|
+
if (!this.vertical())
|
|
1796
|
+
return;
|
|
1797
|
+
this.checkOverflow();
|
|
1798
|
+
this.changeDetectorRef.markForCheck();
|
|
1799
|
+
});
|
|
1482
1800
|
}
|
|
1483
1801
|
ngOnDestroy() {
|
|
1484
1802
|
this.tabsSubscription.unsubscribe();
|
|
1485
1803
|
this.tabLabelSubscription.unsubscribe();
|
|
1486
|
-
this.resizeSubscription.unsubscribe();
|
|
1487
1804
|
}
|
|
1488
1805
|
focusChanged(index) {
|
|
1489
1806
|
this.focusChange.emit(this.createChangeEvent(index));
|
|
@@ -1516,30 +1833,122 @@ class KbqTabGroup {
|
|
|
1516
1833
|
removeTabBodyWrapperHeight() {
|
|
1517
1834
|
this.tabBodyWrapperHeight = this.tabBodyWrapper().nativeElement.clientHeight;
|
|
1518
1835
|
this.tabBodyWrapper().nativeElement.style.height = '';
|
|
1519
|
-
// TODO: The 'emit' function requires a mandatory void argument
|
|
1520
1836
|
this.animationDone.emit();
|
|
1521
1837
|
}
|
|
1522
1838
|
/** Handle click events, setting new selected index if appropriate. */
|
|
1523
1839
|
handleClick(tab, tabHeader, index) {
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1840
|
+
// Untracked, as `onSelectFocusedIndex()`, `saveState()` and `clearSavedState()`: called from a consumer's
|
|
1841
|
+
// `effect()`, the state read on the way — the tabs and their inputs, the selection, the state saving inputs —
|
|
1842
|
+
// would make the effect run again whenever it changes.
|
|
1843
|
+
untracked(() => {
|
|
1844
|
+
if (tab.disabled) {
|
|
1845
|
+
return;
|
|
1846
|
+
}
|
|
1847
|
+
this.onSelectFocusedIndex(index);
|
|
1848
|
+
tabHeader.focusIndex = index;
|
|
1849
|
+
});
|
|
1529
1850
|
}
|
|
1530
|
-
/**
|
|
1531
|
-
|
|
1851
|
+
/**
|
|
1852
|
+
* Retrieves the tabindex for the tab. The single `0` follows the header's focus position rather
|
|
1853
|
+
* than the selection, so that a disabled selected tab cannot take the whole strip out of the tab
|
|
1854
|
+
* order — a disabled tab is `-1`, never absent, so it stays a roving-tabindex participant.
|
|
1855
|
+
*/
|
|
1856
|
+
getTabIndex(tab, tabHeader, index) {
|
|
1532
1857
|
if (tab.disabled) {
|
|
1533
|
-
return
|
|
1858
|
+
return -1;
|
|
1534
1859
|
}
|
|
1535
|
-
return this.
|
|
1860
|
+
return this.getRovingTabIndex(tabHeader) === index ? 0 : -1;
|
|
1536
1861
|
}
|
|
1537
1862
|
onSelectFocusedIndex($event) {
|
|
1538
|
-
|
|
1539
|
-
this.
|
|
1863
|
+
untracked(() => {
|
|
1864
|
+
if (typeof this.attributeToSelectBy === 'string') {
|
|
1865
|
+
this.activeTab = this.tabs.get($event)?.tabId() || null;
|
|
1866
|
+
}
|
|
1867
|
+
else {
|
|
1868
|
+
this.activeTab = $event;
|
|
1869
|
+
}
|
|
1870
|
+
this.saveState();
|
|
1871
|
+
});
|
|
1872
|
+
}
|
|
1873
|
+
/**
|
|
1874
|
+
* Persists which tab is selected.
|
|
1875
|
+
*
|
|
1876
|
+
* Called for every selection a user makes. Both the tab's `tabId` and its position are stored: the
|
|
1877
|
+
* `tabId` is the only one that survives the tabs being reordered, and the position is all there is
|
|
1878
|
+
* when the tabs carry none.
|
|
1879
|
+
*/
|
|
1880
|
+
saveState() {
|
|
1881
|
+
untracked(() => {
|
|
1882
|
+
if (!this.persists)
|
|
1883
|
+
return;
|
|
1884
|
+
this.stateSaving.write(this.snapshot());
|
|
1885
|
+
});
|
|
1886
|
+
}
|
|
1887
|
+
/**
|
|
1888
|
+
* Removes the state persisted for this tab group.
|
|
1889
|
+
*
|
|
1890
|
+
* Persistence itself stays on — the next selection is written again. Unset `useStateSaving` to stop
|
|
1891
|
+
* it.
|
|
1892
|
+
*/
|
|
1893
|
+
clearSavedState() {
|
|
1894
|
+
untracked(() => this.stateSaving.clear());
|
|
1895
|
+
}
|
|
1896
|
+
/**
|
|
1897
|
+
* Whether state is currently persisted for this tab group — restored on init, or written since.
|
|
1898
|
+
* Always `false` while `useStateSaving` is unset, and `false` again after `clearSavedState()`.
|
|
1899
|
+
*/
|
|
1900
|
+
get hasSavedState() {
|
|
1901
|
+
return this.stateSaving.state != null;
|
|
1902
|
+
}
|
|
1903
|
+
/** Whether this tab group reads and writes its selection at all. */
|
|
1904
|
+
get persists() {
|
|
1905
|
+
// A group that is not in the document has no stable key — the default resolver derives one from
|
|
1906
|
+
// the path to `<body>` — which is the ordinary state of one projected into an overlay.
|
|
1907
|
+
return this.stateSaving.useStateSaving() && !this.controlled && !!this.stateSaving.host?.isConnected;
|
|
1908
|
+
}
|
|
1909
|
+
/** Restores the persisted selection, unless the application drives it. */
|
|
1910
|
+
restoreState() {
|
|
1911
|
+
// Only an input binding can have assigned by now: `activeTab` needs a view query to reach, and a
|
|
1912
|
+
// click needs a rendered header. Snapshotted here rather than in `applySavedState()`, which runs
|
|
1913
|
+
// again after a key change — by then a click has assigned too, and would read as an application.
|
|
1914
|
+
this.controlled = this.attributeWritten;
|
|
1915
|
+
this.applySavedState();
|
|
1916
|
+
}
|
|
1917
|
+
/** Reads the persisted selection and applies it. Runs while initializing, and again on a key change. */
|
|
1918
|
+
applySavedState() {
|
|
1919
|
+
if (!this.persists)
|
|
1540
1920
|
return;
|
|
1541
|
-
|
|
1542
|
-
|
|
1921
|
+
const savedState = this.stateSaving.read(normalizeTabsState);
|
|
1922
|
+
if (!savedState)
|
|
1923
|
+
return;
|
|
1924
|
+
const tabs = this.tabs.toArray();
|
|
1925
|
+
const byId = savedState.tabId === null ? -1 : tabs.findIndex((tab) => tab.tabId() === savedState.tabId);
|
|
1926
|
+
// The id wins wherever it still names a tab, so a reordering does not select the wrong one. Its
|
|
1927
|
+
// position is the fallback, and a payload naming neither is dropped rather than clamped — the
|
|
1928
|
+
// group then keeps whatever it would have selected on its own.
|
|
1929
|
+
if (byId < 0 && savedState.index >= tabs.length)
|
|
1930
|
+
return;
|
|
1931
|
+
this.stateSaving.applying(() => {
|
|
1932
|
+
this.activeTab = byId < 0 ? savedState.index : savedState.tabId;
|
|
1933
|
+
});
|
|
1934
|
+
}
|
|
1935
|
+
/** The whole selection, by id and by position. */
|
|
1936
|
+
snapshot() {
|
|
1937
|
+
const tabs = this.tabs?.toArray() ?? [];
|
|
1938
|
+
const active = this.activeTab;
|
|
1939
|
+
const index = active ? tabs.indexOf(active) : -1;
|
|
1940
|
+
const tabId = active?.tabId() || null;
|
|
1941
|
+
if (!tabId && isDevMode() && !this.warnedAboutTabId) {
|
|
1942
|
+
this.warnedAboutTabId = true;
|
|
1943
|
+
// eslint-disable-next-line no-console
|
|
1944
|
+
console.warn('kbq-tab-group: the selected tab has no `tabId`, so the selection is persisted by ' +
|
|
1945
|
+
'position. A position survives a reload but not a reordering, and then restores the ' +
|
|
1946
|
+
'wrong tab. Give the tabs a `tabId`, or unset `useStateSaving`.');
|
|
1947
|
+
}
|
|
1948
|
+
return { tabId, index: index < 0 ? 0 : index };
|
|
1949
|
+
}
|
|
1950
|
+
checkOverflow() {
|
|
1951
|
+
this.tabHeader().items.forEach((headerTab) => headerTab.checkOverflow());
|
|
1543
1952
|
}
|
|
1544
1953
|
createChangeEvent(index) {
|
|
1545
1954
|
const event = new KbqTabChangeEvent();
|
|
@@ -1550,7 +1959,7 @@ class KbqTabGroup {
|
|
|
1550
1959
|
return event;
|
|
1551
1960
|
}
|
|
1552
1961
|
/**
|
|
1553
|
-
* Subscribes to changes in the tab labels. This is needed, because the
|
|
1962
|
+
* Subscribes to changes in the tab labels. This is needed, because the `@Input` for the label is
|
|
1554
1963
|
* on the KbqTab component, whereas the data binding is inside the KbqTabGroup. In order for the
|
|
1555
1964
|
* binding to be updated, we need to subscribe to changes in it and trigger change detection
|
|
1556
1965
|
* manually.
|
|
@@ -1561,16 +1970,29 @@ class KbqTabGroup {
|
|
|
1561
1970
|
}
|
|
1562
1971
|
this.tabLabelSubscription = merge(...this.tabs.map((tab) => tab.stateChanges)).subscribe(() => this.changeDetectorRef.markForCheck());
|
|
1563
1972
|
}
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1973
|
+
/**
|
|
1974
|
+
* Index that owns `tabindex="0"`, falling back to the first enabled tab when focus sits on a
|
|
1975
|
+
* disabled one.
|
|
1976
|
+
*
|
|
1977
|
+
* The template calls this once per tab, so the common path stays allocation-free: `QueryList.get`
|
|
1978
|
+
* indexes the backing array, where `toArray()` would copy it N times per check.
|
|
1979
|
+
*/
|
|
1980
|
+
getRovingTabIndex(tabHeader) {
|
|
1981
|
+
const { focusIndex } = tabHeader;
|
|
1982
|
+
const focused = this.tabs.get(focusIndex);
|
|
1983
|
+
if (focused && !focused.disabled) {
|
|
1984
|
+
return focusIndex;
|
|
1985
|
+
}
|
|
1986
|
+
for (let index = 0; index < this.tabs.length; index++) {
|
|
1987
|
+
if (!this.tabs.get(index).disabled) {
|
|
1988
|
+
return index;
|
|
1989
|
+
}
|
|
1570
1990
|
}
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1991
|
+
return -1;
|
|
1992
|
+
}
|
|
1993
|
+
/** First tab that can actually be selected, so that a leading disabled tab is not the default. */
|
|
1994
|
+
getDefaultTab() {
|
|
1995
|
+
return this.tabs.find((tab) => !tab.disabled) || this.tabs.get(0) || null;
|
|
1574
1996
|
}
|
|
1575
1997
|
/** Clamps the given index to the bounds of 0 and the tabs length. */
|
|
1576
1998
|
clampTabIndex(index) {
|
|
@@ -1584,39 +2006,26 @@ class KbqTabGroup {
|
|
|
1584
2006
|
if (currentSelectedTab === null) {
|
|
1585
2007
|
return 0;
|
|
1586
2008
|
}
|
|
1587
|
-
return this.tabs
|
|
2009
|
+
return this.tabs ? this.tabs.toArray().indexOf(currentSelectedTab) : 0;
|
|
1588
2010
|
}
|
|
1589
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1590
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqTabGroup, isStandalone: true, selector: "kbq-tab-group", inputs: { transparent: { classPropertyName: "transparent", publicName: "transparent", isSignal: true, isRequired: false, transformFunction: null }, onSurface: { classPropertyName: "onSurface", publicName: "onSurface", isSignal: true, isRequired: false, transformFunction: null }, underlined: { classPropertyName: "underlined", publicName: "underlined", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null }, dynamicHeight: { classPropertyName: "dynamicHeight", publicName: "dynamicHeight", isSignal: true, isRequired: false, transformFunction: null }, selectedIndex: { classPropertyName: "selectedIndex", publicName: "selectedIndex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, activeTab: { classPropertyName: "activeTab", publicName: "activeTab", isSignal: false, isRequired: false, transformFunction: null }, headerPosition: { classPropertyName: "headerPosition", publicName: "headerPosition", isSignal: false, isRequired: false, transformFunction: null }, animationDuration: { classPropertyName: "animationDuration", publicName: "animationDuration", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute } }, outputs: { selectedIndexChange: "selectedIndexChange", activeTabChange: "activeTabChange", focusChange: "focusChange", animationDone: "animationDone", selectedTabChange: "selectedTabChange" }, host: { listeners: { "window:resize": "resizeStream.next($event)" }, properties: { "class.kbq-tab-group_filled": "!transparent()", "class.kbq-tab-group_transparent": "transparent()", "class.kbq-tab-group_on-background": "!onSurface()", "class.kbq-tab-group_on-surface": "onSurface()", "class.kbq-tab-group_dynamic-height": "dynamicHeight()", "class.kbq-tab-group_inverted-header": "headerPosition === \"below\"" }, classAttribute: "kbq-tab-group" }, providers: [{ provide: KBQ_PARENT_ANIMATION_COMPONENT, useExisting: forwardRef((() => this)) }], queries: [{ propertyName: "tabs", predicate: KbqTab }], viewQueries: [{ propertyName: "tabBodyWrapper", first: true, predicate: ["tabBodyWrapper"], descendants: true, isSignal: true }, { propertyName: "tabHeader", first: true, predicate: ["tabHeader"], descendants: true, isSignal: true }], exportAs: ["kbqTabGroup"], ngImport: i0, template: "<kbq-tab-header\n #tabHeader\n [selectedIndex]=\"selectedIndex\"\n [underlined]=\"underlined()\"\n [vertical]=\"vertical()\"\n (indexFocused)=\"focusChanged($event)\"\n (selectFocusedIndex)=\"onSelectFocusedIndex($event)\"\n>\n @for (tab of tabs; track tab) {\n <div\n cdkMonitorElementFocus\n kbqTabLabelWrapper\n class=\"kbq-tab-label\"\n [attr.tabindex]=\"getTabIndex(tab, $index)\"\n [class.kbq-selected]=\"selectedIndex === $index\"\n [class.kbq-tab-label_empty]=\"tab.empty()\"\n [class.kbq-tab-label_horizontal]=\"!vertical()\"\n [class.kbq-tab-label_underlined]=\"underlined()\"\n [class.kbq-tab-label_vertical]=\"vertical()\"\n [class.kbq-tab-label_icon-only]=\"tab.iconOnlyLabel\"\n [disabled]=\"tab.disabled\"\n [id]=\"getTabLabelId($index)\"\n [kbqPlacement]=\"tab.tooltipPlacement()\"\n [kbqTooltip]=\"tab.tooltipTitle\"\n [kbqTooltipDisabled]=\"!tab.empty() && !tab.isOverflown\"\n [kbqTrigger]=\"'hover, focus'\"\n [tab]=\"tab\"\n (click)=\"handleClick(tab, tabHeader, $index)\"\n >\n <div #labelContent class=\"kbq-tab-label__content\" [class.kbq-tab-label__template]=\"tab.templateLabel\">\n <!-- If there is a label template, use it. -->\n @if (tab.templateLabel) {\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\" />\n }\n <!-- If there is not a label template, fall back to the text label. -->\n @else {\n {{ tab.textLabel() }}\n }\n </div>\n </div>\n }\n</kbq-tab-header>\n\n<div #tabBodyWrapper class=\"kbq-tab-body__wrapper\">\n @for (tab of tabs; track tab) {\n <kbq-tab-body\n [animationDuration]=\"animationDuration\"\n [class.kbq-tab-body__active]=\"selectedIndex === $index\"\n [content]=\"tab.content!\"\n [id]=\"getTabContentId($index)\"\n [origin]=\"tab.origin!\"\n [position]=\"tab.position!\"\n (onCentered)=\"removeTabBodyWrapperHeight()\"\n (onCentering)=\"setTabBodyWrapperHeight($event)\"\n />\n }\n</div>\n", styles: [".kbq-tab-group{display:flex;flex-direction:column;box-sizing:border-box;text-align:left}.kbq-tab-group.kbq-tab-group_inverted-header{flex-direction:column-reverse}.kbq-tab-group.kbq-tab-group_vertical{flex-direction:row}.kbq-tab-group.kbq-tab-group_vertical .kbq-tab-list__content{gap:var(--kbq-tabs-size-tab-stack-vertical-content-gap-vertical) 0}.kbq-tab-group .kbq-tab-body__wrapper{display:flex;overflow:hidden;position:relative}.kbq-tab-group .kbq-tab-body{inset:0;position:absolute;display:block;overflow:hidden}.kbq-tab-group .kbq-tab-body.kbq-tab-body__active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.kbq-tab-group.kbq-tab-group_dynamic-height .kbq-tab-group .kbq-tab-body.kbq-tab-body__active{overflow-y:hidden}\n", ".kbq-tab-group,.kbq-tab-nav-bar{--kbq-tabs-size-tab-item-padding-horizontal: var(--kbq-size-m);--kbq-tabs-size-tab-item-padding-vertical: var(--kbq-size-xs);--kbq-tabs-size-tab-item-content-gap-horizontal: var(--kbq-size-xxs);--kbq-tabs-size-tab-item-border-radius: var(--kbq-size-s);--kbq-tabs-size-tab-item-focus-outline-width: var(--kbq-size-3xs);--kbq-tabs-size-tab-stack-horizontal-border-radius: var(--kbq-size-border-radius);--kbq-tabs-size-tab-stack-vertical-content-gap-vertical: var(--kbq-size-s);--kbq-tabs-size-tab-item-underlined-icon-only-size: calc(var(--kbq-size-3xl) - var(--kbq-size-xxs));--kbq-tabs-tab-item-filled-on-background-default-background: transparent;--kbq-tabs-tab-item-filled-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-background-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-background-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-default-background: transparent;--kbq-tabs-tab-item-filled-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-surface-states-selected-background: var(--kbq-states-background-transparent-active);--kbq-tabs-tab-item-filled-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-default-background: transparent;--kbq-tabs-tab-item-transparent-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-background-states-hover-background: var( --kbq-states-background-transparent-hover );--kbq-tabs-tab-item-transparent-on-background-states-focused-focus-outline-color: var( --kbq-states-line-focus-theme );--kbq-tabs-tab-item-transparent-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-default-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-transparent-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-transparent-on-surface-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-stack-filled-on-background-background: var(--kbq-background-bg);--kbq-tabs-tab-stack-filled-on-surface-background: var(--kbq-background-contrast-fade);--kbq-tabs-tab-stack-transparent-on-background-background: transparent;--kbq-tabs-tab-stack-transparent-on-surface-background: transparent}\n"], dependencies: [{ kind: "component", type: KbqTabHeader, selector: "kbq-tab-header", inputs: ["underlined"], outputs: ["selectFocusedIndex", "indexFocused"] }, { kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: KbqTabLabelWrapper, selector: "[kbqTabLabelWrapper]", inputs: ["tab", "disabled"] }, { kind: "directive", type: KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["kbqTooltipScrollStrategy", "forDisabledComponent", "ignoreTooltipPointerEvents", "kbqTooltipSingleInstance", "hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset", "kbqTooltipModifier", "kbqTooltipHeader"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }, { kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: KbqTabBody, selector: "kbq-tab-body", inputs: ["position", "content", "origin", "animationDuration"], outputs: ["onCentering", "beforeCentering", "afterLeavingCenter", "onCentered"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2011
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2012
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: KbqTabGroup, isStandalone: true, selector: "kbq-tab-group", inputs: { transparent: { classPropertyName: "transparent", publicName: "transparent", isSignal: true, isRequired: false, transformFunction: null }, onSurface: { classPropertyName: "onSurface", publicName: "onSurface", isSignal: true, isRequired: false, transformFunction: null }, underlined: { classPropertyName: "underlined", publicName: "underlined", isSignal: true, isRequired: false, transformFunction: null }, vertical: { classPropertyName: "vertical", publicName: "vertical", isSignal: true, isRequired: false, transformFunction: null }, dynamicHeight: { classPropertyName: "dynamicHeight", publicName: "dynamicHeight", isSignal: true, isRequired: false, transformFunction: null }, selectedIndexInput: { classPropertyName: "selectedIndexInput", publicName: "selectedIndex", isSignal: true, isRequired: false, transformFunction: null }, activeTabInput: { classPropertyName: "activeTabInput", publicName: "activeTab", isSignal: true, isRequired: false, transformFunction: null }, headerPositionInput: { classPropertyName: "headerPositionInput", publicName: "headerPosition", isSignal: true, isRequired: false, transformFunction: null }, animationDurationInput: { classPropertyName: "animationDurationInput", publicName: "animationDuration", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedIndexChange: "selectedIndexChange", activeTabChange: "activeTabChange", focusChange: "focusChange", animationDone: "animationDone", selectedTabChange: "selectedTabChange" }, host: { properties: { "class.kbq-tab-group_filled": "!transparent()", "class.kbq-tab-group_transparent": "transparent()", "class.kbq-tab-group_on-background": "!onSurface()", "class.kbq-tab-group_on-surface": "onSurface()", "class.kbq-tab-group_dynamic-height": "dynamicHeight()", "class.kbq-tab-group_vertical": "vertical()", "class.kbq-tab-group_inverted-header": "headerPosition === \"below\"" }, classAttribute: "kbq-tab-group" }, providers: [{ provide: KBQ_PARENT_ANIMATION_COMPONENT, useExisting: forwardRef((() => KbqTabGroup)) }], queries: [{ propertyName: "tabsQuery", predicate: KbqTab, isSignal: true }], viewQueries: [{ propertyName: "tabBodyWrapper", first: true, predicate: ["tabBodyWrapper"], descendants: true, isSignal: true }, { propertyName: "tabHeader", first: true, predicate: ["tabHeader"], descendants: true, isSignal: true }], exportAs: ["kbqTabGroup"], usesOnChanges: true, hostDirectives: [{ directive: i1$1.KbqStateSaving, inputs: ["useStateSaving", "useStateSaving", "stateSavingKey", "stateSavingKey"] }], ngImport: i0, template: "<kbq-tab-header\n #tabHeader\n [selectedIndex]=\"selectedIndex\"\n [underlined]=\"underlined()\"\n [vertical]=\"vertical()\"\n (indexFocused)=\"focusChanged($event)\"\n (selectFocusedIndex)=\"onSelectFocusedIndex($event)\"\n>\n @for (tab of tabs; track tab) {\n <div\n cdkMonitorElementFocus\n kbqTabLabelWrapper\n class=\"kbq-tab-label\"\n role=\"tab\"\n [attr.aria-controls]=\"getTabContentId($index)\"\n [attr.aria-selected]=\"selectedIndex === $index\"\n [attr.tabindex]=\"getTabIndex(tab, tabHeader, $index)\"\n [class.kbq-selected]=\"selectedIndex === $index\"\n [class.kbq-tab-label_empty]=\"tab.empty()\"\n [class.kbq-tab-label_horizontal]=\"!vertical()\"\n [class.kbq-tab-label_underlined]=\"underlined()\"\n [class.kbq-tab-label_vertical]=\"vertical()\"\n [class.kbq-tab-label_icon-only]=\"tab.iconOnlyLabel\"\n [disabled]=\"tab.disabled\"\n [id]=\"getTabLabelId($index)\"\n [kbqPlacement]=\"tab.tooltipPlacement()\"\n [kbqTooltip]=\"tab.tooltipTitle\"\n [kbqTooltipDisabled]=\"!tab.empty() && !tab.isOverflown\"\n [kbqTrigger]=\"'hover, focus'\"\n [tab]=\"tab\"\n (click)=\"handleClick(tab, tabHeader, $index)\"\n >\n <div #labelContent class=\"kbq-tab-label__content\" [class.kbq-tab-label__template]=\"tab.templateLabel\">\n <!-- If there is a label template, use it. -->\n @if (tab.templateLabel) {\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\" />\n }\n <!-- If there is not a label template, fall back to the text label. -->\n @else {\n {{ tab.textLabel() }}\n }\n </div>\n </div>\n }\n</kbq-tab-header>\n\n<div #tabBodyWrapper class=\"kbq-tab-body__wrapper\">\n @for (tab of tabs; track tab) {\n <kbq-tab-body\n role=\"tabpanel\"\n [animationDuration]=\"animationDuration\"\n [attr.aria-labelledby]=\"getTabLabelId($index)\"\n [attr.tabindex]=\"selectedIndex === $index ? 0 : null\"\n [class.kbq-tab-body__active]=\"selectedIndex === $index\"\n [content]=\"tab.content!\"\n [id]=\"getTabContentId($index)\"\n [origin]=\"tab.origin!\"\n [position]=\"tab.position!\"\n (onCentered)=\"removeTabBodyWrapperHeight()\"\n (onCentering)=\"setTabBodyWrapperHeight($event)\"\n />\n }\n</div>\n", styles: [".kbq-tab-group{display:flex;flex-direction:column;box-sizing:border-box;text-align:left}.kbq-tab-group.kbq-tab-group_inverted-header{flex-direction:column-reverse}.kbq-tab-group.kbq-tab-group_vertical{flex-direction:row}.kbq-tab-group.kbq-tab-group_vertical .kbq-tab-list__content{gap:var(--kbq-tabs-size-tab-stack-vertical-content-gap-vertical) 0}.kbq-tab-group .kbq-tab-body__wrapper{display:flex;overflow:hidden;position:relative}.kbq-tab-group .kbq-tab-body{inset:0;position:absolute;display:block;overflow:hidden}.kbq-tab-group .kbq-tab-body.kbq-tab-body__active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.kbq-tab-group.kbq-tab-group_dynamic-height .kbq-tab-group .kbq-tab-body.kbq-tab-body__active{overflow-y:hidden}\n", ".kbq-tab-group,.kbq-tab-nav-bar{--kbq-tabs-size-tab-item-padding-horizontal: var(--kbq-size-m);--kbq-tabs-size-tab-item-padding-vertical: var(--kbq-size-xs);--kbq-tabs-size-tab-item-content-gap-horizontal: var(--kbq-size-xxs);--kbq-tabs-size-tab-item-border-radius: var(--kbq-size-s);--kbq-tabs-size-tab-item-focus-outline-width: var(--kbq-size-3xs);--kbq-tabs-size-tab-stack-horizontal-border-radius: var(--kbq-size-border-radius);--kbq-tabs-size-tab-stack-vertical-content-gap-vertical: var(--kbq-size-s);--kbq-tabs-size-tab-item-underlined-icon-only-size: calc(var(--kbq-size-3xl) - var(--kbq-size-xxs));--kbq-tabs-tab-item-filled-on-background-default-background: transparent;--kbq-tabs-tab-item-filled-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-background-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-background-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-default-background: transparent;--kbq-tabs-tab-item-filled-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-surface-states-selected-background: var(--kbq-states-background-transparent-active);--kbq-tabs-tab-item-filled-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-default-background: transparent;--kbq-tabs-tab-item-transparent-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-background-states-hover-background: var( --kbq-states-background-transparent-hover );--kbq-tabs-tab-item-transparent-on-background-states-focused-focus-outline-color: var( --kbq-states-line-focus-theme );--kbq-tabs-tab-item-transparent-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-default-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-transparent-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-transparent-on-surface-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-stack-filled-on-background-background: var(--kbq-background-bg);--kbq-tabs-tab-stack-filled-on-surface-background: var(--kbq-background-contrast-fade);--kbq-tabs-tab-stack-transparent-on-background-background: transparent;--kbq-tabs-tab-stack-transparent-on-surface-background: transparent}\n"], dependencies: [{ kind: "component", type: KbqTabHeader, selector: "kbq-tab-header", inputs: ["underlined"], outputs: ["selectFocusedIndex", "indexFocused"] }, { kind: "directive", type: CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "directive", type: KbqTabLabelWrapper, selector: "[kbqTabLabelWrapper]", inputs: ["tab", "disabled"] }, { kind: "directive", type: KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["kbqTooltipScrollStrategy", "forDisabledComponent", "ignoreTooltipPointerEvents", "kbqTooltipSingleInstance", "kbqTrigger", "hideWithTimeout", "kbqEnterDelay", "kbqLeaveDelay", "kbqRelativeToPointer", "kbqRelativeToCaret", "kbqRelativeToCaretVertical", "kbqTooltip", "kbqTooltipHeader", "kbqTooltipModifier", "kbqTooltipContext", "kbqTooltipClass", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset", "kbqTooltipDisabled", "kbqPlacementPriority", "kbqPlacement", "kbqVisible"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }, { kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: KbqTabBody, selector: "kbq-tab-body", inputs: ["position", "origin", "content", "animationDuration"], outputs: ["onCentering", "beforeCentering", "afterLeavingCenter", "onCentered"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1591
2013
|
}
|
|
1592
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2014
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabGroup, decorators: [{
|
|
1593
2015
|
type: Component,
|
|
1594
|
-
args: [{ selector: 'kbq-tab-group', imports: [KbqTabHeader, CdkMonitorFocus, KbqTabLabelWrapper, KbqTooltipTrigger, CdkPortalOutlet, KbqTabBody], providers: [{ provide: KBQ_PARENT_ANIMATION_COMPONENT, useExisting: forwardRef((() =>
|
|
2016
|
+
args: [{ selector: 'kbq-tab-group', imports: [KbqTabHeader, CdkMonitorFocus, KbqTabLabelWrapper, KbqTooltipTrigger, CdkPortalOutlet, KbqTabBody], providers: [{ provide: KBQ_PARENT_ANIMATION_COMPONENT, useExisting: forwardRef((() => KbqTabGroup)) }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1595
2017
|
class: 'kbq-tab-group',
|
|
1596
2018
|
'[class.kbq-tab-group_filled]': '!transparent()',
|
|
1597
2019
|
'[class.kbq-tab-group_transparent]': 'transparent()',
|
|
1598
2020
|
'[class.kbq-tab-group_on-background]': '!onSurface()',
|
|
1599
2021
|
'[class.kbq-tab-group_on-surface]': 'onSurface()',
|
|
1600
2022
|
'[class.kbq-tab-group_dynamic-height]': 'dynamicHeight()',
|
|
1601
|
-
'[class.kbq-tab-
|
|
1602
|
-
'
|
|
1603
|
-
},
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
}], tabBodyWrapper: [{ type: i0.ViewChild, args: ['tabBodyWrapper', { isSignal: true }] }], tabHeader: [{ type: i0.ViewChild, args: ['tabHeader', { isSignal: true }] }], transparent: [{ type: i0.Input, args: [{ isSignal: true, alias: "transparent", required: false }] }], onSurface: [{ type: i0.Input, args: [{ isSignal: true, alias: "onSurface", required: false }] }], underlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "underlined", required: false }] }], vertical: [{ type: i0.Input, args: [{ isSignal: true, alias: "vertical", required: false }] }], dynamicHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "dynamicHeight", required: false }] }], selectedIndex: [{
|
|
1608
|
-
type: Input,
|
|
1609
|
-
args: [{ transform: numberAttribute }]
|
|
1610
|
-
}], activeTab: [{
|
|
1611
|
-
type: Input
|
|
1612
|
-
}], headerPosition: [{
|
|
1613
|
-
type: Input
|
|
1614
|
-
}], animationDuration: [{
|
|
1615
|
-
type: Input
|
|
1616
|
-
}], disabled: [{
|
|
1617
|
-
type: Input,
|
|
1618
|
-
args: [{ transform: booleanAttribute }]
|
|
1619
|
-
}], selectedIndexChange: [{ type: i0.Output, args: ["selectedIndexChange"] }], activeTabChange: [{ type: i0.Output, args: ["activeTabChange"] }], focusChange: [{ type: i0.Output, args: ["focusChange"] }], animationDone: [{ type: i0.Output, args: ["animationDone"] }], selectedTabChange: [{ type: i0.Output, args: ["selectedTabChange"] }] } });
|
|
2023
|
+
'[class.kbq-tab-group_vertical]': 'vertical()',
|
|
2024
|
+
'[class.kbq-tab-group_inverted-header]': 'headerPosition === "below"'
|
|
2025
|
+
}, hostDirectives: [
|
|
2026
|
+
{ directive: KbqStateSaving, inputs: ['useStateSaving', 'stateSavingKey'] }
|
|
2027
|
+
], exportAs: 'kbqTabGroup', template: "<kbq-tab-header\n #tabHeader\n [selectedIndex]=\"selectedIndex\"\n [underlined]=\"underlined()\"\n [vertical]=\"vertical()\"\n (indexFocused)=\"focusChanged($event)\"\n (selectFocusedIndex)=\"onSelectFocusedIndex($event)\"\n>\n @for (tab of tabs; track tab) {\n <div\n cdkMonitorElementFocus\n kbqTabLabelWrapper\n class=\"kbq-tab-label\"\n role=\"tab\"\n [attr.aria-controls]=\"getTabContentId($index)\"\n [attr.aria-selected]=\"selectedIndex === $index\"\n [attr.tabindex]=\"getTabIndex(tab, tabHeader, $index)\"\n [class.kbq-selected]=\"selectedIndex === $index\"\n [class.kbq-tab-label_empty]=\"tab.empty()\"\n [class.kbq-tab-label_horizontal]=\"!vertical()\"\n [class.kbq-tab-label_underlined]=\"underlined()\"\n [class.kbq-tab-label_vertical]=\"vertical()\"\n [class.kbq-tab-label_icon-only]=\"tab.iconOnlyLabel\"\n [disabled]=\"tab.disabled\"\n [id]=\"getTabLabelId($index)\"\n [kbqPlacement]=\"tab.tooltipPlacement()\"\n [kbqTooltip]=\"tab.tooltipTitle\"\n [kbqTooltipDisabled]=\"!tab.empty() && !tab.isOverflown\"\n [kbqTrigger]=\"'hover, focus'\"\n [tab]=\"tab\"\n (click)=\"handleClick(tab, tabHeader, $index)\"\n >\n <div #labelContent class=\"kbq-tab-label__content\" [class.kbq-tab-label__template]=\"tab.templateLabel\">\n <!-- If there is a label template, use it. -->\n @if (tab.templateLabel) {\n <ng-template [cdkPortalOutlet]=\"tab.templateLabel\" />\n }\n <!-- If there is not a label template, fall back to the text label. -->\n @else {\n {{ tab.textLabel() }}\n }\n </div>\n </div>\n }\n</kbq-tab-header>\n\n<div #tabBodyWrapper class=\"kbq-tab-body__wrapper\">\n @for (tab of tabs; track tab) {\n <kbq-tab-body\n role=\"tabpanel\"\n [animationDuration]=\"animationDuration\"\n [attr.aria-labelledby]=\"getTabLabelId($index)\"\n [attr.tabindex]=\"selectedIndex === $index ? 0 : null\"\n [class.kbq-tab-body__active]=\"selectedIndex === $index\"\n [content]=\"tab.content!\"\n [id]=\"getTabContentId($index)\"\n [origin]=\"tab.origin!\"\n [position]=\"tab.position!\"\n (onCentered)=\"removeTabBodyWrapperHeight()\"\n (onCentering)=\"setTabBodyWrapperHeight($event)\"\n />\n }\n</div>\n", styles: [".kbq-tab-group{display:flex;flex-direction:column;box-sizing:border-box;text-align:left}.kbq-tab-group.kbq-tab-group_inverted-header{flex-direction:column-reverse}.kbq-tab-group.kbq-tab-group_vertical{flex-direction:row}.kbq-tab-group.kbq-tab-group_vertical .kbq-tab-list__content{gap:var(--kbq-tabs-size-tab-stack-vertical-content-gap-vertical) 0}.kbq-tab-group .kbq-tab-body__wrapper{display:flex;overflow:hidden;position:relative}.kbq-tab-group .kbq-tab-body{inset:0;position:absolute;display:block;overflow:hidden}.kbq-tab-group .kbq-tab-body.kbq-tab-body__active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.kbq-tab-group.kbq-tab-group_dynamic-height .kbq-tab-group .kbq-tab-body.kbq-tab-body__active{overflow-y:hidden}\n", ".kbq-tab-group,.kbq-tab-nav-bar{--kbq-tabs-size-tab-item-padding-horizontal: var(--kbq-size-m);--kbq-tabs-size-tab-item-padding-vertical: var(--kbq-size-xs);--kbq-tabs-size-tab-item-content-gap-horizontal: var(--kbq-size-xxs);--kbq-tabs-size-tab-item-border-radius: var(--kbq-size-s);--kbq-tabs-size-tab-item-focus-outline-width: var(--kbq-size-3xs);--kbq-tabs-size-tab-stack-horizontal-border-radius: var(--kbq-size-border-radius);--kbq-tabs-size-tab-stack-vertical-content-gap-vertical: var(--kbq-size-s);--kbq-tabs-size-tab-item-underlined-icon-only-size: calc(var(--kbq-size-3xl) - var(--kbq-size-xxs));--kbq-tabs-tab-item-filled-on-background-default-background: transparent;--kbq-tabs-tab-item-filled-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-background-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-background-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-default-background: transparent;--kbq-tabs-tab-item-filled-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-surface-states-selected-background: var(--kbq-states-background-transparent-active);--kbq-tabs-tab-item-filled-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-default-background: transparent;--kbq-tabs-tab-item-transparent-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-background-states-hover-background: var( --kbq-states-background-transparent-hover );--kbq-tabs-tab-item-transparent-on-background-states-focused-focus-outline-color: var( --kbq-states-line-focus-theme );--kbq-tabs-tab-item-transparent-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-default-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-transparent-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-transparent-on-surface-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-stack-filled-on-background-background: var(--kbq-background-bg);--kbq-tabs-tab-stack-filled-on-surface-background: var(--kbq-background-contrast-fade);--kbq-tabs-tab-stack-transparent-on-background-background: transparent;--kbq-tabs-tab-stack-transparent-on-surface-background: transparent}\n"] }]
|
|
2028
|
+
}], ctorParameters: () => [], propDecorators: { tabsQuery: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => KbqTab), { isSignal: true }] }], tabBodyWrapper: [{ type: i0.ViewChild, args: ['tabBodyWrapper', { isSignal: true }] }], tabHeader: [{ type: i0.ViewChild, args: ['tabHeader', { isSignal: true }] }], transparent: [{ type: i0.Input, args: [{ isSignal: true, alias: "transparent", required: false }] }], onSurface: [{ type: i0.Input, args: [{ isSignal: true, alias: "onSurface", required: false }] }], underlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "underlined", required: false }] }], vertical: [{ type: i0.Input, args: [{ isSignal: true, alias: "vertical", required: false }] }], dynamicHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "dynamicHeight", required: false }] }], selectedIndexInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIndex", required: false }] }], activeTabInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeTab", required: false }] }], headerPositionInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "headerPosition", required: false }] }], animationDurationInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "animationDuration", required: false }] }], selectedIndexChange: [{ type: i0.Output, args: ["selectedIndexChange"] }], activeTabChange: [{ type: i0.Output, args: ["activeTabChange"] }], focusChange: [{ type: i0.Output, args: ["focusChange"] }], animationDone: [{ type: i0.Output, args: ["animationDone"] }], selectedTabChange: [{ type: i0.Output, args: ["selectedTabChange"] }] } });
|
|
1620
2029
|
|
|
1621
2030
|
// Increasing integer for generating unique ids for tab nav components.
|
|
1622
2031
|
let nextUniqueId = 0;
|
|
@@ -1628,20 +2037,59 @@ const TAB_PADDING = 12;
|
|
|
1628
2037
|
class KbqTabNavBar extends KbqPaginatedTabHeader {
|
|
1629
2038
|
constructor() {
|
|
1630
2039
|
super(...arguments);
|
|
2040
|
+
this.tabListContainerQuery = viewChild.required('tabListContainer');
|
|
2041
|
+
this.scrollbarViewportQuery = viewChild.required('tabListContainer', { read: KbqScrollbarViewport });
|
|
2042
|
+
this.tabListQuery = viewChild.required('tabList');
|
|
2043
|
+
this.nextPaginatorQuery = viewChild.required('nextPaginator');
|
|
2044
|
+
this.previousPaginatorQuery = viewChild.required('previousPaginator');
|
|
2045
|
+
this.itemsQuery = contentChildren(forwardRef(() => KbqTabLink), { ...(ngDevMode ? { debugName: "itemsQuery" } : /* istanbul ignore next */ {}), descendants: true });
|
|
2046
|
+
this.itemsList = kbqQueryListFrom(this.itemsQuery);
|
|
1631
2047
|
this.isBrowser = inject(Platform).isBrowser;
|
|
1632
2048
|
/** Whether the nav bar background should be transparent. */
|
|
1633
|
-
this.transparent = input(false, ...(ngDevMode ?
|
|
1634
|
-
this.onSurface = input(false, ...(ngDevMode ?
|
|
2049
|
+
this.transparent = input(false, { ...(ngDevMode ? { debugName: "transparent" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
2050
|
+
this.onSurface = input(false, { ...(ngDevMode ? { debugName: "onSurface" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1635
2051
|
/** Whether the nav bar should be underlined. */
|
|
1636
|
-
this.underlined = input(false, ...(ngDevMode ?
|
|
2052
|
+
this.underlined = input(false, { ...(ngDevMode ? { debugName: "underlined" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1637
2053
|
/**
|
|
1638
2054
|
* Associated tab panel controlled by the nav bar.
|
|
1639
2055
|
*/
|
|
1640
|
-
this.tabNavPanel = input(...(ngDevMode ? [undefined, { debugName: "tabNavPanel" }] : []));
|
|
2056
|
+
this.tabNavPanel = input(...(ngDevMode ? [undefined, { debugName: "tabNavPanel" }] : /* istanbul ignore next */ []));
|
|
2057
|
+
/** `activeTabDisabled` as this view last rendered it: a link's `disabled` input gives this view no notice. */
|
|
2058
|
+
this.checkedActiveTabDisabled = false;
|
|
2059
|
+
}
|
|
2060
|
+
/** The scroll container of the tab links. */
|
|
2061
|
+
get tabListContainer() {
|
|
2062
|
+
return this.tabListContainerQuery();
|
|
2063
|
+
}
|
|
2064
|
+
get scrollbarViewport() {
|
|
2065
|
+
return this.scrollbarViewportQuery();
|
|
2066
|
+
}
|
|
2067
|
+
/** The element that holds the tab links. */
|
|
2068
|
+
get tabList() {
|
|
2069
|
+
return this.tabListQuery();
|
|
2070
|
+
}
|
|
2071
|
+
/** The pagination arrow towards the end of the tab list. */
|
|
2072
|
+
get nextPaginator() {
|
|
2073
|
+
return this.nextPaginatorQuery();
|
|
2074
|
+
}
|
|
2075
|
+
/** The pagination arrow towards the beginning of the tab list. */
|
|
2076
|
+
get previousPaginator() {
|
|
2077
|
+
return this.previousPaginatorQuery();
|
|
2078
|
+
}
|
|
2079
|
+
/** The tab links of the nav bar. */
|
|
2080
|
+
get items() {
|
|
2081
|
+
return this.itemsList();
|
|
1641
2082
|
}
|
|
1642
2083
|
get role() {
|
|
1643
2084
|
return this.tabNavPanel() ? 'tablist' : this.elementRef.nativeElement.getAttribute('role');
|
|
1644
2085
|
}
|
|
2086
|
+
/**
|
|
2087
|
+
* Vertical tablists are walked with ↑/↓ — ←/→ do nothing — so the orientation has to be announced.
|
|
2088
|
+
* `aria-orientation` is only meaningful on a role that supports it, hence nothing without a panel.
|
|
2089
|
+
*/
|
|
2090
|
+
get ariaOrientation() {
|
|
2091
|
+
return this.role === 'tablist' && this.vertical ? 'vertical' : null;
|
|
2092
|
+
}
|
|
1645
2093
|
get activeTabOffsetWidth() {
|
|
1646
2094
|
if (!this.isBrowser)
|
|
1647
2095
|
return undefined;
|
|
@@ -1669,6 +2117,14 @@ class KbqTabNavBar extends KbqPaginatedTabHeader {
|
|
|
1669
2117
|
});
|
|
1670
2118
|
super.ngAfterContentInit();
|
|
1671
2119
|
}
|
|
2120
|
+
ngAfterContentChecked() {
|
|
2121
|
+
super.ngAfterContentChecked();
|
|
2122
|
+
const activeTabDisabled = this.activeTabDisabled;
|
|
2123
|
+
if (activeTabDisabled !== this.checkedActiveTabDisabled) {
|
|
2124
|
+
this.checkedActiveTabDisabled = activeTabDisabled;
|
|
2125
|
+
this.changeDetectorRef.markForCheck();
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
1672
2128
|
itemSelected() { }
|
|
1673
2129
|
/** Notifies the component that the active link has been changed. */
|
|
1674
2130
|
updateActiveLink() {
|
|
@@ -1679,6 +2135,7 @@ class KbqTabNavBar extends KbqPaginatedTabHeader {
|
|
|
1679
2135
|
for (let i = 0; i < items.length; i++) {
|
|
1680
2136
|
if (items[i].active) {
|
|
1681
2137
|
this.selectedIndex = i;
|
|
2138
|
+
// Also marks the ancestors, whose check runs `ngAfterContentChecked` and scrolls to the link.
|
|
1682
2139
|
this.changeDetectorRef.markForCheck();
|
|
1683
2140
|
const tabNavPanel = this.tabNavPanel();
|
|
1684
2141
|
if (tabNavPanel) {
|
|
@@ -1690,14 +2147,15 @@ class KbqTabNavBar extends KbqPaginatedTabHeader {
|
|
|
1690
2147
|
// The ink bar should hide itself if no items are active.
|
|
1691
2148
|
this.selectedIndex = -1;
|
|
1692
2149
|
}
|
|
1693
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1694
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.30", type: KbqTabNavBar, isStandalone: true, selector: "[kbqTabNavBar], [kbq-tab-nav-bar]", inputs: { transparent: { classPropertyName: "transparent", publicName: "transparent", isSignal: true, isRequired: false, transformFunction: null }, onSurface: { classPropertyName: "onSurface", publicName: "onSurface", isSignal: true, isRequired: false, transformFunction: null }, underlined: { classPropertyName: "underlined", publicName: "underlined", isSignal: true, isRequired: false, transformFunction: null }, tabNavPanel: { classPropertyName: "tabNavPanel", publicName: "tabNavPanel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.kbq-tab-nav-bar_filled": "!transparent()", "class.kbq-tab-nav-bar_transparent": "transparent()", "class.kbq-tab-nav-bar_on-background": "!onSurface()", "class.kbq-tab-nav-bar_on-surface": "onSurface()", "class.kbq-tab-header_underlined": "underlined()", "class.kbq-tab-header__pagination-controls_enabled": "showPaginationControls", "class.kbq-tab-header_rtl": "getLayoutDirection() == 'rtl'", "attr.role": "role" }, classAttribute: "kbq-tab-nav-bar" }, queries: [{ propertyName: "items", predicate: i0.forwardRef(() => KbqTabLink), descendants: true }], viewQueries: [{ propertyName: "tabListContainer", first: true, predicate: ["tabListContainer"], descendants: true, static: true }, { propertyName: "tabList", first: true, predicate: ["tabList"], descendants: true, static: true }, { propertyName: "nextPaginator", first: true, predicate: ["nextPaginator"], descendants: true }, { propertyName: "previousPaginator", first: true, predicate: ["previousPaginator"], descendants: true }], exportAs: ["kbqTabNavBar"], usesInheritance: true, ngImport: i0, template: "<div\n #previousPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_before\"\n [class.kbq-disabled]=\"disableScrollBefore\"\n (click)=\"handlePaginatorClick('before')\"\n (mousedown)=\"handlePaginatorPress('before', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-left_16\" color=\"contrast\"></i>\n</div>\n\n<div\n #tabListContainer\n class=\"kbq-tab-link__container kbq-tab-header__scroll-container\"\n [class.kbq-tab-header__scroll-container_overflow-before]=\"!disableScrollBefore\"\n [class.kbq-tab-header__scroll-container_overflow-after]=\"!disableScrollAfter\"\n (keydown)=\"handleKeydown($event)\"\n>\n <div #tabList class=\"kbq-tab-list\" (cdkObserveContent)=\"onContentChanges()\">\n <div class=\"kbq-tab-list__content\">\n <ng-content />\n <div\n class=\"kbq-tab-list__active-tab-underline\"\n [class.kbq-disabled]=\"activeTabDisabled\"\n [style.left.px]=\"activeTabOffsetLeft\"\n [style.width.px]=\"activeTabOffsetWidth\"\n ></div>\n </div>\n </div>\n</div>\n\n<div\n #nextPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_after\"\n [class.kbq-disabled]=\"disableScrollAfter\"\n (click)=\"handlePaginatorClick('after')\"\n (mousedown)=\"handlePaginatorPress('after', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast\"></i>\n</div>\n", styles: [".kbq-tab-header__pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;inset-block:0;display:none;justify-content:center;align-items:center;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:manipulation;padding:0 var(--kbq-size-m);opacity:1;visibility:visible}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__pagination{display:flex}.kbq-tab-header__pagination:not(.kbq-disabled){cursor:pointer}.kbq-tab-header__pagination.kbq-disabled{opacity:0;visibility:hidden;pointer-events:none}.kbq-tab-header__pagination_before{inset-inline-start:0}.kbq-tab-header__pagination_after{inset-inline-end:0}.kbq-tab-header__scroll-container{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;--mask-size: calc(var(--kbq-size-m) * 2 + 16px);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.kbq-tab-header__scroll-container::-webkit-scrollbar{display:none}.kbq-tab-group_vertical .kbq-tab-header__scroll-container{overflow-x:hidden;overflow-y:auto;scrollbar-width:auto}.kbq-tab-group_vertical .kbq-tab-header__scroll-container::-webkit-scrollbar{display:block}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__scroll-container{cursor:grab}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_dragging{cursor:grabbing}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content{padding:var(--kbq-size-s) 0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label:first-child:not(.kbq-tab-label_icon-only),.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-link:first-child{margin-inline-start:calc(-1 * var(--kbq-tabs-size-tab-item-padding-horizontal))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label_icon-only:first-child{margin-inline-start:0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical):after{content:\"\";position:absolute;left:0;bottom:0;right:0;height:1px;background:var(--kbq-line-contrast-less)}.kbq-tab-list__active-tab-underline{display:none}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline{display:block;position:absolute;bottom:0;height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:var(--kbq-line-contrast);transition:all .2s ease-in-out}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline.kbq-disabled{background:var(--kbq-states-icon-disabled)}.kbq-tab-nav-bar{display:flex;position:relative}.kbq-tab-nav-bar .kbq-tab-link__container{display:flex;flex-grow:1;z-index:1}.kbq-tab-nav-bar.kbq-tab-header_underlined:not(.kbq-tab-header__pagination-controls_enabled) .kbq-tab-link__container{overflow:visible}.kbq-tab-nav-bar .kbq-tab-list{position:relative;width:100%}.kbq-tab-nav-bar .kbq-tab-list__content{display:flex}.kbq-tab-nav-bar.kbq-tab-group_vertical .kbq-tab-list__content{flex-direction:column;gap:var(--kbq-tabs-size-tab-stack-vertical-content-gap-vertical)}\n", ".kbq-tab-group,.kbq-tab-nav-bar{--kbq-tabs-size-tab-item-padding-horizontal: var(--kbq-size-m);--kbq-tabs-size-tab-item-padding-vertical: var(--kbq-size-xs);--kbq-tabs-size-tab-item-content-gap-horizontal: var(--kbq-size-xxs);--kbq-tabs-size-tab-item-border-radius: var(--kbq-size-s);--kbq-tabs-size-tab-item-focus-outline-width: var(--kbq-size-3xs);--kbq-tabs-size-tab-stack-horizontal-border-radius: var(--kbq-size-border-radius);--kbq-tabs-size-tab-stack-vertical-content-gap-vertical: var(--kbq-size-s);--kbq-tabs-size-tab-item-underlined-icon-only-size: calc(var(--kbq-size-3xl) - var(--kbq-size-xxs));--kbq-tabs-tab-item-filled-on-background-default-background: transparent;--kbq-tabs-tab-item-filled-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-background-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-background-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-default-background: transparent;--kbq-tabs-tab-item-filled-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-surface-states-selected-background: var(--kbq-states-background-transparent-active);--kbq-tabs-tab-item-filled-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-default-background: transparent;--kbq-tabs-tab-item-transparent-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-background-states-hover-background: var( --kbq-states-background-transparent-hover );--kbq-tabs-tab-item-transparent-on-background-states-focused-focus-outline-color: var( --kbq-states-line-focus-theme );--kbq-tabs-tab-item-transparent-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-default-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-transparent-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-transparent-on-surface-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-stack-filled-on-background-background: var(--kbq-background-bg);--kbq-tabs-tab-stack-filled-on-surface-background: var(--kbq-background-contrast-fade);--kbq-tabs-tab-stack-transparent-on-background-background: transparent;--kbq-tabs-tab-stack-transparent-on-surface-background: transparent}\n", ".kbq-tab-link{vertical-align:top;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;text-align:center;white-space:nowrap;cursor:pointer;padding:calc(var(--kbq-tabs-size-tab-item-padding-vertical) - var(--kbq-tabs-size-tab-item-focus-outline-width)) calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));border-width:var(--kbq-tabs-size-tab-item-focus-outline-width);border-style:solid;border-color:transparent;border-radius:var(--kbq-tabs-size-tab-item-border-radius);outline:none}.kbq-tab-link.kbq-selected{cursor:default}.kbq-tab-link.cdk-keyboard-focused{z-index:1}.kbq-tab-link.kbq-disabled{pointer-events:none}.kbq-tab-link .kbq-tab-label__content{display:flex;align-items:center;overflow:hidden;gap:var(--kbq-tabs-size-tab-item-content-gap-horizontal)}.kbq-tab-link.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{content:\"\";position:absolute;inset:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width))) calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width))}.kbq-tab-link.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):not(.kbq-tab-label_icon-only):after{content:\"\";position:absolute;left:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:transparent;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-link.kbq-tab-label_icon-only{width:var(--kbq-size-3xl);height:var(--kbq-size-3xl);padding:0!important;margin-inline:var(--kbq-size-xxs);box-sizing:content-box}.kbq-tab-link.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical){width:var(--kbq-tabs-size-tab-item-underlined-icon-only-size);height:var(--kbq-tabs-size-tab-item-underlined-icon-only-size)}.kbq-tab-link.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)))}.kbq-tab-link.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):after{top:auto;bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;left:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-link.kbq-tab-label_icon-only:not(.kbq-tab-label_vertical):after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));background:transparent}.kbq-tab-link.kbq-tab-label_vertical{justify-content:flex-start}.kbq-tab-link.kbq-tab-label_vertical .kbq-tab-label__content:not(.kbq-tab-label__template){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kbq-tab-link.kbq-tab-label_vertical.kbq-tab-label_icon-only{margin-inline:0;justify-content:center}.kbq-tab-link .kbq-tab-group_stretch-labels .kbq-tab-link{flex-basis:0;flex-grow:1}\n"], dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "directive", type: CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2150
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabNavBar, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2151
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.25", type: KbqTabNavBar, isStandalone: true, selector: "[kbqTabNavBar], [kbq-tab-nav-bar]", inputs: { transparent: { classPropertyName: "transparent", publicName: "transparent", isSignal: true, isRequired: false, transformFunction: null }, onSurface: { classPropertyName: "onSurface", publicName: "onSurface", isSignal: true, isRequired: false, transformFunction: null }, underlined: { classPropertyName: "underlined", publicName: "underlined", isSignal: true, isRequired: false, transformFunction: null }, tabNavPanel: { classPropertyName: "tabNavPanel", publicName: "tabNavPanel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.kbq-tab-nav-bar_filled": "!transparent()", "class.kbq-tab-nav-bar_transparent": "transparent()", "class.kbq-tab-nav-bar_on-background": "!onSurface()", "class.kbq-tab-nav-bar_on-surface": "onSurface()", "class.kbq-tab-header_underlined": "underlined()", "class.kbq-tab-group_vertical": "vertical", "class.kbq-tab-header__pagination-controls_enabled": "showPaginationControls", "class.kbq-tab-header_rtl": "getLayoutDirection() == 'rtl'", "attr.role": "role", "attr.aria-orientation": "ariaOrientation" }, classAttribute: "kbq-tab-nav-bar" }, queries: [{ propertyName: "itemsQuery", predicate: i0.forwardRef(() => KbqTabLink), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "tabListContainerQuery", first: true, predicate: ["tabListContainer"], descendants: true, isSignal: true }, { propertyName: "scrollbarViewportQuery", first: true, predicate: ["tabListContainer"], descendants: true, read: KbqScrollbarViewport, isSignal: true }, { propertyName: "tabListQuery", first: true, predicate: ["tabList"], descendants: true, isSignal: true }, { propertyName: "nextPaginatorQuery", first: true, predicate: ["nextPaginator"], descendants: true, isSignal: true }, { propertyName: "previousPaginatorQuery", first: true, predicate: ["previousPaginator"], descendants: true, isSignal: true }], exportAs: ["kbqTabNavBar"], usesInheritance: true, ngImport: i0, template: "<div\n #previousPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_before\"\n [class.kbq-disabled]=\"disableScrollBefore\"\n (click)=\"handlePaginatorClick('before')\"\n (mousedown)=\"handlePaginatorPress('before', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-left_16\" color=\"contrast\"></i>\n</div>\n\n<div\n #tabListContainer\n kbqScrollbarViewport\n class=\"kbq-tab-link__container kbq-tab-header__scroll-container\"\n [kbqScrollbarMode]=\"scrollbarMode\"\n [class.kbq-tab-header__scroll-container_overflow-before]=\"!disableScrollBefore\"\n [class.kbq-tab-header__scroll-container_overflow-after]=\"!disableScrollAfter\"\n (keydown)=\"handleKeydown($event)\"\n>\n <div #tabList class=\"kbq-tab-list\" (cdkObserveContent)=\"onContentChanges()\">\n <div class=\"kbq-tab-list__content\">\n <ng-content />\n <div\n aria-hidden=\"true\"\n class=\"kbq-tab-list__active-tab-underline\"\n [class.kbq-animations-disabled]=\"animationsDisabled\"\n [class.kbq-disabled]=\"activeTabDisabled\"\n [style.left.px]=\"activeTabOffsetLeft\"\n [style.width.px]=\"activeTabOffsetWidth\"\n ></div>\n </div>\n </div>\n</div>\n\n<div\n #nextPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_after\"\n [class.kbq-disabled]=\"disableScrollAfter\"\n (click)=\"handlePaginatorClick('after')\"\n (mousedown)=\"handlePaginatorPress('after', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast\"></i>\n</div>\n", styles: ["@charset \"UTF-8\";.kbq-tab-header__pagination{-webkit-user-select:none;user-select:none;position:absolute;inset-block:0;display:none;justify-content:center;align-items:center;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:manipulation;padding:0 var(--kbq-size-m);opacity:1;visibility:visible}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__pagination{display:flex}.kbq-tab-header__pagination:not(.kbq-disabled){cursor:pointer}.kbq-tab-header__pagination.kbq-disabled{opacity:0;visibility:hidden;pointer-events:none}.kbq-tab-header__pagination_before{inset-inline-start:0}.kbq-tab-header__pagination_after{inset-inline-end:0}.kbq-tab-header__scroll-container{-webkit-user-select:none;user-select:none;--mask-size: calc(var(--kbq-size-m) * 2 + 16px);overflow-x:auto;overflow-y:hidden}.kbq-tab-group_vertical .kbq-tab-header__scroll-container{overflow-x:hidden;overflow-y:auto}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__scroll-container{cursor:grab}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_dragging{cursor:grabbing}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content{padding:var(--kbq-size-s) 0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label:first-child:not(.kbq-tab-label_icon-only),.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-link:first-child{margin-inline-start:calc(-1 * var(--kbq-tabs-size-tab-item-padding-horizontal))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label_icon-only:first-child{margin-inline-start:0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical):after{content:\"\";position:absolute;left:0;bottom:0;right:0;height:1px;background:var(--kbq-line-contrast-less)}.kbq-tab-list__active-tab-underline{display:none}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline{display:block;position:absolute;bottom:0;height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:var(--kbq-line-contrast);transition:all .2s ease-in-out}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline.kbq-disabled{background:var(--kbq-states-icon-disabled)}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline{animation:none;transition:none}}.kbq-tab-nav-bar{display:flex;position:relative}.kbq-tab-nav-bar .kbq-tab-link__container{display:flex;flex-grow:1;z-index:1}.kbq-tab-nav-bar.kbq-tab-header_underlined:not(.kbq-tab-header__pagination-controls_enabled) .kbq-tab-link__container{overflow:visible}.kbq-tab-nav-bar .kbq-tab-list{position:relative;width:100%}.kbq-tab-nav-bar .kbq-tab-list__content{display:flex}.kbq-tab-nav-bar.kbq-tab-group_vertical .kbq-tab-list__content{flex-direction:column;gap:var(--kbq-tabs-size-tab-stack-vertical-content-gap-vertical)}\n", ".kbq-tab-group,.kbq-tab-nav-bar{--kbq-tabs-size-tab-item-padding-horizontal: var(--kbq-size-m);--kbq-tabs-size-tab-item-padding-vertical: var(--kbq-size-xs);--kbq-tabs-size-tab-item-content-gap-horizontal: var(--kbq-size-xxs);--kbq-tabs-size-tab-item-border-radius: var(--kbq-size-s);--kbq-tabs-size-tab-item-focus-outline-width: var(--kbq-size-3xs);--kbq-tabs-size-tab-stack-horizontal-border-radius: var(--kbq-size-border-radius);--kbq-tabs-size-tab-stack-vertical-content-gap-vertical: var(--kbq-size-s);--kbq-tabs-size-tab-item-underlined-icon-only-size: calc(var(--kbq-size-3xl) - var(--kbq-size-xxs));--kbq-tabs-tab-item-filled-on-background-default-background: transparent;--kbq-tabs-tab-item-filled-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-background-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-background-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-default-background: transparent;--kbq-tabs-tab-item-filled-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-surface-states-selected-background: var(--kbq-states-background-transparent-active);--kbq-tabs-tab-item-filled-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-default-background: transparent;--kbq-tabs-tab-item-transparent-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-background-states-hover-background: var( --kbq-states-background-transparent-hover );--kbq-tabs-tab-item-transparent-on-background-states-focused-focus-outline-color: var( --kbq-states-line-focus-theme );--kbq-tabs-tab-item-transparent-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-default-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-transparent-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-transparent-on-surface-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-stack-filled-on-background-background: var(--kbq-background-bg);--kbq-tabs-tab-stack-filled-on-surface-background: var(--kbq-background-contrast-fade);--kbq-tabs-tab-stack-transparent-on-background-background: transparent;--kbq-tabs-tab-stack-transparent-on-surface-background: transparent}\n", "@charset \"UTF-8\";.kbq-tab-link{vertical-align:top;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;text-align:center;white-space:nowrap;cursor:pointer;padding:calc(var(--kbq-tabs-size-tab-item-padding-vertical) - var(--kbq-tabs-size-tab-item-focus-outline-width)) calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));border-width:var(--kbq-tabs-size-tab-item-focus-outline-width);border-style:solid;border-color:transparent;border-radius:var(--kbq-tabs-size-tab-item-border-radius)}@supports (corner-shape: squircle){.kbq-tab-link{corner-shape:squircle;border-radius:clamp(var(--kbq-tabs-size-tab-item-border-radius) * 1.85,var(--kbq-tabs-size-tab-item-border-radius) * 2.3 - 3.6px,var(--kbq-tabs-size-tab-item-border-radius) * 2)}}.kbq-tab-link{outline:none}.kbq-tab-link.kbq-selected{cursor:default}.kbq-tab-link.cdk-keyboard-focused{z-index:1}.kbq-tab-link.kbq-disabled{pointer-events:none}.kbq-tab-link .kbq-tab-label__content{display:flex;align-items:center;overflow:hidden;gap:var(--kbq-tabs-size-tab-item-content-gap-horizontal)}.kbq-tab-link.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{content:\"\";position:absolute;inset:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width))) calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width))}.kbq-tab-link.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):not(.kbq-tab-label_icon-only):after{content:\"\";position:absolute;left:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:transparent;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-link.kbq-tab-label_icon-only{width:var(--kbq-size-3xl);height:var(--kbq-size-3xl);padding:0;margin-inline:var(--kbq-size-xxs);box-sizing:content-box}.kbq-tab-link.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical){width:var(--kbq-tabs-size-tab-item-underlined-icon-only-size);height:var(--kbq-tabs-size-tab-item-underlined-icon-only-size)}.kbq-tab-link.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)))}.kbq-tab-link.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):after{top:auto;bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;left:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-link.kbq-tab-label_icon-only:not(.kbq-tab-label_vertical):after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));background:transparent}.kbq-tab-link.kbq-tab-label_vertical{justify-content:flex-start}.kbq-tab-link.kbq-tab-label_vertical .kbq-tab-label__content:not(.kbq-tab-label__template){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kbq-tab-link.kbq-tab-label_vertical.kbq-tab-label_icon-only{margin-inline:0;justify-content:center}.kbq-tab-link .kbq-tab-group_stretch-labels .kbq-tab-link{flex-basis:0;flex-grow:1}\n"], dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1.KbqIcon, selector: "[kbq-icon]", inputs: ["aria-hidden", "iconSize", "autoColor", "kbq-icon"] }, { kind: "directive", type: CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }, { kind: "directive", type: KbqScrollbarViewport, selector: "[kbqScrollbarViewport]", inputs: ["kbqScrollbarMode", "kbqScrollbarHideDelay"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1695
2152
|
}
|
|
1696
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabNavBar, decorators: [{
|
|
1697
2154
|
type: Component,
|
|
1698
2155
|
args: [{ selector: '[kbqTabNavBar], [kbq-tab-nav-bar]', imports: [
|
|
1699
2156
|
KbqIconModule,
|
|
1700
|
-
CdkObserveContent
|
|
2157
|
+
CdkObserveContent,
|
|
2158
|
+
KbqScrollbarViewport
|
|
1701
2159
|
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
1702
2160
|
class: 'kbq-tab-nav-bar',
|
|
1703
2161
|
'[class.kbq-tab-nav-bar_filled]': '!transparent()',
|
|
@@ -1705,40 +2163,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1705
2163
|
'[class.kbq-tab-nav-bar_on-background]': '!onSurface()',
|
|
1706
2164
|
'[class.kbq-tab-nav-bar_on-surface]': 'onSurface()',
|
|
1707
2165
|
'[class.kbq-tab-header_underlined]': 'underlined()',
|
|
2166
|
+
'[class.kbq-tab-group_vertical]': 'vertical',
|
|
1708
2167
|
'[class.kbq-tab-header__pagination-controls_enabled]': 'showPaginationControls',
|
|
1709
2168
|
'[class.kbq-tab-header_rtl]': "getLayoutDirection() == 'rtl'",
|
|
1710
|
-
'[attr.role]': 'role'
|
|
1711
|
-
}, exportAs: 'kbqTabNavBar', template: "<div\n #previousPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_before\"\n [class.kbq-disabled]=\"disableScrollBefore\"\n (click)=\"handlePaginatorClick('before')\"\n (mousedown)=\"handlePaginatorPress('before', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-left_16\" color=\"contrast\"></i>\n</div>\n\n<div\n #tabListContainer\n class=\"kbq-tab-link__container kbq-tab-header__scroll-container\"\n [class.kbq-tab-header__scroll-container_overflow-before]=\"!disableScrollBefore\"\n [class.kbq-tab-header__scroll-container_overflow-after]=\"!disableScrollAfter\"\n (keydown)=\"handleKeydown($event)\"\n>\n <div #tabList class=\"kbq-tab-list\" (cdkObserveContent)=\"onContentChanges()\">\n <div class=\"kbq-tab-list__content\">\n <ng-content />\n <div\n class=\"kbq-tab-list__active-tab-underline\"\n [class.kbq-disabled]=\"activeTabDisabled\"\n [style.left.px]=\"activeTabOffsetLeft\"\n [style.width.px]=\"activeTabOffsetWidth\"\n ></div>\n </div>\n </div>\n</div>\n\n<div\n #nextPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_after\"\n [class.kbq-disabled]=\"disableScrollAfter\"\n (click)=\"handlePaginatorClick('after')\"\n (mousedown)=\"handlePaginatorPress('after', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast\"></i>\n</div>\n", styles: [".kbq-tab-header__pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:absolute;inset-block:0;display:none;justify-content:center;align-items:center;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:manipulation;padding:0 var(--kbq-size-m);opacity:1;visibility:visible}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__pagination{display:flex}.kbq-tab-header__pagination:not(.kbq-disabled){cursor:pointer}.kbq-tab-header__pagination.kbq-disabled{opacity:0;visibility:hidden;pointer-events:none}.kbq-tab-header__pagination_before{inset-inline-start:0}.kbq-tab-header__pagination_after{inset-inline-end:0}.kbq-tab-header__scroll-container{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;--mask-size: calc(var(--kbq-size-m) * 2 + 16px);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none}.kbq-tab-header__scroll-container::-webkit-scrollbar{display:none}.kbq-tab-group_vertical .kbq-tab-header__scroll-container{overflow-x:hidden;overflow-y:auto;scrollbar-width:auto}.kbq-tab-group_vertical .kbq-tab-header__scroll-container::-webkit-scrollbar{display:block}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__scroll-container{cursor:grab}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_dragging{cursor:grabbing}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content{padding:var(--kbq-size-s) 0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label:first-child:not(.kbq-tab-label_icon-only),.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-link:first-child{margin-inline-start:calc(-1 * var(--kbq-tabs-size-tab-item-padding-horizontal))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label_icon-only:first-child{margin-inline-start:0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical):after{content:\"\";position:absolute;left:0;bottom:0;right:0;height:1px;background:var(--kbq-line-contrast-less)}.kbq-tab-list__active-tab-underline{display:none}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline{display:block;position:absolute;bottom:0;height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:var(--kbq-line-contrast);transition:all .2s ease-in-out}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline.kbq-disabled{background:var(--kbq-states-icon-disabled)}.kbq-tab-nav-bar{display:flex;position:relative}.kbq-tab-nav-bar .kbq-tab-link__container{display:flex;flex-grow:1;z-index:1}.kbq-tab-nav-bar.kbq-tab-header_underlined:not(.kbq-tab-header__pagination-controls_enabled) .kbq-tab-link__container{overflow:visible}.kbq-tab-nav-bar .kbq-tab-list{position:relative;width:100%}.kbq-tab-nav-bar .kbq-tab-list__content{display:flex}.kbq-tab-nav-bar.kbq-tab-group_vertical .kbq-tab-list__content{flex-direction:column;gap:var(--kbq-tabs-size-tab-stack-vertical-content-gap-vertical)}\n", ".kbq-tab-group,.kbq-tab-nav-bar{--kbq-tabs-size-tab-item-padding-horizontal: var(--kbq-size-m);--kbq-tabs-size-tab-item-padding-vertical: var(--kbq-size-xs);--kbq-tabs-size-tab-item-content-gap-horizontal: var(--kbq-size-xxs);--kbq-tabs-size-tab-item-border-radius: var(--kbq-size-s);--kbq-tabs-size-tab-item-focus-outline-width: var(--kbq-size-3xs);--kbq-tabs-size-tab-stack-horizontal-border-radius: var(--kbq-size-border-radius);--kbq-tabs-size-tab-stack-vertical-content-gap-vertical: var(--kbq-size-s);--kbq-tabs-size-tab-item-underlined-icon-only-size: calc(var(--kbq-size-3xl) - var(--kbq-size-xxs));--kbq-tabs-tab-item-filled-on-background-default-background: transparent;--kbq-tabs-tab-item-filled-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-background-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-background-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-default-background: transparent;--kbq-tabs-tab-item-filled-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-surface-states-selected-background: var(--kbq-states-background-transparent-active);--kbq-tabs-tab-item-filled-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-default-background: transparent;--kbq-tabs-tab-item-transparent-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-background-states-hover-background: var( --kbq-states-background-transparent-hover );--kbq-tabs-tab-item-transparent-on-background-states-focused-focus-outline-color: var( --kbq-states-line-focus-theme );--kbq-tabs-tab-item-transparent-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-default-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-transparent-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-transparent-on-surface-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-stack-filled-on-background-background: var(--kbq-background-bg);--kbq-tabs-tab-stack-filled-on-surface-background: var(--kbq-background-contrast-fade);--kbq-tabs-tab-stack-transparent-on-background-background: transparent;--kbq-tabs-tab-stack-transparent-on-surface-background: transparent}\n", ".kbq-tab-link{vertical-align:top;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;text-align:center;white-space:nowrap;cursor:pointer;padding:calc(var(--kbq-tabs-size-tab-item-padding-vertical) - var(--kbq-tabs-size-tab-item-focus-outline-width)) calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));border-width:var(--kbq-tabs-size-tab-item-focus-outline-width);border-style:solid;border-color:transparent;border-radius:var(--kbq-tabs-size-tab-item-border-radius);outline:none}.kbq-tab-link.kbq-selected{cursor:default}.kbq-tab-link.cdk-keyboard-focused{z-index:1}.kbq-tab-link.kbq-disabled{pointer-events:none}.kbq-tab-link .kbq-tab-label__content{display:flex;align-items:center;overflow:hidden;gap:var(--kbq-tabs-size-tab-item-content-gap-horizontal)}.kbq-tab-link.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{content:\"\";position:absolute;inset:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width))) calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width))}.kbq-tab-link.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):not(.kbq-tab-label_icon-only):after{content:\"\";position:absolute;left:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:transparent;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-link.kbq-tab-label_icon-only{width:var(--kbq-size-3xl);height:var(--kbq-size-3xl);padding:0!important;margin-inline:var(--kbq-size-xxs);box-sizing:content-box}.kbq-tab-link.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical){width:var(--kbq-tabs-size-tab-item-underlined-icon-only-size);height:var(--kbq-tabs-size-tab-item-underlined-icon-only-size)}.kbq-tab-link.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)))}.kbq-tab-link.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):after{top:auto;bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;left:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-link.kbq-tab-label_icon-only:not(.kbq-tab-label_vertical):after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));background:transparent}.kbq-tab-link.kbq-tab-label_vertical{justify-content:flex-start}.kbq-tab-link.kbq-tab-label_vertical .kbq-tab-label__content:not(.kbq-tab-label__template){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kbq-tab-link.kbq-tab-label_vertical.kbq-tab-label_icon-only{margin-inline:0;justify-content:center}.kbq-tab-link .kbq-tab-group_stretch-labels .kbq-tab-link{flex-basis:0;flex-grow:1}\n"] }]
|
|
1712
|
-
}], propDecorators: { tabListContainer: [{
|
|
1713
|
-
|
|
1714
|
-
args: ['tabListContainer', { static: true }]
|
|
1715
|
-
}], tabList: [{
|
|
1716
|
-
type: ViewChild,
|
|
1717
|
-
args: ['tabList', { static: true }]
|
|
1718
|
-
}], nextPaginator: [{
|
|
1719
|
-
type: ViewChild,
|
|
1720
|
-
args: ['nextPaginator']
|
|
1721
|
-
}], previousPaginator: [{
|
|
1722
|
-
type: ViewChild,
|
|
1723
|
-
args: ['previousPaginator']
|
|
1724
|
-
}], items: [{
|
|
1725
|
-
type: ContentChildren,
|
|
1726
|
-
args: [forwardRef(() => KbqTabLink), { descendants: true }]
|
|
1727
|
-
}], transparent: [{ type: i0.Input, args: [{ isSignal: true, alias: "transparent", required: false }] }], onSurface: [{ type: i0.Input, args: [{ isSignal: true, alias: "onSurface", required: false }] }], underlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "underlined", required: false }] }], tabNavPanel: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabNavPanel", required: false }] }] } });
|
|
2169
|
+
'[attr.role]': 'role',
|
|
2170
|
+
'[attr.aria-orientation]': 'ariaOrientation'
|
|
2171
|
+
}, exportAs: 'kbqTabNavBar', template: "<div\n #previousPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_before\"\n [class.kbq-disabled]=\"disableScrollBefore\"\n (click)=\"handlePaginatorClick('before')\"\n (mousedown)=\"handlePaginatorPress('before', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-left_16\" color=\"contrast\"></i>\n</div>\n\n<div\n #tabListContainer\n kbqScrollbarViewport\n class=\"kbq-tab-link__container kbq-tab-header__scroll-container\"\n [kbqScrollbarMode]=\"scrollbarMode\"\n [class.kbq-tab-header__scroll-container_overflow-before]=\"!disableScrollBefore\"\n [class.kbq-tab-header__scroll-container_overflow-after]=\"!disableScrollAfter\"\n (keydown)=\"handleKeydown($event)\"\n>\n <div #tabList class=\"kbq-tab-list\" (cdkObserveContent)=\"onContentChanges()\">\n <div class=\"kbq-tab-list__content\">\n <ng-content />\n <div\n aria-hidden=\"true\"\n class=\"kbq-tab-list__active-tab-underline\"\n [class.kbq-animations-disabled]=\"animationsDisabled\"\n [class.kbq-disabled]=\"activeTabDisabled\"\n [style.left.px]=\"activeTabOffsetLeft\"\n [style.width.px]=\"activeTabOffsetWidth\"\n ></div>\n </div>\n </div>\n</div>\n\n<div\n #nextPaginator\n class=\"kbq-tab-header__pagination kbq-tab-header__pagination_after\"\n [class.kbq-disabled]=\"disableScrollAfter\"\n (click)=\"handlePaginatorClick('after')\"\n (mousedown)=\"handlePaginatorPress('after', $event)\"\n (touchend)=\"stopInterval()\"\n>\n <i kbq-icon=\"kbq-chevron-right_16\" color=\"contrast\"></i>\n</div>\n", styles: ["@charset \"UTF-8\";.kbq-tab-header__pagination{-webkit-user-select:none;user-select:none;position:absolute;inset-block:0;display:none;justify-content:center;align-items:center;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:manipulation;padding:0 var(--kbq-size-m);opacity:1;visibility:visible}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__pagination{display:flex}.kbq-tab-header__pagination:not(.kbq-disabled){cursor:pointer}.kbq-tab-header__pagination.kbq-disabled{opacity:0;visibility:hidden;pointer-events:none}.kbq-tab-header__pagination_before{inset-inline-start:0}.kbq-tab-header__pagination_after{inset-inline-end:0}.kbq-tab-header__scroll-container{-webkit-user-select:none;user-select:none;--mask-size: calc(var(--kbq-size-m) * 2 + 16px);overflow-x:auto;overflow-y:hidden}.kbq-tab-group_vertical .kbq-tab-header__scroll-container{overflow-x:hidden;overflow-y:auto}.kbq-tab-header__pagination-controls_enabled .kbq-tab-header__scroll-container{cursor:grab}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_dragging{cursor:grabbing}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to right,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_rtl .kbq-tab-header__scroll-container.kbq-tab-header__scroll-container_overflow-before.kbq-tab-header__scroll-container_overflow-after{-webkit-mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)));mask-image:linear-gradient(to left,transparent var(--mask-size),#000 calc(var(--mask-size) * 1.5),#000 calc(100% - var(--mask-size) * 1.5),transparent calc(100% - var(--mask-size)))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content{padding:var(--kbq-size-s) 0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label:first-child:not(.kbq-tab-label_icon-only),.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-link:first-child{margin-inline-start:calc(-1 * var(--kbq-tabs-size-tab-item-padding-horizontal))}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__content>.kbq-tab-label_icon-only:first-child{margin-inline-start:0}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical):after{content:\"\";position:absolute;left:0;bottom:0;right:0;height:1px;background:var(--kbq-line-contrast-less)}.kbq-tab-list__active-tab-underline{display:none}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline{display:block;position:absolute;bottom:0;height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:var(--kbq-line-contrast);transition:all .2s ease-in-out}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline.kbq-disabled{background:var(--kbq-states-icon-disabled)}.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline.kbq-animations-disabled{animation:none;transition:none}@media(prefers-reduced-motion:reduce){.kbq-tab-header_underlined:not(.kbq-tab-header_vertical) .kbq-tab-list__active-tab-underline{animation:none;transition:none}}.kbq-tab-nav-bar{display:flex;position:relative}.kbq-tab-nav-bar .kbq-tab-link__container{display:flex;flex-grow:1;z-index:1}.kbq-tab-nav-bar.kbq-tab-header_underlined:not(.kbq-tab-header__pagination-controls_enabled) .kbq-tab-link__container{overflow:visible}.kbq-tab-nav-bar .kbq-tab-list{position:relative;width:100%}.kbq-tab-nav-bar .kbq-tab-list__content{display:flex}.kbq-tab-nav-bar.kbq-tab-group_vertical .kbq-tab-list__content{flex-direction:column;gap:var(--kbq-tabs-size-tab-stack-vertical-content-gap-vertical)}\n", ".kbq-tab-group,.kbq-tab-nav-bar{--kbq-tabs-size-tab-item-padding-horizontal: var(--kbq-size-m);--kbq-tabs-size-tab-item-padding-vertical: var(--kbq-size-xs);--kbq-tabs-size-tab-item-content-gap-horizontal: var(--kbq-size-xxs);--kbq-tabs-size-tab-item-border-radius: var(--kbq-size-s);--kbq-tabs-size-tab-item-focus-outline-width: var(--kbq-size-3xs);--kbq-tabs-size-tab-stack-horizontal-border-radius: var(--kbq-size-border-radius);--kbq-tabs-size-tab-stack-vertical-content-gap-vertical: var(--kbq-size-s);--kbq-tabs-size-tab-item-underlined-icon-only-size: calc(var(--kbq-size-3xl) - var(--kbq-size-xxs));--kbq-tabs-tab-item-filled-on-background-default-background: transparent;--kbq-tabs-tab-item-filled-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-background-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-background-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-default-background: transparent;--kbq-tabs-tab-item-filled-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-filled-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-filled-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-filled-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-filled-on-surface-states-selected-background: var(--kbq-states-background-transparent-active);--kbq-tabs-tab-item-filled-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-filled-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-filled-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-default-background: transparent;--kbq-tabs-tab-item-transparent-on-background-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-background-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-background-states-hover-background: var( --kbq-states-background-transparent-hover );--kbq-tabs-tab-item-transparent-on-background-states-focused-focus-outline-color: var( --kbq-states-line-focus-theme );--kbq-tabs-tab-item-transparent-on-background-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-background-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-background-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-background-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-default-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-default-text-color: var(--kbq-foreground-contrast);--kbq-tabs-tab-item-transparent-on-surface-default-icon-color: var(--kbq-icon-contrast);--kbq-tabs-tab-item-transparent-on-surface-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-tabs-tab-item-transparent-on-surface-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-tabs-tab-item-transparent-on-surface-states-selected-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-hover-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-background: var( --kbq-states-background-transparent-active );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-text-color: var( --kbq-states-foreground-disabled );--kbq-tabs-tab-item-transparent-on-surface-states-selected-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-background: transparent;--kbq-tabs-tab-item-transparent-on-surface-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-tabs-tab-item-transparent-on-surface-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-tabs-tab-stack-filled-on-background-background: var(--kbq-background-bg);--kbq-tabs-tab-stack-filled-on-surface-background: var(--kbq-background-contrast-fade);--kbq-tabs-tab-stack-transparent-on-background-background: transparent;--kbq-tabs-tab-stack-transparent-on-surface-background: transparent}\n", "@charset \"UTF-8\";.kbq-tab-link{vertical-align:top;text-decoration:none;-webkit-tap-highlight-color:transparent;position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;text-align:center;white-space:nowrap;cursor:pointer;padding:calc(var(--kbq-tabs-size-tab-item-padding-vertical) - var(--kbq-tabs-size-tab-item-focus-outline-width)) calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));border-width:var(--kbq-tabs-size-tab-item-focus-outline-width);border-style:solid;border-color:transparent;border-radius:var(--kbq-tabs-size-tab-item-border-radius)}@supports (corner-shape: squircle){.kbq-tab-link{corner-shape:squircle;border-radius:clamp(var(--kbq-tabs-size-tab-item-border-radius) * 1.85,var(--kbq-tabs-size-tab-item-border-radius) * 2.3 - 3.6px,var(--kbq-tabs-size-tab-item-border-radius) * 2)}}.kbq-tab-link{outline:none}.kbq-tab-link.kbq-selected{cursor:default}.kbq-tab-link.cdk-keyboard-focused{z-index:1}.kbq-tab-link.kbq-disabled{pointer-events:none}.kbq-tab-link .kbq-tab-label__content{display:flex;align-items:center;overflow:hidden;gap:var(--kbq-tabs-size-tab-item-content-gap-horizontal)}.kbq-tab-link.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{content:\"\";position:absolute;inset:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width))) calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width))}.kbq-tab-link.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):not(.kbq-tab-label_icon-only):after{content:\"\";position:absolute;left:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(var(--kbq-tabs-size-tab-item-padding-horizontal) - var(--kbq-tabs-size-tab-item-focus-outline-width));bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;background:transparent;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-link.kbq-tab-label_icon-only{width:var(--kbq-size-3xl);height:var(--kbq-size-3xl);padding:0;margin-inline:var(--kbq-size-xxs);box-sizing:content-box}.kbq-tab-link.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical){width:var(--kbq-tabs-size-tab-item-underlined-icon-only-size);height:var(--kbq-tabs-size-tab-item-underlined-icon-only-size)}.kbq-tab-link.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):before{left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)))}.kbq-tab-link.kbq-tab-label_icon-only.kbq-tab-label_underlined:not(.kbq-tab-label_vertical):after{top:auto;bottom:calc(-1 * (var(--kbq-size-s) + var(--kbq-tabs-size-tab-item-focus-outline-width)));height:3px;left:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));right:calc(-1 * var(--kbq-tabs-size-tab-item-focus-outline-width));border-radius:var(--kbq-size-3xs) var(--kbq-size-3xs) 0 0;transition:background .2s ease-in-out;pointer-events:none}.kbq-tab-link.kbq-tab-label_icon-only:not(.kbq-tab-label_vertical):after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));right:calc(-1 * (var(--kbq-size-xxs) + var(--kbq-tabs-size-tab-item-focus-outline-width)));background:transparent}.kbq-tab-link.kbq-tab-label_vertical{justify-content:flex-start}.kbq-tab-link.kbq-tab-label_vertical .kbq-tab-label__content:not(.kbq-tab-label__template){display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kbq-tab-link.kbq-tab-label_vertical.kbq-tab-label_icon-only{margin-inline:0;justify-content:center}.kbq-tab-link .kbq-tab-group_stretch-labels .kbq-tab-link{flex-basis:0;flex-grow:1}\n"] }]
|
|
2172
|
+
}], propDecorators: { tabListContainerQuery: [{ type: i0.ViewChild, args: ['tabListContainer', { isSignal: true }] }], scrollbarViewportQuery: [{ type: i0.ViewChild, args: ['tabListContainer', { ...{ read: KbqScrollbarViewport }, isSignal: true }] }], tabListQuery: [{ type: i0.ViewChild, args: ['tabList', { isSignal: true }] }], nextPaginatorQuery: [{ type: i0.ViewChild, args: ['nextPaginator', { isSignal: true }] }], previousPaginatorQuery: [{ type: i0.ViewChild, args: ['previousPaginator', { isSignal: true }] }], itemsQuery: [{ type: i0.ContentChildren, args: [forwardRef(() => KbqTabLink), { ...{ descendants: true }, isSignal: true }] }], transparent: [{ type: i0.Input, args: [{ isSignal: true, alias: "transparent", required: false }] }], onSurface: [{ type: i0.Input, args: [{ isSignal: true, alias: "onSurface", required: false }] }], underlined: [{ type: i0.Input, args: [{ isSignal: true, alias: "underlined", required: false }] }], tabNavPanel: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabNavPanel", required: false }] }] } });
|
|
1728
2173
|
/**
|
|
1729
2174
|
* Link inside of a KbqTabNavBar.
|
|
1730
2175
|
*/
|
|
1731
2176
|
class KbqTabLink {
|
|
1732
2177
|
constructor() {
|
|
2178
|
+
/** @docs-private */
|
|
2179
|
+
this.idInput = input(undefined, { ...(ngDevMode ? { debugName: "idInput" } : /* istanbul ignore next */ {}), alias: 'id' });
|
|
2180
|
+
/** @docs-private */
|
|
2181
|
+
this.activeInput = input(undefined, { ...(ngDevMode ? { debugName: "activeInput" } : /* istanbul ignore next */ {}), alias: 'active',
|
|
2182
|
+
transform: booleanAttribute });
|
|
2183
|
+
/** @docs-private */
|
|
2184
|
+
this.disabledInput = input(undefined, { ...(ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {}), alias: 'disabled',
|
|
2185
|
+
transform: booleanAttribute });
|
|
2186
|
+
/** @docs-private */
|
|
2187
|
+
this.tabIndexInput = input(undefined, { ...(ngDevMode ? { debugName: "tabIndexInput" } : /* istanbul ignore next */ {}), alias: 'tabIndex',
|
|
2188
|
+
transform: kbqOptionalNumberAttribute });
|
|
2189
|
+
this.uniqueId = `kbq-tab-link-${nextUniqueId++}`;
|
|
1733
2190
|
/** Unique id for the link. */
|
|
1734
|
-
|
|
1735
|
-
// Class of this input is referenced in the signature of another class.
|
|
1736
|
-
this.id = `kbq-tab-link-${nextUniqueId++}`;
|
|
2191
|
+
this.id = this.uniqueId;
|
|
1737
2192
|
/** Whether the tab link is active or not. */
|
|
1738
2193
|
this._active = false;
|
|
1739
2194
|
/** Whether the tab link is disabled. */
|
|
1740
|
-
// TODO: Skipped for migration because:
|
|
1741
|
-
// Class of this input is referenced in the signature of another class.
|
|
1742
2195
|
this.disabled = false;
|
|
1743
2196
|
this._tabIndex = 0;
|
|
1744
2197
|
this.elementRef = inject(ElementRef);
|
|
@@ -1747,8 +2200,6 @@ class KbqTabLink {
|
|
|
1747
2200
|
this.tabNavBar = inject(KbqTabNavBar);
|
|
1748
2201
|
}
|
|
1749
2202
|
/** Whether the link is active. */
|
|
1750
|
-
// TODO: Skipped for migration because:
|
|
1751
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1752
2203
|
get active() {
|
|
1753
2204
|
return this._active;
|
|
1754
2205
|
}
|
|
@@ -1765,8 +2216,6 @@ class KbqTabLink {
|
|
|
1765
2216
|
return this.tabNavBar.underlined();
|
|
1766
2217
|
}
|
|
1767
2218
|
/** Link tab index. */
|
|
1768
|
-
// TODO: Skipped for migration because:
|
|
1769
|
-
// Accessor inputs cannot be migrated as they are too complex.
|
|
1770
2219
|
get tabIndex() {
|
|
1771
2220
|
if (this.tabNavBar.tabNavPanel()) {
|
|
1772
2221
|
return this.active && !this.disabled ? this._tabIndex : -1;
|
|
@@ -1800,6 +2249,26 @@ class KbqTabLink {
|
|
|
1800
2249
|
get ariaCurrent() {
|
|
1801
2250
|
return this.active && !this.tabNavBar.tabNavPanel() ? 'page' : null;
|
|
1802
2251
|
}
|
|
2252
|
+
ngOnChanges(changes) {
|
|
2253
|
+
// A bound input is handed to its member, except that `undefined` resets a member
|
|
2254
|
+
// typed without it to its default; unbound, it leaves what code wrote.
|
|
2255
|
+
if (changes['idInput']) {
|
|
2256
|
+
this.id = this.idInput() ?? this.uniqueId;
|
|
2257
|
+
}
|
|
2258
|
+
if (changes['disabledInput']) {
|
|
2259
|
+
const disabled = this.disabledInput();
|
|
2260
|
+
if (disabled !== undefined)
|
|
2261
|
+
this.disabled = disabled;
|
|
2262
|
+
}
|
|
2263
|
+
if (changes['tabIndexInput'])
|
|
2264
|
+
this.tabIndex = this.tabIndexInput() ?? 0;
|
|
2265
|
+
// Last: the nav bar reads the id of the link that becomes active.
|
|
2266
|
+
if (changes['activeInput']) {
|
|
2267
|
+
const active = this.activeInput();
|
|
2268
|
+
if (active !== undefined)
|
|
2269
|
+
this.active = active;
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
1803
2272
|
ngAfterViewInit() {
|
|
1804
2273
|
this.focusMonitor.monitor(this.elementRef.nativeElement);
|
|
1805
2274
|
this.addClassModifierForIcons(Array.from(this.elementRef.nativeElement.querySelectorAll('.kbq-icon')));
|
|
@@ -1858,10 +2327,10 @@ class KbqTabLink {
|
|
|
1858
2327
|
}
|
|
1859
2328
|
}
|
|
1860
2329
|
}
|
|
1861
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1862
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
2330
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabLink, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2331
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqTabLink, isStandalone: true, selector: "[kbqTabLink], [kbq-tab-link]", inputs: { idInput: { classPropertyName: "idInput", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, activeInput: { classPropertyName: "activeInput", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, disabledInput: { classPropertyName: "disabledInput", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tabIndexInput: { classPropertyName: "tabIndexInput", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "handleFocus()", "keydown": "handleKeydown($event)" }, properties: { "class.kbq-selected": "active", "class.kbq-tab-label_vertical": "vertical", "class.kbq-tab-label_horizontal": "!vertical", "class.kbq-tab-label_underlined": "underlined", "class.kbq-disabled": "disabled", "attr.id": "id", "attr.tabindex": "tabIndex", "attr.aria-disabled": "disabled", "attr.aria-selected": "ariaSelected", "attr.role": "role", "attr.aria-controls": "ariaControls", "attr.aria-current": "ariaCurrent" }, classAttribute: "kbq-tab-link" }, exportAs: ["kbqTabLink"], usesOnChanges: true, ngImport: i0 }); }
|
|
1863
2332
|
}
|
|
1864
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabLink, decorators: [{
|
|
1865
2334
|
type: Directive,
|
|
1866
2335
|
args: [{
|
|
1867
2336
|
selector: '[kbqTabLink], [kbq-tab-link]',
|
|
@@ -1874,7 +2343,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1874
2343
|
'[class.kbq-disabled]': 'disabled',
|
|
1875
2344
|
'[attr.id]': 'id',
|
|
1876
2345
|
'[attr.tabindex]': 'tabIndex',
|
|
1877
|
-
|
|
2346
|
+
// No `[attr.disabled]`: the directive sits on an `<a>`, where `disabled` is not a valid
|
|
2347
|
+
// attribute and no assistive technology reads it. Styling goes through `.kbq-disabled`.
|
|
1878
2348
|
'[attr.aria-disabled]': 'disabled',
|
|
1879
2349
|
'[attr.aria-selected]': 'ariaSelected',
|
|
1880
2350
|
'[attr.role]': 'role',
|
|
@@ -1885,30 +2355,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
1885
2355
|
},
|
|
1886
2356
|
exportAs: 'kbqTabLink'
|
|
1887
2357
|
}]
|
|
1888
|
-
}], propDecorators: { id: [{
|
|
1889
|
-
type: Input
|
|
1890
|
-
}], active: [{
|
|
1891
|
-
type: Input,
|
|
1892
|
-
args: [{ transform: booleanAttribute }]
|
|
1893
|
-
}], disabled: [{
|
|
1894
|
-
type: Input,
|
|
1895
|
-
args: [{ transform: booleanAttribute }]
|
|
1896
|
-
}], tabIndex: [{
|
|
1897
|
-
type: Input,
|
|
1898
|
-
args: [{ transform: numberAttribute }]
|
|
1899
|
-
}] } });
|
|
2358
|
+
}], propDecorators: { idInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], activeInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], disabledInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], tabIndexInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabIndex", required: false }] }] } });
|
|
1900
2359
|
/**
|
|
1901
2360
|
* Tab panel component associated with KbqTabNav.
|
|
1902
2361
|
*/
|
|
1903
2362
|
class KbqTabNavPanel {
|
|
1904
2363
|
constructor() {
|
|
1905
2364
|
/** Unique id for the tab panel. */
|
|
1906
|
-
this.id = input(`kbq-tab-nav-panel-${nextUniqueId++}`, ...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
2365
|
+
this.id = input(`kbq-tab-nav-panel-${nextUniqueId++}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
1907
2366
|
}
|
|
1908
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1909
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
2367
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabNavPanel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2368
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.25", type: KbqTabNavPanel, isStandalone: true, selector: "[kbqTabNavPanel]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "tabpanel" }, properties: { "attr.id": "id()", "attr.aria-labelledby": "activeTabId" }, classAttribute: "kbq-tab-nav-panel" }, exportAs: ["kbqTabNavPanel"], ngImport: i0 }); }
|
|
1910
2369
|
}
|
|
1911
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2370
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabNavPanel, decorators: [{
|
|
1912
2371
|
type: Directive,
|
|
1913
2372
|
args: [{
|
|
1914
2373
|
selector: '[kbqTabNavPanel]',
|
|
@@ -1942,8 +2401,8 @@ const COMPONENTS = [
|
|
|
1942
2401
|
KbqVerticalTabsCssStyler
|
|
1943
2402
|
];
|
|
1944
2403
|
class KbqTabsModule {
|
|
1945
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1946
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2404
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2405
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: KbqTabsModule, imports: [PortalModule,
|
|
1947
2406
|
A11yModule,
|
|
1948
2407
|
CdkScrollableModule,
|
|
1949
2408
|
KbqIconModule,
|
|
@@ -1975,14 +2434,14 @@ class KbqTabsModule {
|
|
|
1975
2434
|
KbqVerticalTabsCssStyler, KbqTabNavBar,
|
|
1976
2435
|
KbqTabLink,
|
|
1977
2436
|
KbqTabNavPanel] }); }
|
|
1978
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2437
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabsModule, imports: [PortalModule,
|
|
1979
2438
|
A11yModule,
|
|
1980
2439
|
CdkScrollableModule,
|
|
1981
2440
|
KbqIconModule,
|
|
1982
2441
|
KbqToolTipModule, KbqTabNavBar, KbqTabGroup,
|
|
1983
2442
|
KbqTabHeader] }); }
|
|
1984
2443
|
}
|
|
1985
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqTabsModule, decorators: [{
|
|
1986
2445
|
type: NgModule,
|
|
1987
2446
|
args: [{
|
|
1988
2447
|
imports: [
|
|
@@ -2006,5 +2465,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
|
|
|
2006
2465
|
* Generated bundle index. Do not edit.
|
|
2007
2466
|
*/
|
|
2008
2467
|
|
|
2009
|
-
export { KBQ_TABS_CONFIG, KBQ_TAB_LABEL, KbqAlignTabsCenterCssStyler, KbqAlignTabsEndCssStyler, KbqStretchTabsCssStyler, KbqTab, KbqTabBody, KbqTabBodyPortal, KbqTabChangeEvent, KbqTabContent, KbqTabGroup, KbqTabHeader, KbqTabLabel, KbqTabLabelWrapper, KbqTabLink, KbqTabNavBar, KbqTabNavPanel, KbqTabsModule, KbqVerticalTabsCssStyler
|
|
2468
|
+
export { KBQ_TABS_CONFIG, KBQ_TAB_LABEL, KbqAlignTabsCenterCssStyler, KbqAlignTabsEndCssStyler, KbqPaginatedTabHeader, KbqStretchTabsCssStyler, KbqTab, KbqTabBody, KbqTabBodyPortal, KbqTabChangeEvent, KbqTabContent, KbqTabGroup, KbqTabHeader, KbqTabLabel, KbqTabLabelWrapper, KbqTabLink, KbqTabNavBar, KbqTabNavPanel, KbqTabsModule, KbqVerticalTabsCssStyler };
|
|
2010
2469
|
//# sourceMappingURL=koobiq-components-tabs.mjs.map
|