@tectra-ng/ui 0.4.4 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/amount/README.md +19 -1
- package/analog-clock/README.md +1 -1
- package/autocomplete/README.md +1 -1
- package/avatar/README.md +24 -4
- package/cascade-select/README.md +1 -1
- package/chips-input/README.md +11 -5
- package/color-picker/README.md +5 -0
- package/countdown/README.md +7 -1
- package/country/README.md +14 -1
- package/country-select/README.md +2 -1
- package/export/README.md +27 -2
- package/export-font/README.md +1 -1
- package/fesm2022/tectra-ng-ui-amount.mjs +96 -14
- package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-analog-clock.mjs +6 -19
- package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-autocomplete.mjs +5 -4
- package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-avatar.mjs +59 -17
- package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-button.mjs +2 -2
- package/fesm2022/tectra-ng-ui-button.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-card.mjs +2 -2
- package/fesm2022/tectra-ng-ui-card.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-cascade-select.mjs +7 -4
- package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-chips-input.mjs +142 -22
- package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-color-picker.mjs +93 -6
- package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-countdown.mjs +39 -10
- package/fesm2022/tectra-ng-ui-countdown.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-country-select.mjs +28 -5
- package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-country.mjs +15 -6
- package/fesm2022/tectra-ng-ui-country.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-datepicker.mjs +10 -8
- package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-dialog.mjs +6 -6
- package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-export.mjs +1237 -84
- package/fesm2022/tectra-ng-ui-export.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-field.mjs +1 -0
- package/fesm2022/tectra-ng-ui-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-fieldset.mjs +2 -2
- package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-icon-field.mjs +51 -23
- package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input-number.mjs +2 -2
- package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input.mjs +5 -4
- package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-key-filter.mjs +84 -19
- package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-knob.mjs +24 -2
- package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-label.mjs +68 -9
- package/fesm2022/tectra-ng-ui-label.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-link.mjs +38 -14
- package/fesm2022/tectra-ng-ui-link.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-mention-textarea.mjs +16 -5
- package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-message.mjs +17 -7
- package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-month-calendar.mjs +26 -9
- package/fesm2022/tectra-ng-ui-month-calendar.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-multiselect.mjs +3 -2
- package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel-menu.mjs +45 -14
- package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel.mjs +4 -2
- package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-password-generator.mjs +18 -1
- package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-password.mjs +2 -2
- package/fesm2022/tectra-ng-ui-password.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-pill.mjs +33 -17
- package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-rating.mjs +2 -2
- package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-select.mjs +30 -7
- package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs +93 -8
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-status-icon.mjs +40 -3
- package/fesm2022/tectra-ng-ui-status-icon.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-table.mjs +20 -6
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tag.mjs +2 -2
- package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toast.mjs +2 -2
- package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-select.mjs +10 -8
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-table.mjs +4 -4
- package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-truncate-text.mjs +33 -9
- package/fesm2022/tectra-ng-ui-truncate-text.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui.mjs +1 -1
- package/icon-field/README.md +2 -1
- package/key-filter/README.md +3 -2
- package/knob/README.md +3 -1
- package/label/README.md +4 -1
- package/link/README.md +4 -1
- package/message/README.md +3 -3
- package/month-calendar/README.md +2 -1
- package/multiselect/README.md +1 -1
- package/package.json +4 -4
- package/panel/README.md +3 -1
- package/panel-menu/README.md +3 -2
- package/password-generator/README.md +2 -0
- package/pill/README.md +4 -4
- package/select/README.md +1 -1
- package/stat-tiles/README.md +17 -1
- package/status-icon/README.md +3 -1
- package/table/README.md +1 -1
- package/tag/README.md +2 -0
- package/tree-select/README.md +1 -1
- package/truncate-text/README.md +2 -1
- package/types/tectra-ng-ui-amount.d.ts +41 -1
- package/types/tectra-ng-ui-amount.d.ts.map +1 -1
- package/types/tectra-ng-ui-analog-clock.d.ts +1 -4
- package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -1
- package/types/tectra-ng-ui-autocomplete.d.ts +1 -1
- package/types/tectra-ng-ui-avatar.d.ts +45 -12
- package/types/tectra-ng-ui-avatar.d.ts.map +1 -1
- package/types/tectra-ng-ui-cascade-select.d.ts +3 -2
- package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-chips-input.d.ts +62 -6
- package/types/tectra-ng-ui-chips-input.d.ts.map +1 -1
- package/types/tectra-ng-ui-color-picker.d.ts +38 -1
- package/types/tectra-ng-ui-color-picker.d.ts.map +1 -1
- package/types/tectra-ng-ui-countdown.d.ts +12 -1
- package/types/tectra-ng-ui-countdown.d.ts.map +1 -1
- package/types/tectra-ng-ui-country-select.d.ts +17 -4
- package/types/tectra-ng-ui-country-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-country.d.ts +7 -1
- package/types/tectra-ng-ui-country.d.ts.map +1 -1
- package/types/tectra-ng-ui-datepicker.d.ts +2 -2
- package/types/tectra-ng-ui-datepicker.d.ts.map +1 -1
- package/types/tectra-ng-ui-export.d.ts +68 -8
- package/types/tectra-ng-ui-export.d.ts.map +1 -1
- package/types/tectra-ng-ui-icon-field.d.ts +9 -2
- package/types/tectra-ng-ui-icon-field.d.ts.map +1 -1
- package/types/tectra-ng-ui-key-filter.d.ts +19 -4
- package/types/tectra-ng-ui-key-filter.d.ts.map +1 -1
- package/types/tectra-ng-ui-knob.d.ts +10 -2
- package/types/tectra-ng-ui-knob.d.ts.map +1 -1
- package/types/tectra-ng-ui-label.d.ts +8 -1
- package/types/tectra-ng-ui-label.d.ts.map +1 -1
- package/types/tectra-ng-ui-link.d.ts +8 -2
- package/types/tectra-ng-ui-link.d.ts.map +1 -1
- package/types/tectra-ng-ui-mention-textarea.d.ts +5 -0
- package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -1
- package/types/tectra-ng-ui-message.d.ts +6 -3
- package/types/tectra-ng-ui-message.d.ts.map +1 -1
- package/types/tectra-ng-ui-month-calendar.d.ts +14 -4
- package/types/tectra-ng-ui-month-calendar.d.ts.map +1 -1
- package/types/tectra-ng-ui-multiselect.d.ts +1 -1
- package/types/tectra-ng-ui-panel-menu.d.ts +34 -6
- package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -1
- package/types/tectra-ng-ui-panel.d.ts +1 -1
- package/types/tectra-ng-ui-panel.d.ts.map +1 -1
- package/types/tectra-ng-ui-password-generator.d.ts +10 -3
- package/types/tectra-ng-ui-password-generator.d.ts.map +1 -1
- package/types/tectra-ng-ui-pill.d.ts +9 -5
- package/types/tectra-ng-ui-pill.d.ts.map +1 -1
- package/types/tectra-ng-ui-select.d.ts +5 -2
- package/types/tectra-ng-ui-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-stat-tiles.d.ts +49 -5
- package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -1
- package/types/tectra-ng-ui-status-icon.d.ts +20 -2
- package/types/tectra-ng-ui-status-icon.d.ts.map +1 -1
- package/types/tectra-ng-ui-table.d.ts +2 -1
- package/types/tectra-ng-ui-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tree-select.d.ts +3 -3
- package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-truncate-text.d.ts +7 -2
- package/types/tectra-ng-ui-truncate-text.d.ts.map +1 -1
- package/types/tectra-ng-ui.d.ts +1 -1
|
@@ -244,7 +244,7 @@ var TxTag = class TxTag {
|
|
|
244
244
|
}
|
|
245
245
|
`,
|
|
246
246
|
isInline: true,
|
|
247
|
-
styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-tag__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-tag__label:empty{display:none}:host([data-styled]){--_tone: var(--tx-tag-primary-color);--_background: var(--tx-tag-primary-background);flex-shrink:0;gap:var(--tx-tag-gap);box-sizing:border-box;padding:var(--tx-tag-padding-y) var(--tx-tag-padding-x);border-radius:var(--tx-tag-border-radius);background:color-mix(in srgb,var(--_background) var(--tx-tag-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-tag-font-size);font-weight:var(--tx-tag-font-weight);line-height:var(--tx-tag-line-height)}:host([data-styled][data-severity=secondary]){--_tone: var(--tx-tag-secondary-color);--_background: var(--tx-tag-secondary-background)}:host([data-styled][data-severity=success]){--_tone: var(--tx-tag-success-color);--_background: var(--tx-tag-success-background)}:host([data-styled][data-severity=info]){--_tone: var(--tx-tag-info-color);--_background: var(--tx-tag-info-background)}:host([data-styled][data-severity=warn]){--_tone: var(--tx-tag-warn-color);--_background: var(--tx-tag-warn-background)}:host([data-styled][data-severity=danger]){--_tone: var(--tx-tag-danger-color);--_background: var(--tx-tag-danger-background)}:host([data-styled][data-severity=help]){--_tone: var(--tx-tag-help-color);--_background: var(--tx-tag-help-background)}:host([data-styled][data-severity=contrast]){--_tone: var(--tx-tag-contrast-color);--_background: var(--tx-tag-contrast-background)}:host([data-styled][data-size=small]){padding:var(--tx-tag-sm-padding-y) var(--tx-tag-sm-padding-x);font-size:var(--tx-tag-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-tag-lg-padding-y) var(--tx-tag-lg-padding-x);font-size:var(--tx-tag-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-tag-lg-gap)}:host([data-styled].tx-tag--rounded){border-radius:var(--tx-tag-rounded-border-radius)}:host([data-styled]) .tx-tag__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-tag-icon-size)}:host([data-styled]) .tx-tag__action{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-tag-action-size);height:var(--tx-tag-action-size);margin-inline-end
|
|
247
|
+
styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-tag__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-tag__label:empty{display:none}:host([data-styled]){--_tone: var(--tx-tag-primary-color);--_background: var(--tx-tag-primary-background);flex-shrink:0;gap:var(--tx-tag-gap);box-sizing:border-box;padding:var(--tx-tag-padding-y) var(--tx-tag-padding-x);border-radius:var(--tx-tag-border-radius);background:color-mix(in srgb,var(--_background) var(--tx-tag-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-tag-font-size);font-weight:var(--tx-tag-font-weight);line-height:var(--tx-tag-line-height)}:host([data-styled][data-severity=secondary]){--_tone: var(--tx-tag-secondary-color);--_background: var(--tx-tag-secondary-background)}:host([data-styled][data-severity=success]){--_tone: var(--tx-tag-success-color);--_background: var(--tx-tag-success-background)}:host([data-styled][data-severity=info]){--_tone: var(--tx-tag-info-color);--_background: var(--tx-tag-info-background)}:host([data-styled][data-severity=warn]){--_tone: var(--tx-tag-warn-color);--_background: var(--tx-tag-warn-background)}:host([data-styled][data-severity=danger]){--_tone: var(--tx-tag-danger-color);--_background: var(--tx-tag-danger-background)}:host([data-styled][data-severity=help]){--_tone: var(--tx-tag-help-color);--_background: var(--tx-tag-help-background)}:host([data-styled][data-severity=contrast]){--_tone: var(--tx-tag-contrast-color);--_background: var(--tx-tag-contrast-background)}:host([data-styled][data-size=small]){padding:var(--tx-tag-sm-padding-y) var(--tx-tag-sm-padding-x);font-size:var(--tx-tag-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-tag-lg-padding-y) var(--tx-tag-lg-padding-x);font-size:var(--tx-tag-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-tag-lg-gap)}:host([data-styled].tx-tag--rounded){border-radius:var(--tx-tag-rounded-border-radius)}:host([data-styled]) .tx-tag__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-tag-icon-size)}:host([data-styled]) .tx-tag__action{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-tag-action-size);height:var(--tx-tag-action-size);margin-inline-end:var(--tx-tag-action-offset);padding:0;border:none;border-radius:var(--tx-radius-xs);background:transparent;color:inherit;font-size:.85em;opacity:.75;cursor:pointer;transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),opacity var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-tag__action:hover{background:color-mix(in srgb,currentColor 16%,transparent);opacity:1}:host([data-styled]) .tx-tag__action:focus-visible{outline:2px solid var(--tx-tag-focus-ring-color);outline-offset:1px;opacity:1}:host([data-styled]) .tx-tag__action+.tx-tag__action{margin-inline-start:-2px}:host([data-styled]) .tx-tag__copy--done{opacity:1}.tx-copy-swap{display:inline-grid;place-items:center}.tx-copy-swap__icon{grid-area:1/1;transition:opacity var(--tx-motion-duration) ease,transform var(--tx-motion-duration) cubic-bezier(.34,1.56,.64,1)}.tx-copy-swap__icon--done{opacity:0;transform:scale(.4) rotate(-45deg)}.tx-copy-swap--done .tx-copy-swap__icon--idle{opacity:0;transform:scale(.4) rotate(45deg)}.tx-copy-swap--done .tx-copy-swap__icon--done{opacity:1;transform:none}@media(prefers-reduced-motion:reduce){.tx-copy-swap__icon{transition:none}}\n"],
|
|
248
248
|
dependencies: [{
|
|
249
249
|
kind: "component",
|
|
250
250
|
type: TxIcon,
|
|
@@ -317,7 +317,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
317
317
|
"[class.tx-tag--rounded]": "rounded()"
|
|
318
318
|
},
|
|
319
319
|
viewProviders: [provideTxIconDefaults(TAG_ICON_DEFAULTS)],
|
|
320
|
-
styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-tag__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-tag__label:empty{display:none}:host([data-styled]){--_tone: var(--tx-tag-primary-color);--_background: var(--tx-tag-primary-background);flex-shrink:0;gap:var(--tx-tag-gap);box-sizing:border-box;padding:var(--tx-tag-padding-y) var(--tx-tag-padding-x);border-radius:var(--tx-tag-border-radius);background:color-mix(in srgb,var(--_background) var(--tx-tag-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-tag-font-size);font-weight:var(--tx-tag-font-weight);line-height:var(--tx-tag-line-height)}:host([data-styled][data-severity=secondary]){--_tone: var(--tx-tag-secondary-color);--_background: var(--tx-tag-secondary-background)}:host([data-styled][data-severity=success]){--_tone: var(--tx-tag-success-color);--_background: var(--tx-tag-success-background)}:host([data-styled][data-severity=info]){--_tone: var(--tx-tag-info-color);--_background: var(--tx-tag-info-background)}:host([data-styled][data-severity=warn]){--_tone: var(--tx-tag-warn-color);--_background: var(--tx-tag-warn-background)}:host([data-styled][data-severity=danger]){--_tone: var(--tx-tag-danger-color);--_background: var(--tx-tag-danger-background)}:host([data-styled][data-severity=help]){--_tone: var(--tx-tag-help-color);--_background: var(--tx-tag-help-background)}:host([data-styled][data-severity=contrast]){--_tone: var(--tx-tag-contrast-color);--_background: var(--tx-tag-contrast-background)}:host([data-styled][data-size=small]){padding:var(--tx-tag-sm-padding-y) var(--tx-tag-sm-padding-x);font-size:var(--tx-tag-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-tag-lg-padding-y) var(--tx-tag-lg-padding-x);font-size:var(--tx-tag-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-tag-lg-gap)}:host([data-styled].tx-tag--rounded){border-radius:var(--tx-tag-rounded-border-radius)}:host([data-styled]) .tx-tag__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-tag-icon-size)}:host([data-styled]) .tx-tag__action{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-tag-action-size);height:var(--tx-tag-action-size);margin-inline-end
|
|
320
|
+
styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-tag__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-tag__label:empty{display:none}:host([data-styled]){--_tone: var(--tx-tag-primary-color);--_background: var(--tx-tag-primary-background);flex-shrink:0;gap:var(--tx-tag-gap);box-sizing:border-box;padding:var(--tx-tag-padding-y) var(--tx-tag-padding-x);border-radius:var(--tx-tag-border-radius);background:color-mix(in srgb,var(--_background) var(--tx-tag-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-tag-font-size);font-weight:var(--tx-tag-font-weight);line-height:var(--tx-tag-line-height)}:host([data-styled][data-severity=secondary]){--_tone: var(--tx-tag-secondary-color);--_background: var(--tx-tag-secondary-background)}:host([data-styled][data-severity=success]){--_tone: var(--tx-tag-success-color);--_background: var(--tx-tag-success-background)}:host([data-styled][data-severity=info]){--_tone: var(--tx-tag-info-color);--_background: var(--tx-tag-info-background)}:host([data-styled][data-severity=warn]){--_tone: var(--tx-tag-warn-color);--_background: var(--tx-tag-warn-background)}:host([data-styled][data-severity=danger]){--_tone: var(--tx-tag-danger-color);--_background: var(--tx-tag-danger-background)}:host([data-styled][data-severity=help]){--_tone: var(--tx-tag-help-color);--_background: var(--tx-tag-help-background)}:host([data-styled][data-severity=contrast]){--_tone: var(--tx-tag-contrast-color);--_background: var(--tx-tag-contrast-background)}:host([data-styled][data-size=small]){padding:var(--tx-tag-sm-padding-y) var(--tx-tag-sm-padding-x);font-size:var(--tx-tag-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-tag-lg-padding-y) var(--tx-tag-lg-padding-x);font-size:var(--tx-tag-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-tag-lg-gap)}:host([data-styled].tx-tag--rounded){border-radius:var(--tx-tag-rounded-border-radius)}:host([data-styled]) .tx-tag__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-tag-icon-size)}:host([data-styled]) .tx-tag__action{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-tag-action-size);height:var(--tx-tag-action-size);margin-inline-end:var(--tx-tag-action-offset);padding:0;border:none;border-radius:var(--tx-radius-xs);background:transparent;color:inherit;font-size:.85em;opacity:.75;cursor:pointer;transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),opacity var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-tag__action:hover{background:color-mix(in srgb,currentColor 16%,transparent);opacity:1}:host([data-styled]) .tx-tag__action:focus-visible{outline:2px solid var(--tx-tag-focus-ring-color);outline-offset:1px;opacity:1}:host([data-styled]) .tx-tag__action+.tx-tag__action{margin-inline-start:-2px}:host([data-styled]) .tx-tag__copy--done{opacity:1}.tx-copy-swap{display:inline-grid;place-items:center}.tx-copy-swap__icon{grid-area:1/1;transition:opacity var(--tx-motion-duration) ease,transform var(--tx-motion-duration) cubic-bezier(.34,1.56,.64,1)}.tx-copy-swap__icon--done{opacity:0;transform:scale(.4) rotate(-45deg)}.tx-copy-swap--done .tx-copy-swap__icon--idle{opacity:0;transform:scale(.4) rotate(45deg)}.tx-copy-swap--done .tx-copy-swap__icon--done{opacity:1;transform:none}@media(prefers-reduced-motion:reduce){.tx-copy-swap__icon{transition:none}}\n"]
|
|
321
321
|
}]
|
|
322
322
|
}],
|
|
323
323
|
ctorParameters: () => [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-ui-tag.mjs","names":[],"sources":["../../../../packages/ui/tag/src/tag.icons.ts","../../../../packages/ui/tag/src/tag.theme.ts","../../../../packages/ui/tag/src/tag.component.ts","../../../../packages/ui/tag/src/tag-list.component.ts","../../../../packages/ui/tag/src/tag-list.component.html"],"sourcesContent":["import { TxIconSet, txIconCheck, txIconCopy, txIconInfo, txIconList, txIconTag, txIconTimes } from '@tectra-ng/icons';\n\nexport const TAG_ICON_DEFAULTS: TxIconSet = {\n check: txIconCheck,\n copy: txIconCopy,\n info: txIconInfo,\n list: txIconList,\n tag: txIconTag,\n times: txIconTimes,\n};\n","import { tagTokens } from '@tectra-ng/themes';\n\nexport const TAG_THEME = {\n tag: tagTokens,\n};\n","import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, ElementRef, booleanAttribute, computed, inject, input, output, signal, viewChild } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { injectTxIcons, provideTxIconDefaults, TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraTagTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTagPart, TxTagSeverity, TxTagSize } from './tag.types';\nimport { TAG_ICON_DEFAULTS } from './tag.icons';\nimport { TAG_THEME } from './tag.theme';\n\nconst COPIED_FOR = 1500;\n\n@Component({\n selector: 'tx-tag',\n imports: [TxIcon],\n template: `\n @if (icon(); as icon) {\n <span class=\"tx-tag__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <span #label class=\"tx-tag__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ value() }}<ng-content /></span>\n @if (copyable()) {\n <button\n type=\"button\"\n class=\"tx-tag__action tx-tag__copy\"\n [class.tx-tag__copy--done]=\"isCopied()\"\n [class]=\"passThrough().copy?.class\"\n [style]=\"passThrough().copy?.style\"\n [attr.aria-label]=\"isCopied() ? translations().copied : translations().copy\"\n [title]=\"isCopied() ? translations().copied : translations().copy\"\n (click)=\"copy()\"\n >\n <span class=\"tx-copy-swap\" [class.tx-copy-swap--done]=\"isCopied()\"><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--idle\" name=\"copy\" /><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--done\" name=\"check\" /></span>\n </button>\n }\n @if (removable()) {\n <button\n type=\"button\"\n class=\"tx-tag__action tx-tag__remove\"\n [class]=\"passThrough().remove?.class\"\n [style]=\"passThrough().remove?.style\"\n [attr.aria-label]=\"removeLabel() ?? translations().remove\"\n [title]=\"removeLabel() ?? translations().remove\"\n (click)=\"remove($event)\"\n (keydown.delete)=\"remove($event)\"\n (keydown.backspace)=\"remove($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n `,\n styleUrl: './tag.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-tag',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-severity]': 'severity()',\n '[attr.data-size]': 'resolvedSize()',\n '[class.tx-tag--rounded]': 'rounded()',\n },\n viewProviders: [provideTxIconDefaults(TAG_ICON_DEFAULTS)],\n})\nexport class TxTag {\n private readonly tagTheme = injectTokens(TAG_THEME);\n\n private txIconRegistry = injectTxIcons();\n private document = inject(DOCUMENT);\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n readonly value = input<string | number | undefined>(undefined);\n readonly severity = input<TxTagSeverity>('primary');\n readonly size = input<TxTagSize>('medium');\n readonly rounded = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly copyable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly removable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly removeLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraTagTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTagPart, TxTag> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly copied = output<string>();\n readonly removed = output<Event>();\n\n readonly label = viewChild.required<ElementRef<HTMLElement>>('label');\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('tag', this, this.pt, this.ptOptions);\n readonly isCopied = signal(false);\n readonly resolvedSize = computed(() => (this.size() === 'normal' ? 'medium' : this.size()));\n readonly iconName = computed(() => {\n const icon = this.icon();\n return icon && this.txIconRegistry.has(icon) ? icon : null;\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-tag'), ...this.passThrough().root?.style }));\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.timer && clearTimeout(this.timer));\n }\n\n copy(): void {\n const text = (this.label().nativeElement.textContent ?? '').trim();\n this.document.defaultView?.navigator.clipboard?.writeText(text);\n this.copied.emit(text);\n this.isCopied.set(true);\n if (this.timer) {\n clearTimeout(this.timer);\n }\n this.timer = setTimeout(() => this.isCopied.set(false), COPIED_FOR);\n }\n\n remove(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.removed.emit(event);\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, booleanAttribute, computed, input } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraTagTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxPopover, TxPopoverContent, TxPopoverTrigger } from '@tectra-ng/ui/popover';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { TxTag } from './tag.component';\nimport { TxTagListItem, TxTagListPart, TxTagSeverity, TxTagSize } from './tag.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { TAG_ICON_DEFAULTS } from './tag.icons';\nimport { TAG_THEME } from './tag.theme';\n\n@Component({\n selector: 'tx-tag-list',\n imports: [NgTemplateOutlet, TxTag, TxTooltip, TxPopover, TxPopoverContent, TxPopoverTrigger],\n templateUrl: './tag-list.component.html',\n styleUrl: './tag-list.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-tag-list',\n role: 'list',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.aria-label]': 'ariaLabel() ?? null',\n '[class.tx-tag-list--empty]': '!all().length',\n },\n viewProviders: [provideTxIconDefaults(TAG_ICON_DEFAULTS)],\n})\nexport class TxTagList {\n private readonly tagTheme = injectTokens(TAG_THEME);\n\n readonly tags = input<readonly TxTagListItem[] | null | undefined>([]);\n readonly limit = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly severity = input<TxTagSeverity>('secondary');\n readonly size = input<TxTagSize>('medium');\n readonly rounded = input(false, { transform: booleanAttribute });\n readonly emptyText = input('-');\n readonly moreLabel = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraTagTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTagListPart, TxTagList> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('tagList', this, this.pt, this.ptOptions);\n protected readonly t = injectTranslations();\n\n protected readonly all = computed(() => this.tags() ?? []);\n protected readonly visible = computed(() => {\n const limit = this.limit();\n return limit && limit > 0 ? this.all().slice(0, limit) : this.all();\n });\n protected readonly hidden = computed(() => {\n const limit = this.limit();\n return limit && limit > 0 ? this.all().slice(limit) : [];\n });\n protected readonly moreText = computed(() => this.moreLabel() ?? this.t().moreItems.replace('{count}', String(this.hidden().length)));\n\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-tag'), ...this.passThrough().root?.style }));\n}\n","<ng-template #tagTemplate let-tag>\n <tx-tag\n [value]=\"tag.value\"\n [severity]=\"tag.severity ?? severity()\"\n [icon]=\"tag.icon\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [unstyled]=\"isUnstyled()\"\n [txTooltip]=\"tag.tooltip ?? ''\"\n [class]=\"passThrough().tag?.class\"\n [style]=\"passThrough().tag?.style\"\n />\n</ng-template>\n\n@for (tag of visible(); track $index) {\n <span class=\"tx-tag-list__item\" role=\"listitem\"><ng-container *ngTemplateOutlet=\"tagTemplate; context: { $implicit: tag }\" /></span>\n} @empty {\n <span class=\"tx-tag-list__empty\" role=\"listitem\">{{ emptyText() }}</span>\n}\n@if (hidden().length) {\n <span class=\"tx-tag-list__item\" role=\"listitem\">\n <button\n type=\"button\"\n class=\"tx-tag-list__more\"\n [class]=\"passThrough().more?.class\"\n [style]=\"passThrough().more?.style\"\n [attr.aria-label]=\"moreText()\"\n [txPopoverTrigger]=\"rest\"\n >\n <tx-tag [value]=\"'+' + hidden().length\" [severity]=\"severity()\" [size]=\"size()\" [rounded]=\"rounded()\" [unstyled]=\"isUnstyled()\" />\n </button>\n </span>\n <tx-popover #rest [ariaLabel]=\"t().tagListHidden\" autoFocus=\"none\" [unstyled]=\"isUnstyled()\">\n <ng-template txPopoverContent>\n <div\n class=\"tx-tag-list__popover\"\n role=\"list\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [class]=\"passThrough().popover?.class\"\n [style]=\"passThrough().popover?.style\"\n >\n @for (tag of hidden(); track $index) {\n <span role=\"listitem\"><ng-container *ngTemplateOutlet=\"tagTemplate; context: { $impl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,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EAjBrB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAa,SACd;IAAC;IAAkB;IAAO;IAAW;IAAW;IAAkB;GAAgB;GAAC,iBAG3E,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,MAAM;IACN,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,qBAAqB;IACrB,8BAA8B;GAC/B;GAAA,eACc,CAAC,sBAAsB,iBAAiB,CAAC;GAAC,UAAA;GAAA,QAAA,CAAA,y1BAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-ui-tag.mjs","names":[],"sources":["../../../../packages/ui/tag/src/tag.icons.ts","../../../../packages/ui/tag/src/tag.theme.ts","../../../../packages/ui/tag/src/tag.component.ts","../../../../packages/ui/tag/src/tag-list.component.ts","../../../../packages/ui/tag/src/tag-list.component.html"],"sourcesContent":["import { TxIconSet, txIconCheck, txIconCopy, txIconInfo, txIconList, txIconTag, txIconTimes } from '@tectra-ng/icons';\n\nexport const TAG_ICON_DEFAULTS: TxIconSet = {\n check: txIconCheck,\n copy: txIconCopy,\n info: txIconInfo,\n list: txIconList,\n tag: txIconTag,\n times: txIconTimes,\n};\n","import { tagTokens } from '@tectra-ng/themes';\n\nexport const TAG_THEME = {\n tag: tagTokens,\n};\n","import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, ElementRef, booleanAttribute, computed, inject, input, output, signal, viewChild } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { injectTxIcons, provideTxIconDefaults, TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraTagTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTagPart, TxTagSeverity, TxTagSize } from './tag.types';\nimport { TAG_ICON_DEFAULTS } from './tag.icons';\nimport { TAG_THEME } from './tag.theme';\n\nconst COPIED_FOR = 1500;\n\n@Component({\n selector: 'tx-tag',\n imports: [TxIcon],\n template: `\n @if (icon(); as icon) {\n <span class=\"tx-tag__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <span #label class=\"tx-tag__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ value() }}<ng-content /></span>\n @if (copyable()) {\n <button\n type=\"button\"\n class=\"tx-tag__action tx-tag__copy\"\n [class.tx-tag__copy--done]=\"isCopied()\"\n [class]=\"passThrough().copy?.class\"\n [style]=\"passThrough().copy?.style\"\n [attr.aria-label]=\"isCopied() ? translations().copied : translations().copy\"\n [title]=\"isCopied() ? translations().copied : translations().copy\"\n (click)=\"copy()\"\n >\n <span class=\"tx-copy-swap\" [class.tx-copy-swap--done]=\"isCopied()\"><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--idle\" name=\"copy\" /><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--done\" name=\"check\" /></span>\n </button>\n }\n @if (removable()) {\n <button\n type=\"button\"\n class=\"tx-tag__action tx-tag__remove\"\n [class]=\"passThrough().remove?.class\"\n [style]=\"passThrough().remove?.style\"\n [attr.aria-label]=\"removeLabel() ?? translations().remove\"\n [title]=\"removeLabel() ?? translations().remove\"\n (click)=\"remove($event)\"\n (keydown.delete)=\"remove($event)\"\n (keydown.backspace)=\"remove($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n `,\n styleUrl: './tag.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-tag',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-severity]': 'severity()',\n '[attr.data-size]': 'resolvedSize()',\n '[class.tx-tag--rounded]': 'rounded()',\n },\n viewProviders: [provideTxIconDefaults(TAG_ICON_DEFAULTS)],\n})\nexport class TxTag {\n private readonly tagTheme = injectTokens(TAG_THEME);\n\n private txIconRegistry = injectTxIcons();\n private document = inject(DOCUMENT);\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n readonly value = input<string | number | undefined>(undefined);\n readonly severity = input<TxTagSeverity>('primary');\n readonly size = input<TxTagSize>('medium');\n readonly rounded = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly copyable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly removable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly removeLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraTagTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTagPart, TxTag> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly copied = output<string>();\n readonly removed = output<Event>();\n\n readonly label = viewChild.required<ElementRef<HTMLElement>>('label');\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('tag', this, this.pt, this.ptOptions);\n readonly isCopied = signal(false);\n readonly resolvedSize = computed(() => (this.size() === 'normal' ? 'medium' : this.size()));\n readonly iconName = computed(() => {\n const icon = this.icon();\n return icon && this.txIconRegistry.has(icon) ? icon : null;\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-tag'), ...this.passThrough().root?.style }));\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.timer && clearTimeout(this.timer));\n }\n\n copy(): void {\n const text = (this.label().nativeElement.textContent ?? '').trim();\n this.document.defaultView?.navigator.clipboard?.writeText(text);\n this.copied.emit(text);\n this.isCopied.set(true);\n if (this.timer) {\n clearTimeout(this.timer);\n }\n this.timer = setTimeout(() => this.isCopied.set(false), COPIED_FOR);\n }\n\n remove(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.removed.emit(event);\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, booleanAttribute, computed, input } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraTagTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxPopover, TxPopoverContent, TxPopoverTrigger } from '@tectra-ng/ui/popover';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { TxTag } from './tag.component';\nimport { TxTagListItem, TxTagListPart, TxTagSeverity, TxTagSize } from './tag.types';\nimport { provideTxIconDefaults } from '@tectra-ng/icons';\nimport { TAG_ICON_DEFAULTS } from './tag.icons';\nimport { TAG_THEME } from './tag.theme';\n\n@Component({\n selector: 'tx-tag-list',\n imports: [NgTemplateOutlet, TxTag, TxTooltip, TxPopover, TxPopoverContent, TxPopoverTrigger],\n templateUrl: './tag-list.component.html',\n styleUrl: './tag-list.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-tag-list',\n role: 'list',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.aria-label]': 'ariaLabel() ?? null',\n '[class.tx-tag-list--empty]': '!all().length',\n },\n viewProviders: [provideTxIconDefaults(TAG_ICON_DEFAULTS)],\n})\nexport class TxTagList {\n private readonly tagTheme = injectTokens(TAG_THEME);\n\n readonly tags = input<readonly TxTagListItem[] | null | undefined>([]);\n readonly limit = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly severity = input<TxTagSeverity>('secondary');\n readonly size = input<TxTagSize>('medium');\n readonly rounded = input(false, { transform: booleanAttribute });\n readonly emptyText = input('-');\n readonly moreLabel = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraTagTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTagListPart, TxTagList> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('tagList', this, this.pt, this.ptOptions);\n protected readonly t = injectTranslations();\n\n protected readonly all = computed(() => this.tags() ?? []);\n protected readonly visible = computed(() => {\n const limit = this.limit();\n return limit && limit > 0 ? this.all().slice(0, limit) : this.all();\n });\n protected readonly hidden = computed(() => {\n const limit = this.limit();\n return limit && limit > 0 ? this.all().slice(limit) : [];\n });\n protected readonly moreText = computed(() => this.moreLabel() ?? this.t().moreItems.replace('{count}', String(this.hidden().length)));\n\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-tag'), ...this.passThrough().root?.style }));\n}\n","<ng-template #tagTemplate let-tag>\n <tx-tag\n [value]=\"tag.value\"\n [severity]=\"tag.severity ?? severity()\"\n [icon]=\"tag.icon\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [unstyled]=\"isUnstyled()\"\n [txTooltip]=\"tag.tooltip ?? ''\"\n [class]=\"passThrough().tag?.class\"\n [style]=\"passThrough().tag?.style\"\n />\n</ng-template>\n\n@for (tag of visible(); track $index) {\n <span class=\"tx-tag-list__item\" role=\"listitem\"><ng-container *ngTemplateOutlet=\"tagTemplate; context: { $implicit: tag }\" /></span>\n} @empty {\n <span class=\"tx-tag-list__empty\" role=\"listitem\">{{ emptyText() }}</span>\n}\n@if (hidden().length) {\n <span class=\"tx-tag-list__item\" role=\"listitem\">\n <button\n type=\"button\"\n class=\"tx-tag-list__more\"\n [class]=\"passThrough().more?.class\"\n [style]=\"passThrough().more?.style\"\n [attr.aria-label]=\"moreText()\"\n [txPopoverTrigger]=\"rest\"\n >\n <tx-tag [value]=\"'+' + hidden().length\" [severity]=\"severity()\" [size]=\"size()\" [rounded]=\"rounded()\" [unstyled]=\"isUnstyled()\" />\n </button>\n </span>\n <tx-popover #rest [ariaLabel]=\"t().tagListHidden\" autoFocus=\"none\" [unstyled]=\"isUnstyled()\">\n <ng-template txPopoverContent>\n <div\n class=\"tx-tag-list__popover\"\n role=\"list\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [class]=\"passThrough().popover?.class\"\n [style]=\"passThrough().popover?.style\"\n >\n @for (tag of hidden(); track $index) {\n <span role=\"listitem\"><ng-container *ngTemplateOutlet=\"tagTemplate; context: { $implicit: tag }\" /></span>\n }\n </div>\n </ng-template>\n </tx-popover>\n}\n"],"mappings":";;;;;;;;;;AAEA,MAAa,oBAA+B;CAC1C,OAAO;CACP,MAAM;CACN,MAAM;CACN,MAAM;CACN,KAAK;CACL,OAAO;AACR;ACPD,MAAa,YAAY,EACvB,KAAK,UACN;ACMD,MAAM,aAAa;AA2DnB,IAAa,QAAb,MAAa,MAAK;CACC,WAAW,aAAa,SAAS;CAE1C,iBAAiB,cAAa;CAC9B,WAAW,OAAO,QAAQ;CAC1B,QAA8C;CAE7C,QAAQ,MAAmC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,WAAW,MAAqB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC1C,OAAO,MAAiB,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACjC,UAAU,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACtE,OAAO,MAA8C,QAAU,GA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AAA;KAAA;IAAA;IAAA,SAAA,CAAA,gBAAA,eAAA;IAAA,UAAA,CAAA,WAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAS,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;IAAA,SAAA;KAAA;KAAA;KAAA;IAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAgB,UAAA;GAAA;GAAA;IAAA,MAAA;IAAA,MAAE;IAAgB,UAAA;IAAA,QAAA,CAAA,kBAAA;GAAA;EAAA;EAAA,eAa5E,CAAC,sBAAsB,iBAAiB,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAE9C,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EAjBrB,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAa,SACd;IAAC;IAAkB;IAAO;IAAW;IAAW;IAAkB;GAAgB;GAAC,iBAG3E,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,MAAM;IACN,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,qBAAqB;IACrB,8BAA8B;GAC/B;GAAA,eACc,CAAC,sBAAsB,iBAAiB,CAAC;GAAC,UAAA;GAAA,QAAA,CAAA,y1BAAA;EAAA,CAAA"}
|
|
@@ -542,7 +542,7 @@ var TxToast = class TxToast {
|
|
|
542
542
|
}],
|
|
543
543
|
ngImport: i0,
|
|
544
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:
|
|
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:var(--tx-toast-action-gap)}:host([data-styled]) .tx-toast__action{flex-shrink:0;padding:var(--tx-toast-action-padding);border:0;border-radius:var(--tx-radius-full);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"],
|
|
546
546
|
dependencies: [
|
|
547
547
|
{
|
|
548
548
|
kind: "directive",
|
|
@@ -621,7 +621,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
621
621
|
},
|
|
622
622
|
viewProviders: [provideTxIconDefaults(TOAST_ICON_DEFAULTS)],
|
|
623
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:
|
|
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:var(--tx-toast-action-gap)}:host([data-styled]) .tx-toast__action{flex-shrink:0;padding:var(--tx-toast-action-padding);border:0;border-radius:var(--tx-radius-full);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"]
|
|
625
625
|
}]
|
|
626
626
|
}],
|
|
627
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 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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AA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,KAAA,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"}
|
|
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,UAAU,KAAK,MAAM,IAAI,SAAS,CAAC;EACzC,MAAM,QAAsB;GAAE;GAAS;GAAS;GAAQ;GAAK,OAAO;GAAW,WAAW;GAAG,WAAW,QAAQ;GAAM,QAAQ;EAAC;EAC/H,KAAK,QAAQ,IAAI,IAAI,KAAK;EAC1B,KAAK,SAAS,QAAQ,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC;EACjD,KAAK,SAAS,OAAO;EACrB,KAAK,SAAS,KAAK;EACnB,OAAO;CACT;CAGA,QAAQ,MAAc,UAAuB,CAAA,GAAE;EAC7C,OAAO,KAAK,KAAK;GAAE,GAAG;GAAS,UAAU;GAAW;EAAI,CAAE;CAC5D;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