@koobiq/components 19.8.0 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.d.ts +238 -1
- package/actions-panel/index.d.ts +303 -5
- package/alert/index.d.ts +54 -1
- package/app-switcher/index.d.ts +239 -1
- package/autocomplete/index.d.ts +265 -1
- package/badge/index.d.ts +57 -1
- package/breadcrumbs/breadcrumbs.scss +7 -0
- package/breadcrumbs/index.d.ts +243 -1
- package/button/_button-base.scss +20 -0
- package/button/_button-theme.scss +3 -11
- package/button/button.scss +0 -11
- package/button/index.d.ts +153 -1
- package/button-toggle/index.d.ts +155 -1
- package/checkbox/index.d.ts +159 -1
- package/clamped-text/index.d.ts +144 -4
- package/code-block/_code-block-theme.scss +0 -6
- package/code-block/code-block-tokens.scss +0 -2
- package/code-block/index.d.ts +383 -1
- package/content-panel/content-panel.scss +0 -8
- package/content-panel/index.d.ts +158 -2
- package/core/highlight/_highlight-theme.scss +9 -0
- package/core/index.d.ts +4405 -1
- package/core/option/_option-theme.scss +5 -14
- package/core/styles/_koobiq-theme.scss +1 -0
- package/core/styles/theming/_components-theming.scss +0 -62
- package/datepicker/index.d.ts +699 -1
- package/divider/index.d.ts +20 -1
- package/dl/index.d.ts +37 -1
- package/dropdown/_dropdown-theme.scss +4 -8
- package/dropdown/dropdown.scss +4 -0
- package/dropdown/index.d.ts +473 -1
- package/dynamic-translation/index.d.ts +81 -2
- package/ellipsis-center/index.d.ts +38 -1
- package/empty-state/index.d.ts +45 -1
- package/fesm2022/koobiq-components-accordion.mjs +103 -114
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +16 -16
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +35 -49
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +81 -86
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +294 -304
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +35 -42
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +154 -163
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +87 -86
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +209 -96
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +50 -52
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +42 -49
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +125 -125
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +90 -107
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +1630 -618
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +285 -349
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +14 -25
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +27 -29
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +202 -167
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +23 -23
- package/fesm2022/koobiq-components-dynamic-translation.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +16 -21
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +35 -39
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +135 -234
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +321 -561
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +211 -430
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +42 -43
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +65 -60
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +116 -155
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +38 -53
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +105 -114
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +37 -44
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +31 -35
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +169 -163
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +159 -161
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +54 -55
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +36 -36
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +95 -86
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +24 -30
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +25 -32
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +94 -80
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-resizer.mjs +17 -17
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +69 -60
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +44 -35
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +249 -234
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +59 -55
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +88 -128
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +12 -12
- package/fesm2022/koobiq-components-skeleton.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +27 -20
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +110 -96
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +21 -23
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +269 -275
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +177 -267
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +37 -56
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +64 -65
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +46 -38
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +52 -58
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +23 -30
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +54 -69
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +51 -63
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +91 -119
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +25 -23
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +227 -227
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +217 -209
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +48 -48
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/index.d.ts +574 -1
- package/filter-bar/_filter-bar-theme.scss +0 -4
- package/filter-bar/index.d.ts +796 -1
- package/form-field/index.d.ts +569 -1
- package/icon/index.d.ts +162 -1
- package/index.d.ts +2 -1
- package/inline-edit/index.d.ts +171 -2
- package/input/index.d.ts +339 -1
- package/link/index.d.ts +56 -1
- package/list/index.d.ts +220 -1
- package/loader-overlay/index.d.ts +57 -1
- package/markdown/index.d.ts +68 -1
- package/modal/_modal-theme.scss +0 -8
- package/modal/index.d.ts +311 -1
- package/navbar/index.d.ts +304 -1
- package/notification-center/index.d.ts +237 -1
- package/notification-center/notification-center.scss +0 -8
- package/overflow-items/index.d.ts +161 -2
- package/package.json +10 -18
- package/popover/index.d.ts +182 -1
- package/popover/popover.scss +8 -12
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/progress-bar/index.d.ts +31 -1
- package/progress-spinner/index.d.ts +37 -1
- package/radio/index.d.ts +207 -1
- package/resizer/index.d.ts +85 -2
- package/schematics/collection.json +5 -0
- package/schematics/migrations/css-selectors/index.js +1 -1
- package/schematics/migrations/deprecated-icons/index.js +1 -1
- package/schematics/migrations/new-icons-pack/index.js +1 -1
- package/schematics/migrations/v20-upgrade/README.md +72 -0
- package/schematics/migrations/v20-upgrade/data.js +274 -0
- package/schematics/migrations/v20-upgrade/index.js +222 -0
- package/schematics/migrations/v20-upgrade/schema.json +20 -0
- package/schematics/migrations.json +10 -0
- package/schematics/ng-add/index.js +3 -4
- package/scrollbar/index.d.ts +136 -1
- package/search-expandable/index.d.ts +98 -1
- package/select/index.d.ts +693 -1
- package/sidebar/index.d.ts +92 -1
- package/sidepanel/index.d.ts +263 -1
- package/sidepanel/sidepanel.scss +0 -8
- package/skeleton/index.d.ts +26 -2
- package/split-button/index.d.ts +46 -1
- package/splitter/index.d.ts +141 -1
- package/table/index.d.ts +23 -1
- package/tabs/_tabs-common.scss +31 -1
- package/tabs/_tabs-theme.scss +2 -2
- package/tabs/index.d.ts +645 -1
- package/tags/index.d.ts +706 -1
- package/textarea/index.d.ts +134 -1
- package/time-range/index.d.ts +310 -7
- package/timepicker/index.d.ts +193 -1
- package/timezone/index.d.ts +122 -1
- package/title/index.d.ts +41 -1
- package/toast/index.d.ts +164 -1
- package/toggle/index.d.ts +84 -1
- package/tooltip/index.d.ts +163 -1
- package/top-bar/index.d.ts +33 -1
- package/tree/_tree-theme.scss +4 -0
- package/tree/index.d.ts +718 -1
- package/tree/tree-option.scss +20 -7
- package/tree-select/_tree-select-theme.scss +39 -0
- package/tree-select/index.d.ts +377 -1
- package/username/index.d.ts +176 -5
- package/accordion/accordion-content.d.ts +0 -6
- package/accordion/accordion-content.directive.d.ts +0 -27
- package/accordion/accordion-header.d.ts +0 -6
- package/accordion/accordion-header.directive.d.ts +0 -7
- package/accordion/accordion-item.d.ts +0 -77
- package/accordion/accordion-trigger.component.d.ts +0 -24
- package/accordion/accordion-trigger.directive.d.ts +0 -21
- package/accordion/accordion.component.d.ts +0 -79
- package/accordion/accordion.module.d.ts +0 -12
- package/accordion/public-api.d.ts +0 -9
- package/actions-panel/actions-panel-config.d.ts +0 -82
- package/actions-panel/actions-panel-container.d.ts +0 -90
- package/actions-panel/actions-panel-ref.d.ts +0 -44
- package/actions-panel/actions-panel.d.ts +0 -84
- package/actions-panel/module.d.ts +0 -7
- package/alert/alert.component.d.ts +0 -43
- package/alert/alert.module.d.ts +0 -9
- package/alert/public-api.d.ts +0 -2
- package/app-switcher/app-switcher-animations.d.ts +0 -5
- package/app-switcher/app-switcher-dropdown-app.d.ts +0 -11
- package/app-switcher/app-switcher-dropdown-site.d.ts +0 -9
- package/app-switcher/app-switcher.d.ts +0 -198
- package/app-switcher/app-switcher.module.d.ts +0 -10
- package/app-switcher/kbq-app-switcher-list-item.d.ts +0 -16
- package/app-switcher/public-api.d.ts +0 -6
- package/autocomplete/autocomplete-origin.directive.d.ts +0 -12
- package/autocomplete/autocomplete-trigger.directive.d.ts +0 -169
- package/autocomplete/autocomplete.component.d.ts +0 -88
- package/autocomplete/autocomplete.module.d.ts +0 -12
- package/autocomplete/public-api.d.ts +0 -4
- package/badge/badge.component.d.ts +0 -46
- package/badge/badge.module.d.ts +0 -9
- package/badge/public-api.d.ts +0 -2
- package/breadcrumbs/breadcrumbs.d.ts +0 -127
- package/breadcrumbs/breadcrumbs.module.d.ts +0 -7
- package/breadcrumbs/breadcrumbs.types.d.ts +0 -22
- package/breadcrumbs/public-api.d.ts +0 -5
- package/breadcrumbs/roving-focus-group.directive.d.ts +0 -50
- package/breadcrumbs/roving-focus-item.directive.d.ts +0 -50
- package/breadcrumbs/utils.d.ts +0 -19
- package/button/button-group.d.ts +0 -45
- package/button/button.component.d.ts +0 -59
- package/button/button.dropdown-trigger.directive.d.ts +0 -14
- package/button/button.module.d.ts +0 -12
- package/button/public-api.d.ts +0 -4
- package/button-toggle/button-toggle.component.d.ts +0 -146
- package/button-toggle/button-toggle.module.d.ts +0 -9
- package/button-toggle/public-api.d.ts +0 -2
- package/checkbox/checkbox-config.d.ts +0 -13
- package/checkbox/checkbox-module.d.ts +0 -9
- package/checkbox/checkbox-required-validator.d.ts +0 -13
- package/checkbox/checkbox.d.ts +0 -128
- package/checkbox/public-api.d.ts +0 -4
- package/clamped-text/clamped-list.d.ts +0 -41
- package/clamped-text/clamped-text.d.ts +0 -65
- package/clamped-text/constants.d.ts +0 -34
- package/clamped-text/module.d.ts +0 -8
- package/code-block/code-block-highlight.d.ts +0 -98
- package/code-block/code-block.d.ts +0 -255
- package/code-block/code-block.module.d.ts +0 -7
- package/code-block/public-api.d.ts +0 -4
- package/code-block/types.d.ts +0 -36
- package/content-panel/content-panel.d.ts +0 -149
- package/content-panel/module.d.ts +0 -7
- package/core/animation/animation.d.ts +0 -37
- package/core/animation/fade-animations.d.ts +0 -2
- package/core/animation/index.d.ts +0 -3
- package/core/animation/select-animations.d.ts +0 -12
- package/core/common-behaviors/checkbox.d.ts +0 -5
- package/core/common-behaviors/clipboard.d.ts +0 -12
- package/core/common-behaviors/color.d.ts +0 -50
- package/core/common-behaviors/common-module.d.ts +0 -38
- package/core/common-behaviors/constructor.d.ts +0 -9
- package/core/common-behaviors/disabled.d.ts +0 -8
- package/core/common-behaviors/error-state.d.ts +0 -46
- package/core/common-behaviors/flex.d.ts +0 -4
- package/core/common-behaviors/hover.d.ts +0 -15
- package/core/common-behaviors/index.d.ts +0 -14
- package/core/common-behaviors/orientation.d.ts +0 -4
- package/core/common-behaviors/read-state.d.ts +0 -12
- package/core/common-behaviors/size.d.ts +0 -4
- package/core/common-behaviors/tabindex.d.ts +0 -8
- package/core/datetime/date-adapter.d.ts +0 -12
- package/core/datetime/date-formats.d.ts +0 -4
- package/core/datetime/index.d.ts +0 -2
- package/core/error/error-state-matcher.d.ts +0 -39
- package/core/form-field/field-sizing-content.d.ts +0 -21
- package/core/form-field/form-field-ref.d.ts +0 -28
- package/core/form-field/index.d.ts +0 -2
- package/core/formatters/date/formatter.d.ts +0 -11
- package/core/formatters/date/formatter.pipe.d.ts +0 -139
- package/core/formatters/filesize/config.d.ts +0 -66
- package/core/formatters/filesize/formatter.d.ts +0 -17
- package/core/formatters/filesize/index.d.ts +0 -3
- package/core/formatters/filesize/size.d.ts +0 -52
- package/core/formatters/index.d.ts +0 -13
- package/core/formatters/number/formatter.d.ts +0 -101
- package/core/forms/forms-module.d.ts +0 -7
- package/core/forms/forms.directive.d.ts +0 -22
- package/core/forms/index.d.ts +0 -3
- package/core/forms/validators.d.ts +0 -120
- package/core/highlight/highlight.pipe.d.ts +0 -10
- package/core/highlight/index.d.ts +0 -9
- package/core/line/line.d.ts +0 -23
- package/core/locales/en-US.d.ts +0 -175
- package/core/locales/es-LA.d.ts +0 -174
- package/core/locales/formatters.d.ts +0 -190
- package/core/locales/index.d.ts +0 -9
- package/core/locales/locale-service.d.ts +0 -1112
- package/core/locales/locale-service.module.d.ts +0 -6
- package/core/locales/pt-BR.d.ts +0 -174
- package/core/locales/ru-RU.d.ts +0 -175
- package/core/locales/tk-TM.d.ts +0 -175
- package/core/locales/types.d.ts +0 -77
- package/core/navbar/index.d.ts +0 -1
- package/core/navbar/rectangle-item.d.ts +0 -14
- package/core/option/action-container.d.ts +0 -5
- package/core/option/action.d.ts +0 -38
- package/core/option/index.d.ts +0 -5
- package/core/option/optgroup.d.ts +0 -16
- package/core/option/option-module.d.ts +0 -10
- package/core/option/option.d.ts +0 -170
- package/core/overlay/overlay-position-map.d.ts +0 -40
- package/core/pop-up/constants.d.ts +0 -56
- package/core/pop-up/focus-trap-strategy.d.ts +0 -5
- package/core/pop-up/index.d.ts +0 -5
- package/core/pop-up/pop-up-styles.d.ts +0 -2
- package/core/pop-up/pop-up-trigger.d.ts +0 -104
- package/core/pop-up/pop-up.d.ts +0 -57
- package/core/public-api.d.ts +0 -23
- package/core/select/common.d.ts +0 -59
- package/core/select/constants.d.ts +0 -22
- package/core/select/errors.d.ts +0 -19
- package/core/select/events.d.ts +0 -1
- package/core/select/index.d.ts +0 -4
- package/core/selection/constants.d.ts +0 -4
- package/core/selection/index.d.ts +0 -3
- package/core/selection/pseudo-checkbox/pseudo-checkbox.d.ts +0 -23
- package/core/selection/pseudo-checkbox/pseudo-checkbox.module.d.ts +0 -8
- package/core/services/measure-scrollbar.service.d.ts +0 -11
- package/core/services/theme.service.d.ts +0 -41
- package/core/title/index.d.ts +0 -1
- package/core/title/title-text-ref.d.ts +0 -6
- package/core/tokens/index.d.ts +0 -1
- package/core/tokens/window.d.ts +0 -5
- package/core/utils/dom.d.ts +0 -4
- package/core/utils/index.d.ts +0 -2
- package/core/utils/public-api.d.ts +0 -1
- package/core/utils/utils.d.ts +0 -25
- package/core/validation/index.d.ts +0 -1
- package/core/validation/validation.d.ts +0 -29
- package/core/version.d.ts +0 -2
- package/datepicker/calendar-body.component.d.ts +0 -55
- package/datepicker/calendar-header.component.d.ts +0 -51
- package/datepicker/calendar.component.d.ts +0 -89
- package/datepicker/datepicker-animations.d.ts +0 -9
- package/datepicker/datepicker-errors.d.ts +0 -2
- package/datepicker/datepicker-input.directive.d.ts +0 -221
- package/datepicker/datepicker-intl.d.ts +0 -32
- package/datepicker/datepicker-module.d.ts +0 -21
- package/datepicker/datepicker-toggle.component.d.ts +0 -57
- package/datepicker/datepicker.component.d.ts +0 -148
- package/datepicker/month-view.component.d.ts +0 -73
- package/datepicker/public-api.d.ts +0 -10
- package/divider/divider.component.d.ts +0 -18
- package/divider/divider.module.d.ts +0 -8
- package/divider/public-api.d.ts +0 -2
- package/dl/dl.component.d.ts +0 -26
- package/dl/dl.module.d.ts +0 -9
- package/dl/public-api.d.ts +0 -2
- package/dropdown/dropdown-animations.d.ts +0 -11
- package/dropdown/dropdown-content.directive.d.ts +0 -32
- package/dropdown/dropdown-errors.d.ts +0 -17
- package/dropdown/dropdown-item.component.d.ts +0 -52
- package/dropdown/dropdown-trigger.directive.d.ts +0 -156
- package/dropdown/dropdown.component.d.ts +0 -126
- package/dropdown/dropdown.module.d.ts +0 -13
- package/dropdown/dropdown.types.d.ts +0 -67
- package/dropdown/public-api.d.ts +0 -8
- package/dynamic-translation/dynamic-translation.d.ts +0 -72
- package/dynamic-translation/module.d.ts +0 -7
- package/ellipsis-center/ellipsis-center.directive.d.ts +0 -36
- package/ellipsis-center/public-api.d.ts +0 -1
- package/empty-state/empty-state.component.d.ts +0 -36
- package/empty-state/empty-state.module.d.ts +0 -9
- package/empty-state/public-api.d.ts +0 -2
- package/fesm2022/koobiq-components-navbar-ic.mjs +0 -863
- package/fesm2022/koobiq-components-navbar-ic.mjs.map +0 -1
- package/fesm2022/koobiq-components-risk-level.mjs +0 -75
- package/fesm2022/koobiq-components-risk-level.mjs.map +0 -1
- package/file-upload/dropzone.d.ts +0 -147
- package/file-upload/file-upload.d.ts +0 -102
- package/file-upload/file-upload.module.d.ts +0 -20
- package/file-upload/multiple-file-upload.component.d.ts +0 -138
- package/file-upload/primitives/file-drop.d.ts +0 -35
- package/file-upload/primitives/file-picker.d.ts +0 -82
- package/file-upload/primitives/index.d.ts +0 -2
- package/file-upload/public-api.d.ts +0 -7
- package/file-upload/single-file-upload.component.d.ts +0 -118
- package/filter-bar/filter-bar-button.d.ts +0 -14
- package/filter-bar/filter-bar.d.ts +0 -81
- package/filter-bar/filter-bar.module.d.ts +0 -17
- package/filter-bar/filter-bar.types.d.ts +0 -143
- package/filter-bar/filter-refresher.d.ts +0 -5
- package/filter-bar/filter-reset.d.ts +0 -15
- package/filter-bar/filter-search.d.ts +0 -54
- package/filter-bar/filter-search.scss +0 -12
- package/filter-bar/filters.d.ts +0 -122
- package/filter-bar/pipe-add.d.ts +0 -28
- package/filter-bar/pipe.directive.d.ts +0 -13
- package/filter-bar/pipes/base-pipe.d.ts +0 -74
- package/filter-bar/pipes/pipe-button.d.ts +0 -21
- package/filter-bar/pipes/pipe-date.d.ts +0 -65
- package/filter-bar/pipes/pipe-datetime.d.ts +0 -66
- package/filter-bar/pipes/pipe-multi-select.d.ts +0 -56
- package/filter-bar/pipes/pipe-multi-tree-select.d.ts +0 -67
- package/filter-bar/pipes/pipe-readonly.d.ts +0 -7
- package/filter-bar/pipes/pipe-select.d.ts +0 -30
- package/filter-bar/pipes/pipe-state.d.ts +0 -21
- package/filter-bar/pipes/pipe-text.d.ts +0 -26
- package/filter-bar/pipes/pipe-title.d.ts +0 -27
- package/filter-bar/pipes/pipe-tree-select.d.ts +0 -42
- package/filter-bar/public-api.d.ts +0 -21
- package/form-field/cleaner.d.ts +0 -11
- package/form-field/error.d.ts +0 -8
- package/form-field/fieldset.d.ts +0 -27
- package/form-field/form-field-control.d.ts +0 -40
- package/form-field/form-field.d.ts +0 -298
- package/form-field/form-field.module.d.ts +0 -19
- package/form-field/hint.d.ts +0 -15
- package/form-field/label.d.ts +0 -6
- package/form-field/password-hint.d.ts +0 -53
- package/form-field/password-toggle.d.ts +0 -56
- package/form-field/prefix.d.ts +0 -6
- package/form-field/public-api.d.ts +0 -15
- package/form-field/reactive-password-hint.d.ts +0 -20
- package/form-field/stepper.d.ts +0 -59
- package/form-field/suffix.d.ts +0 -6
- package/form-field/validate.directive.d.ts +0 -53
- package/icon/icon-button.component.d.ts +0 -28
- package/icon/icon-item.component.d.ts +0 -11
- package/icon/icon-registry-providers.d.ts +0 -34
- package/icon/icon-registry.d.ts +0 -50
- package/icon/icon.component.d.ts +0 -33
- package/icon/icon.module.d.ts +0 -9
- package/icon/public-api.d.ts +0 -6
- package/inline-edit/inline-edit.d.ts +0 -161
- package/inline-edit/module.d.ts +0 -7
- package/input/input-errors.d.ts +0 -1
- package/input/input-number-validators.d.ts +0 -35
- package/input/input-number.d.ts +0 -96
- package/input/input-password.d.ts +0 -99
- package/input/input-value-accessor.d.ts +0 -4
- package/input/input.d.ts +0 -109
- package/input/input.module.d.ts +0 -14
- package/input/public-api.d.ts +0 -6
- package/link/link.component.d.ts +0 -53
- package/link/link.module.d.ts +0 -8
- package/link/public-api.d.ts +0 -2
- package/list/list-selection.component.d.ts +0 -196
- package/list/list.component.d.ts +0 -18
- package/list/list.module.d.ts +0 -11
- package/list/public-api.d.ts +0 -3
- package/loader-overlay/loader-overlay.component.d.ts +0 -47
- package/loader-overlay/loader-overlay.module.d.ts +0 -10
- package/loader-overlay/public-api.d.ts +0 -2
- package/markdown/markdown.component.d.ts +0 -31
- package/markdown/markdown.module.d.ts +0 -7
- package/markdown/markdown.service.d.ts +0 -19
- package/markdown/markdown.values.d.ts +0 -10
- package/markdown/public-api.d.ts +0 -4
- package/modal/css-unit.pipe.d.ts +0 -7
- package/modal/modal-control.service.d.ts +0 -20
- package/modal/modal-ref.class.d.ts +0 -37
- package/modal/modal-util.d.ts +0 -15
- package/modal/modal.component.d.ts +0 -141
- package/modal/modal.directive.d.ts +0 -20
- package/modal/modal.module.d.ts +0 -15
- package/modal/modal.service.d.ts +0 -42
- package/modal/modal.type.d.ts +0 -72
- package/modal/public-api.d.ts +0 -6
- package/navbar/navbar-brand.component.d.ts +0 -41
- package/navbar/navbar-item.component.d.ts +0 -131
- package/navbar/navbar-toggle.component.d.ts +0 -23
- package/navbar/navbar.component.d.ts +0 -68
- package/navbar/navbar.module.d.ts +0 -15
- package/navbar/public-api.d.ts +0 -6
- package/navbar/vertical-navbar.component.d.ts +0 -47
- package/navbar-ic/_navbar-ic-theme.scss +0 -81
- package/navbar-ic/index.d.ts +0 -1
- package/navbar-ic/navbar-ic-divider.scss +0 -7
- package/navbar-ic/navbar-ic-header.d.ts +0 -22
- package/navbar-ic/navbar-ic-header.scss +0 -49
- package/navbar-ic/navbar-ic-item.d.ts +0 -144
- package/navbar-ic/navbar-ic-item.scss +0 -92
- package/navbar-ic/navbar-ic-tokens.scss +0 -22
- package/navbar-ic/navbar-ic.animation.d.ts +0 -3
- package/navbar-ic/navbar-ic.d.ts +0 -118
- package/navbar-ic/navbar-ic.module.d.ts +0 -14
- package/navbar-ic/navbar-ic.scss +0 -32
- package/navbar-ic/public-api.d.ts +0 -4
- package/notification-center/notification-center-animations.d.ts +0 -5
- package/notification-center/notification-center.d.ts +0 -156
- package/notification-center/notification-center.module.d.ts +0 -7
- package/notification-center/notification-center.service.d.ts +0 -72
- package/notification-center/notification-item.d.ts +0 -27
- package/notification-center/public-api.d.ts +0 -4
- package/overflow-items/module.d.ts +0 -7
- package/overflow-items/overflow-items.d.ts +0 -152
- package/popover/popover-animations.d.ts +0 -4
- package/popover/popover-confirm.component.d.ts +0 -28
- package/popover/popover.component.d.ts +0 -139
- package/popover/popover.module.d.ts +0 -14
- package/popover/public-api.d.ts +0 -4
- package/progress-bar/progress-bar.component.d.ts +0 -20
- package/progress-bar/progress-bar.module.d.ts +0 -8
- package/progress-bar/public-api.d.ts +0 -2
- package/progress-spinner/progress-spinner.component.d.ts +0 -26
- package/progress-spinner/progress-spinner.module.d.ts +0 -9
- package/progress-spinner/public-api.d.ts +0 -2
- package/public-api.d.ts +0 -1
- package/radio/public-api.d.ts +0 -2
- package/radio/radio.component.d.ts +0 -200
- package/radio/radio.module.d.ts +0 -8
- package/resizer/module.d.ts +0 -7
- package/resizer/resizer.d.ts +0 -75
- package/risk-level/_risk-level-theme.scss +0 -74
- package/risk-level/index.d.ts +0 -1
- package/risk-level/public-api.d.ts +0 -2
- package/risk-level/risk-level-tokens.scss +0 -33
- package/risk-level/risk-level.component.d.ts +0 -21
- package/risk-level/risk-level.component.scss +0 -22
- package/risk-level/risk-level.module.d.ts +0 -12
- package/scrollbar/public-api.d.ts +0 -4
- package/scrollbar/scrollbar.component.d.ts +0 -37
- package/scrollbar/scrollbar.directive.d.ts +0 -29
- package/scrollbar/scrollbar.module.d.ts +0 -8
- package/scrollbar/scrollbar.types.d.ts +0 -33
- package/search-expandable/public-api.d.ts +0 -2
- package/search-expandable/search-expandable.d.ts +0 -89
- package/search-expandable/search-expandable.module.d.ts +0 -7
- package/select/public-api.d.ts +0 -4
- package/select/select-common.d.ts +0 -30
- package/select/select-option.directive.d.ts +0 -21
- package/select/select.component.d.ts +0 -627
- package/select/select.module.d.ts +0 -17
- package/sidebar/public-api.d.ts +0 -2
- package/sidebar/sidebar-animations.d.ts +0 -8
- package/sidebar/sidebar.component.d.ts +0 -80
- package/sidebar/sidebar.module.d.ts +0 -8
- package/sidepanel/public-api.d.ts +0 -6
- package/sidepanel/sidepanel-animations.d.ts +0 -20
- package/sidepanel/sidepanel-config.d.ts +0 -43
- package/sidepanel/sidepanel-container.component.d.ts +0 -67
- package/sidepanel/sidepanel-directives.d.ts +0 -61
- package/sidepanel/sidepanel-ref.d.ts +0 -36
- package/sidepanel/sidepanel.module.d.ts +0 -14
- package/sidepanel/sidepanel.service.d.ts +0 -58
- package/skeleton/module.d.ts +0 -7
- package/skeleton/skeleton.d.ts +0 -17
- package/split-button/public-api.d.ts +0 -2
- package/split-button/split-button.d.ts +0 -37
- package/split-button/split-button.module.d.ts +0 -7
- package/splitter/public-api.d.ts +0 -2
- package/splitter/splitter.component.d.ts +0 -136
- package/splitter/splitter.module.d.ts +0 -8
- package/table/public-api.d.ts +0 -2
- package/table/table.component.d.ts +0 -12
- package/table/table.module.d.ts +0 -9
- package/tabs/paginated-tab-header.d.ts +0 -182
- package/tabs/public-api.d.ts +0 -10
- package/tabs/tab-body.component.d.ts +0 -95
- package/tabs/tab-content.directive.d.ts +0 -9
- package/tabs/tab-group.component.d.ts +0 -137
- package/tabs/tab-header.component.d.ts +0 -32
- package/tabs/tab-label-wrapper.directive.d.ts +0 -29
- package/tabs/tab-label.directive.d.ts +0 -9
- package/tabs/tab-nav-bar.d.ts +0 -91
- package/tabs/tab.component.d.ts +0 -68
- package/tabs/tabs-animations.d.ts +0 -4
- package/tabs/tabs.module.d.ts +0 -20
- package/tags/public-api.d.ts +0 -5
- package/tags/tag-default-options.d.ts +0 -13
- package/tags/tag-input.d.ts +0 -110
- package/tags/tag-list.component.d.ts +0 -373
- package/tags/tag-text-control.d.ts +0 -10
- package/tags/tag.component.d.ts +0 -272
- package/tags/tag.module.d.ts +0 -10
- package/textarea/public-api.d.ts +0 -2
- package/textarea/textarea.component.d.ts +0 -123
- package/textarea/textarea.module.d.ts +0 -10
- package/time-range/constants.d.ts +0 -19
- package/time-range/module.d.ts +0 -10
- package/time-range/time-range-editor.d.ts +0 -65
- package/time-range/time-range-title-as-form-field.d.ts +0 -41
- package/time-range/time-range-title.d.ts +0 -18
- package/time-range/time-range.d.ts +0 -78
- package/time-range/time-range.service.d.ts +0 -25
- package/time-range/types.d.ts +0 -69
- package/timepicker/public-api.d.ts +0 -3
- package/timepicker/timepicker.constants.d.ts +0 -22
- package/timepicker/timepicker.directive.d.ts +0 -159
- package/timepicker/timepicker.module.d.ts +0 -11
- package/timezone/cities-by-filter.pipe.d.ts +0 -7
- package/timezone/public-api.d.ts +0 -6
- package/timezone/timezone-option.component.d.ts +0 -15
- package/timezone/timezone-option.directive.d.ts +0 -22
- package/timezone/timezone-select.component.d.ts +0 -16
- package/timezone/timezone.models.d.ts +0 -16
- package/timezone/timezone.module.d.ts +0 -20
- package/timezone/timezone.utils.d.ts +0 -22
- package/timezone/utc-offset.pipe.d.ts +0 -9
- package/title/public-api.d.ts +0 -2
- package/title/title.directive.d.ts +0 -33
- package/title/title.module.d.ts +0 -8
- package/toast/public-api.d.ts +0 -5
- package/toast/toast-animations.d.ts +0 -5
- package/toast/toast-container.component.d.ts +0 -19
- package/toast/toast.component.d.ts +0 -41
- package/toast/toast.module.d.ts +0 -8
- package/toast/toast.service.d.ts +0 -61
- package/toast/toast.type.d.ts +0 -44
- package/toggle/public-api.d.ts +0 -2
- package/toggle/toggle.component.d.ts +0 -77
- package/toggle/toggle.module.d.ts +0 -8
- package/tooltip/public-api.d.ts +0 -2
- package/tooltip/tooltip.animations.d.ts +0 -8
- package/tooltip/tooltip.component.d.ts +0 -156
- package/tooltip/tooltip.module.d.ts +0 -7
- package/top-bar/module.d.ts +0 -7
- package/top-bar/public-api.d.ts +0 -2
- package/top-bar/top-bar.d.ts +0 -25
- package/tree/control/base-tree-control.d.ts +0 -40
- package/tree/control/flat-tree-control.d.ts +0 -55
- package/tree/control/flat-tree-control.filters.d.ts +0 -27
- package/tree/control/nested-tree-control.d.ts +0 -19
- package/tree/control/tree-control.d.ts +0 -44
- package/tree/data-source/flat-data-source.d.ts +0 -80
- package/tree/data-source/nested-data-source.d.ts +0 -15
- package/tree/node.d.ts +0 -34
- package/tree/outlet.d.ts +0 -9
- package/tree/padding.directive.d.ts +0 -45
- package/tree/public-api.d.ts +0 -16
- package/tree/toggle.d.ts +0 -28
- package/tree/tree-base.d.ts +0 -96
- package/tree/tree-errors.d.ts +0 -25
- package/tree/tree-option.component.d.ts +0 -89
- package/tree/tree-selection.component.d.ts +0 -156
- package/tree/tree.d.ts +0 -6
- package/tree/tree.module.d.ts +0 -16
- package/tree-select/public-api.d.ts +0 -2
- package/tree-select/tree-select.component.d.ts +0 -360
- package/tree-select/tree-select.module.d.ts +0 -15
- package/username/constants.d.ts +0 -15
- package/username/module.d.ts +0 -8
- package/username/types.d.ts +0 -62
- package/username/username.d.ts +0 -68
- package/username/username.pipe.d.ts +0 -23
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { trigger, state, transition, style, animate, group, query } from '@angular/animations';
|
|
2
2
|
import { TemplatePortal, DomPortalOutlet } from '@angular/cdk/portal';
|
|
3
|
-
import { DOCUMENT
|
|
3
|
+
import { DOCUMENT } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { inject, Directive, InjectionToken,
|
|
5
|
+
import { inject, TemplateRef, ApplicationRef, Injector, ViewContainerRef, Directive, InjectionToken, ElementRef, booleanAttribute, Input, ContentChild, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, NgZone, contentChild, input, EventEmitter, QueryList, Output, ContentChildren, ChangeDetectorRef, Renderer2, output, numberAttribute, NgModule } from '@angular/core';
|
|
6
6
|
import { Subject, Subscription, merge, of, asapScheduler } from 'rxjs';
|
|
7
|
-
import
|
|
8
|
-
import { KbqComponentColors, KBQ_TITLE_TEXT_REF, KBQ_WINDOW, defaultOffsetY } from '@koobiq/components/core';
|
|
7
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
8
|
+
import { KbqComponentColors, KBQ_TITLE_TEXT_REF, FocusKeyManager, RIGHT_ARROW, LEFT_ARROW, ESCAPE, KBQ_WINDOW, ENTER, SPACE, DOWN_ARROW as DOWN_ARROW$1, defaultOffsetY } from '@koobiq/components/core';
|
|
9
9
|
import { KbqIcon, KbqIconModule } from '@koobiq/components/icon';
|
|
10
|
-
import
|
|
11
|
-
import * as i1$1 from '@angular/cdk/overlay';
|
|
10
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
12
11
|
import { Overlay, OverlayContainer, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
13
12
|
import { normalizePassiveListenerOptions, Platform } from '@angular/cdk/platform';
|
|
14
|
-
import { RIGHT_ARROW, LEFT_ARROW, ESCAPE, ENTER, SPACE, DOWN_ARROW as DOWN_ARROW$1 } from '@koobiq/cdk/keycodes';
|
|
15
13
|
import { startWith, switchMap, take, filter, takeUntil, delay } from 'rxjs/operators';
|
|
16
14
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
17
15
|
import { UP_ARROW, DOWN_ARROW } from '@angular/cdk/keycodes';
|
|
18
|
-
import { FocusKeyManager } from '@koobiq/cdk/a11y';
|
|
19
16
|
import { KbqFormField } from '@koobiq/components/form-field';
|
|
20
17
|
|
|
21
18
|
/**
|
|
@@ -62,12 +59,11 @@ const transformDropdown = kbqDropdownAnimations.transformDropdown;
|
|
|
62
59
|
* Dropdown content that will be rendered lazily once the dropdown is opened.
|
|
63
60
|
*/
|
|
64
61
|
class KbqDropdownContent {
|
|
65
|
-
constructor(
|
|
66
|
-
this.template =
|
|
67
|
-
this.
|
|
68
|
-
this.
|
|
69
|
-
this.
|
|
70
|
-
this.viewContainerRef = viewContainerRef;
|
|
62
|
+
constructor() {
|
|
63
|
+
this.template = inject(TemplateRef);
|
|
64
|
+
this.appRef = inject(ApplicationRef);
|
|
65
|
+
this.injector = inject(Injector);
|
|
66
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
71
67
|
this.document = inject(DOCUMENT);
|
|
72
68
|
/** Emits when the dropdown content has been attached. */
|
|
73
69
|
this.attached = new Subject();
|
|
@@ -82,7 +78,7 @@ class KbqDropdownContent {
|
|
|
82
78
|
}
|
|
83
79
|
this.detach();
|
|
84
80
|
if (!this.outlet) {
|
|
85
|
-
this.outlet = new DomPortalOutlet(this.document.createElement('div'), this.
|
|
81
|
+
this.outlet = new DomPortalOutlet(this.document.createElement('div'), this.appRef, this.injector);
|
|
86
82
|
}
|
|
87
83
|
const element = this.template.elementRef.nativeElement;
|
|
88
84
|
// Because we support opening the same dropdown from different triggers (which in turn have their
|
|
@@ -104,15 +100,15 @@ class KbqDropdownContent {
|
|
|
104
100
|
ngOnDestroy() {
|
|
105
101
|
this.outlet?.dispose();
|
|
106
102
|
}
|
|
107
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
108
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
103
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdownContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
104
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqDropdownContent, isStandalone: true, selector: "ng-template[kbqDropdownContent]", ngImport: i0 }); }
|
|
109
105
|
}
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdownContent, decorators: [{
|
|
111
107
|
type: Directive,
|
|
112
108
|
args: [{
|
|
113
109
|
selector: 'ng-template[kbqDropdownContent]'
|
|
114
110
|
}]
|
|
115
|
-
}]
|
|
111
|
+
}] });
|
|
116
112
|
|
|
117
113
|
/**
|
|
118
114
|
* Throws an exception for the case when dropdown trigger doesn't have a valid kbq-dropdown instance
|
|
@@ -170,18 +166,10 @@ function KBQ_DROPDOWN_DEFAULT_OPTIONS_FACTORY() {
|
|
|
170
166
|
* It exists mostly to set the role attribute.
|
|
171
167
|
*/
|
|
172
168
|
class KbqDropdownItem {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
if (value !== this.disabled) {
|
|
178
|
-
this._disabled = value;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
constructor(elementRef, focusMonitor, parentDropdownPanel) {
|
|
182
|
-
this.elementRef = elementRef;
|
|
183
|
-
this.focusMonitor = focusMonitor;
|
|
184
|
-
this.parentDropdownPanel = parentDropdownPanel;
|
|
169
|
+
constructor() {
|
|
170
|
+
this.elementRef = inject(ElementRef);
|
|
171
|
+
this.focusMonitor = inject(FocusMonitor);
|
|
172
|
+
this.parentDropdownPanel = inject(KBQ_DROPDOWN_PANEL, { optional: true });
|
|
185
173
|
this._disabled = false;
|
|
186
174
|
/** Stream that emits when the dropdown item is hovered. */
|
|
187
175
|
this.hovered = new Subject();
|
|
@@ -194,6 +182,16 @@ class KbqDropdownItem {
|
|
|
194
182
|
/** @docs-private */
|
|
195
183
|
this.componentColors = KbqComponentColors;
|
|
196
184
|
}
|
|
185
|
+
// TODO: Skipped for migration because:
|
|
186
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
187
|
+
get disabled() {
|
|
188
|
+
return this._disabled;
|
|
189
|
+
}
|
|
190
|
+
set disabled(value) {
|
|
191
|
+
if (value !== this.disabled) {
|
|
192
|
+
this._disabled = value;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
197
195
|
ngAfterViewInit() {
|
|
198
196
|
if (this.focusMonitor) {
|
|
199
197
|
// Start monitoring the element so it gets the appropriate focused classes. We want
|
|
@@ -232,22 +230,14 @@ class KbqDropdownItem {
|
|
|
232
230
|
getTabIndex() {
|
|
233
231
|
return this.disabled ? '-1' : '0';
|
|
234
232
|
}
|
|
235
|
-
/** Prevents the default element actions if it is disabled. */
|
|
236
|
-
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
237
|
-
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
238
|
-
// ViewEngine they're overwritten.
|
|
239
|
-
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
233
|
+
/** Prevents the default element actions if it is disabled. Bound via `host` metadata. */
|
|
240
234
|
checkDisabled(event) {
|
|
241
235
|
if (this.disabled) {
|
|
242
236
|
event.preventDefault();
|
|
243
237
|
event.stopPropagation();
|
|
244
238
|
}
|
|
245
239
|
}
|
|
246
|
-
/** Emits to the hover stream. */
|
|
247
|
-
// We have to use a `HostListener` here in order to support both Ivy and ViewEngine.
|
|
248
|
-
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
249
|
-
// ViewEngine they're overwritten.
|
|
250
|
-
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
240
|
+
/** Emits to the hover stream. Bound via `host` metadata. */
|
|
251
241
|
handleMouseEnter() {
|
|
252
242
|
this.hovered.next(this);
|
|
253
243
|
this.focus('mouse');
|
|
@@ -270,31 +260,28 @@ class KbqDropdownItem {
|
|
|
270
260
|
event.stopPropagation();
|
|
271
261
|
}
|
|
272
262
|
}
|
|
273
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
274
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
263
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdownItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
264
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqDropdownItem, isStandalone: true, selector: "kbq-dropdown-item, [kbq-dropdown-item]", inputs: { disabled: ["disabled", "disabled", booleanAttribute] }, host: { listeners: { "click": "checkDisabled($event)", "mouseenter": "handleMouseEnter()" }, properties: { "class.kbq-dropdown-item_with-icon": "icon", "class.kbq-dropdown-item_highlighted": "highlighted", "class.kbq-disabled": "disabled", "attr.disabled": "disabled || null", "attr.tabindex": "getTabIndex()" }, classAttribute: "kbq-dropdown-item" }, providers: [
|
|
275
265
|
{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqDropdownItem }
|
|
276
266
|
], queries: [{ propertyName: "icon", first: true, predicate: KbqIcon, descendants: true }], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["kbqTitleText"], descendants: true, static: true }], exportAs: ["kbqDropdownItem"], ngImport: i0, template: "<ng-content select=\"[kbq-icon]\" />\n\n<div #kbqTitleText class=\"kbq-dropdown-item__text\">\n <ng-content />\n</div>\n\n@if (isNested) {\n <i kbq-icon=\"kbq-chevron-right-s_16\" class=\"kbq-dropdown-trigger__icon\" [color]=\"componentColors.ContrastFade\"></i>\n}\n\n<div class=\"kbq-dropdown-item-overlay\" (click)=\"haltDisabledEvents($event)\"></div>\n", styles: [".kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-dropdown-item{width:100%;border-radius:var(--kbq-dropdown-item-border-radius);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;min-height:32px;gap:var(--kbq-size-s);border:var(--kbq-size-3xs) solid transparent;padding:var(--kbq-size-xxs) calc(var(--kbq-size-m) - var(--kbq-size-3xs))}.kbq-dropdown-item .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown-item .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-dropdown-item .kbq-list-text:empty{display:none}.kbq-dropdown-item .kbq-list-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-dropdown-item .kbq-list-option-caption{padding-top:var(--kbq-size-3xs)}.kbq-dropdown-item:not(.kbq-disabled){cursor:pointer}.kbq-dropdown-item{text-align:left;align-items:flex-start;text-decoration:none}.kbq-dropdown-item>.kbq-icon:first-child:before,.kbq-dropdown-item>.kbq-icon:first-child>svg{align-self:center;display:flex;height:var(--kbq-size-xl);width:16px;align-items:center}.kbq-dropdown-item .kbq-dropdown-item__caption{padding-top:var(--kbq-size-3xs)}.kbq-dropdown-item__text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown-item__text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-dropdown-item__text:empty{display:none}.kbq-dropdown-item__text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-dropdown-item-overlay{position:absolute;inset:-1px;border-radius:inherit}.kbq-dropdown__group-header{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:32px;border-left:var(--kbq-size-3xs) solid transparent;border-right:var(--kbq-size-3xs) solid transparent;padding-top:var(--kbq-size-xs);padding-left:calc(var(--kbq-size-m) - var(--kbq-size-3xs));padding-right:calc(var(--kbq-size-m) - var(--kbq-size-3xs));padding-bottom:var(--kbq-size-3xs)}.kbq-dropdown__group-header .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown__group-header .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-dropdown__group-header .kbq-list-text:empty{display:none}.kbq-dropdown__group-header .kbq-list-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-dropdown__group-header.kbq-dropdown__group-header_small{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:32px;border-left:var(--kbq-size-3xs) solid transparent;border-right:var(--kbq-size-3xs) solid transparent;padding-top:var(--kbq-size-m);padding-left:calc(var(--kbq-size-m) - var(--kbq-size-3xs));padding-right:calc(var(--kbq-size-m) - var(--kbq-size-3xs));padding-bottom:var(--kbq-size-xxs)}.kbq-dropdown__group-header.kbq-dropdown__group-header_small .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown__group-header.kbq-dropdown__group-header_small .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-dropdown__group-header.kbq-dropdown__group-header_small .kbq-list-text:empty{display:none}.kbq-dropdown__group-header.kbq-dropdown__group-header_small .kbq-list-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
277
267
|
}
|
|
278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdownItem, decorators: [{
|
|
279
269
|
type: Component,
|
|
280
270
|
args: [{ selector: 'kbq-dropdown-item, [kbq-dropdown-item]', imports: [
|
|
281
271
|
KbqIcon
|
|
282
|
-
],
|
|
272
|
+
], providers: [
|
|
273
|
+
{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqDropdownItem }
|
|
274
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
283
275
|
class: 'kbq-dropdown-item',
|
|
284
276
|
'[class.kbq-dropdown-item_with-icon]': 'icon',
|
|
285
277
|
'[class.kbq-dropdown-item_highlighted]': 'highlighted',
|
|
286
278
|
'[class.kbq-disabled]': 'disabled',
|
|
287
279
|
'[attr.disabled]': 'disabled || null',
|
|
288
|
-
'[attr.tabindex]': 'getTabIndex()'
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}],
|
|
293
|
-
type: Inject,
|
|
294
|
-
args: [KBQ_DROPDOWN_PANEL]
|
|
295
|
-
}, {
|
|
296
|
-
type: Optional
|
|
297
|
-
}] }], propDecorators: { textElement: [{
|
|
280
|
+
'[attr.tabindex]': 'getTabIndex()',
|
|
281
|
+
'(click)': 'checkDisabled($event)',
|
|
282
|
+
'(mouseenter)': 'handleMouseEnter()'
|
|
283
|
+
}, exportAs: 'kbqDropdownItem', template: "<ng-content select=\"[kbq-icon]\" />\n\n<div #kbqTitleText class=\"kbq-dropdown-item__text\">\n <ng-content />\n</div>\n\n@if (isNested) {\n <i kbq-icon=\"kbq-chevron-right-s_16\" class=\"kbq-dropdown-trigger__icon\" [color]=\"componentColors.ContrastFade\"></i>\n}\n\n<div class=\"kbq-dropdown-item-overlay\" (click)=\"haltDisabledEvents($event)\"></div>\n", styles: [".kbq-truncate-line{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-no-select{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-dropdown-item{width:100%;border-radius:var(--kbq-dropdown-item-border-radius);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;outline:none;-webkit-tap-highlight-color:transparent;min-height:32px;gap:var(--kbq-size-s);border:var(--kbq-size-3xs) solid transparent;padding:var(--kbq-size-xxs) calc(var(--kbq-size-m) - var(--kbq-size-3xs))}.kbq-dropdown-item .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown-item .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-dropdown-item .kbq-list-text:empty{display:none}.kbq-dropdown-item .kbq-list-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-dropdown-item .kbq-list-option-caption{padding-top:var(--kbq-size-3xs)}.kbq-dropdown-item:not(.kbq-disabled){cursor:pointer}.kbq-dropdown-item{text-align:left;align-items:flex-start;text-decoration:none}.kbq-dropdown-item>.kbq-icon:first-child:before,.kbq-dropdown-item>.kbq-icon:first-child>svg{align-self:center;display:flex;height:var(--kbq-size-xl);width:16px;align-items:center}.kbq-dropdown-item .kbq-dropdown-item__caption{padding-top:var(--kbq-size-3xs)}.kbq-dropdown-item__text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown-item__text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-dropdown-item__text:empty{display:none}.kbq-dropdown-item__text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-dropdown-item-overlay{position:absolute;inset:-1px;border-radius:inherit}.kbq-dropdown__group-header{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:32px;border-left:var(--kbq-size-3xs) solid transparent;border-right:var(--kbq-size-3xs) solid transparent;padding-top:var(--kbq-size-xs);padding-left:calc(var(--kbq-size-m) - var(--kbq-size-3xs));padding-right:calc(var(--kbq-size-m) - var(--kbq-size-3xs));padding-bottom:var(--kbq-size-3xs)}.kbq-dropdown__group-header .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown__group-header .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-dropdown__group-header .kbq-list-text:empty{display:none}.kbq-dropdown__group-header .kbq-list-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-dropdown__group-header.kbq-dropdown__group-header_small{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:32px;border-left:var(--kbq-size-3xs) solid transparent;border-right:var(--kbq-size-3xs) solid transparent;padding-top:var(--kbq-size-m);padding-left:calc(var(--kbq-size-m) - var(--kbq-size-3xs));padding-right:calc(var(--kbq-size-m) - var(--kbq-size-3xs));padding-bottom:var(--kbq-size-xxs)}.kbq-dropdown__group-header.kbq-dropdown__group-header_small .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown__group-header.kbq-dropdown__group-header_small .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;overflow:hidden}.kbq-dropdown__group-header.kbq-dropdown__group-header_small .kbq-list-text:empty{display:none}.kbq-dropdown__group-header.kbq-dropdown__group-header_small .kbq-list-text{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"] }]
|
|
284
|
+
}], propDecorators: { textElement: [{
|
|
298
285
|
type: ViewChild,
|
|
299
286
|
args: ['kbqTitleText', { static: true }]
|
|
300
287
|
}], icon: [{
|
|
@@ -303,26 +290,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
303
290
|
}], disabled: [{
|
|
304
291
|
type: Input,
|
|
305
292
|
args: [{ transform: booleanAttribute }]
|
|
306
|
-
}], checkDisabled: [{
|
|
307
|
-
type: HostListener,
|
|
308
|
-
args: ['click', ['$event']]
|
|
309
|
-
}], handleMouseEnter: [{
|
|
310
|
-
type: HostListener,
|
|
311
|
-
args: ['mouseenter']
|
|
312
293
|
}] } });
|
|
313
294
|
|
|
314
295
|
class KbqDropdownStaticContent {
|
|
315
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
316
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
296
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdownStaticContent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
297
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.25", type: KbqDropdownStaticContent, isStandalone: true, selector: "[kbqDropdownStaticContent]", ngImport: i0 }); }
|
|
317
298
|
}
|
|
318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
299
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdownStaticContent, decorators: [{
|
|
319
300
|
type: Directive,
|
|
320
301
|
args: [{
|
|
321
302
|
selector: '[kbqDropdownStaticContent]'
|
|
322
303
|
}]
|
|
323
304
|
}] });
|
|
324
305
|
class KbqDropdown {
|
|
306
|
+
constructor() {
|
|
307
|
+
this.elementRef = inject(ElementRef);
|
|
308
|
+
this.ngZone = inject(NgZone);
|
|
309
|
+
this.defaultOptions = inject(KBQ_DROPDOWN_DEFAULT_OPTIONS);
|
|
310
|
+
this.search = contentChild(KbqFormField, ...(ngDevMode ? [{ debugName: "search" }] : []));
|
|
311
|
+
this.navigationWithWrap = input(false, ...(ngDevMode ? [{ debugName: "navigationWithWrap" }] : []));
|
|
312
|
+
this._xPosition = this.defaultOptions.xPosition;
|
|
313
|
+
this._yPosition = this.defaultOptions.yPosition;
|
|
314
|
+
this._overlapTriggerX = this.defaultOptions.overlapTriggerX;
|
|
315
|
+
this._overlapTriggerY = this.defaultOptions.overlapTriggerY;
|
|
316
|
+
this._hasBackdrop = this.defaultOptions.hasBackdrop;
|
|
317
|
+
/** Config object to be passed into the dropdown panel's `[class]` binding */
|
|
318
|
+
this.classList = {};
|
|
319
|
+
/** Current state of the panel animation. */
|
|
320
|
+
this.panelAnimationState = 'void';
|
|
321
|
+
/** Emits whenever an animation on the dropdown completes. */
|
|
322
|
+
this.animationDone = new Subject();
|
|
323
|
+
/** Class to be added to the backdrop element. */
|
|
324
|
+
// TODO: Skipped for migration because:
|
|
325
|
+
// This input overrides a field from a superclass, while the superclass field
|
|
326
|
+
// is not migrated.
|
|
327
|
+
this.backdropClass = this.defaultOptions.backdropClass;
|
|
328
|
+
/** Event emitted when the dropdown is closed. */
|
|
329
|
+
this.closed = new EventEmitter();
|
|
330
|
+
/** Only the direct descendant menu items. */
|
|
331
|
+
this.directDescendantItems = new QueryList();
|
|
332
|
+
/** Subscription to tab events on the dropdown panel */
|
|
333
|
+
this.tabSubscription = Subscription.EMPTY;
|
|
334
|
+
}
|
|
325
335
|
/** Position of the dropdown in the X axis. */
|
|
336
|
+
// TODO: Skipped for migration because:
|
|
337
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
326
338
|
get xPosition() {
|
|
327
339
|
return this._xPosition;
|
|
328
340
|
}
|
|
@@ -334,6 +346,8 @@ class KbqDropdown {
|
|
|
334
346
|
this.setPositionClasses();
|
|
335
347
|
}
|
|
336
348
|
/** Position of the dropdown in the Y axis. */
|
|
349
|
+
// TODO: Skipped for migration because:
|
|
350
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
337
351
|
get yPosition() {
|
|
338
352
|
return this._yPosition;
|
|
339
353
|
}
|
|
@@ -345,6 +359,8 @@ class KbqDropdown {
|
|
|
345
359
|
this.setPositionClasses();
|
|
346
360
|
}
|
|
347
361
|
/** Whether the dropdown should overlap its trigger vertically. */
|
|
362
|
+
// TODO: Skipped for migration because:
|
|
363
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
348
364
|
get overlapTriggerY() {
|
|
349
365
|
return this._overlapTriggerY;
|
|
350
366
|
}
|
|
@@ -352,6 +368,8 @@ class KbqDropdown {
|
|
|
352
368
|
this._overlapTriggerY = coerceBooleanProperty(value);
|
|
353
369
|
}
|
|
354
370
|
/** Whether the dropdown should overlap its trigger horizontally. */
|
|
371
|
+
// TODO: Skipped for migration because:
|
|
372
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
355
373
|
get overlapTriggerX() {
|
|
356
374
|
return this._overlapTriggerX;
|
|
357
375
|
}
|
|
@@ -359,6 +377,8 @@ class KbqDropdown {
|
|
|
359
377
|
this._overlapTriggerX = coerceBooleanProperty(value);
|
|
360
378
|
}
|
|
361
379
|
/** Whether the dropdown has a backdrop. */
|
|
380
|
+
// TODO: Skipped for migration because:
|
|
381
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
362
382
|
get hasBackdrop() {
|
|
363
383
|
return this._hasBackdrop;
|
|
364
384
|
}
|
|
@@ -371,41 +391,21 @@ class KbqDropdown {
|
|
|
371
391
|
* to style the containing dropdown from outside the component.
|
|
372
392
|
* @param classes list of class names
|
|
373
393
|
*/
|
|
394
|
+
// TODO: Skipped for migration because:
|
|
395
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
374
396
|
set panelClass(classes) {
|
|
375
397
|
const previousPanelClass = this.previousPanelClass;
|
|
398
|
+
const classList = { ...this.classList };
|
|
376
399
|
if (previousPanelClass && previousPanelClass.length) {
|
|
377
|
-
previousPanelClass.split(' ').forEach((className) => (
|
|
400
|
+
previousPanelClass.split(' ').forEach((className) => (classList[className] = false));
|
|
378
401
|
}
|
|
379
402
|
this.previousPanelClass = classes;
|
|
380
403
|
if (classes?.length) {
|
|
381
|
-
classes.split(' ').forEach((className) => (
|
|
404
|
+
classes.split(' ').forEach((className) => (classList[className] = true));
|
|
382
405
|
this.elementRef.nativeElement.className = '';
|
|
383
406
|
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
this.elementRef = elementRef;
|
|
387
|
-
this.ngZone = ngZone;
|
|
388
|
-
this.defaultOptions = defaultOptions;
|
|
389
|
-
this.navigationWithWrap = false;
|
|
390
|
-
this._xPosition = this.defaultOptions.xPosition;
|
|
391
|
-
this._yPosition = this.defaultOptions.yPosition;
|
|
392
|
-
this._overlapTriggerX = this.defaultOptions.overlapTriggerX;
|
|
393
|
-
this._overlapTriggerY = this.defaultOptions.overlapTriggerY;
|
|
394
|
-
this._hasBackdrop = this.defaultOptions.hasBackdrop;
|
|
395
|
-
/** Config object to be passed into the dropdown's ngClass */
|
|
396
|
-
this.classList = {};
|
|
397
|
-
/** Current state of the panel animation. */
|
|
398
|
-
this.panelAnimationState = 'void';
|
|
399
|
-
/** Emits whenever an animation on the dropdown completes. */
|
|
400
|
-
this.animationDone = new Subject();
|
|
401
|
-
/** Class to be added to the backdrop element. */
|
|
402
|
-
this.backdropClass = this.defaultOptions.backdropClass;
|
|
403
|
-
/** Event emitted when the dropdown is closed. */
|
|
404
|
-
this.closed = new EventEmitter();
|
|
405
|
-
/** Only the direct descendant menu items. */
|
|
406
|
-
this.directDescendantItems = new QueryList();
|
|
407
|
-
/** Subscription to tab events on the dropdown panel */
|
|
408
|
-
this.tabSubscription = Subscription.EMPTY;
|
|
407
|
+
// Reassign a new object reference so the native `[class]` binding picks up the change.
|
|
408
|
+
this.classList = classList;
|
|
409
409
|
}
|
|
410
410
|
ngOnInit() {
|
|
411
411
|
this.setPositionClasses();
|
|
@@ -413,7 +413,7 @@ class KbqDropdown {
|
|
|
413
413
|
ngAfterContentInit() {
|
|
414
414
|
this.updateDirectDescendants();
|
|
415
415
|
this.keyManager = new FocusKeyManager(this.directDescendantItems).withTypeAhead();
|
|
416
|
-
if (this.navigationWithWrap) {
|
|
416
|
+
if (this.navigationWithWrap()) {
|
|
417
417
|
this.keyManager.withWrap();
|
|
418
418
|
}
|
|
419
419
|
this.tabSubscription = this.keyManager.tabOut.subscribe(() => this.closed.emit('tab'));
|
|
@@ -423,7 +423,7 @@ class KbqDropdown {
|
|
|
423
423
|
this.directDescendantItems.changes
|
|
424
424
|
.pipe(startWith(this.directDescendantItems), switchMap((items) => merge(...items.map((item) => item.focused))))
|
|
425
425
|
.subscribe((focusedItem) => this.keyManager.updateActiveItem(focusedItem));
|
|
426
|
-
this.search?.inOverlay.set(true);
|
|
426
|
+
this.search()?.inOverlay.set(true);
|
|
427
427
|
}
|
|
428
428
|
ngOnDestroy() {
|
|
429
429
|
this.directDescendantItems.destroy();
|
|
@@ -470,14 +470,36 @@ class KbqDropdown {
|
|
|
470
470
|
focusFirstItem(origin = 'program') {
|
|
471
471
|
// When the content is rendered lazily, it takes a bit before the items are inside the DOM.
|
|
472
472
|
if (this.lazyContent) {
|
|
473
|
-
this.ngZone.onStable
|
|
474
|
-
.pipe(take(1))
|
|
475
|
-
.subscribe(() => this.keyManager.setFocusOrigin(origin).setFirstItemActive());
|
|
473
|
+
this.ngZone.onStable.pipe(take(1)).subscribe(() => this.applyInitialFocus(origin));
|
|
476
474
|
}
|
|
477
475
|
else {
|
|
478
|
-
this.
|
|
476
|
+
this.applyInitialFocus(origin);
|
|
479
477
|
}
|
|
480
478
|
}
|
|
479
|
+
/**
|
|
480
|
+
* Applies focus when the dropdown is opened. When opened by mouse or touch, the first item
|
|
481
|
+
* should not be highlighted, so the panel itself is focused instead — keyboard events still
|
|
482
|
+
* reach the panel and the first arrow key press will highlight the first item.
|
|
483
|
+
*/
|
|
484
|
+
applyInitialFocus(origin) {
|
|
485
|
+
// The origin should be set even when no item gets activated,
|
|
486
|
+
// since `close` relies on it to emit the correct close reason.
|
|
487
|
+
this.keyManager.setFocusOrigin(origin);
|
|
488
|
+
if (origin === 'mouse' || origin === 'touch') {
|
|
489
|
+
this.focusPanel();
|
|
490
|
+
}
|
|
491
|
+
else {
|
|
492
|
+
this.keyManager.setFirstItemActive();
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
/** Moves DOM focus onto the dropdown panel so that keydown events keep being handled. */
|
|
496
|
+
focusPanel() {
|
|
497
|
+
// The panel is rendered into the overlay through a `TemplatePortal`, so it can't be
|
|
498
|
+
// queried with a `ViewChild`. If there are no rendered items, focus stays on the trigger,
|
|
499
|
+
// same as `setFirstItemActive` no-ops in that case.
|
|
500
|
+
const panel = this.directDescendantItems.first?.getHostElement().closest('.kbq-dropdown__panel');
|
|
501
|
+
panel?.focus();
|
|
502
|
+
}
|
|
481
503
|
/**
|
|
482
504
|
* Resets the active item in the dropdown. This is used when the dropdown is opened, allowing
|
|
483
505
|
* the user to start from the first option when pressing the down arrow.
|
|
@@ -494,12 +516,15 @@ class KbqDropdown {
|
|
|
494
516
|
* @docs-private
|
|
495
517
|
*/
|
|
496
518
|
setPositionClasses(posX = this.xPosition, posY = this.yPosition) {
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
519
|
+
// Reassign a new object reference so the native `[class]` binding picks up the change.
|
|
520
|
+
this.classList = {
|
|
521
|
+
...this.classList,
|
|
522
|
+
'kbq-dropdown-before': posX === 'before',
|
|
523
|
+
'kbq-dropdown-after': posX === 'after',
|
|
524
|
+
'kbq-dropdown-center': posX === 'center',
|
|
525
|
+
'kbq-dropdown-above': posY === 'above',
|
|
526
|
+
'kbq-dropdown-below': posY === 'below'
|
|
527
|
+
};
|
|
503
528
|
}
|
|
504
529
|
/** Starts the enter animation. */
|
|
505
530
|
startAnimation() {
|
|
@@ -522,7 +547,7 @@ class KbqDropdown {
|
|
|
522
547
|
// when the animation is done, however moving focus asynchronously will interrupt screen
|
|
523
548
|
// readers which are in the process of reading out the dropdown already. We take the `element`
|
|
524
549
|
// from the `event` since we can't use a `ViewChild` to access the pane.
|
|
525
|
-
if (event.toState === 'enter' && this.keyManager.activeItemIndex
|
|
550
|
+
if (event.toState === 'enter' && this.keyManager.activeItemIndex <= 0) {
|
|
526
551
|
event.element.scrollTop = 0;
|
|
527
552
|
}
|
|
528
553
|
}
|
|
@@ -542,33 +567,23 @@ class KbqDropdown {
|
|
|
542
567
|
this.directDescendantItems.notifyOnChanges();
|
|
543
568
|
});
|
|
544
569
|
}
|
|
545
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
546
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
570
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdown, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
571
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.25", type: KbqDropdown, isStandalone: true, selector: "kbq-dropdown", inputs: { navigationWithWrap: { classPropertyName: "navigationWithWrap", publicName: "navigationWithWrap", isSignal: true, isRequired: false, transformFunction: null }, xPosition: { classPropertyName: "xPosition", publicName: "xPosition", isSignal: false, isRequired: false, transformFunction: null }, yPosition: { classPropertyName: "yPosition", publicName: "yPosition", isSignal: false, isRequired: false, transformFunction: null }, overlapTriggerY: { classPropertyName: "overlapTriggerY", publicName: "overlapTriggerY", isSignal: false, isRequired: false, transformFunction: null }, overlapTriggerX: { classPropertyName: "overlapTriggerX", publicName: "overlapTriggerX", isSignal: false, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: false, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "class", isSignal: false, isRequired: false, transformFunction: null }, backdropClass: { classPropertyName: "backdropClass", publicName: "backdropClass", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, providers: [
|
|
547
572
|
{ provide: KBQ_DROPDOWN_PANEL, useExisting: KbqDropdown }
|
|
548
|
-
], queries: [{ propertyName: "search", first: true, predicate: KbqFormField, descendants: true }, { propertyName: "lazyContent", first: true, predicate: KbqDropdownContent, descendants: true }, { propertyName: "items", predicate: KbqDropdownItem, descendants: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], exportAs: ["kbqDropdown"], ngImport: i0, template: "<ng-template>\n <div\n tabindex=\"-1\"\n class=\"kbq-dropdown__panel\"\n [class.kbq-dropdown__panel_nested]=\"parent\"\n [ngClass]=\"classList\"\n [@transformDropdown]=\"panelAnimationState\"\n (@transformDropdown.done)=\"onAnimationDone($event)\"\n (@transformDropdown.start)=\"onAnimationStart($event)\"\n (click)=\"close()\"\n (keydown)=\"handleKeydown($event)\"\n >\n <div class=\"kbq-dropdown__content\">\n <ng-content />\n </div>\n </div>\n</ng-template>\n\n<ng-content select=\"[kbqDropdownStaticContent]\" />\n", styles: [".kbq-dropdown-trigger.kbq-button{padding-left:calc(10px - var(--kbq-size-border-width));padding-right:calc(10px - var(--kbq-size-border-width))}.kbq-dropdown-trigger.kbq-button .kbq-icon_left{margin-right:var(--kbq-size-xs)}.kbq-dropdown-trigger.kbq-button .kbq-icon_right{margin-left:var(--kbq-size-3xs)}.kbq-dropdown-trigger.kbq-button-icon.kbq-button-icon_right.kbq-button-icon_left .kbq-icon_left{margin-right:0}.kbq-dropdown-trigger.kbq-button-icon.kbq-button-icon_right.kbq-button-icon_left .kbq-icon_right{margin-left:0}.kbq-dropdown-trigger__icon{margin-left:auto;align-self:center}.kbq-dropdown__panel{overflow-x:hidden;overflow-y:auto;min-width:max(var(--kbq-dropdown-size-container-width-min),100%);max-width:var(--kbq-dropdown-size-container-width-max);border-radius:var(--kbq-dropdown-size-container-border-radius);box-sizing:border-box;padding:var(--kbq-size-xxs)}.kbq-dropdown__panel.ng-animating{pointer-events:none}.kbq-dropdown__panel .kbq-dropdown-item{position:relative}.kbq-dropdown__panel .kbq-dropdown-item:before,.kbq-dropdown__panel .kbq-dropdown-item:after{position:absolute;content:\"\";width:var(--kbq-size-xxs);height:calc(100% + var(--kbq-size-3xs) * 2)}.kbq-dropdown__panel .kbq-dropdown-item:before{right:calc(100% + var(--kbq-size-3xs))}.kbq-dropdown__panel .kbq-dropdown-item:after{left:calc(100% + var(--kbq-size-3xs))}.kbq-dropdown__panel .kbq-dropdown-item:before,.kbq-dropdown__panel .kbq-dropdown-item:after{top:calc(-1 * var(--kbq-size-3xs));bottom:calc(-1 * var(--kbq-size-3xs))}.kbq-dropdown__panel .kbq-divider{margin-left:calc(var(--kbq-size-xxs) * -1);margin-right:calc(var(--kbq-size-xxs) * -1)}.kbq-dropdown__content{display:flex;flex-direction:column}.kbq-dropdown__panel{box-shadow:var(--kbq-dropdown-container-shadow);background:var(--kbq-dropdown-container-background)}.kbq-dropdown-item{background:var(--kbq-list-default-container-background);color:var(--kbq-list-default-text-color)}.kbq-dropdown-item .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-default-text-color)}.kbq-dropdown-item .kbq-dropdown-item__caption{color:var(--kbq-dropdown-item-caption-color)}.kbq-dropdown-item.kbq-dropdown-item_highlighted,.kbq-dropdown-item:hover:not(.kbq-disabled){background:var(--kbq-list-states-hover-container-background);color:var(--kbq-list-states-hover-text-color)}.kbq-dropdown-item.kbq-dropdown-item_highlighted .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item),.kbq-dropdown-item:hover:not(.kbq-disabled) .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-hover-text-color)}.kbq-dropdown-item.cdk-keyboard-focused{border-color:var(--kbq-list-states-focused-focus-outline-color)}.kbq-dropdown-item.kbq-selected{background:var(--kbq-list-states-selected-container-background);color:var(--kbq-list-states-selected-text-color)}.kbq-dropdown-item.kbq-selected .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-selected-text-color)}.kbq-dropdown-item.kbq-selected:hover:not(.kbq-disabled){background:var(--kbq-list-states-selected-hover-container-background);color:var(--kbq-list-states-selected-hover-text-color)}.kbq-dropdown-item.kbq-selected:hover:not(.kbq-disabled) .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-selected-hover-text-color)}.kbq-dropdown-item.kbq-disabled{background:var(--kbq-list-states-disabled-container-background);color:var(--kbq-list-states-disabled-text-color)}.kbq-dropdown-item.kbq-disabled .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-disabled-text-color)}.kbq-dropdown-item:is(.kbq-selected,.cdk-keyboard-focused):has(+:is(.kbq-selected,.cdk-keyboard-focused)){border-bottom-left-radius:0;border-bottom-right-radius:0}.kbq-dropdown-item:is(.kbq-selected,.cdk-keyboard-focused)+:is(.kbq-selected,.cdk-keyboard-focused){border-top-left-radius:0;border-top-right-radius:0}.kbq-dropdown__group-header.kbq-dropdown__group-header_small{color:var(--kbq-foreground-contrast-secondary)}.kbq-dropdown-item-overlay{background:transparent}.kbq-dropdown-item,.kbq-dropdown__content{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-dropdown-item .kbq-dropdown-item__caption,.kbq-dropdown__content .kbq-dropdown-item__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}.kbq-dropdown__group-header{font-size:var(--kbq-typography-big-strong-font-size);font-style:var(--kbq-typography-big-strong-font-style);font-weight:var(--kbq-typography-big-strong-font-weight);line-height:var(--kbq-typography-big-strong-line-height);font-family:var(--kbq-typography-big-strong-font-family);text-transform:var(--kbq-typography-big-strong-text-transform);font-feature-settings:var(--kbq-typography-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-big-strong-letter-spacing)}.kbq-dropdown__group-header.kbq-dropdown__group-header_small{font-size:var(--kbq-typography-caps-compact-strong-font-size);font-style:var(--kbq-typography-caps-compact-strong-font-style);font-weight:var(--kbq-typography-caps-compact-strong-font-weight);line-height:var(--kbq-typography-caps-compact-strong-line-height);font-family:var(--kbq-typography-caps-compact-strong-font-family);text-transform:var(--kbq-typography-caps-compact-strong-text-transform);font-feature-settings:var(--kbq-typography-caps-compact-strong-font-feature-settings);letter-spacing:var(--kbq-typography-caps-compact-strong-letter-spacing)}\n", ".kbq-list,.kbq-list-selection{--kbq-list-size-container-padding-left: var(--kbq-size-m);--kbq-list-size-container-padding-right: var(--kbq-size-m);--kbq-list-size-container-padding-vertical: var(--kbq-size-xs);--kbq-list-size-container-content-gap-horizontal: var(--kbq-size-s);--kbq-list-size-container-content-gap-vertical: var(--kbq-size-3xs);--kbq-list-size-container-focus-outline-width: var(--kbq-size-3xs);--kbq-list-size-header-padding-top: var(--kbq-size-s);--kbq-list-size-header-padding-bottom: var(--kbq-size-xxs);--kbq-list-size-header-padding-horizontal: var(--kbq-size-m);--kbq-list-size-subheading-padding-top: var(--kbq-size-m);--kbq-list-size-subheading-padding-bottom: var(--kbq-size-xxs);--kbq-list-size-subheading-padding-horizontal: var(--kbq-size-m);--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled)}.kbq-dropdown__panel{--kbq-dropdown-size-container-width-min: 200px;--kbq-dropdown-size-container-width-max: 640px;--kbq-dropdown-size-container-padding-vertical: var(--kbq-size-xxs);--kbq-dropdown-size-container-border-radius: var(--kbq-size-s);--kbq-dropdown-container-background: var(--kbq-background-card);--kbq-dropdown-container-shadow: var(--kbq-shadow-popup);--kbq-dropdown-item-border-radius: var(--kbq-size-xs);--kbq-dropdown-item-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled)}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [
|
|
573
|
+
], queries: [{ propertyName: "search", first: true, predicate: KbqFormField, descendants: true, isSignal: true }, { propertyName: "lazyContent", first: true, predicate: KbqDropdownContent, descendants: true }, { propertyName: "items", predicate: KbqDropdownItem, descendants: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], exportAs: ["kbqDropdown"], ngImport: i0, template: "<ng-template>\n <div\n tabindex=\"-1\"\n class=\"kbq-dropdown__panel\"\n [class.kbq-dropdown__panel_nested]=\"parent\"\n [class]=\"classList\"\n [@transformDropdown]=\"panelAnimationState\"\n (@transformDropdown.done)=\"onAnimationDone($event)\"\n (@transformDropdown.start)=\"onAnimationStart($event)\"\n (click)=\"close()\"\n (keydown)=\"handleKeydown($event)\"\n >\n <div class=\"kbq-dropdown__content\">\n <ng-content />\n </div>\n </div>\n</ng-template>\n\n<ng-content select=\"[kbqDropdownStaticContent]\" />\n", styles: [".kbq-dropdown-trigger.kbq-button{padding-left:calc(10px - var(--kbq-size-border-width));padding-right:calc(10px - var(--kbq-size-border-width))}.kbq-dropdown-trigger.kbq-button .kbq-icon_left{margin-right:var(--kbq-size-xs)}.kbq-dropdown-trigger.kbq-button .kbq-icon_right{margin-left:var(--kbq-size-3xs)}.kbq-dropdown-trigger.kbq-button-icon.kbq-button-icon_right.kbq-button-icon_left .kbq-icon_left{margin-right:0}.kbq-dropdown-trigger.kbq-button-icon.kbq-button-icon_right.kbq-button-icon_left .kbq-icon_right{margin-left:0}.kbq-dropdown-trigger__icon{margin-left:auto;align-self:center}.kbq-dropdown__panel{outline:none;overflow-x:hidden;overflow-y:auto;min-width:max(var(--kbq-dropdown-size-container-width-min),100%);max-width:var(--kbq-dropdown-size-container-width-max);border-radius:var(--kbq-dropdown-size-container-border-radius);box-sizing:border-box;padding:var(--kbq-size-xxs)}.kbq-dropdown__panel.ng-animating{pointer-events:none}.kbq-dropdown__panel .kbq-dropdown-item{position:relative}.kbq-dropdown__panel .kbq-dropdown-item:before,.kbq-dropdown__panel .kbq-dropdown-item:after{position:absolute;content:\"\";width:var(--kbq-size-xxs);height:calc(100% + var(--kbq-size-3xs) * 2)}.kbq-dropdown__panel .kbq-dropdown-item:before{right:calc(100% + var(--kbq-size-3xs))}.kbq-dropdown__panel .kbq-dropdown-item:after{left:calc(100% + var(--kbq-size-3xs))}.kbq-dropdown__panel .kbq-dropdown-item:before,.kbq-dropdown__panel .kbq-dropdown-item:after{top:calc(-1 * var(--kbq-size-3xs));bottom:calc(-1 * var(--kbq-size-3xs))}.kbq-dropdown__panel .kbq-divider{margin-left:calc(var(--kbq-size-xxs) * -1);margin-right:calc(var(--kbq-size-xxs) * -1)}.kbq-dropdown__content{display:flex;flex-direction:column}.kbq-dropdown__panel{box-shadow:var(--kbq-dropdown-container-shadow);background:var(--kbq-dropdown-container-background)}.kbq-dropdown-item{background:var(--kbq-list-default-container-background);color:var(--kbq-list-default-text-color)}.kbq-dropdown-item .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-default-text-color)}.kbq-dropdown-item .kbq-dropdown-item__caption{color:var(--kbq-dropdown-item-caption-color)}.kbq-dropdown-item.kbq-dropdown-item_highlighted,.kbq-dropdown-item.cdk-focused:not(.kbq-disabled){background:var(--kbq-list-states-hover-container-background);color:var(--kbq-list-states-hover-text-color)}.kbq-dropdown-item.kbq-dropdown-item_highlighted .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item),.kbq-dropdown-item.cdk-focused:not(.kbq-disabled) .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-hover-text-color)}.kbq-dropdown-item.kbq-selected{background:var(--kbq-list-states-selected-container-background);color:var(--kbq-list-states-selected-text-color)}.kbq-dropdown-item.kbq-selected .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-selected-text-color)}.kbq-dropdown-item.kbq-selected.cdk-focused:not(.kbq-disabled){background:var(--kbq-list-states-selected-hover-container-background);color:var(--kbq-list-states-selected-hover-text-color)}.kbq-dropdown-item.kbq-selected.cdk-focused:not(.kbq-disabled) .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-selected-hover-text-color)}.kbq-dropdown-item.kbq-disabled{background:var(--kbq-list-states-disabled-container-background);color:var(--kbq-list-states-disabled-text-color)}.kbq-dropdown-item.kbq-disabled .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-disabled-text-color)}.kbq-dropdown-item:is(.kbq-selected,.cdk-focused):has(+:is(.kbq-selected,.cdk-focused)){border-bottom-left-radius:0;border-bottom-right-radius:0}.kbq-dropdown-item:is(.kbq-selected,.cdk-focused)+:is(.kbq-selected,.cdk-focused){border-top-left-radius:0;border-top-right-radius:0}.kbq-dropdown__group-header.kbq-dropdown__group-header_small{color:var(--kbq-foreground-contrast-secondary)}.kbq-dropdown-item-overlay{background:transparent}.kbq-dropdown-item,.kbq-dropdown__content{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-dropdown-item .kbq-dropdown-item__caption,.kbq-dropdown__content .kbq-dropdown-item__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}.kbq-dropdown__group-header{font-size:var(--kbq-typography-big-strong-font-size);font-style:var(--kbq-typography-big-strong-font-style);font-weight:var(--kbq-typography-big-strong-font-weight);line-height:var(--kbq-typography-big-strong-line-height);font-family:var(--kbq-typography-big-strong-font-family);text-transform:var(--kbq-typography-big-strong-text-transform);font-feature-settings:var(--kbq-typography-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-big-strong-letter-spacing)}.kbq-dropdown__group-header.kbq-dropdown__group-header_small{font-size:var(--kbq-typography-caps-compact-strong-font-size);font-style:var(--kbq-typography-caps-compact-strong-font-style);font-weight:var(--kbq-typography-caps-compact-strong-font-weight);line-height:var(--kbq-typography-caps-compact-strong-line-height);font-family:var(--kbq-typography-caps-compact-strong-font-family);text-transform:var(--kbq-typography-caps-compact-strong-text-transform);font-feature-settings:var(--kbq-typography-caps-compact-strong-font-feature-settings);letter-spacing:var(--kbq-typography-caps-compact-strong-letter-spacing)}\n", ".kbq-list,.kbq-list-selection{--kbq-list-size-container-padding-left: var(--kbq-size-m);--kbq-list-size-container-padding-right: var(--kbq-size-m);--kbq-list-size-container-padding-vertical: var(--kbq-size-xs);--kbq-list-size-container-content-gap-horizontal: var(--kbq-size-s);--kbq-list-size-container-content-gap-vertical: var(--kbq-size-3xs);--kbq-list-size-container-focus-outline-width: var(--kbq-size-3xs);--kbq-list-size-header-padding-top: var(--kbq-size-s);--kbq-list-size-header-padding-bottom: var(--kbq-size-xxs);--kbq-list-size-header-padding-horizontal: var(--kbq-size-m);--kbq-list-size-subheading-padding-top: var(--kbq-size-m);--kbq-list-size-subheading-padding-bottom: var(--kbq-size-xxs);--kbq-list-size-subheading-padding-horizontal: var(--kbq-size-m);--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled)}.kbq-dropdown__panel{--kbq-dropdown-size-container-width-min: 200px;--kbq-dropdown-size-container-width-max: 640px;--kbq-dropdown-size-container-padding-vertical: var(--kbq-size-xxs);--kbq-dropdown-size-container-border-radius: var(--kbq-size-s);--kbq-dropdown-container-background: var(--kbq-background-card);--kbq-dropdown-container-shadow: var(--kbq-shadow-popup);--kbq-dropdown-item-border-radius: var(--kbq-size-xs);--kbq-dropdown-item-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled)}\n"], animations: [
|
|
549
574
|
kbqDropdownAnimations.transformDropdown,
|
|
550
575
|
kbqDropdownAnimations.fadeInItems
|
|
551
576
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
552
577
|
}
|
|
553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
578
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdown, decorators: [{
|
|
554
579
|
type: Component,
|
|
555
|
-
args: [{ selector: 'kbq-dropdown', imports: [
|
|
556
|
-
|
|
557
|
-
],
|
|
580
|
+
args: [{ selector: 'kbq-dropdown', imports: [], providers: [
|
|
581
|
+
{ provide: KBQ_DROPDOWN_PANEL, useExisting: KbqDropdown }
|
|
582
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, animations: [
|
|
558
583
|
kbqDropdownAnimations.transformDropdown,
|
|
559
584
|
kbqDropdownAnimations.fadeInItems
|
|
560
|
-
], providers: [
|
|
561
|
-
|
|
562
|
-
], template: "<ng-template>\n <div\n tabindex=\"-1\"\n class=\"kbq-dropdown__panel\"\n [class.kbq-dropdown__panel_nested]=\"parent\"\n [ngClass]=\"classList\"\n [@transformDropdown]=\"panelAnimationState\"\n (@transformDropdown.done)=\"onAnimationDone($event)\"\n (@transformDropdown.start)=\"onAnimationStart($event)\"\n (click)=\"close()\"\n (keydown)=\"handleKeydown($event)\"\n >\n <div class=\"kbq-dropdown__content\">\n <ng-content />\n </div>\n </div>\n</ng-template>\n\n<ng-content select=\"[kbqDropdownStaticContent]\" />\n", styles: [".kbq-dropdown-trigger.kbq-button{padding-left:calc(10px - var(--kbq-size-border-width));padding-right:calc(10px - var(--kbq-size-border-width))}.kbq-dropdown-trigger.kbq-button .kbq-icon_left{margin-right:var(--kbq-size-xs)}.kbq-dropdown-trigger.kbq-button .kbq-icon_right{margin-left:var(--kbq-size-3xs)}.kbq-dropdown-trigger.kbq-button-icon.kbq-button-icon_right.kbq-button-icon_left .kbq-icon_left{margin-right:0}.kbq-dropdown-trigger.kbq-button-icon.kbq-button-icon_right.kbq-button-icon_left .kbq-icon_right{margin-left:0}.kbq-dropdown-trigger__icon{margin-left:auto;align-self:center}.kbq-dropdown__panel{overflow-x:hidden;overflow-y:auto;min-width:max(var(--kbq-dropdown-size-container-width-min),100%);max-width:var(--kbq-dropdown-size-container-width-max);border-radius:var(--kbq-dropdown-size-container-border-radius);box-sizing:border-box;padding:var(--kbq-size-xxs)}.kbq-dropdown__panel.ng-animating{pointer-events:none}.kbq-dropdown__panel .kbq-dropdown-item{position:relative}.kbq-dropdown__panel .kbq-dropdown-item:before,.kbq-dropdown__panel .kbq-dropdown-item:after{position:absolute;content:\"\";width:var(--kbq-size-xxs);height:calc(100% + var(--kbq-size-3xs) * 2)}.kbq-dropdown__panel .kbq-dropdown-item:before{right:calc(100% + var(--kbq-size-3xs))}.kbq-dropdown__panel .kbq-dropdown-item:after{left:calc(100% + var(--kbq-size-3xs))}.kbq-dropdown__panel .kbq-dropdown-item:before,.kbq-dropdown__panel .kbq-dropdown-item:after{top:calc(-1 * var(--kbq-size-3xs));bottom:calc(-1 * var(--kbq-size-3xs))}.kbq-dropdown__panel .kbq-divider{margin-left:calc(var(--kbq-size-xxs) * -1);margin-right:calc(var(--kbq-size-xxs) * -1)}.kbq-dropdown__content{display:flex;flex-direction:column}.kbq-dropdown__panel{box-shadow:var(--kbq-dropdown-container-shadow);background:var(--kbq-dropdown-container-background)}.kbq-dropdown-item{background:var(--kbq-list-default-container-background);color:var(--kbq-list-default-text-color)}.kbq-dropdown-item .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-default-text-color)}.kbq-dropdown-item .kbq-dropdown-item__caption{color:var(--kbq-dropdown-item-caption-color)}.kbq-dropdown-item.kbq-dropdown-item_highlighted,.kbq-dropdown-item:hover:not(.kbq-disabled){background:var(--kbq-list-states-hover-container-background);color:var(--kbq-list-states-hover-text-color)}.kbq-dropdown-item.kbq-dropdown-item_highlighted .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item),.kbq-dropdown-item:hover:not(.kbq-disabled) .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-hover-text-color)}.kbq-dropdown-item.cdk-keyboard-focused{border-color:var(--kbq-list-states-focused-focus-outline-color)}.kbq-dropdown-item.kbq-selected{background:var(--kbq-list-states-selected-container-background);color:var(--kbq-list-states-selected-text-color)}.kbq-dropdown-item.kbq-selected .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-selected-text-color)}.kbq-dropdown-item.kbq-selected:hover:not(.kbq-disabled){background:var(--kbq-list-states-selected-hover-container-background);color:var(--kbq-list-states-selected-hover-text-color)}.kbq-dropdown-item.kbq-selected:hover:not(.kbq-disabled) .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-selected-hover-text-color)}.kbq-dropdown-item.kbq-disabled{background:var(--kbq-list-states-disabled-container-background);color:var(--kbq-list-states-disabled-text-color)}.kbq-dropdown-item.kbq-disabled .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-disabled-text-color)}.kbq-dropdown-item:is(.kbq-selected,.cdk-keyboard-focused):has(+:is(.kbq-selected,.cdk-keyboard-focused)){border-bottom-left-radius:0;border-bottom-right-radius:0}.kbq-dropdown-item:is(.kbq-selected,.cdk-keyboard-focused)+:is(.kbq-selected,.cdk-keyboard-focused){border-top-left-radius:0;border-top-right-radius:0}.kbq-dropdown__group-header.kbq-dropdown__group-header_small{color:var(--kbq-foreground-contrast-secondary)}.kbq-dropdown-item-overlay{background:transparent}.kbq-dropdown-item,.kbq-dropdown__content{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-dropdown-item .kbq-dropdown-item__caption,.kbq-dropdown__content .kbq-dropdown-item__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}.kbq-dropdown__group-header{font-size:var(--kbq-typography-big-strong-font-size);font-style:var(--kbq-typography-big-strong-font-style);font-weight:var(--kbq-typography-big-strong-font-weight);line-height:var(--kbq-typography-big-strong-line-height);font-family:var(--kbq-typography-big-strong-font-family);text-transform:var(--kbq-typography-big-strong-text-transform);font-feature-settings:var(--kbq-typography-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-big-strong-letter-spacing)}.kbq-dropdown__group-header.kbq-dropdown__group-header_small{font-size:var(--kbq-typography-caps-compact-strong-font-size);font-style:var(--kbq-typography-caps-compact-strong-font-style);font-weight:var(--kbq-typography-caps-compact-strong-font-weight);line-height:var(--kbq-typography-caps-compact-strong-line-height);font-family:var(--kbq-typography-caps-compact-strong-font-family);text-transform:var(--kbq-typography-caps-compact-strong-text-transform);font-feature-settings:var(--kbq-typography-caps-compact-strong-font-feature-settings);letter-spacing:var(--kbq-typography-caps-compact-strong-letter-spacing)}\n", ".kbq-list,.kbq-list-selection{--kbq-list-size-container-padding-left: var(--kbq-size-m);--kbq-list-size-container-padding-right: var(--kbq-size-m);--kbq-list-size-container-padding-vertical: var(--kbq-size-xs);--kbq-list-size-container-content-gap-horizontal: var(--kbq-size-s);--kbq-list-size-container-content-gap-vertical: var(--kbq-size-3xs);--kbq-list-size-container-focus-outline-width: var(--kbq-size-3xs);--kbq-list-size-header-padding-top: var(--kbq-size-s);--kbq-list-size-header-padding-bottom: var(--kbq-size-xxs);--kbq-list-size-header-padding-horizontal: var(--kbq-size-m);--kbq-list-size-subheading-padding-top: var(--kbq-size-m);--kbq-list-size-subheading-padding-bottom: var(--kbq-size-xxs);--kbq-list-size-subheading-padding-horizontal: var(--kbq-size-m);--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled)}.kbq-dropdown__panel{--kbq-dropdown-size-container-width-min: 200px;--kbq-dropdown-size-container-width-max: 640px;--kbq-dropdown-size-container-padding-vertical: var(--kbq-size-xxs);--kbq-dropdown-size-container-border-radius: var(--kbq-size-s);--kbq-dropdown-container-background: var(--kbq-background-card);--kbq-dropdown-container-shadow: var(--kbq-shadow-popup);--kbq-dropdown-item-border-radius: var(--kbq-size-xs);--kbq-dropdown-item-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled)}\n"] }]
|
|
563
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
564
|
-
type: Inject,
|
|
565
|
-
args: [KBQ_DROPDOWN_DEFAULT_OPTIONS]
|
|
566
|
-
}] }], propDecorators: { search: [{
|
|
567
|
-
type: ContentChild,
|
|
568
|
-
args: [KbqFormField]
|
|
569
|
-
}], navigationWithWrap: [{
|
|
570
|
-
type: Input
|
|
571
|
-
}], xPosition: [{
|
|
585
|
+
], exportAs: 'kbqDropdown', template: "<ng-template>\n <div\n tabindex=\"-1\"\n class=\"kbq-dropdown__panel\"\n [class.kbq-dropdown__panel_nested]=\"parent\"\n [class]=\"classList\"\n [@transformDropdown]=\"panelAnimationState\"\n (@transformDropdown.done)=\"onAnimationDone($event)\"\n (@transformDropdown.start)=\"onAnimationStart($event)\"\n (click)=\"close()\"\n (keydown)=\"handleKeydown($event)\"\n >\n <div class=\"kbq-dropdown__content\">\n <ng-content />\n </div>\n </div>\n</ng-template>\n\n<ng-content select=\"[kbqDropdownStaticContent]\" />\n", styles: [".kbq-dropdown-trigger.kbq-button{padding-left:calc(10px - var(--kbq-size-border-width));padding-right:calc(10px - var(--kbq-size-border-width))}.kbq-dropdown-trigger.kbq-button .kbq-icon_left{margin-right:var(--kbq-size-xs)}.kbq-dropdown-trigger.kbq-button .kbq-icon_right{margin-left:var(--kbq-size-3xs)}.kbq-dropdown-trigger.kbq-button-icon.kbq-button-icon_right.kbq-button-icon_left .kbq-icon_left{margin-right:0}.kbq-dropdown-trigger.kbq-button-icon.kbq-button-icon_right.kbq-button-icon_left .kbq-icon_right{margin-left:0}.kbq-dropdown-trigger__icon{margin-left:auto;align-self:center}.kbq-dropdown__panel{outline:none;overflow-x:hidden;overflow-y:auto;min-width:max(var(--kbq-dropdown-size-container-width-min),100%);max-width:var(--kbq-dropdown-size-container-width-max);border-radius:var(--kbq-dropdown-size-container-border-radius);box-sizing:border-box;padding:var(--kbq-size-xxs)}.kbq-dropdown__panel.ng-animating{pointer-events:none}.kbq-dropdown__panel .kbq-dropdown-item{position:relative}.kbq-dropdown__panel .kbq-dropdown-item:before,.kbq-dropdown__panel .kbq-dropdown-item:after{position:absolute;content:\"\";width:var(--kbq-size-xxs);height:calc(100% + var(--kbq-size-3xs) * 2)}.kbq-dropdown__panel .kbq-dropdown-item:before{right:calc(100% + var(--kbq-size-3xs))}.kbq-dropdown__panel .kbq-dropdown-item:after{left:calc(100% + var(--kbq-size-3xs))}.kbq-dropdown__panel .kbq-dropdown-item:before,.kbq-dropdown__panel .kbq-dropdown-item:after{top:calc(-1 * var(--kbq-size-3xs));bottom:calc(-1 * var(--kbq-size-3xs))}.kbq-dropdown__panel .kbq-divider{margin-left:calc(var(--kbq-size-xxs) * -1);margin-right:calc(var(--kbq-size-xxs) * -1)}.kbq-dropdown__content{display:flex;flex-direction:column}.kbq-dropdown__panel{box-shadow:var(--kbq-dropdown-container-shadow);background:var(--kbq-dropdown-container-background)}.kbq-dropdown-item{background:var(--kbq-list-default-container-background);color:var(--kbq-list-default-text-color)}.kbq-dropdown-item .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-default-text-color)}.kbq-dropdown-item .kbq-dropdown-item__caption{color:var(--kbq-dropdown-item-caption-color)}.kbq-dropdown-item.kbq-dropdown-item_highlighted,.kbq-dropdown-item.cdk-focused:not(.kbq-disabled){background:var(--kbq-list-states-hover-container-background);color:var(--kbq-list-states-hover-text-color)}.kbq-dropdown-item.kbq-dropdown-item_highlighted .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item),.kbq-dropdown-item.cdk-focused:not(.kbq-disabled) .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-hover-text-color)}.kbq-dropdown-item.kbq-selected{background:var(--kbq-list-states-selected-container-background);color:var(--kbq-list-states-selected-text-color)}.kbq-dropdown-item.kbq-selected .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-selected-text-color)}.kbq-dropdown-item.kbq-selected.cdk-focused:not(.kbq-disabled){background:var(--kbq-list-states-selected-hover-container-background);color:var(--kbq-list-states-selected-hover-text-color)}.kbq-dropdown-item.kbq-selected.cdk-focused:not(.kbq-disabled) .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-selected-hover-text-color)}.kbq-dropdown-item.kbq-disabled{background:var(--kbq-list-states-disabled-container-background);color:var(--kbq-list-states-disabled-text-color)}.kbq-dropdown-item.kbq-disabled .kbq-icon.kbq-empty:not(.kbq-icon-button,.kbq-icon-item){color:var(--kbq-list-states-disabled-text-color)}.kbq-dropdown-item:is(.kbq-selected,.cdk-focused):has(+:is(.kbq-selected,.cdk-focused)){border-bottom-left-radius:0;border-bottom-right-radius:0}.kbq-dropdown-item:is(.kbq-selected,.cdk-focused)+:is(.kbq-selected,.cdk-focused){border-top-left-radius:0;border-top-right-radius:0}.kbq-dropdown__group-header.kbq-dropdown__group-header_small{color:var(--kbq-foreground-contrast-secondary)}.kbq-dropdown-item-overlay{background:transparent}.kbq-dropdown-item,.kbq-dropdown__content{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-dropdown-item .kbq-dropdown-item__caption,.kbq-dropdown__content .kbq-dropdown-item__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}.kbq-dropdown__group-header{font-size:var(--kbq-typography-big-strong-font-size);font-style:var(--kbq-typography-big-strong-font-style);font-weight:var(--kbq-typography-big-strong-font-weight);line-height:var(--kbq-typography-big-strong-line-height);font-family:var(--kbq-typography-big-strong-font-family);text-transform:var(--kbq-typography-big-strong-text-transform);font-feature-settings:var(--kbq-typography-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-big-strong-letter-spacing)}.kbq-dropdown__group-header.kbq-dropdown__group-header_small{font-size:var(--kbq-typography-caps-compact-strong-font-size);font-style:var(--kbq-typography-caps-compact-strong-font-style);font-weight:var(--kbq-typography-caps-compact-strong-font-weight);line-height:var(--kbq-typography-caps-compact-strong-line-height);font-family:var(--kbq-typography-caps-compact-strong-font-family);text-transform:var(--kbq-typography-caps-compact-strong-text-transform);font-feature-settings:var(--kbq-typography-caps-compact-strong-font-feature-settings);letter-spacing:var(--kbq-typography-caps-compact-strong-letter-spacing)}\n", ".kbq-list,.kbq-list-selection{--kbq-list-size-container-padding-left: var(--kbq-size-m);--kbq-list-size-container-padding-right: var(--kbq-size-m);--kbq-list-size-container-padding-vertical: var(--kbq-size-xs);--kbq-list-size-container-content-gap-horizontal: var(--kbq-size-s);--kbq-list-size-container-content-gap-vertical: var(--kbq-size-3xs);--kbq-list-size-container-focus-outline-width: var(--kbq-size-3xs);--kbq-list-size-header-padding-top: var(--kbq-size-s);--kbq-list-size-header-padding-bottom: var(--kbq-size-xxs);--kbq-list-size-header-padding-horizontal: var(--kbq-size-m);--kbq-list-size-subheading-padding-top: var(--kbq-size-m);--kbq-list-size-subheading-padding-bottom: var(--kbq-size-xxs);--kbq-list-size-subheading-padding-horizontal: var(--kbq-size-m);--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled)}.kbq-dropdown__panel{--kbq-dropdown-size-container-width-min: 200px;--kbq-dropdown-size-container-width-max: 640px;--kbq-dropdown-size-container-padding-vertical: var(--kbq-size-xxs);--kbq-dropdown-size-container-border-radius: var(--kbq-size-s);--kbq-dropdown-container-background: var(--kbq-background-card);--kbq-dropdown-container-shadow: var(--kbq-shadow-popup);--kbq-dropdown-item-border-radius: var(--kbq-size-xs);--kbq-dropdown-item-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-default-container-background: transparent;--kbq-list-default-text-color: var(--kbq-foreground-contrast);--kbq-list-default-icon-color: var(--kbq-icon-contrast);--kbq-list-default-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-default-caption-color: var(--kbq-foreground-contrast-secondary);--kbq-list-states-hover-container-background: var(--kbq-states-background-transparent-hover);--kbq-list-states-active-container-background: var(--kbq-states-background-transparent-active);--kbq-list-states-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-container-background: var(--kbq-background-theme-less);--kbq-list-multiple-states-selected-container-background: var(--kbq-background-contrast-less);--kbq-list-states-selected-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-selected-hover-container-background: var(--kbq-states-background-theme-less-hover);--kbq-list-multiple-states-selected-hover-container-background: var(--kbq-states-background-contrast-less-hover);--kbq-list-states-selected-active-container-background: var(--kbq-states-background-theme-less-active);--kbq-list-multiple-states-selected-active-container-background: var(--kbq-states-background-contrast-less-active);--kbq-list-states-selected-hover-text-color: var(--kbq-foreground-contrast);--kbq-list-states-selected-hover-icon-color: var(--kbq-icon-contrast);--kbq-list-states-selected-hover-icon-button-color: var(--kbq-icon-contrast-fade);--kbq-list-states-focused-focus-outline-color: var(--kbq-states-line-focus-theme);--kbq-list-states-disabled-container-background: transparent;--kbq-list-states-disabled-text-color: var(--kbq-states-foreground-disabled);--kbq-list-states-disabled-icon-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-icon-button-color: var(--kbq-states-icon-disabled);--kbq-list-states-disabled-caption-color: var(--kbq-states-foreground-disabled)}\n"] }]
|
|
586
|
+
}], propDecorators: { search: [{ type: i0.ContentChild, args: [i0.forwardRef(() => KbqFormField), { isSignal: true }] }], navigationWithWrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigationWithWrap", required: false }] }], xPosition: [{
|
|
572
587
|
type: Input
|
|
573
588
|
}], yPosition: [{
|
|
574
589
|
type: Input
|
|
@@ -608,6 +623,16 @@ const KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER = {
|
|
|
608
623
|
deps: [Overlay],
|
|
609
624
|
useFactory: KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY
|
|
610
625
|
};
|
|
626
|
+
/**
|
|
627
|
+
* Marker provided by host components that create their own stacking context at
|
|
628
|
+
* the default overlay z-index (e.g. `KbqTopBar`, `KbqNavbar` use
|
|
629
|
+
* `position: sticky` + `z-index: $overlay-z-index`). When this token is
|
|
630
|
+
* available in the injector tree, `KbqDropdownTrigger` defaults `demoteOverlay`
|
|
631
|
+
* to `false` so the dropdown overlay is not lowered below the host.
|
|
632
|
+
*
|
|
633
|
+
* An explicit `[demoteOverlay]` binding on the trigger still wins.
|
|
634
|
+
*/
|
|
635
|
+
const KBQ_DROPDOWN_HOST = new InjectionToken('kbq-dropdown-host');
|
|
611
636
|
/** Default top padding of the nested dropdown panel. */
|
|
612
637
|
const NESTED_PANEL_TOP_PADDING = 4;
|
|
613
638
|
const NESTED_PANEL_LEFT_PADDING = 8;
|
|
@@ -639,6 +664,8 @@ const positionMap = {
|
|
|
639
664
|
*/
|
|
640
665
|
class KbqDropdownTrigger {
|
|
641
666
|
/** References the dropdown instance that the trigger is associated with. */
|
|
667
|
+
// TODO: Skipped for migration because:
|
|
668
|
+
// Accessor inputs cannot be migrated as they are too complex.
|
|
642
669
|
get dropdown() {
|
|
643
670
|
return this._dropdown;
|
|
644
671
|
}
|
|
@@ -666,36 +693,47 @@ class KbqDropdownTrigger {
|
|
|
666
693
|
get opened() {
|
|
667
694
|
return this._opened;
|
|
668
695
|
}
|
|
669
|
-
constructor(
|
|
670
|
-
this.overlay =
|
|
671
|
-
this.elementRef =
|
|
672
|
-
this.viewContainerRef =
|
|
673
|
-
this.scrollStrategy =
|
|
674
|
-
this.parent =
|
|
675
|
-
this.dropdownItemInstance =
|
|
676
|
-
this._dir =
|
|
677
|
-
this.changeDetectorRef =
|
|
678
|
-
this.focusMonitor =
|
|
696
|
+
constructor() {
|
|
697
|
+
this.overlay = inject(Overlay);
|
|
698
|
+
this.elementRef = inject(ElementRef);
|
|
699
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
700
|
+
this.scrollStrategy = inject(KBQ_DROPDOWN_SCROLL_STRATEGY);
|
|
701
|
+
this.parent = inject(KbqDropdown, { optional: true });
|
|
702
|
+
this.dropdownItemInstance = inject(KbqDropdownItem, { optional: true, self: true });
|
|
703
|
+
this._dir = inject(Directionality, { optional: true });
|
|
704
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
705
|
+
this.focusMonitor = inject(FocusMonitor);
|
|
679
706
|
this.overlayContainer = inject(OverlayContainer);
|
|
680
707
|
this.renderer = inject(Renderer2);
|
|
681
708
|
this.isBrowser = inject(Platform).isBrowser;
|
|
682
709
|
this.window = inject(KBQ_WINDOW);
|
|
710
|
+
this.host = inject(KBQ_DROPDOWN_HOST, { optional: true });
|
|
711
|
+
// TODO: Skipped for migration because:
|
|
712
|
+
// Your application code writes to the input. This prevents migration.
|
|
683
713
|
this.openByArrowDown = true;
|
|
684
714
|
/**
|
|
685
715
|
* Whether to demote the overlay container z-index so that dropdown overlays
|
|
686
716
|
* sit below sibling overlays (tooltips, modals, etc.). Set to `false` to
|
|
687
717
|
* keep the dropdown overlay at the default overlay container z-index.
|
|
688
718
|
*/
|
|
719
|
+
// TODO: Skipped for migration because:
|
|
720
|
+
// Your application code writes to the input. This prevents migration.
|
|
689
721
|
this.demoteOverlay = true;
|
|
690
722
|
/**
|
|
691
723
|
* Whether focus should be restored when the menu is closed.
|
|
692
724
|
* Note that disabling this option can have accessibility implications
|
|
693
725
|
* and it's up to you to manage focus, if you decide to turn it off.
|
|
694
726
|
*/
|
|
727
|
+
// TODO: Skipped for migration because:
|
|
728
|
+
// Class of this input is referenced in the signature of another class.
|
|
695
729
|
this.restoreFocus = true;
|
|
696
730
|
/** Event emitted when the associated dropdown is opened. */
|
|
697
|
-
this.dropdownOpened =
|
|
698
|
-
/**
|
|
731
|
+
this.dropdownOpened = output();
|
|
732
|
+
/**
|
|
733
|
+
* Event emitted when the associated dropdown is closed. Kept as an `@Output()` EventEmitter
|
|
734
|
+
* (not `output()`): `KbqOptionActionComponent` subscribes to it via `.pipe()` through the
|
|
735
|
+
* KBQ_OPTION_ACTION_PARENT contract, which an `OutputEmitterRef` does not support — see #DS-5079.
|
|
736
|
+
*/
|
|
699
737
|
this.dropdownClosed = new EventEmitter();
|
|
700
738
|
this._opened = false;
|
|
701
739
|
this.overlayRef = null;
|
|
@@ -707,10 +745,15 @@ class KbqDropdownTrigger {
|
|
|
707
745
|
* Needs to be an arrow function so we can easily use addEventListener and removeEventListener.
|
|
708
746
|
*/
|
|
709
747
|
this.handleTouchStart = () => (this.openedBy = 'touch');
|
|
748
|
+
const elementRef = this.elementRef;
|
|
749
|
+
const dropdownItemInstance = this.dropdownItemInstance;
|
|
710
750
|
elementRef.nativeElement.addEventListener('touchstart', this.handleTouchStart, passiveEventListenerOptions);
|
|
711
751
|
if (dropdownItemInstance) {
|
|
712
752
|
dropdownItemInstance.isNested = this.isNested();
|
|
713
753
|
}
|
|
754
|
+
if (this.host) {
|
|
755
|
+
this.demoteOverlay = false;
|
|
756
|
+
}
|
|
714
757
|
}
|
|
715
758
|
ngAfterContentInit() {
|
|
716
759
|
this.check();
|
|
@@ -876,7 +919,14 @@ class KbqDropdownTrigger {
|
|
|
876
919
|
this.changeDetectorRef.markForCheck();
|
|
877
920
|
}
|
|
878
921
|
this._opened = isOpen;
|
|
879
|
-
this._opened
|
|
922
|
+
if (this._opened) {
|
|
923
|
+
// TODO: The 'emit' function requires a mandatory void argument
|
|
924
|
+
this.dropdownOpened.emit();
|
|
925
|
+
}
|
|
926
|
+
else {
|
|
927
|
+
// TODO: The 'emit' function requires a mandatory void argument
|
|
928
|
+
this.dropdownClosed.emit();
|
|
929
|
+
}
|
|
880
930
|
if (this.isNested()) {
|
|
881
931
|
this.dropdownItemInstance.highlighted = isOpen;
|
|
882
932
|
}
|
|
@@ -1044,7 +1094,7 @@ class KbqDropdownTrigger {
|
|
|
1044
1094
|
// 'changed after checked' errors in some cases. See #12194.
|
|
1045
1095
|
this.dropdown.animationDone
|
|
1046
1096
|
.pipe(take(1), delay(0, asapScheduler), takeUntil(this.parent.hovered()))
|
|
1047
|
-
// eslint-disable-next-line rxjs/no-nested-subscribe
|
|
1097
|
+
// eslint-disable-next-line rxjs-x/no-nested-subscribe
|
|
1048
1098
|
.subscribe(() => this.open());
|
|
1049
1099
|
}
|
|
1050
1100
|
else {
|
|
@@ -1083,34 +1133,23 @@ class KbqDropdownTrigger {
|
|
|
1083
1133
|
this.renderer.removeClass(this.overlayContainer.getContainerElement(), 'cdk-overlay-container_dropdown');
|
|
1084
1134
|
}
|
|
1085
1135
|
}
|
|
1086
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1087
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "
|
|
1136
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdownTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1137
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.25", type: KbqDropdownTrigger, isStandalone: true, selector: "[kbqDropdownTriggerFor]", inputs: { offsetX: ["offsetX", "offsetX", numberAttribute], offsetY: ["offsetY", "offsetY", numberAttribute], data: ["kbqDropdownTriggerData", "data"], openByArrowDown: "openByArrowDown", demoteOverlay: ["demoteOverlay", "demoteOverlay", booleanAttribute], restoreFocus: ["kbqDropdownTriggerRestoreFocus", "restoreFocus"], dropdown: ["kbqDropdownTriggerFor", "dropdown"] }, outputs: { dropdownOpened: "dropdownOpened", dropdownClosed: "dropdownClosed" }, host: { listeners: { "mousedown": "handleMousedown($event)", "keydown": "handleKeydown($event)", "click": "handleClick($event)" }, properties: { "class.kbq-pressed": "opened" }, classAttribute: "kbq-dropdown-trigger" }, exportAs: ["kbqDropdownTrigger"], ngImport: i0 }); }
|
|
1088
1138
|
}
|
|
1089
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdownTrigger, decorators: [{
|
|
1090
1140
|
type: Directive,
|
|
1091
1141
|
args: [{
|
|
1092
1142
|
selector: `[kbqDropdownTriggerFor]`,
|
|
1093
|
-
exportAs: 'kbqDropdownTrigger',
|
|
1094
1143
|
host: {
|
|
1095
1144
|
class: 'kbq-dropdown-trigger',
|
|
1096
1145
|
'[class.kbq-pressed]': 'opened',
|
|
1097
1146
|
'(mousedown)': 'handleMousedown($event)',
|
|
1098
1147
|
'(keydown)': 'handleKeydown($event)',
|
|
1099
1148
|
'(click)': 'handleClick($event)'
|
|
1100
|
-
}
|
|
1149
|
+
},
|
|
1150
|
+
exportAs: 'kbqDropdownTrigger'
|
|
1101
1151
|
}]
|
|
1102
|
-
}], ctorParameters: () => [
|
|
1103
|
-
type: Inject,
|
|
1104
|
-
args: [KBQ_DROPDOWN_SCROLL_STRATEGY]
|
|
1105
|
-
}] }, { type: KbqDropdown, decorators: [{
|
|
1106
|
-
type: Optional
|
|
1107
|
-
}] }, { type: KbqDropdownItem, decorators: [{
|
|
1108
|
-
type: Optional
|
|
1109
|
-
}, {
|
|
1110
|
-
type: Self
|
|
1111
|
-
}] }, { type: i4.Directionality, decorators: [{
|
|
1112
|
-
type: Optional
|
|
1113
|
-
}] }, { type: i0.ChangeDetectorRef }, { type: i1.FocusMonitor }], propDecorators: { offsetX: [{
|
|
1152
|
+
}], ctorParameters: () => [], propDecorators: { offsetX: [{
|
|
1114
1153
|
type: Input,
|
|
1115
1154
|
args: [{ transform: numberAttribute }]
|
|
1116
1155
|
}], offsetY: [{
|
|
@@ -1123,24 +1162,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
1123
1162
|
type: Input
|
|
1124
1163
|
}], demoteOverlay: [{
|
|
1125
1164
|
type: Input,
|
|
1126
|
-
args: [{ transform:
|
|
1165
|
+
args: [{ transform: booleanAttribute }]
|
|
1127
1166
|
}], restoreFocus: [{
|
|
1128
1167
|
type: Input,
|
|
1129
1168
|
args: ['kbqDropdownTriggerRestoreFocus']
|
|
1130
1169
|
}], dropdown: [{
|
|
1131
1170
|
type: Input,
|
|
1132
1171
|
args: ['kbqDropdownTriggerFor']
|
|
1133
|
-
}], dropdownOpened: [{
|
|
1134
|
-
type: Output
|
|
1135
|
-
}], dropdownClosed: [{
|
|
1172
|
+
}], dropdownOpened: [{ type: i0.Output, args: ["dropdownOpened"] }], dropdownClosed: [{
|
|
1136
1173
|
type: Output
|
|
1137
1174
|
}] } });
|
|
1138
1175
|
|
|
1139
1176
|
class KbqDropdownModule {
|
|
1140
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1141
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
1177
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1178
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdownModule, imports: [OverlayModule,
|
|
1142
1179
|
KbqIconModule,
|
|
1143
|
-
NgClass,
|
|
1144
1180
|
KbqDropdownStaticContent,
|
|
1145
1181
|
KbqDropdown,
|
|
1146
1182
|
KbqDropdownItem,
|
|
@@ -1150,31 +1186,30 @@ class KbqDropdownModule {
|
|
|
1150
1186
|
KbqDropdownTrigger,
|
|
1151
1187
|
KbqDropdownContent,
|
|
1152
1188
|
KbqDropdownStaticContent] }); }
|
|
1153
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1189
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdownModule, providers: [KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [OverlayModule,
|
|
1154
1190
|
KbqIconModule,
|
|
1155
1191
|
KbqDropdownItem] }); }
|
|
1156
1192
|
}
|
|
1157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: KbqDropdownModule, decorators: [{
|
|
1158
1194
|
type: NgModule,
|
|
1159
1195
|
args: [{
|
|
1160
1196
|
imports: [
|
|
1161
1197
|
OverlayModule,
|
|
1162
1198
|
KbqIconModule,
|
|
1163
|
-
NgClass,
|
|
1164
1199
|
KbqDropdownStaticContent,
|
|
1165
1200
|
KbqDropdown,
|
|
1166
1201
|
KbqDropdownItem,
|
|
1167
1202
|
KbqDropdownTrigger,
|
|
1168
1203
|
KbqDropdownContent
|
|
1169
1204
|
],
|
|
1205
|
+
providers: [KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER],
|
|
1170
1206
|
exports: [
|
|
1171
1207
|
KbqDropdown,
|
|
1172
1208
|
KbqDropdownItem,
|
|
1173
1209
|
KbqDropdownTrigger,
|
|
1174
1210
|
KbqDropdownContent,
|
|
1175
1211
|
KbqDropdownStaticContent
|
|
1176
|
-
]
|
|
1177
|
-
providers: [KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER]
|
|
1212
|
+
]
|
|
1178
1213
|
}]
|
|
1179
1214
|
}] });
|
|
1180
1215
|
|
|
@@ -1182,5 +1217,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImpo
|
|
|
1182
1217
|
* Generated bundle index. Do not edit.
|
|
1183
1218
|
*/
|
|
1184
1219
|
|
|
1185
|
-
export { KBQ_DROPDOWN_DEFAULT_OPTIONS, KBQ_DROPDOWN_DEFAULT_OPTIONS_FACTORY, KBQ_DROPDOWN_PANEL, KBQ_DROPDOWN_SCROLL_STRATEGY, KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY, KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER, KbqDropdown, KbqDropdownContent, KbqDropdownItem, KbqDropdownModule, KbqDropdownStaticContent, KbqDropdownTrigger, NESTED_PANEL_LEFT_PADDING, NESTED_PANEL_TOP_PADDING, fadeInItems, kbqDropdownAnimations, throwKbqDropdownInvalidPositionX, throwKbqDropdownInvalidPositionY, throwKbqDropdownMissingError, transformDropdown };
|
|
1220
|
+
export { KBQ_DROPDOWN_DEFAULT_OPTIONS, KBQ_DROPDOWN_DEFAULT_OPTIONS_FACTORY, KBQ_DROPDOWN_HOST, KBQ_DROPDOWN_PANEL, KBQ_DROPDOWN_SCROLL_STRATEGY, KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY, KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER, KbqDropdown, KbqDropdownContent, KbqDropdownItem, KbqDropdownModule, KbqDropdownStaticContent, KbqDropdownTrigger, NESTED_PANEL_LEFT_PADDING, NESTED_PANEL_TOP_PADDING, fadeInItems, kbqDropdownAnimations, throwKbqDropdownInvalidPositionX, throwKbqDropdownInvalidPositionY, throwKbqDropdownMissingError, transformDropdown };
|
|
1186
1221
|
//# sourceMappingURL=koobiq-components-dropdown.mjs.map
|