@tectra-ng/ui 0.4.4 → 0.4.6

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 +11 -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 +142 -22
  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 +17 -7
  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 +33 -17
  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 +3 -3
  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 +62 -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 +6 -3
  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
@@ -165,6 +165,7 @@ var TxPanel = class TxPanel {
165
165
  "attr.title": "null",
166
166
  "attr.data-variant": "variant()",
167
167
  "attr.data-align": "align()",
168
+ "class.tx-panel--toggleable": "toggleable()",
168
169
  "class.tx-panel--collapsed": "toggleable() && collapsed()",
169
170
  "attr.role": "title() ? \"region\" : null",
170
171
  "attr.aria-labelledby": "title() ? titleId : null"
@@ -173,7 +174,7 @@ var TxPanel = class TxPanel {
173
174
  },
174
175
  ngImport: i0,
175
176
  template: "<header class=\"tx-panel__header\" [class]=\"passThrough().header?.class\" [style]=\"passThrough().header?.style\">\n <div class=\"tx-panel__lead\">\n @if (icon(); as icon) {\n <span class=\"tx-panel__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <div class=\"tx-panel__heading\">\n @if (title()) {\n <div class=\"tx-panel__title\" role=\"heading\" [id]=\"titleId\" [attr.aria-level]=\"headingLevel()\" [class]=\"passThrough().title?.class\" [style]=\"passThrough().title?.style\">\n {{ title() }}\n </div>\n }\n @if (subtitle()) {\n <p class=\"tx-panel__subtitle\" [class]=\"passThrough().subtitle?.class\" [style]=\"passThrough().subtitle?.style\">{{ subtitle() }}</p>\n }\n <ng-content select=\"[txPanelHeader]\" />\n </div>\n </div>\n <div class=\"tx-panel__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n <ng-content select=\"[txPanelActions]\" />\n @if (toggleable()) {\n <button\n type=\"button\"\n class=\"tx-panel__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-expanded]=\"!collapsed()\"\n [attr.aria-controls]=\"bodyId\"\n [attr.aria-label]=\"toggleLabel() ?? title() ?? null\"\n (click)=\"toggle()\"\n >\n <tx-icon [name]=\"'chevron-down'\" />\n </button>\n }\n </div>\n</header>\n<div class=\"tx-panel__collapse\" [id]=\"bodyId\" [attr.inert]=\"isOpen() ? null : ''\">\n <div class=\"tx-panel__collapse-inner\">\n <div class=\"tx-panel__body\" [class]=\"passThrough().body?.class\" [style]=\"passThrough().body?.style\"><ng-content /></div>\n <div class=\"tx-panel__footer\" [class]=\"passThrough().footer?.class\" [style]=\"passThrough().footer?.style\"><ng-content select=\"[txPanelFooter]\" /></div>\n </div>\n</div>\n",
176
- styles: [":host{display:block;min-width:0}.tx-panel__header{display:flex;flex-wrap:wrap;justify-content:space-between}.tx-panel__lead{display:flex;align-items:center;min-width:0}.tx-panel__heading{display:flex;flex-direction:column;min-width:0}.tx-panel__actions{display:flex;align-items:center}.tx-panel__actions:empty,.tx-panel__body:empty,.tx-panel__footer:empty,.tx-panel__collapse:has(.tx-panel__body:empty):has(.tx-panel__footer:empty){display:none}.tx-panel__collapse{display:grid;grid-template-rows:1fr}:host(.tx-panel--collapsed) .tx-panel__collapse{grid-template-rows:0fr}.tx-panel__collapse-inner{min-height:0;overflow:hidden}:host(.tx-panel--collapsed) .tx-panel__collapse-inner{visibility:hidden}:host([data-styled]){--_gap: var(--tx-panel-gap);--_icon: var(--tx-panel-icon-size);--_title: var(--tx-panel-title-font-size);display:flex;flex-direction:column;gap:var(--_gap);padding:var(--tx-panel-padding);border-radius:var(--tx-panel-border-radius);background:var(--tx-panel-background);box-shadow:inset 0 0 0 1px var(--tx-panel-border-color),var(--tx-panel-shadow);color:var(--tx-panel-color);font-family:var(--tx-font-family);transition:gap var(--tx-panel-transition-duration)}:host([data-styled].tx-panel--collapsed){gap:0}:host([data-styled][data-variant=inset]){--_gap: var(--tx-panel-inset-gap);padding:var(--tx-panel-inset-padding);background:var(--tx-panel-inset-background);box-shadow:none}:host([data-styled][data-variant=plain]){--_gap: var(--tx-panel-plain-gap);--_icon: var(--tx-panel-plain-icon-size);--_title: var(--tx-panel-plain-title-font-size);padding:0;border-radius:0;background:transparent;box-shadow:none}:host([data-styled]) .tx-panel__header{gap:12px}:host([data-styled][data-align=start]) .tx-panel__header{align-items:flex-start}:host([data-styled][data-align=center]) .tx-panel__header{align-items:center}:host([data-styled][data-align=end]) .tx-panel__header{align-items:flex-end;column-gap:24px;row-gap:16px}:host([data-styled][data-align=end]) .tx-panel__header .tx-panel__lead{align-self:flex-start}:host([data-styled]) .tx-panel__lead{gap:12px}:host([data-styled]) .tx-panel__icon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--_icon);height:var(--_icon);border-radius:var(--tx-panel-icon-border-radius);background:var(--tx-panel-icon-background);color:var(--tx-panel-icon-color);font-size:calc(var(--_icon) * .45)}:host([data-styled]) .tx-panel__heading{gap:2px}:host([data-styled]) .tx-panel__title{font-size:var(--_title);font-weight:var(--tx-panel-title-font-weight);line-height:1.3}:host([data-styled]) .tx-panel__subtitle{margin:0;color:var(--tx-panel-subtitle-color);font-size:var(--tx-panel-subtitle-font-size);line-height:1.45}:host([data-styled]) .tx-panel__actions{flex-wrap:wrap;gap:8px}:host([data-styled]) .tx-panel__toggle{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;border-radius:var(--tx-radius-md);background:transparent;color:var(--tx-text-muted);cursor:pointer;transition:color var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-panel__toggle tx-icon{transition:transform var(--tx-panel-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-panel__toggle:hover{background:var(--tx-surface-hover);color:var(--tx-text-primary)}:host([data-styled]) .tx-panel__toggle:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled].tx-panel--collapsed) .tx-panel__toggle tx-icon{transform:rotate(-90deg)}:host([data-styled]) .tx-panel__collapse{transition:grid-template-rows var(--tx-panel-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-panel__footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:var(--_gap)}:host([data-styled]) .tx-panel__body:empty+.tx-panel__footer{margin-top:0}:host([data-styled]) .tx-panel__footer:empty{display:none}:host([data-styled].tx-panel--collapsed) .tx-panel__collapse-inner{transition:visibility 0s linear var(--tx-panel-transition-duration)}@media(prefers-reduced-motion:reduce){:host([data-styled]),:host([data-styled]) .tx-panel__collapse,:host([data-styled]) .tx-panel__toggle,:host([data-styled].tx-panel--collapsed) .tx-panel__collapse-inner,:host([data-styled]) .tx-panel__toggle tx-icon{transition:none}}\n"],
177
+ styles: [":host{display:block;min-width:0}.tx-panel__header{display:flex;flex-wrap:wrap;justify-content:space-between}.tx-panel__lead{display:flex;align-items:center;min-width:0}.tx-panel__heading{display:flex;flex-direction:column;min-width:0}.tx-panel__actions{display:flex;align-items:center}.tx-panel__actions:empty,.tx-panel__body:empty,.tx-panel__footer:empty,.tx-panel__collapse:has(.tx-panel__body:empty):has(.tx-panel__footer:empty){display:none}.tx-panel__collapse{display:grid;flex-grow:1;grid-template-rows:1fr}:host(.tx-panel--collapsed) .tx-panel__collapse{grid-template-rows:0fr}.tx-panel__collapse-inner{display:flex;flex-direction:column;min-height:0}.tx-panel__body{flex-grow:1}:host(.tx-panel--toggleable) .tx-panel__collapse-inner{overflow:hidden}:host(.tx-panel--collapsed) .tx-panel__collapse-inner{visibility:hidden}:host([data-styled]){--_gap: var(--tx-panel-gap);--_icon: var(--tx-panel-icon-size);--_title: var(--tx-panel-title-font-size);display:flex;flex-direction:column;gap:var(--_gap);padding:var(--tx-panel-padding);border-radius:var(--tx-panel-border-radius);background:var(--tx-panel-background);box-shadow:inset 0 0 0 1px var(--tx-panel-border-color),var(--tx-panel-shadow);color:var(--tx-panel-color);font-family:var(--tx-font-family);transition:gap var(--tx-panel-transition-duration)}:host([data-styled].tx-panel--collapsed){gap:0}:host([data-styled][data-variant=inset]){--_gap: var(--tx-panel-inset-gap);padding:var(--tx-panel-inset-padding);background:var(--tx-panel-inset-background);box-shadow:none}:host([data-styled][data-variant=plain]){--_gap: var(--tx-panel-plain-gap);--_icon: var(--tx-panel-plain-icon-size);--_title: var(--tx-panel-plain-title-font-size);padding:0;border-radius:0;background:transparent;box-shadow:none}:host([data-styled]) .tx-panel__header{gap:var(--tx-panel-header-gap)}:host([data-styled][data-align=start]) .tx-panel__header{align-items:flex-start}:host([data-styled][data-align=center]) .tx-panel__header{align-items:center}:host([data-styled][data-align=end]) .tx-panel__header{align-items:flex-end;gap:var(--tx-panel-header-end-gap)}:host([data-styled][data-align=end]) .tx-panel__header .tx-panel__lead{align-self:flex-start}:host([data-styled][data-align=end]) .tx-panel__header .tx-panel__actions{align-items:flex-end}:host([data-styled]) .tx-panel__lead{gap:var(--tx-panel-lead-gap)}:host([data-styled]) .tx-panel__icon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--_icon);height:var(--_icon);border-radius:var(--tx-panel-icon-border-radius);background:var(--tx-panel-icon-background);color:var(--tx-panel-icon-color);font-size:calc(var(--_icon) * var(--tx-panel-icon-scale))}:host([data-styled]) .tx-panel__heading{gap:var(--tx-panel-heading-gap)}:host([data-styled]) .tx-panel__title{font-size:var(--_title);font-weight:var(--tx-panel-title-font-weight);line-height:var(--tx-panel-title-line-height)}:host([data-styled]) .tx-panel__subtitle{margin:0;color:var(--tx-panel-subtitle-color);font-size:var(--tx-panel-subtitle-font-size);line-height:var(--tx-panel-subtitle-line-height)}:host([data-styled]) .tx-panel__actions{flex-wrap:wrap;gap:var(--tx-panel-actions-gap)}:host([data-styled]) .tx-panel__toggle{display:inline-flex;align-items:center;justify-content:center;width:var(--tx-panel-toggle-size);height:var(--tx-panel-toggle-size);padding:0;border:none;border-radius:var(--tx-radius-md);background:transparent;color:var(--tx-text-muted);cursor:pointer;transition:color var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-panel__toggle tx-icon{transition:transform var(--tx-panel-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-panel__toggle:hover{background:var(--tx-surface-hover);color:var(--tx-text-primary)}:host([data-styled]) .tx-panel__toggle:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled].tx-panel--collapsed) .tx-panel__toggle tx-icon{transform:rotate(-90deg)}:host([data-styled]) .tx-panel__collapse{transition:grid-template-rows var(--tx-panel-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-panel__footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--tx-panel-footer-gap);margin-top:var(--_gap)}:host([data-styled]) .tx-panel__body:empty+.tx-panel__footer{margin-top:0}:host([data-styled]) .tx-panel__footer:empty{display:none}:host([data-styled].tx-panel--collapsed) .tx-panel__collapse-inner{transition:visibility 0s linear var(--tx-panel-transition-duration)}@media(prefers-reduced-motion:reduce){:host([data-styled]),:host([data-styled]) .tx-panel__collapse,:host([data-styled]) .tx-panel__toggle,:host([data-styled].tx-panel--collapsed) .tx-panel__collapse-inner,:host([data-styled]) .tx-panel__toggle tx-icon{transition:none}}\n"],
177
178
  dependencies: [{
178
179
  kind: "component",
179
180
  type: TxIcon,
@@ -203,13 +204,14 @@ i0.ɵɵngDeclareClassMetadata({
203
204
  "[attr.title]": "null",
204
205
  "[attr.data-variant]": "variant()",
205
206
  "[attr.data-align]": "align()",
207
+ "[class.tx-panel--toggleable]": "toggleable()",
206
208
  "[class.tx-panel--collapsed]": "toggleable() && collapsed()",
207
209
  "[attr.role]": "title() ? \"region\" : null",
208
210
  "[attr.aria-labelledby]": "title() ? titleId : null"
209
211
  },
210
212
  viewProviders: [provideTxIconDefaults(PANEL_ICON_DEFAULTS)],
211
213
  template: "<header class=\"tx-panel__header\" [class]=\"passThrough().header?.class\" [style]=\"passThrough().header?.style\">\n <div class=\"tx-panel__lead\">\n @if (icon(); as icon) {\n <span class=\"tx-panel__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <div class=\"tx-panel__heading\">\n @if (title()) {\n <div class=\"tx-panel__title\" role=\"heading\" [id]=\"titleId\" [attr.aria-level]=\"headingLevel()\" [class]=\"passThrough().title?.class\" [style]=\"passThrough().title?.style\">\n {{ title() }}\n </div>\n }\n @if (subtitle()) {\n <p class=\"tx-panel__subtitle\" [class]=\"passThrough().subtitle?.class\" [style]=\"passThrough().subtitle?.style\">{{ subtitle() }}</p>\n }\n <ng-content select=\"[txPanelHeader]\" />\n </div>\n </div>\n <div class=\"tx-panel__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n <ng-content select=\"[txPanelActions]\" />\n @if (toggleable()) {\n <button\n type=\"button\"\n class=\"tx-panel__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-expanded]=\"!collapsed()\"\n [attr.aria-controls]=\"bodyId\"\n [attr.aria-label]=\"toggleLabel() ?? title() ?? null\"\n (click)=\"toggle()\"\n >\n <tx-icon [name]=\"'chevron-down'\" />\n </button>\n }\n </div>\n</header>\n<div class=\"tx-panel__collapse\" [id]=\"bodyId\" [attr.inert]=\"isOpen() ? null : ''\">\n <div class=\"tx-panel__collapse-inner\">\n <div class=\"tx-panel__body\" [class]=\"passThrough().body?.class\" [style]=\"passThrough().body?.style\"><ng-content /></div>\n <div class=\"tx-panel__footer\" [class]=\"passThrough().footer?.class\" [style]=\"passThrough().footer?.style\"><ng-content select=\"[txPanelFooter]\" /></div>\n </div>\n</div>\n",
212
- styles: [":host{display:block;min-width:0}.tx-panel__header{display:flex;flex-wrap:wrap;justify-content:space-between}.tx-panel__lead{display:flex;align-items:center;min-width:0}.tx-panel__heading{display:flex;flex-direction:column;min-width:0}.tx-panel__actions{display:flex;align-items:center}.tx-panel__actions:empty,.tx-panel__body:empty,.tx-panel__footer:empty,.tx-panel__collapse:has(.tx-panel__body:empty):has(.tx-panel__footer:empty){display:none}.tx-panel__collapse{display:grid;grid-template-rows:1fr}:host(.tx-panel--collapsed) .tx-panel__collapse{grid-template-rows:0fr}.tx-panel__collapse-inner{min-height:0;overflow:hidden}:host(.tx-panel--collapsed) .tx-panel__collapse-inner{visibility:hidden}:host([data-styled]){--_gap: var(--tx-panel-gap);--_icon: var(--tx-panel-icon-size);--_title: var(--tx-panel-title-font-size);display:flex;flex-direction:column;gap:var(--_gap);padding:var(--tx-panel-padding);border-radius:var(--tx-panel-border-radius);background:var(--tx-panel-background);box-shadow:inset 0 0 0 1px var(--tx-panel-border-color),var(--tx-panel-shadow);color:var(--tx-panel-color);font-family:var(--tx-font-family);transition:gap var(--tx-panel-transition-duration)}:host([data-styled].tx-panel--collapsed){gap:0}:host([data-styled][data-variant=inset]){--_gap: var(--tx-panel-inset-gap);padding:var(--tx-panel-inset-padding);background:var(--tx-panel-inset-background);box-shadow:none}:host([data-styled][data-variant=plain]){--_gap: var(--tx-panel-plain-gap);--_icon: var(--tx-panel-plain-icon-size);--_title: var(--tx-panel-plain-title-font-size);padding:0;border-radius:0;background:transparent;box-shadow:none}:host([data-styled]) .tx-panel__header{gap:12px}:host([data-styled][data-align=start]) .tx-panel__header{align-items:flex-start}:host([data-styled][data-align=center]) .tx-panel__header{align-items:center}:host([data-styled][data-align=end]) .tx-panel__header{align-items:flex-end;column-gap:24px;row-gap:16px}:host([data-styled][data-align=end]) .tx-panel__header .tx-panel__lead{align-self:flex-start}:host([data-styled]) .tx-panel__lead{gap:12px}:host([data-styled]) .tx-panel__icon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--_icon);height:var(--_icon);border-radius:var(--tx-panel-icon-border-radius);background:var(--tx-panel-icon-background);color:var(--tx-panel-icon-color);font-size:calc(var(--_icon) * .45)}:host([data-styled]) .tx-panel__heading{gap:2px}:host([data-styled]) .tx-panel__title{font-size:var(--_title);font-weight:var(--tx-panel-title-font-weight);line-height:1.3}:host([data-styled]) .tx-panel__subtitle{margin:0;color:var(--tx-panel-subtitle-color);font-size:var(--tx-panel-subtitle-font-size);line-height:1.45}:host([data-styled]) .tx-panel__actions{flex-wrap:wrap;gap:8px}:host([data-styled]) .tx-panel__toggle{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;border-radius:var(--tx-radius-md);background:transparent;color:var(--tx-text-muted);cursor:pointer;transition:color var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-panel__toggle tx-icon{transition:transform var(--tx-panel-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-panel__toggle:hover{background:var(--tx-surface-hover);color:var(--tx-text-primary)}:host([data-styled]) .tx-panel__toggle:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled].tx-panel--collapsed) .tx-panel__toggle tx-icon{transform:rotate(-90deg)}:host([data-styled]) .tx-panel__collapse{transition:grid-template-rows var(--tx-panel-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-panel__footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:var(--_gap)}:host([data-styled]) .tx-panel__body:empty+.tx-panel__footer{margin-top:0}:host([data-styled]) .tx-panel__footer:empty{display:none}:host([data-styled].tx-panel--collapsed) .tx-panel__collapse-inner{transition:visibility 0s linear var(--tx-panel-transition-duration)}@media(prefers-reduced-motion:reduce){:host([data-styled]),:host([data-styled]) .tx-panel__collapse,:host([data-styled]) .tx-panel__toggle,:host([data-styled].tx-panel--collapsed) .tx-panel__collapse-inner,:host([data-styled]) .tx-panel__toggle tx-icon{transition:none}}\n"]
214
+ styles: [":host{display:block;min-width:0}.tx-panel__header{display:flex;flex-wrap:wrap;justify-content:space-between}.tx-panel__lead{display:flex;align-items:center;min-width:0}.tx-panel__heading{display:flex;flex-direction:column;min-width:0}.tx-panel__actions{display:flex;align-items:center}.tx-panel__actions:empty,.tx-panel__body:empty,.tx-panel__footer:empty,.tx-panel__collapse:has(.tx-panel__body:empty):has(.tx-panel__footer:empty){display:none}.tx-panel__collapse{display:grid;flex-grow:1;grid-template-rows:1fr}:host(.tx-panel--collapsed) .tx-panel__collapse{grid-template-rows:0fr}.tx-panel__collapse-inner{display:flex;flex-direction:column;min-height:0}.tx-panel__body{flex-grow:1}:host(.tx-panel--toggleable) .tx-panel__collapse-inner{overflow:hidden}:host(.tx-panel--collapsed) .tx-panel__collapse-inner{visibility:hidden}:host([data-styled]){--_gap: var(--tx-panel-gap);--_icon: var(--tx-panel-icon-size);--_title: var(--tx-panel-title-font-size);display:flex;flex-direction:column;gap:var(--_gap);padding:var(--tx-panel-padding);border-radius:var(--tx-panel-border-radius);background:var(--tx-panel-background);box-shadow:inset 0 0 0 1px var(--tx-panel-border-color),var(--tx-panel-shadow);color:var(--tx-panel-color);font-family:var(--tx-font-family);transition:gap var(--tx-panel-transition-duration)}:host([data-styled].tx-panel--collapsed){gap:0}:host([data-styled][data-variant=inset]){--_gap: var(--tx-panel-inset-gap);padding:var(--tx-panel-inset-padding);background:var(--tx-panel-inset-background);box-shadow:none}:host([data-styled][data-variant=plain]){--_gap: var(--tx-panel-plain-gap);--_icon: var(--tx-panel-plain-icon-size);--_title: var(--tx-panel-plain-title-font-size);padding:0;border-radius:0;background:transparent;box-shadow:none}:host([data-styled]) .tx-panel__header{gap:var(--tx-panel-header-gap)}:host([data-styled][data-align=start]) .tx-panel__header{align-items:flex-start}:host([data-styled][data-align=center]) .tx-panel__header{align-items:center}:host([data-styled][data-align=end]) .tx-panel__header{align-items:flex-end;gap:var(--tx-panel-header-end-gap)}:host([data-styled][data-align=end]) .tx-panel__header .tx-panel__lead{align-self:flex-start}:host([data-styled][data-align=end]) .tx-panel__header .tx-panel__actions{align-items:flex-end}:host([data-styled]) .tx-panel__lead{gap:var(--tx-panel-lead-gap)}:host([data-styled]) .tx-panel__icon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--_icon);height:var(--_icon);border-radius:var(--tx-panel-icon-border-radius);background:var(--tx-panel-icon-background);color:var(--tx-panel-icon-color);font-size:calc(var(--_icon) * var(--tx-panel-icon-scale))}:host([data-styled]) .tx-panel__heading{gap:var(--tx-panel-heading-gap)}:host([data-styled]) .tx-panel__title{font-size:var(--_title);font-weight:var(--tx-panel-title-font-weight);line-height:var(--tx-panel-title-line-height)}:host([data-styled]) .tx-panel__subtitle{margin:0;color:var(--tx-panel-subtitle-color);font-size:var(--tx-panel-subtitle-font-size);line-height:var(--tx-panel-subtitle-line-height)}:host([data-styled]) .tx-panel__actions{flex-wrap:wrap;gap:var(--tx-panel-actions-gap)}:host([data-styled]) .tx-panel__toggle{display:inline-flex;align-items:center;justify-content:center;width:var(--tx-panel-toggle-size);height:var(--tx-panel-toggle-size);padding:0;border:none;border-radius:var(--tx-radius-md);background:transparent;color:var(--tx-text-muted);cursor:pointer;transition:color var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-panel__toggle tx-icon{transition:transform var(--tx-panel-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-panel__toggle:hover{background:var(--tx-surface-hover);color:var(--tx-text-primary)}:host([data-styled]) .tx-panel__toggle:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled].tx-panel--collapsed) .tx-panel__toggle tx-icon{transform:rotate(-90deg)}:host([data-styled]) .tx-panel__collapse{transition:grid-template-rows var(--tx-panel-transition-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-panel__footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--tx-panel-footer-gap);margin-top:var(--_gap)}:host([data-styled]) .tx-panel__body:empty+.tx-panel__footer{margin-top:0}:host([data-styled]) .tx-panel__footer:empty{display:none}:host([data-styled].tx-panel--collapsed) .tx-panel__collapse-inner{transition:visibility 0s linear var(--tx-panel-transition-duration)}@media(prefers-reduced-motion:reduce){:host([data-styled]),:host([data-styled]) .tx-panel__collapse,:host([data-styled]) .tx-panel__toggle,:host([data-styled].tx-panel--collapsed) .tx-panel__collapse-inner,:host([data-styled]) .tx-panel__toggle tx-icon{transition:none}}\n"]
213
215
  }]
214
216
  }],
215
217
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-panel.mjs","names":[],"sources":["../../../../packages/ui/panel/src/panel.icons.ts","../../../../packages/ui/panel/src/panel.theme.ts","../../../../packages/ui/panel/src/panel.component.ts","../../../../packages/ui/panel/src/panel.component.html"],"sourcesContent":["import { TxIconSet, txIconChevronDown, txIconHeading } from '@tectra-ng/icons';\n\nexport const PANEL_ICON_DEFAULTS: TxIconSet = {\n 'chevron-down': txIconChevronDown,\n heading: txIconHeading,\n};\n","import { panelTokens } from '@tectra-ng/themes';\n\nexport const PANEL_THEME = {\n panel: panelTokens,\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 { injectTxIcons, provideTxIconDefaults, TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraPanelTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxPanelAlign, TxPanelPart, TxPanelVariant } from './panel.types';\nimport { PANEL_ICON_DEFAULTS } from './panel.icons';\nimport { PANEL_THEME } from './panel.theme';\n\n@Component({\n selector: 'tx-panel',\n imports: [TxIcon],\n templateUrl: './panel.component.html',\n styleUrl: './panel.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-panel',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.title]': 'null',\n '[attr.data-variant]': 'variant()',\n '[attr.data-align]': 'align()',\n '[class.tx-panel--collapsed]': 'toggleable() && collapsed()',\n '[attr.role]': 'title() ? \"region\" : null',\n '[attr.aria-labelledby]': 'title() ? titleId : null',\n },\n viewProviders: [provideTxIconDefaults(PANEL_ICON_DEFAULTS)],\n})\nexport class TxPanel {\n private readonly panelTheme = injectTokens(PANEL_THEME);\n\n private txIconRegistry = injectTxIcons();\n private id = uniqueId('tx-panel');\n\n readonly title = input<string | undefined>(undefined);\n readonly subtitle = input<string | undefined>(undefined);\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly variant = input<TxPanelVariant>('card');\n readonly align = input<TxPanelAlign>('start');\n readonly headingLevel = input<number>(2);\n readonly toggleable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly collapsed = model<boolean>(false);\n readonly toggleLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraPanelTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxPanelPart, TxPanel> | 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('panel', this, this.pt, this.ptOptions);\n readonly titleId = `${this.id}-title`;\n readonly bodyId = `${this.id}-body`;\n readonly isOpen = computed(() => !this.toggleable() || !this.collapsed());\n readonly iconName = computed(() => {\n const icon = this.icon();\n return icon && this.txIconRegistry.has(icon) ? icon : null;\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-panel'), ...this.passThrough().root?.style }));\n\n toggle(): void {\n this.collapsed.update((collapsed) => !collapsed);\n }\n}\n","<header class=\"tx-panel__header\" [class]=\"passThrough().header?.class\" [style]=\"passThrough().header?.style\">\n <div class=\"tx-panel__lead\">\n @if (icon(); as icon) {\n <span class=\"tx-panel__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <div class=\"tx-panel__heading\">\n @if (title()) {\n <div class=\"tx-panel__title\" role=\"heading\" [id]=\"titleId\" [attr.aria-level]=\"headingLevel()\" [class]=\"passThrough().title?.class\" [style]=\"passThrough().title?.style\">\n {{ title() }}\n </div>\n }\n @if (subtitle()) {\n <p class=\"tx-panel__subtitle\" [class]=\"passThrough().subtitle?.class\" [style]=\"passThrough().subtitle?.style\">{{ subtitle() }}</p>\n }\n <ng-content select=\"[txPanelHeader]\" />\n </div>\n </div>\n <div class=\"tx-panel__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n <ng-content select=\"[txPanelActions]\" />\n @if (toggleable()) {\n <button\n type=\"button\"\n class=\"tx-panel__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-expanded]=\"!collapsed()\"\n [attr.aria-controls]=\"bodyId\"\n [attr.aria-label]=\"toggleLabel() ?? title() ?? null\"\n (click)=\"toggle()\"\n >\n <tx-icon [name]=\"'chevron-down'\" />\n </button>\n }\n </div>\n</header>\n<div class=\"tx-panel__collapse\" [id]=\"bodyId\" [attr.inert]=\"isOpen() ? null : ''\">\n <div class=\"tx-panel__collapse-inner\">\n <div class=\"tx-panel__body\" [class]=\"passThrough().body?.class\" [style]=\"passThrough().body?.style\"><ng-content /></div>\n <div class=\"tx-panel__footer\" [class]=\"passThrough().footer?.class\" [style]=\"passThrough().footer?.style\"><ng-content select=\"[txPanelFooter]\" /></div>\n </div>\n</div>\n"],"mappings":";;;;;;;AAEA,MAAa,sBAAiC;CAC5C,gBAAgB;CAChB,SAAS;AACV;ACHD,MAAa,cAAc,EACzB,OAAO,YACR;AC0BD,IAAa,UAAb,MAAa,QAAO;CACD,aAAa,aAAa,WAAW;CAE9C,iBAAiB,cAAa;CAC9B,KAAK,SAAS,UAAU;CAEvB,QAAQ,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC5C,WAAW,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC/C,OAAO,MAA8C,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC/D,UAAU,MAAsB,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACvC,QAAQ,MAAoB,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACpC,eAAe,MAAc,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,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,cAAc,MAA0B,QAAU,GA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A,SAAA;IAAA,SAAA;IAAA,oBAAA;IAAA,cAAA;IAAA,qBAAA;IAAA,mBAAA;IAAA,6BAAA;IAAA,aAAA;IAAA,wBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UC9BpB;EA+CA,QAAA,CAAA,0vIAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MDnCY;GAAM,UAAA;GAAA,QAAA,CAAA,MAAA;EAAA,CAAA;EAAA,eAgBD,CAAC,sBAAsB,mBAAmB,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAEhD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAO,YAAA,CAAA;EApBnB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAU,SACX,CAAC,MAAM;GAAC,iBAGA,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,gBAAgB;IAChB,uBAAuB;IACvB,qBAAqB;IACrB,+BAA+B;IAC/B,eAAe;IACf,0BAA0B;GAC3B;GAAA,eACc,CAAC,sBAAsB,mBAAmB,CAAC;GAAC,UAAA;GAAA,QAAA,CAAA,0vIAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-panel.mjs","names":[],"sources":["../../../../packages/ui/panel/src/panel.icons.ts","../../../../packages/ui/panel/src/panel.theme.ts","../../../../packages/ui/panel/src/panel.component.ts","../../../../packages/ui/panel/src/panel.component.html"],"sourcesContent":["import { TxIconSet, txIconChevronDown, txIconHeading } from '@tectra-ng/icons';\n\nexport const PANEL_ICON_DEFAULTS: TxIconSet = {\n 'chevron-down': txIconChevronDown,\n heading: txIconHeading,\n};\n","import { panelTokens } from '@tectra-ng/themes';\n\nexport const PANEL_THEME = {\n panel: panelTokens,\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 { injectTxIcons, provideTxIconDefaults, TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraPanelTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxPanelAlign, TxPanelPart, TxPanelVariant } from './panel.types';\nimport { PANEL_ICON_DEFAULTS } from './panel.icons';\nimport { PANEL_THEME } from './panel.theme';\n\n@Component({\n selector: 'tx-panel',\n imports: [TxIcon],\n templateUrl: './panel.component.html',\n styleUrl: './panel.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-panel',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.title]': 'null',\n '[attr.data-variant]': 'variant()',\n '[attr.data-align]': 'align()',\n '[class.tx-panel--toggleable]': 'toggleable()',\n '[class.tx-panel--collapsed]': 'toggleable() && collapsed()',\n '[attr.role]': 'title() ? \"region\" : null',\n '[attr.aria-labelledby]': 'title() ? titleId : null',\n },\n viewProviders: [provideTxIconDefaults(PANEL_ICON_DEFAULTS)],\n})\nexport class TxPanel {\n private readonly panelTheme = injectTokens(PANEL_THEME);\n\n private txIconRegistry = injectTxIcons();\n private id = uniqueId('tx-panel');\n\n readonly title = input<string | undefined>(undefined);\n readonly subtitle = input<string | undefined>(undefined);\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly variant = input<TxPanelVariant>('card');\n readonly align = input<TxPanelAlign>('start');\n readonly headingLevel = input<number>(2);\n readonly toggleable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly collapsed = model<boolean>(false);\n readonly toggleLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraPanelTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxPanelPart, TxPanel> | 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('panel', this, this.pt, this.ptOptions);\n readonly titleId = `${this.id}-title`;\n readonly bodyId = `${this.id}-body`;\n readonly isOpen = computed(() => !this.toggleable() || !this.collapsed());\n readonly iconName = computed(() => {\n const icon = this.icon();\n return icon && this.txIconRegistry.has(icon) ? icon : null;\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-panel'), ...this.passThrough().root?.style }));\n\n toggle(): void {\n this.collapsed.update((collapsed) => !collapsed);\n }\n}\n","<header class=\"tx-panel__header\" [class]=\"passThrough().header?.class\" [style]=\"passThrough().header?.style\">\n <div class=\"tx-panel__lead\">\n @if (icon(); as icon) {\n <span class=\"tx-panel__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <div class=\"tx-panel__heading\">\n @if (title()) {\n <div class=\"tx-panel__title\" role=\"heading\" [id]=\"titleId\" [attr.aria-level]=\"headingLevel()\" [class]=\"passThrough().title?.class\" [style]=\"passThrough().title?.style\">\n {{ title() }}\n </div>\n }\n @if (subtitle()) {\n <p class=\"tx-panel__subtitle\" [class]=\"passThrough().subtitle?.class\" [style]=\"passThrough().subtitle?.style\">{{ subtitle() }}</p>\n }\n <ng-content select=\"[txPanelHeader]\" />\n </div>\n </div>\n <div class=\"tx-panel__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n <ng-content select=\"[txPanelActions]\" />\n @if (toggleable()) {\n <button\n type=\"button\"\n class=\"tx-panel__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-expanded]=\"!collapsed()\"\n [attr.aria-controls]=\"bodyId\"\n [attr.aria-label]=\"toggleLabel() ?? title() ?? null\"\n (click)=\"toggle()\"\n >\n <tx-icon [name]=\"'chevron-down'\" />\n </button>\n }\n </div>\n</header>\n<div class=\"tx-panel__collapse\" [id]=\"bodyId\" [attr.inert]=\"isOpen() ? null : ''\">\n <div class=\"tx-panel__collapse-inner\">\n <div class=\"tx-panel__body\" [class]=\"passThrough().body?.class\" [style]=\"passThrough().body?.style\"><ng-content /></div>\n <div class=\"tx-panel__footer\" [class]=\"passThrough().footer?.class\" [style]=\"passThrough().footer?.style\"><ng-content select=\"[txPanelFooter]\" /></div>\n </div>\n</div>\n"],"mappings":";;;;;;;AAEA,MAAa,sBAAiC;CAC5C,gBAAgB;CAChB,SAAS;AACV;ACHD,MAAa,cAAc,EACzB,OAAO,YACR;AC2BD,IAAa,UAAb,MAAa,QAAO;CACD,aAAa,aAAa,WAAW;CAE9C,iBAAiB,cAAa;CAC9B,KAAK,SAAS,UAAU;CAEvB,QAAQ,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC5C,WAAW,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC/C,OAAO,MAA8C,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC/D,UAAU,MAAsB,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACvC,QAAQ,MAAoB,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACpC,eAAe,MAAc,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAC/B,aAAa,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,aAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACzE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IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,SAAA,EAAA,WAAA,kBAAA;EAAA,MAAA;GAAA,YAAA;IAAA,SAAA;IAAA,SAAA;IAAA,oBAAA;IAAA,cAAA;IAAA,qBAAA;IAAA,mBAAA;IAAA,8BAAA;IAAA,6BAAA;IAAA,aAAA;IAAA,wBAAA;GAAA;GAAA,gBAAA;EAAA;EAAA,UAAA;EAAA,UC/BpB;EA+CA,QAAA,CAAA,qtJAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MDnCY;GAAM,UAAA;GAAA,QAAA,CAAA,MAAA;EAAA,CAAA;EAAA,eAiBD,CAAC,sBAAsB,mBAAmB,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAEhD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAO,YAAA,CAAA;EArBnB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAU,SACX,CAAC,MAAM;GAAC,iBAGA,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,gBAAgB;IAChB,uBAAuB;IACvB,qBAAqB;IACrB,gCAAgC;IAChC,+BAA+B;IAC/B,eAAe;IACf,0BAA0B;GAC3B;GAAA,eACc,CAAC,sBAAsB,mBAAmB,CAAC;GAAC,UAAA;GAAA,QAAA,CAAA,qtJAAA;EAAA,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import * as i0 from "@angular/core";
2
- import { DOCUMENT, Directive, Injectable, booleanAttribute, inject, input, output } from "@angular/core";
2
+ import { DOCUMENT, Directive, ElementRef, Injectable, Renderer2, booleanAttribute, effect, inject, input, output, signal } from "@angular/core";
3
+ import { injectTranslations } from "@tectra-ng/core/i18n";
3
4
  import { optionalNumber } from "@tectra-ng/core/utils";
4
5
  import { TxPassword } from "@tectra-ng/ui/password";
5
6
  const LOWERCASE = "abcdefghijklmnopqrstuvwxyz";
@@ -68,8 +69,20 @@ i0.ɵɵngDeclareClassMetadata({
68
69
  args: [{ providedIn: "root" }]
69
70
  }]
70
71
  });
72
+ const NAME_ATTRIBUTES = [
73
+ "aria-label",
74
+ "aria-labelledby",
75
+ "title"
76
+ ];
71
77
  var TxPasswordGenerate = class TxPasswordGenerate {
72
78
  generator = inject(TxPasswordGenerator);
79
+ element = inject(ElementRef).nativeElement;
80
+ renderer = inject(Renderer2);
81
+ translations = injectTranslations();
82
+ needsName = signal(false, ...ngDevMode ? [{ debugName: "needsName" }] : /* istanbul ignore next */ []);
83
+ defaultName = effect(() => {
84
+ if (this.needsName()) this.renderer.setAttribute(this.element, "aria-label", this.translations().generatePassword);
85
+ }, ...ngDevMode ? [{ debugName: "defaultName" }] : /* istanbul ignore next */ []);
73
86
  target = input(void 0, {
74
87
  ...ngDevMode ? { debugName: "target" } : /* istanbul ignore next */ {},
75
88
  alias: "txPasswordGenerate"
@@ -103,6 +116,10 @@ var TxPasswordGenerate = class TxPasswordGenerate {
103
116
  transform: booleanAttribute
104
117
  });
105
118
  generated = output();
119
+ ngAfterViewInit() {
120
+ const element = this.element;
121
+ this.needsName.set(!element.textContent?.trim() && !NAME_ATTRIBUTES.some((name) => element.hasAttribute(name)));
122
+ }
106
123
  generate() {
107
124
  const password = this.generator.generate({
108
125
  length: this.length(),
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-password-generator.mjs","names":[],"sources":["../../../../packages/ui/password-generator/src/password-generator.service.ts","../../../../packages/ui/password-generator/src/password-generate.directive.ts"],"sourcesContent":["import { DOCUMENT, Injectable, inject } from '@angular/core';\nimport { TxPasswordGeneratorOptions } from './password-generator.types';\n\nconst LOWERCASE = 'abcdefghijklmnopqrstuvwxyz';\nconst UPPERCASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nconst DIGITS = '0123456789';\nconst SYMBOLS = '!@#$%^&*()-_=+[]{};:,.?/~';\nconst SIMILAR = /[0O1lI|]/g;\n\n/**\n * Makes strong random passwords from `crypto.getRandomValues`, with at least one character of every\n * enabled set.\n */\n@Injectable({ providedIn: 'root' })\nexport class TxPasswordGenerator {\n private crypto = inject(DOCUMENT).defaultView?.crypto ?? globalThis.crypto;\n\n /** Makes a password; throws when every character set is turned off. */\n generate(options: TxPasswordGeneratorOptions = {}): string {\n const sets = this.sets(options);\n if (!sets.length) {\n throw new Error('TxPasswordGenerator: enable at least one character set');\n }\n const length = Math.max(options.length ?? 16, sets.length);\n const all = sets.join('');\n const chars = sets.map((set) => set[this.randomIndex(set.length)]);\n while (chars.length < length) {\n chars.push(all[this.randomIndex(all.length)]);\n }\n for (let index = chars.length - 1; index > 0; index -= 1) {\n const swap = this.randomIndex(index + 1);\n [chars[index], chars[swap]] = [chars[swap], chars[index]];\n }\n return chars.join('');\n }\n\n /** Makes a password of the given length (default 16) with all character sets. */\n generatePassword(length = 16): string {\n return this.generate({ length });\n }\n\n private sets(options: TxPasswordGeneratorOptions): string[] {\n const clean = (set: string) => (options.excludeSimilar ? set.replace(SIMILAR, '') : set);\n return [\n options.lowercase !== false ? clean(LOWERCASE) : '',\n options.uppercase !== false ? clean(UPPERCASE) : '',\n options.digits !== false ? clean(DIGITS) : '',\n options.symbols !== false ? clean(options.symbolSet ?? SYMBOLS) : '',\n ].filter(Boolean);\n }\n\n private randomIndex(size: number): number {\n const limit = Math.floor(0x100000000 / size) * size;\n const buffer = new Uint32Array(1);\n do {\n this.crypto.getRandomValues(buffer);\n } while (buffer[0] >= limit);\n return buffer[0] % size;\n }\n}\n","import { Directive, booleanAttribute, inject, input, output } from '@angular/core';\nimport { AbstractControl } from '@angular/forms';\nimport { optionalNumber } from '@tectra-ng/core/utils';\nimport { TxPassword } from '@tectra-ng/ui/password';\nimport { TxPasswordGenerator } from './password-generator.service';\n\n@Directive({\n selector: 'button[txPasswordGenerate]',\n host: {\n type: 'button',\n '(click)': 'generate()',\n },\n})\nexport class TxPasswordGenerate {\n private generator = inject(TxPasswordGenerator);\n\n readonly target = input<TxPassword | AbstractControl | null | undefined>(undefined, { alias: 'txPasswordGenerate' });\n readonly length = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly lowercase = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly uppercase = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly digits = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly symbols = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly excludeSimilar = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly reveal = input<boolean, unknown>(true, { transform: booleanAttribute });\n\n readonly generated = output<string>();\n\n generate(): string {\n const password = this.generator.generate({\n length: this.length(),\n lowercase: this.lowercase(),\n uppercase: this.uppercase(),\n digits: this.digits(),\n symbols: this.symbols(),\n excludeSimilar: this.excludeSimilar(),\n });\n const target = this.target();\n if (target instanceof TxPassword) {\n target.fill(password, this.reveal());\n } else if (target) {\n target.setValue(password);\n target.markAsDirty();\n }\n this.generated.emit(password);\n return password;\n }\n}\n"],"mappings":";;;;AAGA,MAAM,YAAY;AAClB,MAAM,YAAY;AAClB,MAAM,SAAS;AACf,MAAM,UAAU;AAChB,MAAM,UAAU;AAOhB,IAAa,sBAAb,MAAa,oBAAmB;CACtB,SAAS,OAAO,QAAQ,CAAC,CAAC,aAAa,UAAU,WAAW;CAGpE,SAAS,UAAsC,CAAA,GAAE;EAC/C,MAAM,OAAO,KAAK,KAAK,OAAO;EAC9B,IAAI,CAAC,KAAK,QACR,MAAM,IAAI,MAAM,wDAAwD;EAE1E,MAAM,SAAS,KAAK,IAAI,QAAQ,UAAU,IAAI,KAAK,MAAM;EACzD,MAAM,MAAM,KAAK,KAAK,EAAE;EACxB,MAAM,QAAQ,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,IAAI,MAAM,EAAE;EACjE,OAAO,MAAM,SAAS,QACpB,MAAM,KAAK,IAAI,KAAK,YAAY,IAAI,MAAM,EAAE;EAE9C,KAAK,IAAI,QAAQ,MAAM,SAAS,GA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version":3,"file":"tectra-ng-ui-password-generator.mjs","names":[],"sources":["../../../../packages/ui/password-generator/src/password-generator.service.ts","../../../../packages/ui/password-generator/src/password-generate.directive.ts"],"sourcesContent":["import { DOCUMENT, Injectable, inject } from '@angular/core';\nimport { TxPasswordGeneratorOptions } from './password-generator.types';\n\nconst LOWERCASE = 'abcdefghijklmnopqrstuvwxyz';\nconst UPPERCASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\nconst DIGITS = '0123456789';\nconst SYMBOLS = '!@#$%^&*()-_=+[]{};:,.?/~';\nconst SIMILAR = /[0O1lI|]/g;\n\n/**\n * Makes strong random passwords from `crypto.getRandomValues`, with at least one character of every\n * enabled set.\n */\n@Injectable({ providedIn: 'root' })\nexport class TxPasswordGenerator {\n private crypto = inject(DOCUMENT).defaultView?.crypto ?? globalThis.crypto;\n\n /** Makes a password; throws when every character set is turned off. */\n generate(options: TxPasswordGeneratorOptions = {}): string {\n const sets = this.sets(options);\n if (!sets.length) {\n throw new Error('TxPasswordGenerator: enable at least one character set');\n }\n const length = Math.max(options.length ?? 16, sets.length);\n const all = sets.join('');\n const chars = sets.map((set) => set[this.randomIndex(set.length)]);\n while (chars.length < length) {\n chars.push(all[this.randomIndex(all.length)]);\n }\n for (let index = chars.length - 1; index > 0; index -= 1) {\n const swap = this.randomIndex(index + 1);\n [chars[index], chars[swap]] = [chars[swap], chars[index]];\n }\n return chars.join('');\n }\n\n /** Makes a password of the given length (default 16) with all character sets. */\n generatePassword(length = 16): string {\n return this.generate({ length });\n }\n\n private sets(options: TxPasswordGeneratorOptions): string[] {\n const clean = (set: string) => (options.excludeSimilar ? set.replace(SIMILAR, '') : set);\n return [\n options.lowercase !== false ? clean(LOWERCASE) : '',\n options.uppercase !== false ? clean(UPPERCASE) : '',\n options.digits !== false ? clean(DIGITS) : '',\n options.symbols !== false ? clean(options.symbolSet ?? SYMBOLS) : '',\n ].filter(Boolean);\n }\n\n private randomIndex(size: number): number {\n const limit = Math.floor(0x100000000 / size) * size;\n const buffer = new Uint32Array(1);\n do {\n this.crypto.getRandomValues(buffer);\n } while (buffer[0] >= limit);\n return buffer[0] % size;\n }\n}\n","import { AfterViewInit, Directive, ElementRef, Renderer2, booleanAttribute, effect, inject, input, output, signal } from '@angular/core';\nimport { AbstractControl } from '@angular/forms';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalNumber } from '@tectra-ng/core/utils';\nimport { TxPassword } from '@tectra-ng/ui/password';\nimport { TxPasswordGenerator } from './password-generator.service';\n\nconst NAME_ATTRIBUTES = ['aria-label', 'aria-labelledby', 'title'];\n\n/**\n * Generates a password on click and puts it into a `tx-password` or a form control. Works on any `button`, also\n * `txButton`; an icon-only button without its own name gets the translated \"Generate password\" as its accessible name.\n */\n@Directive({\n selector: 'button[txPasswordGenerate]',\n host: {\n type: 'button',\n '(click)': 'generate()',\n },\n})\nexport class TxPasswordGenerate implements AfterViewInit {\n private generator = inject(TxPasswordGenerator);\n private element = inject<ElementRef<HTMLButtonElement>>(ElementRef).nativeElement;\n private renderer = inject(Renderer2);\n private translations = injectTranslations();\n private readonly needsName = signal(false);\n private readonly defaultName = effect(() => {\n if (this.needsName()) {\n this.renderer.setAttribute(this.element, 'aria-label', this.translations().generatePassword);\n }\n });\n\n readonly target = input<TxPassword | AbstractControl | null | undefined>(undefined, { alias: 'txPasswordGenerate' });\n readonly length = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly lowercase = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly uppercase = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly digits = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly symbols = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly excludeSimilar = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly reveal = input<boolean, unknown>(true, { transform: booleanAttribute });\n\n readonly generated = output<string>();\n\n ngAfterViewInit(): void {\n const element = this.element;\n this.needsName.set(!element.textContent?.trim() && !NAME_ATTRIBUTES.some((name) => element.hasAttribute(name)));\n }\n\n generate(): string {\n const password = this.generator.generate({\n length: this.length(),\n lowercase: this.lowercase(),\n uppercase: this.uppercase(),\n digits: this.digits(),\n symbols: this.symbols(),\n excludeSimilar: this.excludeSimilar(),\n });\n const target = this.target();\n if (target instanceof TxPassword) {\n target.fill(password, this.reveal());\n } else if (target) {\n target.setValue(password);\n target.markAsDirty();\n }\n this.generated.emit(password);\n return password;\n }\n}\n"],"mappings":";;;;;AAGA,MAAM,YAAY;AAClB,MAAM,YAAY;AAClB,MAAM,SAAS;AACf,MAAM,UAAU;AAChB,MAAM,UAAU;AAOhB,IAAa,sBAAb,MAAa,oBAAmB;CACtB,SAAS,OAAO,QAAQ,CAAC,CAAC,aAAa,UAAU,WAAW;CAGpE,SAAS,UAAsC,CAAA,GAAE;EAC/C,MAAM,OAAO,KAAK,KAAK,OAAO;EAC9B,IAAI,CAAC,KAAK,QACR,MAAM,IAAI,MAAM,wDAAwD;EAE1E,MAAM,SAAS,KAAK,IAAI,QAAQ,UAAU,IAAI,KAAK,MAAM;EACzD,MAAM,MAAM,KAAK,KAAK,EAAE;EACxB,MAAM,QAAQ,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,IAAI,MAAM,EAAE;EACjE,OAAO,MAAM,SAAS,QACpB,MAAM,KAAK,IAAI,KAAK,YAAY,IAAI,MAAM,EAAE;EAE9C,KAAK,IAAI,QAAQ,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG;GACxD,MAAM,OAAO,KAAK,YAAY,QAAQ,CAAC;GACvC,CAAC,MAAM,QAAQ,MAAM,SAAS,CAAC,MAAM,OAAO,MAAM,MAAM;EAC1D;EACA,OAAO,MAAM,KAAK,EAAE;CACtB;CAGA,iBAAiB,SAAS,IAAE;EAC1B,OAAO,KAAK,SAAS,EAAE,OAAM,CAAE;CACjC;CAEQ,KAAK,SAAmC;EAC9C,MAAM,SAAS,QAAiB,QAAQ,iBAAiB,IAAI,QAAQ,SAAS,EAAE,I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EAAA,UAAA;CAAA,CAAA;;AAAlB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAP9B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM;IACJ,MAAM;IACN,WAAW;GACZ;EACF,CAAA"}
@@ -558,7 +558,7 @@ var TxPassword = class TxPassword extends TxFormControlBase {
558
558
  usesInheritance: true,
559
559
  ngImport: i0,
560
560
  template: "<input\n #input\n txInput\n class=\"tx-password__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [type]=\"isMasked() ? 'password' : 'text'\"\n [value]=\"text()\"\n [id]=\"resolvedId()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [fluid]=\"true\"\n [invalid]=\"isInvalid()\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.placeholder]=\"placeholder() ?? null\"\n [attr.maxlength]=\"maxlength() ?? null\"\n [attr.name]=\"name() ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"feedback() && isFocused() ? infoId : null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n/>\n<span class=\"tx-password__actions\">\n @if (showClear() && hasValue() && isEditable()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n [title]=\"translations().clear\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n @if (toggleMask()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-label]=\"translations().showPassword\"\n [attr.aria-pressed]=\"!isMasked()\"\n [attr.aria-controls]=\"resolvedId()\"\n [title]=\"isMasked() ? translations().showPassword : translations().hidePassword\"\n [disabled]=\"isDisabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"toggleVisibility()\"\n >\n <tx-icon [name]=\"isMasked() ? 'eye' : 'eye-slash'\" />\n </button>\n }\n</span>\n\n<ng-template #panel>\n <div class=\"tx-password__panel\" [attr.data-styled]=\"!isUnstyled() || null\" [style]=\"hostStyle()\" [class]=\"passThrough().panel?.class\">\n @if (headerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n <div class=\"tx-password__meter\" [attr.data-strength]=\"strength()\" [class]=\"passThrough().meter?.class\" [style]=\"passThrough().meter?.style\">\n <span class=\"tx-password__meter-bar\"></span>\n </div>\n <div class=\"tx-password__info\" aria-live=\"polite\" [id]=\"infoId\" [class]=\"passThrough().info?.class\" [style]=\"passThrough().info?.style\">\n {{ info() }}\n </div>\n @if (contentTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n @if (footerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n </div>\n</ng-template>\n",
561
- styles: [":host{position:relative;display:inline-flex;vertical-align:top}:host(.tx-password--fluid){display:flex;width:100%}.tx-password__input{flex:1 1 auto;min-width:0;--tx-field-inset-end: calc(var(--tx-password-actions) * (24px + var(--tx-password-action-gap)))}.tx-password__input::-ms-reveal{display:none}.tx-password__actions{position:absolute;top:50%;right:var(--tx-password-action-inset);display:flex;gap:var(--tx-password-action-gap);transform:translateY(-50%)}.tx-password__action{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)}.tx-password__action:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}.tx-password__action:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-password__action:disabled{cursor:not-allowed;opacity:.6}.tx-password__panel{width:100%}.tx-password__panel[data-styled]{display:grid;gap:var(--tx-password-panel-gap);box-sizing:border-box;padding:var(--tx-password-panel-padding);border:1px solid var(--tx-password-panel-border-color);border-radius:var(--tx-password-panel-border-radius);background:var(--tx-password-panel-background);box-shadow:var(--tx-password-panel-shadow);color:var(--tx-password-panel-color);font-family:var(--tx-font-family);font-size:var(--tx-password-panel-font-size)}.tx-password__panel[data-styled] .tx-password__meter{height:var(--tx-password-meter-height);overflow:hidden;border-radius:var(--tx-password-meter-border-radius);background:var(--tx-password-meter-background)}.tx-password__panel[data-styled] .tx-password__meter-bar{display:block;width:0;height:100%;border-radius:inherit;transition:width var(--tx-password-meter-transition-duration) cubic-bezier(.2,0,0,1),background-color var(--tx-password-meter-transition-duration)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=weak] .tx-password__meter-bar{width:33.33%;background:var(--tx-password-meter-weak-background)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=medium] .tx-password__meter-bar{width:66.66%;background:var(--tx-password-meter-medium-background)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=strong] .tx-password__meter-bar{width:100%;background:var(--tx-password-meter-strong-background)}@media(prefers-reduced-motion:reduce){.tx-password__panel[data-styled] .tx-password__meter-bar{transition:none}}\n"],
561
+ styles: [":host{position:relative;display:inline-flex;vertical-align:top}:host(.tx-password--fluid){display:flex;width:100%}.tx-password__input{flex:1 1 auto;min-width:0;--tx-field-inset-end: calc(var(--tx-password-actions) * (var(--tx-form-field-action-size) + var(--tx-password-action-gap)))}.tx-password__input::-ms-reveal{display:none}.tx-password__actions{position:absolute;top:50%;right:var(--tx-password-action-inset);display:flex;gap:var(--tx-password-action-gap);transform:translateY(-50%)}.tx-password__action{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)}.tx-password__action:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}.tx-password__action:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-password__action:disabled{cursor:not-allowed;opacity:.6}.tx-password__panel{width:100%}.tx-password__panel[data-styled]{display:grid;gap:var(--tx-password-panel-gap);box-sizing:border-box;padding:var(--tx-password-panel-padding);border:1px solid var(--tx-password-panel-border-color);border-radius:var(--tx-password-panel-border-radius);background:var(--tx-password-panel-background);box-shadow:var(--tx-password-panel-shadow);color:var(--tx-password-panel-color);font-family:var(--tx-font-family);font-size:var(--tx-password-panel-font-size)}.tx-password__panel[data-styled] .tx-password__meter{height:var(--tx-password-meter-height);overflow:hidden;border-radius:var(--tx-password-meter-border-radius);background:var(--tx-password-meter-background)}.tx-password__panel[data-styled] .tx-password__meter-bar{display:block;width:0;height:100%;border-radius:inherit;transition:width var(--tx-password-meter-transition-duration) cubic-bezier(.2,0,0,1),background-color var(--tx-password-meter-transition-duration)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=weak] .tx-password__meter-bar{width:33.33%;background:var(--tx-password-meter-weak-background)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=medium] .tx-password__meter-bar{width:66.66%;background:var(--tx-password-meter-medium-background)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=strong] .tx-password__meter-bar{width:100%;background:var(--tx-password-meter-strong-background)}@media(prefers-reduced-motion:reduce){.tx-password__panel[data-styled] .tx-password__meter-bar{transition:none}}\n"],
562
562
  dependencies: [
563
563
  {
564
564
  kind: "directive",
@@ -628,7 +628,7 @@ i0.ɵɵngDeclareClassMetadata({
628
628
  },
629
629
  viewProviders: [provideTxIconDefaults(PASSWORD_ICON_DEFAULTS)],
630
630
  template: "<input\n #input\n txInput\n class=\"tx-password__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [type]=\"isMasked() ? 'password' : 'text'\"\n [value]=\"text()\"\n [id]=\"resolvedId()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [fluid]=\"true\"\n [invalid]=\"isInvalid()\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.placeholder]=\"placeholder() ?? null\"\n [attr.maxlength]=\"maxlength() ?? null\"\n [attr.name]=\"name() ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"feedback() && isFocused() ? infoId : null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n/>\n<span class=\"tx-password__actions\">\n @if (showClear() && hasValue() && isEditable()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n [title]=\"translations().clear\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n @if (toggleMask()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-label]=\"translations().showPassword\"\n [attr.aria-pressed]=\"!isMasked()\"\n [attr.aria-controls]=\"resolvedId()\"\n [title]=\"isMasked() ? translations().showPassword : translations().hidePassword\"\n [disabled]=\"isDisabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"toggleVisibility()\"\n >\n <tx-icon [name]=\"isMasked() ? 'eye' : 'eye-slash'\" />\n </button>\n }\n</span>\n\n<ng-template #panel>\n <div class=\"tx-password__panel\" [attr.data-styled]=\"!isUnstyled() || null\" [style]=\"hostStyle()\" [class]=\"passThrough().panel?.class\">\n @if (headerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n <div class=\"tx-password__meter\" [attr.data-strength]=\"strength()\" [class]=\"passThrough().meter?.class\" [style]=\"passThrough().meter?.style\">\n <span class=\"tx-password__meter-bar\"></span>\n </div>\n <div class=\"tx-password__info\" aria-live=\"polite\" [id]=\"infoId\" [class]=\"passThrough().info?.class\" [style]=\"passThrough().info?.style\">\n {{ info() }}\n </div>\n @if (contentTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n @if (footerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n </div>\n</ng-template>\n",
631
- styles: [":host{position:relative;display:inline-flex;vertical-align:top}:host(.tx-password--fluid){display:flex;width:100%}.tx-password__input{flex:1 1 auto;min-width:0;--tx-field-inset-end: calc(var(--tx-password-actions) * (24px + var(--tx-password-action-gap)))}.tx-password__input::-ms-reveal{display:none}.tx-password__actions{position:absolute;top:50%;right:var(--tx-password-action-inset);display:flex;gap:var(--tx-password-action-gap);transform:translateY(-50%)}.tx-password__action{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)}.tx-password__action:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}.tx-password__action:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-password__action:disabled{cursor:not-allowed;opacity:.6}.tx-password__panel{width:100%}.tx-password__panel[data-styled]{display:grid;gap:var(--tx-password-panel-gap);box-sizing:border-box;padding:var(--tx-password-panel-padding);border:1px solid var(--tx-password-panel-border-color);border-radius:var(--tx-password-panel-border-radius);background:var(--tx-password-panel-background);box-shadow:var(--tx-password-panel-shadow);color:var(--tx-password-panel-color);font-family:var(--tx-font-family);font-size:var(--tx-password-panel-font-size)}.tx-password__panel[data-styled] .tx-password__meter{height:var(--tx-password-meter-height);overflow:hidden;border-radius:var(--tx-password-meter-border-radius);background:var(--tx-password-meter-background)}.tx-password__panel[data-styled] .tx-password__meter-bar{display:block;width:0;height:100%;border-radius:inherit;transition:width var(--tx-password-meter-transition-duration) cubic-bezier(.2,0,0,1),background-color var(--tx-password-meter-transition-duration)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=weak] .tx-password__meter-bar{width:33.33%;background:var(--tx-password-meter-weak-background)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=medium] .tx-password__meter-bar{width:66.66%;background:var(--tx-password-meter-medium-background)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=strong] .tx-password__meter-bar{width:100%;background:var(--tx-password-meter-strong-background)}@media(prefers-reduced-motion:reduce){.tx-password__panel[data-styled] .tx-password__meter-bar{transition:none}}\n"]
631
+ styles: [":host{position:relative;display:inline-flex;vertical-align:top}:host(.tx-password--fluid){display:flex;width:100%}.tx-password__input{flex:1 1 auto;min-width:0;--tx-field-inset-end: calc(var(--tx-password-actions) * (var(--tx-form-field-action-size) + var(--tx-password-action-gap)))}.tx-password__input::-ms-reveal{display:none}.tx-password__actions{position:absolute;top:50%;right:var(--tx-password-action-inset);display:flex;gap:var(--tx-password-action-gap);transform:translateY(-50%)}.tx-password__action{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)}.tx-password__action:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}.tx-password__action:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-password__action:disabled{cursor:not-allowed;opacity:.6}.tx-password__panel{width:100%}.tx-password__panel[data-styled]{display:grid;gap:var(--tx-password-panel-gap);box-sizing:border-box;padding:var(--tx-password-panel-padding);border:1px solid var(--tx-password-panel-border-color);border-radius:var(--tx-password-panel-border-radius);background:var(--tx-password-panel-background);box-shadow:var(--tx-password-panel-shadow);color:var(--tx-password-panel-color);font-family:var(--tx-font-family);font-size:var(--tx-password-panel-font-size)}.tx-password__panel[data-styled] .tx-password__meter{height:var(--tx-password-meter-height);overflow:hidden;border-radius:var(--tx-password-meter-border-radius);background:var(--tx-password-meter-background)}.tx-password__panel[data-styled] .tx-password__meter-bar{display:block;width:0;height:100%;border-radius:inherit;transition:width var(--tx-password-meter-transition-duration) cubic-bezier(.2,0,0,1),background-color var(--tx-password-meter-transition-duration)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=weak] .tx-password__meter-bar{width:33.33%;background:var(--tx-password-meter-weak-background)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=medium] .tx-password__meter-bar{width:66.66%;background:var(--tx-password-meter-medium-background)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=strong] .tx-password__meter-bar{width:100%;background:var(--tx-password-meter-strong-background)}@media(prefers-reduced-motion:reduce){.tx-password__panel[data-styled] .tx-password__meter-bar{transition:none}}\n"]
632
632
  }]
633
633
  }],
634
634
  ctorParameters: () => [],
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-password.mjs","names":[],"sources":["../../../../packages/ui/password/src/password-templates.directive.ts","../../../../packages/ui/password/src/password.icons.ts","../../../../packages/ui/password/src/password.theme.ts","../../../../packages/ui/password/src/password.component.ts","../../../../packages/ui/password/src/password.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxPasswordTemplateContext } from './password.types';\n\n@Directive({ selector: 'ng-template[txPasswordHeader]' })\nexport class TxPasswordHeaderTemplate {\n readonly templateRef = inject<TemplateRef<TxPasswordTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxPasswordHeaderTemplate, context: unknown): context is TxPasswordTemplateContext {\n return !!context;\n }\n}\n\n@Directive({ selector: 'ng-template[txPasswordContent]' })\nexport class TxPasswordContentTemplate {\n readonly templateRef = inject<TemplateRef<TxPasswordTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxPasswordContentTemplate, context: unknown): context is TxPasswordTemplateContext {\n return !!context;\n }\n}\n\n@Directive({ selector: 'ng-template[txPasswordFooter]' })\nexport class TxPasswordFooterTemplate {\n readonly templateRef = inject<TemplateRef<TxPasswordTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxPasswordFooterTemplate, context: unknown): context is TxPasswordTemplateContext {\n return !!context;\n }\n}\n","import { TxIconSet, txIconEye, txIconEyeSlash, txIconInfo, txIconText, txIconTimes } from '@tectra-ng/icons';\n\nexport const PASSWORD_ICON_DEFAULTS: TxIconSet = {\n eye: txIconEye,\n 'eye-slash': txIconEyeSlash,\n info: txIconInfo,\n text: txIconText,\n times: txIconTimes,\n};\n","import { fieldTokens, formFieldTokens, passwordTokens } from '@tectra-ng/themes';\n\nexport const PASSWORD_THEME = {\n field: fieldTokens,\n formField: formFieldTokens,\n password: passwordTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n forwardRef,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectFluid } from '@tectra-ng/core/fluid';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { TxOverlay, TxOverlayRef } from '@tectra-ng/core/overlay';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraPasswordTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxInput } from '@tectra-ng/ui/input';\nimport { TxPasswordContentTemplate, TxPasswordFooterTemplate, TxPasswordHeaderTemplate } from './password-templates.directive';\nimport { TxPasswordPart, TxPasswordSize, TxPasswordStrength, TxPasswordVariant } from './password.types';\nimport { PASSWORD_ICON_DEFAULTS } from './password.icons';\nimport { PASSWORD_THEME } from './password.theme';\n\nconst MEDIUM = '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})';\nconst STRONG = '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})';\n\n@Component({\n selector: 'tx-password',\n imports: [TxInput, TxIcon, NgTemplateOutlet],\n templateUrl: './password.component.html',\n styleUrl: './password.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxPassword), multi: true }],\n host: {\n class: 'tx-password',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-password--fluid]': 'isFluid()',\n '[class.tx-password--filled]': 'hasValue()',\n '[class.tx-password--invalid]': 'isInvalid()',\n '[class.tx-password--disabled]': 'isDisabled()',\n },\n viewProviders: [provideTxIconDefaults(PASSWORD_ICON_DEFAULTS)],\n})\nexport class TxPassword extends TxFormControlBase<string> {\n private readonly passwordTheme = injectTokens(PASSWORD_THEME);\n\n private overlay = inject(TxOverlay);\n private viewContainerRef = inject(ViewContainerRef);\n private generatedId = uniqueId('tx-password');\n private panelRef: TxOverlayRef | null = null;\n\n readonly feedback = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly toggleMask = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly showClear = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly placeholder = input<string | undefined>(undefined);\n readonly promptLabel = input<string | undefined>(undefined);\n readonly weakLabel = input<string | undefined>(undefined);\n readonly mediumLabel = input<string | undefined>(undefined);\n readonly strongLabel = input<string | undefined>(undefined);\n readonly mediumRegex = input<string | RegExp>(MEDIUM);\n readonly strongRegex = input<string | RegExp>(STRONG);\n readonly autocomplete = input<string>('current-password');\n readonly size = input<TxPasswordSize>('medium');\n readonly variant = input<TxPasswordVariant>('outlined');\n readonly fluid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input<boolean, unknown>(false, { alias: 'disabled', transform: booleanAttribute });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly required = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly maxlength = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly name = input<string | undefined>(undefined);\n readonly inputId = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly tabindex = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly dt = input<TectraDeepPartial<TectraPasswordTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxPasswordPart, TxPassword> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly strengthChange = output<TxPasswordStrength | null>();\n readonly cleared = output<void>();\n\n readonly headerTemplate = contentChild(TxPasswordHeaderTemplate);\n readonly contentTemplate = contentChild(TxPasswordContentTemplate);\n readonly footerTemplate = contentChild(TxPasswordFooterTemplate);\n readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\n readonly panelTemplate = viewChild.required<TemplateRef<unknown>>('panel');\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly isFluid = injectFluid(this.fluid);\n readonly isInvalid = injectFieldInvalid(this.invalid);\n readonly passThrough = injectPassThrough('password', this, this.pt, this.ptOptions);\n\n readonly isMasked = signal(true);\n readonly isFocused = signal(false);\n readonly resolvedId = computed(() => this.inputId() ?? this.generatedId);\n readonly infoId = `${this.generatedId}-info`;\n readonly text = computed(() => this.value() ?? '');\n readonly hasValue = computed(() => this.text() !== '');\n readonly isDisabled = computed(() => this.disabled() || this.disabledInput());\n readonly isEditable = computed(() => !this.isDisabled() && !this.readonly());\n readonly strength = computed<TxPasswordStrength | null>(() => {\n const value = this.text();\n if (!value) {\n return null;\n }\n if (toRegExp(this.strongRegex()).test(value)) {\n return 'strong';\n }\n return toRegExp(this.mediumRegex()).test(value) ? 'medium' : 'weak';\n });\n readonly info = computed(() => {\n const t = this.translations();\n switch (this.strength()) {\n case 'strong':\n return this.strongLabel() ?? t.passwordStrong;\n case 'medium':\n return this.mediumLabel() ?? t.passwordMedium;\n case 'weak':\n return this.weakLabel() ?? t.passwordWeak;\n default:\n return this.promptLabel() ?? t.passwordPrompt;\n }\n });\n readonly actionCount = computed(() => Number(this.toggleMask()) + Number(this.showClear() && this.hasValue() && this.isEditable()));\n readonly templateContext = computed(() => ({ $implicit: this.strength(), value: this.text() }));\n readonly hostStyle = computed(() => ({\n ...toStyleObject(this.dt(), '--tx-password'),\n '--tx-password-actions': String(this.actionCount()),\n ...this.passThrough().root?.style,\n }));\n\n constructor() {\n super();\n let previous: TxPasswordStrength | null = null;\n effect(() => {\n const strength = this.strength();\n if (strength !== previous) {\n previous = strength;\n this.strengthChange.emit(strength);\n }\n });\n inject(DestroyRef).onDestroy(() => this.panelRef?.close());\n }\n\n focus(): void {\n this.inputRef().nativeElement.focus();\n }\n\n onInput(event: Event): void {\n this.updateValue((event.target as HTMLInputElement).value);\n }\n\n onFocus(): void {\n this.isFocused.set(true);\n if (this.feedback() && this.isEditable() && !this.panelRef) {\n this.panelRef = this.overlay.open(this.panelTemplate(), {\n origin: this.inputRef().nativeElement,\n viewContainerRef: this.viewContainerRef,\n placement: 'bottom-start',\n matchWidth: true,\n closeOnOutsideClick: false,\n restoreFocus: false,\n panelClass: 'tx-password-overlay',\n });\n this.panelRef.closed.subscribe(() => (this.panelRef = null));\n }\n }\n\n onBlur(): void {\n this.isFocused.set(false);\n this.markTouched();\n this.panelRef?.close();\n }\n\n fill(value: string, reveal = true): void {\n this.updateValue(value);\n if (reveal) {\n this.isMasked.set(false);\n }\n }\n\n toggleVisibility(): void {\n this.isMasked.update((masked) => !masked);\n this.focus();\n }\n\n clear(): void {\n this.updateValue('');\n this.cleared.emit();\n this.focus();\n }\n}\n\nfunction toRegExp(pattern: string | RegExp): RegExp {\n return typeof pattern === 'string' ? new RegExp(pattern) : pattern;\n}\n","<input\n #input\n txInput\n class=\"tx-password__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [type]=\"isMasked() ? 'password' : 'text'\"\n [value]=\"text()\"\n [id]=\"resolvedId()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [fluid]=\"true\"\n [invalid]=\"isInvalid()\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.placeholder]=\"placeholder() ?? null\"\n [attr.maxlength]=\"maxlength() ?? null\"\n [attr.name]=\"name() ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"feedback() && isFocused() ? infoId : null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n/>\n<span class=\"tx-password__actions\">\n @if (showClear() && hasValue() && isEditable()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n [title]=\"translations().clear\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n @if (toggleMask()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-label]=\"translations().showPassword\"\n [attr.aria-pressed]=\"!isMasked()\"\n [attr.aria-controls]=\"resolvedId()\"\n [title]=\"isMasked() ? translations().showPassword : translations().hidePassword\"\n [disabled]=\"isDisabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"toggleVisibility()\"\n >\n <tx-icon [name]=\"isMasked() ? 'eye' : 'eye-slash'\" />\n </button>\n }\n</span>\n\n<ng-template #panel>\n <div class=\"tx-password__panel\" [attr.data-styled]=\"!isUnstyled() || null\" [style]=\"hostStyle()\" [class]=\"passThrough().panel?.class\">\n @if (headerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n <div class=\"tx-password__meter\" [attr.data-strength]=\"strength()\" [class]=\"passThrough().meter?.class\" [style]=\"passThrough().meter?.style\">\n <span class=\"tx-password__meter-bar\"></span>\n </div>\n <div class=\"tx-password__info\" aria-live=\"polite\" [id]=\"infoId\" [class]=\"passThrough().info?.class\" [style]=\"passThrough().info?.style\">\n {{ info() }}\n </div>\n @if (contentTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n @if (footerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n </div>\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;;AAIA,IAAa,2BAAb,MAAa,yBAAwB;CAC1B,cAAc,OAA+C,WAAW;CAEjF,OAAO,uBAAuB,YAAsC,SAAgB;EAClF,OAAO,CAAC,CAAC;CACX;CALW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAwB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAxB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAwB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAxB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAwB,YAAA,CAAA;EADpC,MAAA;EAAU,MAAA,CAAA,EAAE,UAAU,gCAA+B,CAAE;;;AAUxD,IAAa,4BAAb,MAAa,0BAAyB;CAC3B,cAAc,OAA+C,WAAW;CAEjF,OAAO,uBAAuB,YAAuC,SAAgB;EACnF,OAAO,CAAC,CAAC;CACX;CALW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAyB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAzB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAyB,cAAA;EAAA,UAAA;EAAA,UAAA;CAAA,CAAA;;AAAzB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAyB,YAAA,CAAA;EADrC,MAA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AAA,CAAA,GAAA,iBAAA,wBAAwB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBACvB,yBAAyB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAC1B,wBAAwB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CACM,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,eAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CACV,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AA6G3E,SAAS,SAAS,SAAwB;CACxC,OAAO,OAAO,YAAY,WAAW,IAAI,OAAO,OAAO,IAAI;AAC7D"}
1
+ {"version":3,"file":"tectra-ng-ui-password.mjs","names":[],"sources":["../../../../packages/ui/password/src/password-templates.directive.ts","../../../../packages/ui/password/src/password.icons.ts","../../../../packages/ui/password/src/password.theme.ts","../../../../packages/ui/password/src/password.component.ts","../../../../packages/ui/password/src/password.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxPasswordTemplateContext } from './password.types';\n\n@Directive({ selector: 'ng-template[txPasswordHeader]' })\nexport class TxPasswordHeaderTemplate {\n readonly templateRef = inject<TemplateRef<TxPasswordTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxPasswordHeaderTemplate, context: unknown): context is TxPasswordTemplateContext {\n return !!context;\n }\n}\n\n@Directive({ selector: 'ng-template[txPasswordContent]' })\nexport class TxPasswordContentTemplate {\n readonly templateRef = inject<TemplateRef<TxPasswordTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxPasswordContentTemplate, context: unknown): context is TxPasswordTemplateContext {\n return !!context;\n }\n}\n\n@Directive({ selector: 'ng-template[txPasswordFooter]' })\nexport class TxPasswordFooterTemplate {\n readonly templateRef = inject<TemplateRef<TxPasswordTemplateContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxPasswordFooterTemplate, context: unknown): context is TxPasswordTemplateContext {\n return !!context;\n }\n}\n","import { TxIconSet, txIconEye, txIconEyeSlash, txIconInfo, txIconText, txIconTimes } from '@tectra-ng/icons';\n\nexport const PASSWORD_ICON_DEFAULTS: TxIconSet = {\n eye: txIconEye,\n 'eye-slash': txIconEyeSlash,\n info: txIconInfo,\n text: txIconText,\n times: txIconTimes,\n};\n","import { fieldTokens, formFieldTokens, passwordTokens } from '@tectra-ng/themes';\n\nexport const PASSWORD_THEME = {\n field: fieldTokens,\n formField: formFieldTokens,\n password: passwordTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n TemplateRef,\n ViewContainerRef,\n booleanAttribute,\n computed,\n contentChild,\n effect,\n forwardRef,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { uniqueId } from '@tectra-ng/core/a11y';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectFluid } from '@tectra-ng/core/fluid';\nimport { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { TxOverlay, TxOverlayRef } from '@tectra-ng/core/overlay';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraPasswordTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxInput } from '@tectra-ng/ui/input';\nimport { TxPasswordContentTemplate, TxPasswordFooterTemplate, TxPasswordHeaderTemplate } from './password-templates.directive';\nimport { TxPasswordPart, TxPasswordSize, TxPasswordStrength, TxPasswordVariant } from './password.types';\nimport { PASSWORD_ICON_DEFAULTS } from './password.icons';\nimport { PASSWORD_THEME } from './password.theme';\n\nconst MEDIUM = '^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})';\nconst STRONG = '^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})';\n\n@Component({\n selector: 'tx-password',\n imports: [TxInput, TxIcon, NgTemplateOutlet],\n templateUrl: './password.component.html',\n styleUrl: './password.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxPassword), multi: true }],\n host: {\n class: 'tx-password',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-password--fluid]': 'isFluid()',\n '[class.tx-password--filled]': 'hasValue()',\n '[class.tx-password--invalid]': 'isInvalid()',\n '[class.tx-password--disabled]': 'isDisabled()',\n },\n viewProviders: [provideTxIconDefaults(PASSWORD_ICON_DEFAULTS)],\n})\nexport class TxPassword extends TxFormControlBase<string> {\n private readonly passwordTheme = injectTokens(PASSWORD_THEME);\n\n private overlay = inject(TxOverlay);\n private viewContainerRef = inject(ViewContainerRef);\n private generatedId = uniqueId('tx-password');\n private panelRef: TxOverlayRef | null = null;\n\n readonly feedback = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly toggleMask = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly showClear = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly placeholder = input<string | undefined>(undefined);\n readonly promptLabel = input<string | undefined>(undefined);\n readonly weakLabel = input<string | undefined>(undefined);\n readonly mediumLabel = input<string | undefined>(undefined);\n readonly strongLabel = input<string | undefined>(undefined);\n readonly mediumRegex = input<string | RegExp>(MEDIUM);\n readonly strongRegex = input<string | RegExp>(STRONG);\n readonly autocomplete = input<string>('current-password');\n readonly size = input<TxPasswordSize>('medium');\n readonly variant = input<TxPasswordVariant>('outlined');\n readonly fluid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input<boolean, unknown>(false, { alias: 'disabled', transform: booleanAttribute });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly required = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly maxlength = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly name = input<string | undefined>(undefined);\n readonly inputId = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly tabindex = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly dt = input<TectraDeepPartial<TectraPasswordTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxPasswordPart, TxPassword> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly strengthChange = output<TxPasswordStrength | null>();\n readonly cleared = output<void>();\n\n readonly headerTemplate = contentChild(TxPasswordHeaderTemplate);\n readonly contentTemplate = contentChild(TxPasswordContentTemplate);\n readonly footerTemplate = contentChild(TxPasswordFooterTemplate);\n readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\n readonly panelTemplate = viewChild.required<TemplateRef<unknown>>('panel');\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly isFluid = injectFluid(this.fluid);\n readonly isInvalid = injectFieldInvalid(this.invalid);\n readonly passThrough = injectPassThrough('password', this, this.pt, this.ptOptions);\n\n readonly isMasked = signal(true);\n readonly isFocused = signal(false);\n readonly resolvedId = computed(() => this.inputId() ?? this.generatedId);\n readonly infoId = `${this.generatedId}-info`;\n readonly text = computed(() => this.value() ?? '');\n readonly hasValue = computed(() => this.text() !== '');\n readonly isDisabled = computed(() => this.disabled() || this.disabledInput());\n readonly isEditable = computed(() => !this.isDisabled() && !this.readonly());\n readonly strength = computed<TxPasswordStrength | null>(() => {\n const value = this.text();\n if (!value) {\n return null;\n }\n if (toRegExp(this.strongRegex()).test(value)) {\n return 'strong';\n }\n return toRegExp(this.mediumRegex()).test(value) ? 'medium' : 'weak';\n });\n readonly info = computed(() => {\n const t = this.translations();\n switch (this.strength()) {\n case 'strong':\n return this.strongLabel() ?? t.passwordStrong;\n case 'medium':\n return this.mediumLabel() ?? t.passwordMedium;\n case 'weak':\n return this.weakLabel() ?? t.passwordWeak;\n default:\n return this.promptLabel() ?? t.passwordPrompt;\n }\n });\n readonly actionCount = computed(() => Number(this.toggleMask()) + Number(this.showClear() && this.hasValue() && this.isEditable()));\n readonly templateContext = computed(() => ({ $implicit: this.strength(), value: this.text() }));\n readonly hostStyle = computed(() => ({\n ...toStyleObject(this.dt(), '--tx-password'),\n '--tx-password-actions': String(this.actionCount()),\n ...this.passThrough().root?.style,\n }));\n\n constructor() {\n super();\n let previous: TxPasswordStrength | null = null;\n effect(() => {\n const strength = this.strength();\n if (strength !== previous) {\n previous = strength;\n this.strengthChange.emit(strength);\n }\n });\n inject(DestroyRef).onDestroy(() => this.panelRef?.close());\n }\n\n focus(): void {\n this.inputRef().nativeElement.focus();\n }\n\n onInput(event: Event): void {\n this.updateValue((event.target as HTMLInputElement).value);\n }\n\n onFocus(): void {\n this.isFocused.set(true);\n if (this.feedback() && this.isEditable() && !this.panelRef) {\n this.panelRef = this.overlay.open(this.panelTemplate(), {\n origin: this.inputRef().nativeElement,\n viewContainerRef: this.viewContainerRef,\n placement: 'bottom-start',\n matchWidth: true,\n closeOnOutsideClick: false,\n restoreFocus: false,\n panelClass: 'tx-password-overlay',\n });\n this.panelRef.closed.subscribe(() => (this.panelRef = null));\n }\n }\n\n onBlur(): void {\n this.isFocused.set(false);\n this.markTouched();\n this.panelRef?.close();\n }\n\n fill(value: string, reveal = true): void {\n this.updateValue(value);\n if (reveal) {\n this.isMasked.set(false);\n }\n }\n\n toggleVisibility(): void {\n this.isMasked.update((masked) => !masked);\n this.focus();\n }\n\n clear(): void {\n this.updateValue('');\n this.cleared.emit();\n this.focus();\n }\n}\n\nfunction toRegExp(pattern: string | RegExp): RegExp {\n return typeof pattern === 'string' ? new RegExp(pattern) : pattern;\n}\n","<input\n #input\n txInput\n class=\"tx-password__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [type]=\"isMasked() ? 'password' : 'text'\"\n [value]=\"text()\"\n [id]=\"resolvedId()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [fluid]=\"true\"\n [invalid]=\"isInvalid()\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.placeholder]=\"placeholder() ?? null\"\n [attr.maxlength]=\"maxlength() ?? null\"\n [attr.name]=\"name() ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"feedback() && isFocused() ? infoId : null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n/>\n<span class=\"tx-password__actions\">\n @if (showClear() && hasValue() && isEditable()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n [title]=\"translations().clear\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n @if (toggleMask()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-label]=\"translations().showPassword\"\n [attr.aria-pressed]=\"!isMasked()\"\n [attr.aria-controls]=\"resolvedId()\"\n [title]=\"isMasked() ? translations().showPassword : translations().hidePassword\"\n [disabled]=\"isDisabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"toggleVisibility()\"\n >\n <tx-icon [name]=\"isMasked() ? 'eye' : 'eye-slash'\" />\n </button>\n }\n</span>\n\n<ng-template #panel>\n <div class=\"tx-password__panel\" [attr.data-styled]=\"!isUnstyled() || null\" [style]=\"hostStyle()\" [class]=\"passThrough().panel?.class\">\n @if (headerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n <div class=\"tx-password__meter\" [attr.data-strength]=\"strength()\" [class]=\"passThrough().meter?.class\" [style]=\"passThrough().meter?.style\">\n <span class=\"tx-password__meter-bar\"></span>\n </div>\n <div class=\"tx-password__info\" aria-live=\"polite\" [id]=\"infoId\" [class]=\"passThrough().info?.class\" [style]=\"passThrough().info?.style\">\n {{ info() }}\n </div>\n @if (contentTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n @if (footerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n </div>\n</ng-template>\n"],"mappings":";;;;;;;;;;;;;;AAIA,IAAa,2BAAb,MAAa,yBAAwB;CAC1B,cAAc,OAA+C,WAAW;CAEjF,OAAO,uBAAuB,YAAsC,SAAgB;EAClF,OAAO,CAAC,CAAC;CACX;CALW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAwB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAxB,O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AA,CAAA;CAAA;AAAA,CAAA;AA6G3E,SAAS,SAAS,SAAwB;CACxC,OAAO,OAAO,YAAY,WAAW,IAAI,OAAO,OAAO,IAAI;AAC7D"}
@@ -3,7 +3,7 @@ import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input,
3
3
  import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
4
4
  import { injectTranslations } from "@tectra-ng/core/i18n";
5
5
  import { optionalBoolean } from "@tectra-ng/core/utils";
6
- import { TxIcon, injectTxIcons, provideTxIconDefaults, txIconInfo, txIconTimes } from "@tectra-ng/icons";
6
+ import { TxIcon, injectTxIcons, provideTxIconDefaults, splitIconValue, txIconInfo, txIconTimes } from "@tectra-ng/icons";
7
7
  import { pillTokens, toStyleObject } from "@tectra-ng/themes";
8
8
  const PILL_ICON_DEFAULTS = {
9
9
  info: txIconInfo,
@@ -40,10 +40,14 @@ var TxPill = class TxPill {
40
40
  passThrough = injectPassThrough("pill", this, this.pt, this.ptOptions);
41
41
  resolvedTone = computed(() => this.tone() === "secondary" ? "neutral" : this.tone(), ...ngDevMode ? [{ debugName: "resolvedTone" }] : /* istanbul ignore next */ []);
42
42
  resolvedSize = computed(() => this.size() === "normal" ? "medium" : this.size(), ...ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []);
43
- iconName = computed(() => {
44
- const icon = this.icon();
45
- return icon && this.txIconRegistry.has(icon) ? icon : null;
46
- }, ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
43
+ iconParts = computed(() => {
44
+ const parts = splitIconValue(this.icon());
45
+ return parts && this.txIconRegistry.has(parts.name) ? parts : null;
46
+ }, ...ngDevMode ? [{ debugName: "iconParts" }] : /* istanbul ignore next */ []);
47
+ iconName = computed(() => this.iconParts()?.name ?? null, ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
48
+ iconModifiers = computed(() => this.iconParts()?.modifiers.join(" ") ?? "", ...ngDevMode ? [{ debugName: "iconModifiers" }] : /* istanbul ignore next */ []);
49
+ iconSpin = computed(() => this.iconParts()?.spin ?? false, ...ngDevMode ? [{ debugName: "iconSpin" }] : /* istanbul ignore next */ []);
50
+ removeText = computed(() => this.removeLabel() || this.translations().remove, ...ngDevMode ? [{ debugName: "removeText" }] : /* istanbul ignore next */ []);
47
51
  hostStyle = computed(() => ({
48
52
  ...toStyleObject(this.dt(), "--tx-pill"),
49
53
  ...this.passThrough().root?.style
@@ -170,15 +174,21 @@ var TxPill = class TxPill {
170
174
  @if (dot()) {
171
175
  <span class="tx-pill__dot" aria-hidden="true"></span>
172
176
  } @else if (icon(); as icon) {
173
- <span class="tx-pill__icon" aria-hidden="true" [class]="passThrough().icon?.class" [style]="passThrough().icon?.style">
177
+ <span
178
+ class="tx-pill__icon"
179
+ aria-hidden="true"
180
+ [class.tx-pill__icon--spin]="iconSpin()"
181
+ [class]="passThrough().icon?.class"
182
+ [style]="passThrough().icon?.style"
183
+ >
174
184
  @if (iconName(); as name) {
175
- <tx-icon [name]="name" />
185
+ <tx-icon [name]="name" [class]="iconModifiers()" />
176
186
  } @else {
177
187
  <span [class]="icon"></span>
178
188
  }
179
189
  </span>
180
190
  }
181
- <ng-content select="[txPillLeading]" />
191
+ <span class="tx-pill__leading" [class]="passThrough().leading?.class" [style]="passThrough().leading?.style"><ng-content select="[txPillLeading]" /></span>
182
192
  <span class="tx-pill__label" [class]="passThrough().label?.class" [style]="passThrough().label?.style">{{ value() }}<ng-content /></span>
183
193
  @if (removable()) {
184
194
  <button
@@ -186,8 +196,8 @@ var TxPill = class TxPill {
186
196
  class="tx-pill__remove"
187
197
  [class]="passThrough().remove?.class"
188
198
  [style]="passThrough().remove?.style"
189
- [attr.aria-label]="removeLabel() ?? translations().remove"
190
- [title]="removeLabel() ?? translations().remove"
199
+ [attr.aria-label]="removeText()"
200
+ [title]="removeText()"
191
201
  (click)="remove($event)"
192
202
  (keydown.delete)="remove($event)"
193
203
  (keydown.backspace)="remove($event)"
@@ -197,7 +207,7 @@ var TxPill = class TxPill {
197
207
  }
198
208
  `,
199
209
  isInline: true,
200
- styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-pill__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-pill__label:empty{display:none}:host([data-styled]){--_tone: var(--tx-pill-neutral-color);--_solid-background: var(--tx-pill-neutral-solid-background);--_solid-color: var(--tx-pill-neutral-solid-color);flex-shrink:0;gap:var(--tx-pill-gap);box-sizing:border-box;padding:var(--tx-pill-padding-y) var(--tx-pill-padding-x);border-radius:var(--tx-pill-border-radius);background:color-mix(in srgb,var(--_tone) var(--tx-pill-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-pill-font-size);font-weight:var(--tx-pill-font-weight);line-height:var(--tx-pill-line-height);font-variant-numeric:tabular-nums}:host([data-styled][data-tone=primary]){--_tone: var(--tx-pill-primary-color);--_solid-background: var(--tx-pill-primary-solid-background);--_solid-color: var(--tx-pill-primary-solid-color)}:host([data-styled][data-tone=success]){--_tone: var(--tx-pill-success-color);--_solid-background: var(--tx-pill-success-solid-background);--_solid-color: var(--tx-pill-success-solid-color)}:host([data-styled][data-tone=info]){--_tone: var(--tx-pill-info-color);--_solid-background: var(--tx-pill-info-solid-background);--_solid-color: var(--tx-pill-info-solid-color)}:host([data-styled][data-tone=warn]){--_tone: var(--tx-pill-warn-color);--_solid-background: var(--tx-pill-warn-solid-background);--_solid-color: var(--tx-pill-warn-solid-color)}:host([data-styled][data-tone=danger]){--_tone: var(--tx-pill-danger-color);--_solid-background: var(--tx-pill-danger-solid-background);--_solid-color: var(--tx-pill-danger-solid-color)}:host([data-styled][data-tone=help]){--_tone: var(--tx-pill-help-color);--_solid-background: var(--tx-pill-help-solid-background);--_solid-color: var(--tx-pill-help-solid-color)}:host([data-styled][data-tone=contrast]){--_tone: var(--tx-pill-contrast-color);--_solid-background: var(--tx-pill-contrast-solid-background);--_solid-color: var(--tx-pill-contrast-solid-color)}:host([data-styled][data-size=small]){padding:var(--tx-pill-sm-padding-y) var(--tx-pill-sm-padding-x);font-size:var(--tx-pill-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-pill-lg-padding-y) var(--tx-pill-lg-padding-x);font-size:var(--tx-pill-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-pill-lg-gap)}:host([data-styled][data-variant=solid]){background:var(--_solid-background);color:var(--_solid-color)}:host([data-styled][data-variant=outline]){background:transparent;box-shadow:inset 0 0 0 1px var(--tx-pill-outline-border-color);color:var(--tx-pill-outline-color)}:host([data-styled][data-variant=outline]) .tx-pill__icon,:host([data-styled][data-variant=outline]) .tx-pill__dot{color:var(--_tone)}:host([data-styled]) .tx-pill__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-pill-icon-size)}:host([data-styled]) .tx-pill__dot{flex-shrink:0;width:var(--tx-pill-dot-size);height:var(--tx-pill-dot-size);border-radius:50%;background:currentColor}:host([data-styled]) ::ng-deep>[txPillLeading]{flex-shrink:0;margin-inline-start:calc(var(--tx-pill-padding-x) * -.5)}:host([data-styled]) .tx-pill__remove{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-pill-remove-size);height:var(--tx-pill-remove-size);margin-inline-end:-4px;padding:0;border:none;border-radius:50%;background:transparent;color:inherit;font-size:.8em;opacity:.7;cursor:pointer;transition:opacity var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-pill__remove:hover{background:color-mix(in srgb,currentColor 18%,transparent);opacity:1}:host([data-styled]) .tx-pill__remove:focus-visible{outline:2px solid var(--tx-pill-focus-ring-color);outline-offset:1px;opacity:1}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-pill__remove{transition:none}}\n"],
210
+ styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-pill__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-pill__label:empty,.tx-pill__leading:empty{display:none}.tx-pill__leading{display:inline-flex;flex-shrink:0;align-items:center}:host([data-styled]){--_tone: var(--tx-pill-neutral-color);--_solid-background: var(--tx-pill-neutral-solid-background);--_solid-color: var(--tx-pill-neutral-solid-color);flex-shrink:0;gap:var(--tx-pill-gap);box-sizing:border-box;padding:var(--tx-pill-padding-y) var(--tx-pill-padding-x);border-radius:var(--tx-pill-border-radius);background:color-mix(in srgb,var(--_tone) var(--tx-pill-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-pill-font-size);font-weight:var(--tx-pill-font-weight);line-height:var(--tx-pill-line-height);font-variant-numeric:tabular-nums}:host([data-styled][data-tone=primary]){--_tone: var(--tx-pill-primary-color);--_solid-background: var(--tx-pill-primary-solid-background);--_solid-color: var(--tx-pill-primary-solid-color)}:host([data-styled][data-tone=success]){--_tone: var(--tx-pill-success-color);--_solid-background: var(--tx-pill-success-solid-background);--_solid-color: var(--tx-pill-success-solid-color)}:host([data-styled][data-tone=info]){--_tone: var(--tx-pill-info-color);--_solid-background: var(--tx-pill-info-solid-background);--_solid-color: var(--tx-pill-info-solid-color)}:host([data-styled][data-tone=warn]){--_tone: var(--tx-pill-warn-color);--_solid-background: var(--tx-pill-warn-solid-background);--_solid-color: var(--tx-pill-warn-solid-color)}:host([data-styled][data-tone=danger]){--_tone: var(--tx-pill-danger-color);--_solid-background: var(--tx-pill-danger-solid-background);--_solid-color: var(--tx-pill-danger-solid-color)}:host([data-styled][data-tone=help]){--_tone: var(--tx-pill-help-color);--_solid-background: var(--tx-pill-help-solid-background);--_solid-color: var(--tx-pill-help-solid-color)}:host([data-styled][data-tone=contrast]){--_tone: var(--tx-pill-contrast-color);--_solid-background: var(--tx-pill-contrast-solid-background);--_solid-color: var(--tx-pill-contrast-solid-color)}:host([data-styled][data-size=small]){padding:var(--tx-pill-sm-padding-y) var(--tx-pill-sm-padding-x);font-size:var(--tx-pill-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-pill-lg-padding-y) var(--tx-pill-lg-padding-x);font-size:var(--tx-pill-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-pill-lg-gap)}:host([data-styled][data-variant=solid]){background:var(--_solid-background);color:var(--_solid-color)}:host([data-styled][data-variant=outline]){background:transparent;box-shadow:inset 0 0 0 1px var(--tx-pill-outline-border-color);color:var(--tx-pill-outline-color)}:host([data-styled][data-variant=outline]) .tx-pill__icon,:host([data-styled][data-variant=outline]) .tx-pill__dot{color:var(--_tone)}:host([data-styled]) .tx-pill__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-pill-icon-size)}:host([data-styled]) .tx-pill__dot{flex-shrink:0;width:var(--tx-pill-dot-size);height:var(--tx-pill-dot-size);border-radius:50%;background:currentColor}:host([data-styled]) .tx-pill__leading{margin-inline-start:calc(var(--tx-pill-padding-x) * -.5)}:host([data-styled]) .tx-pill__icon--spin tx-icon{animation:tx-pill-spin var(--tx-pill-spin-duration) linear infinite}@keyframes tx-pill-spin{to{transform:rotate(360deg)}}:host([data-styled]) .tx-pill__remove{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-pill-remove-size);height:var(--tx-pill-remove-size);margin-inline-end:var(--tx-pill-remove-offset);padding:0;border:none;border-radius:50%;background:transparent;color:inherit;font-size:.8em;opacity:.7;cursor:pointer;transition:opacity var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-pill__remove:hover{background:color-mix(in srgb,currentColor 18%,transparent);opacity:1}:host([data-styled]) .tx-pill__remove:focus-visible{outline:2px solid var(--tx-pill-focus-ring-color);outline-offset:1px;opacity:1}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-pill__remove{transition:none}:host([data-styled]) .tx-pill__icon--spin tx-icon{animation-duration:calc(var(--tx-pill-spin-duration) * 3)}}\n"],
201
211
  dependencies: [{
202
212
  kind: "component",
203
213
  type: TxIcon,
@@ -222,15 +232,21 @@ i0.ɵɵngDeclareClassMetadata({
222
232
  @if (dot()) {
223
233
  <span class="tx-pill__dot" aria-hidden="true"></span>
224
234
  } @else if (icon(); as icon) {
225
- <span class="tx-pill__icon" aria-hidden="true" [class]="passThrough().icon?.class" [style]="passThrough().icon?.style">
235
+ <span
236
+ class="tx-pill__icon"
237
+ aria-hidden="true"
238
+ [class.tx-pill__icon--spin]="iconSpin()"
239
+ [class]="passThrough().icon?.class"
240
+ [style]="passThrough().icon?.style"
241
+ >
226
242
  @if (iconName(); as name) {
227
- <tx-icon [name]="name" />
243
+ <tx-icon [name]="name" [class]="iconModifiers()" />
228
244
  } @else {
229
245
  <span [class]="icon"></span>
230
246
  }
231
247
  </span>
232
248
  }
233
- <ng-content select="[txPillLeading]" />
249
+ <span class="tx-pill__leading" [class]="passThrough().leading?.class" [style]="passThrough().leading?.style"><ng-content select="[txPillLeading]" /></span>
234
250
  <span class="tx-pill__label" [class]="passThrough().label?.class" [style]="passThrough().label?.style">{{ value() }}<ng-content /></span>
235
251
  @if (removable()) {
236
252
  <button
@@ -238,8 +254,8 @@ i0.ɵɵngDeclareClassMetadata({
238
254
  class="tx-pill__remove"
239
255
  [class]="passThrough().remove?.class"
240
256
  [style]="passThrough().remove?.style"
241
- [attr.aria-label]="removeLabel() ?? translations().remove"
242
- [title]="removeLabel() ?? translations().remove"
257
+ [attr.aria-label]="removeText()"
258
+ [title]="removeText()"
243
259
  (click)="remove($event)"
244
260
  (keydown.delete)="remove($event)"
245
261
  (keydown.backspace)="remove($event)"
@@ -259,7 +275,7 @@ i0.ɵɵngDeclareClassMetadata({
259
275
  "[attr.data-size]": "resolvedSize()"
260
276
  },
261
277
  viewProviders: [provideTxIconDefaults(PILL_ICON_DEFAULTS)],
262
- styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-pill__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-pill__label:empty{display:none}:host([data-styled]){--_tone: var(--tx-pill-neutral-color);--_solid-background: var(--tx-pill-neutral-solid-background);--_solid-color: var(--tx-pill-neutral-solid-color);flex-shrink:0;gap:var(--tx-pill-gap);box-sizing:border-box;padding:var(--tx-pill-padding-y) var(--tx-pill-padding-x);border-radius:var(--tx-pill-border-radius);background:color-mix(in srgb,var(--_tone) var(--tx-pill-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-pill-font-size);font-weight:var(--tx-pill-font-weight);line-height:var(--tx-pill-line-height);font-variant-numeric:tabular-nums}:host([data-styled][data-tone=primary]){--_tone: var(--tx-pill-primary-color);--_solid-background: var(--tx-pill-primary-solid-background);--_solid-color: var(--tx-pill-primary-solid-color)}:host([data-styled][data-tone=success]){--_tone: var(--tx-pill-success-color);--_solid-background: var(--tx-pill-success-solid-background);--_solid-color: var(--tx-pill-success-solid-color)}:host([data-styled][data-tone=info]){--_tone: var(--tx-pill-info-color);--_solid-background: var(--tx-pill-info-solid-background);--_solid-color: var(--tx-pill-info-solid-color)}:host([data-styled][data-tone=warn]){--_tone: var(--tx-pill-warn-color);--_solid-background: var(--tx-pill-warn-solid-background);--_solid-color: var(--tx-pill-warn-solid-color)}:host([data-styled][data-tone=danger]){--_tone: var(--tx-pill-danger-color);--_solid-background: var(--tx-pill-danger-solid-background);--_solid-color: var(--tx-pill-danger-solid-color)}:host([data-styled][data-tone=help]){--_tone: var(--tx-pill-help-color);--_solid-background: var(--tx-pill-help-solid-background);--_solid-color: var(--tx-pill-help-solid-color)}:host([data-styled][data-tone=contrast]){--_tone: var(--tx-pill-contrast-color);--_solid-background: var(--tx-pill-contrast-solid-background);--_solid-color: var(--tx-pill-contrast-solid-color)}:host([data-styled][data-size=small]){padding:var(--tx-pill-sm-padding-y) var(--tx-pill-sm-padding-x);font-size:var(--tx-pill-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-pill-lg-padding-y) var(--tx-pill-lg-padding-x);font-size:var(--tx-pill-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-pill-lg-gap)}:host([data-styled][data-variant=solid]){background:var(--_solid-background);color:var(--_solid-color)}:host([data-styled][data-variant=outline]){background:transparent;box-shadow:inset 0 0 0 1px var(--tx-pill-outline-border-color);color:var(--tx-pill-outline-color)}:host([data-styled][data-variant=outline]) .tx-pill__icon,:host([data-styled][data-variant=outline]) .tx-pill__dot{color:var(--_tone)}:host([data-styled]) .tx-pill__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-pill-icon-size)}:host([data-styled]) .tx-pill__dot{flex-shrink:0;width:var(--tx-pill-dot-size);height:var(--tx-pill-dot-size);border-radius:50%;background:currentColor}:host([data-styled]) ::ng-deep>[txPillLeading]{flex-shrink:0;margin-inline-start:calc(var(--tx-pill-padding-x) * -.5)}:host([data-styled]) .tx-pill__remove{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-pill-remove-size);height:var(--tx-pill-remove-size);margin-inline-end:-4px;padding:0;border:none;border-radius:50%;background:transparent;color:inherit;font-size:.8em;opacity:.7;cursor:pointer;transition:opacity var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-pill__remove:hover{background:color-mix(in srgb,currentColor 18%,transparent);opacity:1}:host([data-styled]) .tx-pill__remove:focus-visible{outline:2px solid var(--tx-pill-focus-ring-color);outline-offset:1px;opacity:1}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-pill__remove{transition:none}}\n"]
278
+ styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-pill__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-pill__label:empty,.tx-pill__leading:empty{display:none}.tx-pill__leading{display:inline-flex;flex-shrink:0;align-items:center}:host([data-styled]){--_tone: var(--tx-pill-neutral-color);--_solid-background: var(--tx-pill-neutral-solid-background);--_solid-color: var(--tx-pill-neutral-solid-color);flex-shrink:0;gap:var(--tx-pill-gap);box-sizing:border-box;padding:var(--tx-pill-padding-y) var(--tx-pill-padding-x);border-radius:var(--tx-pill-border-radius);background:color-mix(in srgb,var(--_tone) var(--tx-pill-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-pill-font-size);font-weight:var(--tx-pill-font-weight);line-height:var(--tx-pill-line-height);font-variant-numeric:tabular-nums}:host([data-styled][data-tone=primary]){--_tone: var(--tx-pill-primary-color);--_solid-background: var(--tx-pill-primary-solid-background);--_solid-color: var(--tx-pill-primary-solid-color)}:host([data-styled][data-tone=success]){--_tone: var(--tx-pill-success-color);--_solid-background: var(--tx-pill-success-solid-background);--_solid-color: var(--tx-pill-success-solid-color)}:host([data-styled][data-tone=info]){--_tone: var(--tx-pill-info-color);--_solid-background: var(--tx-pill-info-solid-background);--_solid-color: var(--tx-pill-info-solid-color)}:host([data-styled][data-tone=warn]){--_tone: var(--tx-pill-warn-color);--_solid-background: var(--tx-pill-warn-solid-background);--_solid-color: var(--tx-pill-warn-solid-color)}:host([data-styled][data-tone=danger]){--_tone: var(--tx-pill-danger-color);--_solid-background: var(--tx-pill-danger-solid-background);--_solid-color: var(--tx-pill-danger-solid-color)}:host([data-styled][data-tone=help]){--_tone: var(--tx-pill-help-color);--_solid-background: var(--tx-pill-help-solid-background);--_solid-color: var(--tx-pill-help-solid-color)}:host([data-styled][data-tone=contrast]){--_tone: var(--tx-pill-contrast-color);--_solid-background: var(--tx-pill-contrast-solid-background);--_solid-color: var(--tx-pill-contrast-solid-color)}:host([data-styled][data-size=small]){padding:var(--tx-pill-sm-padding-y) var(--tx-pill-sm-padding-x);font-size:var(--tx-pill-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-pill-lg-padding-y) var(--tx-pill-lg-padding-x);font-size:var(--tx-pill-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-pill-lg-gap)}:host([data-styled][data-variant=solid]){background:var(--_solid-background);color:var(--_solid-color)}:host([data-styled][data-variant=outline]){background:transparent;box-shadow:inset 0 0 0 1px var(--tx-pill-outline-border-color);color:var(--tx-pill-outline-color)}:host([data-styled][data-variant=outline]) .tx-pill__icon,:host([data-styled][data-variant=outline]) .tx-pill__dot{color:var(--_tone)}:host([data-styled]) .tx-pill__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-pill-icon-size)}:host([data-styled]) .tx-pill__dot{flex-shrink:0;width:var(--tx-pill-dot-size);height:var(--tx-pill-dot-size);border-radius:50%;background:currentColor}:host([data-styled]) .tx-pill__leading{margin-inline-start:calc(var(--tx-pill-padding-x) * -.5)}:host([data-styled]) .tx-pill__icon--spin tx-icon{animation:tx-pill-spin var(--tx-pill-spin-duration) linear infinite}@keyframes tx-pill-spin{to{transform:rotate(360deg)}}:host([data-styled]) .tx-pill__remove{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-pill-remove-size);height:var(--tx-pill-remove-size);margin-inline-end:var(--tx-pill-remove-offset);padding:0;border:none;border-radius:50%;background:transparent;color:inherit;font-size:.8em;opacity:.7;cursor:pointer;transition:opacity var(--tx-motion-duration),background-color var(--tx-motion-duration)}:host([data-styled]) .tx-pill__remove:hover{background:color-mix(in srgb,currentColor 18%,transparent);opacity:1}:host([data-styled]) .tx-pill__remove:focus-visible{outline:2px solid var(--tx-pill-focus-ring-color);outline-offset:1px;opacity:1}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-pill__remove{transition:none}:host([data-styled]) .tx-pill__icon--spin tx-icon{animation-duration:calc(var(--tx-pill-spin-duration) * 3)}}\n"]
263
279
  }]
264
280
  }],
265
281
  propDecorators: {