@daffodil/design 0.94.1 → 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,341 +1,579 @@
|
|
|
1
|
-
import { DOCUMENT, isPlatformBrowser
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { FaIconComponent } from
|
|
5
|
-
import {
|
|
6
|
-
import * as i1 from
|
|
7
|
-
import { DAFF_ICON_BUTTON_COMPONENTS } from
|
|
8
|
-
import { Router, RouterLink } from
|
|
9
|
-
import * as i1
|
|
10
|
-
import { DaffArticleEncapsulatedDirective } from
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1
|
+
import { CommonModule, DOCUMENT, isPlatformBrowser } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, Injectable, NgModule, NgZone, PLATFORM_ID, ViewContainerRef, ViewEncapsulation, afterEveryRender, inject, input, signal } from "@angular/core";
|
|
4
|
+
import { FaIconComponent } from "@fortawesome/angular-fontawesome";
|
|
5
|
+
import { faCheck, faCopy, faLink } from "@fortawesome/free-solid-svg-icons";
|
|
6
|
+
import * as i1$1 from "@daffodil/design/button";
|
|
7
|
+
import { DAFF_ICON_BUTTON_COMPONENTS } from "@daffodil/design/button";
|
|
8
|
+
import { Router, RouterLink } from "@angular/router";
|
|
9
|
+
import * as i1 from "@daffodil/design";
|
|
10
|
+
import { DaffArticleEncapsulatedDirective } from "@daffodil/design";
|
|
11
|
+
var DaffArticleCopyButtonComponent = class DaffArticleCopyButtonComponent {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.content = input.required(...ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []);
|
|
14
|
+
this.copied = signal(false, ...ngDevMode ? [{ debugName: "copied" }] : /* istanbul ignore next */ []);
|
|
15
|
+
this.faCopy = faCopy;
|
|
16
|
+
this.faCheck = faCheck;
|
|
17
|
+
this._ngZone = inject(NgZone);
|
|
18
|
+
}
|
|
19
|
+
ngOnDestroy() {
|
|
20
|
+
if (this.timeoutId) clearTimeout(this.timeoutId);
|
|
21
|
+
}
|
|
22
|
+
async copyToClipboard() {
|
|
23
|
+
try {
|
|
24
|
+
await navigator.clipboard.writeText(this.content());
|
|
25
|
+
this.copied.set(true);
|
|
26
|
+
clearTimeout(this.timeoutId);
|
|
27
|
+
this._ngZone.runOutsideAngular(() => {
|
|
28
|
+
this.timeoutId = setTimeout(() => {
|
|
29
|
+
this._ngZone.run(() => this.copied.set(false));
|
|
30
|
+
}, 1500);
|
|
31
|
+
});
|
|
32
|
+
} catch (err) {
|
|
33
|
+
console.error("Failed to copy text: ", err);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
get ariaLabel() {
|
|
37
|
+
return this.copied() ? "Copied to clipboard" : "Copy to clipboard";
|
|
38
|
+
}
|
|
39
|
+
static {
|
|
40
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
41
|
+
minVersion: "12.0.0",
|
|
42
|
+
version: "22.2.4",
|
|
43
|
+
ngImport: i0,
|
|
44
|
+
type: DaffArticleCopyButtonComponent,
|
|
45
|
+
deps: [],
|
|
46
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
static {
|
|
50
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
51
|
+
minVersion: "17.0.0",
|
|
52
|
+
version: "22.2.4",
|
|
53
|
+
type: DaffArticleCopyButtonComponent,
|
|
54
|
+
isStandalone: true,
|
|
55
|
+
selector: "daff-article-copy-button",
|
|
56
|
+
inputs: { content: {
|
|
57
|
+
classPropertyName: "content",
|
|
58
|
+
publicName: "content",
|
|
59
|
+
isSignal: true,
|
|
60
|
+
isRequired: true,
|
|
61
|
+
transformFunction: null
|
|
62
|
+
} },
|
|
63
|
+
ngImport: i0,
|
|
64
|
+
template: "<button\n daff-icon-button\n class=\"daff-article__copy-button\"\n size=\"sm\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"copyToClipboard()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\" />\n } @else {\n <fa-icon [icon]=\"faCopy\" />\n }\n</button>\n",
|
|
65
|
+
styles: [":host{display:block;position:absolute;top:.25rem;right:.25rem;z-index:1}\n"],
|
|
66
|
+
dependencies: [{
|
|
67
|
+
kind: "component",
|
|
68
|
+
type: FaIconComponent,
|
|
69
|
+
selector: "fa-icon",
|
|
70
|
+
inputs: [
|
|
71
|
+
"icon",
|
|
72
|
+
"title",
|
|
73
|
+
"animation",
|
|
74
|
+
"mask",
|
|
75
|
+
"flip",
|
|
76
|
+
"size",
|
|
77
|
+
"pull",
|
|
78
|
+
"border",
|
|
79
|
+
"inverse",
|
|
80
|
+
"symbol",
|
|
81
|
+
"rotate",
|
|
82
|
+
"fixedWidth",
|
|
83
|
+
"transform",
|
|
84
|
+
"a11yRole"
|
|
85
|
+
],
|
|
86
|
+
outputs: [
|
|
87
|
+
"iconChange",
|
|
88
|
+
"titleChange",
|
|
89
|
+
"animationChange",
|
|
90
|
+
"maskChange",
|
|
91
|
+
"flipChange",
|
|
92
|
+
"sizeChange",
|
|
93
|
+
"pullChange",
|
|
94
|
+
"borderChange",
|
|
95
|
+
"inverseChange",
|
|
96
|
+
"symbolChange",
|
|
97
|
+
"rotateChange",
|
|
98
|
+
"fixedWidthChange",
|
|
99
|
+
"transformChange",
|
|
100
|
+
"a11yRoleChange"
|
|
101
|
+
]
|
|
102
|
+
}, {
|
|
103
|
+
kind: "component",
|
|
104
|
+
type: i1$1.DaffIconButtonComponent,
|
|
105
|
+
selector: "button[daff-icon-button],a[daff-icon-button]"
|
|
106
|
+
}],
|
|
107
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
112
|
+
minVersion: "12.0.0",
|
|
113
|
+
version: "22.2.4",
|
|
114
|
+
ngImport: i0,
|
|
115
|
+
type: DaffArticleCopyButtonComponent,
|
|
116
|
+
decorators: [{
|
|
117
|
+
type: Component,
|
|
118
|
+
args: [{
|
|
119
|
+
selector: "daff-article-copy-button",
|
|
120
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
121
|
+
imports: [FaIconComponent, DAFF_ICON_BUTTON_COMPONENTS],
|
|
122
|
+
template: "<button\n daff-icon-button\n class=\"daff-article__copy-button\"\n size=\"sm\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"copyToClipboard()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\" />\n } @else {\n <fa-icon [icon]=\"faCopy\" />\n }\n</button>\n",
|
|
123
|
+
styles: [":host{display:block;position:absolute;top:.25rem;right:.25rem;z-index:1}\n"]
|
|
124
|
+
}]
|
|
125
|
+
}],
|
|
126
|
+
propDecorators: { content: [{
|
|
127
|
+
type: i0.Input,
|
|
128
|
+
args: [{
|
|
129
|
+
isSignal: true,
|
|
130
|
+
alias: "content",
|
|
131
|
+
required: true
|
|
132
|
+
}]
|
|
133
|
+
}] }
|
|
134
|
+
});
|
|
135
|
+
var DaffArticleCopyButtonService = class DaffArticleCopyButtonService {
|
|
136
|
+
constructor() {
|
|
137
|
+
this.buttons = [];
|
|
138
|
+
}
|
|
139
|
+
addCopyButtonsToCodeBlocks(hostElement, viewContainerRef) {
|
|
140
|
+
const codeBlocks = hostElement.querySelectorAll("pre");
|
|
141
|
+
const encapsulatedElements = Array.from(hostElement.querySelectorAll(".daff-ae"));
|
|
142
|
+
codeBlocks.forEach((pre) => {
|
|
143
|
+
const code = pre.querySelector("code");
|
|
144
|
+
if (!code) return;
|
|
145
|
+
if (pre.hasAttribute("nocopy")) return;
|
|
146
|
+
if (encapsulatedElements.some((ee) => ee.contains(pre))) return;
|
|
147
|
+
if (pre.querySelector("daff-article-copy-button")) return;
|
|
148
|
+
const textContent = code.textContent || "";
|
|
149
|
+
const buttonRef = viewContainerRef.createComponent(DaffArticleCopyButtonComponent);
|
|
150
|
+
buttonRef.setInput("content", textContent);
|
|
151
|
+
pre.insertBefore(buttonRef.location.nativeElement, code);
|
|
152
|
+
this.buttons.push({
|
|
153
|
+
buttonRef,
|
|
154
|
+
preElement: pre
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
cleanup() {
|
|
159
|
+
this.buttons.forEach(({ buttonRef }) => {
|
|
160
|
+
buttonRef.destroy();
|
|
161
|
+
});
|
|
162
|
+
this.buttons = [];
|
|
163
|
+
}
|
|
164
|
+
static {
|
|
165
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
166
|
+
minVersion: "12.0.0",
|
|
167
|
+
version: "22.2.4",
|
|
168
|
+
ngImport: i0,
|
|
169
|
+
type: DaffArticleCopyButtonService,
|
|
170
|
+
deps: [],
|
|
171
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
static {
|
|
175
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
176
|
+
minVersion: "12.0.0",
|
|
177
|
+
version: "22.2.4",
|
|
178
|
+
ngImport: i0,
|
|
179
|
+
type: DaffArticleCopyButtonService
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
184
|
+
minVersion: "12.0.0",
|
|
185
|
+
version: "22.2.4",
|
|
186
|
+
ngImport: i0,
|
|
187
|
+
type: DaffArticleCopyButtonService,
|
|
188
|
+
decorators: [{ type: Injectable }]
|
|
189
|
+
});
|
|
190
|
+
var DaffArticleHeadingLinkComponent = class DaffArticleHeadingLinkComponent {
|
|
191
|
+
constructor() {
|
|
192
|
+
this.fragment = input.required(...ngDevMode ? [{ debugName: "fragment" }] : /* istanbul ignore next */ []);
|
|
193
|
+
this.label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
194
|
+
this.copied = signal(false, ...ngDevMode ? [{ debugName: "copied" }] : /* istanbul ignore next */ []);
|
|
195
|
+
this.faLink = faLink;
|
|
196
|
+
this.faCheck = faCheck;
|
|
197
|
+
this._ngZone = inject(NgZone);
|
|
198
|
+
this._router = inject(Router);
|
|
199
|
+
this._platformId = inject(PLATFORM_ID);
|
|
200
|
+
this._document = inject(DOCUMENT);
|
|
201
|
+
}
|
|
202
|
+
ngOnDestroy() {
|
|
203
|
+
if (this.timeoutId) clearTimeout(this.timeoutId);
|
|
204
|
+
}
|
|
205
|
+
async copyLink() {
|
|
206
|
+
if (!isPlatformBrowser(this._platformId)) return;
|
|
207
|
+
try {
|
|
208
|
+
const currentUrl = this._router.url.split("#")[0];
|
|
209
|
+
const fullUrl = `${this._document.defaultView?.location.origin || ""}${currentUrl}#${this.fragment()}`;
|
|
210
|
+
await navigator.clipboard.writeText(fullUrl);
|
|
211
|
+
this.copied.set(true);
|
|
212
|
+
clearTimeout(this.timeoutId);
|
|
213
|
+
this._ngZone.runOutsideAngular(() => {
|
|
214
|
+
this.timeoutId = setTimeout(() => {
|
|
215
|
+
this._ngZone.run(() => this.copied.set(false));
|
|
216
|
+
}, 1500);
|
|
217
|
+
});
|
|
218
|
+
} catch (err) {
|
|
219
|
+
console.error("Failed to copy text: ", err);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
get ariaLabel() {
|
|
223
|
+
return this.copied() ? "Copied link to clipboard" : "Copy link to clipboard";
|
|
224
|
+
}
|
|
225
|
+
static {
|
|
226
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
227
|
+
minVersion: "12.0.0",
|
|
228
|
+
version: "22.2.4",
|
|
229
|
+
ngImport: i0,
|
|
230
|
+
type: DaffArticleHeadingLinkComponent,
|
|
231
|
+
deps: [],
|
|
232
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
static {
|
|
236
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
237
|
+
minVersion: "17.0.0",
|
|
238
|
+
version: "22.2.4",
|
|
239
|
+
type: DaffArticleHeadingLinkComponent,
|
|
240
|
+
isStandalone: true,
|
|
241
|
+
selector: "daff-article-heading-link",
|
|
242
|
+
inputs: {
|
|
243
|
+
fragment: {
|
|
244
|
+
classPropertyName: "fragment",
|
|
245
|
+
publicName: "fragment",
|
|
246
|
+
isSignal: true,
|
|
247
|
+
isRequired: true,
|
|
248
|
+
transformFunction: null
|
|
249
|
+
},
|
|
250
|
+
label: {
|
|
251
|
+
classPropertyName: "label",
|
|
252
|
+
publicName: "label",
|
|
253
|
+
isSignal: true,
|
|
254
|
+
isRequired: true,
|
|
255
|
+
transformFunction: null
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
hostDirectives: [{ directive: i1.DaffArticleEncapsulatedDirective }],
|
|
259
|
+
ngImport: i0,
|
|
260
|
+
template: "<a class=\"daff-article-heading-link__anchor\" routerLink=\".\" [fragment]=\"fragment()\" queryParamsHandling=\"preserve\">\n {{ label() }}\n</a>\n<button class=\"daff-article-heading-link__button\" [attr.aria-label]=\"ariaLabel\" (click)=\"copyLink()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\"></fa-icon>\n } @else {\n <fa-icon [icon]=\"faLink\"></fa-icon>\n }\n</button>\n",
|
|
261
|
+
styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}@media(hover:hover){:host:hover .daff-article-heading-link__button{opacity:1}}.daff-article-heading-link__anchor{text-decoration:none}.daff-article-heading-link__button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;font-size:1rem;opacity:0;margin:0;padding:0;height:1.5rem;width:1.5rem;transition:opacity .2s ease}\n"],
|
|
262
|
+
dependencies: [{
|
|
263
|
+
kind: "directive",
|
|
264
|
+
type: RouterLink,
|
|
265
|
+
selector: "[routerLink]",
|
|
266
|
+
inputs: [
|
|
267
|
+
"target",
|
|
268
|
+
"queryParams",
|
|
269
|
+
"fragment",
|
|
270
|
+
"queryParamsHandling",
|
|
271
|
+
"state",
|
|
272
|
+
"info",
|
|
273
|
+
"relativeTo",
|
|
274
|
+
"preserveFragment",
|
|
275
|
+
"skipLocationChange",
|
|
276
|
+
"replaceUrl",
|
|
277
|
+
"browserUrl",
|
|
278
|
+
"routerLink"
|
|
279
|
+
]
|
|
280
|
+
}, {
|
|
281
|
+
kind: "component",
|
|
282
|
+
type: FaIconComponent,
|
|
283
|
+
selector: "fa-icon",
|
|
284
|
+
inputs: [
|
|
285
|
+
"icon",
|
|
286
|
+
"title",
|
|
287
|
+
"animation",
|
|
288
|
+
"mask",
|
|
289
|
+
"flip",
|
|
290
|
+
"size",
|
|
291
|
+
"pull",
|
|
292
|
+
"border",
|
|
293
|
+
"inverse",
|
|
294
|
+
"symbol",
|
|
295
|
+
"rotate",
|
|
296
|
+
"fixedWidth",
|
|
297
|
+
"transform",
|
|
298
|
+
"a11yRole"
|
|
299
|
+
],
|
|
300
|
+
outputs: [
|
|
301
|
+
"iconChange",
|
|
302
|
+
"titleChange",
|
|
303
|
+
"animationChange",
|
|
304
|
+
"maskChange",
|
|
305
|
+
"flipChange",
|
|
306
|
+
"sizeChange",
|
|
307
|
+
"pullChange",
|
|
308
|
+
"borderChange",
|
|
309
|
+
"inverseChange",
|
|
310
|
+
"symbolChange",
|
|
311
|
+
"rotateChange",
|
|
312
|
+
"fixedWidthChange",
|
|
313
|
+
"transformChange",
|
|
314
|
+
"a11yRoleChange"
|
|
315
|
+
]
|
|
316
|
+
}],
|
|
317
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
322
|
+
minVersion: "12.0.0",
|
|
323
|
+
version: "22.2.4",
|
|
324
|
+
ngImport: i0,
|
|
325
|
+
type: DaffArticleHeadingLinkComponent,
|
|
326
|
+
decorators: [{
|
|
327
|
+
type: Component,
|
|
328
|
+
args: [{
|
|
329
|
+
selector: "daff-article-heading-link",
|
|
330
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
331
|
+
hostDirectives: [{ directive: DaffArticleEncapsulatedDirective }],
|
|
332
|
+
imports: [
|
|
333
|
+
RouterLink,
|
|
334
|
+
FaIconComponent,
|
|
335
|
+
DAFF_ICON_BUTTON_COMPONENTS
|
|
336
|
+
],
|
|
337
|
+
template: "<a class=\"daff-article-heading-link__anchor\" routerLink=\".\" [fragment]=\"fragment()\" queryParamsHandling=\"preserve\">\n {{ label() }}\n</a>\n<button class=\"daff-article-heading-link__button\" [attr.aria-label]=\"ariaLabel\" (click)=\"copyLink()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\"></fa-icon>\n } @else {\n <fa-icon [icon]=\"faLink\"></fa-icon>\n }\n</button>\n",
|
|
338
|
+
styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}@media(hover:hover){:host:hover .daff-article-heading-link__button{opacity:1}}.daff-article-heading-link__anchor{text-decoration:none}.daff-article-heading-link__button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;font-size:1rem;opacity:0;margin:0;padding:0;height:1.5rem;width:1.5rem;transition:opacity .2s ease}\n"]
|
|
339
|
+
}]
|
|
340
|
+
}],
|
|
341
|
+
propDecorators: {
|
|
342
|
+
fragment: [{
|
|
343
|
+
type: i0.Input,
|
|
344
|
+
args: [{
|
|
345
|
+
isSignal: true,
|
|
346
|
+
alias: "fragment",
|
|
347
|
+
required: true
|
|
348
|
+
}]
|
|
349
|
+
}],
|
|
350
|
+
label: [{
|
|
351
|
+
type: i0.Input,
|
|
352
|
+
args: [{
|
|
353
|
+
isSignal: true,
|
|
354
|
+
alias: "label",
|
|
355
|
+
required: true
|
|
356
|
+
}]
|
|
357
|
+
}]
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
var DaffArticleHeadingLinkService = class DaffArticleHeadingLinkService {
|
|
361
|
+
constructor() {
|
|
362
|
+
this.links = [];
|
|
363
|
+
}
|
|
364
|
+
addLinksToHeadings(hostElement, viewContainerRef) {
|
|
365
|
+
const headings = hostElement.querySelectorAll("h2, h3, h4");
|
|
366
|
+
const encapsulatedElements = Array.from(hostElement.querySelectorAll(".daff-ae"));
|
|
367
|
+
headings.forEach((heading) => {
|
|
368
|
+
if (heading.querySelector("daff-article-heading-link")) return;
|
|
369
|
+
if (heading.hasAttribute("nolink")) return;
|
|
370
|
+
if (encapsulatedElements.some((ee) => ee.contains(heading))) return;
|
|
371
|
+
const textContent = heading.textContent?.trim() || "";
|
|
372
|
+
const fragment = heading.id || this.generateFragment(textContent);
|
|
373
|
+
if (!heading.id) heading.id = fragment;
|
|
374
|
+
const linkRef = viewContainerRef.createComponent(DaffArticleHeadingLinkComponent);
|
|
375
|
+
linkRef.setInput("fragment", fragment);
|
|
376
|
+
linkRef.setInput("label", textContent);
|
|
377
|
+
heading.innerHTML = "";
|
|
378
|
+
heading.appendChild(linkRef.location.nativeElement);
|
|
379
|
+
this.links.push({
|
|
380
|
+
linkRef,
|
|
381
|
+
headingElement: heading
|
|
382
|
+
});
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
cleanup() {
|
|
386
|
+
this.links.forEach(({ linkRef }) => {
|
|
387
|
+
linkRef.destroy();
|
|
388
|
+
});
|
|
389
|
+
this.links = [];
|
|
390
|
+
}
|
|
391
|
+
generateFragment(text) {
|
|
392
|
+
return text.toLowerCase().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").trim();
|
|
393
|
+
}
|
|
394
|
+
static {
|
|
395
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
396
|
+
minVersion: "12.0.0",
|
|
397
|
+
version: "22.2.4",
|
|
398
|
+
ngImport: i0,
|
|
399
|
+
type: DaffArticleHeadingLinkService,
|
|
400
|
+
deps: [],
|
|
401
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
static {
|
|
405
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
406
|
+
minVersion: "12.0.0",
|
|
407
|
+
version: "22.2.4",
|
|
408
|
+
ngImport: i0,
|
|
409
|
+
type: DaffArticleHeadingLinkService
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
414
|
+
minVersion: "12.0.0",
|
|
415
|
+
version: "22.2.4",
|
|
416
|
+
ngImport: i0,
|
|
417
|
+
type: DaffArticleHeadingLinkService,
|
|
418
|
+
decorators: [{ type: Injectable }]
|
|
419
|
+
});
|
|
420
|
+
var DaffArticleComponent = class DaffArticleComponent {
|
|
421
|
+
constructor(copyButtonService, headingLinkService) {
|
|
422
|
+
this.copyButtonService = copyButtonService;
|
|
423
|
+
this.headingLinkService = headingLinkService;
|
|
424
|
+
const elementRef = inject(ElementRef);
|
|
425
|
+
const viewContainerRef = inject(ViewContainerRef);
|
|
426
|
+
afterEveryRender({ write: () => {
|
|
427
|
+
this.copyButtonService.addCopyButtonsToCodeBlocks(elementRef.nativeElement, viewContainerRef);
|
|
428
|
+
this.headingLinkService.addLinksToHeadings(elementRef.nativeElement, viewContainerRef);
|
|
429
|
+
} });
|
|
430
|
+
inject(DestroyRef).onDestroy(() => {
|
|
431
|
+
this.copyButtonService.cleanup();
|
|
432
|
+
this.headingLinkService.cleanup();
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
static {
|
|
436
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
437
|
+
minVersion: "12.0.0",
|
|
438
|
+
version: "22.2.4",
|
|
439
|
+
ngImport: i0,
|
|
440
|
+
type: DaffArticleComponent,
|
|
441
|
+
deps: [{ token: DaffArticleCopyButtonService }, { token: DaffArticleHeadingLinkService }],
|
|
442
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
static {
|
|
446
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
447
|
+
minVersion: "14.0.0",
|
|
448
|
+
version: "22.2.4",
|
|
449
|
+
type: DaffArticleComponent,
|
|
450
|
+
isStandalone: true,
|
|
451
|
+
selector: "daff-article",
|
|
452
|
+
host: {
|
|
453
|
+
attributes: { "role": "article" },
|
|
454
|
+
classAttribute: "daff-article"
|
|
455
|
+
},
|
|
456
|
+
providers: [DaffArticleCopyButtonService, DaffArticleHeadingLinkService],
|
|
457
|
+
ngImport: i0,
|
|
458
|
+
template: "<ng-content></ng-content>",
|
|
459
|
+
isInline: true,
|
|
460
|
+
styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae,:where(.daff-article .daff-ae *)){font-weight:500;text-decoration:none}@media(hover:hover){.daff-article a:not(.daff-ae,:where(.daff-article .daff-ae *)):hover{text-decoration:underline}}.daff-article a:not(.daff-ae,:where(.daff-article .daff-ae *)) code{font-size:var(--daff-font-size-sm);font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h3:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h4:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h5:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h6:not(.daff-ae,:where(.daff-article .daff-ae *)){font-weight:600;margin-bottom:1rem;overflow-wrap:break-word}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h3:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h4:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h5:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h6:not(.daff-ae,:where(.daff-article .daff-ae *)) code{font-size:var(--daff-font-size-sm);font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *)){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media(min-width:768px){.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *))+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *))+p code{font-size:var(--daff-font-size-base);line-height:1rem}@media(min-width:768px){.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *))+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media(min-width:768px){.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:2rem;line-height:2.5rem}}.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)):first-child{margin-top:0}.daff-article h3:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:var(--daff-font-size-lg);line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:var(--daff-font-size-md);line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:var(--daff-font-size-base);font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae,:where(.daff-article .daff-ae *)){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.5rem;position:relative}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{display:block;line-height:1.5rem;font-size:var(--daff-font-size-sm);overflow-x:auto;padding:1.5rem}.daff-article code{border-radius:.25rem;font-size:var(--daff-font-size-sm);line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:var(--daff-font-size-sm)}.daff-article hr{border:0;height:.0625rem;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media(min-width:768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"],
|
|
461
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
462
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
467
|
+
minVersion: "12.0.0",
|
|
468
|
+
version: "22.2.4",
|
|
469
|
+
ngImport: i0,
|
|
470
|
+
type: DaffArticleComponent,
|
|
471
|
+
decorators: [{
|
|
472
|
+
type: Component,
|
|
473
|
+
args: [{
|
|
474
|
+
selector: "daff-article",
|
|
475
|
+
template: "<ng-content></ng-content>",
|
|
476
|
+
host: {
|
|
477
|
+
class: "daff-article",
|
|
478
|
+
role: "article"
|
|
479
|
+
},
|
|
480
|
+
encapsulation: ViewEncapsulation.None,
|
|
481
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
482
|
+
providers: [DaffArticleCopyButtonService, DaffArticleHeadingLinkService],
|
|
483
|
+
styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae,:where(.daff-article .daff-ae *)){font-weight:500;text-decoration:none}@media(hover:hover){.daff-article a:not(.daff-ae,:where(.daff-article .daff-ae *)):hover{text-decoration:underline}}.daff-article a:not(.daff-ae,:where(.daff-article .daff-ae *)) code{font-size:var(--daff-font-size-sm);font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h3:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h4:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h5:not(.daff-ae,:where(.daff-article .daff-ae *)),.daff-article h6:not(.daff-ae,:where(.daff-article .daff-ae *)){font-weight:600;margin-bottom:1rem;overflow-wrap:break-word}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h3:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h4:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h5:not(.daff-ae,:where(.daff-article .daff-ae *)) code,.daff-article h6:not(.daff-ae,:where(.daff-article .daff-ae *)) code{font-size:var(--daff-font-size-sm);font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *)){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media(min-width:768px){.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *))+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *))+p code{font-size:var(--daff-font-size-base);line-height:1rem}@media(min-width:768px){.daff-article h1:not(.daff-ae,:where(.daff-article .daff-ae *))+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media(min-width:768px){.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:2rem;line-height:2.5rem}}.daff-article h2:not(.daff-ae,:where(.daff-article .daff-ae *)):first-child{margin-top:0}.daff-article h3:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:var(--daff-font-size-lg);line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:var(--daff-font-size-md);line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae,:where(.daff-article .daff-ae *)){font-size:var(--daff-font-size-base);font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae,:where(.daff-article .daff-ae *)){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.5rem;position:relative}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{display:block;line-height:1.5rem;font-size:var(--daff-font-size-sm);overflow-x:auto;padding:1.5rem}.daff-article code{border-radius:.25rem;font-size:var(--daff-font-size-sm);line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:var(--daff-font-size-sm)}.daff-article hr{border:0;height:.0625rem;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media(min-width:768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"]
|
|
484
|
+
}]
|
|
485
|
+
}],
|
|
486
|
+
ctorParameters: () => [{ type: DaffArticleCopyButtonService }, { type: DaffArticleHeadingLinkService }]
|
|
487
|
+
});
|
|
488
|
+
var DaffArticleMetaDirective = class DaffArticleMetaDirective {
|
|
489
|
+
static {
|
|
490
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
491
|
+
minVersion: "12.0.0",
|
|
492
|
+
version: "22.2.4",
|
|
493
|
+
ngImport: i0,
|
|
494
|
+
type: DaffArticleMetaDirective,
|
|
495
|
+
deps: [],
|
|
496
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
static {
|
|
500
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
501
|
+
minVersion: "14.0.0",
|
|
502
|
+
version: "22.2.4",
|
|
503
|
+
type: DaffArticleMetaDirective,
|
|
504
|
+
isStandalone: true,
|
|
505
|
+
selector: "[daffArticleMeta]",
|
|
506
|
+
host: { classAttribute: "daff-article__meta" },
|
|
507
|
+
ngImport: i0
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
512
|
+
minVersion: "12.0.0",
|
|
513
|
+
version: "22.2.4",
|
|
514
|
+
ngImport: i0,
|
|
515
|
+
type: DaffArticleMetaDirective,
|
|
516
|
+
decorators: [{
|
|
517
|
+
type: Directive,
|
|
518
|
+
args: [{
|
|
519
|
+
selector: "[daffArticleMeta]",
|
|
520
|
+
host: { "class": "daff-article__meta" }
|
|
521
|
+
}]
|
|
522
|
+
}]
|
|
523
|
+
});
|
|
524
|
+
var DaffArticleModule = class DaffArticleModule {
|
|
525
|
+
static {
|
|
526
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
527
|
+
minVersion: "12.0.0",
|
|
528
|
+
version: "22.2.4",
|
|
529
|
+
ngImport: i0,
|
|
530
|
+
type: DaffArticleModule,
|
|
531
|
+
deps: [],
|
|
532
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
static {
|
|
536
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
537
|
+
minVersion: "14.0.0",
|
|
538
|
+
version: "22.2.4",
|
|
539
|
+
ngImport: i0,
|
|
540
|
+
type: DaffArticleModule,
|
|
541
|
+
imports: [
|
|
542
|
+
CommonModule,
|
|
543
|
+
DaffArticleComponent,
|
|
544
|
+
DaffArticleMetaDirective
|
|
545
|
+
],
|
|
546
|
+
exports: [DaffArticleComponent, DaffArticleMetaDirective]
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
static {
|
|
550
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
551
|
+
minVersion: "12.0.0",
|
|
552
|
+
version: "22.2.4",
|
|
553
|
+
ngImport: i0,
|
|
554
|
+
type: DaffArticleModule,
|
|
555
|
+
imports: [CommonModule]
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
560
|
+
minVersion: "12.0.0",
|
|
561
|
+
version: "22.2.4",
|
|
562
|
+
ngImport: i0,
|
|
563
|
+
type: DaffArticleModule,
|
|
564
|
+
decorators: [{
|
|
565
|
+
type: NgModule,
|
|
566
|
+
args: [{
|
|
567
|
+
imports: [
|
|
568
|
+
CommonModule,
|
|
569
|
+
DaffArticleComponent,
|
|
570
|
+
DaffArticleMetaDirective
|
|
571
|
+
],
|
|
572
|
+
exports: [DaffArticleComponent, DaffArticleMetaDirective]
|
|
573
|
+
}]
|
|
574
|
+
}]
|
|
575
|
+
});
|
|
576
|
+
const DAFF_ARTICLE_COMPONENTS = [DaffArticleComponent, DaffArticleMetaDirective];
|
|
340
577
|
export { DAFF_ARTICLE_COMPONENTS, DaffArticleComponent, DaffArticleMetaDirective, DaffArticleModule };
|
|
341
|
-
|
|
578
|
+
|
|
579
|
+
//# sourceMappingURL=daffodil-design-article.mjs.map
|