@tectra-ng/ui 0.4.4 → 0.4.5

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 (180) hide show
  1. package/amount/README.md +19 -1
  2. package/analog-clock/README.md +1 -1
  3. package/autocomplete/README.md +1 -1
  4. package/avatar/README.md +24 -4
  5. package/cascade-select/README.md +1 -1
  6. package/chips-input/README.md +10 -5
  7. package/color-picker/README.md +5 -0
  8. package/countdown/README.md +7 -1
  9. package/country/README.md +14 -1
  10. package/country-select/README.md +2 -1
  11. package/export/README.md +27 -2
  12. package/export-font/README.md +1 -1
  13. package/fesm2022/tectra-ng-ui-amount.mjs +96 -14
  14. package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -1
  15. package/fesm2022/tectra-ng-ui-analog-clock.mjs +6 -19
  16. package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -1
  17. package/fesm2022/tectra-ng-ui-autocomplete.mjs +5 -4
  18. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
  19. package/fesm2022/tectra-ng-ui-avatar.mjs +59 -17
  20. package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -1
  21. package/fesm2022/tectra-ng-ui-button.mjs +2 -2
  22. package/fesm2022/tectra-ng-ui-button.mjs.map +1 -1
  23. package/fesm2022/tectra-ng-ui-card.mjs +2 -2
  24. package/fesm2022/tectra-ng-ui-card.mjs.map +1 -1
  25. package/fesm2022/tectra-ng-ui-cascade-select.mjs +7 -4
  26. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
  27. package/fesm2022/tectra-ng-ui-chips-input.mjs +114 -15
  28. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
  29. package/fesm2022/tectra-ng-ui-color-picker.mjs +93 -6
  30. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
  31. package/fesm2022/tectra-ng-ui-countdown.mjs +39 -10
  32. package/fesm2022/tectra-ng-ui-countdown.mjs.map +1 -1
  33. package/fesm2022/tectra-ng-ui-country-select.mjs +28 -5
  34. package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -1
  35. package/fesm2022/tectra-ng-ui-country.mjs +15 -6
  36. package/fesm2022/tectra-ng-ui-country.mjs.map +1 -1
  37. package/fesm2022/tectra-ng-ui-datepicker.mjs +10 -8
  38. package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -1
  39. package/fesm2022/tectra-ng-ui-dialog.mjs +6 -6
  40. package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -1
  41. package/fesm2022/tectra-ng-ui-export.mjs +1237 -84
  42. package/fesm2022/tectra-ng-ui-export.mjs.map +1 -1
  43. package/fesm2022/tectra-ng-ui-field.mjs +1 -0
  44. package/fesm2022/tectra-ng-ui-field.mjs.map +1 -1
  45. package/fesm2022/tectra-ng-ui-fieldset.mjs +2 -2
  46. package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -1
  47. package/fesm2022/tectra-ng-ui-icon-field.mjs +51 -23
  48. package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -1
  49. package/fesm2022/tectra-ng-ui-input-number.mjs +2 -2
  50. package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -1
  51. package/fesm2022/tectra-ng-ui-input.mjs +5 -4
  52. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
  53. package/fesm2022/tectra-ng-ui-key-filter.mjs +84 -19
  54. package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -1
  55. package/fesm2022/tectra-ng-ui-knob.mjs +24 -2
  56. package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -1
  57. package/fesm2022/tectra-ng-ui-label.mjs +68 -9
  58. package/fesm2022/tectra-ng-ui-label.mjs.map +1 -1
  59. package/fesm2022/tectra-ng-ui-link.mjs +38 -14
  60. package/fesm2022/tectra-ng-ui-link.mjs.map +1 -1
  61. package/fesm2022/tectra-ng-ui-mention-textarea.mjs +16 -5
  62. package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -1
  63. package/fesm2022/tectra-ng-ui-message.mjs +5 -1
  64. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
  65. package/fesm2022/tectra-ng-ui-month-calendar.mjs +26 -9
  66. package/fesm2022/tectra-ng-ui-month-calendar.mjs.map +1 -1
  67. package/fesm2022/tectra-ng-ui-multiselect.mjs +3 -2
  68. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
  69. package/fesm2022/tectra-ng-ui-panel-menu.mjs +45 -14
  70. package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -1
  71. package/fesm2022/tectra-ng-ui-panel.mjs +4 -2
  72. package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -1
  73. package/fesm2022/tectra-ng-ui-password-generator.mjs +18 -1
  74. package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -1
  75. package/fesm2022/tectra-ng-ui-password.mjs +2 -2
  76. package/fesm2022/tectra-ng-ui-password.mjs.map +1 -1
  77. package/fesm2022/tectra-ng-ui-pill.mjs +36 -16
  78. package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -1
  79. package/fesm2022/tectra-ng-ui-rating.mjs +2 -2
  80. package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -1
  81. package/fesm2022/tectra-ng-ui-select.mjs +30 -7
  82. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
  83. package/fesm2022/tectra-ng-ui-stat-tiles.mjs +93 -8
  84. package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -1
  85. package/fesm2022/tectra-ng-ui-status-icon.mjs +40 -3
  86. package/fesm2022/tectra-ng-ui-status-icon.mjs.map +1 -1
  87. package/fesm2022/tectra-ng-ui-table.mjs +20 -6
  88. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
  89. package/fesm2022/tectra-ng-ui-tag.mjs +2 -2
  90. package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -1
  91. package/fesm2022/tectra-ng-ui-toast.mjs +2 -2
  92. package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -1
  93. package/fesm2022/tectra-ng-ui-tree-select.mjs +10 -8
  94. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
  95. package/fesm2022/tectra-ng-ui-tree-table.mjs +4 -4
  96. package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
  97. package/fesm2022/tectra-ng-ui-truncate-text.mjs +33 -9
  98. package/fesm2022/tectra-ng-ui-truncate-text.mjs.map +1 -1
  99. package/fesm2022/tectra-ng-ui.mjs +1 -1
  100. package/icon-field/README.md +2 -1
  101. package/key-filter/README.md +3 -2
  102. package/knob/README.md +3 -1
  103. package/label/README.md +4 -1
  104. package/link/README.md +4 -1
  105. package/message/README.md +2 -2
  106. package/month-calendar/README.md +2 -1
  107. package/multiselect/README.md +1 -1
  108. package/package.json +4 -4
  109. package/panel/README.md +3 -1
  110. package/panel-menu/README.md +3 -2
  111. package/password-generator/README.md +2 -0
  112. package/pill/README.md +4 -4
  113. package/select/README.md +1 -1
  114. package/stat-tiles/README.md +17 -1
  115. package/status-icon/README.md +3 -1
  116. package/table/README.md +1 -1
  117. package/tag/README.md +2 -0
  118. package/tree-select/README.md +1 -1
  119. package/truncate-text/README.md +2 -1
  120. package/types/tectra-ng-ui-amount.d.ts +41 -1
  121. package/types/tectra-ng-ui-amount.d.ts.map +1 -1
  122. package/types/tectra-ng-ui-analog-clock.d.ts +1 -4
  123. package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -1
  124. package/types/tectra-ng-ui-autocomplete.d.ts +1 -1
  125. package/types/tectra-ng-ui-avatar.d.ts +45 -12
  126. package/types/tectra-ng-ui-avatar.d.ts.map +1 -1
  127. package/types/tectra-ng-ui-cascade-select.d.ts +3 -2
  128. package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -1
  129. package/types/tectra-ng-ui-chips-input.d.ts +54 -6
  130. package/types/tectra-ng-ui-chips-input.d.ts.map +1 -1
  131. package/types/tectra-ng-ui-color-picker.d.ts +38 -1
  132. package/types/tectra-ng-ui-color-picker.d.ts.map +1 -1
  133. package/types/tectra-ng-ui-countdown.d.ts +12 -1
  134. package/types/tectra-ng-ui-countdown.d.ts.map +1 -1
  135. package/types/tectra-ng-ui-country-select.d.ts +17 -4
  136. package/types/tectra-ng-ui-country-select.d.ts.map +1 -1
  137. package/types/tectra-ng-ui-country.d.ts +7 -1
  138. package/types/tectra-ng-ui-country.d.ts.map +1 -1
  139. package/types/tectra-ng-ui-datepicker.d.ts +2 -2
  140. package/types/tectra-ng-ui-datepicker.d.ts.map +1 -1
  141. package/types/tectra-ng-ui-export.d.ts +68 -8
  142. package/types/tectra-ng-ui-export.d.ts.map +1 -1
  143. package/types/tectra-ng-ui-icon-field.d.ts +9 -2
  144. package/types/tectra-ng-ui-icon-field.d.ts.map +1 -1
  145. package/types/tectra-ng-ui-key-filter.d.ts +19 -4
  146. package/types/tectra-ng-ui-key-filter.d.ts.map +1 -1
  147. package/types/tectra-ng-ui-knob.d.ts +10 -2
  148. package/types/tectra-ng-ui-knob.d.ts.map +1 -1
  149. package/types/tectra-ng-ui-label.d.ts +8 -1
  150. package/types/tectra-ng-ui-label.d.ts.map +1 -1
  151. package/types/tectra-ng-ui-link.d.ts +8 -2
  152. package/types/tectra-ng-ui-link.d.ts.map +1 -1
  153. package/types/tectra-ng-ui-mention-textarea.d.ts +5 -0
  154. package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -1
  155. package/types/tectra-ng-ui-message.d.ts +1 -1
  156. package/types/tectra-ng-ui-message.d.ts.map +1 -1
  157. package/types/tectra-ng-ui-month-calendar.d.ts +14 -4
  158. package/types/tectra-ng-ui-month-calendar.d.ts.map +1 -1
  159. package/types/tectra-ng-ui-multiselect.d.ts +1 -1
  160. package/types/tectra-ng-ui-panel-menu.d.ts +34 -6
  161. package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -1
  162. package/types/tectra-ng-ui-panel.d.ts +1 -1
  163. package/types/tectra-ng-ui-panel.d.ts.map +1 -1
  164. package/types/tectra-ng-ui-password-generator.d.ts +10 -3
  165. package/types/tectra-ng-ui-password-generator.d.ts.map +1 -1
  166. package/types/tectra-ng-ui-pill.d.ts +9 -5
  167. package/types/tectra-ng-ui-pill.d.ts.map +1 -1
  168. package/types/tectra-ng-ui-select.d.ts +5 -2
  169. package/types/tectra-ng-ui-select.d.ts.map +1 -1
  170. package/types/tectra-ng-ui-stat-tiles.d.ts +49 -5
  171. package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -1
  172. package/types/tectra-ng-ui-status-icon.d.ts +20 -2
  173. package/types/tectra-ng-ui-status-icon.d.ts.map +1 -1
  174. package/types/tectra-ng-ui-table.d.ts +2 -1
  175. package/types/tectra-ng-ui-table.d.ts.map +1 -1
  176. package/types/tectra-ng-ui-tree-select.d.ts +3 -3
  177. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
  178. package/types/tectra-ng-ui-truncate-text.d.ts +7 -2
  179. package/types/tectra-ng-ui-truncate-text.d.ts.map +1 -1
  180. package/types/tectra-ng-ui.d.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-password.mjs","names":[],"sources":["../../../../packages/ui/password/src/password-templates.directive.ts","../../../../packages/ui/password/src/password.icons.ts","../../../../packages/ui/password/src/password.theme.ts","../../../../packages/ui/password/src/password.component.ts","../../../../packages/ui/password/src/password.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxPasswordTemplateContext } from './password.types';\n\n@Directive({ selector: 'ng-template[txPasswordHeader]' })\nexport class TxPasswordHeaderTemplate {\n readonly templateRef = inject<TemplateRef<TxPasswordTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxPasswordHeaderTemplate, context: unknown): context is TxPasswordTemplateContext {\n return !!context;\n }\n}\n\n@Directive({ selector: 'ng-template[txPasswordContent]' })\nexport class TxPasswordContentTemplate {\n readonly templateRef = inject<TemplateRef<TxPasswordTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxPasswordContentTemplate, context: unknown): context is TxPasswordTemplateContext {\n return !!context;\n }\n}\n\n@Directive({ selector: 'ng-template[txPasswordFooter]' })\nexport class TxPasswordFooterTemplate {\n readonly templateRef = inject<TemplateRef<TxPasswordTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxPasswordFooterTemplate, context: unknown): context is TxPasswordTemplateContext {\n return !!context;\n }\n}\n","import { TxIconSet, txIconEye, txIconEyeSlash, txIconInfo, txIconText, txIconTimes } from '@tectra-ng/icons';\n\nexport const PASSWORD_ICON_DEFAULTS: TxIconSet = {\n eye: txIconEye,\n 'eye-slash': txIconEyeSlash,\n info: txIconInfo,\n text: txIconText,\n times: txIconTimes,\n};\n","import { fieldTokens, formFieldTokens, passwordTokens } from '@tectra-ng/themes';\n\nexport const PASSWORD_THEME = {\n field: fieldTokens,\n formField: formFieldTokens,\n password: passwordTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n forwardRef,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectFluid } from '@tectra-ng/core/fluid';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { TxOverlay, TxOverlayRef } from '@tectra-ng/core/overlay';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraPasswordTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxInput } from '@tectra-ng/ui/input';\nimport { TxPasswordContentTemplate, TxPasswordFooterTemplate, TxPasswordHeaderTemplate } from './password-templates.directive';\nimport { TxPasswordPart, TxPasswordSize, TxPasswordStrength, TxPasswordVariant } from './password.types';\nimport { PASSWORD_ICON_DEFAULTS } from './password.icons';\nimport { PASSWORD_THEME } from './password.theme';\n\nconst MEDIUM = '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})';\nconst STRONG = '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})';\n\n@Component({\n selector: 'tx-password',\n imports: [TxInput, TxIcon, NgTemplateOutlet],\n templateUrl: './password.component.html',\n styleUrl: './password.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxPassword), multi: true }],\n host: {\n class: 'tx-password',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-password--fluid]': 'isFluid()',\n '[class.tx-password--filled]': 'hasValue()',\n '[class.tx-password--invalid]': 'isInvalid()',\n '[class.tx-password--disabled]': 'isDisabled()',\n },\n viewProviders: [provideTxIconDefaults(PASSWORD_ICON_DEFAULTS)],\n})\nexport class TxPassword extends TxFormControlBase<string> {\n private readonly passwordTheme = injectTokens(PASSWORD_THEME);\n\n private overlay = inject(TxOverlay);\n private viewContainerRef = inject(ViewContainerRef);\n private generatedId = uniqueId('tx-password');\n private panelRef: TxOverlayRef | null = null;\n\n readonly feedback = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly toggleMask = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly showClear = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly placeholder = input<string | undefined>(undefined);\n readonly promptLabel = input<string | undefined>(undefined);\n readonly weakLabel = input<string | undefined>(undefined);\n readonly mediumLabel = input<string | undefined>(undefined);\n readonly strongLabel = input<string | undefined>(undefined);\n readonly mediumRegex = input<string | RegExp>(MEDIUM);\n readonly strongRegex = input<string | RegExp>(STRONG);\n readonly autocomplete = input<string>('current-password');\n readonly size = input<TxPasswordSize>('medium');\n readonly variant = input<TxPasswordVariant>('outlined');\n readonly fluid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input<boolean, unknown>(false, { alias: 'disabled', transform: booleanAttribute });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly required = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly maxlength = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly name = input<string | undefined>(undefined);\n readonly inputId = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly tabindex = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly dt = input<TectraDeepPartial<TectraPasswordTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxPasswordPart, TxPassword> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly strengthChange = output<TxPasswordStrength | null>();\n readonly cleared = output<void>();\n\n readonly headerTemplate = contentChild(TxPasswordHeaderTemplate);\n readonly contentTemplate = contentChild(TxPasswordContentTemplate);\n readonly footerTemplate = contentChild(TxPasswordFooterTemplate);\n readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\n readonly panelTemplate = viewChild.required<TemplateRef<unknown>>('panel');\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly isFluid = injectFluid(this.fluid);\n readonly isInvalid = injectFieldInvalid(this.invalid);\n readonly passThrough = injectPassThrough('password', this, this.pt, this.ptOptions);\n\n readonly isMasked = signal(true);\n readonly isFocused = signal(false);\n readonly resolvedId = computed(() => this.inputId() ?? this.generatedId);\n readonly infoId = `${this.generatedId}-info`;\n readonly text = computed(() => this.value() ?? '');\n readonly hasValue = computed(() => this.text() !== '');\n readonly isDisabled = computed(() => this.disabled() || this.disabledInput());\n readonly isEditable = computed(() => !this.isDisabled() && !this.readonly());\n readonly strength = computed<TxPasswordStrength | null>(() => {\n const value = this.text();\n if (!value) {\n return null;\n }\n if (toRegExp(this.strongRegex()).test(value)) {\n return 'strong';\n }\n return toRegExp(this.mediumRegex()).test(value) ? 'medium' : 'weak';\n });\n readonly info = computed(() => {\n const t = this.translations();\n switch (this.strength()) {\n case 'strong':\n return this.strongLabel() ?? t.passwordStrong;\n case 'medium':\n return this.mediumLabel() ?? t.passwordMedium;\n case 'weak':\n return this.weakLabel() ?? t.passwordWeak;\n default:\n return this.promptLabel() ?? t.passwordPrompt;\n }\n });\n readonly actionCount = computed(() => Number(this.toggleMask()) + Number(this.showClear() && this.hasValue() && this.isEditable()));\n readonly templateContext = computed(() => ({ $implicit: this.strength(), value: this.text() }));\n readonly hostStyle = computed(() => ({\n ...toStyleObject(this.dt(), '--tx-password'),\n '--tx-password-actions': String(this.actionCount()),\n ...this.passThrough().root?.style,\n }));\n\n constructor() {\n super();\n let previous: TxPasswordStrength | null = null;\n effect(() => {\n const strength = this.strength();\n if (strength !== previous) {\n previous = strength;\n this.strengthChange.emit(strength);\n }\n });\n inject(DestroyRef).onDestroy(() => this.panelRef?.close());\n }\n\n focus(): void {\n this.inputRef().nativeElement.focus();\n }\n\n onInput(event: Event): void {\n this.updateValue((event.target as HTMLInputElement).value);\n }\n\n onFocus(): void {\n this.isFocused.set(true);\n if (this.feedback() && this.isEditable() && !this.panelRef) {\n this.panelRef = this.overlay.open(this.panelTemplate(), {\n origin: this.inputRef().nativeElement,\n viewContainerRef: this.viewContainerRef,\n placement: 'bottom-start',\n matchWidth: true,\n closeOnOutsideClick: false,\n restoreFocus: false,\n panelClass: 'tx-password-overlay',\n });\n this.panelRef.closed.subscribe(() => (this.panelRef = null));\n }\n }\n\n onBlur(): void {\n this.isFocused.set(false);\n this.markTouched();\n this.panelRef?.close();\n }\n\n fill(value: string, reveal = true): void {\n this.updateValue(value);\n if (reveal) {\n this.isMasked.set(false);\n }\n }\n\n toggleVisibility(): void {\n this.isMasked.update((masked) => !masked);\n this.focus();\n }\n\n clear(): void {\n this.updateValue('');\n this.cleared.emit();\n this.focus();\n }\n}\n\nfunction toRegExp(pattern: string | RegExp): RegExp {\n return typeof pattern === 'string' ? new RegExp(pattern) : pattern;\n}\n","<input\n #input\n txInput\n class=\"tx-password__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [type]=\"isMasked() ? 'password' : 'text'\"\n [value]=\"text()\"\n [id]=\"resolvedId()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [fluid]=\"true\"\n [invalid]=\"isInvalid()\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.placeholder]=\"placeholder() ?? null\"\n [attr.maxlength]=\"maxlength() ?? null\"\n [attr.name]=\"name() ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"feedback() && isFocused() ? infoId : null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n/>\n<span class=\"tx-password__actions\">\n @if (showClear() && hasValue() && isEditable()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n [title]=\"translations().clear\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n @if (toggleMask()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-label]=\"translations().showPassword\"\n [attr.aria-pressed]=\"!isMasked()\"\n [attr.aria-controls]=\"resolvedId()\"\n [title]=\"isMasked() ? translations().showPassword : translations().hidePassword\"\n [disabled]=\"isDisabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"toggleVisibility()\"\n >\n <tx-icon [name]=\"isMasked() ? 'eye' : 'eye-slash'\" />\n </button>\n }\n</span>\n\n<ng-template #panel>\n <div class=\"tx-password__panel\" [attr.data-styled]=\"!isUnstyled() || null\" [style]=\"hostStyle()\" [class]=\"passThrough().panel?.class\">\n @if (headerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n <div class=\"tx-password__meter\" [attr.data-strength]=\"strength()\" [class]=\"passThrough().meter?.class\" [style]=\"passThrough().meter?.style\">\n <span class=\"tx-password__meter-bar\"></span>\n </div>\n <div class=\"tx-password__info\" aria-live=\"polite\" [id]=\"infoId\" [class]=\"passThrough().info?.class\" [style]=\"passThrough().info?.style\">\n {{ info() }}\n </div>\n @if (contentTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n @if (footerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n </div>\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;;AAIA,IAAa,2BAAb,MAAa,yBAAwB;CAC1B,cAAc,OAA+C,WAAW;CAEjF,OAAO,uBAAuB,YAAsC,SAAgB;EAClF,OAAO,CAAC,CAAC;CACX;CALW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,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;GAAA,MAAA,GAAA;GAAA,MAAA,CACV,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AA6G3E,SAAS,SAAS,SAAwB;CACxC,OAAO,OAAO,YAAY,WAAW,IAAI,OAAO,OAAO,IAAI;AAC7D"}
1
+ {"version":3,"file":"tectra-ng-ui-password.mjs","names":[],"sources":["../../../../packages/ui/password/src/password-templates.directive.ts","../../../../packages/ui/password/src/password.icons.ts","../../../../packages/ui/password/src/password.theme.ts","../../../../packages/ui/password/src/password.component.ts","../../../../packages/ui/password/src/password.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxPasswordTemplateContext } from './password.types';\n\n@Directive({ selector: 'ng-template[txPasswordHeader]' })\nexport class TxPasswordHeaderTemplate {\n readonly templateRef = inject<TemplateRef<TxPasswordTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxPasswordHeaderTemplate, context: unknown): context is TxPasswordTemplateContext {\n return !!context;\n }\n}\n\n@Directive({ selector: 'ng-template[txPasswordContent]' })\nexport class TxPasswordContentTemplate {\n readonly templateRef = inject<TemplateRef<TxPasswordTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxPasswordContentTemplate, context: unknown): context is TxPasswordTemplateContext {\n return !!context;\n }\n}\n\n@Directive({ selector: 'ng-template[txPasswordFooter]' })\nexport class TxPasswordFooterTemplate {\n readonly templateRef = inject<TemplateRef<TxPasswordTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxPasswordFooterTemplate, context: unknown): context is TxPasswordTemplateContext {\n return !!context;\n }\n}\n","import { TxIconSet, txIconEye, txIconEyeSlash, txIconInfo, txIconText, txIconTimes } from '@tectra-ng/icons';\n\nexport const PASSWORD_ICON_DEFAULTS: TxIconSet = {\n eye: txIconEye,\n 'eye-slash': txIconEyeSlash,\n info: txIconInfo,\n text: txIconText,\n times: txIconTimes,\n};\n","import { fieldTokens, formFieldTokens, passwordTokens } from '@tectra-ng/themes';\n\nexport const PASSWORD_THEME = {\n field: fieldTokens,\n formField: formFieldTokens,\n password: passwordTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n forwardRef,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectFluid } from '@tectra-ng/core/fluid';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { TxOverlay, TxOverlayRef } from '@tectra-ng/core/overlay';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraPasswordTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxInput } from '@tectra-ng/ui/input';\nimport { TxPasswordContentTemplate, TxPasswordFooterTemplate, TxPasswordHeaderTemplate } from './password-templates.directive';\nimport { TxPasswordPart, TxPasswordSize, TxPasswordStrength, TxPasswordVariant } from './password.types';\nimport { PASSWORD_ICON_DEFAULTS } from './password.icons';\nimport { PASSWORD_THEME } from './password.theme';\n\nconst MEDIUM = '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})';\nconst STRONG = '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})';\n\n@Component({\n selector: 'tx-password',\n imports: [TxInput, TxIcon, NgTemplateOutlet],\n templateUrl: './password.component.html',\n styleUrl: './password.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxPassword), multi: true }],\n host: {\n class: 'tx-password',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-password--fluid]': 'isFluid()',\n '[class.tx-password--filled]': 'hasValue()',\n '[class.tx-password--invalid]': 'isInvalid()',\n '[class.tx-password--disabled]': 'isDisabled()',\n },\n viewProviders: [provideTxIconDefaults(PASSWORD_ICON_DEFAULTS)],\n})\nexport class TxPassword extends TxFormControlBase<string> {\n private readonly passwordTheme = injectTokens(PASSWORD_THEME);\n\n private overlay = inject(TxOverlay);\n private viewContainerRef = inject(ViewContainerRef);\n private generatedId = uniqueId('tx-password');\n private panelRef: TxOverlayRef | null = null;\n\n readonly feedback = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly toggleMask = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly showClear = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly placeholder = input<string | undefined>(undefined);\n readonly promptLabel = input<string | undefined>(undefined);\n readonly weakLabel = input<string | undefined>(undefined);\n readonly mediumLabel = input<string | undefined>(undefined);\n readonly strongLabel = input<string | undefined>(undefined);\n readonly mediumRegex = input<string | RegExp>(MEDIUM);\n readonly strongRegex = input<string | RegExp>(STRONG);\n readonly autocomplete = input<string>('current-password');\n readonly size = input<TxPasswordSize>('medium');\n readonly variant = input<TxPasswordVariant>('outlined');\n readonly fluid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input<boolean, unknown>(false, { alias: 'disabled', transform: booleanAttribute });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly required = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly maxlength = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly name = input<string | undefined>(undefined);\n readonly inputId = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly tabindex = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly dt = input<TectraDeepPartial<TectraPasswordTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxPasswordPart, TxPassword> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly strengthChange = output<TxPasswordStrength | null>();\n readonly cleared = output<void>();\n\n readonly headerTemplate = contentChild(TxPasswordHeaderTemplate);\n readonly contentTemplate = contentChild(TxPasswordContentTemplate);\n readonly footerTemplate = contentChild(TxPasswordFooterTemplate);\n readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\n readonly panelTemplate = viewChild.required<TemplateRef<unknown>>('panel');\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly isFluid = injectFluid(this.fluid);\n readonly isInvalid = injectFieldInvalid(this.invalid);\n readonly passThrough = injectPassThrough('password', this, this.pt, this.ptOptions);\n\n readonly isMasked = signal(true);\n readonly isFocused = signal(false);\n readonly resolvedId = computed(() => this.inputId() ?? this.generatedId);\n readonly infoId = `${this.generatedId}-info`;\n readonly text = computed(() => this.value() ?? '');\n readonly hasValue = computed(() => this.text() !== '');\n readonly isDisabled = computed(() => this.disabled() || this.disabledInput());\n readonly isEditable = computed(() => !this.isDisabled() && !this.readonly());\n readonly strength = computed<TxPasswordStrength | null>(() => {\n const value = this.text();\n if (!value) {\n return null;\n }\n if (toRegExp(this.strongRegex()).test(value)) {\n return 'strong';\n }\n return toRegExp(this.mediumRegex()).test(value) ? 'medium' : 'weak';\n });\n readonly info = computed(() => {\n const t = this.translations();\n switch (this.strength()) {\n case 'strong':\n return this.strongLabel() ?? t.passwordStrong;\n case 'medium':\n return this.mediumLabel() ?? t.passwordMedium;\n case 'weak':\n return this.weakLabel() ?? t.passwordWeak;\n default:\n return this.promptLabel() ?? t.passwordPrompt;\n }\n });\n readonly actionCount = computed(() => Number(this.toggleMask()) + Number(this.showClear() && this.hasValue() && this.isEditable()));\n readonly templateContext = computed(() => ({ $implicit: this.strength(), value: this.text() }));\n readonly hostStyle = computed(() => ({\n ...toStyleObject(this.dt(), '--tx-password'),\n '--tx-password-actions': String(this.actionCount()),\n ...this.passThrough().root?.style,\n }));\n\n constructor() {\n super();\n let previous: TxPasswordStrength | null = null;\n effect(() => {\n const strength = this.strength();\n if (strength !== previous) {\n previous = strength;\n this.strengthChange.emit(strength);\n }\n });\n inject(DestroyRef).onDestroy(() => this.panelRef?.close());\n }\n\n focus(): void {\n this.inputRef().nativeElement.focus();\n }\n\n onInput(event: Event): void {\n this.updateValue((event.target as HTMLInputElement).value);\n }\n\n onFocus(): void {\n this.isFocused.set(true);\n if (this.feedback() && this.isEditable() && !this.panelRef) {\n this.panelRef = this.overlay.open(this.panelTemplate(), {\n origin: this.inputRef().nativeElement,\n viewContainerRef: this.viewContainerRef,\n placement: 'bottom-start',\n matchWidth: true,\n closeOnOutsideClick: false,\n restoreFocus: false,\n panelClass: 'tx-password-overlay',\n });\n this.panelRef.closed.subscribe(() => (this.panelRef = null));\n }\n }\n\n onBlur(): void {\n this.isFocused.set(false);\n this.markTouched();\n this.panelRef?.close();\n }\n\n fill(value: string, reveal = true): void {\n this.updateValue(value);\n if (reveal) {\n this.isMasked.set(false);\n }\n }\n\n toggleVisibility(): void {\n this.isMasked.update((masked) => !masked);\n this.focus();\n }\n\n clear(): void {\n this.updateValue('');\n this.cleared.emit();\n this.focus();\n }\n}\n\nfunction toRegExp(pattern: string | RegExp): RegExp {\n return typeof pattern === 'string' ? new RegExp(pattern) : pattern;\n}\n","<input\n #input\n txInput\n class=\"tx-password__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [type]=\"isMasked() ? 'password' : 'text'\"\n [value]=\"text()\"\n [id]=\"resolvedId()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [fluid]=\"true\"\n [invalid]=\"isInvalid()\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.placeholder]=\"placeholder() ?? null\"\n [attr.maxlength]=\"maxlength() ?? null\"\n [attr.name]=\"name() ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"feedback() && isFocused() ? infoId : null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n/>\n<span class=\"tx-password__actions\">\n @if (showClear() && hasValue() && isEditable()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n [title]=\"translations().clear\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n @if (toggleMask()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-label]=\"translations().showPassword\"\n [attr.aria-pressed]=\"!isMasked()\"\n [attr.aria-controls]=\"resolvedId()\"\n [title]=\"isMasked() ? translations().showPassword : translations().hidePassword\"\n [disabled]=\"isDisabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"toggleVisibility()\"\n >\n <tx-icon [name]=\"isMasked() ? 'eye' : 'eye-slash'\" />\n </button>\n }\n</span>\n\n<ng-template #panel>\n <div class=\"tx-password__panel\" [attr.data-styled]=\"!isUnstyled() || null\" [style]=\"hostStyle()\" [class]=\"passThrough().panel?.class\">\n @if (headerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n <div class=\"tx-password__meter\" [attr.data-strength]=\"strength()\" [class]=\"passThrough().meter?.class\" [style]=\"passThrough().meter?.style\">\n <span class=\"tx-password__meter-bar\"></span>\n </div>\n <div class=\"tx-password__info\" aria-live=\"polite\" [id]=\"infoId\" [class]=\"passThrough().info?.class\" [style]=\"passThrough().info?.style\">\n {{ info() }}\n </div>\n @if (contentTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n @if (footerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n </div>\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;;AAIA,IAAa,2BAAb,MAAa,yBAAwB;CAC1B,cAAc,OAA+C,WAAW;CAEjF,OAAO,uBAAuB,YAAsC,SAAgB;EAClF,OAAO,CAAC,CAAC;CACX;CALW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAwB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAxB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAwB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAxB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAwB,YAAA,CAAA;EADpC,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,gCAA+B,CAAE;;;AAUxD,IAAa,4BAAb,MAAa,0BAAyB;CAC3B,cAAc,OAA+C,WAAW;CAEjF,OAAO,uBAAuB,YAAuC,SAAgB;EACnF,OAAO,CAAC,CAAC;CACX;CALW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;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CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,gBAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,wBAAwB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBACvB,yBAAyB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAC1B,wBAAwB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CACM,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CACV,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AA6G3E,SAAS,SAAS,SAAwB;CACxC,OAAO,OAAO,YAAY,WAAW,IAAI,OAAO,OAAO,IAAI;AAC7D"}
@@ -10,6 +10,7 @@ const PILL_ICON_DEFAULTS = {
10
10
  times: txIconTimes
11
11
  };
12
12
  const PILL_THEME = { pill: pillTokens };
13
+ const SPIN_MODIFIERS = /* @__PURE__ */ new Set(["spin", "pi-spin"]);
13
14
  var TxPill = class TxPill {
14
15
  pillTheme = injectTokens(PILL_THEME);
15
16
  txIconRegistry = injectTxIcons();
@@ -40,10 +41,17 @@ var TxPill = class TxPill {
40
41
  passThrough = injectPassThrough("pill", this, this.pt, this.ptOptions);
41
42
  resolvedTone = computed(() => this.tone() === "secondary" ? "neutral" : this.tone(), ...ngDevMode ? [{ debugName: "resolvedTone" }] : /* istanbul ignore next */ []);
42
43
  resolvedSize = computed(() => this.size() === "normal" ? "medium" : this.size(), ...ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []);
43
- iconName = computed(() => {
44
- const icon = this.icon();
45
- return icon && this.txIconRegistry.has(icon) ? icon : null;
46
- }, ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
44
+ iconParts = computed(() => {
45
+ const [name, ...modifiers] = (this.icon() ?? "").trim().split(/\s+/);
46
+ return this.txIconRegistry.has(name) ? {
47
+ name,
48
+ modifiers
49
+ } : null;
50
+ }, ...ngDevMode ? [{ debugName: "iconParts" }] : /* istanbul ignore next */ []);
51
+ iconName = computed(() => this.iconParts()?.name ?? null, ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
52
+ iconModifiers = computed(() => this.iconParts()?.modifiers.join(" ") ?? "", ...ngDevMode ? [{ debugName: "iconModifiers" }] : /* istanbul ignore next */ []);
53
+ iconSpin = computed(() => this.iconParts()?.modifiers.some((modifier) => SPIN_MODIFIERS.has(modifier)) ?? false, ...ngDevMode ? [{ debugName: "iconSpin" }] : /* istanbul ignore next */ []);
54
+ removeText = computed(() => this.removeLabel() || this.translations().remove, ...ngDevMode ? [{ debugName: "removeText" }] : /* istanbul ignore next */ []);
47
55
  hostStyle = computed(() => ({
48
56
  ...toStyleObject(this.dt(), "--tx-pill"),
49
57
  ...this.passThrough().root?.style
@@ -170,15 +178,21 @@ var TxPill = class TxPill {
170
178
  @if (dot()) {
171
179
  <span class="tx-pill__dot" aria-hidden="true"></span>
172
180
  } @else if (icon(); as icon) {
173
- <span class="tx-pill__icon" aria-hidden="true" [class]="passThrough().icon?.class" [style]="passThrough().icon?.style">
181
+ <span
182
+ class="tx-pill__icon"
183
+ aria-hidden="true"
184
+ [class.tx-pill__icon--spin]="iconSpin()"
185
+ [class]="passThrough().icon?.class"
186
+ [style]="passThrough().icon?.style"
187
+ >
174
188
  @if (iconName(); as name) {
175
- <tx-icon [name]="name" />
189
+ <tx-icon [name]="name" [class]="iconModifiers()" />
176
190
  } @else {
177
191
  <span [class]="icon"></span>
178
192
  }
179
193
  </span>
180
194
  }
181
- <ng-content select="[txPillLeading]" />
195
+ <span class="tx-pill__leading" [class]="passThrough().leading?.class" [style]="passThrough().leading?.style"><ng-content select="[txPillLeading]" /></span>
182
196
  <span class="tx-pill__label" [class]="passThrough().label?.class" [style]="passThrough().label?.style">{{ value() }}<ng-content /></span>
183
197
  @if (removable()) {
184
198
  <button
@@ -186,8 +200,8 @@ var TxPill = class TxPill {
186
200
  class="tx-pill__remove"
187
201
  [class]="passThrough().remove?.class"
188
202
  [style]="passThrough().remove?.style"
189
- [attr.aria-label]="removeLabel() ?? translations().remove"
190
- [title]="removeLabel() ?? translations().remove"
203
+ [attr.aria-label]="removeText()"
204
+ [title]="removeText()"
191
205
  (click)="remove($event)"
192
206
  (keydown.delete)="remove($event)"
193
207
  (keydown.backspace)="remove($event)"
@@ -197,7 +211,7 @@ var TxPill = class TxPill {
197
211
  }
198
212
  `,
199
213
  isInline: true,
200
- styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-pill__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-pill__label:empty{display:none}:host([data-styled]){--_tone: var(--tx-pill-neutral-color);--_solid-background: var(--tx-pill-neutral-solid-background);--_solid-color: var(--tx-pill-neutral-solid-color);flex-shrink:0;gap:var(--tx-pill-gap);box-sizing:border-box;padding:var(--tx-pill-padding-y) var(--tx-pill-padding-x);border-radius:var(--tx-pill-border-radius);background:color-mix(in srgb,var(--_tone) var(--tx-pill-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-pill-font-size);font-weight:var(--tx-pill-font-weight);line-height:var(--tx-pill-line-height);font-variant-numeric:tabular-nums}:host([data-styled][data-tone=primary]){--_tone: var(--tx-pill-primary-color);--_solid-background: var(--tx-pill-primary-solid-background);--_solid-color: var(--tx-pill-primary-solid-color)}:host([data-styled][data-tone=success]){--_tone: var(--tx-pill-success-color);--_solid-background: var(--tx-pill-success-solid-background);--_solid-color: var(--tx-pill-success-solid-color)}:host([data-styled][data-tone=info]){--_tone: var(--tx-pill-info-color);--_solid-background: var(--tx-pill-info-solid-background);--_solid-color: var(--tx-pill-info-solid-color)}:host([data-styled][data-tone=warn]){--_tone: var(--tx-pill-warn-color);--_solid-background: var(--tx-pill-warn-solid-background);--_solid-color: var(--tx-pill-warn-solid-color)}:host([data-styled][data-tone=danger]){--_tone: var(--tx-pill-danger-color);--_solid-background: var(--tx-pill-danger-solid-background);--_solid-color: var(--tx-pill-danger-solid-color)}:host([data-styled][data-tone=help]){--_tone: var(--tx-pill-help-color);--_solid-background: var(--tx-pill-help-solid-background);--_solid-color: var(--tx-pill-help-solid-color)}:host([data-styled][data-tone=contrast]){--_tone: var(--tx-pill-contrast-color);--_solid-background: var(--tx-pill-contrast-solid-background);--_solid-color: var(--tx-pill-contrast-solid-color)}:host([data-styled][data-size=small]){padding:var(--tx-pill-sm-padding-y) var(--tx-pill-sm-padding-x);font-size:var(--tx-pill-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-pill-lg-padding-y) var(--tx-pill-lg-padding-x);font-size:var(--tx-pill-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-pill-lg-gap)}:host([data-styled][data-variant=solid]){background:var(--_solid-background);color:var(--_solid-color)}:host([data-styled][data-variant=outline]){background:transparent;box-shadow:inset 0 0 0 1px var(--tx-pill-outline-border-color);color:var(--tx-pill-outline-color)}:host([data-styled][data-variant=outline]) .tx-pill__icon,:host([data-styled][data-variant=outline]) .tx-pill__dot{color:var(--_tone)}:host([data-styled]) .tx-pill__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-pill-icon-size)}:host([data-styled]) .tx-pill__dot{flex-shrink:0;width:var(--tx-pill-dot-size);height:var(--tx-pill-dot-size);border-radius:50%;background:currentColor}:host([data-styled]) ::ng-deep>[txPillLeading]{flex-shrink:0;margin-inline-start:calc(var(--tx-pill-padding-x) * -.5)}:host([data-styled]) .tx-pill__remove{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-pill-remove-size);height:var(--tx-pill-remove-size);margin-inline-end:-4px;padding:0;border:none;border-radius:50%;background:transparent;color:inherit;font-size:.8em;opacity:.7;cursor:pointer;transition:opacity var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-pill__remove:hover{background:color-mix(in srgb,currentColor 18%,transparent);opacity:1}:host([data-styled]) .tx-pill__remove:focus-visible{outline:2px solid var(--tx-pill-focus-ring-color);outline-offset:1px;opacity:1}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-pill__remove{transition:none}}\n"],
214
+ styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-pill__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-pill__label:empty,.tx-pill__leading:empty{display:none}.tx-pill__leading{display:inline-flex;flex-shrink:0;align-items:center}:host([data-styled]){--_tone: var(--tx-pill-neutral-color);--_solid-background: var(--tx-pill-neutral-solid-background);--_solid-color: var(--tx-pill-neutral-solid-color);flex-shrink:0;gap:var(--tx-pill-gap);box-sizing:border-box;padding:var(--tx-pill-padding-y) var(--tx-pill-padding-x);border-radius:var(--tx-pill-border-radius);background:color-mix(in srgb,var(--_tone) var(--tx-pill-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-pill-font-size);font-weight:var(--tx-pill-font-weight);line-height:var(--tx-pill-line-height);font-variant-numeric:tabular-nums}:host([data-styled][data-tone=primary]){--_tone: var(--tx-pill-primary-color);--_solid-background: var(--tx-pill-primary-solid-background);--_solid-color: var(--tx-pill-primary-solid-color)}:host([data-styled][data-tone=success]){--_tone: var(--tx-pill-success-color);--_solid-background: var(--tx-pill-success-solid-background);--_solid-color: var(--tx-pill-success-solid-color)}:host([data-styled][data-tone=info]){--_tone: var(--tx-pill-info-color);--_solid-background: var(--tx-pill-info-solid-background);--_solid-color: var(--tx-pill-info-solid-color)}:host([data-styled][data-tone=warn]){--_tone: var(--tx-pill-warn-color);--_solid-background: var(--tx-pill-warn-solid-background);--_solid-color: var(--tx-pill-warn-solid-color)}:host([data-styled][data-tone=danger]){--_tone: var(--tx-pill-danger-color);--_solid-background: var(--tx-pill-danger-solid-background);--_solid-color: var(--tx-pill-danger-solid-color)}:host([data-styled][data-tone=help]){--_tone: var(--tx-pill-help-color);--_solid-background: var(--tx-pill-help-solid-background);--_solid-color: var(--tx-pill-help-solid-color)}:host([data-styled][data-tone=contrast]){--_tone: var(--tx-pill-contrast-color);--_solid-background: var(--tx-pill-contrast-solid-background);--_solid-color: var(--tx-pill-contrast-solid-color)}:host([data-styled][data-size=small]){padding:var(--tx-pill-sm-padding-y) var(--tx-pill-sm-padding-x);font-size:var(--tx-pill-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-pill-lg-padding-y) var(--tx-pill-lg-padding-x);font-size:var(--tx-pill-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-pill-lg-gap)}:host([data-styled][data-variant=solid]){background:var(--_solid-background);color:var(--_solid-color)}:host([data-styled][data-variant=outline]){background:transparent;box-shadow:inset 0 0 0 1px var(--tx-pill-outline-border-color);color:var(--tx-pill-outline-color)}:host([data-styled][data-variant=outline]) .tx-pill__icon,:host([data-styled][data-variant=outline]) .tx-pill__dot{color:var(--_tone)}:host([data-styled]) .tx-pill__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-pill-icon-size)}:host([data-styled]) .tx-pill__dot{flex-shrink:0;width:var(--tx-pill-dot-size);height:var(--tx-pill-dot-size);border-radius:50%;background:currentColor}:host([data-styled]) .tx-pill__leading{margin-inline-start:calc(var(--tx-pill-padding-x) * -.5)}:host([data-styled]) .tx-pill__icon--spin tx-icon{animation:tx-pill-spin var(--tx-pill-spin-duration) linear infinite}@keyframes tx-pill-spin{to{transform:rotate(360deg)}}:host([data-styled]) .tx-pill__remove{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-pill-remove-size);height:var(--tx-pill-remove-size);margin-inline-end:var(--tx-pill-remove-offset);padding:0;border:none;border-radius:50%;background:transparent;color:inherit;font-size:.8em;opacity:.7;cursor:pointer;transition:opacity var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-pill__remove:hover{background:color-mix(in srgb,currentColor 18%,transparent);opacity:1}:host([data-styled]) .tx-pill__remove:focus-visible{outline:2px solid var(--tx-pill-focus-ring-color);outline-offset:1px;opacity:1}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-pill__remove{transition:none}:host([data-styled]) .tx-pill__icon--spin tx-icon{animation-duration:calc(var(--tx-pill-spin-duration) * 3)}}\n"],
201
215
  dependencies: [{
202
216
  kind: "component",
203
217
  type: TxIcon,
@@ -222,15 +236,21 @@ i0.ɵɵngDeclareClassMetadata({
222
236
  @if (dot()) {
223
237
  <span class="tx-pill__dot" aria-hidden="true"></span>
224
238
  } @else if (icon(); as icon) {
225
- <span class="tx-pill__icon" aria-hidden="true" [class]="passThrough().icon?.class" [style]="passThrough().icon?.style">
239
+ <span
240
+ class="tx-pill__icon"
241
+ aria-hidden="true"
242
+ [class.tx-pill__icon--spin]="iconSpin()"
243
+ [class]="passThrough().icon?.class"
244
+ [style]="passThrough().icon?.style"
245
+ >
226
246
  @if (iconName(); as name) {
227
- <tx-icon [name]="name" />
247
+ <tx-icon [name]="name" [class]="iconModifiers()" />
228
248
  } @else {
229
249
  <span [class]="icon"></span>
230
250
  }
231
251
  </span>
232
252
  }
233
- <ng-content select="[txPillLeading]" />
253
+ <span class="tx-pill__leading" [class]="passThrough().leading?.class" [style]="passThrough().leading?.style"><ng-content select="[txPillLeading]" /></span>
234
254
  <span class="tx-pill__label" [class]="passThrough().label?.class" [style]="passThrough().label?.style">{{ value() }}<ng-content /></span>
235
255
  @if (removable()) {
236
256
  <button
@@ -238,8 +258,8 @@ i0.ɵɵngDeclareClassMetadata({
238
258
  class="tx-pill__remove"
239
259
  [class]="passThrough().remove?.class"
240
260
  [style]="passThrough().remove?.style"
241
- [attr.aria-label]="removeLabel() ?? translations().remove"
242
- [title]="removeLabel() ?? translations().remove"
261
+ [attr.aria-label]="removeText()"
262
+ [title]="removeText()"
243
263
  (click)="remove($event)"
244
264
  (keydown.delete)="remove($event)"
245
265
  (keydown.backspace)="remove($event)"
@@ -259,7 +279,7 @@ i0.ɵɵngDeclareClassMetadata({
259
279
  "[attr.data-size]": "resolvedSize()"
260
280
  },
261
281
  viewProviders: [provideTxIconDefaults(PILL_ICON_DEFAULTS)],
262
- styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-pill__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-pill__label:empty{display:none}:host([data-styled]){--_tone: var(--tx-pill-neutral-color);--_solid-background: var(--tx-pill-neutral-solid-background);--_solid-color: var(--tx-pill-neutral-solid-color);flex-shrink:0;gap:var(--tx-pill-gap);box-sizing:border-box;padding:var(--tx-pill-padding-y) var(--tx-pill-padding-x);border-radius:var(--tx-pill-border-radius);background:color-mix(in srgb,var(--_tone) var(--tx-pill-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-pill-font-size);font-weight:var(--tx-pill-font-weight);line-height:var(--tx-pill-line-height);font-variant-numeric:tabular-nums}:host([data-styled][data-tone=primary]){--_tone: var(--tx-pill-primary-color);--_solid-background: var(--tx-pill-primary-solid-background);--_solid-color: var(--tx-pill-primary-solid-color)}:host([data-styled][data-tone=success]){--_tone: var(--tx-pill-success-color);--_solid-background: var(--tx-pill-success-solid-background);--_solid-color: var(--tx-pill-success-solid-color)}:host([data-styled][data-tone=info]){--_tone: var(--tx-pill-info-color);--_solid-background: var(--tx-pill-info-solid-background);--_solid-color: var(--tx-pill-info-solid-color)}:host([data-styled][data-tone=warn]){--_tone: var(--tx-pill-warn-color);--_solid-background: var(--tx-pill-warn-solid-background);--_solid-color: var(--tx-pill-warn-solid-color)}:host([data-styled][data-tone=danger]){--_tone: var(--tx-pill-danger-color);--_solid-background: var(--tx-pill-danger-solid-background);--_solid-color: var(--tx-pill-danger-solid-color)}:host([data-styled][data-tone=help]){--_tone: var(--tx-pill-help-color);--_solid-background: var(--tx-pill-help-solid-background);--_solid-color: var(--tx-pill-help-solid-color)}:host([data-styled][data-tone=contrast]){--_tone: var(--tx-pill-contrast-color);--_solid-background: var(--tx-pill-contrast-solid-background);--_solid-color: var(--tx-pill-contrast-solid-color)}:host([data-styled][data-size=small]){padding:var(--tx-pill-sm-padding-y) var(--tx-pill-sm-padding-x);font-size:var(--tx-pill-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-pill-lg-padding-y) var(--tx-pill-lg-padding-x);font-size:var(--tx-pill-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-pill-lg-gap)}:host([data-styled][data-variant=solid]){background:var(--_solid-background);color:var(--_solid-color)}:host([data-styled][data-variant=outline]){background:transparent;box-shadow:inset 0 0 0 1px var(--tx-pill-outline-border-color);color:var(--tx-pill-outline-color)}:host([data-styled][data-variant=outline]) .tx-pill__icon,:host([data-styled][data-variant=outline]) .tx-pill__dot{color:var(--_tone)}:host([data-styled]) .tx-pill__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-pill-icon-size)}:host([data-styled]) .tx-pill__dot{flex-shrink:0;width:var(--tx-pill-dot-size);height:var(--tx-pill-dot-size);border-radius:50%;background:currentColor}:host([data-styled]) ::ng-deep>[txPillLeading]{flex-shrink:0;margin-inline-start:calc(var(--tx-pill-padding-x) * -.5)}:host([data-styled]) .tx-pill__remove{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-pill-remove-size);height:var(--tx-pill-remove-size);margin-inline-end:-4px;padding:0;border:none;border-radius:50%;background:transparent;color:inherit;font-size:.8em;opacity:.7;cursor:pointer;transition:opacity var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-pill__remove:hover{background:color-mix(in srgb,currentColor 18%,transparent);opacity:1}:host([data-styled]) .tx-pill__remove:focus-visible{outline:2px solid var(--tx-pill-focus-ring-color);outline-offset:1px;opacity:1}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-pill__remove{transition:none}}\n"]
282
+ styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-pill__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-pill__label:empty,.tx-pill__leading:empty{display:none}.tx-pill__leading{display:inline-flex;flex-shrink:0;align-items:center}:host([data-styled]){--_tone: var(--tx-pill-neutral-color);--_solid-background: var(--tx-pill-neutral-solid-background);--_solid-color: var(--tx-pill-neutral-solid-color);flex-shrink:0;gap:var(--tx-pill-gap);box-sizing:border-box;padding:var(--tx-pill-padding-y) var(--tx-pill-padding-x);border-radius:var(--tx-pill-border-radius);background:color-mix(in srgb,var(--_tone) var(--tx-pill-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-pill-font-size);font-weight:var(--tx-pill-font-weight);line-height:var(--tx-pill-line-height);font-variant-numeric:tabular-nums}:host([data-styled][data-tone=primary]){--_tone: var(--tx-pill-primary-color);--_solid-background: var(--tx-pill-primary-solid-background);--_solid-color: var(--tx-pill-primary-solid-color)}:host([data-styled][data-tone=success]){--_tone: var(--tx-pill-success-color);--_solid-background: var(--tx-pill-success-solid-background);--_solid-color: var(--tx-pill-success-solid-color)}:host([data-styled][data-tone=info]){--_tone: var(--tx-pill-info-color);--_solid-background: var(--tx-pill-info-solid-background);--_solid-color: var(--tx-pill-info-solid-color)}:host([data-styled][data-tone=warn]){--_tone: var(--tx-pill-warn-color);--_solid-background: var(--tx-pill-warn-solid-background);--_solid-color: var(--tx-pill-warn-solid-color)}:host([data-styled][data-tone=danger]){--_tone: var(--tx-pill-danger-color);--_solid-background: var(--tx-pill-danger-solid-background);--_solid-color: var(--tx-pill-danger-solid-color)}:host([data-styled][data-tone=help]){--_tone: var(--tx-pill-help-color);--_solid-background: var(--tx-pill-help-solid-background);--_solid-color: var(--tx-pill-help-solid-color)}:host([data-styled][data-tone=contrast]){--_tone: var(--tx-pill-contrast-color);--_solid-background: var(--tx-pill-contrast-solid-background);--_solid-color: var(--tx-pill-contrast-solid-color)}:host([data-styled][data-size=small]){padding:var(--tx-pill-sm-padding-y) var(--tx-pill-sm-padding-x);font-size:var(--tx-pill-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-pill-lg-padding-y) var(--tx-pill-lg-padding-x);font-size:var(--tx-pill-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-pill-lg-gap)}:host([data-styled][data-variant=solid]){background:var(--_solid-background);color:var(--_solid-color)}:host([data-styled][data-variant=outline]){background:transparent;box-shadow:inset 0 0 0 1px var(--tx-pill-outline-border-color);color:var(--tx-pill-outline-color)}:host([data-styled][data-variant=outline]) .tx-pill__icon,:host([data-styled][data-variant=outline]) .tx-pill__dot{color:var(--_tone)}:host([data-styled]) .tx-pill__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-pill-icon-size)}:host([data-styled]) .tx-pill__dot{flex-shrink:0;width:var(--tx-pill-dot-size);height:var(--tx-pill-dot-size);border-radius:50%;background:currentColor}:host([data-styled]) .tx-pill__leading{margin-inline-start:calc(var(--tx-pill-padding-x) * -.5)}:host([data-styled]) .tx-pill__icon--spin tx-icon{animation:tx-pill-spin var(--tx-pill-spin-duration) linear infinite}@keyframes tx-pill-spin{to{transform:rotate(360deg)}}:host([data-styled]) .tx-pill__remove{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-pill-remove-size);height:var(--tx-pill-remove-size);margin-inline-end:var(--tx-pill-remove-offset);padding:0;border:none;border-radius:50%;background:transparent;color:inherit;font-size:.8em;opacity:.7;cursor:pointer;transition:opacity var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-pill__remove:hover{background:color-mix(in srgb,currentColor 18%,transparent);opacity:1}:host([data-styled]) .tx-pill__remove:focus-visible{outline:2px solid var(--tx-pill-focus-ring-color);outline-offset:1px;opacity:1}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-pill__remove{transition:none}:host([data-styled]) .tx-pill__icon--spin tx-icon{animation-duration:calc(var(--tx-pill-spin-duration) * 3)}}\n"]
263
283
  }]
264
284
  }],
265
285
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-pill.mjs","names":[],"sources":["../../../../packages/ui/pill/src/pill.icons.ts","../../../../packages/ui/pill/src/pill.theme.ts","../../../../packages/ui/pill/src/pill.component.ts"],"sourcesContent":["import { TxIconSet, txIconInfo, txIconTimes } from '@tectra-ng/icons';\n\nexport const PILL_ICON_DEFAULTS: TxIconSet = {\n info: txIconInfo,\n times: txIconTimes,\n};\n","import { pillTokens } from '@tectra-ng/themes';\n\nexport const PILL_THEME = {\n pill: pillTokens,\n};\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input, output } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { injectTxIcons, provideTxIconDefaults, TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraPillTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxPillPart, TxPillSize, TxPillTone, TxPillVariant } from './pill.types';\nimport { PILL_ICON_DEFAULTS } from './pill.icons';\nimport { PILL_THEME } from './pill.theme';\n\n@Component({\n selector: 'tx-pill',\n imports: [TxIcon],\n template: `\n @if (dot()) {\n <span class=\"tx-pill__dot\" aria-hidden=\"true\"></span>\n } @else if (icon(); as icon) {\n <span class=\"tx-pill__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <ng-content select=\"[txPillLeading]\" />\n <span class=\"tx-pill__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ value() }}<ng-content /></span>\n @if (removable()) {\n <button\n type=\"button\"\n class=\"tx-pill__remove\"\n [class]=\"passThrough().remove?.class\"\n [style]=\"passThrough().remove?.style\"\n [attr.aria-label]=\"removeLabel() ?? translations().remove\"\n [title]=\"removeLabel() ?? translations().remove\"\n (click)=\"remove($event)\"\n (keydown.delete)=\"remove($event)\"\n (keydown.backspace)=\"remove($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n `,\n styleUrl: './pill.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-pill',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-tone]': 'resolvedTone()',\n '[attr.data-variant]': 'variant()',\n '[attr.data-size]': 'resolvedSize()',\n },\n viewProviders: [provideTxIconDefaults(PILL_ICON_DEFAULTS)],\n})\nexport class TxPill {\n private readonly pillTheme = injectTokens(PILL_THEME);\n\n private txIconRegistry = injectTxIcons();\n\n readonly value = input<string | number | undefined>(undefined);\n readonly tone = input<TxPillTone>('neutral');\n readonly variant = input<TxPillVariant>('soft');\n readonly size = input<TxPillSize>('medium');\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly dot = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly removable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly removeLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraPillTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxPillPart, TxPill> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly removed = output<Event>();\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('pill', this, this.pt, this.ptOptions);\n readonly resolvedTone = computed(() => (this.tone() === 'secondary' ? 'neutral' : this.tone()));\n readonly resolvedSize = computed(() => (this.size() === 'normal' ? 'medium' : this.size()));\n readonly iconName = computed(() => {\n const icon = this.icon();\n return icon && this.txIconRegistry.has(icon) ? icon : null;\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-pill'), ...this.passThrough().root?.style }));\n\n remove(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.removed.emit(event);\n }\n}\n"],"mappings":";;;;;;;AAEA,MAAa,qBAAgC;CAC3C,MAAM;CACN,OAAO;AACR;ACHD,MAAa,aAAa,EACxB,MAAM,WACP;ACoDD,IAAa,SAAb,MAAa,OAAM;CACA,YAAY,aAAa,UAAU;CAE5C,iBAAiB,cAAa;CAE7B,QAAQ,MAAmC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,OAAO,MAAkB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACnC,UAAU,MAAqB,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACtC,OAAO,MAAkB,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAClC,OAAO,MAA8C,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC/D,MAAM,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,MAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CAClE,YAAY,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+BAAA,CAAA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,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,SAAA,EAAA,SAAA,UAAA;EAAA,MAAA;GAAA,YAAA;IAAA,SAAA;IAAA,SAAA;IAAA,oBAAA;IAAA,kBAAA;IAAA,qBAAA;IAAA,kBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UA3CP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BT,UAAA;EAAA,QAAA,CAAA,s4HAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MA9BS;GAAM,UAAA;GAAA,QAAA,CAAA,MAAA;EAAA,CAAA;EAAA,eA0CD,CAAC,sBAAsB,kBAAkB,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAE/C,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAM,YAAA,CAAA;EA9ClB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAS,SACV,CAAC,MAAM;GAAC,UACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BT,iBAEgB,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,oBAAoB;IACpB,uBAAuB;IACvB,oBAAoB;GACrB;GAAA,eACc,CAAC,sBAAsB,kBAAkB,CAAC;GAAC,QAAA,CAAA,s4HAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-pill.mjs","names":[],"sources":["../../../../packages/ui/pill/src/pill.icons.ts","../../../../packages/ui/pill/src/pill.theme.ts","../../../../packages/ui/pill/src/pill.component.ts"],"sourcesContent":["import { TxIconSet, txIconInfo, txIconTimes } from '@tectra-ng/icons';\n\nexport const PILL_ICON_DEFAULTS: TxIconSet = {\n info: txIconInfo,\n times: txIconTimes,\n};\n","import { pillTokens } from '@tectra-ng/themes';\n\nexport const PILL_THEME = {\n pill: pillTokens,\n};\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input, output } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { injectTxIcons, provideTxIconDefaults, TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraPillTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxPillPart, TxPillSize, TxPillTone, TxPillVariant } from './pill.types';\nimport { PILL_ICON_DEFAULTS } from './pill.icons';\nimport { PILL_THEME } from './pill.theme';\n\nconst SPIN_MODIFIERS = new Set(['spin', 'pi-spin']);\n\n@Component({\n selector: 'tx-pill',\n imports: [TxIcon],\n template: `\n @if (dot()) {\n <span class=\"tx-pill__dot\" aria-hidden=\"true\"></span>\n } @else if (icon(); as icon) {\n <span\n class=\"tx-pill__icon\"\n aria-hidden=\"true\"\n [class.tx-pill__icon--spin]=\"iconSpin()\"\n [class]=\"passThrough().icon?.class\"\n [style]=\"passThrough().icon?.style\"\n >\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" [class]=\"iconModifiers()\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <span class=\"tx-pill__leading\" [class]=\"passThrough().leading?.class\" [style]=\"passThrough().leading?.style\"><ng-content select=\"[txPillLeading]\" /></span>\n <span class=\"tx-pill__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ value() }}<ng-content /></span>\n @if (removable()) {\n <button\n type=\"button\"\n class=\"tx-pill__remove\"\n [class]=\"passThrough().remove?.class\"\n [style]=\"passThrough().remove?.style\"\n [attr.aria-label]=\"removeText()\"\n [title]=\"removeText()\"\n (click)=\"remove($event)\"\n (keydown.delete)=\"remove($event)\"\n (keydown.backspace)=\"remove($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n `,\n styleUrl: './pill.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-pill',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-tone]': 'resolvedTone()',\n '[attr.data-variant]': 'variant()',\n '[attr.data-size]': 'resolvedSize()',\n },\n viewProviders: [provideTxIconDefaults(PILL_ICON_DEFAULTS)],\n})\nexport class TxPill {\n private readonly pillTheme = injectTokens(PILL_THEME);\n\n private txIconRegistry = injectTxIcons();\n\n readonly value = input<string | number | undefined>(undefined);\n readonly tone = input<TxPillTone>('neutral');\n readonly variant = input<TxPillVariant>('soft');\n readonly size = input<TxPillSize>('medium');\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly dot = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly removable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly removeLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraPillTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxPillPart, TxPill> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly removed = output<Event>();\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('pill', this, this.pt, this.ptOptions);\n readonly resolvedTone = computed(() => (this.tone() === 'secondary' ? 'neutral' : this.tone()));\n readonly resolvedSize = computed(() => (this.size() === 'normal' ? 'medium' : this.size()));\n private readonly iconParts = computed(() => {\n const [name, ...modifiers] = (this.icon() ?? '').trim().split(/\\s+/);\n return this.txIconRegistry.has(name) ? { name, modifiers } : null;\n });\n readonly iconName = computed(() => this.iconParts()?.name ?? null);\n readonly iconModifiers = computed(() => this.iconParts()?.modifiers.join(' ') ?? '');\n readonly iconSpin = computed(() => this.iconParts()?.modifiers.some((modifier) => SPIN_MODIFIERS.has(modifier)) ?? false);\n readonly removeText = computed(() => this.removeLabel() || this.translations().remove);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-pill'), ...this.passThrough().root?.style }));\n\n remove(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.removed.emit(event);\n }\n}\n"],"mappings":";;;;;;;AAEA,MAAa,qBAAgC;CAC3C,MAAM;CACN,OAAO;AACR;ACHD,MAAa,aAAa,EACxB,MAAM,WACP;ACMD,MAAM,iCAAiB,IAAI,IAAI,CAAC,QAAQ,SAAS,CAAC;AAsDlD,IAAa,SAAb,MAAa,OAAM;CACA,YAAY,aAAa,UAAU;CAE5C,iBAAiB,cAAa;CAE7B,QAAQ,MAAmC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,OAAO,MAAkB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACnC,UAAU,MAAqB,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACtC,OAAO,MAAkB,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAClC,OAAO,MAA8C,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC/D,MAAM,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,MAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CAClE,YAAY,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACxE,cAAc,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAClD,KAAK,MAAuD,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CACtE,KAAK,M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GACrB;GAAA,eACc,CAAC,sBAAsB,kBAAkB,CAAC;GAAC,QAAA,CAAA,8vIAAA;EAAA,CAAA"}
@@ -390,7 +390,7 @@ var TxRating = class TxRating extends TxFormControlBase {
390
390
  usesInheritance: true,
391
391
  ngImport: i0,
392
392
  template: "<span\n class=\"tx-rating__stars\"\n role=\"slider\"\n [class]=\"passThrough().stars?.class\"\n [style]=\"passThrough().stars?.style\"\n [attr.tabindex]=\"isDisabled() ? -1 : (tabindex() ?? 0)\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"stars()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-valuetext]=\"valueText()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n (click)=\"onClick($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"onPointerLeave()\"\n>\n @for (index of indexes(); track index) {\n <span\n class=\"tx-rating__star\"\n [class.tx-rating__star--active]=\"fill(index) > 0\"\n [class]=\"passThrough().star?.class\"\n [style]=\"passThrough().star?.style\"\n [attr.data-index]=\"index\"\n >\n <span class=\"tx-rating__off\" aria-hidden=\"true\">\n @if (offTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: index }\" />\n } @else if (offIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"offIcon()\"></span>\n }\n </span>\n <span class=\"tx-rating__on\" aria-hidden=\"true\" [style.width.%]=\"fill(index)\">\n @if (onTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: index }\" />\n } @else if (onIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"onIcon()\"></span>\n }\n </span>\n </span>\n }\n</span>\n@if (clearable() && isEditable() && value()) {\n <button\n type=\"button\"\n class=\"tx-rating__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"clearLabel() ? null : translations().clear\"\n (click)=\"clear($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n @if (clearLabel()) {\n <span>{{ clearLabel() }}</span>\n }\n </button>\n}\n",
393
- styles: [":host{display:inline-flex;align-items:center;vertical-align:middle}.tx-rating__stars{display:inline-flex;align-items:center;line-height:0}.tx-rating__star{position:relative;display:block;flex-shrink:0;width:1em;height:1em}.tx-rating__off,.tx-rating__on{position:absolute;top:0;left:0;display:flex;align-items:center;height:1em;overflow:hidden;line-height:1}.tx-rating__off{width:1em}.tx-rating__off>*,.tx-rating__on>*{flex-shrink:0;width:1em;height:1em}:host([data-styled]){--_size: var(--tx-rating-icon-size);--_gap: var(--tx-rating-gap);gap:var(--tx-rating-clear-gap)}:host([data-styled][data-size=small]){--_size: var(--tx-rating-sm-icon-size);--_gap: var(--tx-rating-sm-gap)}:host([data-styled][data-size=large]){--_size: var(--tx-rating-lg-icon-size);--_gap: var(--tx-rating-lg-gap)}:host([data-styled]) .tx-rating__stars{gap:var(--_gap);border-radius:var(--tx-rating-border-radius);outline:none;font-size:var(--_size)}:host([data-styled]) .tx-rating__stars:focus-visible{outline:var(--tx-rating-focus-ring-width) solid var(--tx-rating-focus-ring-color);outline-offset:var(--tx-rating-focus-ring-offset)}:host([data-styled]) .tx-rating__star{color:var(--tx-rating-color);cursor:pointer;transition:transform .25s cubic-bezier(.34,1.56,.64,1)}:host([data-styled]:not(.tx-rating--readonly):not(.tx-rating--disabled)) .tx-rating__star:hover{transform:scale(var(--tx-rating-hover-scale))}:host([data-styled]) .tx-rating__on{color:var(--tx-rating-active-color);transition:color var(--tx-rating-transition-duration)}:host([data-styled].tx-rating--preview) .tx-rating__on{color:var(--tx-rating-hover-color)}:host([data-styled].tx-rating--readonly) .tx-rating__star,:host([data-styled].tx-rating--disabled) .tx-rating__star{cursor:default}:host([data-styled].tx-rating--disabled) .tx-rating__stars{opacity:var(--tx-rating-disabled-opacity)}:host([data-styled].tx-rating--invalid) .tx-rating__star{color:var(--tx-form-field-invalid-border-color)}:host([data-styled]) .tx-rating__clear{display:inline-flex;align-items:center;gap:4px;padding:2px 6px;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-rating-clear-color);font:inherit;font-size:var(--tx-rating-clear-font-size);cursor:pointer;transition:color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-rating__clear:hover{color:var(--tx-rating-clear-hover-color)}:host([data-styled]) .tx-rating__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-rating__on,:host([data-styled]) .tx-rating__star{transition:none}:host([data-styled]:not(.tx-rating--readonly):not(.tx-rating--disabled)) .tx-rating__star:hover{transform:none}}\n"],
393
+ styles: [":host{display:inline-flex;align-items:center;vertical-align:middle}.tx-rating__stars{display:inline-flex;align-items:center;line-height:0}.tx-rating__star{position:relative;display:block;flex-shrink:0;width:1em;height:1em}.tx-rating__off,.tx-rating__on{position:absolute;top:0;left:0;display:flex;align-items:center;height:1em;overflow:hidden;line-height:1}.tx-rating__off{width:1em}.tx-rating__off>*,.tx-rating__on>*{flex-shrink:0;width:1em;height:1em}:host([data-styled]){--_size: var(--tx-rating-icon-size);--_gap: var(--tx-rating-gap);gap:var(--tx-rating-clear-gap)}:host([data-styled][data-size=small]){--_size: var(--tx-rating-sm-icon-size);--_gap: var(--tx-rating-sm-gap)}:host([data-styled][data-size=large]){--_size: var(--tx-rating-lg-icon-size);--_gap: var(--tx-rating-lg-gap)}:host([data-styled]) .tx-rating__stars{gap:var(--_gap);border-radius:var(--tx-rating-border-radius);outline:none;font-size:var(--_size)}:host([data-styled]) .tx-rating__stars:focus-visible{outline:var(--tx-rating-focus-ring-width) solid var(--tx-rating-focus-ring-color);outline-offset:var(--tx-rating-focus-ring-offset)}:host([data-styled]) .tx-rating__star{color:var(--tx-rating-color);cursor:pointer;transition:transform .25s cubic-bezier(.34,1.56,.64,1)}:host([data-styled]:not(.tx-rating--readonly):not(.tx-rating--disabled)) .tx-rating__star:hover{transform:scale(var(--tx-rating-hover-scale))}:host([data-styled]) .tx-rating__on{color:var(--tx-rating-active-color);transition:color var(--tx-rating-transition-duration)}:host([data-styled].tx-rating--preview) .tx-rating__on{color:var(--tx-rating-hover-color)}:host([data-styled].tx-rating--readonly) .tx-rating__star,:host([data-styled].tx-rating--disabled) .tx-rating__star{cursor:default}:host([data-styled].tx-rating--disabled) .tx-rating__stars{opacity:var(--tx-rating-disabled-opacity)}:host([data-styled].tx-rating--invalid) .tx-rating__star{color:var(--tx-form-field-invalid-border-color)}:host([data-styled]) .tx-rating__clear{display:inline-flex;align-items:center;gap:var(--tx-space-1);padding:var(--tx-rating-clear-padding);border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-rating-clear-color);font:inherit;font-size:var(--tx-rating-clear-font-size);cursor:pointer;transition:color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-rating__clear:hover{color:var(--tx-rating-clear-hover-color)}:host([data-styled]) .tx-rating__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-rating__on,:host([data-styled]) .tx-rating__star{transition:none}:host([data-styled]:not(.tx-rating--readonly):not(.tx-rating--disabled)) .tx-rating__star:hover{transform:none}}\n"],
394
394
  dependencies: [{
395
395
  kind: "directive",
396
396
  type: NgTemplateOutlet,
@@ -439,7 +439,7 @@ i0.ɵɵngDeclareClassMetadata({
439
439
  },
440
440
  viewProviders: [provideTxIconDefaults(RATING_ICON_DEFAULTS)],
441
441
  template: "<span\n class=\"tx-rating__stars\"\n role=\"slider\"\n [class]=\"passThrough().stars?.class\"\n [style]=\"passThrough().stars?.style\"\n [attr.tabindex]=\"isDisabled() ? -1 : (tabindex() ?? 0)\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"stars()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-valuetext]=\"valueText()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n (click)=\"onClick($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"onPointerLeave()\"\n>\n @for (index of indexes(); track index) {\n <span\n class=\"tx-rating__star\"\n [class.tx-rating__star--active]=\"fill(index) > 0\"\n [class]=\"passThrough().star?.class\"\n [style]=\"passThrough().star?.style\"\n [attr.data-index]=\"index\"\n >\n <span class=\"tx-rating__off\" aria-hidden=\"true\">\n @if (offTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: index }\" />\n } @else if (offIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"offIcon()\"></span>\n }\n </span>\n <span class=\"tx-rating__on\" aria-hidden=\"true\" [style.width.%]=\"fill(index)\">\n @if (onTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: index }\" />\n } @else if (onIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"onIcon()\"></span>\n }\n </span>\n </span>\n }\n</span>\n@if (clearable() && isEditable() && value()) {\n <button\n type=\"button\"\n class=\"tx-rating__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"clearLabel() ? null : translations().clear\"\n (click)=\"clear($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n @if (clearLabel()) {\n <span>{{ clearLabel() }}</span>\n }\n </button>\n}\n",
442
- styles: [":host{display:inline-flex;align-items:center;vertical-align:middle}.tx-rating__stars{display:inline-flex;align-items:center;line-height:0}.tx-rating__star{position:relative;display:block;flex-shrink:0;width:1em;height:1em}.tx-rating__off,.tx-rating__on{position:absolute;top:0;left:0;display:flex;align-items:center;height:1em;overflow:hidden;line-height:1}.tx-rating__off{width:1em}.tx-rating__off>*,.tx-rating__on>*{flex-shrink:0;width:1em;height:1em}:host([data-styled]){--_size: var(--tx-rating-icon-size);--_gap: var(--tx-rating-gap);gap:var(--tx-rating-clear-gap)}:host([data-styled][data-size=small]){--_size: var(--tx-rating-sm-icon-size);--_gap: var(--tx-rating-sm-gap)}:host([data-styled][data-size=large]){--_size: var(--tx-rating-lg-icon-size);--_gap: var(--tx-rating-lg-gap)}:host([data-styled]) .tx-rating__stars{gap:var(--_gap);border-radius:var(--tx-rating-border-radius);outline:none;font-size:var(--_size)}:host([data-styled]) .tx-rating__stars:focus-visible{outline:var(--tx-rating-focus-ring-width) solid var(--tx-rating-focus-ring-color);outline-offset:var(--tx-rating-focus-ring-offset)}:host([data-styled]) .tx-rating__star{color:var(--tx-rating-color);cursor:pointer;transition:transform .25s cubic-bezier(.34,1.56,.64,1)}:host([data-styled]:not(.tx-rating--readonly):not(.tx-rating--disabled)) .tx-rating__star:hover{transform:scale(var(--tx-rating-hover-scale))}:host([data-styled]) .tx-rating__on{color:var(--tx-rating-active-color);transition:color var(--tx-rating-transition-duration)}:host([data-styled].tx-rating--preview) .tx-rating__on{color:var(--tx-rating-hover-color)}:host([data-styled].tx-rating--readonly) .tx-rating__star,:host([data-styled].tx-rating--disabled) .tx-rating__star{cursor:default}:host([data-styled].tx-rating--disabled) .tx-rating__stars{opacity:var(--tx-rating-disabled-opacity)}:host([data-styled].tx-rating--invalid) .tx-rating__star{color:var(--tx-form-field-invalid-border-color)}:host([data-styled]) .tx-rating__clear{display:inline-flex;align-items:center;gap:4px;padding:2px 6px;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-rating-clear-color);font:inherit;font-size:var(--tx-rating-clear-font-size);cursor:pointer;transition:color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-rating__clear:hover{color:var(--tx-rating-clear-hover-color)}:host([data-styled]) .tx-rating__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-rating__on,:host([data-styled]) .tx-rating__star{transition:none}:host([data-styled]:not(.tx-rating--readonly):not(.tx-rating--disabled)) .tx-rating__star:hover{transform:none}}\n"]
442
+ styles: [":host{display:inline-flex;align-items:center;vertical-align:middle}.tx-rating__stars{display:inline-flex;align-items:center;line-height:0}.tx-rating__star{position:relative;display:block;flex-shrink:0;width:1em;height:1em}.tx-rating__off,.tx-rating__on{position:absolute;top:0;left:0;display:flex;align-items:center;height:1em;overflow:hidden;line-height:1}.tx-rating__off{width:1em}.tx-rating__off>*,.tx-rating__on>*{flex-shrink:0;width:1em;height:1em}:host([data-styled]){--_size: var(--tx-rating-icon-size);--_gap: var(--tx-rating-gap);gap:var(--tx-rating-clear-gap)}:host([data-styled][data-size=small]){--_size: var(--tx-rating-sm-icon-size);--_gap: var(--tx-rating-sm-gap)}:host([data-styled][data-size=large]){--_size: var(--tx-rating-lg-icon-size);--_gap: var(--tx-rating-lg-gap)}:host([data-styled]) .tx-rating__stars{gap:var(--_gap);border-radius:var(--tx-rating-border-radius);outline:none;font-size:var(--_size)}:host([data-styled]) .tx-rating__stars:focus-visible{outline:var(--tx-rating-focus-ring-width) solid var(--tx-rating-focus-ring-color);outline-offset:var(--tx-rating-focus-ring-offset)}:host([data-styled]) .tx-rating__star{color:var(--tx-rating-color);cursor:pointer;transition:transform .25s cubic-bezier(.34,1.56,.64,1)}:host([data-styled]:not(.tx-rating--readonly):not(.tx-rating--disabled)) .tx-rating__star:hover{transform:scale(var(--tx-rating-hover-scale))}:host([data-styled]) .tx-rating__on{color:var(--tx-rating-active-color);transition:color var(--tx-rating-transition-duration)}:host([data-styled].tx-rating--preview) .tx-rating__on{color:var(--tx-rating-hover-color)}:host([data-styled].tx-rating--readonly) .tx-rating__star,:host([data-styled].tx-rating--disabled) .tx-rating__star{cursor:default}:host([data-styled].tx-rating--disabled) .tx-rating__stars{opacity:var(--tx-rating-disabled-opacity)}:host([data-styled].tx-rating--invalid) .tx-rating__star{color:var(--tx-form-field-invalid-border-color)}:host([data-styled]) .tx-rating__clear{display:inline-flex;align-items:center;gap:var(--tx-space-1);padding:var(--tx-rating-clear-padding);border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-rating-clear-color);font:inherit;font-size:var(--tx-rating-clear-font-size);cursor:pointer;transition:color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-rating__clear:hover{color:var(--tx-rating-clear-hover-color)}:host([data-styled]) .tx-rating__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-rating__on,:host([data-styled]) .tx-rating__star{transition:none}:host([data-styled]:not(.tx-rating--readonly):not(.tx-rating--disabled)) .tx-rating__star:hover{transform:none}}\n"]
443
443
  }]
444
444
  }],
445
445
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-rating.mjs","names":[],"sources":["../../../../packages/ui/rating/src/rating-templates.directive.ts","../../../../packages/ui/rating/src/rating.icons.ts","../../../../packages/ui/rating/src/rating.theme.ts","../../../../packages/ui/rating/src/rating.component.ts","../../../../packages/ui/rating/src/rating.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxRatingIconContext } from './rating.types';\n\n@Directive({ selector: 'ng-template[txRatingOnIcon]' })\nexport class TxRatingOnIconTemplate {\n readonly templateRef = inject<TemplateRef<TxRatingIconContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxRatingOnIconTemplate, context: unknown): context is TxRatingIconContext {\n return !!context;\n }\n}\n\n@Directive({ selector: 'ng-template[txRatingOffIcon]' })\nexport class TxRatingOffIconTemplate {\n readonly templateRef = inject<TemplateRef<TxRatingIconContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxRatingOffIconTemplate, context: unknown): context is TxRatingIconContext {\n return !!context;\n }\n}\n","import { TxIconSet, txIconStar, txIconStarFill, txIconTimes } from '@tectra-ng/icons';\n\nexport const RATING_ICON_DEFAULTS: TxIconSet = {\n star: txIconStar,\n 'star-fill': txIconStarFill,\n times: txIconTimes,\n};\n","import { formFieldTokens, ratingTokens } from '@tectra-ng/themes';\n\nexport const RATING_THEME = {\n formField: formFieldTokens,\n rating: ratingTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, booleanAttribute, computed, contentChild, forwardRef, inject, input, numberAttribute, output, signal } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { TxLocaleService, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { injectTxIcons, provideTxIconDefaults, TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraRatingTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxRatingOffIconTemplate, TxRatingOnIconTemplate } from './rating-templates.directive';\nimport { TxRatingChangeEvent, TxRatingPart, TxRatingSize } from './rating.types';\nimport { RATING_ICON_DEFAULTS } from './rating.icons';\nimport { RATING_THEME } from './rating.theme';\n\n@Component({\n selector: 'tx-rating',\n imports: [NgTemplateOutlet, TxIcon],\n templateUrl: './rating.component.html',\n styleUrl: './rating.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxRating), multi: true }],\n host: {\n class: 'tx-rating',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[class.tx-rating--readonly]': 'readonly()',\n '[class.tx-rating--disabled]': 'isDisabled()',\n '[class.tx-rating--invalid]': 'isInvalid()',\n '[class.tx-rating--preview]': 'preview() !== null',\n },\n viewProviders: [provideTxIconDefaults(RATING_ICON_DEFAULTS)],\n})\nexport class TxRating extends TxFormControlBase<number> {\n private readonly ratingTheme = injectTokens(RATING_THEME);\n\n private txIconRegistry = injectTxIcons();\n private localeService = inject(TxLocaleService);\n\n readonly stars = input<number, unknown>(5, { transform: numberAttribute });\n readonly allowHalf = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly onIcon = input<TxIconName | (string & {})>('star-fill');\n readonly offIcon = input<TxIconName | (string & {})>('star-fill');\n readonly clearable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly clearLabel = input<string | undefined>(undefined);\n readonly size = input<TxRatingSize>('medium');\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input<boolean, unknown>(false, { alias: 'disabled', transform: booleanAttribute });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly tabindex = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly dt = input<TectraDeepPartial<TectraRatingTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxRatingPart, TxRating> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly rated = output<TxRatingChangeEvent>();\n readonly cleared = output<void>();\n\n readonly onTemplate = contentChild(TxRatingOnIconTemplate);\n readonly offTemplate = contentChild(TxRatingOffIconTemplate);\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly isInvalid = injectFieldInvalid(this.invalid);\n readonly passThrough = injectPassThrough('rating', this, this.pt, this.ptOptions);\n\n readonly preview = signal<number | null>(null);\n readonly indexes = computed(() => Array.from({ length: Math.max(1, this.stars()) }, (_, index) => index));\n readonly isDisabled = computed(() => this.disabled() || this.disabledInput());\n readonly isEditable = computed(() => !this.isDisabled() && !this.readonly());\n readonly shown = computed(() => this.preview() ?? this.value() ?? 0);\n readonly unit = computed(() => (this.allowHalf() ? 0.5 : 1));\n readonly onIconName = computed(() => (this.txIconRegistry.has(this.onIcon()) ? this.onIcon() : null));\n readonly offIconName = computed(() => (this.txIconRegistry.has(this.offIcon()) ? this.offIcon() : null));\n readonly valueText = computed(() =>\n this.translations()\n .ratingValue.replace('{value}', this.localeService.formatNumber(this.value() ?? 0))\n .replace('{stars}', String(this.stars())),\n );\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-rating'), ...this.passThrough().root?.style }));\n\n fill(index: number): number {\n return Math.max(0, Math.min(1, this.shown() - index)) * 100;\n }\n\n onPointerMove(event: PointerEvent): void {\n const star = this.starAt(event);\n if (this.isEditable() && star) {\n this.preview.set(this.valueAt(event, star));\n }\n }\n\n onPointerLeave(): void {\n this.preview.set(null);\n }\n\n onClick(event: MouseEvent): void {\n const star = this.starAt(event);\n if (this.isEditable() && star) {\n this.commit(this.valueAt(event, star), event);\n this.preview.set(null);\n }\n }\n\n onKeydown(event: KeyboardEvent): void {\n if (!this.isEditable()) {\n return;\n }\n const current = this.value() ?? 0;\n const step = this.unit();\n const keys: Record<string, number | null> = {\n ArrowRight: current + step,\n ArrowUp: current + step,\n ArrowLeft: current - step,\n ArrowDown: current - step,\n Home: step,\n End: this.stars(),\n PageUp: current + 1,\n PageDown: current - 1,\n Delete: null,\n Backspace: null,\n 0: null,\n };\n if (/^[1-9]$/.test(event.key) && Number(event.key) <= this.stars()) {\n event.preventDefault();\n this.commit(Number(event.key), event);\n return;\n }\n if (!(event.key in keys)) {\n return;\n }\n event.preventDefault();\n const next = keys[event.key];\n this.commit(next === null || next <= 0 ? null : Math.min(this.stars(), next), event);\n }\n\n onBlur(): void {\n this.markTouched();\n }\n\n clear(event: Event): void {\n this.commit(null, event);\n this.cleared.emit();\n }\n\n private starAt(event: Event): HTMLElement | null {\n return (event.target as HTMLElement).closest<HTMLElement>('.tx-rating__star');\n }\n\n private valueAt(event: MouseEvent, star: HTMLElement): number {\n const index = Number(star.dataset['index']);\n if (!this.allowHalf()) {\n return index + 1;\n }\n const rect = star.getBoundingClientRect();\n const half = rect.width > 0 && event.clientX - rect.left < rect.width / 2;\n return index + (half ? 0.5 : 1);\n }\n\n private commit(value: number | null, event: Event): void {\n if (value !== this.value()) {\n this.updateValue(value);\n this.rated.emit({ value, originalEvent: event });\n }\n }\n}\n","<span\n class=\"tx-rating__stars\"\n role=\"slider\"\n [class]=\"passThrough().stars?.class\"\n [style]=\"passThrough().stars?.style\"\n [attr.tabindex]=\"isDisabled() ? -1 : (tabindex() ?? 0)\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"stars()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-valuetext]=\"valueText()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n (click)=\"onClick($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"onPointerLeave()\"\n>\n @for (index of indexes(); track index) {\n <span\n class=\"tx-rating__star\"\n [class.tx-rating__star--active]=\"fill(index) > 0\"\n [class]=\"passThrough().star?.class\"\n [style]=\"passThrough().star?.style\"\n [attr.data-index]=\"index\"\n >\n <span class=\"tx-rating__off\" aria-hidden=\"true\">\n @if (offTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: index }\" />\n } @else if (offIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"offIcon()\"></span>\n }\n </span>\n <span class=\"tx-rating__on\" aria-hidden=\"true\" [style.width.%]=\"fill(index)\">\n @if (onTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: index }\" />\n } @else if (onIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"onIcon()\"></span>\n }\n </span>\n </span>\n }\n</span>\n@if (clearable() && isEditable() && value()) {\n <button\n type=\"button\"\n class=\"tx-rating__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"clearLabel() ? null : translations().clear\"\n (click)=\"clear($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n @if (clearLabel()) {\n <span>{{ clearLabel() }}</span>\n }\n </button>\n}\n"],"mappings":";;;;;;;;;;AAIA,IAAa,yBAAb,MAAa,uBAAsB;CACxB,cAAc,OAAyC,WAAW;CAE3E,OAAO,uBAAuB,YAAoC,SAAgB;EAChF,OAAO,CAAC,CAAC;CACX;CALW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAsB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAtB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAsB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAtB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EADlC,MAAA;EAAU,MAA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AAA,aAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBACrB,uBAAuB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-rating.mjs","names":[],"sources":["../../../../packages/ui/rating/src/rating-templates.directive.ts","../../../../packages/ui/rating/src/rating.icons.ts","../../../../packages/ui/rating/src/rating.theme.ts","../../../../packages/ui/rating/src/rating.component.ts","../../../../packages/ui/rating/src/rating.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxRatingIconContext } from './rating.types';\n\n@Directive({ selector: 'ng-template[txRatingOnIcon]' })\nexport class TxRatingOnIconTemplate {\n readonly templateRef = inject<TemplateRef<TxRatingIconContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxRatingOnIconTemplate, context: unknown): context is TxRatingIconContext {\n return !!context;\n }\n}\n\n@Directive({ selector: 'ng-template[txRatingOffIcon]' })\nexport class TxRatingOffIconTemplate {\n readonly templateRef = inject<TemplateRef<TxRatingIconContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxRatingOffIconTemplate, context: unknown): context is TxRatingIconContext {\n return !!context;\n }\n}\n","import { TxIconSet, txIconStar, txIconStarFill, txIconTimes } from '@tectra-ng/icons';\n\nexport const RATING_ICON_DEFAULTS: TxIconSet = {\n star: txIconStar,\n 'star-fill': txIconStarFill,\n times: txIconTimes,\n};\n","import { formFieldTokens, ratingTokens } from '@tectra-ng/themes';\n\nexport const RATING_THEME = {\n formField: formFieldTokens,\n rating: ratingTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, booleanAttribute, computed, contentChild, forwardRef, inject, input, numberAttribute, output, signal } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { TxLocaleService, injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { injectTxIcons, provideTxIconDefaults, TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraRatingTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxRatingOffIconTemplate, TxRatingOnIconTemplate } from './rating-templates.directive';\nimport { TxRatingChangeEvent, TxRatingPart, TxRatingSize } from './rating.types';\nimport { RATING_ICON_DEFAULTS } from './rating.icons';\nimport { RATING_THEME } from './rating.theme';\n\n@Component({\n selector: 'tx-rating',\n imports: [NgTemplateOutlet, TxIcon],\n templateUrl: './rating.component.html',\n styleUrl: './rating.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxRating), multi: true }],\n host: {\n class: 'tx-rating',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[class.tx-rating--readonly]': 'readonly()',\n '[class.tx-rating--disabled]': 'isDisabled()',\n '[class.tx-rating--invalid]': 'isInvalid()',\n '[class.tx-rating--preview]': 'preview() !== null',\n },\n viewProviders: [provideTxIconDefaults(RATING_ICON_DEFAULTS)],\n})\nexport class TxRating extends TxFormControlBase<number> {\n private readonly ratingTheme = injectTokens(RATING_THEME);\n\n private txIconRegistry = injectTxIcons();\n private localeService = inject(TxLocaleService);\n\n readonly stars = input<number, unknown>(5, { transform: numberAttribute });\n readonly allowHalf = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly onIcon = input<TxIconName | (string & {})>('star-fill');\n readonly offIcon = input<TxIconName | (string & {})>('star-fill');\n readonly clearable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly clearLabel = input<string | undefined>(undefined);\n readonly size = input<TxRatingSize>('medium');\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input<boolean, unknown>(false, { alias: 'disabled', transform: booleanAttribute });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly tabindex = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly dt = input<TectraDeepPartial<TectraRatingTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxRatingPart, TxRating> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly rated = output<TxRatingChangeEvent>();\n readonly cleared = output<void>();\n\n readonly onTemplate = contentChild(TxRatingOnIconTemplate);\n readonly offTemplate = contentChild(TxRatingOffIconTemplate);\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly isInvalid = injectFieldInvalid(this.invalid);\n readonly passThrough = injectPassThrough('rating', this, this.pt, this.ptOptions);\n\n readonly preview = signal<number | null>(null);\n readonly indexes = computed(() => Array.from({ length: Math.max(1, this.stars()) }, (_, index) => index));\n readonly isDisabled = computed(() => this.disabled() || this.disabledInput());\n readonly isEditable = computed(() => !this.isDisabled() && !this.readonly());\n readonly shown = computed(() => this.preview() ?? this.value() ?? 0);\n readonly unit = computed(() => (this.allowHalf() ? 0.5 : 1));\n readonly onIconName = computed(() => (this.txIconRegistry.has(this.onIcon()) ? this.onIcon() : null));\n readonly offIconName = computed(() => (this.txIconRegistry.has(this.offIcon()) ? this.offIcon() : null));\n readonly valueText = computed(() =>\n this.translations()\n .ratingValue.replace('{value}', this.localeService.formatNumber(this.value() ?? 0))\n .replace('{stars}', String(this.stars())),\n );\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-rating'), ...this.passThrough().root?.style }));\n\n fill(index: number): number {\n return Math.max(0, Math.min(1, this.shown() - index)) * 100;\n }\n\n onPointerMove(event: PointerEvent): void {\n const star = this.starAt(event);\n if (this.isEditable() && star) {\n this.preview.set(this.valueAt(event, star));\n }\n }\n\n onPointerLeave(): void {\n this.preview.set(null);\n }\n\n onClick(event: MouseEvent): void {\n const star = this.starAt(event);\n if (this.isEditable() && star) {\n this.commit(this.valueAt(event, star), event);\n this.preview.set(null);\n }\n }\n\n onKeydown(event: KeyboardEvent): void {\n if (!this.isEditable()) {\n return;\n }\n const current = this.value() ?? 0;\n const step = this.unit();\n const keys: Record<string, number | null> = {\n ArrowRight: current + step,\n ArrowUp: current + step,\n ArrowLeft: current - step,\n ArrowDown: current - step,\n Home: step,\n End: this.stars(),\n PageUp: current + 1,\n PageDown: current - 1,\n Delete: null,\n Backspace: null,\n 0: null,\n };\n if (/^[1-9]$/.test(event.key) && Number(event.key) <= this.stars()) {\n event.preventDefault();\n this.commit(Number(event.key), event);\n return;\n }\n if (!(event.key in keys)) {\n return;\n }\n event.preventDefault();\n const next = keys[event.key];\n this.commit(next === null || next <= 0 ? null : Math.min(this.stars(), next), event);\n }\n\n onBlur(): void {\n this.markTouched();\n }\n\n clear(event: Event): void {\n this.commit(null, event);\n this.cleared.emit();\n }\n\n private starAt(event: Event): HTMLElement | null {\n return (event.target as HTMLElement).closest<HTMLElement>('.tx-rating__star');\n }\n\n private valueAt(event: MouseEvent, star: HTMLElement): number {\n const index = Number(star.dataset['index']);\n if (!this.allowHalf()) {\n return index + 1;\n }\n const rect = star.getBoundingClientRect();\n const half = rect.width > 0 && event.clientX - rect.left < rect.width / 2;\n return index + (half ? 0.5 : 1);\n }\n\n private commit(value: number | null, event: Event): void {\n if (value !== this.value()) {\n this.updateValue(value);\n this.rated.emit({ value, originalEvent: event });\n }\n }\n}\n","<span\n class=\"tx-rating__stars\"\n role=\"slider\"\n [class]=\"passThrough().stars?.class\"\n [style]=\"passThrough().stars?.style\"\n [attr.tabindex]=\"isDisabled() ? -1 : (tabindex() ?? 0)\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"stars()\"\n [attr.aria-valuenow]=\"value() ?? 0\"\n [attr.aria-valuetext]=\"valueText()\"\n [attr.aria-readonly]=\"readonly() || null\"\n [attr.aria-disabled]=\"isDisabled() || null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\"\n (click)=\"onClick($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerleave)=\"onPointerLeave()\"\n>\n @for (index of indexes(); track index) {\n <span\n class=\"tx-rating__star\"\n [class.tx-rating__star--active]=\"fill(index) > 0\"\n [class]=\"passThrough().star?.class\"\n [style]=\"passThrough().star?.style\"\n [attr.data-index]=\"index\"\n >\n <span class=\"tx-rating__off\" aria-hidden=\"true\">\n @if (offTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: index }\" />\n } @else if (offIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"offIcon()\"></span>\n }\n </span>\n <span class=\"tx-rating__on\" aria-hidden=\"true\" [style.width.%]=\"fill(index)\">\n @if (onTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: index }\" />\n } @else if (onIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"onIcon()\"></span>\n }\n </span>\n </span>\n }\n</span>\n@if (clearable() && isEditable() && value()) {\n <button\n type=\"button\"\n class=\"tx-rating__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"clearLabel() ? null : translations().clear\"\n (click)=\"clear($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n @if (clearLabel()) {\n <span>{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