@tectra-ng/blocks 0.0.0-stage → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/README.md +16 -2
  2. package/action-tile/README.md +33 -0
  3. package/actions-menu/README.md +42 -0
  4. package/app-footer/README.md +30 -0
  5. package/app-layout/README.md +51 -0
  6. package/command-palette/README.md +63 -0
  7. package/console-layout/README.md +70 -0
  8. package/cookie-notice/README.md +45 -0
  9. package/empty-state/README.md +35 -0
  10. package/fesm2022/tectra-ng-blocks-action-tile.mjs +294 -0
  11. package/fesm2022/tectra-ng-blocks-action-tile.mjs.map +1 -0
  12. package/fesm2022/tectra-ng-blocks-actions-menu.mjs +380 -0
  13. package/fesm2022/tectra-ng-blocks-actions-menu.mjs.map +1 -0
  14. package/fesm2022/tectra-ng-blocks-app-footer.mjs +276 -0
  15. package/fesm2022/tectra-ng-blocks-app-footer.mjs.map +1 -0
  16. package/fesm2022/tectra-ng-blocks-app-layout.mjs +544 -0
  17. package/fesm2022/tectra-ng-blocks-app-layout.mjs.map +1 -0
  18. package/fesm2022/tectra-ng-blocks-command-palette.mjs +663 -0
  19. package/fesm2022/tectra-ng-blocks-command-palette.mjs.map +1 -0
  20. package/fesm2022/tectra-ng-blocks-console-layout.mjs +1060 -0
  21. package/fesm2022/tectra-ng-blocks-console-layout.mjs.map +1 -0
  22. package/fesm2022/tectra-ng-blocks-cookie-notice.mjs +416 -0
  23. package/fesm2022/tectra-ng-blocks-cookie-notice.mjs.map +1 -0
  24. package/fesm2022/tectra-ng-blocks-empty-state.mjs +278 -0
  25. package/fesm2022/tectra-ng-blocks-empty-state.mjs.map +1 -0
  26. package/fesm2022/tectra-ng-blocks-filters-panel.mjs +959 -0
  27. package/fesm2022/tectra-ng-blocks-filters-panel.mjs.map +1 -0
  28. package/fesm2022/tectra-ng-blocks-kanban.mjs +864 -0
  29. package/fesm2022/tectra-ng-blocks-kanban.mjs.map +1 -0
  30. package/fesm2022/tectra-ng-blocks-network-status.mjs +303 -0
  31. package/fesm2022/tectra-ng-blocks-network-status.mjs.map +1 -0
  32. package/fesm2022/tectra-ng-blocks-page-header.mjs +195 -0
  33. package/fesm2022/tectra-ng-blocks-page-header.mjs.map +1 -0
  34. package/fesm2022/tectra-ng-blocks-pinned-tabs.mjs +692 -0
  35. package/fesm2022/tectra-ng-blocks-pinned-tabs.mjs.map +1 -0
  36. package/fesm2022/tectra-ng-blocks-public-header.mjs +372 -0
  37. package/fesm2022/tectra-ng-blocks-public-header.mjs.map +1 -0
  38. package/fesm2022/tectra-ng-blocks-qr-code.mjs +487 -0
  39. package/fesm2022/tectra-ng-blocks-qr-code.mjs.map +1 -0
  40. package/fesm2022/tectra-ng-blocks-switch-language.mjs +316 -0
  41. package/fesm2022/tectra-ng-blocks-switch-language.mjs.map +1 -0
  42. package/fesm2022/tectra-ng-blocks-switch-theme.mjs +416 -0
  43. package/fesm2022/tectra-ng-blocks-switch-theme.mjs.map +1 -0
  44. package/fesm2022/tectra-ng-blocks-topbar-preferences.mjs +260 -0
  45. package/fesm2022/tectra-ng-blocks-topbar-preferences.mjs.map +1 -0
  46. package/fesm2022/tectra-ng-blocks-wizard.mjs +1284 -0
  47. package/fesm2022/tectra-ng-blocks-wizard.mjs.map +1 -0
  48. package/fesm2022/tectra-ng-blocks.mjs +4 -0
  49. package/fesm2022/tectra-ng-blocks.mjs.map +1 -0
  50. package/filters-panel/README.md +68 -0
  51. package/kanban/README.md +55 -0
  52. package/network-status/README.md +33 -0
  53. package/package.json +137 -3
  54. package/page-header/README.md +32 -0
  55. package/pinned-tabs/README.md +42 -0
  56. package/public-header/README.md +44 -0
  57. package/qr-code/README.md +52 -0
  58. package/switch-language/README.md +33 -0
  59. package/switch-theme/README.md +32 -0
  60. package/topbar-preferences/README.md +35 -0
  61. package/types/tectra-ng-blocks-action-tile.d.ts +114 -0
  62. package/types/tectra-ng-blocks-action-tile.d.ts.map +1 -0
  63. package/types/tectra-ng-blocks-actions-menu.d.ts +112 -0
  64. package/types/tectra-ng-blocks-actions-menu.d.ts.map +1 -0
  65. package/types/tectra-ng-blocks-app-footer.d.ts +111 -0
  66. package/types/tectra-ng-blocks-app-footer.d.ts.map +1 -0
  67. package/types/tectra-ng-blocks-app-layout.d.ts +212 -0
  68. package/types/tectra-ng-blocks-app-layout.d.ts.map +1 -0
  69. package/types/tectra-ng-blocks-command-palette.d.ts +291 -0
  70. package/types/tectra-ng-blocks-command-palette.d.ts.map +1 -0
  71. package/types/tectra-ng-blocks-console-layout.d.ts +454 -0
  72. package/types/tectra-ng-blocks-console-layout.d.ts.map +1 -0
  73. package/types/tectra-ng-blocks-cookie-notice.d.ts +168 -0
  74. package/types/tectra-ng-blocks-cookie-notice.d.ts.map +1 -0
  75. package/types/tectra-ng-blocks-empty-state.d.ts +138 -0
  76. package/types/tectra-ng-blocks-empty-state.d.ts.map +1 -0
  77. package/types/tectra-ng-blocks-filters-panel.d.ts +314 -0
  78. package/types/tectra-ng-blocks-filters-panel.d.ts.map +1 -0
  79. package/types/tectra-ng-blocks-kanban.d.ts +260 -0
  80. package/types/tectra-ng-blocks-kanban.d.ts.map +1 -0
  81. package/types/tectra-ng-blocks-network-status.d.ts +108 -0
  82. package/types/tectra-ng-blocks-network-status.d.ts.map +1 -0
  83. package/types/tectra-ng-blocks-page-header.d.ts +86 -0
  84. package/types/tectra-ng-blocks-page-header.d.ts.map +1 -0
  85. package/types/tectra-ng-blocks-pinned-tabs.d.ts +159 -0
  86. package/types/tectra-ng-blocks-pinned-tabs.d.ts.map +1 -0
  87. package/types/tectra-ng-blocks-public-header.d.ts +142 -0
  88. package/types/tectra-ng-blocks-public-header.d.ts.map +1 -0
  89. package/types/tectra-ng-blocks-qr-code.d.ts +160 -0
  90. package/types/tectra-ng-blocks-qr-code.d.ts.map +1 -0
  91. package/types/tectra-ng-blocks-switch-language.d.ts +106 -0
  92. package/types/tectra-ng-blocks-switch-language.d.ts.map +1 -0
  93. package/types/tectra-ng-blocks-switch-theme.d.ts +108 -0
  94. package/types/tectra-ng-blocks-switch-theme.d.ts.map +1 -0
  95. package/types/tectra-ng-blocks-topbar-preferences.d.ts +103 -0
  96. package/types/tectra-ng-blocks-topbar-preferences.d.ts.map +1 -0
  97. package/types/tectra-ng-blocks-wizard.d.ts +682 -0
  98. package/types/tectra-ng-blocks-wizard.d.ts.map +1 -0
  99. package/types/tectra-ng-blocks.d.ts +2 -0
  100. package/types/tectra-ng-blocks.d.ts.map +1 -0
  101. package/wizard/README.md +77 -0
@@ -0,0 +1,294 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input, output } from "@angular/core";
3
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
4
+ import { optionalBoolean } from "@tectra-ng/core/utils";
5
+ import { TxIcon } from "@tectra-ng/icons";
6
+ import { toStyleObject } from "@tectra-ng/themes";
7
+ var TxActionTile = class TxActionTile {
8
+ icon = input(void 0, ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
9
+ title = input.required(...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
10
+ text = input(void 0, ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
11
+ loading = input(false, {
12
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
13
+ transform: booleanAttribute
14
+ });
15
+ disabled = input(false, {
16
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
17
+ transform: booleanAttribute
18
+ });
19
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
20
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
21
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
22
+ unstyled = input(void 0, {
23
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
24
+ transform: optionalBoolean
25
+ });
26
+ tileClick = output();
27
+ isUnstyled = injectUnstyled(this.unstyled);
28
+ passThrough = injectPassThrough("actionTile", this, this.pt, this.ptOptions);
29
+ hostStyle = computed(() => ({
30
+ ...toStyleObject(this.dt(), "--tx-action-tile"),
31
+ ...this.passThrough().root?.style
32
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
33
+ onClick() {
34
+ if (this.disabled() || this.loading()) return;
35
+ this.tileClick.emit();
36
+ }
37
+ static ɵfac = i0.ɵɵngDeclareFactory({
38
+ minVersion: "12.0.0",
39
+ version: "22.2.3",
40
+ ngImport: i0,
41
+ type: TxActionTile,
42
+ deps: [],
43
+ target: i0.ɵɵFactoryTarget.Component
44
+ });
45
+ static ɵcmp = i0.ɵɵngDeclareComponent({
46
+ minVersion: "17.0.0",
47
+ version: "22.2.3",
48
+ type: TxActionTile,
49
+ isStandalone: true,
50
+ selector: "tx-action-tile",
51
+ inputs: {
52
+ icon: {
53
+ classPropertyName: "icon",
54
+ publicName: "icon",
55
+ isSignal: true,
56
+ isRequired: false,
57
+ transformFunction: null
58
+ },
59
+ title: {
60
+ classPropertyName: "title",
61
+ publicName: "title",
62
+ isSignal: true,
63
+ isRequired: true,
64
+ transformFunction: null
65
+ },
66
+ text: {
67
+ classPropertyName: "text",
68
+ publicName: "text",
69
+ isSignal: true,
70
+ isRequired: false,
71
+ transformFunction: null
72
+ },
73
+ loading: {
74
+ classPropertyName: "loading",
75
+ publicName: "loading",
76
+ isSignal: true,
77
+ isRequired: false,
78
+ transformFunction: null
79
+ },
80
+ disabled: {
81
+ classPropertyName: "disabled",
82
+ publicName: "disabled",
83
+ isSignal: true,
84
+ isRequired: false,
85
+ transformFunction: null
86
+ },
87
+ dt: {
88
+ classPropertyName: "dt",
89
+ publicName: "dt",
90
+ isSignal: true,
91
+ isRequired: false,
92
+ transformFunction: null
93
+ },
94
+ pt: {
95
+ classPropertyName: "pt",
96
+ publicName: "pt",
97
+ isSignal: true,
98
+ isRequired: false,
99
+ transformFunction: null
100
+ },
101
+ ptOptions: {
102
+ classPropertyName: "ptOptions",
103
+ publicName: "ptOptions",
104
+ isSignal: true,
105
+ isRequired: false,
106
+ transformFunction: null
107
+ },
108
+ unstyled: {
109
+ classPropertyName: "unstyled",
110
+ publicName: "unstyled",
111
+ isSignal: true,
112
+ isRequired: false,
113
+ transformFunction: null
114
+ }
115
+ },
116
+ outputs: { tileClick: "tileClick" },
117
+ host: {
118
+ properties: {
119
+ "class": "passThrough().root?.class",
120
+ "style": "hostStyle()",
121
+ "attr.data-styled": "!isUnstyled() || null",
122
+ "class.tx-action-tile--loading": "loading()",
123
+ "class.tx-action-tile--disabled": "disabled()"
124
+ },
125
+ classAttribute: "tx-action-tile"
126
+ },
127
+ ngImport: i0,
128
+ template: `
129
+ <button
130
+ type="button"
131
+ class="tx-action-tile__button"
132
+ [disabled]="disabled() || loading()"
133
+ [attr.aria-busy]="loading() || null"
134
+ [class]="passThrough().button?.class"
135
+ [style]="passThrough().button?.style"
136
+ (click)="onClick()"
137
+ >
138
+ @if (icon(); as icon) {
139
+ <span class="tx-action-tile__icon" aria-hidden="true" [class]="passThrough().icon?.class" [style]="passThrough().icon?.style">
140
+ <tx-icon [name]="icon" />
141
+ </span>
142
+ }
143
+ <span class="tx-action-tile__body" [class]="passThrough().body?.class" [style]="passThrough().body?.style">
144
+ <span class="tx-action-tile__title" [class]="passThrough().title?.class" [style]="passThrough().title?.style">{{ title() }}</span>
145
+ @if (text()) {
146
+ <span class="tx-action-tile__text" [class]="passThrough().text?.class" [style]="passThrough().text?.style">{{ text() }}</span>
147
+ }
148
+ </span>
149
+ <span class="tx-action-tile__end" aria-hidden="true" [class]="passThrough().end?.class" [style]="passThrough().end?.style">
150
+ <tx-icon [class.tx-action-tile__spinner]="loading()" [name]="loading() ? 'spinner' : 'angle-right'" />
151
+ </span>
152
+ </button>
153
+ `,
154
+ isInline: true,
155
+ styles: [":host{display:block}.tx-action-tile__button{display:flex;align-items:center;box-sizing:border-box;width:100%;margin:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.tx-action-tile__button:disabled{cursor:default}.tx-action-tile__icon,.tx-action-tile__end{display:flex;flex-shrink:0;align-items:center;justify-content:center}.tx-action-tile__body{display:flex;flex:1;flex-direction:column;min-width:0}.tx-action-tile__text{overflow-wrap:break-word}.tx-action-tile__spinner{animation:tx-action-tile-spin 1s linear infinite}@keyframes tx-action-tile-spin{to{transform:rotate(360deg)}}:host([data-styled]) .tx-action-tile__button{gap:var(--tx-action-tile-gap);padding:var(--tx-action-tile-padding);border-radius:var(--tx-action-tile-border-radius);background:var(--tx-action-tile-background);box-shadow:0 0 0 1px var(--tx-action-tile-border-color);font-family:var(--tx-font-family);transition:box-shadow var(--tx-action-tile-transition-duration),background-color var(--tx-action-tile-transition-duration)}:host([data-styled]) .tx-action-tile__button:not(:disabled):hover{background:var(--tx-action-tile-hover-background);box-shadow:0 0 0 1px var(--tx-action-tile-hover-border-color)}:host([data-styled]) .tx-action-tile__button:focus-visible{outline:none;box-shadow:0 0 0 1px var(--tx-action-tile-border-color),var(--tx-action-tile-focus-ring-shadow)}:host([data-styled]) .tx-action-tile__button:disabled{opacity:var(--tx-action-tile-disabled-opacity)}:host([data-styled]) .tx-action-tile__icon{width:var(--tx-action-tile-icon-size);height:var(--tx-action-tile-icon-size);border-radius:var(--tx-action-tile-icon-border-radius);background:var(--tx-action-tile-icon-background);color:var(--tx-action-tile-icon-color);font-size:var(--tx-action-tile-icon-font-size)}:host([data-styled]) .tx-action-tile__body{gap:var(--tx-action-tile-body-gap)}:host([data-styled]) .tx-action-tile__title{color:var(--tx-action-tile-title-color);font-size:var(--tx-action-tile-title-font-size);font-weight:var(--tx-action-tile-title-font-weight);line-height:var(--tx-action-tile-title-line-height)}:host([data-styled]) .tx-action-tile__text{color:var(--tx-action-tile-text-color);font-size:var(--tx-action-tile-text-font-size);line-height:var(--tx-action-tile-text-line-height)}:host([data-styled]) .tx-action-tile__end{color:var(--tx-action-tile-end-color);font-size:var(--tx-action-tile-end-font-size);transition:transform var(--tx-action-tile-transition-duration),color var(--tx-action-tile-transition-duration)}:host([data-styled]) .tx-action-tile__button:not(:disabled):hover .tx-action-tile__end{color:var(--tx-action-tile-end-hover-color);transform:translate(var(--tx-action-tile-end-hover-shift))}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-action-tile__button,:host([data-styled]) .tx-action-tile__end{transition:none}.tx-action-tile__spinner{animation-duration:2s}}\n"],
156
+ dependencies: [{
157
+ kind: "component",
158
+ type: TxIcon,
159
+ selector: "tx-icon",
160
+ inputs: ["name"]
161
+ }],
162
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
163
+ });
164
+ };
165
+ i0.ɵɵngDeclareClassMetadata({
166
+ minVersion: "12.0.0",
167
+ version: "22.2.3",
168
+ ngImport: i0,
169
+ type: TxActionTile,
170
+ decorators: [{
171
+ type: Component,
172
+ args: [{
173
+ selector: "tx-action-tile",
174
+ imports: [TxIcon],
175
+ template: `
176
+ <button
177
+ type="button"
178
+ class="tx-action-tile__button"
179
+ [disabled]="disabled() || loading()"
180
+ [attr.aria-busy]="loading() || null"
181
+ [class]="passThrough().button?.class"
182
+ [style]="passThrough().button?.style"
183
+ (click)="onClick()"
184
+ >
185
+ @if (icon(); as icon) {
186
+ <span class="tx-action-tile__icon" aria-hidden="true" [class]="passThrough().icon?.class" [style]="passThrough().icon?.style">
187
+ <tx-icon [name]="icon" />
188
+ </span>
189
+ }
190
+ <span class="tx-action-tile__body" [class]="passThrough().body?.class" [style]="passThrough().body?.style">
191
+ <span class="tx-action-tile__title" [class]="passThrough().title?.class" [style]="passThrough().title?.style">{{ title() }}</span>
192
+ @if (text()) {
193
+ <span class="tx-action-tile__text" [class]="passThrough().text?.class" [style]="passThrough().text?.style">{{ text() }}</span>
194
+ }
195
+ </span>
196
+ <span class="tx-action-tile__end" aria-hidden="true" [class]="passThrough().end?.class" [style]="passThrough().end?.style">
197
+ <tx-icon [class.tx-action-tile__spinner]="loading()" [name]="loading() ? 'spinner' : 'angle-right'" />
198
+ </span>
199
+ </button>
200
+ `,
201
+ changeDetection: ChangeDetectionStrategy.OnPush,
202
+ host: {
203
+ class: "tx-action-tile",
204
+ "[class]": "passThrough().root?.class",
205
+ "[style]": "hostStyle()",
206
+ "[attr.data-styled]": "!isUnstyled() || null",
207
+ "[class.tx-action-tile--loading]": "loading()",
208
+ "[class.tx-action-tile--disabled]": "disabled()"
209
+ },
210
+ styles: [":host{display:block}.tx-action-tile__button{display:flex;align-items:center;box-sizing:border-box;width:100%;margin:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.tx-action-tile__button:disabled{cursor:default}.tx-action-tile__icon,.tx-action-tile__end{display:flex;flex-shrink:0;align-items:center;justify-content:center}.tx-action-tile__body{display:flex;flex:1;flex-direction:column;min-width:0}.tx-action-tile__text{overflow-wrap:break-word}.tx-action-tile__spinner{animation:tx-action-tile-spin 1s linear infinite}@keyframes tx-action-tile-spin{to{transform:rotate(360deg)}}:host([data-styled]) .tx-action-tile__button{gap:var(--tx-action-tile-gap);padding:var(--tx-action-tile-padding);border-radius:var(--tx-action-tile-border-radius);background:var(--tx-action-tile-background);box-shadow:0 0 0 1px var(--tx-action-tile-border-color);font-family:var(--tx-font-family);transition:box-shadow var(--tx-action-tile-transition-duration),background-color var(--tx-action-tile-transition-duration)}:host([data-styled]) .tx-action-tile__button:not(:disabled):hover{background:var(--tx-action-tile-hover-background);box-shadow:0 0 0 1px var(--tx-action-tile-hover-border-color)}:host([data-styled]) .tx-action-tile__button:focus-visible{outline:none;box-shadow:0 0 0 1px var(--tx-action-tile-border-color),var(--tx-action-tile-focus-ring-shadow)}:host([data-styled]) .tx-action-tile__button:disabled{opacity:var(--tx-action-tile-disabled-opacity)}:host([data-styled]) .tx-action-tile__icon{width:var(--tx-action-tile-icon-size);height:var(--tx-action-tile-icon-size);border-radius:var(--tx-action-tile-icon-border-radius);background:var(--tx-action-tile-icon-background);color:var(--tx-action-tile-icon-color);font-size:var(--tx-action-tile-icon-font-size)}:host([data-styled]) .tx-action-tile__body{gap:var(--tx-action-tile-body-gap)}:host([data-styled]) .tx-action-tile__title{color:var(--tx-action-tile-title-color);font-size:var(--tx-action-tile-title-font-size);font-weight:var(--tx-action-tile-title-font-weight);line-height:var(--tx-action-tile-title-line-height)}:host([data-styled]) .tx-action-tile__text{color:var(--tx-action-tile-text-color);font-size:var(--tx-action-tile-text-font-size);line-height:var(--tx-action-tile-text-line-height)}:host([data-styled]) .tx-action-tile__end{color:var(--tx-action-tile-end-color);font-size:var(--tx-action-tile-end-font-size);transition:transform var(--tx-action-tile-transition-duration),color var(--tx-action-tile-transition-duration)}:host([data-styled]) .tx-action-tile__button:not(:disabled):hover .tx-action-tile__end{color:var(--tx-action-tile-end-hover-color);transform:translate(var(--tx-action-tile-end-hover-shift))}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-action-tile__button,:host([data-styled]) .tx-action-tile__end{transition:none}.tx-action-tile__spinner{animation-duration:2s}}\n"]
211
+ }]
212
+ }],
213
+ propDecorators: {
214
+ icon: [{
215
+ type: i0.Input,
216
+ args: [{
217
+ isSignal: true,
218
+ alias: "icon",
219
+ required: false
220
+ }]
221
+ }],
222
+ title: [{
223
+ type: i0.Input,
224
+ args: [{
225
+ isSignal: true,
226
+ alias: "title",
227
+ required: true
228
+ }]
229
+ }],
230
+ text: [{
231
+ type: i0.Input,
232
+ args: [{
233
+ isSignal: true,
234
+ alias: "text",
235
+ required: false
236
+ }]
237
+ }],
238
+ loading: [{
239
+ type: i0.Input,
240
+ args: [{
241
+ isSignal: true,
242
+ alias: "loading",
243
+ required: false
244
+ }]
245
+ }],
246
+ disabled: [{
247
+ type: i0.Input,
248
+ args: [{
249
+ isSignal: true,
250
+ alias: "disabled",
251
+ required: false
252
+ }]
253
+ }],
254
+ dt: [{
255
+ type: i0.Input,
256
+ args: [{
257
+ isSignal: true,
258
+ alias: "dt",
259
+ required: false
260
+ }]
261
+ }],
262
+ pt: [{
263
+ type: i0.Input,
264
+ args: [{
265
+ isSignal: true,
266
+ alias: "pt",
267
+ required: false
268
+ }]
269
+ }],
270
+ ptOptions: [{
271
+ type: i0.Input,
272
+ args: [{
273
+ isSignal: true,
274
+ alias: "ptOptions",
275
+ required: false
276
+ }]
277
+ }],
278
+ unstyled: [{
279
+ type: i0.Input,
280
+ args: [{
281
+ isSignal: true,
282
+ alias: "unstyled",
283
+ required: false
284
+ }]
285
+ }],
286
+ tileClick: [{
287
+ type: i0.Output,
288
+ args: ["tileClick"]
289
+ }]
290
+ }
291
+ });
292
+ export { TxActionTile };
293
+
294
+ //# sourceMappingURL=tectra-ng-blocks-action-tile.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-blocks-action-tile.mjs","names":[],"sources":["../../../../packages/blocks/action-tile/src/action-tile.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input, output } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxIcon, TxIconName } from '@tectra-ng/icons';\nimport { TectraActionTileTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxActionTilePart } from './action-tile.types';\n\n@Component({\n selector: 'tx-action-tile',\n imports: [TxIcon],\n template: `\n <button\n type=\"button\"\n class=\"tx-action-tile__button\"\n [disabled]=\"disabled() || loading()\"\n [attr.aria-busy]=\"loading() || null\"\n [class]=\"passThrough().button?.class\"\n [style]=\"passThrough().button?.style\"\n (click)=\"onClick()\"\n >\n @if (icon(); as icon) {\n <span class=\"tx-action-tile__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n <tx-icon [name]=\"icon\" />\n </span>\n }\n <span class=\"tx-action-tile__body\" [class]=\"passThrough().body?.class\" [style]=\"passThrough().body?.style\">\n <span class=\"tx-action-tile__title\" [class]=\"passThrough().title?.class\" [style]=\"passThrough().title?.style\">{{ title() }}</span>\n @if (text()) {\n <span class=\"tx-action-tile__text\" [class]=\"passThrough().text?.class\" [style]=\"passThrough().text?.style\">{{ text() }}</span>\n }\n </span>\n <span class=\"tx-action-tile__end\" aria-hidden=\"true\" [class]=\"passThrough().end?.class\" [style]=\"passThrough().end?.style\">\n <tx-icon [class.tx-action-tile__spinner]=\"loading()\" [name]=\"loading() ? 'spinner' : 'angle-right'\" />\n </span>\n </button>\n `,\n styleUrl: './action-tile.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-action-tile',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[class.tx-action-tile--loading]': 'loading()',\n '[class.tx-action-tile--disabled]': 'disabled()',\n },\n})\nexport class TxActionTile {\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly title = input.required<string>();\n readonly text = input<string | undefined>(undefined);\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly disabled = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraActionTileTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxActionTilePart, TxActionTile> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly tileClick = output<void>();\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('actionTile', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-action-tile'), ...this.passThrough().root?.style }));\n\n protected onClick(): void {\n if (this.disabled() || this.loading()) {\n return;\n }\n this.tileClick.emit();\n }\n}\n"],"mappings":";;;;;;AA+CA,IAAa,eAAb,MAAa,aAAY;CACd,OAAO,MAA8C,QAAU,GAAA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