@koobiq/components 17.0.0-rc.9 → 17.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/README.md +1 -2
- package/alert/_alert-theme.scss +0 -1
- package/alert/alert.component.d.ts +3 -1
- package/alert/alert.component.scss +14 -14
- package/alert/public-api.d.ts +1 -1
- package/autocomplete/_autocomplete-theme.scss +0 -1
- package/autocomplete/autocomplete.scss +3 -6
- package/autocomplete/public-api.d.ts +2 -2
- package/badge/_badge-theme.scss +1 -2
- package/badge/badge.component.scss +0 -1
- package/badge/public-api.d.ts +1 -1
- package/button/_button-base.scss +0 -1
- package/button/_button-theme.scss +5 -3
- package/button/button.component.d.ts +2 -2
- package/button/button.scss +0 -1
- package/button/public-api.d.ts +1 -1
- package/button-toggle/_button-toggle-theme.scss +2 -3
- package/button-toggle/button-toggle.scss +2 -9
- package/button-toggle/public-api.d.ts +1 -1
- package/card/_card-theme.scss +0 -1
- package/card/card.component.d.ts +1 -1
- package/card/card.component.scss +1 -2
- package/card/public-api.d.ts +1 -1
- package/checkbox/_checkbox-theme.scss +10 -11
- package/checkbox/checkbox.scss +13 -19
- package/code-block/README.md +17 -14
- package/code-block/_code-block-theme.scss +23 -16
- package/code-block/actionbar.component.scss +4 -7
- package/code-block/code-block.component.d.ts +2 -2
- package/code-block/code-block.scss +8 -14
- package/code-block/public-api.d.ts +1 -1
- package/core/animation/index.d.ts +1 -1
- package/core/common-behaviors/index.d.ts +3 -3
- package/core/datetime/index.d.ts +1 -1
- package/core/formatters/index.d.ts +1 -1
- package/core/forms/_forms-theme.scss +0 -1
- package/core/forms/_forms.scss +0 -1
- package/core/forms/index.d.ts +1 -1
- package/core/locales/index.d.ts +1 -1
- package/core/option/_optgroup-theme.scss +0 -1
- package/core/option/_option-action-theme.scss +0 -1
- package/core/option/_option-theme.scss +0 -1
- package/core/option/action.scss +4 -2
- package/core/option/index.d.ts +2 -2
- package/core/option/optgroup.scss +2 -3
- package/core/option/option.scss +0 -1
- package/core/pop-up/_pop-up.scss +0 -1
- package/core/pop-up/pop-up-trigger.d.ts +3 -3
- package/core/public-api.d.ts +3 -3
- package/core/select/constants.d.ts +1 -1
- package/core/select/index.d.ts +3 -3
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +0 -2
- package/core/selection/pseudo-checkbox/pseudo-checkbox.scss +0 -1
- package/core/services/theme.service.d.ts +3 -2
- package/core/styles/_core.scss +0 -1
- package/core/styles/_koobiq-theme.scss +5 -3
- package/core/styles/common/_animation.scss +11 -10
- package/core/styles/common/_button.scss +0 -2
- package/core/styles/common/_clearfix.scss +1 -1
- package/core/styles/common/_groups.scss +0 -4
- package/core/styles/common/_list.scss +23 -61
- package/core/styles/common/_overlay.scss +4 -3
- package/core/styles/common/_popup.scss +0 -1
- package/core/styles/common/_rtl.scss +4 -4
- package/core/styles/common/_select.scss +37 -26
- package/core/styles/common/_tokens.scss +0 -2
- package/core/styles/functions/_number.scss +14 -19
- package/core/styles/functions/_string.scss +18 -19
- package/core/styles/functions/_timing.scss +24 -24
- package/core/styles/theming/_components-theming.scss +1120 -1208
- package/core/styles/theming/_scrollbar-theme.scss +8 -5
- package/core/styles/theming/_theming.scss +22 -20
- package/core/styles/typography/_typography-utils.scss +9 -3
- package/core/styles/typography/_typography.scss +114 -94
- package/core/styles/visual/_body.scss +0 -2
- package/core/styles/visual/_layout.scss +30 -22
- package/core/utils/data-size/index.d.ts +1 -1
- package/core/utils/public-api.d.ts +1 -1
- package/datepicker/_datepicker-theme.scss +21 -8
- package/datepicker/calendar-body.scss +0 -3
- package/datepicker/calendar-header.scss +0 -1
- package/datepicker/calendar.scss +1 -2
- package/datepicker/datepicker-content.scss +1 -3
- package/datepicker/datepicker-input.directive.d.ts +1 -0
- package/datepicker/datepicker-input.scss +0 -1
- package/datepicker/datepicker-toggle.scss +0 -1
- package/datepicker/datepicker.component.d.ts +2 -2
- package/datepicker/public-api.d.ts +4 -4
- package/divider/_divider-theme.scss +0 -1
- package/divider/divider.scss +0 -1
- package/dl/_dl-theme.scss +0 -2
- package/dl/dl.scss +0 -1
- package/dl/public-api.d.ts +1 -1
- package/dropdown/_dropdown-theme.scss +4 -2
- package/dropdown/dropdown-content.directive.d.ts +1 -1
- package/dropdown/dropdown-item.component.d.ts +1 -1
- package/dropdown/dropdown-item.scss +9 -7
- package/dropdown/dropdown.component.d.ts +1 -1
- package/dropdown/dropdown.scss +0 -1
- package/dropdown/public-api.d.ts +5 -5
- package/ellipsis-center/ellipsis-center.directive.d.ts +1 -1
- package/empty-state/README.md +0 -0
- package/empty-state/_empty-state-theme.scss +56 -0
- package/empty-state/empty-state.component.d.ts +31 -0
- package/empty-state/empty-state.module.d.ts +10 -0
- package/empty-state/empty-state.scss +81 -0
- package/empty-state/index.d.ts +1 -0
- package/empty-state/public-api.d.ts +2 -0
- package/esm2022/alert/alert.component.mjs +7 -3
- package/esm2022/alert/alert.module.mjs +1 -1
- package/esm2022/alert/public-api.mjs +2 -2
- package/esm2022/autocomplete/autocomplete-origin.directive.mjs +1 -1
- package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +25 -42
- package/esm2022/autocomplete/autocomplete.component.mjs +14 -9
- package/esm2022/autocomplete/autocomplete.module.mjs +3 -3
- package/esm2022/autocomplete/public-api.mjs +3 -3
- package/esm2022/badge/badge.component.mjs +8 -6
- package/esm2022/badge/badge.module.mjs +1 -1
- package/esm2022/badge/public-api.mjs +2 -2
- package/esm2022/button/button.component.mjs +12 -9
- package/esm2022/button/button.module.mjs +1 -1
- package/esm2022/button/public-api.mjs +2 -2
- package/esm2022/button-toggle/button-toggle.component.mjs +26 -20
- package/esm2022/button-toggle/button-toggle.module.mjs +1 -1
- package/esm2022/button-toggle/public-api.mjs +2 -2
- package/esm2022/card/card.component.mjs +4 -5
- package/esm2022/card/card.module.mjs +1 -1
- package/esm2022/card/public-api.mjs +2 -2
- package/esm2022/checkbox/checkbox-config.mjs +1 -1
- package/esm2022/checkbox/checkbox-module.mjs +1 -1
- package/esm2022/checkbox/checkbox-required-validator.mjs +1 -1
- package/esm2022/checkbox/checkbox.mjs +6 -8
- package/esm2022/checkbox/public-api.mjs +1 -1
- package/esm2022/code-block/actionbar.component.mjs +4 -6
- package/esm2022/code-block/code-block.component.mjs +17 -19
- package/esm2022/code-block/code-block.module.mjs +9 -5
- package/esm2022/code-block/public-api.mjs +2 -2
- package/esm2022/core/animation/fade-animations.mjs +1 -1
- package/esm2022/core/animation/index.mjs +2 -2
- package/esm2022/core/animation/select-animations.mjs +2 -2
- package/esm2022/core/common-behaviors/color.mjs +4 -2
- package/esm2022/core/common-behaviors/common-module.mjs +2 -5
- package/esm2022/core/common-behaviors/constructor.mjs +1 -1
- package/esm2022/core/common-behaviors/disabled.mjs +2 -2
- package/esm2022/core/common-behaviors/error-state.mjs +1 -1
- package/esm2022/core/common-behaviors/index.mjs +4 -4
- package/esm2022/core/common-behaviors/tabindex.mjs +1 -1
- package/esm2022/core/datetime/date-adapter.mjs +1 -2
- package/esm2022/core/datetime/date-formats.mjs +1 -1
- package/esm2022/core/datetime/index.mjs +2 -2
- package/esm2022/core/error/error-options.mjs +1 -1
- package/esm2022/core/form-field/form-field-ref.mjs +1 -1
- package/esm2022/core/formatters/date/formatter.mjs +1 -1
- package/esm2022/core/formatters/date/formatter.pipe.mjs +1 -1
- package/esm2022/core/formatters/index.mjs +2 -2
- package/esm2022/core/formatters/number/formatter.mjs +19 -24
- package/esm2022/core/forms/forms-module.mjs +1 -1
- package/esm2022/core/forms/forms.directive.mjs +1 -1
- package/esm2022/core/forms/index.mjs +2 -2
- package/esm2022/core/highlight/highlight.pipe.mjs +1 -1
- package/esm2022/core/highlight/index.mjs +1 -1
- package/esm2022/core/label/label-options.mjs +1 -1
- package/esm2022/core/line/line.mjs +2 -2
- package/esm2022/core/locales/en-US.mjs +1 -1
- package/esm2022/core/locales/es-LA.mjs +1 -1
- package/esm2022/core/locales/fa-IR.mjs +1 -1
- package/esm2022/core/locales/formatters.mjs +1 -3
- package/esm2022/core/locales/index.mjs +2 -2
- package/esm2022/core/locales/locale-service.mjs +8 -5
- package/esm2022/core/locales/locale-service.module.mjs +1 -1
- package/esm2022/core/locales/pt-BR.mjs +1 -1
- package/esm2022/core/locales/ru-RU.mjs +3 -3
- package/esm2022/core/locales/zh-CN.mjs +1 -1
- package/esm2022/core/option/action.mjs +22 -14
- package/esm2022/core/option/index.mjs +3 -3
- package/esm2022/core/option/optgroup.mjs +4 -5
- package/esm2022/core/option/option-module.mjs +1 -1
- package/esm2022/core/option/option.mjs +13 -10
- package/esm2022/core/overlay/overlay-position-map.mjs +1 -1
- package/esm2022/core/pop-up/pop-up-trigger.mjs +14 -24
- package/esm2022/core/pop-up/pop-up.mjs +1 -2
- package/esm2022/core/public-api.mjs +4 -4
- package/esm2022/core/select/common.mjs +2 -5
- package/esm2022/core/select/constants.mjs +1 -2
- package/esm2022/core/select/index.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +1 -1
- package/esm2022/core/services/measure-scrollbar.service.mjs +1 -2
- package/esm2022/core/services/theme.service.mjs +5 -4
- package/esm2022/core/title/title-text-ref.mjs +1 -1
- package/esm2022/core/utils/data-size/config.mjs +1 -1
- package/esm2022/core/utils/data-size/data-size.pipe.mjs +2 -3
- package/esm2022/core/utils/data-size/index.mjs +2 -2
- package/esm2022/core/utils/data-size/size.mjs +3 -6
- package/esm2022/core/utils/public-api.mjs +2 -2
- package/esm2022/core/utils/utils.mjs +4 -2
- package/esm2022/core/validation/validation.mjs +4 -2
- package/esm2022/core/version.mjs +2 -2
- package/esm2022/datepicker/calendar-body.component.mjs +3 -5
- package/esm2022/datepicker/calendar-header.component.mjs +8 -8
- package/esm2022/datepicker/calendar.component.mjs +6 -6
- package/esm2022/datepicker/datepicker-animations.mjs +1 -1
- package/esm2022/datepicker/datepicker-errors.mjs +1 -1
- package/esm2022/datepicker/datepicker-input.directive.mjs +47 -49
- package/esm2022/datepicker/datepicker-intl.mjs +1 -1
- package/esm2022/datepicker/datepicker-module.mjs +2 -2
- package/esm2022/datepicker/datepicker-toggle.component.mjs +11 -10
- package/esm2022/datepicker/datepicker.component.mjs +15 -18
- package/esm2022/datepicker/month-view.component.mjs +14 -14
- package/esm2022/datepicker/public-api.mjs +5 -5
- package/esm2022/divider/divider.component.mjs +1 -1
- package/esm2022/divider/divider.module.mjs +1 -1
- package/esm2022/dl/dl.component.mjs +7 -7
- package/esm2022/dl/dl.module.mjs +2 -2
- package/esm2022/dl/public-api.mjs +2 -2
- package/esm2022/dropdown/dropdown-animations.mjs +2 -2
- package/esm2022/dropdown/dropdown-content.directive.mjs +3 -3
- package/esm2022/dropdown/dropdown-item.component.mjs +5 -8
- package/esm2022/dropdown/dropdown-trigger.directive.mjs +24 -33
- package/esm2022/dropdown/dropdown.component.mjs +10 -19
- package/esm2022/dropdown/dropdown.module.mjs +1 -1
- package/esm2022/dropdown/dropdown.types.mjs +1 -2
- package/esm2022/dropdown/public-api.mjs +6 -6
- package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +6 -5
- package/esm2022/empty-state/empty-state.component.mjs +104 -0
- package/esm2022/empty-state/empty-state.module.mjs +50 -0
- package/esm2022/empty-state/index.mjs +2 -0
- package/esm2022/empty-state/koobiq-components-empty-state.mjs +5 -0
- package/esm2022/empty-state/public-api.mjs +3 -0
- package/esm2022/file-upload/file-drop.mjs +3 -2
- package/esm2022/file-upload/file-upload.mjs +1 -1
- package/esm2022/file-upload/file-upload.module.mjs +2 -2
- package/esm2022/file-upload/index.mjs +1 -1
- package/esm2022/file-upload/multiple-file-upload.component.mjs +16 -14
- package/esm2022/file-upload/public-api.mjs +2 -2
- package/esm2022/file-upload/single-file-upload.component.mjs +14 -12
- package/esm2022/form-field/cleaner.mjs +13 -3
- package/esm2022/form-field/form-field-control.mjs +1 -2
- package/esm2022/form-field/form-field-errors.mjs +1 -1
- package/esm2022/form-field/form-field.mjs +8 -15
- package/esm2022/form-field/form-field.module.mjs +1 -1
- package/esm2022/form-field/hint.mjs +6 -6
- package/esm2022/form-field/password-hint.mjs +15 -15
- package/esm2022/form-field/password-toggle.mjs +4 -7
- package/esm2022/form-field/prefix.mjs +1 -1
- package/esm2022/form-field/public-api.mjs +4 -4
- package/esm2022/form-field/stepper.mjs +33 -29
- package/esm2022/form-field/suffix.mjs +1 -1
- package/esm2022/form-field/validate.directive.mjs +6 -7
- package/esm2022/icon/icon-button.component.mjs +4 -4
- package/esm2022/icon/icon-item.component.mjs +3 -3
- package/esm2022/icon/icon.component.mjs +5 -6
- package/esm2022/icon/icon.module.mjs +1 -1
- package/esm2022/icon/public-api.mjs +3 -3
- package/esm2022/input/input-number-validators.mjs +1 -1
- package/esm2022/input/input-number.mjs +29 -41
- package/esm2022/input/input-password.mjs +13 -8
- package/esm2022/input/input-value-accessor.mjs +1 -1
- package/esm2022/input/input.mjs +13 -10
- package/esm2022/input/input.module.mjs +1 -1
- package/esm2022/input/public-api.mjs +3 -3
- package/esm2022/link/link.component.mjs +2 -2
- package/esm2022/link/link.module.mjs +1 -1
- package/esm2022/link/public-api.mjs +2 -2
- package/esm2022/list/list-selection.component.mjs +36 -41
- package/esm2022/list/list.component.mjs +5 -6
- package/esm2022/list/list.module.mjs +2 -2
- package/esm2022/list/public-api.mjs +3 -3
- package/esm2022/loader-overlay/loader-overlay.component.mjs +3 -3
- package/esm2022/loader-overlay/loader-overlay.module.mjs +1 -1
- package/esm2022/loader-overlay/public-api.mjs +2 -2
- package/esm2022/markdown/markdown.component.mjs +20 -6
- package/esm2022/markdown/markdown.module.mjs +1 -1
- package/esm2022/markdown/markdown.service.mjs +1 -1
- package/esm2022/modal/css-unit.pipe.mjs +1 -1
- package/esm2022/modal/modal-control.service.mjs +6 -2
- package/esm2022/modal/modal-ref.class.mjs +1 -2
- package/esm2022/modal/modal-util.mjs +1 -1
- package/esm2022/modal/modal.component.mjs +60 -33
- package/esm2022/modal/modal.directive.mjs +27 -11
- package/esm2022/modal/modal.module.mjs +2 -2
- package/esm2022/modal/modal.service.mjs +3 -6
- package/esm2022/modal/modal.type.mjs +1 -1
- package/esm2022/modal/public-api.mjs +3 -3
- package/esm2022/navbar/index.mjs +1 -1
- package/esm2022/navbar/navbar-item.component.mjs +41 -33
- package/esm2022/navbar/navbar.component.mjs +19 -29
- package/esm2022/navbar/navbar.module.mjs +2 -2
- package/esm2022/navbar/public-api.mjs +3 -3
- package/esm2022/navbar/vertical-navbar.component.mjs +21 -23
- package/esm2022/popover/popover-animations.mjs +1 -1
- package/esm2022/popover/popover-confirm.component.mjs +3 -3
- package/esm2022/popover/popover.component.mjs +5 -5
- package/esm2022/popover/popover.module.mjs +1 -1
- package/esm2022/popover/public-api.mjs +3 -3
- package/esm2022/progress-bar/progress-bar.component.mjs +4 -4
- package/esm2022/progress-bar/progress-bar.module.mjs +2 -2
- package/esm2022/progress-bar/public-api.mjs +2 -2
- package/esm2022/progress-spinner/progress-spinner.component.mjs +4 -4
- package/esm2022/progress-spinner/progress-spinner.module.mjs +1 -1
- package/esm2022/progress-spinner/public-api.mjs +2 -2
- package/esm2022/radio/public-api.mjs +2 -2
- package/esm2022/radio/radio.component.mjs +9 -14
- package/esm2022/radio/radio.module.mjs +1 -1
- package/esm2022/risk-level/public-api.mjs +2 -2
- package/esm2022/risk-level/risk-level.component.mjs +3 -3
- package/esm2022/risk-level/risk-level.module.mjs +1 -1
- package/esm2022/scrollbar/public-api.mjs +2 -2
- package/esm2022/scrollbar/scrollbar.component.mjs +19 -21
- package/esm2022/scrollbar/scrollbar.directive.mjs +4 -5
- package/esm2022/scrollbar/scrollbar.module.mjs +2 -2
- package/esm2022/scrollbar/scrollbar.types.mjs +3 -2
- package/esm2022/select/public-api.mjs +3 -3
- package/esm2022/select/select-option.directive.mjs +8 -5
- package/esm2022/select/select.component.mjs +45 -71
- package/esm2022/select/select.module.mjs +1 -1
- package/esm2022/sidebar/public-api.mjs +2 -2
- package/esm2022/sidebar/sidebar-animations.mjs +1 -1
- package/esm2022/sidebar/sidebar.component.mjs +5 -7
- package/esm2022/sidebar/sidebar.module.mjs +1 -1
- package/esm2022/sidepanel/public-api.mjs +4 -4
- package/esm2022/sidepanel/sidepanel-animations.mjs +7 -4
- package/esm2022/sidepanel/sidepanel-config.mjs +1 -1
- package/esm2022/sidepanel/sidepanel-container.component.mjs +4 -4
- package/esm2022/sidepanel/sidepanel-directives.mjs +33 -20
- package/esm2022/sidepanel/sidepanel-ref.mjs +10 -5
- package/esm2022/sidepanel/sidepanel.module.mjs +1 -1
- package/esm2022/sidepanel/sidepanel.service.mjs +11 -15
- package/esm2022/splitter/public-api.mjs +2 -2
- package/esm2022/splitter/splitter.component.mjs +13 -24
- package/esm2022/splitter/splitter.module.mjs +1 -1
- package/esm2022/table/public-api.mjs +2 -2
- package/esm2022/table/table.component.mjs +3 -3
- package/esm2022/table/table.module.mjs +1 -1
- package/esm2022/tabs/paginated-tab-header.mjs +9 -14
- package/esm2022/tabs/public-api.mjs +6 -6
- package/esm2022/tabs/tab-body.component.mjs +10 -11
- package/esm2022/tabs/tab-content.directive.mjs +1 -1
- package/esm2022/tabs/tab-group.component.mjs +11 -13
- package/esm2022/tabs/tab-header.component.mjs +4 -4
- package/esm2022/tabs/tab-label-wrapper.directive.mjs +1 -1
- package/esm2022/tabs/tab-label.directive.mjs +1 -1
- package/esm2022/tabs/tab-nav-bar/index.mjs +1 -1
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +46 -49
- package/esm2022/tabs/tab.component.mjs +7 -10
- package/esm2022/tabs/tabs-animations.mjs +1 -1
- package/esm2022/tabs/tabs.module.mjs +2 -2
- package/esm2022/tags/public-api.mjs +5 -5
- package/esm2022/tags/tag-default-options.mjs +1 -1
- package/esm2022/tags/tag-input.mjs +12 -16
- package/esm2022/tags/tag-list.component.mjs +15 -27
- package/esm2022/tags/tag-text-control.mjs +1 -1
- package/esm2022/tags/tag.component.mjs +5 -8
- package/esm2022/tags/tag.module.mjs +9 -7
- package/esm2022/textarea/index.mjs +1 -1
- package/esm2022/textarea/textarea.component.mjs +4 -7
- package/esm2022/textarea/textarea.module.mjs +1 -1
- package/esm2022/timepicker/public-api.mjs +2 -2
- package/esm2022/timepicker/timepicker.constants.mjs +6 -2
- package/esm2022/timepicker/timepicker.directive.mjs +62 -31
- package/esm2022/timepicker/timepicker.module.mjs +1 -1
- package/esm2022/timezone/cities-by-filter.pipe.mjs +1 -1
- package/esm2022/timezone/timezone-option.component.mjs +12 -11
- package/esm2022/timezone/timezone-option.directive.mjs +3 -3
- package/esm2022/timezone/timezone-select.component.mjs +5 -5
- package/esm2022/timezone/timezone.models.mjs +1 -2
- package/esm2022/timezone/timezone.module.mjs +1 -1
- package/esm2022/timezone/timezone.utils.mjs +5 -9
- package/esm2022/timezone/utc-offset.pipe.mjs +1 -1
- package/esm2022/title/public-api.mjs +2 -2
- package/esm2022/title/title.directive.mjs +9 -5
- package/esm2022/title/title.module.mjs +1 -1
- package/esm2022/toast/public-api.mjs +4 -4
- package/esm2022/toast/toast-animations.mjs +2 -2
- package/esm2022/toast/toast-container.component.mjs +5 -6
- package/esm2022/toast/toast.component.mjs +6 -6
- package/esm2022/toast/toast.module.mjs +1 -1
- package/esm2022/toast/toast.service.mjs +18 -30
- package/esm2022/toast/toast.type.mjs +1 -1
- package/esm2022/toggle/public-api.mjs +2 -2
- package/esm2022/toggle/toggle.component.mjs +17 -11
- package/esm2022/toggle/toggle.module.mjs +1 -1
- package/esm2022/tooltip/public-api.mjs +2 -2
- package/esm2022/tooltip/tooltip.animations.mjs +1 -1
- package/esm2022/tooltip/tooltip.component.mjs +7 -7
- package/esm2022/tooltip/tooltip.module.mjs +2 -2
- package/esm2022/tree/control/base-tree-control.mjs +1 -2
- package/esm2022/tree/control/flat-tree-control.filters.mjs +4 -7
- package/esm2022/tree/control/flat-tree-control.mjs +4 -7
- package/esm2022/tree/control/nested-tree-control.mjs +1 -2
- package/esm2022/tree/control/tree-control.mjs +1 -1
- package/esm2022/tree/data-source/flat-data-source.mjs +3 -8
- package/esm2022/tree/data-source/nested-data-source.mjs +2 -4
- package/esm2022/tree/node.mjs +1 -1
- package/esm2022/tree/outlet.mjs +1 -1
- package/esm2022/tree/padding.directive.mjs +4 -5
- package/esm2022/tree/public-api.mjs +11 -11
- package/esm2022/tree/toggle.mjs +8 -5
- package/esm2022/tree/tree-base.mjs +3 -7
- package/esm2022/tree/tree-errors.mjs +1 -1
- package/esm2022/tree/tree-option.component.mjs +9 -13
- package/esm2022/tree/tree-selection.component.mjs +20 -36
- package/esm2022/tree/tree.mjs +7 -3
- package/esm2022/tree/tree.module.mjs +2 -3
- package/esm2022/tree-select/public-api.mjs +2 -2
- package/esm2022/tree-select/tree-select.component.mjs +59 -72
- package/esm2022/tree-select/tree-select.module.mjs +1 -1
- package/fesm2022/koobiq-components-alert.mjs +10 -6
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +60 -72
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +10 -8
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +30 -24
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +14 -11
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-card.mjs +4 -5
- package/fesm2022/koobiq-components-card.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +3 -5
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +34 -34
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +325 -336
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +105 -111
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +9 -9
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +125 -147
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +3 -2
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-empty-state.mjs +157 -0
- package/fesm2022/koobiq-components-empty-state.mjs.map +1 -0
- package/fesm2022/koobiq-components-file-upload.mjs +46 -41
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +75 -73
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +9 -10
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +56 -60
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +1 -1
- package/fesm2022/koobiq-components-link.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +43 -49
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +6 -6
- package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +18 -4
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +96 -54
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +82 -86
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +12 -12
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +5 -5
- package/fesm2022/koobiq-components-progress-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-spinner.mjs +5 -5
- package/fesm2022/koobiq-components-progress-spinner.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +11 -16
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-risk-level.mjs +4 -4
- package/fesm2022/koobiq-components-risk-level.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +22 -24
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +55 -78
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +5 -7
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +110 -93
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +15 -26
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-table.mjs +5 -5
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +85 -98
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +39 -56
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +2 -5
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +69 -34
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +16 -21
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +11 -7
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +74 -87
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +17 -11
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +10 -10
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +67 -80
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +509 -541
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +28 -18
- package/file-upload/file-upload.scss +0 -1
- package/file-upload/multiple-file-upload.component.d.ts +2 -2
- package/file-upload/multiple-file-upload.component.scss +17 -27
- package/file-upload/public-api.d.ts +1 -1
- package/file-upload/single-file-upload.component.d.ts +2 -2
- package/file-upload/single-file-upload.component.scss +1 -7
- package/form-field/_form-field-theme.scss +24 -12
- package/form-field/_hint-theme.scss +0 -2
- package/form-field/cleaner.scss +0 -1
- package/form-field/form-field.scss +12 -14
- package/form-field/hint.scss +0 -1
- package/form-field/password-toggle.scss +0 -1
- package/form-field/public-api.d.ts +3 -3
- package/form-field/stepper.scss +0 -1
- package/icon/_icon-button-theme.scss +18 -7
- package/icon/_icon-theme.scss +0 -1
- package/icon/icon-button.scss +2 -5
- package/icon/icon-item.scss +2 -5
- package/icon/icon.scss +0 -1
- package/icon/public-api.d.ts +2 -2
- package/input/_input-theme.scss +0 -1
- package/input/input.scss +9 -9
- package/input/public-api.d.ts +2 -2
- package/link/_link-theme.scss +12 -18
- package/link/link.component.d.ts +1 -1
- package/link/public-api.d.ts +1 -1
- package/list/_list-theme.scss +0 -1
- package/list/list-selection.component.d.ts +3 -3
- package/list/list.scss +1 -3
- package/list/public-api.d.ts +2 -2
- package/loader-overlay/_loader-overlay-theme.scss +6 -4
- package/loader-overlay/loader-overlay.scss +0 -1
- package/loader-overlay/public-api.d.ts +1 -1
- package/markdown/_markdown-theme.scss +11 -8
- package/markdown/markdown.scss +3 -3
- package/modal/README.md +4 -3
- package/modal/_modal-animation.scss +0 -1
- package/modal/_modal-confirm.scss +0 -1
- package/modal/_modal-theme.scss +8 -9
- package/modal/modal.directive.d.ts +3 -3
- package/modal/modal.scss +9 -15
- package/modal/modal.type.d.ts +2 -2
- package/modal/public-api.d.ts +2 -2
- package/navbar/README.md +21 -20
- package/navbar/_navbar-item_horizontal.scss +31 -24
- package/navbar/_navbar-item_vertical.scss +0 -3
- package/navbar/_navbar-theme.scss +3 -6
- package/navbar/navbar-brand.scss +0 -1
- package/navbar/navbar-divider.scss +0 -1
- package/navbar/navbar-item.component.d.ts +1 -1
- package/navbar/navbar-item.scss +9 -2
- package/navbar/navbar.scss +0 -1
- package/navbar/public-api.d.ts +2 -2
- package/navbar/vertical-navbar.scss +0 -1
- package/package.json +12 -6
- package/popover/README.md +17 -14
- package/popover/_popover-theme.scss +0 -1
- package/popover/popover.component.d.ts +1 -1
- package/popover/popover.scss +5 -13
- package/popover/public-api.d.ts +2 -2
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +0 -1
- package/progress-bar/progress-bar.scss +0 -1
- package/progress-bar/public-api.d.ts +1 -1
- package/progress-spinner/_progress-spinner-theme.scss +0 -1
- package/progress-spinner/progress-spinner.scss +0 -1
- package/progress-spinner/public-api.d.ts +1 -1
- package/radio/_radio-theme.scss +13 -5
- package/radio/public-api.d.ts +1 -1
- package/radio/radio.scss +20 -6
- package/risk-level/_risk-level-theme.scss +0 -1
- package/risk-level/public-api.d.ts +1 -1
- package/risk-level/risk-level.component.scss +1 -4
- package/schematics/ng-add/index.js +4 -4
- package/scrollbar/_scrollbar-component-theme.scss +2 -3
- package/scrollbar/public-api.d.ts +1 -1
- package/scrollbar/scrollbar.component.scss +56 -44
- package/scrollbar/scrollbar.directive.d.ts +1 -1
- package/scrollbar/scrollbar.types.d.ts +1 -1
- package/select/_select-theme.scss +0 -1
- package/select/public-api.d.ts +2 -2
- package/select/select.component.d.ts +4 -1
- package/select/select.scss +0 -1
- package/sidebar/public-api.d.ts +1 -1
- package/sidepanel/_sidepanel-theme.scss +0 -1
- package/sidepanel/public-api.d.ts +3 -3
- package/sidepanel/sidepanel.scss +6 -12
- package/splitter/_splitter-theme.scss +0 -1
- package/splitter/public-api.d.ts +1 -1
- package/splitter/splitter.component.d.ts +2 -2
- package/splitter/splitter.scss +0 -1
- package/table/_table-theme.scss +7 -7
- package/table/public-api.d.ts +1 -1
- package/table/table.scss +2 -2
- package/tabs/_tabs-common.scss +10 -8
- package/tabs/_tabs-theme.scss +0 -1
- package/tabs/paginated-tab-header.d.ts +1 -1
- package/tabs/public-api.d.ts +5 -5
- package/tabs/tab-body.component.d.ts +3 -3
- package/tabs/tab-group.component.d.ts +1 -1
- package/tabs/tab-group.scss +0 -1
- package/tabs/tab-header.scss +0 -6
- package/tabs/tab-nav-bar/tab-nav-bar.d.ts +17 -17
- package/tabs/tab-nav-bar/tab-nav-bar.scss +0 -1
- package/tags/_tag-theme.scss +0 -2
- package/tags/public-api.d.ts +4 -4
- package/tags/tag-input.d.ts +1 -1
- package/tags/tag-list.scss +9 -7
- package/tags/tag.component.d.ts +2 -2
- package/tags/tag.scss +1 -4
- package/textarea/_textarea-theme.scss +0 -1
- package/textarea/textarea.component.d.ts +1 -1
- package/textarea/textarea.scss +1 -4
- package/timepicker/public-api.d.ts +1 -1
- package/timepicker/timepicker.constants.d.ts +2 -0
- package/timepicker/timepicker.directive.d.ts +10 -3
- package/timepicker/timepicker.scss +0 -1
- package/timezone/_timezone-option-theme.scss +0 -1
- package/timezone/timezone-option.component.scss +0 -1
- package/timezone/timezone-option.directive.d.ts +1 -1
- package/timezone/timezone-select.component.scss +0 -1
- package/timezone/timezone.utils.d.ts +1 -1
- package/title/public-api.d.ts +1 -1
- package/title/title.directive.d.ts +2 -2
- package/toast/_toast-theme.scss +0 -2
- package/toast/public-api.d.ts +3 -3
- package/toast/toast-container.component.scss +0 -1
- package/toast/toast.component.scss +4 -2
- package/toast/toast.service.d.ts +2 -2
- package/toast/toast.type.d.ts +1 -1
- package/toggle/_toggle-theme.scss +10 -9
- package/toggle/public-api.d.ts +1 -1
- package/toggle/toggle.component.d.ts +2 -2
- package/toggle/toggle.scss +0 -1
- package/tooltip/_tooltip-theme.scss +0 -1
- package/tooltip/public-api.d.ts +1 -1
- package/tooltip/tooltip.component.d.ts +2 -2
- package/tooltip/tooltip.scss +1 -5
- package/tree/_tree-theme.scss +2 -3
- package/tree/public-api.d.ts +10 -10
- package/tree/toggle.scss +0 -1
- package/tree/tree-base.d.ts +1 -1
- package/tree/tree-option.component.d.ts +1 -1
- package/tree/tree-option.scss +12 -8
- package/tree/tree-selection.component.d.ts +3 -2
- package/tree-select/_tree-select-theme.scss +0 -1
- package/tree-select/public-api.d.ts +1 -1
- package/tree-select/tree-select.component.d.ts +9 -4
- package/tree-select/tree-select.scss +0 -1
|
@@ -1,46 +1,63 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import * as i1$1 from '@angular/cdk/overlay';
|
|
4
|
-
import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
1
|
+
import { trigger, state, style, transition, group, query, animate } from '@angular/animations';
|
|
2
|
+
import { TemplatePortal, DomPortalOutlet } from '@angular/cdk/portal';
|
|
5
3
|
import * as i2 from '@angular/common';
|
|
6
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
7
|
-
import * as
|
|
8
|
-
import {
|
|
9
|
-
import { TemplatePortal, DomPortalOutlet } from '@angular/cdk/portal';
|
|
5
|
+
import * as i0 from '@angular/core';
|
|
6
|
+
import { Directive, Inject, InjectionToken, Component, ChangeDetectionStrategy, ViewEncapsulation, Optional, ViewChild, ContentChild, HostListener, EventEmitter, QueryList, TemplateRef, Input, ContentChildren, Output, Self, NgModule } from '@angular/core';
|
|
10
7
|
import { Subject, Subscription, merge, of, asapScheduler } from 'rxjs';
|
|
11
8
|
import * as i1 from '@angular/cdk/a11y';
|
|
12
9
|
import { mixinDisabled, KBQ_TITLE_TEXT_REF } from '@koobiq/components/core';
|
|
10
|
+
import * as i3 from '@koobiq/components/icon';
|
|
11
|
+
import { KbqIcon, KbqIconModule } from '@koobiq/components/icon';
|
|
13
12
|
import * as i4 from '@angular/cdk/bidi';
|
|
13
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
|
14
|
+
import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
14
15
|
import { normalizePassiveListenerOptions } from '@angular/cdk/platform';
|
|
15
16
|
import { RIGHT_ARROW, LEFT_ARROW, ESCAPE, ENTER, SPACE, DOWN_ARROW as DOWN_ARROW$1 } from '@koobiq/cdk/keycodes';
|
|
16
17
|
import { startWith, switchMap, take, filter, takeUntil, delay } from 'rxjs/operators';
|
|
17
18
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
18
19
|
import { UP_ARROW, DOWN_ARROW } from '@angular/cdk/keycodes';
|
|
19
20
|
import { FocusKeyManager } from '@koobiq/cdk/a11y';
|
|
20
|
-
import { trigger, state, style, transition, group, query, animate } from '@angular/animations';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Animations used by the kbq-dropdown component.
|
|
24
24
|
* @docs-private
|
|
25
25
|
*/
|
|
26
|
-
const
|
|
27
|
-
/**
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
26
|
+
const kbqDropdownAnimations = {
|
|
27
|
+
/**
|
|
28
|
+
* This animation controls the dropdown panel's entry and exit from the page.
|
|
29
|
+
*
|
|
30
|
+
* When the dropdown panel is added to the DOM, it scales in and fades in its border.
|
|
31
|
+
*
|
|
32
|
+
* When the dropdown panel is removed from the DOM, it simply fades out after a brief
|
|
33
|
+
* delay to display the ripple.
|
|
34
|
+
*/
|
|
35
|
+
transformDropdown: trigger('transformDropdown', [
|
|
36
|
+
state('void', style({
|
|
37
|
+
opacity: 0,
|
|
38
|
+
transform: 'scale(0.8)'
|
|
39
|
+
})),
|
|
40
|
+
transition('void => enter', group([
|
|
41
|
+
query('.kbq-dropdown__content', animate('0ms linear', style({ opacity: 1 }))),
|
|
42
|
+
animate('0ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scale(1)' }))
|
|
43
|
+
])),
|
|
44
|
+
transition('* => void', animate('50ms 25ms linear', style({ opacity: 0 })))
|
|
45
|
+
]),
|
|
46
|
+
/**
|
|
47
|
+
* This animation fades in the background color and content of the dropdown panel
|
|
48
|
+
* after its containing element is scaled in.
|
|
49
|
+
*/
|
|
50
|
+
fadeInItems: trigger('fadeInItems', [
|
|
51
|
+
// now. Remove next time we do breaking changes.
|
|
52
|
+
state('showing', style({ opacity: 1 })),
|
|
53
|
+
transition('void => *', [
|
|
54
|
+
style({ opacity: 0 }),
|
|
55
|
+
animate('0ms 0ms cubic-bezier(0.55, 0, 0.55, 0.2)')
|
|
56
|
+
])
|
|
57
|
+
])
|
|
58
|
+
};
|
|
59
|
+
const fadeInItems = kbqDropdownAnimations.fadeInItems;
|
|
60
|
+
const transformDropdown = kbqDropdownAnimations.transformDropdown;
|
|
44
61
|
|
|
45
62
|
/**
|
|
46
63
|
* Dropdown content that will be rendered lazily once the dropdown is opened.
|
|
@@ -101,6 +118,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
101
118
|
args: [DOCUMENT]
|
|
102
119
|
}] }] });
|
|
103
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Throws an exception for the case when dropdown trigger doesn't have a valid kbq-dropdown instance
|
|
123
|
+
* @docs-private
|
|
124
|
+
*/
|
|
125
|
+
function throwKbqDropdownMissingError() {
|
|
126
|
+
throw Error(`kbqDropdownTriggerFor: must pass in an kbq-dropdown instance.
|
|
127
|
+
Example:
|
|
128
|
+
<kbq-dropdown #dropdown="kbqDropdown"></kbq-dropdown>
|
|
129
|
+
<button [kbqDropdownTriggerFor]="dropdown"></button>`);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Throws an exception for the case when dropdown's x-position value isn't valid.
|
|
133
|
+
* In other words, it doesn't match 'before' or 'after'.
|
|
134
|
+
* @docs-private
|
|
135
|
+
*/
|
|
136
|
+
function throwKbqDropdownInvalidPositionX() {
|
|
137
|
+
throw Error(`xPosition value must be either 'before' or after'.
|
|
138
|
+
Example: <kbq-dropdown [xPosition]="'before'" #dropdown="kbqDropdown"></kbq-dropdown>`);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Throws an exception for the case when dropdown's y-position value isn't valid.
|
|
142
|
+
* In other words, it doesn't match 'above' or 'below'.
|
|
143
|
+
* @docs-private
|
|
144
|
+
*/
|
|
145
|
+
function throwKbqDropdownInvalidPositionY() {
|
|
146
|
+
throw Error(`yPosition value must be either 'above' or below'.
|
|
147
|
+
Example: <kbq-dropdown [yPosition]="'above'" #dropdown="kbqDropdown"></kbq-dropdown>`);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Injection token used to provide the parent dropdown to dropdown-specific components.
|
|
152
|
+
* @docs-private
|
|
153
|
+
*/
|
|
154
|
+
const KBQ_DROPDOWN_PANEL = new InjectionToken('KBQ_DROPDOWN_PANEL');
|
|
155
|
+
/** Injection token to be used to override the default options for `kbq-dropdown`. */
|
|
156
|
+
const KBQ_DROPDOWN_DEFAULT_OPTIONS = new InjectionToken('kbq-dropdown-default-options', {
|
|
157
|
+
providedIn: 'root',
|
|
158
|
+
factory: KBQ_DROPDOWN_DEFAULT_OPTIONS_FACTORY
|
|
159
|
+
});
|
|
160
|
+
/** @docs-private */
|
|
161
|
+
function KBQ_DROPDOWN_DEFAULT_OPTIONS_FACTORY() {
|
|
162
|
+
return {
|
|
163
|
+
overlapTriggerX: true,
|
|
164
|
+
overlapTriggerY: false,
|
|
165
|
+
xPosition: 'after',
|
|
166
|
+
yPosition: 'below',
|
|
167
|
+
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
168
|
+
hasBackdrop: false
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
104
172
|
// Boilerplate for applying mixins to KbqDropdownItem.
|
|
105
173
|
/** @docs-private */
|
|
106
174
|
class KbqDropdownItemBase {
|
|
@@ -167,7 +235,6 @@ class KbqDropdownItem extends KbqDropdownItemMixinBase {
|
|
|
167
235
|
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
168
236
|
// ViewEngine they're overwritten.
|
|
169
237
|
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
170
|
-
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
171
238
|
checkDisabled(event) {
|
|
172
239
|
if (this.disabled) {
|
|
173
240
|
event.preventDefault();
|
|
@@ -179,7 +246,6 @@ class KbqDropdownItem extends KbqDropdownItemMixinBase {
|
|
|
179
246
|
// In Ivy the `host` bindings will be merged when this class is extended, whereas in
|
|
180
247
|
// ViewEngine they're overwritten.
|
|
181
248
|
// TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.
|
|
182
|
-
// tslint:disable-next-line:no-host-decorator-in-concrete
|
|
183
249
|
handleMouseEnter() {
|
|
184
250
|
this.hovered.next(this);
|
|
185
251
|
}
|
|
@@ -188,7 +254,6 @@ class KbqDropdownItem extends KbqDropdownItemMixinBase {
|
|
|
188
254
|
const clone = this.getHostElement().cloneNode(true);
|
|
189
255
|
const icons = clone.querySelectorAll('[kbq-icon], .kbq-icon');
|
|
190
256
|
// Strip away icons so they don't show up in the text.
|
|
191
|
-
// tslint:disable-next-line:prefer-for-of
|
|
192
257
|
for (let i = 0; i < icons.length; i++) {
|
|
193
258
|
const icon = icons[i];
|
|
194
259
|
icon.parentNode?.removeChild(icon);
|
|
@@ -205,7 +270,7 @@ class KbqDropdownItem extends KbqDropdownItemMixinBase {
|
|
|
205
270
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqDropdownItem, deps: [{ token: i0.ElementRef }, { token: i1.FocusMonitor }, { token: KBQ_DROPDOWN_PANEL, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
206
271
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqDropdownItem, selector: "kbq-dropdown-item, [kbq-dropdown-item]", inputs: { disabled: "disabled" }, 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: [
|
|
207
272
|
{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqDropdownItem }
|
|
208
|
-
], queries: [{ propertyName: "icon", first: true, predicate: KbqIcon, descendants: true }], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["kbqTitleText"], descendants: true, static: true }], exportAs: ["kbqDropdownItem"], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"[kbq-icon]\"
|
|
273
|
+
], queries: [{ propertyName: "icon", first: true, predicate: KbqIcon, descendants: true }], viewQueries: [{ propertyName: "textElement", first: true, predicate: ["kbqTitleText"], descendants: true, static: true }], exportAs: ["kbqDropdownItem"], usesInheritance: true, ngImport: i0, template: "<ng-content select=\"[kbq-icon]\" />\n\n<div\n #kbqTitleText\n class=\"kbq-dropdown-item__text\"\n>\n <ng-content />\n</div>\n\n<i\n *ngIf=\"isNested\"\n kbq-icon=\"mc-angle-right-S_16\"\n class=\"kbq-dropdown-trigger__icon\"\n></i>\n\n<div\n class=\"kbq-dropdown-item-overlay\"\n (click)=\"haltDisabledEvents($event)\"\n></div>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 1px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 1px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-dropdown-item{width:100%;-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, 8px);border:var(--kbq-size-3xs, 2px) solid transparent;padding-top:var(--kbq-size-xxs, 4px);padding-left:var(--kbq-size-m, 12px);padding-right:var(--kbq-size-m, 12px);padding-bottom:var(--kbq-size-xxs, 4px);text-align:left;align-items:flex-start}.kbq-dropdown-item .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-dropdown-item .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown-item .kbq-list-text:empty{display:none}.kbq-dropdown-item .kbq-list-option-caption{padding-top:var(--kbq-size-3xs, 2px)}.kbq-dropdown-item:not(.kbq-disabled){cursor:pointer}.kbq-dropdown-item>.kbq-icon:first-child:before{align-self:center;display:flex;height:var(--kbq-size-xl, 20px);width:16px;align-items:center}.kbq-dropdown-item .kbq-dropdown-item__caption{padding-top:var(--kbq-size-3xs, 2px)}.kbq-dropdown-item__text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-dropdown-item__text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown-item__text:empty{display:none}.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, 2px) solid transparent;border-right:var(--kbq-size-3xs, 2px) solid transparent;padding-top:var(--kbq-size-xs, 6px);padding-left:var(--kbq-size-m, 12px);padding-right:var(--kbq-size-m, 12px);padding-bottom:var(--kbq-size-3xs, 2px)}.kbq-dropdown__group-header .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-dropdown__group-header .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown__group-header .kbq-list-text:empty{display:none}.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, 2px) solid transparent;border-right:var(--kbq-size-3xs, 2px) solid transparent;padding-top:var(--kbq-size-m, 12px);padding-left:var(--kbq-size-m, 12px);padding-right:var(--kbq-size-m, 12px);padding-bottom:var(--kbq-size-xxs, 4px)}.kbq-dropdown__group-header.kbq-dropdown__group-header_small .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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:empty{display:none}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.KbqIcon, selector: "[kbq-icon]", inputs: ["color", "small", "autoColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
209
274
|
}
|
|
210
275
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqDropdownItem, decorators: [{
|
|
211
276
|
type: Component,
|
|
@@ -218,7 +283,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
218
283
|
'[attr.tabindex]': 'getTabIndex()'
|
|
219
284
|
}, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
220
285
|
{ provide: KBQ_TITLE_TEXT_REF, useExisting: KbqDropdownItem }
|
|
221
|
-
], template: "<ng-content select=\"[kbq-icon]\"
|
|
286
|
+
], template: "<ng-content select=\"[kbq-icon]\" />\n\n<div\n #kbqTitleText\n class=\"kbq-dropdown-item__text\"\n>\n <ng-content />\n</div>\n\n<i\n *ngIf=\"isNested\"\n kbq-icon=\"mc-angle-right-S_16\"\n class=\"kbq-dropdown-trigger__icon\"\n></i>\n\n<div\n class=\"kbq-dropdown-item-overlay\"\n (click)=\"haltDisabledEvents($event)\"\n></div>\n", styles: ["@keyframes kbq-progress{0%{background-position:0 0}to{background-position:64px 0}}.kbq-progress{position:relative}.kbq-progress:after{content:\"\";position:absolute;border-radius:inherit;inset:0;background:linear-gradient(135deg,#0000000a 12px,#ffffff1a 12px 22px,#0000000a 22px 34px,#ffffff1a 34px) repeat;background-size:32px 32px;animation:kbq-progress 1s linear infinite}.kbq-group{display:flex;flex-direction:row}.kbq-group .kbq-group_justified>.kbq-group-item{width:100%}.kbq-group .kbq-group-item+.kbq-group-item{margin-left:calc(-1 * var(--kbq-button-size-border-width, 1px))}.kbq-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-top-right-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-bottom-left-radius:0;border-top-left-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group{display:flex;flex-direction:column}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:first-child:not(:last-child)>.kbq-form-field__container{border-bottom-right-radius:0;border-bottom-left-radius:0}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-left-radius:var(--kbq-button-size-border-radius, 8px)}.kbq-vertical-group>.kbq-group-item:last-child:not(:first-child)>.kbq-form-field__container{border-top-right-radius:0;border-top-left-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child){border-radius:0}.kbq-vertical-group>.kbq-group-item:not(:first-child):not(:last-child)>.kbq-form-field__container{border-radius:0}.kbq-vertical-group .kbq-group-item+.kbq-group-item{margin-top:calc(-1 * var(--kbq-button-size-border-width, 1px))}.kbq-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kbq-dropdown-item{width:100%;-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, 8px);border:var(--kbq-size-3xs, 2px) solid transparent;padding-top:var(--kbq-size-xxs, 4px);padding-left:var(--kbq-size-m, 12px);padding-right:var(--kbq-size-m, 12px);padding-bottom:var(--kbq-size-xxs, 4px);text-align:left;align-items:flex-start}.kbq-dropdown-item .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-dropdown-item .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown-item .kbq-list-text:empty{display:none}.kbq-dropdown-item .kbq-list-option-caption{padding-top:var(--kbq-size-3xs, 2px)}.kbq-dropdown-item:not(.kbq-disabled){cursor:pointer}.kbq-dropdown-item>.kbq-icon:first-child:before{align-self:center;display:flex;height:var(--kbq-size-xl, 20px);width:16px;align-items:center}.kbq-dropdown-item .kbq-dropdown-item__caption{padding-top:var(--kbq-size-3xs, 2px)}.kbq-dropdown-item__text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-dropdown-item__text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown-item__text:empty{display:none}.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, 2px) solid transparent;border-right:var(--kbq-size-3xs, 2px) solid transparent;padding-top:var(--kbq-size-xs, 6px);padding-left:var(--kbq-size-m, 12px);padding-right:var(--kbq-size-m, 12px);padding-bottom:var(--kbq-size-3xs, 2px)}.kbq-dropdown__group-header .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kbq-dropdown__group-header .kbq-list-text>*{margin:0;padding:0;font-weight:400;font-size:inherit}.kbq-dropdown__group-header .kbq-list-text:empty{display:none}.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, 2px) solid transparent;border-right:var(--kbq-size-3xs, 2px) solid transparent;padding-top:var(--kbq-size-m, 12px);padding-left:var(--kbq-size-m, 12px);padding-right:var(--kbq-size-m, 12px);padding-bottom:var(--kbq-size-xxs, 4px)}.kbq-dropdown__group-header.kbq-dropdown__group-header_small .kbq-list-text{display:flex;flex-direction:column;width:100%;box-sizing:content-box;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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:empty{display:none}\n"] }]
|
|
222
287
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.FocusMonitor }, { type: undefined, decorators: [{
|
|
223
288
|
type: Inject,
|
|
224
289
|
args: [KBQ_DROPDOWN_PANEL]
|
|
@@ -238,75 +303,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
238
303
|
args: ['mouseenter']
|
|
239
304
|
}] } });
|
|
240
305
|
|
|
241
|
-
/**
|
|
242
|
-
* Throws an exception for the case when dropdown trigger doesn't have a valid kbq-dropdown instance
|
|
243
|
-
* @docs-private
|
|
244
|
-
*/
|
|
245
|
-
function throwKbqDropdownMissingError() {
|
|
246
|
-
throw Error(`kbqDropdownTriggerFor: must pass in an kbq-dropdown instance.
|
|
247
|
-
Example:
|
|
248
|
-
<kbq-dropdown #dropdown="kbqDropdown"></kbq-dropdown>
|
|
249
|
-
<button [kbqDropdownTriggerFor]="dropdown"></button>`);
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Throws an exception for the case when dropdown's x-position value isn't valid.
|
|
253
|
-
* In other words, it doesn't match 'before' or 'after'.
|
|
254
|
-
* @docs-private
|
|
255
|
-
*/
|
|
256
|
-
function throwKbqDropdownInvalidPositionX() {
|
|
257
|
-
throw Error(`xPosition value must be either 'before' or after'.
|
|
258
|
-
Example: <kbq-dropdown [xPosition]="'before'" #dropdown="kbqDropdown"></kbq-dropdown>`);
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* Throws an exception for the case when dropdown's y-position value isn't valid.
|
|
262
|
-
* In other words, it doesn't match 'above' or 'below'.
|
|
263
|
-
* @docs-private
|
|
264
|
-
*/
|
|
265
|
-
function throwKbqDropdownInvalidPositionY() {
|
|
266
|
-
throw Error(`yPosition value must be either 'above' or below'.
|
|
267
|
-
Example: <kbq-dropdown [yPosition]="'above'" #dropdown="kbqDropdown"></kbq-dropdown>`);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Animations used by the kbq-dropdown component.
|
|
272
|
-
* @docs-private
|
|
273
|
-
*/
|
|
274
|
-
const kbqDropdownAnimations = {
|
|
275
|
-
/**
|
|
276
|
-
* This animation controls the dropdown panel's entry and exit from the page.
|
|
277
|
-
*
|
|
278
|
-
* When the dropdown panel is added to the DOM, it scales in and fades in its border.
|
|
279
|
-
*
|
|
280
|
-
* When the dropdown panel is removed from the DOM, it simply fades out after a brief
|
|
281
|
-
* delay to display the ripple.
|
|
282
|
-
*/
|
|
283
|
-
transformDropdown: trigger('transformDropdown', [
|
|
284
|
-
state('void', style({
|
|
285
|
-
opacity: 0,
|
|
286
|
-
transform: 'scale(0.8)'
|
|
287
|
-
})),
|
|
288
|
-
transition('void => enter', group([
|
|
289
|
-
query('.kbq-dropdown__content', animate('0ms linear', style({ opacity: 1 }))),
|
|
290
|
-
animate('0ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'scale(1)' }))
|
|
291
|
-
])),
|
|
292
|
-
transition('* => void', animate('50ms 25ms linear', style({ opacity: 0 })))
|
|
293
|
-
]),
|
|
294
|
-
/**
|
|
295
|
-
* This animation fades in the background color and content of the dropdown panel
|
|
296
|
-
* after its containing element is scaled in.
|
|
297
|
-
*/
|
|
298
|
-
fadeInItems: trigger('fadeInItems', [
|
|
299
|
-
// now. Remove next time we do breaking changes.
|
|
300
|
-
state('showing', style({ opacity: 1 })),
|
|
301
|
-
transition('void => *', [
|
|
302
|
-
style({ opacity: 0 }),
|
|
303
|
-
animate('0ms 0ms cubic-bezier(0.55, 0, 0.55, 0.2)')
|
|
304
|
-
])
|
|
305
|
-
])
|
|
306
|
-
};
|
|
307
|
-
const fadeInItems = kbqDropdownAnimations.fadeInItems;
|
|
308
|
-
const transformDropdown = kbqDropdownAnimations.transformDropdown;
|
|
309
|
-
|
|
310
306
|
class KbqDropdown {
|
|
311
307
|
/** Position of the dropdown in the X axis. */
|
|
312
308
|
get xPosition() {
|
|
@@ -360,15 +356,11 @@ class KbqDropdown {
|
|
|
360
356
|
set panelClass(classes) {
|
|
361
357
|
const previousPanelClass = this.previousPanelClass;
|
|
362
358
|
if (previousPanelClass && previousPanelClass.length) {
|
|
363
|
-
previousPanelClass
|
|
364
|
-
.split(' ')
|
|
365
|
-
.forEach((className) => this.classList[className] = false);
|
|
359
|
+
previousPanelClass.split(' ').forEach((className) => (this.classList[className] = false));
|
|
366
360
|
}
|
|
367
361
|
this.previousPanelClass = classes;
|
|
368
362
|
if (classes?.length) {
|
|
369
|
-
classes
|
|
370
|
-
.split(' ')
|
|
371
|
-
.forEach((className) => this.classList[className] = true);
|
|
363
|
+
classes.split(' ').forEach((className) => (this.classList[className] = true));
|
|
372
364
|
this.elementRef.nativeElement.className = '';
|
|
373
365
|
}
|
|
374
366
|
}
|
|
@@ -403,13 +395,11 @@ class KbqDropdown {
|
|
|
403
395
|
}
|
|
404
396
|
ngAfterContentInit() {
|
|
405
397
|
this.updateDirectDescendants();
|
|
406
|
-
this.keyManager = new FocusKeyManager(this.directDescendantItems)
|
|
407
|
-
.withTypeAhead();
|
|
398
|
+
this.keyManager = new FocusKeyManager(this.directDescendantItems).withTypeAhead();
|
|
408
399
|
if (this.navigationWithWrap) {
|
|
409
400
|
this.keyManager.withWrap();
|
|
410
401
|
}
|
|
411
|
-
this.tabSubscription = this.keyManager.tabOut
|
|
412
|
-
.subscribe(() => this.closed.emit('tab'));
|
|
402
|
+
this.tabSubscription = this.keyManager.tabOut.subscribe(() => this.closed.emit('tab'));
|
|
413
403
|
// If a user manually (programmatically) focuses a menu item, we need to reflect that focus
|
|
414
404
|
// change back to the key manager. Note that we don't need to unsubscribe here because focused
|
|
415
405
|
// is internal and we know that it gets completed on destroy.
|
|
@@ -429,7 +419,6 @@ class KbqDropdown {
|
|
|
429
419
|
}
|
|
430
420
|
/** Handle a keyboard event from the dropdown, delegating to the appropriate action. */
|
|
431
421
|
handleKeydown(event) {
|
|
432
|
-
// tslint:disable-next-line:deprecation
|
|
433
422
|
const keyCode = event.keyCode;
|
|
434
423
|
switch (keyCode) {
|
|
435
424
|
case ESCAPE:
|
|
@@ -529,9 +518,7 @@ class KbqDropdown {
|
|
|
529
518
|
* when it comes to maintaining the item order.
|
|
530
519
|
*/
|
|
531
520
|
updateDirectDescendants() {
|
|
532
|
-
this.items.changes
|
|
533
|
-
.pipe(startWith(this.items))
|
|
534
|
-
.subscribe((items) => {
|
|
521
|
+
this.items.changes.pipe(startWith(this.items)).subscribe((items) => {
|
|
535
522
|
this.directDescendantItems.reset(items.filter((item) => item.parentDropdownPanel === this));
|
|
536
523
|
this.directDescendantItems.notifyOnChanges();
|
|
537
524
|
});
|
|
@@ -539,7 +526,7 @@ class KbqDropdown {
|
|
|
539
526
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.0", ngImport: i0, type: KbqDropdown, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: KBQ_DROPDOWN_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
540
527
|
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.0", type: KbqDropdown, selector: "kbq-dropdown", inputs: { navigationWithWrap: "navigationWithWrap", xPosition: "xPosition", yPosition: "yPosition", overlapTriggerY: "overlapTriggerY", overlapTriggerX: "overlapTriggerX", hasBackdrop: "hasBackdrop", panelClass: ["class", "panelClass"], backdropClass: "backdropClass" }, outputs: { closed: "closed" }, providers: [
|
|
541
528
|
{ provide: KBQ_DROPDOWN_PANEL, useExisting: KbqDropdown }
|
|
542
|
-
], queries: [{ 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
|
|
529
|
+
], queries: [{ 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 [style.min-width]=\"triggerWidth\"\n (@transformDropdown.done)=\"onAnimationDone($event)\"\n (@transformDropdown.start)=\"onAnimationStart($event)\"\n (click)=\"close()\"\n (keydown)=\"handleKeydown($event)\"\n [@transformDropdown]=\"panelAnimationState\"\n >\n <div class=\"kbq-dropdown__content\">\n <ng-content />\n </div>\n </div>\n</ng-template>\n", styles: [".kbq-dropdown-trigger.kbq-button-icon_right.kbq-button-icon_left .kbq-icon_left{margin-right:2px}.kbq-dropdown-trigger.kbq-button-icon_right.kbq-button-icon_left .kbq-icon_right{margin-left:2px}.kbq-dropdown-trigger__icon{margin-left:auto}.kbq-dropdown__panel{margin-top:2px;min-width:var(--kbq-dropdown-size-container-width-min, 64px);max-width:var(--kbq-dropdown-size-container-width-max, 640px);border-radius:var(--kbq-dropdown-size-container-border-radius, 8px);padding-top:var(--kbq-dropdown-size-container-padding-vertical, 4px);padding-bottom:var(--kbq-dropdown-size-container-padding-vertical, 4px)}.kbq-dropdown__panel.ng-animating{pointer-events:none}.kbq-dropdown__content{display:flex;flex-direction:column}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [
|
|
543
530
|
kbqDropdownAnimations.transformDropdown,
|
|
544
531
|
kbqDropdownAnimations.fadeInItems
|
|
545
532
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
@@ -551,7 +538,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
551
538
|
kbqDropdownAnimations.fadeInItems
|
|
552
539
|
], providers: [
|
|
553
540
|
{ provide: KBQ_DROPDOWN_PANEL, useExisting: KbqDropdown }
|
|
554
|
-
], template: "<ng-template>\n <div
|
|
541
|
+
], template: "<ng-template>\n <div\n tabindex=\"-1\"\n class=\"kbq-dropdown__panel\"\n [class.kbq-dropdown__panel_nested]=\"parent\"\n [ngClass]=\"classList\"\n [style.min-width]=\"triggerWidth\"\n (@transformDropdown.done)=\"onAnimationDone($event)\"\n (@transformDropdown.start)=\"onAnimationStart($event)\"\n (click)=\"close()\"\n (keydown)=\"handleKeydown($event)\"\n [@transformDropdown]=\"panelAnimationState\"\n >\n <div class=\"kbq-dropdown__content\">\n <ng-content />\n </div>\n </div>\n</ng-template>\n", styles: [".kbq-dropdown-trigger.kbq-button-icon_right.kbq-button-icon_left .kbq-icon_left{margin-right:2px}.kbq-dropdown-trigger.kbq-button-icon_right.kbq-button-icon_left .kbq-icon_right{margin-left:2px}.kbq-dropdown-trigger__icon{margin-left:auto}.kbq-dropdown__panel{margin-top:2px;min-width:var(--kbq-dropdown-size-container-width-min, 64px);max-width:var(--kbq-dropdown-size-container-width-max, 640px);border-radius:var(--kbq-dropdown-size-container-border-radius, 8px);padding-top:var(--kbq-dropdown-size-container-padding-vertical, 4px);padding-bottom:var(--kbq-dropdown-size-container-padding-vertical, 4px)}.kbq-dropdown__panel.ng-animating{pointer-events:none}.kbq-dropdown__content{display:flex;flex-direction:column}\n"] }]
|
|
555
542
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.NgZone }, { type: undefined, decorators: [{
|
|
556
543
|
type: Inject,
|
|
557
544
|
args: [KBQ_DROPDOWN_DEFAULT_OPTIONS]
|
|
@@ -588,7 +575,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.0", ngImpor
|
|
|
588
575
|
/** Injection token that determines the scroll handling while the dropdown is open. */
|
|
589
576
|
const KBQ_DROPDOWN_SCROLL_STRATEGY = new InjectionToken('kbq-dropdown-scroll-strategy');
|
|
590
577
|
/** @docs-private */
|
|
591
|
-
// tslint:disable-next-line:naming-convention
|
|
592
578
|
function KBQ_DROPDOWN_SCROLL_STRATEGY_FACTORY(overlay) {
|
|
593
579
|
return () => overlay.scrollStrategies.reposition();
|
|
594
580
|
}
|
|
@@ -619,9 +605,7 @@ class KbqDropdownTrigger {
|
|
|
619
605
|
this._dropdown = dropdown;
|
|
620
606
|
this.closeSubscription.unsubscribe();
|
|
621
607
|
if (dropdown) {
|
|
622
|
-
this.closeSubscription = dropdown.closed
|
|
623
|
-
.asObservable()
|
|
624
|
-
.subscribe((reason) => {
|
|
608
|
+
this.closeSubscription = dropdown.closed.asObservable().subscribe((reason) => {
|
|
625
609
|
this.destroy(reason);
|
|
626
610
|
// If a click closed the dropdown, we should close the entire chain of nested dropdowns.
|
|
627
611
|
if (['click', 'tab'].includes(reason) && this.parent) {
|
|
@@ -667,7 +651,7 @@ class KbqDropdownTrigger {
|
|
|
667
651
|
* Handles touch start events on the trigger.
|
|
668
652
|
* Needs to be an arrow function so we can easily use addEventListener and removeEventListener.
|
|
669
653
|
*/
|
|
670
|
-
this.handleTouchStart = () => this.openedBy = 'touch';
|
|
654
|
+
this.handleTouchStart = () => (this.openedBy = 'touch');
|
|
671
655
|
elementRef.nativeElement.addEventListener('touchstart', this.handleTouchStart, passiveEventListenerOptions);
|
|
672
656
|
if (dropdownItemInstance) {
|
|
673
657
|
dropdownItemInstance.isNested = this.isNested();
|
|
@@ -691,7 +675,6 @@ class KbqDropdownTrigger {
|
|
|
691
675
|
}
|
|
692
676
|
/** Toggles the dropdown between the open and closed states. */
|
|
693
677
|
toggle() {
|
|
694
|
-
// tslint:disable-next-line:no-void-expression
|
|
695
678
|
return this._opened ? this.close() : this.open();
|
|
696
679
|
}
|
|
697
680
|
/** Opens the dropdown. */
|
|
@@ -709,8 +692,7 @@ class KbqDropdownTrigger {
|
|
|
709
692
|
this.dropdown.lazyContent.detach();
|
|
710
693
|
this.dropdown.lazyContent.attach(this.data);
|
|
711
694
|
}
|
|
712
|
-
this.closeSubscription = this.closingActions()
|
|
713
|
-
.subscribe(() => this.close());
|
|
695
|
+
this.closeSubscription = this.closingActions().subscribe(() => this.close());
|
|
714
696
|
this.init();
|
|
715
697
|
if (this.dropdown instanceof KbqDropdown) {
|
|
716
698
|
this.dropdown.startAnimation();
|
|
@@ -745,7 +727,6 @@ class KbqDropdownTrigger {
|
|
|
745
727
|
}
|
|
746
728
|
/** Handles key presses on the trigger. */
|
|
747
729
|
handleKeydown(event) {
|
|
748
|
-
// tslint:disable-next-line:deprecation
|
|
749
730
|
const keyCode = event.keyCode;
|
|
750
731
|
if (keyCode === ENTER || keyCode === SPACE) {
|
|
751
732
|
this.openedBy = 'keyboard';
|
|
@@ -761,7 +742,7 @@ class KbqDropdownTrigger {
|
|
|
761
742
|
}
|
|
762
743
|
if ((this.isNested() &&
|
|
763
744
|
((keyCode === RIGHT_ARROW && this.dir === 'ltr') || (keyCode === LEFT_ARROW && this.dir === 'rtl'))) ||
|
|
764
|
-
(!this.isNested() &&
|
|
745
|
+
(!this.isNested() && keyCode === DOWN_ARROW$1 && this.openByArrowDown)) {
|
|
765
746
|
event.preventDefault();
|
|
766
747
|
this.openedBy = 'keyboard';
|
|
767
748
|
this.open();
|
|
@@ -793,8 +774,7 @@ class KbqDropdownTrigger {
|
|
|
793
774
|
this.openedBy = undefined;
|
|
794
775
|
if (this.dropdown instanceof KbqDropdown) {
|
|
795
776
|
this.dropdown.resetAnimation();
|
|
796
|
-
const animationSubscription = this.dropdown.animationDone
|
|
797
|
-
.pipe(filter((event) => event.toState === 'void'), take(1));
|
|
777
|
+
const animationSubscription = this.dropdown.animationDone.pipe(filter((event) => event.toState === 'void'), take(1));
|
|
798
778
|
if (this.dropdown.lazyContent) {
|
|
799
779
|
// Wait for the exit animation to finish before detaching the content.
|
|
800
780
|
animationSubscription
|
|
@@ -808,8 +788,7 @@ class KbqDropdownTrigger {
|
|
|
808
788
|
});
|
|
809
789
|
}
|
|
810
790
|
else {
|
|
811
|
-
animationSubscription
|
|
812
|
-
.subscribe(() => this.setIsOpened(false));
|
|
791
|
+
animationSubscription.subscribe(() => this.setIsOpened(false));
|
|
813
792
|
}
|
|
814
793
|
}
|
|
815
794
|
else {
|
|
@@ -839,7 +818,6 @@ class KbqDropdownTrigger {
|
|
|
839
818
|
this.changeDetectorRef.markForCheck();
|
|
840
819
|
}
|
|
841
820
|
this._opened = isOpen;
|
|
842
|
-
// tslint:disable-next-line:no-void-expression
|
|
843
821
|
this._opened ? this.dropdownOpened.emit() : this.dropdownClosed.emit();
|
|
844
822
|
if (this.isNested()) {
|
|
845
823
|
this.dropdownItemInstance.highlighted = isOpen;
|
|
@@ -866,8 +844,7 @@ class KbqDropdownTrigger {
|
|
|
866
844
|
// Consume the `keydownEvents` in order to prevent them from going to another overlay.
|
|
867
845
|
// Ideally we'd also have our keyboard event logic in here, however doing so will
|
|
868
846
|
// break anybody that may have implemented the `KbqDropdownPanel` themselves.
|
|
869
|
-
this.overlayRef.keydownEvents()
|
|
870
|
-
.subscribe();
|
|
847
|
+
this.overlayRef.keydownEvents().subscribe();
|
|
871
848
|
}
|
|
872
849
|
return this.overlayRef;
|
|
873
850
|
}
|
|
@@ -877,7 +854,8 @@ class KbqDropdownTrigger {
|
|
|
877
854
|
*/
|
|
878
855
|
getOverlayConfig() {
|
|
879
856
|
return new OverlayConfig({
|
|
880
|
-
positionStrategy: this.overlay
|
|
857
|
+
positionStrategy: this.overlay
|
|
858
|
+
.position()
|
|
881
859
|
.flexibleConnectedTo(this.elementRef)
|
|
882
860
|
.withLockedPosition()
|
|
883
861
|
.withTransformOriginOn('.kbq-dropdown__panel'),
|
|
@@ -893,8 +871,7 @@ class KbqDropdownTrigger {
|
|
|
893
871
|
*/
|
|
894
872
|
subscribeToPositions(position) {
|
|
895
873
|
if (this.dropdown.setPositionClasses) {
|
|
896
|
-
position.positionChanges
|
|
897
|
-
.subscribe((change) => {
|
|
874
|
+
position.positionChanges.subscribe((change) => {
|
|
898
875
|
const posX = change.connectionPair.overlayX === 'start' ? 'after' : 'before';
|
|
899
876
|
const posY = change.connectionPair.overlayY === 'top' ? 'below' : 'above';
|
|
900
877
|
this.dropdown.setPositionClasses(posX, posY);
|
|
@@ -907,13 +884,11 @@ class KbqDropdownTrigger {
|
|
|
907
884
|
* @param positionStrategy Strategy whose position to update.
|
|
908
885
|
*/
|
|
909
886
|
setPosition(positionStrategy) {
|
|
910
|
-
let [originX, originFallbackX, overlayX, overlayFallbackX] = this.dropdown.xPosition === 'before' ?
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
['bottom', 'top', 'bottom', 'top'] :
|
|
916
|
-
['top', 'bottom', 'top', 'bottom'];
|
|
887
|
+
let [originX, originFallbackX, overlayX, overlayFallbackX] = this.dropdown.xPosition === 'before' ? ['end', 'start', 'end', 'start'] : ['start', 'end', 'start', 'end'];
|
|
888
|
+
// eslint-disable-next-line prefer-const
|
|
889
|
+
let [overlayY, overlayFallbackY, originY, originFallbackY] = this.dropdown.yPosition === 'above'
|
|
890
|
+
? ['bottom', 'top', 'bottom', 'top']
|
|
891
|
+
: ['top', 'bottom', 'top', 'bottom'];
|
|
917
892
|
let offsetY = 0;
|
|
918
893
|
let offsetX = 0;
|
|
919
894
|
if (this.isNested()) {
|
|
@@ -966,8 +941,9 @@ class KbqDropdownTrigger {
|
|
|
966
941
|
const outsidePointerEvents = this.overlayRef.outsidePointerEvents();
|
|
967
942
|
const detachments = this.overlayRef.detachments();
|
|
968
943
|
const parentClose = this.parent ? this.parent.closed : of();
|
|
969
|
-
const hover = this.parent
|
|
970
|
-
.pipe(filter((active) => active !== this.dropdownItemInstance), filter(() => this._opened))
|
|
944
|
+
const hover = this.parent
|
|
945
|
+
? this.parent.hovered().pipe(filter((active) => active !== this.dropdownItemInstance), filter(() => this._opened))
|
|
946
|
+
: of();
|
|
971
947
|
return merge(backdrop, outsidePointerEvents, parentClose, hover, detachments);
|
|
972
948
|
}
|
|
973
949
|
/** Handles the cases where the user hovers over the trigger. */
|
|
@@ -976,7 +952,8 @@ class KbqDropdownTrigger {
|
|
|
976
952
|
if (!this.isNested()) {
|
|
977
953
|
return;
|
|
978
954
|
}
|
|
979
|
-
this.hoverSubscription = this.parent
|
|
955
|
+
this.hoverSubscription = this.parent
|
|
956
|
+
.hovered()
|
|
980
957
|
// Since we might have multiple competing triggers for the same dropdown (e.g. a nested dropdown
|
|
981
958
|
// with different data and triggers), we have to delay it by a tick to ensure that
|
|
982
959
|
// it won't be closed immediately after it is opened.
|
|
@@ -991,6 +968,7 @@ class KbqDropdownTrigger {
|
|
|
991
968
|
// 'changed after checked' errors in some cases. See #12194.
|
|
992
969
|
this.dropdown.animationDone
|
|
993
970
|
.pipe(take(1), delay(0, asapScheduler), takeUntil(this.parent.hovered()))
|
|
971
|
+
// eslint-disable-next-line rxjs/no-nested-subscribe
|
|
994
972
|
.subscribe(() => this.open());
|
|
995
973
|
}
|
|
996
974
|
else {
|