@tectra-ng/ui 0.4.1 → 0.4.2

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 (178) hide show
  1. package/README.md +1 -1
  2. package/autocomplete/README.md +1 -1
  3. package/avatar/README.md +1 -1
  4. package/breadcrumb/README.md +1 -1
  5. package/carousel/README.md +7 -0
  6. package/color-swatches/README.md +53 -0
  7. package/data-view/README.md +8 -0
  8. package/fesm2022/tectra-ng-ui-autocomplete.mjs +17 -6
  9. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
  10. package/fesm2022/tectra-ng-ui-avatar.mjs +11 -4
  11. package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -1
  12. package/fesm2022/tectra-ng-ui-breadcrumb.mjs +5 -5
  13. package/fesm2022/tectra-ng-ui-breadcrumb.mjs.map +1 -1
  14. package/fesm2022/tectra-ng-ui-card.mjs +4 -2
  15. package/fesm2022/tectra-ng-ui-card.mjs.map +1 -1
  16. package/fesm2022/tectra-ng-ui-carousel.mjs +21 -2
  17. package/fesm2022/tectra-ng-ui-carousel.mjs.map +1 -1
  18. package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
  19. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
  20. package/fesm2022/tectra-ng-ui-checkbox.mjs +7 -4
  21. package/fesm2022/tectra-ng-ui-checkbox.mjs.map +1 -1
  22. package/fesm2022/tectra-ng-ui-chips-input.mjs +5 -2
  23. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
  24. package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
  25. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
  26. package/fesm2022/tectra-ng-ui-color-swatches.mjs +378 -0
  27. package/fesm2022/tectra-ng-ui-color-swatches.mjs.map +1 -0
  28. package/fesm2022/tectra-ng-ui-country-select.mjs +4 -2
  29. package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -1
  30. package/fesm2022/tectra-ng-ui-data-view.mjs +50 -7
  31. package/fesm2022/tectra-ng-ui-data-view.mjs.map +1 -1
  32. package/fesm2022/tectra-ng-ui-datepicker.mjs +12 -0
  33. package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -1
  34. package/fesm2022/tectra-ng-ui-dialog.mjs +7 -2
  35. package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -1
  36. package/fesm2022/tectra-ng-ui-export.mjs +5 -1
  37. package/fesm2022/tectra-ng-ui-export.mjs.map +1 -1
  38. package/fesm2022/tectra-ng-ui-file-upload.mjs +44 -30
  39. package/fesm2022/tectra-ng-ui-file-upload.mjs.map +1 -1
  40. package/fesm2022/tectra-ng-ui-galleria.mjs +63 -6
  41. package/fesm2022/tectra-ng-ui-galleria.mjs.map +1 -1
  42. package/fesm2022/tectra-ng-ui-image.mjs +6 -2
  43. package/fesm2022/tectra-ng-ui-image.mjs.map +1 -1
  44. package/fesm2022/tectra-ng-ui-input.mjs +2 -2
  45. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
  46. package/fesm2022/tectra-ng-ui-knob.mjs +3 -0
  47. package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -1
  48. package/fesm2022/tectra-ng-ui-list-input.mjs +2 -2
  49. package/fesm2022/tectra-ng-ui-list-input.mjs.map +1 -1
  50. package/fesm2022/tectra-ng-ui-menu.mjs +110 -10
  51. package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -1
  52. package/fesm2022/tectra-ng-ui-message.mjs +61 -18
  53. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
  54. package/fesm2022/tectra-ng-ui-multiselect.mjs +14 -6
  55. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
  56. package/fesm2022/tectra-ng-ui-paginator.mjs +8 -2
  57. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
  58. package/fesm2022/tectra-ng-ui-panel-menu.mjs +15 -8
  59. package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -1
  60. package/fesm2022/tectra-ng-ui-panel.mjs +2 -0
  61. package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -1
  62. package/fesm2022/tectra-ng-ui-password.mjs +9 -0
  63. package/fesm2022/tectra-ng-ui-password.mjs.map +1 -1
  64. package/fesm2022/tectra-ng-ui-popover.mjs +16 -9
  65. package/fesm2022/tectra-ng-ui-popover.mjs.map +1 -1
  66. package/fesm2022/tectra-ng-ui-progress-bar.mjs +3 -0
  67. package/fesm2022/tectra-ng-ui-progress-bar.mjs.map +1 -1
  68. package/fesm2022/tectra-ng-ui-radio-button.mjs +28 -8
  69. package/fesm2022/tectra-ng-ui-radio-button.mjs.map +1 -1
  70. package/fesm2022/tectra-ng-ui-rating.mjs +6 -0
  71. package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -1
  72. package/fesm2022/tectra-ng-ui-select.mjs +193 -10
  73. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
  74. package/fesm2022/tectra-ng-ui-split-button.mjs +6 -3
  75. package/fesm2022/tectra-ng-ui-split-button.mjs.map +1 -1
  76. package/fesm2022/tectra-ng-ui-table.mjs +245 -49
  77. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
  78. package/fesm2022/tectra-ng-ui-tabs.mjs +10 -7
  79. package/fesm2022/tectra-ng-ui-tabs.mjs.map +1 -1
  80. package/fesm2022/tectra-ng-ui-timeline.mjs +87 -10
  81. package/fesm2022/tectra-ng-ui-timeline.mjs.map +1 -1
  82. package/fesm2022/tectra-ng-ui-toast.mjs +24 -7
  83. package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -1
  84. package/fesm2022/tectra-ng-ui-toggle-switch.mjs +7 -4
  85. package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -1
  86. package/fesm2022/tectra-ng-ui-tooltip.mjs +5 -4
  87. package/fesm2022/tectra-ng-ui-tooltip.mjs.map +1 -1
  88. package/fesm2022/tectra-ng-ui-tree-select.mjs +14 -6
  89. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
  90. package/fesm2022/tectra-ng-ui-tree-table.mjs +3 -1
  91. package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
  92. package/fesm2022/tectra-ng-ui-tree.mjs +47 -14
  93. package/fesm2022/tectra-ng-ui-tree.mjs.map +1 -1
  94. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs +45 -4
  95. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs.map +1 -1
  96. package/fesm2022/tectra-ng-ui.mjs +1 -1
  97. package/file-upload/README.md +2 -1
  98. package/galleria/README.md +9 -0
  99. package/menu/README.md +10 -2
  100. package/message/README.md +4 -3
  101. package/multiselect/README.md +1 -1
  102. package/package.json +8 -4
  103. package/popover/README.md +2 -2
  104. package/select/README.md +9 -0
  105. package/split-button/README.md +1 -1
  106. package/table/README.md +15 -2
  107. package/tabs/README.md +1 -1
  108. package/timeline/README.md +10 -2
  109. package/tree/README.md +7 -0
  110. package/tree-select/README.md +1 -1
  111. package/types/tectra-ng-ui-autocomplete.d.ts +2 -1
  112. package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -1
  113. package/types/tectra-ng-ui-avatar.d.ts +4 -2
  114. package/types/tectra-ng-ui-avatar.d.ts.map +1 -1
  115. package/types/tectra-ng-ui-breadcrumb.d.ts +3 -3
  116. package/types/tectra-ng-ui-card.d.ts.map +1 -1
  117. package/types/tectra-ng-ui-carousel.d.ts +14 -5
  118. package/types/tectra-ng-ui-carousel.d.ts.map +1 -1
  119. package/types/tectra-ng-ui-checkbox.d.ts +1 -0
  120. package/types/tectra-ng-ui-checkbox.d.ts.map +1 -1
  121. package/types/tectra-ng-ui-chips-input.d.ts +1 -0
  122. package/types/tectra-ng-ui-chips-input.d.ts.map +1 -1
  123. package/types/tectra-ng-ui-color-swatches.d.ts +141 -0
  124. package/types/tectra-ng-ui-color-swatches.d.ts.map +1 -0
  125. package/types/tectra-ng-ui-data-view.d.ts +31 -12
  126. package/types/tectra-ng-ui-data-view.d.ts.map +1 -1
  127. package/types/tectra-ng-ui-datepicker.d.ts +6 -0
  128. package/types/tectra-ng-ui-datepicker.d.ts.map +1 -1
  129. package/types/tectra-ng-ui-dialog.d.ts +1 -0
  130. package/types/tectra-ng-ui-dialog.d.ts.map +1 -1
  131. package/types/tectra-ng-ui-file-upload.d.ts +10 -7
  132. package/types/tectra-ng-ui-file-upload.d.ts.map +1 -1
  133. package/types/tectra-ng-ui-galleria.d.ts +42 -15
  134. package/types/tectra-ng-ui-galleria.d.ts.map +1 -1
  135. package/types/tectra-ng-ui-image.d.ts.map +1 -1
  136. package/types/tectra-ng-ui-knob.d.ts +1 -0
  137. package/types/tectra-ng-ui-knob.d.ts.map +1 -1
  138. package/types/tectra-ng-ui-menu.d.ts +35 -12
  139. package/types/tectra-ng-ui-menu.d.ts.map +1 -1
  140. package/types/tectra-ng-ui-message.d.ts +15 -6
  141. package/types/tectra-ng-ui-message.d.ts.map +1 -1
  142. package/types/tectra-ng-ui-multiselect.d.ts +2 -2
  143. package/types/tectra-ng-ui-multiselect.d.ts.map +1 -1
  144. package/types/tectra-ng-ui-paginator.d.ts +2 -0
  145. package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
  146. package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -1
  147. package/types/tectra-ng-ui-panel.d.ts.map +1 -1
  148. package/types/tectra-ng-ui-password.d.ts +3 -0
  149. package/types/tectra-ng-ui-password.d.ts.map +1 -1
  150. package/types/tectra-ng-ui-popover.d.ts +4 -2
  151. package/types/tectra-ng-ui-popover.d.ts.map +1 -1
  152. package/types/tectra-ng-ui-progress-bar.d.ts +1 -0
  153. package/types/tectra-ng-ui-progress-bar.d.ts.map +1 -1
  154. package/types/tectra-ng-ui-radio-button.d.ts +3 -1
  155. package/types/tectra-ng-ui-radio-button.d.ts.map +1 -1
  156. package/types/tectra-ng-ui-rating.d.ts +2 -0
  157. package/types/tectra-ng-ui-rating.d.ts.map +1 -1
  158. package/types/tectra-ng-ui-select.d.ts +85 -20
  159. package/types/tectra-ng-ui-select.d.ts.map +1 -1
  160. package/types/tectra-ng-ui-split-button.d.ts.map +1 -1
  161. package/types/tectra-ng-ui-table.d.ts +121 -46
  162. package/types/tectra-ng-ui-table.d.ts.map +1 -1
  163. package/types/tectra-ng-ui-tabs.d.ts +6 -4
  164. package/types/tectra-ng-ui-tabs.d.ts.map +1 -1
  165. package/types/tectra-ng-ui-timeline.d.ts +46 -9
  166. package/types/tectra-ng-ui-timeline.d.ts.map +1 -1
  167. package/types/tectra-ng-ui-toast.d.ts +3 -0
  168. package/types/tectra-ng-ui-toast.d.ts.map +1 -1
  169. package/types/tectra-ng-ui-toggle-switch.d.ts +1 -0
  170. package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -1
  171. package/types/tectra-ng-ui-tooltip.d.ts.map +1 -1
  172. package/types/tectra-ng-ui-tree-select.d.ts +1 -1
  173. package/types/tectra-ng-ui-tree.d.ts +18 -7
  174. package/types/tectra-ng-ui-tree.d.ts.map +1 -1
  175. package/types/tectra-ng-ui-virtual-scroller.d.ts +29 -10
  176. package/types/tectra-ng-ui-virtual-scroller.d.ts.map +1 -1
  177. package/types/tectra-ng-ui.d.ts +1 -1
  178. package/virtual-scroller/README.md +8 -0
@@ -5,7 +5,8 @@ import { Subject } from "rxjs";
5
5
  import { NgTemplateOutlet } from "@angular/common";
6
6
  import { injectPassThrough, injectTokens, injectUnstyled } from "@tectra-ng/core/config";
7
7
  import { injectTranslations } from "@tectra-ng/core/i18n";
8
- import { optionalBoolean } from "@tectra-ng/core/utils";
8
+ import { TxOverlayStack } from "@tectra-ng/core/overlay";
9
+ import { TxAnimationReplay, optionalBoolean } from "@tectra-ng/core/utils";
9
10
  import { TxIcon, injectTxIcons, provideTxIconDefaults, txIconCheck, txIconExclamationTriangle, txIconInfo, txIconInfoCircle, txIconText, txIconTimes } from "@tectra-ng/icons";
10
11
  import { iconTokens, progressSpinnerTokens, toStyleObject, toastTokens } from "@tectra-ng/themes";
11
12
  import { TxProgressSpinner } from "@tectra-ng/ui/progress-spinner";
@@ -212,6 +213,9 @@ i0.ɵɵngDeclareClassMetadata({
212
213
  });
213
214
  var TxToastTemplate = class TxToastTemplate {
214
215
  template = inject(TemplateRef);
216
+ static ngTemplateContextGuard(_directive, context) {
217
+ return !!context;
218
+ }
215
219
  static ɵfac = i0.ɵɵngDeclareFactory({
216
220
  minVersion: "12.0.0",
217
221
  version: "22.2.5",
@@ -268,6 +272,8 @@ var TxToast = class TxToast {
268
272
  iconRegistry = injectTxIcons();
269
273
  host = inject(ElementRef).nativeElement;
270
274
  document = inject(DOCUMENT);
275
+ stack = inject(TxOverlayStack);
276
+ leaveTop = () => void 0;
271
277
  swipe = null;
272
278
  pausedIds = [];
273
279
  position = input("bottom-center", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
@@ -315,7 +321,10 @@ var TxToast = class TxToast {
315
321
  }, ...ngDevMode ? [{ debugName: "offsets" }] : /* istanbul ignore next */ []);
316
322
  constructor() {
317
323
  afterNextRender(() => {
318
- if (!this.inPlace()) this.document.body.appendChild(this.host);
324
+ if (!this.inPlace()) {
325
+ this.document.body.appendChild(this.host);
326
+ this.leaveTop = this.stack.keepOnTop(this.host);
327
+ }
319
328
  });
320
329
  afterRenderEffect(() => {
321
330
  const toasts = this.ordered();
@@ -339,6 +348,7 @@ var TxToast = class TxToast {
339
348
  });
340
349
  inject(DestroyRef).onDestroy(() => {
341
350
  this.resumeAll();
351
+ this.leaveTop();
342
352
  this.host.remove();
343
353
  });
344
354
  }
@@ -531,8 +541,8 @@ var TxToast = class TxToast {
531
541
  isSignal: true
532
542
  }],
533
543
  ngImport: i0,
534
- template: "@for (toast of ordered(); track toast.id; let index = $index) {\n <div\n class=\"tx-toast__item\"\n animate.leave=\"tx-toast__item--leave\"\n [attr.data-front]=\"index === 0 ? '' : null\"\n [attr.data-visible]=\"index < max() ? '' : null\"\n [attr.data-mounted]=\"isMounted(toast) ? '' : null\"\n [attr.data-swiping]=\"swiping()?.id === toast.id ? '' : null\"\n [style.--_index]=\"index\"\n [style.--_z]=\"ordered().length - index\"\n [style.--_offset.px]=\"offsets()[index]\"\n [style.--_height.px]=\"heightOf(toast)\"\n [style.--_front-height.px]=\"frontHeight()\"\n [style.--_swipe-x.px]=\"swiping()?.id === toast.id ? swiping()?.x : 0\"\n [style.--_swipe-y.px]=\"swiping()?.id === toast.id ? swiping()?.y : 0\"\n [attr.aria-hidden]=\"index < max() ? null : true\"\n (pointerdown)=\"onPointerDown(toast, $event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp()\"\n (pointercancel)=\"onPointerUp()\"\n >\n <div\n class=\"tx-toast__pill\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n [attr.data-severity]=\"toast.severity\"\n [class.tx-toast__pill--loading]=\"toast.loading\"\n [attr.aria-busy]=\"toast.loading || null\"\n >\n @if (toast.template ?? customTemplate()?.template; as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"contextOf(toast)\" />\n } @else {\n @if (toast.loading) {\n <span class=\"tx-toast__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-progress-spinner class=\"tx-toast__spinner\" [size]=\"14\" [strokeWidth]=\"6\" />\n </span>\n } @else if (iconOf(toast); as icon) {\n <span class=\"tx-toast__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-icon [name]=\"icon\" />\n </span>\n }\n <span class=\"tx-toast__body\" [class]=\"passThrough().body?.class\" [style]=\"passThrough().body?.style\">\n @if (toast.title) {\n <span\n class=\"tx-toast__title\"\n [class.tx-toast__title--hidden]=\"!!toast.text\"\n [class]=\"passThrough().title?.class\"\n [style]=\"passThrough().title?.style\"\n >{{ toast.title }}</span\n >\n }\n @if (toast.text) {\n <span class=\"tx-toast__text\" [class]=\"passThrough().text?.class\" [style]=\"passThrough().text?.style\">{{ toast.text }}</span>\n }\n </span>\n @if (toast.actions.length) {\n <span class=\"tx-toast__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n @for (action of toast.actions; track action.label) {\n <button type=\"button\" class=\"tx-toast__action\" (click)=\"run(toast, action)\">{{ action.label }}</button>\n }\n </span>\n }\n }\n @if (toast.closable) {\n <button\n type=\"button\"\n class=\"tx-toast__close\"\n [class]=\"passThrough().closeButton?.class\"\n [style]=\"passThrough().closeButton?.style\"\n [attr.aria-label]=\"translations().close\"\n (click)=\"close(toast)\"\n >\n <tx-icon name=\"times\" />\n </button>\n }\n @if (toast.showProgress && !toast.sticky && toast.life > 0) {\n <span class=\"tx-toast__progress-track\" aria-hidden=\"true\">\n @for (version of [toast.version]; track version) {\n <span\n class=\"tx-toast__progress\"\n [class]=\"passThrough().progress?.class\"\n [style]=\"passThrough().progress?.style\"\n [style.animation-duration.ms]=\"toast.life\"\n [class.tx-toast__progress--paused]=\"toast.paused\"\n ></span>\n }\n </span>\n }\n </div>\n </div>\n}\n",
535
- styles: [":host{--_raise: 1;position:fixed;z-index:var(--tx-layer-toast);box-sizing:border-box;width:var(--tx-toast-width)}:host([data-position^=top]){top:var(--tx-toast-inset-top)}:host([data-position^=bottom]){--_raise: -1;bottom:var(--tx-toast-inset-bottom)}:host([data-position$=left]){left:var(--tx-toast-inset-x)}:host([data-position$=right]){right:var(--tx-toast-inset-x)}:host([data-position$=center]){left:50%;transform:translate(-50%)}.tx-toast__item{position:absolute;inset-inline:0;z-index:var(--_z);display:flex;justify-content:center;outline:none;touch-action:none;opacity:0;transform:translateY(calc(100% * var(--_raise) * -1))}:host([data-position^=top]) .tx-toast__item{top:0}:host([data-position^=bottom]) .tx-toast__item{bottom:0}:host([data-position$=left]) .tx-toast__item{justify-content:flex-start}:host([data-position$=right]) .tx-toast__item{justify-content:flex-end}.tx-toast__item[data-mounted]{opacity:1;transform:translateY(0)}:host(:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]){height:var(--_front-height);overflow:hidden;transform:translateY(calc(var(--_raise) * var(--_index) * var(--tx-toast-gap))) scale(calc(1 - var(--_index) * .05))}:host(:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]) .tx-toast__pill>*{opacity:0}:host([data-position^=bottom]:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]){align-items:flex-start}:host([data-position^=top]:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]){align-items:flex-end}:host([data-expanded]) .tx-toast__item[data-mounted]{transform:translateY(calc(var(--_raise) * var(--_offset)))}:host([data-expanded]) .tx-toast__item:after{position:absolute;inset-inline:0;height:calc(var(--tx-toast-gap) + 1px);content:\"\"}:host([data-position^=top][data-expanded]) .tx-toast__item:after{bottom:100%}:host([data-position^=bottom][data-expanded]) .tx-toast__item:after{top:100%}.tx-toast__item:not([data-visible]){opacity:0;pointer-events:none}.tx-toast__item[data-swiping]{transform:translate(var(--_swipe-x),var(--_swipe-y))!important;transition:none!important}.tx-toast__item--leave{opacity:0!important;pointer-events:none;transform:translateY(calc(var(--_raise) * -100%))!important}.tx-toast__pill{position:relative;display:inline-flex;align-items:center;box-sizing:border-box;max-width:100%}.tx-toast__body{display:flex;flex-direction:column;min-width:0}.tx-toast__title--hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host([data-styled]) .tx-toast__item{transition:transform var(--tx-toast-duration),opacity var(--tx-toast-duration),height var(--tx-toast-duration)}:host([data-styled]) .tx-toast__pill>*{transition:opacity var(--tx-toast-duration)}:host([data-styled]) .tx-toast__pill{--_tone: var(--tx-toast-info-tone);gap:var(--tx-toast-item-gap);padding:var(--tx-toast-item-padding-y) var(--tx-toast-item-padding-end) var(--tx-toast-item-padding-y) var(--tx-toast-item-padding-start);border-radius:var(--tx-toast-item-border-radius);background:var(--tx-toast-item-background);color:var(--tx-toast-item-color);font-family:var(--tx-font-family);font-size:var(--tx-toast-item-font-size);font-weight:var(--tx-toast-item-font-weight);box-shadow:0 0 0 1px var(--tx-toast-item-ring-color),var(--tx-toast-item-shadow);-webkit-backdrop-filter:blur(var(--tx-toast-item-blur)) saturate(1.5);backdrop-filter:blur(var(--tx-toast-item-blur)) saturate(1.5)}:host([data-styled]) .tx-toast__pill[data-severity=success]{--_tone: var(--tx-toast-success-tone)}:host([data-styled]) .tx-toast__pill[data-severity=warn]{--_tone: var(--tx-toast-warn-tone)}:host([data-styled]) .tx-toast__pill[data-severity=danger]{--_tone: var(--tx-toast-danger-tone)}:host([data-styled]) .tx-toast__pill[data-severity=secondary]{--_tone: var(--tx-toast-secondary-tone)}:host([data-styled]) .tx-toast__pill[data-severity=contrast]{--_tone: var(--tx-toast-contrast-tone)}:host([data-styled]) .tx-toast__pill--loading{padding-inline-end:var(--tx-toast-item-loading-padding-end)}:host([data-styled]) .tx-toast__icon{display:grid;flex-shrink:0;align-self:flex-start;place-items:center;width:var(--tx-toast-icon-size);height:var(--tx-toast-icon-size);border-radius:50%;background:color-mix(in srgb,var(--_tone) var(--tx-toast-icon-tint),transparent);color:var(--_tone);font-size:var(--tx-toast-icon-font-size);--tx-icon-stroke-width: var(--tx-toast-icon-stroke-width)}:host([data-styled]) .tx-toast__spinner{--tx-progress-spinner-color: var(--_tone);--tx-progress-spinner-track-color: transparent}:host([data-styled]) .tx-toast__body{padding-block:var(--tx-toast-text-padding-y);line-height:var(--tx-toast-text-line-height)}:host([data-styled]) .tx-toast__text,:host([data-styled]) .tx-toast__title{display:-webkit-box;overflow:hidden;overflow-wrap:break-word;-webkit-box-orient:vertical;-webkit-line-clamp:var(--tx-toast-text-lines)}:host([data-styled]) .tx-toast__title--hidden{display:block}:host([data-styled]) .tx-toast__actions{display:flex;flex-shrink:0;gap:6px}:host([data-styled]) .tx-toast__action{flex-shrink:0;padding:var(--tx-toast-action-padding);border:0;border-radius:9999px;background:color-mix(in srgb,var(--_tone) var(--tx-toast-action-tint),transparent);color:var(--_tone);font:inherit;font-size:var(--tx-toast-action-font-size);font-weight:var(--tx-toast-action-font-weight);cursor:pointer;transition:background-color .15s}:host([data-styled]) .tx-toast__action:hover{background:color-mix(in srgb,var(--_tone) var(--tx-toast-action-hover-tint),transparent)}:host([data-styled]) .tx-toast__action:focus-visible{outline:none;box-shadow:var(--tx-toast-focus-ring-shadow)}:host([data-styled]) .tx-toast__close{position:absolute;top:var(--tx-toast-close-button-offset);right:var(--tx-toast-close-button-offset);display:grid;place-items:center;width:var(--tx-toast-close-button-size);height:var(--tx-toast-close-button-size);padding:0;border:0;border-radius:50%;background:var(--tx-toast-close-button-background);color:var(--tx-toast-close-button-color);font-size:var(--tx-toast-close-button-font-size);box-shadow:0 0 0 1px var(--tx-toast-close-button-ring-color),var(--tx-toast-close-button-shadow);cursor:pointer;opacity:0;scale:.75;transition:opacity .2s,scale .2s}:host([data-styled]) .tx-toast__close:hover{color:var(--tx-toast-close-button-hover-color)}:host([data-styled]) .tx-toast__close:focus-visible{outline:none;opacity:1;scale:1;box-shadow:var(--tx-toast-focus-ring-shadow)}:host([data-styled]) .tx-toast__pill:hover .tx-toast__close{opacity:1;scale:1}:host([data-styled]) .tx-toast__progress-track{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none}:host([data-styled]) .tx-toast__progress{position:absolute;inset-inline:0;bottom:0;height:var(--tx-toast-progress-height);background:var(--_tone);transform-origin:left center;animation-name:tx-toast-progress;animation-timing-function:linear;animation-fill-mode:forwards}:host([data-styled]) .tx-toast__progress--paused{animation-play-state:paused}@media(hover:none){:host([data-styled]) .tx-toast__close{opacity:1;scale:1}}@keyframes tx-toast-progress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-toast__item,:host([data-styled]) .tx-toast__pill>*,:host([data-styled]) .tx-toast__close{transition:none}:host([data-styled]) .tx-toast__progress{opacity:.6}}\n"],
544
+ template: "@for (toast of ordered(); track toast.id; let index = $index) {\n <div\n class=\"tx-toast__item\"\n animate.leave=\"tx-toast__item--leave\"\n [attr.data-front]=\"index === 0 ? '' : null\"\n [attr.data-visible]=\"index < max() ? '' : null\"\n [attr.data-mounted]=\"isMounted(toast) ? '' : null\"\n [attr.data-swiping]=\"swiping()?.id === toast.id ? '' : null\"\n [style.--_index]=\"index\"\n [style.--_z]=\"ordered().length - index\"\n [style.--_offset.px]=\"offsets()[index]\"\n [style.--_height.px]=\"heightOf(toast)\"\n [style.--_front-height.px]=\"frontHeight()\"\n [style.--_swipe-x.px]=\"swiping()?.id === toast.id ? swiping()?.x : 0\"\n [style.--_swipe-y.px]=\"swiping()?.id === toast.id ? swiping()?.y : 0\"\n [attr.aria-hidden]=\"index < max() ? null : true\"\n (pointerdown)=\"onPointerDown(toast, $event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp()\"\n (pointercancel)=\"onPointerUp()\"\n >\n <div\n class=\"tx-toast__pill\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n [attr.data-severity]=\"toast.severity\"\n [class.tx-toast__pill--loading]=\"toast.loading\"\n [attr.aria-busy]=\"toast.loading || null\"\n >\n @if (toast.template ?? customTemplate()?.template; as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"contextOf(toast)\" />\n } @else {\n @if (toast.loading) {\n <span class=\"tx-toast__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-progress-spinner class=\"tx-toast__spinner\" [size]=\"14\" [strokeWidth]=\"6\" />\n </span>\n } @else if (iconOf(toast); as icon) {\n <span class=\"tx-toast__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-icon [name]=\"icon\" />\n </span>\n }\n <span class=\"tx-toast__body\" [class]=\"passThrough().body?.class\" [style]=\"passThrough().body?.style\">\n @if (toast.title) {\n <span\n class=\"tx-toast__title\"\n [class.tx-toast__title--hidden]=\"!!toast.text\"\n [class]=\"passThrough().title?.class\"\n [style]=\"passThrough().title?.style\"\n >{{ toast.title }}</span\n >\n }\n @if (toast.text) {\n <span class=\"tx-toast__text\" [class]=\"passThrough().text?.class\" [style]=\"passThrough().text?.style\">{{ toast.text }}</span>\n }\n </span>\n @if (toast.actions.length) {\n <span class=\"tx-toast__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n @for (action of toast.actions; track action.label) {\n <button type=\"button\" class=\"tx-toast__action\" (click)=\"run(toast, action)\">{{ action.label }}</button>\n }\n </span>\n }\n }\n @if (toast.closable) {\n <button\n type=\"button\"\n class=\"tx-toast__close\"\n [class]=\"passThrough().closeButton?.class\"\n [style]=\"passThrough().closeButton?.style\"\n [attr.aria-label]=\"translations().close\"\n (click)=\"close(toast)\"\n >\n <tx-icon name=\"times\" />\n </button>\n }\n @if (toast.showProgress && !toast.sticky && toast.life > 0) {\n <span class=\"tx-toast__progress-track\" aria-hidden=\"true\">\n <span\n class=\"tx-toast__progress\"\n [txAnimationReplay]=\"toast.version\"\n [class]=\"passThrough().progress?.class\"\n [style]=\"passThrough().progress?.style\"\n [style.animation-duration.ms]=\"toast.life\"\n [class.tx-toast__progress--paused]=\"toast.paused\"\n ></span>\n </span>\n }\n </div>\n </div>\n}\n",
545
+ styles: [":host{--_raise: 1;position:fixed;z-index:var(--tx-layer-toast);box-sizing:border-box;width:var(--tx-toast-width)}:host([popover]){inset:auto;overflow:visible;margin:0;padding:0;border:0;background:none;color:inherit}:host([data-position^=top]){top:var(--tx-toast-inset-top)}:host([data-position^=bottom]){--_raise: -1;bottom:var(--tx-toast-inset-bottom)}:host([data-position$=left]){left:var(--tx-toast-inset-x)}:host([data-position$=right]){right:var(--tx-toast-inset-x)}:host([data-position$=center]){left:50%;transform:translate(-50%)}.tx-toast__item{position:absolute;inset-inline:0;z-index:var(--_z);display:flex;justify-content:center;outline:none;touch-action:none;opacity:0;transform:translateY(calc(100% * var(--_raise) * -1))}:host([data-position^=top]) .tx-toast__item{top:0}:host([data-position^=bottom]) .tx-toast__item{bottom:0}:host([data-position$=left]) .tx-toast__item{justify-content:flex-start}:host([data-position$=right]) .tx-toast__item{justify-content:flex-end}.tx-toast__item[data-mounted]{opacity:1;transform:translateY(0)}:host(:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]){height:var(--_front-height);overflow:hidden;transform:translateY(calc(var(--_raise) * var(--_index) * var(--tx-toast-gap))) scale(calc(1 - var(--_index) * .05))}:host(:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]) .tx-toast__pill>*{opacity:0}:host([data-position^=bottom]:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]){align-items:flex-start}:host([data-position^=top]:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]){align-items:flex-end}:host([data-expanded]) .tx-toast__item[data-mounted]{transform:translateY(calc(var(--_raise) * var(--_offset)))}:host([data-expanded]) .tx-toast__item:after{position:absolute;inset-inline:0;height:calc(var(--tx-toast-gap) + 1px);content:\"\"}:host([data-position^=top][data-expanded]) .tx-toast__item:after{bottom:100%}:host([data-position^=bottom][data-expanded]) .tx-toast__item:after{top:100%}.tx-toast__item:not([data-visible]){opacity:0;pointer-events:none}.tx-toast__item[data-swiping]{transform:translate(var(--_swipe-x),var(--_swipe-y))!important;transition:none!important}.tx-toast__item--leave{opacity:0!important;pointer-events:none;transform:translateY(calc(var(--_raise) * -100%))!important}.tx-toast__pill{position:relative;display:inline-flex;align-items:center;box-sizing:border-box;max-width:100%}.tx-toast__body{display:flex;flex-direction:column;min-width:0}.tx-toast__title--hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host([data-styled]) .tx-toast__item{transition:transform var(--tx-toast-duration),opacity var(--tx-toast-duration),height var(--tx-toast-duration)}:host([data-styled]) .tx-toast__pill>*{transition:opacity var(--tx-toast-duration)}:host([data-styled]) .tx-toast__pill{--_tone: var(--tx-toast-info-tone);gap:var(--tx-toast-item-gap);padding:var(--tx-toast-item-padding-y) var(--tx-toast-item-padding-end) var(--tx-toast-item-padding-y) var(--tx-toast-item-padding-start);border-radius:var(--tx-toast-item-border-radius);background:var(--tx-toast-item-background);color:var(--tx-toast-item-color);font-family:var(--tx-font-family);font-size:var(--tx-toast-item-font-size);font-weight:var(--tx-toast-item-font-weight);box-shadow:0 0 0 1px var(--tx-toast-item-ring-color),var(--tx-toast-item-shadow);-webkit-backdrop-filter:blur(var(--tx-toast-item-blur)) saturate(1.5);backdrop-filter:blur(var(--tx-toast-item-blur)) saturate(1.5)}:host([data-styled]) .tx-toast__pill[data-severity=success]{--_tone: var(--tx-toast-success-tone)}:host([data-styled]) .tx-toast__pill[data-severity=warn]{--_tone: var(--tx-toast-warn-tone)}:host([data-styled]) .tx-toast__pill[data-severity=danger]{--_tone: var(--tx-toast-danger-tone)}:host([data-styled]) .tx-toast__pill[data-severity=secondary]{--_tone: var(--tx-toast-secondary-tone)}:host([data-styled]) .tx-toast__pill[data-severity=contrast]{--_tone: var(--tx-toast-contrast-tone)}:host([data-styled]) .tx-toast__pill--loading{padding-inline-end:var(--tx-toast-item-loading-padding-end)}:host([data-styled]) .tx-toast__icon{display:grid;flex-shrink:0;align-self:flex-start;place-items:center;width:var(--tx-toast-icon-size);height:var(--tx-toast-icon-size);border-radius:50%;background:color-mix(in srgb,var(--_tone) var(--tx-toast-icon-tint),transparent);color:var(--_tone);font-size:var(--tx-toast-icon-font-size);--tx-icon-stroke-width: var(--tx-toast-icon-stroke-width)}:host([data-styled]) .tx-toast__spinner{--tx-progress-spinner-color: var(--_tone);--tx-progress-spinner-track-color: transparent}:host([data-styled]) .tx-toast__body{padding-block:var(--tx-toast-text-padding-y);line-height:var(--tx-toast-text-line-height)}:host([data-styled]) .tx-toast__text,:host([data-styled]) .tx-toast__title{display:-webkit-box;overflow:hidden;overflow-wrap:break-word;-webkit-box-orient:vertical;-webkit-line-clamp:var(--tx-toast-text-lines)}:host([data-styled]) .tx-toast__title--hidden{display:block}:host([data-styled]) .tx-toast__actions{display:flex;flex-shrink:0;gap:6px}:host([data-styled]) .tx-toast__action{flex-shrink:0;padding:var(--tx-toast-action-padding);border:0;border-radius:9999px;background:color-mix(in srgb,var(--_tone) var(--tx-toast-action-tint),transparent);color:var(--_tone);font:inherit;font-size:var(--tx-toast-action-font-size);font-weight:var(--tx-toast-action-font-weight);cursor:pointer;transition:background-color .15s}:host([data-styled]) .tx-toast__action:hover{background:color-mix(in srgb,var(--_tone) var(--tx-toast-action-hover-tint),transparent)}:host([data-styled]) .tx-toast__action:focus-visible{outline:none;box-shadow:var(--tx-toast-focus-ring-shadow)}:host([data-styled]) .tx-toast__close{position:absolute;top:var(--tx-toast-close-button-offset);right:var(--tx-toast-close-button-offset);display:grid;place-items:center;width:var(--tx-toast-close-button-size);height:var(--tx-toast-close-button-size);padding:0;border:0;border-radius:50%;background:var(--tx-toast-close-button-background);color:var(--tx-toast-close-button-color);font-size:var(--tx-toast-close-button-font-size);box-shadow:0 0 0 1px var(--tx-toast-close-button-ring-color),var(--tx-toast-close-button-shadow);cursor:pointer;opacity:0;scale:.75;transition:opacity .2s,scale .2s}:host([data-styled]) .tx-toast__close:hover{color:var(--tx-toast-close-button-hover-color)}:host([data-styled]) .tx-toast__close:focus-visible{outline:none;opacity:1;scale:1;box-shadow:var(--tx-toast-focus-ring-shadow)}:host([data-styled]) .tx-toast__pill:hover .tx-toast__close{opacity:1;scale:1}:host([data-styled]) .tx-toast__progress-track{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none}:host([data-styled]) .tx-toast__progress{position:absolute;inset-inline:0;bottom:0;height:var(--tx-toast-progress-height);background:var(--_tone);transform-origin:left center;animation-name:tx-toast-progress;animation-timing-function:linear;animation-fill-mode:forwards}:host([data-styled]) .tx-toast__progress--paused{animation-play-state:paused}@media(hover:none){:host([data-styled]) .tx-toast__close{opacity:1;scale:1}}@keyframes tx-toast-progress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-toast__item,:host([data-styled]) .tx-toast__pill>*,:host([data-styled]) .tx-toast__close{transition:none}:host([data-styled]) .tx-toast__progress{opacity:.6}}\n"],
536
546
  dependencies: [
537
547
  {
538
548
  kind: "directive",
@@ -566,6 +576,12 @@ var TxToast = class TxToast {
566
576
  "ptOptions",
567
577
  "unstyled"
568
578
  ]
579
+ },
580
+ {
581
+ kind: "directive",
582
+ type: TxAnimationReplay,
583
+ selector: "[txAnimationReplay]",
584
+ inputs: ["txAnimationReplay"]
569
585
  }
570
586
  ],
571
587
  viewProviders: [provideTxIconDefaults(TOAST_ICON_DEFAULTS)],
@@ -584,7 +600,8 @@ i0.ɵɵngDeclareClassMetadata({
584
600
  imports: [
585
601
  NgTemplateOutlet,
586
602
  TxIcon,
587
- TxProgressSpinner
603
+ TxProgressSpinner,
604
+ TxAnimationReplay
588
605
  ],
589
606
  changeDetection: ChangeDetectionStrategy.OnPush,
590
607
  host: {
@@ -603,8 +620,8 @@ i0.ɵɵngDeclareClassMetadata({
603
620
  "(focusout)": "onFocusOut($event)"
604
621
  },
605
622
  viewProviders: [provideTxIconDefaults(TOAST_ICON_DEFAULTS)],
606
- template: "@for (toast of ordered(); track toast.id; let index = $index) {\n <div\n class=\"tx-toast__item\"\n animate.leave=\"tx-toast__item--leave\"\n [attr.data-front]=\"index === 0 ? '' : null\"\n [attr.data-visible]=\"index < max() ? '' : null\"\n [attr.data-mounted]=\"isMounted(toast) ? '' : null\"\n [attr.data-swiping]=\"swiping()?.id === toast.id ? '' : null\"\n [style.--_index]=\"index\"\n [style.--_z]=\"ordered().length - index\"\n [style.--_offset.px]=\"offsets()[index]\"\n [style.--_height.px]=\"heightOf(toast)\"\n [style.--_front-height.px]=\"frontHeight()\"\n [style.--_swipe-x.px]=\"swiping()?.id === toast.id ? swiping()?.x : 0\"\n [style.--_swipe-y.px]=\"swiping()?.id === toast.id ? swiping()?.y : 0\"\n [attr.aria-hidden]=\"index < max() ? null : true\"\n (pointerdown)=\"onPointerDown(toast, $event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp()\"\n (pointercancel)=\"onPointerUp()\"\n >\n <div\n class=\"tx-toast__pill\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n [attr.data-severity]=\"toast.severity\"\n [class.tx-toast__pill--loading]=\"toast.loading\"\n [attr.aria-busy]=\"toast.loading || null\"\n >\n @if (toast.template ?? customTemplate()?.template; as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"contextOf(toast)\" />\n } @else {\n @if (toast.loading) {\n <span class=\"tx-toast__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-progress-spinner class=\"tx-toast__spinner\" [size]=\"14\" [strokeWidth]=\"6\" />\n </span>\n } @else if (iconOf(toast); as icon) {\n <span class=\"tx-toast__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-icon [name]=\"icon\" />\n </span>\n }\n <span class=\"tx-toast__body\" [class]=\"passThrough().body?.class\" [style]=\"passThrough().body?.style\">\n @if (toast.title) {\n <span\n class=\"tx-toast__title\"\n [class.tx-toast__title--hidden]=\"!!toast.text\"\n [class]=\"passThrough().title?.class\"\n [style]=\"passThrough().title?.style\"\n >{{ toast.title }}</span\n >\n }\n @if (toast.text) {\n <span class=\"tx-toast__text\" [class]=\"passThrough().text?.class\" [style]=\"passThrough().text?.style\">{{ toast.text }}</span>\n }\n </span>\n @if (toast.actions.length) {\n <span class=\"tx-toast__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n @for (action of toast.actions; track action.label) {\n <button type=\"button\" class=\"tx-toast__action\" (click)=\"run(toast, action)\">{{ action.label }}</button>\n }\n </span>\n }\n }\n @if (toast.closable) {\n <button\n type=\"button\"\n class=\"tx-toast__close\"\n [class]=\"passThrough().closeButton?.class\"\n [style]=\"passThrough().closeButton?.style\"\n [attr.aria-label]=\"translations().close\"\n (click)=\"close(toast)\"\n >\n <tx-icon name=\"times\" />\n </button>\n }\n @if (toast.showProgress && !toast.sticky && toast.life > 0) {\n <span class=\"tx-toast__progress-track\" aria-hidden=\"true\">\n @for (version of [toast.version]; track version) {\n <span\n class=\"tx-toast__progress\"\n [class]=\"passThrough().progress?.class\"\n [style]=\"passThrough().progress?.style\"\n [style.animation-duration.ms]=\"toast.life\"\n [class.tx-toast__progress--paused]=\"toast.paused\"\n ></span>\n }\n </span>\n }\n </div>\n </div>\n}\n",
607
- styles: [":host{--_raise: 1;position:fixed;z-index:var(--tx-layer-toast);box-sizing:border-box;width:var(--tx-toast-width)}:host([data-position^=top]){top:var(--tx-toast-inset-top)}:host([data-position^=bottom]){--_raise: -1;bottom:var(--tx-toast-inset-bottom)}:host([data-position$=left]){left:var(--tx-toast-inset-x)}:host([data-position$=right]){right:var(--tx-toast-inset-x)}:host([data-position$=center]){left:50%;transform:translate(-50%)}.tx-toast__item{position:absolute;inset-inline:0;z-index:var(--_z);display:flex;justify-content:center;outline:none;touch-action:none;opacity:0;transform:translateY(calc(100% * var(--_raise) * -1))}:host([data-position^=top]) .tx-toast__item{top:0}:host([data-position^=bottom]) .tx-toast__item{bottom:0}:host([data-position$=left]) .tx-toast__item{justify-content:flex-start}:host([data-position$=right]) .tx-toast__item{justify-content:flex-end}.tx-toast__item[data-mounted]{opacity:1;transform:translateY(0)}:host(:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]){height:var(--_front-height);overflow:hidden;transform:translateY(calc(var(--_raise) * var(--_index) * var(--tx-toast-gap))) scale(calc(1 - var(--_index) * .05))}:host(:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]) .tx-toast__pill>*{opacity:0}:host([data-position^=bottom]:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]){align-items:flex-start}:host([data-position^=top]:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]){align-items:flex-end}:host([data-expanded]) .tx-toast__item[data-mounted]{transform:translateY(calc(var(--_raise) * var(--_offset)))}:host([data-expanded]) .tx-toast__item:after{position:absolute;inset-inline:0;height:calc(var(--tx-toast-gap) + 1px);content:\"\"}:host([data-position^=top][data-expanded]) .tx-toast__item:after{bottom:100%}:host([data-position^=bottom][data-expanded]) .tx-toast__item:after{top:100%}.tx-toast__item:not([data-visible]){opacity:0;pointer-events:none}.tx-toast__item[data-swiping]{transform:translate(var(--_swipe-x),var(--_swipe-y))!important;transition:none!important}.tx-toast__item--leave{opacity:0!important;pointer-events:none;transform:translateY(calc(var(--_raise) * -100%))!important}.tx-toast__pill{position:relative;display:inline-flex;align-items:center;box-sizing:border-box;max-width:100%}.tx-toast__body{display:flex;flex-direction:column;min-width:0}.tx-toast__title--hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host([data-styled]) .tx-toast__item{transition:transform var(--tx-toast-duration),opacity var(--tx-toast-duration),height var(--tx-toast-duration)}:host([data-styled]) .tx-toast__pill>*{transition:opacity var(--tx-toast-duration)}:host([data-styled]) .tx-toast__pill{--_tone: var(--tx-toast-info-tone);gap:var(--tx-toast-item-gap);padding:var(--tx-toast-item-padding-y) var(--tx-toast-item-padding-end) var(--tx-toast-item-padding-y) var(--tx-toast-item-padding-start);border-radius:var(--tx-toast-item-border-radius);background:var(--tx-toast-item-background);color:var(--tx-toast-item-color);font-family:var(--tx-font-family);font-size:var(--tx-toast-item-font-size);font-weight:var(--tx-toast-item-font-weight);box-shadow:0 0 0 1px var(--tx-toast-item-ring-color),var(--tx-toast-item-shadow);-webkit-backdrop-filter:blur(var(--tx-toast-item-blur)) saturate(1.5);backdrop-filter:blur(var(--tx-toast-item-blur)) saturate(1.5)}:host([data-styled]) .tx-toast__pill[data-severity=success]{--_tone: var(--tx-toast-success-tone)}:host([data-styled]) .tx-toast__pill[data-severity=warn]{--_tone: var(--tx-toast-warn-tone)}:host([data-styled]) .tx-toast__pill[data-severity=danger]{--_tone: var(--tx-toast-danger-tone)}:host([data-styled]) .tx-toast__pill[data-severity=secondary]{--_tone: var(--tx-toast-secondary-tone)}:host([data-styled]) .tx-toast__pill[data-severity=contrast]{--_tone: var(--tx-toast-contrast-tone)}:host([data-styled]) .tx-toast__pill--loading{padding-inline-end:var(--tx-toast-item-loading-padding-end)}:host([data-styled]) .tx-toast__icon{display:grid;flex-shrink:0;align-self:flex-start;place-items:center;width:var(--tx-toast-icon-size);height:var(--tx-toast-icon-size);border-radius:50%;background:color-mix(in srgb,var(--_tone) var(--tx-toast-icon-tint),transparent);color:var(--_tone);font-size:var(--tx-toast-icon-font-size);--tx-icon-stroke-width: var(--tx-toast-icon-stroke-width)}:host([data-styled]) .tx-toast__spinner{--tx-progress-spinner-color: var(--_tone);--tx-progress-spinner-track-color: transparent}:host([data-styled]) .tx-toast__body{padding-block:var(--tx-toast-text-padding-y);line-height:var(--tx-toast-text-line-height)}:host([data-styled]) .tx-toast__text,:host([data-styled]) .tx-toast__title{display:-webkit-box;overflow:hidden;overflow-wrap:break-word;-webkit-box-orient:vertical;-webkit-line-clamp:var(--tx-toast-text-lines)}:host([data-styled]) .tx-toast__title--hidden{display:block}:host([data-styled]) .tx-toast__actions{display:flex;flex-shrink:0;gap:6px}:host([data-styled]) .tx-toast__action{flex-shrink:0;padding:var(--tx-toast-action-padding);border:0;border-radius:9999px;background:color-mix(in srgb,var(--_tone) var(--tx-toast-action-tint),transparent);color:var(--_tone);font:inherit;font-size:var(--tx-toast-action-font-size);font-weight:var(--tx-toast-action-font-weight);cursor:pointer;transition:background-color .15s}:host([data-styled]) .tx-toast__action:hover{background:color-mix(in srgb,var(--_tone) var(--tx-toast-action-hover-tint),transparent)}:host([data-styled]) .tx-toast__action:focus-visible{outline:none;box-shadow:var(--tx-toast-focus-ring-shadow)}:host([data-styled]) .tx-toast__close{position:absolute;top:var(--tx-toast-close-button-offset);right:var(--tx-toast-close-button-offset);display:grid;place-items:center;width:var(--tx-toast-close-button-size);height:var(--tx-toast-close-button-size);padding:0;border:0;border-radius:50%;background:var(--tx-toast-close-button-background);color:var(--tx-toast-close-button-color);font-size:var(--tx-toast-close-button-font-size);box-shadow:0 0 0 1px var(--tx-toast-close-button-ring-color),var(--tx-toast-close-button-shadow);cursor:pointer;opacity:0;scale:.75;transition:opacity .2s,scale .2s}:host([data-styled]) .tx-toast__close:hover{color:var(--tx-toast-close-button-hover-color)}:host([data-styled]) .tx-toast__close:focus-visible{outline:none;opacity:1;scale:1;box-shadow:var(--tx-toast-focus-ring-shadow)}:host([data-styled]) .tx-toast__pill:hover .tx-toast__close{opacity:1;scale:1}:host([data-styled]) .tx-toast__progress-track{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none}:host([data-styled]) .tx-toast__progress{position:absolute;inset-inline:0;bottom:0;height:var(--tx-toast-progress-height);background:var(--_tone);transform-origin:left center;animation-name:tx-toast-progress;animation-timing-function:linear;animation-fill-mode:forwards}:host([data-styled]) .tx-toast__progress--paused{animation-play-state:paused}@media(hover:none){:host([data-styled]) .tx-toast__close{opacity:1;scale:1}}@keyframes tx-toast-progress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-toast__item,:host([data-styled]) .tx-toast__pill>*,:host([data-styled]) .tx-toast__close{transition:none}:host([data-styled]) .tx-toast__progress{opacity:.6}}\n"]
623
+ template: "@for (toast of ordered(); track toast.id; let index = $index) {\n <div\n class=\"tx-toast__item\"\n animate.leave=\"tx-toast__item--leave\"\n [attr.data-front]=\"index === 0 ? '' : null\"\n [attr.data-visible]=\"index < max() ? '' : null\"\n [attr.data-mounted]=\"isMounted(toast) ? '' : null\"\n [attr.data-swiping]=\"swiping()?.id === toast.id ? '' : null\"\n [style.--_index]=\"index\"\n [style.--_z]=\"ordered().length - index\"\n [style.--_offset.px]=\"offsets()[index]\"\n [style.--_height.px]=\"heightOf(toast)\"\n [style.--_front-height.px]=\"frontHeight()\"\n [style.--_swipe-x.px]=\"swiping()?.id === toast.id ? swiping()?.x : 0\"\n [style.--_swipe-y.px]=\"swiping()?.id === toast.id ? swiping()?.y : 0\"\n [attr.aria-hidden]=\"index < max() ? null : true\"\n (pointerdown)=\"onPointerDown(toast, $event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp()\"\n (pointercancel)=\"onPointerUp()\"\n >\n <div\n class=\"tx-toast__pill\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n [attr.data-severity]=\"toast.severity\"\n [class.tx-toast__pill--loading]=\"toast.loading\"\n [attr.aria-busy]=\"toast.loading || null\"\n >\n @if (toast.template ?? customTemplate()?.template; as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"contextOf(toast)\" />\n } @else {\n @if (toast.loading) {\n <span class=\"tx-toast__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-progress-spinner class=\"tx-toast__spinner\" [size]=\"14\" [strokeWidth]=\"6\" />\n </span>\n } @else if (iconOf(toast); as icon) {\n <span class=\"tx-toast__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-icon [name]=\"icon\" />\n </span>\n }\n <span class=\"tx-toast__body\" [class]=\"passThrough().body?.class\" [style]=\"passThrough().body?.style\">\n @if (toast.title) {\n <span\n class=\"tx-toast__title\"\n [class.tx-toast__title--hidden]=\"!!toast.text\"\n [class]=\"passThrough().title?.class\"\n [style]=\"passThrough().title?.style\"\n >{{ toast.title }}</span\n >\n }\n @if (toast.text) {\n <span class=\"tx-toast__text\" [class]=\"passThrough().text?.class\" [style]=\"passThrough().text?.style\">{{ toast.text }}</span>\n }\n </span>\n @if (toast.actions.length) {\n <span class=\"tx-toast__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n @for (action of toast.actions; track action.label) {\n <button type=\"button\" class=\"tx-toast__action\" (click)=\"run(toast, action)\">{{ action.label }}</button>\n }\n </span>\n }\n }\n @if (toast.closable) {\n <button\n type=\"button\"\n class=\"tx-toast__close\"\n [class]=\"passThrough().closeButton?.class\"\n [style]=\"passThrough().closeButton?.style\"\n [attr.aria-label]=\"translations().close\"\n (click)=\"close(toast)\"\n >\n <tx-icon name=\"times\" />\n </button>\n }\n @if (toast.showProgress && !toast.sticky && toast.life > 0) {\n <span class=\"tx-toast__progress-track\" aria-hidden=\"true\">\n <span\n class=\"tx-toast__progress\"\n [txAnimationReplay]=\"toast.version\"\n [class]=\"passThrough().progress?.class\"\n [style]=\"passThrough().progress?.style\"\n [style.animation-duration.ms]=\"toast.life\"\n [class.tx-toast__progress--paused]=\"toast.paused\"\n ></span>\n </span>\n }\n </div>\n </div>\n}\n",
624
+ styles: [":host{--_raise: 1;position:fixed;z-index:var(--tx-layer-toast);box-sizing:border-box;width:var(--tx-toast-width)}:host([popover]){inset:auto;overflow:visible;margin:0;padding:0;border:0;background:none;color:inherit}:host([data-position^=top]){top:var(--tx-toast-inset-top)}:host([data-position^=bottom]){--_raise: -1;bottom:var(--tx-toast-inset-bottom)}:host([data-position$=left]){left:var(--tx-toast-inset-x)}:host([data-position$=right]){right:var(--tx-toast-inset-x)}:host([data-position$=center]){left:50%;transform:translate(-50%)}.tx-toast__item{position:absolute;inset-inline:0;z-index:var(--_z);display:flex;justify-content:center;outline:none;touch-action:none;opacity:0;transform:translateY(calc(100% * var(--_raise) * -1))}:host([data-position^=top]) .tx-toast__item{top:0}:host([data-position^=bottom]) .tx-toast__item{bottom:0}:host([data-position$=left]) .tx-toast__item{justify-content:flex-start}:host([data-position$=right]) .tx-toast__item{justify-content:flex-end}.tx-toast__item[data-mounted]{opacity:1;transform:translateY(0)}:host(:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]){height:var(--_front-height);overflow:hidden;transform:translateY(calc(var(--_raise) * var(--_index) * var(--tx-toast-gap))) scale(calc(1 - var(--_index) * .05))}:host(:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]) .tx-toast__pill>*{opacity:0}:host([data-position^=bottom]:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]){align-items:flex-start}:host([data-position^=top]:not([data-expanded])) .tx-toast__item[data-mounted]:not([data-front]){align-items:flex-end}:host([data-expanded]) .tx-toast__item[data-mounted]{transform:translateY(calc(var(--_raise) * var(--_offset)))}:host([data-expanded]) .tx-toast__item:after{position:absolute;inset-inline:0;height:calc(var(--tx-toast-gap) + 1px);content:\"\"}:host([data-position^=top][data-expanded]) .tx-toast__item:after{bottom:100%}:host([data-position^=bottom][data-expanded]) .tx-toast__item:after{top:100%}.tx-toast__item:not([data-visible]){opacity:0;pointer-events:none}.tx-toast__item[data-swiping]{transform:translate(var(--_swipe-x),var(--_swipe-y))!important;transition:none!important}.tx-toast__item--leave{opacity:0!important;pointer-events:none;transform:translateY(calc(var(--_raise) * -100%))!important}.tx-toast__pill{position:relative;display:inline-flex;align-items:center;box-sizing:border-box;max-width:100%}.tx-toast__body{display:flex;flex-direction:column;min-width:0}.tx-toast__title--hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}:host([data-styled]) .tx-toast__item{transition:transform var(--tx-toast-duration),opacity var(--tx-toast-duration),height var(--tx-toast-duration)}:host([data-styled]) .tx-toast__pill>*{transition:opacity var(--tx-toast-duration)}:host([data-styled]) .tx-toast__pill{--_tone: var(--tx-toast-info-tone);gap:var(--tx-toast-item-gap);padding:var(--tx-toast-item-padding-y) var(--tx-toast-item-padding-end) var(--tx-toast-item-padding-y) var(--tx-toast-item-padding-start);border-radius:var(--tx-toast-item-border-radius);background:var(--tx-toast-item-background);color:var(--tx-toast-item-color);font-family:var(--tx-font-family);font-size:var(--tx-toast-item-font-size);font-weight:var(--tx-toast-item-font-weight);box-shadow:0 0 0 1px var(--tx-toast-item-ring-color),var(--tx-toast-item-shadow);-webkit-backdrop-filter:blur(var(--tx-toast-item-blur)) saturate(1.5);backdrop-filter:blur(var(--tx-toast-item-blur)) saturate(1.5)}:host([data-styled]) .tx-toast__pill[data-severity=success]{--_tone: var(--tx-toast-success-tone)}:host([data-styled]) .tx-toast__pill[data-severity=warn]{--_tone: var(--tx-toast-warn-tone)}:host([data-styled]) .tx-toast__pill[data-severity=danger]{--_tone: var(--tx-toast-danger-tone)}:host([data-styled]) .tx-toast__pill[data-severity=secondary]{--_tone: var(--tx-toast-secondary-tone)}:host([data-styled]) .tx-toast__pill[data-severity=contrast]{--_tone: var(--tx-toast-contrast-tone)}:host([data-styled]) .tx-toast__pill--loading{padding-inline-end:var(--tx-toast-item-loading-padding-end)}:host([data-styled]) .tx-toast__icon{display:grid;flex-shrink:0;align-self:flex-start;place-items:center;width:var(--tx-toast-icon-size);height:var(--tx-toast-icon-size);border-radius:50%;background:color-mix(in srgb,var(--_tone) var(--tx-toast-icon-tint),transparent);color:var(--_tone);font-size:var(--tx-toast-icon-font-size);--tx-icon-stroke-width: var(--tx-toast-icon-stroke-width)}:host([data-styled]) .tx-toast__spinner{--tx-progress-spinner-color: var(--_tone);--tx-progress-spinner-track-color: transparent}:host([data-styled]) .tx-toast__body{padding-block:var(--tx-toast-text-padding-y);line-height:var(--tx-toast-text-line-height)}:host([data-styled]) .tx-toast__text,:host([data-styled]) .tx-toast__title{display:-webkit-box;overflow:hidden;overflow-wrap:break-word;-webkit-box-orient:vertical;-webkit-line-clamp:var(--tx-toast-text-lines)}:host([data-styled]) .tx-toast__title--hidden{display:block}:host([data-styled]) .tx-toast__actions{display:flex;flex-shrink:0;gap:6px}:host([data-styled]) .tx-toast__action{flex-shrink:0;padding:var(--tx-toast-action-padding);border:0;border-radius:9999px;background:color-mix(in srgb,var(--_tone) var(--tx-toast-action-tint),transparent);color:var(--_tone);font:inherit;font-size:var(--tx-toast-action-font-size);font-weight:var(--tx-toast-action-font-weight);cursor:pointer;transition:background-color .15s}:host([data-styled]) .tx-toast__action:hover{background:color-mix(in srgb,var(--_tone) var(--tx-toast-action-hover-tint),transparent)}:host([data-styled]) .tx-toast__action:focus-visible{outline:none;box-shadow:var(--tx-toast-focus-ring-shadow)}:host([data-styled]) .tx-toast__close{position:absolute;top:var(--tx-toast-close-button-offset);right:var(--tx-toast-close-button-offset);display:grid;place-items:center;width:var(--tx-toast-close-button-size);height:var(--tx-toast-close-button-size);padding:0;border:0;border-radius:50%;background:var(--tx-toast-close-button-background);color:var(--tx-toast-close-button-color);font-size:var(--tx-toast-close-button-font-size);box-shadow:0 0 0 1px var(--tx-toast-close-button-ring-color),var(--tx-toast-close-button-shadow);cursor:pointer;opacity:0;scale:.75;transition:opacity .2s,scale .2s}:host([data-styled]) .tx-toast__close:hover{color:var(--tx-toast-close-button-hover-color)}:host([data-styled]) .tx-toast__close:focus-visible{outline:none;opacity:1;scale:1;box-shadow:var(--tx-toast-focus-ring-shadow)}:host([data-styled]) .tx-toast__pill:hover .tx-toast__close{opacity:1;scale:1}:host([data-styled]) .tx-toast__progress-track{position:absolute;inset:0;overflow:hidden;border-radius:inherit;pointer-events:none}:host([data-styled]) .tx-toast__progress{position:absolute;inset-inline:0;bottom:0;height:var(--tx-toast-progress-height);background:var(--_tone);transform-origin:left center;animation-name:tx-toast-progress;animation-timing-function:linear;animation-fill-mode:forwards}:host([data-styled]) .tx-toast__progress--paused{animation-play-state:paused}@media(hover:none){:host([data-styled]) .tx-toast__close{opacity:1;scale:1}}@keyframes tx-toast-progress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-toast__item,:host([data-styled]) .tx-toast__pill>*,:host([data-styled]) .tx-toast__close{transition:none}:host([data-styled]) .tx-toast__progress{opacity:.6}}\n"]
608
625
  }]
609
626
  }],
610
627
  ctorParameters: () => [],
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-toast.mjs","names":[],"sources":["../../../../packages/ui/toast/src/toast.service.ts","../../../../packages/ui/toast/src/toast-template.directive.ts","../../../../packages/ui/toast/src/toast.icons.ts","../../../../packages/ui/toast/src/toast.theme.ts","../../../../packages/ui/toast/src/toast.component.ts","../../../../packages/ui/toast/src/toast.component.html"],"sourcesContent":["import { Injectable, InjectionToken, Provider, inject, signal } from '@angular/core';\nimport { TxAnnouncer } from '@tectra-ng/core/a11y';\nimport { Subject } from 'rxjs';\nimport { TxToastAction, TxToastCloseReason, TxToastMessage, TxToastOptions, TxToastRef } from './toast.types';\n\n/** App-wide default options of every toast; set with `provideTxToast`. */\nexport const TX_TOAST_OPTIONS = new InjectionToken<Partial<TxToastOptions>>('TX_TOAST_OPTIONS');\n\n/** Sets app-wide default options of every toast, e.g. `provideTxToast({ life: 8000 })`. */\nexport function provideTxToast(options: Partial<TxToastOptions>): Provider {\n return { provide: TX_TOAST_OPTIONS, useValue: options };\n}\n\nconst DEFAULT_LIFE = 3000;\n\n/** Options of the shortcut methods: all but the severity and the text, which the method sets. */\ntype TxToastText = Omit<TxToastOptions, 'severity' | 'text'>;\n\ninterface TxToastEntry {\n options: TxToastOptions;\n message: TxToastMessage;\n closed: Subject<TxToastCloseReason>;\n ref: TxToastRef;\n timer: ReturnType<typeof setTimeout> | undefined;\n startedAt: number;\n remaining: number;\n pauses: number;\n}\n\n/** Sends toasts from anywhere; one `<tx-toast />` in the app shell shows them. */\n@Injectable({ providedIn: 'root' })\nexport class TxToastService {\n private announcer = inject(TxAnnouncer);\n private defaults = inject(TX_TOAST_OPTIONS, { optional: true }) ?? {};\n private entries = new Map<number, TxToastEntry>();\n private nextId = 1;\n private readonly messages = signal<TxToastMessage[]>([]);\n\n /** Signal of the toasts that are shown now. */\n readonly toasts = this.messages.asReadonly();\n\n /** Shows a toast and returns its reference. */\n show(options: TxToastOptions): TxToastRef {\n const id = this.nextId++;\n const closed = new Subject<TxToastCloseReason>();\n const ref: TxToastRef = {\n id,\n closed: closed.asObservable(),\n /** Closes the toast with the id; the reason is `api` by default. */\n close: () => this.close(id, 'api'),\n /** Changes the toast with the id and restarts its timer. */\n update: (patch) => this.update(id, patch),\n };\n const message = this.build(id, options, 0);\n const entry: TxToastEntry = { options, message, closed, ref, timer: undefined, startedAt: 0, remaining: message.life, pauses: 0 };\n this.entries.set(id, entry);\n this.messages.update((list) => [...list, message]);\n this.announce(message);\n this.schedule(entry);\n return ref;\n }\n\n /** Shows a `success` toast with the text. */\n success(text: string, options: TxToastText = {}): TxToastRef {\n return this.show({ ...options, severity: 'success', text });\n }\n\n /** Shows an `info` toast with the text. */\n info(text: string, options: TxToastText = {}): TxToastRef {\n return this.show({ ...options, severity: 'info', text });\n }\n\n /** Shows a `warn` toast with the text. */\n warn(text: string, options: TxToastText = {}): TxToastRef {\n return this.show({ ...options, severity: 'warn', text });\n }\n\n /** Shows a `danger` toast with the text. */\n error(text: string, options: TxToastText = {}): TxToastRef {\n return this.show({ ...options, severity: 'danger', text });\n }\n\n /** Shows a sticky toast with a spinner; update it with a severity when the work ends. */\n loading(text: string, options: TxToastText = {}): TxToastRef {\n return this.show({ ...options, loading: true, text });\n }\n\n /** Closes one toast by its id; `closed` of its ref emits the reason (`api` by default). */\n close(id: number, reason: TxToastCloseReason = 'api'): void {\n const entry = this.entries.get(id);\n if (!entry) {\n return;\n }\n clearTimeout(entry.timer);\n this.entries.delete(id);\n this.messages.update((list) => list.filter((message) => message.id !== id));\n entry.closed.next(reason);\n entry.closed.complete();\n }\n\n /** Closes all toasts, or only those of one `key`. */\n clear(key?: string): void {\n for (const entry of [...this.entries.values()]) {\n if (key === undefined || entry.message.key === key) {\n this.close(entry.message.id, 'clear');\n }\n }\n }\n\n /** Changes a toast that is shown: its text, severity, actions or life time. */\n update(id: number, patch: Partial<TxToastOptions>): void {\n const entry = this.entries.get(id);\n if (!entry) {\n return;\n }\n const settled = patch.severity !== undefined && patch.loading === undefined ? { loading: false } : {};\n entry.options = { ...entry.options, ...settled, ...patch };\n const previous = entry.message;\n entry.message = this.build(id, entry.options, previous.version + 1, entry.pauses > 0);\n this.replace(entry.message);\n if (previous.title !== entry.message.title || previous.text !== entry.message.text) {\n this.announce(entry.message);\n }\n clearTimeout(entry.timer);\n entry.timer = undefined;\n entry.remaining = entry.message.life;\n if (entry.pauses === 0) {\n this.schedule(entry);\n }\n }\n\n /** Runs an action of the toast and closes it unless the action has `keepOpen`. */\n run(id: number, action: TxToastAction): void {\n const entry = this.entries.get(id);\n if (!entry) {\n return;\n }\n action.run?.(entry.ref);\n if (!action.keepOpen) {\n this.close(id, 'action');\n }\n }\n\n /** Stops the timer of the toast; calls nest, so every `pause` needs a `resume`. */\n pause(id: number): void {\n const entry = this.entries.get(id);\n if (!entry || entry.pauses++ > 0) {\n return;\n }\n if (entry.timer !== undefined) {\n clearTimeout(entry.timer);\n entry.timer = undefined;\n entry.remaining = Math.max(0, entry.remaining - (this.now() - entry.startedAt));\n }\n this.replace((entry.message = { ...entry.message, paused: true }));\n }\n\n /** Releases one `pause`; the timer continues when none is left. */\n resume(id: number): void {\n const entry = this.entries.get(id);\n if (!entry || entry.pauses === 0 || --entry.pauses > 0) {\n return;\n }\n this.replace((entry.message = { ...entry.message, paused: false }));\n this.schedule(entry);\n }\n\n private build(id: number, options: TxToastOptions, version: number, paused = false): TxToastMessage {\n const merged = { ...this.defaults, ...options };\n const loading = merged.loading ?? false;\n return {\n id,\n key: merged.key,\n severity: merged.severity ?? 'info',\n title: merged.title,\n text: merged.text,\n icon: merged.icon,\n loading,\n life: merged.life ?? DEFAULT_LIFE,\n sticky: merged.sticky ?? loading,\n closable: merged.closable ?? !loading,\n showProgress: merged.showProgress ?? false,\n actions: merged.actions ?? [],\n template: merged.template,\n data: merged.data,\n version,\n paused,\n };\n }\n\n private schedule(entry: TxToastEntry): void {\n const { message } = entry;\n if (message.sticky || message.life <= 0) {\n return;\n }\n entry.startedAt = this.now();\n entry.timer = setTimeout(() => this.close(message.id, 'timeout'), entry.remaining);\n }\n\n private replace(message: TxToastMessage): void {\n this.messages.update((list) => list.map((item) => (item.id === message.id ? message : item)));\n }\n\n private announce(message: TxToastMessage): void {\n const text = [message.title, message.text].filter(Boolean).join('. ');\n if (text) {\n void this.announcer.announce(text, message.severity === 'danger' || message.severity === 'warn' ? 'assertive' : 'polite');\n }\n }\n\n private now(): number {\n return Date.now();\n }\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxToastContext } from './toast.types';\n\n@Directive({ selector: 'ng-template[txToastTemplate]' })\nexport class TxToastTemplate {\n readonly template = inject<TemplateRef<TxToastContext>>(TemplateRef);\n}\n","import { TxIconSet, txIconCheck, txIconExclamationTriangle, txIconInfo, txIconInfoCircle, txIconText, txIconTimes } from '@tectra-ng/icons';\n\nexport const TOAST_ICON_DEFAULTS: TxIconSet = {\n check: txIconCheck,\n 'exclamation-triangle': txIconExclamationTriangle,\n info: txIconInfo,\n 'info-circle': txIconInfoCircle,\n text: txIconText,\n times: txIconTimes,\n};\n","import { iconTokens, progressSpinnerTokens, toastTokens } from '@tectra-ng/themes';\n\nexport const TOAST_THEME = {\n icon: iconTokens,\n progressSpinner: progressSpinnerTokens,\n toast: toastTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DOCUMENT,\n DestroyRef,\n ElementRef,\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n numberAttribute,\n signal,\n} from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { injectTxIcons, provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraToastTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxProgressSpinner } from '@tectra-ng/ui/progress-spinner';\nimport { TxToastTemplate } from './toast-template.directive';\nimport { TxToastService } from './toast.service';\nimport { TxToastAction, TxToastContext, TxToastMessage, TxToastPart, TxToastPosition, TxToastSeverity } from './toast.types';\nimport { TOAST_ICON_DEFAULTS } from './toast.icons';\nimport { TOAST_THEME } from './toast.theme';\n\nconst ICONS: Record<TxToastSeverity, string> = {\n success: 'check',\n info: 'info-circle',\n warn: 'exclamation-triangle',\n danger: 'times',\n secondary: 'info-circle',\n contrast: 'info-circle',\n};\n\nconst SWIPE_THRESHOLD = 50;\nconst SWIPE_VELOCITY = 0.11;\n\ninterface TxToastSwipe {\n id: number;\n startX: number;\n startY: number;\n startedAt: number;\n}\n\n@Component({\n selector: 'tx-toast',\n imports: [NgTemplateOutlet, TxIcon, TxProgressSpinner],\n templateUrl: './toast.component.html',\n styleUrl: './toast.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-toast',\n role: 'region',\n '[attr.aria-label]': 'translations().notifications',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-position]': 'position()',\n '[attr.data-expanded]': 'expanded() ? \"\" : null',\n '[class.tx-toast--empty]': '!ordered().length',\n '(mouseenter)': 'setHovered(true)',\n '(mouseleave)': 'setHovered(false)',\n '(focusin)': 'onFocusIn()',\n '(focusout)': 'onFocusOut($event)',\n },\n viewProviders: [provideTxIconDefaults(TOAST_ICON_DEFAULTS)],\n})\nexport class TxToast {\n private readonly toastTheme = injectTokens(TOAST_THEME);\n\n private service = inject(TxToastService);\n private iconRegistry = injectTxIcons();\n private host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private document = inject(DOCUMENT);\n private swipe: TxToastSwipe | null = null;\n private pausedIds: number[] = [];\n\n readonly position = input<TxToastPosition>('bottom-center');\n readonly key = input<string | undefined>(undefined);\n readonly max = input<number, unknown>(3, { transform: numberAttribute });\n readonly inPlace = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraToastTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxToastPart, TxToast> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly customTemplate = contentChild(TxToastTemplate);\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('toast', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-toast'), ...this.passThrough().root?.style }));\n\n private readonly hovered = signal(false);\n private readonly focused = signal(false);\n private readonly heights = signal<Record<number, number>>({});\n private readonly mounted = signal<Record<number, true>>({});\n readonly swiping = signal<{ id: number; x: number; y: number } | null>(null);\n\n readonly expanded = computed(() => this.hovered() || this.focused());\n readonly ordered = computed(() => [...this.service.toasts().filter((toast) => toast.key === this.key())].reverse());\n readonly frontHeight = computed(() => this.heights()[this.ordered()[0]?.id] ?? 0);\n readonly offsets = computed(() => {\n const heights = this.heights();\n const gap = this.gap();\n let offset = 0;\n return this.ordered().map((toast) => {\n const current = offset;\n offset += (heights[toast.id] ?? 0) + gap;\n return current;\n });\n });\n\n constructor() {\n afterNextRender(() => {\n if (!this.inPlace()) {\n this.document.body.appendChild(this.host);\n }\n });\n afterRenderEffect(() => {\n const toasts = this.ordered();\n const items = [...this.host.querySelectorAll<HTMLElement>(':scope > .tx-toast__item:not(.tx-toast__item--leave)')];\n const heights: Record<number, number> = {};\n toasts.forEach((toast, index) => {\n heights[toast.id] = items[index]?.querySelector<HTMLElement>('.tx-toast__pill')?.offsetHeight ?? 0;\n });\n if (JSON.stringify(heights) !== JSON.stringify(this.heights())) {\n this.heights.set(heights);\n }\n const fresh = toasts.filter((toast) => !this.mounted()[toast.id]);\n if (fresh.length) {\n const mount = () =>\n this.mounted.update((mounted) => ({ ...mounted, ...Object.fromEntries(fresh.map((toast) => [toast.id, true as const])) }));\n const view = this.document.defaultView;\n if (view?.requestAnimationFrame) {\n view.requestAnimationFrame(() => view.requestAnimationFrame(mount));\n } else {\n setTimeout(mount);\n }\n }\n if (this.expanded()) {\n this.pauseNew(toasts);\n }\n });\n inject(DestroyRef).onDestroy(() => {\n this.resumeAll();\n this.host.remove();\n });\n }\n\n isMounted(toast: TxToastMessage): boolean {\n return Boolean(this.mounted()[toast.id]);\n }\n\n heightOf(toast: TxToastMessage): number {\n return this.heights()[toast.id] ?? 0;\n }\n\n iconOf(toast: TxToastMessage): string | null {\n if (toast.icon === false) {\n return null;\n }\n const name = toast.icon ?? ICONS[toast.severity];\n return this.iconRegistry.has(name) ? name : null;\n }\n\n contextOf(toast: TxToastMessage): TxToastContext {\n return { $implicit: toast, close: () => this.service.close(toast.id, 'close') };\n }\n\n close(toast: TxToastMessage): void {\n this.service.close(toast.id, 'close');\n }\n\n run(toast: TxToastMessage, action: TxToastAction): void {\n this.service.run(toast.id, action);\n }\n\n setHovered(hovered: boolean): void {\n this.hovered.set(hovered);\n this.syncPause();\n }\n\n onFocusIn(): void {\n this.focused.set(true);\n this.syncPause();\n }\n\n onFocusOut(event: FocusEvent): void {\n if (!this.host.contains(event.relatedTarget as Node | null)) {\n this.focused.set(false);\n this.syncPause();\n }\n }\n\n onPointerDown(toast: TxToastMessage, event: PointerEvent): void {\n if (!toast.closable || event.button !== 0 || (event.target as Element).closest('button')) {\n return;\n }\n this.swipe = { id: toast.id, startX: event.clientX, startY: event.clientY, startedAt: Date.now() };\n (event.currentTarget as HTMLElement).setPointerCapture?.(event.pointerId);\n }\n\n onPointerMove(event: PointerEvent): void {\n if (!this.swipe) {\n return;\n }\n const x = event.clientX - this.swipe.startX;\n const y = event.clientY - this.swipe.startY;\n if (Math.abs(x) > 2 || Math.abs(y) > 2) {\n this.swiping.set(Math.abs(x) >= Math.abs(y) ? { id: this.swipe.id, x, y: 0 } : { id: this.swipe.id, x: 0, y });\n }\n }\n\n onPointerUp(): void {\n const swipe = this.swipe;\n const moved = this.swiping();\n this.swipe = null;\n this.swiping.set(null);\n if (!swipe || !moved || moved.id !== swipe.id) {\n return;\n }\n const distance = Math.max(Math.abs(moved.x), Math.abs(moved.y));\n const velocity = distance / Math.max(Date.now() - swipe.startedAt, 1);\n if (distance >= SWIPE_THRESHOLD || velocity > SWIPE_VELOCITY) {\n this.service.close(swipe.id, 'close');\n }\n }\n\n private gap(): number {\n const value = this.document.defaultView?.getComputedStyle(this.host).getPropertyValue('--tx-toast-gap');\n return parseFloat(value ?? '') || 8;\n }\n\n private syncPause(): void {\n if (this.expanded()) {\n this.pauseNew(this.ordered());\n } else {\n this.resumeAll();\n }\n }\n\n private pauseNew(toasts: TxToastMessage[]): void {\n toasts\n .filter((toast) => !this.pausedIds.includes(toast.id))\n .forEach((toast) => {\n this.pausedIds.push(toast.id);\n this.service.pause(toast.id);\n });\n }\n\n private resumeAll(): void {\n const ids = this.pausedIds;\n this.pausedIds = [];\n ids.forEach((id) => this.service.resume(id));\n }\n}\n","@for (toast of ordered(); track toast.id; let index = $index) {\n <div\n class=\"tx-toast__item\"\n animate.leave=\"tx-toast__item--leave\"\n [attr.data-front]=\"index === 0 ? '' : null\"\n [attr.data-visible]=\"index < max() ? '' : null\"\n [attr.data-mounted]=\"isMounted(toast) ? '' : null\"\n [attr.data-swiping]=\"swiping()?.id === toast.id ? '' : null\"\n [style.--_index]=\"index\"\n [style.--_z]=\"ordered().length - index\"\n [style.--_offset.px]=\"offsets()[index]\"\n [style.--_height.px]=\"heightOf(toast)\"\n [style.--_front-height.px]=\"frontHeight()\"\n [style.--_swipe-x.px]=\"swiping()?.id === toast.id ? swiping()?.x : 0\"\n [style.--_swipe-y.px]=\"swiping()?.id === toast.id ? swiping()?.y : 0\"\n [attr.aria-hidden]=\"index < max() ? null : true\"\n (pointerdown)=\"onPointerDown(toast, $event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp()\"\n (pointercancel)=\"onPointerUp()\"\n >\n <div\n class=\"tx-toast__pill\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n [attr.data-severity]=\"toast.severity\"\n [class.tx-toast__pill--loading]=\"toast.loading\"\n [attr.aria-busy]=\"toast.loading || null\"\n >\n @if (toast.template ?? customTemplate()?.template; as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"contextOf(toast)\" />\n } @else {\n @if (toast.loading) {\n <span class=\"tx-toast__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-progress-spinner class=\"tx-toast__spinner\" [size]=\"14\" [strokeWidth]=\"6\" />\n </span>\n } @else if (iconOf(toast); as icon) {\n <span class=\"tx-toast__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-icon [name]=\"icon\" />\n </span>\n }\n <span class=\"tx-toast__body\" [class]=\"passThrough().body?.class\" [style]=\"passThrough().body?.style\">\n @if (toast.title) {\n <span\n class=\"tx-toast__title\"\n [class.tx-toast__title--hidden]=\"!!toast.text\"\n [class]=\"passThrough().title?.class\"\n [style]=\"passThrough().title?.style\"\n >{{ toast.title }}</span\n >\n }\n @if (toast.text) {\n <span class=\"tx-toast__text\" [class]=\"passThrough().text?.class\" [style]=\"passThrough().text?.style\">{{ toast.text }}</span>\n }\n </span>\n @if (toast.actions.length) {\n <span class=\"tx-toast__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n @for (action of toast.actions; track action.label) {\n <button type=\"button\" class=\"tx-toast__action\" (click)=\"run(toast, action)\">{{ action.label }}</button>\n }\n </span>\n }\n }\n @if (toast.closable) {\n <button\n type=\"button\"\n class=\"tx-toast__close\"\n [class]=\"passThrough().closeButton?.class\"\n [style]=\"passThrough().closeButton?.style\"\n [attr.aria-label]=\"translations().close\"\n (click)=\"close(toast)\"\n >\n <tx-icon name=\"times\" />\n </button>\n }\n @if (toast.showProgress && !toast.sticky && toast.life > 0) {\n <span class=\"tx-toast__progress-track\" aria-hidden=\"true\">\n @for (version of [toast.version]; track version) {\n <span\n class=\"tx-toast__progress\"\n [class]=\"passThrough().progress?.class\"\n [style]=\"pass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,MAAA,CAAA,GAAA,iBAAA,eAAe,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
1
+ {"version":3,"file":"tectra-ng-ui-toast.mjs","names":[],"sources":["../../../../packages/ui/toast/src/toast.service.ts","../../../../packages/ui/toast/src/toast-template.directive.ts","../../../../packages/ui/toast/src/toast.icons.ts","../../../../packages/ui/toast/src/toast.theme.ts","../../../../packages/ui/toast/src/toast.component.ts","../../../../packages/ui/toast/src/toast.component.html"],"sourcesContent":["import { Injectable, InjectionToken, Provider, inject, signal } from '@angular/core';\nimport { TxAnnouncer } from '@tectra-ng/core/a11y';\nimport { Subject } from 'rxjs';\nimport { TxToastAction, TxToastCloseReason, TxToastMessage, TxToastOptions, TxToastRef } from './toast.types';\n\n/** App-wide default options of every toast; set with `provideTxToast`. */\nexport const TX_TOAST_OPTIONS = new InjectionToken<Partial<TxToastOptions>>('TX_TOAST_OPTIONS');\n\n/** Sets app-wide default options of every toast, e.g. `provideTxToast({ life: 8000 })`. */\nexport function provideTxToast(options: Partial<TxToastOptions>): Provider {\n return { provide: TX_TOAST_OPTIONS, useValue: options };\n}\n\nconst DEFAULT_LIFE = 3000;\n\n/** Options of the shortcut methods: all but the severity and the text, which the method sets. */\ntype TxToastText = Omit<TxToastOptions, 'severity' | 'text'>;\n\ninterface TxToastEntry {\n options: TxToastOptions;\n message: TxToastMessage;\n closed: Subject<TxToastCloseReason>;\n ref: TxToastRef;\n timer: ReturnType<typeof setTimeout> | undefined;\n startedAt: number;\n remaining: number;\n pauses: number;\n}\n\n/** Sends toasts from anywhere; one `<tx-toast />` in the app shell shows them. */\n@Injectable({ providedIn: 'root' })\nexport class TxToastService {\n private announcer = inject(TxAnnouncer);\n private defaults = inject(TX_TOAST_OPTIONS, { optional: true }) ?? {};\n private entries = new Map<number, TxToastEntry>();\n private nextId = 1;\n private readonly messages = signal<TxToastMessage[]>([]);\n\n /** Signal of the toasts that are shown now. */\n readonly toasts = this.messages.asReadonly();\n\n /** Shows a toast and returns its reference. */\n show(options: TxToastOptions): TxToastRef {\n const id = this.nextId++;\n const closed = new Subject<TxToastCloseReason>();\n const ref: TxToastRef = {\n id,\n closed: closed.asObservable(),\n /** Closes the toast with the id; the reason is `api` by default. */\n close: () => this.close(id, 'api'),\n /** Changes the toast with the id and restarts its timer. */\n update: (patch) => this.update(id, patch),\n };\n const message = this.build(id, options, 0);\n const entry: TxToastEntry = { options, message, closed, ref, timer: undefined, startedAt: 0, remaining: message.life, pauses: 0 };\n this.entries.set(id, entry);\n this.messages.update((list) => [...list, message]);\n this.announce(message);\n this.schedule(entry);\n return ref;\n }\n\n /** Shows a `success` toast with the text. */\n success(text: string, options: TxToastText = {}): TxToastRef {\n return this.show({ ...options, severity: 'success', text });\n }\n\n /** Shows an `info` toast with the text. */\n info(text: string, options: TxToastText = {}): TxToastRef {\n return this.show({ ...options, severity: 'info', text });\n }\n\n /** Shows a `warn` toast with the text. */\n warn(text: string, options: TxToastText = {}): TxToastRef {\n return this.show({ ...options, severity: 'warn', text });\n }\n\n /** Shows a `danger` toast with the text. */\n error(text: string, options: TxToastText = {}): TxToastRef {\n return this.show({ ...options, severity: 'danger', text });\n }\n\n /** Shows a sticky toast with a spinner; update it with a severity when the work ends. */\n loading(text: string, options: TxToastText = {}): TxToastRef {\n return this.show({ ...options, loading: true, text });\n }\n\n /** Closes one toast by its id; `closed` of its ref emits the reason (`api` by default). */\n close(id: number, reason: TxToastCloseReason = 'api'): void {\n const entry = this.entries.get(id);\n if (!entry) {\n return;\n }\n clearTimeout(entry.timer);\n this.entries.delete(id);\n this.messages.update((list) => list.filter((message) => message.id !== id));\n entry.closed.next(reason);\n entry.closed.complete();\n }\n\n /** Closes all toasts, or only those of one `key`. */\n clear(key?: string): void {\n for (const entry of [...this.entries.values()]) {\n if (key === undefined || entry.message.key === key) {\n this.close(entry.message.id, 'clear');\n }\n }\n }\n\n /** Changes a toast that is shown: its text, severity, actions or life time. */\n update(id: number, patch: Partial<TxToastOptions>): void {\n const entry = this.entries.get(id);\n if (!entry) {\n return;\n }\n const settled = patch.severity !== undefined && patch.loading === undefined ? { loading: false } : {};\n entry.options = { ...entry.options, ...settled, ...patch };\n const previous = entry.message;\n entry.message = this.build(id, entry.options, previous.version + 1, entry.pauses > 0);\n this.replace(entry.message);\n if (previous.title !== entry.message.title || previous.text !== entry.message.text) {\n this.announce(entry.message);\n }\n clearTimeout(entry.timer);\n entry.timer = undefined;\n entry.remaining = entry.message.life;\n if (entry.pauses === 0) {\n this.schedule(entry);\n }\n }\n\n /** Runs an action of the toast and closes it unless the action has `keepOpen`. */\n run(id: number, action: TxToastAction): void {\n const entry = this.entries.get(id);\n if (!entry) {\n return;\n }\n action.run?.(entry.ref);\n if (!action.keepOpen) {\n this.close(id, 'action');\n }\n }\n\n /** Stops the timer of the toast; calls nest, so every `pause` needs a `resume`. */\n pause(id: number): void {\n const entry = this.entries.get(id);\n if (!entry || entry.pauses++ > 0) {\n return;\n }\n if (entry.timer !== undefined) {\n clearTimeout(entry.timer);\n entry.timer = undefined;\n entry.remaining = Math.max(0, entry.remaining - (this.now() - entry.startedAt));\n }\n this.replace((entry.message = { ...entry.message, paused: true }));\n }\n\n /** Releases one `pause`; the timer continues when none is left. */\n resume(id: number): void {\n const entry = this.entries.get(id);\n if (!entry || entry.pauses === 0 || --entry.pauses > 0) {\n return;\n }\n this.replace((entry.message = { ...entry.message, paused: false }));\n this.schedule(entry);\n }\n\n private build(id: number, options: TxToastOptions, version: number, paused = false): TxToastMessage {\n const merged = { ...this.defaults, ...options };\n const loading = merged.loading ?? false;\n return {\n id,\n key: merged.key,\n severity: merged.severity ?? 'info',\n title: merged.title,\n text: merged.text,\n icon: merged.icon,\n loading,\n life: merged.life ?? DEFAULT_LIFE,\n sticky: merged.sticky ?? loading,\n closable: merged.closable ?? !loading,\n showProgress: merged.showProgress ?? false,\n actions: merged.actions ?? [],\n template: merged.template,\n data: merged.data,\n version,\n paused,\n };\n }\n\n private schedule(entry: TxToastEntry): void {\n const { message } = entry;\n if (message.sticky || message.life <= 0) {\n return;\n }\n entry.startedAt = this.now();\n entry.timer = setTimeout(() => this.close(message.id, 'timeout'), entry.remaining);\n }\n\n private replace(message: TxToastMessage): void {\n this.messages.update((list) => list.map((item) => (item.id === message.id ? message : item)));\n }\n\n private announce(message: TxToastMessage): void {\n const text = [message.title, message.text].filter(Boolean).join('. ');\n if (text) {\n void this.announcer.announce(text, message.severity === 'danger' || message.severity === 'warn' ? 'assertive' : 'polite');\n }\n }\n\n private now(): number {\n return Date.now();\n }\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxToastContext } from './toast.types';\n\n@Directive({ selector: 'ng-template[txToastTemplate]' })\nexport class TxToastTemplate {\n readonly template = inject<TemplateRef<TxToastContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxToastTemplate, context: unknown): context is TxToastContext {\n return !!context;\n }\n}\n","import { TxIconSet, txIconCheck, txIconExclamationTriangle, txIconInfo, txIconInfoCircle, txIconText, txIconTimes } from '@tectra-ng/icons';\n\nexport const TOAST_ICON_DEFAULTS: TxIconSet = {\n check: txIconCheck,\n 'exclamation-triangle': txIconExclamationTriangle,\n info: txIconInfo,\n 'info-circle': txIconInfoCircle,\n text: txIconText,\n times: txIconTimes,\n};\n","import { iconTokens, progressSpinnerTokens, toastTokens } from '@tectra-ng/themes';\n\nexport const TOAST_THEME = {\n icon: iconTokens,\n progressSpinner: progressSpinnerTokens,\n toast: toastTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DOCUMENT,\n DestroyRef,\n ElementRef,\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n inject,\n input,\n numberAttribute,\n signal,\n} from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { TxOverlayStack } from '@tectra-ng/core/overlay';\nimport { TxAnimationReplay, optionalBoolean } from '@tectra-ng/core/utils';\nimport { injectTxIcons, provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraToastTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxProgressSpinner } from '@tectra-ng/ui/progress-spinner';\nimport { TxToastTemplate } from './toast-template.directive';\nimport { TxToastService } from './toast.service';\nimport { TxToastAction, TxToastContext, TxToastMessage, TxToastPart, TxToastPosition, TxToastSeverity } from './toast.types';\nimport { TOAST_ICON_DEFAULTS } from './toast.icons';\nimport { TOAST_THEME } from './toast.theme';\n\nconst ICONS: Record<TxToastSeverity, string> = {\n success: 'check',\n info: 'info-circle',\n warn: 'exclamation-triangle',\n danger: 'times',\n secondary: 'info-circle',\n contrast: 'info-circle',\n};\n\nconst SWIPE_THRESHOLD = 50;\nconst SWIPE_VELOCITY = 0.11;\n\ninterface TxToastSwipe {\n id: number;\n startX: number;\n startY: number;\n startedAt: number;\n}\n\n@Component({\n selector: 'tx-toast',\n imports: [NgTemplateOutlet, TxIcon, TxProgressSpinner, TxAnimationReplay],\n templateUrl: './toast.component.html',\n styleUrl: './toast.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-toast',\n role: 'region',\n '[attr.aria-label]': 'translations().notifications',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-position]': 'position()',\n '[attr.data-expanded]': 'expanded() ? \"\" : null',\n '[class.tx-toast--empty]': '!ordered().length',\n '(mouseenter)': 'setHovered(true)',\n '(mouseleave)': 'setHovered(false)',\n '(focusin)': 'onFocusIn()',\n '(focusout)': 'onFocusOut($event)',\n },\n viewProviders: [provideTxIconDefaults(TOAST_ICON_DEFAULTS)],\n})\nexport class TxToast {\n private readonly toastTheme = injectTokens(TOAST_THEME);\n\n private service = inject(TxToastService);\n private iconRegistry = injectTxIcons();\n private host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private document = inject(DOCUMENT);\n private stack = inject(TxOverlayStack);\n private leaveTop: () => void = () => undefined;\n private swipe: TxToastSwipe | null = null;\n private pausedIds: number[] = [];\n\n readonly position = input<TxToastPosition>('bottom-center');\n readonly key = input<string | undefined>(undefined);\n readonly max = input<number, unknown>(3, { transform: numberAttribute });\n readonly inPlace = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraToastTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxToastPart, TxToast> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly customTemplate = contentChild(TxToastTemplate);\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('toast', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-toast'), ...this.passThrough().root?.style }));\n\n private readonly hovered = signal(false);\n private readonly focused = signal(false);\n private readonly heights = signal<Record<number, number>>({});\n private readonly mounted = signal<Record<number, true>>({});\n readonly swiping = signal<{ id: number; x: number; y: number } | null>(null);\n\n readonly expanded = computed(() => this.hovered() || this.focused());\n readonly ordered = computed(() => [...this.service.toasts().filter((toast) => toast.key === this.key())].reverse());\n readonly frontHeight = computed(() => this.heights()[this.ordered()[0]?.id] ?? 0);\n readonly offsets = computed(() => {\n const heights = this.heights();\n const gap = this.gap();\n let offset = 0;\n return this.ordered().map((toast) => {\n const current = offset;\n offset += (heights[toast.id] ?? 0) + gap;\n return current;\n });\n });\n\n constructor() {\n afterNextRender(() => {\n if (!this.inPlace()) {\n this.document.body.appendChild(this.host);\n this.leaveTop = this.stack.keepOnTop(this.host);\n }\n });\n afterRenderEffect(() => {\n const toasts = this.ordered();\n const items = [...this.host.querySelectorAll<HTMLElement>(':scope > .tx-toast__item:not(.tx-toast__item--leave)')];\n const heights: Record<number, number> = {};\n toasts.forEach((toast, index) => {\n heights[toast.id] = items[index]?.querySelector<HTMLElement>('.tx-toast__pill')?.offsetHeight ?? 0;\n });\n if (JSON.stringify(heights) !== JSON.stringify(this.heights())) {\n this.heights.set(heights);\n }\n const fresh = toasts.filter((toast) => !this.mounted()[toast.id]);\n if (fresh.length) {\n const mount = () =>\n this.mounted.update((mounted) => ({ ...mounted, ...Object.fromEntries(fresh.map((toast) => [toast.id, true as const])) }));\n const view = this.document.defaultView;\n if (view?.requestAnimationFrame) {\n view.requestAnimationFrame(() => view.requestAnimationFrame(mount));\n } else {\n setTimeout(mount);\n }\n }\n if (this.expanded()) {\n this.pauseNew(toasts);\n }\n });\n inject(DestroyRef).onDestroy(() => {\n this.resumeAll();\n this.leaveTop();\n this.host.remove();\n });\n }\n\n isMounted(toast: TxToastMessage): boolean {\n return Boolean(this.mounted()[toast.id]);\n }\n\n heightOf(toast: TxToastMessage): number {\n return this.heights()[toast.id] ?? 0;\n }\n\n iconOf(toast: TxToastMessage): string | null {\n if (toast.icon === false) {\n return null;\n }\n const name = toast.icon ?? ICONS[toast.severity];\n return this.iconRegistry.has(name) ? name : null;\n }\n\n contextOf(toast: TxToastMessage): TxToastContext {\n return { $implicit: toast, close: () => this.service.close(toast.id, 'close') };\n }\n\n close(toast: TxToastMessage): void {\n this.service.close(toast.id, 'close');\n }\n\n run(toast: TxToastMessage, action: TxToastAction): void {\n this.service.run(toast.id, action);\n }\n\n setHovered(hovered: boolean): void {\n this.hovered.set(hovered);\n this.syncPause();\n }\n\n onFocusIn(): void {\n this.focused.set(true);\n this.syncPause();\n }\n\n onFocusOut(event: FocusEvent): void {\n if (!this.host.contains(event.relatedTarget as Node | null)) {\n this.focused.set(false);\n this.syncPause();\n }\n }\n\n onPointerDown(toast: TxToastMessage, event: PointerEvent): void {\n if (!toast.closable || event.button !== 0 || (event.target as Element).closest('button')) {\n return;\n }\n this.swipe = { id: toast.id, startX: event.clientX, startY: event.clientY, startedAt: Date.now() };\n (event.currentTarget as HTMLElement).setPointerCapture?.(event.pointerId);\n }\n\n onPointerMove(event: PointerEvent): void {\n if (!this.swipe) {\n return;\n }\n const x = event.clientX - this.swipe.startX;\n const y = event.clientY - this.swipe.startY;\n if (Math.abs(x) > 2 || Math.abs(y) > 2) {\n this.swiping.set(Math.abs(x) >= Math.abs(y) ? { id: this.swipe.id, x, y: 0 } : { id: this.swipe.id, x: 0, y });\n }\n }\n\n onPointerUp(): void {\n const swipe = this.swipe;\n const moved = this.swiping();\n this.swipe = null;\n this.swiping.set(null);\n if (!swipe || !moved || moved.id !== swipe.id) {\n return;\n }\n const distance = Math.max(Math.abs(moved.x), Math.abs(moved.y));\n const velocity = distance / Math.max(Date.now() - swipe.startedAt, 1);\n if (distance >= SWIPE_THRESHOLD || velocity > SWIPE_VELOCITY) {\n this.service.close(swipe.id, 'close');\n }\n }\n\n private gap(): number {\n const value = this.document.defaultView?.getComputedStyle(this.host).getPropertyValue('--tx-toast-gap');\n return parseFloat(value ?? '') || 8;\n }\n\n private syncPause(): void {\n if (this.expanded()) {\n this.pauseNew(this.ordered());\n } else {\n this.resumeAll();\n }\n }\n\n private pauseNew(toasts: TxToastMessage[]): void {\n toasts\n .filter((toast) => !this.pausedIds.includes(toast.id))\n .forEach((toast) => {\n this.pausedIds.push(toast.id);\n this.service.pause(toast.id);\n });\n }\n\n private resumeAll(): void {\n const ids = this.pausedIds;\n this.pausedIds = [];\n ids.forEach((id) => this.service.resume(id));\n }\n}\n","@for (toast of ordered(); track toast.id; let index = $index) {\n <div\n class=\"tx-toast__item\"\n animate.leave=\"tx-toast__item--leave\"\n [attr.data-front]=\"index === 0 ? '' : null\"\n [attr.data-visible]=\"index < max() ? '' : null\"\n [attr.data-mounted]=\"isMounted(toast) ? '' : null\"\n [attr.data-swiping]=\"swiping()?.id === toast.id ? '' : null\"\n [style.--_index]=\"index\"\n [style.--_z]=\"ordered().length - index\"\n [style.--_offset.px]=\"offsets()[index]\"\n [style.--_height.px]=\"heightOf(toast)\"\n [style.--_front-height.px]=\"frontHeight()\"\n [style.--_swipe-x.px]=\"swiping()?.id === toast.id ? swiping()?.x : 0\"\n [style.--_swipe-y.px]=\"swiping()?.id === toast.id ? swiping()?.y : 0\"\n [attr.aria-hidden]=\"index < max() ? null : true\"\n (pointerdown)=\"onPointerDown(toast, $event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp()\"\n (pointercancel)=\"onPointerUp()\"\n >\n <div\n class=\"tx-toast__pill\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n [attr.data-severity]=\"toast.severity\"\n [class.tx-toast__pill--loading]=\"toast.loading\"\n [attr.aria-busy]=\"toast.loading || null\"\n >\n @if (toast.template ?? customTemplate()?.template; as template) {\n <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"contextOf(toast)\" />\n } @else {\n @if (toast.loading) {\n <span class=\"tx-toast__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-progress-spinner class=\"tx-toast__spinner\" [size]=\"14\" [strokeWidth]=\"6\" />\n </span>\n } @else if (iconOf(toast); as icon) {\n <span class=\"tx-toast__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-icon [name]=\"icon\" />\n </span>\n }\n <span class=\"tx-toast__body\" [class]=\"passThrough().body?.class\" [style]=\"passThrough().body?.style\">\n @if (toast.title) {\n <span\n class=\"tx-toast__title\"\n [class.tx-toast__title--hidden]=\"!!toast.text\"\n [class]=\"passThrough().title?.class\"\n [style]=\"passThrough().title?.style\"\n >{{ toast.title }}</span\n >\n }\n @if (toast.text) {\n <span class=\"tx-toast__text\" [class]=\"passThrough().text?.class\" [style]=\"passThrough().text?.style\">{{ toast.text }}</span>\n }\n </span>\n @if (toast.actions.length) {\n <span class=\"tx-toast__actions\" [class]=\"passThrough().actions?.class\" [style]=\"passThrough().actions?.style\">\n @for (action of toast.actions; track action.label) {\n <button type=\"button\" class=\"tx-toast__action\" (click)=\"run(toast, action)\">{{ action.label }}</button>\n }\n </span>\n }\n }\n @if (toast.closable) {\n <button\n type=\"button\"\n class=\"tx-toast__close\"\n [class]=\"passThrough().closeButton?.class\"\n [style]=\"passThrough().closeButton?.style\"\n [attr.aria-label]=\"translations().close\"\n (click)=\"close(toast)\"\n >\n <tx-icon name=\"times\" />\n </button>\n }\n @if (toast.showProgress && !toast.sticky && toast.life > 0) {\n <span class=\"tx-toast__progress-track\" aria-hidden=\"true\">\n <span\n class=\"tx-toast__progress\"\n [txAnimationReplay]=\"toast.version\"\n [class]=\"passThrough().progress?.class\"\n [style]=\"passThrough().progress?.style\"\n [style.animation-duration.ms]=\"toast.life\"\n [class.tx-toast__progress--paused]=\"toast.paused\"\n ></span>\n </span>\n }\n </div>\n </div>\n}\n"],"mappings":";;;;;;;;;;;;AAMA,MAAa,mBAAmB,IAAI,eAAwC,kBAAkB;AAG9F,SAAgB,eAAe,SAAgC;CAC7D,OAAO;EAAE,SAAS;EAAkB,UAAU;CAAO;AACvD;AAEA,MAAM,eAAe;AAkBrB,IAAa,iBAAb,MAAa,eAAc;CACjB,YAAY,OAAO,WAAW;CAC9B,WAAW,OAAO,kBAAkB,EAAE,UAAU,KAAI,CAAE,KAAK,CAAA;CAC3D,0BAAU,IAAI,IAAG;CACjB,SAAS;CACA,WAAW,OAAyB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAG/C,SAAS,KAAK,SAAS,WAAU;CAG1C,KAAK,SAAuB;EAC1B,MAAM,KAAK,KAAK;EAChB,MAAM,SAAS,IAAI,QAAO;EAC1B,MAAM,MAAkB;GACtB;GACA,QAAQ,OAAO,aAAY;GAE3B,aAAa,KAAK,MAAM,IAAI,KAAK;GAEjC,SAAS,UAAU,KAAK,OAAO,IAAI,KAAK;EACzC;EACD,MAAM,U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,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,IAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,eAAe,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
@@ -10,6 +10,9 @@ import { TxIcon, injectTxIcons } from "@tectra-ng/icons";
10
10
  import { toStyleObject, toggleSwitchTokens } from "@tectra-ng/themes";
11
11
  var TxToggleSwitchHandleTemplate = class TxToggleSwitchHandleTemplate {
12
12
  templateRef = inject(TemplateRef);
13
+ static ngTemplateContextGuard(_directive, context) {
14
+ return !!context;
15
+ }
13
16
  static ɵfac = i0.ɵɵngDeclareFactory({
14
17
  minVersion: "12.0.0",
15
18
  version: "22.2.5",
@@ -322,8 +325,8 @@ var TxToggleSwitch = class TxToggleSwitch extends TxFormControlBase {
322
325
  }],
323
326
  usesInheritance: true,
324
327
  ngImport: i0,
325
- template: "<span class=\"tx-toggle-switch__track\" [class]=\"passThrough().track?.class\" [style]=\"passThrough().track?.style\">\n <input\n #input\n type=\"checkbox\"\n role=\"switch\"\n class=\"tx-toggle-switch__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-checked]=\"checked()\"\n [attr.name]=\"name() ?? null\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"description() ? descriptionId : null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span class=\"tx-toggle-switch__handle\" aria-hidden=\"true\" [class]=\"passThrough().handle?.class\" [style]=\"passThrough().handle?.style\">\n @if (handleTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: checked() }\" />\n } @else if (handleIcon(); as icon) {\n @if (handleIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n }\n </span>\n</span>\n<span class=\"tx-toggle-switch__text\">\n <label class=\"tx-toggle-switch__label\" [for]=\"resolvedId()\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\"\n >{{ label() }}<ng-content\n /></label>\n @if (description()) {\n <span\n class=\"tx-toggle-switch__description\"\n [id]=\"descriptionId\"\n [class]=\"passThrough().description?.class\"\n [style]=\"passThrough().description?.style\"\n >{{ description() }}</span\n >\n }\n</span>\n",
326
- styles: [":host{display:inline-flex;align-items:flex-start;vertical-align:top}:host([data-label-position=start]){flex-direction:row-reverse}:host([data-styled]){--_width: var(--tx-toggle-switch-width);--_height: var(--tx-toggle-switch-height);--_handle: var(--tx-toggle-switch-handle-size);--_icon: var(--tx-toggle-switch-handle-icon-size);--_label-font-size: var(--tx-toggle-switch-label-font-size);gap:var(--tx-toggle-switch-gap);font-family:var(--tx-font-family)}:host([data-styled][data-size=small]){--_width: var(--tx-toggle-switch-sm-width);--_height: var(--tx-toggle-switch-sm-height);--_handle: var(--tx-toggle-switch-sm-handle-size);--_icon: var(--tx-toggle-switch-sm-icon-size);--_label-font-size: var(--tx-toggle-switch-sm-label-font-size)}:host([data-styled][data-size=large]){--_width: var(--tx-toggle-switch-lg-width);--_height: var(--tx-toggle-switch-lg-height);--_handle: var(--tx-toggle-switch-lg-handle-size);--_icon: var(--tx-toggle-switch-lg-icon-size);--_label-font-size: var(--tx-toggle-switch-lg-label-font-size)}.tx-toggle-switch__track{position:relative;display:inline-flex;flex-shrink:0}.tx-toggle-switch__input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.tx-toggle-switch__input:disabled{cursor:not-allowed}:host([data-styled]) .tx-toggle-switch__track{width:var(--_width);height:var(--_height);box-sizing:border-box;margin-top:max(0px,(var(--_label-font-size) * 1.5 - var(--_height)) / 2);border:var(--tx-toggle-switch-border-width) solid var(--tx-toggle-switch-border-color);border-radius:var(--tx-toggle-switch-border-radius);background:var(--tx-toggle-switch-background);transition:background-color var(--tx-toggle-switch-transition-duration),border-color var(--tx-toggle-switch-transition-duration)}:host([data-styled]) .tx-toggle-switch__handle{position:absolute;top:50%;left:var(--tx-toggle-switch-gutter);display:inline-flex;align-items:center;justify-content:center;width:var(--_handle);height:var(--_handle);border-radius:50%;background:var(--tx-toggle-switch-handle-background);box-shadow:var(--tx-toggle-switch-handle-shadow);color:var(--tx-toggle-switch-handle-icon-color);font-size:var(--_icon);transform:translateY(-50%);transition:left var(--tx-toggle-switch-transition-duration) cubic-bezier(.2,0,0,1),background-color var(--tx-toggle-switch-transition-duration),color var(--tx-toggle-switch-transition-duration)}:host([data-styled].tx-toggle-switch--checked) .tx-toggle-switch__track{border-color:var(--tx-toggle-switch-checked-border-color);background:var(--tx-toggle-switch-checked-background)}:host([data-styled].tx-toggle-switch--checked) .tx-toggle-switch__handle{left:calc(100% - var(--_handle) - var(--tx-toggle-switch-gutter));background:var(--tx-toggle-switch-handle-checked-background);color:var(--tx-toggle-switch-handle-checked-icon-color)}:host([data-styled]:not(.tx-toggle-switch--disabled):not(.tx-toggle-switch--readonly)) .tx-toggle-switch__track:hover{border-color:var(--tx-toggle-switch-hover-border-color);background:var(--tx-toggle-switch-hover-background)}:host([data-styled].tx-toggle-switch--checked:not(.tx-toggle-switch--disabled):not(.tx-toggle-switch--readonly)) .tx-toggle-switch__track:hover{border-color:var(--tx-toggle-switch-checked-hover-border-color);background:var(--tx-toggle-switch-checked-hover-background)}:host([data-styled]) .tx-toggle-switch__track:has(.tx-toggle-switch__input:focus-visible){outline:var(--tx-toggle-switch-focus-ring-width) solid var(--tx-toggle-switch-focus-ring-color);outline-offset:var(--tx-toggle-switch-focus-ring-offset)}:host([data-styled].tx-toggle-switch--invalid) .tx-toggle-switch__track{box-shadow:0 0 0 1px var(--tx-toggle-switch-invalid-ring-color)}:host([data-styled].tx-toggle-switch--disabled) .tx-toggle-switch__track{background:var(--tx-toggle-switch-disabled-background)}:host([data-styled].tx-toggle-switch--disabled) .tx-toggle-switch__handle{background:var(--tx-toggle-switch-handle-disabled-background);box-shadow:none}:host([data-styled].tx-toggle-switch--disabled) .tx-toggle-switch__label{color:var(--tx-toggle-switch-disabled-label-color);cursor:not-allowed}:host([data-styled].tx-toggle-switch--disabled.tx-toggle-switch--checked) .tx-toggle-switch__track{background:var(--tx-toggle-switch-disabled-checked-background)}:host(.tx-toggle-switch--readonly) .tx-toggle-switch__input,:host(.tx-toggle-switch--readonly) .tx-toggle-switch__label{cursor:default}.tx-toggle-switch__text{display:flex;flex-direction:column;min-width:0}.tx-toggle-switch__label:empty{display:none}:host([data-styled]) .tx-toggle-switch__label{color:var(--tx-toggle-switch-label-color);font-size:var(--_label-font-size);line-height:1.5;cursor:pointer}:host([data-styled]) .tx-toggle-switch__description{color:var(--tx-toggle-switch-description-color);font-size:var(--tx-toggle-switch-description-font-size);line-height:1.45}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-toggle-switch__track,:host([data-styled]) .tx-toggle-switch__handle{transition:none}}\n"],
328
+ template: "<span class=\"tx-toggle-switch__track\" [class]=\"passThrough().track?.class\" [style]=\"passThrough().track?.style\">\n <input\n #input\n type=\"checkbox\"\n role=\"switch\"\n class=\"tx-toggle-switch__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-checked]=\"checked()\"\n [attr.name]=\"name() ?? null\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"description() ? descriptionId : null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span class=\"tx-toggle-switch__handle\" aria-hidden=\"true\" [class]=\"passThrough().handle?.class\" [style]=\"passThrough().handle?.style\">\n @if (handleTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: checked() }\" />\n } @else if (handleIcon(); as icon) {\n @if (handleIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n }\n </span>\n</span>\n<span class=\"tx-toggle-switch__text\">\n <label class=\"tx-toggle-switch__label\" [for]=\"resolvedId()\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\"\n >@if (label()) {{{ label() }}}<ng-content\n /></label>\n @if (description()) {\n <span\n class=\"tx-toggle-switch__description\"\n [id]=\"descriptionId\"\n [class]=\"passThrough().description?.class\"\n [style]=\"passThrough().description?.style\"\n >{{ description() }}</span\n >\n }\n</span>\n",
329
+ styles: [":host{display:inline-flex;align-items:flex-start;vertical-align:top}:host([data-label-position=start]){flex-direction:row-reverse}:host([data-styled]){--_width: var(--tx-toggle-switch-width);--_height: var(--tx-toggle-switch-height);--_handle: var(--tx-toggle-switch-handle-size);--_icon: var(--tx-toggle-switch-handle-icon-size);--_label-font-size: var(--tx-toggle-switch-label-font-size);gap:var(--tx-toggle-switch-gap);font-family:var(--tx-font-family)}:host([data-styled][data-size=small]){--_width: var(--tx-toggle-switch-sm-width);--_height: var(--tx-toggle-switch-sm-height);--_handle: var(--tx-toggle-switch-sm-handle-size);--_icon: var(--tx-toggle-switch-sm-icon-size);--_label-font-size: var(--tx-toggle-switch-sm-label-font-size)}:host([data-styled][data-size=large]){--_width: var(--tx-toggle-switch-lg-width);--_height: var(--tx-toggle-switch-lg-height);--_handle: var(--tx-toggle-switch-lg-handle-size);--_icon: var(--tx-toggle-switch-lg-icon-size);--_label-font-size: var(--tx-toggle-switch-lg-label-font-size)}.tx-toggle-switch__track{position:relative;display:inline-flex;flex-shrink:0}.tx-toggle-switch__input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.tx-toggle-switch__input:disabled{cursor:not-allowed}:host([data-styled]) .tx-toggle-switch__track{width:var(--_width);height:var(--_height);box-sizing:border-box;margin-top:max(0px,(var(--_label-font-size) * 1.5 - var(--_height)) / 2);border:var(--tx-toggle-switch-border-width) solid var(--tx-toggle-switch-border-color);border-radius:var(--tx-toggle-switch-border-radius);background:var(--tx-toggle-switch-background);transition:background-color var(--tx-toggle-switch-transition-duration),border-color var(--tx-toggle-switch-transition-duration)}:host([data-styled]) .tx-toggle-switch__handle{position:absolute;top:50%;left:var(--tx-toggle-switch-gutter);display:inline-flex;align-items:center;justify-content:center;width:var(--_handle);height:var(--_handle);border-radius:50%;background:var(--tx-toggle-switch-handle-background);box-shadow:var(--tx-toggle-switch-handle-shadow);color:var(--tx-toggle-switch-handle-icon-color);font-size:var(--_icon);transform:translateY(-50%);transition:left var(--tx-toggle-switch-transition-duration) cubic-bezier(.2,0,0,1),background-color var(--tx-toggle-switch-transition-duration),color var(--tx-toggle-switch-transition-duration)}:host([data-styled].tx-toggle-switch--checked) .tx-toggle-switch__track{border-color:var(--tx-toggle-switch-checked-border-color);background:var(--tx-toggle-switch-checked-background)}:host([data-styled].tx-toggle-switch--checked) .tx-toggle-switch__handle{left:calc(100% - var(--_handle) - var(--tx-toggle-switch-gutter));background:var(--tx-toggle-switch-handle-checked-background);color:var(--tx-toggle-switch-handle-checked-icon-color)}:host([data-styled]:not(.tx-toggle-switch--disabled):not(.tx-toggle-switch--readonly)) .tx-toggle-switch__track:hover{border-color:var(--tx-toggle-switch-hover-border-color);background:var(--tx-toggle-switch-hover-background)}:host([data-styled].tx-toggle-switch--checked:not(.tx-toggle-switch--disabled):not(.tx-toggle-switch--readonly)) .tx-toggle-switch__track:hover{border-color:var(--tx-toggle-switch-checked-hover-border-color);background:var(--tx-toggle-switch-checked-hover-background)}:host([data-styled]) .tx-toggle-switch__track:has(.tx-toggle-switch__input:focus-visible){outline:var(--tx-toggle-switch-focus-ring-width) solid var(--tx-toggle-switch-focus-ring-color);outline-offset:var(--tx-toggle-switch-focus-ring-offset)}:host([data-styled].tx-toggle-switch--invalid) .tx-toggle-switch__track{box-shadow:0 0 0 1px var(--tx-toggle-switch-invalid-ring-color)}:host([data-styled].tx-toggle-switch--disabled) .tx-toggle-switch__track{background:var(--tx-toggle-switch-disabled-background)}:host([data-styled].tx-toggle-switch--disabled) .tx-toggle-switch__handle{background:var(--tx-toggle-switch-handle-disabled-background);box-shadow:none}:host([data-styled].tx-toggle-switch--disabled) .tx-toggle-switch__label{color:var(--tx-toggle-switch-disabled-label-color);cursor:not-allowed}:host([data-styled].tx-toggle-switch--disabled.tx-toggle-switch--checked) .tx-toggle-switch__track{background:var(--tx-toggle-switch-disabled-checked-background)}:host(.tx-toggle-switch--readonly) .tx-toggle-switch__input,:host(.tx-toggle-switch--readonly) .tx-toggle-switch__label{cursor:default}.tx-toggle-switch__text{display:flex;flex-direction:column;min-width:0}.tx-toggle-switch__label:empty{display:none}.tx-toggle-switch__text:has(>.tx-toggle-switch__label:empty):not(:has(>.tx-toggle-switch__description)){display:none}:host([data-styled]) .tx-toggle-switch__label{color:var(--tx-toggle-switch-label-color);font-size:var(--_label-font-size);line-height:1.5;cursor:pointer}:host([data-styled]) .tx-toggle-switch__description{color:var(--tx-toggle-switch-description-color);font-size:var(--tx-toggle-switch-description-font-size);line-height:1.45}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-toggle-switch__track,:host([data-styled]) .tx-toggle-switch__handle{transition:none}}\n"],
327
330
  dependencies: [{
328
331
  kind: "directive",
329
332
  type: NgTemplateOutlet,
@@ -370,8 +373,8 @@ i0.ɵɵngDeclareClassMetadata({
370
373
  "[class.tx-toggle-switch--readonly]": "readonly()",
371
374
  "[class.tx-toggle-switch--invalid]": "isInvalid()"
372
375
  },
373
- template: "<span class=\"tx-toggle-switch__track\" [class]=\"passThrough().track?.class\" [style]=\"passThrough().track?.style\">\n <input\n #input\n type=\"checkbox\"\n role=\"switch\"\n class=\"tx-toggle-switch__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-checked]=\"checked()\"\n [attr.name]=\"name() ?? null\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"description() ? descriptionId : null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span class=\"tx-toggle-switch__handle\" aria-hidden=\"true\" [class]=\"passThrough().handle?.class\" [style]=\"passThrough().handle?.style\">\n @if (handleTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: checked() }\" />\n } @else if (handleIcon(); as icon) {\n @if (handleIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n }\n </span>\n</span>\n<span class=\"tx-toggle-switch__text\">\n <label class=\"tx-toggle-switch__label\" [for]=\"resolvedId()\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\"\n >{{ label() }}<ng-content\n /></label>\n @if (description()) {\n <span\n class=\"tx-toggle-switch__description\"\n [id]=\"descriptionId\"\n [class]=\"passThrough().description?.class\"\n [style]=\"passThrough().description?.style\"\n >{{ description() }}</span\n >\n }\n</span>\n",
374
- styles: [":host{display:inline-flex;align-items:flex-start;vertical-align:top}:host([data-label-position=start]){flex-direction:row-reverse}:host([data-styled]){--_width: var(--tx-toggle-switch-width);--_height: var(--tx-toggle-switch-height);--_handle: var(--tx-toggle-switch-handle-size);--_icon: var(--tx-toggle-switch-handle-icon-size);--_label-font-size: var(--tx-toggle-switch-label-font-size);gap:var(--tx-toggle-switch-gap);font-family:var(--tx-font-family)}:host([data-styled][data-size=small]){--_width: var(--tx-toggle-switch-sm-width);--_height: var(--tx-toggle-switch-sm-height);--_handle: var(--tx-toggle-switch-sm-handle-size);--_icon: var(--tx-toggle-switch-sm-icon-size);--_label-font-size: var(--tx-toggle-switch-sm-label-font-size)}:host([data-styled][data-size=large]){--_width: var(--tx-toggle-switch-lg-width);--_height: var(--tx-toggle-switch-lg-height);--_handle: var(--tx-toggle-switch-lg-handle-size);--_icon: var(--tx-toggle-switch-lg-icon-size);--_label-font-size: var(--tx-toggle-switch-lg-label-font-size)}.tx-toggle-switch__track{position:relative;display:inline-flex;flex-shrink:0}.tx-toggle-switch__input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.tx-toggle-switch__input:disabled{cursor:not-allowed}:host([data-styled]) .tx-toggle-switch__track{width:var(--_width);height:var(--_height);box-sizing:border-box;margin-top:max(0px,(var(--_label-font-size) * 1.5 - var(--_height)) / 2);border:var(--tx-toggle-switch-border-width) solid var(--tx-toggle-switch-border-color);border-radius:var(--tx-toggle-switch-border-radius);background:var(--tx-toggle-switch-background);transition:background-color var(--tx-toggle-switch-transition-duration),border-color var(--tx-toggle-switch-transition-duration)}:host([data-styled]) .tx-toggle-switch__handle{position:absolute;top:50%;left:var(--tx-toggle-switch-gutter);display:inline-flex;align-items:center;justify-content:center;width:var(--_handle);height:var(--_handle);border-radius:50%;background:var(--tx-toggle-switch-handle-background);box-shadow:var(--tx-toggle-switch-handle-shadow);color:var(--tx-toggle-switch-handle-icon-color);font-size:var(--_icon);transform:translateY(-50%);transition:left var(--tx-toggle-switch-transition-duration) cubic-bezier(.2,0,0,1),background-color var(--tx-toggle-switch-transition-duration),color var(--tx-toggle-switch-transition-duration)}:host([data-styled].tx-toggle-switch--checked) .tx-toggle-switch__track{border-color:var(--tx-toggle-switch-checked-border-color);background:var(--tx-toggle-switch-checked-background)}:host([data-styled].tx-toggle-switch--checked) .tx-toggle-switch__handle{left:calc(100% - var(--_handle) - var(--tx-toggle-switch-gutter));background:var(--tx-toggle-switch-handle-checked-background);color:var(--tx-toggle-switch-handle-checked-icon-color)}:host([data-styled]:not(.tx-toggle-switch--disabled):not(.tx-toggle-switch--readonly)) .tx-toggle-switch__track:hover{border-color:var(--tx-toggle-switch-hover-border-color);background:var(--tx-toggle-switch-hover-background)}:host([data-styled].tx-toggle-switch--checked:not(.tx-toggle-switch--disabled):not(.tx-toggle-switch--readonly)) .tx-toggle-switch__track:hover{border-color:var(--tx-toggle-switch-checked-hover-border-color);background:var(--tx-toggle-switch-checked-hover-background)}:host([data-styled]) .tx-toggle-switch__track:has(.tx-toggle-switch__input:focus-visible){outline:var(--tx-toggle-switch-focus-ring-width) solid var(--tx-toggle-switch-focus-ring-color);outline-offset:var(--tx-toggle-switch-focus-ring-offset)}:host([data-styled].tx-toggle-switch--invalid) .tx-toggle-switch__track{box-shadow:0 0 0 1px var(--tx-toggle-switch-invalid-ring-color)}:host([data-styled].tx-toggle-switch--disabled) .tx-toggle-switch__track{background:var(--tx-toggle-switch-disabled-background)}:host([data-styled].tx-toggle-switch--disabled) .tx-toggle-switch__handle{background:var(--tx-toggle-switch-handle-disabled-background);box-shadow:none}:host([data-styled].tx-toggle-switch--disabled) .tx-toggle-switch__label{color:var(--tx-toggle-switch-disabled-label-color);cursor:not-allowed}:host([data-styled].tx-toggle-switch--disabled.tx-toggle-switch--checked) .tx-toggle-switch__track{background:var(--tx-toggle-switch-disabled-checked-background)}:host(.tx-toggle-switch--readonly) .tx-toggle-switch__input,:host(.tx-toggle-switch--readonly) .tx-toggle-switch__label{cursor:default}.tx-toggle-switch__text{display:flex;flex-direction:column;min-width:0}.tx-toggle-switch__label:empty{display:none}:host([data-styled]) .tx-toggle-switch__label{color:var(--tx-toggle-switch-label-color);font-size:var(--_label-font-size);line-height:1.5;cursor:pointer}:host([data-styled]) .tx-toggle-switch__description{color:var(--tx-toggle-switch-description-color);font-size:var(--tx-toggle-switch-description-font-size);line-height:1.45}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-toggle-switch__track,:host([data-styled]) .tx-toggle-switch__handle{transition:none}}\n"]
376
+ template: "<span class=\"tx-toggle-switch__track\" [class]=\"passThrough().track?.class\" [style]=\"passThrough().track?.style\">\n <input\n #input\n type=\"checkbox\"\n role=\"switch\"\n class=\"tx-toggle-switch__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-checked]=\"checked()\"\n [attr.name]=\"name() ?? null\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"description() ? descriptionId : null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span class=\"tx-toggle-switch__handle\" aria-hidden=\"true\" [class]=\"passThrough().handle?.class\" [style]=\"passThrough().handle?.style\">\n @if (handleTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: checked() }\" />\n } @else if (handleIcon(); as icon) {\n @if (handleIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n }\n </span>\n</span>\n<span class=\"tx-toggle-switch__text\">\n <label class=\"tx-toggle-switch__label\" [for]=\"resolvedId()\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\"\n >@if (label()) {{{ label() }}}<ng-content\n /></label>\n @if (description()) {\n <span\n class=\"tx-toggle-switch__description\"\n [id]=\"descriptionId\"\n [class]=\"passThrough().description?.class\"\n [style]=\"passThrough().description?.style\"\n >{{ description() }}</span\n >\n }\n</span>\n",
377
+ styles: [":host{display:inline-flex;align-items:flex-start;vertical-align:top}:host([data-label-position=start]){flex-direction:row-reverse}:host([data-styled]){--_width: var(--tx-toggle-switch-width);--_height: var(--tx-toggle-switch-height);--_handle: var(--tx-toggle-switch-handle-size);--_icon: var(--tx-toggle-switch-handle-icon-size);--_label-font-size: var(--tx-toggle-switch-label-font-size);gap:var(--tx-toggle-switch-gap);font-family:var(--tx-font-family)}:host([data-styled][data-size=small]){--_width: var(--tx-toggle-switch-sm-width);--_height: var(--tx-toggle-switch-sm-height);--_handle: var(--tx-toggle-switch-sm-handle-size);--_icon: var(--tx-toggle-switch-sm-icon-size);--_label-font-size: var(--tx-toggle-switch-sm-label-font-size)}:host([data-styled][data-size=large]){--_width: var(--tx-toggle-switch-lg-width);--_height: var(--tx-toggle-switch-lg-height);--_handle: var(--tx-toggle-switch-lg-handle-size);--_icon: var(--tx-toggle-switch-lg-icon-size);--_label-font-size: var(--tx-toggle-switch-lg-label-font-size)}.tx-toggle-switch__track{position:relative;display:inline-flex;flex-shrink:0}.tx-toggle-switch__input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.tx-toggle-switch__input:disabled{cursor:not-allowed}:host([data-styled]) .tx-toggle-switch__track{width:var(--_width);height:var(--_height);box-sizing:border-box;margin-top:max(0px,(var(--_label-font-size) * 1.5 - var(--_height)) / 2);border:var(--tx-toggle-switch-border-width) solid var(--tx-toggle-switch-border-color);border-radius:var(--tx-toggle-switch-border-radius);background:var(--tx-toggle-switch-background);transition:background-color var(--tx-toggle-switch-transition-duration),border-color var(--tx-toggle-switch-transition-duration)}:host([data-styled]) .tx-toggle-switch__handle{position:absolute;top:50%;left:var(--tx-toggle-switch-gutter);display:inline-flex;align-items:center;justify-content:center;width:var(--_handle);height:var(--_handle);border-radius:50%;background:var(--tx-toggle-switch-handle-background);box-shadow:var(--tx-toggle-switch-handle-shadow);color:var(--tx-toggle-switch-handle-icon-color);font-size:var(--_icon);transform:translateY(-50%);transition:left var(--tx-toggle-switch-transition-duration) cubic-bezier(.2,0,0,1),background-color var(--tx-toggle-switch-transition-duration),color var(--tx-toggle-switch-transition-duration)}:host([data-styled].tx-toggle-switch--checked) .tx-toggle-switch__track{border-color:var(--tx-toggle-switch-checked-border-color);background:var(--tx-toggle-switch-checked-background)}:host([data-styled].tx-toggle-switch--checked) .tx-toggle-switch__handle{left:calc(100% - var(--_handle) - var(--tx-toggle-switch-gutter));background:var(--tx-toggle-switch-handle-checked-background);color:var(--tx-toggle-switch-handle-checked-icon-color)}:host([data-styled]:not(.tx-toggle-switch--disabled):not(.tx-toggle-switch--readonly)) .tx-toggle-switch__track:hover{border-color:var(--tx-toggle-switch-hover-border-color);background:var(--tx-toggle-switch-hover-background)}:host([data-styled].tx-toggle-switch--checked:not(.tx-toggle-switch--disabled):not(.tx-toggle-switch--readonly)) .tx-toggle-switch__track:hover{border-color:var(--tx-toggle-switch-checked-hover-border-color);background:var(--tx-toggle-switch-checked-hover-background)}:host([data-styled]) .tx-toggle-switch__track:has(.tx-toggle-switch__input:focus-visible){outline:var(--tx-toggle-switch-focus-ring-width) solid var(--tx-toggle-switch-focus-ring-color);outline-offset:var(--tx-toggle-switch-focus-ring-offset)}:host([data-styled].tx-toggle-switch--invalid) .tx-toggle-switch__track{box-shadow:0 0 0 1px var(--tx-toggle-switch-invalid-ring-color)}:host([data-styled].tx-toggle-switch--disabled) .tx-toggle-switch__track{background:var(--tx-toggle-switch-disabled-background)}:host([data-styled].tx-toggle-switch--disabled) .tx-toggle-switch__handle{background:var(--tx-toggle-switch-handle-disabled-background);box-shadow:none}:host([data-styled].tx-toggle-switch--disabled) .tx-toggle-switch__label{color:var(--tx-toggle-switch-disabled-label-color);cursor:not-allowed}:host([data-styled].tx-toggle-switch--disabled.tx-toggle-switch--checked) .tx-toggle-switch__track{background:var(--tx-toggle-switch-disabled-checked-background)}:host(.tx-toggle-switch--readonly) .tx-toggle-switch__input,:host(.tx-toggle-switch--readonly) .tx-toggle-switch__label{cursor:default}.tx-toggle-switch__text{display:flex;flex-direction:column;min-width:0}.tx-toggle-switch__label:empty{display:none}.tx-toggle-switch__text:has(>.tx-toggle-switch__label:empty):not(:has(>.tx-toggle-switch__description)){display:none}:host([data-styled]) .tx-toggle-switch__label{color:var(--tx-toggle-switch-label-color);font-size:var(--_label-font-size);line-height:1.5;cursor:pointer}:host([data-styled]) .tx-toggle-switch__description{color:var(--tx-toggle-switch-description-color);font-size:var(--tx-toggle-switch-description-font-size);line-height:1.45}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-toggle-switch__track,:host([data-styled]) .tx-toggle-switch__handle{transition:none}}\n"]
375
378
  }]
376
379
  }],
377
380
  propDecorators: {
@@ -1 +1 @@
1
- {"version":3,"file":"tectra-ng-ui-toggle-switch.mjs","names":[],"sources":["../../../../packages/ui/toggle-switch/src/toggle-switch-templates.directive.ts","../../../../packages/ui/toggle-switch/src/toggle-switch.theme.ts","../../../../packages/ui/toggle-switch/src/toggle-switch.component.ts","../../../../packages/ui/toggle-switch/src/toggle-switch.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxToggleSwitchHandleContext } from './toggle-switch.types';\n\n@Directive({ selector: 'ng-template[txToggleSwitchHandle]' })\nexport class TxToggleSwitchHandleTemplate {\n readonly templateRef = inject<TemplateRef<TxToggleSwitchHandleContext>>(TemplateRef);\n}\n","import { toggleSwitchTokens } from '@tectra-ng/themes';\n\nexport const TOGGLE_SWITCH_THEME = {\n toggleSwitch: toggleSwitchTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n contentChild,\n forwardRef,\n input,\n output,\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 { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { injectTxIcons, TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraToggleSwitchTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxToggleSwitchHandleTemplate } from './toggle-switch-templates.directive';\nimport { TxToggleSwitchChangeEvent, TxToggleSwitchLabelPosition, TxToggleSwitchPart, TxToggleSwitchSize } from './toggle-switch.types';\nimport { TOGGLE_SWITCH_THEME } from './toggle-switch.theme';\n\n@Component({\n selector: 'tx-toggle-switch',\n imports: [NgTemplateOutlet, TxIcon],\n templateUrl: './toggle-switch.component.html',\n styleUrl: './toggle-switch.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxToggleSwitch), multi: true }],\n host: {\n class: 'tx-toggle-switch',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[attr.data-label-position]': 'labelPosition()',\n '[class.tx-toggle-switch--checked]': 'checked()',\n '[class.tx-toggle-switch--disabled]': 'isDisabled()',\n '[class.tx-toggle-switch--readonly]': 'readonly()',\n '[class.tx-toggle-switch--invalid]': 'isInvalid()',\n },\n})\nexport class TxToggleSwitch extends TxFormControlBase<unknown> {\n private readonly toggleSwitchTheme = injectTokens(TOGGLE_SWITCH_THEME);\n\n private txIconRegistry = injectTxIcons();\n private generatedId = uniqueId('tx-toggle-switch');\n\n readonly label = input<string | undefined>(undefined);\n readonly description = input<string | undefined>(undefined);\n readonly labelPosition = input<TxToggleSwitchLabelPosition>('end');\n readonly trueValue = input<unknown>(true);\n readonly falseValue = input<unknown>(false);\n readonly onIcon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly offIcon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly size = input<TxToggleSwitchSize>('medium');\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input<boolean, unknown>(false, { alias: 'disabled', transform: booleanAttribute });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly required = input<boolean, unknown>(false, { transform: booleanAttribute });\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<TectraToggleSwitchTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxToggleSwitchPart, TxToggleSwitch> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly changed = output<TxToggleSwitchChangeEvent>();\n\n readonly handleTemplate = contentChild(TxToggleSwitchHandleTemplate);\n readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('toggleSwitch', this, this.pt, this.ptOptions);\n readonly isInvalid = injectFieldInvalid(this.invalid);\n\n readonly resolvedId = computed(() => this.inputId() ?? this.generatedId);\n readonly descriptionId = `${this.generatedId}-description`;\n readonly isDisabled = computed(() => this.disabled() || this.disabledInput());\n readonly checked = computed(() => this.value() === this.trueValue());\n readonly handleIcon = computed(() => (this.checked() ? this.onIcon() : this.offIcon()));\n readonly handleIconName = computed(() => {\n const icon = this.handleIcon();\n return icon && this.txIconRegistry.has(icon) ? icon : null;\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-toggle-switch'), ...this.passThrough().root?.style }));\n\n override writeValue(value: unknown): void {\n super.writeValue(value === undefined || value === null ? this.falseValue() : value);\n }\n\n focus(): void {\n this.inputRef().nativeElement.focus();\n }\n\n onInputClick(event: MouseEvent): void {\n if (this.readonly()) {\n event.preventDefault();\n }\n }\n\n onInputChange(event: Event): void {\n const checked = (event.target as HTMLInputElement).checked;\n const value = checked ? this.trueValue() : this.falseValue();\n this.updateValue(value);\n this.changed.emit({ checked, value, originalEvent: event });\n }\n\n onBlur(): void {\n this.markTouched();\n }\n}\n","<span class=\"tx-toggle-switch__track\" [class]=\"passThrough().track?.class\" [style]=\"passThrough().track?.style\">\n <input\n #input\n type=\"checkbox\"\n role=\"switch\"\n class=\"tx-toggle-switch__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-checked]=\"checked()\"\n [attr.name]=\"name() ?? null\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"description() ? descriptionId : null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span class=\"tx-toggle-switch__handle\" aria-hidden=\"true\" [class]=\"passThrough().handle?.class\" [style]=\"passThrough().handle?.style\">\n @if (handleTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: checked() }\" />\n } @else if (handleIcon(); as icon) {\n @if (handleIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n }\n </span>\n</span>\n<span class=\"tx-toggle-switch__text\">\n <label class=\"tx-toggle-switch__label\" [for]=\"resolvedId()\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\"\n >{{ label() }}<ng-content\n /></label>\n @if (description()) {\n <span\n class=\"tx-toggle-switch__description\"\n [id]=\"descriptionId\"\n [class]=\"passThrough().description?.class\"\n [style]=\"passThrough().description?.style\"\n >{{ description() }}</span\n >\n }\n</span>\n"],"mappings":";;;;;;;;;;AAIA,IAAa,+BAAb,MAAa,6BAA4B;CAC9B,cAAc,OAAiD,WAAW;CADxE,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAA4B,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAA5B,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAA4B,cAAA;EAAA,UAAA;EAAA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","names":[],"sources":["../../../../packages/ui/toggle-switch/src/toggle-switch-templates.directive.ts","../../../../packages/ui/toggle-switch/src/toggle-switch.theme.ts","../../../../packages/ui/toggle-switch/src/toggle-switch.component.ts","../../../../packages/ui/toggle-switch/src/toggle-switch.component.html"],"sourcesContent":["import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxToggleSwitchHandleContext } from './toggle-switch.types';\n\n@Directive({ selector: 'ng-template[txToggleSwitchHandle]' })\nexport class TxToggleSwitchHandleTemplate {\n readonly templateRef = inject<TemplateRef<TxToggleSwitchHandleContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxToggleSwitchHandleTemplate, context: unknown): context is TxToggleSwitchHandleContext {\n return !!context;\n }\n}\n","import { toggleSwitchTokens } from '@tectra-ng/themes';\n\nexport const TOGGLE_SWITCH_THEME = {\n toggleSwitch: toggleSwitchTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n booleanAttribute,\n computed,\n contentChild,\n forwardRef,\n input,\n output,\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 { TxFormControlBase, injectFieldInvalid } from '@tectra-ng/core/forms';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { injectTxIcons, TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraToggleSwitchTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxToggleSwitchHandleTemplate } from './toggle-switch-templates.directive';\nimport { TxToggleSwitchChangeEvent, TxToggleSwitchLabelPosition, TxToggleSwitchPart, TxToggleSwitchSize } from './toggle-switch.types';\nimport { TOGGLE_SWITCH_THEME } from './toggle-switch.theme';\n\n@Component({\n selector: 'tx-toggle-switch',\n imports: [NgTemplateOutlet, TxIcon],\n templateUrl: './toggle-switch.component.html',\n styleUrl: './toggle-switch.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxToggleSwitch), multi: true }],\n host: {\n class: 'tx-toggle-switch',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-size]': 'size()',\n '[attr.data-label-position]': 'labelPosition()',\n '[class.tx-toggle-switch--checked]': 'checked()',\n '[class.tx-toggle-switch--disabled]': 'isDisabled()',\n '[class.tx-toggle-switch--readonly]': 'readonly()',\n '[class.tx-toggle-switch--invalid]': 'isInvalid()',\n },\n})\nexport class TxToggleSwitch extends TxFormControlBase<unknown> {\n private readonly toggleSwitchTheme = injectTokens(TOGGLE_SWITCH_THEME);\n\n private txIconRegistry = injectTxIcons();\n private generatedId = uniqueId('tx-toggle-switch');\n\n readonly label = input<string | undefined>(undefined);\n readonly description = input<string | undefined>(undefined);\n readonly labelPosition = input<TxToggleSwitchLabelPosition>('end');\n readonly trueValue = input<unknown>(true);\n readonly falseValue = input<unknown>(false);\n readonly onIcon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly offIcon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly size = input<TxToggleSwitchSize>('medium');\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n // eslint-disable-next-line @angular-eslint/no-input-rename\n readonly disabledInput = input<boolean, unknown>(false, { alias: 'disabled', transform: booleanAttribute });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly required = input<boolean, unknown>(false, { transform: booleanAttribute });\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<TectraToggleSwitchTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxToggleSwitchPart, TxToggleSwitch> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly changed = output<TxToggleSwitchChangeEvent>();\n\n readonly handleTemplate = contentChild(TxToggleSwitchHandleTemplate);\n readonly inputRef = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('toggleSwitch', this, this.pt, this.ptOptions);\n readonly isInvalid = injectFieldInvalid(this.invalid);\n\n readonly resolvedId = computed(() => this.inputId() ?? this.generatedId);\n readonly descriptionId = `${this.generatedId}-description`;\n readonly isDisabled = computed(() => this.disabled() || this.disabledInput());\n readonly checked = computed(() => this.value() === this.trueValue());\n readonly handleIcon = computed(() => (this.checked() ? this.onIcon() : this.offIcon()));\n readonly handleIconName = computed(() => {\n const icon = this.handleIcon();\n return icon && this.txIconRegistry.has(icon) ? icon : null;\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-toggle-switch'), ...this.passThrough().root?.style }));\n\n override writeValue(value: unknown): void {\n super.writeValue(value === undefined || value === null ? this.falseValue() : value);\n }\n\n focus(): void {\n this.inputRef().nativeElement.focus();\n }\n\n onInputClick(event: MouseEvent): void {\n if (this.readonly()) {\n event.preventDefault();\n }\n }\n\n onInputChange(event: Event): void {\n const checked = (event.target as HTMLInputElement).checked;\n const value = checked ? this.trueValue() : this.falseValue();\n this.updateValue(value);\n this.changed.emit({ checked, value, originalEvent: event });\n }\n\n onBlur(): void {\n this.markTouched();\n }\n}\n","<span class=\"tx-toggle-switch__track\" [class]=\"passThrough().track?.class\" [style]=\"passThrough().track?.style\">\n <input\n #input\n type=\"checkbox\"\n role=\"switch\"\n class=\"tx-toggle-switch__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.aria-checked]=\"checked()\"\n [attr.name]=\"name() ?? null\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"description() ? descriptionId : null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span class=\"tx-toggle-switch__handle\" aria-hidden=\"true\" [class]=\"passThrough().handle?.class\" [style]=\"passThrough().handle?.style\">\n @if (handleTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: checked() }\" />\n } @else if (handleIcon(); as icon) {\n @if (handleIconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n }\n </span>\n</span>\n<span class=\"tx-toggle-switch__text\">\n <label class=\"tx-toggle-switch__label\" [for]=\"resolvedId()\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\"\n >@if (label()) {{{ label() }}}<ng-content\n /></label>\n @if (description()) {\n <span\n class=\"tx-toggle-switch__description\"\n [id]=\"descriptionId\"\n [class]=\"passThrough().description?.class\"\n [style]=\"passThrough().description?.style\"\n >{{ description() }}</span\n >\n }\n</span>\n"],"mappings":";;;;;;;;;;AAIA,IAAa,+BAAb,MAAa,6BAA4B;CAC9B,cAAc,OAAiD,WAAW;CAEnF,OAAO,uBAAuB,YAA0C,SAAgB;EACtF,OAAO,CAAC,CAAC;CACX;CALW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAA4B,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAA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