@koobiq/components 20.1.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 +6 -2
- package/accordion/accordion-tokens.scss +3 -0
- package/accordion/{accordion-trigger.component.scss → accordion-trigger.scss} +10 -0
- package/accordion/accordion.scss +71 -0
- package/accordion/index.d.ts +264 -121
- package/actions-panel/index.d.ts +25 -13
- package/alert/_alert-theme.scss +14 -0
- package/alert/alert.component.scss +24 -13
- package/alert/index.d.ts +63 -29
- 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/autocomplete.scss +2 -1
- package/autocomplete/index.d.ts +58 -37
- package/badge/index.d.ts +2 -3
- 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 +3 -2
- package/code-block/index.d.ts +24 -19
- package/content-panel/index.d.ts +1 -1
- package/core/index.d.ts +1217 -186
- 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/_core.scss +2 -0
- package/core/styles/_koobiq-theme.scss +2 -0
- package/core/styles/_tokens.scss +1 -0
- package/core/styles/common/_animation.scss +31 -24
- package/core/styles/common/_connected-overlay.scss +39 -0
- package/core/styles/common/_select.scss +19 -2
- 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 +29 -0
- package/dropdown/dropdown-tokens.scss +2 -1
- package/dropdown/dropdown.scss +16 -1
- package/dropdown/index.d.ts +331 -17
- package/dynamic-translation/index.d.ts +1 -1
- package/fesm2022/koobiq-components-accordion.mjs +480 -317
- 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 +98 -58
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- 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 +89 -52
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +18 -17
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- 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 +18 -13
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- 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 +2485 -735
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +168 -126
- 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 +814 -136
- 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 +783 -199
- 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 +350 -162
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +52 -25
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +175 -28
- 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 +177 -67
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +40 -24
- 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 +31 -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 +49 -14
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +450 -146
- 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 +10 -17
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- 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 +80 -68
- 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 +61 -30
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +77 -42
- 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 +219 -28
- 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 +222 -80
- 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 -10
- package/filter-bar/filter-bar-tokens.scss +3 -0
- package/filter-bar/filters.scss +3 -2
- package/filter-bar/index.d.ts +281 -9
- package/filter-bar/pipes/base-pipe.scss +0 -11
- package/filter-bar/pipes/pipe-input.scss +10 -0
- 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/icon-button.scss +3 -1
- package/icon/index.d.ts +45 -7
- 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/_navbar-item_vertical.scss +7 -5
- package/navbar/index.d.ts +54 -5
- package/navbar/navbar-brand.scss +23 -7
- package/navbar/vertical-navbar.scss +6 -0
- package/notification-center/index.d.ts +2 -1
- 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/collection.json +10 -0
- package/schematics/migrations/alert-signals/README.md +64 -0
- package/schematics/migrations/alert-signals/data.js +70 -0
- package/schematics/migrations/alert-signals/index.js +350 -0
- package/schematics/migrations/alert-signals/schema.json +20 -0
- package/schematics/migrations/autocomplete-panel-width-auto/README.md +68 -0
- package/schematics/migrations/autocomplete-panel-width-auto/index.js +70 -0
- package/schematics/migrations/autocomplete-panel-width-auto/schema.json +15 -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/filter-bar-signals/README.md +1 -1
- 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/migrations.json +11 -1
- package/schematics/ng-add/index.js +3 -3
- package/schematics/utils/angular-parsing.js +41 -14
- 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/search-expandable/index.d.ts +3 -0
- package/select/index.d.ts +212 -40
- 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/tabs/_tabs-common.scss +60 -31
- package/tabs/_tabs-theme.scss +12 -0
- package/tabs/index.d.ts +2 -2
- package/tabs/tab-header.scss +14 -0
- package/tabs/tab-nav-bar.scss +4 -0
- package/tabs/tabs-tokens.scss +1 -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 +10 -8
- package/toast/index.d.ts +26 -3
- package/toggle/index.d.ts +34 -14
- package/tooltip/index.d.ts +119 -7
- 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 +127 -36
- package/accordion/accordion.component.scss +0 -50
- 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
|
@@ -3,7 +3,9 @@ import { CdkObserveContent } from '@angular/cdk/observers';
|
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { InjectionToken, forwardRef, inject, ChangeDetectorRef, input, output, viewChild, booleanAttribute, numberAttribute, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive, NgModule } from '@angular/core';
|
|
5
5
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator } from '@angular/forms';
|
|
6
|
-
import
|
|
6
|
+
import * as i1 from '@koobiq/components/core';
|
|
7
|
+
import { KbqColorDirective, TransitionCheckState, KbqCheckable } from '@koobiq/components/core';
|
|
8
|
+
export { TransitionCheckState } from '@koobiq/components/core';
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* Injection token that can be used to specify the checkbox click behavior.
|
|
@@ -16,27 +18,13 @@ let nextUniqueId = 0;
|
|
|
16
18
|
* Provider Expression that allows kbq-checkbox to register as a ControlValueAccessor.
|
|
17
19
|
* This allows it to support [(ngModel)].
|
|
18
20
|
* @docs-private
|
|
21
|
+
* @deprecated Unused - the `ControlValueAccessor` is now registered by the `KbqCheckable` host directive.
|
|
19
22
|
*/
|
|
20
23
|
const KBQ_CHECKBOX_CONTROL_VALUE_ACCESSOR = {
|
|
21
24
|
provide: NG_VALUE_ACCESSOR,
|
|
22
25
|
useExisting: forwardRef(() => KbqCheckbox),
|
|
23
26
|
multi: true
|
|
24
27
|
};
|
|
25
|
-
/**
|
|
26
|
-
* Represents the different states that require custom transitions between them.
|
|
27
|
-
* @docs-private
|
|
28
|
-
*/
|
|
29
|
-
var TransitionCheckState;
|
|
30
|
-
(function (TransitionCheckState) {
|
|
31
|
-
/** The initial state of the component before any user interaction. */
|
|
32
|
-
TransitionCheckState["Init"] = "init";
|
|
33
|
-
/** The state representing the component when it's becoming checked. */
|
|
34
|
-
TransitionCheckState["Checked"] = "checked";
|
|
35
|
-
/** The state representing the component when it's becoming unchecked. */
|
|
36
|
-
TransitionCheckState["Unchecked"] = "unchecked";
|
|
37
|
-
/** The state representing the component when it's becoming indeterminate. */
|
|
38
|
-
TransitionCheckState["Indeterminate"] = "indeterminate";
|
|
39
|
-
})(TransitionCheckState || (TransitionCheckState = {}));
|
|
40
28
|
/** Change event object emitted by KbqCheckbox. */
|
|
41
29
|
class KbqCheckboxChange {
|
|
42
30
|
}
|
|
@@ -58,33 +46,27 @@ class KbqCheckbox extends KbqColorDirective {
|
|
|
58
46
|
// TODO: Skipped for migration because:
|
|
59
47
|
// Accessor inputs cannot be migrated as they are too complex.
|
|
60
48
|
get checked() {
|
|
61
|
-
return this.
|
|
49
|
+
return this.checkable.checked();
|
|
62
50
|
}
|
|
63
51
|
set checked(value) {
|
|
64
|
-
|
|
65
|
-
this._checked = value;
|
|
66
|
-
this.changeDetectorRef.markForCheck();
|
|
67
|
-
}
|
|
52
|
+
this.checkable.checked.set(value);
|
|
68
53
|
}
|
|
69
54
|
/** Whether the checkbox is disabled. */
|
|
70
55
|
// TODO: Skipped for migration because:
|
|
71
56
|
// Accessor inputs cannot be migrated as they are too complex.
|
|
72
57
|
get disabled() {
|
|
73
|
-
return this.
|
|
58
|
+
return this.checkable.disabled();
|
|
74
59
|
}
|
|
75
60
|
set disabled(value) {
|
|
76
|
-
|
|
77
|
-
this._disabled = value;
|
|
78
|
-
this.changeDetectorRef.markForCheck();
|
|
79
|
-
}
|
|
61
|
+
this.checkable.disabled.set(value);
|
|
80
62
|
}
|
|
81
63
|
// TODO: Skipped for migration because:
|
|
82
64
|
// Accessor inputs cannot be migrated as they are too complex.
|
|
83
65
|
get tabIndex() {
|
|
84
|
-
return this.
|
|
66
|
+
return this.checkable.effectiveTabIndex();
|
|
85
67
|
}
|
|
86
68
|
set tabIndex(value) {
|
|
87
|
-
this.
|
|
69
|
+
this.checkable.tabIndex.set(value);
|
|
88
70
|
}
|
|
89
71
|
/**
|
|
90
72
|
* Whether the checkbox is indeterminate. This is also known as "mixed" mode and can be used to
|
|
@@ -95,25 +77,25 @@ class KbqCheckbox extends KbqColorDirective {
|
|
|
95
77
|
// TODO: Skipped for migration because:
|
|
96
78
|
// Accessor inputs cannot be migrated as they are too complex.
|
|
97
79
|
get indeterminate() {
|
|
98
|
-
return this.
|
|
80
|
+
return this.checkable.indeterminate();
|
|
99
81
|
}
|
|
100
82
|
set indeterminate(value) {
|
|
101
|
-
const changed = value !== this.
|
|
102
|
-
this.
|
|
83
|
+
const changed = value !== this.checkable.indeterminate();
|
|
84
|
+
this.checkable.indeterminate.set(value);
|
|
103
85
|
if (changed) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
this.indeterminateChange.emit(this._indeterminate);
|
|
86
|
+
this.checkable.transitionCheckState(this.checkable.indeterminate()
|
|
87
|
+
? TransitionCheckState.Indeterminate
|
|
88
|
+
: this.checked
|
|
89
|
+
? TransitionCheckState.Checked
|
|
90
|
+
: TransitionCheckState.Unchecked);
|
|
91
|
+
this.indeterminateChange.emit(value);
|
|
111
92
|
}
|
|
112
93
|
}
|
|
113
94
|
constructor() {
|
|
114
95
|
super();
|
|
115
96
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
116
97
|
this.focusMonitor = inject(FocusMonitor);
|
|
98
|
+
this.checkable = inject(KbqCheckable, { self: true });
|
|
117
99
|
this.big = input(false, ...(ngDevMode ? [{ debugName: "big" }] : []));
|
|
118
100
|
/** Whether the label should appear after or before the checkbox. Defaults to 'after' */
|
|
119
101
|
this.labelPosition = input('after', ...(ngDevMode ? [{ debugName: "labelPosition" }] : []));
|
|
@@ -133,19 +115,14 @@ class KbqCheckbox extends KbqColorDirective {
|
|
|
133
115
|
this.inputElement = viewChild.required('input');
|
|
134
116
|
/** Whether the checkbox is required. */
|
|
135
117
|
this.required = input(undefined, ...(ngDevMode ? [{ debugName: "required", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
136
|
-
this._checked = false;
|
|
137
|
-
this._disabled = false;
|
|
138
|
-
this._tabIndex = 0;
|
|
139
|
-
this._indeterminate = false;
|
|
140
118
|
this.uniqueId = `kbq-checkbox-${++nextUniqueId}`;
|
|
141
|
-
this.currentAnimationClass = '';
|
|
142
|
-
this.currentCheckState = TransitionCheckState.Init;
|
|
143
119
|
/**
|
|
144
120
|
* Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.
|
|
145
121
|
* @docs-private
|
|
122
|
+
* @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,
|
|
123
|
+
* so this is never called by Angular forms. Will be removed in the next major version.
|
|
146
124
|
*/
|
|
147
125
|
this.onTouched = () => { };
|
|
148
|
-
this.controlValueAccessorChangeFn = () => { };
|
|
149
126
|
this.id = this.uniqueId;
|
|
150
127
|
}
|
|
151
128
|
ngAfterViewInit() {
|
|
@@ -163,28 +140,44 @@ class KbqCheckbox extends KbqColorDirective {
|
|
|
163
140
|
// that has been recognized by the cdkObserveContent directive.
|
|
164
141
|
this.changeDetectorRef.markForCheck();
|
|
165
142
|
}
|
|
166
|
-
|
|
143
|
+
/**
|
|
144
|
+
* Implemented as part of ControlValueAccessor.
|
|
145
|
+
* @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,
|
|
146
|
+
* so this is never called by Angular forms. Will be removed in the next major version.
|
|
147
|
+
*/
|
|
167
148
|
writeValue(value) {
|
|
168
149
|
this.checked = !!value;
|
|
169
150
|
}
|
|
170
|
-
|
|
151
|
+
/**
|
|
152
|
+
* Implemented as part of ControlValueAccessor.
|
|
153
|
+
* @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,
|
|
154
|
+
* so this is never called by Angular forms. Will be removed in the next major version.
|
|
155
|
+
*/
|
|
171
156
|
registerOnChange(fn) {
|
|
172
|
-
this.
|
|
157
|
+
this.checkable.registerOnChange(fn);
|
|
173
158
|
}
|
|
174
|
-
|
|
159
|
+
/**
|
|
160
|
+
* Implemented as part of ControlValueAccessor.
|
|
161
|
+
* @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,
|
|
162
|
+
* so this is never called by Angular forms. Will be removed in the next major version.
|
|
163
|
+
*/
|
|
175
164
|
registerOnTouched(fn) {
|
|
176
|
-
this.
|
|
165
|
+
this.checkable.registerOnTouched(fn);
|
|
177
166
|
}
|
|
178
|
-
|
|
167
|
+
/**
|
|
168
|
+
* Implemented as part of ControlValueAccessor.
|
|
169
|
+
* @deprecated Unused - `ControlValueAccessor` is now implemented by the `KbqCheckable` host directive,
|
|
170
|
+
* so this is never called by Angular forms. Will be removed in the next major version.
|
|
171
|
+
*/
|
|
179
172
|
setDisabledState(isDisabled) {
|
|
180
173
|
this.disabled = isDisabled;
|
|
181
174
|
}
|
|
182
175
|
getAriaChecked() {
|
|
183
|
-
return this.
|
|
176
|
+
return this.checkable.getAriaChecked();
|
|
184
177
|
}
|
|
185
178
|
/** Toggles the `checked` state of the checkbox. */
|
|
186
179
|
toggle() {
|
|
187
|
-
this.
|
|
180
|
+
this.checkable.toggle();
|
|
188
181
|
}
|
|
189
182
|
/**
|
|
190
183
|
* Event handler for checkbox input element.
|
|
@@ -202,28 +195,26 @@ class KbqCheckbox extends KbqColorDirective {
|
|
|
202
195
|
// This will lead to multiple click events.
|
|
203
196
|
// Preventing bubbling for the second event will solve that issue.
|
|
204
197
|
event.stopPropagation();
|
|
205
|
-
|
|
206
|
-
if (
|
|
198
|
+
const { shouldToggle, shouldClearIndeterminate } = this.checkable.resolveClick(this.clickAction);
|
|
199
|
+
if (shouldToggle) {
|
|
207
200
|
// When user manually click on the checkbox, `indeterminate` is set to false.
|
|
208
|
-
if (
|
|
201
|
+
if (shouldClearIndeterminate) {
|
|
209
202
|
Promise.resolve().then(() => {
|
|
210
|
-
this.
|
|
211
|
-
this.indeterminateChange.emit(
|
|
203
|
+
this.checkable.indeterminate.set(false);
|
|
204
|
+
this.indeterminateChange.emit(false);
|
|
212
205
|
});
|
|
213
206
|
}
|
|
214
207
|
this.toggle();
|
|
215
|
-
this.transitionCheckState(this.
|
|
208
|
+
this.checkable.transitionCheckState(this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);
|
|
216
209
|
// Emit our custom change event if the native input emitted one.
|
|
217
210
|
// It is important to only emit it, if the native input triggered one, because
|
|
218
211
|
// we don't want to trigger a change event, when the `checked` variable changes for example.
|
|
219
212
|
this.emitChangeEvent();
|
|
220
213
|
}
|
|
221
|
-
else if (!this.disabled
|
|
214
|
+
else if (!this.disabled) {
|
|
222
215
|
// Reset native input when clicked with noop. The native checkbox becomes checked after
|
|
223
216
|
// click, reset it to be align with `checked` value of `kbq-checkbox`.
|
|
224
|
-
|
|
225
|
-
inputElement.nativeElement.checked = this.checked;
|
|
226
|
-
inputElement.nativeElement.indeterminate = this.indeterminate;
|
|
217
|
+
this.checkable.resetNativeInput(this.inputElement().nativeElement);
|
|
227
218
|
}
|
|
228
219
|
}
|
|
229
220
|
/** Focuses the checkbox. */
|
|
@@ -236,41 +227,27 @@ class KbqCheckbox extends KbqColorDirective {
|
|
|
236
227
|
// emit its event object to the `change` output.
|
|
237
228
|
event.stopPropagation();
|
|
238
229
|
}
|
|
239
|
-
transitionCheckState(newState) {
|
|
240
|
-
const oldState = this.currentCheckState;
|
|
241
|
-
const element = this.elementRef.nativeElement;
|
|
242
|
-
if (oldState === newState) {
|
|
243
|
-
return;
|
|
244
|
-
}
|
|
245
|
-
if (this.currentAnimationClass.length > 0) {
|
|
246
|
-
element.classList.remove(this.currentAnimationClass);
|
|
247
|
-
}
|
|
248
|
-
this.currentCheckState = newState;
|
|
249
|
-
if (this.currentAnimationClass.length > 0) {
|
|
250
|
-
element.classList.add(this.currentAnimationClass);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
230
|
emitChangeEvent() {
|
|
231
|
+
// Note: `toggle()` already notifies the ControlValueAccessor change handler via `KbqCheckable.toggle()`.
|
|
254
232
|
const event = new KbqCheckboxChange();
|
|
255
233
|
event.source = this;
|
|
256
234
|
event.checked = this.checked;
|
|
257
|
-
this.controlValueAccessorChangeFn(this.checked);
|
|
258
235
|
this.change.emit(event);
|
|
259
236
|
}
|
|
260
237
|
/** Function is called whenever the focus changes for the input element. */
|
|
261
238
|
onInputFocusChange(focusOrigin) {
|
|
262
239
|
if (focusOrigin) {
|
|
263
|
-
this.onTouched();
|
|
240
|
+
this.checkable.onTouched();
|
|
264
241
|
}
|
|
265
242
|
}
|
|
266
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
267
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.25", type: KbqCheckbox, isStandalone: true, selector: "kbq-checkbox", inputs: { big: { classPropertyName: "big", publicName: "big", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, clickAction: { classPropertyName: "clickAction", publicName: "clickAction", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { change: "change", indeterminateChange: "indeterminateChange" }, host: { properties: { "id": "id", "attr.id": "id", "attr.disabled": "disabled", "class.kbq-checkbox_big": "big()", "class.kbq-indeterminate": "indeterminate", "class.kbq-checked": "checked", "class.kbq-disabled": "disabled", "class.kbq-checkbox_label-before": "labelPosition() == \"before\"" }, classAttribute: "kbq-checkbox" }, providers: [KBQ_CHECKBOX_CONTROL_VALUE_ACCESSOR], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, isSignal: true }], exportAs: ["kbqCheckbox"], usesInheritance: true, ngImport: i0, template: "<label #label class=\"kbq-checkbox__layout\" [attr.for]=\"inputId\">\n <div\n class=\"kbq-checkbox__inner-container\"\n [class.kbq-checkbox__inner-container_no-side-margin]=\"\n !checkboxLabel.textContent || !checkboxLabel.textContent.trim()\n \"\n >\n <input\n #input\n type=\"checkbox\"\n class=\"kbq-checkbox-input cdk-visually-hidden\"\n [attr.aria-checked]=\"getAriaChecked()\"\n [attr.name]=\"name()\"\n [attr.value]=\"value()\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"inputId\"\n [indeterminate]=\"indeterminate\"\n [required]=\"required()\"\n [tabIndex]=\"tabIndex\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n />\n <div class=\"kbq-checkbox__frame\">\n <i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n <i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n </div>\n </div>\n\n <div class=\"kbq-checkbox__text-container\">\n <span #checkboxLabel class=\"kbq-checkbox-label\" (cdkObserveContent)=\"onLabelTextChange()\">\n <ng-content />\n </span>\n\n <ng-content select=\"kbq-hint\" />\n </div>\n</label>\n", styles: [".kbq-checkbox__frame{display:flex;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;background-color:transparent;border-radius:var(--kbq-checkbox-size-normal-border-radius);border-width:var(--kbq-checkbox-size-normal-border-width);border-style:solid;height:var(--kbq-checkbox-size-normal-width);width:var(--kbq-checkbox-size-normal-width)}.kbq-checkbox__layout{--padding: calc(var(--kbq-checkbox-size-normal-width) + var(--kbq-checkbox-size-normal-horizontal-content-padding));box-sizing:initial;position:relative;display:inline-flex;max-width:calc(100% - var(--padding));cursor:pointer;padding-top:var(--kbq-checkbox-size-normal-padding-top);padding-bottom:var(--kbq-checkbox-size-normal-padding-bottom);padding-left:var(--padding);vertical-align:top}.kbq-checkbox__inner-container{display:inline-block;position:absolute;top:var(--kbq-checkbox-size-normal-top);left:0}.kbq-checkbox{display:inline-block;-webkit-tap-highlight-color:transparent;max-width:100%}.kbq-checkbox .kbq-checkbox-checkmark,.kbq-checkbox .kbq-checkbox-mixedmark{display:none}.kbq-checkbox.kbq-checked .kbq-checkbox-checkmark{display:block}.kbq-checkbox.kbq-checked .kbq-checkbox-mixedmark,.kbq-checkbox.kbq-indeterminate .kbq-checkbox-checkmark{display:none}.kbq-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:block}.kbq-checkbox.kbq-disabled,.kbq-checkbox.kbq-disabled .kbq-checkbox__layout{cursor:default}.kbq-checkbox.kbq-disabled .kbq-checkbox__frame{box-shadow:none}.kbq-checkbox .kbq-hint{margin-top:var(--kbq-checkbox-size-normal-vertical-content-padding)}.kbq-checkbox.kbq-checkbox_big{--padding: calc(var(--kbq-checkbox-size-big-width) + var(--kbq-checkbox-size-big-horizontal-content-padding))}.kbq-checkbox.kbq-checkbox_big .kbq-checkbox__inner-container{top:var(--kbq-checkbox-size-big-top);height:var(--kbq-checkbox-size-big-width);width:var(--kbq-checkbox-size-big-width)}.kbq-checkbox.kbq-checkbox_big .kbq-checkbox__frame{border-radius:var(--kbq-checkbox-size-big-border-radius);border-width:var(--kbq-checkbox-size-big-border-width);border-style:solid}.kbq-checkbox.kbq-checkbox_big .kbq-hint{margin-top:var(--kbq-checkbox-size-big-vertical-content-padding)}.kbq-checkbox__text-container{display:flex;flex-direction:column;max-width:100%}.kbq-checkbox__inner-container_no-side-margin{margin-left:0;margin-right:0}.kbq-checkbox_label-before .kbq-checkbox__layout{padding-left:0;padding-right:var(--padding)}.kbq-checkbox_label-before .kbq-checkbox__inner-container{right:0;left:unset}.kbq-checkbox .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-default-border);background-color:var(--kbq-checkbox-theme-default-background)}.kbq-checkbox .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-default-color)}.kbq-checkbox .kbq-checkbox-label{color:var(--kbq-checkbox-theme-default-text)}.kbq-checkbox .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-theme-default-caption)}.kbq-checkbox:hover .kbq-checkbox__frame,.kbq-checkbox.kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-hover-border);background-color:var(--kbq-checkbox-theme-states-hover-background)}.kbq-checkbox.kbq-checked .kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-checked-border);background-color:var(--kbq-checkbox-theme-states-checked-background)}.kbq-checkbox.kbq-checked:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-checked:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-checked-hover-border);background-color:var(--kbq-checkbox-theme-states-checked-hover-background)}.kbq-checkbox.kbq-checked:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-checked-focused-border);background-color:var(--kbq-checkbox-theme-states-checked-focused-background);outline:var(--kbq-checkbox-theme-states-checked-focused-outline)}.kbq-checkbox .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-focused-border);background-color:var(--kbq-checkbox-theme-states-focused-background);outline:var(--kbq-checkbox-theme-states-focused-outline)}.kbq-checkbox.kbq-disabled .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-disabled-border);background-color:var(--kbq-checkbox-theme-states-disabled-background)}.kbq-checkbox.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-states-disabled-color)}.kbq-checkbox.kbq-disabled .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-theme-states-disabled-caption)}.kbq-checkbox.kbq-disabled .kbq-checkbox-label{color:var(--kbq-checkbox-theme-states-disabled-text)}.kbq-checkbox.kbq-error .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-default-border);background-color:var(--kbq-checkbox-error-default-background)}.kbq-checkbox.kbq-error .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox.kbq-error .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-default-color)}.kbq-checkbox.kbq-error .kbq-checkbox-label{color:var(--kbq-checkbox-error-default-text)}.kbq-checkbox.kbq-error .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-error-default-caption)}.kbq-checkbox.kbq-error:hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-hover-border);background-color:var(--kbq-checkbox-error-states-hover-background)}.kbq-checkbox.kbq-error.kbq-checked .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-checked-border);background-color:var(--kbq-checkbox-error-states-checked-background)}.kbq-checkbox.kbq-error.kbq-checked:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-checked:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-checked-hover-border);background-color:var(--kbq-checkbox-error-states-checked-hover-background)}.kbq-checkbox.kbq-error.kbq-checked:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-checked-focused-border);background-color:var(--kbq-checkbox-error-states-checked-focused-background);outline:var(--kbq-checkbox-error-states-checked-focused-outline)}.kbq-checkbox.kbq-error .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-focused-border);background-color:var(--kbq-checkbox-error-states-focused-background);outline:var(--kbq-checkbox-error-states-focused-outline)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-disabled-border);background-color:var(--kbq-checkbox-error-states-disabled-background)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-states-disabled-color)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-error-states-disabled-caption)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox-label{color:var(--kbq-checkbox-error-states-disabled-text)}.kbq-checkbox{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-checkbox .kbq-hint .kbq-hint__text{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-checkbox.kbq-checkbox_big{font-size:var(--kbq-typography-text-big-font-size);font-style:var(--kbq-typography-text-big-font-style);font-weight:var(--kbq-typography-text-big-font-weight);line-height:var(--kbq-typography-text-big-line-height);font-family:var(--kbq-typography-text-big-font-family);text-transform:var(--kbq-typography-text-big-text-transform);font-feature-settings:var(--kbq-typography-text-big-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-letter-spacing)}.kbq-checkbox.kbq-checkbox_big .kbq-hint .kbq-hint__text{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-checkbox{--kbq-checkbox-size-normal-width: var(--kbq-size-l);--kbq-checkbox-size-normal-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-normal-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-normal-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-normal-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-normal-top: var(--kbq-size-3xs);--kbq-checkbox-size-big-width: var(--kbq-size-l);--kbq-checkbox-size-big-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-big-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-big-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-big-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-big-top: var(--kbq-size-xxs);--kbq-checkbox-theme-default-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-default-color: var(--kbq-icon-white);--kbq-checkbox-theme-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-theme-default-background: var(--kbq-background-bg);--kbq-checkbox-theme-default-caption: var(--kbq-foreground-contrast-secondary);--kbq-checkbox-theme-states-hover-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-checkbox-theme-states-checked-border: transparent;--kbq-checkbox-theme-states-checked-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-hover-border: transparent;--kbq-checkbox-theme-states-checked-hover-background: var(--kbq-states-background-theme-hover);--kbq-checkbox-theme-states-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-focused-background: var(--kbq-background-bg);--kbq-checkbox-theme-states-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-theme-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-theme-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-theme-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-theme-states-disabled-caption: var(--kbq-states-icon-disabled);--kbq-checkbox-error-default-border: var(--kbq-line-error);--kbq-checkbox-error-default-color: var(--kbq-icon-white);--kbq-checkbox-error-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-error-default-background: var(--kbq-background-error-less);--kbq-checkbox-error-default-caption: var(--kbq-foreground-contrast-secondary);--kbq-checkbox-error-states-hover-border: var(--kbq-line-error);--kbq-checkbox-error-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-checkbox-error-states-checked-border: transparent;--kbq-checkbox-error-states-checked-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-hover-border: transparent;--kbq-checkbox-error-states-checked-hover-background: var(--kbq-states-background-error-hover);--kbq-checkbox-error-states-focused-border: var(--kbq-line-error);--kbq-checkbox-error-states-focused-background: var(--kbq-background-error-less);--kbq-checkbox-error-states-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-border: var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-error-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-error-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-error-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-error-states-disabled-caption: var(--kbq-states-icon-disabled)}\n"], dependencies: [{ kind: "directive", type: CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
243
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
244
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.30", type: KbqCheckbox, isStandalone: true, selector: "kbq-checkbox", inputs: { big: { classPropertyName: "big", publicName: "big", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, clickAction: { classPropertyName: "clickAction", publicName: "clickAction", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: booleanAttribute }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: false, isRequired: false, transformFunction: numberAttribute }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { change: "change", indeterminateChange: "indeterminateChange" }, host: { properties: { "id": "id", "attr.id": "id", "attr.disabled": "disabled", "class.kbq-checkbox_big": "big()", "class.kbq-indeterminate": "indeterminate", "class.kbq-checked": "checked", "class.kbq-disabled": "disabled", "class.kbq-checkbox_label-before": "labelPosition() == \"before\"" }, classAttribute: "kbq-checkbox" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, isSignal: true }], exportAs: ["kbqCheckbox"], usesInheritance: true, hostDirectives: [{ directive: i1.KbqCheckable }], ngImport: i0, template: "<label #label class=\"kbq-checkbox__layout\" [attr.for]=\"inputId\">\n <div\n class=\"kbq-checkbox__inner-container\"\n [class.kbq-checkbox__inner-container_no-side-margin]=\"\n !checkboxLabel.textContent || !checkboxLabel.textContent.trim()\n \"\n >\n <input\n #input\n type=\"checkbox\"\n class=\"kbq-checkbox-input cdk-visually-hidden\"\n [attr.aria-checked]=\"getAriaChecked()\"\n [attr.name]=\"name()\"\n [attr.value]=\"value()\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"inputId\"\n [indeterminate]=\"indeterminate\"\n [required]=\"required()\"\n [tabIndex]=\"tabIndex\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n />\n <div class=\"kbq-checkbox__frame\">\n <i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n <i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n </div>\n </div>\n\n <div class=\"kbq-checkbox__text-container\">\n <span #checkboxLabel class=\"kbq-checkbox-label\" (cdkObserveContent)=\"onLabelTextChange()\">\n <ng-content />\n </span>\n\n <ng-content select=\"kbq-hint\" />\n </div>\n</label>\n", styles: [".kbq-checkbox__frame{display:flex;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;background-color:transparent;border-radius:var(--kbq-checkbox-size-normal-border-radius);border-width:var(--kbq-checkbox-size-normal-border-width);border-style:solid;height:var(--kbq-checkbox-size-normal-width);width:var(--kbq-checkbox-size-normal-width)}.kbq-checkbox__layout{--padding: calc(var(--kbq-checkbox-size-normal-width) + var(--kbq-checkbox-size-normal-horizontal-content-padding));box-sizing:initial;position:relative;display:inline-flex;max-width:calc(100% - var(--padding));cursor:pointer;padding-top:var(--kbq-checkbox-size-normal-padding-top);padding-bottom:var(--kbq-checkbox-size-normal-padding-bottom);padding-left:var(--padding);vertical-align:top}.kbq-checkbox__inner-container{display:inline-block;position:absolute;top:var(--kbq-checkbox-size-normal-top);left:0}.kbq-checkbox{display:inline-block;-webkit-tap-highlight-color:transparent;max-width:100%}.kbq-checkbox .kbq-checkbox-checkmark,.kbq-checkbox .kbq-checkbox-mixedmark{display:none}.kbq-checkbox.kbq-checked .kbq-checkbox-checkmark{display:block}.kbq-checkbox.kbq-checked .kbq-checkbox-mixedmark,.kbq-checkbox.kbq-indeterminate .kbq-checkbox-checkmark{display:none}.kbq-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:block}.kbq-checkbox.kbq-disabled,.kbq-checkbox.kbq-disabled .kbq-checkbox__layout{cursor:default}.kbq-checkbox.kbq-disabled .kbq-checkbox__frame{box-shadow:none}.kbq-checkbox .kbq-hint{margin-top:var(--kbq-checkbox-size-normal-vertical-content-padding)}.kbq-checkbox.kbq-checkbox_big{--padding: calc(var(--kbq-checkbox-size-big-width) + var(--kbq-checkbox-size-big-horizontal-content-padding))}.kbq-checkbox.kbq-checkbox_big .kbq-checkbox__inner-container{top:var(--kbq-checkbox-size-big-top);height:var(--kbq-checkbox-size-big-width);width:var(--kbq-checkbox-size-big-width)}.kbq-checkbox.kbq-checkbox_big .kbq-checkbox__frame{border-radius:var(--kbq-checkbox-size-big-border-radius);border-width:var(--kbq-checkbox-size-big-border-width);border-style:solid}.kbq-checkbox.kbq-checkbox_big .kbq-hint{margin-top:var(--kbq-checkbox-size-big-vertical-content-padding)}.kbq-checkbox__text-container{display:flex;flex-direction:column;max-width:100%}.kbq-checkbox__inner-container_no-side-margin{margin-left:0;margin-right:0}.kbq-checkbox_label-before .kbq-checkbox__layout{padding-left:0;padding-right:var(--padding)}.kbq-checkbox_label-before .kbq-checkbox__inner-container{right:0;left:unset}.kbq-checkbox .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-default-border);background-color:var(--kbq-checkbox-theme-default-background)}.kbq-checkbox .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-default-color)}.kbq-checkbox .kbq-checkbox-label{color:var(--kbq-checkbox-theme-default-text)}.kbq-checkbox .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-theme-default-caption)}.kbq-checkbox:hover .kbq-checkbox__frame,.kbq-checkbox.kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-hover-border);background-color:var(--kbq-checkbox-theme-states-hover-background)}.kbq-checkbox.kbq-checked .kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-checked-border);background-color:var(--kbq-checkbox-theme-states-checked-background)}.kbq-checkbox.kbq-checked:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-checked:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-checked-hover-border);background-color:var(--kbq-checkbox-theme-states-checked-hover-background)}.kbq-checkbox.kbq-checked:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-checked-focused-border);background-color:var(--kbq-checkbox-theme-states-checked-focused-background);outline:var(--kbq-checkbox-theme-states-checked-focused-outline)}.kbq-checkbox .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-focused-border);background-color:var(--kbq-checkbox-theme-states-focused-background);outline:var(--kbq-checkbox-theme-states-focused-outline)}.kbq-checkbox.kbq-disabled .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-disabled-border);background-color:var(--kbq-checkbox-theme-states-disabled-background)}.kbq-checkbox.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-states-disabled-color)}.kbq-checkbox.kbq-disabled .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-theme-states-disabled-caption)}.kbq-checkbox.kbq-disabled .kbq-checkbox-label{color:var(--kbq-checkbox-theme-states-disabled-text)}.kbq-checkbox.kbq-error .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-default-border);background-color:var(--kbq-checkbox-error-default-background)}.kbq-checkbox.kbq-error .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox.kbq-error .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-default-color)}.kbq-checkbox.kbq-error .kbq-checkbox-label{color:var(--kbq-checkbox-error-default-text)}.kbq-checkbox.kbq-error .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-error-default-caption)}.kbq-checkbox.kbq-error:hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-hover-border);background-color:var(--kbq-checkbox-error-states-hover-background)}.kbq-checkbox.kbq-error.kbq-checked .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-checked-border);background-color:var(--kbq-checkbox-error-states-checked-background)}.kbq-checkbox.kbq-error.kbq-checked:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-checked:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-checked-hover-border);background-color:var(--kbq-checkbox-error-states-checked-hover-background)}.kbq-checkbox.kbq-error.kbq-checked:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-checked-focused-border);background-color:var(--kbq-checkbox-error-states-checked-focused-background);outline:var(--kbq-checkbox-error-states-checked-focused-outline)}.kbq-checkbox.kbq-error .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-focused-border);background-color:var(--kbq-checkbox-error-states-focused-background);outline:var(--kbq-checkbox-error-states-focused-outline)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-disabled-border);background-color:var(--kbq-checkbox-error-states-disabled-background)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-states-disabled-color)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-error-states-disabled-caption)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox-label{color:var(--kbq-checkbox-error-states-disabled-text)}.kbq-checkbox{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-checkbox .kbq-hint .kbq-hint__text{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-checkbox.kbq-checkbox_big{font-size:var(--kbq-typography-text-big-font-size);font-style:var(--kbq-typography-text-big-font-style);font-weight:var(--kbq-typography-text-big-font-weight);line-height:var(--kbq-typography-text-big-line-height);font-family:var(--kbq-typography-text-big-font-family);text-transform:var(--kbq-typography-text-big-text-transform);font-feature-settings:var(--kbq-typography-text-big-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-letter-spacing)}.kbq-checkbox.kbq-checkbox_big .kbq-hint .kbq-hint__text{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-checkbox{--kbq-checkbox-size-normal-width: var(--kbq-size-l);--kbq-checkbox-size-normal-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-normal-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-normal-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-normal-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-normal-top: var(--kbq-size-3xs);--kbq-checkbox-size-big-width: var(--kbq-size-l);--kbq-checkbox-size-big-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-big-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-big-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-big-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-big-top: var(--kbq-size-xxs);--kbq-checkbox-theme-default-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-default-color: var(--kbq-icon-white);--kbq-checkbox-theme-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-theme-default-background: var(--kbq-background-bg);--kbq-checkbox-theme-default-caption: var(--kbq-foreground-contrast-secondary);--kbq-checkbox-theme-states-hover-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-checkbox-theme-states-checked-border: transparent;--kbq-checkbox-theme-states-checked-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-hover-border: transparent;--kbq-checkbox-theme-states-checked-hover-background: var(--kbq-states-background-theme-hover);--kbq-checkbox-theme-states-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-focused-background: var(--kbq-background-bg);--kbq-checkbox-theme-states-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-theme-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-theme-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-theme-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-theme-states-disabled-caption: var(--kbq-states-icon-disabled);--kbq-checkbox-error-default-border: var(--kbq-line-error);--kbq-checkbox-error-default-color: var(--kbq-icon-white);--kbq-checkbox-error-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-error-default-background: var(--kbq-background-error-less);--kbq-checkbox-error-default-caption: var(--kbq-foreground-contrast-secondary);--kbq-checkbox-error-states-hover-border: var(--kbq-line-error);--kbq-checkbox-error-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-checkbox-error-states-checked-border: transparent;--kbq-checkbox-error-states-checked-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-hover-border: transparent;--kbq-checkbox-error-states-checked-hover-background: var(--kbq-states-background-error-hover);--kbq-checkbox-error-states-focused-border: var(--kbq-line-error);--kbq-checkbox-error-states-focused-background: var(--kbq-background-error-less);--kbq-checkbox-error-states-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-border: var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-error-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-error-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-error-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-error-states-disabled-caption: var(--kbq-states-icon-disabled)}\n"], dependencies: [{ kind: "directive", type: CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
268
245
|
}
|
|
269
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
246
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCheckbox, decorators: [{
|
|
270
247
|
type: Component,
|
|
271
248
|
args: [{ selector: 'kbq-checkbox', imports: [
|
|
272
249
|
CdkObserveContent
|
|
273
|
-
],
|
|
250
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
274
251
|
class: 'kbq-checkbox',
|
|
275
252
|
'[id]': 'id',
|
|
276
253
|
'[attr.id]': 'id',
|
|
@@ -280,7 +257,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
280
257
|
'[class.kbq-checked]': 'checked',
|
|
281
258
|
'[class.kbq-disabled]': 'disabled',
|
|
282
259
|
'[class.kbq-checkbox_label-before]': 'labelPosition() == "before"'
|
|
283
|
-
}, exportAs: 'kbqCheckbox', template: "<label #label class=\"kbq-checkbox__layout\" [attr.for]=\"inputId\">\n <div\n class=\"kbq-checkbox__inner-container\"\n [class.kbq-checkbox__inner-container_no-side-margin]=\"\n !checkboxLabel.textContent || !checkboxLabel.textContent.trim()\n \"\n >\n <input\n #input\n type=\"checkbox\"\n class=\"kbq-checkbox-input cdk-visually-hidden\"\n [attr.aria-checked]=\"getAriaChecked()\"\n [attr.name]=\"name()\"\n [attr.value]=\"value()\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"inputId\"\n [indeterminate]=\"indeterminate\"\n [required]=\"required()\"\n [tabIndex]=\"tabIndex\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n />\n <div class=\"kbq-checkbox__frame\">\n <i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n <i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n </div>\n </div>\n\n <div class=\"kbq-checkbox__text-container\">\n <span #checkboxLabel class=\"kbq-checkbox-label\" (cdkObserveContent)=\"onLabelTextChange()\">\n <ng-content />\n </span>\n\n <ng-content select=\"kbq-hint\" />\n </div>\n</label>\n", styles: [".kbq-checkbox__frame{display:flex;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;background-color:transparent;border-radius:var(--kbq-checkbox-size-normal-border-radius);border-width:var(--kbq-checkbox-size-normal-border-width);border-style:solid;height:var(--kbq-checkbox-size-normal-width);width:var(--kbq-checkbox-size-normal-width)}.kbq-checkbox__layout{--padding: calc(var(--kbq-checkbox-size-normal-width) + var(--kbq-checkbox-size-normal-horizontal-content-padding));box-sizing:initial;position:relative;display:inline-flex;max-width:calc(100% - var(--padding));cursor:pointer;padding-top:var(--kbq-checkbox-size-normal-padding-top);padding-bottom:var(--kbq-checkbox-size-normal-padding-bottom);padding-left:var(--padding);vertical-align:top}.kbq-checkbox__inner-container{display:inline-block;position:absolute;top:var(--kbq-checkbox-size-normal-top);left:0}.kbq-checkbox{display:inline-block;-webkit-tap-highlight-color:transparent;max-width:100%}.kbq-checkbox .kbq-checkbox-checkmark,.kbq-checkbox .kbq-checkbox-mixedmark{display:none}.kbq-checkbox.kbq-checked .kbq-checkbox-checkmark{display:block}.kbq-checkbox.kbq-checked .kbq-checkbox-mixedmark,.kbq-checkbox.kbq-indeterminate .kbq-checkbox-checkmark{display:none}.kbq-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:block}.kbq-checkbox.kbq-disabled,.kbq-checkbox.kbq-disabled .kbq-checkbox__layout{cursor:default}.kbq-checkbox.kbq-disabled .kbq-checkbox__frame{box-shadow:none}.kbq-checkbox .kbq-hint{margin-top:var(--kbq-checkbox-size-normal-vertical-content-padding)}.kbq-checkbox.kbq-checkbox_big{--padding: calc(var(--kbq-checkbox-size-big-width) + var(--kbq-checkbox-size-big-horizontal-content-padding))}.kbq-checkbox.kbq-checkbox_big .kbq-checkbox__inner-container{top:var(--kbq-checkbox-size-big-top);height:var(--kbq-checkbox-size-big-width);width:var(--kbq-checkbox-size-big-width)}.kbq-checkbox.kbq-checkbox_big .kbq-checkbox__frame{border-radius:var(--kbq-checkbox-size-big-border-radius);border-width:var(--kbq-checkbox-size-big-border-width);border-style:solid}.kbq-checkbox.kbq-checkbox_big .kbq-hint{margin-top:var(--kbq-checkbox-size-big-vertical-content-padding)}.kbq-checkbox__text-container{display:flex;flex-direction:column;max-width:100%}.kbq-checkbox__inner-container_no-side-margin{margin-left:0;margin-right:0}.kbq-checkbox_label-before .kbq-checkbox__layout{padding-left:0;padding-right:var(--padding)}.kbq-checkbox_label-before .kbq-checkbox__inner-container{right:0;left:unset}.kbq-checkbox .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-default-border);background-color:var(--kbq-checkbox-theme-default-background)}.kbq-checkbox .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-default-color)}.kbq-checkbox .kbq-checkbox-label{color:var(--kbq-checkbox-theme-default-text)}.kbq-checkbox .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-theme-default-caption)}.kbq-checkbox:hover .kbq-checkbox__frame,.kbq-checkbox.kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-hover-border);background-color:var(--kbq-checkbox-theme-states-hover-background)}.kbq-checkbox.kbq-checked .kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-checked-border);background-color:var(--kbq-checkbox-theme-states-checked-background)}.kbq-checkbox.kbq-checked:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-checked:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-checked-hover-border);background-color:var(--kbq-checkbox-theme-states-checked-hover-background)}.kbq-checkbox.kbq-checked:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-checked-focused-border);background-color:var(--kbq-checkbox-theme-states-checked-focused-background);outline:var(--kbq-checkbox-theme-states-checked-focused-outline)}.kbq-checkbox .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-focused-border);background-color:var(--kbq-checkbox-theme-states-focused-background);outline:var(--kbq-checkbox-theme-states-focused-outline)}.kbq-checkbox.kbq-disabled .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-disabled-border);background-color:var(--kbq-checkbox-theme-states-disabled-background)}.kbq-checkbox.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-states-disabled-color)}.kbq-checkbox.kbq-disabled .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-theme-states-disabled-caption)}.kbq-checkbox.kbq-disabled .kbq-checkbox-label{color:var(--kbq-checkbox-theme-states-disabled-text)}.kbq-checkbox.kbq-error .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-default-border);background-color:var(--kbq-checkbox-error-default-background)}.kbq-checkbox.kbq-error .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox.kbq-error .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-default-color)}.kbq-checkbox.kbq-error .kbq-checkbox-label{color:var(--kbq-checkbox-error-default-text)}.kbq-checkbox.kbq-error .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-error-default-caption)}.kbq-checkbox.kbq-error:hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-hover-border);background-color:var(--kbq-checkbox-error-states-hover-background)}.kbq-checkbox.kbq-error.kbq-checked .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-checked-border);background-color:var(--kbq-checkbox-error-states-checked-background)}.kbq-checkbox.kbq-error.kbq-checked:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-checked:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-checked-hover-border);background-color:var(--kbq-checkbox-error-states-checked-hover-background)}.kbq-checkbox.kbq-error.kbq-checked:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-checked-focused-border);background-color:var(--kbq-checkbox-error-states-checked-focused-background);outline:var(--kbq-checkbox-error-states-checked-focused-outline)}.kbq-checkbox.kbq-error .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-focused-border);background-color:var(--kbq-checkbox-error-states-focused-background);outline:var(--kbq-checkbox-error-states-focused-outline)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-disabled-border);background-color:var(--kbq-checkbox-error-states-disabled-background)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-states-disabled-color)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-error-states-disabled-caption)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox-label{color:var(--kbq-checkbox-error-states-disabled-text)}.kbq-checkbox{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-checkbox .kbq-hint .kbq-hint__text{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-checkbox.kbq-checkbox_big{font-size:var(--kbq-typography-text-big-font-size);font-style:var(--kbq-typography-text-big-font-style);font-weight:var(--kbq-typography-text-big-font-weight);line-height:var(--kbq-typography-text-big-line-height);font-family:var(--kbq-typography-text-big-font-family);text-transform:var(--kbq-typography-text-big-text-transform);font-feature-settings:var(--kbq-typography-text-big-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-letter-spacing)}.kbq-checkbox.kbq-checkbox_big .kbq-hint .kbq-hint__text{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-checkbox{--kbq-checkbox-size-normal-width: var(--kbq-size-l);--kbq-checkbox-size-normal-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-normal-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-normal-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-normal-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-normal-top: var(--kbq-size-3xs);--kbq-checkbox-size-big-width: var(--kbq-size-l);--kbq-checkbox-size-big-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-big-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-big-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-big-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-big-top: var(--kbq-size-xxs);--kbq-checkbox-theme-default-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-default-color: var(--kbq-icon-white);--kbq-checkbox-theme-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-theme-default-background: var(--kbq-background-bg);--kbq-checkbox-theme-default-caption: var(--kbq-foreground-contrast-secondary);--kbq-checkbox-theme-states-hover-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-checkbox-theme-states-checked-border: transparent;--kbq-checkbox-theme-states-checked-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-hover-border: transparent;--kbq-checkbox-theme-states-checked-hover-background: var(--kbq-states-background-theme-hover);--kbq-checkbox-theme-states-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-focused-background: var(--kbq-background-bg);--kbq-checkbox-theme-states-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-theme-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-theme-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-theme-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-theme-states-disabled-caption: var(--kbq-states-icon-disabled);--kbq-checkbox-error-default-border: var(--kbq-line-error);--kbq-checkbox-error-default-color: var(--kbq-icon-white);--kbq-checkbox-error-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-error-default-background: var(--kbq-background-error-less);--kbq-checkbox-error-default-caption: var(--kbq-foreground-contrast-secondary);--kbq-checkbox-error-states-hover-border: var(--kbq-line-error);--kbq-checkbox-error-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-checkbox-error-states-checked-border: transparent;--kbq-checkbox-error-states-checked-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-hover-border: transparent;--kbq-checkbox-error-states-checked-hover-background: var(--kbq-states-background-error-hover);--kbq-checkbox-error-states-focused-border: var(--kbq-line-error);--kbq-checkbox-error-states-focused-background: var(--kbq-background-error-less);--kbq-checkbox-error-states-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-border: var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-error-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-error-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-error-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-error-states-disabled-caption: var(--kbq-states-icon-disabled)}\n"] }]
|
|
260
|
+
}, hostDirectives: [KbqCheckable], exportAs: 'kbqCheckbox', template: "<label #label class=\"kbq-checkbox__layout\" [attr.for]=\"inputId\">\n <div\n class=\"kbq-checkbox__inner-container\"\n [class.kbq-checkbox__inner-container_no-side-margin]=\"\n !checkboxLabel.textContent || !checkboxLabel.textContent.trim()\n \"\n >\n <input\n #input\n type=\"checkbox\"\n class=\"kbq-checkbox-input cdk-visually-hidden\"\n [attr.aria-checked]=\"getAriaChecked()\"\n [attr.name]=\"name()\"\n [attr.value]=\"value()\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"inputId\"\n [indeterminate]=\"indeterminate\"\n [required]=\"required()\"\n [tabIndex]=\"tabIndex\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n />\n <div class=\"kbq-checkbox__frame\">\n <i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n <i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n </div>\n </div>\n\n <div class=\"kbq-checkbox__text-container\">\n <span #checkboxLabel class=\"kbq-checkbox-label\" (cdkObserveContent)=\"onLabelTextChange()\">\n <ng-content />\n </span>\n\n <ng-content select=\"kbq-hint\" />\n </div>\n</label>\n", styles: [".kbq-checkbox__frame{display:flex;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;background-color:transparent;border-radius:var(--kbq-checkbox-size-normal-border-radius);border-width:var(--kbq-checkbox-size-normal-border-width);border-style:solid;height:var(--kbq-checkbox-size-normal-width);width:var(--kbq-checkbox-size-normal-width)}.kbq-checkbox__layout{--padding: calc(var(--kbq-checkbox-size-normal-width) + var(--kbq-checkbox-size-normal-horizontal-content-padding));box-sizing:initial;position:relative;display:inline-flex;max-width:calc(100% - var(--padding));cursor:pointer;padding-top:var(--kbq-checkbox-size-normal-padding-top);padding-bottom:var(--kbq-checkbox-size-normal-padding-bottom);padding-left:var(--padding);vertical-align:top}.kbq-checkbox__inner-container{display:inline-block;position:absolute;top:var(--kbq-checkbox-size-normal-top);left:0}.kbq-checkbox{display:inline-block;-webkit-tap-highlight-color:transparent;max-width:100%}.kbq-checkbox .kbq-checkbox-checkmark,.kbq-checkbox .kbq-checkbox-mixedmark{display:none}.kbq-checkbox.kbq-checked .kbq-checkbox-checkmark{display:block}.kbq-checkbox.kbq-checked .kbq-checkbox-mixedmark,.kbq-checkbox.kbq-indeterminate .kbq-checkbox-checkmark{display:none}.kbq-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:block}.kbq-checkbox.kbq-disabled,.kbq-checkbox.kbq-disabled .kbq-checkbox__layout{cursor:default}.kbq-checkbox.kbq-disabled .kbq-checkbox__frame{box-shadow:none}.kbq-checkbox .kbq-hint{margin-top:var(--kbq-checkbox-size-normal-vertical-content-padding)}.kbq-checkbox.kbq-checkbox_big{--padding: calc(var(--kbq-checkbox-size-big-width) + var(--kbq-checkbox-size-big-horizontal-content-padding))}.kbq-checkbox.kbq-checkbox_big .kbq-checkbox__inner-container{top:var(--kbq-checkbox-size-big-top);height:var(--kbq-checkbox-size-big-width);width:var(--kbq-checkbox-size-big-width)}.kbq-checkbox.kbq-checkbox_big .kbq-checkbox__frame{border-radius:var(--kbq-checkbox-size-big-border-radius);border-width:var(--kbq-checkbox-size-big-border-width);border-style:solid}.kbq-checkbox.kbq-checkbox_big .kbq-hint{margin-top:var(--kbq-checkbox-size-big-vertical-content-padding)}.kbq-checkbox__text-container{display:flex;flex-direction:column;max-width:100%}.kbq-checkbox__inner-container_no-side-margin{margin-left:0;margin-right:0}.kbq-checkbox_label-before .kbq-checkbox__layout{padding-left:0;padding-right:var(--padding)}.kbq-checkbox_label-before .kbq-checkbox__inner-container{right:0;left:unset}.kbq-checkbox .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-default-border);background-color:var(--kbq-checkbox-theme-default-background)}.kbq-checkbox .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-default-color)}.kbq-checkbox .kbq-checkbox-label{color:var(--kbq-checkbox-theme-default-text)}.kbq-checkbox .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-theme-default-caption)}.kbq-checkbox:hover .kbq-checkbox__frame,.kbq-checkbox.kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-hover-border);background-color:var(--kbq-checkbox-theme-states-hover-background)}.kbq-checkbox.kbq-checked .kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-checked-border);background-color:var(--kbq-checkbox-theme-states-checked-background)}.kbq-checkbox.kbq-checked:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-checked:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-checked-hover-border);background-color:var(--kbq-checkbox-theme-states-checked-hover-background)}.kbq-checkbox.kbq-checked:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame,.kbq-checkbox.kbq-indeterminate:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-checked-focused-border);background-color:var(--kbq-checkbox-theme-states-checked-focused-background);outline:var(--kbq-checkbox-theme-states-checked-focused-outline)}.kbq-checkbox .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-focused-border);background-color:var(--kbq-checkbox-theme-states-focused-background);outline:var(--kbq-checkbox-theme-states-focused-outline)}.kbq-checkbox.kbq-disabled .kbq-checkbox__frame{border-color:var(--kbq-checkbox-theme-states-disabled-border);background-color:var(--kbq-checkbox-theme-states-disabled-background)}.kbq-checkbox.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-states-disabled-color)}.kbq-checkbox.kbq-disabled .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-theme-states-disabled-caption)}.kbq-checkbox.kbq-disabled .kbq-checkbox-label{color:var(--kbq-checkbox-theme-states-disabled-text)}.kbq-checkbox.kbq-error .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-default-border);background-color:var(--kbq-checkbox-error-default-background)}.kbq-checkbox.kbq-error .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox.kbq-error .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-default-color)}.kbq-checkbox.kbq-error .kbq-checkbox-label{color:var(--kbq-checkbox-error-default-text)}.kbq-checkbox.kbq-error .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-error-default-caption)}.kbq-checkbox.kbq-error:hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-hover-border);background-color:var(--kbq-checkbox-error-states-hover-background)}.kbq-checkbox.kbq-error.kbq-checked .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-checked-border);background-color:var(--kbq-checkbox-error-states-checked-background)}.kbq-checkbox.kbq-error.kbq-checked:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-checked:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate:not(.kbq-disabled):hover .kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate:not(.kbq-disabled).kbq-hover .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-checked-hover-border);background-color:var(--kbq-checkbox-error-states-checked-hover-background)}.kbq-checkbox.kbq-error.kbq-checked:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame,.kbq-checkbox.kbq-error.kbq-indeterminate:not(.kbq-disabled) .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-checked-focused-border);background-color:var(--kbq-checkbox-error-states-checked-focused-background);outline:var(--kbq-checkbox-error-states-checked-focused-outline)}.kbq-checkbox.kbq-error .kbq-checkbox-input.cdk-keyboard-focused+.kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-focused-border);background-color:var(--kbq-checkbox-error-states-focused-background);outline:var(--kbq-checkbox-error-states-focused-outline)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox__frame{border-color:var(--kbq-checkbox-error-states-disabled-border);background-color:var(--kbq-checkbox-error-states-disabled-background)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-checkmark,.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox__frame .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-states-disabled-color)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-hint .kbq-hint__text{color:var(--kbq-checkbox-error-states-disabled-caption)}.kbq-checkbox.kbq-error.kbq-disabled .kbq-checkbox-label{color:var(--kbq-checkbox-error-states-disabled-text)}.kbq-checkbox{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-checkbox .kbq-hint .kbq-hint__text{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-checkbox.kbq-checkbox_big{font-size:var(--kbq-typography-text-big-font-size);font-style:var(--kbq-typography-text-big-font-style);font-weight:var(--kbq-typography-text-big-font-weight);line-height:var(--kbq-typography-text-big-line-height);font-family:var(--kbq-typography-text-big-font-family);text-transform:var(--kbq-typography-text-big-text-transform);font-feature-settings:var(--kbq-typography-text-big-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-letter-spacing)}.kbq-checkbox.kbq-checkbox_big .kbq-hint .kbq-hint__text{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-checkbox{--kbq-checkbox-size-normal-width: var(--kbq-size-l);--kbq-checkbox-size-normal-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-normal-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-normal-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-normal-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-normal-top: var(--kbq-size-3xs);--kbq-checkbox-size-big-width: var(--kbq-size-l);--kbq-checkbox-size-big-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-big-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-big-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-big-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-big-top: var(--kbq-size-xxs);--kbq-checkbox-theme-default-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-default-color: var(--kbq-icon-white);--kbq-checkbox-theme-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-theme-default-background: var(--kbq-background-bg);--kbq-checkbox-theme-default-caption: var(--kbq-foreground-contrast-secondary);--kbq-checkbox-theme-states-hover-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-checkbox-theme-states-checked-border: transparent;--kbq-checkbox-theme-states-checked-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-hover-border: transparent;--kbq-checkbox-theme-states-checked-hover-background: var(--kbq-states-background-theme-hover);--kbq-checkbox-theme-states-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-focused-background: var(--kbq-background-bg);--kbq-checkbox-theme-states-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-theme-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-theme-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-theme-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-theme-states-disabled-caption: var(--kbq-states-icon-disabled);--kbq-checkbox-error-default-border: var(--kbq-line-error);--kbq-checkbox-error-default-color: var(--kbq-icon-white);--kbq-checkbox-error-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-error-default-background: var(--kbq-background-error-less);--kbq-checkbox-error-default-caption: var(--kbq-foreground-contrast-secondary);--kbq-checkbox-error-states-hover-border: var(--kbq-line-error);--kbq-checkbox-error-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-checkbox-error-states-checked-border: transparent;--kbq-checkbox-error-states-checked-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-hover-border: transparent;--kbq-checkbox-error-states-checked-hover-background: var(--kbq-states-background-error-hover);--kbq-checkbox-error-states-focused-border: var(--kbq-line-error);--kbq-checkbox-error-states-focused-background: var(--kbq-background-error-less);--kbq-checkbox-error-states-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-border: var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-error-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-error-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-error-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-error-states-disabled-caption: var(--kbq-states-icon-disabled)}\n"] }]
|
|
284
261
|
}], ctorParameters: () => [], propDecorators: { big: [{ type: i0.Input, args: [{ isSignal: true, alias: "big", required: false }] }], id: [{
|
|
285
262
|
type: Input
|
|
286
263
|
}], labelPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelPosition", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], change: [{ type: i0.Output, args: ["change"] }], indeterminateChange: [{ type: i0.Output, args: ["indeterminateChange"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], clickAction: [{
|
|
@@ -308,10 +285,10 @@ const KBQ_CHECKBOX_REQUIRED_VALIDATOR = {
|
|
|
308
285
|
* work with `kbq-checkbox`.
|
|
309
286
|
*/
|
|
310
287
|
class KbqCheckboxRequiredValidator extends CheckboxRequiredValidator {
|
|
311
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
312
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
288
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCheckboxRequiredValidator, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
289
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqCheckboxRequiredValidator, isStandalone: true, selector: "kbq-checkbox[required][formControlName],\n kbq-checkbox[required][formControl], kbq-checkbox[required][ngModel]", host: { properties: { "attr.required": "required ? \"\" : null" } }, providers: [KBQ_CHECKBOX_REQUIRED_VALIDATOR], usesInheritance: true, ngImport: i0 }); }
|
|
313
290
|
}
|
|
314
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCheckboxRequiredValidator, decorators: [{
|
|
315
292
|
type: Directive,
|
|
316
293
|
args: [{
|
|
317
294
|
selector: `kbq-checkbox[required][formControlName],
|
|
@@ -322,11 +299,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
322
299
|
}] });
|
|
323
300
|
|
|
324
301
|
class KbqCheckboxModule {
|
|
325
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
326
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
327
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
302
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
303
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqCheckboxModule, imports: [KbqCheckbox, KbqCheckboxRequiredValidator], exports: [KbqCheckbox, KbqCheckboxRequiredValidator] }); }
|
|
304
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCheckboxModule }); }
|
|
328
305
|
}
|
|
329
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqCheckboxModule, decorators: [{
|
|
330
307
|
type: NgModule,
|
|
331
308
|
args: [{
|
|
332
309
|
imports: [KbqCheckbox, KbqCheckboxRequiredValidator],
|
|
@@ -338,5 +315,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
338
315
|
* Generated bundle index. Do not edit.
|
|
339
316
|
*/
|
|
340
317
|
|
|
341
|
-
export { KBQ_CHECKBOX_CLICK_ACTION, KBQ_CHECKBOX_CONTROL_VALUE_ACCESSOR, KBQ_CHECKBOX_REQUIRED_VALIDATOR, KbqCheckbox, KbqCheckboxChange, KbqCheckboxModule, KbqCheckboxRequiredValidator
|
|
318
|
+
export { KBQ_CHECKBOX_CLICK_ACTION, KBQ_CHECKBOX_CONTROL_VALUE_ACCESSOR, KBQ_CHECKBOX_REQUIRED_VALIDATOR, KbqCheckbox, KbqCheckboxChange, KbqCheckboxModule, KbqCheckboxRequiredValidator };
|
|
342
319
|
//# sourceMappingURL=koobiq-components-checkbox.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koobiq-components-checkbox.mjs","sources":["../../../packages/components/checkbox/checkbox-config.ts","../../../packages/components/checkbox/checkbox.ts","../../../packages/components/checkbox/checkbox.html","../../../packages/components/checkbox/checkbox-required-validator.ts","../../../packages/components/checkbox/checkbox-module.ts","../../../packages/components/checkbox/koobiq-components-checkbox.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type KbqCheckboxClickAction = 'noop' | 'check' | 'check-indeterminate' | undefined;\n\n/**\n * Injection token that can be used to specify the checkbox click behavior.\n */\nexport const KBQ_CHECKBOX_CLICK_ACTION = new InjectionToken<KbqCheckboxClickAction>('kbq-checkbox-click-action');\n","import { FocusMonitor, FocusOrigin } 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 { KbqCheckedState, KbqColorDirective } from '@koobiq/components/core';\nimport { KBQ_CHECKBOX_CLICK_ACTION, KbqCheckboxClickAction } from './checkbox-config';\n\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows kbq-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nexport const KBQ_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => KbqCheckbox),\n multi: true\n};\n\n/**\n * Represents the different states that require custom transitions between them.\n * @docs-private\n */\nexport enum TransitionCheckState {\n /** The initial state of the component before any user interaction. */\n Init = 'init',\n /** The state representing the component when it's becoming checked. */\n Checked = 'checked',\n /** The state representing the component when it's becoming unchecked. */\n Unchecked = 'unchecked',\n /** The state representing the component when it's becoming indeterminate. */\n Indeterminate = 'indeterminate'\n}\n\n/** Change event object emitted by KbqCheckbox. */\nexport class KbqCheckboxChange {\n /** The source KbqCheckbox of the event. */\n source: KbqCheckbox;\n /** The new `checked` value of the checkbox. */\n checked: boolean;\n}\n\n/**\n * A Koobiq checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A KbqCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n */\n@Component({\n selector: 'kbq-checkbox',\n imports: [\n CdkObserveContent\n ],\n templateUrl: 'checkbox.html',\n styleUrls: ['checkbox.scss', 'checkbox-tokens.scss'],\n providers: [KBQ_CHECKBOX_CONTROL_VALUE_ACCESSOR],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-checkbox',\n '[id]': 'id',\n '[attr.id]': 'id',\n '[attr.disabled]': 'disabled',\n '[class.kbq-checkbox_big]': 'big()',\n '[class.kbq-indeterminate]': 'indeterminate',\n '[class.kbq-checked]': 'checked',\n '[class.kbq-disabled]': 'disabled',\n '[class.kbq-checkbox_label-before]': 'labelPosition() == \"before\"'\n },\n exportAs: 'kbqCheckbox'\n})\nexport class KbqCheckbox extends KbqColorDirective implements ControlValueAccessor, AfterViewInit, OnDestroy {\n private changeDetectorRef = inject(ChangeDetectorRef);\n private focusMonitor = inject(FocusMonitor);\n\n readonly big = input<boolean>(false);\n\n /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input() id: string;\n\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n readonly labelPosition = input<'before' | 'after'>('after');\n\n /** Name value will be applied to the input element if present */\n readonly name = input<string | null>(null);\n\n /** Event emitted when the checkbox's `checked` value changes. */\n readonly change = output<KbqCheckboxChange>();\n\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n readonly indeterminateChange = output<boolean>();\n\n /** The value attribute of the native input element */\n readonly value = input<string>(undefined!);\n\n /** Defines the behavior when a user clicks on the checkbox. */\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 /** The native `<input type=\"checkbox\">` element */\n readonly inputElement = viewChild.required<ElementRef>('input');\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string {\n return `${this.id || this.uniqueId}-input`;\n }\n\n /** Whether the checkbox is required. */\n readonly required = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Whether the checkbox is checked.\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get checked(): boolean {\n return this._checked;\n }\n\n set checked(value: boolean) {\n if (value !== this.checked) {\n this._checked = value;\n this.changeDetectorRef.markForCheck();\n }\n }\n\n private _checked: boolean = false;\n\n /** Whether the checkbox is disabled. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input({ transform: booleanAttribute })\n get disabled(): boolean {\n return this._disabled;\n }\n\n set disabled(value: boolean) {\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 /**\n * Whether the checkbox 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()\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 if (this._indeterminate) {\n this.transitionCheckState(TransitionCheckState.Indeterminate);\n } else {\n this.transitionCheckState(this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n }\n\n this.indeterminateChange.emit(this._indeterminate);\n }\n }\n\n private _indeterminate: boolean = false;\n\n private uniqueId: string = `kbq-checkbox-${++nextUniqueId}`;\n\n private currentAnimationClass: string = '';\n\n private currentCheckState: TransitionCheckState = TransitionCheckState.Init;\n\n constructor() {\n super();\n\n this.id = this.uniqueId;\n }\n\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n onTouched: () => any = () => {};\n\n ngAfterViewInit() {\n this.focusMonitor\n .monitor(this.inputElement().nativeElement)\n .subscribe((focusOrigin) => this.onInputFocusChange(focusOrigin));\n }\n\n ngOnDestroy() {\n this.focusMonitor.stopMonitoring(this.inputElement().nativeElement);\n }\n\n /** Method being called whenever the label text changes. */\n onLabelTextChange() {\n // This method is getting called whenever the label of the checkbox changes.\n // Since the checkbox uses the OnPush strategy we need to notify it about the change\n // that has been recognized by the cdkObserveContent directive.\n this.changeDetectorRef.markForCheck();\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any) {\n this.checked = !!value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void) {\n this.controlValueAccessorChangeFn = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: any) {\n this.onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n getAriaChecked(): KbqCheckedState {\n return this.checked ? 'true' : this.indeterminate ? 'mixed' : 'false';\n }\n\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void {\n this.checked = !this.checked;\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n * @param event Input click event\n */\n onInputClick(event: Event) {\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 `checkbox` 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 resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n if (!this.disabled && this.clickAction !== 'noop') {\n // When user manually click on the checkbox, `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.toggle();\n this.transitionCheckState(this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n\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-checkbox`.\n const inputElement = this.inputElement();\n\n inputElement.nativeElement.checked = this.checked;\n inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n\n /** Focuses the checkbox. */\n focus(): void {\n this.focusMonitor.focusVia(this.inputElement().nativeElement, 'keyboard');\n }\n\n onInteractionEvent(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n private controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n private transitionCheckState(newState: TransitionCheckState) {\n const oldState = this.currentCheckState;\n const element: HTMLElement = this.elementRef.nativeElement;\n\n if (oldState === newState) {\n return;\n }\n\n if (this.currentAnimationClass.length > 0) {\n element.classList.remove(this.currentAnimationClass);\n }\n\n this.currentCheckState = newState;\n\n if (this.currentAnimationClass.length > 0) {\n element.classList.add(this.currentAnimationClass);\n }\n }\n\n private emitChangeEvent() {\n const event = new KbqCheckboxChange();\n\n event.source = this;\n event.checked = this.checked;\n\n this.controlValueAccessorChangeFn(this.checked);\n this.change.emit(event);\n }\n\n /** Function is called whenever the focus changes for the input element. */\n private onInputFocusChange(focusOrigin: FocusOrigin) {\n if (focusOrigin) {\n this.onTouched();\n }\n }\n}\n","<label #label class=\"kbq-checkbox__layout\" [attr.for]=\"inputId\">\n <div\n class=\"kbq-checkbox__inner-container\"\n [class.kbq-checkbox__inner-container_no-side-margin]=\"\n !checkboxLabel.textContent || !checkboxLabel.textContent.trim()\n \"\n >\n <input\n #input\n type=\"checkbox\"\n class=\"kbq-checkbox-input cdk-visually-hidden\"\n [attr.aria-checked]=\"getAriaChecked()\"\n [attr.name]=\"name()\"\n [attr.value]=\"value()\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"inputId\"\n [indeterminate]=\"indeterminate\"\n [required]=\"required()\"\n [tabIndex]=\"tabIndex\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n />\n <div class=\"kbq-checkbox__frame\">\n <i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n <i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n </div>\n </div>\n\n <div class=\"kbq-checkbox__text-container\">\n <span #checkboxLabel class=\"kbq-checkbox-label\" (cdkObserveContent)=\"onLabelTextChange()\">\n <ng-content />\n </span>\n\n <ng-content select=\"kbq-hint\" />\n </div>\n</label>\n","import { Directive, forwardRef, Provider } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\nexport const KBQ_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => KbqCheckboxRequiredValidator),\n multi: true\n};\n\n/**\n * Validator for koobiq checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `kbq-checkbox`.\n */\n@Directive({\n selector: `kbq-checkbox[required][formControlName],\n kbq-checkbox[required][formControl], kbq-checkbox[required][ngModel]`,\n providers: [KBQ_CHECKBOX_REQUIRED_VALIDATOR],\n host: { '[attr.required]': 'required ? \"\" : null' }\n})\nexport class KbqCheckboxRequiredValidator extends CheckboxRequiredValidator {}\n","import { NgModule } from '@angular/core';\nimport { KbqCheckbox } from './checkbox';\nimport { KbqCheckboxRequiredValidator } from './checkbox-required-validator';\n\n@NgModule({\n imports: [KbqCheckbox, KbqCheckboxRequiredValidator],\n exports: [KbqCheckbox, KbqCheckboxRequiredValidator]\n})\nexport class KbqCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAWA;;AAEG;MACU,yBAAyB,GAAG,IAAI,cAAc,CAAyB,2BAA2B;;ACS/G;AACA,IAAI,YAAY,GAAG,CAAC;AAEpB;;;;AAIG;AACI,MA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A,CAAA;oBAC9E,SAAS,EAAE,CAAC,+BAA+B,CAAC;AAC5C,oBAAA,IAAI,EAAE,EAAE,iBAAiB,EAAE,sBAAsB;AACpD,iBAAA;;;MCXY,iBAAiB,CAAA;kIAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,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,iBAAiB,YAHhB,WAAW,EAAE,4BAA4B,CAAA,EAAA,OAAA,EAAA,CACzC,WAAW,EAAE,4BAA4B,CAAA,EAAA,CAAA,CAAA;mIAE1C,iBAAiB,EAAA,CAAA,CAAA;;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,4BAA4B,CAAC;AACpD,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,4BAA4B;AACtD,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koobiq-components-checkbox.mjs","sources":["../../../packages/components/checkbox/checkbox-config.ts","../../../packages/components/checkbox/checkbox.ts","../../../packages/components/checkbox/checkbox.html","../../../packages/components/checkbox/checkbox-required-validator.ts","../../../packages/components/checkbox/checkbox-module.ts","../../../packages/components/checkbox/koobiq-components-checkbox.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { KbqCheckableClickAction } from '@koobiq/components/core';\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type KbqCheckboxClickAction = KbqCheckableClickAction;\n\n/**\n * Injection token that can be used to specify the checkbox click behavior.\n */\nexport const KBQ_CHECKBOX_CLICK_ACTION = new InjectionToken<KbqCheckboxClickAction>('kbq-checkbox-click-action');\n","import { FocusMonitor, FocusOrigin } 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 { KbqCheckable, KbqCheckedState, KbqColorDirective, TransitionCheckState } from '@koobiq/components/core';\nimport { KBQ_CHECKBOX_CLICK_ACTION, KbqCheckboxClickAction } from './checkbox-config';\n\n/**\n * Re-exported for backwards compatibility - `TransitionCheckState` moved to `@koobiq/components/core`\n * so it can be shared with `KbqToggleComponent`. Existing code importing it from here keeps working.\n * @docs-private\n * @deprecated Use `TransitionCheckState` from `@koobiq/components/core` instead.\n */\nexport { TransitionCheckState };\n\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows kbq-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n * @deprecated Unused - the `ControlValueAccessor` is now registered by the `KbqCheckable` host directive.\n */\nexport const KBQ_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => KbqCheckbox),\n multi: true\n};\n\n/** Change event object emitted by KbqCheckbox. */\nexport class KbqCheckboxChange {\n /** The source KbqCheckbox of the event. */\n source: KbqCheckbox;\n /** The new `checked` value of the checkbox. */\n checked: boolean;\n}\n\n/**\n * A Koobiq checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A KbqCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n */\n@Component({\n selector: 'kbq-checkbox',\n imports: [\n CdkObserveContent\n ],\n templateUrl: 'checkbox.html',\n styleUrls: ['checkbox.scss', 'checkbox-tokens.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-checkbox',\n '[id]': 'id',\n '[attr.id]': 'id',\n '[attr.disabled]': 'disabled',\n '[class.kbq-checkbox_big]': 'big()',\n '[class.kbq-indeterminate]': 'indeterminate',\n '[class.kbq-checked]': 'checked',\n '[class.kbq-disabled]': 'disabled',\n '[class.kbq-checkbox_label-before]': 'labelPosition() == \"before\"'\n },\n hostDirectives: [KbqCheckable],\n exportAs: 'kbqCheckbox'\n})\nexport class KbqCheckbox extends KbqColorDirective implements ControlValueAccessor, AfterViewInit, 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 /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n // TODO: Skipped for migration because:\n // Your application code writes to the input. This prevents migration.\n @Input() id: string;\n\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n readonly labelPosition = input<'before' | 'after'>('after');\n\n /** Name value will be applied to the input element if present */\n readonly name = input<string | null>(null);\n\n /** Event emitted when the checkbox's `checked` value changes. */\n readonly change = output<KbqCheckboxChange>();\n\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n readonly indeterminateChange = output<boolean>();\n\n /** The value attribute of the native input element */\n readonly value = input<string>(undefined!);\n\n /** Defines the behavior when a user clicks on the checkbox. */\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 /** The native `<input type=\"checkbox\">` element */\n readonly inputElement = viewChild.required<ElementRef>('input');\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string {\n return `${this.id || this.uniqueId}-input`;\n }\n\n /** Whether the checkbox is required. */\n readonly required = input<boolean, unknown>(undefined, { transform: booleanAttribute });\n\n /**\n * Whether the checkbox is checked.\n */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input()\n get checked(): boolean {\n return this.checkable.checked();\n }\n\n set checked(value: boolean) {\n this.checkable.checked.set(value);\n }\n\n /** Whether the checkbox is disabled. */\n // TODO: Skipped for migration because:\n // Accessor inputs cannot be migrated as they are too complex.\n @Input({ transform: booleanAttribute })\n get disabled(): boolean {\n return this.checkable.disabled();\n }\n\n set disabled(value: boolean) {\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 /**\n * Whether the checkbox 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()\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.checkable.transitionCheckState(\n this.checkable.indeterminate()\n ? TransitionCheckState.Indeterminate\n : this.checked\n ? TransitionCheckState.Checked\n : TransitionCheckState.Unchecked\n );\n\n this.indeterminateChange.emit(value);\n }\n }\n\n private uniqueId: string = `kbq-checkbox-${++nextUniqueId}`;\n\n constructor() {\n super();\n\n this.id = this.uniqueId;\n }\n\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\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 onTouched: () => any = () => {};\n\n ngAfterViewInit() {\n this.focusMonitor\n .monitor(this.inputElement().nativeElement)\n .subscribe((focusOrigin) => this.onInputFocusChange(focusOrigin));\n }\n\n ngOnDestroy() {\n this.focusMonitor.stopMonitoring(this.inputElement().nativeElement);\n }\n\n /** Method being called whenever the label text changes. */\n onLabelTextChange() {\n // This method is getting called whenever the label of the checkbox changes.\n // Since the checkbox uses the OnPush strategy we need to notify it about the change\n // that has been recognized by the cdkObserveContent directive.\n this.changeDetectorRef.markForCheck();\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: (value: any) => void) {\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 getAriaChecked(): KbqCheckedState {\n return this.checkable.getAriaChecked();\n }\n\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void {\n this.checkable.toggle();\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n * @param event Input click event\n */\n onInputClick(event: Event) {\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 `checkbox` 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 checkbox, `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.toggle();\n this.checkable.transitionCheckState(\n this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked\n );\n\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-checkbox`.\n this.checkable.resetNativeInput(this.inputElement().nativeElement);\n }\n }\n\n /** Focuses the checkbox. */\n focus(): void {\n this.focusMonitor.focusVia(this.inputElement().nativeElement, 'keyboard');\n }\n\n onInteractionEvent(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n\n private emitChangeEvent() {\n // Note: `toggle()` already notifies the ControlValueAccessor change handler via `KbqCheckable.toggle()`.\n const event = new KbqCheckboxChange();\n\n event.source = this;\n event.checked = this.checked;\n\n this.change.emit(event);\n }\n\n /** Function is called whenever the focus changes for the input element. */\n private onInputFocusChange(focusOrigin: FocusOrigin) {\n if (focusOrigin) {\n this.checkable.onTouched();\n }\n }\n}\n","<label #label class=\"kbq-checkbox__layout\" [attr.for]=\"inputId\">\n <div\n class=\"kbq-checkbox__inner-container\"\n [class.kbq-checkbox__inner-container_no-side-margin]=\"\n !checkboxLabel.textContent || !checkboxLabel.textContent.trim()\n \"\n >\n <input\n #input\n type=\"checkbox\"\n class=\"kbq-checkbox-input cdk-visually-hidden\"\n [attr.aria-checked]=\"getAriaChecked()\"\n [attr.name]=\"name()\"\n [attr.value]=\"value()\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [id]=\"inputId\"\n [indeterminate]=\"indeterminate\"\n [required]=\"required()\"\n [tabIndex]=\"tabIndex\"\n (change)=\"onInteractionEvent($event)\"\n (click)=\"onInputClick($event)\"\n />\n <div class=\"kbq-checkbox__frame\">\n <i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n <i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n </div>\n </div>\n\n <div class=\"kbq-checkbox__text-container\">\n <span #checkboxLabel class=\"kbq-checkbox-label\" (cdkObserveContent)=\"onLabelTextChange()\">\n <ng-content />\n </span>\n\n <ng-content select=\"kbq-hint\" />\n </div>\n</label>\n","import { Directive, forwardRef, Provider } from '@angular/core';\nimport { CheckboxRequiredValidator, NG_VALIDATORS } from '@angular/forms';\n\nexport const KBQ_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => KbqCheckboxRequiredValidator),\n multi: true\n};\n\n/**\n * Validator for koobiq checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `kbq-checkbox`.\n */\n@Directive({\n selector: `kbq-checkbox[required][formControlName],\n kbq-checkbox[required][formControl], kbq-checkbox[required][ngModel]`,\n providers: [KBQ_CHECKBOX_REQUIRED_VALIDATOR],\n host: { '[attr.required]': 'required ? \"\" : null' }\n})\nexport class KbqCheckboxRequiredValidator extends CheckboxRequiredValidator {}\n","import { NgModule } from '@angular/core';\nimport { KbqCheckbox } from './checkbox';\nimport { KbqCheckboxRequiredValidator } from './checkbox-required-validator';\n\n@NgModule({\n imports: [KbqCheckbox, KbqCheckboxRequiredValidator],\n exports: [KbqCheckbox, KbqCheckboxRequiredValidator]\n})\nexport class KbqCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAYA;;AAEG;MACU,yBAAyB,GAAG,IAAI,cAAc,CAAyB,2BAA2B;;ACgB/G;AACA,IAAI,YAAY,GAAG,CAAC;AAEpB;;;;;AAKG;AACI,MAAM,mCAAmC,GAAQ;AACpD,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;AAC1C,IAAA,KAAK,EAAE;;AAGX;MACa,iBAAiB,CAAA;AAK7B;AAED;;;;;;AAMG;AAwBG,MAAO,WAAY,SAAQ,iBAAiB,CAAA;;AAoC9C,IAAA,IAAI,OAAO,GAAA;QACP,OAAO,CAAA,EAAG,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAA,MAAA,CAAQ;IAC9C;AAKA;;AAEG;;;AAGH,IAAA,IACI,OAAO,GAAA;AACP,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;IACnC;IAEA,IAAI,OAAO,CAAC,KAAc,EAAA;QACtB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;IACrC;;;;AAKA,IAAA,IACI,QAAQ,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;IACpC;IAEA,IAAI,QAAQ,CAAC,KAAc,EAAA;QACvB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;IACtC;;;AAIA,IAAA,IACI,QAAQ,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,SAAS,CAAC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