@i-cell/ids-angular 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/accordion/accordion-animations.d.ts +1 -0
- package/accordion/accordion-defaults.d.ts +18 -0
- package/accordion/accordion-item/accordion-item.component.d.ts +27 -0
- package/accordion/accordion.component.d.ts +29 -0
- package/accordion/index.d.ts +5 -0
- package/accordion/public-api.d.ts +5 -0
- package/accordion/types/accordion-appearance.type.d.ts +5 -0
- package/avatar/avatar-defaults.d.ts +12 -0
- package/avatar/avatar-image.directive.d.ts +5 -0
- package/avatar/avatar.component.d.ts +28 -0
- package/avatar/index.d.ts +5 -0
- package/avatar/public-api.d.ts +6 -0
- package/avatar/tokens/avatar-parent.d.ts +6 -0
- package/avatar/types/avatar-type.type.d.ts +6 -0
- package/avatar/types/avatar-variant.type.d.ts +8 -0
- package/button/button-defaults.d.ts +11 -0
- package/button/button-group-defaults.d.ts +7 -0
- package/button/button-group.component.d.ts +11 -0
- package/button/button.component.d.ts +23 -0
- package/button/index.d.ts +5 -0
- package/button/public-api.d.ts +7 -0
- package/button/tokens/button-parent.d.ts +6 -0
- package/button/types/button-appearance.type.d.ts +6 -0
- package/button/types/button-variant.type.d.ts +14 -0
- package/card/card-body.directive.d.ts +6 -0
- package/card/card-defaults.d.ts +12 -0
- package/card/card-footer.directive.d.ts +6 -0
- package/card/card-header.component.d.ts +6 -0
- package/card/card-media.directive.d.ts +7 -0
- package/card/card-section-base.directive.d.ts +9 -0
- package/card/card-subtitle.directive.d.ts +5 -0
- package/card/card-title.directive.d.ts +5 -0
- package/card/card.component.d.ts +21 -0
- package/card/index.d.ts +5 -0
- package/card/public-api.d.ts +10 -0
- package/card/types/card-appearances.type.d.ts +6 -0
- package/card/types/card-variant.type.d.ts +13 -0
- package/checkbox/checkbox-defaults.d.ts +9 -0
- package/checkbox/checkbox-group-defaults.d.ts +9 -0
- package/checkbox/checkbox-group.component.d.ts +28 -0
- package/checkbox/checkbox.component.d.ts +68 -0
- package/checkbox/index.d.ts +5 -0
- package/checkbox/public-api.d.ts +7 -0
- package/checkbox/types/checkbox-events.class.d.ts +6 -0
- package/checkbox/types/checkbox-group-child.d.ts +7 -0
- package/checkbox/types/checkbox-parent.d.ts +8 -0
- package/checkbox/types/checkbox-state.type.d.ts +6 -0
- package/checkbox/types/checkbox-variant.type.d.ts +6 -0
- package/chip/chip-defaults.d.ts +12 -0
- package/chip/chip-group-defaults.d.ts +9 -0
- package/chip/chip-group.component.d.ts +14 -0
- package/chip/chip.component.d.ts +35 -0
- package/chip/index.d.ts +5 -0
- package/chip/public-api.d.ts +7 -0
- package/chip/types/chip-appearance.type.d.ts +5 -0
- package/chip/types/chip-events.type.d.ts +4 -0
- package/chip/types/chip-variant.type.d.ts +8 -0
- package/core/base-classes/component-base.d.ts +13 -0
- package/core/base-classes/directive-base.d.ts +16 -0
- package/core/directives/detect-scrollable.directive.d.ts +11 -0
- package/core/index.d.ts +5 -0
- package/core/pipes/sentence-case.pipe.d.ts +7 -0
- package/core/public-api.d.ts +17 -0
- package/core/services/resize-observer.service.d.ts +13 -0
- package/core/types/orientation.type.d.ts +5 -0
- package/core/types/position.type.d.ts +39 -0
- package/core/types/size-collection.type.d.ts +5 -0
- package/core/types/size.type.d.ts +7 -0
- package/core/utils/class-prefix.d.ts +2 -0
- package/core/utils/class.d.ts +2 -0
- package/core/utils/coercion.d.ts +6 -0
- package/core/utils/compare.d.ts +1 -0
- package/core/utils/date.d.ts +1 -0
- package/core/utils/even-odd.d.ts +2 -0
- package/core/utils/fallback-value.d.ts +1 -0
- package/core/utils/string.d.ts +1 -0
- package/dialog/custom-dialog-base.d.ts +15 -0
- package/dialog/dialog-defaults.d.ts +9 -0
- package/dialog/dialog-header.directive.d.ts +7 -0
- package/dialog/dialog.component.d.ts +22 -0
- package/dialog/dialog.service.d.ts +17 -0
- package/dialog/index.d.ts +5 -0
- package/dialog/public-api.d.ts +5 -0
- package/divider/divider-defaults.d.ts +12 -0
- package/divider/divider.component.d.ts +18 -0
- package/divider/index.d.ts +5 -0
- package/divider/public-api.d.ts +3 -0
- package/divider/types/divider-variant.type.d.ts +13 -0
- package/fesm2022/i-cell-ids-angular-accordion.mjs +223 -0
- package/fesm2022/i-cell-ids-angular-accordion.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-avatar.mjs +125 -0
- package/fesm2022/i-cell-ids-angular-avatar.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-button.mjs +117 -0
- package/fesm2022/i-cell-ids-angular-button.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-card.mjs +222 -0
- package/fesm2022/i-cell-ids-angular-card.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-checkbox.mjs +346 -0
- package/fesm2022/i-cell-ids-angular-checkbox.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-chip.mjs +166 -0
- package/fesm2022/i-cell-ids-angular-chip.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-core.mjs +266 -0
- package/fesm2022/i-cell-ids-angular-core.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-dialog.mjs +157 -0
- package/fesm2022/i-cell-ids-angular-dialog.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-divider.mjs +76 -0
- package/fesm2022/i-cell-ids-angular-divider.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-forms.mjs +871 -0
- package/fesm2022/i-cell-ids-angular-forms.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-icon-button.mjs +81 -0
- package/fesm2022/i-cell-ids-angular-icon-button.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-icon.mjs +149 -0
- package/fesm2022/i-cell-ids-angular-icon.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-menu.mjs +108 -0
- package/fesm2022/i-cell-ids-angular-menu.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-notification.mjs +167 -0
- package/fesm2022/i-cell-ids-angular-notification.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-overlay-panel.mjs +72 -0
- package/fesm2022/i-cell-ids-angular-overlay-panel.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-paginator.mjs +319 -0
- package/fesm2022/i-cell-ids-angular-paginator.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-radio.mjs +312 -0
- package/fesm2022/i-cell-ids-angular-radio.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-segmented-control-toggle.mjs +264 -0
- package/fesm2022/i-cell-ids-angular-segmented-control-toggle.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-segmented-control.mjs +283 -0
- package/fesm2022/i-cell-ids-angular-segmented-control.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-select.mjs +550 -0
- package/fesm2022/i-cell-ids-angular-select.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-snackbar.mjs +440 -0
- package/fesm2022/i-cell-ids-angular-snackbar.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-switch.mjs +181 -0
- package/fesm2022/i-cell-ids-angular-switch.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-tab.mjs +141 -0
- package/fesm2022/i-cell-ids-angular-tab.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-table.mjs +663 -0
- package/fesm2022/i-cell-ids-angular-table.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-tag.mjs +116 -0
- package/fesm2022/i-cell-ids-angular-tag.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular-tooltip.mjs +587 -0
- package/fesm2022/i-cell-ids-angular-tooltip.mjs.map +1 -0
- package/fesm2022/i-cell-ids-angular.mjs +9 -0
- package/fesm2022/i-cell-ids-angular.mjs.map +1 -0
- package/forms/common/error/error-state.d.ts +23 -0
- package/forms/common/success/success-state.d.ts +23 -0
- package/forms/components/fieldset/fieldset-defaults.d.ts +9 -0
- package/forms/components/fieldset/fieldset-message.directive.d.ts +5 -0
- package/forms/components/fieldset/fieldset-row/fieldset-row.component.d.ts +8 -0
- package/forms/components/fieldset/fieldset.component.d.ts +16 -0
- package/forms/components/form-field/form-field-control.d.ts +21 -0
- package/forms/components/form-field/form-field-defaults.d.ts +9 -0
- package/forms/components/form-field/form-field.component.d.ts +41 -0
- package/forms/components/form-field/tokens/form-field-control.d.ts +3 -0
- package/forms/components/form-field/types/form-field-variant.type.d.ts +5 -0
- package/forms/components/input/input-defaults.d.ts +9 -0
- package/forms/components/input/input.directive.d.ts +55 -0
- package/forms/components/input/types/input.type.d.ts +1 -0
- package/forms/components/message/error-message/error-message.component.d.ts +15 -0
- package/forms/components/message/hint-message/hint-message.component.d.ts +10 -0
- package/forms/components/message/message-defaults.d.ts +9 -0
- package/forms/components/message/success-message/success-message.component.d.ts +11 -0
- package/forms/components/message/types/message-parent-form-field.d.ts +9 -0
- package/forms/components/message/types/message-variant.type.d.ts +6 -0
- package/forms/components/message/types/message.type.d.ts +6 -0
- package/forms/components/option/option-group.component.d.ts +13 -0
- package/forms/components/option/option.component.d.ts +47 -0
- package/forms/components/option/tokens/option-group.d.ts +3 -0
- package/forms/components/option/tokens/option-parent.d.ts +11 -0
- package/forms/components/option/types/option-events.class.d.ts +7 -0
- package/forms/components/pseudo-checkbox/pseudo-checkbox.component.d.ts +14 -0
- package/forms/components/pseudo-checkbox/tokens/pseudo-checkbox-parent.d.ts +7 -0
- package/forms/components/pseudo-checkbox/types/pseudo-checkbox-state.type.d.ts +6 -0
- package/forms/directives/form-field-action.directive.d.ts +5 -0
- package/forms/directives/label.directive.d.ts +5 -0
- package/forms/directives/message-prefix.directive.d.ts +5 -0
- package/forms/directives/message-suffix.directive.d.ts +5 -0
- package/forms/directives/message.directive.d.ts +17 -0
- package/forms/directives/prefix.directive.d.ts +7 -0
- package/forms/directives/suffix.directive.d.ts +7 -0
- package/forms/index.d.ts +5 -0
- package/forms/public-api.d.ts +35 -0
- package/forms/validators.d.ts +9 -0
- package/icon/icon-defaults.d.ts +11 -0
- package/icon/icon.component.d.ts +32 -0
- package/icon/index.d.ts +5 -0
- package/icon/public-api.d.ts +5 -0
- package/icon/tokens/icon-parent.d.ts +6 -0
- package/icon/types/icon-source.type.d.ts +5 -0
- package/icon/types/icon-variant.type.d.ts +12 -0
- package/icon-button/icon-button-defaults.d.ts +11 -0
- package/icon-button/icon-button.component.d.ts +22 -0
- package/icon-button/index.d.ts +5 -0
- package/icon-button/public-api.d.ts +5 -0
- package/icon-button/tokens/icon-button-parent.d.ts +9 -0
- package/icon-button/types/icon-button-appearance.type.d.ts +6 -0
- package/icon-button/types/icon-button-variant.type.d.ts +13 -0
- package/index.d.ts +5 -0
- package/menu/action-menu/action-menu-trigger.directive.d.ts +12 -0
- package/menu/index.d.ts +5 -0
- package/menu/menu-item/menu-item-defaults.d.ts +11 -0
- package/menu/menu-item/menu-item.component.d.ts +23 -0
- package/menu/menu-item/types/menu-item-appearance.type.d.ts +5 -0
- package/menu/menu-item/types/menu-item-variant.type.d.ts +4 -0
- package/menu/public-api.d.ts +5 -0
- package/notification/index.d.ts +5 -0
- package/notification/notification-action-button.directive.d.ts +5 -0
- package/notification/notification-defaults.d.ts +15 -0
- package/notification/notification.component.d.ts +34 -0
- package/notification/public-api.d.ts +5 -0
- package/notification/types/notification-appearance.type.d.ts +5 -0
- package/notification/types/notification-variant.type.d.ts +10 -0
- package/overlay-panel/index.d.ts +5 -0
- package/overlay-panel/overlay-panel-defaults.d.ts +11 -0
- package/overlay-panel/overlay-panel.component.d.ts +18 -0
- package/overlay-panel/public-api.d.ts +4 -0
- package/overlay-panel/types/overlay-panel-appearance.type.d.ts +6 -0
- package/overlay-panel/types/overlay-panel-variant.type.d.ts +5 -0
- package/package.json +153 -0
- package/paginator/index.d.ts +5 -0
- package/paginator/paginator-defaults.d.ts +22 -0
- package/paginator/paginator-intl.d.ts +24 -0
- package/paginator/paginator.component.d.ts +67 -0
- package/paginator/public-api.d.ts +5 -0
- package/paginator/types/paginator-appearance.type.d.ts +4 -0
- package/paginator/types/paginator-events.class.d.ts +6 -0
- package/paginator/types/paginator-variant.type.d.ts +7 -0
- package/public-api.d.ts +2 -0
- package/radio/index.d.ts +5 -0
- package/radio/public-api.d.ts +5 -0
- package/radio/radio-defaults.d.ts +11 -0
- package/radio/radio-group.directive.d.ts +46 -0
- package/radio/radio.component.d.ts +30 -0
- package/radio/types/radio-events.class.d.ts +6 -0
- package/radio/types/radio-variant.type.d.ts +6 -0
- package/segmented-control/index.d.ts +5 -0
- package/segmented-control/public-api.d.ts +6 -0
- package/segmented-control/segmented-control-defaults.d.ts +11 -0
- package/segmented-control/segmented-control-item.component.d.ts +33 -0
- package/segmented-control/segmented-control.directive.d.ts +42 -0
- package/segmented-control/types/segmented-control-appearance.type.d.ts +4 -0
- package/segmented-control/types/segmented-control-item-change.class.d.ts +7 -0
- package/segmented-control/types/segmented-control-variant.type.d.ts +6 -0
- package/segmented-control-toggle/index.d.ts +5 -0
- package/segmented-control-toggle/public-api.d.ts +6 -0
- package/segmented-control-toggle/segmented-control-toggle-defaults.d.ts +12 -0
- package/segmented-control-toggle/segmented-control-toggle-item.component.d.ts +32 -0
- package/segmented-control-toggle/segmented-control-toggle.directive.d.ts +43 -0
- package/segmented-control-toggle/types/segmented-control-toggle-appearance.type.d.ts +5 -0
- package/segmented-control-toggle/types/segmented-control-toggle-item-change.class.d.ts +6 -0
- package/segmented-control-toggle/types/segmented-control-toggle-variant.type.d.ts +11 -0
- package/select/index.d.ts +5 -0
- package/select/public-api.d.ts +3 -0
- package/select/select-defaults.d.ts +9 -0
- package/select/select-positions.d.ts +2 -0
- package/select/select-trigger.directive.d.ts +5 -0
- package/select/select.component.d.ts +102 -0
- package/snackbar/animations.d.ts +2 -0
- package/snackbar/index.d.ts +5 -0
- package/snackbar/public-api.d.ts +7 -0
- package/snackbar/services/snackbar.service.d.ts +28 -0
- package/snackbar/snackbar-defaults.d.ts +16 -0
- package/snackbar/snackbar-group.component.d.ts +25 -0
- package/snackbar/snackbar-position-strategies.d.ts +4 -0
- package/snackbar/snackbar.component.d.ts +51 -0
- package/snackbar/types/snackbar-data.type.d.ts +15 -0
- package/snackbar/types/snackbar-inner-data.type.d.ts +4 -0
- package/snackbar/types/snackbar-position.type.d.ts +9 -0
- package/snackbar/types/snackbar-variant.type.d.ts +8 -0
- package/switch/index.d.ts +5 -0
- package/switch/public-api.d.ts +5 -0
- package/switch/switch-animations.d.ts +2 -0
- package/switch/switch-defaults.d.ts +13 -0
- package/switch/switch-group.component.d.ts +14 -0
- package/switch/switch.component.d.ts +45 -0
- package/switch/types/switch-positions.type.d.ts +10 -0
- package/switch/types/switch-variant.type.d.ts +6 -0
- package/tab/index.d.ts +5 -0
- package/tab/public-api.d.ts +6 -0
- package/tab/tab-group-defaults.d.ts +15 -0
- package/tab/tab-group.component.d.ts +29 -0
- package/tab/tab.component.d.ts +18 -0
- package/tab/types/tab-group-position.type.d.ts +6 -0
- package/tab/types/tab-group-variant.type.d.ts +6 -0
- package/tab/types/tab-indicator-position.type.d.ts +7 -0
- package/table/components/cell-content/cell-content.component.d.ts +25 -0
- package/table/datasource/server-side-datasource.d.ts +37 -0
- package/table/directives/cell-renderer.d.ts +13 -0
- package/table/directives/cell-template.d.ts +8 -0
- package/table/directives/row-info-holder.d.ts +9 -0
- package/table/index.d.ts +5 -0
- package/table/public-api.d.ts +18 -0
- package/table/table-defaults.d.ts +22 -0
- package/table/table-intl.d.ts +25 -0
- package/table/table.component.d.ts +142 -0
- package/table/types/pagination-params.d.ts +9 -0
- package/table/types/request-factory.d.ts +5 -0
- package/table/types/request-pagination-data.d.ts +6 -0
- package/table/types/response-data.d.ts +5 -0
- package/table/types/table-appearance.type.d.ts +6 -0
- package/table/types/table-cell-click-event.d.ts +6 -0
- package/table/types/table-column-def.d.ts +97 -0
- package/table/types/table-row-click-event.d.ts +4 -0
- package/table/types/table-row-keydown-event.d.ts +4 -0
- package/table/types/table-sort-direction.d.ts +6 -0
- package/table/types/table-sort-info.d.ts +6 -0
- package/table/types/table-variant.type.d.ts +6 -0
- package/tag/index.d.ts +5 -0
- package/tag/public-api.d.ts +6 -0
- package/tag/tag-defaults.d.ts +11 -0
- package/tag/tag-group-defaults.d.ts +9 -0
- package/tag/tag-group.component.d.ts +13 -0
- package/tag/tag.component.d.ts +23 -0
- package/tag/types/tag-appearance.type.d.ts +5 -0
- package/tag/types/tag-variant.type.d.ts +13 -0
- package/tooltip/index.d.ts +5 -0
- package/tooltip/public-api.d.ts +5 -0
- package/tooltip/tooltip-defaults.d.ts +18 -0
- package/tooltip/tooltip-position-strategies.d.ts +3 -0
- package/tooltip/tooltip.component.d.ts +31 -0
- package/tooltip/tooltip.directive.d.ts +60 -0
- package/tooltip/types/tooltip-position.type.d.ts +11 -0
- package/tooltip/types/tooltip-variant.type.d.ts +5 -0
- package/tooltip/types/tooltip.type.d.ts +2 -0
- package/tooltip/utils/tooltip-converters.d.ts +3 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, input, computed, Component, ViewEncapsulation, ChangeDetectionStrategy, inject, viewChild, signal, Input } from '@angular/core';
|
|
3
|
+
import { IdsSize, ComponentBaseWithDefaults, coerceBooleanAttribute, coerceNumberAttribute, fallbackValue } from '@i-cell/ids-angular/core';
|
|
4
|
+
import { trigger, transition, query, style, animate } from '@angular/animations';
|
|
5
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
|
+
import { IdsIconComponent } from '@i-cell/ids-angular/icon';
|
|
7
|
+
|
|
8
|
+
const IdsSwitchIconPosition = {
|
|
9
|
+
ONHANDLE: 'onhandle',
|
|
10
|
+
ONTRACK: 'ontrack',
|
|
11
|
+
};
|
|
12
|
+
const IdsSwitchLabelPosition = {
|
|
13
|
+
LEFT: 'left',
|
|
14
|
+
RIGHT: 'right',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const IdsSwitchVariant = {
|
|
18
|
+
PRIMARY: 'primary',
|
|
19
|
+
SURFACE: 'surface',
|
|
20
|
+
LIGHT: 'light',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const IDS_SWITCH_DEFAULT_CONFIG = new InjectionToken('IDS_SWITCH_DEFAULT_CONFIG', {
|
|
24
|
+
providedIn: 'root',
|
|
25
|
+
factory: IDS_SWITCH_DEFAULT_CONFIG_FACTORY,
|
|
26
|
+
});
|
|
27
|
+
function IDS_SWITCH_DEFAULT_CONFIG_FACTORY() {
|
|
28
|
+
return {
|
|
29
|
+
size: IdsSize.COMPACT,
|
|
30
|
+
variant: IdsSwitchVariant.SURFACE,
|
|
31
|
+
hasIcon: false,
|
|
32
|
+
iconPosition: IdsSwitchIconPosition.ONHANDLE,
|
|
33
|
+
labelPosition: IdsSwitchLabelPosition.RIGHT,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const defaultConfig$1 = IDS_SWITCH_DEFAULT_CONFIG_FACTORY();
|
|
38
|
+
class IdsSwitchGroupComponent extends ComponentBaseWithDefaults {
|
|
39
|
+
constructor() {
|
|
40
|
+
super(...arguments);
|
|
41
|
+
this._defaultConfig = this._getDefaultConfig(defaultConfig$1, IDS_SWITCH_DEFAULT_CONFIG);
|
|
42
|
+
this.size = input(this._defaultConfig.size);
|
|
43
|
+
this.hasIcon = input(this._defaultConfig.hasIcon);
|
|
44
|
+
this.iconPosition = input(this._defaultConfig.iconPosition);
|
|
45
|
+
this.labelPosition = input(this._defaultConfig.labelPosition);
|
|
46
|
+
this._hostClasses = computed(() => this._getHostClasses([this.size()]));
|
|
47
|
+
}
|
|
48
|
+
get _hostName() {
|
|
49
|
+
return 'switch-group';
|
|
50
|
+
}
|
|
51
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsSwitchGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
52
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.1.2", type: IdsSwitchGroupComponent, isStandalone: true, selector: "ids-switch-group", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, hasIcon: { classPropertyName: "hasIcon", publicName: "hasIcon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<ng-content select=\"ids-switch\" />\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
53
|
+
}
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsSwitchGroupComponent, decorators: [{
|
|
55
|
+
type: Component,
|
|
56
|
+
args: [{ selector: 'ids-switch-group', imports: [], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"ids-switch\" />\n" }]
|
|
57
|
+
}] });
|
|
58
|
+
|
|
59
|
+
const switchAnimation = trigger('switchAnimation', [
|
|
60
|
+
transition('off <=> on', [
|
|
61
|
+
query('.ids-icon:enter', [
|
|
62
|
+
style({ opacity: 0 }),
|
|
63
|
+
animate('0.1s ease-in', style({ opacity: 1 })),
|
|
64
|
+
], { optional: true }),
|
|
65
|
+
query('.ids-icon:leave', [animate('0.1s ease-out', style({ opacity: 0 }))], { optional: true }),
|
|
66
|
+
]),
|
|
67
|
+
]);
|
|
68
|
+
|
|
69
|
+
const defaultConfig = IDS_SWITCH_DEFAULT_CONFIG_FACTORY();
|
|
70
|
+
class IdsSwitchComponent extends ComponentBaseWithDefaults {
|
|
71
|
+
constructor() {
|
|
72
|
+
super(...arguments);
|
|
73
|
+
this._defaultConfig = this._getDefaultConfig(defaultConfig, IDS_SWITCH_DEFAULT_CONFIG);
|
|
74
|
+
this._switchGroup = inject(IdsSwitchGroupComponent, { optional: true });
|
|
75
|
+
this._switchElement = viewChild('switch');
|
|
76
|
+
this.isChecked = signal(false);
|
|
77
|
+
this.label = input();
|
|
78
|
+
this.name = input();
|
|
79
|
+
this.readonly = input(false, { transform: coerceBooleanAttribute });
|
|
80
|
+
this.size = input(this._defaultConfig.size);
|
|
81
|
+
this.tabIndex = input(0, { transform: coerceNumberAttribute });
|
|
82
|
+
this.variant = input(this._defaultConfig.variant);
|
|
83
|
+
this.hasIcon = input(this._defaultConfig.hasIcon);
|
|
84
|
+
this.iconPosition = input(this._defaultConfig.iconPosition);
|
|
85
|
+
this.labelPosition = input(this._defaultConfig.labelPosition);
|
|
86
|
+
this.isDisabled = signal(false);
|
|
87
|
+
this.ariaLabel = input(null, { alias: 'aria-label' });
|
|
88
|
+
this.ariaLabelledBy = input(null, { alias: 'aria-labelledby', transform: (val) => fallbackValue(val, this.id()) });
|
|
89
|
+
this.ariaDescribedBy = input(null, { alias: 'aria-describedby' });
|
|
90
|
+
this._parentOrSelfSize = computed(() => this._switchGroup?.size() ?? this.size());
|
|
91
|
+
this._parentOrSelfHasIcon = computed(() => this._switchGroup?.hasIcon() ?? this.hasIcon());
|
|
92
|
+
this._parentOrSelfIconPosition = computed(() => this._switchGroup?.iconPosition() ?? this.iconPosition());
|
|
93
|
+
this._parentOrSelfLabelPosition = computed(() => this._switchGroup?.labelPosition() ?? this.labelPosition());
|
|
94
|
+
this._hasHandleIcon = computed(() => this._parentOrSelfHasIcon() && this._parentOrSelfIconPosition() === IdsSwitchIconPosition.ONHANDLE);
|
|
95
|
+
this._hasTrackIcon = computed(() => this._parentOrSelfHasIcon() && this._parentOrSelfIconPosition() === IdsSwitchIconPosition.ONTRACK);
|
|
96
|
+
this._isFocusable = computed(() => !this.isDisabled() && !this.readonly());
|
|
97
|
+
this._hostClasses = computed(() => this._getHostClasses([
|
|
98
|
+
this._parentOrSelfSize(),
|
|
99
|
+
this.variant(),
|
|
100
|
+
this.isDisabled() ? 'disabled' : null,
|
|
101
|
+
this.isChecked() ? 'on' : null,
|
|
102
|
+
[
|
|
103
|
+
'label',
|
|
104
|
+
this._parentOrSelfLabelPosition(),
|
|
105
|
+
],
|
|
106
|
+
]));
|
|
107
|
+
this._onChange = () => { };
|
|
108
|
+
this._onTouched = () => { };
|
|
109
|
+
}
|
|
110
|
+
get _hostName() {
|
|
111
|
+
return 'switch';
|
|
112
|
+
}
|
|
113
|
+
set disabled(value) {
|
|
114
|
+
if (value !== this.disabled) {
|
|
115
|
+
this.isDisabled.set(value);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
focus() {
|
|
119
|
+
if (this._isFocusable()) {
|
|
120
|
+
this._switchElement()?.nativeElement.focus();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
writeValue(value) {
|
|
124
|
+
this.isChecked.set(Boolean(value));
|
|
125
|
+
}
|
|
126
|
+
registerOnChange(fn) {
|
|
127
|
+
this._onChange = fn;
|
|
128
|
+
}
|
|
129
|
+
registerOnTouched(fn) {
|
|
130
|
+
this._onTouched = fn;
|
|
131
|
+
}
|
|
132
|
+
setDisabledState(isDisabled) {
|
|
133
|
+
this.isDisabled.set(isDisabled);
|
|
134
|
+
}
|
|
135
|
+
toggle() {
|
|
136
|
+
if (!this.isDisabled() && !this.readonly()) {
|
|
137
|
+
this.isChecked.update((checked) => !checked);
|
|
138
|
+
this._onChange(this.isChecked());
|
|
139
|
+
this._onTouched();
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
handleClick() {
|
|
143
|
+
if (!this.isDisabled()) {
|
|
144
|
+
this.toggle();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsSwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
148
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.2", type: IdsSwitchComponent, isStandalone: true, selector: "ids-switch[ngModel]:not([formControl]):not([formControlName]),\n ids-switch[formControl]:not([ngModel]):not([formControlName]),\n ids-switch[formControlName]:not([ngModel]):not([formControl])", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, hasIcon: { classPropertyName: "hasIcon", publicName: "hasIcon", isSignal: true, isRequired: false, transformFunction: null }, iconPosition: { classPropertyName: "iconPosition", publicName: "iconPosition", isSignal: true, isRequired: false, transformFunction: null }, labelPosition: { classPropertyName: "labelPosition", publicName: "labelPosition", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: coerceBooleanAttribute } }, host: { properties: { "aria-label": "ariaLabel()", "aria-labelledby": "ariaLabelledBy()", "aria-describedby": "ariaDescribedBy()" } }, providers: [
|
|
149
|
+
{
|
|
150
|
+
provide: NG_VALUE_ACCESSOR,
|
|
151
|
+
useExisting: IdsSwitchComponent,
|
|
152
|
+
multi: true,
|
|
153
|
+
},
|
|
154
|
+
], viewQueries: [{ propertyName: "_switchElement", first: true, predicate: ["switch"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<button\n #switch\n role=\"switch\"\n type=\"button\"\n class=\"ids-switch__button\"\n [tabIndex]=\"isDisabled() ? -1 : tabIndex()\"\n [disabled]=\"isDisabled()\"\n [id]=\"id()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-checked]=\"isChecked()\"\n [@switchAnimation]=\"isChecked() ? 'on' : 'off'\"\n (click)=\"handleClick()\"\n>\n <div class=\"ids-switch__track\">\n @if (_hasTrackIcon()) {\n <div class=\"ids-switch__track-icon\">\n @if (isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n }\n </div>\n <div class=\"ids-switch__track-icon\">\n @if (!isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n </div>\n }\n <div class=\"ids-switch__handle\">\n @if (_hasHandleIcon()) {\n <!-- needs to be here duplicate ids-icon because of animation :enter and :leave -->\n @if (isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n } @else {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n }\n </div>\n </div>\n</button>\n\n<label class=\"ids-switch__label\" [for]=\"id()\">{{ label() }}</label>\n", dependencies: [{ kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }], animations: [switchAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
155
|
+
}
|
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsSwitchComponent, decorators: [{
|
|
157
|
+
type: Component,
|
|
158
|
+
args: [{ selector: `ids-switch[ngModel]:not([formControl]):not([formControlName]),
|
|
159
|
+
ids-switch[formControl]:not([ngModel]):not([formControlName]),
|
|
160
|
+
ids-switch[formControlName]:not([ngModel]):not([formControl])`, imports: [IdsIconComponent], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
161
|
+
{
|
|
162
|
+
provide: NG_VALUE_ACCESSOR,
|
|
163
|
+
useExisting: IdsSwitchComponent,
|
|
164
|
+
multi: true,
|
|
165
|
+
},
|
|
166
|
+
], animations: [switchAnimation], host: {
|
|
167
|
+
'[aria-label]': 'ariaLabel()',
|
|
168
|
+
'[aria-labelledby]': 'ariaLabelledBy()',
|
|
169
|
+
'[aria-describedby]': 'ariaDescribedBy()',
|
|
170
|
+
}, template: "<button\n #switch\n role=\"switch\"\n type=\"button\"\n class=\"ids-switch__button\"\n [tabIndex]=\"isDisabled() ? -1 : tabIndex()\"\n [disabled]=\"isDisabled()\"\n [id]=\"id()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-checked]=\"isChecked()\"\n [@switchAnimation]=\"isChecked() ? 'on' : 'off'\"\n (click)=\"handleClick()\"\n>\n <div class=\"ids-switch__track\">\n @if (_hasTrackIcon()) {\n <div class=\"ids-switch__track-icon\">\n @if (isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n }\n </div>\n <div class=\"ids-switch__track-icon\">\n @if (!isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n </div>\n }\n <div class=\"ids-switch__handle\">\n @if (_hasHandleIcon()) {\n <!-- needs to be here duplicate ids-icon because of animation :enter and :leave -->\n @if (isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n } @else {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n }\n </div>\n </div>\n</button>\n\n<label class=\"ids-switch__label\" [for]=\"id()\">{{ label() }}</label>\n" }]
|
|
171
|
+
}], propDecorators: { disabled: [{
|
|
172
|
+
type: Input,
|
|
173
|
+
args: [{ transform: coerceBooleanAttribute }]
|
|
174
|
+
}] } });
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Generated bundle index. Do not edit.
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
export { IDS_SWITCH_DEFAULT_CONFIG, IDS_SWITCH_DEFAULT_CONFIG_FACTORY, IdsSwitchComponent, IdsSwitchGroupComponent, IdsSwitchIconPosition, IdsSwitchLabelPosition, IdsSwitchVariant };
|
|
181
|
+
//# sourceMappingURL=i-cell-ids-angular-switch.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-cell-ids-angular-switch.mjs","sources":["../../../projects/widgets/switch/types/switch-positions.type.ts","../../../projects/widgets/switch/types/switch-variant.type.ts","../../../projects/widgets/switch/switch-defaults.ts","../../../projects/widgets/switch/switch-group.component.ts","../../../projects/widgets/switch/switch-group.component.html","../../../projects/widgets/switch/switch-animations.ts","../../../projects/widgets/switch/switch.component.ts","../../../projects/widgets/switch/switch.component.html","../../../projects/widgets/switch/i-cell-ids-angular-switch.ts"],"sourcesContent":["export const IdsSwitchIconPosition = {\n ONHANDLE: 'onhandle',\n ONTRACK: 'ontrack',\n} as const;\n\nexport type IdsSwitchIconPositionType = (typeof IdsSwitchIconPosition)[keyof typeof IdsSwitchIconPosition];\n\nexport const IdsSwitchLabelPosition = {\n LEFT: 'left',\n RIGHT: 'right',\n} as const;\n\nexport type IdsSwitchLabelPositionType = (typeof IdsSwitchLabelPosition)[keyof typeof IdsSwitchLabelPosition];\n","export const IdsSwitchVariant = {\n PRIMARY: 'primary',\n SURFACE: 'surface',\n LIGHT: 'light',\n} as const;\n\nexport type IdsSwitchVariantType = (typeof IdsSwitchVariant)[keyof typeof IdsSwitchVariant];\n","import { IdsSwitchIconPosition, IdsSwitchIconPositionType, IdsSwitchLabelPosition, IdsSwitchLabelPositionType } from './types/switch-positions.type';\nimport { IdsSwitchVariant, IdsSwitchVariantType } from './types/switch-variant.type';\n\nimport { InjectionToken } from '@angular/core';\nimport { IdsSize, IdsSizeType } from '@i-cell/ids-angular/core';\n\nexport interface IdsSwitchDefaultConfig {\n size?: IdsSizeType\n variant?: IdsSwitchVariantType\n hasIcon?: boolean\n iconPosition: IdsSwitchIconPositionType\n labelPosition: IdsSwitchLabelPositionType\n}\n\nexport const IDS_SWITCH_DEFAULT_CONFIG = new InjectionToken<IdsSwitchDefaultConfig>(\n 'IDS_SWITCH_DEFAULT_CONFIG',\n {\n providedIn: 'root',\n factory: IDS_SWITCH_DEFAULT_CONFIG_FACTORY,\n },\n);\n\nexport function IDS_SWITCH_DEFAULT_CONFIG_FACTORY(): Required<IdsSwitchDefaultConfig> {\n return {\n size: IdsSize.COMPACT,\n variant: IdsSwitchVariant.SURFACE,\n hasIcon: false,\n iconPosition: IdsSwitchIconPosition.ONHANDLE,\n labelPosition: IdsSwitchLabelPosition.RIGHT,\n };\n}\n","import { IDS_SWITCH_DEFAULT_CONFIG, IDS_SWITCH_DEFAULT_CONFIG_FACTORY, IdsSwitchDefaultConfig } from './switch-defaults';\n\nimport { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { IdsSizeType, ComponentBaseWithDefaults } from '@i-cell/ids-angular/core';\n\nconst defaultConfig = IDS_SWITCH_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: 'ids-switch-group',\n imports: [],\n templateUrl: './switch-group.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IdsSwitchGroupComponent extends ComponentBaseWithDefaults<IdsSwitchDefaultConfig> {\n protected override get _hostName(): string {\n return 'switch-group';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_SWITCH_DEFAULT_CONFIG);\n\n public size = input<IdsSizeType | null>(this._defaultConfig.size);\n public hasIcon = input(this._defaultConfig.hasIcon);\n public iconPosition = input(this._defaultConfig.iconPosition);\n public labelPosition = input(this._defaultConfig.labelPosition);\n\n protected _hostClasses = computed(() => this._getHostClasses([this.size()]));\n}\n","<ng-content select=\"ids-switch\" />\n","import { animate, AnimationTriggerMetadata, query, style, transition, trigger } from '@angular/animations';\n\nexport const switchAnimation: AnimationTriggerMetadata = trigger('switchAnimation', [\n transition('off <=> on', [\n query('.ids-icon:enter', [\n style({ opacity: 0 }),\n animate('0.1s ease-in', style({ opacity: 1 })),\n ], { optional: true }),\n query('.ids-icon:leave', [animate('0.1s ease-out', style({ opacity: 0 }))], { optional: true }),\n ]),\n]);\n","import { switchAnimation } from './switch-animations';\nimport { IDS_SWITCH_DEFAULT_CONFIG, IDS_SWITCH_DEFAULT_CONFIG_FACTORY, IdsSwitchDefaultConfig } from './switch-defaults';\nimport { IdsSwitchGroupComponent } from './switch-group.component';\nimport { IdsSwitchIconPosition } from './types/switch-positions.type';\nimport { IdsSwitchVariantType } from './types/switch-variant.type';\n\nimport { ChangeDetectionStrategy, Component, computed, ElementRef, inject, Input, input, signal, viewChild, ViewEncapsulation } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { coerceBooleanAttribute, IdsSizeType, fallbackValue, coerceNumberAttribute, ComponentBaseWithDefaults } from '@i-cell/ids-angular/core';\nimport { IdsIconComponent } from '@i-cell/ids-angular/icon';\n\nconst defaultConfig = IDS_SWITCH_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: `ids-switch[ngModel]:not([formControl]):not([formControlName]),\n ids-switch[formControl]:not([ngModel]):not([formControlName]),\n ids-switch[formControlName]:not([ngModel]):not([formControl])`,\n imports: [IdsIconComponent],\n templateUrl: './switch.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: IdsSwitchComponent,\n multi: true,\n },\n ],\n animations: [switchAnimation],\n host: {\n '[aria-label]': 'ariaLabel()',\n '[aria-labelledby]': 'ariaLabelledBy()',\n '[aria-describedby]': 'ariaDescribedBy()',\n },\n})\nexport class IdsSwitchComponent extends ComponentBaseWithDefaults<IdsSwitchDefaultConfig> {\n protected override get _hostName(): string {\n return 'switch';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_SWITCH_DEFAULT_CONFIG);\n\n private _switchGroup = inject(IdsSwitchGroupComponent, { optional: true });\n\n private _switchElement = viewChild<ElementRef<HTMLInputElement>>('switch');\n\n public isChecked = signal(false);\n\n public label = input<string>();\n public name = input<string | null>();\n public readonly = input(false, { transform: coerceBooleanAttribute });\n public size = input<IdsSizeType>(this._defaultConfig.size);\n public tabIndex = input(0, { transform: coerceNumberAttribute });\n public variant = input<IdsSwitchVariantType>(this._defaultConfig.variant);\n public hasIcon = input(this._defaultConfig.hasIcon);\n public iconPosition = input(this._defaultConfig.iconPosition);\n public labelPosition = input(this._defaultConfig.labelPosition);\n public isDisabled = signal(false);\n public ariaLabel = input<string| null>(null, { alias: 'aria-label' });\n public ariaLabelledBy = input<string | null, string>(null,\n { alias: 'aria-labelledby', transform: (val) => fallbackValue(val, this.id()) },\n );\n\n public ariaDescribedBy = input<string | null>(null, { alias: 'aria-describedby' });\n\n protected _parentOrSelfSize = computed(() => this._switchGroup?.size() ?? this.size());\n protected _parentOrSelfHasIcon = computed(() => this._switchGroup?.hasIcon() ?? this.hasIcon());\n protected _parentOrSelfIconPosition = computed(() => this._switchGroup?.iconPosition() ?? this.iconPosition());\n protected _parentOrSelfLabelPosition = computed(() => this._switchGroup?.labelPosition() ?? this.labelPosition());\n protected _hasHandleIcon = computed(() =>\n this._parentOrSelfHasIcon() && this._parentOrSelfIconPosition() === IdsSwitchIconPosition.ONHANDLE,\n );\n\n protected _hasTrackIcon = computed(() =>\n this._parentOrSelfHasIcon() && this._parentOrSelfIconPosition() === IdsSwitchIconPosition.ONTRACK,\n );\n\n private _isFocusable = computed(() => !this.isDisabled() && !this.readonly());\n protected _hostClasses = computed(() => this._getHostClasses([\n this._parentOrSelfSize(),\n this.variant(),\n this.isDisabled() ? 'disabled' : null,\n this.isChecked() ? 'on' : null,\n [\n 'label',\n this._parentOrSelfLabelPosition(),\n ],\n ]),\n );\n\n private _onChange: (value: unknown) => void = () => { };\n private _onTouched: () => unknown = () => { };\n\n @Input({ transform: coerceBooleanAttribute })\n set disabled(value: boolean) {\n if (value !== this.disabled) {\n this.isDisabled.set(value);\n }\n }\n\n public focus(): void {\n if (this._isFocusable()) {\n this._switchElement()?.nativeElement.focus();\n }\n }\n\n public writeValue(value: boolean | undefined): void {\n this.isChecked.set(Boolean(value));\n }\n\n public registerOnChange(fn: () => void): void {\n this._onChange = fn;\n }\n\n public registerOnTouched(fn: () => unknown): void {\n this._onTouched = fn;\n }\n\n public setDisabledState?(isDisabled: boolean): void {\n this.isDisabled.set(isDisabled);\n }\n\n public toggle(): void {\n if (!this.isDisabled() && !this.readonly()) {\n this.isChecked.update((checked) => !checked);\n this._onChange(this.isChecked());\n this._onTouched();\n }\n }\n\n public handleClick(): void {\n if (!this.isDisabled()) {\n this.toggle();\n }\n }\n}\n","<button\n #switch\n role=\"switch\"\n type=\"button\"\n class=\"ids-switch__button\"\n [tabIndex]=\"isDisabled() ? -1 : tabIndex()\"\n [disabled]=\"isDisabled()\"\n [id]=\"id()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-checked]=\"isChecked()\"\n [@switchAnimation]=\"isChecked() ? 'on' : 'off'\"\n (click)=\"handleClick()\"\n>\n <div class=\"ids-switch__track\">\n @if (_hasTrackIcon()) {\n <div class=\"ids-switch__track-icon\">\n @if (isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n }\n </div>\n <div class=\"ids-switch__track-icon\">\n @if (!isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n </div>\n }\n <div class=\"ids-switch__handle\">\n @if (_hasHandleIcon()) {\n <!-- needs to be here duplicate ids-icon because of animation :enter and :leave -->\n @if (isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n } @else {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n }\n </div>\n </div>\n</button>\n\n<label class=\"ids-switch__label\" [for]=\"id()\">{{ label() }}</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["defaultConfig"],"mappings":";;;;;;;AAAa,MAAA,qBAAqB,GAAG;AACnC,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,OAAO,EAAE,SAAS;;AAKP,MAAA,sBAAsB,GAAG;AACpC,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,OAAO;;;ACTH,MAAA,gBAAgB,GAAG;AAC9B,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,KAAK,EAAE,OAAO;;;MCWH,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B,EAC3B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,iCAAiC;AAC3C,CAAA;SAGa,iCAAiC,GAAA;IAC/C,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,OAAO;QACrB,OAAO,EAAE,gBAAgB,CAAC,OAAO;AACjC,QAAA,OAAO,EAAE,KAAK;QACd,YAAY,EAAE,qBAAqB,CAAC,QAAQ;QAC5C,aAAa,EAAE,sBAAsB,CAAC,KAAK;KAC5C;AACH;;ACzBA,MAAMA,eAAa,GAAG,iCAAiC,EAAE;AASnD,MAAO,uBAAwB,SAAQ,yBAAiD,CAAA;AAP9F,IAAA,WAAA,GAAA;;QAYqB,IAAc,CAAA,cAAA,GAAG,IAAI,CAAC,iBAAiB,CAACA,eAAa,EAAE,yBAAyB,CAAC;QAE7F,IAAI,CAAA,IAAA,GAAG,KAAK,CAAqB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;QAC1D,IA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,EAAA,QAAA,EAAA,CAAA;;2EAE+D,EAChE,OAAA,EAAA,CAAC,gBAAgB,CAAC,EAEZ,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACpC,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAoB,kBAAA;AAC/B,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EACW,UAAA,EAAA,CAAC,eAAe,CAAC,EACvB,IAAA,EAAA;AACJ,wBAAA,cAAc,EAAE,aAAa;AAC7B,wBAAA,mBAAmB,EAAE,kBAAkB;AACvC,wBAAA,oBAAoB,EAAE,mBAAmB;AAC1C,qBAAA,EAAA,QAAA,EAAA,0zCAAA,EAAA;8BA6DG,QAAQ,EAAA,CAAA;sBADX,KAAK;uBAAC,EAAE,SAAS,EAAE,sBAAsB,EAAE;;;AE7F9C;;AAEG;;;;"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, input, viewChild, TemplateRef, computed, signal, Component, ViewEncapsulation, ChangeDetectionStrategy, contentChildren, ViewContainerRef, isDevMode } from '@angular/core';
|
|
3
|
+
import { IdsSize, IdsOrientation, ComponentBase, coerceStringAttribute, ComponentBaseWithDefaults, coerceBooleanAttribute } from '@i-cell/ids-angular/core';
|
|
4
|
+
import * as i1 from '@angular/cdk/portal';
|
|
5
|
+
import { CdkPortalOutlet, TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
6
|
+
import { IdsIconComponent } from '@i-cell/ids-angular/icon';
|
|
7
|
+
|
|
8
|
+
const IdsTabGroupPosition = {
|
|
9
|
+
START: 'start',
|
|
10
|
+
CENTER: 'center',
|
|
11
|
+
END: 'end',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const IdsTabGroupVariant = {
|
|
15
|
+
PRIMARY: 'primary',
|
|
16
|
+
SURFACE: 'surface',
|
|
17
|
+
LIGHT: 'light',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const IdsTabIndicatorPosition = {
|
|
21
|
+
TOP: 'top',
|
|
22
|
+
BOTTOM: 'bottom',
|
|
23
|
+
LEFT: 'left',
|
|
24
|
+
RIGHT: 'right',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const IDS_TAB_GROUP_DEFAULT_CONFIG = new InjectionToken('IDS_TAB_GROUP_DEFAULT_CONFIG', {
|
|
28
|
+
providedIn: 'root',
|
|
29
|
+
factory: IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY,
|
|
30
|
+
});
|
|
31
|
+
function IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY() {
|
|
32
|
+
return {
|
|
33
|
+
size: IdsSize.COMPACT,
|
|
34
|
+
variant: IdsTabGroupVariant.PRIMARY,
|
|
35
|
+
orientation: IdsOrientation.HORIZONTAL,
|
|
36
|
+
stretchTabs: true,
|
|
37
|
+
tabPosition: IdsTabGroupPosition.START,
|
|
38
|
+
indicatorPosition: IdsTabIndicatorPosition.BOTTOM,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
class IdsTabComponent extends ComponentBase {
|
|
43
|
+
constructor() {
|
|
44
|
+
super(...arguments);
|
|
45
|
+
this._tabGroup = inject(IdsTabGroupComponent, { skipSelf: true });
|
|
46
|
+
this.label = input();
|
|
47
|
+
this.disabled = input(false);
|
|
48
|
+
this.leadingIcon = input('', { transform: coerceStringAttribute });
|
|
49
|
+
this.trailingIcon = input('', { transform: coerceStringAttribute });
|
|
50
|
+
this.content = viewChild.required(TemplateRef);
|
|
51
|
+
this.panelId = `${this.id()}-panel`;
|
|
52
|
+
this.parentOrSelfDisabled = computed(() => this._tabGroup.disabled() || this.disabled());
|
|
53
|
+
this._hostClasses = signal(this._getHostClasses([]));
|
|
54
|
+
this.hostTabClasses = computed(() => this._getHostClasses([this.parentOrSelfDisabled() ? 'disabled' : null]));
|
|
55
|
+
}
|
|
56
|
+
get _hostName() {
|
|
57
|
+
return 'tab';
|
|
58
|
+
}
|
|
59
|
+
;
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsTabComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.1.2", type: IdsTabComponent, isStandalone: true, selector: "ids-tab", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, leadingIcon: { classPropertyName: "leadingIcon", publicName: "leadingIcon", isSignal: true, isRequired: false, transformFunction: null }, trailingIcon: { classPropertyName: "trailingIcon", publicName: "trailingIcon", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-template>\n <div class=\"ids-tab-body-content\" [attr.role]=\"'tabpanel'\" [id]=\"panelId\">\n <ng-content />\n </div>\n</ng-template>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
62
|
+
}
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsTabComponent, decorators: [{
|
|
64
|
+
type: Component,
|
|
65
|
+
args: [{ selector: 'ids-tab', imports: [], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template>\n <div class=\"ids-tab-body-content\" [attr.role]=\"'tabpanel'\" [id]=\"panelId\">\n <ng-content />\n </div>\n</ng-template>\n" }]
|
|
66
|
+
}] });
|
|
67
|
+
|
|
68
|
+
const defaultConfig = IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY();
|
|
69
|
+
class IdsTabGroupComponent extends ComponentBaseWithDefaults {
|
|
70
|
+
constructor() {
|
|
71
|
+
super(...arguments);
|
|
72
|
+
this._defaultConfig = this._getDefaultConfig(defaultConfig, IDS_TAB_GROUP_DEFAULT_CONFIG);
|
|
73
|
+
this._items = contentChildren(IdsTabComponent);
|
|
74
|
+
this._portalOutlet = viewChild.required(CdkPortalOutlet);
|
|
75
|
+
this._viewContainerRef = inject(ViewContainerRef);
|
|
76
|
+
this.size = input(this._defaultConfig.size);
|
|
77
|
+
this.variant = input(this._defaultConfig.variant);
|
|
78
|
+
this.orientation = input(this._defaultConfig.orientation);
|
|
79
|
+
this.stretchTabs = input(this._defaultConfig.stretchTabs, { transform: coerceBooleanAttribute });
|
|
80
|
+
this.tabPosition = input(this._defaultConfig.tabPosition);
|
|
81
|
+
this.indicatorPosition = input();
|
|
82
|
+
this.disabled = input(false, { transform: coerceBooleanAttribute });
|
|
83
|
+
this.selectedTabIndex = signal(0);
|
|
84
|
+
this._hostClasses = computed(() => this._getHostClasses([
|
|
85
|
+
this.size(),
|
|
86
|
+
this.variant(),
|
|
87
|
+
this.orientation(),
|
|
88
|
+
this.disabled() ? 'disabled' : null,
|
|
89
|
+
this.stretchTabs() && this.orientation() === IdsOrientation.HORIZONTAL ? 'stretch-tabs' : null,
|
|
90
|
+
this.tabPosition() && !this.stretchTabs() ? this.tabPosition() : null,
|
|
91
|
+
`indicator-${this.indicatorPosition() ?? this.calculatedIndicatorPosition()}`,
|
|
92
|
+
]));
|
|
93
|
+
this.calculatedIndicatorPosition = computed(() => (this.orientation() === IdsOrientation.HORIZONTAL ? IdsTabIndicatorPosition.BOTTOM : IdsTabIndicatorPosition.LEFT));
|
|
94
|
+
}
|
|
95
|
+
get _hostName() {
|
|
96
|
+
return 'tab-group';
|
|
97
|
+
}
|
|
98
|
+
ngAfterContentInit() {
|
|
99
|
+
const items = this._items();
|
|
100
|
+
const orientation = this.orientation();
|
|
101
|
+
const indicatorPosition = this.indicatorPosition();
|
|
102
|
+
const minItemCount = 2;
|
|
103
|
+
if (isDevMode() && (items.length < minItemCount)) {
|
|
104
|
+
throw this._createHostError(`Invalid count of tab items. Minimum item count is ${minItemCount}.`);
|
|
105
|
+
}
|
|
106
|
+
if (isDevMode() && (orientation === IdsOrientation.HORIZONTAL &&
|
|
107
|
+
(indicatorPosition && (indicatorPosition === IdsTabIndicatorPosition.LEFT || indicatorPosition === IdsTabIndicatorPosition.RIGHT)))) {
|
|
108
|
+
throw this._createHostError(`Can not use ${indicatorPosition} indicator position with Horizontal mode`);
|
|
109
|
+
}
|
|
110
|
+
if (isDevMode() && (orientation === IdsOrientation.VERTICAL &&
|
|
111
|
+
(indicatorPosition && (indicatorPosition === IdsTabIndicatorPosition.BOTTOM || indicatorPosition === IdsTabIndicatorPosition.TOP)))) {
|
|
112
|
+
throw this._createHostError(`Can not use ${indicatorPosition} indicator position with Vertical mode`);
|
|
113
|
+
}
|
|
114
|
+
this.selectTab(0);
|
|
115
|
+
}
|
|
116
|
+
selectTab(index) {
|
|
117
|
+
this.selectedTabIndex.set(index);
|
|
118
|
+
const selectedItem = this._items().at(index);
|
|
119
|
+
const selectedPortal = new TemplatePortal(selectedItem.content(), this._viewContainerRef);
|
|
120
|
+
if (this._portalOutlet().hasAttached()) {
|
|
121
|
+
this._portalOutlet().detach();
|
|
122
|
+
}
|
|
123
|
+
this._portalOutlet().attach(selectedPortal);
|
|
124
|
+
}
|
|
125
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsTabGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
126
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.2", type: IdsTabGroupComponent, isStandalone: true, selector: "ids-tab-group", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, stretchTabs: { classPropertyName: "stretchTabs", publicName: "stretchTabs", isSignal: true, isRequired: false, transformFunction: null }, tabPosition: { classPropertyName: "tabPosition", publicName: "tabPosition", isSignal: true, isRequired: false, transformFunction: null }, indicatorPosition: { classPropertyName: "indicatorPosition", publicName: "indicatorPosition", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_items", predicate: IdsTabComponent, isSignal: true }], viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ids-tab-group__container\">\n <ul class=\"ids-tab-group__header\" role=\"tablist\">\n @for (item of _items(); track $index; let i = $index) {\n <li\n role=\"tab\"\n [class]=\"item.hostTabClasses()\"\n [class.ids-tab--active]=\"selectedTabIndex() === i\"\n [attr.tabindex]=\"item.parentOrSelfDisabled() ? -1 : 0\"\n [attr.aria-selected]=\"selectedTabIndex() === i ? 'true' : 'false'\"\n [attr.aria-controls]=\"item.panelId\"\n (click)=\"selectTab(i)\"\n >\n @let tabLeadingIcon = item.leadingIcon();\n @let tabTrailingIcon = item.trailingIcon();\n @if (tabLeadingIcon) {\n <ids-icon [fontIcon]=\"tabLeadingIcon\" />\n }\n <span class=\"ids-tab__label\">{{ item.label() }}</span>\n @if (tabTrailingIcon) {\n <ids-icon [fontIcon]=\"tabTrailingIcon\" />\n }\n <span class=\"ids-tab__indicator\">\n <span class=\"ids-tab__line\"></span>\n </span>\n </li>\n }\n </ul>\n</div>\n<ng-template cdkPortalOutlet />\n", dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
127
|
+
}
|
|
128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsTabGroupComponent, decorators: [{
|
|
129
|
+
type: Component,
|
|
130
|
+
args: [{ selector: 'ids-tab-group', imports: [
|
|
131
|
+
PortalModule,
|
|
132
|
+
IdsIconComponent,
|
|
133
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ids-tab-group__container\">\n <ul class=\"ids-tab-group__header\" role=\"tablist\">\n @for (item of _items(); track $index; let i = $index) {\n <li\n role=\"tab\"\n [class]=\"item.hostTabClasses()\"\n [class.ids-tab--active]=\"selectedTabIndex() === i\"\n [attr.tabindex]=\"item.parentOrSelfDisabled() ? -1 : 0\"\n [attr.aria-selected]=\"selectedTabIndex() === i ? 'true' : 'false'\"\n [attr.aria-controls]=\"item.panelId\"\n (click)=\"selectTab(i)\"\n >\n @let tabLeadingIcon = item.leadingIcon();\n @let tabTrailingIcon = item.trailingIcon();\n @if (tabLeadingIcon) {\n <ids-icon [fontIcon]=\"tabLeadingIcon\" />\n }\n <span class=\"ids-tab__label\">{{ item.label() }}</span>\n @if (tabTrailingIcon) {\n <ids-icon [fontIcon]=\"tabTrailingIcon\" />\n }\n <span class=\"ids-tab__indicator\">\n <span class=\"ids-tab__line\"></span>\n </span>\n </li>\n }\n </ul>\n</div>\n<ng-template cdkPortalOutlet />\n" }]
|
|
134
|
+
}] });
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Generated bundle index. Do not edit.
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
export { IDS_TAB_GROUP_DEFAULT_CONFIG, IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY, IdsTabComponent, IdsTabGroupComponent, IdsTabGroupPosition, IdsTabGroupVariant, IdsTabIndicatorPosition };
|
|
141
|
+
//# sourceMappingURL=i-cell-ids-angular-tab.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-cell-ids-angular-tab.mjs","sources":["../../../projects/widgets/tab/types/tab-group-position.type.ts","../../../projects/widgets/tab/types/tab-group-variant.type.ts","../../../projects/widgets/tab/types/tab-indicator-position.type.ts","../../../projects/widgets/tab/tab-group-defaults.ts","../../../projects/widgets/tab/tab.component.ts","../../../projects/widgets/tab/tab.component.html","../../../projects/widgets/tab/tab-group.component.ts","../../../projects/widgets/tab/tab-group.component.html","../../../projects/widgets/tab/i-cell-ids-angular-tab.ts"],"sourcesContent":["export const IdsTabGroupPosition = {\n START: 'start',\n CENTER: 'center',\n END: 'end',\n} as const;\n\nexport type IdsTabGroupPositionType = (typeof IdsTabGroupPosition)[keyof typeof IdsTabGroupPosition];\n","export const IdsTabGroupVariant = {\n PRIMARY: 'primary',\n SURFACE: 'surface',\n LIGHT: 'light',\n} as const;\n\nexport type IdsTabGroupVariantType = (typeof IdsTabGroupVariant)[keyof typeof IdsTabGroupVariant];\n","export const IdsTabIndicatorPosition = {\n TOP: 'top',\n BOTTOM: 'bottom',\n LEFT: 'left',\n RIGHT: 'right',\n} as const;\n\nexport type IdsTabIndicatorPositionType = (typeof IdsTabIndicatorPosition)[keyof typeof IdsTabIndicatorPosition];\n","import { IdsTabGroupPosition, IdsTabGroupPositionType } from './types/tab-group-position.type';\nimport { IdsTabGroupVariant, IdsTabGroupVariantType } from './types/tab-group-variant.type';\nimport { IdsTabIndicatorPosition, IdsTabIndicatorPositionType } from './types/tab-indicator-position.type';\n\nimport { InjectionToken } from '@angular/core';\nimport { IdsOrientation, IdsOrientationType, IdsSize, IdsSizeType } from '@i-cell/ids-angular/core';\n\nexport interface IdsTabGroupDefaultConfig {\n size?: IdsSizeType,\n variant?: IdsTabGroupVariantType,\n orientation?: IdsOrientationType,\n stretchTabs?: boolean,\n tabPosition?: IdsTabGroupPositionType,\n indicatorPosition?: IdsTabIndicatorPositionType,\n}\n\nexport const IDS_TAB_GROUP_DEFAULT_CONFIG = new InjectionToken<IdsTabGroupDefaultConfig>(\n 'IDS_TAB_GROUP_DEFAULT_CONFIG',\n {\n providedIn: 'root',\n factory: IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY,\n },\n);\n\nexport function IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY(): Required<IdsTabGroupDefaultConfig> {\n return {\n size: IdsSize.COMPACT,\n variant: IdsTabGroupVariant.PRIMARY,\n orientation: IdsOrientation.HORIZONTAL,\n stretchTabs: true,\n tabPosition: IdsTabGroupPosition.START,\n indicatorPosition: IdsTabIndicatorPosition.BOTTOM,\n };\n}\n","import { IdsTabGroupComponent } from './tab-group.component';\n\nimport { ChangeDetectionStrategy, Component, computed, inject, input, signal, TemplateRef, viewChild, ViewEncapsulation } from '@angular/core';\nimport { coerceStringAttribute, ComponentBase } from '@i-cell/ids-angular/core';\n\n@Component({\n selector: 'ids-tab',\n imports: [],\n templateUrl: './tab.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IdsTabComponent extends ComponentBase {\n protected override get _hostName(): string {\n return 'tab';\n };\n\n private _tabGroup = inject(IdsTabGroupComponent, { skipSelf: true });\n\n public label = input<string>();\n public disabled = input<boolean>(false);\n public leadingIcon = input('', { transform: coerceStringAttribute });\n public trailingIcon = input('', { transform: coerceStringAttribute });\n public content = viewChild.required<TemplateRef<unknown>>(TemplateRef);\n public panelId = `${this.id()}-panel`;\n\n public parentOrSelfDisabled = computed(() => this._tabGroup.disabled() || this.disabled());\n\n protected _hostClasses = signal(this._getHostClasses([]));\n\n public hostTabClasses = computed(() => this._getHostClasses(\n [this.parentOrSelfDisabled() ? 'disabled' : null],\n ));\n}\n","<ng-template>\n <div class=\"ids-tab-body-content\" [attr.role]=\"'tabpanel'\" [id]=\"panelId\">\n <ng-content />\n </div>\n</ng-template>\n","import { IDS_TAB_GROUP_DEFAULT_CONFIG, IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY, IdsTabGroupDefaultConfig } from './tab-group-defaults';\nimport { IdsTabComponent } from './tab.component';\nimport { IdsTabGroupPositionType } from './types/tab-group-position.type';\nimport { IdsTabGroupVariantType } from './types/tab-group-variant.type';\nimport { IdsTabIndicatorPosition, IdsTabIndicatorPositionType } from './types/tab-indicator-position.type';\n\nimport { CdkPortalOutlet, PortalModule, TemplatePortal } from '@angular/cdk/portal';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, computed, contentChildren, inject, input, isDevMode, signal, viewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';\nimport { coerceBooleanAttribute, ComponentBaseWithDefaults, IdsOrientation, IdsOrientationType, IdsSizeType } from '@i-cell/ids-angular/core';\nimport { IdsIconComponent } from '@i-cell/ids-angular/icon';\n\nconst defaultConfig = IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: 'ids-tab-group',\n imports: [\n PortalModule,\n IdsIconComponent,\n ],\n templateUrl: './tab-group.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IdsTabGroupComponent extends ComponentBaseWithDefaults<IdsTabGroupDefaultConfig> implements AfterContentInit {\n protected override get _hostName(): string {\n return 'tab-group';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_TAB_GROUP_DEFAULT_CONFIG);\n\n protected _items = contentChildren<IdsTabComponent>(IdsTabComponent);\n private _portalOutlet = viewChild.required<CdkPortalOutlet>(CdkPortalOutlet);\n private _viewContainerRef = inject(ViewContainerRef);\n\n public size = input<IdsSizeType>(this._defaultConfig.size);\n public variant = input<IdsTabGroupVariantType>(this._defaultConfig.variant);\n public orientation = input<IdsOrientationType>(this._defaultConfig.orientation);\n public stretchTabs = input(this._defaultConfig.stretchTabs, { transform: coerceBooleanAttribute });\n public tabPosition = input<IdsTabGroupPositionType>(this._defaultConfig.tabPosition);\n public indicatorPosition = input<IdsTabIndicatorPositionType>();\n public disabled = input(false, { transform: coerceBooleanAttribute });\n\n public selectedTabIndex = signal<number>(0);\n\n protected _hostClasses = computed(() => this._getHostClasses([\n this.size(),\n this.variant(),\n this.orientation(),\n this.disabled() ? 'disabled' : null,\n this.stretchTabs() && this.orientation() === IdsOrientation.HORIZONTAL ? 'stretch-tabs' : null,\n this.tabPosition() && !this.stretchTabs() ? this.tabPosition() : null,\n `indicator-${this.indicatorPosition() ?? this.calculatedIndicatorPosition()}`,\n ]));\n\n public calculatedIndicatorPosition = computed(() =>\n (this.orientation() === IdsOrientation.HORIZONTAL ? IdsTabIndicatorPosition.BOTTOM : IdsTabIndicatorPosition.LEFT),\n );\n\n public ngAfterContentInit(): void {\n const items = this._items();\n const orientation = this.orientation();\n const indicatorPosition = this.indicatorPosition();\n const minItemCount = 2;\n\n if (isDevMode() && (items.length < minItemCount)) {\n throw this._createHostError(`Invalid count of tab items. Minimum item count is ${minItemCount}.`);\n }\n\n if (isDevMode() && (orientation === IdsOrientation.HORIZONTAL &&\n (indicatorPosition && (indicatorPosition === IdsTabIndicatorPosition.LEFT || indicatorPosition === IdsTabIndicatorPosition.RIGHT)))) {\n throw this._createHostError(`Can not use ${indicatorPosition} indicator position with Horizontal mode`);\n }\n\n if (isDevMode() && (orientation === IdsOrientation.VERTICAL &&\n (indicatorPosition && (indicatorPosition === IdsTabIndicatorPosition.BOTTOM || indicatorPosition === IdsTabIndicatorPosition.TOP)))) {\n throw this._createHostError(`Can not use ${indicatorPosition} indicator position with Vertical mode`);\n }\n\n this.selectTab(0);\n }\n\n public selectTab(index: number): void {\n this.selectedTabIndex.set(index);\n const selectedItem = this._items().at(index);\n const selectedPortal = new TemplatePortal(selectedItem!.content(), this._viewContainerRef);\n\n if (this._portalOutlet().hasAttached()) {\n this._portalOutlet().detach();\n }\n\n this._portalOutlet().attach(selectedPortal);\n }\n}\n","<div class=\"ids-tab-group__container\">\n <ul class=\"ids-tab-group__header\" role=\"tablist\">\n @for (item of _items(); track $index; let i = $index) {\n <li\n role=\"tab\"\n [class]=\"item.hostTabClasses()\"\n [class.ids-tab--active]=\"selectedTabIndex() === i\"\n [attr.tabindex]=\"item.parentOrSelfDisabled() ? -1 : 0\"\n [attr.aria-selected]=\"selectedTabIndex() === i ? 'true' : 'false'\"\n [attr.aria-controls]=\"item.panelId\"\n (click)=\"selectTab(i)\"\n >\n @let tabLeadingIcon = item.leadingIcon();\n @let tabTrailingIcon = item.trailingIcon();\n @if (tabLeadingIcon) {\n <ids-icon [fontIcon]=\"tabLeadingIcon\" />\n }\n <span class=\"ids-tab__label\">{{ item.label() }}</span>\n @if (tabTrailingIcon) {\n <ids-icon [fontIcon]=\"tabTrailingIcon\" />\n }\n <span class=\"ids-tab__indicator\">\n <span class=\"ids-tab__line\"></span>\n </span>\n </li>\n }\n </ul>\n</div>\n<ng-template cdkPortalOutlet />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAa,MAAA,mBAAmB,GAAG;AACjC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,GAAG,EAAE,KAAK;;;ACHC,MAAA,kBAAkB,GAAG;AAChC,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,KAAK,EAAE,OAAO;;;ACHH,MAAA,uBAAuB,GAAG;AACrC,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,OAAO;;;MCYH,4BAA4B,GAAG,IAAI,cAAc,CAC5D,8BAA8B,EAC9B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,oCAAoC;AAC9C,CAAA;SAGa,oCAAo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