@testgorilla/tgo-ui 11.9.0 → 11.11.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 (149) hide show
  1. package/README.md +114 -0
  2. package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs +1 -1
  3. package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs.map +1 -1
  4. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +8 -2
  5. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
  6. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs +4 -3
  7. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs.map +1 -1
  8. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +5 -2
  9. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
  10. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +1 -1
  11. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +1 -1
  12. package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs +10 -4
  13. package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs.map +1 -1
  14. package/fesm2022/testgorilla-tgo-ui-components-button.mjs +5 -2
  15. package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
  16. package/fesm2022/testgorilla-tgo-ui-components-card.mjs +5 -2
  17. package/fesm2022/testgorilla-tgo-ui-components-card.mjs.map +1 -1
  18. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs +26 -3
  19. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs.map +1 -1
  20. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +8 -3
  21. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
  22. package/fesm2022/testgorilla-tgo-ui-components-core.mjs +3 -1
  23. package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
  24. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs +12 -3
  25. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs.map +1 -1
  26. package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs +7 -4
  27. package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs.map +1 -1
  28. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +13 -4
  29. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
  30. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +8 -2
  31. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
  32. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs +1 -1
  33. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
  34. package/fesm2022/testgorilla-tgo-ui-components-field.mjs +6 -3
  35. package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
  36. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs +9 -3
  37. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs.map +1 -1
  38. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +14 -2
  39. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +1 -1
  40. package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs +17 -3
  41. package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs.map +1 -1
  42. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +7 -4
  43. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +1 -1
  44. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs +1 -1
  45. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs.map +1 -1
  46. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +1 -1
  47. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
  48. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs +7 -4
  49. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs.map +1 -1
  50. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs +2 -2
  51. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs.map +1 -1
  52. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +9 -2
  53. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
  54. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs +5 -2
  55. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs.map +1 -1
  56. package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs +8 -2
  57. package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs.map +1 -1
  58. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs +1 -1
  59. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs.map +1 -1
  60. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs +13 -3
  61. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs.map +1 -1
  62. package/fesm2022/testgorilla-tgo-ui-components-popover.mjs +1 -1
  63. package/fesm2022/testgorilla-tgo-ui-components-popover.mjs.map +1 -1
  64. package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs +4 -3
  65. package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs.map +1 -1
  66. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +28 -6
  67. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
  68. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +1 -1
  69. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +1 -1
  70. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs +21 -1
  71. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs.map +1 -1
  72. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs +8 -2
  73. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs.map +1 -1
  74. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs +1 -1
  75. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs.map +1 -1
  76. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs +11 -2
  77. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs.map +1 -1
  78. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs +5 -2
  79. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs.map +1 -1
  80. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs +15 -3
  81. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs.map +1 -1
  82. package/fesm2022/testgorilla-tgo-ui-components-segmented-toggle.mjs +11 -3
  83. package/fesm2022/testgorilla-tgo-ui-components-segmented-toggle.mjs.map +1 -1
  84. package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs +7 -4
  85. package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs.map +1 -1
  86. package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs +1 -1
  87. package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs.map +1 -1
  88. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +5 -2
  89. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
  90. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs +11 -2
  91. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs.map +1 -1
  92. package/fesm2022/testgorilla-tgo-ui-components-slider.mjs +18 -3
  93. package/fesm2022/testgorilla-tgo-ui-components-slider.mjs.map +1 -1
  94. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +8 -2
  95. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
  96. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs +11 -2
  97. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs.map +1 -1
  98. package/fesm2022/testgorilla-tgo-ui-components-table.mjs +8 -2
  99. package/fesm2022/testgorilla-tgo-ui-components-table.mjs.map +1 -1
  100. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs +4 -3
  101. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs.map +1 -1
  102. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs +5 -3
  103. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs.map +1 -1
  104. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs +10 -3
  105. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs.map +1 -1
  106. package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs +1 -1
  107. package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs.map +1 -1
  108. package/mcp/catalog.json +1 -1
  109. package/package.json +1 -1
  110. package/types/testgorilla-tgo-ui-components-alert-banner.d.ts +4 -1
  111. package/types/testgorilla-tgo-ui-components-autocomplete-v2.d.ts +2 -1
  112. package/types/testgorilla-tgo-ui-components-autocomplete.d.ts +2 -1
  113. package/types/testgorilla-tgo-ui-components-breadcrumb.d.ts +4 -1
  114. package/types/testgorilla-tgo-ui-components-button.d.ts +2 -1
  115. package/types/testgorilla-tgo-ui-components-card.d.ts +2 -1
  116. package/types/testgorilla-tgo-ui-components-checkbox.d.ts +4 -1
  117. package/types/testgorilla-tgo-ui-components-checklist.d.ts +3 -1
  118. package/types/testgorilla-tgo-ui-components-datepicker.d.ts +4 -1
  119. package/types/testgorilla-tgo-ui-components-device-control.d.ts +4 -1
  120. package/types/testgorilla-tgo-ui-components-dialog.d.ts +4 -1
  121. package/types/testgorilla-tgo-ui-components-dropdown.d.ts +3 -1
  122. package/types/testgorilla-tgo-ui-components-field.d.ts +4 -1
  123. package/types/testgorilla-tgo-ui-components-file-upload.d.ts +3 -1
  124. package/types/testgorilla-tgo-ui-components-filter-button.d.ts +5 -1
  125. package/types/testgorilla-tgo-ui-components-infinite-scroll-table.d.ts +6 -1
  126. package/types/testgorilla-tgo-ui-components-inline-field.d.ts +4 -1
  127. package/types/testgorilla-tgo-ui-components-multi-input.d.ts +4 -1
  128. package/types/testgorilla-tgo-ui-components-overflow-menu.d.ts +3 -1
  129. package/types/testgorilla-tgo-ui-components-page-header.d.ts +2 -1
  130. package/types/testgorilla-tgo-ui-components-paginator.d.ts +3 -1
  131. package/types/testgorilla-tgo-ui-components-phone-input.d.ts +4 -1
  132. package/types/testgorilla-tgo-ui-components-popup-tip.d.ts +2 -1
  133. package/types/testgorilla-tgo-ui-components-prompt.d.ts +13 -1
  134. package/types/testgorilla-tgo-ui-components-radio-button.d.ts +4 -1
  135. package/types/testgorilla-tgo-ui-components-rating.d.ts +3 -1
  136. package/types/testgorilla-tgo-ui-components-scale.d.ts +4 -1
  137. package/types/testgorilla-tgo-ui-components-segmented-bar.d.ts +2 -1
  138. package/types/testgorilla-tgo-ui-components-segmented-button.d.ts +6 -1
  139. package/types/testgorilla-tgo-ui-components-segmented-toggle.d.ts +4 -1
  140. package/types/testgorilla-tgo-ui-components-selectable-card.d.ts +4 -1
  141. package/types/testgorilla-tgo-ui-components-side-panel.d.ts +3 -0
  142. package/types/testgorilla-tgo-ui-components-side-sheet.d.ts +4 -1
  143. package/types/testgorilla-tgo-ui-components-slider.d.ts +6 -1
  144. package/types/testgorilla-tgo-ui-components-snackbar.d.ts +3 -1
  145. package/types/testgorilla-tgo-ui-components-stepper.d.ts +4 -1
  146. package/types/testgorilla-tgo-ui-components-table.d.ts +3 -1
  147. package/types/testgorilla-tgo-ui-components-tabs.d.ts +3 -1
  148. package/types/testgorilla-tgo-ui-components-tag.d.ts +3 -1
  149. package/types/testgorilla-tgo-ui-components-toggle.d.ts +5 -1
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-tabs.mjs","sources":["../../../components/tabs/tabs.model.ts","../../../components/tabs/tabs.component.ts","../../../components/tabs/tabs.component.html","../../../components/tabs/tab.directive.ts","../../../components/tabs/tabs.component.module.ts","../../../components/tabs/testgorilla-tgo-ui-components-tabs.ts"],"sourcesContent":["import { TemplateRef } from '@angular/core';\nimport { NgxSkeletonLoaderConfigTheme } from 'ngx-skeleton-loader';\n\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\n\nexport interface Tab {\n tabName: string;\n tabLabel: string;\n contentTemplateRef: TemplateRef<unknown>;\n iconLeft?: IconName;\n iconRight?: IconName;\n disabled?: boolean;\n canLeave?: (ctx?: { currentTab: Tab; nextTab: Tab }) => boolean | Promise<boolean>;\n linkUrl?: string;\n ariaLabel?: string;\n order?: number;\n skeletonTheme?: NgxSkeletonLoaderConfigTheme;\n isSkeletonAiTheme?: boolean;\n isLabelLoading?: boolean;\n}\n\nexport type TabsType = 'underlined' | 'filled';\n\nexport const TAB_HEADER_SIZE = {\n BIG: 'big',\n MEDIUM: 'medium',\n SMALL: 'small',\n} as const;\n\nexport type TabHeaderSize = (typeof TAB_HEADER_SIZE)[keyof typeof TAB_HEADER_SIZE];\n","import { ENTER, hasModifierKey, SPACE } from '@angular/cdk/keycodes';\nimport { NgClass, NgTemplateOutlet, AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n booleanAttribute,\n Component,\n effect,\n EventEmitter,\n HostBinding,\n Inject,\n input,\n Input,\n Optional,\n Output,\n signal,\n untracked,\n ViewChild,\n AfterViewInit,\n} from '@angular/core';\nimport { MatTab, MatTabGroup, MatTabLabel } from '@angular/material/tabs';\nimport { Observable } from 'rxjs';\n\nimport { ApplicationTheme, IS_MOBILE_TOKEN, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponent } from '@testgorilla/tgo-ui/components/icon';\nimport { SkeletonComponent } from '@testgorilla/tgo-ui/components/skeleton';\nimport { SpinnerComponent } from '@testgorilla/tgo-ui/components/spinner';\n\nimport { Tab, TAB_HEADER_SIZE, TabHeaderSize, TabsType } from './tabs.model';\n\n/** Typed shape of the MatTabGroup internals this component overrides to gate tab transitions. */\ninterface MatTabGroupInternals {\n _tabHeader: {\n _handleKeydown: (event: KeyboardEvent) => Promise<void>;\n _keyManager: { onKeydown: (event: KeyboardEvent) => void };\n };\n _handleClick: (tab: MatTab, tabHeader: unknown, index: number) => Promise<void>;\n}\n\n@Component({\n selector: 'ui-tabs',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './tabs.component.html',\n styleUrls: ['./tabs.component.scss'],\n imports: [\n MatTabGroup,\n NgClass,\n MatTab,\n MatTabLabel,\n SkeletonComponent,\n SpinnerComponent,\n IconComponent,\n NgTemplateOutlet,\n AsyncPipe,\n UiTranslatePipe,\n ],\n})\nexport class TabsComponent implements AfterViewInit {\n /**\n * Color of the Tabs.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof TabsComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null = '#46A997';\n /**\n * Type the Tabs.\n * Defaults underlined.\n *\n * @type {TabsType}\n * @memberof TabsComponent\n */\n @Input() type: TabsType = 'underlined';\n\n /**\n * Animation duration when switching tabs\n *\n * @type {number}\n * @memberof TabsComponent\n */\n @Input() animationDuration = 300;\n\n /**\n * Sets the padding for content and header\n *\n * @type {number}\n * @memberof TabsComponent\n */\n @HostBinding('style.--header-content-padding')\n @Input({ transform: (value: number): string => `${value}px` })\n headerContentPadding = '32px';\n\n /**\n * Sets the dynamic height of the tab\n * @type {boolean}\n * @memberof TabsComponent\n */\n @Input({ transform: booleanAttribute }) dynamicHeight = true;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof TabsComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n tabHeaderSize = input<TabHeaderSize>(TAB_HEADER_SIZE.BIG);\n\n isLoading = input(false);\n\n /**\n * Name of the tab to show. Applied as tabs register, so a tab requested before the\n * projected `ng-template uiTab` children exist — a deep link, a query param — is still\n * honoured on first paint, with no need to call `selectTab()` from a lifecycle hook.\n *\n * This is a request, not live state: it is applied when the value changes and once more as\n * soon as the named tab registers, but a later click or a change to the tab list will not\n * snap the selection back to it. An unknown name is a no-op — while tabs are still\n * registering every name is unknown, so it cannot warn or throw. Bind a name the consumer\n * has already validated.\n *\n * Applying it does not emit `selectedTab` / `selectedTabIndex` (the consumer supplied the\n * value, so echoing it back would double-handle it) and does not consult the current tab's\n * `canLeave` — declarative selection is the consumer's own decision, so it owns any\n * guarding around the value it binds. User-driven switches still honour `canLeave`.\n */\n readonly selectedTabName = input<string | null>(null);\n\n @Output() selectedTabIndex = new EventEmitter<number>();\n @Output() selectedTab = new EventEmitter<Tab>();\n\n @ViewChild('tabGroup', { static: true }) tabGroup: MatTabGroup;\n\n protected tabs: Tab[] = [];\n readonly tabIndex = signal(0);\n protected tabIndexMap: Record<string, number> = {};\n\n // Counter for default ordering when order is not specified\n private insertionCounter = 0;\n private tabTransitionInProgress = false;\n private requestedTabName: string | null = null;\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n @Inject(IS_MOBILE_TOKEN) protected readonly isMobile$: Observable<boolean>,\n private readonly cdr: ChangeDetectorRef\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n\n effect(() => {\n const requestedTabName = this.selectedTabName();\n // Untracked because applying reads `tabIndex`: tracking it would re-run this effect on\n // every selection change and re-arm the request, snapping the user back to the bound tab.\n untracked(() => {\n this.requestedTabName = requestedTabName;\n this.applyRequestedTabName();\n });\n });\n }\n\n ngAfterViewInit(): void {\n setTimeout(() => {\n /* eslint-disable no-underscore-dangle -- overriding MatTabGroup internals (_tabHeader/_handleKeydown/_keyManager/_handleClick) to gate tab transitions */\n const group = this.tabGroup as unknown as MatTabGroupInternals;\n const tabHeader = group._tabHeader;\n tabHeader._handleKeydown = async (event: KeyboardEvent) => {\n if (hasModifierKey(event) || this.tabTransitionInProgress) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- KeyboardEvent.keyCode is deprecated in favor of .key; migrating this keyboard-nav handler is behaviour-sensitive and out of scope for this lint pass\n switch (event.keyCode) {\n case ENTER:\n case SPACE:\n this.tabTransitionInProgress = true;\n try {\n const tabLabel = (event.target as HTMLElement).innerText;\n const currentTab = this.tabs[this.tabIndex()];\n const nextTab = this.tabs.find(tab => tab.tabLabel === tabLabel);\n\n if (!nextTab) {\n return;\n }\n\n const canLeave = (await currentTab.canLeave?.({ currentTab, nextTab })) ?? true;\n if (currentTab.tabName !== nextTab.tabName && canLeave) {\n const nextTabIndex = this.tabIndexMap[nextTab.tabName];\n this.tabIndex.set(nextTabIndex);\n this.selectedTabIndex.emit(nextTabIndex);\n this.selectedTab.emit(nextTab);\n }\n } finally {\n this.tabTransitionInProgress = false;\n }\n break;\n default:\n tabHeader._keyManager.onKeydown(event);\n }\n };\n\n group._handleClick = async (tab: MatTab, _tabHeader: unknown, index: number) => {\n if (tab.disabled || index === this.tabIndex() || this.tabTransitionInProgress) {\n return;\n }\n this.tabTransitionInProgress = true;\n try {\n const currentTab = this.tabs[this.tabIndex()];\n const nextTab = this.tabs[index];\n const canLeave = (await currentTab.canLeave?.({ currentTab, nextTab })) ?? true;\n if (this.tabIndex() !== index && canLeave) {\n this.tabIndex.set(index);\n this.selectedTabIndex.emit(index);\n this.selectedTab.emit(nextTab);\n }\n } finally {\n this.tabTransitionInProgress = false;\n }\n };\n /* eslint-enable no-underscore-dangle */\n });\n }\n\n addTab(tab: Tab): void {\n // If no explicit order is provided, use the insertion counter\n tab.order ??= this.insertionCounter++;\n\n const activeTabName = this.activeTabName;\n\n // Add the tab and sort the tabs array\n this.tabs.push(tab);\n this.sortTabs();\n // Tabs register from projected children; the looped array mutates outside\n // this component's own change detection.\n this.cdr.markForCheck();\n\n // Update the index map\n this.updateTabIndexMap();\n this.reconcileTabIndex(activeTabName);\n this.applyRequestedTabName();\n }\n\n private sortTabs(): void {\n // Sort by the order property (lowest first)\n this.tabs.sort((a, b) => {\n const orderA = a.order ?? Infinity;\n const orderB = b.order ?? Infinity;\n return orderA - orderB;\n });\n }\n\n private updateTabIndexMap(): void {\n // Update the index map after sorting\n this.tabs.forEach((tab, index) => {\n this.tabIndexMap[tab.tabName] = index;\n });\n }\n\n private get activeTabName(): string | undefined {\n return this.tabs[this.tabIndex()]?.tabName;\n }\n\n /**\n * `tabIndex` stores a position, but the selection it stands for is a tab identity, and\n * adding, removing or re-ordering tabs shifts positions. Without re-resolving the index\n * from the name, `tabIndex` keeps pointing at whatever tab now sits at that position —\n * MatTabGroup re-derives its own selection from the active tab, so the body stays correct\n * while this component's `aria-selected` and click gating silently drift onto a different\n * tab. Falls back to clamping when the active tab is the one that went away.\n */\n private reconcileTabIndex(activeTabName: string | undefined): void {\n const resolvedIndex = activeTabName === undefined ? undefined : this.tabIndexMap[activeTabName];\n const nextIndex = resolvedIndex ?? Math.min(this.tabIndex(), Math.max(this.tabs.length - 1, 0));\n\n if (nextIndex !== this.tabIndex()) {\n this.tabIndex.set(nextIndex);\n }\n }\n\n /**\n * Applies `selectedTabName` once the named tab is known, then clears the request so later\n * clicks and tab list changes are not overridden by a stale value. Stays armed while the\n * name is unresolved, because a requested tab can register after the input is set — either\n * with the rest of a subtree that renders late, or later still if it is behind its own\n * condition — so `addTab()` retries until it resolves.\n *\n * Silent by design — see the doc on `selectedTabName`.\n */\n private applyRequestedTabName(): void {\n if (this.requestedTabName === null) {\n return;\n }\n\n const index = this.tabIndexMap[this.requestedTabName];\n if (index === undefined) {\n return;\n }\n\n this.requestedTabName = null;\n if (index !== this.tabIndex()) {\n this.tabIndex.set(index);\n }\n }\n\n onTabChange(index: number): void {\n const selectedTab = this.tabs[index];\n const newIndex = this.tabIndexMap[selectedTab.tabName];\n if (this.tabIndex() === newIndex) {\n return;\n }\n this.tabIndex.set(newIndex);\n this.selectedTabIndex.emit(index);\n this.selectedTab.emit(selectedTab);\n }\n\n selectTab(tabName: string): void {\n const index = this.tabIndexMap[tabName];\n if (index !== undefined) {\n this.tabIndex.set(index);\n this.selectedTabIndex.emit(index);\n this.selectedTab.emit(this.tabs[index]);\n }\n }\n\n indexOf(tabName: string): number {\n return this.tabIndexMap[tabName] ?? -1;\n }\n\n trackByTabName(index: number, tab: Tab): string {\n return tab.tabName;\n }\n\n removeTab(tabName: string): void {\n const index = this.tabIndexMap[tabName];\n if (index !== undefined) {\n const activeTabName = this.activeTabName;\n this.tabs.splice(index, 1);\n delete this.tabIndexMap[tabName];\n this.updateTabIndexMap();\n this.reconcileTabIndex(activeTabName);\n this.cdr.markForCheck();\n }\n }\n\n updateTab(tabName: string, tab: Partial<Omit<Tab, 'tabName'>>): void {\n const index = this.tabIndexMap[tabName];\n if (index !== undefined) {\n this.tabs[index] = { ...this.tabs[index], ...tab };\n\n // Re-sort if the order changed\n if (tab.order !== undefined) {\n const activeTabName = this.activeTabName;\n this.sortTabs();\n this.updateTabIndexMap();\n this.reconcileTabIndex(activeTabName);\n }\n // Driven by TabDirective effects (projected content) — outside this\n // component's own change detection, like addTab/removeTab.\n this.cdr.markForCheck();\n }\n }\n}\n","<mat-tab-group\n #tabGroup\n headerPosition=\"above\"\n class=\"tabs-container\"\n [ngClass]=\"['tabs-type-' + ((isMobile$ | async) ? 'underlined' : type), 'tabs-header-size-' + tabHeaderSize()]\"\n [class.tabs-container-loading]=\"isLoading()\"\n [attr.theme]=\"applicationTheme\"\n [dynamicHeight]=\"dynamicHeight\"\n [selectedIndex]=\"tabIndex()\"\n [animationDuration]=\"animationDuration\"\n (selectedIndexChange)=\"onTabChange($event)\"\n role=\"tablist\"\n>\n @for (tab of tabs; track trackByTabName(i, tab); let i = $index) {\n <mat-tab [disabled]=\"tab.disabled ?? false\" [attr.aria-label]=\"tab?.ariaLabel\">\n <ng-template mat-tab-label>\n <a\n data-test-role=\"tab-link\"\n [attr.data-testid]=\"tab.tabName\"\n class=\"tab-name\"\n [href]=\"tab?.linkUrl ? tab.linkUrl : '#'\"\n (click)=\"$event.preventDefault()\"\n [attr.aria-selected]=\"i === tabIndex()\"\n [attr.aria-label]=\"\n tab.tabLabel +\n (tab.isLabelLoading ? ', ' + ('COMMON.LOADING' | uiTranslate | async) : '') +\n (i === tabIndex() ? ', ' + ('TABS.SELECTED' | uiTranslate | async) : '')\n \"\n role=\"tab\"\n >\n @if (isLoading()) {\n <ui-skeleton\n [count]=\"1\"\n [theme]=\"tab.skeletonTheme ?? {}\"\n [isAiTheme]=\"!!tab.isSkeletonAiTheme\"\n ></ui-skeleton>\n } @else {\n @if (tab?.iconLeft) {\n <ui-icon\n color=\"rebrand-black\"\n [size]=\"'24'\"\n [tabindex]=\"1\"\n class=\"left-icon\"\n [name]=\"tab.iconLeft!\"\n ></ui-icon>\n }\n <span class=\"label\">{{ tab.tabLabel }}</span>\n @if (tab.isLabelLoading) {\n <span class=\"label-spinner\" aria-hidden=\"true\">\n <ui-spinner size=\"small\" [isLoader]=\"false\" [applicationTheme]=\"applicationTheme\"></ui-spinner>\n </span>\n }\n @if (tab?.iconRight) {\n <ui-icon color=\"rebrand-black\" [size]=\"'24'\" class=\"right-icon\" [name]=\"tab.iconRight!\"></ui-icon>\n }\n }\n </a>\n </ng-template>\n <div role=\"tabpanel\" [attr.id]=\"'tabpanel-' + i\" [attr.aria-labelledby]=\"'tab-' + i\">\n <ng-container *ngTemplateOutlet=\"tab.contentTemplateRef\"></ng-container>\n </div>\n </mat-tab>\n }\n</mat-tab-group>\n","import { booleanAttribute, DestroyRef, Directive, effect, inject, input, OnInit, TemplateRef } from '@angular/core';\nimport { NgxSkeletonLoaderConfigTheme } from 'ngx-skeleton-loader';\n\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\n\nimport { TabsComponent } from './tabs.component';\nimport { Tab } from './tabs.model';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[uiTab]',\n})\nexport class TabDirective implements OnInit {\n tabLabel = input.required<string>();\n tabName = input.required<string>();\n iconLeft = input<IconName>();\n iconRight = input<IconName>();\n disabled = input<boolean, string>(false, { transform: booleanAttribute });\n canLeave = input<(ctx?: { currentTab: Tab; nextTab: Tab }) => boolean | Promise<boolean>>();\n linkUrl = input<string>();\n order = input<number>();\n skeletonTheme = input<NgxSkeletonLoaderConfigTheme>();\n isSkeletonAiTheme = input<boolean>();\n isLabelLoading = input(false, { transform: booleanAttribute });\n\n private readonly tabsComponent = inject(TabsComponent);\n private readonly template = inject(TemplateRef);\n\n private readonly syncProps = effect(() => {\n this.tabsComponent.updateTab(this.tabName(), {\n tabLabel: this.tabLabel(),\n iconLeft: this.iconLeft(),\n iconRight: this.iconRight(),\n disabled: this.disabled(),\n canLeave: this.canLeave(),\n linkUrl: this.linkUrl(),\n order: this.order(),\n skeletonTheme: this.skeletonTheme(),\n isSkeletonAiTheme: this.isSkeletonAiTheme(),\n isLabelLoading: this.isLabelLoading(),\n });\n });\n\n private readonly cleanup = inject(DestroyRef).onDestroy(() => {\n this.tabsComponent.removeTab(this.tabName());\n });\n\n ngOnInit(): void {\n this.addTab();\n }\n\n private addTab(): void {\n this.tabsComponent.addTab({\n tabLabel: this.tabLabel(),\n tabName: this.tabName(),\n iconLeft: this.iconLeft(),\n iconRight: this.iconRight(),\n disabled: this.disabled(),\n contentTemplateRef: this.template,\n canLeave: this.canLeave(),\n linkUrl: this.linkUrl(),\n order: this.order(),\n skeletonTheme: this.skeletonTheme(),\n isSkeletonAiTheme: this.isSkeletonAiTheme(),\n isLabelLoading: this.isLabelLoading(),\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatTabsModule } from '@angular/material/tabs';\n\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { SkeletonComponent } from '@testgorilla/tgo-ui/components/skeleton';\n\nimport { TabDirective } from './tab.directive';\nimport { TabsComponent } from './tabs.component';\n\n@NgModule({\n imports: [\n TabDirective,\n CommonModule,\n MatTabsModule,\n IconComponentModule,\n UiTranslatePipe,\n SkeletonComponent,\n TabsComponent,\n ],\n exports: [TabsComponent, TabDirective],\n})\nexport class TabsComponentModule {}\n","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AE;wBACP,YAAY;wBACZ,YAAY;wBACZ,aAAa;wBACb,mBAAmB;wBACnB,eAAe;wBACf,iBAAiB;wBACjB,aAAa;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC;AACvC,iBAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-tabs.mjs","sources":["../../../components/tabs/tabs.model.ts","../../../components/tabs/tabs.component.ts","../../../components/tabs/tabs.component.html","../../../components/tabs/tab.directive.ts","../../../components/tabs/tabs.component.module.ts","../../../components/tabs/testgorilla-tgo-ui-components-tabs.ts"],"sourcesContent":["import { TemplateRef } from '@angular/core';\nimport { NgxSkeletonLoaderConfigTheme } from 'ngx-skeleton-loader';\n\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\n\nexport interface Tab {\n tabName: string;\n tabLabel: string;\n contentTemplateRef: TemplateRef<unknown>;\n iconLeft?: IconName;\n iconRight?: IconName;\n disabled?: boolean;\n canLeave?: (ctx?: { currentTab: Tab; nextTab: Tab }) => boolean | Promise<boolean>;\n linkUrl?: string;\n ariaLabel?: string;\n testId?: string;\n order?: number;\n skeletonTheme?: NgxSkeletonLoaderConfigTheme;\n isSkeletonAiTheme?: boolean;\n isLabelLoading?: boolean;\n}\n\nexport type TabsType = 'underlined' | 'filled';\n\nexport const TAB_HEADER_SIZE = {\n BIG: 'big',\n MEDIUM: 'medium',\n SMALL: 'small',\n} as const;\n\nexport type TabHeaderSize = (typeof TAB_HEADER_SIZE)[keyof typeof TAB_HEADER_SIZE];\n","import { ENTER, hasModifierKey, SPACE } from '@angular/cdk/keycodes';\nimport { NgClass, NgTemplateOutlet, AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n booleanAttribute,\n Component,\n effect,\n EventEmitter,\n HostBinding,\n Inject,\n input,\n Input,\n Optional,\n Output,\n signal,\n untracked,\n ViewChild,\n AfterViewInit,\n} from '@angular/core';\nimport { MatTab, MatTabGroup, MatTabLabel } from '@angular/material/tabs';\nimport { Observable } from 'rxjs';\n\nimport { ApplicationTheme, IS_MOBILE_TOKEN, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponent } from '@testgorilla/tgo-ui/components/icon';\nimport { SkeletonComponent } from '@testgorilla/tgo-ui/components/skeleton';\nimport { SpinnerComponent } from '@testgorilla/tgo-ui/components/spinner';\n\nimport { Tab, TAB_HEADER_SIZE, TabHeaderSize, TabsType } from './tabs.model';\n\n/** Typed shape of the MatTabGroup internals this component overrides to gate tab transitions. */\ninterface MatTabGroupInternals {\n _tabHeader: {\n _handleKeydown: (event: KeyboardEvent) => Promise<void>;\n _keyManager: { onKeydown: (event: KeyboardEvent) => void };\n };\n _handleClick: (tab: MatTab, tabHeader: unknown, index: number) => Promise<void>;\n}\n\n@Component({\n selector: 'ui-tabs',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './tabs.component.html',\n styleUrls: ['./tabs.component.scss'],\n imports: [\n MatTabGroup,\n NgClass,\n MatTab,\n MatTabLabel,\n SkeletonComponent,\n SpinnerComponent,\n IconComponent,\n NgTemplateOutlet,\n AsyncPipe,\n UiTranslatePipe,\n ],\n})\nexport class TabsComponent implements AfterViewInit {\n /**\n * Color of the Tabs.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof TabsComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null = '#46A997';\n /**\n * Type the Tabs.\n * Defaults underlined.\n *\n * @type {TabsType}\n * @memberof TabsComponent\n */\n @Input() type: TabsType = 'underlined';\n\n /**\n * Animation duration when switching tabs\n *\n * @type {number}\n * @memberof TabsComponent\n */\n @Input() animationDuration = 300;\n\n /**\n * Sets the padding for content and header\n *\n * @type {number}\n * @memberof TabsComponent\n */\n @HostBinding('style.--header-content-padding')\n @Input({ transform: (value: number): string => `${value}px` })\n headerContentPadding = '32px';\n\n /**\n * Sets the dynamic height of the tab\n * @type {boolean}\n * @memberof TabsComponent\n */\n @Input({ transform: booleanAttribute }) dynamicHeight = true;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof TabsComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n tabHeaderSize = input<TabHeaderSize>(TAB_HEADER_SIZE.BIG);\n\n isLoading = input(false);\n\n /**\n * Name of the tab to show. Applied as tabs register, so a tab requested before the\n * projected `ng-template uiTab` children exist — a deep link, a query param — is still\n * honoured on first paint, with no need to call `selectTab()` from a lifecycle hook.\n *\n * This is a request, not live state: it is applied when the value changes and once more as\n * soon as the named tab registers, but a later click or a change to the tab list will not\n * snap the selection back to it. An unknown name is a no-op — while tabs are still\n * registering every name is unknown, so it cannot warn or throw. Bind a name the consumer\n * has already validated.\n *\n * Applying it does not emit `selectedTab` / `selectedTabIndex` (the consumer supplied the\n * value, so echoing it back would double-handle it) and does not consult the current tab's\n * `canLeave` — declarative selection is the consumer's own decision, so it owns any\n * guarding around the value it binds. User-driven switches still honour `canLeave`.\n */\n readonly selectedTabName = input<string | null>(null);\n\n readonly testId = input<string | null>(null);\n\n @Output() selectedTabIndex = new EventEmitter<number>();\n @Output() selectedTab = new EventEmitter<Tab>();\n\n @ViewChild('tabGroup', { static: true }) tabGroup: MatTabGroup;\n\n protected tabs: Tab[] = [];\n readonly tabIndex = signal(0);\n protected tabIndexMap: Record<string, number> = {};\n\n // Counter for default ordering when order is not specified\n private insertionCounter = 0;\n private tabTransitionInProgress = false;\n private requestedTabName: string | null = null;\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n @Inject(IS_MOBILE_TOKEN) protected readonly isMobile$: Observable<boolean>,\n private readonly cdr: ChangeDetectorRef\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n\n effect(() => {\n const requestedTabName = this.selectedTabName();\n // Untracked because applying reads `tabIndex`: tracking it would re-run this effect on\n // every selection change and re-arm the request, snapping the user back to the bound tab.\n untracked(() => {\n this.requestedTabName = requestedTabName;\n this.applyRequestedTabName();\n });\n });\n }\n\n ngAfterViewInit(): void {\n setTimeout(() => {\n /* eslint-disable no-underscore-dangle -- overriding MatTabGroup internals (_tabHeader/_handleKeydown/_keyManager/_handleClick) to gate tab transitions */\n const group = this.tabGroup as unknown as MatTabGroupInternals;\n const tabHeader = group._tabHeader;\n tabHeader._handleKeydown = async (event: KeyboardEvent) => {\n if (hasModifierKey(event) || this.tabTransitionInProgress) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-deprecated -- KeyboardEvent.keyCode is deprecated in favor of .key; migrating this keyboard-nav handler is behaviour-sensitive and out of scope for this lint pass\n switch (event.keyCode) {\n case ENTER:\n case SPACE:\n this.tabTransitionInProgress = true;\n try {\n const tabLabel = (event.target as HTMLElement).innerText;\n const currentTab = this.tabs[this.tabIndex()];\n const nextTab = this.tabs.find(tab => tab.tabLabel === tabLabel);\n\n if (!nextTab) {\n return;\n }\n\n const canLeave = (await currentTab.canLeave?.({ currentTab, nextTab })) ?? true;\n if (currentTab.tabName !== nextTab.tabName && canLeave) {\n const nextTabIndex = this.tabIndexMap[nextTab.tabName];\n this.tabIndex.set(nextTabIndex);\n this.selectedTabIndex.emit(nextTabIndex);\n this.selectedTab.emit(nextTab);\n }\n } finally {\n this.tabTransitionInProgress = false;\n }\n break;\n default:\n tabHeader._keyManager.onKeydown(event);\n }\n };\n\n group._handleClick = async (tab: MatTab, _tabHeader: unknown, index: number) => {\n if (tab.disabled || index === this.tabIndex() || this.tabTransitionInProgress) {\n return;\n }\n this.tabTransitionInProgress = true;\n try {\n const currentTab = this.tabs[this.tabIndex()];\n const nextTab = this.tabs[index];\n const canLeave = (await currentTab.canLeave?.({ currentTab, nextTab })) ?? true;\n if (this.tabIndex() !== index && canLeave) {\n this.tabIndex.set(index);\n this.selectedTabIndex.emit(index);\n this.selectedTab.emit(nextTab);\n }\n } finally {\n this.tabTransitionInProgress = false;\n }\n };\n /* eslint-enable no-underscore-dangle */\n });\n }\n\n addTab(tab: Tab): void {\n // If no explicit order is provided, use the insertion counter\n tab.order ??= this.insertionCounter++;\n\n const activeTabName = this.activeTabName;\n\n // Add the tab and sort the tabs array\n this.tabs.push(tab);\n this.sortTabs();\n // Tabs register from projected children; the looped array mutates outside\n // this component's own change detection.\n this.cdr.markForCheck();\n\n // Update the index map\n this.updateTabIndexMap();\n this.reconcileTabIndex(activeTabName);\n this.applyRequestedTabName();\n }\n\n private sortTabs(): void {\n // Sort by the order property (lowest first)\n this.tabs.sort((a, b) => {\n const orderA = a.order ?? Infinity;\n const orderB = b.order ?? Infinity;\n return orderA - orderB;\n });\n }\n\n private updateTabIndexMap(): void {\n // Update the index map after sorting\n this.tabs.forEach((tab, index) => {\n this.tabIndexMap[tab.tabName] = index;\n });\n }\n\n private get activeTabName(): string | undefined {\n return this.tabs[this.tabIndex()]?.tabName;\n }\n\n /**\n * `tabIndex` stores a position, but the selection it stands for is a tab identity, and\n * adding, removing or re-ordering tabs shifts positions. Without re-resolving the index\n * from the name, `tabIndex` keeps pointing at whatever tab now sits at that position —\n * MatTabGroup re-derives its own selection from the active tab, so the body stays correct\n * while this component's `aria-selected` and click gating silently drift onto a different\n * tab. Falls back to clamping when the active tab is the one that went away.\n */\n private reconcileTabIndex(activeTabName: string | undefined): void {\n const resolvedIndex = activeTabName === undefined ? undefined : this.tabIndexMap[activeTabName];\n const nextIndex = resolvedIndex ?? Math.min(this.tabIndex(), Math.max(this.tabs.length - 1, 0));\n\n if (nextIndex !== this.tabIndex()) {\n this.tabIndex.set(nextIndex);\n }\n }\n\n /**\n * Applies `selectedTabName` once the named tab is known, then clears the request so later\n * clicks and tab list changes are not overridden by a stale value. Stays armed while the\n * name is unresolved, because a requested tab can register after the input is set — either\n * with the rest of a subtree that renders late, or later still if it is behind its own\n * condition — so `addTab()` retries until it resolves.\n *\n * Silent by design — see the doc on `selectedTabName`.\n */\n private applyRequestedTabName(): void {\n if (this.requestedTabName === null) {\n return;\n }\n\n const index = this.tabIndexMap[this.requestedTabName];\n if (index === undefined) {\n return;\n }\n\n this.requestedTabName = null;\n if (index !== this.tabIndex()) {\n this.tabIndex.set(index);\n }\n }\n\n onTabChange(index: number): void {\n const selectedTab = this.tabs[index];\n const newIndex = this.tabIndexMap[selectedTab.tabName];\n if (this.tabIndex() === newIndex) {\n return;\n }\n this.tabIndex.set(newIndex);\n this.selectedTabIndex.emit(index);\n this.selectedTab.emit(selectedTab);\n }\n\n selectTab(tabName: string): void {\n const index = this.tabIndexMap[tabName];\n if (index !== undefined) {\n this.tabIndex.set(index);\n this.selectedTabIndex.emit(index);\n this.selectedTab.emit(this.tabs[index]);\n }\n }\n\n indexOf(tabName: string): number {\n return this.tabIndexMap[tabName] ?? -1;\n }\n\n trackByTabName(index: number, tab: Tab): string {\n return tab.tabName;\n }\n\n removeTab(tabName: string): void {\n const index = this.tabIndexMap[tabName];\n if (index !== undefined) {\n const activeTabName = this.activeTabName;\n this.tabs.splice(index, 1);\n delete this.tabIndexMap[tabName];\n this.updateTabIndexMap();\n this.reconcileTabIndex(activeTabName);\n this.cdr.markForCheck();\n }\n }\n\n updateTab(tabName: string, tab: Partial<Omit<Tab, 'tabName'>>): void {\n const index = this.tabIndexMap[tabName];\n if (index !== undefined) {\n this.tabs[index] = { ...this.tabs[index], ...tab };\n\n // Re-sort if the order changed\n if (tab.order !== undefined) {\n const activeTabName = this.activeTabName;\n this.sortTabs();\n this.updateTabIndexMap();\n this.reconcileTabIndex(activeTabName);\n }\n // Driven by TabDirective effects (projected content) — outside this\n // component's own change detection, like addTab/removeTab.\n this.cdr.markForCheck();\n }\n }\n}\n","<mat-tab-group\n #tabGroup\n headerPosition=\"above\"\n class=\"tabs-container\"\n [ngClass]=\"['tabs-type-' + ((isMobile$ | async) ? 'underlined' : type), 'tabs-header-size-' + tabHeaderSize()]\"\n [class.tabs-container-loading]=\"isLoading()\"\n [attr.theme]=\"applicationTheme\"\n [dynamicHeight]=\"dynamicHeight\"\n [selectedIndex]=\"tabIndex()\"\n [animationDuration]=\"animationDuration\"\n (selectedIndexChange)=\"onTabChange($event)\"\n role=\"tablist\"\n [attr.data-testid]=\"testId()\"\n>\n @for (tab of tabs; track trackByTabName(i, tab); let i = $index) {\n <mat-tab [disabled]=\"tab.disabled ?? false\" [attr.aria-label]=\"tab?.ariaLabel\">\n <ng-template mat-tab-label>\n <a\n data-test-role=\"tab-link\"\n [attr.data-testid]=\"tab.testId ?? tab.tabName\"\n class=\"tab-name\"\n [href]=\"tab?.linkUrl ? tab.linkUrl : '#'\"\n (click)=\"$event.preventDefault()\"\n [attr.aria-selected]=\"i === tabIndex()\"\n [attr.aria-label]=\"\n tab.tabLabel +\n (tab.isLabelLoading ? ', ' + ('COMMON.LOADING' | uiTranslate | async) : '') +\n (i === tabIndex() ? ', ' + ('TABS.SELECTED' | uiTranslate | async) : '')\n \"\n role=\"tab\"\n >\n @if (isLoading()) {\n <ui-skeleton\n [count]=\"1\"\n [theme]=\"tab.skeletonTheme ?? {}\"\n [isAiTheme]=\"!!tab.isSkeletonAiTheme\"\n ></ui-skeleton>\n } @else {\n @if (tab?.iconLeft) {\n <ui-icon\n color=\"rebrand-black\"\n [size]=\"'24'\"\n [tabindex]=\"1\"\n class=\"left-icon\"\n [name]=\"tab.iconLeft!\"\n ></ui-icon>\n }\n <span class=\"label\">{{ tab.tabLabel }}</span>\n @if (tab.isLabelLoading) {\n <span class=\"label-spinner\" aria-hidden=\"true\">\n <ui-spinner size=\"small\" [isLoader]=\"false\" [applicationTheme]=\"applicationTheme\"></ui-spinner>\n </span>\n }\n @if (tab?.iconRight) {\n <ui-icon color=\"rebrand-black\" [size]=\"'24'\" class=\"right-icon\" [name]=\"tab.iconRight!\"></ui-icon>\n }\n }\n </a>\n </ng-template>\n <div role=\"tabpanel\" [attr.id]=\"'tabpanel-' + i\" [attr.aria-labelledby]=\"'tab-' + i\">\n <ng-container *ngTemplateOutlet=\"tab.contentTemplateRef\"></ng-container>\n </div>\n </mat-tab>\n }\n</mat-tab-group>\n","import { booleanAttribute, DestroyRef, Directive, effect, inject, input, OnInit, TemplateRef } from '@angular/core';\nimport { NgxSkeletonLoaderConfigTheme } from 'ngx-skeleton-loader';\n\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\n\nimport { TabsComponent } from './tabs.component';\nimport { Tab } from './tabs.model';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[uiTab]',\n})\nexport class TabDirective implements OnInit {\n tabLabel = input.required<string>();\n tabName = input.required<string>();\n iconLeft = input<IconName>();\n iconRight = input<IconName>();\n disabled = input<boolean, string>(false, { transform: booleanAttribute });\n canLeave = input<(ctx?: { currentTab: Tab; nextTab: Tab }) => boolean | Promise<boolean>>();\n linkUrl = input<string>();\n order = input<number>();\n skeletonTheme = input<NgxSkeletonLoaderConfigTheme>();\n isSkeletonAiTheme = input<boolean>();\n isLabelLoading = input(false, { transform: booleanAttribute });\n\n private readonly tabsComponent = inject(TabsComponent);\n private readonly template = inject(TemplateRef);\n\n private readonly syncProps = effect(() => {\n this.tabsComponent.updateTab(this.tabName(), {\n tabLabel: this.tabLabel(),\n iconLeft: this.iconLeft(),\n iconRight: this.iconRight(),\n disabled: this.disabled(),\n canLeave: this.canLeave(),\n linkUrl: this.linkUrl(),\n order: this.order(),\n skeletonTheme: this.skeletonTheme(),\n isSkeletonAiTheme: this.isSkeletonAiTheme(),\n isLabelLoading: this.isLabelLoading(),\n });\n });\n\n private readonly cleanup = inject(DestroyRef).onDestroy(() => {\n this.tabsComponent.removeTab(this.tabName());\n });\n\n ngOnInit(): void {\n this.addTab();\n }\n\n private addTab(): void {\n this.tabsComponent.addTab({\n tabLabel: this.tabLabel(),\n tabName: this.tabName(),\n iconLeft: this.iconLeft(),\n iconRight: this.iconRight(),\n disabled: this.disabled(),\n contentTemplateRef: this.template,\n canLeave: this.canLeave(),\n linkUrl: this.linkUrl(),\n order: this.order(),\n skeletonTheme: this.skeletonTheme(),\n isSkeletonAiTheme: this.isSkeletonAiTheme(),\n isLabelLoading: this.isLabelLoading(),\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatTabsModule } from '@angular/material/tabs';\n\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { SkeletonComponent } from '@testgorilla/tgo-ui/components/skeleton';\n\nimport { TabDirective } from './tab.directive';\nimport { TabsComponent } from './tabs.component';\n\n@NgModule({\n imports: [\n TabDirective,\n CommonModule,\n MatTabsModule,\n IconComponentModule,\n UiTranslatePipe,\n SkeletonComponent,\n TabsComponent,\n ],\n exports: [TabsComponent, TabDirective],\n})\nexport class TabsComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAwBO,MAAM,eAAe,GAAG;AAC7B,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,KAAK,EAAE,OAAO;;;MC8BH,aAAa,CAAA;AA4FxB,IAAA,WAAA,CAC6E,eAAiC,EAChE,SAA8B,EACzD,GAAsB,EAAA;QAFoC,IAAA,CAAA,eAAe,GAAf,eAAe;QAC9C,IAAA,CAAA,SAAS,GAAT,SAAS;QACpC,IAAA,CAAA,GAAG,GAAH,GAAG;AA9FtB;;;;;;AAMG;QAGH,IAAA,CAAA,YAAY,GAAkB,SAAS;AACvC;;;;;;AAMG;QACM,IAAA,CAAA,IAAI,GAAa,YAAY;AAEtC;;;;;AAKG;QACM,IAAA,CAAA,iBAAiB,GAAG,GAAG;AAEhC;;;;;AAKG;QAGH,IAAA,CAAA,oBAAoB,GAAG,MAAM;AAE7B;;;;AAIG;QACqC,IAAA,CAAA,aAAa,GAAG,IAAI;AAE5D;;;;;;AAMG;QACM,IAAA,CAAA,gBAAgB,GAAqB,OAAO;AAErD,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CA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A,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAV5B,YAAY;YACZ,YAAY;YACZ,aAAa;YACb,mBAAmB;YACnB,eAAe;YACf,iBAAiB;YACjB,aAAa,CAAA,EAAA,OAAA,EAAA,CAEL,aAAa,EAAE,YAAY,CAAA,EAAA,CAAA,CAAA;AAE1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAT5B,YAAY;YACZ,aAAa;YACb,mBAAmB;YAEnB,iBAAiB;YACjB,aAAa,CAAA,EAAA,CAAA,CAAA;;4FAIJ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAZ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,aAAa;wBACb,mBAAmB;wBACnB,eAAe;wBACf,iBAAiB;wBACjB,aAAa;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC;AACvC,iBAAA;;;ACtBD;;AAEG;;;;"}
@@ -97,6 +97,8 @@ class TagComponent {
97
97
  * @memberof TagComponent
98
98
  */
99
99
  this.ariaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
100
+ this.testId = input(null, ...(ngDevMode ? [{ debugName: "testId" }] : /* istanbul ignore next */ []));
101
+ this.closeTestId = computed(() => (this.testId() ? `${this.testId()}-remove` : null), ...(ngDevMode ? [{ debugName: "closeTestId" }] : /* istanbul ignore next */ []));
100
102
  /**
101
103
  * A string representing the ARIA requirement for accessibility.
102
104
  * This attribute is used to indicate whether an input field is required for form submission.
@@ -198,12 +200,12 @@ class TagComponent {
198
200
  }
199
201
  }
200
202
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
201
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: TagComponent, isStandalone: true, selector: "ui-tag", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, allowClose: { classPropertyName: "allowClose", publicName: "allowClose", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, isSelected: { classPropertyName: "isSelected", publicName: "isSelected", isSignal: true, isRequired: false, transformFunction: null }, showIconWhenSelected: { classPropertyName: "showIconWhenSelected", publicName: "showIconWhenSelected", isSignal: true, isRequired: false, transformFunction: null }, pinnedBackground: { classPropertyName: "pinnedBackground", publicName: "pinnedBackground", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, applicationTheme: { classPropertyName: "applicationTheme", publicName: "applicationTheme", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaRequired: { classPropertyName: "ariaRequired", publicName: "ariaRequired", isSignal: true, isRequired: false, transformFunction: null }, showBadge: { classPropertyName: "showBadge", publicName: "showBadge", isSignal: true, isRequired: false, transformFunction: null }, notificationsAmount: { classPropertyName: "notificationsAmount", publicName: "notificationsAmount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isSelected: "isSelectedChange", close: "close", press: "press" }, viewQueries: [{ propertyName: "labelElement", first: true, predicate: ["labelElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? label() : ''\"\n [matTooltipClass]=\"theme()\"\n [tabindex]=\"tabIndex()\"\n class=\"tag-container\"\n [attr.data-testid]=\"'tag--container'\"\n [attr.theme]=\"theme()\"\n [class]=\"{\n filled: filled(),\n readonly: readOnly(),\n disabled: isDisabled(),\n outlined: !isSelected(),\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel() || label()\"\n [attr.aria-required]=\"ariaRequired()\"\n >\n @if (icon()) {\n <ui-icon class=\"icon\" [color]=\"iconColor\" [name]=\"iconToPass()\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n @if (isSelected() && showIconWhenSelected()) {\n <ui-icon [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n <span class=\"tag-label\" #labelElement>{{ label() }}</span>\n @if (showBadge()) {\n <span class=\"count\" aria-hidden=\"true\">\n <span class=\"count-dot\">&bull;</span>\n <span class=\"count-value\">{{ notificationsAmount() }}</span>\n </span>\n }\n @if (allowClose()) {\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex()\"\n class=\"delete-icon\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose(); $event.stopPropagation()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host .tag-wrapper{max-width:264px}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:fit-content;cursor:pointer;margin:4px}:host .tag-container:focus-visible{outline:2px solid #242424;animation:focus-ring-animation .4s forwards;outline-offset:2px;position:relative}:host .tag-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px;outline:2px solid #ffffff;border-radius:4px}:host .tag-container.outlined{border:1px solid #6894a0}:host .tag-container.filled{background:#e9f0f1;border:1px solid #e9f0f1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#a9c2c9;border:1px solid #1b4754}:host .tag-container:hover{background:#f6f6f6;border:1px solid #6894a0}:host .tag-container:active{background:#e9f0f1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#e9f0f1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border-radius:50px}:host .tag-container[theme=dark],:host .tag-container[theme=light]{border-radius:8px;background:#f4f4f4;border:1px solid #e9e9e9;color:#242424}:host .tag-container[theme=dark].outlined:not(.filled),:host .tag-container[theme=light].outlined:not(.filled){background:#fff;border-color:#919191}:host .tag-container[theme=dark].filled.readonly,:host .tag-container[theme=light].filled.readonly{border:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):hover,:host .tag-container[theme=light]:not(.readonly):not(.disabled):hover{background:#d3d3d3;border-color:#d3d3d3;color:#242424}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible{outline:2px solid #242424;outline-offset:2px;border-radius:10px;animation:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible:after,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible:after{display:none}:host .tag-container[theme=dark].shrink,:host .tag-container[theme=light].shrink{transform:scale(.98)}:host .tag-container[theme=dark].disabled,:host .tag-container[theme=light].disabled{pointer-events:none;--cnp-icon-color: #919191}:host .tag-container[theme=dark].disabled .tag-label,:host .tag-container[theme=dark].disabled .count-dot,:host .tag-container[theme=dark].disabled .count-value,:host .tag-container[theme=light].disabled .tag-label,:host .tag-container[theme=light].disabled .count-dot,:host .tag-container[theme=light].disabled .count-value{color:#919191}:host .tag-container[theme=dark] .count,:host .tag-container[theme=light] .count{display:inline-flex;align-items:center;gap:4px;margin-left:4px;font-size:14px;line-height:20px}:host .tag-container[theme=dark] .count-dot,:host .tag-container[theme=light] .count-dot{color:#666}:host .tag-container[theme=dark] .count-value,:host .tag-container[theme=light] .count-value{color:#242424;font-variant-numeric:tabular-nums}:host .tag-container[theme=dark] .icon,:host .tag-container[theme=light] .icon{margin-right:4px}:host .tag-container[theme=dark] .delete-icon,:host .tag-container[theme=light] .delete-icon{margin-left:4px;border-radius:4px;transition:outline-color .1s;outline:2px solid transparent}:host .tag-container[theme=dark] .delete-icon:focus-visible,:host .tag-container[theme=light] .delete-icon:focus-visible{outline-color:#242424}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mat-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"], dependencies: [{ kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: IconComponentModule }, { kind: "component", type: i1.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: UiTranslatePipe, name: "uiTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
203
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: TagComponent, isStandalone: true, selector: "ui-tag", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, allowClose: { classPropertyName: "allowClose", publicName: "allowClose", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, isSelected: { classPropertyName: "isSelected", publicName: "isSelected", isSignal: true, isRequired: false, transformFunction: null }, showIconWhenSelected: { classPropertyName: "showIconWhenSelected", publicName: "showIconWhenSelected", isSignal: true, isRequired: false, transformFunction: null }, pinnedBackground: { classPropertyName: "pinnedBackground", publicName: "pinnedBackground", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, applicationTheme: { classPropertyName: "applicationTheme", publicName: "applicationTheme", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, testId: { classPropertyName: "testId", publicName: "testId", isSignal: true, isRequired: false, transformFunction: null }, ariaRequired: { classPropertyName: "ariaRequired", publicName: "ariaRequired", isSignal: true, isRequired: false, transformFunction: null }, showBadge: { classPropertyName: "showBadge", publicName: "showBadge", isSignal: true, isRequired: false, transformFunction: null }, notificationsAmount: { classPropertyName: "notificationsAmount", publicName: "notificationsAmount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isSelected: "isSelectedChange", close: "close", press: "press" }, viewQueries: [{ propertyName: "labelElement", first: true, predicate: ["labelElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? label() : ''\"\n [matTooltipClass]=\"theme()\"\n [tabindex]=\"tabIndex()\"\n class=\"tag-container\"\n [attr.data-testid]=\"testId() ?? 'tag--container'\"\n [attr.theme]=\"theme()\"\n [class]=\"{\n filled: filled(),\n readonly: readOnly(),\n disabled: isDisabled(),\n outlined: !isSelected(),\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel() || label()\"\n [attr.aria-required]=\"ariaRequired()\"\n >\n @if (icon()) {\n <ui-icon class=\"icon\" [color]=\"iconColor\" [name]=\"iconToPass()\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n @if (isSelected() && showIconWhenSelected()) {\n <ui-icon [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n <span class=\"tag-label\" #labelElement>{{ label() }}</span>\n @if (showBadge()) {\n <span class=\"count\" aria-hidden=\"true\">\n <span class=\"count-dot\">&bull;</span>\n <span class=\"count-value\">{{ notificationsAmount() }}</span>\n </span>\n }\n @if (allowClose()) {\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex()\"\n class=\"delete-icon\"\n [attr.data-testid]=\"closeTestId()\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose(); $event.stopPropagation()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host .tag-wrapper{max-width:264px}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:fit-content;cursor:pointer;margin:4px}:host .tag-container:focus-visible{outline:2px solid #242424;animation:focus-ring-animation .4s forwards;outline-offset:2px;position:relative}:host .tag-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px;outline:2px solid #ffffff;border-radius:4px}:host .tag-container.outlined{border:1px solid #6894a0}:host .tag-container.filled{background:#e9f0f1;border:1px solid #e9f0f1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#a9c2c9;border:1px solid #1b4754}:host .tag-container:hover{background:#f6f6f6;border:1px solid #6894a0}:host .tag-container:active{background:#e9f0f1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#e9f0f1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border-radius:50px}:host .tag-container[theme=dark],:host .tag-container[theme=light]{border-radius:8px;background:#f4f4f4;border:1px solid #e9e9e9;color:#242424}:host .tag-container[theme=dark].outlined:not(.filled),:host .tag-container[theme=light].outlined:not(.filled){background:#fff;border-color:#919191}:host .tag-container[theme=dark].filled.readonly,:host .tag-container[theme=light].filled.readonly{border:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):hover,:host .tag-container[theme=light]:not(.readonly):not(.disabled):hover{background:#d3d3d3;border-color:#d3d3d3;color:#242424}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible{outline:2px solid #242424;outline-offset:2px;border-radius:10px;animation:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible:after,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible:after{display:none}:host .tag-container[theme=dark].shrink,:host .tag-container[theme=light].shrink{transform:scale(.98)}:host .tag-container[theme=dark].disabled,:host .tag-container[theme=light].disabled{pointer-events:none;--cnp-icon-color: #919191}:host .tag-container[theme=dark].disabled .tag-label,:host .tag-container[theme=dark].disabled .count-dot,:host .tag-container[theme=dark].disabled .count-value,:host .tag-container[theme=light].disabled .tag-label,:host .tag-container[theme=light].disabled .count-dot,:host .tag-container[theme=light].disabled .count-value{color:#919191}:host .tag-container[theme=dark] .count,:host .tag-container[theme=light] .count{display:inline-flex;align-items:center;gap:4px;margin-left:4px;font-size:14px;line-height:20px}:host .tag-container[theme=dark] .count-dot,:host .tag-container[theme=light] .count-dot{color:#666}:host .tag-container[theme=dark] .count-value,:host .tag-container[theme=light] .count-value{color:#242424;font-variant-numeric:tabular-nums}:host .tag-container[theme=dark] .icon,:host .tag-container[theme=light] .icon{margin-right:4px}:host .tag-container[theme=dark] .delete-icon,:host .tag-container[theme=light] .delete-icon{margin-left:4px;border-radius:4px;transition:outline-color .1s;outline:2px solid transparent}:host .tag-container[theme=dark] .delete-icon:focus-visible,:host .tag-container[theme=light] .delete-icon:focus-visible{outline-color:#242424}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mat-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"], dependencies: [{ kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: IconComponentModule }, { kind: "component", type: i1.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: UiTranslatePipe, name: "uiTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
202
204
  }
203
205
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: TagComponent, decorators: [{
204
206
  type: Component,
205
- args: [{ selector: 'ui-tag', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatTooltip, IconComponentModule, AsyncPipe, UiTranslatePipe], template: "<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? label() : ''\"\n [matTooltipClass]=\"theme()\"\n [tabindex]=\"tabIndex()\"\n class=\"tag-container\"\n [attr.data-testid]=\"'tag--container'\"\n [attr.theme]=\"theme()\"\n [class]=\"{\n filled: filled(),\n readonly: readOnly(),\n disabled: isDisabled(),\n outlined: !isSelected(),\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel() || label()\"\n [attr.aria-required]=\"ariaRequired()\"\n >\n @if (icon()) {\n <ui-icon class=\"icon\" [color]=\"iconColor\" [name]=\"iconToPass()\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n @if (isSelected() && showIconWhenSelected()) {\n <ui-icon [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n <span class=\"tag-label\" #labelElement>{{ label() }}</span>\n @if (showBadge()) {\n <span class=\"count\" aria-hidden=\"true\">\n <span class=\"count-dot\">&bull;</span>\n <span class=\"count-value\">{{ notificationsAmount() }}</span>\n </span>\n }\n @if (allowClose()) {\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex()\"\n class=\"delete-icon\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose(); $event.stopPropagation()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host .tag-wrapper{max-width:264px}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:fit-content;cursor:pointer;margin:4px}:host .tag-container:focus-visible{outline:2px solid #242424;animation:focus-ring-animation .4s forwards;outline-offset:2px;position:relative}:host .tag-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px;outline:2px solid #ffffff;border-radius:4px}:host .tag-container.outlined{border:1px solid #6894a0}:host .tag-container.filled{background:#e9f0f1;border:1px solid #e9f0f1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#a9c2c9;border:1px solid #1b4754}:host .tag-container:hover{background:#f6f6f6;border:1px solid #6894a0}:host .tag-container:active{background:#e9f0f1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#e9f0f1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border-radius:50px}:host .tag-container[theme=dark],:host .tag-container[theme=light]{border-radius:8px;background:#f4f4f4;border:1px solid #e9e9e9;color:#242424}:host .tag-container[theme=dark].outlined:not(.filled),:host .tag-container[theme=light].outlined:not(.filled){background:#fff;border-color:#919191}:host .tag-container[theme=dark].filled.readonly,:host .tag-container[theme=light].filled.readonly{border:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):hover,:host .tag-container[theme=light]:not(.readonly):not(.disabled):hover{background:#d3d3d3;border-color:#d3d3d3;color:#242424}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible{outline:2px solid #242424;outline-offset:2px;border-radius:10px;animation:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible:after,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible:after{display:none}:host .tag-container[theme=dark].shrink,:host .tag-container[theme=light].shrink{transform:scale(.98)}:host .tag-container[theme=dark].disabled,:host .tag-container[theme=light].disabled{pointer-events:none;--cnp-icon-color: #919191}:host .tag-container[theme=dark].disabled .tag-label,:host .tag-container[theme=dark].disabled .count-dot,:host .tag-container[theme=dark].disabled .count-value,:host .tag-container[theme=light].disabled .tag-label,:host .tag-container[theme=light].disabled .count-dot,:host .tag-container[theme=light].disabled .count-value{color:#919191}:host .tag-container[theme=dark] .count,:host .tag-container[theme=light] .count{display:inline-flex;align-items:center;gap:4px;margin-left:4px;font-size:14px;line-height:20px}:host .tag-container[theme=dark] .count-dot,:host .tag-container[theme=light] .count-dot{color:#666}:host .tag-container[theme=dark] .count-value,:host .tag-container[theme=light] .count-value{color:#242424;font-variant-numeric:tabular-nums}:host .tag-container[theme=dark] .icon,:host .tag-container[theme=light] .icon{margin-right:4px}:host .tag-container[theme=dark] .delete-icon,:host .tag-container[theme=light] .delete-icon{margin-left:4px;border-radius:4px;transition:outline-color .1s;outline:2px solid transparent}:host .tag-container[theme=dark] .delete-icon:focus-visible,:host .tag-container[theme=light] .delete-icon:focus-visible{outline-color:#242424}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mat-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"] }]
206
- }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], allowClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowClose", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], isSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "isSelected", required: false }] }, { type: i0.Output, args: ["isSelectedChange"] }], showIconWhenSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIconWhenSelected", required: false }] }], pinnedBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinnedBackground", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], applicationTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "applicationTheme", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaRequired", required: false }] }], showBadge: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBadge", required: false }] }], notificationsAmount: [{ type: i0.Input, args: [{ isSignal: true, alias: "notificationsAmount", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], press: [{ type: i0.Output, args: ["press"] }], labelElement: [{ type: i0.ViewChild, args: ['labelElement', { isSignal: true }] }] } });
207
+ args: [{ selector: 'ui-tag', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatTooltip, IconComponentModule, AsyncPipe, UiTranslatePipe], template: "<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? label() : ''\"\n [matTooltipClass]=\"theme()\"\n [tabindex]=\"tabIndex()\"\n class=\"tag-container\"\n [attr.data-testid]=\"testId() ?? 'tag--container'\"\n [attr.theme]=\"theme()\"\n [class]=\"{\n filled: filled(),\n readonly: readOnly(),\n disabled: isDisabled(),\n outlined: !isSelected(),\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel() || label()\"\n [attr.aria-required]=\"ariaRequired()\"\n >\n @if (icon()) {\n <ui-icon class=\"icon\" [color]=\"iconColor\" [name]=\"iconToPass()\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n @if (isSelected() && showIconWhenSelected()) {\n <ui-icon [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n <span class=\"tag-label\" #labelElement>{{ label() }}</span>\n @if (showBadge()) {\n <span class=\"count\" aria-hidden=\"true\">\n <span class=\"count-dot\">&bull;</span>\n <span class=\"count-value\">{{ notificationsAmount() }}</span>\n </span>\n }\n @if (allowClose()) {\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex()\"\n class=\"delete-icon\"\n [attr.data-testid]=\"closeTestId()\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose(); $event.stopPropagation()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host .tag-wrapper{max-width:264px}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:fit-content;cursor:pointer;margin:4px}:host .tag-container:focus-visible{outline:2px solid #242424;animation:focus-ring-animation .4s forwards;outline-offset:2px;position:relative}:host .tag-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px;outline:2px solid #ffffff;border-radius:4px}:host .tag-container.outlined{border:1px solid #6894a0}:host .tag-container.filled{background:#e9f0f1;border:1px solid #e9f0f1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#a9c2c9;border:1px solid #1b4754}:host .tag-container:hover{background:#f6f6f6;border:1px solid #6894a0}:host .tag-container:active{background:#e9f0f1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#e9f0f1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border-radius:50px}:host .tag-container[theme=dark],:host .tag-container[theme=light]{border-radius:8px;background:#f4f4f4;border:1px solid #e9e9e9;color:#242424}:host .tag-container[theme=dark].outlined:not(.filled),:host .tag-container[theme=light].outlined:not(.filled){background:#fff;border-color:#919191}:host .tag-container[theme=dark].filled.readonly,:host .tag-container[theme=light].filled.readonly{border:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):hover,:host .tag-container[theme=light]:not(.readonly):not(.disabled):hover{background:#d3d3d3;border-color:#d3d3d3;color:#242424}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible{outline:2px solid #242424;outline-offset:2px;border-radius:10px;animation:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible:after,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible:after{display:none}:host .tag-container[theme=dark].shrink,:host .tag-container[theme=light].shrink{transform:scale(.98)}:host .tag-container[theme=dark].disabled,:host .tag-container[theme=light].disabled{pointer-events:none;--cnp-icon-color: #919191}:host .tag-container[theme=dark].disabled .tag-label,:host .tag-container[theme=dark].disabled .count-dot,:host .tag-container[theme=dark].disabled .count-value,:host .tag-container[theme=light].disabled .tag-label,:host .tag-container[theme=light].disabled .count-dot,:host .tag-container[theme=light].disabled .count-value{color:#919191}:host .tag-container[theme=dark] .count,:host .tag-container[theme=light] .count{display:inline-flex;align-items:center;gap:4px;margin-left:4px;font-size:14px;line-height:20px}:host .tag-container[theme=dark] .count-dot,:host .tag-container[theme=light] .count-dot{color:#666}:host .tag-container[theme=dark] .count-value,:host .tag-container[theme=light] .count-value{color:#242424;font-variant-numeric:tabular-nums}:host .tag-container[theme=dark] .icon,:host .tag-container[theme=light] .icon{margin-right:4px}:host .tag-container[theme=dark] .delete-icon,:host .tag-container[theme=light] .delete-icon{margin-left:4px;border-radius:4px;transition:outline-color .1s;outline:2px solid transparent}:host .tag-container[theme=dark] .delete-icon:focus-visible,:host .tag-container[theme=light] .delete-icon:focus-visible{outline-color:#242424}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mat-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"] }]
208
+ }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], allowClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowClose", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], isSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "isSelected", required: false }] }, { type: i0.Output, args: ["isSelectedChange"] }], showIconWhenSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIconWhenSelected", required: false }] }], pinnedBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinnedBackground", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], applicationTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "applicationTheme", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], testId: [{ type: i0.Input, args: [{ isSignal: true, alias: "testId", required: false }] }], ariaRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaRequired", required: false }] }], showBadge: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBadge", required: false }] }], notificationsAmount: [{ type: i0.Input, args: [{ isSignal: true, alias: "notificationsAmount", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], press: [{ type: i0.Output, args: ["press"] }], labelElement: [{ type: i0.ViewChild, args: ['labelElement', { isSignal: true }] }] } });
207
209
 
208
210
  class TagComponentModule {
209
211
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: TagComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-tag.mjs","sources":["../../../components/tag/tag.component.ts","../../../components/tag/tag.component.html","../../../components/tag/tag.component.module.ts","../../../components/tag/testgorilla-tgo-ui-components-tag.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n ProviderToken,\n signal,\n viewChild,\n} from '@angular/core';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { debounceTime, map, ReplaySubject } from 'rxjs';\n\nimport { ApplicationTheme, IKeyboardEvent, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconColor, IconName, IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\n@Component({\n selector: 'ui-tag',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './tag.component.html',\n styleUrls: ['./tag.component.scss'],\n imports: [MatTooltip, IconComponentModule, AsyncPipe, UiTranslatePipe],\n})\nexport class TagComponent {\n /**\n * Tag's label\n *\n * @memberof TagComponent\n */\n label = input<string>('');\n\n /**\n * Icon\n *\n * @type {string}\n * @memberof TagComponent\n */\n icon = input<IconName>('');\n\n /**\n * Whether to allow the tag to be closed.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n allowClose = input(false, { transform: booleanAttribute });\n\n /**\n * Whether the tag is in read-only mode.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n readOnly = input(false, { transform: booleanAttribute });\n\n /**\n * Whether the tag is selected.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n isSelected = model(false);\n\n /**\n * Display icon when is selected\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n showIconWhenSelected = input(false, { transform: booleanAttribute });\n\n /**\n * Pins the tag to its filled background at rest, without tying that background\n * to the selected state — pressing the tag never flips its fill. Interactive\n * states (hover, focus ring, press scale) and the `press` output are unaffected,\n * so the tag stays clickable; use `readOnly` when it should not be.\n *\n * The fill follows the theme: grayscale in `light` / `dark`, petrol in `classic`.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n pinnedBackground = input(false, { transform: booleanAttribute });\n\n /**\n * Specifies whether the element is disabled.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n isDisabled = input(false, { transform: booleanAttribute });\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme | undefined}\n * @memberof TagComponent\n *\n * When not provided, the component falls back to the injected\n * `CANOPYUI_DEFAULT_APPLICATION_THEME` token (if any), then to `'light'`.\n */\n applicationTheme = input<ApplicationTheme | undefined>(undefined);\n private readonly defaultAppTheme = inject<ApplicationTheme>(\n 'CANOPYUI_DEFAULT_APPLICATION_THEME' as unknown as ProviderToken<ApplicationTheme>,\n { optional: true }\n );\n readonly theme = computed<ApplicationTheme>(() => this.applicationTheme() ?? this.defaultAppTheme ?? 'light');\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof TagComponent\n */\n ariaLabel = input<string | undefined>(undefined);\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {boolean}\n * @memberof TagComponent\n */\n ariaRequired = input(false, { transform: booleanAttribute });\n\n /**\n * Whether to show the badge on the tag.\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n showBadge = input<boolean>(false);\n\n /**\n * The notifications amount to be displayed on the badge.\n * @type {number}\n * @default 0\n * @memberof TagComponent\n */\n notificationsAmount = input<number>(0);\n\n /**\n * Event triggered when the tag should be closed.\n *\n * @event\n * @memberof TagComponent\n */\n // eslint-disable-next-line @angular-eslint/no-output-native -- output shadows a native event; rename is breaking, deferred to the breaking-change MAJOR (see plan)\n close = output<void>();\n\n /**\n * Event triggered when a press action occurs.\n *\n * @event\n * @memberof TagComponent\n */\n press = output<boolean>();\n\n /**\n * Subject that needs to be triggered when Label input changes, to check if it's truncated\n * @private\n * @type {void}\n * @memberof TagComponent\n */\n private readonly checkLabelEllipsis$ = new ReplaySubject<void>(1);\n\n /**\n * Observable that indicates if the Label is truncated\n * debounceTime is used to wait for view to be initialized after receiving a new Label input\n * @protected\n * @type {boolean}\n * @memberof TagComponent\n */\n protected isEllipseActiveObs$ = this.checkLabelEllipsis$.pipe(\n debounceTime(100),\n map(() => {\n const el = this.labelElement()?.nativeElement;\n return el ? el.offsetWidth < el.scrollWidth : false;\n })\n );\n protected readonly isHovered = signal(false);\n protected shrink = false;\n protected readonly iconToPass = computed<IconName>(() =>\n this.theme() !== 'classic' && this.isHovered() ? (`${this.icon()}-filled` as IconName) : this.icon()\n );\n protected iconColor: IconColor = 'black';\n protected closeBtnFocused = signal(false);\n\n protected readonly labelElement = viewChild<ElementRef<HTMLElement>>('labelElement');\n\n constructor() {\n effect(() => {\n this.label(); // dep — re-run on label change\n this.labelElement(); // dep — re-run once @ViewChild resolves\n this.isLabelEllipseActive();\n });\n }\n\n onPress(): void {\n if (!this.readOnly() && !this.allowClose()) {\n const newSelected = this.showIconWhenSelected() ? !this.isSelected() : false;\n this.isSelected.set(newSelected);\n this.press.emit(newSelected);\n }\n }\n\n setHoverState(state: boolean) {\n if (this.theme() === 'classic') {\n return;\n }\n this.isHovered.set(state);\n }\n\n setShrinkState(state: boolean) {\n this.shrink = state;\n }\n\n onClose(): void {\n this.close.emit();\n }\n\n private isLabelEllipseActive(): void {\n this.checkLabelEllipsis$.next();\n }\n\n readonly tabIndex = computed(() => (this.isDisabled() || this.readOnly() ? -1 : 0));\n\n readonly filled = computed(\n () => this.readOnly() || this.allowClose() || this.isSelected() || this.pinnedBackground()\n );\n\n onKeydown($event: KeyboardEvent): void {\n if (\n ($event.key === (IKeyboardEvent.ENTER as string) || $event.key === (IKeyboardEvent.SPACE as string)) &&\n !this.closeBtnFocused()\n ) {\n this.onPress();\n } else if (\n this.closeBtnFocused() &&\n ($event.key === (IKeyboardEvent.ENTER as string) || $event.key === (IKeyboardEvent.SPACE as string))\n ) {\n this.onClose();\n }\n }\n}\n","<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? label() : ''\"\n [matTooltipClass]=\"theme()\"\n [tabindex]=\"tabIndex()\"\n class=\"tag-container\"\n [attr.data-testid]=\"'tag--container'\"\n [attr.theme]=\"theme()\"\n [class]=\"{\n filled: filled(),\n readonly: readOnly(),\n disabled: isDisabled(),\n outlined: !isSelected(),\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel() || label()\"\n [attr.aria-required]=\"ariaRequired()\"\n >\n @if (icon()) {\n <ui-icon class=\"icon\" [color]=\"iconColor\" [name]=\"iconToPass()\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n @if (isSelected() && showIconWhenSelected()) {\n <ui-icon [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n <span class=\"tag-label\" #labelElement>{{ label() }}</span>\n @if (showBadge()) {\n <span class=\"count\" aria-hidden=\"true\">\n <span class=\"count-dot\">&bull;</span>\n <span class=\"count-value\">{{ notificationsAmount() }}</span>\n </span>\n }\n @if (allowClose()) {\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex()\"\n class=\"delete-icon\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose(); $event.stopPropagation()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { TooltipComponentModule } from '@testgorilla/tgo-ui/components/tooltip';\n\nimport { TagComponent } from './tag.component';\n\n@NgModule({\n imports: [\n CommonModule,\n IconComponentModule,\n TooltipComponentModule,\n MatTooltipModule,\n MatInputModule,\n UiTranslatePipe,\n TagComponent,\n ],\n exports: [TagComponent],\n providers: [],\n})\nexport class TagComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MA6Ba,YAAY,CAAA;AA6KvB,IAAA,WAAA,GAAA;AA5KA;;;;AAIG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AAEzB;;;;;AAKG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAW,EAAE,2EAAC;AAE1B;;;;;;AAMG;QACH,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE1D;;;;;;AAMG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExD;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KA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,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAX3B,YAAY;YACZ,mBAAmB;YACnB,sBAAsB;YACtB,gBAAgB;YAChB,cAAc;YACd,eAAe;AACf,YAAA,YAAY,aAEJ,YAAY,CAAA,EAAA,CAAA,CAAA;AAGX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAX3B,YAAY;YACZ,mBAAmB;YACnB,sBAAsB;YACtB,gBAAgB;YAChB,cAAc;YAEd,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAKH,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,sBAAsB;wBACtB,gBAAgB;wBAChB,cAAc;wBACd,eAAe;wBACf,YAAY;AACb,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACvBD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-tag.mjs","sources":["../../../components/tag/tag.component.ts","../../../components/tag/tag.component.html","../../../components/tag/tag.component.module.ts","../../../components/tag/testgorilla-tgo-ui-components-tag.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n ProviderToken,\n signal,\n viewChild,\n} from '@angular/core';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { debounceTime, map, ReplaySubject } from 'rxjs';\n\nimport { ApplicationTheme, IKeyboardEvent, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconColor, IconName, IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\n@Component({\n selector: 'ui-tag',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './tag.component.html',\n styleUrls: ['./tag.component.scss'],\n imports: [MatTooltip, IconComponentModule, AsyncPipe, UiTranslatePipe],\n})\nexport class TagComponent {\n /**\n * Tag's label\n *\n * @memberof TagComponent\n */\n label = input<string>('');\n\n /**\n * Icon\n *\n * @type {string}\n * @memberof TagComponent\n */\n icon = input<IconName>('');\n\n /**\n * Whether to allow the tag to be closed.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n allowClose = input(false, { transform: booleanAttribute });\n\n /**\n * Whether the tag is in read-only mode.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n readOnly = input(false, { transform: booleanAttribute });\n\n /**\n * Whether the tag is selected.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n isSelected = model(false);\n\n /**\n * Display icon when is selected\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n showIconWhenSelected = input(false, { transform: booleanAttribute });\n\n /**\n * Pins the tag to its filled background at rest, without tying that background\n * to the selected state — pressing the tag never flips its fill. Interactive\n * states (hover, focus ring, press scale) and the `press` output are unaffected,\n * so the tag stays clickable; use `readOnly` when it should not be.\n *\n * The fill follows the theme: grayscale in `light` / `dark`, petrol in `classic`.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n pinnedBackground = input(false, { transform: booleanAttribute });\n\n /**\n * Specifies whether the element is disabled.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n isDisabled = input(false, { transform: booleanAttribute });\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme | undefined}\n * @memberof TagComponent\n *\n * When not provided, the component falls back to the injected\n * `CANOPYUI_DEFAULT_APPLICATION_THEME` token (if any), then to `'light'`.\n */\n applicationTheme = input<ApplicationTheme | undefined>(undefined);\n private readonly defaultAppTheme = inject<ApplicationTheme>(\n 'CANOPYUI_DEFAULT_APPLICATION_THEME' as unknown as ProviderToken<ApplicationTheme>,\n { optional: true }\n );\n readonly theme = computed<ApplicationTheme>(() => this.applicationTheme() ?? this.defaultAppTheme ?? 'light');\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof TagComponent\n */\n ariaLabel = input<string | undefined>(undefined);\n\n readonly testId = input<string | null>(null);\n\n protected readonly closeTestId = computed(() => (this.testId() ? `${this.testId()}-remove` : null));\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {boolean}\n * @memberof TagComponent\n */\n ariaRequired = input(false, { transform: booleanAttribute });\n\n /**\n * Whether to show the badge on the tag.\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n showBadge = input<boolean>(false);\n\n /**\n * The notifications amount to be displayed on the badge.\n * @type {number}\n * @default 0\n * @memberof TagComponent\n */\n notificationsAmount = input<number>(0);\n\n /**\n * Event triggered when the tag should be closed.\n *\n * @event\n * @memberof TagComponent\n */\n // eslint-disable-next-line @angular-eslint/no-output-native -- output shadows a native event; rename is breaking, deferred to the breaking-change MAJOR (see plan)\n close = output<void>();\n\n /**\n * Event triggered when a press action occurs.\n *\n * @event\n * @memberof TagComponent\n */\n press = output<boolean>();\n\n /**\n * Subject that needs to be triggered when Label input changes, to check if it's truncated\n * @private\n * @type {void}\n * @memberof TagComponent\n */\n private readonly checkLabelEllipsis$ = new ReplaySubject<void>(1);\n\n /**\n * Observable that indicates if the Label is truncated\n * debounceTime is used to wait for view to be initialized after receiving a new Label input\n * @protected\n * @type {boolean}\n * @memberof TagComponent\n */\n protected isEllipseActiveObs$ = this.checkLabelEllipsis$.pipe(\n debounceTime(100),\n map(() => {\n const el = this.labelElement()?.nativeElement;\n return el ? el.offsetWidth < el.scrollWidth : false;\n })\n );\n protected readonly isHovered = signal(false);\n protected shrink = false;\n protected readonly iconToPass = computed<IconName>(() =>\n this.theme() !== 'classic' && this.isHovered() ? (`${this.icon()}-filled` as IconName) : this.icon()\n );\n protected iconColor: IconColor = 'black';\n protected closeBtnFocused = signal(false);\n\n protected readonly labelElement = viewChild<ElementRef<HTMLElement>>('labelElement');\n\n constructor() {\n effect(() => {\n this.label(); // dep — re-run on label change\n this.labelElement(); // dep — re-run once @ViewChild resolves\n this.isLabelEllipseActive();\n });\n }\n\n onPress(): void {\n if (!this.readOnly() && !this.allowClose()) {\n const newSelected = this.showIconWhenSelected() ? !this.isSelected() : false;\n this.isSelected.set(newSelected);\n this.press.emit(newSelected);\n }\n }\n\n setHoverState(state: boolean) {\n if (this.theme() === 'classic') {\n return;\n }\n this.isHovered.set(state);\n }\n\n setShrinkState(state: boolean) {\n this.shrink = state;\n }\n\n onClose(): void {\n this.close.emit();\n }\n\n private isLabelEllipseActive(): void {\n this.checkLabelEllipsis$.next();\n }\n\n readonly tabIndex = computed(() => (this.isDisabled() || this.readOnly() ? -1 : 0));\n\n readonly filled = computed(\n () => this.readOnly() || this.allowClose() || this.isSelected() || this.pinnedBackground()\n );\n\n onKeydown($event: KeyboardEvent): void {\n if (\n ($event.key === (IKeyboardEvent.ENTER as string) || $event.key === (IKeyboardEvent.SPACE as string)) &&\n !this.closeBtnFocused()\n ) {\n this.onPress();\n } else if (\n this.closeBtnFocused() &&\n ($event.key === (IKeyboardEvent.ENTER as string) || $event.key === (IKeyboardEvent.SPACE as string))\n ) {\n this.onClose();\n }\n }\n}\n","<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? label() : ''\"\n [matTooltipClass]=\"theme()\"\n [tabindex]=\"tabIndex()\"\n class=\"tag-container\"\n [attr.data-testid]=\"testId() ?? 'tag--container'\"\n [attr.theme]=\"theme()\"\n [class]=\"{\n filled: filled(),\n readonly: readOnly(),\n disabled: isDisabled(),\n outlined: !isSelected(),\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel() || label()\"\n [attr.aria-required]=\"ariaRequired()\"\n >\n @if (icon()) {\n <ui-icon class=\"icon\" [color]=\"iconColor\" [name]=\"iconToPass()\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n @if (isSelected() && showIconWhenSelected()) {\n <ui-icon [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n <span class=\"tag-label\" #labelElement>{{ label() }}</span>\n @if (showBadge()) {\n <span class=\"count\" aria-hidden=\"true\">\n <span class=\"count-dot\">&bull;</span>\n <span class=\"count-value\">{{ notificationsAmount() }}</span>\n </span>\n }\n @if (allowClose()) {\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex()\"\n class=\"delete-icon\"\n [attr.data-testid]=\"closeTestId()\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose(); $event.stopPropagation()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { TooltipComponentModule } from '@testgorilla/tgo-ui/components/tooltip';\n\nimport { TagComponent } from './tag.component';\n\n@NgModule({\n imports: [\n CommonModule,\n IconComponentModule,\n TooltipComponentModule,\n MatTooltipModule,\n MatInputModule,\n UiTranslatePipe,\n TagComponent,\n ],\n exports: [TagComponent],\n providers: [],\n})\nexport class TagComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MA6Ba,YAAY,CAAA;AAiLvB,IAAA,WAAA,GAAA;AAhLA;;;;AAIG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,4EAAC;AAEzB;;;;;AAKG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAW,EAAE,2EAAC;AAE1B;;;;;;AAMG;QACH,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE1D;;;;;;AAMG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExD;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK,iFAAC;AAEzB;;;;;;AAMG;QACH,IAAA,CAAA,oBAAoB,GAAG,KAAK,CAAC,KAAK,4FAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEpE;;;;;;;;;;;AAWG;QACH,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAC,KAAK,wFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEhE;;;;;;AAMG;QACH,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,KAAK,kFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE1D;;;;;;;;;AASG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAA+B,SAAS,uFAAC;QAChD,IAAA,CAAA,eAAe,GAAG,MAAM,CACvC,oCAAkF,EAClF,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB;AACQ,QAAA,IAAA,CAAA,K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,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAX3B,YAAY;YACZ,mBAAmB;YACnB,sBAAsB;YACtB,gBAAgB;YAChB,cAAc;YACd,eAAe;AACf,YAAA,YAAY,aAEJ,YAAY,CAAA,EAAA,CAAA,CAAA;AAGX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAX3B,YAAY;YACZ,mBAAmB;YACnB,sBAAsB;YACtB,gBAAgB;YAChB,cAAc;YAEd,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAKH,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,sBAAsB;wBACtB,gBAAgB;wBAChB,cAAc;wBACd,eAAe;wBACf,YAAY;AACb,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACvBD;;AAEG;;;;"}
@@ -10,6 +10,7 @@ import { SpinnerComponent, SpinnerComponentModule } from '@testgorilla/tgo-ui/co
10
10
  import { MatInputModule } from '@angular/material/input';
11
11
 
12
12
  class ToggleComponent {
13
+ static { this.nextInstanceId = 0; }
13
14
  constructor(defaultAppTheme) {
14
15
  this.defaultAppTheme = defaultAppTheme;
15
16
  /**
@@ -60,6 +61,7 @@ class ToggleComponent {
60
61
  */
61
62
  // eslint-disable-next-line @angular-eslint/no-output-native -- output shadows a native event; rename is breaking, deferred to the breaking-change MAJOR (see plan)
62
63
  this.toggle = new EventEmitter();
64
+ this.testId = null;
63
65
  /**
64
66
  * A string representing the ARIA requirement for accessibility.
65
67
  * This attribute is used to indicate whether an input field is required for form submission.
@@ -88,6 +90,9 @@ class ToggleComponent {
88
90
  */
89
91
  this.ariaDescribedby = '';
90
92
  this.showLabelTooltip = false;
93
+ // Shared ids would point every toggle's `aria-labelledby` at the first toggle's label.
94
+ this.labelId = `ui-toggle-label-${++ToggleComponent.nextInstanceId}`;
95
+ this.describedbyId = `ui-toggle-describedby-${ToggleComponent.nextInstanceId}`;
91
96
  this.cdr = inject(ChangeDetectorRef);
92
97
  this.onChange = () => { };
93
98
  this.onTouched = () => { };
@@ -147,13 +152,13 @@ class ToggleComponent {
147
152
  this.classes = `${this.disabled ? 'disabled' : ''} ${this.applicationTheme} ${this.loading ? 'loading' : ''} ${!this.label ? 'small-toggle' : ''}`;
148
153
  }
149
154
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ToggleComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
150
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: ToggleComponent, isStandalone: true, selector: "ui-toggle", inputs: { selected: "selected", disabled: "disabled", label: "label", message: "message", maxWidth: "maxWidth", applicationTheme: "applicationTheme", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", preventClick: "preventClick", loading: "loading", ariaDescribedby: "ariaDescribedby" }, outputs: { toggle: "toggle" }, host: { properties: { "style.--max-width": "this.maxWidth" } }, providers: [
155
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: ToggleComponent, isStandalone: true, selector: "ui-toggle", inputs: { selected: "selected", disabled: "disabled", label: "label", message: "message", maxWidth: "maxWidth", applicationTheme: "applicationTheme", ariaLabel: "ariaLabel", testId: "testId", ariaRequired: "ariaRequired", preventClick: "preventClick", loading: "loading", ariaDescribedby: "ariaDescribedby" }, outputs: { toggle: "toggle" }, host: { properties: { "style.--max-width": "this.maxWidth" } }, providers: [
151
156
  {
152
157
  provide: NG_VALUE_ACCESSOR,
153
158
  useExisting: forwardRef(() => ToggleComponent),
154
159
  multi: true,
155
160
  },
156
- ], usesOnChanges: true, ngImport: i0, template: "<div class=\"toggle\" [ngClass]=\"classes\">\n <div\n [style.--max-width]=\"maxWidth + 'px'\"\n tabindex=\"0\"\n class=\"toggle-container\"\n [ngClass]=\"{ active: selected }\"\n (click)=\"onToggle()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n (keydown)=\"onKeydown($event)\"\n role=\"switch\"\n [attr.aria-labelledby]=\"'label'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n [attr.aria-checked]=\"selected\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n <div\n class=\"label\"\n uiEllipseText\n [matTooltipShowDelay]=\"800\"\n [matTooltip]=\"showLabelTooltip ? label : ''\"\n (onChangeTextState)=\"changeTextState($event)\"\n id=\"label\"\n >\n {{ label }}\n </div>\n @if (!loading) {\n <div class=\"knob\" [ngClass]=\"{ selected }\">\n @if (selected && !label) {\n <ui-icon [color]=\"disabled ? 'grey' : 'white'\" [size]=\"'16'\" [name]=\"'Check-round-filled'\"></ui-icon>\n }\n </div>\n } @else {\n <ui-spinner [isLoader]=\"false\" [size]=\"'small'\" [applicationTheme]=\"'dark'\"></ui-spinner>\n }\n </div>\n @if (message && selected) {\n <div class=\"message\">{{ message }}</div>\n }\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{width:fit-content;display:block}:host .toggle{height:auto;width:fit-content;display:flex;flex-direction:column;align-items:center}:host .toggle .toggle-container{border:1px solid transparent}:host .toggle.disabled{opacity:.5}:host .toggle.disabled .label{color:#242424!important}:host .toggle.disabled .toggle-container{background:#e0e0e0;pointer-events:none}:host .toggle.disabled .toggle-container:focus{outline:none}:host .toggle.dark.disabled .toggle-container.active,:host .toggle.light.disabled .toggle-container.active{background:#e9e9e9;border:1px solid #242424}:host .toggle.dark.disabled .toggle-container.active .knob:after,:host .toggle.light.disabled .toggle-container.active .knob:after{background:#242424}:host .toggle.dark .toggle-container,:host .toggle.light .toggle-container{background:transparent;border:1px solid #242424}:host .toggle.dark .toggle-container .label,:host .toggle.light .toggle-container .label{color:#242424}:host .toggle.dark .toggle-container .knob:after,:host .toggle.light .toggle-container .knob:after{background:#242424}:host .toggle.dark .toggle-container.active,:host .toggle.light .toggle-container.active{background:#d410aa;border:1px solid #d410aa}:host .toggle.dark .toggle-container.active .label,:host .toggle.light .toggle-container.active .label{color:#fff}:host .toggle.dark .toggle-container.active .knob:after,:host .toggle.light .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .message,:host .toggle.light .message{color:#242424}:host .toggle.dark.disabled .toggle-container.active{border-color:#fff}:host .toggle.dark.disabled .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .toggle-container{border-color:#fff}:host .toggle.dark .toggle-container .label{color:#fff}:host .toggle.dark .toggle-container .knob:after{background:#fff}:host .toggle.dark .message{color:#fff}:host .toggle .toggle-container{min-height:20px;max-height:24px;max-width:var(--max-width);padding:0 3px 0 20px;width:fit-content;min-width:36px;border-radius:16px;background:#888;display:flex;align-items:center;cursor:pointer;position:relative;transition:transform .3s,padding .3s,background .3s}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .toggle .toggle-container:focus-visible{position:relative;outline:2px solid #242424;outline-offset:2px;animation:focus-ring-animation .4s forwards}:host .toggle .toggle-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 2px);height:calc(100% + 2px);top:-1px;left:-1px;outline:2px solid #ffffff;border-radius:16px}:host .toggle .toggle-container .knob{height:100%;width:100%;position:absolute;left:-1px;top:0;display:flex;align-items:center;padding:3px;max-height:20px;transition:transform .3s}:host .toggle .toggle-container .knob:after{content:\"\";display:block;border-radius:16px;width:12px;height:12px;background:#fff;transition:background .3s}:host .toggle .toggle-container .label{z-index:1;font-size:8px;font-weight:700;color:#fff;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;pointer-events:visible;line-height:16px}:host .toggle .toggle-container.active{background:#276678;padding:0 20px 0 3px}:host .toggle .toggle-container.active .knob{transform:translate(calc(100% - 15px))}:host .toggle .message{margin-top:4px;font-weight:700;font-size:12px;line-height:16px;color:#276678;text-align:justify}:host .toggle.small-toggle .toggle-container .knob{left:0}:host .toggle.small-toggle .toggle-container .knob:after{width:10px;height:10px}:host .toggle.small-toggle .toggle-container .knob.selected{left:-8px}:host .toggle.small-toggle .toggle-container .knob.selected:after{display:none}:host .toggle.small-toggle .toggle-container .knob.selected ui-icon ::ng-deep svg{width:20px;height:20px}:host .toggle.loading .toggle-container{border-color:#d410aa;background-color:#d410aa;padding:0;display:flex;justify-content:center;cursor:default}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mat-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: EllipseTextDirective, selector: "[uiEllipseText]", inputs: ["isMultiline", "maxDiffPixels", "refresh"], outputs: ["onChangeTextState"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: IconComponentModule }, { kind: "component", type: i1.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["size", "isLoader", "text", "applicationTheme", "iconName", "iconSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
161
+ ], usesOnChanges: true, ngImport: i0, template: "<div class=\"toggle\" [ngClass]=\"classes\">\n <div\n [style.--max-width]=\"maxWidth + 'px'\"\n tabindex=\"0\"\n class=\"toggle-container\"\n [ngClass]=\"{ active: selected }\"\n (click)=\"onToggle()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n (keydown)=\"onKeydown($event)\"\n role=\"switch\"\n [attr.aria-labelledby]=\"label ? labelId : null\"\n [attr.aria-describedby]=\"ariaDescribedby ? describedbyId : null\"\n [attr.aria-checked]=\"selected\"\n [attr.data-testid]=\"testId\"\n >\n <span [style.display]=\"'none'\" [id]=\"describedbyId\">{{ ariaDescribedby }}</span>\n <div\n class=\"label\"\n uiEllipseText\n [matTooltipShowDelay]=\"800\"\n [matTooltip]=\"showLabelTooltip ? label : ''\"\n (onChangeTextState)=\"changeTextState($event)\"\n [id]=\"labelId\"\n >\n {{ label }}\n </div>\n @if (!loading) {\n <div class=\"knob\" [ngClass]=\"{ selected }\">\n @if (selected && !label) {\n <ui-icon [color]=\"disabled ? 'grey' : 'white'\" [size]=\"'16'\" [name]=\"'Check-round-filled'\"></ui-icon>\n }\n </div>\n } @else {\n <ui-spinner [isLoader]=\"false\" [size]=\"'small'\" [applicationTheme]=\"'dark'\"></ui-spinner>\n }\n </div>\n @if (message && selected) {\n <div class=\"message\">{{ message }}</div>\n }\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{width:fit-content;display:block}:host .toggle{height:auto;width:fit-content;display:flex;flex-direction:column;align-items:center}:host .toggle .toggle-container{border:1px solid transparent}:host .toggle.disabled{opacity:.5}:host .toggle.disabled .label{color:#242424!important}:host .toggle.disabled .toggle-container{background:#e0e0e0;pointer-events:none}:host .toggle.disabled .toggle-container:focus{outline:none}:host .toggle.dark.disabled .toggle-container.active,:host .toggle.light.disabled .toggle-container.active{background:#e9e9e9;border:1px solid #242424}:host .toggle.dark.disabled .toggle-container.active .knob:after,:host .toggle.light.disabled .toggle-container.active .knob:after{background:#242424}:host .toggle.dark .toggle-container,:host .toggle.light .toggle-container{background:transparent;border:1px solid #242424}:host .toggle.dark .toggle-container .label,:host .toggle.light .toggle-container .label{color:#242424}:host .toggle.dark .toggle-container .knob:after,:host .toggle.light .toggle-container .knob:after{background:#242424}:host .toggle.dark .toggle-container.active,:host .toggle.light .toggle-container.active{background:#d410aa;border:1px solid #d410aa}:host .toggle.dark .toggle-container.active .label,:host .toggle.light .toggle-container.active .label{color:#fff}:host .toggle.dark .toggle-container.active .knob:after,:host .toggle.light .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .message,:host .toggle.light .message{color:#242424}:host .toggle.dark.disabled .toggle-container.active{border-color:#fff}:host .toggle.dark.disabled .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .toggle-container{border-color:#fff}:host .toggle.dark .toggle-container .label{color:#fff}:host .toggle.dark .toggle-container .knob:after{background:#fff}:host .toggle.dark .message{color:#fff}:host .toggle .toggle-container{min-height:20px;max-height:24px;max-width:var(--max-width);padding:0 3px 0 20px;width:fit-content;min-width:36px;border-radius:16px;background:#888;display:flex;align-items:center;cursor:pointer;position:relative;transition:transform .3s,padding .3s,background .3s}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .toggle .toggle-container:focus-visible{position:relative;outline:2px solid #242424;outline-offset:2px;animation:focus-ring-animation .4s forwards}:host .toggle .toggle-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 2px);height:calc(100% + 2px);top:-1px;left:-1px;outline:2px solid #ffffff;border-radius:16px}:host .toggle .toggle-container .knob{height:100%;width:100%;position:absolute;left:-1px;top:0;display:flex;align-items:center;padding:3px;max-height:20px;transition:transform .3s}:host .toggle .toggle-container .knob:after{content:\"\";display:block;border-radius:16px;width:12px;height:12px;background:#fff;transition:background .3s}:host .toggle .toggle-container .label{z-index:1;font-size:8px;font-weight:700;color:#fff;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;pointer-events:visible;line-height:16px}:host .toggle .toggle-container.active{background:#276678;padding:0 20px 0 3px}:host .toggle .toggle-container.active .knob{transform:translate(calc(100% - 15px))}:host .toggle .message{margin-top:4px;font-weight:700;font-size:12px;line-height:16px;color:#276678;text-align:justify}:host .toggle.small-toggle .toggle-container .knob{left:0}:host .toggle.small-toggle .toggle-container .knob:after{width:10px;height:10px}:host .toggle.small-toggle .toggle-container .knob.selected{left:-8px}:host .toggle.small-toggle .toggle-container .knob.selected:after{display:none}:host .toggle.small-toggle .toggle-container .knob.selected ui-icon ::ng-deep svg{width:20px;height:20px}:host .toggle.loading .toggle-container{border-color:#d410aa;background-color:#d410aa;padding:0;display:flex;justify-content:center;cursor:default}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mat-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: EllipseTextDirective, selector: "[uiEllipseText]", inputs: ["isMultiline", "maxDiffPixels", "refresh"], outputs: ["onChangeTextState"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: IconComponentModule }, { kind: "component", type: i1.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["size", "isLoader", "text", "applicationTheme", "iconName", "iconSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
157
162
  }
158
163
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: ToggleComponent, decorators: [{
159
164
  type: Component,
@@ -163,7 +168,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
163
168
  useExisting: forwardRef(() => ToggleComponent),
164
169
  multi: true,
165
170
  },
166
- ], imports: [NgClass, EllipseTextDirective, MatTooltip, IconComponentModule, SpinnerComponent], template: "<div class=\"toggle\" [ngClass]=\"classes\">\n <div\n [style.--max-width]=\"maxWidth + 'px'\"\n tabindex=\"0\"\n class=\"toggle-container\"\n [ngClass]=\"{ active: selected }\"\n (click)=\"onToggle()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n (keydown)=\"onKeydown($event)\"\n role=\"switch\"\n [attr.aria-labelledby]=\"'label'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n [attr.aria-checked]=\"selected\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n <div\n class=\"label\"\n uiEllipseText\n [matTooltipShowDelay]=\"800\"\n [matTooltip]=\"showLabelTooltip ? label : ''\"\n (onChangeTextState)=\"changeTextState($event)\"\n id=\"label\"\n >\n {{ label }}\n </div>\n @if (!loading) {\n <div class=\"knob\" [ngClass]=\"{ selected }\">\n @if (selected && !label) {\n <ui-icon [color]=\"disabled ? 'grey' : 'white'\" [size]=\"'16'\" [name]=\"'Check-round-filled'\"></ui-icon>\n }\n </div>\n } @else {\n <ui-spinner [isLoader]=\"false\" [size]=\"'small'\" [applicationTheme]=\"'dark'\"></ui-spinner>\n }\n </div>\n @if (message && selected) {\n <div class=\"message\">{{ message }}</div>\n }\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{width:fit-content;display:block}:host .toggle{height:auto;width:fit-content;display:flex;flex-direction:column;align-items:center}:host .toggle .toggle-container{border:1px solid transparent}:host .toggle.disabled{opacity:.5}:host .toggle.disabled .label{color:#242424!important}:host .toggle.disabled .toggle-container{background:#e0e0e0;pointer-events:none}:host .toggle.disabled .toggle-container:focus{outline:none}:host .toggle.dark.disabled .toggle-container.active,:host .toggle.light.disabled .toggle-container.active{background:#e9e9e9;border:1px solid #242424}:host .toggle.dark.disabled .toggle-container.active .knob:after,:host .toggle.light.disabled .toggle-container.active .knob:after{background:#242424}:host .toggle.dark .toggle-container,:host .toggle.light .toggle-container{background:transparent;border:1px solid #242424}:host .toggle.dark .toggle-container .label,:host .toggle.light .toggle-container .label{color:#242424}:host .toggle.dark .toggle-container .knob:after,:host .toggle.light .toggle-container .knob:after{background:#242424}:host .toggle.dark .toggle-container.active,:host .toggle.light .toggle-container.active{background:#d410aa;border:1px solid #d410aa}:host .toggle.dark .toggle-container.active .label,:host .toggle.light .toggle-container.active .label{color:#fff}:host .toggle.dark .toggle-container.active .knob:after,:host .toggle.light .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .message,:host .toggle.light .message{color:#242424}:host .toggle.dark.disabled .toggle-container.active{border-color:#fff}:host .toggle.dark.disabled .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .toggle-container{border-color:#fff}:host .toggle.dark .toggle-container .label{color:#fff}:host .toggle.dark .toggle-container .knob:after{background:#fff}:host .toggle.dark .message{color:#fff}:host .toggle .toggle-container{min-height:20px;max-height:24px;max-width:var(--max-width);padding:0 3px 0 20px;width:fit-content;min-width:36px;border-radius:16px;background:#888;display:flex;align-items:center;cursor:pointer;position:relative;transition:transform .3s,padding .3s,background .3s}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .toggle .toggle-container:focus-visible{position:relative;outline:2px solid #242424;outline-offset:2px;animation:focus-ring-animation .4s forwards}:host .toggle .toggle-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 2px);height:calc(100% + 2px);top:-1px;left:-1px;outline:2px solid #ffffff;border-radius:16px}:host .toggle .toggle-container .knob{height:100%;width:100%;position:absolute;left:-1px;top:0;display:flex;align-items:center;padding:3px;max-height:20px;transition:transform .3s}:host .toggle .toggle-container .knob:after{content:\"\";display:block;border-radius:16px;width:12px;height:12px;background:#fff;transition:background .3s}:host .toggle .toggle-container .label{z-index:1;font-size:8px;font-weight:700;color:#fff;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;pointer-events:visible;line-height:16px}:host .toggle .toggle-container.active{background:#276678;padding:0 20px 0 3px}:host .toggle .toggle-container.active .knob{transform:translate(calc(100% - 15px))}:host .toggle .message{margin-top:4px;font-weight:700;font-size:12px;line-height:16px;color:#276678;text-align:justify}:host .toggle.small-toggle .toggle-container .knob{left:0}:host .toggle.small-toggle .toggle-container .knob:after{width:10px;height:10px}:host .toggle.small-toggle .toggle-container .knob.selected{left:-8px}:host .toggle.small-toggle .toggle-container .knob.selected:after{display:none}:host .toggle.small-toggle .toggle-container .knob.selected ui-icon ::ng-deep svg{width:20px;height:20px}:host .toggle.loading .toggle-container{border-color:#d410aa;background-color:#d410aa;padding:0;display:flex;justify-content:center;cursor:default}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mat-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"] }]
171
+ ], imports: [NgClass, EllipseTextDirective, MatTooltip, IconComponentModule, SpinnerComponent], template: "<div class=\"toggle\" [ngClass]=\"classes\">\n <div\n [style.--max-width]=\"maxWidth + 'px'\"\n tabindex=\"0\"\n class=\"toggle-container\"\n [ngClass]=\"{ active: selected }\"\n (click)=\"onToggle()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n (keydown)=\"onKeydown($event)\"\n role=\"switch\"\n [attr.aria-labelledby]=\"label ? labelId : null\"\n [attr.aria-describedby]=\"ariaDescribedby ? describedbyId : null\"\n [attr.aria-checked]=\"selected\"\n [attr.data-testid]=\"testId\"\n >\n <span [style.display]=\"'none'\" [id]=\"describedbyId\">{{ ariaDescribedby }}</span>\n <div\n class=\"label\"\n uiEllipseText\n [matTooltipShowDelay]=\"800\"\n [matTooltip]=\"showLabelTooltip ? label : ''\"\n (onChangeTextState)=\"changeTextState($event)\"\n [id]=\"labelId\"\n >\n {{ label }}\n </div>\n @if (!loading) {\n <div class=\"knob\" [ngClass]=\"{ selected }\">\n @if (selected && !label) {\n <ui-icon [color]=\"disabled ? 'grey' : 'white'\" [size]=\"'16'\" [name]=\"'Check-round-filled'\"></ui-icon>\n }\n </div>\n } @else {\n <ui-spinner [isLoader]=\"false\" [size]=\"'small'\" [applicationTheme]=\"'dark'\"></ui-spinner>\n }\n </div>\n @if (message && selected) {\n <div class=\"message\">{{ message }}</div>\n }\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{width:fit-content;display:block}:host .toggle{height:auto;width:fit-content;display:flex;flex-direction:column;align-items:center}:host .toggle .toggle-container{border:1px solid transparent}:host .toggle.disabled{opacity:.5}:host .toggle.disabled .label{color:#242424!important}:host .toggle.disabled .toggle-container{background:#e0e0e0;pointer-events:none}:host .toggle.disabled .toggle-container:focus{outline:none}:host .toggle.dark.disabled .toggle-container.active,:host .toggle.light.disabled .toggle-container.active{background:#e9e9e9;border:1px solid #242424}:host .toggle.dark.disabled .toggle-container.active .knob:after,:host .toggle.light.disabled .toggle-container.active .knob:after{background:#242424}:host .toggle.dark .toggle-container,:host .toggle.light .toggle-container{background:transparent;border:1px solid #242424}:host .toggle.dark .toggle-container .label,:host .toggle.light .toggle-container .label{color:#242424}:host .toggle.dark .toggle-container .knob:after,:host .toggle.light .toggle-container .knob:after{background:#242424}:host .toggle.dark .toggle-container.active,:host .toggle.light .toggle-container.active{background:#d410aa;border:1px solid #d410aa}:host .toggle.dark .toggle-container.active .label,:host .toggle.light .toggle-container.active .label{color:#fff}:host .toggle.dark .toggle-container.active .knob:after,:host .toggle.light .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .message,:host .toggle.light .message{color:#242424}:host .toggle.dark.disabled .toggle-container.active{border-color:#fff}:host .toggle.dark.disabled .toggle-container.active .knob:after{background:#fff}:host .toggle.dark .toggle-container{border-color:#fff}:host .toggle.dark .toggle-container .label{color:#fff}:host .toggle.dark .toggle-container .knob:after{background:#fff}:host .toggle.dark .message{color:#fff}:host .toggle .toggle-container{min-height:20px;max-height:24px;max-width:var(--max-width);padding:0 3px 0 20px;width:fit-content;min-width:36px;border-radius:16px;background:#888;display:flex;align-items:center;cursor:pointer;position:relative;transition:transform .3s,padding .3s,background .3s}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .toggle .toggle-container:focus-visible{position:relative;outline:2px solid #242424;outline-offset:2px;animation:focus-ring-animation .4s forwards}:host .toggle .toggle-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 2px);height:calc(100% + 2px);top:-1px;left:-1px;outline:2px solid #ffffff;border-radius:16px}:host .toggle .toggle-container .knob{height:100%;width:100%;position:absolute;left:-1px;top:0;display:flex;align-items:center;padding:3px;max-height:20px;transition:transform .3s}:host .toggle .toggle-container .knob:after{content:\"\";display:block;border-radius:16px;width:12px;height:12px;background:#fff;transition:background .3s}:host .toggle .toggle-container .label{z-index:1;font-size:8px;font-weight:700;color:#fff;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;pointer-events:visible;line-height:16px}:host .toggle .toggle-container.active{background:#276678;padding:0 20px 0 3px}:host .toggle .toggle-container.active .knob{transform:translate(calc(100% - 15px))}:host .toggle .message{margin-top:4px;font-weight:700;font-size:12px;line-height:16px;color:#276678;text-align:justify}:host .toggle.small-toggle .toggle-container .knob{left:0}:host .toggle.small-toggle .toggle-container .knob:after{width:10px;height:10px}:host .toggle.small-toggle .toggle-container .knob.selected{left:-8px}:host .toggle.small-toggle .toggle-container .knob.selected:after{display:none}:host .toggle.small-toggle .toggle-container .knob.selected ui-icon ::ng-deep svg{width:20px;height:20px}:host .toggle.loading .toggle-container{border-color:#d410aa;background-color:#d410aa;padding:0;display:flex;justify-content:center;cursor:default}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mat-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"] }]
167
172
  }], ctorParameters: () => [{ type: undefined, decorators: [{
168
173
  type: Optional
169
174
  }, {
@@ -188,6 +193,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImpo
188
193
  type: Output
189
194
  }], ariaLabel: [{
190
195
  type: Input
196
+ }], testId: [{
197
+ type: Input
191
198
  }], ariaRequired: [{
192
199
  type: Input
193
200
  }], preventClick: [{