@fundamental-ngx/core 0.43.0-rc.8 → 0.43.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.
Files changed (107) hide show
  1. package/dialog/dialog-container/dialog-container.component.d.ts +4 -2
  2. package/esm2020/button/button.component.mjs +3 -3
  3. package/esm2020/combobox/combobox-mobile/combobox-mobile.component.mjs +3 -3
  4. package/esm2020/combobox/combobox.component.mjs +1 -1
  5. package/esm2020/dialog/dialog-container/dialog-container.component.mjs +8 -2
  6. package/esm2020/dialog/dialog-default/dialog-default.component.mjs +3 -3
  7. package/esm2020/form/form-input-message-group/form-input-message-group.component.mjs +18 -5
  8. package/esm2020/list/list-item/list-item.component.mjs +11 -2
  9. package/esm2020/menu/menu-mobile/menu-mobile.component.mjs +3 -3
  10. package/esm2020/message-box/message-box-container/message-box-container.component.mjs +3 -4
  11. package/esm2020/message-box/message-box-default/message-box-default.component.mjs +3 -3
  12. package/esm2020/multi-combobox/multi-combobox.component.mjs +1 -1
  13. package/esm2020/multi-input/multi-input.component.mjs +1 -1
  14. package/esm2020/popover/base/base-popover.class.mjs +4 -2
  15. package/esm2020/popover/popover-body/popover-body.component.mjs +12 -2
  16. package/esm2020/popover/popover-service/popover.service.mjs +12 -2
  17. package/esm2020/popover/popover.component.mjs +5 -2
  18. package/esm2020/scrollbar/scrollbar.directive.mjs +6 -2
  19. package/esm2020/select/select.component.mjs +3 -3
  20. package/esm2020/step-input/step-input.component.mjs +1 -1
  21. package/esm2020/switch/switch.component.mjs +11 -3
  22. package/esm2020/tabs/tab-list.component.mjs +9 -2
  23. package/esm2020/tabs/tab-panel/tab-panel.component.mjs +7 -1
  24. package/esm2020/token/tokenizer.component.mjs +1 -1
  25. package/esm2020/wizard/wizard.module.mjs +5 -3
  26. package/fesm2015/fundamental-ngx-core-button.mjs +2 -2
  27. package/fesm2015/fundamental-ngx-core-button.mjs.map +1 -1
  28. package/fesm2015/fundamental-ngx-core-combobox.mjs +3 -3
  29. package/fesm2015/fundamental-ngx-core-combobox.mjs.map +1 -1
  30. package/fesm2015/fundamental-ngx-core-dialog.mjs +9 -3
  31. package/fesm2015/fundamental-ngx-core-dialog.mjs.map +1 -1
  32. package/fesm2015/fundamental-ngx-core-form.mjs +18 -6
  33. package/fesm2015/fundamental-ngx-core-form.mjs.map +1 -1
  34. package/fesm2015/fundamental-ngx-core-list.mjs +10 -1
  35. package/fesm2015/fundamental-ngx-core-list.mjs.map +1 -1
  36. package/fesm2015/fundamental-ngx-core-menu.mjs +2 -2
  37. package/fesm2015/fundamental-ngx-core-menu.mjs.map +1 -1
  38. package/fesm2015/fundamental-ngx-core-message-box.mjs +3 -4
  39. package/fesm2015/fundamental-ngx-core-message-box.mjs.map +1 -1
  40. package/fesm2015/fundamental-ngx-core-multi-combobox.mjs +1 -1
  41. package/fesm2015/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
  42. package/fesm2015/fundamental-ngx-core-multi-input.mjs +1 -1
  43. package/fesm2015/fundamental-ngx-core-multi-input.mjs.map +1 -1
  44. package/fesm2015/fundamental-ngx-core-popover.mjs +29 -5
  45. package/fesm2015/fundamental-ngx-core-popover.mjs.map +1 -1
  46. package/fesm2015/fundamental-ngx-core-scrollbar.mjs +5 -1
  47. package/fesm2015/fundamental-ngx-core-scrollbar.mjs.map +1 -1
  48. package/fesm2015/fundamental-ngx-core-select.mjs +2 -2
  49. package/fesm2015/fundamental-ngx-core-select.mjs.map +1 -1
  50. package/fesm2015/fundamental-ngx-core-step-input.mjs +1 -1
  51. package/fesm2015/fundamental-ngx-core-step-input.mjs.map +1 -1
  52. package/fesm2015/fundamental-ngx-core-switch.mjs +11 -3
  53. package/fesm2015/fundamental-ngx-core-switch.mjs.map +1 -1
  54. package/fesm2015/fundamental-ngx-core-tabs.mjs +14 -1
  55. package/fesm2015/fundamental-ngx-core-tabs.mjs.map +1 -1
  56. package/fesm2015/fundamental-ngx-core-token.mjs +1 -1
  57. package/fesm2015/fundamental-ngx-core-token.mjs.map +1 -1
  58. package/fesm2015/fundamental-ngx-core-wizard.mjs +66 -65
  59. package/fesm2015/fundamental-ngx-core-wizard.mjs.map +1 -1
  60. package/fesm2020/fundamental-ngx-core-button.mjs +2 -2
  61. package/fesm2020/fundamental-ngx-core-button.mjs.map +1 -1
  62. package/fesm2020/fundamental-ngx-core-combobox.mjs +3 -3
  63. package/fesm2020/fundamental-ngx-core-combobox.mjs.map +1 -1
  64. package/fesm2020/fundamental-ngx-core-dialog.mjs +9 -3
  65. package/fesm2020/fundamental-ngx-core-dialog.mjs.map +1 -1
  66. package/fesm2020/fundamental-ngx-core-form.mjs +18 -6
  67. package/fesm2020/fundamental-ngx-core-form.mjs.map +1 -1
  68. package/fesm2020/fundamental-ngx-core-list.mjs +10 -1
  69. package/fesm2020/fundamental-ngx-core-list.mjs.map +1 -1
  70. package/fesm2020/fundamental-ngx-core-menu.mjs +2 -2
  71. package/fesm2020/fundamental-ngx-core-menu.mjs.map +1 -1
  72. package/fesm2020/fundamental-ngx-core-message-box.mjs +3 -4
  73. package/fesm2020/fundamental-ngx-core-message-box.mjs.map +1 -1
  74. package/fesm2020/fundamental-ngx-core-multi-combobox.mjs +1 -1
  75. package/fesm2020/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
  76. package/fesm2020/fundamental-ngx-core-multi-input.mjs +1 -1
  77. package/fesm2020/fundamental-ngx-core-multi-input.mjs.map +1 -1
  78. package/fesm2020/fundamental-ngx-core-popover.mjs +29 -5
  79. package/fesm2020/fundamental-ngx-core-popover.mjs.map +1 -1
  80. package/fesm2020/fundamental-ngx-core-scrollbar.mjs +5 -1
  81. package/fesm2020/fundamental-ngx-core-scrollbar.mjs.map +1 -1
  82. package/fesm2020/fundamental-ngx-core-select.mjs +2 -2
  83. package/fesm2020/fundamental-ngx-core-select.mjs.map +1 -1
  84. package/fesm2020/fundamental-ngx-core-step-input.mjs +1 -1
  85. package/fesm2020/fundamental-ngx-core-step-input.mjs.map +1 -1
  86. package/fesm2020/fundamental-ngx-core-switch.mjs +11 -3
  87. package/fesm2020/fundamental-ngx-core-switch.mjs.map +1 -1
  88. package/fesm2020/fundamental-ngx-core-tabs.mjs +14 -1
  89. package/fesm2020/fundamental-ngx-core-tabs.mjs.map +1 -1
  90. package/fesm2020/fundamental-ngx-core-token.mjs +1 -1
  91. package/fesm2020/fundamental-ngx-core-token.mjs.map +1 -1
  92. package/fesm2020/fundamental-ngx-core-wizard.mjs +61 -60
  93. package/fesm2020/fundamental-ngx-core-wizard.mjs.map +1 -1
  94. package/form/form-input-message-group/form-input-message-group.component.d.ts +11 -2
  95. package/fundamental-ngx-core-v0.43.0.tgz +0 -0
  96. package/list/list-item/list-item.component.d.ts +5 -1
  97. package/package.json +3 -3
  98. package/popover/base/base-popover.class.d.ts +3 -1
  99. package/popover/popover-body/popover-body.component.d.ts +7 -2
  100. package/popover/popover-service/popover.service.d.ts +2 -0
  101. package/popover/popover.component.d.ts +2 -2
  102. package/schematics/add-dependencies/index.js +4 -4
  103. package/scrollbar/scrollbar.directive.d.ts +2 -0
  104. package/switch/switch.component.d.ts +2 -0
  105. package/tabs/tab-list.component.d.ts +3 -1
  106. package/tabs/tab-panel/tab-panel.component.d.ts +2 -0
  107. package/fundamental-ngx-core-v0.43.0-rc.8.tgz +0 -0
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { isDevMode, EventEmitter, forwardRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, Input, Output, Directive, NgModule } from '@angular/core';
2
+ import { isDevMode, EventEmitter, forwardRef, ElementRef, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, Input, Output, Directive, NgModule } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i3 from '@angular/forms';
@@ -74,9 +74,14 @@ class SwitchComponent {
74
74
  }
75
75
  /** Checked property of the switch. */
76
76
  set isChecked(value) {
77
+ this._switchLabelWrapperEl.nativeElement.classList.remove('fd-switch-no-animate');
77
78
  this.checked = value;
78
79
  this.onChange(value);
79
80
  this.checkedChange.emit(value);
81
+ setTimeout(() => {
82
+ // add the no-animate class after the transition duration, 100ms
83
+ this._switchLabelWrapperEl.nativeElement.classList.add('fd-switch-no-animate');
84
+ }, 100);
80
85
  }
81
86
  get isChecked() {
82
87
  return this.checked;
@@ -121,7 +126,7 @@ SwitchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versio
121
126
  },
122
127
  registerFormItemControl(SwitchComponent),
123
128
  contentDensityObserverProviders()
124
- ], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["switchInput"], descendants: true }], ngImport: i0, template: "<label\n class=\"fd-switch\"\n (click)=\"focus()\"\n [style.cursor]=\"disabled ? 'auto' : 'pointer'\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-switch--semantic]=\"semantic\"\n [class.is-disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n>\n <span *ngIf=\"isChecked ? activeText : inactiveText as text\" class=\"fd-switch__text\">\n {{ text }}\n </span>\n <span class=\"fd-switch__control\">\n <input\n #switchInput\n class=\"fd-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"innerInputId\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [attr.aria-required]=\"required\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-labelledby]=\"ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n [(ngModel)]=\"isChecked\"\n />\n <div class=\"fd-switch__slider\">\n <div class=\"fd-switch__track\" aria-hidden=\"true\">\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon fd-switch__icon--on sap-icon--accept\"\n ></i>\n <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon--off fd-switch__icon sap-icon--decline\"\n ></i>\n </div>\n\n <span *ngIf=\"semantic\" [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n {{\n checked\n ? semanticAcceptLabel || ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n : semanticDeclineLabel || ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n }}\n </span>\n </div>\n </span>\n</label>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n *//*!\n.fd-switch+(--no-border)\n .fd-switch__content+()\n .fd-switch__title+()\n*/.fd-switch{-webkit-box-sizing:border-box;-ms-flex-item-align:start;-webkit-box-align:center;-ms-flex-align:center;--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Handle_Offset)*-1),-50%);align-items:center;align-self:flex-start;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:pointer;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;overflow:initial;padding:0;padding:var(--fdSwitch_Padding);position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch:after,.fd-switch:before{box-sizing:inherit;font-size:inherit}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{margin-left:.5rem;margin-right:0}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{cursor:auto}.fd-switch__control{display:inline-block;position:relative}.fd-switch__slider{-webkit-box-sizing:border-box;-webkit-box-sizing:content-box;-webkit-transition:all .1s;-webkit-box-shadow:var(--fdSwitch_Shadow);background-color:var(--fdSwitch_Track_Background);border:0;border:var(--fdSwitch_Border);border-color:var(--fdSwitch_Border_Color);border-radius:var(--fdSwitch_Border_Radius);box-shadow:var(--fdSwitch_Shadow);box-sizing:border-box;box-sizing:content-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdSwitch_Height);line-height:var(--sapContent_LineHeight);margin:0;padding:0;transition:all .1s;width:var(--fdSwitch_Width)}.fd-switch__slider:after,.fd-switch__slider:before{box-sizing:inherit;font-size:inherit}.fd-switch__track{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:all .1s;-webkit-transform:var(--fdSwitch_Track_Offset);align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;min-width:4.25rem;padding:0;position:absolute;top:50%;transform:var(--fdSwitch_Track_Offset);transition:all .1s}.fd-switch__track:after,.fd-switch__track:before{box-sizing:inherit;font-size:inherit}.fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Active_Handle_Offset)*-1),-50%)}.fd-switch__text{-webkit-box-sizing:border-box;align-self:flex-start;align-self:auto;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:inherit;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;padding:0;position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch__text:after,.fd-switch__text:before{box-sizing:inherit;font-size:inherit}.fd-switch__text[dir=rtl],[dir=rtl] .fd-switch__text{margin-left:.5rem;margin-right:0}.fd-switch__icon{position:var(--fdSwitch_Semantic_Icon_Position)}.fd-switch__icon [class*=sap-icon],.fd-switch__icon[class*=sap-icon]{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;align-items:center;display:flex;font-size:var(--fdSwitch_Icon_Size);justify-content:center;line-height:1.375rem;min-width:1.75rem;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__icon--off [class*=sap-icon],.fd-switch__icon--off[class*=sap-icon]{color:var(--fdSwitch_Semantic_Handle_Error_Color);margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch__icon--on [class*=sap-icon],.fd-switch__icon--on[class*=sap-icon]{color:var(--fdSwitch_Semantic_Handle_Success_Color);margin:var(--fdSwitch_Icon_Success_Margin);opacity:0;visibility:hidden}.fd-switch__handle{-webkit-box-sizing:border-box;-webkit-box-sizing:var(--fdSwitch_Slider_Box_Sizing);background-clip:padding-box;background-color:var(--fdSwitch_Handle_Background);border:0;border:var(--fdSwitch_Handle_Border_Width) solid var(--fdSwitch_Handle_Border_Color);border-radius:var(--fdSwitch_Handle_Border_Radius);box-sizing:border-box;box-sizing:var(--fdSwitch_Slider_Box_Sizing);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;min-height:var(--fdSwitch_Handle_Height);min-width:var(--fdSwitch_Handle_Width);padding:0}.fd-switch__handle:after,.fd-switch__handle:before{box-sizing:inherit;font-size:inherit}.fd-switch__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:0;line-height:var(--sapContent_LineHeight);margin:0;opacity:0;padding:0;position:absolute;width:0}.fd-switch__input:after,.fd-switch__input:before{box-sizing:inherit;display:none;font-size:inherit}.fd-switch__input:active,.fd-switch__input:hover{border-color:transparent}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity);pointer-events:none}.fd-switch__input:focus+.fd-switch__slider:before{border-color:var(--sapContent_FocusColor);border-radius:var(--fdSwitch_Focus_Outline_Border_Radius);border-style:var(--sapContent_FocusStyle);border-width:var(--sapContent_FocusWidth);bottom:var(--fdSwitch_Focus_Outline_Vertical_Offset);content:\"\";display:block;left:var(--fdSwitch_Focus_Outline_Horizontal_Offset);position:absolute;right:var(--fdSwitch_Focus_Outline_Horizontal_Offset);top:var(--fdSwitch_Focus_Outline_Vertical_Offset)}.fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--sapButton_Track_Selected_Background);--fdSwitch_Shadow:var(--fdSwitch_Active_Shadow);--fdSwitch_Handle_Background:var(--sapButton_Selected_Background);--fdSwitch_Handle_Border_Color:var(--sapButton_Selected_BorderColor);--fdSwitch_Border_Color:var(--sapButton_Selected_BorderColor)}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off[class*=sap-icon]{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on[class*=sap-icon]{opacity:1;visibility:visible}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Handle_Offset),-50%)}.fd-switch[dir=rtl] .fd-switch__icon--on,[dir=rtl] .fd-switch .fd-switch__icon--on{margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch[dir=rtl] .fd-switch__icon--off,[dir=rtl] .fd-switch .fd-switch__icon--off{margin:var(--fdSwitch_Icon_Success_Margin)}.fd-switch[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Active_Handle_Offset),-50%)}.fd-switch.is-hover,.fd-switch:hover{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Hover_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Background);--fdSwitch_Border_Color:var(--fdSwitch_On_Hover_Slider_Border)}.fd-switch.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Active_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Active_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Active_Background);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Selected_Hover_Border_Color)}.fd-switch[class*=-compact],.fd-switch[class*=-condensed],[class*=-compact] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Padding:var(--fdSwitch_Compact_Padding);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Handle_Width);--fdSwitch_Handle_Height:var(--fdSwitch_Compact_Handle_Height);--fdSwitch_Width:var(--fdSwitch_Compact_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Height);--fdSwitch_Icon_Size:var(--fdSwitch_Compact_Icon_Size);--fdSwitch_Track_Offset:translate(-.8125rem,-50%)}.fd-switch[class*=-compact] .fd-switch__track,.fd-switch[class*=-condensed] .fd-switch__track,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__track,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__track{min-width:3.125rem}.fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Active_Handle_Offset)*-1),-50%)}.fd-switch[class*=-compact][dir=rtl],.fd-switch[class*=-condensed][dir=rtl],[class*=-compact] .fd-switch:not([class*=-cozy])[dir=rtl],[class*=-condensed] .fd-switch:not([class*=-cozy])[dir=rtl],[dir=rtl] .fd-switch[class*=-compact],[dir=rtl] .fd-switch[class*=-condensed],[dir=rtl] [class*=-compact] .fd-switch:not([class*=-cozy]),[dir=rtl] [class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Track_Offset:translate(.8125rem,-50%)}.fd-switch[class*=-compact][dir=rtl] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed][dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy])[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy])[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] [class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] [class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset_Rtl),-50%)}.fd-switch--semantic{--fdSwitch_Width:var(--fdSwitch_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Semantic_Height);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Border_Color);--fdSwitch_Border_Color:var(--sapErrorBorderColor);--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Active_Offset)*-1),-50%);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Success_Box_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Background_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color)}.fd-switch--semantic[class*=-compact],.fd-switch--semantic[class*=-condensed],[class*=-compact] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Semantic_Height);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Handle_Offset),-50%);padding:.1875rem 0}.fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)*-1),-50%)}.fd-switch--semantic.is-hover,.fd-switch--semantic:hover{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Hover_Border_Color);--fdSwitch_Semantic_Handle_Error_Color:var(--fdSwitch_Semantic_Hover_Error_Color);--fdSwitch_Semantic_Handle_Success_Color:var(--fdSwitch_Semantic_Hover_Success_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Error_Border_Color)}.fd-switch--semantic.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Success_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Hover_Border_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Success_Border_Color)}.fd-switch--semantic[dir=rtl],[dir=rtl] .fd-switch--semantic{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Offset),-50%)}.fd-switch--semantic[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Active_Offset),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact],.fd-switch--semantic[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[dir=rtl] .fd-switch--semantic[class*=-compact],[dir=rtl] .fd-switch--semantic[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset),-50%)}.fd-switch-custom{display:block}.fd-switch__invisible-text{display:none!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
129
+ ], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["switchInput"], descendants: true }, { propertyName: "_switchLabelWrapperEl", first: true, predicate: ["switchEl"], descendants: true, read: ElementRef }], ngImport: i0, template: "<label\n class=\"fd-switch fd-switch-no-animate\"\n (click)=\"focus()\"\n [style.cursor]=\"disabled ? 'auto' : 'pointer'\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-switch--semantic]=\"semantic\"\n [class.is-disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n #switchEl\n>\n <span *ngIf=\"isChecked ? activeText : inactiveText as text\" class=\"fd-switch__text\">\n {{ text }}\n </span>\n <span class=\"fd-switch__control\">\n <input\n #switchInput\n class=\"fd-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"innerInputId\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [attr.aria-required]=\"required\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-labelledby]=\"ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n [(ngModel)]=\"isChecked\"\n />\n <div class=\"fd-switch__slider\">\n <div class=\"fd-switch__track\" aria-hidden=\"true\">\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon fd-switch__icon--on sap-icon--accept\"\n ></i>\n <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon--off fd-switch__icon sap-icon--decline\"\n ></i>\n </div>\n\n <span *ngIf=\"semantic\" [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n {{\n checked\n ? semanticAcceptLabel || ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n : semanticDeclineLabel || ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n }}\n </span>\n </div>\n </span>\n</label>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n *//*!\n.fd-switch+(--no-border)\n .fd-switch__content+()\n .fd-switch__title+()\n*/.fd-switch{-webkit-box-sizing:border-box;-ms-flex-item-align:start;-webkit-box-align:center;-ms-flex-align:center;--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Handle_Offset)*-1),-50%);align-items:center;align-self:flex-start;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:pointer;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;overflow:initial;padding:0;padding:var(--fdSwitch_Padding);position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch:after,.fd-switch:before{box-sizing:inherit;font-size:inherit}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{margin-left:.5rem;margin-right:0}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{cursor:auto}.fd-switch__control{display:inline-block;position:relative}.fd-switch__slider{-webkit-box-sizing:border-box;-webkit-box-sizing:content-box;-webkit-transition:all .1s;-webkit-box-shadow:var(--fdSwitch_Shadow);background-color:var(--fdSwitch_Track_Background);border:0;border:var(--fdSwitch_Border);border-color:var(--fdSwitch_Border_Color);border-radius:var(--fdSwitch_Border_Radius);box-shadow:var(--fdSwitch_Shadow);box-sizing:border-box;box-sizing:content-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdSwitch_Height);line-height:var(--sapContent_LineHeight);margin:0;padding:0;transition:all .1s;width:var(--fdSwitch_Width)}.fd-switch__slider:after,.fd-switch__slider:before{box-sizing:inherit;font-size:inherit}.fd-switch__track{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:all .1s;-webkit-transform:var(--fdSwitch_Track_Offset);align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;min-width:4.25rem;padding:0;position:absolute;top:50%;transform:var(--fdSwitch_Track_Offset);transition:all .1s}.fd-switch__track:after,.fd-switch__track:before{box-sizing:inherit;font-size:inherit}.fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Active_Handle_Offset)*-1),-50%)}.fd-switch__text{-webkit-box-sizing:border-box;align-self:flex-start;align-self:auto;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:inherit;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;padding:0;position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch__text:after,.fd-switch__text:before{box-sizing:inherit;font-size:inherit}.fd-switch__text[dir=rtl],[dir=rtl] .fd-switch__text{margin-left:.5rem;margin-right:0}.fd-switch__icon{position:var(--fdSwitch_Semantic_Icon_Position)}.fd-switch__icon [class*=sap-icon],.fd-switch__icon[class*=sap-icon]{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;align-items:center;display:flex;font-size:var(--fdSwitch_Icon_Size);justify-content:center;line-height:1.375rem;min-width:1.75rem;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__icon--off [class*=sap-icon],.fd-switch__icon--off[class*=sap-icon]{color:var(--fdSwitch_Semantic_Handle_Error_Color);margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch__icon--on [class*=sap-icon],.fd-switch__icon--on[class*=sap-icon]{color:var(--fdSwitch_Semantic_Handle_Success_Color);margin:var(--fdSwitch_Icon_Success_Margin);opacity:0;visibility:hidden}.fd-switch__handle{-webkit-box-sizing:border-box;-webkit-box-sizing:var(--fdSwitch_Slider_Box_Sizing);background-clip:padding-box;background-color:var(--fdSwitch_Handle_Background);border:0;border:var(--fdSwitch_Handle_Border_Width) solid var(--fdSwitch_Handle_Border_Color);border-radius:var(--fdSwitch_Handle_Border_Radius);box-sizing:border-box;box-sizing:var(--fdSwitch_Slider_Box_Sizing);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;min-height:var(--fdSwitch_Handle_Height);min-width:var(--fdSwitch_Handle_Width);padding:0}.fd-switch__handle:after,.fd-switch__handle:before{box-sizing:inherit;font-size:inherit}.fd-switch__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:0;line-height:var(--sapContent_LineHeight);margin:0;opacity:0;padding:0;position:absolute;width:0}.fd-switch__input:after,.fd-switch__input:before{box-sizing:inherit;display:none;font-size:inherit}.fd-switch__input:active,.fd-switch__input:hover{border-color:transparent}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity);pointer-events:none}.fd-switch__input:focus+.fd-switch__slider:before{border-color:var(--sapContent_FocusColor);border-radius:var(--fdSwitch_Focus_Outline_Border_Radius);border-style:var(--sapContent_FocusStyle);border-width:var(--sapContent_FocusWidth);bottom:var(--fdSwitch_Focus_Outline_Vertical_Offset);content:\"\";display:block;left:var(--fdSwitch_Focus_Outline_Horizontal_Offset);position:absolute;right:var(--fdSwitch_Focus_Outline_Horizontal_Offset);top:var(--fdSwitch_Focus_Outline_Vertical_Offset)}.fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--sapButton_Track_Selected_Background);--fdSwitch_Shadow:var(--fdSwitch_Active_Shadow);--fdSwitch_Handle_Background:var(--sapButton_Selected_Background);--fdSwitch_Handle_Border_Color:var(--sapButton_Selected_BorderColor);--fdSwitch_Border_Color:var(--sapButton_Selected_BorderColor)}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off[class*=sap-icon]{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on[class*=sap-icon]{opacity:1;visibility:visible}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Handle_Offset),-50%)}.fd-switch[dir=rtl] .fd-switch__icon--on,[dir=rtl] .fd-switch .fd-switch__icon--on{margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch[dir=rtl] .fd-switch__icon--off,[dir=rtl] .fd-switch .fd-switch__icon--off{margin:var(--fdSwitch_Icon_Success_Margin)}.fd-switch[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Active_Handle_Offset),-50%)}.fd-switch.is-hover,.fd-switch:hover{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Hover_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Background);--fdSwitch_Border_Color:var(--fdSwitch_On_Hover_Slider_Border)}.fd-switch.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Active_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Active_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Active_Background);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Selected_Hover_Border_Color)}.fd-switch[class*=-compact],.fd-switch[class*=-condensed],[class*=-compact] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Padding:var(--fdSwitch_Compact_Padding);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Handle_Width);--fdSwitch_Handle_Height:var(--fdSwitch_Compact_Handle_Height);--fdSwitch_Width:var(--fdSwitch_Compact_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Height);--fdSwitch_Icon_Size:var(--fdSwitch_Compact_Icon_Size);--fdSwitch_Track_Offset:translate(-.8125rem,-50%)}.fd-switch[class*=-compact] .fd-switch__track,.fd-switch[class*=-condensed] .fd-switch__track,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__track,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__track{min-width:3.125rem}.fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Active_Handle_Offset)*-1),-50%)}.fd-switch[class*=-compact][dir=rtl],.fd-switch[class*=-condensed][dir=rtl],[class*=-compact] .fd-switch:not([class*=-cozy])[dir=rtl],[class*=-condensed] .fd-switch:not([class*=-cozy])[dir=rtl],[dir=rtl] .fd-switch[class*=-compact],[dir=rtl] .fd-switch[class*=-condensed],[dir=rtl] [class*=-compact] .fd-switch:not([class*=-cozy]),[dir=rtl] [class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Track_Offset:translate(.8125rem,-50%)}.fd-switch[class*=-compact][dir=rtl] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed][dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy])[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy])[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] [class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] [class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset_Rtl),-50%)}.fd-switch--semantic{--fdSwitch_Width:var(--fdSwitch_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Semantic_Height);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Border_Color);--fdSwitch_Border_Color:var(--sapErrorBorderColor);--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Active_Offset)*-1),-50%);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Success_Box_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Background_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color)}.fd-switch--semantic[class*=-compact],.fd-switch--semantic[class*=-condensed],[class*=-compact] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Semantic_Height);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Handle_Offset),-50%);padding:.1875rem 0}.fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)*-1),-50%)}.fd-switch--semantic.is-hover,.fd-switch--semantic:hover{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Hover_Border_Color);--fdSwitch_Semantic_Handle_Error_Color:var(--fdSwitch_Semantic_Hover_Error_Color);--fdSwitch_Semantic_Handle_Success_Color:var(--fdSwitch_Semantic_Hover_Success_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Error_Border_Color)}.fd-switch--semantic.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Success_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Hover_Border_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Success_Border_Color)}.fd-switch--semantic[dir=rtl],[dir=rtl] .fd-switch--semantic{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Offset),-50%)}.fd-switch--semantic[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Active_Offset),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact],.fd-switch--semantic[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[dir=rtl] .fd-switch--semantic[class*=-compact],[dir=rtl] .fd-switch--semantic[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset),-50%)}.fd-switch-custom{display:block}.fd-switch__invisible-text{display:none!important}.fd-switch-no-animate *{transition:none!important}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
125
130
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SwitchComponent, decorators: [{
126
131
  type: Component,
127
132
  args: [{ selector: 'fd-switch', providers: [
@@ -136,7 +141,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
136
141
  class: 'fd-form__item fd-form__item--check fd-switch-custom',
137
142
  '[attr.id]': 'id',
138
143
  '(focusout)': 'onTouched()'
139
- }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<label\n class=\"fd-switch\"\n (click)=\"focus()\"\n [style.cursor]=\"disabled ? 'auto' : 'pointer'\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-switch--semantic]=\"semantic\"\n [class.is-disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n>\n <span *ngIf=\"isChecked ? activeText : inactiveText as text\" class=\"fd-switch__text\">\n {{ text }}\n </span>\n <span class=\"fd-switch__control\">\n <input\n #switchInput\n class=\"fd-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"innerInputId\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [attr.aria-required]=\"required\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-labelledby]=\"ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n [(ngModel)]=\"isChecked\"\n />\n <div class=\"fd-switch__slider\">\n <div class=\"fd-switch__track\" aria-hidden=\"true\">\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon fd-switch__icon--on sap-icon--accept\"\n ></i>\n <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon--off fd-switch__icon sap-icon--decline\"\n ></i>\n </div>\n\n <span *ngIf=\"semantic\" [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n {{\n checked\n ? semanticAcceptLabel || ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n : semanticDeclineLabel || ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n }}\n </span>\n </div>\n </span>\n</label>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n *//*!\n.fd-switch+(--no-border)\n .fd-switch__content+()\n .fd-switch__title+()\n*/.fd-switch{-webkit-box-sizing:border-box;-ms-flex-item-align:start;-webkit-box-align:center;-ms-flex-align:center;--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Handle_Offset)*-1),-50%);align-items:center;align-self:flex-start;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:pointer;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;overflow:initial;padding:0;padding:var(--fdSwitch_Padding);position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch:after,.fd-switch:before{box-sizing:inherit;font-size:inherit}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{margin-left:.5rem;margin-right:0}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{cursor:auto}.fd-switch__control{display:inline-block;position:relative}.fd-switch__slider{-webkit-box-sizing:border-box;-webkit-box-sizing:content-box;-webkit-transition:all .1s;-webkit-box-shadow:var(--fdSwitch_Shadow);background-color:var(--fdSwitch_Track_Background);border:0;border:var(--fdSwitch_Border);border-color:var(--fdSwitch_Border_Color);border-radius:var(--fdSwitch_Border_Radius);box-shadow:var(--fdSwitch_Shadow);box-sizing:border-box;box-sizing:content-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdSwitch_Height);line-height:var(--sapContent_LineHeight);margin:0;padding:0;transition:all .1s;width:var(--fdSwitch_Width)}.fd-switch__slider:after,.fd-switch__slider:before{box-sizing:inherit;font-size:inherit}.fd-switch__track{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:all .1s;-webkit-transform:var(--fdSwitch_Track_Offset);align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;min-width:4.25rem;padding:0;position:absolute;top:50%;transform:var(--fdSwitch_Track_Offset);transition:all .1s}.fd-switch__track:after,.fd-switch__track:before{box-sizing:inherit;font-size:inherit}.fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Active_Handle_Offset)*-1),-50%)}.fd-switch__text{-webkit-box-sizing:border-box;align-self:flex-start;align-self:auto;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:inherit;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;padding:0;position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch__text:after,.fd-switch__text:before{box-sizing:inherit;font-size:inherit}.fd-switch__text[dir=rtl],[dir=rtl] .fd-switch__text{margin-left:.5rem;margin-right:0}.fd-switch__icon{position:var(--fdSwitch_Semantic_Icon_Position)}.fd-switch__icon [class*=sap-icon],.fd-switch__icon[class*=sap-icon]{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;align-items:center;display:flex;font-size:var(--fdSwitch_Icon_Size);justify-content:center;line-height:1.375rem;min-width:1.75rem;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__icon--off [class*=sap-icon],.fd-switch__icon--off[class*=sap-icon]{color:var(--fdSwitch_Semantic_Handle_Error_Color);margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch__icon--on [class*=sap-icon],.fd-switch__icon--on[class*=sap-icon]{color:var(--fdSwitch_Semantic_Handle_Success_Color);margin:var(--fdSwitch_Icon_Success_Margin);opacity:0;visibility:hidden}.fd-switch__handle{-webkit-box-sizing:border-box;-webkit-box-sizing:var(--fdSwitch_Slider_Box_Sizing);background-clip:padding-box;background-color:var(--fdSwitch_Handle_Background);border:0;border:var(--fdSwitch_Handle_Border_Width) solid var(--fdSwitch_Handle_Border_Color);border-radius:var(--fdSwitch_Handle_Border_Radius);box-sizing:border-box;box-sizing:var(--fdSwitch_Slider_Box_Sizing);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;min-height:var(--fdSwitch_Handle_Height);min-width:var(--fdSwitch_Handle_Width);padding:0}.fd-switch__handle:after,.fd-switch__handle:before{box-sizing:inherit;font-size:inherit}.fd-switch__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:0;line-height:var(--sapContent_LineHeight);margin:0;opacity:0;padding:0;position:absolute;width:0}.fd-switch__input:after,.fd-switch__input:before{box-sizing:inherit;display:none;font-size:inherit}.fd-switch__input:active,.fd-switch__input:hover{border-color:transparent}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity);pointer-events:none}.fd-switch__input:focus+.fd-switch__slider:before{border-color:var(--sapContent_FocusColor);border-radius:var(--fdSwitch_Focus_Outline_Border_Radius);border-style:var(--sapContent_FocusStyle);border-width:var(--sapContent_FocusWidth);bottom:var(--fdSwitch_Focus_Outline_Vertical_Offset);content:\"\";display:block;left:var(--fdSwitch_Focus_Outline_Horizontal_Offset);position:absolute;right:var(--fdSwitch_Focus_Outline_Horizontal_Offset);top:var(--fdSwitch_Focus_Outline_Vertical_Offset)}.fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--sapButton_Track_Selected_Background);--fdSwitch_Shadow:var(--fdSwitch_Active_Shadow);--fdSwitch_Handle_Background:var(--sapButton_Selected_Background);--fdSwitch_Handle_Border_Color:var(--sapButton_Selected_BorderColor);--fdSwitch_Border_Color:var(--sapButton_Selected_BorderColor)}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off[class*=sap-icon]{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on[class*=sap-icon]{opacity:1;visibility:visible}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Handle_Offset),-50%)}.fd-switch[dir=rtl] .fd-switch__icon--on,[dir=rtl] .fd-switch .fd-switch__icon--on{margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch[dir=rtl] .fd-switch__icon--off,[dir=rtl] .fd-switch .fd-switch__icon--off{margin:var(--fdSwitch_Icon_Success_Margin)}.fd-switch[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Active_Handle_Offset),-50%)}.fd-switch.is-hover,.fd-switch:hover{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Hover_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Background);--fdSwitch_Border_Color:var(--fdSwitch_On_Hover_Slider_Border)}.fd-switch.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Active_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Active_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Active_Background);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Selected_Hover_Border_Color)}.fd-switch[class*=-compact],.fd-switch[class*=-condensed],[class*=-compact] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Padding:var(--fdSwitch_Compact_Padding);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Handle_Width);--fdSwitch_Handle_Height:var(--fdSwitch_Compact_Handle_Height);--fdSwitch_Width:var(--fdSwitch_Compact_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Height);--fdSwitch_Icon_Size:var(--fdSwitch_Compact_Icon_Size);--fdSwitch_Track_Offset:translate(-.8125rem,-50%)}.fd-switch[class*=-compact] .fd-switch__track,.fd-switch[class*=-condensed] .fd-switch__track,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__track,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__track{min-width:3.125rem}.fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Active_Handle_Offset)*-1),-50%)}.fd-switch[class*=-compact][dir=rtl],.fd-switch[class*=-condensed][dir=rtl],[class*=-compact] .fd-switch:not([class*=-cozy])[dir=rtl],[class*=-condensed] .fd-switch:not([class*=-cozy])[dir=rtl],[dir=rtl] .fd-switch[class*=-compact],[dir=rtl] .fd-switch[class*=-condensed],[dir=rtl] [class*=-compact] .fd-switch:not([class*=-cozy]),[dir=rtl] [class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Track_Offset:translate(.8125rem,-50%)}.fd-switch[class*=-compact][dir=rtl] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed][dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy])[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy])[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] [class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] [class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset_Rtl),-50%)}.fd-switch--semantic{--fdSwitch_Width:var(--fdSwitch_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Semantic_Height);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Border_Color);--fdSwitch_Border_Color:var(--sapErrorBorderColor);--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Active_Offset)*-1),-50%);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Success_Box_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Background_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color)}.fd-switch--semantic[class*=-compact],.fd-switch--semantic[class*=-condensed],[class*=-compact] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Semantic_Height);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Handle_Offset),-50%);padding:.1875rem 0}.fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)*-1),-50%)}.fd-switch--semantic.is-hover,.fd-switch--semantic:hover{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Hover_Border_Color);--fdSwitch_Semantic_Handle_Error_Color:var(--fdSwitch_Semantic_Hover_Error_Color);--fdSwitch_Semantic_Handle_Success_Color:var(--fdSwitch_Semantic_Hover_Success_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Error_Border_Color)}.fd-switch--semantic.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Success_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Hover_Border_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Success_Border_Color)}.fd-switch--semantic[dir=rtl],[dir=rtl] .fd-switch--semantic{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Offset),-50%)}.fd-switch--semantic[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Active_Offset),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact],.fd-switch--semantic[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[dir=rtl] .fd-switch--semantic[class*=-compact],[dir=rtl] .fd-switch--semantic[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset),-50%)}.fd-switch-custom{display:block}.fd-switch__invisible-text{display:none!important}\n"] }]
144
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<label\n class=\"fd-switch fd-switch-no-animate\"\n (click)=\"focus()\"\n [style.cursor]=\"disabled ? 'auto' : 'pointer'\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-switch--semantic]=\"semantic\"\n [class.is-disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n #switchEl\n>\n <span *ngIf=\"isChecked ? activeText : inactiveText as text\" class=\"fd-switch__text\">\n {{ text }}\n </span>\n <span class=\"fd-switch__control\">\n <input\n #switchInput\n class=\"fd-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"innerInputId\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [attr.aria-required]=\"required\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-labelledby]=\"ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n [(ngModel)]=\"isChecked\"\n />\n <div class=\"fd-switch__slider\">\n <div class=\"fd-switch__track\" aria-hidden=\"true\">\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon fd-switch__icon--on sap-icon--accept\"\n ></i>\n <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon--off fd-switch__icon sap-icon--decline\"\n ></i>\n </div>\n\n <span *ngIf=\"semantic\" [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n {{\n checked\n ? semanticAcceptLabel || ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n : semanticDeclineLabel || ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n }}\n </span>\n </div>\n </span>\n</label>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n *//*!\n.fd-switch+(--no-border)\n .fd-switch__content+()\n .fd-switch__title+()\n*/.fd-switch{-webkit-box-sizing:border-box;-ms-flex-item-align:start;-webkit-box-align:center;-ms-flex-align:center;--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Handle_Offset)*-1),-50%);align-items:center;align-self:flex-start;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:pointer;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;overflow:initial;padding:0;padding:var(--fdSwitch_Padding);position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch:after,.fd-switch:before{box-sizing:inherit;font-size:inherit}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{margin-left:.5rem;margin-right:0}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{cursor:auto}.fd-switch__control{display:inline-block;position:relative}.fd-switch__slider{-webkit-box-sizing:border-box;-webkit-box-sizing:content-box;-webkit-transition:all .1s;-webkit-box-shadow:var(--fdSwitch_Shadow);background-color:var(--fdSwitch_Track_Background);border:0;border:var(--fdSwitch_Border);border-color:var(--fdSwitch_Border_Color);border-radius:var(--fdSwitch_Border_Radius);box-shadow:var(--fdSwitch_Shadow);box-sizing:border-box;box-sizing:content-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdSwitch_Height);line-height:var(--sapContent_LineHeight);margin:0;padding:0;transition:all .1s;width:var(--fdSwitch_Width)}.fd-switch__slider:after,.fd-switch__slider:before{box-sizing:inherit;font-size:inherit}.fd-switch__track{-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:all .1s;-webkit-transform:var(--fdSwitch_Track_Offset);align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;min-width:4.25rem;padding:0;position:absolute;top:50%;transform:var(--fdSwitch_Track_Offset);transition:all .1s}.fd-switch__track:after,.fd-switch__track:before{box-sizing:inherit;font-size:inherit}.fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Active_Handle_Offset)*-1),-50%)}.fd-switch__text{-webkit-box-sizing:border-box;align-self:flex-start;align-self:auto;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);cursor:text;cursor:inherit;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 .5rem 0 0;max-width:100%;overflow:hidden;padding:0;position:relative;text-overflow:ellipsis;white-space:nowrap;width:-moz-fit-content;width:fit-content}.fd-switch__text:after,.fd-switch__text:before{box-sizing:inherit;font-size:inherit}.fd-switch__text[dir=rtl],[dir=rtl] .fd-switch__text{margin-left:.5rem;margin-right:0}.fd-switch__icon{position:var(--fdSwitch_Semantic_Icon_Position)}.fd-switch__icon [class*=sap-icon],.fd-switch__icon[class*=sap-icon]{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-align:center;-ms-flex-align:center;-webkit-transition:visibility 0s ease .03s,opacity 0s ease .03s;align-items:center;display:flex;font-size:var(--fdSwitch_Icon_Size);justify-content:center;line-height:1.375rem;min-width:1.75rem;transition:visibility 0s ease .03s,opacity 0s ease .03s;width:1.75rem}.fd-switch__icon--off [class*=sap-icon],.fd-switch__icon--off[class*=sap-icon]{color:var(--fdSwitch_Semantic_Handle_Error_Color);margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch__icon--on [class*=sap-icon],.fd-switch__icon--on[class*=sap-icon]{color:var(--fdSwitch_Semantic_Handle_Success_Color);margin:var(--fdSwitch_Icon_Success_Margin);opacity:0;visibility:hidden}.fd-switch__handle{-webkit-box-sizing:border-box;-webkit-box-sizing:var(--fdSwitch_Slider_Box_Sizing);background-clip:padding-box;background-color:var(--fdSwitch_Handle_Background);border:0;border:var(--fdSwitch_Handle_Border_Width) solid var(--fdSwitch_Handle_Border_Color);border-radius:var(--fdSwitch_Handle_Border_Radius);box-sizing:border-box;box-sizing:var(--fdSwitch_Slider_Box_Sizing);color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;min-height:var(--fdSwitch_Handle_Height);min-width:var(--fdSwitch_Handle_Width);padding:0}.fd-switch__handle:after,.fd-switch__handle:before{box-sizing:inherit;font-size:inherit}.fd-switch__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:0;line-height:var(--sapContent_LineHeight);margin:0;opacity:0;padding:0;position:absolute;width:0}.fd-switch__input:after,.fd-switch__input:before{box-sizing:inherit;display:none;font-size:inherit}.fd-switch__input:active,.fd-switch__input:hover{border-color:transparent}.fd-switch.is-disabled,.fd-switch:disabled,.fd-switch[aria-disabled=true]{opacity:var(--sapContent_DisabledOpacity);pointer-events:none}.fd-switch__input:focus+.fd-switch__slider:before{border-color:var(--sapContent_FocusColor);border-radius:var(--fdSwitch_Focus_Outline_Border_Radius);border-style:var(--sapContent_FocusStyle);border-width:var(--sapContent_FocusWidth);bottom:var(--fdSwitch_Focus_Outline_Vertical_Offset);content:\"\";display:block;left:var(--fdSwitch_Focus_Outline_Horizontal_Offset);position:absolute;right:var(--fdSwitch_Focus_Outline_Horizontal_Offset);top:var(--fdSwitch_Focus_Outline_Vertical_Offset)}.fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--sapButton_Track_Selected_Background);--fdSwitch_Shadow:var(--fdSwitch_Active_Shadow);--fdSwitch_Handle_Background:var(--sapButton_Selected_Background);--fdSwitch_Handle_Border_Color:var(--sapButton_Selected_BorderColor);--fdSwitch_Border_Color:var(--sapButton_Selected_BorderColor)}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--off[class*=sap-icon]{opacity:0;visibility:hidden}.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on [class*=sap-icon],.fd-switch__input:checked+.fd-switch__slider .fd-switch__icon--on[class*=sap-icon]{opacity:1;visibility:visible}.fd-switch[dir=rtl],[dir=rtl] .fd-switch{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Handle_Offset),-50%)}.fd-switch[dir=rtl] .fd-switch__icon--on,[dir=rtl] .fd-switch .fd-switch__icon--on{margin:var(--fdSwitch_Icon_Error_Margin)}.fd-switch[dir=rtl] .fd-switch__icon--off,[dir=rtl] .fd-switch .fd-switch__icon--off{margin:var(--fdSwitch_Icon_Success_Margin)}.fd-switch[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Active_Handle_Offset),-50%)}.fd-switch.is-hover,.fd-switch:hover{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Hover_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Background);--fdSwitch_Border_Color:var(--fdSwitch_On_Hover_Slider_Border)}.fd-switch.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_On_Hover_Slider_Active_Background);--fdSwitch_Shadow:var(--fdSwitch_On_Hover_Slider_Active_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Hover_Handle_Active_Background);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Handle_Selected_Hover_Border_Color)}.fd-switch[class*=-compact],.fd-switch[class*=-condensed],[class*=-compact] .fd-switch:not([class*=-cozy]),[class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Padding:var(--fdSwitch_Compact_Padding);--fdSwitch_Handle_Width:var(--fdSwitch_Compact_Handle_Width);--fdSwitch_Handle_Height:var(--fdSwitch_Compact_Handle_Height);--fdSwitch_Width:var(--fdSwitch_Compact_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Height);--fdSwitch_Icon_Size:var(--fdSwitch_Compact_Icon_Size);--fdSwitch_Track_Offset:translate(-.8125rem,-50%)}.fd-switch[class*=-compact] .fd-switch__track,.fd-switch[class*=-condensed] .fd-switch__track,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__track,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__track{min-width:3.125rem}.fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Active_Handle_Offset)*-1),-50%)}.fd-switch[class*=-compact][dir=rtl],.fd-switch[class*=-condensed][dir=rtl],[class*=-compact] .fd-switch:not([class*=-cozy])[dir=rtl],[class*=-condensed] .fd-switch:not([class*=-cozy])[dir=rtl],[dir=rtl] .fd-switch[class*=-compact],[dir=rtl] .fd-switch[class*=-condensed],[dir=rtl] [class*=-compact] .fd-switch:not([class*=-cozy]),[dir=rtl] [class*=-condensed] .fd-switch:not([class*=-cozy]){--fdSwitch_Track_Offset:translate(.8125rem,-50%)}.fd-switch[class*=-compact][dir=rtl] .fd-switch__input:checked+.fd-switch__slider,.fd-switch[class*=-condensed][dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch:not([class*=-cozy])[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch:not([class*=-cozy])[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] [class*=-compact] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] [class*=-condensed] .fd-switch:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset_Rtl),-50%)}.fd-switch--semantic{--fdSwitch_Width:var(--fdSwitch_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Semantic_Height);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Border_Color);--fdSwitch_Border_Color:var(--sapErrorBorderColor);--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Semantic_Handle_Active_Offset)*-1),-50%);--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Success_Box_Shadow);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Background_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Border_Color)}.fd-switch--semantic[class*=-compact],.fd-switch--semantic[class*=-condensed],[class*=-compact] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]){--fdSwitch_Width:var(--fdSwitch_Compact_Semantic_Width);--fdSwitch_Height:var(--fdSwitch_Compact_Semantic_Height);--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Handle_Offset),-50%);padding:.1875rem 0}.fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset)*-1),-50%)}.fd-switch--semantic.is-hover,.fd-switch--semantic:hover{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Error_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Error_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Error_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Error_Handle_Hover_Border_Color);--fdSwitch_Semantic_Handle_Error_Color:var(--fdSwitch_Semantic_Hover_Error_Color);--fdSwitch_Semantic_Handle_Success_Color:var(--fdSwitch_Semantic_Hover_Success_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Error_Border_Color)}.fd-switch--semantic.is-hover .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic:hover .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Background:var(--fdSwitch_Semantic_Hover_Success_Background_Color);--fdSwitch_Shadow:var(--fdSwitch_Semantic_Hover_Success_Box_Shadow);--fdSwitch_Handle_Background:var(--fdSwitch_Semantic_Success_Handle_Hover_Background_Color);--fdSwitch_Handle_Border_Color:var(--fdSwitch_Semantic_Success_Handle_Hover_Border_Color);--fdSwitch_Border_Color:var(--fdSwitch_Semantic_Hover_Success_Border_Color)}.fd-switch--semantic[dir=rtl],[dir=rtl] .fd-switch--semantic{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Offset),-50%)}.fd-switch--semantic[dir=rtl] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Semantic_Handle_Active_Offset),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact],.fd-switch--semantic[dir=rtl][class*=-condensed],[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]),[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]),[dir=rtl] .fd-switch--semantic[class*=-compact],[dir=rtl] .fd-switch--semantic[class*=-condensed]{--fdSwitch_Track_Offset:translate(calc(var(--fdSwitch_Compact_Semantic_Handle_Offset)*-1),-50%)}.fd-switch--semantic[dir=rtl][class*=-compact] .fd-switch__input:checked+.fd-switch__slider,.fd-switch--semantic[dir=rtl][class*=-condensed] .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-compact] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] .fd-switch--semantic[dir=rtl]:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[class*=-condensed] [dir=rtl] .fd-switch--semantic:not([class*=-cozy]) .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-compact] .fd-switch__input:checked+.fd-switch__slider,[dir=rtl] .fd-switch--semantic[class*=-condensed] .fd-switch__input:checked+.fd-switch__slider{--fdSwitch_Track_Offset:translate(var(--fdSwitch_Compact_Semantic_Active_Handle_Offset),-50%)}.fd-switch-custom{display:block}.fd-switch__invisible-text{display:none!important}.fd-switch-no-animate *{transition:none!important}\n"] }]
140
145
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.ContentDensityObserver }]; }, propDecorators: { inputElement: [{
141
146
  type: ViewChild,
142
147
  args: ['switchInput']
@@ -168,6 +173,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
168
173
  type: Input
169
174
  }], checkedChange: [{
170
175
  type: Output
176
+ }], _switchLabelWrapperEl: [{
177
+ type: ViewChild,
178
+ args: ['switchEl', { read: ElementRef }]
171
179
  }] } });
172
180
 
173
181
  class DeprecatedSwitchCompactDirective extends DeprecatedCompactDirective {
@@ -1 +1 @@
1
- {"version":3,"file":"fundamental-ngx-core-switch.mjs","sources":["../../../../libs/core/src/lib/switch/switch.component.ts","../../../../libs/core/src/lib/switch/switch.component.html","../../../../libs/core/src/lib/switch/deprecated-switch-compact.directive.ts","../../../../libs/core/src/lib/switch/switch.module.ts","../../../../libs/core/src/lib/switch/fundamental-ngx-core-switch.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n isDevMode,\n OnDestroy,\n Output,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { Nullable } from '@fundamental-ngx/cdk/utils';\nimport { FormItemControl, registerFormItemControl } from '@fundamental-ngx/core/form';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\n\nlet switchUniqueId = 0;\nlet warnedAboutAriaLabeledBy = false;\n\n/**\n * The Switch component is used to activate or deactivate an element.\n * It uses a visual metaphor to inform the user of the state of the switch.\n */\n@Component({\n selector: 'fd-switch',\n templateUrl: './switch.component.html',\n styleUrls: ['./switch.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SwitchComponent),\n multi: true\n },\n registerFormItemControl(SwitchComponent),\n contentDensityObserverProviders()\n ],\n host: {\n class: 'fd-form__item fd-form__item--check fd-switch-custom',\n '[attr.id]': 'id',\n '(focusout)': 'onTouched()'\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SwitchComponent implements ControlValueAccessor, OnDestroy, FormItemControl {\n /** @hidden */\n @ViewChild('switchInput')\n inputElement: ElementRef<HTMLInputElement>;\n\n /** Optional text for the active state of the switch. */\n @Input()\n activeText = '';\n\n /** Optional text for the inactive state of the switch. */\n @Input()\n inactiveText = '';\n\n /** Whether the switch is disabled. */\n @Input()\n disabled = false;\n\n /** Id for the switch component. If omitted, a unique one is generated. */\n @Input()\n id = `fd-switch-${switchUniqueId++}`;\n\n /** Sets input name attribute. */\n @Input()\n name: string;\n\n /** If it is mandatory field */\n @Input()\n required = false;\n\n /** Whether the switch is checked. */\n @Input()\n checked = false;\n\n /** Whether the switch is semantic */\n @Input()\n semantic = false;\n\n /** aria-label attribute of the inner input element. */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** @deprecated renamed to \"ariaLabelledBy\" */\n @Input()\n set ariaLabelledby(value: Nullable<string>) {\n if (isDevMode() && !warnedAboutAriaLabeledBy) {\n console.warn('fd-switch[ariaLabelledby] is deprecated. Use fd-switch[ariaLabelledBy] instead');\n warnedAboutAriaLabeledBy = true;\n }\n this.ariaLabelledBy = value;\n }\n\n /** aria-labelledby attribute of the inner input element. */\n @Input()\n ariaLabelledBy: Nullable<string>;\n\n /**\n * @deprecated use i18n capabilities instead\n * Semantic Label Accept set for Accessibility\n */\n @Input()\n semanticAcceptLabel: string;\n\n /**\n * @deprecated use i18n capabilities instead\n * Semantic Label Decline set for Accessibility\n */\n @Input()\n semanticDeclineLabel: string;\n\n /**\n * Event fired when the state of the switch changes.\n * *$event* can be used to retrieve the new state of the switch.\n */\n @Output()\n readonly checkedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n onChange: (value: boolean) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n constructor(\n private readonly _changeDetectorRef: ChangeDetectorRef,\n readonly _contentDensityObserver: ContentDensityObserver\n ) {}\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** Set focus on the input element. */\n focus(): void {\n this.inputElement.nativeElement.focus();\n }\n\n /** Get the id of the inner input element of the switch. */\n get innerInputId(): string {\n return `${this.id}-input`;\n }\n\n /** Get the id of the semantic label element of the switch. */\n get _semanticLabelId(): string {\n return `${this.id}-semantic-label`;\n }\n\n /** Checked property of the switch. */\n set isChecked(value) {\n this.checked = value;\n this.onChange(value);\n this.checkedChange.emit(value);\n }\n get isChecked(): boolean {\n return this.checked;\n }\n\n /**\n * @hidden\n * @param value Sets the value of the *checked* property of the switch.\n */\n writeValue(value: any): void {\n this.checked = value;\n this._changeDetectorRef.detectChanges();\n }\n\n /**\n * @hidden\n * @param fn User defined function that handles the *onChange* event of the switch.\n */\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n /**\n * @hidden\n * @param fn User defined function that handles the *onTouch* event of the switch.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * @hidden\n * @param isDisabled Sets the value of the *disabled* property of the switch.\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this._changeDetectorRef.detectChanges();\n }\n}\n","<label\n class=\"fd-switch\"\n (click)=\"focus()\"\n [style.cursor]=\"disabled ? 'auto' : 'pointer'\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-switch--semantic]=\"semantic\"\n [class.is-disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n>\n <span *ngIf=\"isChecked ? activeText : inactiveText as text\" class=\"fd-switch__text\">\n {{ text }}\n </span>\n <span class=\"fd-switch__control\">\n <input\n #switchInput\n class=\"fd-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"innerInputId\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [attr.aria-required]=\"required\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-labelledby]=\"ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n [(ngModel)]=\"isChecked\"\n />\n <div class=\"fd-switch__slider\">\n <div class=\"fd-switch__track\" aria-hidden=\"true\">\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon fd-switch__icon--on sap-icon--accept\"\n ></i>\n <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon--off fd-switch__icon sap-icon--decline\"\n ></i>\n </div>\n\n <span *ngIf=\"semantic\" [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n {{\n checked\n ? semanticAcceptLabel || ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n : semanticDeclineLabel || ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n }}\n </span>\n </div>\n </span>\n</label>\n","import { Directive, forwardRef } from '@angular/core';\nimport { CONTENT_DENSITY_DIRECTIVE, DeprecatedCompactDirective } from '@fundamental-ngx/core/content-density';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'fd-switch[compact]',\n providers: [\n {\n provide: CONTENT_DENSITY_DIRECTIVE,\n useExisting: forwardRef(() => DeprecatedSwitchCompactDirective)\n }\n ]\n})\nexport class DeprecatedSwitchCompactDirective extends DeprecatedCompactDirective {\n /** @hidden */\n constructor() {\n super('fd-switch');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SwitchComponent } from './switch.component';\nimport { I18nModule } from '@fundamental-ngx/i18n';\nimport { FormsModule } from '@angular/forms';\nimport { DeprecatedSwitchCompactDirective } from './deprecated-switch-compact.directive';\nimport { ContentDensityModule } from '@fundamental-ngx/core/content-density';\n\n@NgModule({\n declarations: [SwitchComponent, DeprecatedSwitchCompactDirective],\n imports: [CommonModule, FormsModule, ContentDensityModule, I18nModule],\n exports: [SwitchComponent, DeprecatedSwitchCompactDirective, ContentDensityModule]\n})\nexport class SwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;A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AY,EAAE,CAAC,eAAe,EAAE,gCAAgC,CAAC;oBACjE,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,UAAU,CAAC;AACtE,oBAAA,OAAO,EAAE,CAAC,eAAe,EAAE,gCAAgC,EAAE,oBAAoB,CAAC;iBACrF,CAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"fundamental-ngx-core-switch.mjs","sources":["../../../../libs/core/src/lib/switch/switch.component.ts","../../../../libs/core/src/lib/switch/switch.component.html","../../../../libs/core/src/lib/switch/deprecated-switch-compact.directive.ts","../../../../libs/core/src/lib/switch/switch.module.ts","../../../../libs/core/src/lib/switch/fundamental-ngx-core-switch.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n isDevMode,\n OnDestroy,\n Output,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { Nullable } from '@fundamental-ngx/cdk/utils';\nimport { FormItemControl, registerFormItemControl } from '@fundamental-ngx/core/form';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\n\nlet switchUniqueId = 0;\nlet warnedAboutAriaLabeledBy = false;\n\n/**\n * The Switch component is used to activate or deactivate an element.\n * It uses a visual metaphor to inform the user of the state of the switch.\n */\n@Component({\n selector: 'fd-switch',\n templateUrl: './switch.component.html',\n styleUrls: ['./switch.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SwitchComponent),\n multi: true\n },\n registerFormItemControl(SwitchComponent),\n contentDensityObserverProviders()\n ],\n host: {\n class: 'fd-form__item fd-form__item--check fd-switch-custom',\n '[attr.id]': 'id',\n '(focusout)': 'onTouched()'\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SwitchComponent implements ControlValueAccessor, OnDestroy, FormItemControl {\n /** @hidden */\n @ViewChild('switchInput')\n inputElement: ElementRef<HTMLInputElement>;\n\n /** Optional text for the active state of the switch. */\n @Input()\n activeText = '';\n\n /** Optional text for the inactive state of the switch. */\n @Input()\n inactiveText = '';\n\n /** Whether the switch is disabled. */\n @Input()\n disabled = false;\n\n /** Id for the switch component. If omitted, a unique one is generated. */\n @Input()\n id = `fd-switch-${switchUniqueId++}`;\n\n /** Sets input name attribute. */\n @Input()\n name: string;\n\n /** If it is mandatory field */\n @Input()\n required = false;\n\n /** Whether the switch is checked. */\n @Input()\n checked = false;\n\n /** Whether the switch is semantic */\n @Input()\n semantic = false;\n\n /** aria-label attribute of the inner input element. */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** @deprecated renamed to \"ariaLabelledBy\" */\n @Input()\n set ariaLabelledby(value: Nullable<string>) {\n if (isDevMode() && !warnedAboutAriaLabeledBy) {\n console.warn('fd-switch[ariaLabelledby] is deprecated. Use fd-switch[ariaLabelledBy] instead');\n warnedAboutAriaLabeledBy = true;\n }\n this.ariaLabelledBy = value;\n }\n\n /** aria-labelledby attribute of the inner input element. */\n @Input()\n ariaLabelledBy: Nullable<string>;\n\n /**\n * @deprecated use i18n capabilities instead\n * Semantic Label Accept set for Accessibility\n */\n @Input()\n semanticAcceptLabel: string;\n\n /**\n * @deprecated use i18n capabilities instead\n * Semantic Label Decline set for Accessibility\n */\n @Input()\n semanticDeclineLabel: string;\n\n /**\n * Event fired when the state of the switch changes.\n * *$event* can be used to retrieve the new state of the switch.\n */\n @Output()\n readonly checkedChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** @hidden */\n @ViewChild('switchEl', { read: ElementRef })\n _switchLabelWrapperEl: ElementRef;\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n onChange: (value: boolean) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n constructor(\n private readonly _changeDetectorRef: ChangeDetectorRef,\n readonly _contentDensityObserver: ContentDensityObserver\n ) {}\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** Set focus on the input element. */\n focus(): void {\n this.inputElement.nativeElement.focus();\n }\n\n /** Get the id of the inner input element of the switch. */\n get innerInputId(): string {\n return `${this.id}-input`;\n }\n\n /** Get the id of the semantic label element of the switch. */\n get _semanticLabelId(): string {\n return `${this.id}-semantic-label`;\n }\n\n /** Checked property of the switch. */\n set isChecked(value) {\n this._switchLabelWrapperEl.nativeElement.classList.remove('fd-switch-no-animate');\n this.checked = value;\n this.onChange(value);\n this.checkedChange.emit(value);\n setTimeout(() => {\n // add the no-animate class after the transition duration, 100ms\n this._switchLabelWrapperEl.nativeElement.classList.add('fd-switch-no-animate');\n }, 100);\n }\n get isChecked(): boolean {\n return this.checked;\n }\n\n /**\n * @hidden\n * @param value Sets the value of the *checked* property of the switch.\n */\n writeValue(value: any): void {\n this.checked = value;\n this._changeDetectorRef.detectChanges();\n }\n\n /**\n * @hidden\n * @param fn User defined function that handles the *onChange* event of the switch.\n */\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n /**\n * @hidden\n * @param fn User defined function that handles the *onTouch* event of the switch.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * @hidden\n * @param isDisabled Sets the value of the *disabled* property of the switch.\n */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this._changeDetectorRef.detectChanges();\n }\n}\n","<label\n class=\"fd-switch fd-switch-no-animate\"\n (click)=\"focus()\"\n [style.cursor]=\"disabled ? 'auto' : 'pointer'\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [class.fd-switch--semantic]=\"semantic\"\n [class.is-disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n #switchEl\n>\n <span *ngIf=\"isChecked ? activeText : inactiveText as text\" class=\"fd-switch__text\">\n {{ text }}\n </span>\n <span class=\"fd-switch__control\">\n <input\n #switchInput\n class=\"fd-switch__input\"\n type=\"checkbox\"\n role=\"switch\"\n [id]=\"innerInputId\"\n [name]=\"name\"\n [disabled]=\"disabled\"\n [attr.aria-required]=\"required\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-labelledby]=\"ariaLabelledBy + ' ' + (semantic ? _semanticLabelId : '')\"\n [(ngModel)]=\"isChecked\"\n />\n <div class=\"fd-switch__slider\">\n <div class=\"fd-switch__track\" aria-hidden=\"true\">\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon fd-switch__icon--on sap-icon--accept\"\n ></i>\n <span class=\"fd-switch__handle\" role=\"presentation\"></span>\n <i\n *ngIf=\"semantic\"\n role=\"presentation\"\n class=\"fd-switch__icon--off fd-switch__icon sap-icon--decline\"\n ></i>\n </div>\n\n <span *ngIf=\"semantic\" [id]=\"_semanticLabelId\" aria-hidden=\"true\" class=\"fd-switch__invisible-text\">\n {{\n checked\n ? semanticAcceptLabel || ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n : semanticDeclineLabel || ('coreSwitch.semanticAcceptLabel' | fdTranslate)\n }}\n </span>\n </div>\n </span>\n</label>\n","import { Directive, forwardRef } from '@angular/core';\nimport { CONTENT_DENSITY_DIRECTIVE, DeprecatedCompactDirective } from '@fundamental-ngx/core/content-density';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'fd-switch[compact]',\n providers: [\n {\n provide: CONTENT_DENSITY_DIRECTIVE,\n useExisting: forwardRef(() => DeprecatedSwitchCompactDirective)\n }\n ]\n})\nexport class DeprecatedSwitchCompactDirective extends DeprecatedCompactDirective {\n /** @hidden */\n constructor() {\n super('fd-switch');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SwitchComponent } from './switch.component';\nimport { I18nModule } from '@fundamental-ngx/i18n';\nimport { FormsModule } from '@angular/forms';\nimport { DeprecatedSwitchCompactDirective } from './deprecated-switch-compact.directive';\nimport { ContentDensityModule } from '@fundamental-ngx/core/content-density';\n\n@NgModule({\n declarations: [SwitchComponent, DeprecatedSwitchCompactDirective],\n imports: [CommonModule, FormsModule, ContentDensityModule, I18nModule],\n exports: [SwitchComponent, DeprecatedSwitchCompactDirective, ContentDensityModule]\n})\nexport class SwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAoBA,IAAI,cAAc,GAAG,CAAC,CAAC;AACvB,IAAI,wBAAwB,GAAG,KAAK,CAAC;AAErC;;;AAGG;MAsBU,eAAe,CAAA;;IA0CxB,IACI,cAAc,CAAC,KAAuB,EAAA;AACtC,QAAA,IAAI,SAAS,EAAE,IAAI,CAAC,wBAAwB,EAAE;AAC1C,YAAA,OAAO,CAAC,IAAI,CAAC,gFAAgF,CAAC,CAAC;YAC/F,wBAAwB,GAAG,IAAI,CAAC;AACnC,SAAA;AACD,QAAA,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;KAC/B;;IAyCD,WACqB,CAAA,kBAAqC,EAC7C,uBAA+C,EAAA;AADvC,QAAA,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAmB;AAC7C,QAAA,IAAuB,CAAA,uBAAA,GAAvB,uBAAuB,CAAwB;;AArF5D,QAAA,IAAU,CAAA,UAAA,GAAG,EAAE,CAAC;;AAIhB,QAAA,IAAY,CAAA,YAAA,GAAG,EAAE,CAAC;;AAIlB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;AAIjB,QAAA,IAAA,CAAA,EAAE,GAAG,aAAa,cAAc,EAAE,EAAE,CAAC;;AAQrC,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;;AAIjB,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;;AAIhB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAkCjB;;;AAGG;AAEM,QAAA,IAAA,C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CAAC,sCAAsC,CAAC;AAClE,yBAAA;AACJ,qBAAA;iBACJ,CAAA;;;MCCY,YAAY,CAAA;;yGAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAZ,YAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,iBAJN,eAAe,EAAE,gCAAgC,CAAA,EAAA,OAAA,EAAA,CACtD,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CAC3D,eAAe,EAAE,gCAAgC,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA;0GAExE,YAAY,EAAA,OAAA,EAAA,CAHX,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,UAAU,EACR,oBAAoB,CAAA,EAAA,CAAA,CAAA;2FAExE,YAAY,EAAA,UAAA,EAAA,CAAA;kBALxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,eAAe,EAAE,gCAAgC,CAAC;oBACjE,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,UAAU,CAAC;AACtE,oBAAA,OAAO,EAAE,CAAC,eAAe,EAAE,gCAAgC,EAAE,oBAAoB,CAAC;iBACrF,CAAA;;;ACZD;;AAEG;;;;"}
@@ -291,6 +291,12 @@ class TabPanelComponent {
291
291
  }
292
292
  }
293
293
  /** @hidden */
294
+ _focusFirstFocusableElement() {
295
+ var _a;
296
+ (_a = this.elementRef.nativeElement
297
+ .querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });
298
+ }
299
+ /** @hidden */
294
300
  _updateHost() {
295
301
  this._expandedClass = this.expanded;
296
302
  }
@@ -594,6 +600,8 @@ class TabListComponent {
594
600
  this.collapsibleTabs = false;
595
601
  /** Whether to try to keep selected tab (default value) on tabs change or to select default one (first if not specified). */
596
602
  this.selectDefaultOnTabsChange = false;
603
+ /** Whether to focus the first focusable element in a tab panel when using stacked tabs. */
604
+ this.focusFirstFocusableElement = true;
597
605
  /** Event emitted when the selected panel changes. */
598
606
  this.selectedTabChange = new EventEmitter();
599
607
  /** Event emitted when visible items count has been changed. */
@@ -771,6 +779,9 @@ class TabListComponent {
771
779
  .subscribe(() => (this._disableScrollSpy = false));
772
780
  scrollTop(containerElement, distanceToScroll);
773
781
  }
782
+ if (this.focusFirstFocusableElement) {
783
+ tabPanel._focusFirstFocusableElement();
784
+ }
774
785
  }
775
786
  /** @hidden Whether tab can be expanded/collapsed */
776
787
  _canChangeExpandState(tabPanel, expand) {
@@ -778,7 +789,7 @@ class TabListComponent {
778
789
  }
779
790
  }
780
791
  TabListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: TabListComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.ContentDensityObserver }, { token: i2$1.DestroyedService }], target: i0.ɵɵFactoryTarget.Component });
781
- TabListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TabListComponent, selector: "fd-tab-list", inputs: { size: "size", mode: "mode", collapseOverflow: "collapseOverflow", maxVisibleTabs: "maxVisibleTabs", stackContent: "stackContent", maxContentHeight: "maxContentHeight", collapsibleTabs: "collapsibleTabs", expandOverflowText: "expandOverflowText", defaultTab: "defaultTab", selectDefaultOnTabsChange: "selectDefaultOnTabsChange" }, outputs: { selectedTabChange: "selectedTabChange", visibleItemsCount: "visibleItemsCount", hiddenItemsCount: "hiddenItemsCount" }, host: { classAttribute: "fd-tabs-custom" }, providers: [
792
+ TabListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: TabListComponent, selector: "fd-tab-list", inputs: { size: "size", mode: "mode", collapseOverflow: "collapseOverflow", maxVisibleTabs: "maxVisibleTabs", stackContent: "stackContent", maxContentHeight: "maxContentHeight", collapsibleTabs: "collapsibleTabs", expandOverflowText: "expandOverflowText", defaultTab: "defaultTab", selectDefaultOnTabsChange: "selectDefaultOnTabsChange", focusFirstFocusableElement: "focusFirstFocusableElement" }, outputs: { selectedTabChange: "selectedTabChange", visibleItemsCount: "visibleItemsCount", hiddenItemsCount: "hiddenItemsCount" }, host: { classAttribute: "fd-tabs-custom" }, providers: [
782
793
  contentDensityObserverProviders(),
783
794
  DestroyedService,
784
795
  {
@@ -818,6 +829,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
818
829
  type: Input
819
830
  }], selectDefaultOnTabsChange: [{
820
831
  type: Input
832
+ }], focusFirstFocusableElement: [{
833
+ type: Input
821
834
  }], selectedTabChange: [{
822
835
  type: Output
823
836
  }], visibleItemsCount: [{