@i-cell/ids-angular 0.0.0-watch

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.
Files changed (133) hide show
  1. package/README.md +24 -0
  2. package/accordion/index.d.ts +81 -0
  3. package/accordion/package.json +3 -0
  4. package/avatar/index.d.ts +66 -0
  5. package/avatar/package.json +3 -0
  6. package/badge/index.d.ts +61 -0
  7. package/badge/package.json +3 -0
  8. package/breadcrumb/index.d.ts +67 -0
  9. package/breadcrumb/package.json +3 -0
  10. package/button/index.d.ts +81 -0
  11. package/button/package.json +3 -0
  12. package/card/index.d.ts +91 -0
  13. package/card/package.json +3 -0
  14. package/checkbox/index.d.ts +137 -0
  15. package/checkbox/package.json +3 -0
  16. package/chip/index.d.ts +82 -0
  17. package/chip/package.json +3 -0
  18. package/core/index.d.ts +168 -0
  19. package/core/package.json +3 -0
  20. package/datepicker/index.d.ts +112 -0
  21. package/datepicker/package.json +3 -0
  22. package/dialog/index.d.ts +72 -0
  23. package/dialog/package.json +3 -0
  24. package/divider/index.d.ts +45 -0
  25. package/divider/package.json +3 -0
  26. package/fesm2022/i-cell-ids-angular-accordion.mjs +223 -0
  27. package/fesm2022/i-cell-ids-angular-accordion.mjs.map +1 -0
  28. package/fesm2022/i-cell-ids-angular-avatar.mjs +125 -0
  29. package/fesm2022/i-cell-ids-angular-avatar.mjs.map +1 -0
  30. package/fesm2022/i-cell-ids-angular-badge.mjs +172 -0
  31. package/fesm2022/i-cell-ids-angular-badge.mjs.map +1 -0
  32. package/fesm2022/i-cell-ids-angular-breadcrumb.mjs +313 -0
  33. package/fesm2022/i-cell-ids-angular-breadcrumb.mjs.map +1 -0
  34. package/fesm2022/i-cell-ids-angular-button.mjs +149 -0
  35. package/fesm2022/i-cell-ids-angular-button.mjs.map +1 -0
  36. package/fesm2022/i-cell-ids-angular-card.mjs +222 -0
  37. package/fesm2022/i-cell-ids-angular-card.mjs.map +1 -0
  38. package/fesm2022/i-cell-ids-angular-checkbox.mjs +350 -0
  39. package/fesm2022/i-cell-ids-angular-checkbox.mjs.map +1 -0
  40. package/fesm2022/i-cell-ids-angular-chip.mjs +166 -0
  41. package/fesm2022/i-cell-ids-angular-chip.mjs.map +1 -0
  42. package/fesm2022/i-cell-ids-angular-core.mjs +409 -0
  43. package/fesm2022/i-cell-ids-angular-core.mjs.map +1 -0
  44. package/fesm2022/i-cell-ids-angular-datepicker.mjs +860 -0
  45. package/fesm2022/i-cell-ids-angular-datepicker.mjs.map +1 -0
  46. package/fesm2022/i-cell-ids-angular-dialog.mjs +183 -0
  47. package/fesm2022/i-cell-ids-angular-dialog.mjs.map +1 -0
  48. package/fesm2022/i-cell-ids-angular-divider.mjs +76 -0
  49. package/fesm2022/i-cell-ids-angular-divider.mjs.map +1 -0
  50. package/fesm2022/i-cell-ids-angular-forms.mjs +972 -0
  51. package/fesm2022/i-cell-ids-angular-forms.mjs.map +1 -0
  52. package/fesm2022/i-cell-ids-angular-icon-button.mjs +120 -0
  53. package/fesm2022/i-cell-ids-angular-icon-button.mjs.map +1 -0
  54. package/fesm2022/i-cell-ids-angular-icon.mjs +158 -0
  55. package/fesm2022/i-cell-ids-angular-icon.mjs.map +1 -0
  56. package/fesm2022/i-cell-ids-angular-menu.mjs +154 -0
  57. package/fesm2022/i-cell-ids-angular-menu.mjs.map +1 -0
  58. package/fesm2022/i-cell-ids-angular-notification.mjs +167 -0
  59. package/fesm2022/i-cell-ids-angular-notification.mjs.map +1 -0
  60. package/fesm2022/i-cell-ids-angular-overlay-panel.mjs +72 -0
  61. package/fesm2022/i-cell-ids-angular-overlay-panel.mjs.map +1 -0
  62. package/fesm2022/i-cell-ids-angular-paginator.mjs +319 -0
  63. package/fesm2022/i-cell-ids-angular-paginator.mjs.map +1 -0
  64. package/fesm2022/i-cell-ids-angular-radio.mjs +312 -0
  65. package/fesm2022/i-cell-ids-angular-radio.mjs.map +1 -0
  66. package/fesm2022/i-cell-ids-angular-segmented-control-toggle.mjs +264 -0
  67. package/fesm2022/i-cell-ids-angular-segmented-control-toggle.mjs.map +1 -0
  68. package/fesm2022/i-cell-ids-angular-segmented-control.mjs +283 -0
  69. package/fesm2022/i-cell-ids-angular-segmented-control.mjs.map +1 -0
  70. package/fesm2022/i-cell-ids-angular-select.mjs +549 -0
  71. package/fesm2022/i-cell-ids-angular-select.mjs.map +1 -0
  72. package/fesm2022/i-cell-ids-angular-side-nav.mjs +375 -0
  73. package/fesm2022/i-cell-ids-angular-side-nav.mjs.map +1 -0
  74. package/fesm2022/i-cell-ids-angular-side-sheet.mjs +179 -0
  75. package/fesm2022/i-cell-ids-angular-side-sheet.mjs.map +1 -0
  76. package/fesm2022/i-cell-ids-angular-snackbar.mjs +440 -0
  77. package/fesm2022/i-cell-ids-angular-snackbar.mjs.map +1 -0
  78. package/fesm2022/i-cell-ids-angular-spinner.mjs +67 -0
  79. package/fesm2022/i-cell-ids-angular-spinner.mjs.map +1 -0
  80. package/fesm2022/i-cell-ids-angular-switch.mjs +181 -0
  81. package/fesm2022/i-cell-ids-angular-switch.mjs.map +1 -0
  82. package/fesm2022/i-cell-ids-angular-tab.mjs +142 -0
  83. package/fesm2022/i-cell-ids-angular-tab.mjs.map +1 -0
  84. package/fesm2022/i-cell-ids-angular-table.mjs +663 -0
  85. package/fesm2022/i-cell-ids-angular-table.mjs.map +1 -0
  86. package/fesm2022/i-cell-ids-angular-tag.mjs +116 -0
  87. package/fesm2022/i-cell-ids-angular-tag.mjs.map +1 -0
  88. package/fesm2022/i-cell-ids-angular-tooltip.mjs +586 -0
  89. package/fesm2022/i-cell-ids-angular-tooltip.mjs.map +1 -0
  90. package/fesm2022/i-cell-ids-angular.mjs +9 -0
  91. package/fesm2022/i-cell-ids-angular.mjs.map +1 -0
  92. package/forms/index.d.ts +470 -0
  93. package/forms/package.json +3 -0
  94. package/icon/index.d.ts +69 -0
  95. package/icon/package.json +3 -0
  96. package/icon-button/index.d.ts +68 -0
  97. package/icon-button/package.json +3 -0
  98. package/index.d.ts +2 -0
  99. package/menu/index.d.ts +68 -0
  100. package/menu/package.json +3 -0
  101. package/notification/index.d.ts +68 -0
  102. package/notification/package.json +3 -0
  103. package/overlay-panel/index.d.ts +41 -0
  104. package/overlay-panel/package.json +3 -0
  105. package/package.json +180 -0
  106. package/paginator/index.d.ts +122 -0
  107. package/paginator/package.json +3 -0
  108. package/radio/index.d.ts +95 -0
  109. package/radio/package.json +3 -0
  110. package/segmented-control/index.d.ts +98 -0
  111. package/segmented-control/package.json +3 -0
  112. package/segmented-control-toggle/index.d.ts +103 -0
  113. package/segmented-control-toggle/package.json +3 -0
  114. package/select/index.d.ts +103 -0
  115. package/select/package.json +3 -0
  116. package/side-nav/index.d.ts +107 -0
  117. package/side-nav/package.json +3 -0
  118. package/side-sheet/index.d.ts +84 -0
  119. package/side-sheet/package.json +3 -0
  120. package/snackbar/index.d.ts +149 -0
  121. package/snackbar/package.json +3 -0
  122. package/spinner/index.d.ts +41 -0
  123. package/spinner/package.json +3 -0
  124. package/switch/index.d.ts +89 -0
  125. package/switch/package.json +3 -0
  126. package/tab/index.d.ts +78 -0
  127. package/tab/package.json +3 -0
  128. package/table/index.d.ts +393 -0
  129. package/table/package.json +3 -0
  130. package/tag/index.d.ts +70 -0
  131. package/tag/package.json +3 -0
  132. package/tooltip/index.d.ts +96 -0
  133. package/tooltip/package.json +3 -0
@@ -0,0 +1,181 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, input, computed, ChangeDetectionStrategy, ViewEncapsulation, Component, 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, ...(ngDevMode ? [{ debugName: "size" }] : []));
43
+ this.hasIcon = input(this._defaultConfig.hasIcon, ...(ngDevMode ? [{ debugName: "hasIcon" }] : []));
44
+ this.iconPosition = input(this._defaultConfig.iconPosition, ...(ngDevMode ? [{ debugName: "iconPosition" }] : []));
45
+ this.labelPosition = input(this._defaultConfig.labelPosition, ...(ngDevMode ? [{ debugName: "labelPosition" }] : []));
46
+ this._hostClasses = computed(() => this._getHostClasses([this.size()]), ...(ngDevMode ? [{ debugName: "_hostClasses" }] : []));
47
+ }
48
+ get _hostName() {
49
+ return 'switch-group';
50
+ }
51
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsSwitchGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
52
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.7", 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: "20.1.7", 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', ...(ngDevMode ? [{ debugName: "_switchElement" }] : []));
76
+ this._isChecked = signal(false, ...(ngDevMode ? [{ debugName: "_isChecked" }] : []));
77
+ this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
78
+ this.name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : []));
79
+ this.readonly = input(false, ...(ngDevMode ? [{ debugName: "readonly", transform: coerceBooleanAttribute }] : [{ transform: coerceBooleanAttribute }]));
80
+ this.size = input(this._defaultConfig.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
81
+ this.tabIndex = input(0, ...(ngDevMode ? [{ debugName: "tabIndex", transform: coerceNumberAttribute }] : [{ transform: coerceNumberAttribute }]));
82
+ this.variant = input(this._defaultConfig.variant, ...(ngDevMode ? [{ debugName: "variant" }] : []));
83
+ this.hasIcon = input(this._defaultConfig.hasIcon, ...(ngDevMode ? [{ debugName: "hasIcon" }] : []));
84
+ this.iconPosition = input(this._defaultConfig.iconPosition, ...(ngDevMode ? [{ debugName: "iconPosition" }] : []));
85
+ this.labelPosition = input(this._defaultConfig.labelPosition, ...(ngDevMode ? [{ debugName: "labelPosition" }] : []));
86
+ this._isDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_isDisabled" }] : []));
87
+ this.ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel", alias: 'aria-label' }] : [{ alias: 'aria-label' }]));
88
+ this.ariaLabelledBy = input(null, ...(ngDevMode ? [{ debugName: "ariaLabelledBy", alias: 'aria-labelledby', transform: (val) => fallbackValue(val, this.id()) }] : [{ alias: 'aria-labelledby', transform: (val) => fallbackValue(val, this.id()) }]));
89
+ this.ariaDescribedBy = input(null, ...(ngDevMode ? [{ debugName: "ariaDescribedBy", alias: 'aria-describedby' }] : [{ alias: 'aria-describedby' }]));
90
+ this._parentOrSelfSize = computed(() => this._switchGroup?.size() ?? this.size(), ...(ngDevMode ? [{ debugName: "_parentOrSelfSize" }] : []));
91
+ this._parentOrSelfHasIcon = computed(() => this._switchGroup?.hasIcon() ?? this.hasIcon(), ...(ngDevMode ? [{ debugName: "_parentOrSelfHasIcon" }] : []));
92
+ this._parentOrSelfIconPosition = computed(() => this._switchGroup?.iconPosition() ?? this.iconPosition(), ...(ngDevMode ? [{ debugName: "_parentOrSelfIconPosition" }] : []));
93
+ this._parentOrSelfLabelPosition = computed(() => this._switchGroup?.labelPosition() ?? this.labelPosition(), ...(ngDevMode ? [{ debugName: "_parentOrSelfLabelPosition" }] : []));
94
+ this._hasHandleIcon = computed(() => this._parentOrSelfHasIcon() && this._parentOrSelfIconPosition() === IdsSwitchIconPosition.ONHANDLE, ...(ngDevMode ? [{ debugName: "_hasHandleIcon" }] : []));
95
+ this._hasTrackIcon = computed(() => this._parentOrSelfHasIcon() && this._parentOrSelfIconPosition() === IdsSwitchIconPosition.ONTRACK, ...(ngDevMode ? [{ debugName: "_hasTrackIcon" }] : []));
96
+ this._isFocusable = computed(() => !this._isDisabled() && !this.readonly(), ...(ngDevMode ? [{ debugName: "_isFocusable" }] : []));
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
+ ]), ...(ngDevMode ? [{ debugName: "_hostClasses" }] : []));
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: "20.1.7", ngImport: i0, type: IdsSwitchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
148
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", 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: "20.1.7", 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 protected _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 protected _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 protected _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":";;;;;;;AAAO,MAAM,qBAAqB,GAAG;AACnC,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,OAAO,EAAE,SAAS;;AAKb,MAAM,sBAAsB,GAAG;AACpC,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,OAAO;;;ACTT,MAAM,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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,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,gBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAWd,CAAC,eAAe,CAAC,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAOlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAtB9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA;;2EAE+D,EAAA,OAAA,EAChE,CAAC,gBAAgB,CAAC,EAAA,aAAA,EAEZ,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,kBAAoB;AAC/B,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,UAAA,EACW,CAAC,eAAe,CAAC,EAAA,IAAA,EACvB;AACJ,wBAAA,cAAc,EAAE,aAAa;AAC7B,wBAAA,mBAAmB,EAAE,kBAAkB;AACvC,wBAAA,oBAAoB,EAAE,mBAAmB;AAC1C,qBAAA,EAAA,QAAA,EAAA,k0CAAA,EAAA;8BA6DG,QAAQ,EAAA,CAAA;sBADX,KAAK;uBAAC,EAAE,SAAS,EAAE,sBAAsB,EAAE;;;AE7F9C;;AAEG;;;;"}
@@ -0,0 +1,142 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, input, viewChild, TemplateRef, computed, signal, ChangeDetectionStrategy, ViewEncapsulation, Component, contentChildren, ViewContainerRef, isDevMode } from '@angular/core';
3
+ import { IdsOrientation, IdsSize, 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(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
47
+ this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
48
+ this.leadingIcon = input('', ...(ngDevMode ? [{ debugName: "leadingIcon", transform: coerceStringAttribute }] : [{ transform: coerceStringAttribute }]));
49
+ this.trailingIcon = input('', ...(ngDevMode ? [{ debugName: "trailingIcon", transform: coerceStringAttribute }] : [{ transform: coerceStringAttribute }]));
50
+ this.content = viewChild.required(TemplateRef);
51
+ this.panelId = computed(() => `${this.id()}-panel`, ...(ngDevMode ? [{ debugName: "panelId" }] : []));
52
+ this.parentOrSelfDisabled = computed(() => this._tabGroup.disabled() || this.disabled(), ...(ngDevMode ? [{ debugName: "parentOrSelfDisabled" }] : []));
53
+ this._hostClasses = signal(this._getHostClasses([]), ...(ngDevMode ? [{ debugName: "_hostClasses" }] : []));
54
+ this.hostTabClasses = computed(() => this._getHostClasses([this.parentOrSelfDisabled() ? 'disabled' : null]), ...(ngDevMode ? [{ debugName: "hostTabClasses" }] : []));
55
+ }
56
+ get _hostName() {
57
+ return 'tab';
58
+ }
59
+ ;
60
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsTabComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
61
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.1.7", 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: "20.1.7", 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, ...(ngDevMode ? [{ debugName: "_items" }] : []));
74
+ this._portalOutlet = viewChild.required(CdkPortalOutlet);
75
+ this._viewContainerRef = inject(ViewContainerRef);
76
+ this.size = input(this._defaultConfig.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
77
+ this.variant = input(this._defaultConfig.variant, ...(ngDevMode ? [{ debugName: "variant" }] : []));
78
+ this.orientation = input(this._defaultConfig.orientation, ...(ngDevMode ? [{ debugName: "orientation" }] : []));
79
+ this.stretchTabs = input(this._defaultConfig.stretchTabs, ...(ngDevMode ? [{ debugName: "stretchTabs", transform: coerceBooleanAttribute }] : [{ transform: coerceBooleanAttribute }]));
80
+ this.tabPosition = input(this._defaultConfig.tabPosition, ...(ngDevMode ? [{ debugName: "tabPosition" }] : []));
81
+ this.indicatorPosition = input(...(ngDevMode ? [undefined, { debugName: "indicatorPosition" }] : []));
82
+ this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: coerceBooleanAttribute }] : [{ transform: coerceBooleanAttribute }]));
83
+ this._selectedTabIndex = signal(0, ...(ngDevMode ? [{ debugName: "_selectedTabIndex" }] : []));
84
+ this.selectedTabIndex = this._selectedTabIndex.asReadonly();
85
+ this._hostClasses = computed(() => this._getHostClasses([
86
+ this.size(),
87
+ this.variant(),
88
+ this.orientation(),
89
+ this.disabled() ? 'disabled' : null,
90
+ this.stretchTabs() && this.orientation() === IdsOrientation.HORIZONTAL ? 'stretch-tabs' : null,
91
+ this.tabPosition() && !this.stretchTabs() ? this.tabPosition() : null,
92
+ `indicator-${this.indicatorPosition() ?? this._calculatedIndicatorPosition()}`,
93
+ ]), ...(ngDevMode ? [{ debugName: "_hostClasses" }] : []));
94
+ this._calculatedIndicatorPosition = computed(() => (this.orientation() === IdsOrientation.HORIZONTAL ? IdsTabIndicatorPosition.BOTTOM : IdsTabIndicatorPosition.LEFT), ...(ngDevMode ? [{ debugName: "_calculatedIndicatorPosition" }] : []));
95
+ }
96
+ get _hostName() {
97
+ return 'tab-group';
98
+ }
99
+ ngAfterContentInit() {
100
+ const items = this._items();
101
+ const orientation = this.orientation();
102
+ const indicatorPosition = this.indicatorPosition();
103
+ const minItemCount = 2;
104
+ if (isDevMode() && (items.length < minItemCount)) {
105
+ throw this._createHostError(`Invalid count of tab items. Minimum item count is ${minItemCount}.`);
106
+ }
107
+ if (isDevMode() && (orientation === IdsOrientation.HORIZONTAL &&
108
+ (indicatorPosition && (indicatorPosition === IdsTabIndicatorPosition.LEFT || indicatorPosition === IdsTabIndicatorPosition.RIGHT)))) {
109
+ throw this._createHostError(`Can not use ${indicatorPosition} indicator position with Horizontal mode`);
110
+ }
111
+ if (isDevMode() && (orientation === IdsOrientation.VERTICAL &&
112
+ (indicatorPosition && (indicatorPosition === IdsTabIndicatorPosition.BOTTOM || indicatorPosition === IdsTabIndicatorPosition.TOP)))) {
113
+ throw this._createHostError(`Can not use ${indicatorPosition} indicator position with Vertical mode`);
114
+ }
115
+ this.selectTab(0);
116
+ }
117
+ selectTab(index) {
118
+ this._selectedTabIndex.set(index);
119
+ const selectedItem = this._items().at(index);
120
+ const selectedPortal = new TemplatePortal(selectedItem.content(), this._viewContainerRef);
121
+ if (this._portalOutlet().hasAttached()) {
122
+ this._portalOutlet().detach();
123
+ }
124
+ this._portalOutlet().attach(selectedPortal);
125
+ }
126
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsTabGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
127
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", 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 [id]=\"item.id()\"\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 }); }
128
+ }
129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: IdsTabGroupComponent, decorators: [{
130
+ type: Component,
131
+ args: [{ selector: 'ids-tab-group', imports: [
132
+ PortalModule,
133
+ IdsIconComponent,
134
+ ], 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 [id]=\"item.id()\"\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" }]
135
+ }] });
136
+
137
+ /**
138
+ * Generated bundle index. Do not edit.
139
+ */
140
+
141
+ export { IDS_TAB_GROUP_DEFAULT_CONFIG, IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY, IdsTabComponent, IdsTabGroupComponent, IdsTabGroupPosition, IdsTabGroupVariant, IdsTabIndicatorPosition };
142
+ //# 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 = computed<string>(() => `${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 protected _selectedTabIndex = signal<number>(0);\n public selectedTabIndex = this._selectedTabIndex.asReadonly();\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 private _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 [id]=\"item.id()\"\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":";;;;;;;AAAO,MAAM,mBAAmB,GAAG;AACjC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,GAAG,EAAE,KAAK;;;ACHL,MAAM,kBAAkB,GAAG;AAChC,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,KAAK,EAAE,OAAO;;;ACHT,MAAM,uBAAuB,GAAG;AACrC,IAAA,GAAG,EAAE,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