@daffodil/design 0.94.1-rc.0 → 0.95.0
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 -2
- package/accordion/src/accordion-theme.scss +4 -4
- package/article/README.md +4 -27
- package/article/src/article-theme.scss +14 -14
- package/badge/src/badge-theme.scss +0 -6
- package/button/README.md +0 -4
- package/button/src/button/basic/button-theme.scss +17 -42
- package/button/src/button/button-base.scss +12 -3
- package/button/src/button/flat/flat-theme.scss +14 -12
- package/button/src/button/icon/icon-theme.scss +19 -40
- package/button/src/button/stroked/stroked-theme.scss +22 -36
- package/card/src/card/stroked/stroked-theme.scss +1 -1
- package/card/src/card-base.scss +0 -1
- package/fesm2022/daffodil-design-accordion.mjs +285 -188
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +578 -340
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-badge.mjs +166 -84
- package/fesm2022/daffodil-design-badge.mjs.map +1 -1
- package/fesm2022/daffodil-design-beacon.mjs +109 -47
- package/fesm2022/daffodil-design-beacon.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +384 -277
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +541 -408
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +349 -224
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +496 -327
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox.mjs +373 -313
- package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +103 -60
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field.mjs +441 -352
- package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-form.mjs +155 -57
- package/fesm2022/daffodil-design-form.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +349 -234
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image-lite.mjs +60 -0
- package/fesm2022/daffodil-design-image-lite.mjs.map +1 -0
- package/fesm2022/daffodil-design-image.mjs +245 -107
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +217 -164
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +308 -170
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +351 -278
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +525 -417
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +680 -450
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-native-select.mjs +175 -166
- package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +145 -68
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +376 -226
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +296 -192
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +243 -157
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-radio.mjs +382 -300
- package/fesm2022/daffodil-design-radio.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +424 -364
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +874 -887
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-spinner.mjs +156 -99
- package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +176 -106
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +685 -427
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-tag.mjs +251 -133
- package/fesm2022/daffodil-design-tag.mjs.map +1 -1
- package/fesm2022/daffodil-design-testing.mjs +4 -16
- package/fesm2022/daffodil-design-testing.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet.mjs +140 -54
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +170 -150
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +658 -481
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +456 -469
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +168 -115
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +1628 -1650
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/form-field/README.md +0 -4
- package/form-field/src/form-field-theme.scss +12 -4
- package/image/README.md +4 -0
- package/image-lite/README.md +58 -0
- package/image-lite/src/image-theme.scss +18 -0
- package/list/src/list-base.scss +3 -4
- package/list/src/list-theme.scss +6 -5
- package/media-gallery/README.md +1 -1
- package/media-gallery/src/media-gallery-theme.scss +3 -3
- package/menu/src/menu-theme.scss +6 -2
- package/notification/src/notification-theme.scss +10 -10
- package/package.json +1 -1
- package/scss/global.scss +17 -11
- package/scss/theme.scss +2 -18
- package/scss/theming/_get-palette.scss +0 -3
- package/scss/theming/_index.scss +0 -1
- package/scss/theming/_light-dark.scss +2 -2
- package/scss/theming/_theme-css-variables.scss +1 -1
- package/scss/theming/create-theme/_create-theme.scss +2 -2
- package/scss/theming/get-font-colors/_get-font-colors.scss +7 -25
- package/scss/theming/get-font-colors/_get-font-colors.spec.scss +0 -12
- package/scss/typography/_classes.scss +0 -6
- package/scss/typography/_index.scss +0 -1
- package/scss/typography/mixins/_sizes.scss +0 -1
- package/scss/typography/utilities/_variables.scss +3 -0
- package/select/src/select-theme.scss +10 -14
- package/switch/src/switch-theme.scss +2 -2
- package/tabs/src/tabs-theme.scss +4 -4
- package/types/daffodil-design-accordion.d.ts +92 -67
- package/types/daffodil-design-article.d.ts +49 -56
- package/types/daffodil-design-badge.d.ts +56 -33
- package/types/daffodil-design-beacon.d.ts +35 -14
- package/types/daffodil-design-breadcrumb.d.ts +89 -85
- package/types/daffodil-design-button.d.ts +128 -146
- package/types/daffodil-design-callout.d.ts +55 -39
- package/types/daffodil-design-card.d.ts +66 -56
- package/types/daffodil-design-checkbox.d.ts +211 -167
- package/types/daffodil-design-container.d.ts +17 -16
- package/types/daffodil-design-form-field.d.ts +273 -240
- package/types/daffodil-design-form.d.ts +21 -21
- package/types/daffodil-design-hero.d.ts +55 -39
- package/types/daffodil-design-image-lite.d.ts +17 -0
- package/types/daffodil-design-image.d.ts +89 -55
- package/types/daffodil-design-input.d.ts +86 -72
- package/types/daffodil-design-list.d.ts +49 -43
- package/types/daffodil-design-media-gallery.d.ts +176 -148
- package/types/daffodil-design-menu.d.ts +177 -169
- package/types/daffodil-design-modal.d.ts +205 -205
- package/types/daffodil-design-native-select.d.ts +94 -84
- package/types/daffodil-design-navbar.d.ts +34 -24
- package/types/daffodil-design-notification.d.ts +82 -67
- package/types/daffodil-design-paginator.d.ts +140 -118
- package/types/daffodil-design-progress-bar.d.ts +92 -74
- package/types/daffodil-design-radio.d.ts +183 -144
- package/types/daffodil-design-select.d.ts +207 -178
- package/types/daffodil-design-sidebar.d.ts +270 -253
- package/types/daffodil-design-spinner.d.ts +49 -36
- package/types/daffodil-design-switch.d.ts +77 -46
- package/types/daffodil-design-tabs.d.ts +248 -198
- package/types/daffodil-design-tag.d.ts +91 -56
- package/types/daffodil-design-testing.d.ts +1 -3
- package/types/daffodil-design-text-snippet.d.ts +48 -37
- package/types/daffodil-design-textarea.d.ts +88 -79
- package/types/daffodil-design-toast.d.ts +175 -183
- package/types/daffodil-design-tree.d.ts +186 -169
- package/types/daffodil-design-youtube-player.d.ts +56 -52
- package/types/daffodil-design.d.ts +614 -695
- package/button/src/button/raised/raised-theme.scss +0 -92
- package/button/src/button/underline/underline-theme.scss +0 -141
- package/fesm2022/daffodil-design-link-set.mjs +0 -160
- package/fesm2022/daffodil-design-link-set.mjs.map +0 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +0 -364
- package/fesm2022/daffodil-design-quantity-field.mjs.map +0 -1
- package/link-set/README.md +0 -86
- package/quantity-field/README.md +0 -63
- package/scss/theming/_configure-theme.scss +0 -120
- package/scss/typography/mixins/_font-weight.scss +0 -14
- package/types/daffodil-design-link-set.d.ts +0 -72
- package/types/daffodil-design-quantity-field.d.ts +0 -171
|
@@ -1,75 +1,96 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import * as i1 from
|
|
4
|
-
import { DaffDisableableDirective, DaffPrefixDirective,
|
|
5
|
-
import * as i1
|
|
6
|
-
import { NgTemplateOutlet } from
|
|
7
|
-
import { RouterLink, RouterLinkActive } from
|
|
8
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, TemplateRef, ViewEncapsulation, contentChild, contentChildren, input, output, signal, viewChild, viewChildren } from "@angular/core";
|
|
3
|
+
import * as i1$1 from "@daffodil/design";
|
|
4
|
+
import { DaffDisableableDirective, DaffPrefixDirective, DaffSelectableDirective, DaffSuffixDirective } from "@daffodil/design";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
7
|
+
import { RouterLink, RouterLinkActive } from "@angular/router";
|
|
9
8
|
let tabId = 1;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
9
|
+
var DaffTabComponent = class DaffTabComponent {
|
|
10
|
+
get disabled() {
|
|
11
|
+
return this.disabledDirective.disabled();
|
|
12
|
+
}
|
|
13
|
+
constructor(disabledDirective) {
|
|
14
|
+
this.disabledDirective = disabledDirective;
|
|
15
|
+
this.contentRef = viewChild("content", {
|
|
16
|
+
...ngDevMode ? { debugName: "contentRef" } : /* istanbul ignore next */ {},
|
|
17
|
+
read: TemplateRef
|
|
18
|
+
});
|
|
19
|
+
this.labelRef = viewChild("label", {
|
|
20
|
+
...ngDevMode ? { debugName: "labelRef" } : /* istanbul ignore next */ {},
|
|
21
|
+
read: TemplateRef
|
|
22
|
+
});
|
|
23
|
+
this.id = input("daff-tab-" + tabId, ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
|
|
24
|
+
this.panelId = "daff-tab-panel-" + tabId;
|
|
25
|
+
tabId++;
|
|
26
|
+
}
|
|
27
|
+
static {
|
|
28
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
29
|
+
minVersion: "12.0.0",
|
|
30
|
+
version: "22.2.4",
|
|
31
|
+
ngImport: i0,
|
|
32
|
+
type: DaffTabComponent,
|
|
33
|
+
deps: [{ token: i1$1.DaffDisableableDirective }],
|
|
34
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
static {
|
|
38
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
39
|
+
minVersion: "17.2.0",
|
|
40
|
+
version: "22.2.4",
|
|
41
|
+
type: DaffTabComponent,
|
|
42
|
+
isStandalone: true,
|
|
43
|
+
selector: "daff-tab",
|
|
44
|
+
inputs: { id: {
|
|
45
|
+
classPropertyName: "id",
|
|
46
|
+
publicName: "id",
|
|
47
|
+
isSignal: true,
|
|
48
|
+
isRequired: false,
|
|
49
|
+
transformFunction: null
|
|
50
|
+
} },
|
|
51
|
+
viewQueries: [{
|
|
52
|
+
propertyName: "contentRef",
|
|
53
|
+
first: true,
|
|
54
|
+
predicate: ["content"],
|
|
55
|
+
descendants: true,
|
|
56
|
+
read: TemplateRef,
|
|
57
|
+
isSignal: true
|
|
58
|
+
}, {
|
|
59
|
+
propertyName: "labelRef",
|
|
60
|
+
first: true,
|
|
61
|
+
predicate: ["label"],
|
|
62
|
+
descendants: true,
|
|
63
|
+
read: TemplateRef,
|
|
64
|
+
isSignal: true
|
|
65
|
+
}],
|
|
66
|
+
hostDirectives: [{
|
|
67
|
+
directive: i1$1.DaffDisableableDirective,
|
|
68
|
+
inputs: ["disabled", "disabled"]
|
|
69
|
+
}],
|
|
70
|
+
ngImport: i0,
|
|
71
|
+
template: `
|
|
60
72
|
<ng-template #label>
|
|
61
73
|
<ng-content select="daff-tab-label"></ng-content>
|
|
62
74
|
</ng-template>
|
|
63
75
|
<ng-template #content>
|
|
64
76
|
<ng-content select="daff-tab-panel"></ng-content>
|
|
65
77
|
</ng-template>
|
|
66
|
-
`,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
78
|
+
`,
|
|
79
|
+
isInline: true,
|
|
80
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
85
|
+
minVersion: "12.0.0",
|
|
86
|
+
version: "22.2.4",
|
|
87
|
+
ngImport: i0,
|
|
88
|
+
type: DaffTabComponent,
|
|
89
|
+
decorators: [{
|
|
90
|
+
type: Component,
|
|
91
|
+
args: [{
|
|
92
|
+
selector: "daff-tab",
|
|
93
|
+
template: `
|
|
73
94
|
<ng-template #label>
|
|
74
95
|
<ng-content select="daff-tab-label"></ng-content>
|
|
75
96
|
</ng-template>
|
|
@@ -77,368 +98,605 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
77
98
|
<ng-content select="daff-tab-panel"></ng-content>
|
|
78
99
|
</ng-template>
|
|
79
100
|
`,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
class
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
101
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
102
|
+
hostDirectives: [{
|
|
103
|
+
directive: DaffDisableableDirective,
|
|
104
|
+
inputs: ["disabled"]
|
|
105
|
+
}]
|
|
106
|
+
}]
|
|
107
|
+
}],
|
|
108
|
+
ctorParameters: () => [{ type: i1$1.DaffDisableableDirective }],
|
|
109
|
+
propDecorators: {
|
|
110
|
+
contentRef: [{
|
|
111
|
+
type: i0.ViewChild,
|
|
112
|
+
args: ["content", {
|
|
113
|
+
read: TemplateRef,
|
|
114
|
+
isSignal: true
|
|
115
|
+
}]
|
|
116
|
+
}],
|
|
117
|
+
labelRef: [{
|
|
118
|
+
type: i0.ViewChild,
|
|
119
|
+
args: ["label", {
|
|
120
|
+
read: TemplateRef,
|
|
121
|
+
isSignal: true
|
|
122
|
+
}]
|
|
123
|
+
}],
|
|
124
|
+
id: [{
|
|
125
|
+
type: i0.Input,
|
|
126
|
+
args: [{
|
|
127
|
+
isSignal: true,
|
|
128
|
+
alias: "id",
|
|
129
|
+
required: false
|
|
130
|
+
}]
|
|
131
|
+
}]
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
var DaffTabLabelComponent = class DaffTabLabelComponent {
|
|
135
|
+
constructor() {
|
|
136
|
+
this._prefix = contentChild(DaffPrefixDirective, ...ngDevMode ? [{ debugName: "_prefix" }] : /* istanbul ignore next */ []);
|
|
137
|
+
this._suffix = contentChild(DaffSuffixDirective, ...ngDevMode ? [{ debugName: "_suffix" }] : /* istanbul ignore next */ []);
|
|
138
|
+
}
|
|
139
|
+
static {
|
|
140
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
141
|
+
minVersion: "12.0.0",
|
|
142
|
+
version: "22.2.4",
|
|
143
|
+
ngImport: i0,
|
|
144
|
+
type: DaffTabLabelComponent,
|
|
145
|
+
deps: [],
|
|
146
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
static {
|
|
150
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
151
|
+
minVersion: "17.0.0",
|
|
152
|
+
version: "22.2.4",
|
|
153
|
+
type: DaffTabLabelComponent,
|
|
154
|
+
isStandalone: true,
|
|
155
|
+
selector: "daff-tab-label",
|
|
156
|
+
queries: [{
|
|
157
|
+
propertyName: "_prefix",
|
|
158
|
+
first: true,
|
|
159
|
+
predicate: DaffPrefixDirective,
|
|
160
|
+
descendants: true,
|
|
161
|
+
isSignal: true
|
|
162
|
+
}, {
|
|
163
|
+
propertyName: "_suffix",
|
|
164
|
+
first: true,
|
|
165
|
+
predicate: DaffSuffixDirective,
|
|
166
|
+
descendants: true,
|
|
167
|
+
isSignal: true
|
|
168
|
+
}],
|
|
169
|
+
ngImport: i0,
|
|
170
|
+
template: "@if (_prefix()) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-tab-label__content\">\n <ng-content></ng-content>\n</div>\n@if (_suffix()) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}",
|
|
171
|
+
styles: [":host{display:flex;justify-content:center;align-items:center;gap:.5rem}.daff-tab-label__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:15rem}\n"],
|
|
172
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
177
|
+
minVersion: "12.0.0",
|
|
178
|
+
version: "22.2.4",
|
|
179
|
+
ngImport: i0,
|
|
180
|
+
type: DaffTabLabelComponent,
|
|
181
|
+
decorators: [{
|
|
182
|
+
type: Component,
|
|
183
|
+
args: [{
|
|
184
|
+
selector: "daff-tab-label",
|
|
185
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
186
|
+
imports: [DaffPrefixDirective, DaffSuffixDirective],
|
|
187
|
+
template: "@if (_prefix()) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-tab-label__content\">\n <ng-content></ng-content>\n</div>\n@if (_suffix()) {\n <ng-content select=\"[daffSuffix]\"></ng-content>\n}",
|
|
188
|
+
styles: [":host{display:flex;justify-content:center;align-items:center;gap:.5rem}.daff-tab-label__content{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:15rem}\n"]
|
|
189
|
+
}]
|
|
190
|
+
}],
|
|
191
|
+
propDecorators: {
|
|
192
|
+
_prefix: [{
|
|
193
|
+
type: i0.ContentChild,
|
|
194
|
+
args: [i0.forwardRef(() => DaffPrefixDirective), { isSignal: true }]
|
|
195
|
+
}],
|
|
196
|
+
_suffix: [{
|
|
197
|
+
type: i0.ContentChild,
|
|
198
|
+
args: [i0.forwardRef(() => DaffSuffixDirective), { isSignal: true }]
|
|
199
|
+
}]
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
var DaffTabPanelComponent = class DaffTabPanelComponent {
|
|
203
|
+
get tabPanelId() {
|
|
204
|
+
return this._id;
|
|
205
|
+
}
|
|
206
|
+
get ariaLabelledBy() {
|
|
207
|
+
return this._ariaLabelledBy;
|
|
208
|
+
}
|
|
209
|
+
constructor(tab) {
|
|
210
|
+
this.tab = tab;
|
|
211
|
+
this._id = "";
|
|
212
|
+
this._ariaLabelledBy = "";
|
|
213
|
+
this._ariaLabelledBy = this.tab.id();
|
|
214
|
+
this._id = this.tab.panelId;
|
|
215
|
+
}
|
|
216
|
+
static {
|
|
217
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
218
|
+
minVersion: "12.0.0",
|
|
219
|
+
version: "22.2.4",
|
|
220
|
+
ngImport: i0,
|
|
221
|
+
type: DaffTabPanelComponent,
|
|
222
|
+
deps: [{ token: DaffTabComponent }],
|
|
223
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
static {
|
|
227
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
228
|
+
minVersion: "14.0.0",
|
|
229
|
+
version: "22.2.4",
|
|
230
|
+
type: DaffTabPanelComponent,
|
|
231
|
+
isStandalone: true,
|
|
232
|
+
selector: "daff-tab-panel",
|
|
233
|
+
host: {
|
|
234
|
+
attributes: {
|
|
235
|
+
"role": "tabpanel",
|
|
236
|
+
"tabindex": "0"
|
|
237
|
+
},
|
|
238
|
+
properties: {
|
|
239
|
+
"attr.id": "tabPanelId",
|
|
240
|
+
"attr.aria-labelledby": "ariaLabelledBy"
|
|
241
|
+
},
|
|
242
|
+
classAttribute: "daff-tab-panel"
|
|
243
|
+
},
|
|
244
|
+
ngImport: i0,
|
|
245
|
+
template: `<ng-content></ng-content>`,
|
|
246
|
+
isInline: true,
|
|
247
|
+
styles: [":host(.daff-tab-panel){display:block;padding:1rem 0}\n"],
|
|
248
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
253
|
+
minVersion: "12.0.0",
|
|
254
|
+
version: "22.2.4",
|
|
255
|
+
ngImport: i0,
|
|
256
|
+
type: DaffTabPanelComponent,
|
|
257
|
+
decorators: [{
|
|
258
|
+
type: Component,
|
|
259
|
+
args: [{
|
|
260
|
+
selector: "daff-tab-panel",
|
|
261
|
+
template: `<ng-content></ng-content>`,
|
|
262
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
263
|
+
host: {
|
|
264
|
+
class: "daff-tab-panel",
|
|
265
|
+
role: "tabpanel",
|
|
266
|
+
tabindex: "0",
|
|
267
|
+
"[attr.id]": "tabPanelId",
|
|
268
|
+
"[attr.aria-labelledby]": "ariaLabelledBy"
|
|
269
|
+
},
|
|
270
|
+
styles: [":host(.daff-tab-panel){display:block;padding:1rem 0}\n"]
|
|
271
|
+
}]
|
|
272
|
+
}],
|
|
273
|
+
ctorParameters: () => [{ type: DaffTabComponent }]
|
|
274
|
+
});
|
|
275
|
+
var DaffTabActivatorComponent = class DaffTabActivatorComponent {
|
|
276
|
+
get ariaSelected() {
|
|
277
|
+
return this.selectableDirective.selected ? true : false;
|
|
278
|
+
}
|
|
279
|
+
get tabIndex() {
|
|
280
|
+
return this.selectableDirective.selected ? "0" : "-1";
|
|
281
|
+
}
|
|
282
|
+
constructor(el, selectableDirective) {
|
|
283
|
+
this.el = el;
|
|
284
|
+
this.selectableDirective = selectableDirective;
|
|
285
|
+
this.tabActivatorId = input("", ...ngDevMode ? [{ debugName: "tabActivatorId" }] : /* istanbul ignore next */ []);
|
|
286
|
+
this.panelId = input("", ...ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []);
|
|
287
|
+
}
|
|
288
|
+
focus() {
|
|
289
|
+
this.el.nativeElement.focus();
|
|
290
|
+
}
|
|
291
|
+
static {
|
|
292
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
293
|
+
minVersion: "12.0.0",
|
|
294
|
+
version: "22.2.4",
|
|
295
|
+
ngImport: i0,
|
|
296
|
+
type: DaffTabActivatorComponent,
|
|
297
|
+
deps: [{ token: i0.ElementRef }, { token: i1$1.DaffSelectableDirective }],
|
|
298
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
static {
|
|
302
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
303
|
+
minVersion: "17.1.0",
|
|
304
|
+
version: "22.2.4",
|
|
305
|
+
type: DaffTabActivatorComponent,
|
|
306
|
+
isStandalone: true,
|
|
307
|
+
selector: "button[daff-tab-activator],a[daff-tab-activator]",
|
|
308
|
+
inputs: {
|
|
309
|
+
tabActivatorId: {
|
|
310
|
+
classPropertyName: "tabActivatorId",
|
|
311
|
+
publicName: "tabActivatorId",
|
|
312
|
+
isSignal: true,
|
|
313
|
+
isRequired: false,
|
|
314
|
+
transformFunction: null
|
|
315
|
+
},
|
|
316
|
+
panelId: {
|
|
317
|
+
classPropertyName: "panelId",
|
|
318
|
+
publicName: "panelId",
|
|
319
|
+
isSignal: true,
|
|
320
|
+
isRequired: false,
|
|
321
|
+
transformFunction: null
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
host: {
|
|
325
|
+
attributes: { "role": "tab" },
|
|
326
|
+
properties: {
|
|
327
|
+
"attr.aria-selected": "ariaSelected",
|
|
328
|
+
"attr.tabindex": "tabIndex",
|
|
329
|
+
"attr.id": "tabActivatorId()",
|
|
330
|
+
"attr.aria-controls": "panelId()"
|
|
331
|
+
},
|
|
332
|
+
classAttribute: "daff-tab-activator"
|
|
333
|
+
},
|
|
334
|
+
hostDirectives: [{
|
|
335
|
+
directive: i1$1.DaffSelectableDirective,
|
|
336
|
+
inputs: ["selected", "selected"]
|
|
337
|
+
}],
|
|
338
|
+
ngImport: i0,
|
|
339
|
+
template: `<ng-content></ng-content>`,
|
|
340
|
+
isInline: true,
|
|
341
|
+
styles: [".daff-tab-activator{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;appearance:none;background:none;border:none;font-size:1rem;line-height:1.5rem;font-weight:500;height:3rem;margin:0;min-width:8rem;padding:.5rem 1.5rem;text-decoration:none;z-index:2}.daff-tab-activator[disabled]{cursor:not-allowed;opacity:.6}\n"],
|
|
342
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
343
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
348
|
+
minVersion: "12.0.0",
|
|
349
|
+
version: "22.2.4",
|
|
350
|
+
ngImport: i0,
|
|
351
|
+
type: DaffTabActivatorComponent,
|
|
352
|
+
decorators: [{
|
|
353
|
+
type: Component,
|
|
354
|
+
args: [{
|
|
355
|
+
selector: "button[daff-tab-activator],a[daff-tab-activator]",
|
|
356
|
+
template: `<ng-content></ng-content>`,
|
|
357
|
+
hostDirectives: [{
|
|
358
|
+
directive: DaffSelectableDirective,
|
|
359
|
+
inputs: ["selected"]
|
|
360
|
+
}],
|
|
361
|
+
host: {
|
|
362
|
+
class: "daff-tab-activator",
|
|
363
|
+
role: "tab",
|
|
364
|
+
"[attr.aria-selected]": "ariaSelected",
|
|
365
|
+
"[attr.tabindex]": "tabIndex",
|
|
366
|
+
"[attr.id]": "tabActivatorId()",
|
|
367
|
+
"[attr.aria-controls]": "panelId()"
|
|
368
|
+
},
|
|
369
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
370
|
+
encapsulation: ViewEncapsulation.None,
|
|
371
|
+
styles: [".daff-tab-activator{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;appearance:none;background:none;border:none;font-size:1rem;line-height:1.5rem;font-weight:500;height:3rem;margin:0;min-width:8rem;padding:.5rem 1.5rem;text-decoration:none;z-index:2}.daff-tab-activator[disabled]{cursor:not-allowed;opacity:.6}\n"]
|
|
372
|
+
}]
|
|
373
|
+
}],
|
|
374
|
+
ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.DaffSelectableDirective }],
|
|
375
|
+
propDecorators: {
|
|
376
|
+
tabActivatorId: [{
|
|
377
|
+
type: i0.Input,
|
|
378
|
+
args: [{
|
|
379
|
+
isSignal: true,
|
|
380
|
+
alias: "tabActivatorId",
|
|
381
|
+
required: false
|
|
382
|
+
}]
|
|
383
|
+
}],
|
|
384
|
+
panelId: [{
|
|
385
|
+
type: i0.Input,
|
|
386
|
+
args: [{
|
|
387
|
+
isSignal: true,
|
|
388
|
+
alias: "panelId",
|
|
389
|
+
required: false
|
|
390
|
+
}]
|
|
391
|
+
}]
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
var DaffTabsComponent = class DaffTabsComponent {
|
|
395
|
+
get currentPath() {
|
|
396
|
+
return this.location.path();
|
|
397
|
+
}
|
|
398
|
+
constructor(cdRef, location) {
|
|
399
|
+
this.cdRef = cdRef;
|
|
400
|
+
this.location = location;
|
|
401
|
+
this.selectedTab = signal(void 0, ...ngDevMode ? [{ debugName: "selectedTab" }] : /* istanbul ignore next */ []);
|
|
402
|
+
this.initiallySelected = input(null, ...ngDevMode ? [{ debugName: "initiallySelected" }] : /* istanbul ignore next */ []);
|
|
403
|
+
this.ariaLabel = input("", {
|
|
404
|
+
...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
|
|
405
|
+
alias: "aria-label"
|
|
406
|
+
});
|
|
407
|
+
this.linkMode = input(false, ...ngDevMode ? [{ debugName: "linkMode" }] : /* istanbul ignore next */ []);
|
|
408
|
+
this.url = input(...ngDevMode ? [void 0, { debugName: "url" }] : /* istanbul ignore next */ []);
|
|
409
|
+
this.queryParam = input("tab", ...ngDevMode ? [{ debugName: "queryParam" }] : /* istanbul ignore next */ []);
|
|
410
|
+
this.tabChange = output();
|
|
411
|
+
this._labels = contentChildren(DaffTabLabelComponent, {
|
|
412
|
+
...ngDevMode ? { debugName: "_labels" } : /* istanbul ignore next */ {},
|
|
413
|
+
descendants: true
|
|
414
|
+
});
|
|
415
|
+
this._tabs = contentChildren(DaffTabComponent, ...ngDevMode ? [{ debugName: "_tabs" }] : /* istanbul ignore next */ []);
|
|
416
|
+
this._tabActivators = viewChildren(DaffTabActivatorComponent, ...ngDevMode ? [{ debugName: "_tabActivators" }] : /* istanbul ignore next */ []);
|
|
417
|
+
}
|
|
418
|
+
reset() {
|
|
419
|
+
if (this.initiallySelected()) this.selectedTab.set(this.initiallySelected());
|
|
420
|
+
if (!this.selectedTab()) this.selectedTab.set(this._tabs()[0].id());
|
|
421
|
+
}
|
|
422
|
+
ngOnInit() {
|
|
423
|
+
this.location.onUrlChange(() => {
|
|
424
|
+
if (this.linkMode() && !this.location.isCurrentPathEqualTo(this.url(), `${this.queryParam()}=${this.selectedTab()}`)) {
|
|
425
|
+
this.selectedTab.set(null);
|
|
426
|
+
this.reset();
|
|
427
|
+
this.tabChange.emit(this.selectedTab());
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
ngAfterContentInit() {
|
|
432
|
+
this.reset();
|
|
433
|
+
}
|
|
434
|
+
select(tabId) {
|
|
435
|
+
const tabActivator = this._tabActivators().find((el) => el.tabActivatorId() === tabId);
|
|
436
|
+
if (!tabActivator) {
|
|
437
|
+
console.warn(`The tab '${tabId}' was not able to be selected because it does not exist. Check the id on your <daff-tab>s.`);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
this.tabChange.emit(tabId);
|
|
441
|
+
this.selectedTab.set(tabId);
|
|
442
|
+
this.cdRef.markForCheck();
|
|
443
|
+
tabActivator.focus();
|
|
444
|
+
}
|
|
445
|
+
navigateTabs(offset) {
|
|
446
|
+
const array = this._tabs();
|
|
447
|
+
let selectedIndex = array.findIndex((el) => el.id() === this.selectedTab());
|
|
448
|
+
const startingIndex = selectedIndex;
|
|
449
|
+
let newIndex;
|
|
450
|
+
do {
|
|
451
|
+
newIndex = (selectedIndex + offset + array.length) % array.length;
|
|
452
|
+
selectedIndex = newIndex;
|
|
453
|
+
} while (array[newIndex].disabled && selectedIndex !== startingIndex);
|
|
454
|
+
this.select(array[newIndex].id());
|
|
455
|
+
}
|
|
456
|
+
_buildQueryParams(tab) {
|
|
457
|
+
return { [this.queryParam()]: tab };
|
|
458
|
+
}
|
|
459
|
+
previous() {
|
|
460
|
+
this.navigateTabs(-1);
|
|
461
|
+
}
|
|
462
|
+
next() {
|
|
463
|
+
this.navigateTabs(1);
|
|
464
|
+
}
|
|
465
|
+
selectFirst(event) {
|
|
466
|
+
event.preventDefault();
|
|
467
|
+
this.select(this._tabs()[0].id());
|
|
468
|
+
}
|
|
469
|
+
selectLast(event) {
|
|
470
|
+
event.preventDefault();
|
|
471
|
+
const array = this._tabs();
|
|
472
|
+
this.select(array[array.length - 1].id());
|
|
473
|
+
}
|
|
474
|
+
static {
|
|
475
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
476
|
+
minVersion: "12.0.0",
|
|
477
|
+
version: "22.2.4",
|
|
478
|
+
ngImport: i0,
|
|
479
|
+
type: DaffTabsComponent,
|
|
480
|
+
deps: [{ token: i0.ChangeDetectorRef }, { token: i1.Location }],
|
|
481
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
static {
|
|
485
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
486
|
+
minVersion: "17.0.0",
|
|
487
|
+
version: "22.2.4",
|
|
488
|
+
type: DaffTabsComponent,
|
|
489
|
+
isStandalone: true,
|
|
490
|
+
selector: "daff-tabs",
|
|
491
|
+
inputs: {
|
|
492
|
+
initiallySelected: {
|
|
493
|
+
classPropertyName: "initiallySelected",
|
|
494
|
+
publicName: "initiallySelected",
|
|
495
|
+
isSignal: true,
|
|
496
|
+
isRequired: false,
|
|
497
|
+
transformFunction: null
|
|
498
|
+
},
|
|
499
|
+
ariaLabel: {
|
|
500
|
+
classPropertyName: "ariaLabel",
|
|
501
|
+
publicName: "aria-label",
|
|
502
|
+
isSignal: true,
|
|
503
|
+
isRequired: false,
|
|
504
|
+
transformFunction: null
|
|
505
|
+
},
|
|
506
|
+
linkMode: {
|
|
507
|
+
classPropertyName: "linkMode",
|
|
508
|
+
publicName: "linkMode",
|
|
509
|
+
isSignal: true,
|
|
510
|
+
isRequired: false,
|
|
511
|
+
transformFunction: null
|
|
512
|
+
},
|
|
513
|
+
url: {
|
|
514
|
+
classPropertyName: "url",
|
|
515
|
+
publicName: "url",
|
|
516
|
+
isSignal: true,
|
|
517
|
+
isRequired: false,
|
|
518
|
+
transformFunction: null
|
|
519
|
+
},
|
|
520
|
+
queryParam: {
|
|
521
|
+
classPropertyName: "queryParam",
|
|
522
|
+
publicName: "queryParam",
|
|
523
|
+
isSignal: true,
|
|
524
|
+
isRequired: false,
|
|
525
|
+
transformFunction: null
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
outputs: { tabChange: "tabChange" },
|
|
529
|
+
host: {
|
|
530
|
+
properties: { "attr.aria-label": "null" },
|
|
531
|
+
classAttribute: "daff-tabs"
|
|
532
|
+
},
|
|
533
|
+
queries: [{
|
|
534
|
+
propertyName: "_labels",
|
|
535
|
+
predicate: DaffTabLabelComponent,
|
|
536
|
+
descendants: true,
|
|
537
|
+
isSignal: true
|
|
538
|
+
}, {
|
|
539
|
+
propertyName: "_tabs",
|
|
540
|
+
predicate: DaffTabComponent,
|
|
541
|
+
isSignal: true
|
|
542
|
+
}],
|
|
543
|
+
viewQueries: [{
|
|
544
|
+
propertyName: "_tabActivators",
|
|
545
|
+
predicate: DaffTabActivatorComponent,
|
|
546
|
+
descendants: true,
|
|
547
|
+
isSignal: true
|
|
548
|
+
}],
|
|
549
|
+
ngImport: i0,
|
|
550
|
+
template: "<div class=\"daff-tabs__tab-list\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel()\"\n (keydown.home)=\"selectFirst($event)\"\n (keydown.end)=\"selectLast($event)\">\n @for (tab of _tabs(); track tab) {\n @if (linkMode() && tab.disabled) {\n <button daff-tab-activator routerLinkActive\n [selected]=\"tab.id() === selectedTab()\"\n [panelId]=\"tab.panelId\"\n [disabled]=\"tab.disabled\"\n [tabActivatorId]=\"tab.id()\"\n (keydown.arrowright)=\"next()\"\n (keydown.arrowleft)=\"previous()\">\n <ng-container *ngTemplateOutlet=\"tab.labelRef()\"></ng-container>\n </button>\n } @else if (linkMode()) {\n <a daff-tab-activator routerLinkActive\n class=\"daff-ae daff_tabs__link\"\n [selected]=\"tab.id() === selectedTab()\"\n [routerLink]=\"url() || currentPath\"\n queryParamsHandling=\"merge\"\n [queryParams]=\"_buildQueryParams(tab.id())\"\n [panelId]=\"tab.panelId\"\n [tabActivatorId]=\"tab.id()\"\n (keydown.arrowright)=\"next()\"\n (keydown.arrowleft)=\"previous()\"\n (isActiveChange)=\"$event && select(tab.id())\">\n <ng-container *ngTemplateOutlet=\"tab.labelRef()\"></ng-container>\n </a>\n } @else {\n <button daff-tab-activator\n [selected]=\"tab.id() === selectedTab()\"\n (click)=\"select(tab.id())\"\n [panelId]=\"tab.panelId\"\n [disabled]=\"tab.disabled\"\n [tabActivatorId]=\"tab.id()\"\n (keydown.arrowright)=\"next()\"\n (keydown.arrowleft)=\"previous()\">\n <ng-container *ngTemplateOutlet=\"tab.labelRef()\"></ng-container>\n </button>\n }\n }\n</div>\n\n@for (tab of _tabs(); track tab) {\n @if(tab.id() === selectedTab() ) {\n <ng-container *ngTemplateOutlet=\"tab.contentRef()\"></ng-container>\n }\n}\n",
|
|
551
|
+
styles: [":host(.daff-tabs){max-width:100%}.daff-tabs{display:block}.daff-tabs .daff-tabs__tab-list{display:flex;overflow-x:auto;scrollbar-width:thin;position:relative}.daff-tabs .daff-tabs__tab-list:after{content:\"\";position:absolute;height:.125rem;width:100%;bottom:0}\n"],
|
|
552
|
+
dependencies: [
|
|
553
|
+
{
|
|
554
|
+
kind: "directive",
|
|
555
|
+
type: NgTemplateOutlet,
|
|
556
|
+
selector: "[ngTemplateOutlet]",
|
|
557
|
+
inputs: [
|
|
558
|
+
"ngTemplateOutletContext",
|
|
559
|
+
"ngTemplateOutlet",
|
|
560
|
+
"ngTemplateOutletInjector"
|
|
561
|
+
]
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
kind: "directive",
|
|
565
|
+
type: RouterLink,
|
|
566
|
+
selector: "[routerLink]",
|
|
567
|
+
inputs: [
|
|
568
|
+
"target",
|
|
569
|
+
"queryParams",
|
|
570
|
+
"fragment",
|
|
571
|
+
"queryParamsHandling",
|
|
572
|
+
"state",
|
|
573
|
+
"info",
|
|
574
|
+
"relativeTo",
|
|
575
|
+
"preserveFragment",
|
|
576
|
+
"skipLocationChange",
|
|
577
|
+
"replaceUrl",
|
|
578
|
+
"browserUrl",
|
|
579
|
+
"routerLink"
|
|
580
|
+
]
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
kind: "directive",
|
|
584
|
+
type: RouterLinkActive,
|
|
585
|
+
selector: "[routerLinkActive]",
|
|
586
|
+
inputs: [
|
|
587
|
+
"routerLinkActiveOptions",
|
|
588
|
+
"ariaCurrentWhenActive",
|
|
589
|
+
"routerLinkActive"
|
|
590
|
+
],
|
|
591
|
+
outputs: ["isActiveChange"],
|
|
592
|
+
exportAs: ["routerLinkActive"]
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
kind: "component",
|
|
596
|
+
type: DaffTabActivatorComponent,
|
|
597
|
+
selector: "button[daff-tab-activator],a[daff-tab-activator]",
|
|
598
|
+
inputs: ["tabActivatorId", "panelId"]
|
|
599
|
+
}
|
|
600
|
+
],
|
|
601
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
602
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
607
|
+
minVersion: "12.0.0",
|
|
608
|
+
version: "22.2.4",
|
|
609
|
+
ngImport: i0,
|
|
610
|
+
type: DaffTabsComponent,
|
|
611
|
+
decorators: [{
|
|
612
|
+
type: Component,
|
|
613
|
+
args: [{
|
|
614
|
+
selector: "daff-tabs",
|
|
615
|
+
encapsulation: ViewEncapsulation.None,
|
|
616
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
617
|
+
host: {
|
|
618
|
+
class: "daff-tabs",
|
|
619
|
+
"[attr.aria-label]": "null"
|
|
620
|
+
},
|
|
621
|
+
imports: [
|
|
622
|
+
NgTemplateOutlet,
|
|
623
|
+
RouterLink,
|
|
624
|
+
RouterLinkActive,
|
|
625
|
+
DaffTabActivatorComponent
|
|
626
|
+
],
|
|
627
|
+
template: "<div class=\"daff-tabs__tab-list\"\n role=\"tablist\"\n [attr.aria-label]=\"ariaLabel()\"\n (keydown.home)=\"selectFirst($event)\"\n (keydown.end)=\"selectLast($event)\">\n @for (tab of _tabs(); track tab) {\n @if (linkMode() && tab.disabled) {\n <button daff-tab-activator routerLinkActive\n [selected]=\"tab.id() === selectedTab()\"\n [panelId]=\"tab.panelId\"\n [disabled]=\"tab.disabled\"\n [tabActivatorId]=\"tab.id()\"\n (keydown.arrowright)=\"next()\"\n (keydown.arrowleft)=\"previous()\">\n <ng-container *ngTemplateOutlet=\"tab.labelRef()\"></ng-container>\n </button>\n } @else if (linkMode()) {\n <a daff-tab-activator routerLinkActive\n class=\"daff-ae daff_tabs__link\"\n [selected]=\"tab.id() === selectedTab()\"\n [routerLink]=\"url() || currentPath\"\n queryParamsHandling=\"merge\"\n [queryParams]=\"_buildQueryParams(tab.id())\"\n [panelId]=\"tab.panelId\"\n [tabActivatorId]=\"tab.id()\"\n (keydown.arrowright)=\"next()\"\n (keydown.arrowleft)=\"previous()\"\n (isActiveChange)=\"$event && select(tab.id())\">\n <ng-container *ngTemplateOutlet=\"tab.labelRef()\"></ng-container>\n </a>\n } @else {\n <button daff-tab-activator\n [selected]=\"tab.id() === selectedTab()\"\n (click)=\"select(tab.id())\"\n [panelId]=\"tab.panelId\"\n [disabled]=\"tab.disabled\"\n [tabActivatorId]=\"tab.id()\"\n (keydown.arrowright)=\"next()\"\n (keydown.arrowleft)=\"previous()\">\n <ng-container *ngTemplateOutlet=\"tab.labelRef()\"></ng-container>\n </button>\n }\n }\n</div>\n\n@for (tab of _tabs(); track tab) {\n @if(tab.id() === selectedTab() ) {\n <ng-container *ngTemplateOutlet=\"tab.contentRef()\"></ng-container>\n }\n}\n",
|
|
628
|
+
styles: [":host(.daff-tabs){max-width:100%}.daff-tabs{display:block}.daff-tabs .daff-tabs__tab-list{display:flex;overflow-x:auto;scrollbar-width:thin;position:relative}.daff-tabs .daff-tabs__tab-list:after{content:\"\";position:absolute;height:.125rem;width:100%;bottom:0}\n"]
|
|
629
|
+
}]
|
|
630
|
+
}],
|
|
631
|
+
ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.Location }],
|
|
632
|
+
propDecorators: {
|
|
633
|
+
initiallySelected: [{
|
|
634
|
+
type: i0.Input,
|
|
635
|
+
args: [{
|
|
636
|
+
isSignal: true,
|
|
637
|
+
alias: "initiallySelected",
|
|
638
|
+
required: false
|
|
639
|
+
}]
|
|
640
|
+
}],
|
|
641
|
+
ariaLabel: [{
|
|
642
|
+
type: i0.Input,
|
|
643
|
+
args: [{
|
|
644
|
+
isSignal: true,
|
|
645
|
+
alias: "aria-label",
|
|
646
|
+
required: false
|
|
647
|
+
}]
|
|
648
|
+
}],
|
|
649
|
+
linkMode: [{
|
|
650
|
+
type: i0.Input,
|
|
651
|
+
args: [{
|
|
652
|
+
isSignal: true,
|
|
653
|
+
alias: "linkMode",
|
|
654
|
+
required: false
|
|
655
|
+
}]
|
|
656
|
+
}],
|
|
657
|
+
url: [{
|
|
658
|
+
type: i0.Input,
|
|
659
|
+
args: [{
|
|
660
|
+
isSignal: true,
|
|
661
|
+
alias: "url",
|
|
662
|
+
required: false
|
|
663
|
+
}]
|
|
664
|
+
}],
|
|
665
|
+
queryParam: [{
|
|
666
|
+
type: i0.Input,
|
|
667
|
+
args: [{
|
|
668
|
+
isSignal: true,
|
|
669
|
+
alias: "queryParam",
|
|
670
|
+
required: false
|
|
671
|
+
}]
|
|
672
|
+
}],
|
|
673
|
+
tabChange: [{
|
|
674
|
+
type: i0.Output,
|
|
675
|
+
args: ["tabChange"]
|
|
676
|
+
}],
|
|
677
|
+
_labels: [{
|
|
678
|
+
type: i0.ContentChildren,
|
|
679
|
+
args: [i0.forwardRef(() => DaffTabLabelComponent), {
|
|
680
|
+
descendants: true,
|
|
681
|
+
isSignal: true
|
|
682
|
+
}]
|
|
683
|
+
}],
|
|
684
|
+
_tabs: [{
|
|
685
|
+
type: i0.ContentChildren,
|
|
686
|
+
args: [i0.forwardRef(() => DaffTabComponent), { isSignal: true }]
|
|
687
|
+
}],
|
|
688
|
+
_tabActivators: [{
|
|
689
|
+
type: i0.ViewChildren,
|
|
690
|
+
args: [i0.forwardRef(() => DaffTabActivatorComponent), { isSignal: true }]
|
|
691
|
+
}]
|
|
692
|
+
}
|
|
693
|
+
});
|
|
432
694
|
const DAFF_TABS_COMPONENTS = [
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
695
|
+
DaffTabsComponent,
|
|
696
|
+
DaffTabLabelComponent,
|
|
697
|
+
DaffTabPanelComponent,
|
|
698
|
+
DaffTabComponent
|
|
437
699
|
];
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* Generated bundle index. Do not edit.
|
|
441
|
-
*/
|
|
442
|
-
|
|
443
700
|
export { DAFF_TABS_COMPONENTS, DaffTabComponent, DaffTabLabelComponent, DaffTabPanelComponent, DaffTabsComponent };
|
|
444
|
-
|
|
701
|
+
|
|
702
|
+
//# sourceMappingURL=daffodil-design-tabs.mjs.map
|