@tectra-ng/ui 0.4.2 → 0.4.4
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/README.md +1 -1
- package/amount/README.md +2 -2
- package/analog-clock/README.md +3 -2
- package/button-group/README.md +34 -2
- package/chips-input/README.md +10 -0
- package/data-view/README.md +3 -0
- package/fesm2022/tectra-ng-ui-accordion.mjs +21 -21
- package/fesm2022/tectra-ng-ui-amount.mjs +14 -12
- package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-analog-clock.mjs +18 -12
- package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-autocomplete.mjs +3 -3
- package/fesm2022/tectra-ng-ui-avatar.mjs +9 -9
- package/fesm2022/tectra-ng-ui-badge.mjs +3 -3
- package/fesm2022/tectra-ng-ui-breadcrumb.mjs +9 -9
- package/fesm2022/tectra-ng-ui-button-group.mjs +142 -9
- package/fesm2022/tectra-ng-ui-button-group.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-button.mjs +9 -9
- package/fesm2022/tectra-ng-ui-card.mjs +3 -3
- package/fesm2022/tectra-ng-ui-carousel.mjs +15 -15
- package/fesm2022/tectra-ng-ui-cascade-select.mjs +3 -3
- package/fesm2022/tectra-ng-ui-checkbox.mjs +9 -9
- package/fesm2022/tectra-ng-ui-chip.mjs +3 -3
- package/fesm2022/tectra-ng-ui-chips-input.mjs +42 -12
- package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-color-picker.mjs +3 -3
- package/fesm2022/tectra-ng-ui-color-swatches.mjs +3 -3
- package/fesm2022/tectra-ng-ui-confirm.mjs +9 -9
- package/fesm2022/tectra-ng-ui-countdown.mjs +9 -9
- package/fesm2022/tectra-ng-ui-country-select.mjs +5 -5
- package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-country.mjs +3 -3
- package/fesm2022/tectra-ng-ui-data-view.mjs +41 -33
- package/fesm2022/tectra-ng-ui-data-view.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-datepicker.mjs +47 -36
- package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-dialog.mjs +24 -24
- package/fesm2022/tectra-ng-ui-divider.mjs +3 -3
- package/fesm2022/tectra-ng-ui-drawer.mjs +9 -9
- package/fesm2022/tectra-ng-ui-email-suggestion.mjs +3 -3
- package/fesm2022/tectra-ng-ui-export.mjs +41 -46
- package/fesm2022/tectra-ng-ui-export.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-field.mjs +3 -3
- package/fesm2022/tectra-ng-ui-fieldset.mjs +3 -3
- package/fesm2022/tectra-ng-ui-file-upload.mjs +12 -12
- package/fesm2022/tectra-ng-ui-galleria.mjs +21 -21
- package/fesm2022/tectra-ng-ui-highlight-text.mjs +3 -3
- package/fesm2022/tectra-ng-ui-icon-field.mjs +12 -12
- package/fesm2022/tectra-ng-ui-image.mjs +9 -9
- package/fesm2022/tectra-ng-ui-input-group.mjs +6 -6
- package/fesm2022/tectra-ng-ui-input-mask.mjs +3 -3
- package/fesm2022/tectra-ng-ui-input-number.mjs +3 -3
- package/fesm2022/tectra-ng-ui-input-otp.mjs +9 -5
- package/fesm2022/tectra-ng-ui-input-otp.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-input.mjs +8 -8
- package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-key-filter.mjs +3 -3
- package/fesm2022/tectra-ng-ui-knob.mjs +18 -10
- package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-label.mjs +9 -9
- package/fesm2022/tectra-ng-ui-link.mjs +6 -6
- package/fesm2022/tectra-ng-ui-list-input.mjs +3 -3
- package/fesm2022/tectra-ng-ui-listbox.mjs +3 -3
- package/fesm2022/tectra-ng-ui-mention-textarea.mjs +3 -3
- package/fesm2022/tectra-ng-ui-menu.mjs +15 -15
- package/fesm2022/tectra-ng-ui-menubar.mjs +6 -6
- package/fesm2022/tectra-ng-ui-message.mjs +19 -19
- package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-month-calendar.mjs +6 -6
- package/fesm2022/tectra-ng-ui-multiselect.mjs +3 -3
- package/fesm2022/tectra-ng-ui-overlay-badge.mjs +3 -3
- package/fesm2022/tectra-ng-ui-paginator.mjs +12 -29
- package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel-menu.mjs +25 -8
- package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-panel.mjs +5 -5
- package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-password-generator.mjs +6 -6
- package/fesm2022/tectra-ng-ui-password.mjs +12 -12
- package/fesm2022/tectra-ng-ui-pill.mjs +6 -5
- package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-popover.mjs +15 -15
- package/fesm2022/tectra-ng-ui-progress-bar.mjs +6 -6
- package/fesm2022/tectra-ng-ui-progress-spinner.mjs +3 -3
- package/fesm2022/tectra-ng-ui-radio-button.mjs +6 -6
- package/fesm2022/tectra-ng-ui-rating.mjs +9 -9
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs +7 -7
- package/fesm2022/tectra-ng-ui-scroll-panel.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-select-button.mjs +748 -0
- package/fesm2022/tectra-ng-ui-select-button.mjs.map +1 -0
- package/fesm2022/tectra-ng-ui-select.mjs +36 -36
- package/fesm2022/tectra-ng-ui-skeleton.mjs +6 -6
- package/fesm2022/tectra-ng-ui-slider.mjs +3 -3
- package/fesm2022/tectra-ng-ui-sparkline.mjs +3 -3
- package/fesm2022/tectra-ng-ui-speed-dial.mjs +94 -63
- package/fesm2022/tectra-ng-ui-speed-dial.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-split-button.mjs +19 -8
- package/fesm2022/tectra-ng-ui-split-button.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-splitter.mjs +6 -6
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs +14 -11
- package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-status-icon.mjs +3 -3
- package/fesm2022/tectra-ng-ui-stepper.mjs +109 -60
- package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-table.mjs +132 -195
- package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tabs.mjs +18 -18
- package/fesm2022/tectra-ng-ui-tag.mjs +6 -6
- package/fesm2022/tectra-ng-ui-textarea.mjs +9 -9
- package/fesm2022/tectra-ng-ui-timeline.mjs +15 -15
- package/fesm2022/tectra-ng-ui-toast.mjs +9 -9
- package/fesm2022/tectra-ng-ui-toggle-button.mjs +5 -5
- package/fesm2022/tectra-ng-ui-toggle-button.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-toggle-switch.mjs +6 -6
- package/fesm2022/tectra-ng-ui-toolbar.mjs +12 -12
- package/fesm2022/tectra-ng-ui-tooltip.mjs +9 -9
- package/fesm2022/tectra-ng-ui-tree-select.mjs +20 -6
- package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree-table.mjs +7 -7
- package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-tree.mjs +30 -30
- package/fesm2022/tectra-ng-ui-truncate-text.mjs +5 -5
- package/fesm2022/tectra-ng-ui-truncate-text.mjs.map +1 -1
- package/fesm2022/tectra-ng-ui-virtual-scroller.mjs +15 -15
- package/fesm2022/tectra-ng-ui.mjs +1 -1
- package/field/README.md +2 -2
- package/input/README.md +1 -1
- package/input-otp/README.md +1 -1
- package/knob/README.md +1 -1
- package/message/README.md +2 -2
- package/package.json +8 -4
- package/paginator/README.md +1 -1
- package/panel-menu/README.md +1 -1
- package/pill/README.md +1 -1
- package/select-button/README.md +70 -0
- package/speed-dial/README.md +2 -1
- package/stat-tiles/README.md +3 -3
- package/stepper/README.md +3 -2
- package/table/README.md +10 -7
- package/tabs/README.md +1 -1
- package/tree-select/README.md +1 -1
- package/tree-table/README.md +1 -1
- package/truncate-text/README.md +1 -1
- package/types/tectra-ng-ui-amount.d.ts +6 -3
- package/types/tectra-ng-ui-amount.d.ts.map +1 -1
- package/types/tectra-ng-ui-analog-clock.d.ts +9 -4
- package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -1
- package/types/tectra-ng-ui-button-group.d.ts +58 -5
- package/types/tectra-ng-ui-button-group.d.ts.map +1 -1
- package/types/tectra-ng-ui-chips-input.d.ts +14 -1
- package/types/tectra-ng-ui-chips-input.d.ts.map +1 -1
- package/types/tectra-ng-ui-datepicker.d.ts +2 -0
- package/types/tectra-ng-ui-datepicker.d.ts.map +1 -1
- package/types/tectra-ng-ui-field.d.ts +2 -2
- package/types/tectra-ng-ui-input-otp.d.ts +1 -1
- package/types/tectra-ng-ui-input-otp.d.ts.map +1 -1
- package/types/tectra-ng-ui-input.d.ts +1 -1
- package/types/tectra-ng-ui-knob.d.ts +2 -1
- package/types/tectra-ng-ui-knob.d.ts.map +1 -1
- package/types/tectra-ng-ui-message.d.ts +2 -2
- package/types/tectra-ng-ui-paginator.d.ts +2 -21
- package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
- package/types/tectra-ng-ui-panel-menu.d.ts +9 -9
- package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -1
- package/types/tectra-ng-ui-pill.d.ts +7 -3
- package/types/tectra-ng-ui-pill.d.ts.map +1 -1
- package/types/tectra-ng-ui-select-button.d.ts +256 -0
- package/types/tectra-ng-ui-select-button.d.ts.map +1 -0
- package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -1
- package/types/tectra-ng-ui-stat-tiles.d.ts +4 -3
- package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -1
- package/types/tectra-ng-ui-stepper.d.ts +26 -10
- package/types/tectra-ng-ui-stepper.d.ts.map +1 -1
- package/types/tectra-ng-ui-table.d.ts +39 -42
- package/types/tectra-ng-ui-table.d.ts.map +1 -1
- package/types/tectra-ng-ui-tabs.d.ts +1 -1
- package/types/tectra-ng-ui-tree-select.d.ts +3 -1
- package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
- package/types/tectra-ng-ui-truncate-text.d.ts +1 -1
- package/types/tectra-ng-ui.d.ts +1 -1
|
@@ -75,7 +75,7 @@ var TxTruncateText = class TxTruncateText {
|
|
|
75
75
|
}
|
|
76
76
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
77
77
|
minVersion: "12.0.0",
|
|
78
|
-
version: "22.2.
|
|
78
|
+
version: "22.2.6",
|
|
79
79
|
ngImport: i0,
|
|
80
80
|
type: TxTruncateText,
|
|
81
81
|
deps: [],
|
|
@@ -83,7 +83,7 @@ var TxTruncateText = class TxTruncateText {
|
|
|
83
83
|
});
|
|
84
84
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
85
85
|
minVersion: "17.0.0",
|
|
86
|
-
version: "22.2.
|
|
86
|
+
version: "22.2.6",
|
|
87
87
|
type: TxTruncateText,
|
|
88
88
|
isStandalone: true,
|
|
89
89
|
selector: "tx-truncate-text",
|
|
@@ -192,7 +192,7 @@ var TxTruncateText = class TxTruncateText {
|
|
|
192
192
|
},
|
|
193
193
|
ngImport: i0,
|
|
194
194
|
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",
|
|
195
|
-
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"],
|
|
195
|
+
styles: [":host{position:relative;display:inline-flex;align-items:center;max-width:100%;min-width:0;vertical-align:middle}.tx-truncate-text__text{display:inline-block;flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.tx-truncate-text__full{position:absolute;top:0;left:0;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"],
|
|
196
196
|
dependencies: [
|
|
197
197
|
{
|
|
198
198
|
kind: "directive",
|
|
@@ -258,7 +258,7 @@ var TxTruncateText = class TxTruncateText {
|
|
|
258
258
|
};
|
|
259
259
|
i0.ɵɵngDeclareClassMetadata({
|
|
260
260
|
minVersion: "12.0.0",
|
|
261
|
-
version: "22.2.
|
|
261
|
+
version: "22.2.6",
|
|
262
262
|
ngImport: i0,
|
|
263
263
|
type: TxTruncateText,
|
|
264
264
|
decorators: [{
|
|
@@ -281,7 +281,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
281
281
|
},
|
|
282
282
|
viewProviders: [provideTxIconDefaults(TRUNCATE_TEXT_ICON_DEFAULTS)],
|
|
283
283
|
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",
|
|
284
|
-
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"]
|
|
284
|
+
styles: [":host{position:relative;display:inline-flex;align-items:center;max-width:100%;min-width:0;vertical-align:middle}.tx-truncate-text__text{display:inline-block;flex:0 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.tx-truncate-text__full{position:absolute;top:0;left:0;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"]
|
|
285
285
|
}]
|
|
286
286
|
}],
|
|
287
287
|
ctorParameters: () => [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-ui-truncate-text.mjs","names":[],"sources":["../../../../packages/ui/truncate-text/src/truncate-text.icons.ts","../../../../packages/ui/truncate-text/src/truncate-text.theme.ts","../../../../packages/ui/truncate-text/src/truncate-text.component.ts","../../../../packages/ui/truncate-text/src/truncate-text.component.html"],"sourcesContent":["import { TxIconSet, txIconCheck, txIconClone, txIconCopy, txIconLink, txIconText } from '@tectra-ng/icons';\n\nexport const TRUNCATE_TEXT_ICON_DEFAULTS: TxIconSet = {\n check: txIconCheck,\n clone: txIconClone,\n copy: txIconCopy,\n link: txIconLink,\n text: txIconText,\n};\n","import { truncateTextTokens } from '@tectra-ng/themes';\n\nexport const TRUNCATE_TEXT_THEME = {\n truncateText: truncateTextTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, booleanAttribute, computed, inject, input, numberAttribute, output, signal } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { TxPlacement } from '@tectra-ng/core/overlay';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraTruncateTextTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxHighlightTerms, TxHighlightText } from '@tectra-ng/ui/highlight-text';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { TxTruncateTextPart } from './truncate-text.types';\nimport { TRUNCATE_TEXT_ICON_DEFAULTS } from './truncate-text.icons';\nimport { TRUNCATE_TEXT_THEME } from './truncate-text.theme';\n\nconst COPIED_FOR = 1600;\n\n@Component({\n selector: 'tx-truncate-text',\n imports: [NgTemplateOutlet, TxHighlightText, TxIcon, TxTooltip],\n templateUrl: './truncate-text.component.html',\n styleUrl: './truncate-text.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-truncate-text',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-truncate-text--truncated]': 'isTruncated()',\n },\n viewProviders: [provideTxIconDefaults(TRUNCATE_TEXT_ICON_DEFAULTS)],\n})\nexport class TxTruncateText {\n private readonly truncateTextTheme = injectTokens(TRUNCATE_TEXT_THEME);\n\n private document = inject(DOCUMENT);\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n readonly text = input<string | number | null | undefined>('');\n readonly limit = input<number, unknown>(15, { transform: numberAttribute });\n readonly ellipsis = input<string>('...');\n readonly href = input<string | null | undefined>(undefined);\n readonly openLink = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly target = input<string>('_blank');\n readonly highlight = input<TxHighlightTerms>('');\n readonly copyable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly tooltipPlacement = input<TxPlacement>('top');\n readonly dt = input<TectraDeepPartial<TectraTruncateTextTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTruncateTextPart, TxTruncateText> | 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\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('truncateText', this, this.pt, this.ptOptions);\n readonly isCopied = signal(false);\n\n readonly fullText = computed(() => String(this.text() ?? ''));\n readonly isTruncated = computed(() => this.limit() >= 0 && Array.from(this.fullText()).length > this.limit());\n readonly displayText = computed(() => (this.isTruncated() ? Array.from(this.fullText()).slice(0, this.limit()).join('') + this.ellipsis() : this.fullText()));\n readonly tooltip = computed(() => (this.isTruncated() ? this.fullText() : null));\n readonly linkHref = computed(() => this.href() || (this.openLink() ? this.fullText() : null) || null);\n readonly relation = computed(() => (this.target() === '_blank' ? 'noopener noreferrer' : null));\n readonly copyLabel = computed(() => (this.isCopied() ? this.translations().copied : this.translations().copy));\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-truncate-text'), ...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.fullText();\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","@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"],"mappings":";;;;;;;;;;AAEA,MAAa,8BAAyC;CACpD,OAAO;CACP,OAAO;CACP,MAAM;CACN,MAAM;CACN,MAAM;AACP;ACND,MAAa,sBAAsB,EACjC,cAAc,mBACf;ACUD,MAAM,aAAa;AAiBnB,IAAa,iBAAb,MAAa,eAAc;CACR,oBAAoB,aAAa,mBAAmB;CAE7D,WAAW,OAAO,QAAQ;CAC1B,QAA8C;CAE7C,OAAO,MAA0C,IAAG,GAAA,YAAA,CAAA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A,eAAA;IAAA,UAAA,CAAA,WAAA;GAAA;EAAA;EAAA,eAW/C,CAAC,sBAAsB,2BAA2B,CAAC;EAAC,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAExD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAf1B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAkB,SACnB;IAAC;IAAkB;IAAiB;IAAQ;GAAS;GAAC,iBAG9C,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,uCAAuC;GACxC;GAAA,eACc,CAAC,sBAAsB,2BAA2B,CAAC;GAAC,UAAA;GAAA,QAAA,CAAA,6tEAAA;EAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tectra-ng-ui-truncate-text.mjs","names":[],"sources":["../../../../packages/ui/truncate-text/src/truncate-text.icons.ts","../../../../packages/ui/truncate-text/src/truncate-text.theme.ts","../../../../packages/ui/truncate-text/src/truncate-text.component.ts","../../../../packages/ui/truncate-text/src/truncate-text.component.html"],"sourcesContent":["import { TxIconSet, txIconCheck, txIconClone, txIconCopy, txIconLink, txIconText } from '@tectra-ng/icons';\n\nexport const TRUNCATE_TEXT_ICON_DEFAULTS: TxIconSet = {\n check: txIconCheck,\n clone: txIconClone,\n copy: txIconCopy,\n link: txIconLink,\n text: txIconText,\n};\n","import { truncateTextTokens } from '@tectra-ng/themes';\n\nexport const TRUNCATE_TEXT_THEME = {\n truncateText: truncateTextTokens,\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, booleanAttribute, computed, inject, input, numberAttribute, output, signal } from '@angular/core';\nimport { injectPassThrough, injectTokens, injectUnstyled, TxPassThrough, TxPassThroughOptions } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { TxPlacement } from '@tectra-ng/core/overlay';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { provideTxIconDefaults, TxIcon } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraTruncateTextTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxHighlightTerms, TxHighlightText } from '@tectra-ng/ui/highlight-text';\nimport { TxTooltip } from '@tectra-ng/ui/tooltip';\nimport { TxTruncateTextPart } from './truncate-text.types';\nimport { TRUNCATE_TEXT_ICON_DEFAULTS } from './truncate-text.icons';\nimport { TRUNCATE_TEXT_THEME } from './truncate-text.theme';\n\nconst COPIED_FOR = 1600;\n\n@Component({\n selector: 'tx-truncate-text',\n imports: [NgTemplateOutlet, TxHighlightText, TxIcon, TxTooltip],\n templateUrl: './truncate-text.component.html',\n styleUrl: './truncate-text.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-truncate-text',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-truncate-text--truncated]': 'isTruncated()',\n },\n viewProviders: [provideTxIconDefaults(TRUNCATE_TEXT_ICON_DEFAULTS)],\n})\nexport class TxTruncateText {\n private readonly truncateTextTheme = injectTokens(TRUNCATE_TEXT_THEME);\n\n private document = inject(DOCUMENT);\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n readonly text = input<string | number | null | undefined>('');\n readonly limit = input<number, unknown>(15, { transform: numberAttribute });\n readonly ellipsis = input<string>('...');\n readonly href = input<string | null | undefined>(undefined);\n readonly openLink = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly target = input<string>('_blank');\n readonly highlight = input<TxHighlightTerms>('');\n readonly copyable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly tooltipPlacement = input<TxPlacement>('top');\n readonly dt = input<TectraDeepPartial<TectraTruncateTextTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTruncateTextPart, TxTruncateText> | 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\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('truncateText', this, this.pt, this.ptOptions);\n readonly isCopied = signal(false);\n\n readonly fullText = computed(() => String(this.text() ?? ''));\n readonly isTruncated = computed(() => this.limit() >= 0 && Array.from(this.fullText()).length > this.limit());\n readonly displayText = computed(() => (this.isTruncated() ? Array.from(this.fullText()).slice(0, this.limit()).join('') + this.ellipsis() : this.fullText()));\n readonly tooltip = computed(() => (this.isTruncated() ? this.fullText() : null));\n readonly linkHref = computed(() => this.href() || (this.openLink() ? this.fullText() : null) || null);\n readonly relation = computed(() => (this.target() === '_blank' ? 'noopener noreferrer' : null));\n readonly copyLabel = computed(() => (this.isCopied() ? this.translations().copied : this.translations().copy));\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-truncate-text'), ...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.fullText();\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","@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"],"mappings":";;;;;;;;;;AAEA,MAAa,8BAAyC;CACpD,OAAO;CACP,OAAO;CACP,MAAM;CACN,MAAM;CACN,MAAM;AACP;ACND,MAAa,sBAAsB,EACjC,cAAc,mBACf;ACUD,MAAM,aAAa;AAiBnB,IAAa,iBAAb,MAAa,eAAc;CACR,oBAAoB,aAAa,mBAAmB;CAE7D,WAAW,OAAO,QAAQ;CAC1B,QAA8C;CAE7C,OAAO,MAA0C,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACpD,QAAQ,MAAuB,IAAE;EAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;EAAI,WAAW;CAAe,CAA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AA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAf1B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAkB,SACnB;IAAC;IAAkB;IAAiB;IAAQ;GAAS;GAAC,iBAG9C,wBAAwB;GAAM,MACzC;IACJ,OAAO;IACP,WAAW;IACX,WAAW;IACX,sBAAsB;IACtB,uCAAuC;GACxC;GAAA,eACc,CAAC,sBAAsB,2BAA2B,CAAC;GAAC,UAAA;GAAA,QAAA,CAAA,u1EAAA;EAAA,CAAA"}
|
|
@@ -14,7 +14,7 @@ var TxVirtualScrollerItem = class TxVirtualScrollerItem {
|
|
|
14
14
|
}
|
|
15
15
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
16
16
|
minVersion: "12.0.0",
|
|
17
|
-
version: "22.2.
|
|
17
|
+
version: "22.2.6",
|
|
18
18
|
ngImport: i0,
|
|
19
19
|
type: TxVirtualScrollerItem,
|
|
20
20
|
deps: [],
|
|
@@ -22,7 +22,7 @@ var TxVirtualScrollerItem = class TxVirtualScrollerItem {
|
|
|
22
22
|
});
|
|
23
23
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
24
24
|
minVersion: "17.1.0",
|
|
25
|
-
version: "22.2.
|
|
25
|
+
version: "22.2.6",
|
|
26
26
|
type: TxVirtualScrollerItem,
|
|
27
27
|
isStandalone: true,
|
|
28
28
|
selector: "ng-template[txVirtualScrollerItem]",
|
|
@@ -38,7 +38,7 @@ var TxVirtualScrollerItem = class TxVirtualScrollerItem {
|
|
|
38
38
|
};
|
|
39
39
|
i0.ɵɵngDeclareClassMetadata({
|
|
40
40
|
minVersion: "12.0.0",
|
|
41
|
-
version: "22.2.
|
|
41
|
+
version: "22.2.6",
|
|
42
42
|
ngImport: i0,
|
|
43
43
|
type: TxVirtualScrollerItem,
|
|
44
44
|
decorators: [{
|
|
@@ -61,7 +61,7 @@ var TxVirtualScrollerLoader = class TxVirtualScrollerLoader {
|
|
|
61
61
|
}
|
|
62
62
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
63
63
|
minVersion: "12.0.0",
|
|
64
|
-
version: "22.2.
|
|
64
|
+
version: "22.2.6",
|
|
65
65
|
ngImport: i0,
|
|
66
66
|
type: TxVirtualScrollerLoader,
|
|
67
67
|
deps: [],
|
|
@@ -69,7 +69,7 @@ var TxVirtualScrollerLoader = class TxVirtualScrollerLoader {
|
|
|
69
69
|
});
|
|
70
70
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
71
71
|
minVersion: "14.0.0",
|
|
72
|
-
version: "22.2.
|
|
72
|
+
version: "22.2.6",
|
|
73
73
|
type: TxVirtualScrollerLoader,
|
|
74
74
|
isStandalone: true,
|
|
75
75
|
selector: "ng-template[txVirtualScrollerLoader]",
|
|
@@ -78,7 +78,7 @@ var TxVirtualScrollerLoader = class TxVirtualScrollerLoader {
|
|
|
78
78
|
};
|
|
79
79
|
i0.ɵɵngDeclareClassMetadata({
|
|
80
80
|
minVersion: "12.0.0",
|
|
81
|
-
version: "22.2.
|
|
81
|
+
version: "22.2.6",
|
|
82
82
|
ngImport: i0,
|
|
83
83
|
type: TxVirtualScrollerLoader,
|
|
84
84
|
decorators: [{
|
|
@@ -90,7 +90,7 @@ var TxVirtualScrollerLoadingIcon = class TxVirtualScrollerLoadingIcon {
|
|
|
90
90
|
templateRef = inject(TemplateRef);
|
|
91
91
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
92
92
|
minVersion: "12.0.0",
|
|
93
|
-
version: "22.2.
|
|
93
|
+
version: "22.2.6",
|
|
94
94
|
ngImport: i0,
|
|
95
95
|
type: TxVirtualScrollerLoadingIcon,
|
|
96
96
|
deps: [],
|
|
@@ -98,7 +98,7 @@ var TxVirtualScrollerLoadingIcon = class TxVirtualScrollerLoadingIcon {
|
|
|
98
98
|
});
|
|
99
99
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
100
100
|
minVersion: "14.0.0",
|
|
101
|
-
version: "22.2.
|
|
101
|
+
version: "22.2.6",
|
|
102
102
|
type: TxVirtualScrollerLoadingIcon,
|
|
103
103
|
isStandalone: true,
|
|
104
104
|
selector: "ng-template[txVirtualScrollerLoadingIcon]",
|
|
@@ -107,7 +107,7 @@ var TxVirtualScrollerLoadingIcon = class TxVirtualScrollerLoadingIcon {
|
|
|
107
107
|
};
|
|
108
108
|
i0.ɵɵngDeclareClassMetadata({
|
|
109
109
|
minVersion: "12.0.0",
|
|
110
|
-
version: "22.2.
|
|
110
|
+
version: "22.2.6",
|
|
111
111
|
ngImport: i0,
|
|
112
112
|
type: TxVirtualScrollerLoadingIcon,
|
|
113
113
|
decorators: [{
|
|
@@ -123,7 +123,7 @@ var TxVirtualScrollerContent = class TxVirtualScrollerContent {
|
|
|
123
123
|
}
|
|
124
124
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
125
125
|
minVersion: "12.0.0",
|
|
126
|
-
version: "22.2.
|
|
126
|
+
version: "22.2.6",
|
|
127
127
|
ngImport: i0,
|
|
128
128
|
type: TxVirtualScrollerContent,
|
|
129
129
|
deps: [],
|
|
@@ -131,7 +131,7 @@ var TxVirtualScrollerContent = class TxVirtualScrollerContent {
|
|
|
131
131
|
});
|
|
132
132
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
133
133
|
minVersion: "17.1.0",
|
|
134
|
-
version: "22.2.
|
|
134
|
+
version: "22.2.6",
|
|
135
135
|
type: TxVirtualScrollerContent,
|
|
136
136
|
isStandalone: true,
|
|
137
137
|
selector: "ng-template[txVirtualScrollerContent]",
|
|
@@ -147,7 +147,7 @@ var TxVirtualScrollerContent = class TxVirtualScrollerContent {
|
|
|
147
147
|
};
|
|
148
148
|
i0.ɵɵngDeclareClassMetadata({
|
|
149
149
|
minVersion: "12.0.0",
|
|
150
|
-
version: "22.2.
|
|
150
|
+
version: "22.2.6",
|
|
151
151
|
ngImport: i0,
|
|
152
152
|
type: TxVirtualScrollerContent,
|
|
153
153
|
decorators: [{
|
|
@@ -473,7 +473,7 @@ var TxVirtualScroller = class TxVirtualScroller {
|
|
|
473
473
|
}
|
|
474
474
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
475
475
|
minVersion: "12.0.0",
|
|
476
|
-
version: "22.2.
|
|
476
|
+
version: "22.2.6",
|
|
477
477
|
ngImport: i0,
|
|
478
478
|
type: TxVirtualScroller,
|
|
479
479
|
deps: [],
|
|
@@ -481,7 +481,7 @@ var TxVirtualScroller = class TxVirtualScroller {
|
|
|
481
481
|
});
|
|
482
482
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
483
483
|
minVersion: "17.0.0",
|
|
484
|
-
version: "22.2.
|
|
484
|
+
version: "22.2.6",
|
|
485
485
|
type: TxVirtualScroller,
|
|
486
486
|
isStandalone: true,
|
|
487
487
|
selector: "tx-virtual-scroller",
|
|
@@ -724,7 +724,7 @@ var TxVirtualScroller = class TxVirtualScroller {
|
|
|
724
724
|
};
|
|
725
725
|
i0.ɵɵngDeclareClassMetadata({
|
|
726
726
|
minVersion: "12.0.0",
|
|
727
|
-
version: "22.2.
|
|
727
|
+
version: "22.2.6",
|
|
728
728
|
ngImport: i0,
|
|
729
729
|
type: TxVirtualScroller,
|
|
730
730
|
decorators: [{
|
package/field/README.md
CHANGED
|
@@ -23,9 +23,9 @@ A form row: label, control, hint and error in one element. It finds the control
|
|
|
23
23
|
| hint | Help text under the control |
|
|
24
24
|
| control | Form control for the error, when it is not the projected one |
|
|
25
25
|
| errorText | Error from outside the form (e.g. the server); shown before the control's errors and marks the control invalid |
|
|
26
|
-
| successText | Text shown when the control has a valid value and was touched or changed |
|
|
26
|
+
| successText | Text shown when the control has a valid value and was touched or changed (at once with `showImmediately`) |
|
|
27
27
|
| messages | Own error texts per error key (see `tx-field-error`) |
|
|
28
|
-
| showImmediately | Shows the error before the control is touched or changed |
|
|
28
|
+
| showImmediately | Shows the error, and the success text, before the control is touched or changed |
|
|
29
29
|
| layout | `vertical` (label above) or `horizontal` (label on the left, stacks below 40rem) |
|
|
30
30
|
| dt | Design tokens of this instance (`field`) |
|
|
31
31
|
| pt | Classes and styles of the parts: `root`, `label`, `control`, `hint`, `error` |
|
package/input/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Input
|
|
2
2
|
|
|
3
|
-
Styles a native `input` or `textarea` with the shared `formField` tokens (also used by select, password, number…). Native `readonly` and `disabled` are styled too. Works with `[formControl]`, `ngModel` and signal forms as is — it is the native element.
|
|
3
|
+
Styles a native `input` or `textarea` with the shared `formField` tokens (also used by select, password, number…). Native `readonly` and `disabled` are styled too; a `readonly` input with a `data-picker` attribute (no typing, a picker opens on click, like `tx-datepicker readonlyInput`) keeps the normal field look. Works with `[formControl]`, `ngModel` and signal forms as is — it is the native element.
|
|
4
4
|
|
|
5
5
|
## Inputs
|
|
6
6
|
| Name | Description |
|
package/input-otp/README.md
CHANGED
|
@@ -31,7 +31,7 @@ A one-time code in separate cells. Typing moves to the next cell, Backspace and
|
|
|
31
31
|
## Outputs
|
|
32
32
|
| Name | Description |
|
|
33
33
|
|---|---|
|
|
34
|
-
| completed |
|
|
34
|
+
| completed | The last empty cell was filled — the full code; editing a filled code does not repeat it until a cell is emptied and filled again |
|
|
35
35
|
|
|
36
36
|
## Keyboard
|
|
37
37
|
| Key | Action |
|
package/knob/README.md
CHANGED
|
@@ -19,7 +19,7 @@ A value on a dial: drag along the ring or use the keyboard. `arc="dial"` leaves
|
|
|
19
19
|
| arc | `dial` (270°, gap at the bottom) or `ring` (full circle from the top) |
|
|
20
20
|
| showValue | Shows the value in the middle |
|
|
21
21
|
| showHandle | Shows a handle at the end of the value; on by default for `ring` |
|
|
22
|
-
| valueTemplate | Text of the value, `{value}` is replaced (formatted for the locale), e.g. `{value}
|
|
22
|
+
| valueTemplate | Text of the value, `{value}` is replaced (formatted for the locale), e.g. `{value}%`. The text scales with `size` and gets smaller when it is too long for the ring |
|
|
23
23
|
| invalid | Red ring; without it the knob follows its form control |
|
|
24
24
|
| disabled | Disables the knob (also from the form control) |
|
|
25
25
|
| readonly | Shows the value, ignores dragging and keys |
|
package/message/README.md
CHANGED
|
@@ -25,8 +25,8 @@ Error texts: `messages` on the field, then `provideTectra({ validationMessages }
|
|
|
25
25
|
| life | `tx-message`: closes itself after this many milliseconds |
|
|
26
26
|
| control | `tx-field-error`: the form control whose errors are shown (`formControl`, a group's control, or `ngModel.control`) |
|
|
27
27
|
| errorText | `tx-field-error`: an error from outside the form (e.g. the server) — shown as is, before the control's errors |
|
|
28
|
-
| showImmediately | `tx-field-error`: shows the error before the control is touched or changed |
|
|
29
|
-
| successText | `tx-field-error`: text shown when the control has a valid value and was touched or changed |
|
|
28
|
+
| showImmediately | `tx-field-error`: shows the error, and the success text, before the control is touched or changed |
|
|
29
|
+
| successText | `tx-field-error`: text shown when the control has a valid value and was touched or changed (at once with `showImmediately`) |
|
|
30
30
|
| messages | `tx-field-error`: own texts per error key — a string with `{param}` or a function of the error |
|
|
31
31
|
| for | `tx-field-hint`, `tx-field-error`: id of the field; adds this text to its `aria-describedby` |
|
|
32
32
|
| id | `tx-field-hint`, `tx-field-error`: own id instead of a generated one |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tectra-ng/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Angular UI components on signals: table, datepicker, select, multiselect, dialog, drawer, toast, tooltip, tree and 80+ more. Standalone, OnPush, zoneless, accessible and themable, one entry point per component.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://tectra-ng.com",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@angular/forms": "^22.2.0",
|
|
61
61
|
"@angular/router": "^22.2.0",
|
|
62
62
|
"rxjs": "^7.8.0",
|
|
63
|
-
"@tectra-ng/core": "^0.4.
|
|
64
|
-
"@tectra-ng/icons": "^0.4.
|
|
65
|
-
"@tectra-ng/themes": "^0.4.
|
|
63
|
+
"@tectra-ng/core": "^0.4.4",
|
|
64
|
+
"@tectra-ng/icons": "^0.4.4",
|
|
65
|
+
"@tectra-ng/themes": "^0.4.4"
|
|
66
66
|
},
|
|
67
67
|
"peerDependenciesMeta": {
|
|
68
68
|
"@angular/router": {
|
|
@@ -350,6 +350,10 @@
|
|
|
350
350
|
"types": "./types/tectra-ng-ui-select.d.ts",
|
|
351
351
|
"default": "./fesm2022/tectra-ng-ui-select.mjs"
|
|
352
352
|
},
|
|
353
|
+
"./select-button": {
|
|
354
|
+
"types": "./types/tectra-ng-ui-select-button.d.ts",
|
|
355
|
+
"default": "./fesm2022/tectra-ng-ui-select-button.mjs"
|
|
356
|
+
},
|
|
353
357
|
"./skeleton": {
|
|
354
358
|
"types": "./types/tectra-ng-ui-skeleton.d.ts",
|
|
355
359
|
"default": "./fesm2022/tectra-ng-ui-skeleton.mjs"
|
package/paginator/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Page navigation for long lists: first / previous / page / next / last buttons, a
|
|
|
8
8
|
|
|
9
9
|
`pageChange` gets `TxPageState` — `page` (0-based), `first`, `rows`, `pageCount`. Below 40rem the paginator is compact: fewer page links and no first / last buttons, so it fits one line on a phone.
|
|
10
10
|
|
|
11
|
-
For requests and responses of paginated lists use `TxPaginationParams` (`page` is 1-based, `limit` is the page size, `total` the number of records) and the helpers `pageToFirst`, `firstToPage`, `pageCountOf`.
|
|
11
|
+
For requests and responses of paginated lists use `TxPaginationParams` (`page` is 1-based, `limit` is the page size, `total` the number of records) and the helpers `pageToFirst`, `firstToPage`, `pageCountOf`. Code that only needs this math imports it from `@tectra-ng/utils/pagination`, which does not load the paginator component.
|
|
12
12
|
|
|
13
13
|
## Inputs
|
|
14
14
|
| Name | Description |
|
package/panel-menu/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Panel menu
|
|
2
2
|
|
|
3
|
-
A vertical menu of collapsible sections for app navigation. Two looks: `panel` (each root item is a bordered panel with a toggle header) and `sidebar` (root items are section titles above their links — the app sidebar). Nested items open in place with an animation; the item of the current route is highlighted and its parents open.
|
|
3
|
+
A vertical menu of collapsible sections for app navigation. Two looks: `panel` (each root item is a bordered panel with a toggle header) and `sidebar` (root items are section titles above their links — the app sidebar). Nested items open in place with an animation; the item of the current route is highlighted and its parents open. A clicked link is highlighted as soon as its navigation starts and goes back when the navigation is cancelled or fails; when the current page has a `canDeactivate` guard (a leave confirm) the highlight waits until the guards let the page go.
|
|
4
4
|
|
|
5
5
|
```html
|
|
6
6
|
<tx-panel-menu [model]="items" />
|
package/pill/README.md
CHANGED
|
@@ -12,7 +12,7 @@ A small rounded label for a status, a category or a count — in tables, lists a
|
|
|
12
12
|
| Name | Description |
|
|
13
13
|
|---|---|
|
|
14
14
|
| value | Text of the pill; content inside the tag is added after it |
|
|
15
|
-
| tone | `neutral`, `primary`, `success`, `info`, `warn`, `danger`, `help`, `contrast` |
|
|
15
|
+
| tone | `neutral`, `primary`, `success`, `info`, `warn`, `danger`, `help`, `contrast`; `secondary` is the same as `neutral`, so tag and badge severities (and `txHttpStatusTone`) fit |
|
|
16
16
|
| variant | `soft` (tinted, default), `solid` or `outline` |
|
|
17
17
|
| size | `small`, `medium` (`normal` is the same), `large` |
|
|
18
18
|
| icon | Icon before the text: tectra name, `pi-` name or icon class |
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# SelectButton
|
|
2
|
+
|
|
3
|
+
A segmented choice: a few options as buttons in one track, the picked one filled. One value (a radio group) or several (`multiple`, toggle buttons). A `ControlValueAccessor` — works with `[formControl]`, `ngModel`, signal forms and `[(value)]`.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-select-button ariaLabel="Billing period" [options]="periods" formControlName="period" />
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
readonly periods = [
|
|
11
|
+
{ label: 'Monthly', value: 'month' },
|
|
12
|
+
{ label: 'Yearly', value: 'year' },
|
|
13
|
+
];
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Options are objects (fields read with `optionLabel`, `optionValue`, `optionDisabled`, `optionIcon`; dots reach nested fields) or plain strings / numbers. The value is one option value or `null`; with `multiple` it is an array in the order the options were picked.
|
|
17
|
+
|
|
18
|
+
## Inputs
|
|
19
|
+
| Name | Description |
|
|
20
|
+
|---|---|
|
|
21
|
+
| value | Two-way: the selected value, or an array of values when `multiple` is on |
|
|
22
|
+
| options | The options: objects or plain strings / numbers |
|
|
23
|
+
| optionLabel | Field of the option text (default `label`) |
|
|
24
|
+
| optionValue | Field of the option value (default `value`); plain options are their own value |
|
|
25
|
+
| optionDisabled | Field that disables an option (default `disabled`) |
|
|
26
|
+
| optionIcon | Field of the option icon — a `@tectra-ng/icons` name or any icon class (default `icon`) |
|
|
27
|
+
| dataKey | Field that identifies object values, so a copy of a value still matches its option |
|
|
28
|
+
| multiple | Several options can be picked; the value is an array and the items are toggle buttons |
|
|
29
|
+
| allowEmpty | `false` = a click on the only picked option does not unpick it (default `true`) |
|
|
30
|
+
| iconOnly | Shows only the icons; the option text becomes the accessible name and a tooltip |
|
|
31
|
+
| size | `small`, `medium`, `large` |
|
|
32
|
+
| fluid | Takes the full width, the items share it equally; inherits `<tx-fluid>` |
|
|
33
|
+
| invalid | Red border and `aria-invalid`; without it the control follows its form control |
|
|
34
|
+
| disabled | Disables every option (the form control can disable it too) |
|
|
35
|
+
| readonly | Shows the value, ignores clicks; the arrow keys still move focus |
|
|
36
|
+
| required | `aria-required` on the radio group (single mode) |
|
|
37
|
+
| ariaLabel | Accessible name of the group |
|
|
38
|
+
| ariaLabelledBy | Id of the element that names the group |
|
|
39
|
+
| dt | Design tokens of this instance (`selectButton`) |
|
|
40
|
+
| pt | Classes and styles of the parts: `root`, `item`, `icon`, `label` |
|
|
41
|
+
| ptOptions | How `pt` merges with the global pass-through |
|
|
42
|
+
| unstyled | Removes the tectra styles, keeps the buttons, the keys and ARIA |
|
|
43
|
+
|
|
44
|
+
## Outputs
|
|
45
|
+
| Name | Description |
|
|
46
|
+
|---|---|
|
|
47
|
+
| changed | `{ value, option, originalEvent }` after a click or a key changed the value |
|
|
48
|
+
| focused | Focus came into the control |
|
|
49
|
+
| blurred | Focus left the control |
|
|
50
|
+
|
|
51
|
+
## Slots
|
|
52
|
+
| Name | Description |
|
|
53
|
+
|---|---|
|
|
54
|
+
| txSelectButtonItem | `<ng-template txSelectButtonItem let-option let-selected="selected">` — own content of each item; `[txSelectButtonItemOf]="options"` types `option` |
|
|
55
|
+
|
|
56
|
+
## Methods
|
|
57
|
+
| Name | Description |
|
|
58
|
+
|---|---|
|
|
59
|
+
| focus | Moves focus to the selected option, or to the first one that can be picked |
|
|
60
|
+
|
|
61
|
+
## Keyboard
|
|
62
|
+
| Key | Action |
|
|
63
|
+
|---|---|
|
|
64
|
+
| Tab | Moves focus into the control (to the selected option) and out of it |
|
|
65
|
+
| Arrow Right / Down | Moves to the next option, from the last back to the first; in single mode also selects it |
|
|
66
|
+
| Arrow Left / Up | Moves to the previous option, from the first to the last; in single mode also selects it |
|
|
67
|
+
| Home / End | Moves to the first / last option; in single mode also selects it |
|
|
68
|
+
| Space / Enter | Selects the focused option, or unpicks it when it is picked and `allowEmpty` is on; with `multiple` toggles it |
|
|
69
|
+
|
|
70
|
+
Disabled options are skipped. Single mode is a `radiogroup` of `radio` buttons with `aria-checked`; `multiple` is a `group` of buttons with `aria-pressed`. Both keep one Tab stop.
|
package/speed-dial/README.md
CHANGED
|
@@ -6,7 +6,7 @@ A floating round button that fans out a few quick actions — in a line, a circl
|
|
|
6
6
|
<tx-speed-dial ariaLabel="Create" direction="up" [model]="createActions" (itemSelected)="create($event.item)" />
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Items are `TxMenuItem`s (`label`, `icon`, `command`, `disabled`, `visible`, `severity: 'danger'`); each one is an icon button named by its label, with the label in a tooltip.
|
|
9
|
+
Items are `TxMenuItem`s (`label`, `icon`, `command`, `disabled`, `visible`, `severity: 'danger'`); each one is an icon button named by its label, with the label in a tooltip. An item with `routerLink` (and `queryParams`, `fragment`) navigates with the router, one with `url` (and `target`) is a plain link; both still run their `command`.
|
|
10
10
|
|
|
11
11
|
## Inputs
|
|
12
12
|
| Name | Description |
|
|
@@ -47,3 +47,4 @@ Items are `TxMenuItem`s (`label`, `icon`, `command`, `disabled`, `visible`, `sev
|
|
|
47
47
|
| Home / End | First / last item |
|
|
48
48
|
| Escape | Closes, focus goes back to the button |
|
|
49
49
|
| Tab | Closes and moves on |
|
|
50
|
+
| Enter / Space on an item | Runs the item or follows its link |
|
package/stat-tiles/README.md
CHANGED
|
@@ -12,15 +12,15 @@ A responsive grid of key numbers — totals, rates, counts — each tile with a
|
|
|
12
12
|
## Inputs
|
|
13
13
|
| Name | Description |
|
|
14
14
|
|---|---|
|
|
15
|
-
| minWidth | `tx-stat-tiles` — narrowest column before the grid wraps;
|
|
15
|
+
| minWidth | `tx-stat-tiles` — narrowest column before the grid wraps; without it columns stay at least the `floorWidth` token (210px) unless `compact`, an explicit value wins over that floor |
|
|
16
16
|
| compact | `tx-stat-tiles` — tighter gap, padding, icon and value; columns down to `minWidth` |
|
|
17
17
|
| ariaLabel | `tx-stat-tiles` — accessible name of the list |
|
|
18
18
|
| ariaLabelledBy | `tx-stat-tiles` — id of the element that names the list |
|
|
19
|
-
| label | `tx-stat-tile` — what the number is |
|
|
19
|
+
| label | `tx-stat-tile` — what the number is; one line, cut with an ellipsis and shown in full as a title, so values of a row stay on one line next to an aside |
|
|
20
20
|
| value | `tx-stat-tile` — the number or text; `null` shows "-" |
|
|
21
21
|
| unit | `tx-stat-tile` — small text after the value |
|
|
22
22
|
| icon | `tx-stat-tile` — icon in a square tinted with the tone |
|
|
23
|
-
| meta | `tx-stat-tile` — muted line under the value, cut with an ellipsis |
|
|
23
|
+
| meta | `tx-stat-tile` — muted line under the value, cut with an ellipsis and shown in full as a title |
|
|
24
24
|
| tone | `tx-stat-tile` — `neutral`, `primary`, `success`, `info`, `warn` or `danger`: icon, share bar, accent value and highlight |
|
|
25
25
|
| share | `tx-stat-tile` — 0–100, draws a share bar (a `meter`) |
|
|
26
26
|
| textValue | `tx-stat-tile` — the value is text: smaller, one line, cut with an ellipsis and a title |
|
package/stepper/README.md
CHANGED
|
@@ -28,9 +28,10 @@ Two step indicators for multi-step flows.
|
|
|
28
28
|
## Inputs
|
|
29
29
|
| Name | Description |
|
|
30
30
|
|---|---|
|
|
31
|
-
| value | `tx-stepper`, two-way: the value of the active step. On `tx-step`, `tx-step-panel` and `tx-step-item`: the value of that step (a step and a panel inside a `tx-step-item` take the item's value) |
|
|
31
|
+
| value | `tx-stepper`, two-way: the value of the active step. On `tx-step`, `tx-step-panel` and `tx-step-item`: the value of that step (a step and a panel inside a `tx-step-item` take the item's value). Steps may come from `@for` / `@if`; a step without a value is skipped until it gets one |
|
|
32
32
|
| linear | `tx-stepper`: steps cannot be picked in the header; only the panels move on through `activate` |
|
|
33
33
|
| disabled | `tx-step`: the step cannot be picked |
|
|
34
|
+
| completed | `tx-step`, `tx-step-item`: marks the step done (or not done with `false`) whatever its position; unset, a step is done when it comes before the active one. A done step colours the line after it and adds "completed" to its accessible name |
|
|
34
35
|
| items | `tx-steps`: the steps, `TxStepsItem[]` — `label`, `icon`, `description` (track), `disabled`, `command` (runs with `{ originalEvent, item, index }` when the step is clicked) |
|
|
35
36
|
| activeIndex | `tx-steps`, two-way: index of the current step; the steps before it are done. Set it to `items.length` to mark every step done |
|
|
36
37
|
| readonly | `tx-steps`: the steps cannot be clicked (default `true`). Off, an enabled step with a `command` can be clicked: it becomes current and runs its `command` |
|
|
@@ -53,7 +54,7 @@ Two step indicators for multi-step flows.
|
|
|
53
54
|
|---|---|
|
|
54
55
|
| default | `tx-step`: the step title. `tx-step-panel`: content that is always rendered |
|
|
55
56
|
| txStepPanelContent | `<ng-template txStepPanelContent let-activate let-value="value" let-index="index" let-active="active">` — panel content, rendered when the step is first opened; `activate(value)` moves to a step |
|
|
56
|
-
| txStepContent | `<ng-template txStepContent let-value let-active="active" let-completed="completed" let-index="index" let-activate="activate">` — own step header instead of the number and the title |
|
|
57
|
+
| txStepContent | `<ng-template txStepContent let-value let-active="active" let-completed="completed" let-index="index" let-activate="activate">` — own step header instead of the number and the title; `completed` follows the `completed` input |
|
|
57
58
|
| txStepsItem | `<ng-template txStepsItem let-item let-index="index" let-active="active" let-done="done">` — own content of a `tx-steps` step |
|
|
58
59
|
|
|
59
60
|
## Keyboard
|
package/table/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Data table for lists: sorting, pagination, server data, selection, row actions w
|
|
|
4
4
|
|
|
5
5
|
```html
|
|
6
6
|
<tx-table [value]="people()" [columns]="columns" dataKey="id" paginator [rows]="10">
|
|
7
|
-
<ng-template txTableCell="name" let-person>
|
|
7
|
+
<ng-template txTableCell="name" [txTableCellOf]="people()" let-person>
|
|
8
8
|
<strong>{{ person.name }}</strong>
|
|
9
9
|
</ng-template>
|
|
10
10
|
</tx-table>
|
|
@@ -14,6 +14,8 @@ Columns are `TxTableColumn` objects: `field` (a dot reads a nested value, `team.
|
|
|
14
14
|
|
|
15
15
|
A cell shows the value of its field as text; `<ng-template txTableCell="field">` replaces it. Text that does not fit is cut with an ellipsis.
|
|
16
16
|
|
|
17
|
+
Pass the rows to the row templates for typing: `[txTableCellOf]="people()"` (and `txTableActionsOf`, `txTableExpansionOf`, `txTableCardOf`, `txTableEditorOf`, `txTableGroupHeaderOf`, `txTableGroupFooterOf`) gives `let-row` the row type in strict templates. Angular does not pass the type of the table `value` to the templates inside it, so without the `…Of` input the row stays untyped.
|
|
18
|
+
|
|
17
19
|
Filtering, sorting and pagination run on `value` unless `lazy` is on — then `lazyLoad` asks the server for `{ first, rows, sortField, sortOrder, multiSortMeta, filters, globalFilter }` and `totalRecords` is the size of the whole list. A set `totalRecords` without `lazy` also means `value` is already the current page.
|
|
18
20
|
|
|
19
21
|
## Inputs
|
|
@@ -96,7 +98,7 @@ Filtering, sorting and pagination run on `value` unless `lazy` is on — then `l
|
|
|
96
98
|
| contextMenu | Own right-click menu (`TxMenuItem[]`); the row is in `contextMenuSelection` |
|
|
97
99
|
| contextMenuSelection | Row the context menu was opened on. Two-way: `[(contextMenuSelection)]` |
|
|
98
100
|
| rowContextMenu | Right-click opens the row actions as a menu (on by default) |
|
|
99
|
-
| responsive | Rows become cards below `breakpoint` (on by default) |
|
|
101
|
+
| responsive | Rows become cards below `breakpoint` (on by default); group headers and footers, the expand button and the expansion stay in the cards |
|
|
100
102
|
| breakpoint | Width below which rows are cards, `64rem` by default |
|
|
101
103
|
| dt | Design tokens (`table`) |
|
|
102
104
|
| pt | Classes and styles of the parts: `root`, `toolbar`, `frame`, `scroller`, `table`, `thead`, `headerRow`, `headerCell`, `sortButton`, `sortIcon`, `tbody`, `row`, `cell`, `tfoot`, `footerCell`, `loading`, `empty`, `paginator`, `cards`, `card` |
|
|
@@ -132,19 +134,19 @@ Filtering, sorting and pagination run on `value` unless `lazy` is on — then `l
|
|
|
132
134
|
## Slots
|
|
133
135
|
| Name | Description |
|
|
134
136
|
|---|---|
|
|
135
|
-
| txTableCell | `<ng-template txTableCell="field" let-row let-value="value" let-index="index">` — content of the cells of a column |
|
|
137
|
+
| txTableCell | `<ng-template txTableCell="field" [txTableCellOf]="rows" let-row let-value="value" let-index="index">` — content of the cells of a column |
|
|
136
138
|
| txTableHeaderCell | `<ng-template txTableHeaderCell="field" let-column>` — own header content |
|
|
137
139
|
| txTableFooterCell | `<ng-template txTableFooterCell="field" let-column>` — footer content of a column |
|
|
138
|
-
| txTableActions | `<ng-template txTableActions let-row>` — actions column; put `tx-table-actions` with buttons marked `*txTableAction="{ label }"` inside; the `…` popover closes once an action in it is clicked |
|
|
139
|
-
| txTableExpansion | `<ng-template txTableExpansion let-row>` — content of an expanded row; adds the expand column |
|
|
140
|
-
| txTableCard | `<ng-template txTableCard let-row let-index="index">` — own card for a row on narrow screens |
|
|
140
|
+
| txTableActions | `<ng-template txTableActions [txTableActionsOf]="rows" let-row>` — actions column; put `tx-table-actions` with buttons marked `*txTableAction="{ label }"` inside; the `…` popover closes once an action in it is clicked |
|
|
141
|
+
| txTableExpansion | `<ng-template txTableExpansion [txTableExpansionOf]="rows" let-row>` — content of an expanded row; adds the expand column, and an expand button to every card in the card view |
|
|
142
|
+
| txTableCard | `<ng-template txTableCard [txTableCardOf]="rows" let-row let-index="index">` — own card for a row on narrow screens |
|
|
141
143
|
| txTableEmpty | `<ng-template txTableEmpty>` — own content of an empty table |
|
|
142
144
|
| txTableEditor | `<ng-template txTableEditor="field" let-value="value" let-set="set" let-commit="commit" let-cancel="cancel">` — own editor of a column |
|
|
143
145
|
| txTableGroupHeader | `<ng-template txTableGroupHeader let-row let-value="value" let-count="count" let-toggle="toggle">` — content of a group header |
|
|
144
146
|
| txTableGroupFooter | `<ng-template txTableGroupFooter let-value="value" let-count="count" let-rows="rows">` — row after a group, e.g. its total |
|
|
145
147
|
| txTableToolbar | `<div txTableToolbar>` — content on the left of the toolbar row, next to the settings gear |
|
|
146
148
|
|
|
147
|
-
The row templates take the table rows only for typing — `<ng-template txTableCell="name" [txTableCellOf]="deals()" let-deal>` gives `deal` the row type in strict templates; without it the row stays untyped.
|
|
149
|
+
The row templates take the table rows only for typing — `<ng-template txTableCell="name" [txTableCellOf]="deals()" let-deal>` gives `deal` the row type and `node` the type of the rows in strict templates; without it the row stays untyped. In `tx-tree-table` pass the nodes: the row is typed as the node `data`.
|
|
148
150
|
|
|
149
151
|
## Inputs — row templates
|
|
150
152
|
| Name | Description |
|
|
@@ -190,3 +192,4 @@ The row templates take the table rows only for typing — `<ng-template txTableC
|
|
|
190
192
|
| Enter / F2 | On an editable cell (`editMode="cell"`): starts editing |
|
|
191
193
|
| Enter / Tab / Shift + Tab | In a cell editor: saves (Tab moves to the next editable cell) |
|
|
192
194
|
| Escape | In an editor: cancels |
|
|
195
|
+
| Enter / Space | On the expand button of a row, a card or a group: opens or closes it |
|
package/tabs/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Switch between views, modes or filters. Three looks: `segmented` (equal items in
|
|
|
29
29
|
| variant | `segmented`, `pills` or `line` |
|
|
30
30
|
| size | `small` or `medium` (segmented) |
|
|
31
31
|
| orientation | `horizontal` or `vertical` (full-width tabs in a column) |
|
|
32
|
-
| raised | Card background, ring and shadow —
|
|
32
|
+
| raised | Card background, ring and shadow on the track — lifts the tabs off the page background next to cards. Without it the `segmented` and `pills` track is a light well with a ring that shows both on the page background and inside a card |
|
|
33
33
|
| scrollable | Previous / next buttons: shown by themselves while the tabs do not fit; `true` keeps them on, `false` turns them off |
|
|
34
34
|
| showNavigators | Shows the previous / next buttons of a scrollable list |
|
|
35
35
|
| lazy | Renders only the active panel |
|
package/tree-select/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Pick from a hierarchy — folders, categories, org units. A select whose panel i
|
|
|
8
8
|
| options | Nodes: `{ key, label, children?, icon?, selectable?, disabled?, data? }` |
|
|
9
9
|
| selectionMode | `single`, `multiple` or `checkbox` (a parent checks its branch; partly checked parents show a dash) |
|
|
10
10
|
| display | With several values: `comma` or `chip` (removable chips on one line; the ones that do not fit are counted in a `+N` chip) |
|
|
11
|
-
| expandedKeys | Keys of the open nodes; two-way with `[(expandedKeys)]` |
|
|
11
|
+
| expandedKeys | Keys of the open nodes; two-way with `[(expandedKeys)]`. Nodes with `expanded: true` are added on first sight |
|
|
12
12
|
| filter | Search field in the panel |
|
|
13
13
|
| filterBy | Fields searched, comma separated (`label` by default, e.g. `label, data.code`) |
|
|
14
14
|
| filterPlaceholder | Own placeholder of the search field |
|
package/tree-table/README.md
CHANGED
|
@@ -59,7 +59,7 @@ A table whose rows form a tree (`role="treegrid"`) and looks like the table: the
|
|
|
59
59
|
## Slots
|
|
60
60
|
| Name | Description |
|
|
61
61
|
|---|---|
|
|
62
|
-
| txTableCell | `<ng-template txTableCell="field" let-data let-node="node">` — own cell content; `data` is the node data |
|
|
62
|
+
| txTableCell | `<ng-template txTableCell="field" [txTableCellOf]="nodes()" let-data let-node="node">` — own cell content; `data` is the node data. `txTableCellOf` takes the nodes only for typing: `data` gets the type of the node `data`, `node` the node type |
|
|
63
63
|
| txTableHeaderCell | `<ng-template txTableHeaderCell="field" let-column>` — own header content |
|
|
64
64
|
| txTableFooterCell | `<ng-template txTableFooterCell="field">` — own footer content |
|
|
65
65
|
| txTableEmpty | `<ng-template txTableEmpty>` — own empty state |
|
package/truncate-text/README.md
CHANGED
|
@@ -11,7 +11,7 @@ One line of text cut to a number of characters, with the full value in a tooltip
|
|
|
11
11
|
| Name | Description |
|
|
12
12
|
|---|---|
|
|
13
13
|
| text | The text; a number is shown as text |
|
|
14
|
-
| limit | How many characters are shown before the text is cut |
|
|
14
|
+
| limit | How many characters are shown before the text is cut. Whatever the limit, the text never gets wider than its container: a longer line is clipped with an ellipsis |
|
|
15
15
|
| ellipsis | What follows the cut text (`...` by default) |
|
|
16
16
|
| href | Makes the text a link to this address |
|
|
17
17
|
| openLink | Makes the text a link to itself — for a `text` that is a URL; `href` wins when both are set |
|