@tectra-ng/ui 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/tectra-ng-ui-avatar.mjs +623 -2
- package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-icon-field.mjs +6 -6
- package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-link.mjs +4 -4
- package/fesm2022/tectra-ng-ui-link.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tag.mjs +395 -6
- package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-truncate-text.mjs +4 -4
- package/fesm2022/tectra-ng-ui-truncate-text.mjs.map +1 -1
- package/package.json +4 -4
- package/types/tectra-ng-ui-avatar.d.ts +260 -0
- package/types/tectra-ng-ui-avatar.d.ts.map +1 -1
- package/types/tectra-ng-ui-tag.d.ts +168 -0
- package/types/tectra-ng-ui-tag.d.ts.map +1 -1
|
@@ -2,9 +2,12 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, booleanAttribute, computed, inject, input, output, signal, viewChild } from "@angular/core";
|
|
3
3
|
import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
|
|
4
4
|
import { injectTranslations } from "@tectra-ng/core/i18n";
|
|
5
|
-
import { optionalBoolean } from "@tectra-ng/core/utils";
|
|
5
|
+
import { optionalBoolean, optionalNumber } from "@tectra-ng/core/utils";
|
|
6
6
|
import { TxIcon, TxIconRegistry } from "@tectra-ng/icons";
|
|
7
7
|
import { toStyleObject } from "@tectra-ng/themes";
|
|
8
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
9
|
+
import { TxPopover, TxPopoverContent, TxPopoverTrigger } from "@tectra-ng/ui/popover";
|
|
10
|
+
import { TxTooltip } from "@tectra-ng/ui/tooltip";
|
|
8
11
|
const COPIED_FOR = 1500;
|
|
9
12
|
var TxTag = class TxTag {
|
|
10
13
|
txIconRegistry = inject(TxIconRegistry);
|
|
@@ -211,7 +214,7 @@ var TxTag = class TxTag {
|
|
|
211
214
|
[title]="isCopied() ? translations().copied : translations().copy"
|
|
212
215
|
(click)="copy()"
|
|
213
216
|
>
|
|
214
|
-
<tx-
|
|
217
|
+
<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>
|
|
215
218
|
</button>
|
|
216
219
|
}
|
|
217
220
|
@if (removable()) {
|
|
@@ -231,7 +234,7 @@ var TxTag = class TxTag {
|
|
|
231
234
|
}
|
|
232
235
|
`,
|
|
233
236
|
isInline: true,
|
|
234
|
-
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:-3px;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}\n"],
|
|
237
|
+
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:-3px;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"],
|
|
235
238
|
dependencies: [{
|
|
236
239
|
kind: "component",
|
|
237
240
|
type: TxIcon,
|
|
@@ -273,7 +276,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
273
276
|
[title]="isCopied() ? translations().copied : translations().copy"
|
|
274
277
|
(click)="copy()"
|
|
275
278
|
>
|
|
276
|
-
<tx-
|
|
279
|
+
<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>
|
|
277
280
|
</button>
|
|
278
281
|
}
|
|
279
282
|
@if (removable()) {
|
|
@@ -302,7 +305,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
302
305
|
"[attr.data-size]": "resolvedSize()",
|
|
303
306
|
"[class.tx-tag--rounded]": "rounded()"
|
|
304
307
|
},
|
|
305
|
-
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:-3px;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}\n"]
|
|
308
|
+
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:-3px;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"]
|
|
306
309
|
}]
|
|
307
310
|
}],
|
|
308
311
|
ctorParameters: () => [],
|
|
@@ -417,6 +420,392 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
417
420
|
}]
|
|
418
421
|
}
|
|
419
422
|
});
|
|
420
|
-
|
|
423
|
+
var TxTagList = class TxTagList {
|
|
424
|
+
tags = input([], ...ngDevMode ? [{ debugName: "tags" }] : /* istanbul ignore next */ []);
|
|
425
|
+
limit = input(void 0, {
|
|
426
|
+
...ngDevMode ? { debugName: "limit" } : /* istanbul ignore next */ {},
|
|
427
|
+
transform: optionalNumber
|
|
428
|
+
});
|
|
429
|
+
severity = input("secondary", ...ngDevMode ? [{ debugName: "severity" }] : /* istanbul ignore next */ []);
|
|
430
|
+
size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
|
|
431
|
+
rounded = input(false, {
|
|
432
|
+
...ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {},
|
|
433
|
+
transform: booleanAttribute
|
|
434
|
+
});
|
|
435
|
+
emptyText = input("-", ...ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []);
|
|
436
|
+
moreLabel = input(void 0, ...ngDevMode ? [{ debugName: "moreLabel" }] : /* istanbul ignore next */ []);
|
|
437
|
+
ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
438
|
+
dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
|
|
439
|
+
pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
|
|
440
|
+
ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
|
|
441
|
+
unstyled = input(void 0, {
|
|
442
|
+
...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
|
|
443
|
+
transform: optionalBoolean
|
|
444
|
+
});
|
|
445
|
+
isUnstyled = injectUnstyled(this.unstyled);
|
|
446
|
+
passThrough = injectPassThrough("tagList", this, this.pt, this.ptOptions);
|
|
447
|
+
t = injectTranslations();
|
|
448
|
+
all = computed(() => this.tags() ?? [], ...ngDevMode ? [{ debugName: "all" }] : /* istanbul ignore next */ []);
|
|
449
|
+
visible = computed(() => {
|
|
450
|
+
const limit = this.limit();
|
|
451
|
+
return limit && limit > 0 ? this.all().slice(0, limit) : this.all();
|
|
452
|
+
}, ...ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []);
|
|
453
|
+
hidden = computed(() => {
|
|
454
|
+
const limit = this.limit();
|
|
455
|
+
return limit && limit > 0 ? this.all().slice(limit) : [];
|
|
456
|
+
}, ...ngDevMode ? [{ debugName: "hidden" }] : /* istanbul ignore next */ []);
|
|
457
|
+
moreText = computed(() => this.moreLabel() ?? this.t().moreItems.replace("{count}", String(this.hidden().length)), ...ngDevMode ? [{ debugName: "moreText" }] : /* istanbul ignore next */ []);
|
|
458
|
+
hostStyle = computed(() => ({
|
|
459
|
+
...toStyleObject(this.dt(), "--tx-tag"),
|
|
460
|
+
...this.passThrough().root?.style
|
|
461
|
+
}), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
|
|
462
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
463
|
+
minVersion: "12.0.0",
|
|
464
|
+
version: "22.2.3",
|
|
465
|
+
ngImport: i0,
|
|
466
|
+
type: TxTagList,
|
|
467
|
+
deps: [],
|
|
468
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
469
|
+
});
|
|
470
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
471
|
+
minVersion: "17.0.0",
|
|
472
|
+
version: "22.2.3",
|
|
473
|
+
type: TxTagList,
|
|
474
|
+
isStandalone: true,
|
|
475
|
+
selector: "tx-tag-list",
|
|
476
|
+
inputs: {
|
|
477
|
+
tags: {
|
|
478
|
+
classPropertyName: "tags",
|
|
479
|
+
publicName: "tags",
|
|
480
|
+
isSignal: true,
|
|
481
|
+
isRequired: false,
|
|
482
|
+
transformFunction: null
|
|
483
|
+
},
|
|
484
|
+
limit: {
|
|
485
|
+
classPropertyName: "limit",
|
|
486
|
+
publicName: "limit",
|
|
487
|
+
isSignal: true,
|
|
488
|
+
isRequired: false,
|
|
489
|
+
transformFunction: null
|
|
490
|
+
},
|
|
491
|
+
severity: {
|
|
492
|
+
classPropertyName: "severity",
|
|
493
|
+
publicName: "severity",
|
|
494
|
+
isSignal: true,
|
|
495
|
+
isRequired: false,
|
|
496
|
+
transformFunction: null
|
|
497
|
+
},
|
|
498
|
+
size: {
|
|
499
|
+
classPropertyName: "size",
|
|
500
|
+
publicName: "size",
|
|
501
|
+
isSignal: true,
|
|
502
|
+
isRequired: false,
|
|
503
|
+
transformFunction: null
|
|
504
|
+
},
|
|
505
|
+
rounded: {
|
|
506
|
+
classPropertyName: "rounded",
|
|
507
|
+
publicName: "rounded",
|
|
508
|
+
isSignal: true,
|
|
509
|
+
isRequired: false,
|
|
510
|
+
transformFunction: null
|
|
511
|
+
},
|
|
512
|
+
emptyText: {
|
|
513
|
+
classPropertyName: "emptyText",
|
|
514
|
+
publicName: "emptyText",
|
|
515
|
+
isSignal: true,
|
|
516
|
+
isRequired: false,
|
|
517
|
+
transformFunction: null
|
|
518
|
+
},
|
|
519
|
+
moreLabel: {
|
|
520
|
+
classPropertyName: "moreLabel",
|
|
521
|
+
publicName: "moreLabel",
|
|
522
|
+
isSignal: true,
|
|
523
|
+
isRequired: false,
|
|
524
|
+
transformFunction: null
|
|
525
|
+
},
|
|
526
|
+
ariaLabel: {
|
|
527
|
+
classPropertyName: "ariaLabel",
|
|
528
|
+
publicName: "ariaLabel",
|
|
529
|
+
isSignal: true,
|
|
530
|
+
isRequired: false,
|
|
531
|
+
transformFunction: null
|
|
532
|
+
},
|
|
533
|
+
dt: {
|
|
534
|
+
classPropertyName: "dt",
|
|
535
|
+
publicName: "dt",
|
|
536
|
+
isSignal: true,
|
|
537
|
+
isRequired: false,
|
|
538
|
+
transformFunction: null
|
|
539
|
+
},
|
|
540
|
+
pt: {
|
|
541
|
+
classPropertyName: "pt",
|
|
542
|
+
publicName: "pt",
|
|
543
|
+
isSignal: true,
|
|
544
|
+
isRequired: false,
|
|
545
|
+
transformFunction: null
|
|
546
|
+
},
|
|
547
|
+
ptOptions: {
|
|
548
|
+
classPropertyName: "ptOptions",
|
|
549
|
+
publicName: "ptOptions",
|
|
550
|
+
isSignal: true,
|
|
551
|
+
isRequired: false,
|
|
552
|
+
transformFunction: null
|
|
553
|
+
},
|
|
554
|
+
unstyled: {
|
|
555
|
+
classPropertyName: "unstyled",
|
|
556
|
+
publicName: "unstyled",
|
|
557
|
+
isSignal: true,
|
|
558
|
+
isRequired: false,
|
|
559
|
+
transformFunction: null
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
host: {
|
|
563
|
+
attributes: { "role": "list" },
|
|
564
|
+
properties: {
|
|
565
|
+
"class": "passThrough().root?.class",
|
|
566
|
+
"style": "hostStyle()",
|
|
567
|
+
"attr.data-styled": "!isUnstyled() || null",
|
|
568
|
+
"attr.aria-label": "ariaLabel() ?? null",
|
|
569
|
+
"class.tx-tag-list--empty": "!all().length"
|
|
570
|
+
},
|
|
571
|
+
classAttribute: "tx-tag-list"
|
|
572
|
+
},
|
|
573
|
+
ngImport: i0,
|
|
574
|
+
template: "<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",
|
|
575
|
+
styles: [":host{display:inline-flex;align-items:center;min-width:0}.tx-tag-list__item{display:inline-flex;flex:none}.tx-tag-list__more{display:inline-flex;padding:0;border:none;background:none;font:inherit;cursor:pointer}:host([data-styled]){gap:var(--tx-tag-list-gap)}:host([data-styled]) .tx-tag-list__item{white-space:nowrap}:host([data-styled]) .tx-tag-list__more{border-radius:var(--tx-tag-border-radius)}:host([data-styled]) .tx-tag-list__more:focus-visible{outline:2px solid var(--tx-tag-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-tag-list__empty{color:var(--tx-tag-list-empty-color)}.tx-tag-list__popover[data-styled]{display:flex;flex-wrap:wrap;gap:var(--tx-tag-list-popover-gap);max-width:var(--tx-tag-list-popover-max-width);max-height:var(--tx-tag-list-popover-max-height);padding:var(--tx-tag-list-popover-padding);overflow-y:auto}\n"],
|
|
576
|
+
dependencies: [
|
|
577
|
+
{
|
|
578
|
+
kind: "directive",
|
|
579
|
+
type: NgTemplateOutlet,
|
|
580
|
+
selector: "[ngTemplateOutlet]",
|
|
581
|
+
inputs: [
|
|
582
|
+
"ngTemplateOutletContext",
|
|
583
|
+
"ngTemplateOutlet",
|
|
584
|
+
"ngTemplateOutletInjector"
|
|
585
|
+
]
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
kind: "component",
|
|
589
|
+
type: TxTag,
|
|
590
|
+
selector: "tx-tag",
|
|
591
|
+
inputs: [
|
|
592
|
+
"value",
|
|
593
|
+
"severity",
|
|
594
|
+
"size",
|
|
595
|
+
"rounded",
|
|
596
|
+
"icon",
|
|
597
|
+
"copyable",
|
|
598
|
+
"removable",
|
|
599
|
+
"removeLabel",
|
|
600
|
+
"dt",
|
|
601
|
+
"pt",
|
|
602
|
+
"ptOptions",
|
|
603
|
+
"unstyled"
|
|
604
|
+
],
|
|
605
|
+
outputs: ["copied", "removed"]
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
kind: "directive",
|
|
609
|
+
type: TxTooltip,
|
|
610
|
+
selector: "[txTooltip]",
|
|
611
|
+
inputs: [
|
|
612
|
+
"txTooltip",
|
|
613
|
+
"tooltipPlacement",
|
|
614
|
+
"tooltipEvent",
|
|
615
|
+
"tooltipShowDelay",
|
|
616
|
+
"tooltipHideDelay",
|
|
617
|
+
"tooltipLife",
|
|
618
|
+
"tooltipOffset",
|
|
619
|
+
"tooltipArrow",
|
|
620
|
+
"tooltipInteractive",
|
|
621
|
+
"tooltipDisabled",
|
|
622
|
+
"tooltipOverflowOnly",
|
|
623
|
+
"tooltipMultiline",
|
|
624
|
+
"tooltipContext",
|
|
625
|
+
"tooltipClass",
|
|
626
|
+
"tooltipDt",
|
|
627
|
+
"tooltipPt",
|
|
628
|
+
"tooltipPtOptions",
|
|
629
|
+
"tooltipUnstyled"
|
|
630
|
+
],
|
|
631
|
+
outputs: ["tooltipShown", "tooltipHidden"],
|
|
632
|
+
exportAs: ["txTooltip"]
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
kind: "component",
|
|
636
|
+
type: TxPopover,
|
|
637
|
+
selector: "tx-popover",
|
|
638
|
+
inputs: [
|
|
639
|
+
"placement",
|
|
640
|
+
"offset",
|
|
641
|
+
"arrow",
|
|
642
|
+
"header",
|
|
643
|
+
"closeButton",
|
|
644
|
+
"dismissable",
|
|
645
|
+
"closeOnEscape",
|
|
646
|
+
"autoFocus",
|
|
647
|
+
"restoreFocus",
|
|
648
|
+
"scroll",
|
|
649
|
+
"ariaLabel",
|
|
650
|
+
"ariaLabelledBy",
|
|
651
|
+
"panelClass",
|
|
652
|
+
"open",
|
|
653
|
+
"dt",
|
|
654
|
+
"pt",
|
|
655
|
+
"ptOptions",
|
|
656
|
+
"unstyled"
|
|
657
|
+
],
|
|
658
|
+
outputs: [
|
|
659
|
+
"openChange",
|
|
660
|
+
"opened",
|
|
661
|
+
"closed"
|
|
662
|
+
]
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
kind: "directive",
|
|
666
|
+
type: TxPopoverContent,
|
|
667
|
+
selector: "ng-template[txPopoverContent]"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
kind: "directive",
|
|
671
|
+
type: TxPopoverTrigger,
|
|
672
|
+
selector: "[txPopoverTrigger]",
|
|
673
|
+
inputs: ["txPopoverTrigger"]
|
|
674
|
+
}
|
|
675
|
+
],
|
|
676
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
677
|
+
});
|
|
678
|
+
};
|
|
679
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
680
|
+
minVersion: "12.0.0",
|
|
681
|
+
version: "22.2.3",
|
|
682
|
+
ngImport: i0,
|
|
683
|
+
type: TxTagList,
|
|
684
|
+
decorators: [{
|
|
685
|
+
type: Component,
|
|
686
|
+
args: [{
|
|
687
|
+
selector: "tx-tag-list",
|
|
688
|
+
imports: [
|
|
689
|
+
NgTemplateOutlet,
|
|
690
|
+
TxTag,
|
|
691
|
+
TxTooltip,
|
|
692
|
+
TxPopover,
|
|
693
|
+
TxPopoverContent,
|
|
694
|
+
TxPopoverTrigger
|
|
695
|
+
],
|
|
696
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
697
|
+
host: {
|
|
698
|
+
class: "tx-tag-list",
|
|
699
|
+
role: "list",
|
|
700
|
+
"[class]": "passThrough().root?.class",
|
|
701
|
+
"[style]": "hostStyle()",
|
|
702
|
+
"[attr.data-styled]": "!isUnstyled() || null",
|
|
703
|
+
"[attr.aria-label]": "ariaLabel() ?? null",
|
|
704
|
+
"[class.tx-tag-list--empty]": "!all().length"
|
|
705
|
+
},
|
|
706
|
+
template: "<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",
|
|
707
|
+
styles: [":host{display:inline-flex;align-items:center;min-width:0}.tx-tag-list__item{display:inline-flex;flex:none}.tx-tag-list__more{display:inline-flex;padding:0;border:none;background:none;font:inherit;cursor:pointer}:host([data-styled]){gap:var(--tx-tag-list-gap)}:host([data-styled]) .tx-tag-list__item{white-space:nowrap}:host([data-styled]) .tx-tag-list__more{border-radius:var(--tx-tag-border-radius)}:host([data-styled]) .tx-tag-list__more:focus-visible{outline:2px solid var(--tx-tag-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-tag-list__empty{color:var(--tx-tag-list-empty-color)}.tx-tag-list__popover[data-styled]{display:flex;flex-wrap:wrap;gap:var(--tx-tag-list-popover-gap);max-width:var(--tx-tag-list-popover-max-width);max-height:var(--tx-tag-list-popover-max-height);padding:var(--tx-tag-list-popover-padding);overflow-y:auto}\n"]
|
|
708
|
+
}]
|
|
709
|
+
}],
|
|
710
|
+
propDecorators: {
|
|
711
|
+
tags: [{
|
|
712
|
+
type: i0.Input,
|
|
713
|
+
args: [{
|
|
714
|
+
isSignal: true,
|
|
715
|
+
alias: "tags",
|
|
716
|
+
required: false
|
|
717
|
+
}]
|
|
718
|
+
}],
|
|
719
|
+
limit: [{
|
|
720
|
+
type: i0.Input,
|
|
721
|
+
args: [{
|
|
722
|
+
isSignal: true,
|
|
723
|
+
alias: "limit",
|
|
724
|
+
required: false
|
|
725
|
+
}]
|
|
726
|
+
}],
|
|
727
|
+
severity: [{
|
|
728
|
+
type: i0.Input,
|
|
729
|
+
args: [{
|
|
730
|
+
isSignal: true,
|
|
731
|
+
alias: "severity",
|
|
732
|
+
required: false
|
|
733
|
+
}]
|
|
734
|
+
}],
|
|
735
|
+
size: [{
|
|
736
|
+
type: i0.Input,
|
|
737
|
+
args: [{
|
|
738
|
+
isSignal: true,
|
|
739
|
+
alias: "size",
|
|
740
|
+
required: false
|
|
741
|
+
}]
|
|
742
|
+
}],
|
|
743
|
+
rounded: [{
|
|
744
|
+
type: i0.Input,
|
|
745
|
+
args: [{
|
|
746
|
+
isSignal: true,
|
|
747
|
+
alias: "rounded",
|
|
748
|
+
required: false
|
|
749
|
+
}]
|
|
750
|
+
}],
|
|
751
|
+
emptyText: [{
|
|
752
|
+
type: i0.Input,
|
|
753
|
+
args: [{
|
|
754
|
+
isSignal: true,
|
|
755
|
+
alias: "emptyText",
|
|
756
|
+
required: false
|
|
757
|
+
}]
|
|
758
|
+
}],
|
|
759
|
+
moreLabel: [{
|
|
760
|
+
type: i0.Input,
|
|
761
|
+
args: [{
|
|
762
|
+
isSignal: true,
|
|
763
|
+
alias: "moreLabel",
|
|
764
|
+
required: false
|
|
765
|
+
}]
|
|
766
|
+
}],
|
|
767
|
+
ariaLabel: [{
|
|
768
|
+
type: i0.Input,
|
|
769
|
+
args: [{
|
|
770
|
+
isSignal: true,
|
|
771
|
+
alias: "ariaLabel",
|
|
772
|
+
required: false
|
|
773
|
+
}]
|
|
774
|
+
}],
|
|
775
|
+
dt: [{
|
|
776
|
+
type: i0.Input,
|
|
777
|
+
args: [{
|
|
778
|
+
isSignal: true,
|
|
779
|
+
alias: "dt",
|
|
780
|
+
required: false
|
|
781
|
+
}]
|
|
782
|
+
}],
|
|
783
|
+
pt: [{
|
|
784
|
+
type: i0.Input,
|
|
785
|
+
args: [{
|
|
786
|
+
isSignal: true,
|
|
787
|
+
alias: "pt",
|
|
788
|
+
required: false
|
|
789
|
+
}]
|
|
790
|
+
}],
|
|
791
|
+
ptOptions: [{
|
|
792
|
+
type: i0.Input,
|
|
793
|
+
args: [{
|
|
794
|
+
isSignal: true,
|
|
795
|
+
alias: "ptOptions",
|
|
796
|
+
required: false
|
|
797
|
+
}]
|
|
798
|
+
}],
|
|
799
|
+
unstyled: [{
|
|
800
|
+
type: i0.Input,
|
|
801
|
+
args: [{
|
|
802
|
+
isSignal: true,
|
|
803
|
+
alias: "unstyled",
|
|
804
|
+
required: false
|
|
805
|
+
}]
|
|
806
|
+
}]
|
|
807
|
+
}
|
|
808
|
+
});
|
|
809
|
+
export { TxTag, TxTagList };
|
|
421
810
|
|
|
422
811
|
//# sourceMappingURL=tectra-ng-ui-tag.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-ui-tag.mjs","names":[],"sources":["../../../../packages/ui/tag/src/tag.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, ElementRef, booleanAttribute, computed, inject, input, output, signal, viewChild } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxIcon, TxIconName, TxIconRegistry } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraTagTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTagPart, TxTagSeverity, TxTagSize } from './tag.types';\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 <tx-icon [name]=\"isCopied() ? 'check' : 'copy'\" />\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})\nexport class TxTag {\n private txIconRegistry = inject(TxIconRegistry);\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"],"mappings":";;;;;;;AAQA,MAAM,aAAa;AA0DnB,IAAa,QAAb,MAAa,MAAK;CACR,iBAAiB,OAAO,cAAc;CACtC,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,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC/D,WAAW,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACvE,YAAY,MAAwB,OA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AAA;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,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAA;EAAA,CAAA;EAAA,OAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAO,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-ui-tag.mjs","names":[],"sources":["../../../../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 { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, ElementRef, booleanAttribute, computed, inject, input, output, signal, viewChild } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxIcon, TxIconName, TxIconRegistry } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraTagTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTagPart, TxTagSeverity, TxTagSize } from './tag.types';\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})\nexport class TxTag {\n private txIconRegistry = inject(TxIconRegistry);\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 { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } 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';\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})\nexport class TxTagList {\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":";;;;;;;;;;AAQA,MAAM,aAAa;AA0DnB,IAAa,QAAb,MAAa,MAAK;CACR,iBAAiB,OAAO,cAAc;CACtC,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,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC/D,WAAW,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,WAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACvE,YAAY,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,YAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACxE,cAAc,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAClD,KAAK,MAAsD,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,CAAA;CACrE,KAAK,MAAmD,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,KAAA,CAAA,+BAAA,CAAA,C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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,UAAA;GAAA,QAAA,CAAA,y1BAAA;EAAA,CAAA"}
|
|
@@ -182,8 +182,8 @@ var TxTruncateText = class TxTruncateText {
|
|
|
182
182
|
classAttribute: "tx-truncate-text"
|
|
183
183
|
},
|
|
184
184
|
ngImport: i0,
|
|
185
|
-
template: "@if (copyable() && fullText()) {\n <button\n type=\"button\"\n class=\"tx-truncate-text__copy\"\n [class.tx-truncate-text__copy--done]=\"isCopied()\"\n [class]=\"passThrough().copy?.class\"\n [style]=\"passThrough().copy?.style\"\n [attr.aria-label]=\"copyLabel()\"\n [txTooltip]=\"copyLabel()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\n (click)=\"copy()\"\n >\n <tx-
|
|
186
|
-
styles: [":host{display:inline-flex;align-items:center;max-width:100%;min-width:0;vertical-align:middle}.tx-truncate-text__text{display:inline-flex;min-width:0;white-space:nowrap}.tx-truncate-text__full{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.tx-truncate-text__copy{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:none;font:inherit;cursor:pointer}:host([data-styled]){gap:var(--tx-truncate-text-gap)}:host([data-styled]) .tx-truncate-text__text{border-radius:2px}:host([data-styled]) .tx-truncate-text__text:focus-visible{outline:2px solid var(--tx-truncate-text-focus-ring-color);outline-offset:2px}:host([data-styled].tx-truncate-text--truncated) .tx-truncate-text__text{cursor:pointer}:host([data-styled]) .tx-truncate-text__link{color:var(--tx-truncate-text-link-color);text-decoration:none;transition:color var(--tx-truncate-text-transition-duration) ease}:host([data-styled]) .tx-truncate-text__link:hover{color:var(--tx-truncate-text-link-hover-color)}:host([data-styled]) .tx-truncate-text__copy{border-radius:2px;color:var(--tx-truncate-text-copy-color);font-size:var(--tx-truncate-text-copy-icon-size);transition:color var(--tx-truncate-text-transition-duration) ease}:host([data-styled]) .tx-truncate-text__copy:hover{color:var(--tx-truncate-text-copy-hover-color)}:host([data-styled]) .tx-truncate-text__copy:focus-visible{outline:2px solid var(--tx-truncate-text-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-truncate-text__copy--done{color:var(--tx-truncate-text-copied-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-truncate-text__link,:host([data-styled]) .tx-truncate-text__copy{transition:none}}\n"],
|
|
185
|
+
template: "@if (copyable() && fullText()) {\n <button\n type=\"button\"\n class=\"tx-truncate-text__copy\"\n [class.tx-truncate-text__copy--done]=\"isCopied()\"\n [class]=\"passThrough().copy?.class\"\n [style]=\"passThrough().copy?.style\"\n [attr.aria-label]=\"copyLabel()\"\n [txTooltip]=\"copyLabel()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\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=\"clone\" /><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--done\" name=\"check\" /></span>\n </button>\n}\n<ng-template #content>\n @if (isTruncated()) {\n <span aria-hidden=\"true\"><tx-highlight-text [text]=\"displayText()\" [highlight]=\"highlight()\" [unstyled]=\"isUnstyled()\" /></span>\n <span class=\"tx-truncate-text__full\">{{ fullText() }}</span>\n } @else {\n <tx-highlight-text [text]=\"displayText()\" [highlight]=\"highlight()\" [unstyled]=\"isUnstyled()\" />\n }\n</ng-template>\n@if (linkHref(); as link) {\n <a\n class=\"tx-truncate-text__text tx-truncate-text__link\"\n [href]=\"link\"\n [attr.target]=\"target()\"\n [attr.rel]=\"relation()\"\n [class]=\"passThrough().link?.class\"\n [style]=\"passThrough().link?.style\"\n [txTooltip]=\"tooltip()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\n [tooltipInteractive]=\"true\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <span\n class=\"tx-truncate-text__text\"\n [attr.tabindex]=\"isTruncated() ? 0 : null\"\n [class]=\"passThrough().text?.class\"\n [style]=\"passThrough().text?.style\"\n [txTooltip]=\"tooltip()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\n [tooltipInteractive]=\"true\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </span>\n}\n",
|
|
186
|
+
styles: [":host{display:inline-flex;align-items:center;max-width:100%;min-width:0;vertical-align:middle}.tx-truncate-text__text{display:inline-flex;min-width:0;white-space:nowrap}.tx-truncate-text__full{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.tx-truncate-text__copy{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:none;font:inherit;cursor:pointer}:host([data-styled]){gap:var(--tx-truncate-text-gap)}:host([data-styled]) .tx-truncate-text__text{border-radius:2px}:host([data-styled]) .tx-truncate-text__text:focus-visible{outline:2px solid var(--tx-truncate-text-focus-ring-color);outline-offset:2px}:host([data-styled].tx-truncate-text--truncated) .tx-truncate-text__text{cursor:pointer}:host([data-styled]) .tx-truncate-text__link{color:var(--tx-truncate-text-link-color);text-decoration:none;transition:color var(--tx-truncate-text-transition-duration) ease}:host([data-styled]) .tx-truncate-text__link:hover{color:var(--tx-truncate-text-link-hover-color)}:host([data-styled]) .tx-truncate-text__copy{border-radius:2px;color:var(--tx-truncate-text-copy-color);font-size:var(--tx-truncate-text-copy-icon-size);transition:color var(--tx-truncate-text-transition-duration) ease}:host([data-styled]) .tx-truncate-text__copy:hover{color:var(--tx-truncate-text-copy-hover-color)}:host([data-styled]) .tx-truncate-text__copy:focus-visible{outline:2px solid var(--tx-truncate-text-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-truncate-text__copy--done{color:var(--tx-truncate-text-copied-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-truncate-text__link,:host([data-styled]) .tx-truncate-text__copy{transition:none}}.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"],
|
|
187
187
|
dependencies: [
|
|
188
188
|
{
|
|
189
189
|
kind: "directive",
|
|
@@ -269,8 +269,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
269
269
|
"[attr.data-styled]": "!isUnstyled() || null",
|
|
270
270
|
"[class.tx-truncate-text--truncated]": "isTruncated()"
|
|
271
271
|
},
|
|
272
|
-
template: "@if (copyable() && fullText()) {\n <button\n type=\"button\"\n class=\"tx-truncate-text__copy\"\n [class.tx-truncate-text__copy--done]=\"isCopied()\"\n [class]=\"passThrough().copy?.class\"\n [style]=\"passThrough().copy?.style\"\n [attr.aria-label]=\"copyLabel()\"\n [txTooltip]=\"copyLabel()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\n (click)=\"copy()\"\n >\n <tx-
|
|
273
|
-
styles: [":host{display:inline-flex;align-items:center;max-width:100%;min-width:0;vertical-align:middle}.tx-truncate-text__text{display:inline-flex;min-width:0;white-space:nowrap}.tx-truncate-text__full{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.tx-truncate-text__copy{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:none;font:inherit;cursor:pointer}:host([data-styled]){gap:var(--tx-truncate-text-gap)}:host([data-styled]) .tx-truncate-text__text{border-radius:2px}:host([data-styled]) .tx-truncate-text__text:focus-visible{outline:2px solid var(--tx-truncate-text-focus-ring-color);outline-offset:2px}:host([data-styled].tx-truncate-text--truncated) .tx-truncate-text__text{cursor:pointer}:host([data-styled]) .tx-truncate-text__link{color:var(--tx-truncate-text-link-color);text-decoration:none;transition:color var(--tx-truncate-text-transition-duration) ease}:host([data-styled]) .tx-truncate-text__link:hover{color:var(--tx-truncate-text-link-hover-color)}:host([data-styled]) .tx-truncate-text__copy{border-radius:2px;color:var(--tx-truncate-text-copy-color);font-size:var(--tx-truncate-text-copy-icon-size);transition:color var(--tx-truncate-text-transition-duration) ease}:host([data-styled]) .tx-truncate-text__copy:hover{color:var(--tx-truncate-text-copy-hover-color)}:host([data-styled]) .tx-truncate-text__copy:focus-visible{outline:2px solid var(--tx-truncate-text-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-truncate-text__copy--done{color:var(--tx-truncate-text-copied-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-truncate-text__link,:host([data-styled]) .tx-truncate-text__copy{transition:none}}\n"]
|
|
272
|
+
template: "@if (copyable() && fullText()) {\n <button\n type=\"button\"\n class=\"tx-truncate-text__copy\"\n [class.tx-truncate-text__copy--done]=\"isCopied()\"\n [class]=\"passThrough().copy?.class\"\n [style]=\"passThrough().copy?.style\"\n [attr.aria-label]=\"copyLabel()\"\n [txTooltip]=\"copyLabel()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\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=\"clone\" /><tx-icon class=\"tx-copy-swap__icon tx-copy-swap__icon--done\" name=\"check\" /></span>\n </button>\n}\n<ng-template #content>\n @if (isTruncated()) {\n <span aria-hidden=\"true\"><tx-highlight-text [text]=\"displayText()\" [highlight]=\"highlight()\" [unstyled]=\"isUnstyled()\" /></span>\n <span class=\"tx-truncate-text__full\">{{ fullText() }}</span>\n } @else {\n <tx-highlight-text [text]=\"displayText()\" [highlight]=\"highlight()\" [unstyled]=\"isUnstyled()\" />\n }\n</ng-template>\n@if (linkHref(); as link) {\n <a\n class=\"tx-truncate-text__text tx-truncate-text__link\"\n [href]=\"link\"\n [attr.target]=\"target()\"\n [attr.rel]=\"relation()\"\n [class]=\"passThrough().link?.class\"\n [style]=\"passThrough().link?.style\"\n [txTooltip]=\"tooltip()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\n [tooltipInteractive]=\"true\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n} @else {\n <span\n class=\"tx-truncate-text__text\"\n [attr.tabindex]=\"isTruncated() ? 0 : null\"\n [class]=\"passThrough().text?.class\"\n [style]=\"passThrough().text?.style\"\n [txTooltip]=\"tooltip()\"\n [tooltipPlacement]=\"tooltipPlacement()\"\n [tooltipInteractive]=\"true\"\n >\n <ng-container [ngTemplateOutlet]=\"content\" />\n </span>\n}\n",
|
|
273
|
+
styles: [":host{display:inline-flex;align-items:center;max-width:100%;min-width:0;vertical-align:middle}.tx-truncate-text__text{display:inline-flex;min-width:0;white-space:nowrap}.tx-truncate-text__full{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.tx-truncate-text__copy{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;border:0;background:none;font:inherit;cursor:pointer}:host([data-styled]){gap:var(--tx-truncate-text-gap)}:host([data-styled]) .tx-truncate-text__text{border-radius:2px}:host([data-styled]) .tx-truncate-text__text:focus-visible{outline:2px solid var(--tx-truncate-text-focus-ring-color);outline-offset:2px}:host([data-styled].tx-truncate-text--truncated) .tx-truncate-text__text{cursor:pointer}:host([data-styled]) .tx-truncate-text__link{color:var(--tx-truncate-text-link-color);text-decoration:none;transition:color var(--tx-truncate-text-transition-duration) ease}:host([data-styled]) .tx-truncate-text__link:hover{color:var(--tx-truncate-text-link-hover-color)}:host([data-styled]) .tx-truncate-text__copy{border-radius:2px;color:var(--tx-truncate-text-copy-color);font-size:var(--tx-truncate-text-copy-icon-size);transition:color var(--tx-truncate-text-transition-duration) ease}:host([data-styled]) .tx-truncate-text__copy:hover{color:var(--tx-truncate-text-copy-hover-color)}:host([data-styled]) .tx-truncate-text__copy:focus-visible{outline:2px solid var(--tx-truncate-text-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-truncate-text__copy--done{color:var(--tx-truncate-text-copied-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-truncate-text__link,:host([data-styled]) .tx-truncate-text__copy{transition:none}}.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"]
|
|
274
274
|
}]
|
|
275
275
|
}],
|
|
276
276
|
ctorParameters: () => [],
|