@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
@@ -272,6 +272,7 @@ var TxField = class TxField {
272
272
  "required",
273
273
  "colon",
274
274
  "subtle",
275
+ "filled",
275
276
  "tooltip"
276
277
  ]
277
278
  },
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-field.mjs","names":[],"sources":["../../../../packages/ui/field/src/field.theme.ts","../../../../packages/ui/field/src/field.component.ts","../../../../packages/ui/field/src/field.component.html"],"sourcesContent":["import { fieldTokens, labelTokens } from '@tectra-ng/themes';\n\nexport const FIELD_THEME = {\n field: fieldTokens,\n label: labelTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n afterEveryRender,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { AbstractControl, NgControl } from '@angular/forms';\nimport { linkDescribedBy, uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions, TxValidationMessages } from '@tectra-ng/core/config';\nimport { TX_FIELD_STATE } from '@tectra-ng/core/forms';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraFieldTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxLabel } from '@tectra-ng/ui/label';\nimport { TxFieldError, TxFieldHint } from '@tectra-ng/ui/message';\nimport { TxFieldLayout, TxFieldPart } from './field.types';\nimport { FIELD_THEME } from './field.theme';\n\nconst CONTROL_SELECTOR = [\n 'input:not([type=\"hidden\"])',\n 'textarea',\n 'select',\n '[role=\"combobox\"]',\n '[role=\"switch\"]',\n '[role=\"checkbox\"]',\n '[role=\"slider\"]',\n '[role=\"spinbutton\"]',\n '[contenteditable=\"true\"]',\n].join(', ');\n\n@Component({\n selector: 'tx-field',\n imports: [TxLabel, TxFieldHint, TxFieldError],\n templateUrl: './field.component.html',\n styleUrl: './field.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: TX_FIELD_STATE, useFactory: () => inject(TxField).state }],\n host: {\n class: 'tx-field',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-layout]': 'layout()',\n },\n})\nexport class TxField {\n private readonly fieldTheme = injectTokens(FIELD_THEME);\n\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private generatedId = uniqueId('tx-field');\n private linkedElement: HTMLElement | null = null;\n private linkedKey = '';\n private unlinks: (() => void)[] = [];\n\n readonly label = input<string | undefined>(undefined);\n readonly required = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly colon = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly subtle = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly tooltip = input<string | undefined>(undefined);\n readonly hint = input<string | undefined>(undefined);\n readonly control = input<AbstractControl | undefined>(undefined);\n readonly errorText = input<string | undefined>(undefined);\n readonly successText = input<string | undefined>(undefined);\n readonly messages = input<TxValidationMessages | undefined>(undefined);\n readonly showImmediately = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly layout = input<TxFieldLayout>('vertical');\n readonly dt = input<TectraDeepPartial<TectraFieldTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxFieldPart, TxField> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly projectedControl = contentChild(NgControl, { descendants: true });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('field', this, this.pt, this.ptOptions);\n readonly labelId = `${this.generatedId}-label`;\n readonly hintId = `${this.generatedId}-hint`;\n readonly errorId = `${this.generatedId}-error`;\n readonly controlId = signal<string | null>(null);\n readonly formControl = computed(() => this.control() ?? this.projectedControl()?.control ?? undefined);\n readonly state = { invalid: computed(() => !!this.errorText()) };\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-field'), ...this.passThrough().root?.style }));\n\n constructor() {\n afterEveryRender(() => this.linkControl());\n inject(DestroyRef).onDestroy(() => this.unlink());\n }\n\n private linkControl(): void {\n const host = this.elementRef.nativeElement;\n const group = host.querySelector<HTMLElement>('.tx-field__control :is([data-tx-field-control], [role=\"radiogroup\"], [role=\"group\"], [role=\"listbox\"])');\n const element = group ?? host.querySelector<HTMLElement>(`.tx-field__control :is(${CONTROL_SELECTOR})`);\n const describedBy = [host.querySelector(`#${this.hintId}`) ? this.hintId : null, this.errorId].filter((id): id is string => !!id);\n const key = `${describedBy.join(' ')}|${this.label() ? 'label' : ''}`;\n if (element === this.linkedElement && key === this.linkedKey) {\n return;\n }\n this.unlink();\n this.linkedElement = element;\n this.linkedKey = key;\n if (!element) {\n this.controlId.set(null);\n return;\n }\n this.unlinks = describedBy.map((id) => linkDescribedBy(element, id));\n if (group || !isLabelable(element)) {\n if (this.label() && !element.hasAttribute('aria-labelledby') && !element.hasAttribute('aria-label')) {\n element.setAttribute('aria-labelledby', this.labelId);\n this.unlinks.push(() => element.removeAttribute('aria-labelledby'));\n }\n this.controlId.set(null);\n return;\n }\n if (!element.id) {\n element.id = `${this.generatedId}-control`;\n }\n this.controlId.set(element.id);\n }\n\n private unlink(): void {\n this.unlinks.forEach((unlink) => unlink());\n this.unlinks = [];\n }\n}\n\nfunction isLabelable(element: HTMLElement): boolean {\n return ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON', 'METER', 'OUTPUT', 'PROGRESS'].includes(element.tagName);\n}\n","@if (label()) {\n <tx-label\n class=\"tx-field__label\"\n [id]=\"labelId\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n [for]=\"controlId() ?? undefined\"\n [required]=\"required()\"\n [colon]=\"colon()\"\n [subtle]=\"subtle()\"\n [tooltip]=\"tooltip()\"\n >{{ label() }}</tx-label\n >\n}\n<div class=\"tx-field__body\">\n <div class=\"tx-field__control\" [class]=\"passThrough().control?.class\" [style]=\"passThrough().control?.style\">\n <ng-content />\n </div>\n @if (hint()) {\n <tx-field-hint [id]=\"hintId\" [class]=\"passThrough().hint?.class\" [style]=\"passThrough().hint?.style\">{{ hint() }}</tx-field-hint>\n }\n <tx-field-error\n [id]=\"errorId\"\n [class]=\"passThrough().error?.class\"\n [style]=\"passThrough().error?.style\"\n [control]=\"formControl()\"\n [errorText]=\"errorText()\"\n [successText]=\"successText()\"\n [messages]=\"messages()\"\n [showImmediately]=\"showImmediately()\"\n />\n</div>\n"],"mappings":";;;;;;;;;;AAEA,MAAa,cAAc;CACzB,OAAO;CACP,OAAO;AACR;ACmBD,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAA,CAAC,KAAK,IAAI;AAiBX,IAAa,UAAb,MAAa,QAAO;CACD,aAAa,aAAa,WAAW;CAE9C,aAAa,OAAgC,UAAU;CACvD,cAAc,SAAS,UAAU;CACjC,gBAAoC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AAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,SAAS,GAAA;IAAI,aAAa;IAAM,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AAsD3E,SAAS,YAAY,SAAoB;CACvC,OAAO;EAAC;EAAS;EAAU;EAAY;EAAU;EAAS;EAAU;CAAU,CAAC,CAAC,SAAS,QAAQ,OAAO;AAC1G"}
1
+ {"version":3,"file":"tectra-ng-ui-field.mjs","names":[],"sources":["../../../../packages/ui/field/src/field.theme.ts","../../../../packages/ui/field/src/field.component.ts","../../../../packages/ui/field/src/field.component.html"],"sourcesContent":["import { fieldTokens, labelTokens } from '@tectra-ng/themes';\n\nexport const FIELD_THEME = {\n field: fieldTokens,\n label: labelTokens,\n};\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n afterEveryRender,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { AbstractControl, NgControl } from '@angular/forms';\nimport { linkDescribedBy, uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions, TxValidationMessages } from '@tectra-ng/core/config';\nimport { TX_FIELD_STATE } from '@tectra-ng/core/forms';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraFieldTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxLabel } from '@tectra-ng/ui/label';\nimport { TxFieldError, TxFieldHint } from '@tectra-ng/ui/message';\nimport { TxFieldLayout, TxFieldPart } from './field.types';\nimport { FIELD_THEME } from './field.theme';\n\nconst CONTROL_SELECTOR = [\n 'input:not([type=\"hidden\"])',\n 'textarea',\n 'select',\n '[role=\"combobox\"]',\n '[role=\"switch\"]',\n '[role=\"checkbox\"]',\n '[role=\"slider\"]',\n '[role=\"spinbutton\"]',\n '[contenteditable=\"true\"]',\n].join(', ');\n\n@Component({\n selector: 'tx-field',\n imports: [TxLabel, TxFieldHint, TxFieldError],\n templateUrl: './field.component.html',\n styleUrl: './field.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: TX_FIELD_STATE, useFactory: () => inject(TxField).state }],\n host: {\n class: 'tx-field',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-layout]': 'layout()',\n },\n})\nexport class TxField {\n private readonly fieldTheme = injectTokens(FIELD_THEME);\n\n private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private generatedId = uniqueId('tx-field');\n private linkedElement: HTMLElement | null = null;\n private linkedKey = '';\n private unlinks: (() => void)[] = [];\n\n readonly label = input<string | undefined>(undefined);\n readonly required = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly colon = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly subtle = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly tooltip = input<string | undefined>(undefined);\n readonly hint = input<string | undefined>(undefined);\n readonly control = input<AbstractControl | undefined>(undefined);\n readonly errorText = input<string | undefined>(undefined);\n readonly successText = input<string | undefined>(undefined);\n readonly messages = input<TxValidationMessages | undefined>(undefined);\n readonly showImmediately = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly layout = input<TxFieldLayout>('vertical');\n readonly dt = input<TectraDeepPartial<TectraFieldTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxFieldPart, TxField> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly projectedControl = contentChild(NgControl, { descendants: true });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('field', this, this.pt, this.ptOptions);\n readonly labelId = `${this.generatedId}-label`;\n readonly hintId = `${this.generatedId}-hint`;\n readonly errorId = `${this.generatedId}-error`;\n readonly controlId = signal<string | null>(null);\n readonly formControl = computed(() => this.control() ?? this.projectedControl()?.control ?? undefined);\n readonly state = { invalid: computed(() => !!this.errorText()) };\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-field'), ...this.passThrough().root?.style }));\n\n constructor() {\n afterEveryRender(() => this.linkControl());\n inject(DestroyRef).onDestroy(() => this.unlink());\n }\n\n private linkControl(): void {\n const host = this.elementRef.nativeElement;\n const group = host.querySelector<HTMLElement>('.tx-field__control :is([data-tx-field-control], [role=\"radiogroup\"], [role=\"group\"], [role=\"listbox\"])');\n const element = group ?? host.querySelector<HTMLElement>(`.tx-field__control :is(${CONTROL_SELECTOR})`);\n const describedBy = [host.querySelector(`#${this.hintId}`) ? this.hintId : null, this.errorId].filter((id): id is string => !!id);\n const key = `${describedBy.join(' ')}|${this.label() ? 'label' : ''}`;\n if (element === this.linkedElement && key === this.linkedKey) {\n return;\n }\n this.unlink();\n this.linkedElement = element;\n this.linkedKey = key;\n if (!element) {\n this.controlId.set(null);\n return;\n }\n this.unlinks = describedBy.map((id) => linkDescribedBy(element, id));\n if (group || !isLabelable(element)) {\n if (this.label() && !element.hasAttribute('aria-labelledby') && !element.hasAttribute('aria-label')) {\n element.setAttribute('aria-labelledby', this.labelId);\n this.unlinks.push(() => element.removeAttribute('aria-labelledby'));\n }\n this.controlId.set(null);\n return;\n }\n if (!element.id) {\n element.id = `${this.generatedId}-control`;\n }\n this.controlId.set(element.id);\n }\n\n private unlink(): void {\n this.unlinks.forEach((unlink) => unlink());\n this.unlinks = [];\n }\n}\n\nfunction isLabelable(element: HTMLElement): boolean {\n return ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON', 'METER', 'OUTPUT', 'PROGRESS'].includes(element.tagName);\n}\n","@if (label()) {\n <tx-label\n class=\"tx-field__label\"\n [id]=\"labelId\"\n [class]=\"passThrough().label?.class\"\n [style]=\"passThrough().label?.style\"\n [for]=\"controlId() ?? undefined\"\n [required]=\"required()\"\n [colon]=\"colon()\"\n [subtle]=\"subtle()\"\n [tooltip]=\"tooltip()\"\n >{{ label() }}</tx-label\n >\n}\n<div class=\"tx-field__body\">\n <div class=\"tx-field__control\" [class]=\"passThrough().control?.class\" [style]=\"passThrough().control?.style\">\n <ng-content />\n </div>\n @if (hint()) {\n <tx-field-hint [id]=\"hintId\" [class]=\"passThrough().hint?.class\" [style]=\"passThrough().hint?.style\">{{ hint() }}</tx-field-hint>\n }\n <tx-field-error\n [id]=\"errorId\"\n [class]=\"passThrough().error?.class\"\n [style]=\"passThrough().error?.style\"\n [control]=\"formControl()\"\n [errorText]=\"errorText()\"\n [successText]=\"successText()\"\n [messages]=\"messages()\"\n [showImmediately]=\"showImmediately()\"\n />\n</div>\n"],"mappings":";;;;;;;;;;AAEA,MAAa,cAAc;CACzB,OAAO;CACP,OAAO;AACR;ACmBD,MAAM,mBAAmB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAA,CAAC,KAAK,IAAI;AAiBX,IAAa,UAAb,MAAa,QAAO;CACD,aAAa,aAAa,WAAW;CAE9C,aAAa,O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UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,SAAS,GAAA;IAAI,aAAa;IAAM,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AAsD3E,SAAS,YAAY,SAAoB;CACvC,OAAO;EAAC;EAAS;EAAU;EAAY;EAAU;EAAS;EAAU;CAAU,CAAC,CAAC,SAAS,QAAQ,OAAO;AAC1G"}
@@ -135,7 +135,7 @@ var TxFieldset = class TxFieldset {
135
135
  </fieldset>
136
136
  `,
137
137
  isInline: true,
138
- styles: [":host{display:block;min-width:0}.tx-fieldset__box{min-width:0;margin:0}.tx-fieldset__collapse{display:grid;grid-template-rows:1fr}:host(.tx-fieldset--collapsed) .tx-fieldset__collapse{grid-template-rows:0fr}.tx-fieldset__collapse-inner{min-height:0;overflow:hidden}:host(.tx-fieldset--collapsed) .tx-fieldset__collapse-inner{visibility:hidden}:host([data-styled]) .tx-fieldset__box{padding:var(--tx-fieldset-padding);border:1px solid var(--tx-fieldset-border-color);border-radius:var(--tx-fieldset-border-radius);background:var(--tx-fieldset-background);font-family:var(--tx-font-family);transition:padding var(--tx-fieldset-transition-duration)}:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__box{padding-bottom:0}:host([data-styled]) .tx-fieldset__legend{padding:var(--tx-fieldset-legend-padding);border-radius:var(--tx-fieldset-legend-border-radius);background:var(--tx-fieldset-legend-background);box-shadow:inset 0 0 0 1px var(--tx-fieldset-legend-border-color);color:var(--tx-fieldset-legend-color);font-size:var(--tx-fieldset-legend-font-size);font-weight:var(--tx-fieldset-legend-font-weight)}:host([data-styled].tx-fieldset--toggleable) .tx-fieldset__legend{padding:0}:host([data-styled]) .tx-fieldset__toggle{display:inline-flex;align-items:center;gap:6px;padding:var(--tx-fieldset-toggle-padding);border:none;border-radius:var(--tx-fieldset-legend-border-radius);background:transparent;color:inherit;font:inherit;cursor:pointer;transition:color var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-fieldset__toggle tx-icon{color:var(--tx-text-muted);transition:transform var(--tx-fieldset-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-fieldset__toggle:focus-visible{outline:var(--tx-fieldset-focus-ring-width) solid var(--tx-focus-ring-color);outline-offset:var(--tx-fieldset-focus-ring-offset);background:var(--tx-fieldset-legend-focus-background);box-shadow:var(--tx-fieldset-focus-ring-shadow)}:host([data-styled]) .tx-fieldset__toggle:hover{background:var(--tx-fieldset-legend-hover-background)}:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__toggle tx-icon{transform:rotate(-90deg)}:host([data-styled]) .tx-fieldset__collapse{transition:grid-template-rows var(--tx-fieldset-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__collapse-inner{transition:visibility 0s linear var(--tx-fieldset-transition-duration)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-fieldset__box,:host([data-styled]) .tx-fieldset__collapse,:host([data-styled]) .tx-fieldset__toggle,:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__collapse-inner,:host([data-styled]) .tx-fieldset__toggle tx-icon{transition:none}}\n"],
138
+ styles: [":host{display:block;min-width:0}.tx-fieldset__box{min-width:0;margin:0}.tx-fieldset__collapse{display:grid;grid-template-rows:1fr}:host(.tx-fieldset--collapsed) .tx-fieldset__collapse{grid-template-rows:0fr}.tx-fieldset__collapse-inner{min-height:0;overflow:hidden}:host(.tx-fieldset--collapsed) .tx-fieldset__collapse-inner{visibility:hidden}:host([data-styled]) .tx-fieldset__box{padding:var(--tx-fieldset-padding);border:1px solid var(--tx-fieldset-border-color);border-radius:var(--tx-fieldset-border-radius);background:var(--tx-fieldset-background);font-family:var(--tx-font-family);transition:padding var(--tx-fieldset-transition-duration)}:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__box{padding-bottom:0}:host([data-styled]) .tx-fieldset__legend{padding:var(--tx-fieldset-legend-padding);border-radius:var(--tx-fieldset-legend-border-radius);background:var(--tx-fieldset-legend-background);box-shadow:inset 0 0 0 1px var(--tx-fieldset-legend-border-color);color:var(--tx-fieldset-legend-color);font-size:var(--tx-fieldset-legend-font-size);font-weight:var(--tx-fieldset-legend-font-weight)}:host([data-styled].tx-fieldset--toggleable) .tx-fieldset__legend{padding:0}:host([data-styled]) .tx-fieldset__toggle{display:inline-flex;align-items:center;gap:var(--tx-fieldset-toggle-gap);padding:var(--tx-fieldset-toggle-padding);border:none;border-radius:var(--tx-fieldset-legend-border-radius);background:transparent;color:inherit;font:inherit;cursor:pointer;transition:color var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-fieldset__toggle tx-icon{color:var(--tx-text-muted);transition:transform var(--tx-fieldset-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-fieldset__toggle:focus-visible{outline:var(--tx-fieldset-focus-ring-width) solid var(--tx-focus-ring-color);outline-offset:var(--tx-fieldset-focus-ring-offset);background:var(--tx-fieldset-legend-focus-background);box-shadow:var(--tx-fieldset-focus-ring-shadow)}:host([data-styled]) .tx-fieldset__toggle:hover{background:var(--tx-fieldset-legend-hover-background)}:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__toggle tx-icon{transform:rotate(-90deg)}:host([data-styled]) .tx-fieldset__collapse{transition:grid-template-rows var(--tx-fieldset-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__collapse-inner{transition:visibility 0s linear var(--tx-fieldset-transition-duration)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-fieldset__box,:host([data-styled]) .tx-fieldset__collapse,:host([data-styled]) .tx-fieldset__toggle,:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__collapse-inner,:host([data-styled]) .tx-fieldset__toggle tx-icon{transition:none}}\n"],
139
139
  dependencies: [{
140
140
  kind: "component",
141
141
  type: TxIcon,
@@ -193,7 +193,7 @@ i0.ɵɵngDeclareClassMetadata({
193
193
  "[class.tx-fieldset--toggleable]": "toggleable()"
194
194
  },
195
195
  viewProviders: [provideTxIconDefaults(FIELDSET_ICON_DEFAULTS)],
196
- styles: [":host{display:block;min-width:0}.tx-fieldset__box{min-width:0;margin:0}.tx-fieldset__collapse{display:grid;grid-template-rows:1fr}:host(.tx-fieldset--collapsed) .tx-fieldset__collapse{grid-template-rows:0fr}.tx-fieldset__collapse-inner{min-height:0;overflow:hidden}:host(.tx-fieldset--collapsed) .tx-fieldset__collapse-inner{visibility:hidden}:host([data-styled]) .tx-fieldset__box{padding:var(--tx-fieldset-padding);border:1px solid var(--tx-fieldset-border-color);border-radius:var(--tx-fieldset-border-radius);background:var(--tx-fieldset-background);font-family:var(--tx-font-family);transition:padding var(--tx-fieldset-transition-duration)}:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__box{padding-bottom:0}:host([data-styled]) .tx-fieldset__legend{padding:var(--tx-fieldset-legend-padding);border-radius:var(--tx-fieldset-legend-border-radius);background:var(--tx-fieldset-legend-background);box-shadow:inset 0 0 0 1px var(--tx-fieldset-legend-border-color);color:var(--tx-fieldset-legend-color);font-size:var(--tx-fieldset-legend-font-size);font-weight:var(--tx-fieldset-legend-font-weight)}:host([data-styled].tx-fieldset--toggleable) .tx-fieldset__legend{padding:0}:host([data-styled]) .tx-fieldset__toggle{display:inline-flex;align-items:center;gap:6px;padding:var(--tx-fieldset-toggle-padding);border:none;border-radius:var(--tx-fieldset-legend-border-radius);background:transparent;color:inherit;font:inherit;cursor:pointer;transition:color var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-fieldset__toggle tx-icon{color:var(--tx-text-muted);transition:transform var(--tx-fieldset-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-fieldset__toggle:focus-visible{outline:var(--tx-fieldset-focus-ring-width) solid var(--tx-focus-ring-color);outline-offset:var(--tx-fieldset-focus-ring-offset);background:var(--tx-fieldset-legend-focus-background);box-shadow:var(--tx-fieldset-focus-ring-shadow)}:host([data-styled]) .tx-fieldset__toggle:hover{background:var(--tx-fieldset-legend-hover-background)}:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__toggle tx-icon{transform:rotate(-90deg)}:host([data-styled]) .tx-fieldset__collapse{transition:grid-template-rows var(--tx-fieldset-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__collapse-inner{transition:visibility 0s linear var(--tx-fieldset-transition-duration)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-fieldset__box,:host([data-styled]) .tx-fieldset__collapse,:host([data-styled]) .tx-fieldset__toggle,:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__collapse-inner,:host([data-styled]) .tx-fieldset__toggle tx-icon{transition:none}}\n"]
196
+ styles: [":host{display:block;min-width:0}.tx-fieldset__box{min-width:0;margin:0}.tx-fieldset__collapse{display:grid;grid-template-rows:1fr}:host(.tx-fieldset--collapsed) .tx-fieldset__collapse{grid-template-rows:0fr}.tx-fieldset__collapse-inner{min-height:0;overflow:hidden}:host(.tx-fieldset--collapsed) .tx-fieldset__collapse-inner{visibility:hidden}:host([data-styled]) .tx-fieldset__box{padding:var(--tx-fieldset-padding);border:1px solid var(--tx-fieldset-border-color);border-radius:var(--tx-fieldset-border-radius);background:var(--tx-fieldset-background);font-family:var(--tx-font-family);transition:padding var(--tx-fieldset-transition-duration)}:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__box{padding-bottom:0}:host([data-styled]) .tx-fieldset__legend{padding:var(--tx-fieldset-legend-padding);border-radius:var(--tx-fieldset-legend-border-radius);background:var(--tx-fieldset-legend-background);box-shadow:inset 0 0 0 1px var(--tx-fieldset-legend-border-color);color:var(--tx-fieldset-legend-color);font-size:var(--tx-fieldset-legend-font-size);font-weight:var(--tx-fieldset-legend-font-weight)}:host([data-styled].tx-fieldset--toggleable) .tx-fieldset__legend{padding:0}:host([data-styled]) .tx-fieldset__toggle{display:inline-flex;align-items:center;gap:var(--tx-fieldset-toggle-gap);padding:var(--tx-fieldset-toggle-padding);border:none;border-radius:var(--tx-fieldset-legend-border-radius);background:transparent;color:inherit;font:inherit;cursor:pointer;transition:color var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-fieldset__toggle tx-icon{color:var(--tx-text-muted);transition:transform var(--tx-fieldset-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-fieldset__toggle:focus-visible{outline:var(--tx-fieldset-focus-ring-width) solid var(--tx-focus-ring-color);outline-offset:var(--tx-fieldset-focus-ring-offset);background:var(--tx-fieldset-legend-focus-background);box-shadow:var(--tx-fieldset-focus-ring-shadow)}:host([data-styled]) .tx-fieldset__toggle:hover{background:var(--tx-fieldset-legend-hover-background)}:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__toggle tx-icon{transform:rotate(-90deg)}:host([data-styled]) .tx-fieldset__collapse{transition:grid-template-rows var(--tx-fieldset-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__collapse-inner{transition:visibility 0s linear var(--tx-fieldset-transition-duration)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-fieldset__box,:host([data-styled]) .tx-fieldset__collapse,:host([data-styled]) .tx-fieldset__toggle,:host([data-styled].tx-fieldset--collapsed) .tx-fieldset__collapse-inner,:host([data-styled]) .tx-fieldset__toggle tx-icon{transition:none}}\n"]
197
197
  }]
198
198
  }],
199
199
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-fieldset.mjs","names":[],"sources":["../../../../packages/ui/fieldset/src/fieldset.icons.ts","../../../../packages/ui/fieldset/src/fieldset.theme.ts","../../../../packages/ui/fieldset/src/fieldset.component.ts"],"sourcesContent":["import { TxIconSet, txIconChevronDown } from '@tectra-ng/icons';\n\nexport const FIELDSET_ICON_DEFAULTS: TxIconSet = {\n 'chevron-down': txIconChevronDown,\n};\n","import { fieldsetTokens } from '@tectra-ng/themes';\n\nexport const FIELDSET_THEME = {\n fieldset: fieldsetTokens,\n};\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input, model } from '@angular/core';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraFieldsetTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxFieldsetPart } from './fieldset.types';\nimport { FIELDSET_ICON_DEFAULTS } from './fieldset.icons';\nimport { FIELDSET_THEME } from './fieldset.theme';\n\n@Component({\n selector: 'tx-fieldset',\n imports: [TxIcon],\n template: `\n <fieldset class=\"tx-fieldset__box\">\n <legend class=\"tx-fieldset__legend\" [class]=\"passThrough().legend?.class\" [style]=\"passThrough().legend?.style\">\n @if (toggleable()) {\n <button\n type=\"button\"\n class=\"tx-fieldset__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-expanded]=\"!collapsed()\"\n [attr.aria-controls]=\"contentId\"\n (click)=\"collapsed.set(!collapsed())\"\n >\n <tx-icon [name]=\"'chevron-down'\" />\n <span>{{ legend() }}<ng-content select=\"[txFieldsetLegend]\" /></span>\n </button>\n } @else {\n {{ legend() }}<ng-content select=\"[txFieldsetLegend]\" />\n }\n </legend>\n <div class=\"tx-fieldset__collapse\" [id]=\"contentId\" [attr.inert]=\"isOpen() ? null : ''\">\n <div class=\"tx-fieldset__collapse-inner\">\n <div class=\"tx-fieldset__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\"><ng-content /></div>\n </div>\n </div>\n </fieldset>\n `,\n styleUrl: './fieldset.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-fieldset',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-fieldset--collapsed]': 'toggleable() && collapsed()',\n '[class.tx-fieldset--toggleable]': 'toggleable()',\n },\n viewProviders: [provideTxIconDefaults(FIELDSET_ICON_DEFAULTS)],\n})\nexport class TxFieldset {\n private readonly fieldsetTheme = injectTokens(FIELDSET_THEME);\n\n readonly legend = input<string | undefined>(undefined);\n readonly toggleable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly collapsed = model<boolean>(false);\n readonly dt = input<TectraDeepPartial<TectraFieldsetTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxFieldsetPart, TxFieldset> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('fieldset', this, this.pt, this.ptOptions);\n readonly contentId = uniqueId('tx-fieldset-content');\n readonly isOpen = computed(() => !this.toggleable() || !this.coll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B,sBAAsB,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAEnD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAU,YAAA,CAAA;EA1CtB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAa,SACd,CAAC,MAAM;GAAC,UACP;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BT,iBAEgB,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,kCAAkC;IAClC,mCAAmC;GACpC;GAAA,eACc,CAAC,sBAAsB,sBAAsB,CAAC;GAAC,QAAA,CAAA,itFAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-fieldset.mjs","names":[],"sources":["../../../../packages/ui/fieldset/src/fieldset.icons.ts","../../../../packages/ui/fieldset/src/fieldset.theme.ts","../../../../packages/ui/fieldset/src/fieldset.component.ts"],"sourcesContent":["import { TxIconSet, txIconChevronDown } from '@tectra-ng/icons';\n\nexport const FIELDSET_ICON_DEFAULTS: TxIconSet = {\n 'chevron-down': txIconChevronDown,\n};\n","import { fieldsetTokens } from '@tectra-ng/themes';\n\nexport const FIELDSET_THEME = {\n fieldset: fieldsetTokens,\n};\n","import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input, model } from '@angular/core';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraFieldsetTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxFieldsetPart } from './fieldset.types';\nimport { FIELDSET_ICON_DEFAULTS } from './fieldset.icons';\nimport { FIELDSET_THEME } from './fieldset.theme';\n\n@Component({\n selector: 'tx-fieldset',\n imports: [TxIcon],\n template: `\n <fieldset class=\"tx-fieldset__box\">\n <legend class=\"tx-fieldset__legend\" [class]=\"passThrough().legend?.class\" [style]=\"passThrough().legend?.style\">\n @if (toggleable()) {\n <button\n type=\"button\"\n class=\"tx-fieldset__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-expanded]=\"!collapsed()\"\n [attr.aria-controls]=\"contentId\"\n (click)=\"collapsed.set(!collapsed())\"\n >\n <tx-icon [name]=\"'chevron-down'\" />\n <span>{{ legend() }}<ng-content select=\"[txFieldsetLegend]\" /></span>\n </button>\n } @else {\n {{ legend() }}<ng-content select=\"[txFieldsetLegend]\" />\n }\n </legend>\n <div class=\"tx-fieldset__collapse\" [id]=\"contentId\" [attr.inert]=\"isOpen() ? null : ''\">\n <div class=\"tx-fieldset__collapse-inner\">\n <div class=\"tx-fieldset__content\" [class]=\"passThrough().content?.class\" [style]=\"passThrough().content?.style\"><ng-content /></div>\n </div>\n </div>\n </fieldset>\n `,\n styleUrl: './fieldset.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-fieldset',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-fieldset--collapsed]': 'toggleable() && collapsed()',\n '[class.tx-fieldset--toggleable]': 'toggleable()',\n },\n viewProviders: [provideTxIconDefaults(FIELDSET_ICON_DEFAULTS)],\n})\nexport class TxFieldset {\n private readonly fieldsetTheme = injectTokens(FIELDSET_THEME);\n\n readonly legend = input<string | undefined>(undefined);\n readonly toggleable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly collapsed = model<boolean>(false);\n readonly dt = input<TectraDeepPartial<TectraFieldsetTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxFieldsetPart, TxFieldset> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('fieldset', this, this.pt, this.ptOptions);\n readonly contentId = uniqueId('tx-fieldset-content');\n readonly isOpen = computed(() => !this.toggleable() || !this.collapsed());\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-fieldset'), ...this.passThrough().root?.style }));\n}\n"],"mappings":";;;;;;;AAEA,MAAa,yBAAoC,EAC/C,gBAAgB,kBACjB;ACFD,MAAa,iBAAiB,EAC5B,UAAU,eACX;ACgDD,IAAa,aAAb,MAAa,WAAU;CACJ,gBAAgB,aAAa,cAAc;CAEnD,SAAS,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAC7C,aAAa,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,aAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACzE,YAAY,MAAe,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CACjC,KAAK,MAA2D,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CAC1E,KAAK,MAA6D,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CAC5E,YAAY,MAAwC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;CAC9D,WAAW,MAAoC,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAe,CAAA;CAEtF,aAAa,eAAe,KAAK,QAAQ;CACzC,cAAc,kBAAkB,YAAY,MAAM,KAAK,IAAI,KAAK,SAAS;CACzE,YAAY,SAAS,qBAAqB;CAC1C,SAAS,eAAe,CAAC,KAAK,WAAU,KAAM,CAAC,KAAK,UAAS,GAAG,GAAA,YAAA,CAAA,EAAA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T,UAAA;EAAA,QAAA,CAAA,2uFAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MA3BS;GAAM,UAAA;GAAA,QAAA,CAAA,MAAA;EAAA,CAAA;EAAA,eAsCD,CAAC,sBAAsB,sBAAsB,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAEnD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAU,YAAA,CAAA;EA1CtB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAa,SACd,CAAC,MAAM;GAAC,UACP;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BT,iBAEgB,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,kCAAkC;IAClC,mCAAmC;GACpC;GAAA,eACc,CAAC,sBAAsB,sBAAsB,CAAC;GAAC,QAAA,CAAA,2uFAAA;EAAA,CAAA"}
@@ -1,8 +1,8 @@
1
1
  import * as i0 from "@angular/core";
2
- import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, afterNextRender, computed, contentChild, inject, input, output, signal, viewChild } from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, ElementRef, afterNextRender, computed, contentChild, inject, input, output, signal, viewChild } from "@angular/core";
3
3
  import { NgControl } from "@angular/forms";
4
4
  import { injectFluid } from "@tectra-ng/core/fluid";
5
- import { optionalBoolean } from "@tectra-ng/core/utils";
5
+ import { optionalBoolean, writeToClipboard } from "@tectra-ng/core/utils";
6
6
  import { TxInput } from "@tectra-ng/ui/input";
7
7
  import { TxIcon, injectTxIcons, provideTxIconDefaults, txIconCheck, txIconCopy, txIconTimes } from "@tectra-ng/icons";
8
8
  import { injectTokens } from "@tectra-ng/core/config";
@@ -172,7 +172,7 @@ var TxIconField = class TxIconField {
172
172
  }],
173
173
  ngImport: i0,
174
174
  template: "<span #start class=\"tx-icon-field__slot tx-icon-field__slot--start\"><ng-content select=\"tx-input-icon:not([position=end])\" /></span>\n<ng-content />\n<span #end class=\"tx-icon-field__slot tx-icon-field__slot--end\"><ng-content select=\"tx-input-icon[position=end], tx-input-clear, tx-input-copy\" /></span>\n",
175
- styles: [":host{--_icon-room: calc(var(--tx-form-field-font-size) + 6px);--_action-room: 30px ;position:relative;display:inline-flex;align-items:stretch;max-width:100%}:host(.tx-icon-field--start-icon){--tx-field-inset-start: var(--_icon-room)}:host(.tx-icon-field--end-icon){--tx-field-inset-end: var(--_icon-room)}:host(.tx-icon-field--end-action){--tx-field-inset-end: var(--_action-room)}:host(.tx-icon-field--fluid){display:flex;width:100%}.tx-icon-field__slot{position:absolute;top:50%;z-index:1;display:flex;align-items:center;gap:4px;transform:translateY(-50%);pointer-events:none}.tx-icon-field__slot:empty{display:none}.tx-icon-field__slot--start{left:var(--tx-form-field-padding-x)}.tx-icon-field__slot--end{right:calc(var(--tx-form-field-padding-x) - 4px)}\n"],
175
+ styles: [":host{--_icon-room: calc(var(--tx-form-field-font-size) + var(--tx-form-field-icon-gap));--_action-room: calc(var(--tx-form-field-action-size) + var(--tx-form-field-icon-gap));position:relative;display:inline-flex;align-items:stretch;max-width:100%}:host(.tx-icon-field--start-icon){--tx-field-inset-start: var(--_icon-room)}:host(.tx-icon-field--end-icon){--tx-field-inset-end: var(--_icon-room)}:host(.tx-icon-field--end-action){--tx-field-inset-end: var(--_action-room)}:host(.tx-icon-field--fluid){display:flex;width:100%}.tx-icon-field__slot{position:absolute;top:50%;z-index:1;display:flex;align-items:center;gap:var(--tx-space-1);transform:translateY(-50%);pointer-events:none}.tx-icon-field__slot:empty{display:none}.tx-icon-field__slot--start{left:var(--tx-form-field-padding-x)}.tx-icon-field__slot--end{right:calc(var(--tx-form-field-padding-x) - var(--tx-space-1))}\n"],
176
176
  viewProviders: [provideTxIconDefaults(ICON_FIELD_ICON_DEFAULTS)],
177
177
  changeDetection: i0.ChangeDetectionStrategy.OnPush
178
178
  });
@@ -198,7 +198,7 @@ i0.ɵɵngDeclareClassMetadata({
198
198
  },
199
199
  viewProviders: [provideTxIconDefaults(ICON_FIELD_ICON_DEFAULTS)],
200
200
  template: "<span #start class=\"tx-icon-field__slot tx-icon-field__slot--start\"><ng-content select=\"tx-input-icon:not([position=end])\" /></span>\n<ng-content />\n<span #end class=\"tx-icon-field__slot tx-icon-field__slot--end\"><ng-content select=\"tx-input-icon[position=end], tx-input-clear, tx-input-copy\" /></span>\n",
201
- styles: [":host{--_icon-room: calc(var(--tx-form-field-font-size) + 6px);--_action-room: 30px ;position:relative;display:inline-flex;align-items:stretch;max-width:100%}:host(.tx-icon-field--start-icon){--tx-field-inset-start: var(--_icon-room)}:host(.tx-icon-field--end-icon){--tx-field-inset-end: var(--_icon-room)}:host(.tx-icon-field--end-action){--tx-field-inset-end: var(--_action-room)}:host(.tx-icon-field--fluid){display:flex;width:100%}.tx-icon-field__slot{position:absolute;top:50%;z-index:1;display:flex;align-items:center;gap:4px;transform:translateY(-50%);pointer-events:none}.tx-icon-field__slot:empty{display:none}.tx-icon-field__slot--start{left:var(--tx-form-field-padding-x)}.tx-icon-field__slot--end{right:calc(var(--tx-form-field-padding-x) - 4px)}\n"]
201
+ styles: [":host{--_icon-room: calc(var(--tx-form-field-font-size) + var(--tx-form-field-icon-gap));--_action-room: calc(var(--tx-form-field-action-size) + var(--tx-form-field-icon-gap));position:relative;display:inline-flex;align-items:stretch;max-width:100%}:host(.tx-icon-field--start-icon){--tx-field-inset-start: var(--_icon-room)}:host(.tx-icon-field--end-icon){--tx-field-inset-end: var(--_icon-room)}:host(.tx-icon-field--end-action){--tx-field-inset-end: var(--_action-room)}:host(.tx-icon-field--fluid){display:flex;width:100%}.tx-icon-field__slot{position:absolute;top:50%;z-index:1;display:flex;align-items:center;gap:var(--tx-space-1);transform:translateY(-50%);pointer-events:none}.tx-icon-field__slot:empty{display:none}.tx-icon-field__slot--start{left:var(--tx-form-field-padding-x)}.tx-icon-field__slot--end{right:calc(var(--tx-form-field-padding-x) - var(--tx-space-1))}\n"]
202
202
  }]
203
203
  }],
204
204
  ctorParameters: () => [],
@@ -380,7 +380,7 @@ var TxInputClear = class TxInputClear {
380
380
  }
381
381
  `,
382
382
  isInline: true,
383
- styles: [":host{display:inline-flex}button{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}button:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}button:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-input-action--done{color:var(--tx-success-base)}.tx-copy-swap{display:inline-grid;place-items:center}.tx-copy-swap__icon{grid-area:1/1;transition:opacity var(--tx-motion-duration) ease,transform var(--tx-motion-duration) cubic-bezier(.34,1.56,.64,1)}.tx-copy-swap__icon--done{opacity:0;transform:scale(.4) rotate(-45deg)}.tx-copy-swap--done .tx-copy-swap__icon--idle{opacity:0;transform:scale(.4) rotate(45deg)}.tx-copy-swap--done .tx-copy-swap__icon--done{opacity:1;transform:none}@media(prefers-reduced-motion:reduce){.tx-copy-swap__icon{transition:none}}\n"],
383
+ styles: [":host{display:inline-flex}button{display:grid;place-items:center;width:var(--tx-form-field-action-size);height:var(--tx-form-field-action-size);padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}button:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}button:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-input-action--done{color:var(--tx-success-base)}.tx-copy-swap{display:inline-grid;place-items:center}.tx-copy-swap__icon{grid-area:1/1;transition:opacity var(--tx-motion-duration) ease,transform var(--tx-motion-duration) cubic-bezier(.34,1.56,.64,1)}.tx-copy-swap__icon--done{opacity:0;transform:scale(.4) rotate(-45deg)}.tx-copy-swap--done .tx-copy-swap__icon--idle{opacity:0;transform:scale(.4) rotate(45deg)}.tx-copy-swap--done .tx-copy-swap__icon--done{opacity:1;transform:none}@media(prefers-reduced-motion:reduce){.tx-copy-swap__icon{transition:none}}\n"],
384
384
  dependencies: [{
385
385
  kind: "component",
386
386
  type: TxIcon,
@@ -411,7 +411,7 @@ i0.ɵɵngDeclareClassMetadata({
411
411
  changeDetection: ChangeDetectionStrategy.OnPush,
412
412
  host: { class: "tx-input-clear" },
413
413
  viewProviders: [provideTxIconDefaults(ICON_FIELD_ICON_DEFAULTS)],
414
- styles: [":host{display:inline-flex}button{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}button:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}button:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-input-action--done{color:var(--tx-success-base)}.tx-copy-swap{display:inline-grid;place-items:center}.tx-copy-swap__icon{grid-area:1/1;transition:opacity var(--tx-motion-duration) ease,transform var(--tx-motion-duration) cubic-bezier(.34,1.56,.64,1)}.tx-copy-swap__icon--done{opacity:0;transform:scale(.4) rotate(-45deg)}.tx-copy-swap--done .tx-copy-swap__icon--idle{opacity:0;transform:scale(.4) rotate(45deg)}.tx-copy-swap--done .tx-copy-swap__icon--done{opacity:1;transform:none}@media(prefers-reduced-motion:reduce){.tx-copy-swap__icon{transition:none}}\n"]
414
+ styles: [":host{display:inline-flex}button{display:grid;place-items:center;width:var(--tx-form-field-action-size);height:var(--tx-form-field-action-size);padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}button:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}button:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-input-action--done{color:var(--tx-success-base)}.tx-copy-swap{display:inline-grid;place-items:center}.tx-copy-swap__icon{grid-area:1/1;transition:opacity var(--tx-motion-duration) ease,transform var(--tx-motion-duration) cubic-bezier(.34,1.56,.64,1)}.tx-copy-swap__icon--done{opacity:0;transform:scale(.4) rotate(-45deg)}.tx-copy-swap--done .tx-copy-swap__icon--idle{opacity:0;transform:scale(.4) rotate(45deg)}.tx-copy-swap--done .tx-copy-swap__icon--done{opacity:1;transform:none}@media(prefers-reduced-motion:reduce){.tx-copy-swap__icon{transition:none}}\n"]
415
415
  }]
416
416
  }],
417
417
  propDecorators: { cleared: [{
@@ -422,20 +422,39 @@ i0.ɵɵngDeclareClassMetadata({
422
422
  var TxInputCopy = class TxInputCopy {
423
423
  iconFieldTheme = injectTokens(ICON_FIELD_THEME);
424
424
  field = inject(TxIconField);
425
+ document = inject(DOCUMENT);
425
426
  timer = null;
427
+ destroyed = false;
426
428
  translations = injectTranslations();
427
429
  isCopied = signal(false, ...ngDevMode ? [{ debugName: "isCopied" }] : /* istanbul ignore next */ []);
430
+ isCopyFailed = signal(false, ...ngDevMode ? [{ debugName: "isCopyFailed" }] : /* istanbul ignore next */ []);
431
+ label = computed(() => {
432
+ const translations = this.translations();
433
+ if (this.isCopied()) return translations.copied;
434
+ return this.isCopyFailed() ? translations.copyToClipboardFailed : translations.copy;
435
+ }, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
428
436
  copied = output();
437
+ copyFailed = output();
429
438
  constructor() {
430
- inject(DestroyRef).onDestroy(() => this.timer && clearTimeout(this.timer));
439
+ inject(DestroyRef).onDestroy(() => {
440
+ this.destroyed = true;
441
+ if (this.timer) clearTimeout(this.timer);
442
+ });
431
443
  }
432
- copy() {
444
+ async copy() {
433
445
  const value = this.field.value();
434
- navigator.clipboard?.writeText(value);
435
- this.isCopied.set(true);
436
- this.copied.emit(value);
446
+ const done = await writeToClipboard(value, this.document);
447
+ if (this.destroyed) return done;
448
+ this.isCopied.set(done);
449
+ this.isCopyFailed.set(!done);
450
+ if (done) this.copied.emit(value);
451
+ else this.copyFailed.emit(value);
437
452
  if (this.timer) clearTimeout(this.timer);
438
- this.timer = setTimeout(() => this.isCopied.set(false), 1500);
453
+ this.timer = setTimeout(() => {
454
+ this.isCopied.set(false);
455
+ this.isCopyFailed.set(false);
456
+ }, 1500);
457
+ return done;
439
458
  }
440
459
  static ɵfac = i0.ɵɵngDeclareFactory({
441
460
  minVersion: "12.0.0",
@@ -451,7 +470,10 @@ var TxInputCopy = class TxInputCopy {
451
470
  type: TxInputCopy,
452
471
  isStandalone: true,
453
472
  selector: "tx-input-copy",
454
- outputs: { copied: "copied" },
473
+ outputs: {
474
+ copied: "copied",
475
+ copyFailed: "copyFailed"
476
+ },
455
477
  host: { classAttribute: "tx-input-copy" },
456
478
  ngImport: i0,
457
479
  template: `
@@ -459,15 +481,15 @@ var TxInputCopy = class TxInputCopy {
459
481
  type="button"
460
482
  class="tx-input-action"
461
483
  [class.tx-input-action--done]="isCopied()"
462
- [attr.aria-label]="isCopied() ? translations().copied : translations().copy"
463
- [title]="isCopied() ? translations().copied : translations().copy"
484
+ [attr.aria-label]="label()"
485
+ [title]="label()"
464
486
  (click)="copy()"
465
487
  >
466
488
  <span class="tx-copy-swap" [class.tx-copy-swap--done]="isCopied()"><tx-icon class="tx-copy-swap__icon tx-copy-swap__icon--idle" name="copy" /><tx-icon class="tx-copy-swap__icon tx-copy-swap__icon--done" name="check" /></span>
467
489
  </button>
468
490
  `,
469
491
  isInline: true,
470
- styles: [":host{display:inline-flex}button{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}button:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}button:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-input-action--done{color:var(--tx-success-base)}.tx-copy-swap{display:inline-grid;place-items:center}.tx-copy-swap__icon{grid-area:1/1;transition:opacity var(--tx-motion-duration) ease,transform var(--tx-motion-duration) cubic-bezier(.34,1.56,.64,1)}.tx-copy-swap__icon--done{opacity:0;transform:scale(.4) rotate(-45deg)}.tx-copy-swap--done .tx-copy-swap__icon--idle{opacity:0;transform:scale(.4) rotate(45deg)}.tx-copy-swap--done .tx-copy-swap__icon--done{opacity:1;transform:none}@media(prefers-reduced-motion:reduce){.tx-copy-swap__icon{transition:none}}\n"],
492
+ styles: [":host{display:inline-flex}button{display:grid;place-items:center;width:var(--tx-form-field-action-size);height:var(--tx-form-field-action-size);padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}button:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}button:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-input-action--done{color:var(--tx-success-base)}.tx-copy-swap{display:inline-grid;place-items:center}.tx-copy-swap__icon{grid-area:1/1;transition:opacity var(--tx-motion-duration) ease,transform var(--tx-motion-duration) cubic-bezier(.34,1.56,.64,1)}.tx-copy-swap__icon--done{opacity:0;transform:scale(.4) rotate(-45deg)}.tx-copy-swap--done .tx-copy-swap__icon--idle{opacity:0;transform:scale(.4) rotate(45deg)}.tx-copy-swap--done .tx-copy-swap__icon--done{opacity:1;transform:none}@media(prefers-reduced-motion:reduce){.tx-copy-swap__icon{transition:none}}\n"],
471
493
  dependencies: [{
472
494
  kind: "component",
473
495
  type: TxIcon,
@@ -493,8 +515,8 @@ i0.ɵɵngDeclareClassMetadata({
493
515
  type="button"
494
516
  class="tx-input-action"
495
517
  [class.tx-input-action--done]="isCopied()"
496
- [attr.aria-label]="isCopied() ? translations().copied : translations().copy"
497
- [title]="isCopied() ? translations().copied : translations().copy"
518
+ [attr.aria-label]="label()"
519
+ [title]="label()"
498
520
  (click)="copy()"
499
521
  >
500
522
  <span class="tx-copy-swap" [class.tx-copy-swap--done]="isCopied()"><tx-icon class="tx-copy-swap__icon tx-copy-swap__icon--idle" name="copy" /><tx-icon class="tx-copy-swap__icon tx-copy-swap__icon--done" name="check" /></span>
@@ -503,14 +525,20 @@ i0.ɵɵngDeclareClassMetadata({
503
525
  changeDetection: ChangeDetectionStrategy.OnPush,
504
526
  host: { class: "tx-input-copy" },
505
527
  viewProviders: [provideTxIconDefaults(ICON_FIELD_ICON_DEFAULTS)],
506
- styles: [":host{display:inline-flex}button{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}button:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}button:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-input-action--done{color:var(--tx-success-base)}.tx-copy-swap{display:inline-grid;place-items:center}.tx-copy-swap__icon{grid-area:1/1;transition:opacity var(--tx-motion-duration) ease,transform var(--tx-motion-duration) cubic-bezier(.34,1.56,.64,1)}.tx-copy-swap__icon--done{opacity:0;transform:scale(.4) rotate(-45deg)}.tx-copy-swap--done .tx-copy-swap__icon--idle{opacity:0;transform:scale(.4) rotate(45deg)}.tx-copy-swap--done .tx-copy-swap__icon--done{opacity:1;transform:none}@media(prefers-reduced-motion:reduce){.tx-copy-swap__icon{transition:none}}\n"]
528
+ styles: [":host{display:inline-flex}button{display:grid;place-items:center;width:var(--tx-form-field-action-size);height:var(--tx-form-field-action-size);padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}button:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}button:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-input-action--done{color:var(--tx-success-base)}.tx-copy-swap{display:inline-grid;place-items:center}.tx-copy-swap__icon{grid-area:1/1;transition:opacity var(--tx-motion-duration) ease,transform var(--tx-motion-duration) cubic-bezier(.34,1.56,.64,1)}.tx-copy-swap__icon--done{opacity:0;transform:scale(.4) rotate(-45deg)}.tx-copy-swap--done .tx-copy-swap__icon--idle{opacity:0;transform:scale(.4) rotate(45deg)}.tx-copy-swap--done .tx-copy-swap__icon--done{opacity:1;transform:none}@media(prefers-reduced-motion:reduce){.tx-copy-swap__icon{transition:none}}\n"]
507
529
  }]
508
530
  }],
509
531
  ctorParameters: () => [],
510
- propDecorators: { copied: [{
511
- type: i0.Output,
512
- args: ["copied"]
513
- }] }
532
+ propDecorators: {
533
+ copied: [{
534
+ type: i0.Output,
535
+ args: ["copied"]
536
+ }],
537
+ copyFailed: [{
538
+ type: i0.Output,
539
+ args: ["copyFailed"]
540
+ }]
541
+ }
514
542
  });
515
543
  export { TxIconField, TxInputClear, TxInputCopy, TxInputIcon };
516
544
 
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-icon-field.mjs","names":[],"sources":["../../../../packages/ui/icon-field/src/icon-field.icons.ts","../../../../packages/ui/icon-field/src/icon-field.theme.ts","../../../../packages/ui/icon-field/src/icon-field.component.ts","../../../../packages/ui/icon-field/src/icon-field.component.html","../../../../packages/ui/icon-field/src/input-icon.component.ts","../../../../packages/ui/icon-field/src/input-clear.component.ts","../../../../packages/ui/icon-field/src/input-copy.component.ts"],"sourcesContent":["import { TxIconSet, txIconCheck, txIconCopy, txIconTimes } from '@tectra-ng/icons';\n\nexport const ICON_FIELD_ICON_DEFAULTS: TxIconSet = {\n check: txIconCheck,\n copy: txIconCopy,\n times: txIconTimes,\n};\n","import { fieldTokens, formFieldTokens } from '@tectra-ng/themes';\n\nexport const ICON_FIELD_THEME = {\n field: fieldTokens,\n formField: formFieldTokens,\n};\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n afterNextRender,\n contentChild,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { injectFluid } from '@tectra-ng/core/fluid';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxInput } from '@tectra-ng/ui/input';\nimport { TxIconFieldSlotContent } from './icon-field.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { ICON_FIELD_ICON_DEFAULTS } from './icon-field.icons';\nimport { injectTokens } from '@tectra-ng/core/config';\nimport { ICON_FIELD_THEME } from './icon-field.theme';\n\n@Component({\n selector: 'tx-icon-field',\n templateUrl: './icon-field.component.html',\n styleUrl: './icon-field.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-icon-field',\n '[class.tx-icon-field--fluid]': 'isFluid()',\n '[class.tx-icon-field--start-icon]': 'startContent() === \"icon\"',\n '[class.tx-icon-field--end-icon]': 'endContent() === \"icon\"',\n '[class.tx-icon-field--end-action]': 'endContent() === \"action\"',\n '[style.--tx-field-inset-start]': 'startInset() === null ? null : startInset() + \"px\"',\n '[style.--tx-field-inset-end]': 'endInset() === null ? null : endInset() + \"px\"',\n },\n viewProviders: [provideTxIconDefaults(ICON_FIELD_ICON_DEFAULTS)],\n})\nexport class TxIconField implements AfterViewInit {\n private readonly iconFieldTheme = injectTokens(ICON_FIELD_THEME);\n\n private destroyRef = inject(DestroyRef);\n\n readonly fluid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly input = contentChild(TxInput, { read: ElementRef });\n readonly inputDirective = contentChild(TxInput);\n readonly control = contentChild(NgControl);\n readonly start = viewChild.required<ElementRef<HTMLElement>>('start');\n readonly end = viewChild.required<ElementRef<HTMLElement>>('end');\n\n readonly isFluid = injectFluid(this.fluid);\n readonly startInset = signal<number | null>(null);\n readonly endInset = signal<number | null>(null);\n readonly startContent = signal<TxIconFieldSlotContent>('none');\n readonly endContent = signal<TxIconFieldSlotContent>('none');\n readonly hasValue = signal(false);\n readonly isEditable = signal(true);\n\n constructor() {\n afterNextRender(() => {\n this.watchInsets();\n this.watchValue();\n });\n }\n\n ngAfterViewInit(): void {\n this.startContent.set(this.slotContent(this.start().nativeElement));\n this.endContent.set(this.slotContent(this.end().nativeElement));\n }\n\n value(): string {\n return (this.input()?.nativeElement as HTMLInputElement | undefined)?.value ?? '';\n }\n\n clear(): void {\n const element = this.input()?.nativeElement as HTMLInputElement | undefined;\n if (!element) {\n return;\n }\n const control = this.control()?.control;\n if (control) {\n control.setValue('');\n control.markAsDirty();\n } else {\n element.value = '';\n element.dispatchEvent(new Event('input', { bubbles: true }));\n }\n this.hasValue.set(false);\n element.focus();\n }\n\n private watchInsets(): void {\n if (typeof ResizeObserver === 'undefined') {\n return;\n }\n const measure = () => {\n this.startInset.set(this.inset(this.start().nativeElement));\n this.endInset.set(this.inset(this.end().nativeElement));\n };\n const observer = new ResizeObserver(measure);\n observer.observe(this.start().nativeElement);\n observer.observe(this.end().nativeElement);\n measure();\n this.destroyRef.onDestroy(() => observer.disconnect());\n }\n\n private watchValue(): void {\n const element = this.input()?.nativeElement as HTMLInputElement | undefined;\n if (!element) {\n return;\n }\n const update = () => {\n this.hasValue.set(!!element.value);\n this.isEditable.set(!element.disabled && !element.readOnly);\n };\n element.addEventListener('input', update);\n const subscription = this.control()?.control?.events.subscribe(() => queueMicrotask(update));\n this.destroyRef.onDestroy(() => {\n element.removeEventListener('input', update);\n subscription?.unsubscribe();\n });\n update();\n }\n\n private slotContent(slot: HTMLElement): TxIconFieldSlotContent {\n if (slot.querySelector('.tx-input-action')) {\n return 'action';\n }\n return slot.querySelector('.tx-input-icon') ? 'icon' : 'none';\n }\n\n private inset(container: HTMLElement): number {\n const width = container.getBoundingClientRect().width;\n return width ? Math.round(width + 6) : 0;\n }\n}\n","<span #start class=\"tx-icon-field__slot tx-icon-field__slot--start\"><ng-content select=\"tx-input-icon:not([position=end])\" /></span>\n<ng-content />\n<span #end class=\"tx-icon-field__slot tx-icon-field__slot--end\"><ng-content select=\"tx-input-icon[position=end], tx-input-clear, tx-input-copy\" /></span>\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { injectTxIcons, provideTxIconDefaults, TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TxInputIconPosition } from './icon-field.types';\nimport { ICON_FIELD_ICON_DEFAULTS } from './icon-field.icons';\nimport { injectTokens } from '@tectra-ng/core/config';\nimport { ICON_FIELD_THEME } from './icon-field.theme';\n\n@Component({\n selector: 'tx-input-icon',\n imports: [TxIcon],\n template: `\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else if (icon()) {\n <span [class]=\"icon()\"></span>\n }\n <ng-content />\n `,\n styleUrl: './input-icon.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'tx-input-icon', 'aria-hidden': 'true' },\n viewProviders: [provideTxIconDefaults(ICON_FIELD_ICON_DEFAULTS)],\n})\nexport class TxInputIcon {\n private readonly iconFieldTheme = injectTokens(ICON_FIELD_THEME);\n\n private txIconRegistry = injectTxIcons();\n\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly position = input<TxInputIconPosition>('start');\n\n readonly iconName = computed(() => {\n const icon = this.icon();\n return this.txIconRegistry.has(icon) ? icon : null;\n });\n}\n","import { ChangeDetectionStrategy, Component, inject, output } from '@angular/core';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TxIconField } from './icon-field.component';\nimport { ICON_FIELD_ICON_DEFAULTS } from './icon-field.icons';\nimport { injectTokens } from '@tectra-ng/core/config';\nimport { ICON_FIELD_THEME } from './icon-field.theme';\n\n@Component({\n selector: 'tx-input-clear',\n imports: [TxIcon],\n template: `\n @if (field.hasValue() && field.isEditable()) {\n <button type=\"button\" class=\"tx-input-action\" [attr.aria-label]=\"translations().clear\" [title]=\"translations().clear\" (click)=\"clear()\">\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n `,\n styleUrl: './input-action.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'tx-input-clear' },\n viewProviders: [provideTxIconDefaults(ICON_FIELD_ICON_DEFAULTS)],\n})\nexport class TxInputClear {\n private readonly iconFieldTheme = injectTokens(ICON_FIELD_THEME);\n\n readonly field = inject(TxIconField);\n readonly translations = injectTranslations();\n\n readonly cleared = output<void>();\n\n clear(): void {\n this.field.clear();\n this.cleared.emit();\n }\n}\n","import { ChangeDetectionStrategy, Component, DestroyRef, inject, output, signal } from '@angular/core';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TxIconField } from './icon-field.component';\nimport { ICON_FIELD_ICON_DEFAULTS } from './icon-field.icons';\nimport { injectTokens } from '@tectra-ng/core/config';\nimport { ICON_FIELD_THEME } from './icon-field.theme';\n\n/** Button inside `tx-icon-field` that copies the field value to the clipboard. */\n@Component({\n selector: 'tx-input-copy',\n imports: [TxIcon],\n template: `\n <button\n type=\"button\"\n class=\"tx-input-action\"\n [class.tx-input-action--done]=\"isCopied()\"\n [attr.aria-label]=\"isCopied() ? translations().copied : translations().copy\"\n [title]=\"isCopied() ? translations().copied : translations().copy\"\n (click)=\"copy()\"\n >\n <span class=\"tx-copy-swap\" [class.tx-copy-swap--done]=\"isCopied()\"><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--idle\" name=\"copy\" /><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--done\" name=\"check\" /></span>\n </button>\n `,\n styleUrl: './input-action.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'tx-input-copy' },\n viewProviders: [provideTxIconDefaults(ICON_FIELD_ICON_DEFAULTS)],\n})\nexport class TxInputCopy {\n private readonly iconFieldTheme = injectTokens(ICON_FIELD_THEME);\n\n private field = inject(TxIconField);\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n readonly translations = injectTranslations();\n readonly isCopied = signal(false);\n\n readonly copied = output<string>();\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.timer && clearTimeout(this.timer));\n }\n\n copy(): void {\n const value = this.field.value();\n navigator.clipboard?.writeText(value);\n this.isCopied.set(true);\n this.copied.emit(value);\n if (this.timer) {\n clearTimeout(this.timer);\n }\n this.timer = setTimeout(() => this.isCopied.set(false), 1500);\n }\n}\n"],"mappings":";;;;;;;;;;AAEA,MAAa,2BAAsC;CACjD,OAAO;CACP,MAAM;CACN,OAAO;AACR;ACJD,MAAa,mBAAmB;CAC9B,OAAO;CACP,WAAW;AACZ;ACkCD,IAAa,cAAb,MAAa,YAAW;CACL,iBAAiB,aAAa,gBAAgB;CAEvD,aAAa,OAAO,UAAU;CAE7B,QAAQ,MAAoC,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,WAAW;CAAe,CAAA;CAEnF,QAAQ,aAAa,SAAO;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,MAAM;CAAU,CAAA;CAChD,iBAAiB,aAAa,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,iBAAA,CAAA,+BAAA,CAAA,CAAA;CACtC,UAAU,aAAa,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACjC,QAAQ,UAAU,SAAkC,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC5D,MAAM,UAAU,SAAkC,OAAM,G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;EACtB,KAAK,OAAO,KAAK,KAAK;EACtB,IAAI,KAAK,OACP,aAAa,KAAK,KAAK;EAEzB,KAAK,QAAQ,iBAAiB,KAAK,SAAS,IAAI,KAAK,GAAG,IAAI;CAC9D;CAxBW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAW,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAX,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAW,cAAA;EAAA,UAAA;EAAA,SAAA,EAAA,QAAA,SAAA;EAAA,MAAA,EAAA,gBAAA,gBAAA;EAAA,UAAA;EAAA,UAjBZ;;;;;;;;;;;;EAWT,UAAA;EAAA,QAAA,CAAA,wmCAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MAZS;GAAM,UAAA;GAAA,QAAA,CAAA,MAAA;EAAA,CAAA;EAAA,eAgBD,CAAC,sBAAsB,wBAAwB,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAErD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAW,YAAA,CAAA;EApBvB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAe,SAChB,CAAC,MAAM;GAAC,UACP;;;;;;;;;;;;GAWT,iBAEgB,wBAAwB;GAAM,MACzC,EAAE,OAAO,gBAAe;GAAE,eACjB,CAAC,sBAAsB,wBAAwB,CAAC;GAAC,QAAA,CAAA,wmCAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-icon-field.mjs","names":[],"sources":["../../../../packages/ui/icon-field/src/icon-field.icons.ts","../../../../packages/ui/icon-field/src/icon-field.theme.ts","../../../../packages/ui/icon-field/src/icon-field.component.ts","../../../../packages/ui/icon-field/src/icon-field.component.html","../../../../packages/ui/icon-field/src/input-icon.component.ts","../../../../packages/ui/icon-field/src/input-clear.component.ts","../../../../packages/ui/icon-field/src/input-copy.component.ts"],"sourcesContent":["import { TxIconSet, txIconCheck, txIconCopy, txIconTimes } from '@tectra-ng/icons';\n\nexport const ICON_FIELD_ICON_DEFAULTS: TxIconSet = {\n check: txIconCheck,\n copy: txIconCopy,\n times: txIconTimes,\n};\n","import { fieldTokens, formFieldTokens } from '@tectra-ng/themes';\n\nexport const ICON_FIELD_THEME = {\n field: fieldTokens,\n formField: formFieldTokens,\n};\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n afterNextRender,\n contentChild,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { injectFluid } from '@tectra-ng/core/fluid';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxInput } from '@tectra-ng/ui/input';\nimport { TxIconFieldSlotContent } from './icon-field.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { ICON_FIELD_ICON_DEFAULTS } from './icon-field.icons';\nimport { injectTokens } from '@tectra-ng/core/config';\nimport { ICON_FIELD_THEME } from './icon-field.theme';\n\n@Component({\n selector: 'tx-icon-field',\n templateUrl: './icon-field.component.html',\n styleUrl: './icon-field.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-icon-field',\n '[class.tx-icon-field--fluid]': 'isFluid()',\n '[class.tx-icon-field--start-icon]': 'startContent() === \"icon\"',\n '[class.tx-icon-field--end-icon]': 'endContent() === \"icon\"',\n '[class.tx-icon-field--end-action]': 'endContent() === \"action\"',\n '[style.--tx-field-inset-start]': 'startInset() === null ? null : startInset() + \"px\"',\n '[style.--tx-field-inset-end]': 'endInset() === null ? null : endInset() + \"px\"',\n },\n viewProviders: [provideTxIconDefaults(ICON_FIELD_ICON_DEFAULTS)],\n})\nexport class TxIconField implements AfterViewInit {\n private readonly iconFieldTheme = injectTokens(ICON_FIELD_THEME);\n\n private destroyRef = inject(DestroyRef);\n\n readonly fluid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly input = contentChild(TxInput, { read: ElementRef });\n readonly inputDirective = contentChild(TxInput);\n readonly control = contentChild(NgControl);\n readonly start = viewChild.required<ElementRef<HTMLElement>>('start');\n readonly end = viewChild.required<ElementRef<HTMLElement>>('end');\n\n readonly isFluid = injectFluid(this.fluid);\n readonly startInset = signal<number | null>(null);\n readonly endInset = signal<number | null>(null);\n readonly startContent = signal<TxIconFieldSlotContent>('none');\n readonly endContent = signal<TxIconFieldSlotContent>('none');\n readonly hasValue = signal(false);\n readonly isEditable = signal(true);\n\n constructor() {\n afterNextRender(() => {\n this.watchInsets();\n this.watchValue();\n });\n }\n\n ngAfterViewInit(): void {\n this.startContent.set(this.slotContent(this.start().nativeElement));\n this.endContent.set(this.slotContent(this.end().nativeElement));\n }\n\n value(): string {\n return (this.input()?.nativeElement as HTMLInputElement | undefined)?.value ?? '';\n }\n\n clear(): void {\n const element = this.input()?.nativeElement as HTMLInputElement | undefined;\n if (!element) {\n return;\n }\n const control = this.control()?.control;\n if (control) {\n control.setValue('');\n control.markAsDirty();\n } else {\n element.value = '';\n element.dispatchEvent(new Event('input', { bubbles: true }));\n }\n this.hasValue.set(false);\n element.focus();\n }\n\n private watchInsets(): void {\n if (typeof ResizeObserver === 'undefined') {\n return;\n }\n const measure = () => {\n this.startInset.set(this.inset(this.start().nativeElement));\n this.endInset.set(this.inset(this.end().nativeElement));\n };\n const observer = new ResizeObserver(measure);\n observer.observe(this.start().nativeElement);\n observer.observe(this.end().nativeElement);\n measure();\n this.destroyRef.onDestroy(() => observer.disconnect());\n }\n\n private watchValue(): void {\n const element = this.input()?.nativeElement as HTMLInputElement | undefined;\n if (!element) {\n return;\n }\n const update = () => {\n this.hasValue.set(!!element.value);\n this.isEditable.set(!element.disabled && !element.readOnly);\n };\n element.addEventListener('input', update);\n const subscription = this.control()?.control?.events.subscribe(() => queueMicrotask(update));\n this.destroyRef.onDestroy(() => {\n element.removeEventListener('input', update);\n subscription?.unsubscribe();\n });\n update();\n }\n\n private slotContent(slot: HTMLElement): TxIconFieldSlotContent {\n if (slot.querySelector('.tx-input-action')) {\n return 'action';\n }\n return slot.querySelector('.tx-input-icon') ? 'icon' : 'none';\n }\n\n private inset(container: HTMLElement): number {\n const width = container.getBoundingClientRect().width;\n return width ? Math.round(width + 6) : 0;\n }\n}\n","<span #start class=\"tx-icon-field__slot tx-icon-field__slot--start\"><ng-content select=\"tx-input-icon:not([position=end])\" /></span>\n<ng-content />\n<span #end class=\"tx-icon-field__slot tx-icon-field__slot--end\"><ng-content select=\"tx-input-icon[position=end], tx-input-clear, tx-input-copy\" /></span>\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { injectTxIcons, provideTxIconDefaults, TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TxInputIconPosition } from './icon-field.types';\nimport { ICON_FIELD_ICON_DEFAULTS } from './icon-field.icons';\nimport { injectTokens } from '@tectra-ng/core/config';\nimport { ICON_FIELD_THEME } from './icon-field.theme';\n\n@Component({\n selector: 'tx-input-icon',\n imports: [TxIcon],\n template: `\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else if (icon()) {\n <span [class]=\"icon()\"></span>\n }\n <ng-content />\n `,\n styleUrl: './input-icon.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'tx-input-icon', 'aria-hidden': 'true' },\n viewProviders: [provideTxIconDefaults(ICON_FIELD_ICON_DEFAULTS)],\n})\nexport class TxInputIcon {\n private readonly iconFieldTheme = injectTokens(ICON_FIELD_THEME);\n\n private txIconRegistry = injectTxIcons();\n\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly position = input<TxInputIconPosition>('start');\n\n readonly iconName = computed(() => {\n const icon = this.icon();\n return this.txIconRegistry.has(icon) ? icon : null;\n });\n}\n","import { ChangeDetectionStrategy, Component, inject, output } from '@angular/core';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TxIconField } from './icon-field.component';\nimport { ICON_FIELD_ICON_DEFAULTS } from './icon-field.icons';\nimport { injectTokens } from '@tectra-ng/core/config';\nimport { ICON_FIELD_THEME } from './icon-field.theme';\n\n@Component({\n selector: 'tx-input-clear',\n imports: [TxIcon],\n template: `\n @if (field.hasValue() && field.isEditable()) {\n <button type=\"button\" class=\"tx-input-action\" [attr.aria-label]=\"translations().clear\" [title]=\"translations().clear\" (click)=\"clear()\">\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n `,\n styleUrl: './input-action.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'tx-input-clear' },\n viewProviders: [provideTxIconDefaults(ICON_FIELD_ICON_DEFAULTS)],\n})\nexport class TxInputClear {\n private readonly iconFieldTheme = injectTokens(ICON_FIELD_THEME);\n\n readonly field = inject(TxIconField);\n readonly translations = injectTranslations();\n\n readonly cleared = output<void>();\n\n clear(): void {\n this.field.clear();\n this.cleared.emit();\n }\n}\n","import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, computed, inject, output, signal } from '@angular/core';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { writeToClipboard } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TxIconField } from './icon-field.component';\nimport { ICON_FIELD_ICON_DEFAULTS } from './icon-field.icons';\nimport { injectTokens } from '@tectra-ng/core/config';\nimport { ICON_FIELD_THEME } from './icon-field.theme';\n\n/** Button inside `tx-icon-field` that copies the field value to the clipboard. */\n@Component({\n selector: 'tx-input-copy',\n imports: [TxIcon],\n template: `\n <button\n type=\"button\"\n class=\"tx-input-action\"\n [class.tx-input-action--done]=\"isCopied()\"\n [attr.aria-label]=\"label()\"\n [title]=\"label()\"\n (click)=\"copy()\"\n >\n <span class=\"tx-copy-swap\" [class.tx-copy-swap--done]=\"isCopied()\"><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--idle\" name=\"copy\" /><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--done\" name=\"check\" /></span>\n </button>\n `,\n styleUrl: './input-action.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: { class: 'tx-input-copy' },\n viewProviders: [provideTxIconDefaults(ICON_FIELD_ICON_DEFAULTS)],\n})\nexport class TxInputCopy {\n private readonly iconFieldTheme = injectTokens(ICON_FIELD_THEME);\n\n private field = inject(TxIconField);\n private document = inject(DOCUMENT);\n private timer: ReturnType<typeof setTimeout> | null = null;\n private destroyed = false;\n\n readonly translations = injectTranslations();\n readonly isCopied = signal(false);\n readonly isCopyFailed = signal(false);\n readonly label = computed(() => {\n const translations = this.translations();\n if (this.isCopied()) return translations.copied;\n return this.isCopyFailed() ? translations.copyToClipboardFailed : translations.copy;\n });\n\n readonly copied = output<string>();\n readonly copyFailed = output<string>();\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n this.destroyed = true;\n if (this.timer) clearTimeout(this.timer);\n });\n }\n\n async copy(): Promise<boolean> {\n const value = this.field.value();\n const done = await writeToClipboard(value, this.document);\n if (this.destroyed) {\n return done;\n }\n this.isCopied.set(done);\n this.isCopyFailed.set(!done);\n if (done) {\n this.copied.emit(value);\n } else {\n this.copyFailed.emit(value);\n }\n if (this.timer) {\n clearTimeout(this.timer);\n }\n this.timer = setTimeout(() => {\n this.isCopied.set(false);\n this.isCopyFailed.set(false);\n }, 1500);\n return done;\n }\n}\n"],"mappings":";;;;;;;;;;AAEA,MAAa,2BAAsC;CACjD,OAAO;CACP,MAAM;CACN,OAAO;AACR;ACJD,MAAa,mBAAmB;CAC9B,OAAO;CACP,WAAW;AACZ;ACkCD,IAAa,cAAb,MAAa,YAAW;CACL,iBAAiB,aAAa,gBAAgB;CAEvD,aAAa,OAAO,UAAU;CAE7B,QAAQ,MAAoC,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,WAAW;CA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,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAX,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAW,cAAA;EAAA,UAAA;EAAA,SAAA;GAAA,QAAA;GAAA,YAAA;EAAA;EAAA,MAAA,EAAA,gBAAA,gBAAA;EAAA,UAAA;EAAA,UAjBZ;;;;;;;;;;;;EAWT,UAAA;EAAA,QAAA,CAAA,gqCAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MAZS;GAAM,UAAA;GAAA,QAAA,CAAA,MAAA;EAAA,CAAA;EAAA,eAgBD,CAAC,sBAAsB,wBAAwB,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAErD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAW,YAAA,CAAA;EApBvB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAe,SAChB,CAAC,MAAM;GAAC,UACP;;;;;;;;;;;;GAWT,iBAEgB,wBAAwB;GAAM,MACzC,EAAE,OAAO,gBAAe;GAAE,eACjB,CAAC,sBAAsB,wBAAwB,CAAC;GAAC,QAAA,CAAA,gqCAAA;EAAA,CAAA"}
@@ -682,7 +682,7 @@ var TxInputNumber = class TxInputNumber extends TxFormControlBase {
682
682
  usesInheritance: true,
683
683
  ngImport: i0,
684
684
  template: "@if (showButtons() && buttonLayout() !== 'stacked') {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"tx-input-number__button tx-input-number__decrement\"\n [class]=\"passThrough().decrement?.class\"\n [style]=\"passThrough().decrement?.style\"\n [attr.aria-label]=\"translations().decrement\"\n [disabled]=\"!canDecrement()\"\n (pointerdown)=\"startRepeat(-1, $event)\"\n (pointerup)=\"stopRepeat()\"\n (pointerleave)=\"stopRepeat()\"\n (pointercancel)=\"stopRepeat()\"\n >\n @if (decrementIconName().name; as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"decrementIconName().className\"></span>\n }\n </button>\n}\n<input\n #input\n txInput\n type=\"text\"\n role=\"spinbutton\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n class=\"tx-input-number__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\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.name]=\"name() ?? null\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-valuenow]=\"value() ?? null\"\n [attr.aria-valuemin]=\"min() ?? null\"\n [attr.aria-valuemax]=\"max() ?? null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur($event)\"\n/>\n@if (showClear() && value() !== null && isEditable()) {\n <button\n type=\"button\"\n class=\"tx-input-number__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($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n}\n@if (showButtons()) {\n @if (buttonLayout() === 'stacked') {\n <span class=\"tx-input-number__stack\">\n <ng-container [ngTemplateOutlet]=\"increment\" />\n <ng-container [ngTemplateOutlet]=\"decrement\" />\n </span>\n } @else {\n <ng-container [ngTemplateOutlet]=\"increment\" />\n }\n}\n\n<ng-template #increment>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"tx-input-number__button tx-input-number__increment\"\n [class]=\"passThrough().increment?.class\"\n [style]=\"passThrough().increment?.style\"\n [attr.aria-label]=\"translations().increment\"\n [disabled]=\"!canIncrement()\"\n (pointerdown)=\"startRepeat(1, $event)\"\n (pointerup)=\"stopRepeat()\"\n (pointerleave)=\"stopRepeat()\"\n (pointercancel)=\"stopRepeat()\"\n >\n @if (incrementIconName().name; as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"incrementIconName().className\"></span>\n }\n </button>\n</ng-template>\n<ng-template #decrement>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"tx-input-number__button tx-input-number__decrement\"\n [class]=\"passThrough().decrement?.class\"\n [style]=\"passThrough().decrement?.style\"\n [attr.aria-label]=\"translations().decrement\"\n [disabled]=\"!canDecrement()\"\n (pointerdown)=\"startRepeat(-1, $event)\"\n (pointerup)=\"stopRepeat()\"\n (pointerleave)=\"stopRepeat()\"\n (pointercancel)=\"stopRepeat()\"\n >\n @if (decrementIconName().name; as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"decrementIconName().className\"></span>\n }\n </button>\n</ng-template>\n",
685
- styles: [":host{position:relative;display:inline-flex;align-items:stretch;vertical-align:top}:host(.tx-input-number--fluid){display:flex;width:100%}.tx-input-number__input{flex:1 1 auto;min-width:0;font-variant-numeric:tabular-nums}:host([data-styled]){--_inset: 0px}:host([data-styled][data-layout=stacked]){--_inset: var(--tx-input-number-button-stacked-width)}:host([data-styled]) .tx-input-number__input{--tx-field-inset-end: calc(var(--_inset) + var(--_clear, 0px))}:host([data-styled]:has(.tx-input-number__clear)){--_clear: 28px}.tx-input-number__clear{position:absolute;top:50%;right:calc(var(--_inset, 0px) + 8px);transform:translateY(-50%)}:host([data-styled]) .tx-input-number__clear{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-input-number__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}:host([data-styled]) .tx-input-number__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled]) .tx-input-number__button{display:grid;place-items:center;box-sizing:border-box;width:var(--tx-input-number-button-width);padding:0;border:1px solid var(--tx-input-number-button-border-color);background:var(--tx-input-number-button-background);color:var(--tx-input-number-button-color);font-size:var(--tx-input-number-button-icon-size);cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-input-number__button:hover:enabled{background:var(--tx-input-number-button-hover-background);color:var(--tx-input-number-button-hover-color)}:host([data-styled]) .tx-input-number__button:active:enabled{background:var(--tx-input-number-button-active-background);color:var(--tx-input-number-button-active-color)}:host([data-styled]) .tx-input-number__button:disabled{cursor:not-allowed;opacity:.5}.tx-input-number__stack{position:absolute;top:1px;right:1px;bottom:1px;display:flex;flex-direction:column;overflow:hidden}:host([data-styled]) .tx-input-number__stack{width:var(--tx-input-number-button-stacked-width);border-radius:0 calc(var(--tx-form-field-border-radius) - 1px) calc(var(--tx-form-field-border-radius) - 1px) 0}:host([data-styled]) .tx-input-number__stack .tx-input-number__button{flex:1 1 0;width:100%;min-height:0;border-width:0 0 0 1px}:host([data-styled]) .tx-input-number__stack .tx-input-number__increment{border-bottom-width:1px}:host([data-styled][data-layout=horizontal]) .tx-input-number__input{border-radius:0}:host([data-styled][data-layout=horizontal]) .tx-input-number__decrement{border-right:none;border-radius:var(--tx-form-field-border-radius) 0 0 var(--tx-form-field-border-radius)}:host([data-styled][data-layout=horizontal]) .tx-input-number__increment{border-left:none;border-radius:0 var(--tx-form-field-border-radius) var(--tx-form-field-border-radius) 0}:host([data-layout=vertical]){flex-direction:column}:host([data-styled][data-layout=vertical]) .tx-input-number__input{border-radius:0;text-align:center}:host([data-styled][data-layout=vertical]) .tx-input-number__button{width:auto;height:var(--tx-input-number-button-width)}:host([data-styled][data-layout=vertical]) .tx-input-number__increment{order:-1;border-bottom:none;border-radius:var(--tx-form-field-border-radius) var(--tx-form-field-border-radius) 0 0}:host([data-styled][data-layout=vertical]) .tx-input-number__decrement{order:1;border-top:none;border-radius:0 0 var(--tx-form-field-border-radius) var(--tx-form-field-border-radius)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-input-number__button{transition:none}}\n"],
685
+ styles: [":host{position:relative;display:inline-flex;align-items:stretch;vertical-align:top}:host(.tx-input-number--fluid){display:flex;width:100%}.tx-input-number__input{flex:1 1 auto;min-width:0;font-variant-numeric:tabular-nums}:host([data-styled]){--_inset: 0px}:host([data-styled][data-layout=stacked]){--_inset: var(--tx-input-number-button-stacked-width)}:host([data-styled]) .tx-input-number__input{--tx-field-inset-end: calc(var(--_inset) + var(--_clear, 0px))}:host([data-styled]:has(.tx-input-number__clear)){--_clear: var(--tx-form-field-action-room)}.tx-input-number__clear{position:absolute;top:50%;right:calc(var(--_inset, 0px) + var(--tx-space-2));transform:translateY(-50%)}:host([data-styled]) .tx-input-number__clear{display:grid;place-items:center;width:var(--tx-form-field-action-size);height:var(--tx-form-field-action-size);padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-input-number__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}:host([data-styled]) .tx-input-number__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled]) .tx-input-number__button{display:grid;place-items:center;box-sizing:border-box;width:var(--tx-input-number-button-width);padding:0;border:1px solid var(--tx-input-number-button-border-color);background:var(--tx-input-number-button-background);color:var(--tx-input-number-button-color);font-size:var(--tx-input-number-button-icon-size);cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-input-number__button:hover:enabled{background:var(--tx-input-number-button-hover-background);color:var(--tx-input-number-button-hover-color)}:host([data-styled]) .tx-input-number__button:active:enabled{background:var(--tx-input-number-button-active-background);color:var(--tx-input-number-button-active-color)}:host([data-styled]) .tx-input-number__button:disabled{cursor:not-allowed;opacity:.5}.tx-input-number__stack{position:absolute;top:1px;right:1px;bottom:1px;display:flex;flex-direction:column;overflow:hidden}:host([data-styled]) .tx-input-number__stack{width:var(--tx-input-number-button-stacked-width);border-radius:0 calc(var(--tx-form-field-border-radius) - 1px) calc(var(--tx-form-field-border-radius) - 1px) 0}:host([data-styled]) .tx-input-number__stack .tx-input-number__button{flex:1 1 0;width:100%;min-height:0;border-width:0 0 0 1px}:host([data-styled]) .tx-input-number__stack .tx-input-number__increment{border-bottom-width:1px}:host([data-styled][data-layout=horizontal]) .tx-input-number__input{border-radius:0}:host([data-styled][data-layout=horizontal]) .tx-input-number__decrement{border-right:none;border-radius:var(--tx-form-field-border-radius) 0 0 var(--tx-form-field-border-radius)}:host([data-styled][data-layout=horizontal]) .tx-input-number__increment{border-left:none;border-radius:0 var(--tx-form-field-border-radius) var(--tx-form-field-border-radius) 0}:host([data-layout=vertical]){flex-direction:column}:host([data-styled][data-layout=vertical]) .tx-input-number__input{border-radius:0;text-align:center}:host([data-styled][data-layout=vertical]) .tx-input-number__button{width:auto;height:var(--tx-input-number-button-width)}:host([data-styled][data-layout=vertical]) .tx-input-number__increment{order:-1;border-bottom:none;border-radius:var(--tx-form-field-border-radius) var(--tx-form-field-border-radius) 0 0}:host([data-styled][data-layout=vertical]) .tx-input-number__decrement{order:1;border-top:none;border-radius:0 0 var(--tx-form-field-border-radius) var(--tx-form-field-border-radius)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-input-number__button{transition:none}}\n"],
686
686
  dependencies: [
687
687
  {
688
688
  kind: "directive",
@@ -754,7 +754,7 @@ i0.ɵɵngDeclareClassMetadata({
754
754
  },
755
755
  viewProviders: [provideTxIconDefaults(INPUT_NUMBER_ICON_DEFAULTS)],
756
756
  template: "@if (showButtons() && buttonLayout() !== 'stacked') {\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"tx-input-number__button tx-input-number__decrement\"\n [class]=\"passThrough().decrement?.class\"\n [style]=\"passThrough().decrement?.style\"\n [attr.aria-label]=\"translations().decrement\"\n [disabled]=\"!canDecrement()\"\n (pointerdown)=\"startRepeat(-1, $event)\"\n (pointerup)=\"stopRepeat()\"\n (pointerleave)=\"stopRepeat()\"\n (pointercancel)=\"stopRepeat()\"\n >\n @if (decrementIconName().name; as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"decrementIconName().className\"></span>\n }\n </button>\n}\n<input\n #input\n txInput\n type=\"text\"\n role=\"spinbutton\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n class=\"tx-input-number__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\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.name]=\"name() ?? null\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-valuenow]=\"value() ?? null\"\n [attr.aria-valuemin]=\"min() ?? null\"\n [attr.aria-valuemax]=\"max() ?? null\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur($event)\"\n/>\n@if (showClear() && value() !== null && isEditable()) {\n <button\n type=\"button\"\n class=\"tx-input-number__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($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n}\n@if (showButtons()) {\n @if (buttonLayout() === 'stacked') {\n <span class=\"tx-input-number__stack\">\n <ng-container [ngTemplateOutlet]=\"increment\" />\n <ng-container [ngTemplateOutlet]=\"decrement\" />\n </span>\n } @else {\n <ng-container [ngTemplateOutlet]=\"increment\" />\n }\n}\n\n<ng-template #increment>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"tx-input-number__button tx-input-number__increment\"\n [class]=\"passThrough().increment?.class\"\n [style]=\"passThrough().increment?.style\"\n [attr.aria-label]=\"translations().increment\"\n [disabled]=\"!canIncrement()\"\n (pointerdown)=\"startRepeat(1, $event)\"\n (pointerup)=\"stopRepeat()\"\n (pointerleave)=\"stopRepeat()\"\n (pointercancel)=\"stopRepeat()\"\n >\n @if (incrementIconName().name; as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"incrementIconName().className\"></span>\n }\n </button>\n</ng-template>\n<ng-template #decrement>\n <button\n type=\"button\"\n tabindex=\"-1\"\n class=\"tx-input-number__button tx-input-number__decrement\"\n [class]=\"passThrough().decrement?.class\"\n [style]=\"passThrough().decrement?.style\"\n [attr.aria-label]=\"translations().decrement\"\n [disabled]=\"!canDecrement()\"\n (pointerdown)=\"startRepeat(-1, $event)\"\n (pointerup)=\"stopRepeat()\"\n (pointerleave)=\"stopRepeat()\"\n (pointercancel)=\"stopRepeat()\"\n >\n @if (decrementIconName().name; as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"decrementIconName().className\"></span>\n }\n </button>\n</ng-template>\n",
757
- styles: [":host{position:relative;display:inline-flex;align-items:stretch;vertical-align:top}:host(.tx-input-number--fluid){display:flex;width:100%}.tx-input-number__input{flex:1 1 auto;min-width:0;font-variant-numeric:tabular-nums}:host([data-styled]){--_inset: 0px}:host([data-styled][data-layout=stacked]){--_inset: var(--tx-input-number-button-stacked-width)}:host([data-styled]) .tx-input-number__input{--tx-field-inset-end: calc(var(--_inset) + var(--_clear, 0px))}:host([data-styled]:has(.tx-input-number__clear)){--_clear: 28px}.tx-input-number__clear{position:absolute;top:50%;right:calc(var(--_inset, 0px) + 8px);transform:translateY(-50%)}:host([data-styled]) .tx-input-number__clear{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-input-number__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}:host([data-styled]) .tx-input-number__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled]) .tx-input-number__button{display:grid;place-items:center;box-sizing:border-box;width:var(--tx-input-number-button-width);padding:0;border:1px solid var(--tx-input-number-button-border-color);background:var(--tx-input-number-button-background);color:var(--tx-input-number-button-color);font-size:var(--tx-input-number-button-icon-size);cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-input-number__button:hover:enabled{background:var(--tx-input-number-button-hover-background);color:var(--tx-input-number-button-hover-color)}:host([data-styled]) .tx-input-number__button:active:enabled{background:var(--tx-input-number-button-active-background);color:var(--tx-input-number-button-active-color)}:host([data-styled]) .tx-input-number__button:disabled{cursor:not-allowed;opacity:.5}.tx-input-number__stack{position:absolute;top:1px;right:1px;bottom:1px;display:flex;flex-direction:column;overflow:hidden}:host([data-styled]) .tx-input-number__stack{width:var(--tx-input-number-button-stacked-width);border-radius:0 calc(var(--tx-form-field-border-radius) - 1px) calc(var(--tx-form-field-border-radius) - 1px) 0}:host([data-styled]) .tx-input-number__stack .tx-input-number__button{flex:1 1 0;width:100%;min-height:0;border-width:0 0 0 1px}:host([data-styled]) .tx-input-number__stack .tx-input-number__increment{border-bottom-width:1px}:host([data-styled][data-layout=horizontal]) .tx-input-number__input{border-radius:0}:host([data-styled][data-layout=horizontal]) .tx-input-number__decrement{border-right:none;border-radius:var(--tx-form-field-border-radius) 0 0 var(--tx-form-field-border-radius)}:host([data-styled][data-layout=horizontal]) .tx-input-number__increment{border-left:none;border-radius:0 var(--tx-form-field-border-radius) var(--tx-form-field-border-radius) 0}:host([data-layout=vertical]){flex-direction:column}:host([data-styled][data-layout=vertical]) .tx-input-number__input{border-radius:0;text-align:center}:host([data-styled][data-layout=vertical]) .tx-input-number__button{width:auto;height:var(--tx-input-number-button-width)}:host([data-styled][data-layout=vertical]) .tx-input-number__increment{order:-1;border-bottom:none;border-radius:var(--tx-form-field-border-radius) var(--tx-form-field-border-radius) 0 0}:host([data-styled][data-layout=vertical]) .tx-input-number__decrement{order:1;border-top:none;border-radius:0 0 var(--tx-form-field-border-radius) var(--tx-form-field-border-radius)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-input-number__button{transition:none}}\n"]
757
+ styles: [":host{position:relative;display:inline-flex;align-items:stretch;vertical-align:top}:host(.tx-input-number--fluid){display:flex;width:100%}.tx-input-number__input{flex:1 1 auto;min-width:0;font-variant-numeric:tabular-nums}:host([data-styled]){--_inset: 0px}:host([data-styled][data-layout=stacked]){--_inset: var(--tx-input-number-button-stacked-width)}:host([data-styled]) .tx-input-number__input{--tx-field-inset-end: calc(var(--_inset) + var(--_clear, 0px))}:host([data-styled]:has(.tx-input-number__clear)){--_clear: var(--tx-form-field-action-room)}.tx-input-number__clear{position:absolute;top:50%;right:calc(var(--_inset, 0px) + var(--tx-space-2));transform:translateY(-50%)}:host([data-styled]) .tx-input-number__clear{display:grid;place-items:center;width:var(--tx-form-field-action-size);height:var(--tx-form-field-action-size);padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-input-number__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}:host([data-styled]) .tx-input-number__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled]) .tx-input-number__button{display:grid;place-items:center;box-sizing:border-box;width:var(--tx-input-number-button-width);padding:0;border:1px solid var(--tx-input-number-button-border-color);background:var(--tx-input-number-button-background);color:var(--tx-input-number-button-color);font-size:var(--tx-input-number-button-icon-size);cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-input-number__button:hover:enabled{background:var(--tx-input-number-button-hover-background);color:var(--tx-input-number-button-hover-color)}:host([data-styled]) .tx-input-number__button:active:enabled{background:var(--tx-input-number-button-active-background);color:var(--tx-input-number-button-active-color)}:host([data-styled]) .tx-input-number__button:disabled{cursor:not-allowed;opacity:.5}.tx-input-number__stack{position:absolute;top:1px;right:1px;bottom:1px;display:flex;flex-direction:column;overflow:hidden}:host([data-styled]) .tx-input-number__stack{width:var(--tx-input-number-button-stacked-width);border-radius:0 calc(var(--tx-form-field-border-radius) - 1px) calc(var(--tx-form-field-border-radius) - 1px) 0}:host([data-styled]) .tx-input-number__stack .tx-input-number__button{flex:1 1 0;width:100%;min-height:0;border-width:0 0 0 1px}:host([data-styled]) .tx-input-number__stack .tx-input-number__increment{border-bottom-width:1px}:host([data-styled][data-layout=horizontal]) .tx-input-number__input{border-radius:0}:host([data-styled][data-layout=horizontal]) .tx-input-number__decrement{border-right:none;border-radius:var(--tx-form-field-border-radius) 0 0 var(--tx-form-field-border-radius)}:host([data-styled][data-layout=horizontal]) .tx-input-number__increment{border-left:none;border-radius:0 var(--tx-form-field-border-radius) var(--tx-form-field-border-radius) 0}:host([data-layout=vertical]){flex-direction:column}:host([data-styled][data-layout=vertical]) .tx-input-number__input{border-radius:0;text-align:center}:host([data-styled][data-layout=vertical]) .tx-input-number__button{width:auto;height:var(--tx-input-number-button-width)}:host([data-styled][data-layout=vertical]) .tx-input-number__increment{order:-1;border-bottom:none;border-radius:var(--tx-form-field-border-radius) var(--tx-form-field-border-radius) 0 0}:host([data-styled][data-layout=vertical]) .tx-input-number__decrement{order:1;border-top:none;border-radius:0 0 var(--tx-form-field-border-radius) var(--tx-form-field-border-radius)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-input-number__button{transition:none}}\n"]
758
758
  }]
759
759
  }],
760
760
  ctorParameters: () => [],