@testgorilla/tgo-ui 6.2.3 → 6.2.4

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 (161) hide show
  1. package/components/autocomplete/autocomplete.component.d.ts +2 -2
  2. package/components/badge/badge.component.d.ts +6 -6
  3. package/components/button/button.component.d.ts +4 -4
  4. package/components/checklist/checklist.component.d.ts +4 -5
  5. package/components/deprecated-paginator/deprecated-paginator.component.d.ts +2 -6
  6. package/components/dialog/dialog.component.d.ts +1 -1
  7. package/components/dialog/dialog.model.d.ts +2 -2
  8. package/components/dropdown/dropdown.component.d.ts +2 -2
  9. package/components/empty-state/empty-state.component.d.ts +2 -2
  10. package/components/file-upload/file-upload.component.d.ts +1 -1
  11. package/components/icon/icon.component.d.ts +2 -2
  12. package/components/icon/icon.model.d.ts +3 -3
  13. package/components/icon-label/icon-label.component.d.ts +1 -3
  14. package/components/logo/logo.component.d.ts +1 -1
  15. package/components/multi-input/multi-input.component.d.ts +1 -1
  16. package/components/navbar/mobile-navbar-side-sheet/mobile-navbar-side-sheet.component.d.ts +3 -3
  17. package/components/password-criteria/password.component.d.ts +1 -1
  18. package/components/radial-progress/radial-progress.component.d.ts +2 -2
  19. package/components/radio-button/radio-button.component.d.ts +3 -3
  20. package/components/segmented-bar/segmented-bar.component.d.ts +1 -1
  21. package/components/segmented-button/segmented-button.component.d.ts +1 -1
  22. package/components/side-panel/side-panel.model.d.ts +1 -1
  23. package/components/side-sheet/side-sheet.component.d.ts +1 -1
  24. package/components/spider-chart/spider-chart.component.d.ts +2 -2
  25. package/components/spider-chart/spider-chart.model.d.ts +2 -2
  26. package/components/stepper/step-line-element.directive.d.ts +1 -1
  27. package/components/stepper/step.component.d.ts +1 -1
  28. package/components/stepper/stepper.component.d.ts +2 -2
  29. package/components/table/table.component.d.ts +2 -2
  30. package/components/tabs/tabs.component.d.ts +2 -2
  31. package/components/universal-skills/universal-skills-report.component.d.ts +1 -1
  32. package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs +7 -25
  33. package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs.map +1 -1
  34. package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs +2 -2
  35. package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs.map +1 -1
  36. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +0 -1
  37. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
  38. package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs.map +1 -1
  39. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +31 -18
  40. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
  41. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +1 -1
  42. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +1 -1
  43. package/fesm2022/testgorilla-tgo-ui-components-badge.mjs +6 -6
  44. package/fesm2022/testgorilla-tgo-ui-components-badge.mjs.map +1 -1
  45. package/fesm2022/testgorilla-tgo-ui-components-button.mjs +39 -19
  46. package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
  47. package/fesm2022/testgorilla-tgo-ui-components-card.mjs +2 -2
  48. package/fesm2022/testgorilla-tgo-ui-components-card.mjs.map +1 -1
  49. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs +38 -10
  50. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs.map +1 -1
  51. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +2 -2
  52. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
  53. package/fesm2022/testgorilla-tgo-ui-components-core.mjs +22 -16
  54. package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
  55. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs +6 -6
  56. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs.map +1 -1
  57. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +8 -8
  58. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
  59. package/fesm2022/testgorilla-tgo-ui-components-divider.mjs +2 -2
  60. package/fesm2022/testgorilla-tgo-ui-components-divider.mjs.map +1 -1
  61. package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs +2 -2
  62. package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs.map +1 -1
  63. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +18 -5
  64. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
  65. package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs +2 -2
  66. package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs.map +1 -1
  67. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
  68. package/fesm2022/testgorilla-tgo-ui-components-field.mjs +2 -3
  69. package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
  70. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs +5 -5
  71. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs.map +1 -1
  72. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +2 -3
  73. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +1 -1
  74. package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs +8 -7
  75. package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs.map +1 -1
  76. package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs +0 -1
  77. package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs.map +1 -1
  78. package/fesm2022/testgorilla-tgo-ui-components-icon.mjs.map +1 -1
  79. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +1 -1
  80. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +1 -1
  81. package/fesm2022/testgorilla-tgo-ui-components-logo.mjs +2 -2
  82. package/fesm2022/testgorilla-tgo-ui-components-logo.mjs.map +1 -1
  83. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs +2 -7
  84. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs.map +1 -1
  85. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +2 -2
  86. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
  87. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs +1 -3
  88. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs.map +1 -1
  89. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs +5 -5
  90. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs.map +1 -1
  91. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +25 -4
  92. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
  93. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs +2 -2
  94. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs.map +1 -1
  95. package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs.map +1 -1
  96. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs +4 -4
  97. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs.map +1 -1
  98. package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs +3 -3
  99. package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs.map +1 -1
  100. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs +6 -6
  101. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs.map +1 -1
  102. package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs.map +1 -1
  103. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +1 -1
  104. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
  105. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +5 -3
  106. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +1 -1
  107. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs +42 -10
  108. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs.map +1 -1
  109. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs +3 -3
  110. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs.map +1 -1
  111. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs +2 -2
  112. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs.map +1 -1
  113. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs +3 -3
  114. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs.map +1 -1
  115. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs +4 -4
  116. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs.map +1 -1
  117. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs +1 -1
  118. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs.map +1 -1
  119. package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs.map +1 -1
  120. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +3 -3
  121. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
  122. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs +4 -4
  123. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs.map +1 -1
  124. package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs.map +1 -1
  125. package/fesm2022/testgorilla-tgo-ui-components-slider.mjs +2 -2
  126. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +21 -5
  127. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
  128. package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs +3 -3
  129. package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs.map +1 -1
  130. package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs.map +1 -1
  131. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs +14 -11
  132. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs.map +1 -1
  133. package/fesm2022/testgorilla-tgo-ui-components-table.mjs +5 -5
  134. package/fesm2022/testgorilla-tgo-ui-components-table.mjs.map +1 -1
  135. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs +3 -3
  136. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs.map +1 -1
  137. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs +25 -7
  138. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs.map +1 -1
  139. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs +25 -9
  140. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs.map +1 -1
  141. package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs +14 -15
  142. package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs.map +1 -1
  143. package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs +6 -6
  144. package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs.map +1 -1
  145. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs +2 -2
  146. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs.map +1 -1
  147. package/fesm2022/testgorilla-tgo-ui.mjs +2 -7
  148. package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
  149. package/package.json +46 -40
  150. package/projects/tgo-canopy-ui/theme/_alert-bars.scss +2 -1
  151. package/projects/tgo-canopy-ui/theme/_breakpoints-mixin.scss +6 -6
  152. package/projects/tgo-canopy-ui/theme/_core.scss +1 -1
  153. package/projects/tgo-canopy-ui/theme/_icon.scss +1 -1
  154. package/projects/tgo-canopy-ui/theme/_input.scss +108 -65
  155. package/projects/tgo-canopy-ui/theme/_lib-styles.scss +8 -7
  156. package/projects/tgo-canopy-ui/theme/_mat-paginator.scss +11 -10
  157. package/projects/tgo-canopy-ui/theme/_palette.scss +41 -29
  158. package/projects/tgo-canopy-ui/theme/_tooltip.scss +30 -30
  159. package/projects/tgo-canopy-ui/theme/_typography.scss +24 -14
  160. package/projects/tgo-canopy-ui/theme/_variables.scss +56 -56
  161. package/projects/tgo-canopy-ui/theme/theme.scss +19 -18
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-radial-progress.mjs","sources":["../../../components/radial-progress/radial-progress.model.ts","../../../components/radial-progress/radial-progress.component.ts","../../../components/radial-progress/radial-progress.component.html","../../../components/radial-progress/radial-progress.component.module.ts","../../../components/radial-progress/testgorilla-tgo-ui-components-radial-progress.ts"],"sourcesContent":["export type RadialProgressSize = 'large' | 'small';\n\nexport enum RadialProgressSizeValue {\n LARGE = 64,\n SMALL = 40,\n}\n\nexport enum RadialProgressSizeEnum {\n LARGE = 'large',\n SMALL = 'small',\n}\n\nexport type RadialProgressVariant = 'number' | 'icon-button' | 'thin' | 'empty' | 'empty-thin';\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Optional,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport {\n RadialProgressSize,\n RadialProgressSizeEnum,\n RadialProgressSizeValue,\n RadialProgressVariant,\n} from './radial-progress.model';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\n\n@Component({\n selector: 'ui-radial-progress',\n templateUrl: './radial-progress.component.html',\n styleUrls: ['./radial-progress.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class RadialProgressComponent {\n /**\n * The size of the component. Defaults to 'small'.\n * @type {RadialProgressSize}\n * @memberof RadialProgressComponent\n */\n @Input() size: RadialProgressSize = RadialProgressSizeEnum.SMALL;\n /**\n * The current value of the progress. Defaults to 0.\n * @type {number}\n * @memberof RadialProgressComponent\n */\n @Input() value = 0;\n /**\n * The value of the total progress. Used to set the cap and used for percentage calculations. Defaults to 0.\n * @type {number}\n * @memberof RadialProgressComponent\n */\n @Input() total = 0;\n\n /**\n * @type {number}\n * @memberof RadialProgressComponent\n */\n @Input() variant: RadialProgressVariant = 'number';\n\n /**\n * @type {boolean}\n * @memberof RadialProgressComponent\n */\n @Input() showPercentageSign = true;\n\n /**\n * Icon for icon button\n * @type {number}\n * @memberof RadialProgressComponent\n */\n @Input() icon: IconName = '';\n\n /**\n * The tooltip that is displayed on hover. Required for icon-button\n * @type {number}\n * @memberof RadialProgressComponent\n */\n @Input() buttonTooltip = '';\n\n /**\n * Color of the progress bar.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof RadialProgressComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof ButtonComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n @Output() buttonClicked = new EventEmitter<Event>();\n\n protected radialProgressSize = RadialProgressSizeEnum;\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!changes['companyColor']) {\n this.companyColor = this.applicationTheme === 'classic' ? '#46A997' : '#D410AA';\n }\n }\n\n protected get progressSize(): number {\n return this.size === RadialProgressSizeEnum.SMALL ? RadialProgressSizeValue.SMALL : RadialProgressSizeValue.LARGE;\n }\n\n protected get percentage(): number {\n return Math.round(this.total ? (this.value * 100) / this.total : 0);\n }\n\n protected get strokeWidth(): number {\n return this.variant === 'thin' || this.variant === 'empty-thin' ? 4 : 8;\n }\n\n protected get displayValue(): string {\n return this.showPercentageSign ? `${this.percentage}%` : `${this.percentage}`;\n }\n\n protected onButtonClick(ev: Event): void {\n this.buttonClicked.emit(ev);\n }\n}\n","<div\n class=\"radial-progress-container\"\n [attr.theme]=\"applicationTheme\"\n [style.width]=\"progressSize + 'px'\"\n [style.height]=\"progressSize + 'px'\"\n>\n <div class=\"background\" [style.border-width]=\"strokeWidth + 'px'\"></div>\n\n <mat-progress-spinner\n [strokeWidth]=\"strokeWidth\"\n [diameter]=\"progressSize\"\n [value]=\"percentage\"\n ></mat-progress-spinner>\n\n <div\n class=\"inner-container\"\n [class.small-font]=\"(variant === 'thin' || variant === 'empty-thin') && percentage !== 100\"\n [class.tiny-font]=\"percentage === 100 && showPercentageSign && variant === 'thin'\"\n >\n @if (variant === 'empty' || variant === 'empty-thin') {\n <div>{{ '-' }}</div>\n } @else if (variant === 'icon-button' && size !== 'small') {\n <ui-button\n [tooltip]=\"buttonTooltip\"\n [iconName]=\"icon\"\n [variant]=\"'icon-button'\"\n (click)=\"onButtonClick($event)\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-button>\n } @else if (size === radialProgressSize.LARGE || variant === 'thin') {\n <div>\n {{ displayValue }}\n </div>\n }\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RadialProgressComponent } from './radial-progress.component';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\n\n@NgModule({\n declarations: [RadialProgressComponent],\n exports: [RadialProgressComponent],\n imports: [CommonModule, MatProgressSpinnerModule, ButtonComponentModule],\n})\nexport class RadialProgressComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;IAEY;AAAZ,CAAA,UAAY,uBAAuB,EAAA;AACjC,IAAA,uBAAA,CAAA,uBAAA,CAAA,OAAA,CAAA,GAAA,EAAA,CAAA,GAAA,OAAU;AACV,IAAA,uBAAA,CAAA,uBAAA,CAAA,OAAA,CAAA,GAAA,EAAA,CAAA,GAAA,OAAU;AACZ,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,GAAA,EAAA,CAAA,CAAA;IAKvB;AAAZ,CAAA,UAAY,sBAAsB,EAAA;AAChC,IAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,sBAAA,CAAA,O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A;sBAAtB;;;MElFU,6BAA6B,CAAA;+GAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAA7B,6BAA6B,EAAA,YAAA,EAAA,CAJzB,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAE5B,YAAY,EAAE,wBAAwB,EAAE,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAD7D,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAGtB,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,6BAA6B,EAAA,OAAA,EAAA,CAF9B,YAAY,EAAE,wBAAwB,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA;;4FAE5D,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBALzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;oBACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;AAClC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,wBAAwB,EAAE,qBAAqB,CAAC;AACzE,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-radial-progress.mjs","sources":["../../../components/radial-progress/radial-progress.model.ts","../../../components/radial-progress/radial-progress.component.ts","../../../components/radial-progress/radial-progress.component.html","../../../components/radial-progress/radial-progress.component.module.ts","../../../components/radial-progress/testgorilla-tgo-ui-components-radial-progress.ts"],"sourcesContent":["export type RadialProgressSize = 'large' | 'small';\n\nexport enum RadialProgressSizeValue {\n LARGE = 64,\n SMALL = 40,\n}\n\nexport enum RadialProgressSizeEnum {\n LARGE = 'large',\n SMALL = 'small',\n}\n\nexport type RadialProgressVariant = 'number' | 'icon-button' | 'thin' | 'empty' | 'empty-thin';\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n Optional,\n Output,\n SimpleChanges,\n OnChanges,\n} from '@angular/core';\nimport {\n RadialProgressSize,\n RadialProgressSizeEnum,\n RadialProgressSizeValue,\n RadialProgressVariant,\n} from './radial-progress.model';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\n\n@Component({\n selector: 'ui-radial-progress',\n templateUrl: './radial-progress.component.html',\n styleUrls: ['./radial-progress.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class RadialProgressComponent implements OnChanges {\n /**\n * The size of the component. Defaults to 'small'.\n * @type {RadialProgressSize}\n * @memberof RadialProgressComponent\n */\n @Input() size: RadialProgressSize = RadialProgressSizeEnum.SMALL;\n /**\n * The current value of the progress. Defaults to 0.\n * @type {number}\n * @memberof RadialProgressComponent\n */\n @Input() value = 0;\n /**\n * The value of the total progress. Used to set the cap and used for percentage calculations. Defaults to 0.\n * @type {number}\n * @memberof RadialProgressComponent\n */\n @Input() total = 0;\n\n /**\n * @type {number}\n * @memberof RadialProgressComponent\n */\n @Input() variant: RadialProgressVariant = 'number';\n\n /**\n * @type {boolean}\n * @memberof RadialProgressComponent\n */\n @Input() showPercentageSign = true;\n\n /**\n * Icon for icon button\n * @type {number}\n * @memberof RadialProgressComponent\n */\n @Input() icon: IconName = '';\n\n /**\n * The tooltip that is displayed on hover. Required for icon-button\n * @type {number}\n * @memberof RadialProgressComponent\n */\n @Input() buttonTooltip = '';\n\n /**\n * Color of the progress bar.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof RadialProgressComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof ButtonComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n @Output() buttonClicked = new EventEmitter<Event>();\n\n protected radialProgressSize = RadialProgressSizeEnum;\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!changes['companyColor']) {\n this.companyColor = this.applicationTheme === 'classic' ? '#46A997' : '#D410AA';\n }\n }\n\n protected get progressSize(): number {\n return this.size === (RadialProgressSizeEnum.SMALL as RadialProgressSize)\n ? RadialProgressSizeValue.SMALL\n : RadialProgressSizeValue.LARGE;\n }\n\n protected get percentage(): number {\n return Math.round(this.total ? (this.value * 100) / this.total : 0);\n }\n\n protected get strokeWidth(): number {\n return this.variant === 'thin' || this.variant === 'empty-thin' ? 4 : 8;\n }\n\n protected get displayValue(): string {\n return this.showPercentageSign ? `${this.percentage}%` : `${this.percentage}`;\n }\n\n protected onButtonClick(ev: Event): void {\n this.buttonClicked.emit(ev);\n }\n}\n","<div\n class=\"radial-progress-container\"\n [attr.theme]=\"applicationTheme\"\n [style.width]=\"progressSize + 'px'\"\n [style.height]=\"progressSize + 'px'\"\n>\n <div class=\"background\" [style.border-width]=\"strokeWidth + 'px'\"></div>\n\n <mat-progress-spinner\n [strokeWidth]=\"strokeWidth\"\n [diameter]=\"progressSize\"\n [value]=\"percentage\"\n ></mat-progress-spinner>\n\n <div\n class=\"inner-container\"\n [class.small-font]=\"(variant === 'thin' || variant === 'empty-thin') && percentage !== 100\"\n [class.tiny-font]=\"percentage === 100 && showPercentageSign && variant === 'thin'\"\n >\n @if (variant === 'empty' || variant === 'empty-thin') {\n <div>{{ '-' }}</div>\n } @else if (variant === 'icon-button' && size !== 'small') {\n <ui-button\n [tooltip]=\"buttonTooltip\"\n [iconName]=\"icon\"\n [variant]=\"'icon-button'\"\n (click)=\"onButtonClick($event)\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-button>\n } @else if (size === radialProgressSize.LARGE || variant === 'thin') {\n <div>\n {{ displayValue }}\n </div>\n }\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RadialProgressComponent } from './radial-progress.component';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\n\n@NgModule({\n declarations: [RadialProgressComponent],\n exports: [RadialProgressComponent],\n imports: [CommonModule, MatProgressSpinnerModule, ButtonComponentModule],\n})\nexport class RadialProgressComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;IAEY;AAAZ,CAAA,UAAY,uBAAuB,EAAA;AACjC,IAAA,uBAAA,CAAA,uBAAA,CAAA,OAAA,CAAA,GAAA,EAAA,CAAA,GAAA,OAAU;AACV,IAAA,uBAAA,CAAA,uBAAA,CAAA,OAAA,CAAA,GAAA,EAAA,CAAA,GAAA,OAAU;AACZ,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,GAAA,EAAA,CAAA,CAAA;IAKvB;AAAZ,CAAA,UAAY,sBAAsB,EAAA;AAChC,IAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,sBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACjB,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,GAAA,EAAA,CAAA,CAAA;;MCqBrB,uBAAuB,CAAA;AAsElC,IAAA,WAAA,CAC6E,eAAiC,EAAA;QAAjC,IAAA,CAAA,eAAe,GAAf,eAAe;AAtE5F;;;;AAIG;AACM,QAAA,IAAA,CAAA,IAAI,GAAuB,sBAAsB,CAAC,KAAK;AAChE;;;;AAIG;QACM,IAAA,CAAA,KAAK,GAAG,CAAC;AAClB;;;;AAIG;QACM,IAAA,CAAA,KAAK,GAAG,CAAC;AAElB;;;AAGG;QACM,IAAA,CAAA,OAAO,GAA0B,QAAQ;AAElD;;;AAGG;QACM,IA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QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,EAAA,OAAA,EAAA,CAF9B,YAAY,EAAE,wBAAwB,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA;;4FAE5D,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBALzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;oBACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;AAClC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,wBAAwB,EAAE,qBAAqB,CAAC;AACzE,iBAAA;;;ACVD;;AAEG;;;;"}
@@ -19,7 +19,8 @@ import { FocusVisibleDirective } from '@testgorilla/tgo-ui/components/checkbox';
19
19
  /* eslint-disable no-underscore-dangle */
20
20
  class RadioButtonComponent {
21
21
  onHostClick(event) {
22
- if (event.target?.classList?.value?.includes?.('mat-mdc-radio-button') || event.target?.classList?.value?.includes?.('mdc-form-field')) {
22
+ if (event.target?.classList?.value?.includes?.('mat-mdc-radio-button') ||
23
+ event.target?.classList?.value?.includes?.('mdc-form-field')) {
23
24
  this.radioElement._inputElement.nativeElement.click();
24
25
  }
25
26
  }
@@ -164,7 +165,7 @@ class RadioButtonComponent {
164
165
  this.changeRadio = new EventEmitter();
165
166
  this.showTooltip = false;
166
167
  this.origin = null;
167
- this.onChange = (_) => { };
168
+ this.onChange = (_value) => { };
168
169
  /**
169
170
  * @ignore
170
171
  */
@@ -191,7 +192,10 @@ class RadioButtonComponent {
191
192
  this.radioElement._inputElement.nativeElement.onclick = () => {
192
193
  this.clickRadio();
193
194
  };
194
- this.focusMonitor.monitor(this.radioElement._inputElement.nativeElement).pipe(takeUntilDestroyed(this.destroyRef)).subscribe(origin => this.ngZone.run(() => {
195
+ this.focusMonitor
196
+ .monitor(this.radioElement._inputElement.nativeElement)
197
+ .pipe(takeUntilDestroyed(this.destroyRef))
198
+ .subscribe(origin => this.ngZone.run(() => {
195
199
  this.origin = origin;
196
200
  this.cdr.markForCheck();
197
201
  this.onFocus(origin === 'keyboard');
@@ -246,14 +250,18 @@ class RadioButtonComponent {
246
250
  checkHost() {
247
251
  if (this.hostNgControl) {
248
252
  this.selected = this.value === this.hostNgControl.value;
249
- this.hostNgControl.valueChanges?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
253
+ this.hostNgControl.valueChanges?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(value => {
250
254
  this.selected = value === this.value;
251
255
  this.classMultiple = this.setClass();
252
256
  });
253
257
  }
254
258
  }
255
259
  setCompanyColor() {
256
- this.companyColor = this.companyColor ? this.companyColor : this.applicationTheme === 'classic' ? '#46A997' : '#D410AA';
260
+ this.companyColor = this.companyColor
261
+ ? this.companyColor
262
+ : this.applicationTheme === 'classic'
263
+ ? '#46A997'
264
+ : '#D410AA';
257
265
  }
258
266
  onFocus(isFocus) {
259
267
  setTimeout(() => {
@@ -271,7 +279,7 @@ class RadioButtonComponent {
271
279
  this.radioElement.focus();
272
280
  }
273
281
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: RadioButtonComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }, { token: i1.NgControl, optional: true, self: true }, { token: i1.NgControl, host: true, optional: true }, { token: i0.DestroyRef }, { token: i2.FocusMonitor }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
274
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: RadioButtonComponent, isStandalone: false, selector: "ui-radio-button", inputs: { disabled: "disabled", selected: "selected", allowUnselect: "allowUnselect", companyColor: "companyColor", name: "name", label: "label", multiple: "multiple", value: "value", applicationTheme: "applicationTheme", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", hasError: "hasError", ariaLabelledby: "ariaLabelledby", ariaDescribedby: "ariaDescribedby", truncateText: "truncateText", alignment: "alignment", tabIndex: "tabIndex", hideTooltipOnEllipsis: "hideTooltipOnEllipsis" }, outputs: { changeRadio: "changeRadio" }, host: { listeners: { "focus": "radioElement.focus()", "click": "onHostClick($event)" }, properties: { "attr.tabindex": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null", "style.--color": "this.companyColor" } }, viewQueries: [{ propertyName: "radioElement", first: true, predicate: ["radio"], descendants: true }, { propertyName: "tooltipElement", first: true, predicate: ["tooltip"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n #radioContainer\n [class]=\"multiple ? 'radio-container' : 'radio'\"\n [class.multiple-disabled]=\"disabled && multiple\"\n [ngClass]=\"classMultiple\"\n [attr.alignment]=\"alignment\"\n [attr.truncate-text]=\"truncateText\"\n [attr.theme]=\"applicationTheme\"\n [attr.hasError]=\"hasError\"\n (keydown.enter)=\"clickRadio(); radioContainer.focus()\"\n (keydown.space)=\"clickRadio(); radioContainer.focus()\"\n>\n <mat-radio-button\n #radio\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [value]=\"value\"\n class=\"radio-button\"\n [required]=\"ariaRequired\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby ? ariaLabelledby : label\"\n [aria-describedby]=\"ariaDescribedby\"\n (keydown.enter)=\"$event.preventDefault()\"\n (keydown.space)=\"$event.preventDefault()\"\n [tabIndex]=\"tabIndex\"\n >\n @if (label) {\n <span\n #tooltip=\"matTooltip\"\n class=\"label\"\n uiEllipseText\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n [matTooltip]=\"showTooltip ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n >{{ label }}</span>\n }\n <ng-content select=\"[radio-label]\"></ng-content>\n </mat-radio-button>\n</div>\n", styles: [".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}.mat-mdc-radio-button.mat-accent{--mat-radio-checked-ripple-color: var(--color)!important;--mdc-radio-selected-focus-icon-color: var(--color)!important;--mdc-radio-selected-pressed-icon-color: var(--color)!important}::ng-deep .mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:var(--color)!important}::ng-deep .mat-mdc-radio-checked .mdc-radio__inner-circle{background-color:var(--color)!important;border-color:var(--color)!important}::ng-deep .mat-mdc-radio-button .mat-ripple-element{background-color:var(--color)!important}::ng-deep .mat-mdc-radio-button.mat-radio-disabled.mat-radio-checked .mdc-radio__outer-circle,.mat-radio-button.mat-radio-disabled .mdc-radio__outer-circle{border-color:#888!important}::ng-deep .mat-mdc-radio-button.mat-radio-disabled .mdc-radio__inner-circle{background-color:#888!important}[theme=dark] .mat-mdc-radio-button,[theme=light] .mat-mdc-radio-button{width:100%!important}[theme=dark] ::ng-deep .mdc-form-field,[theme=light] ::ng-deep .mdc-form-field{width:100%}[theme=dark] .mat-mdc-radio-button.mat-accent,[theme=light] .mat-mdc-radio-button.mat-accent{--mdc-radio-unselected-icon-color: #242424 !important}[theme=dark] ::ng-deep .mdc-radio.mdc-radio--disabled,[theme=light] ::ng-deep .mdc-radio.mdc-radio--disabled{--mdc-radio-disabled-unselected-icon-color: #919191;--mdc-radio-disabled-selected-icon-opacity: 1;--mdc-radio-disabled-unselected-icon-opacity: 1;--color: #919191}[theme=dark] ::ng-deep .mdc-radio.mdc-radio--disabled .mdc-radio__background,[theme=light] ::ng-deep .mdc-radio.mdc-radio--disabled .mdc-radio__background{background:#e9e9e9;border-radius:100%}[theme=dark] ::ng-deep .mdc-radio__background,[theme=light] ::ng-deep .mdc-radio__background{background:#fff!important;border-radius:100%;scale:.8}[theme=dark] ::ng-deep .mdc-radio__background .mdc-radio__outer-circle,[theme=light] ::ng-deep .mdc-radio__background .mdc-radio__outer-circle{border-width:1px}[theme=dark] ::ng-deep .mat-ripple,[theme=light] ::ng-deep .mat-ripple{display:none}[haserror=true] ::ng-deep .mdc-radio__background .mdc-radio__outer-circle{border-width:2px}.multiple-checked{border:1px solid var(--color);display:flex;flex-direction:row;align-items:center;gap:16px;background:var(--color);border-radius:8px}.multiple-checked ::ng-deep .mat-mdc-radio-button{width:100%;height:100%;padding:8px}.multiple-checked ::ng-deep .mat-mdc-radio-checked .mdc-radio__outer-circle{border:1px solid #ffffff;border-radius:64px;background:#fff}.multiple-checked ::ng-deep label{color:#fff;height:100%}.multiple-checked[theme=dark][hasError=false],.multiple-checked[theme=light][hasError=false]{background:#f4f4f4;border-color:#242424;outline:1px solid #242424}.multiple-checked[theme=dark][hasError=false] ::ng-deep label,.multiple-checked[theme=light][hasError=false] ::ng-deep label{color:#242424}.multiple-checked[theme=dark][hasError=true],.multiple-checked[theme=light][hasError=true]{border:1px solid #E02800;outline:1px solid #E02800;background:#fff;border-radius:10px}.multiple-checked[theme=dark][hasError=true] ::ng-deep label,.multiple-checked[theme=light][hasError=true] ::ng-deep label{color:#242424}.multiple-checked[theme=classic][hasError=true]{border:1px solid #E02800;outline:1px solid #E02800}.multiple-unchecked{border:1px solid #E0E0E0;display:flex;flex-direction:row;align-items:center;gap:16px;background:#fff;border-radius:8px}.multiple-unchecked ::ng-deep .mat-mdc-radio-button{width:100%;height:100%;padding:8px}.multiple-unchecked:hover{background:#f6f6f6;border:1px solid #E0E0E0}.multiple-unchecked ::ng-deep label{height:100%}.multiple-unchecked ::ng-deep .mat-mdc-radio-button .mdc-radio .mdc-radio__background:before{opacity:0!important}.multiple-unchecked[theme=dark][hasError=false],.multiple-unchecked[theme=light][hasError=false]{border:1px solid #919191;background:#fff}.multiple-unchecked[theme=dark][hasError=false]:not(.multiple-disabled):hover,.multiple-unchecked[theme=light][hasError=false]:not(.multiple-disabled):hover{outline:1px solid #242424;background:#fff;border-color:#242424!important}.multiple-unchecked[hasError=true]{border:1px solid #E02800;outline:1px solid #E02800;background:#fff}.multiple-unchecked[hasError=true]:not([theme=classic]){border-radius:10px}.multiple-unchecked ::ng-deep label,.multiple-checked ::ng-deep label{padding-left:0;width:fit-content;cursor:pointer}.radio-container{cursor:pointer}.radio-container .label{cursor:pointer;-webkit-user-select:none;user-select:none}.radio-button .label{cursor:pointer;-webkit-user-select:none;user-select:none;padding-left:4px}:host *[hasError=true] .mat-mdc-radio-button.mat-accent{--mdc-radio-unselected-icon-color: #E02800 !important;--mdc-radio-unselected-hover-icon-color: #E02800 !important;--mdc-radio-unselected-focus-icon-color: #E02800 !important}:host ::ng-deep .mat-mdc-radio-touch-target{height:40px;width:40px}.radio,.radio-container{--border-width-default-state: 4px;--border-width-animation-state: 6px;width:100%}.radio[alignment=top] ::ng-deep .mdc-form-field,.radio-container[alignment=top] ::ng-deep .mdc-form-field{align-items:start}.radio[alignment=top] .label,.radio-container[alignment=top] .label{margin-top:10px}.radio[truncate-text=true] .label,.radio[truncate-text=true] ::ng-deep label,.radio-container[truncate-text=true] .label,.radio-container[truncate-text=true] ::ng-deep label{-webkit-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes focus-ring-animation{0%{outline-width:var(--border-width-animation-state)}to{outline-width:var(--border-width-default-state)}}.radio-container[hasError=true]{outline:1px solid #E02800}.radio .label{display:block;width:100%;cursor:pointer}::ng-deep .mat-mdc-radio-button.mat-accent.cdk-keyboard-focused{outline:none;--mat-radio-checked-ripple-color: transparent!important;--mat-radio-ripple-color: transparent!important}::ng-deep .mat-mdc-radio-button.mat-accent.cdk-keyboard-focused ::ng-deep .mdc-radio__background{outline:3px solid #242424;animation:focus-ring-animation .4s forwards}::ng-deep .mat-mdc-radio-button.mat-accent.cdk-keyboard-focused ::ng-deep .mdc-radio__background:after{content:\"\";position:absolute;width:100%;height:100%;top:0;left:0;outline:2px solid #ffffff;border-radius:100px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i5.EllipseTextDirective, selector: "[uiEllipseText]", inputs: ["isMultiline", "maxDiffPixels", "refresh"], outputs: ["onChangeTextState"] }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
282
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.19", type: RadioButtonComponent, isStandalone: false, selector: "ui-radio-button", inputs: { disabled: "disabled", selected: "selected", allowUnselect: "allowUnselect", companyColor: "companyColor", name: "name", label: "label", multiple: "multiple", value: "value", applicationTheme: "applicationTheme", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", hasError: "hasError", ariaLabelledby: "ariaLabelledby", ariaDescribedby: "ariaDescribedby", truncateText: "truncateText", alignment: "alignment", tabIndex: "tabIndex", hideTooltipOnEllipsis: "hideTooltipOnEllipsis" }, outputs: { changeRadio: "changeRadio" }, host: { listeners: { "focus": "radioElement.focus()", "click": "onHostClick($event)" }, properties: { "attr.tabindex": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null", "style.--color": "this.companyColor" } }, viewQueries: [{ propertyName: "radioElement", first: true, predicate: ["radio"], descendants: true }, { propertyName: "tooltipElement", first: true, predicate: ["tooltip"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n #radioContainer\n tabindex=\"0\"\n [class]=\"multiple ? 'radio-container' : 'radio'\"\n [class.multiple-disabled]=\"disabled && multiple\"\n [ngClass]=\"classMultiple\"\n [attr.alignment]=\"alignment\"\n [attr.truncate-text]=\"truncateText\"\n [attr.theme]=\"applicationTheme\"\n [attr.hasError]=\"hasError\"\n (keydown.enter)=\"clickRadio(); radioContainer.focus()\"\n (keydown.space)=\"clickRadio(); radioContainer.focus()\"\n>\n <mat-radio-button\n #radio\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [value]=\"value\"\n class=\"radio-button\"\n [required]=\"ariaRequired\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby ? ariaLabelledby : label\"\n [aria-describedby]=\"ariaDescribedby\"\n (keydown.enter)=\"$event.preventDefault()\"\n (keydown.space)=\"$event.preventDefault()\"\n [tabIndex]=\"tabIndex\"\n >\n @if (label) {\n <span\n #tooltip=\"matTooltip\"\n class=\"label\"\n uiEllipseText\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n [matTooltip]=\"showTooltip ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n >{{ label }}</span\n >\n }\n <ng-content select=\"[radio-label]\"></ng-content>\n </mat-radio-button>\n</div>\n", styles: [".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}.mat-mdc-radio-button.mat-accent{--mat-radio-checked-ripple-color: var(--color) !important;--mdc-radio-selected-focus-icon-color: var(--color) !important;--mdc-radio-selected-pressed-icon-color: var(--color) !important}::ng-deep .mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:var(--color)!important}::ng-deep .mat-mdc-radio-checked .mdc-radio__inner-circle{background-color:var(--color)!important;border-color:var(--color)!important}::ng-deep .mat-mdc-radio-button .mat-ripple-element{background-color:var(--color)!important}::ng-deep .mat-mdc-radio-button.mat-radio-disabled.mat-radio-checked .mdc-radio__outer-circle,.mat-radio-button.mat-radio-disabled .mdc-radio__outer-circle{border-color:#888!important}::ng-deep .mat-mdc-radio-button.mat-radio-disabled .mdc-radio__inner-circle{background-color:#888!important}[theme=dark] .mat-mdc-radio-button,[theme=light] .mat-mdc-radio-button{width:100%!important}[theme=dark] ::ng-deep .mdc-form-field,[theme=light] ::ng-deep .mdc-form-field{width:100%}[theme=dark] .mat-mdc-radio-button.mat-accent,[theme=light] .mat-mdc-radio-button.mat-accent{--mdc-radio-unselected-icon-color: #242424 !important}[theme=dark] ::ng-deep .mdc-radio.mdc-radio--disabled,[theme=light] ::ng-deep .mdc-radio.mdc-radio--disabled{--mdc-radio-disabled-unselected-icon-color: #919191;--mdc-radio-disabled-selected-icon-opacity: 1;--mdc-radio-disabled-unselected-icon-opacity: 1;--color: #919191}[theme=dark] ::ng-deep .mdc-radio.mdc-radio--disabled .mdc-radio__background,[theme=light] ::ng-deep .mdc-radio.mdc-radio--disabled .mdc-radio__background{background:#e9e9e9;border-radius:100%}[theme=dark] ::ng-deep .mdc-radio__background,[theme=light] ::ng-deep .mdc-radio__background{background:#fff!important;border-radius:100%;scale:.8}[theme=dark] ::ng-deep .mdc-radio__background .mdc-radio__outer-circle,[theme=light] ::ng-deep .mdc-radio__background .mdc-radio__outer-circle{border-width:1px}[theme=dark] ::ng-deep .mat-ripple,[theme=light] ::ng-deep .mat-ripple{display:none}[haserror=true] ::ng-deep .mdc-radio__background .mdc-radio__outer-circle{border-width:2px}.multiple-checked{border:1px solid var(--color);display:flex;flex-direction:row;align-items:center;gap:16px;background:var(--color);border-radius:8px}.multiple-checked ::ng-deep .mat-mdc-radio-button{width:100%;height:100%;padding:8px}.multiple-checked ::ng-deep .mat-mdc-radio-checked .mdc-radio__outer-circle{border:1px solid #ffffff;border-radius:64px;background:#fff}.multiple-checked ::ng-deep label{color:#fff;height:100%}.multiple-checked[theme=dark][hasError=false],.multiple-checked[theme=light][hasError=false]{background:#f4f4f4;border-color:#242424;outline:1px solid #242424}.multiple-checked[theme=dark][hasError=false] ::ng-deep label,.multiple-checked[theme=light][hasError=false] ::ng-deep label{color:#242424}.multiple-checked[theme=dark][hasError=true],.multiple-checked[theme=light][hasError=true]{border:1px solid #e02800;outline:1px solid #e02800;background:#fff;border-radius:10px}.multiple-checked[theme=dark][hasError=true] ::ng-deep label,.multiple-checked[theme=light][hasError=true] ::ng-deep label{color:#242424}.multiple-checked[theme=classic][hasError=true]{border:1px solid #e02800;outline:1px solid #e02800}.multiple-unchecked{border:1px solid #e0e0e0;display:flex;flex-direction:row;align-items:center;gap:16px;background:#fff;border-radius:8px}.multiple-unchecked ::ng-deep .mat-mdc-radio-button{width:100%;height:100%;padding:8px}.multiple-unchecked:hover{background:#f6f6f6;border:1px solid #e0e0e0}.multiple-unchecked ::ng-deep label{height:100%}.multiple-unchecked ::ng-deep .mat-mdc-radio-button .mdc-radio .mdc-radio__background:before{opacity:0!important}.multiple-unchecked[theme=dark][hasError=false],.multiple-unchecked[theme=light][hasError=false]{border:1px solid #919191;background:#fff}.multiple-unchecked[theme=dark][hasError=false]:not(.multiple-disabled):hover,.multiple-unchecked[theme=light][hasError=false]:not(.multiple-disabled):hover{outline:1px solid #242424;background:#fff;border-color:#242424!important}.multiple-unchecked[hasError=true]{border:1px solid #e02800;outline:1px solid #e02800;background:#fff}.multiple-unchecked[hasError=true]:not([theme=classic]){border-radius:10px}.multiple-unchecked ::ng-deep label,.multiple-checked ::ng-deep label{padding-left:0;width:fit-content;cursor:pointer}.radio-container{cursor:pointer}.radio-container .label{cursor:pointer;-webkit-user-select:none;user-select:none}.radio-button .label{cursor:pointer;-webkit-user-select:none;user-select:none;padding-left:4px}:host *[hasError=true] .mat-mdc-radio-button.mat-accent{--mdc-radio-unselected-icon-color: #e02800 !important;--mdc-radio-unselected-hover-icon-color: #e02800 !important;--mdc-radio-unselected-focus-icon-color: #e02800 !important}:host ::ng-deep .mat-mdc-radio-touch-target{height:40px;width:40px}.radio,.radio-container{--border-width-default-state: 4px;--border-width-animation-state: 6px;width:100%}.radio[alignment=top] ::ng-deep .mdc-form-field,.radio-container[alignment=top] ::ng-deep .mdc-form-field{align-items:start}.radio[alignment=top] .label,.radio-container[alignment=top] .label{margin-top:10px}.radio[truncate-text=true] .label,.radio[truncate-text=true] ::ng-deep label,.radio-container[truncate-text=true] .label,.radio-container[truncate-text=true] ::ng-deep label{-webkit-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes focus-ring-animation{0%{outline-width:var(--border-width-animation-state)}to{outline-width:var(--border-width-default-state)}}.radio-container[hasError=true]{outline:1px solid #e02800}.radio .label{display:block;width:100%;cursor:pointer}::ng-deep .mat-mdc-radio-button.mat-accent.cdk-keyboard-focused{outline:none;--mat-radio-checked-ripple-color: transparent !important;--mat-radio-ripple-color: transparent !important}::ng-deep .mat-mdc-radio-button.mat-accent.cdk-keyboard-focused ::ng-deep .mdc-radio__background{outline:3px solid #242424;animation:focus-ring-animation .4s forwards}::ng-deep .mat-mdc-radio-button.mat-accent.cdk-keyboard-focused ::ng-deep .mdc-radio__background:after{content:\"\";position:absolute;width:100%;height:100%;top:0;left:0;outline:2px solid #ffffff;border-radius:100px}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i4.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i5.EllipseTextDirective, selector: "[uiEllipseText]", inputs: ["isMultiline", "maxDiffPixels", "refresh"], outputs: ["onChangeTextState"] }, { kind: "directive", type: i6.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
275
283
  }
276
284
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: RadioButtonComponent, decorators: [{
277
285
  type: Component,
@@ -285,7 +293,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
285
293
  // programmatically set, for example inside of a focus trap, in this case we want to forward
286
294
  // the focus to the mat-radio-button element.
287
295
  '(focus)': 'radioElement.focus()',
288
- }, standalone: false, template: "<div\n #radioContainer\n [class]=\"multiple ? 'radio-container' : 'radio'\"\n [class.multiple-disabled]=\"disabled && multiple\"\n [ngClass]=\"classMultiple\"\n [attr.alignment]=\"alignment\"\n [attr.truncate-text]=\"truncateText\"\n [attr.theme]=\"applicationTheme\"\n [attr.hasError]=\"hasError\"\n (keydown.enter)=\"clickRadio(); radioContainer.focus()\"\n (keydown.space)=\"clickRadio(); radioContainer.focus()\"\n>\n <mat-radio-button\n #radio\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [value]=\"value\"\n class=\"radio-button\"\n [required]=\"ariaRequired\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby ? ariaLabelledby : label\"\n [aria-describedby]=\"ariaDescribedby\"\n (keydown.enter)=\"$event.preventDefault()\"\n (keydown.space)=\"$event.preventDefault()\"\n [tabIndex]=\"tabIndex\"\n >\n @if (label) {\n <span\n #tooltip=\"matTooltip\"\n class=\"label\"\n uiEllipseText\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n [matTooltip]=\"showTooltip ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n >{{ label }}</span>\n }\n <ng-content select=\"[radio-label]\"></ng-content>\n </mat-radio-button>\n</div>\n", styles: [".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}.mat-mdc-radio-button.mat-accent{--mat-radio-checked-ripple-color: var(--color)!important;--mdc-radio-selected-focus-icon-color: var(--color)!important;--mdc-radio-selected-pressed-icon-color: var(--color)!important}::ng-deep .mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:var(--color)!important}::ng-deep .mat-mdc-radio-checked .mdc-radio__inner-circle{background-color:var(--color)!important;border-color:var(--color)!important}::ng-deep .mat-mdc-radio-button .mat-ripple-element{background-color:var(--color)!important}::ng-deep .mat-mdc-radio-button.mat-radio-disabled.mat-radio-checked .mdc-radio__outer-circle,.mat-radio-button.mat-radio-disabled .mdc-radio__outer-circle{border-color:#888!important}::ng-deep .mat-mdc-radio-button.mat-radio-disabled .mdc-radio__inner-circle{background-color:#888!important}[theme=dark] .mat-mdc-radio-button,[theme=light] .mat-mdc-radio-button{width:100%!important}[theme=dark] ::ng-deep .mdc-form-field,[theme=light] ::ng-deep .mdc-form-field{width:100%}[theme=dark] .mat-mdc-radio-button.mat-accent,[theme=light] .mat-mdc-radio-button.mat-accent{--mdc-radio-unselected-icon-color: #242424 !important}[theme=dark] ::ng-deep .mdc-radio.mdc-radio--disabled,[theme=light] ::ng-deep .mdc-radio.mdc-radio--disabled{--mdc-radio-disabled-unselected-icon-color: #919191;--mdc-radio-disabled-selected-icon-opacity: 1;--mdc-radio-disabled-unselected-icon-opacity: 1;--color: #919191}[theme=dark] ::ng-deep .mdc-radio.mdc-radio--disabled .mdc-radio__background,[theme=light] ::ng-deep .mdc-radio.mdc-radio--disabled .mdc-radio__background{background:#e9e9e9;border-radius:100%}[theme=dark] ::ng-deep .mdc-radio__background,[theme=light] ::ng-deep .mdc-radio__background{background:#fff!important;border-radius:100%;scale:.8}[theme=dark] ::ng-deep .mdc-radio__background .mdc-radio__outer-circle,[theme=light] ::ng-deep .mdc-radio__background .mdc-radio__outer-circle{border-width:1px}[theme=dark] ::ng-deep .mat-ripple,[theme=light] ::ng-deep .mat-ripple{display:none}[haserror=true] ::ng-deep .mdc-radio__background .mdc-radio__outer-circle{border-width:2px}.multiple-checked{border:1px solid var(--color);display:flex;flex-direction:row;align-items:center;gap:16px;background:var(--color);border-radius:8px}.multiple-checked ::ng-deep .mat-mdc-radio-button{width:100%;height:100%;padding:8px}.multiple-checked ::ng-deep .mat-mdc-radio-checked .mdc-radio__outer-circle{border:1px solid #ffffff;border-radius:64px;background:#fff}.multiple-checked ::ng-deep label{color:#fff;height:100%}.multiple-checked[theme=dark][hasError=false],.multiple-checked[theme=light][hasError=false]{background:#f4f4f4;border-color:#242424;outline:1px solid #242424}.multiple-checked[theme=dark][hasError=false] ::ng-deep label,.multiple-checked[theme=light][hasError=false] ::ng-deep label{color:#242424}.multiple-checked[theme=dark][hasError=true],.multiple-checked[theme=light][hasError=true]{border:1px solid #E02800;outline:1px solid #E02800;background:#fff;border-radius:10px}.multiple-checked[theme=dark][hasError=true] ::ng-deep label,.multiple-checked[theme=light][hasError=true] ::ng-deep label{color:#242424}.multiple-checked[theme=classic][hasError=true]{border:1px solid #E02800;outline:1px solid #E02800}.multiple-unchecked{border:1px solid #E0E0E0;display:flex;flex-direction:row;align-items:center;gap:16px;background:#fff;border-radius:8px}.multiple-unchecked ::ng-deep .mat-mdc-radio-button{width:100%;height:100%;padding:8px}.multiple-unchecked:hover{background:#f6f6f6;border:1px solid #E0E0E0}.multiple-unchecked ::ng-deep label{height:100%}.multiple-unchecked ::ng-deep .mat-mdc-radio-button .mdc-radio .mdc-radio__background:before{opacity:0!important}.multiple-unchecked[theme=dark][hasError=false],.multiple-unchecked[theme=light][hasError=false]{border:1px solid #919191;background:#fff}.multiple-unchecked[theme=dark][hasError=false]:not(.multiple-disabled):hover,.multiple-unchecked[theme=light][hasError=false]:not(.multiple-disabled):hover{outline:1px solid #242424;background:#fff;border-color:#242424!important}.multiple-unchecked[hasError=true]{border:1px solid #E02800;outline:1px solid #E02800;background:#fff}.multiple-unchecked[hasError=true]:not([theme=classic]){border-radius:10px}.multiple-unchecked ::ng-deep label,.multiple-checked ::ng-deep label{padding-left:0;width:fit-content;cursor:pointer}.radio-container{cursor:pointer}.radio-container .label{cursor:pointer;-webkit-user-select:none;user-select:none}.radio-button .label{cursor:pointer;-webkit-user-select:none;user-select:none;padding-left:4px}:host *[hasError=true] .mat-mdc-radio-button.mat-accent{--mdc-radio-unselected-icon-color: #E02800 !important;--mdc-radio-unselected-hover-icon-color: #E02800 !important;--mdc-radio-unselected-focus-icon-color: #E02800 !important}:host ::ng-deep .mat-mdc-radio-touch-target{height:40px;width:40px}.radio,.radio-container{--border-width-default-state: 4px;--border-width-animation-state: 6px;width:100%}.radio[alignment=top] ::ng-deep .mdc-form-field,.radio-container[alignment=top] ::ng-deep .mdc-form-field{align-items:start}.radio[alignment=top] .label,.radio-container[alignment=top] .label{margin-top:10px}.radio[truncate-text=true] .label,.radio[truncate-text=true] ::ng-deep label,.radio-container[truncate-text=true] .label,.radio-container[truncate-text=true] ::ng-deep label{-webkit-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes focus-ring-animation{0%{outline-width:var(--border-width-animation-state)}to{outline-width:var(--border-width-default-state)}}.radio-container[hasError=true]{outline:1px solid #E02800}.radio .label{display:block;width:100%;cursor:pointer}::ng-deep .mat-mdc-radio-button.mat-accent.cdk-keyboard-focused{outline:none;--mat-radio-checked-ripple-color: transparent!important;--mat-radio-ripple-color: transparent!important}::ng-deep .mat-mdc-radio-button.mat-accent.cdk-keyboard-focused ::ng-deep .mdc-radio__background{outline:3px solid #242424;animation:focus-ring-animation .4s forwards}::ng-deep .mat-mdc-radio-button.mat-accent.cdk-keyboard-focused ::ng-deep .mdc-radio__background:after{content:\"\";position:absolute;width:100%;height:100%;top:0;left:0;outline:2px solid #ffffff;border-radius:100px}\n"] }]
296
+ }, standalone: false, template: "<div\n #radioContainer\n tabindex=\"0\"\n [class]=\"multiple ? 'radio-container' : 'radio'\"\n [class.multiple-disabled]=\"disabled && multiple\"\n [ngClass]=\"classMultiple\"\n [attr.alignment]=\"alignment\"\n [attr.truncate-text]=\"truncateText\"\n [attr.theme]=\"applicationTheme\"\n [attr.hasError]=\"hasError\"\n (keydown.enter)=\"clickRadio(); radioContainer.focus()\"\n (keydown.space)=\"clickRadio(); radioContainer.focus()\"\n>\n <mat-radio-button\n #radio\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [value]=\"value\"\n class=\"radio-button\"\n [required]=\"ariaRequired\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby ? ariaLabelledby : label\"\n [aria-describedby]=\"ariaDescribedby\"\n (keydown.enter)=\"$event.preventDefault()\"\n (keydown.space)=\"$event.preventDefault()\"\n [tabIndex]=\"tabIndex\"\n >\n @if (label) {\n <span\n #tooltip=\"matTooltip\"\n class=\"label\"\n uiEllipseText\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n [matTooltip]=\"showTooltip ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n >{{ label }}</span\n >\n }\n <ng-content select=\"[radio-label]\"></ng-content>\n </mat-radio-button>\n</div>\n", styles: [".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}.mat-mdc-radio-button.mat-accent{--mat-radio-checked-ripple-color: var(--color) !important;--mdc-radio-selected-focus-icon-color: var(--color) !important;--mdc-radio-selected-pressed-icon-color: var(--color) !important}::ng-deep .mat-mdc-radio-checked .mdc-radio__outer-circle{border-color:var(--color)!important}::ng-deep .mat-mdc-radio-checked .mdc-radio__inner-circle{background-color:var(--color)!important;border-color:var(--color)!important}::ng-deep .mat-mdc-radio-button .mat-ripple-element{background-color:var(--color)!important}::ng-deep .mat-mdc-radio-button.mat-radio-disabled.mat-radio-checked .mdc-radio__outer-circle,.mat-radio-button.mat-radio-disabled .mdc-radio__outer-circle{border-color:#888!important}::ng-deep .mat-mdc-radio-button.mat-radio-disabled .mdc-radio__inner-circle{background-color:#888!important}[theme=dark] .mat-mdc-radio-button,[theme=light] .mat-mdc-radio-button{width:100%!important}[theme=dark] ::ng-deep .mdc-form-field,[theme=light] ::ng-deep .mdc-form-field{width:100%}[theme=dark] .mat-mdc-radio-button.mat-accent,[theme=light] .mat-mdc-radio-button.mat-accent{--mdc-radio-unselected-icon-color: #242424 !important}[theme=dark] ::ng-deep .mdc-radio.mdc-radio--disabled,[theme=light] ::ng-deep .mdc-radio.mdc-radio--disabled{--mdc-radio-disabled-unselected-icon-color: #919191;--mdc-radio-disabled-selected-icon-opacity: 1;--mdc-radio-disabled-unselected-icon-opacity: 1;--color: #919191}[theme=dark] ::ng-deep .mdc-radio.mdc-radio--disabled .mdc-radio__background,[theme=light] ::ng-deep .mdc-radio.mdc-radio--disabled .mdc-radio__background{background:#e9e9e9;border-radius:100%}[theme=dark] ::ng-deep .mdc-radio__background,[theme=light] ::ng-deep .mdc-radio__background{background:#fff!important;border-radius:100%;scale:.8}[theme=dark] ::ng-deep .mdc-radio__background .mdc-radio__outer-circle,[theme=light] ::ng-deep .mdc-radio__background .mdc-radio__outer-circle{border-width:1px}[theme=dark] ::ng-deep .mat-ripple,[theme=light] ::ng-deep .mat-ripple{display:none}[haserror=true] ::ng-deep .mdc-radio__background .mdc-radio__outer-circle{border-width:2px}.multiple-checked{border:1px solid var(--color);display:flex;flex-direction:row;align-items:center;gap:16px;background:var(--color);border-radius:8px}.multiple-checked ::ng-deep .mat-mdc-radio-button{width:100%;height:100%;padding:8px}.multiple-checked ::ng-deep .mat-mdc-radio-checked .mdc-radio__outer-circle{border:1px solid #ffffff;border-radius:64px;background:#fff}.multiple-checked ::ng-deep label{color:#fff;height:100%}.multiple-checked[theme=dark][hasError=false],.multiple-checked[theme=light][hasError=false]{background:#f4f4f4;border-color:#242424;outline:1px solid #242424}.multiple-checked[theme=dark][hasError=false] ::ng-deep label,.multiple-checked[theme=light][hasError=false] ::ng-deep label{color:#242424}.multiple-checked[theme=dark][hasError=true],.multiple-checked[theme=light][hasError=true]{border:1px solid #e02800;outline:1px solid #e02800;background:#fff;border-radius:10px}.multiple-checked[theme=dark][hasError=true] ::ng-deep label,.multiple-checked[theme=light][hasError=true] ::ng-deep label{color:#242424}.multiple-checked[theme=classic][hasError=true]{border:1px solid #e02800;outline:1px solid #e02800}.multiple-unchecked{border:1px solid #e0e0e0;display:flex;flex-direction:row;align-items:center;gap:16px;background:#fff;border-radius:8px}.multiple-unchecked ::ng-deep .mat-mdc-radio-button{width:100%;height:100%;padding:8px}.multiple-unchecked:hover{background:#f6f6f6;border:1px solid #e0e0e0}.multiple-unchecked ::ng-deep label{height:100%}.multiple-unchecked ::ng-deep .mat-mdc-radio-button .mdc-radio .mdc-radio__background:before{opacity:0!important}.multiple-unchecked[theme=dark][hasError=false],.multiple-unchecked[theme=light][hasError=false]{border:1px solid #919191;background:#fff}.multiple-unchecked[theme=dark][hasError=false]:not(.multiple-disabled):hover,.multiple-unchecked[theme=light][hasError=false]:not(.multiple-disabled):hover{outline:1px solid #242424;background:#fff;border-color:#242424!important}.multiple-unchecked[hasError=true]{border:1px solid #e02800;outline:1px solid #e02800;background:#fff}.multiple-unchecked[hasError=true]:not([theme=classic]){border-radius:10px}.multiple-unchecked ::ng-deep label,.multiple-checked ::ng-deep label{padding-left:0;width:fit-content;cursor:pointer}.radio-container{cursor:pointer}.radio-container .label{cursor:pointer;-webkit-user-select:none;user-select:none}.radio-button .label{cursor:pointer;-webkit-user-select:none;user-select:none;padding-left:4px}:host *[hasError=true] .mat-mdc-radio-button.mat-accent{--mdc-radio-unselected-icon-color: #e02800 !important;--mdc-radio-unselected-hover-icon-color: #e02800 !important;--mdc-radio-unselected-focus-icon-color: #e02800 !important}:host ::ng-deep .mat-mdc-radio-touch-target{height:40px;width:40px}.radio,.radio-container{--border-width-default-state: 4px;--border-width-animation-state: 6px;width:100%}.radio[alignment=top] ::ng-deep .mdc-form-field,.radio-container[alignment=top] ::ng-deep .mdc-form-field{align-items:start}.radio[alignment=top] .label,.radio-container[alignment=top] .label{margin-top:10px}.radio[truncate-text=true] .label,.radio[truncate-text=true] ::ng-deep label,.radio-container[truncate-text=true] .label,.radio-container[truncate-text=true] ::ng-deep label{-webkit-user-select:none;user-select:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes focus-ring-animation{0%{outline-width:var(--border-width-animation-state)}to{outline-width:var(--border-width-default-state)}}.radio-container[hasError=true]{outline:1px solid #e02800}.radio .label{display:block;width:100%;cursor:pointer}::ng-deep .mat-mdc-radio-button.mat-accent.cdk-keyboard-focused{outline:none;--mat-radio-checked-ripple-color: transparent !important;--mat-radio-ripple-color: transparent !important}::ng-deep .mat-mdc-radio-button.mat-accent.cdk-keyboard-focused ::ng-deep .mdc-radio__background{outline:3px solid #242424;animation:focus-ring-animation .4s forwards}::ng-deep .mat-mdc-radio-button.mat-accent.cdk-keyboard-focused ::ng-deep .mdc-radio__background:after{content:\"\";position:absolute;width:100%;height:100%;top:0;left:0;outline:2px solid #ffffff;border-radius:100px}\n"] }]
289
297
  }], ctorParameters: () => [{ type: undefined, decorators: [{
290
298
  type: Optional
291
299
  }, {
@@ -353,14 +361,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
353
361
 
354
362
  class RadioButtonComponentModule {
355
363
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: RadioButtonComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
356
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: RadioButtonComponentModule, declarations: [RadioButtonComponent], imports: [CommonModule, MatRadioModule, FormsModule, ReactiveFormsModule, MatInputModule, EllipseTextDirective, MatTooltipModule, MatCheckboxModule, FocusVisibleDirective], exports: [RadioButtonComponent] }); }
357
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: RadioButtonComponentModule, imports: [CommonModule, MatRadioModule, FormsModule, ReactiveFormsModule, MatInputModule, MatTooltipModule, MatCheckboxModule] }); }
364
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.19", ngImport: i0, type: RadioButtonComponentModule, declarations: [RadioButtonComponent], imports: [CommonModule,
365
+ MatRadioModule,
366
+ FormsModule,
367
+ ReactiveFormsModule,
368
+ MatInputModule,
369
+ EllipseTextDirective,
370
+ MatTooltipModule,
371
+ MatCheckboxModule,
372
+ FocusVisibleDirective], exports: [RadioButtonComponent] }); }
373
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: RadioButtonComponentModule, imports: [CommonModule,
374
+ MatRadioModule,
375
+ FormsModule,
376
+ ReactiveFormsModule,
377
+ MatInputModule,
378
+ MatTooltipModule,
379
+ MatCheckboxModule] }); }
358
380
  }
359
381
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: RadioButtonComponentModule, decorators: [{
360
382
  type: NgModule,
361
383
  args: [{
362
384
  declarations: [RadioButtonComponent],
363
- imports: [CommonModule, MatRadioModule, FormsModule, ReactiveFormsModule, MatInputModule, EllipseTextDirective, MatTooltipModule, MatCheckboxModule, FocusVisibleDirective],
385
+ imports: [
386
+ CommonModule,
387
+ MatRadioModule,
388
+ FormsModule,
389
+ ReactiveFormsModule,
390
+ MatInputModule,
391
+ EllipseTextDirective,
392
+ MatTooltipModule,
393
+ MatCheckboxModule,
394
+ FocusVisibleDirective,
395
+ ],
364
396
  exports: [RadioButtonComponent],
365
397
  }]
366
398
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-radio-button.mjs","sources":["../../../components/radio-button/radio-button.component.ts","../../../components/radio-button/radio-button.component.html","../../../components/radio-button/radio-button.component.module.ts","../../../components/radio-button/testgorilla-tgo-ui-components-radio-button.ts"],"sourcesContent":["/* eslint-disable no-underscore-dangle */\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n EventEmitter,\n Host,\n HostBinding,\n HostListener,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { MatRadioButton } from '@angular/material/radio';\nimport { RadioButtonEventType } from './radio-button.model';\nimport { ApplicationTheme } from \"@testgorilla/tgo-ui/components/core\";\nimport { ControlValueAccessor, NgControl } from \"@angular/forms\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { Alignment } from '@testgorilla/tgo-ui/components/core';\nimport { FocusMonitor } from '@angular/cdk/a11y';\n\n@Component({\n selector: 'ui-radio-button',\n templateUrl: './radio-button.component.html',\n styleUrls: ['./radio-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n // Needs to be removed since it causes some a11y issues (https://github.com/angular/components/issues/21266).\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the mat-radio-button element.\n '(focus)': 'radioElement.focus()',\n },\n standalone: false\n})\nexport class RadioButtonComponent implements OnInit, OnChanges, ControlValueAccessor, AfterViewInit, OnDestroy {\n @HostListener('click', ['$event'])\n onHostClick(event: any): void {\n if (event.target?.classList?.value?.includes?.('mat-mdc-radio-button') || event.target?.classList?.value?.includes?.('mdc-form-field')) {\n this.radioElement._inputElement.nativeElement.click();\n }\n }\n /**\n * Determines whether the radio button is disabled.\n * Default: false.\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() disabled = false;\n\n /**\n * Determines whether the radio button is checked.\n * Default: false.\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n //@Input() selected = false;\n\n _selected = false;\n @Input()\n get selected() {\n return this._selected;\n }\n set selected(selected: boolean) {\n this._selected = selected;\n }\n\n /**\n * Determines whether the radio button can be unchecked.\n * Default: false.\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() allowUnselect = false;\n\n /**\n * Determines the radio button color.\n * Default: Test Gorilla primary color.\n *\n * @type {string}\n * @memberof RadioButtonComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null = null;\n\n /**\n * Used to group radios for unique selection.\n *\n * @type {string}\n * @memberof RadioButtonComponent\n */\n @Input() name = '';\n\n /**\n * Text content will be applied to the input element if present.\n *\n * @type {string}\n * @memberof RadioButtonComponent\n */\n @Input() label = '';\n\n /**\n * Determines whether the radio button is a multiple choice cell.\n * Default: false\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() multiple = false;\n\n /**\n * Determines value of the radio button.\n * Default: false\n *\n * @type {any}\n * @memberof RadioButtonComponent\n */\n @Input() value: any;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof RadioButtonComponent\n */\n @Input() applicationTheme: ApplicationTheme = '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 RadioButtonComponent\n */\n @Input() ariaLabel: string;\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 RadioButtonComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * Defines if checkbox has error\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() hasError = false;\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 {string}\n * @memberof RadioButtonComponent\n */\n @Input() ariaLabelledby = '';\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 {string}\n * @memberof RadioButtonComponent\n */\n @Input() ariaDescribedby = '';\n\n /**\n * Truncate text if it is too long\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() truncateText = false;\n\n /**\n * Text alignment\n * @type {'center' | 'top'}\n * @memberof RadioButtonComponent\n */\n @Input() alignment: Alignment = 'center';\n\n /**\n * Sets the tab index for the checkbox component.\n * This determines the order in which elements receive focus when the user navigates through them using the Tab key.\n * Default value is 0.\n *\n * @type {number}\n * @memberof RadioButtonComponent\n */\n @Input() tabIndex = 0;\n\n /**\n * Show tooltip when label is truncated\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() hideTooltipOnEllipsis = false;\n\n /**\n * Event emitted when the checked state of the radio button changes.\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Output() changeRadio = new EventEmitter<RadioButtonEventType>();\n\n classMultiple: string;\n showTooltip = false;\n protected origin: string | null = null;\n\n @ViewChild('radio') radioElement: MatRadioButton;\n @ViewChild('tooltip') tooltipElement: MatTooltip;\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n @Optional() @Self() public ngControl: NgControl,\n @Optional() @Host() public hostNgControl: NgControl,\n private destroyRef: DestroyRef,\n private focusMonitor: FocusMonitor,\n private ngZone: NgZone,\n private cdr: ChangeDetectorRef,\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngOnInit() {\n this.checkHost();\n this.classMultiple = this.setClass();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['selected']) {\n this.classMultiple = this.setClass();\n }\n this.setCompanyColor();\n }\n\n ngAfterViewInit() {\n this.radioElement._inputElement.nativeElement.setAttribute('role', 'radio');\n this.radioElement._inputElement.nativeElement.onclick = () => {\n this.clickRadio();\n };\n\n this.focusMonitor.monitor(this.radioElement._inputElement.nativeElement).pipe(\n takeUntilDestroyed(this.destroyRef),\n ).subscribe(origin =>\n this.ngZone.run(() => {\n this.origin = origin;\n this.cdr.markForCheck();\n this.onFocus(origin === 'keyboard');\n }),\n );\n }\n\n ngOnDestroy(): void {\n this.focusMonitor.stopMonitoring(this.radioElement._inputElement.nativeElement);\n }\n\n //Click method\n clickRadio() {\n if (this.allowUnselect) {\n this.radioElement.checked = !this.radioElement.checked;\n this._selected = this.radioElement.checked;\n this.classMultiple = this.setClass();\n this.selected = this.radioElement.checked;\n this.changeRadio?.emit({ optionName: this.radioElement.value, optionChecked: this.radioElement.checked });\n } else {\n this.selected = this.radioElement.checked;\n this.changeRadio.emit({ optionName: this.radioElement.value, optionChecked: true });\n }\n if (this.disabled) {\n this._selected = false;\n this.changeRadio.emit({ optionName: '', optionChecked: false });\n }\n this.onChange(this._selected)\n }\n\n writeValue(value: any): void {\n if (typeof value === 'boolean' || value === this.value) {\n this.selected = value;\n }\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n onChange = (_: any) => {};\n\n /**\n * @ignore\n */\n onTouch = () => {};\n\n //Set class for multiple radio\n setClass(): string {\n if (this.multiple) {\n return this._selected ? 'multiple-checked' : 'multiple-unchecked';\n }\n return '';\n }\n\n onLabelEllipsisChange(isEllipsis: boolean): void {\n this.showTooltip = isEllipsis && !this.hideTooltipOnEllipsis;\n }\n\n private checkHost(): void {\n if (this.hostNgControl) {\n this.selected = this.value === this.hostNgControl.value;\n this.hostNgControl.valueChanges?.pipe(\n takeUntilDestroyed(this.destroyRef)\n ).subscribe((value) => {\n this.selected = value === this.value;\n this.classMultiple = this.setClass();\n });\n }\n }\n\n private setCompanyColor(): void {\n this.companyColor = this.companyColor ? this.companyColor : this.applicationTheme === 'classic' ? '#46A997' : '#D410AA';\n }\n\n onFocus(isFocus: boolean): void {\n setTimeout(() => {\n if (this.tooltipElement) {\n if (this.showTooltip && isFocus) {\n this.tooltipElement.show();\n } else {\n this.tooltipElement.hide();\n }\n }\n }, 0);\n }\n\n focus(): void {\n this.radioElement.focus();\n }\n}\n","<div\n #radioContainer\n [class]=\"multiple ? 'radio-container' : 'radio'\"\n [class.multiple-disabled]=\"disabled && multiple\"\n [ngClass]=\"classMultiple\"\n [attr.alignment]=\"alignment\"\n [attr.truncate-text]=\"truncateText\"\n [attr.theme]=\"applicationTheme\"\n [attr.hasError]=\"hasError\"\n (keydown.enter)=\"clickRadio(); radioContainer.focus()\"\n (keydown.space)=\"clickRadio(); radioContainer.focus()\"\n>\n <mat-radio-button\n #radio\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [value]=\"value\"\n class=\"radio-button\"\n [required]=\"ariaRequired\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby ? ariaLabelledby : label\"\n [aria-describedby]=\"ariaDescribedby\"\n (keydown.enter)=\"$event.preventDefault()\"\n (keydown.space)=\"$event.preventDefault()\"\n [tabIndex]=\"tabIndex\"\n >\n @if (label) {\n <span\n #tooltip=\"matTooltip\"\n class=\"label\"\n uiEllipseText\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n [matTooltip]=\"showTooltip ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n >{{ label }}</span>\n }\n <ng-content select=\"[radio-label]\"></ng-content>\n </mat-radio-button>\n</div>\n","import { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { RadioButtonComponent } from './radio-button.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { EllipseTextDirective } from '@testgorilla/tgo-ui/components/core';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { FocusVisibleDirective } from '@testgorilla/tgo-ui/components/checkbox';\n\n@NgModule({\n declarations: [RadioButtonComponent],\n imports: [CommonModule, MatRadioModule, FormsModule, ReactiveFormsModule, MatInputModule, EllipseTextDirective, MatTooltipModule, MatCheckboxModule, FocusVisibleDirective],\n exports: [RadioButtonComponent],\n})\nexport class RadioButtonComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n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AH3B,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,mBAAmB,EAAE,cAAc,EAAwB,gBAAgB,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;;4FAGxI,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBALtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,mBAAmB,EAAE,cAAc,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,qBAAqB,CAAC;oBAC3K,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA;;;ACfD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-radio-button.mjs","sources":["../../../components/radio-button/radio-button.component.ts","../../../components/radio-button/radio-button.component.html","../../../components/radio-button/radio-button.component.module.ts","../../../components/radio-button/testgorilla-tgo-ui-components-radio-button.ts"],"sourcesContent":["/* eslint-disable no-underscore-dangle */\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n EventEmitter,\n Host,\n HostBinding,\n HostListener,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { MatRadioButton } from '@angular/material/radio';\nimport { RadioButtonEventType } from './radio-button.model';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { Alignment } from '@testgorilla/tgo-ui/components/core';\nimport { FocusMonitor } from '@angular/cdk/a11y';\n\n@Component({\n selector: 'ui-radio-button',\n templateUrl: './radio-button.component.html',\n styleUrls: ['./radio-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n // Needs to be removed since it causes some a11y issues (https://github.com/angular/components/issues/21266).\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the mat-radio-button element.\n '(focus)': 'radioElement.focus()',\n },\n standalone: false,\n})\nexport class RadioButtonComponent implements OnInit, OnChanges, ControlValueAccessor, AfterViewInit, OnDestroy {\n @HostListener('click', ['$event'])\n onHostClick(event: any): void {\n if (\n event.target?.classList?.value?.includes?.('mat-mdc-radio-button') ||\n event.target?.classList?.value?.includes?.('mdc-form-field')\n ) {\n this.radioElement._inputElement.nativeElement.click();\n }\n }\n /**\n * Determines whether the radio button is disabled.\n * Default: false.\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() disabled = false;\n\n /**\n * Determines whether the radio button is checked.\n * Default: false.\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n //@Input() selected = false;\n\n _selected = false;\n @Input()\n get selected() {\n return this._selected;\n }\n set selected(selected: boolean) {\n this._selected = selected;\n }\n\n /**\n * Determines whether the radio button can be unchecked.\n * Default: false.\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() allowUnselect = false;\n\n /**\n * Determines the radio button color.\n * Default: Test Gorilla primary color.\n *\n * @type {string}\n * @memberof RadioButtonComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null = null;\n\n /**\n * Used to group radios for unique selection.\n *\n * @type {string}\n * @memberof RadioButtonComponent\n */\n @Input() name = '';\n\n /**\n * Text content will be applied to the input element if present.\n *\n * @type {string}\n * @memberof RadioButtonComponent\n */\n @Input() label = '';\n\n /**\n * Determines whether the radio button is a multiple choice cell.\n * Default: false\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() multiple = false;\n\n /**\n * Determines value of the radio button.\n * Default: false\n *\n * @type {any}\n * @memberof RadioButtonComponent\n */\n @Input() value: any;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof RadioButtonComponent\n */\n @Input() applicationTheme: ApplicationTheme = '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 RadioButtonComponent\n */\n @Input() ariaLabel: string;\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 RadioButtonComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * Defines if checkbox has error\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() hasError = false;\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 {string}\n * @memberof RadioButtonComponent\n */\n @Input() ariaLabelledby = '';\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 {string}\n * @memberof RadioButtonComponent\n */\n @Input() ariaDescribedby = '';\n\n /**\n * Truncate text if it is too long\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() truncateText = false;\n\n /**\n * Text alignment\n * @type {'center' | 'top'}\n * @memberof RadioButtonComponent\n */\n @Input() alignment: Alignment = 'center';\n\n /**\n * Sets the tab index for the checkbox component.\n * This determines the order in which elements receive focus when the user navigates through them using the Tab key.\n * Default value is 0.\n *\n * @type {number}\n * @memberof RadioButtonComponent\n */\n @Input() tabIndex = 0;\n\n /**\n * Show tooltip when label is truncated\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() hideTooltipOnEllipsis = false;\n\n /**\n * Event emitted when the checked state of the radio button changes.\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Output() changeRadio = new EventEmitter<RadioButtonEventType>();\n\n classMultiple: string;\n showTooltip = false;\n protected origin: string | null = null;\n\n @ViewChild('radio') radioElement: MatRadioButton;\n @ViewChild('tooltip') tooltipElement: MatTooltip;\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n @Optional() @Self() public ngControl: NgControl,\n @Optional() @Host() public hostNgControl: NgControl,\n private destroyRef: DestroyRef,\n private focusMonitor: FocusMonitor,\n private ngZone: NgZone,\n private cdr: ChangeDetectorRef\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngOnInit() {\n this.checkHost();\n this.classMultiple = this.setClass();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['selected']) {\n this.classMultiple = this.setClass();\n }\n this.setCompanyColor();\n }\n\n ngAfterViewInit() {\n this.radioElement._inputElement.nativeElement.setAttribute('role', 'radio');\n this.radioElement._inputElement.nativeElement.onclick = () => {\n this.clickRadio();\n };\n\n this.focusMonitor\n .monitor(this.radioElement._inputElement.nativeElement)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(origin =>\n this.ngZone.run(() => {\n this.origin = origin;\n this.cdr.markForCheck();\n this.onFocus(origin === 'keyboard');\n })\n );\n }\n\n ngOnDestroy(): void {\n this.focusMonitor.stopMonitoring(this.radioElement._inputElement.nativeElement);\n }\n\n //Click method\n clickRadio() {\n if (this.allowUnselect) {\n this.radioElement.checked = !this.radioElement.checked;\n this._selected = this.radioElement.checked;\n this.classMultiple = this.setClass();\n this.selected = this.radioElement.checked;\n this.changeRadio?.emit({ optionName: this.radioElement.value, optionChecked: this.radioElement.checked });\n } else {\n this.selected = this.radioElement.checked;\n this.changeRadio.emit({ optionName: this.radioElement.value, optionChecked: true });\n }\n if (this.disabled) {\n this._selected = false;\n this.changeRadio.emit({ optionName: '', optionChecked: false });\n }\n this.onChange(this._selected);\n }\n\n writeValue(value: any): void {\n if (typeof value === 'boolean' || value === this.value) {\n this.selected = value;\n }\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n onChange = (_value: any) => {};\n\n /**\n * @ignore\n */\n onTouch = () => {};\n\n //Set class for multiple radio\n setClass(): string {\n if (this.multiple) {\n return this._selected ? 'multiple-checked' : 'multiple-unchecked';\n }\n return '';\n }\n\n onLabelEllipsisChange(isEllipsis: boolean): void {\n this.showTooltip = isEllipsis && !this.hideTooltipOnEllipsis;\n }\n\n private checkHost(): void {\n if (this.hostNgControl) {\n this.selected = this.value === this.hostNgControl.value;\n this.hostNgControl.valueChanges?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(value => {\n this.selected = value === this.value;\n this.classMultiple = this.setClass();\n });\n }\n }\n\n private setCompanyColor(): void {\n this.companyColor = this.companyColor\n ? this.companyColor\n : this.applicationTheme === 'classic'\n ? '#46A997'\n : '#D410AA';\n }\n\n onFocus(isFocus: boolean): void {\n setTimeout(() => {\n if (this.tooltipElement) {\n if (this.showTooltip && isFocus) {\n this.tooltipElement.show();\n } else {\n this.tooltipElement.hide();\n }\n }\n }, 0);\n }\n\n focus(): void {\n this.radioElement.focus();\n }\n}\n","<div\n #radioContainer\n tabindex=\"0\"\n [class]=\"multiple ? 'radio-container' : 'radio'\"\n [class.multiple-disabled]=\"disabled && multiple\"\n [ngClass]=\"classMultiple\"\n [attr.alignment]=\"alignment\"\n [attr.truncate-text]=\"truncateText\"\n [attr.theme]=\"applicationTheme\"\n [attr.hasError]=\"hasError\"\n (keydown.enter)=\"clickRadio(); radioContainer.focus()\"\n (keydown.space)=\"clickRadio(); radioContainer.focus()\"\n>\n <mat-radio-button\n #radio\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [value]=\"value\"\n class=\"radio-button\"\n [required]=\"ariaRequired\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby ? ariaLabelledby : label\"\n [aria-describedby]=\"ariaDescribedby\"\n (keydown.enter)=\"$event.preventDefault()\"\n (keydown.space)=\"$event.preventDefault()\"\n [tabIndex]=\"tabIndex\"\n >\n @if (label) {\n <span\n #tooltip=\"matTooltip\"\n class=\"label\"\n uiEllipseText\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n [matTooltip]=\"showTooltip ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n >{{ label }}</span\n >\n }\n <ng-content select=\"[radio-label]\"></ng-content>\n </mat-radio-button>\n</div>\n","import { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { RadioButtonComponent } from './radio-button.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { EllipseTextDirective } from '@testgorilla/tgo-ui/components/core';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { FocusVisibleDirective } from '@testgorilla/tgo-ui/components/checkbox';\n\n@NgModule({\n declarations: [RadioButtonComponent],\n imports: [\n CommonModule,\n MatRadioModule,\n FormsModule,\n ReactiveFormsModule,\n MatInputModule,\n EllipseTextDirective,\n MatTooltipModule,\n MatCheckboxModule,\n FocusVisibleDirective,\n ],\n exports: [RadioButtonComponent],\n})\nexport class RadioButtonComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;MAkDa,oBAAoB,CAAA;AAE/B,IAAA,WAAW,CAAC,KAAU,EAAA;AACpB,QAAA,IACE,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,GAAG,sBAAsB,CAAC;AAClE,YAAA,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,GAAG,gBAAgB,CAAC,EAC5D;YACA,IAAI,CAAC,YAAY,CAAC,aAAa,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wBACjB,qBAAqB;AACtB,qBAAA;oBACD,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA;;;ACzBD;;AAEG;;;;"}
@@ -22,7 +22,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImpo
22
22
  type: Pipe,
23
23
  args: [{
24
24
  name: 'halfStar',
25
- standalone: false
25
+ standalone: false,
26
26
  }]
27
27
  }] });
28
28
 
@@ -96,11 +96,11 @@ class RatingComponent {
96
96
  this.hoverIndex = index + 1;
97
97
  }
98
98
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: RatingComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
99
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.19", type: RatingComponent, isStandalone: false, selector: "ui-rating", inputs: { applicationTheme: "applicationTheme", value: "value", theme: "theme", disabled: "disabled", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", barWidth: "barWidth", canUnselect: "canUnselect", length: "length" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"rating\"\n (mouseleave)=\"onHover(-1)\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n>\n <ng-container *ngIf=\"theme === 'block';else stars\">\n <div class=\"rating-item\" [attr.theme]=\"applicationTheme\" *ngFor=\"let item of items\" (click)=\"select(item)\" (mouseenter)=\"onHover(item)\"\n [ngClass]=\"{ 'rating-item-selected': item < value, 'rating-item-hover': item < hoverIndex }\"\n [ngStyle]=\"{'width.px': barWidth}\">\n </div>\n </ng-container>\n\n <ng-template #stars>\n <div class=\"star-container\" [attr.theme]=\"applicationTheme\">\n <div\n #star\n class=\"star\"\n [tabIndex]=\"0\"\n (mouseenter)=\"onHover(item)\"\n (mouseleave)=\"onHover(-1)\"\n [ngClass]=\"{\n filled: value > i,\n hover: item < hoverIndex && (value ? item >= value : true),\n disabled,\n 'filled-half': i + 1 | halfStar : value\n }\"\n *ngFor=\"let item of items; index as i\"\n (click)=\"select(item); star.blur()\"\n ></div>\n </div>\n </ng-template>\n</div>\n", styles: [".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}.rating{display:flex;align-content:center;justify-content:flex-start;align-items:center}.rating-item{width:35px;height:16px;border:1px solid #E0E0E0;border-left:0;cursor:pointer}.rating-item-hover{border:0;background-color:#b5ddd5}.rating-item-hover[theme=dark],.rating-item-hover[theme=light]{background-color:#ffb3ee}.rating-item-hover:not(:first-child){border-left:1px solid #ffffff}.rating-item:first-child{border-radius:4px 0 0 4px}.rating-item:first-child:not(.rating-item-selected):not(.rating-item-hover){border-left:1px solid #E0E0E0}.rating-item:last-child{border-radius:0 4px 4px 0}.rating-item:first-child:last-child{border-radius:4px}.rating-item-selected{border:0;background-color:#46a997}.rating-item-selected[theme=dark],.rating-item-selected[theme=light]{background-color:#d410aa}.rating-item-selected:not(:first-child){border-left:1px solid #ffffff}.rating .star-container{display:flex;flex-direction:row;min-height:24px}.rating .star-container .star{width:24px;height:24px;background:url(/icons/rating-icons/Star-outline.svg) no-repeat center;background-size:100%;margin-right:4px}.rating .star-container .star:last-child{margin-right:0}.rating .star-container .star:focus{outline:1px dashed #888888}.rating .star-container .star:hover,.rating .star-container .star.hover,.rating .star-container .star:focus{opacity:.5}.rating .star-container .star.filled-half{background-image:url(/icons/rating-icons/Star-half.svg)!important}.rating .star-container .star.disabled{pointer-events:none;background-image:url(/icons/rating-icons/Star-filled-disabled.svg)}.rating .star-container .star:active{opacity:1}.rating .star-container .star-filled,.rating .star-container[theme=dark] .star.filled,.rating .star-container[theme=light] .star.filled,.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus,.rating .star-container .star:hover,.rating .star-container .star.hover,.rating .star-container .star:focus,.rating .star-container .star.filled,.rating .star-container .star:active{background-image:url(/icons/rating-icons/Star-filled.svg)}.rating .star-container[theme=dark] .star,.rating .star-container[theme=light] .star{cursor:pointer;background:url(/icons/rebrand/Review-star-in-line.svg) no-repeat center}.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus{opacity:.5}.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:focus{outline-offset:4px}.rating .star-container[theme=dark] .star.filled-half,.rating .star-container[theme=light] .star.filled-half{background-image:url(/icons/rebrand/Review-half-star-filled.svg)!important}.rating .star-container[theme=dark] .star.disabled,.rating .star-container[theme=light] .star.disabled{background-image:url(/icons/rebrand/Review-star-filled-disabled.svg)}.rating .star-container[theme=dark] .star-filled,.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=dark] .star.filled,.rating .star-container[theme=dark] .star:active,.rating .star-container[theme=light] .star-filled,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus,.rating .star-container[theme=light] .star.filled,.rating .star-container[theme=light] .star:active{background-image:url(/icons/rebrand/Review-star-filled.svg)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: HalfStarPipe, name: "halfStar" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
99
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.19", type: RatingComponent, isStandalone: false, selector: "ui-rating", inputs: { applicationTheme: "applicationTheme", value: "value", theme: "theme", disabled: "disabled", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", barWidth: "barWidth", canUnselect: "canUnselect", length: "length" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"rating\" (mouseleave)=\"onHover(-1)\" [attr.aria-label]=\"ariaLabel\" [attr.aria-required]=\"ariaRequired\">\n <ng-container *ngIf=\"theme === 'block'; else stars\">\n <div\n class=\"rating-item\"\n [attr.theme]=\"applicationTheme\"\n *ngFor=\"let item of items\"\n tabindex=\"0\"\n (click)=\"select(item)\"\n (keydown.enter)=\"select(item)\"\n (mouseenter)=\"onHover(item)\"\n [ngClass]=\"{ 'rating-item-selected': item < value, 'rating-item-hover': item < hoverIndex }\"\n [ngStyle]=\"{ 'width.px': barWidth }\"\n ></div>\n </ng-container>\n\n <ng-template #stars>\n <div class=\"star-container\" [attr.theme]=\"applicationTheme\">\n <div\n #star\n class=\"star\"\n tabindex=\"0\"\n [tabIndex]=\"0\"\n (mouseenter)=\"onHover(item)\"\n (mouseleave)=\"onHover(-1)\"\n [ngClass]=\"{\n filled: value > i,\n hover: item < hoverIndex && (value ? item >= value : true),\n disabled,\n 'filled-half': i + 1 | halfStar: value,\n }\"\n *ngFor=\"let item of items; index as i\"\n (click)=\"select(item); star.blur()\"\n (keydown.enter)=\"select(item); star.blur()\"\n ></div>\n </div>\n </ng-template>\n</div>\n", styles: [".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}.rating{display:flex;align-content:center;justify-content:flex-start;align-items:center}.rating-item{width:35px;height:16px;border:1px solid #e0e0e0;border-left:0;cursor:pointer}.rating-item-hover{border:0;background-color:#b5ddd5}.rating-item-hover[theme=dark],.rating-item-hover[theme=light]{background-color:#ffb3ee}.rating-item-hover:not(:first-child){border-left:1px solid #ffffff}.rating-item:first-child{border-radius:4px 0 0 4px}.rating-item:first-child:not(.rating-item-selected):not(.rating-item-hover){border-left:1px solid #e0e0e0}.rating-item:last-child{border-radius:0 4px 4px 0}.rating-item:first-child:last-child{border-radius:4px}.rating-item-selected{border:0;background-color:#46a997}.rating-item-selected[theme=dark],.rating-item-selected[theme=light]{background-color:#d410aa}.rating-item-selected:not(:first-child){border-left:1px solid #ffffff}.rating .star-container{display:flex;flex-direction:row;min-height:24px}.rating .star-container .star{width:24px;height:24px;background:url(/icons/rating-icons/Star-outline.svg) no-repeat center;background-size:100%;margin-right:4px}.rating .star-container .star:last-child{margin-right:0}.rating .star-container .star:focus{outline:1px dashed #888888}.rating .star-container .star:hover,.rating .star-container .star.hover,.rating .star-container .star:focus{opacity:.5}.rating .star-container .star.filled-half{background-image:url(/icons/rating-icons/Star-half.svg)!important}.rating .star-container .star.disabled{pointer-events:none;background-image:url(/icons/rating-icons/Star-filled-disabled.svg)}.rating .star-container .star:active{opacity:1}.rating .star-container .star-filled,.rating .star-container[theme=dark] .star.filled,.rating .star-container[theme=light] .star.filled,.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus,.rating .star-container .star:hover,.rating .star-container .star.hover,.rating .star-container .star:focus,.rating .star-container .star.filled,.rating .star-container .star:active{background-image:url(/icons/rating-icons/Star-filled.svg)}.rating .star-container[theme=dark] .star,.rating .star-container[theme=light] .star{cursor:pointer;background:url(/icons/rebrand/Review-star-in-line.svg) no-repeat center}.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus{opacity:.5}.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:focus{outline-offset:4px}.rating .star-container[theme=dark] .star.filled-half,.rating .star-container[theme=light] .star.filled-half{background-image:url(/icons/rebrand/Review-half-star-filled.svg)!important}.rating .star-container[theme=dark] .star.disabled,.rating .star-container[theme=light] .star.disabled{background-image:url(/icons/rebrand/Review-star-filled-disabled.svg)}.rating .star-container[theme=dark] .star-filled,.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=dark] .star.filled,.rating .star-container[theme=dark] .star:active,.rating .star-container[theme=light] .star-filled,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus,.rating .star-container[theme=light] .star.filled,.rating .star-container[theme=light] .star:active{background-image:url(/icons/rebrand/Review-star-filled.svg)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: HalfStarPipe, name: "halfStar" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
100
100
  }
101
101
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: RatingComponent, decorators: [{
102
102
  type: Component,
103
- args: [{ selector: 'ui-rating', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"rating\"\n (mouseleave)=\"onHover(-1)\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n>\n <ng-container *ngIf=\"theme === 'block';else stars\">\n <div class=\"rating-item\" [attr.theme]=\"applicationTheme\" *ngFor=\"let item of items\" (click)=\"select(item)\" (mouseenter)=\"onHover(item)\"\n [ngClass]=\"{ 'rating-item-selected': item < value, 'rating-item-hover': item < hoverIndex }\"\n [ngStyle]=\"{'width.px': barWidth}\">\n </div>\n </ng-container>\n\n <ng-template #stars>\n <div class=\"star-container\" [attr.theme]=\"applicationTheme\">\n <div\n #star\n class=\"star\"\n [tabIndex]=\"0\"\n (mouseenter)=\"onHover(item)\"\n (mouseleave)=\"onHover(-1)\"\n [ngClass]=\"{\n filled: value > i,\n hover: item < hoverIndex && (value ? item >= value : true),\n disabled,\n 'filled-half': i + 1 | halfStar : value\n }\"\n *ngFor=\"let item of items; index as i\"\n (click)=\"select(item); star.blur()\"\n ></div>\n </div>\n </ng-template>\n</div>\n", styles: [".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}.rating{display:flex;align-content:center;justify-content:flex-start;align-items:center}.rating-item{width:35px;height:16px;border:1px solid #E0E0E0;border-left:0;cursor:pointer}.rating-item-hover{border:0;background-color:#b5ddd5}.rating-item-hover[theme=dark],.rating-item-hover[theme=light]{background-color:#ffb3ee}.rating-item-hover:not(:first-child){border-left:1px solid #ffffff}.rating-item:first-child{border-radius:4px 0 0 4px}.rating-item:first-child:not(.rating-item-selected):not(.rating-item-hover){border-left:1px solid #E0E0E0}.rating-item:last-child{border-radius:0 4px 4px 0}.rating-item:first-child:last-child{border-radius:4px}.rating-item-selected{border:0;background-color:#46a997}.rating-item-selected[theme=dark],.rating-item-selected[theme=light]{background-color:#d410aa}.rating-item-selected:not(:first-child){border-left:1px solid #ffffff}.rating .star-container{display:flex;flex-direction:row;min-height:24px}.rating .star-container .star{width:24px;height:24px;background:url(/icons/rating-icons/Star-outline.svg) no-repeat center;background-size:100%;margin-right:4px}.rating .star-container .star:last-child{margin-right:0}.rating .star-container .star:focus{outline:1px dashed #888888}.rating .star-container .star:hover,.rating .star-container .star.hover,.rating .star-container .star:focus{opacity:.5}.rating .star-container .star.filled-half{background-image:url(/icons/rating-icons/Star-half.svg)!important}.rating .star-container .star.disabled{pointer-events:none;background-image:url(/icons/rating-icons/Star-filled-disabled.svg)}.rating .star-container .star:active{opacity:1}.rating .star-container .star-filled,.rating .star-container[theme=dark] .star.filled,.rating .star-container[theme=light] .star.filled,.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus,.rating .star-container .star:hover,.rating .star-container .star.hover,.rating .star-container .star:focus,.rating .star-container .star.filled,.rating .star-container .star:active{background-image:url(/icons/rating-icons/Star-filled.svg)}.rating .star-container[theme=dark] .star,.rating .star-container[theme=light] .star{cursor:pointer;background:url(/icons/rebrand/Review-star-in-line.svg) no-repeat center}.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus{opacity:.5}.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:focus{outline-offset:4px}.rating .star-container[theme=dark] .star.filled-half,.rating .star-container[theme=light] .star.filled-half{background-image:url(/icons/rebrand/Review-half-star-filled.svg)!important}.rating .star-container[theme=dark] .star.disabled,.rating .star-container[theme=light] .star.disabled{background-image:url(/icons/rebrand/Review-star-filled-disabled.svg)}.rating .star-container[theme=dark] .star-filled,.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=dark] .star.filled,.rating .star-container[theme=dark] .star:active,.rating .star-container[theme=light] .star-filled,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus,.rating .star-container[theme=light] .star.filled,.rating .star-container[theme=light] .star:active{background-image:url(/icons/rebrand/Review-star-filled.svg)}\n"] }]
103
+ args: [{ selector: 'ui-rating', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"rating\" (mouseleave)=\"onHover(-1)\" [attr.aria-label]=\"ariaLabel\" [attr.aria-required]=\"ariaRequired\">\n <ng-container *ngIf=\"theme === 'block'; else stars\">\n <div\n class=\"rating-item\"\n [attr.theme]=\"applicationTheme\"\n *ngFor=\"let item of items\"\n tabindex=\"0\"\n (click)=\"select(item)\"\n (keydown.enter)=\"select(item)\"\n (mouseenter)=\"onHover(item)\"\n [ngClass]=\"{ 'rating-item-selected': item < value, 'rating-item-hover': item < hoverIndex }\"\n [ngStyle]=\"{ 'width.px': barWidth }\"\n ></div>\n </ng-container>\n\n <ng-template #stars>\n <div class=\"star-container\" [attr.theme]=\"applicationTheme\">\n <div\n #star\n class=\"star\"\n tabindex=\"0\"\n [tabIndex]=\"0\"\n (mouseenter)=\"onHover(item)\"\n (mouseleave)=\"onHover(-1)\"\n [ngClass]=\"{\n filled: value > i,\n hover: item < hoverIndex && (value ? item >= value : true),\n disabled,\n 'filled-half': i + 1 | halfStar: value,\n }\"\n *ngFor=\"let item of items; index as i\"\n (click)=\"select(item); star.blur()\"\n (keydown.enter)=\"select(item); star.blur()\"\n ></div>\n </div>\n </ng-template>\n</div>\n", styles: [".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}.rating{display:flex;align-content:center;justify-content:flex-start;align-items:center}.rating-item{width:35px;height:16px;border:1px solid #e0e0e0;border-left:0;cursor:pointer}.rating-item-hover{border:0;background-color:#b5ddd5}.rating-item-hover[theme=dark],.rating-item-hover[theme=light]{background-color:#ffb3ee}.rating-item-hover:not(:first-child){border-left:1px solid #ffffff}.rating-item:first-child{border-radius:4px 0 0 4px}.rating-item:first-child:not(.rating-item-selected):not(.rating-item-hover){border-left:1px solid #e0e0e0}.rating-item:last-child{border-radius:0 4px 4px 0}.rating-item:first-child:last-child{border-radius:4px}.rating-item-selected{border:0;background-color:#46a997}.rating-item-selected[theme=dark],.rating-item-selected[theme=light]{background-color:#d410aa}.rating-item-selected:not(:first-child){border-left:1px solid #ffffff}.rating .star-container{display:flex;flex-direction:row;min-height:24px}.rating .star-container .star{width:24px;height:24px;background:url(/icons/rating-icons/Star-outline.svg) no-repeat center;background-size:100%;margin-right:4px}.rating .star-container .star:last-child{margin-right:0}.rating .star-container .star:focus{outline:1px dashed #888888}.rating .star-container .star:hover,.rating .star-container .star.hover,.rating .star-container .star:focus{opacity:.5}.rating .star-container .star.filled-half{background-image:url(/icons/rating-icons/Star-half.svg)!important}.rating .star-container .star.disabled{pointer-events:none;background-image:url(/icons/rating-icons/Star-filled-disabled.svg)}.rating .star-container .star:active{opacity:1}.rating .star-container .star-filled,.rating .star-container[theme=dark] .star.filled,.rating .star-container[theme=light] .star.filled,.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus,.rating .star-container .star:hover,.rating .star-container .star.hover,.rating .star-container .star:focus,.rating .star-container .star.filled,.rating .star-container .star:active{background-image:url(/icons/rating-icons/Star-filled.svg)}.rating .star-container[theme=dark] .star,.rating .star-container[theme=light] .star{cursor:pointer;background:url(/icons/rebrand/Review-star-in-line.svg) no-repeat center}.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus{opacity:.5}.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:focus{outline-offset:4px}.rating .star-container[theme=dark] .star.filled-half,.rating .star-container[theme=light] .star.filled-half{background-image:url(/icons/rebrand/Review-half-star-filled.svg)!important}.rating .star-container[theme=dark] .star.disabled,.rating .star-container[theme=light] .star.disabled{background-image:url(/icons/rebrand/Review-star-filled-disabled.svg)}.rating .star-container[theme=dark] .star-filled,.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=dark] .star.filled,.rating .star-container[theme=dark] .star:active,.rating .star-container[theme=light] .star-filled,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus,.rating .star-container[theme=light] .star.filled,.rating .star-container[theme=light] .star:active{background-image:url(/icons/rebrand/Review-star-filled.svg)}\n"] }]
104
104
  }], ctorParameters: () => [{ type: undefined, decorators: [{
105
105
  type: Optional
106
106
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-rating.mjs","sources":["../../../components/rating/half-star.pipe.ts","../../../components/rating/rating.component.ts","../../../components/rating/rating.component.html","../../../components/rating/rating.component.module.ts","../../../components/rating/testgorilla-tgo-ui-components-rating.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'halfStar',\n standalone: false\n})\nexport class HalfStarPipe implements PipeTransform {\n /**\n * @description Used to indicate whether display half-star icon.\n * Returns true if the rounded value of the current element\n * is equal to it's index, and value is not integer (e.g. index = 4, value = 3.5),\n * @param index the index of the current element\n * @param value the value of the current element\n */\n transform(index: number, value: number): boolean {\n return Math.ceil(value) === index && !Number.isInteger(value);\n }\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Inject, Input, Optional, Output } from '@angular/core';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\n\nexport type RatingComponentTheme = 'stars' | 'block';\n\n@Component({\n selector: 'ui-rating',\n templateUrl: './rating.component.html',\n styleUrls: ['./rating.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class RatingComponent {\n private readonly MIN_LENGTH = 0;\n private readonly DEFAULT_LENGTH = 5;\n protected items: number[] = [];\n protected hoverIndex: number;\n\n /**\n *\n * Defines the application theme where accordion is used\n *\n * @type {ApplicationTheme}\n * @memberof AccordionComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * The value representing the rating.\n * @type {number}\n * @memberof RatingComponent\n */\n @Input() value: number;\n\n /**\n * The theme of the rating component. Defaults \"block\".\n * @type {RatingComponentTheme}\n * @memberof RatingComponent\n */\n @Input() theme: RatingComponentTheme = 'block';\n\n /**\n * A flag indicating whether the rating component is disabled.\n * @type {boolean}\n * @memberof RatingComponent\n */\n @Input() disabled = false;\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 RatingComponent\n */\n @Input() ariaLabel: string;\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 RatingComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * The width of the rating bar.\n * @type {number}\n * @memberof RatingComponent\n */\n @Input() barWidth = 35;\n\n /**\n * A flag indicating whether the rating can be unselected by clicking on the same value.\n * When false, clicking on the same value will not change the rating.\n * @type {boolean}\n * @memberof RatingComponent\n */\n @Input() canUnselect = true;\n\n @Input() set length(length: number) {\n this.items = Array(Math.max(length, this.MIN_LENGTH))\n .fill(0)\n .map((x, i) => i);\n }\n\n @Output() valueChange = new EventEmitter<number>();\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n this.length = this.DEFAULT_LENGTH;\n\n }\n\n protected select(index: number): void {\n const newValue = index + 1;\n \n // If canUnselect is false and we're clicking on the same value, don't change anything\n if (!this.canUnselect && this.value === newValue) {\n return;\n }\n \n this.value = this.value === newValue ? 0 : newValue;\n this.valueChange.emit(this.value);\n }\n\n protected onHover(index: number): void {\n this.hoverIndex = index + 1;\n }\n}\n","<div class=\"rating\"\n (mouseleave)=\"onHover(-1)\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n>\n <ng-container *ngIf=\"theme === 'block';else stars\">\n <div class=\"rating-item\" [attr.theme]=\"applicationTheme\" *ngFor=\"let item of items\" (click)=\"select(item)\" (mouseenter)=\"onHover(item)\"\n [ngClass]=\"{ 'rating-item-selected': item < value, 'rating-item-hover': item < hoverIndex }\"\n [ngStyle]=\"{'width.px': barWidth}\">\n </div>\n </ng-container>\n\n <ng-template #stars>\n <div class=\"star-container\" [attr.theme]=\"applicationTheme\">\n <div\n #star\n class=\"star\"\n [tabIndex]=\"0\"\n (mouseenter)=\"onHover(item)\"\n (mouseleave)=\"onHover(-1)\"\n [ngClass]=\"{\n filled: value > i,\n hover: item < hoverIndex && (value ? item >= value : true),\n disabled,\n 'filled-half': i + 1 | halfStar : value\n }\"\n *ngFor=\"let item of items; index as i\"\n (click)=\"select(item); star.blur()\"\n ></div>\n </div>\n </ng-template>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RatingComponent } from './rating.component';\nimport { HalfStarPipe } from './half-star.pipe';\nimport { MatInputModule } from '@angular/material/input';\n\n@NgModule({\n declarations: [RatingComponent, HalfStarPipe],\n imports: [CommonModule, MatInputModule],\n exports: [RatingComponent],\n})\nexport class RatingComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.HalfStarPipe"],"mappings":";;;;;;MAMa,YAAY,CAAA;AACvB;;;;;;AAMG;IACH,SAAS,CAAC,KAAa,EAAE,KAAa,EAAA;AACpC,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;IAC/D;+GAVW,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,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qB,EAAA,YAAA,EAAA,CAJjB,eAAe,EAAE,YAAY,aAClC,YAAY,EAAE,cAAc,CAAA,EAAA,OAAA,EAAA,CAC5B,eAAe,CAAA,EAAA,CAAA,CAAA;gHAEd,qBAAqB,EAAA,OAAA,EAAA,CAHtB,YAAY,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;;4FAG3B,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,eAAe,EAAE,YAAY,CAAC;AAC7C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;oBACvC,OAAO,EAAE,CAAC,eAAe,CAAC;AAC3B,iBAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-rating.mjs","sources":["../../../components/rating/half-star.pipe.ts","../../../components/rating/rating.component.ts","../../../components/rating/rating.component.html","../../../components/rating/rating.component.module.ts","../../../components/rating/testgorilla-tgo-ui-components-rating.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'halfStar',\n standalone: false,\n})\nexport class HalfStarPipe implements PipeTransform {\n /**\n * @description Used to indicate whether display half-star icon.\n * Returns true if the rounded value of the current element\n * is equal to it's index, and value is not integer (e.g. index = 4, value = 3.5),\n * @param index the index of the current element\n * @param value the value of the current element\n */\n transform(index: number, value: number): boolean {\n return Math.ceil(value) === index && !Number.isInteger(value);\n }\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Inject, Input, Optional, Output } from '@angular/core';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\n\nexport type RatingComponentTheme = 'stars' | 'block';\n\n@Component({\n selector: 'ui-rating',\n templateUrl: './rating.component.html',\n styleUrls: ['./rating.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false,\n})\nexport class RatingComponent {\n private readonly MIN_LENGTH = 0;\n private readonly DEFAULT_LENGTH = 5;\n protected items: number[] = [];\n protected hoverIndex: number;\n\n /**\n *\n * Defines the application theme where accordion is used\n *\n * @type {ApplicationTheme}\n * @memberof AccordionComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * The value representing the rating.\n * @type {number}\n * @memberof RatingComponent\n */\n @Input() value: number;\n\n /**\n * The theme of the rating component. Defaults \"block\".\n * @type {RatingComponentTheme}\n * @memberof RatingComponent\n */\n @Input() theme: RatingComponentTheme = 'block';\n\n /**\n * A flag indicating whether the rating component is disabled.\n * @type {boolean}\n * @memberof RatingComponent\n */\n @Input() disabled = false;\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 RatingComponent\n */\n @Input() ariaLabel: string;\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 RatingComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * The width of the rating bar.\n * @type {number}\n * @memberof RatingComponent\n */\n @Input() barWidth = 35;\n\n /**\n * A flag indicating whether the rating can be unselected by clicking on the same value.\n * When false, clicking on the same value will not change the rating.\n * @type {boolean}\n * @memberof RatingComponent\n */\n @Input() canUnselect = true;\n\n @Input() set length(length: number) {\n this.items = Array(Math.max(length, this.MIN_LENGTH))\n .fill(0)\n .map((x, i) => i);\n }\n\n @Output() valueChange = new EventEmitter<number>();\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n this.length = this.DEFAULT_LENGTH;\n }\n\n protected select(index: number): void {\n const newValue = index + 1;\n\n // If canUnselect is false and we're clicking on the same value, don't change anything\n if (!this.canUnselect && this.value === newValue) {\n return;\n }\n\n this.value = this.value === newValue ? 0 : newValue;\n this.valueChange.emit(this.value);\n }\n\n protected onHover(index: number): void {\n this.hoverIndex = index + 1;\n }\n}\n","<div class=\"rating\" (mouseleave)=\"onHover(-1)\" [attr.aria-label]=\"ariaLabel\" [attr.aria-required]=\"ariaRequired\">\n <ng-container *ngIf=\"theme === 'block'; else stars\">\n <div\n class=\"rating-item\"\n [attr.theme]=\"applicationTheme\"\n *ngFor=\"let item of items\"\n tabindex=\"0\"\n (click)=\"select(item)\"\n (keydown.enter)=\"select(item)\"\n (mouseenter)=\"onHover(item)\"\n [ngClass]=\"{ 'rating-item-selected': item < value, 'rating-item-hover': item < hoverIndex }\"\n [ngStyle]=\"{ 'width.px': barWidth }\"\n ></div>\n </ng-container>\n\n <ng-template #stars>\n <div class=\"star-container\" [attr.theme]=\"applicationTheme\">\n <div\n #star\n class=\"star\"\n tabindex=\"0\"\n [tabIndex]=\"0\"\n (mouseenter)=\"onHover(item)\"\n (mouseleave)=\"onHover(-1)\"\n [ngClass]=\"{\n filled: value > i,\n hover: item < hoverIndex && (value ? item >= value : true),\n disabled,\n 'filled-half': i + 1 | halfStar: value,\n }\"\n *ngFor=\"let item of items; index as i\"\n (click)=\"select(item); star.blur()\"\n (keydown.enter)=\"select(item); star.blur()\"\n ></div>\n </div>\n </ng-template>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RatingComponent } from './rating.component';\nimport { HalfStarPipe } from './half-star.pipe';\nimport { MatInputModule } from '@angular/material/input';\n\n@NgModule({\n declarations: [RatingComponent, HalfStarPipe],\n imports: [CommonModule, MatInputModule],\n exports: [RatingComponent],\n})\nexport class RatingComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.HalfStarPipe"],"mappings":";;;;;;MAMa,YAAY,CAAA;AACvB;;;;;;AAMG;IACH,SAAS,CAAC,KAAa,EAAE,KAAa,EAAA;AACpC,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,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