@koobiq/components 20.2.0 → 20.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/_accordion-theme.scss +5 -1
- package/accordion/accordion-tokens.scss +2 -0
- package/accordion/accordion-trigger.scss +6 -0
- package/accordion/accordion.scss +21 -0
- package/accordion/index.d.ts +55 -8
- package/actions-panel/index.d.ts +25 -13
- package/app-switcher/app-switcher-dropdown-app.scss +7 -5
- package/app-switcher/app-switcher-dropdown-site.scss +6 -4
- package/app-switcher/index.d.ts +41 -4
- package/app-switcher/kbq-app-switcher-list-item.scss +6 -8
- package/autocomplete/index.d.ts +24 -9
- package/breadcrumbs/index.d.ts +1 -1
- package/button/index.d.ts +2 -2
- package/button-toggle/button-toggle-tokens.scss +2 -0
- package/button-toggle/button-toggle.scss +9 -0
- package/button-toggle/index.d.ts +5 -0
- package/checkbox/index.d.ts +33 -29
- package/clamped-text/index.d.ts +1 -1
- package/code-block/index.d.ts +24 -19
- package/content-panel/index.d.ts +1 -1
- package/core/index.d.ts +1125 -199
- package/core/option/_action-container-mixins.scss +28 -0
- package/core/option/_option-theme.scss +24 -0
- package/core/option/action.scss +7 -0
- package/core/styles/_koobiq-theme.scss +2 -0
- package/core/styles/_tokens.scss +1 -0
- package/core/styles/common/_connected-overlay.scss +6 -3
- package/core/styles/common/_select.scss +12 -0
- package/core/styles/common/_tokens.scss +0 -9
- package/core/styles/theming/_index.scss +0 -1
- package/core/styles/theming/_theming.scss +34 -5
- package/datepicker/index.d.ts +46 -15
- package/dl/dl.scss +26 -0
- package/dl/index.d.ts +8 -1
- package/dropdown/_dropdown-theme.scss +28 -2
- package/dropdown/dropdown-item.scss +13 -0
- package/dropdown/dropdown.scss +7 -1
- package/dropdown/index.d.ts +264 -17
- package/dynamic-translation/index.d.ts +1 -1
- package/fesm2022/koobiq-components-accordion.mjs +106 -46
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +57 -46
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +16 -16
- package/fesm2022/koobiq-components-app-switcher.mjs +233 -38
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +54 -31
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +13 -13
- package/fesm2022/koobiq-components-breadcrumbs.mjs +25 -25
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +17 -12
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +25 -25
- package/fesm2022/koobiq-components-checkbox.mjs +69 -92
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +13 -13
- package/fesm2022/koobiq-components-code-block.mjs +56 -69
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +29 -29
- package/fesm2022/koobiq-components-core.mjs +2445 -789
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +160 -121
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +7 -7
- package/fesm2022/koobiq-components-dl.mjs +23 -15
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +754 -155
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
- package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -7
- package/fesm2022/koobiq-components-empty-state.mjs +19 -19
- package/fesm2022/koobiq-components-file-upload.mjs +74 -42
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +605 -192
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +7 -7
- package/fesm2022/koobiq-components-form-field.mjs +346 -158
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +39 -21
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +172 -27
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +41 -24
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +8 -8
- package/fesm2022/koobiq-components-list.mjs +657 -143
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
- package/fesm2022/koobiq-components-markdown.mjs +14 -11
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +59 -35
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +69 -54
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +23 -22
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +16 -17
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +26 -21
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
- package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
- package/fesm2022/koobiq-components-radio.mjs +10 -10
- package/fesm2022/koobiq-components-resizer.mjs +33 -14
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +10 -10
- package/fesm2022/koobiq-components-search-expandable.mjs +7 -7
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +419 -106
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +14 -14
- package/fesm2022/koobiq-components-sidepanel.mjs +26 -26
- package/fesm2022/koobiq-components-skeleton.mjs +10 -10
- package/fesm2022/koobiq-components-split-button.mjs +7 -7
- package/fesm2022/koobiq-components-splitter.mjs +17 -17
- package/fesm2022/koobiq-components-table.mjs +15 -13
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +54 -54
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +283 -122
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +13 -8
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +29 -24
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +58 -26
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +76 -39
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +7 -7
- package/fesm2022/koobiq-components-toast.mjs +51 -26
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +72 -64
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +115 -36
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +13 -13
- package/fesm2022/koobiq-components-tree-select.mjs +189 -55
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +302 -81
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +27 -27
- package/file-upload/index.d.ts +25 -6
- package/file-upload/multiple-file-upload.component.scss +14 -0
- package/filter-bar/_filter-bar-theme.scss +0 -6
- package/filter-bar/index.d.ts +222 -9
- package/filter-bar/pipes/pipe-multi-tree-select.scss +0 -6
- package/filter-bar/pipes/pipe-multiselect.scss +0 -6
- package/filter-bar/pipes/pipe-tree-select.scss +0 -6
- package/form-field/_form-field-theme.scss +76 -20
- package/form-field/fieldset.scss +10 -0
- package/form-field/form-field-tokens.scss +15 -1
- package/form-field/form-field.scss +15 -19
- package/form-field/index.d.ts +147 -65
- package/icon/index.d.ts +31 -6
- package/inline-edit/index.d.ts +57 -4
- package/inline-edit/inline-edit.scss +10 -0
- package/input/index.d.ts +17 -2
- package/list/_list-theme.scss +42 -10
- package/list/index.d.ts +326 -79
- package/list/list-tokens.scss +43 -8
- package/list/list.scss +186 -12
- package/markdown/index.d.ts +1 -1
- package/modal/index.d.ts +21 -4
- package/modal/modal-tokens.scss +1 -1
- package/navbar/index.d.ts +16 -1
- package/navbar/navbar-brand.scss +6 -0
- package/navbar/vertical-navbar.scss +6 -0
- package/notification-center/notification-item.scss +6 -0
- package/package.json +3 -6
- package/popover/index.d.ts +2 -2
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/resizer/index.d.ts +12 -0
- package/schematics/migrations/deprecated-icons/README.md +29 -4
- package/schematics/migrations/deprecated-icons/data.js +7 -0
- package/schematics/migrations/deprecated-icons/index.js +62 -35
- package/schematics/migrations/new-icons-pack/README.md +37 -2
- package/schematics/migrations/new-icons-pack/data.js +8 -0
- package/schematics/migrations/new-icons-pack/index.js +144 -53
- package/schematics/ng-add/index.js +3 -3
- package/schematics/utils/angular-parsing.js +30 -12
- package/schematics/utils/ast.js +31 -0
- package/schematics/utils/icon-migration.js +530 -0
- package/schematics/utils/typescript.js +44 -0
- package/scrollbar/index.d.ts +1 -1
- package/select/index.d.ts +163 -18
- package/select/select-tokens.scss +0 -1
- package/select/select.scss +0 -2
- package/splitter/index.d.ts +1 -1
- package/table/_table-theme.scss +4 -0
- package/table/index.d.ts +2 -1
- package/table/table.scss +8 -0
- package/tags/index.d.ts +128 -29
- package/textarea/index.d.ts +5 -0
- package/time-range/index.d.ts +1 -1
- package/timepicker/index.d.ts +4 -0
- package/timezone/index.d.ts +9 -5
- package/toast/index.d.ts +26 -3
- package/toggle/index.d.ts +34 -14
- package/tooltip/index.d.ts +54 -11
- package/tree/_tree-theme.scss +25 -5
- package/tree/index.d.ts +71 -3
- package/tree/tree-option.scss +2 -8
- package/tree-select/_tree-select-theme.scss +22 -0
- package/tree-select/index.d.ts +83 -16
- package/core/styles/_tokens.kbq.import.scss +0 -4
- package/core/styles/theming/_components-theming.scss +0 -1927
- package/filter-bar/pipes/pipe-select.scss +0 -5
- package/overflow-items/overflow-items.scss +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koobiq-components-toggle.mjs","sources":["../../../packages/components/toggle/toggle.component.ts","../../../packages/components/toggle/toggle.component.html","../../../packages/components/toggle/toggle.module.ts","../../../packages/components/toggle/koobiq-components-toggle.ts"],"sourcesContent":["import { animate, state, style, transition, trigger } from '@angular/animations';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { CdkObserveContent } from '@angular/cdk/observers';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n inject,\n Input,\n input,\n numberAttribute,\n OnDestroy,\n output,\n viewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { KBQ_CHECKBOX_CLICK_ACTION, KbqCheckboxClickAction, TransitionCheckState } from '@koobiq/components/checkbox';\nimport { KbqAnimationCurves, KbqAnimationDurations, KbqCheckedState, KbqColorDirective } from '@koobiq/components/core';\n\nlet nextUniqueId = 0;\n\ntype ToggleLabelPositionType = 'left' | 'right';\n\nexport class KbqToggleChange {\n source: KbqToggleComponent;\n checked: boolean;\n}\n\n@Component({\n selector: 'kbq-toggle',\n imports: [\n CdkObserveContent\n ],\n templateUrl: './toggle.component.html',\n styleUrls: ['./toggle.scss', './toggle-tokens.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => KbqToggleComponent),\n multi: true\n }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-toggle',\n '[class.kbq-toggle_big]': 'big()',\n '[id]': 'id',\n '[attr.id]': 'id',\n '[class.kbq-disabled]': 'disabled || loading()',\n '[class.kbq-active]': 'checked',\n '[class.kbq-indeterminate]': 'indeterminate'\n },\n animations: [\n trigger('switch', [\n state(TransitionCheckState.Init, style({ left: '3px' })),\n state(TransitionCheckState.Unchecked, style({ left: '3px' })),\n state(TransitionCheckState.Indeterminate, style({ left: '10px', visibility: 'hidden' })),\n state(TransitionCheckState.Checked, style({ left: 'calc(100% - 11px)' })),\n transition(\n `${TransitionCheckState.Init} => ${TransitionCheckState.Checked}`,\n animate(KbqAnimationDurations.Entering)\n ),\n transition(\n `${TransitionCheckState.Checked} <=> ${TransitionCheckState.Unchecked}`,\n animate(KbqAnimationDurations.Rapid)\n ),\n transition(\n `${TransitionCheckState.Indeterminate} => *`,\n animate(`${KbqAnimationDurations.Instant} ${KbqAnimationCurves.EaseInOut}`)\n )\n ])\n ],\n exportAs: 'kbqToggle'\n})\nexport class KbqToggleComponent extends KbqColorDirective implements AfterViewInit, ControlValueAccessor, OnDestroy {\n private focusMonitor = inject(FocusMonitor);\n private changeDetectorRef = inject(ChangeDetectorRef);\n\n readonly big = input<boolean>(false);\n\n readonly inputElement = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n readonly labelPosition = input<ToggleLabelPositionType>('right');\n\n readonly ariaLabel = input<string>('', { alias: 'aria-label' });\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input() id: string;\n\n get inputId(): string {\n return `${this.id || this.uniqueId}-input`;\n }\n\n readonly name = input<string | null>(null);\n\n readonly value = input<string>(undefined!);\n\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get disabled() {\n return this._disabled;\n }\n\n set disabled(value: any) {\n if (value !== this._disabled) {\n this._disabled = value;\n this.changeDetectorRef.markForCheck();\n }\n }\n\n private _disabled: boolean = false;\n\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input({ transform: numberAttribute })\n get tabIndex(): number {\n return this.disabled ? -1 : this._tabIndex;\n }\n\n set tabIndex(value: number) {\n this._tabIndex = value;\n }\n\n private _tabIndex = 0;\n\n get checked() {\n return this._checked;\n }\n\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n set checked(value: boolean) {\n if (value !== this._checked) {\n this._checked = value;\n this.setTransitionCheckState();\n this.changeDetectorRef.markForCheck();\n }\n }\n\n private _checked: boolean = false;\n\n /**\n * Whether the toggle is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input({ transform: booleanAttribute })\n get indeterminate(): boolean {\n return this._indeterminate;\n }\n\n set indeterminate(value: boolean) {\n const changed = value !== this._indeterminate;\n\n this._indeterminate = value;\n\n if (changed) {\n this.setTransitionCheckState();\n this.indeterminateChange.emit(this._indeterminate);\n }\n }\n\n private _indeterminate: boolean = false;\n /**\n * Property for manually set loading state.\n */\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n\n readonly change = output<KbqToggleChange>();\n\n /** Event emitted when the toggle's `indeterminate` value changes. */\n readonly indeterminateChange = output<boolean>();\n\n /** @docs-private */\n protected currentCheckState: TransitionCheckState = TransitionCheckState.Init;\n\n /** Defines the behavior when a user clicks on the toggle. */\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input() clickAction: KbqCheckboxClickAction = inject(KBQ_CHECKBOX_CLICK_ACTION, { optional: true }) || undefined;\n\n private uniqueId: string = `kbq-toggle-${++nextUniqueId}`;\n\n constructor() {\n super();\n\n this.id = this.uniqueId;\n }\n\n ngAfterViewInit(): void {\n this.focusMonitor.monitor(this.elementRef.nativeElement, true);\n }\n\n ngOnDestroy() {\n this.focusMonitor.stopMonitoring(this.elementRef.nativeElement);\n }\n\n focus(): void {\n this.focusMonitor.focusVia(this.inputElement().nativeElement, 'keyboard');\n }\n\n getAriaChecked(): KbqCheckedState {\n return this.checked ? 'true' : this.indeterminate ? 'mixed' : 'false';\n }\n\n onChangeEvent(event: Event) {\n event.stopPropagation();\n }\n\n onLabelTextChange() {\n this.changeDetectorRef.markForCheck();\n }\n\n onInputClick(event: MouseEvent) {\n if (this.loading()) return;\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `toggle` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n\n if (!this.disabled && this.clickAction !== 'noop') {\n // When user manually click on the toggle, `indeterminate` is set to false.\n if (this.indeterminate && this.clickAction !== 'check') {\n Promise.resolve().then(() => {\n this._indeterminate = false;\n this.indeterminateChange.emit(this._indeterminate);\n });\n }\n\n this._checked = !this.checked;\n this.onTouchedCallback();\n this.transitionCheckState(this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this.emitChangeEvent();\n } else if (!this.disabled && this.clickAction === 'noop') {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `kbq-toggle`.\n const inputElement = this.inputElement();\n\n inputElement.nativeElement.checked = this.checked;\n inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n\n writeValue(value: any) {\n this.checked = !!value;\n }\n\n registerOnChange(fn: any) {\n this.onChangeCallback = fn;\n }\n\n registerOnTouched(fn: any) {\n this.onTouchedCallback = fn;\n }\n\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n private setTransitionCheckState() {\n if (this.indeterminate) {\n this.transitionCheckState(TransitionCheckState.Indeterminate);\n } else {\n this.transitionCheckState(this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n }\n }\n\n private onTouchedCallback = () => {};\n\n private onChangeCallback = (_: any) => {};\n\n private transitionCheckState(newState: TransitionCheckState) {\n const oldState = this.currentCheckState;\n\n if (oldState === newState) return;\n\n this.currentCheckState = newState;\n }\n\n private emitChangeEvent() {\n const event = new KbqToggleChange();\n\n event.source = this;\n event.checked = this.checked;\n\n this.onChangeCallback(this.checked);\n this.change.emit(event);\n }\n}\n","<label class=\"kbq-toggle-layout\" [attr.for]=\"inputId\" [class.kbq-toggle-layout_left]=\"labelPosition() === 'left'\">\n <input\n #input\n role=\"switch\"\n type=\"checkbox\"\n class=\"kbq-toggle-input cdk-visually-hidden\"\n [attr.aria-checked]=\"getAriaChecked()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.name]=\"name()\"\n [attr.value]=\"value()\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"inputId\"\n [indeterminate]=\"indeterminate\"\n [tabIndex]=\"tabIndex\"\n (change)=\"onChangeEvent($event)\"\n (click)=\"onInputClick($event)\"\n (keydown.enter)=\"input.click()\"\n />\n <div class=\"kbq-toggle-bar-container\">\n <div class=\"kbq-toggle-bar\" [class.kbq-progress]=\"loading()\">\n <div class=\"kbq-toggle__circle\" [@switch]=\"currentCheckState\"></div>\n <div class=\"kbq-toggle__thumb\"></div>\n </div>\n </div>\n\n <div\n class=\"kbq-toggle__content\"\n [class.kbq-toggle__content_left]=\"labelPosition() === 'left'\"\n [class.kbq-toggle__content_right]=\"labelPosition() === 'right'\"\n >\n <span class=\"kbq-toggle-label\" (cdkObserveContent)=\"onLabelTextChange()\">\n <ng-content />\n </span>\n\n <ng-content select=\"kbq-hint\" />\n </div>\n</label>\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { NgModule } from '@angular/core';\nimport { KbqToggleComponent } from './toggle.component';\n\n@NgModule({\n imports: [A11yModule, KbqToggleComponent],\n exports: [KbqToggleComponent]\n})\nexport class KbqToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAwBA,IAAI,YAAY,GAAG,CAAC;MAIP,eAAe,CAAA;AAG3B;AAiDK,MAAO,kBAAmB,SAAQ,iBAAiB,CAAA;AAiBrD,IAAA,IAAI,OAAO,GAAA;QACP,OAAO,CAAA,EAAG,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAA,MAAA,CAAQ;IAC9C;;;AAQA,IAAA,IACI,QAAQ,GAAA;QACR,OAAO,IAAI,CAAC,SAAS;IACzB;IAEA,IAAI,QAAQ,CAAC,KAAU,EAAA;AACnB,QAAA,IAAI,KAAK,KAAK,IAAI,CAAC,SAAS,EAAE;AAC1B,YAAA,IAAI,CAAC,SAAS,GAAG,KAAK;AACtB,YAAA,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE;QACzC;IACJ;;;AAMA,IAAA,IACI,QAAQ,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS;IAC9C;IAEA,IAAI,QAAQ,CAAC,KAAa,EAAA;AACtB,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;IAC1B;AAIA,IAAA,IAAI,OAAO,GA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EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHd,UAAU,CAAA,EAAA,CAAA,CAAA;;4FAGX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,kBAAkB,CAAC;oBACzC,OAAO,EAAE,CAAC,kBAAkB;AAC/B,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koobiq-components-toggle.mjs","sources":["../../../packages/components/toggle/toggle.component.ts","../../../packages/components/toggle/toggle.component.html","../../../packages/components/toggle/toggle.module.ts","../../../packages/components/toggle/koobiq-components-toggle.ts"],"sourcesContent":["import { animate, state, style, transition, trigger } from '@angular/animations';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { CdkObserveContent } from '@angular/cdk/observers';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n effect,\n ElementRef,\n inject,\n Input,\n input,\n numberAttribute,\n OnDestroy,\n output,\n viewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { KBQ_CHECKBOX_CLICK_ACTION } from '@koobiq/components/checkbox';\nimport {\n KBQ_CHECKABLE_CLICK_ACTION,\n KbqAnimationCurves,\n KbqAnimationDurations,\n KbqCheckable,\n KbqCheckableClickAction,\n KbqCheckedState,\n KbqColorDirective,\n TransitionCheckState\n} from '@koobiq/components/core';\n\nlet nextUniqueId = 0;\n\ntype ToggleLabelPositionType = 'left' | 'right';\n\nexport class KbqToggleChange {\n source: KbqToggleComponent;\n checked: boolean;\n}\n\n/**\n * Toggle click action when user click on input element. Alias of `KbqCheckableClickAction`.\n */\nexport type KbqToggleClickAction = KbqCheckableClickAction;\n\n@Component({\n selector: 'kbq-toggle',\n imports: [\n CdkObserveContent\n ],\n templateUrl: './toggle.component.html',\n styleUrls: ['./toggle.scss', './toggle-tokens.scss'],\n providers: [\n // Falls back to `KBQ_CHECKBOX_CLICK_ACTION` for backwards compatibility with apps that already\n // configure it globally to control click behavior for both checkbox and toggle.\n { provide: KBQ_CHECKABLE_CLICK_ACTION, useFactory: () => inject(KBQ_CHECKBOX_CLICK_ACTION, { optional: true }) }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-toggle',\n '[class.kbq-toggle_big]': 'big()',\n '[id]': 'id',\n '[attr.id]': 'id',\n '[class.kbq-disabled]': 'disabled || loading()',\n '[class.kbq-active]': 'checked',\n '[class.kbq-indeterminate]': 'indeterminate'\n },\n hostDirectives: [KbqCheckable],\n animations: [\n trigger('switch', [\n state(TransitionCheckState.Init, style({ left: '3px' })),\n state(TransitionCheckState.Unchecked, style({ left: '3px' })),\n state(TransitionCheckState.Indeterminate, style({ left: '10px', visibility: 'hidden' })),\n state(TransitionCheckState.Checked, style({ left: 'calc(100% - 11px)' })),\n transition(\n `${TransitionCheckState.Init} => ${TransitionCheckState.Checked}`,\n animate(KbqAnimationDurations.Entering)\n ),\n transition(\n `${TransitionCheckState.Checked} <=> ${TransitionCheckState.Unchecked}`,\n animate(KbqAnimationDurations.Rapid)\n ),\n transition(\n `${TransitionCheckState.Indeterminate} => *`,\n animate(`${KbqAnimationDurations.Instant} ${KbqAnimationCurves.EaseInOut}`)\n )\n ])\n ],\n exportAs: 'kbqToggle'\n})\nexport class KbqToggleComponent extends KbqColorDirective implements AfterViewInit, ControlValueAccessor, OnDestroy {\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly checkable = inject(KbqCheckable, { self: true });\n\n readonly big = input<boolean>(false);\n\n readonly inputElement = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n readonly labelPosition = input<ToggleLabelPositionType>('right');\n\n readonly ariaLabel = input<string>('', { alias: 'aria-label' });\n readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input() id: string;\n\n get inputId(): string {\n return `${this.id || this.uniqueId}-input`;\n }\n\n readonly name = input<string | null>(null);\n\n readonly value = input<string>(undefined!);\n\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get disabled() {\n return this.checkable.disabled();\n }\n\n set disabled(value: any) {\n this.checkable.disabled.set(value);\n }\n\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input({ transform: numberAttribute })\n get tabIndex(): number {\n return this.checkable.effectiveTabIndex();\n }\n\n set tabIndex(value: number) {\n this.checkable.tabIndex.set(value);\n }\n\n get checked() {\n return this.checkable.checked();\n }\n\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n set checked(value: boolean) {\n if (value !== this.checkable.checked()) {\n this.checkable.checked.set(value);\n this.setTransitionCheckState();\n }\n }\n\n /**\n * Whether the toggle is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input({ transform: booleanAttribute })\n get indeterminate(): boolean {\n return this.checkable.indeterminate();\n }\n\n set indeterminate(value: boolean) {\n const changed = value !== this.checkable.indeterminate();\n\n this.checkable.indeterminate.set(value);\n\n if (changed) {\n this.setTransitionCheckState();\n this.indeterminateChange.emit(value);\n }\n }\n\n /**\n * Property for manually set loading state.\n */\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n\n readonly change = output<KbqToggleChange>();\n\n /** Event emitted when the toggle's `indeterminate` value changes. */\n readonly indeterminateChange = output<boolean>();\n\n /** @docs-private */\n protected currentCheckState: TransitionCheckState = TransitionCheckState.Init;\n\n /** Defines the behavior when a user clicks on the toggle. */\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input() clickAction: KbqToggleClickAction = inject(KBQ_CHECKABLE_CLICK_ACTION, { optional: true }) || undefined;\n\n private uniqueId: string = `kbq-toggle-${++nextUniqueId}`;\n\n constructor() {\n super();\n\n this.id = this.uniqueId;\n\n // `writeValue` (ngModel/formControl) now runs on `KbqCheckable`, bypassing the `checked`/`indeterminate`\n // setters below, so this keeps the `[@switch]` animation state in sync for form-driven value changes too.\n effect(() => this.setTransitionCheckState());\n }\n\n ngAfterViewInit(): void {\n this.focusMonitor.monitor(this.elementRef.nativeElement, true);\n }\n\n ngOnDestroy() {\n this.focusMonitor.stopMonitoring(this.elementRef.nativeElement);\n }\n\n focus(): void {\n this.focusMonitor.focusVia(this.inputElement().nativeElement, 'keyboard');\n }\n\n getAriaChecked(): KbqCheckedState {\n return this.checkable.getAriaChecked();\n }\n\n onChangeEvent(event: Event) {\n event.stopPropagation();\n }\n\n onLabelTextChange() {\n this.changeDetectorRef.markForCheck();\n }\n\n onInputClick(event: MouseEvent) {\n if (this.loading()) return;\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `toggle` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n\n const { shouldToggle, shouldClearIndeterminate } = this.checkable.resolveClick(this.clickAction);\n\n if (shouldToggle) {\n // When user manually click on the toggle, `indeterminate` is set to false.\n if (shouldClearIndeterminate) {\n Promise.resolve().then(() => {\n this.checkable.indeterminate.set(false);\n this.indeterminateChange.emit(false);\n });\n }\n\n this.checkable.toggle();\n this.checkable.onTouched();\n this.transitionCheckState(this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this.emitChangeEvent();\n } else if (!this.disabled) {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `kbq-toggle`.\n this.checkable.resetNativeInput(this.inputElement().nativeElement);\n }\n }\n\n /**\n * Implemented as part of ControlValueAccessor.\n * @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,\n * so this is never called by Angular forms. Will be removed in the next major version.\n */\n writeValue(value: any) {\n this.checked = !!value;\n }\n\n /**\n * Implemented as part of ControlValueAccessor.\n * @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,\n * so this is never called by Angular forms. Will be removed in the next major version.\n */\n registerOnChange(fn: any) {\n this.checkable.registerOnChange(fn);\n }\n\n /**\n * Implemented as part of ControlValueAccessor.\n * @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,\n * so this is never called by Angular forms. Will be removed in the next major version.\n */\n registerOnTouched(fn: any) {\n this.checkable.registerOnTouched(fn);\n }\n\n /**\n * Implemented as part of ControlValueAccessor.\n * @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,\n * so this is never called by Angular forms. Will be removed in the next major version.\n */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n private setTransitionCheckState() {\n if (this.indeterminate) {\n this.transitionCheckState(TransitionCheckState.Indeterminate);\n } else {\n this.transitionCheckState(this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n }\n }\n\n private transitionCheckState(newState: TransitionCheckState) {\n if (this.currentCheckState === newState) return;\n\n this.currentCheckState = newState;\n }\n\n private emitChangeEvent() {\n // Note: `toggle()` already notifies the ControlValueAccessor change handler via `KbqCheckable.toggle()`.\n const event = new KbqToggleChange();\n\n event.source = this;\n event.checked = this.checked;\n\n this.change.emit(event);\n }\n}\n","<label class=\"kbq-toggle-layout\" [attr.for]=\"inputId\" [class.kbq-toggle-layout_left]=\"labelPosition() === 'left'\">\n <input\n #input\n role=\"switch\"\n type=\"checkbox\"\n class=\"kbq-toggle-input cdk-visually-hidden\"\n [attr.aria-checked]=\"getAriaChecked()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby()\"\n [attr.name]=\"name()\"\n [attr.value]=\"value()\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"inputId\"\n [indeterminate]=\"indeterminate\"\n [tabIndex]=\"tabIndex\"\n (change)=\"onChangeEvent($event)\"\n (click)=\"onInputClick($event)\"\n (keydown.enter)=\"input.click()\"\n />\n <div class=\"kbq-toggle-bar-container\">\n <div class=\"kbq-toggle-bar\" [class.kbq-progress]=\"loading()\">\n <div class=\"kbq-toggle__circle\" [@switch]=\"currentCheckState\"></div>\n <div class=\"kbq-toggle__thumb\"></div>\n </div>\n </div>\n\n <div\n class=\"kbq-toggle__content\"\n [class.kbq-toggle__content_left]=\"labelPosition() === 'left'\"\n [class.kbq-toggle__content_right]=\"labelPosition() === 'right'\"\n >\n <span class=\"kbq-toggle-label\" (cdkObserveContent)=\"onLabelTextChange()\">\n <ng-content />\n </span>\n\n <ng-content select=\"kbq-hint\" />\n </div>\n</label>\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { NgModule } from '@angular/core';\nimport { KbqToggleComponent } from './toggle.component';\n\n@NgModule({\n imports: [A11yModule, KbqToggleComponent],\n exports: [KbqToggleComponent]\n})\nexport class KbqToggleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAiCA,IAAI,YAAY,GAAG,CAAC;MAIP,eAAe,CAAA;AAG3B;AAqDK,MAAO,kBAAmB,SAAQ,iBAAiB,CAAA;AAkBrD,IAAA,IAAI,OAAO,GAAA;QACP,OAAO,CAAA,EAAG,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAA,MAAA,CAAQ;IAC9C;;;AAQA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,QAAA,EAAA,CAAA,CAAA;AAAf,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAAA,OAAA,EAAA,CAHd,UAAU,EAAE,kBAAkB,aAC9B,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAEnB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHd,UAAU,CAAA,EAAA,CAAA,CAAA;;4FAGX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,kBAAkB,CAAC;oBACzC,OAAO,EAAE,CAAC,kBAAkB;AAC/B,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable, inject, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component,
|
|
2
|
+
import { InjectionToken, Injectable, inject, ViewChild, ViewEncapsulation, ChangeDetectionStrategy, Component, input, Renderer2, booleanAttribute, EventEmitter, effect, numberAttribute, Input, Output, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
4
4
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
5
5
|
import { Overlay } from '@angular/cdk/overlay';
|
|
6
6
|
import { NgTemplateOutlet } from '@angular/common';
|
|
7
7
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
8
|
-
import { KbqPopUp, applyPopupMargins, PopUpTriggers, KbqPopUpTrigger, KbqComponentColors, KBQ_PARENT_POPUP, POSITION_TO_CSS_MAP, PopUpPlacements } from '@koobiq/components/core';
|
|
8
|
+
import { KbqPopUp, applyPopupMargins, PopUpTriggers, KbqPopUpTrigger, KbqComponentColors, KBQ_PARENT_POPUP, KBQ_SIBLING_POPUP, POSITION_TO_CSS_MAP, PopUpPlacements } from '@koobiq/components/core';
|
|
9
9
|
import { merge, EMPTY } from 'rxjs';
|
|
10
|
-
import {
|
|
10
|
+
import { filter } from 'rxjs/operators';
|
|
11
|
+
import { trigger, state, style, transition, animate, keyframes } from '@angular/animations';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Default value of the `kbqTooltipSingleInstance` input. Provide `false` at the application level to
|
|
@@ -43,10 +44,10 @@ class KbqTooltipRegistry {
|
|
|
43
44
|
this.visibleTooltip = null;
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
47
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
47
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTooltipRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
48
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTooltipRegistry, providedIn: 'root' }); }
|
|
48
49
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTooltipRegistry, decorators: [{
|
|
50
51
|
type: Injectable,
|
|
51
52
|
args: [{ providedIn: 'root' }]
|
|
52
53
|
}] });
|
|
@@ -104,10 +105,10 @@ class KbqTooltipComponent extends KbqPopUp {
|
|
|
104
105
|
};
|
|
105
106
|
super.updateClassMap(placement, customClass, classMap);
|
|
106
107
|
}
|
|
107
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
108
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: KbqTooltipComponent, isStandalone: true, selector: "kbq-tooltip-component", providers: [KBQ_TOOLTIP_OPEN_TIME_PROVIDER], viewQueries: [{ propertyName: "elementRef", first: true, predicate: ["tooltip"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n #tooltip\n class=\"kbq-tooltip\"\n [class.kbq-tooltip_arrowless]=\"!arrow\"\n [class]=\"classMap\"\n [@state]=\"visibility\"\n (@state.done)=\"animationDone($event)\"\n (@state.start)=\"animationStart()\"\n>\n <div class=\"kbq-tooltip__inner\">\n @if (arrow) {\n <div class=\"kbq-tooltip__arrow\"></div>\n }\n\n @if (header) {\n <div class=\"kbq-tooltip__header\">\n @if (isTemplateRef(header)) {\n <ng-container [ngTemplateOutlet]=\"$any(header)\" [ngTemplateOutletContext]=\"context\" />\n } @else {\n <div>{{ header }}</div>\n }\n </div>\n }\n <div class=\"kbq-tooltip__content\">\n @if (isTemplateRef(content)) {\n <ng-container [ngTemplateOutlet]=\"$any(content)\" [ngTemplateOutletContext]=\"context\" />\n } @else {\n <div>{{ content }}</div>\n }\n </div>\n </div>\n</div>\n", styles: [".kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-top),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-top-left),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-top-right){margin-bottom:9px}.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-right),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-right-top),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-right-bottom){margin-left:9px}.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-bottom),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-bottom-left),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-bottom-right){margin-top:9px}.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-left),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-left-top),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-left-bottom){margin-right:9px}.kbq-tooltip__inner{border-radius:var(--kbq-tooltip-size-border-radius);word-break:break-word}.kbq-tooltip{box-sizing:border-box;border-radius:var(--kbq-tooltip-size-border-radius);white-space:pre-line}.kbq-tooltip.kbq-tooltip_placement-top,.kbq-tooltip.kbq-tooltip_placement-top-left,.kbq-tooltip.kbq-tooltip_placement-top-right{margin-bottom:8px}.kbq-tooltip.kbq-tooltip_placement-right,.kbq-tooltip.kbq-tooltip_placement-right-top,.kbq-tooltip.kbq-tooltip_placement-right-bottom{margin-left:8px}.kbq-tooltip.kbq-tooltip_placement-bottom,.kbq-tooltip.kbq-tooltip_placement-bottom-left,.kbq-tooltip.kbq-tooltip_placement-bottom-right{margin-top:8px}.kbq-tooltip.kbq-tooltip_placement-left,.kbq-tooltip.kbq-tooltip_placement-left-top,.kbq-tooltip.kbq-tooltip_placement-left-bottom{margin-right:8px}.kbq-tooltip{max-width:var(--kbq-tooltip-size-max-width)}.kbq-tooltip .kbq-tooltip__inner{padding:var(--kbq-tooltip-size-padding-vertical) var(--kbq-tooltip-size-padding-horizontal)}.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-top,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-top-left,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-top-right{margin-bottom:4px}.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-right,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-right-top,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-right-bottom{margin-left:4px}.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-bottom,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-bottom-left,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-bottom-right{margin-top:4px}.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-left,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-left-top,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-left-bottom{margin-right:4px}.kbq-tooltip.kbq-theme .kbq-tooltip__inner{color:var(--kbq-tooltip-theme-fade-off-text);background-image:linear-gradient(var(--kbq-tooltip-theme-fade-off-background),var(--kbq-tooltip-theme-fade-off-background));background-color:var(--kbq-background-bg)}.kbq-tooltip.kbq-theme .kbq-tooltip__arrow{background-color:var(--kbq-tooltip-theme-fade-off-background)}.kbq-tooltip.kbq-theme.kbq-tooltip_arrowless{box-shadow:var(--kbq-tooltip-theme-fade-off-shadow)}.kbq-tooltip.kbq-contrast .kbq-tooltip__inner{color:var(--kbq-tooltip-contrast-fade-off-text);background-image:linear-gradient(var(--kbq-tooltip-contrast-fade-off-background),var(--kbq-tooltip-contrast-fade-off-background));background-color:var(--kbq-background-bg)}.kbq-tooltip.kbq-contrast .kbq-tooltip__arrow{background-color:var(--kbq-tooltip-contrast-fade-off-background)}.kbq-tooltip.kbq-contrast.kbq-tooltip_arrowless{box-shadow:var(--kbq-tooltip-contrast-fade-off-shadow)}.kbq-tooltip.kbq-contrast-fade .kbq-tooltip__inner{color:var(--kbq-tooltip-contrast-fade-on-text);background-image:linear-gradient(var(--kbq-tooltip-contrast-fade-on-background),var(--kbq-tooltip-contrast-fade-on-background));background-color:var(--kbq-background-bg)}.kbq-tooltip.kbq-contrast-fade .kbq-tooltip__arrow{background-color:var(--kbq-tooltip-contrast-fade-on-background)}.kbq-tooltip.kbq-contrast-fade.kbq-tooltip_arrowless{box-shadow:var(--kbq-tooltip-contrast-fade-on-shadow)}.kbq-tooltip.kbq-contrast-fade.kbq-tooltip,.kbq-tooltip.kbq-contrast-fade .kbq-tooltip__arrow{box-shadow:var(--kbq-shadow-popup)}.kbq-tooltip.kbq-warning .kbq-tooltip__inner{color:var(--kbq-tooltip-warning-fade-off-text);background-image:linear-gradient(var(--kbq-tooltip-warning-fade-off-background),var(--kbq-tooltip-warning-fade-off-background));background-color:var(--kbq-background-bg)}.kbq-tooltip.kbq-warning .kbq-tooltip__arrow{background-color:var(--kbq-tooltip-warning-fade-off-background)}.kbq-tooltip.kbq-warning.kbq-tooltip_arrowless{box-shadow:var(--kbq-tooltip-warning-fade-off-shadow)}.kbq-tooltip.kbq-error .kbq-tooltip__inner{color:var(--kbq-tooltip-error-fade-off-text);background-image:linear-gradient(var(--kbq-tooltip-error-fade-off-background),var(--kbq-tooltip-error-fade-off-background));background-color:var(--kbq-background-bg)}.kbq-tooltip.kbq-error .kbq-tooltip__arrow{background-color:var(--kbq-tooltip-error-fade-off-background)}.kbq-tooltip.kbq-error.kbq-tooltip_arrowless{box-shadow:var(--kbq-tooltip-error-fade-off-shadow)}.kbq-tooltip,.kbq-tooltip .kbq-tooltip__header{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-tooltip__arrow{position:absolute;width:var(--kbq-tooltip-size-arrow-size);height:var(--kbq-tooltip-size-arrow-size);transform:rotate(45deg);z-index:-1}.kbq-tooltip_placement-top .kbq-tooltip__arrow{bottom:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);left:50%;margin-left:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2)}.kbq-tooltip_placement-top-left .kbq-tooltip__arrow{bottom:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);left:13px}.kbq-tooltip_placement-top-right .kbq-tooltip__arrow{bottom:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);right:13px}.kbq-tooltip_placement-right .kbq-tooltip__arrow{left:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);top:50%;margin-top:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2)}.kbq-tooltip_placement-right-top .kbq-tooltip__arrow{left:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);top:13px}.kbq-tooltip_placement-right-bottom .kbq-tooltip__arrow{left:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);bottom:13px}.kbq-tooltip_placement-left .kbq-tooltip__arrow{right:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);top:50%;margin-top:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2)}.kbq-tooltip_placement-left-top .kbq-tooltip__arrow{right:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);top:13px}.kbq-tooltip_placement-left-bottom .kbq-tooltip__arrow{right:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);bottom:13px}.kbq-tooltip_placement-bottom .kbq-tooltip__arrow{top:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);left:50%;margin-left:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2)}.kbq-tooltip_placement-bottom-left .kbq-tooltip__arrow{top:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);left:13px}.kbq-tooltip_placement-bottom-right .kbq-tooltip__arrow{top:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);right:13px}\n", ".kbq-tooltip{--kbq-tooltip-size-max-width: 300px;--kbq-tooltip-size-border-radius: var(--kbq-size-s);--kbq-tooltip-size-padding-horizontal: var(--kbq-size-m);--kbq-tooltip-size-padding-vertical: var(--kbq-size-s);--kbq-tooltip-size-arrow-size: var(--kbq-size-m);--kbq-tooltip-contrast-fade-on-background: var(--kbq-background-card);--kbq-tooltip-contrast-fade-on-text: var(--kbq-foreground-contrast);--kbq-tooltip-contrast-fade-on-shadow: var(--kbq-shadow-popup);--kbq-tooltip-contrast-fade-off-background: var(--kbq-background-night);--kbq-tooltip-contrast-fade-off-text: var(--kbq-foreground-white);--kbq-tooltip-contrast-fade-off-shadow: var(--kbq-shadow-popup);--kbq-tooltip-theme-fade-off-background: var(--kbq-background-theme);--kbq-tooltip-theme-fade-off-text: var(--kbq-foreground-white);--kbq-tooltip-theme-fade-off-shadow: none;--kbq-tooltip-warning-fade-off-background: var(--kbq-background-warning);--kbq-tooltip-warning-fade-off-text: var(--kbq-foreground-contrast);--kbq-tooltip-warning-fade-off-shadow: none;--kbq-tooltip-error-fade-off-background: var(--kbq-background-error);--kbq-tooltip-error-fade-off-text: var(--kbq-foreground-white);--kbq-tooltip-error-fade-off-shadow: none;--kbq-tooltip-borderless-shadow: 0 2px 8px var(--kbq-shadow-key), 0 3px 8px var(--kbq-shadow-ambient)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [kbqTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
108
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTooltipComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
109
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.30", type: KbqTooltipComponent, isStandalone: true, selector: "kbq-tooltip-component", providers: [KBQ_TOOLTIP_OPEN_TIME_PROVIDER], viewQueries: [{ propertyName: "elementRef", first: true, predicate: ["tooltip"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n #tooltip\n class=\"kbq-tooltip\"\n [class.kbq-tooltip_arrowless]=\"!arrow\"\n [class]=\"classMap\"\n [@state]=\"visibility\"\n (@state.done)=\"animationDone($event)\"\n (@state.start)=\"animationStart()\"\n>\n <div class=\"kbq-tooltip__inner\">\n @if (arrow) {\n <div class=\"kbq-tooltip__arrow\"></div>\n }\n\n @if (header) {\n <div class=\"kbq-tooltip__header\">\n @if (isTemplateRef(header)) {\n <ng-container [ngTemplateOutlet]=\"$any(header)\" [ngTemplateOutletContext]=\"context\" />\n } @else {\n <div>{{ header }}</div>\n }\n </div>\n }\n <div class=\"kbq-tooltip__content\">\n @if (isTemplateRef(content)) {\n <ng-container [ngTemplateOutlet]=\"$any(content)\" [ngTemplateOutletContext]=\"context\" />\n } @else {\n <div>{{ content }}</div>\n }\n </div>\n </div>\n</div>\n", styles: [".kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-top),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-top-left),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-top-right){margin-bottom:9px}.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-right),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-right-top),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-right-bottom){margin-left:9px}.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-bottom),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-bottom-left),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-bottom-right){margin-top:9px}.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-left),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-left-top),.kbq-tooltip-panel_horizontal-navbar:has(.kbq-tooltip_placement-left-bottom){margin-right:9px}.kbq-tooltip__inner{border-radius:var(--kbq-tooltip-size-border-radius);word-break:break-word}.kbq-tooltip{box-sizing:border-box;border-radius:var(--kbq-tooltip-size-border-radius);white-space:pre-line}.kbq-tooltip.kbq-tooltip_placement-top,.kbq-tooltip.kbq-tooltip_placement-top-left,.kbq-tooltip.kbq-tooltip_placement-top-right{margin-bottom:8px}.kbq-tooltip.kbq-tooltip_placement-right,.kbq-tooltip.kbq-tooltip_placement-right-top,.kbq-tooltip.kbq-tooltip_placement-right-bottom{margin-left:8px}.kbq-tooltip.kbq-tooltip_placement-bottom,.kbq-tooltip.kbq-tooltip_placement-bottom-left,.kbq-tooltip.kbq-tooltip_placement-bottom-right{margin-top:8px}.kbq-tooltip.kbq-tooltip_placement-left,.kbq-tooltip.kbq-tooltip_placement-left-top,.kbq-tooltip.kbq-tooltip_placement-left-bottom{margin-right:8px}.kbq-tooltip{max-width:var(--kbq-tooltip-size-max-width)}.kbq-tooltip .kbq-tooltip__inner{padding:var(--kbq-tooltip-size-padding-vertical) var(--kbq-tooltip-size-padding-horizontal)}.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-top,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-top-left,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-top-right{margin-bottom:4px}.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-right,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-right-top,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-right-bottom{margin-left:4px}.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-bottom,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-bottom-left,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-bottom-right{margin-top:4px}.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-left,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-left-top,.kbq-tooltip.kbq-tooltip_arrowless.kbq-tooltip_placement-left-bottom{margin-right:4px}.kbq-tooltip.kbq-theme .kbq-tooltip__inner{color:var(--kbq-tooltip-theme-fade-off-text);background-image:linear-gradient(var(--kbq-tooltip-theme-fade-off-background),var(--kbq-tooltip-theme-fade-off-background));background-color:var(--kbq-background-bg)}.kbq-tooltip.kbq-theme .kbq-tooltip__arrow{background-color:var(--kbq-tooltip-theme-fade-off-background)}.kbq-tooltip.kbq-theme.kbq-tooltip_arrowless{box-shadow:var(--kbq-tooltip-theme-fade-off-shadow)}.kbq-tooltip.kbq-contrast .kbq-tooltip__inner{color:var(--kbq-tooltip-contrast-fade-off-text);background-image:linear-gradient(var(--kbq-tooltip-contrast-fade-off-background),var(--kbq-tooltip-contrast-fade-off-background));background-color:var(--kbq-background-bg)}.kbq-tooltip.kbq-contrast .kbq-tooltip__arrow{background-color:var(--kbq-tooltip-contrast-fade-off-background)}.kbq-tooltip.kbq-contrast.kbq-tooltip_arrowless{box-shadow:var(--kbq-tooltip-contrast-fade-off-shadow)}.kbq-tooltip.kbq-contrast-fade .kbq-tooltip__inner{color:var(--kbq-tooltip-contrast-fade-on-text);background-image:linear-gradient(var(--kbq-tooltip-contrast-fade-on-background),var(--kbq-tooltip-contrast-fade-on-background));background-color:var(--kbq-background-bg)}.kbq-tooltip.kbq-contrast-fade .kbq-tooltip__arrow{background-color:var(--kbq-tooltip-contrast-fade-on-background)}.kbq-tooltip.kbq-contrast-fade.kbq-tooltip_arrowless{box-shadow:var(--kbq-tooltip-contrast-fade-on-shadow)}.kbq-tooltip.kbq-contrast-fade.kbq-tooltip,.kbq-tooltip.kbq-contrast-fade .kbq-tooltip__arrow{box-shadow:var(--kbq-shadow-popup)}.kbq-tooltip.kbq-warning .kbq-tooltip__inner{color:var(--kbq-tooltip-warning-fade-off-text);background-image:linear-gradient(var(--kbq-tooltip-warning-fade-off-background),var(--kbq-tooltip-warning-fade-off-background));background-color:var(--kbq-background-bg)}.kbq-tooltip.kbq-warning .kbq-tooltip__arrow{background-color:var(--kbq-tooltip-warning-fade-off-background)}.kbq-tooltip.kbq-warning.kbq-tooltip_arrowless{box-shadow:var(--kbq-tooltip-warning-fade-off-shadow)}.kbq-tooltip.kbq-error .kbq-tooltip__inner{color:var(--kbq-tooltip-error-fade-off-text);background-image:linear-gradient(var(--kbq-tooltip-error-fade-off-background),var(--kbq-tooltip-error-fade-off-background));background-color:var(--kbq-background-bg)}.kbq-tooltip.kbq-error .kbq-tooltip__arrow{background-color:var(--kbq-tooltip-error-fade-off-background)}.kbq-tooltip.kbq-error.kbq-tooltip_arrowless{box-shadow:var(--kbq-tooltip-error-fade-off-shadow)}.kbq-tooltip,.kbq-tooltip .kbq-tooltip__header{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-tooltip__arrow{position:absolute;width:var(--kbq-tooltip-size-arrow-size);height:var(--kbq-tooltip-size-arrow-size);transform:rotate(45deg);z-index:-1}.kbq-tooltip_placement-top .kbq-tooltip__arrow{bottom:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);left:50%;margin-left:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2)}.kbq-tooltip_placement-top-left .kbq-tooltip__arrow{bottom:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);left:13px}.kbq-tooltip_placement-top-right .kbq-tooltip__arrow{bottom:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);right:13px}.kbq-tooltip_placement-right .kbq-tooltip__arrow{left:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);top:50%;margin-top:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2)}.kbq-tooltip_placement-right-top .kbq-tooltip__arrow{left:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);top:13px}.kbq-tooltip_placement-right-bottom .kbq-tooltip__arrow{left:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);bottom:13px}.kbq-tooltip_placement-left .kbq-tooltip__arrow{right:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);top:50%;margin-top:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2)}.kbq-tooltip_placement-left-top .kbq-tooltip__arrow{right:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);top:13px}.kbq-tooltip_placement-left-bottom .kbq-tooltip__arrow{right:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);bottom:13px}.kbq-tooltip_placement-bottom .kbq-tooltip__arrow{top:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);left:50%;margin-left:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2)}.kbq-tooltip_placement-bottom-left .kbq-tooltip__arrow{top:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);left:13px}.kbq-tooltip_placement-bottom-right .kbq-tooltip__arrow{top:calc((var(--kbq-tooltip-size-arrow-size) - 1px) / -2);right:13px}\n", ".kbq-tooltip{--kbq-tooltip-size-max-width: 300px;--kbq-tooltip-size-border-radius: var(--kbq-size-s);--kbq-tooltip-size-padding-horizontal: var(--kbq-size-m);--kbq-tooltip-size-padding-vertical: var(--kbq-size-s);--kbq-tooltip-size-arrow-size: var(--kbq-size-m);--kbq-tooltip-contrast-fade-on-background: var(--kbq-background-card);--kbq-tooltip-contrast-fade-on-text: var(--kbq-foreground-contrast);--kbq-tooltip-contrast-fade-on-shadow: var(--kbq-shadow-popup);--kbq-tooltip-contrast-fade-off-background: var(--kbq-background-night);--kbq-tooltip-contrast-fade-off-text: var(--kbq-foreground-white);--kbq-tooltip-contrast-fade-off-shadow: var(--kbq-shadow-popup);--kbq-tooltip-theme-fade-off-background: var(--kbq-background-theme);--kbq-tooltip-theme-fade-off-text: var(--kbq-foreground-white);--kbq-tooltip-theme-fade-off-shadow: none;--kbq-tooltip-warning-fade-off-background: var(--kbq-background-warning);--kbq-tooltip-warning-fade-off-text: var(--kbq-foreground-contrast);--kbq-tooltip-warning-fade-off-shadow: none;--kbq-tooltip-error-fade-off-background: var(--kbq-background-error);--kbq-tooltip-error-fade-off-text: var(--kbq-foreground-white);--kbq-tooltip-error-fade-off-shadow: none;--kbq-tooltip-borderless-shadow: 0 2px 8px var(--kbq-shadow-key), 0 3px 8px var(--kbq-shadow-ambient)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [kbqTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
109
110
|
}
|
|
110
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTooltipComponent, decorators: [{
|
|
111
112
|
type: Component,
|
|
112
113
|
args: [{ selector: 'kbq-tooltip-component', imports: [
|
|
113
114
|
NgTemplateOutlet
|
|
@@ -129,7 +130,15 @@ const INTERACTIVE_TRIGGERS = [
|
|
|
129
130
|
PopUpTriggers.Click,
|
|
130
131
|
PopUpTriggers.Keydown
|
|
131
132
|
];
|
|
132
|
-
|
|
133
|
+
/**
|
|
134
|
+
* DOM events that mean the user has left the trigger, releasing a tooltip muted by a pop-up on the same
|
|
135
|
+
* element. Both are bound by `KbqPopUpTrigger.initListeners` whenever the matching show trigger is bound.
|
|
136
|
+
*/
|
|
137
|
+
const RELEASE_TRIGGERS = ['mouseleave', 'blur'];
|
|
138
|
+
const KBQ_TOOLTIP_SCROLL_STRATEGY = new InjectionToken('kbq-tooltip-scroll-strategy', {
|
|
139
|
+
providedIn: 'root',
|
|
140
|
+
factory: () => kbqTooltipScrollStrategyFactory(inject(Overlay))
|
|
141
|
+
});
|
|
133
142
|
/** @docs-private */
|
|
134
143
|
function kbqTooltipScrollStrategyFactory(overlay) {
|
|
135
144
|
return () => overlay.scrollStrategies.close();
|
|
@@ -146,6 +155,10 @@ const KBQ_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER = {
|
|
|
146
155
|
* behavior such as opening on keyboard focus only and positioning relative to the mouse cursor.
|
|
147
156
|
*/
|
|
148
157
|
class KbqTooltipTrigger extends KbqPopUpTrigger {
|
|
158
|
+
/** @docs-private */
|
|
159
|
+
get scrollStrategy() {
|
|
160
|
+
return this.scrollStrategyOverride() ?? this.injectedScrollStrategy;
|
|
161
|
+
}
|
|
149
162
|
/** Input (`kbqVisible`) that programmatically shows or hides the tooltip; reflects the current `visible` state. */
|
|
150
163
|
// TODO: Skipped for migration because:
|
|
151
164
|
// Accessor inputs cannot be migrated as they are too complex.
|
|
@@ -274,26 +287,50 @@ class KbqTooltipTrigger extends KbqPopUpTrigger {
|
|
|
274
287
|
* assign `trigger = 'manual'` and therefore stay out of the group.
|
|
275
288
|
*/
|
|
276
289
|
get participatesInSingleInstance() {
|
|
277
|
-
return this.singleInstance() &&
|
|
290
|
+
return this.singleInstance() && this.hasInteractiveTrigger;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Whether `kbqTrigger` contains at least one user-driven event, i.e. the tooltip is not driven purely
|
|
294
|
+
* imperatively. `manual`/`none` tooltips (the validation hints of datepicker, timepicker and inline-edit)
|
|
295
|
+
* bind no listeners and are expected to stay pinned while the user keeps interacting elsewhere.
|
|
296
|
+
*/
|
|
297
|
+
get hasInteractiveTrigger() {
|
|
298
|
+
return INTERACTIVE_TRIGGERS.some((name) => this.trigger.includes(name));
|
|
278
299
|
}
|
|
279
300
|
/**
|
|
280
301
|
* Sets up an effect that mirrors a `forDisabledComponent`'s disabled signal: when that component is disabled it
|
|
281
302
|
* makes the host focusable (so the tooltip can still be triggered) and enables the tooltip, otherwise disables it.
|
|
282
303
|
*
|
|
283
|
-
* Also joins the "only one tooltip is visible at a time" group
|
|
284
|
-
* here rather than in `ngAfterViewInit`/`ngOnDestroy` because
|
|
285
|
-
* `KbqTitleDirective` and `KbqEllipsisCenterDirective` skip
|
|
286
|
-
* skips `super` in both hooks entirely. `destroyRef`
|
|
287
|
-
* tooltip is still visible — that path disposes the
|
|
304
|
+
* Also joins the "only one tooltip is visible at a time" group and mutes the tooltip while a pop-up on the
|
|
305
|
+
* same element is open. All of this wiring lives here rather than in `ngAfterViewInit`/`ngOnDestroy` because
|
|
306
|
+
* several subclasses override those hooks: `KbqTitleDirective` and `KbqEllipsisCenterDirective` skip
|
|
307
|
+
* `super.ngAfterViewInit()`, and `KbqPasswordToggle` skips `super` in both hooks entirely. `destroyRef`
|
|
308
|
+
* additionally covers a trigger destroyed while its tooltip is still visible — that path disposes the
|
|
309
|
+
* overlay without emitting `visibleChange(false)`.
|
|
288
310
|
*/
|
|
289
311
|
constructor() {
|
|
290
312
|
super();
|
|
291
313
|
/** Registry holding the single tooltip that is currently visible. */
|
|
292
314
|
this.tooltipRegistry = inject(KbqTooltipRegistry);
|
|
293
|
-
|
|
294
|
-
|
|
315
|
+
this.injectedScrollStrategy = inject(KBQ_TOOLTIP_SCROLL_STRATEGY);
|
|
316
|
+
/**
|
|
317
|
+
* Per-instance override for the scroll strategy, taking precedence over `KBQ_TOOLTIP_SCROLL_STRATEGY`
|
|
318
|
+
* when set. An `@Input` rather than a DI override so it applies to this tooltip instance only, without
|
|
319
|
+
* leaking into other `kbqTooltip`s nested inside the same host (DI overrides are visible to every
|
|
320
|
+
* descendant in the element-injector tree, not just the element they're declared on).
|
|
321
|
+
* @docs-private
|
|
322
|
+
*/
|
|
323
|
+
this.scrollStrategyOverride = input(undefined, ...(ngDevMode ? [{ debugName: "scrollStrategyOverride", alias: 'kbqTooltipScrollStrategy' }] : [{
|
|
324
|
+
alias: 'kbqTooltipScrollStrategy'
|
|
325
|
+
}]));
|
|
295
326
|
/** @docs-private */
|
|
296
327
|
this.parentPopup = inject(KBQ_PARENT_POPUP, { optional: true });
|
|
328
|
+
/**
|
|
329
|
+
* Pop-ups anchored to the very same element — a popover, a dropdown, a select and so on. Resolved with
|
|
330
|
+
* `self` so a pop-up further up the tree (which the tooltip merely lives inside) is not picked up; that
|
|
331
|
+
* case is covered by `parentPopup`.
|
|
332
|
+
*/
|
|
333
|
+
this.siblingPopups = inject(KBQ_SIBLING_POPUP, { self: true, optional: true }) || [];
|
|
297
334
|
/** @docs-private */
|
|
298
335
|
this.focusMonitor = inject(FocusMonitor);
|
|
299
336
|
/** @docs-private */
|
|
@@ -388,6 +425,24 @@ class KbqTooltipTrigger extends KbqPopUpTrigger {
|
|
|
388
425
|
// Class of this input is manually instantiated. This is discouraged and prevents
|
|
389
426
|
// migration.
|
|
390
427
|
this.modifier = TooltipModifier.Default;
|
|
428
|
+
/**
|
|
429
|
+
* Whether the tooltip is muted because a pop-up on the same element has taken over the anchor.
|
|
430
|
+
*
|
|
431
|
+
* Set when that pop-up opens and released only once the pointer or the focus genuinely leaves the host,
|
|
432
|
+
* never on the pop-up closing. Both matter: a pop-up restores focus to its trigger when it closes (see
|
|
433
|
+
* `KbqPopoverComponent.onEscape`), and removing its backdrop replays `mouseenter` on the trigger without
|
|
434
|
+
* the pointer having moved — either would otherwise pop the tooltip up out of nowhere.
|
|
435
|
+
*/
|
|
436
|
+
this.mutedBySiblingPopup = false;
|
|
437
|
+
merge(...this.siblingPopups.map(({ openedChange }) => openedChange))
|
|
438
|
+
.pipe(filter(Boolean),
|
|
439
|
+
// A tooltip shown imperatively (`manual`/`none`) is not competing for the anchor with the
|
|
440
|
+
// user — it is pinned on purpose, like the validation hints of datepicker and timepicker.
|
|
441
|
+
filter(() => this.hasInteractiveTrigger), takeUntilDestroyed())
|
|
442
|
+
.subscribe(() => {
|
|
443
|
+
this.mutedBySiblingPopup = true;
|
|
444
|
+
this.hideAsInactive();
|
|
445
|
+
});
|
|
391
446
|
this.visibleChange.pipe(takeUntilDestroyed()).subscribe((visible) => {
|
|
392
447
|
if (visible) {
|
|
393
448
|
if (this.participatesInSingleInstance) {
|
|
@@ -430,10 +485,24 @@ class KbqTooltipTrigger extends KbqPopUpTrigger {
|
|
|
430
485
|
super.ngOnDestroy();
|
|
431
486
|
}
|
|
432
487
|
/**
|
|
433
|
-
* Shows the tooltip after `delay` ms. Suppresses showing
|
|
434
|
-
* the keyboard, and applies cursor-relative
|
|
488
|
+
* Shows the tooltip after `delay` ms. Suppresses showing while a pop-up on the same element holds the
|
|
489
|
+
* anchor or on a focus trigger that did not originate from the keyboard, and applies cursor-relative
|
|
490
|
+
* positioning when `relativeToPointer` is enabled.
|
|
435
491
|
*/
|
|
436
492
|
show(delay = this.enterDelay) {
|
|
493
|
+
if (this.mutedBySiblingPopup) {
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
// `isAttached` is checked directly, not just the `mutedBySiblingPopup` latch: `openedChange` can lag
|
|
497
|
+
// it by a real delay — e.g. select/tree-select only emit it once their open CSS animation finishes,
|
|
498
|
+
// and a sibling's own `hide()` can cancel a still-pending `show()` outright so it never emits at all
|
|
499
|
+
// (KbqPopUp.show/hide, pop-up.ts). `isAttached` itself is guaranteed synchronous by the
|
|
500
|
+
// `KbqSiblingPopup` contract, so checking it here closes that gap regardless of the cause. Gated by
|
|
501
|
+
// `hasInteractiveTrigger` for the same reason as the constructor subscription: a `manual`/`none`
|
|
502
|
+
// tooltip is driven imperatively and must not be muted by a sibling at all.
|
|
503
|
+
if (this.hasInteractiveTrigger && this.siblingPopups.some(({ isAttached }) => isAttached)) {
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
437
506
|
if (this.triggerName === 'focus' && this.focusMonitor['_lastFocusOrigin'] !== 'keyboard') {
|
|
438
507
|
return;
|
|
439
508
|
}
|
|
@@ -443,7 +512,23 @@ class KbqTooltipTrigger extends KbqPopUpTrigger {
|
|
|
443
512
|
}
|
|
444
513
|
}
|
|
445
514
|
/**
|
|
446
|
-
* Hides the tooltip
|
|
515
|
+
* Hides the tooltip after `delay` ms and, when the user has genuinely left the host, un-mutes a tooltip
|
|
516
|
+
* that a pop-up on the same element had muted.
|
|
517
|
+
*
|
|
518
|
+
* `mouseleave` and `blur` are the release signals because the base class binds `hide` to both regardless
|
|
519
|
+
* of whether the tooltip is currently visible. A pop-up that is still attached does not count: its
|
|
520
|
+
* backdrop steals the hover from the trigger while the pointer stands still, and that `mouseleave` must
|
|
521
|
+
* not be mistaken for the user leaving.
|
|
522
|
+
*/
|
|
523
|
+
hide(delay = this.leaveDelay) {
|
|
524
|
+
if (RELEASE_TRIGGERS.includes(this.triggerName) && !this.siblingPopups.some(({ isAttached }) => isAttached)) {
|
|
525
|
+
this.mutedBySiblingPopup = false;
|
|
526
|
+
}
|
|
527
|
+
super.hide(delay);
|
|
528
|
+
}
|
|
529
|
+
/**
|
|
530
|
+
* Hides the tooltip because something else took its place — another tooltip became visible, or a pop-up
|
|
531
|
+
* anchored to the same element opened.
|
|
447
532
|
*
|
|
448
533
|
* Goes straight to the pop-up instead of `hide()`: `hide()` silently no-ops when the last recorded
|
|
449
534
|
* `triggerName` is `mouseleave` and the pop-up itself is hovered. Hiding through the instance keeps
|
|
@@ -530,10 +615,10 @@ class KbqTooltipTrigger extends KbqPopUpTrigger {
|
|
|
530
615
|
}
|
|
531
616
|
this.strategy.setOrigin(point);
|
|
532
617
|
}
|
|
533
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
534
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
618
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTooltipTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
619
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.30", type: KbqTooltipTrigger, isStandalone: true, selector: "[kbqTooltip]", inputs: { scrollStrategyOverride: { classPropertyName: "scrollStrategyOverride", publicName: "kbqTooltipScrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, forDisabledComponent: { classPropertyName: "forDisabledComponent", publicName: "forDisabledComponent", isSignal: true, isRequired: false, transformFunction: null }, ignoreTooltipPointerEvents: { classPropertyName: "ignoreTooltipPointerEvents", publicName: "ignoreTooltipPointerEvents", isSignal: true, isRequired: false, transformFunction: null }, singleInstance: { classPropertyName: "singleInstance", publicName: "kbqTooltipSingleInstance", isSignal: true, isRequired: false, transformFunction: null }, hideWithTimeout: { classPropertyName: "hideWithTimeout", publicName: "hideWithTimeout", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tooltipVisible: { classPropertyName: "tooltipVisible", publicName: "kbqVisible", isSignal: false, isRequired: false, transformFunction: null }, tooltipPlacement: { classPropertyName: "tooltipPlacement", publicName: "kbqPlacement", isSignal: false, isRequired: false, transformFunction: null }, relativeToPointer: { classPropertyName: "relativeToPointer", publicName: "kbqRelativeToPointer", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tooltipPlacementPriority: { classPropertyName: "tooltipPlacementPriority", publicName: "kbqPlacementPriority", isSignal: false, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "kbqTooltip", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "kbqTooltipDisabled", isSignal: false, isRequired: false, transformFunction: null }, enterDelay: { classPropertyName: "enterDelay", publicName: "kbqEnterDelay", isSignal: false, isRequired: false, transformFunction: null }, leaveDelay: { classPropertyName: "leaveDelay", publicName: "kbqLeaveDelay", isSignal: false, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "kbqTrigger", isSignal: false, isRequired: false, transformFunction: null }, customClass: { classPropertyName: "customClass", publicName: "kbqTooltipClass", isSignal: false, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "kbqTooltipContext", isSignal: false, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "kbqTooltipColor", isSignal: false, isRequired: false, transformFunction: null }, arrow: { classPropertyName: "arrow", publicName: "kbqTooltipArrow", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, offset: { classPropertyName: "offset", publicName: "kbqTooltipOffset", isSignal: false, isRequired: false, transformFunction: numberAttribute }, modifier: { classPropertyName: "modifier", publicName: "kbqTooltipModifier", isSignal: false, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "kbqTooltipHeader", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { placementChange: "kbqPlacementChange", visibleChange: "kbqVisibleChange" }, host: { listeners: { "keydown": "keydownHandler($event)", "touchend": "touchendHandler()" }, properties: { "class.kbq-tooltip_open": "isOpen" } }, exportAs: ["kbqTooltip"], usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
|
535
620
|
}
|
|
536
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
621
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqTooltipTrigger, decorators: [{
|
|
537
622
|
type: Directive,
|
|
538
623
|
args: [{
|
|
539
624
|
selector: '[kbqTooltip]',
|
|
@@ -544,7 +629,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
544
629
|
},
|
|
545
630
|
exportAs: 'kbqTooltip'
|
|
546
631
|
}]
|
|
547
|
-
}], ctorParameters: () => [], propDecorators: { forDisabledComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "forDisabledComponent", required: false }] }], ignoreTooltipPointerEvents: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreTooltipPointerEvents", required: false }] }], singleInstance: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTooltipSingleInstance", required: false }] }], hideWithTimeout: [{
|
|
632
|
+
}], ctorParameters: () => [], propDecorators: { scrollStrategyOverride: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTooltipScrollStrategy", required: false }] }], forDisabledComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "forDisabledComponent", required: false }] }], ignoreTooltipPointerEvents: [{ type: i0.Input, args: [{ isSignal: true, alias: "ignoreTooltipPointerEvents", required: false }] }], singleInstance: [{ type: i0.Input, args: [{ isSignal: true, alias: "kbqTooltipSingleInstance", required: false }] }], hideWithTimeout: [{
|
|
548
633
|
type: Input,
|
|
549
634
|
args: [{ transform: booleanAttribute }]
|
|
550
635
|
}], tooltipVisible: [{
|
|
@@ -608,23 +693,17 @@ const COMPONENTS = [
|
|
|
608
693
|
KbqTooltipTrigger
|
|
609
694
|
];
|
|
610
695
|
class KbqToolTipModule {
|
|
611
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
612
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
696
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqToolTipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
697
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqToolTipModule, imports: [KbqTooltipComponent,
|
|
613
698
|
KbqTooltipTrigger], exports: [KbqTooltipComponent,
|
|
614
699
|
KbqTooltipTrigger] }); }
|
|
615
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
616
|
-
KBQ_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER,
|
|
617
|
-
KBQ_TOOLTIP_OPEN_TIME_PROVIDER
|
|
618
|
-
] }); }
|
|
700
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqToolTipModule, providers: [KBQ_TOOLTIP_OPEN_TIME_PROVIDER] }); }
|
|
619
701
|
}
|
|
620
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqToolTipModule, decorators: [{
|
|
621
703
|
type: NgModule,
|
|
622
704
|
args: [{
|
|
623
705
|
imports: COMPONENTS,
|
|
624
|
-
providers: [
|
|
625
|
-
KBQ_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER,
|
|
626
|
-
KBQ_TOOLTIP_OPEN_TIME_PROVIDER
|
|
627
|
-
],
|
|
706
|
+
providers: [KBQ_TOOLTIP_OPEN_TIME_PROVIDER],
|
|
628
707
|
exports: COMPONENTS
|
|
629
708
|
}]
|
|
630
709
|
}] });
|