@aarhus-university/au-designsystem-delphinus 0.34.16 → 0.35.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/CHANGELOG.md +10 -0
- package/Gruntfile.js +115 -117
- package/build/changelog.html +6 -1
- package/build/js/app.js +1 -1
- package/build/js/app.js.map +1 -1
- package/build/js/components/content-toggle.ts +3 -3
- package/build/js/components/helpers.ts +3 -0
- package/build/js/components/tabs.ts +25 -6
- package/build/js/components/truncator.ts +45 -0
- package/build/js/demo/app.ts +7 -3
- package/build/js/production/app.ts +13 -25
- package/build/js/production/typo3.ts +48 -0
- package/build/projects/bachelor-applications/js/app.js +1 -1
- package/build/projects/bachelor-applications/js/app.js.map +1 -1
- package/build/projects/course-catalogue/js/app.js +1 -1
- package/build/projects/course-catalogue/js/app.js.map +1 -1
- package/build/projects/medarbejdere/js/app.js +1 -1
- package/build/projects/medarbejdere/js/app.js.map +1 -1
- package/build/projects/mitstudie/js/app.js +1 -1
- package/build/projects/mitstudie/js/app.js.map +1 -1
- package/build/projects/typo3/js/app.js +2 -0
- package/build/projects/typo3/js/app.js.map +1 -0
- package/build/projects/typo3/style.css +1 -1
- package/build/projects/typo3/style.css.map +1 -1
- package/package.json +1 -1
- package/source/js/components/content-toggle.ts +3 -3
- package/source/js/components/helpers.ts +3 -0
- package/source/js/components/tabs.ts +25 -6
- package/source/js/components/truncator.ts +45 -0
- package/source/js/demo/app.ts +7 -3
- package/source/js/production/app.ts +13 -25
- package/source/js/production/typo3.ts +48 -0
- package/source/markup/partials/mixins/_truncator.pug +1 -1
- package/source/projects/typo3/news-events/omnibus-article-content-elements.pug +12 -12
- package/source/projects/typo3/news-events/omnibus-article-content-elements2.pug +12 -12
- package/source/projects/typo3/news-events/omnibus-article-full-width.pug +12 -12
- package/source/projects/typo3/news-events/omnibus-article.pug +12 -12
- package/source/projects/typo3/news-events/omnibus-home-wide-image.pug +12 -12
- package/source/projects/typo3/news-events/omnibus-home.pug +12 -12
- package/source/projects/typo3/news-events/universe-full-width.pug +6 -6
- package/source/projects/typo3/news-events/universe-left-and-right.pug +6 -6
- package/source/projects/typo3/news-events/universe-left-menu.pug +6 -6
- package/source/projects/typo3/news-events/universe-right-column.pug +6 -6
- package/source/projects/typo3/style/_omnibus-font.scss +30 -30
- package/source/projects/typo3/typo3-markup/_typo3-footer.pug +1 -1
- package/source/projects/typo3/typo3-markup/_typo3-framed-header.pug +6 -6
- package/source/projects/typo3/typo3-markup/_typo3-header.pug +2 -2
- package/webpack.config.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 0.35.0 (February 28, 2023)
|
|
2
|
+
|
|
3
|
+
### Core Delphinus Updates
|
|
4
|
+
JS for truncators. Better handling of content-toggles on demo site.
|
|
5
|
+
|
|
6
|
+
### Delphinus Projects Updates
|
|
7
|
+
TYPO3-specific JS implemented.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
1
11
|
## 0.34.16 (February 20, 2023)
|
|
2
12
|
|
|
3
13
|
### Core Delphinus Updates
|
package/Gruntfile.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable max-len */
|
|
2
|
+
/* eslint-disable consistent-return */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
1
4
|
/* eslint-env node */
|
|
2
5
|
const sass = require('node-sass');
|
|
3
6
|
const webpackConfig = require('./webpack.config.js');
|
|
@@ -16,11 +19,11 @@ module.exports = (grunt) => {
|
|
|
16
19
|
src: ['build/**/_*.html'],
|
|
17
20
|
},
|
|
18
21
|
figmatokens: {
|
|
19
|
-
src: ['build/figma-tokens', 'bin']
|
|
22
|
+
src: ['build/figma-tokens', 'bin'],
|
|
20
23
|
},
|
|
21
24
|
bin: {
|
|
22
|
-
src: ['bin']
|
|
23
|
-
}
|
|
25
|
+
src: ['bin'],
|
|
26
|
+
},
|
|
24
27
|
},
|
|
25
28
|
cleanempty: {
|
|
26
29
|
options: {},
|
|
@@ -45,25 +48,25 @@ module.exports = (grunt) => {
|
|
|
45
48
|
},
|
|
46
49
|
figmastyles: {
|
|
47
50
|
options: {
|
|
48
|
-
flatten: true
|
|
51
|
+
flatten: true,
|
|
49
52
|
},
|
|
50
53
|
files: {
|
|
51
|
-
//the breakpoints
|
|
52
|
-
'bin/pre/breakpoint/01_medium.json'
|
|
53
|
-
'bin/pre/breakpoint/02_wide.json'
|
|
54
|
-
//the color colorthemes
|
|
55
|
-
'bin/pre/theme/01_cyan.json'
|
|
56
|
-
'bin/pre/theme/02_turquoise.json'
|
|
57
|
-
'bin/pre/theme/03_green.json'
|
|
58
|
-
'bin/pre/theme/04_yellow.json'
|
|
59
|
-
'bin/pre/theme/05_orange.json'
|
|
60
|
-
'bin/pre/theme/06_red.json'
|
|
61
|
-
'bin/pre/theme/07_magenta.json'
|
|
62
|
-
'bin/pre/theme/08_purple.json'
|
|
63
|
-
'bin/pre/theme/09_blue.json'
|
|
64
|
-
'bin/pre/theme/21_mitstudie.json'
|
|
65
|
-
'bin/pre/theme/22_omnibus.json'
|
|
66
|
-
'bin/pre/theme/23_brightspace.json'
|
|
54
|
+
// the breakpoints
|
|
55
|
+
'bin/pre/breakpoint/01_medium.json': 'source/figma-tokens/styles/breakpoint.json',
|
|
56
|
+
'bin/pre/breakpoint/02_wide.json': 'source/figma-tokens/styles/breakpoint.json',
|
|
57
|
+
// the color colorthemes
|
|
58
|
+
'bin/pre/theme/01_cyan.json': 'source/figma-tokens/styles/theme.json',
|
|
59
|
+
'bin/pre/theme/02_turquoise.json': 'source/figma-tokens/styles/theme.json',
|
|
60
|
+
'bin/pre/theme/03_green.json': 'source/figma-tokens/styles/theme.json',
|
|
61
|
+
'bin/pre/theme/04_yellow.json': 'source/figma-tokens/styles/theme.json',
|
|
62
|
+
'bin/pre/theme/05_orange.json': 'source/figma-tokens/styles/theme.json',
|
|
63
|
+
'bin/pre/theme/06_red.json': 'source/figma-tokens/styles/theme.json',
|
|
64
|
+
'bin/pre/theme/07_magenta.json': 'source/figma-tokens/styles/theme.json',
|
|
65
|
+
'bin/pre/theme/08_purple.json': 'source/figma-tokens/styles/theme.json',
|
|
66
|
+
'bin/pre/theme/09_blue.json': 'source/figma-tokens/styles/theme.json',
|
|
67
|
+
'bin/pre/theme/21_mitstudie.json': 'source/figma-tokens/styles/theme.json',
|
|
68
|
+
'bin/pre/theme/22_omnibus.json': 'source/figma-tokens/styles/theme.json',
|
|
69
|
+
'bin/pre/theme/23_brightspace.json': 'source/figma-tokens/styles/theme.json',
|
|
67
70
|
},
|
|
68
71
|
},
|
|
69
72
|
figmatokens: {
|
|
@@ -72,7 +75,7 @@ module.exports = (grunt) => {
|
|
|
72
75
|
dest: 'bin/pre',
|
|
73
76
|
expand: true,
|
|
74
77
|
flatten: true,
|
|
75
|
-
}
|
|
78
|
+
},
|
|
76
79
|
},
|
|
77
80
|
watch: {
|
|
78
81
|
sass: {
|
|
@@ -87,10 +90,6 @@ module.exports = (grunt) => {
|
|
|
87
90
|
files: ['source/**', '!source/**/*.scss', '!source/**/*.pug', '!source/figma-tokens/**/*.json'],
|
|
88
91
|
tasks: ['copy', 'cleanempty'],
|
|
89
92
|
},
|
|
90
|
-
webpack: {
|
|
91
|
-
files: ['source/**/*.ts'],
|
|
92
|
-
tasks: ['webpack'],
|
|
93
|
-
},
|
|
94
93
|
},
|
|
95
94
|
pug: {
|
|
96
95
|
compile: {
|
|
@@ -233,138 +232,137 @@ module.exports = (grunt) => {
|
|
|
233
232
|
'merge-json': {
|
|
234
233
|
breakpoints: {
|
|
235
234
|
src: ['bin/pre/breakpoint/*.json'],
|
|
236
|
-
dest: 'bin/pre/sizes-breakpoints.json'
|
|
235
|
+
dest: 'bin/pre/sizes-breakpoints.json',
|
|
237
236
|
},
|
|
238
237
|
themes: {
|
|
239
238
|
src: ['bin/pre/theme/*.json'],
|
|
240
|
-
dest: 'bin/pre/colors-themes.json'
|
|
239
|
+
dest: 'bin/pre/colors-themes.json',
|
|
241
240
|
},
|
|
242
241
|
designsystem: {
|
|
243
242
|
src: [
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
dest: 'build/figma-tokens/design-system.json'
|
|
243
|
+
'bin/figma-tokens/colors-all.json',
|
|
244
|
+
'bin/figma-tokens/colors-themes.json',
|
|
245
|
+
'bin/figma-tokens/sizes-default.json',
|
|
246
|
+
'bin/figma-tokens/sizes-breakpoints.json',
|
|
247
|
+
'bin/figma-tokens/sizing.json',
|
|
248
|
+
'bin/figma-tokens/spacing.json',
|
|
249
|
+
'bin/figma-tokens/shadows-default.json',
|
|
250
|
+
'bin/figma-tokens/blurs-default.json',
|
|
251
|
+
'bin/figma-tokens/typography-fonts.json',
|
|
252
|
+
'bin/figma-tokens/typography-line-widths.json',
|
|
253
|
+
'bin/figma-tokens/typography-styles.json',
|
|
254
|
+
'bin/figma-tokens/borders-widths.json',
|
|
255
|
+
'bin/figma-tokens/borders-default.json',
|
|
256
|
+
'bin/figma-tokens/borders-theme.json',
|
|
257
|
+
'bin/figma-tokens/borders-nav-item.json',
|
|
258
|
+
'bin/figma-tokens/borders-nav-item-theme.json',
|
|
259
|
+
],
|
|
260
|
+
dest: 'build/figma-tokens/design-system.json',
|
|
262
261
|
},
|
|
263
262
|
designfile: {
|
|
264
263
|
src: [
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
dest: 'build/figma-tokens/design-file.json'
|
|
264
|
+
'bin/figma-tokens/sizes-default.json',
|
|
265
|
+
'bin/figma-tokens/sizes-breakpoints.json',
|
|
266
|
+
'bin/figma-tokens/sizing.json',
|
|
267
|
+
'bin/figma-tokens/spacing.json',
|
|
268
|
+
'bin/figma-tokens/blurs-default.json',
|
|
269
|
+
'bin/figma-tokens/typography-fonts.json',
|
|
270
|
+
'bin/figma-tokens/typography-line-widths.json',
|
|
271
|
+
'bin/figma-tokens/typography-styles.json',
|
|
272
|
+
'bin/figma-tokens/borders-widths.json',
|
|
273
|
+
],
|
|
274
|
+
dest: 'build/figma-tokens/design-file.json',
|
|
276
275
|
},
|
|
277
276
|
colorthemes: {
|
|
278
277
|
src: [
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
dest: 'build/figma-tokens/color-themes.json'
|
|
278
|
+
'bin/figma-tokens/borders-widths.json',
|
|
279
|
+
'bin/figma-tokens/borders-theme.json',
|
|
280
|
+
'bin/figma-tokens/borders-nav-item-theme.json',
|
|
281
|
+
'bin/figma-tokens/colors-themes.json',
|
|
282
|
+
],
|
|
283
|
+
dest: 'build/figma-tokens/color-themes.json',
|
|
285
284
|
},
|
|
286
285
|
breakpointstyles: {
|
|
287
286
|
src: [
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
dest: 'build/figma-tokens/breakpoint-styles.json'
|
|
287
|
+
'bin/figma-tokens/typography-fonts.json',
|
|
288
|
+
'bin/figma-tokens/typography-line-widths.json',
|
|
289
|
+
'bin/figma-tokens/typography-styles.json',
|
|
290
|
+
'bin/figma-tokens/sizes-breakpoints.json',
|
|
291
|
+
],
|
|
292
|
+
dest: 'build/figma-tokens/breakpoint-styles.json',
|
|
294
293
|
},
|
|
295
294
|
},
|
|
296
295
|
'string-replace': {
|
|
297
296
|
cssvars: {
|
|
298
297
|
files: [{
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
298
|
+
flatten: true,
|
|
299
|
+
expand: true,
|
|
300
|
+
cwd: 'bin/',
|
|
301
|
+
src: 'pre/*.json',
|
|
302
|
+
dest: 'bin/figma-tokens',
|
|
304
303
|
}],
|
|
305
304
|
options: {
|
|
306
305
|
replacements: [{
|
|
307
306
|
pattern: /(--[a-z0-9-]+)/ig,
|
|
308
|
-
replacement
|
|
309
|
-
//console.log(match)
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
307
|
+
replacement(match) {
|
|
308
|
+
// console.log(match)
|
|
309
|
+
const cssvars = grunt.file.read('bin/pre/cssvars/figma-tokens.css');
|
|
310
|
+
const regex = new RegExp(`${match}: ([a-zA-Z0-9-#.,()]+)`);
|
|
311
|
+
const value = cssvars.match(regex);
|
|
313
312
|
if (value == null) {
|
|
314
|
-
grunt.fail.fatal(
|
|
315
|
-
}
|
|
316
|
-
else {
|
|
313
|
+
grunt.fail.fatal(`Cannot find css-var: ${match}`);
|
|
314
|
+
} else {
|
|
317
315
|
return value[1];
|
|
318
316
|
}
|
|
319
|
-
}
|
|
320
|
-
}]
|
|
321
|
-
}
|
|
317
|
+
},
|
|
318
|
+
}],
|
|
319
|
+
},
|
|
322
320
|
},
|
|
323
321
|
figmastyles: {
|
|
324
322
|
files: [{
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
323
|
+
expand: true,
|
|
324
|
+
cwd: 'bin/',
|
|
325
|
+
src: ['pre/breakpoint/*.json', 'pre/theme/*.json'],
|
|
326
|
+
dest: 'bin/',
|
|
329
327
|
}],
|
|
330
328
|
options: {
|
|
331
329
|
replacements: [{
|
|
332
330
|
pattern: /{{([a-zA-Z0-9-]+)}}/ig,
|
|
333
|
-
replacement
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
331
|
+
replacement(match, value, a, b, path) {
|
|
332
|
+
// extract the filename
|
|
333
|
+
let foldername = null;
|
|
334
|
+
let filename = null;
|
|
335
|
+
const re = new RegExp('([a-zA-Z0-9]+)/[0-9]+_([a-zA-Z0-9]+).json');
|
|
336
|
+
const file = path.match(re);
|
|
338
337
|
if (file == null) {
|
|
339
|
-
grunt.fail.fatal(
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
338
|
+
grunt.fail.fatal(`Unable to extract file and folder name from: ${path}`);
|
|
339
|
+
} else {
|
|
340
|
+
// eslint-disable-next-line prefer-destructuring
|
|
341
|
+
foldername = file[1];
|
|
342
|
+
// eslint-disable-next-line prefer-destructuring
|
|
343
|
+
filename = file[2];
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
//if matched value is not name, find display name i css vars file. Else return the filename.
|
|
347
|
-
if (value
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
346
|
+
// if matched value is not name, find display name i css vars file. Else return the filename.
|
|
347
|
+
if (value !== 'name') {
|
|
348
|
+
const cssvars = grunt.file.read('bin/pre/cssvars/figma-tokens.css');
|
|
349
|
+
const re2 = new RegExp(`--${foldername}-${filename}: ([a-zA-Z0-9-#. ]+)`);
|
|
350
|
+
const displayname = cssvars.match(re2);
|
|
351
351
|
if (displayname == null) {
|
|
352
|
-
grunt.fail.fatal(
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
//console.log(displayname[1]);
|
|
352
|
+
grunt.fail.fatal(`Cannot find css var with display name for: ${filename}`);
|
|
353
|
+
} else {
|
|
354
|
+
// console.log(displayname[1]);
|
|
356
355
|
return displayname[1];
|
|
357
356
|
}
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
//console.log(filename);
|
|
357
|
+
} else {
|
|
358
|
+
// console.log(filename);
|
|
361
359
|
return filename;
|
|
362
360
|
}
|
|
363
|
-
}
|
|
364
|
-
}]
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
361
|
+
},
|
|
362
|
+
}],
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
},
|
|
368
366
|
});
|
|
369
367
|
|
|
370
368
|
// load the tasks
|
|
@@ -392,7 +390,7 @@ module.exports = (grunt) => {
|
|
|
392
390
|
'figma-tokens',
|
|
393
391
|
'clean:postbuild',
|
|
394
392
|
'cleanempty',
|
|
395
|
-
'webpack'
|
|
393
|
+
'webpack',
|
|
396
394
|
]);
|
|
397
395
|
|
|
398
396
|
grunt.registerTask('default', ['build', 'connect', 'browserSync', 'watch']);
|
|
@@ -413,6 +411,6 @@ module.exports = (grunt) => {
|
|
|
413
411
|
'merge-json:themes',
|
|
414
412
|
'string-replace:cssvars',
|
|
415
413
|
'merge-json',
|
|
416
|
-
'clean:bin'
|
|
414
|
+
'clean:bin',
|
|
417
415
|
]);
|
|
418
416
|
};
|
package/build/changelog.html
CHANGED
|
@@ -17,7 +17,12 @@ a(href="/components" class= active_nav_item=="components" ? "nav__item--active"
|
|
|
17
17
|
a(href="/atom-fonts.html" class= active_nav_item=="atoms" ? "nav__item--active" : "").nav__item Atoms
|
|
18
18
|
a(href="/code.html" class= active_nav_item=="code" ? "nav__item--active" : "").nav__item Code
|
|
19
19
|
a(href="/projects" class= active_nav_item=="projects" ? "nav__item--active" : "").nav__item Projects
|
|
20
|
-
a(href="/changelog.html" class= active_nav_item=="changelog" ? "nav__item--active" : "").nav__item Changelog--><!--button(title="Show full menu" aria-label="Show full menu" aria-haspopup="true" aria-expanded="false" aria-controls="nav-items-global").nav__toggle Menu--></div></nav></header><main class="page__content theme--normal" id="content"><div class="page__content__block"><h1> <strong>Changelog</strong></h1><div class="changelog"><h2>0.
|
|
20
|
+
a(href="/changelog.html" class= active_nav_item=="changelog" ? "nav__item--active" : "").nav__item Changelog--><!--button(title="Show full menu" aria-label="Show full menu" aria-haspopup="true" aria-expanded="false" aria-controls="nav-items-global").nav__toggle Menu--></div></nav></header><main class="page__content theme--normal" id="content"><div class="page__content__block"><h1> <strong>Changelog</strong></h1><div class="changelog"><h2>0.35.0 (February 28, 2023)</h2>
|
|
21
|
+
<h3>Core Delphinus Updates</h3>
|
|
22
|
+
<p>JS for truncators. Better handling of content-toggles on demo site.</p>
|
|
23
|
+
<h3>Delphinus Projects Updates</h3>
|
|
24
|
+
<p>TYPO3-specific JS implemented.</p>
|
|
25
|
+
<h2>0.34.16 (February 20, 2023)</h2>
|
|
21
26
|
<h3>Core Delphinus Updates</h3>
|
|
22
27
|
<p>Fixes issue with icons not displaying correctly in <a href="https://delphinus.au.dk/components/toast-notification">Toast Notification</a> component in confirm and warnings states.</p>
|
|
23
28
|
<h3>Delphinus Projects Updates</h3>
|
package/build/js/app.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";n.r(t);const o=(e,t)=>{let n=!1;return e.composedPath().forEach(e=>{e.classList&&e.classList.contains(t)&&(n=!0)}),n},r=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),l=e=>{return Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<r(parseInt(getComputedStyle(document.documentElement).getPropertyValue(e).replace("rem",""),10))},a=e=>{const t=e.parentElement;return t?t.classList.contains("nav")?t:a(t):e},c=(e,t=null)=>{e.forEach(e=>{const n=e.querySelector(".nav__toggle");e!==t&&(e.classList.contains("nav--toggled")&&(n.focus(),n.setAttribute("aria-expanded","false")),e.classList.remove("nav--toggled"))})},i=e=>{const t=[];return document.querySelectorAll(".nav__toggle").forEach(n=>{const o=()=>{const t=(e=>{const t=a(e),n=t.querySelector(".nav__items"),o=null==n?void 0:n.querySelector(".nav__item:last-of-type");null==n||n.classList.add("nav__items--fadeout");const r=null==n?void 0:n.querySelector(".nav__item--is-overflown");r&&r.focus();const l=()=>{t.classList.toggle("nav--toggled"),null==n||n.classList.remove("nav__items--fadeout"),null==o||o.removeEventListener("transitionend",l)};return null==o||o.addEventListener("transitionend",l),t})(n),o=n.getAttribute("aria-expanded");n.setAttribute("aria-expanded","false"===o?"true":"false"),c(e,t)};t.push({element:n,clickEvent:o}),n.addEventListener("click",o)}),t},s=(e,t)=>{var n;t.classList.remove("nav--toggled");const r=t.querySelector(".nav__items");if(r){const e=r.querySelectorAll(".nav__item"),n="nav__item--is-overflown",o="nav--has-overflow",l="nav__item--active";let a=!1;for(let r=e.length-1;r>=0;r-=1){const c=e[r];c.offsetTop>0?(c.classList.add(n),t.classList.add(o),a=!0):c.classList.contains(l)||c.classList.remove(n)}if(!a){t.classList.remove(o);const e=t.querySelector(`.${l}`);e&&e.classList.remove(n)}}const l=t=>{t.target.classList.contains("nav__toggle")||o(t,"nav__items")||c(e)};return null===(n=document.querySelector("body"))||void 0===n||n.addEventListener("click",l),{element:document.querySelector("body"),clickEvent:l}},d=e=>{const t=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)/(()=>parseInt(window.getComputedStyle(document.documentElement).fontSize.replace("px",""),10))(),n=(e=>e.contains("tabbed-content--hide-tabs-on-medium-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-medium").replace("rem",""),10):e.contains("tabbed-content--hide-tabs-on-wide-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-wide").replace("rem",""),10):-1)(e);return!(n>-1)||t<n},u=(e,t,n,o,r,l=!0,a=(e=>console.log(e)))=>{l&&o.focus(),o.removeAttribute("tabindex"),o.setAttribute("aria-selected","true"),o.classList.contains("switch__segment")?o.classList.add("switch__segment--active"):o.classList.add("nav__item--active"),n&&(n.removeAttribute("aria-selected"),n.setAttribute("tabindex","-1"),n.classList.contains("switch__segment")?n.classList.remove("switch__segment--active"):n.classList.remove("nav__item--active"));const c=Array.prototype.indexOf.call(e,o);if(Array.from(document.querySelectorAll(`[data-for="${t[c].id}"]`)).forEach(e=>{e.classList.add("tabbed-content-peripheral--active"),e.hidden=!1}),t[c].hidden=!1,n){const o=Array.prototype.indexOf.call(e,n);Array.from(document.querySelectorAll(`[data-for="${t[o].id}"]`)).forEach(e=>{e.classList.remove("tabbed-content-peripheral--active"),e.hidden=!0}),t[o].hidden=!0}o.dispatchEvent(new CustomEvent("switch-tab",{bubbles:!0,detail:{tab:c}})),a(c)},m=e=>{e.querySelectorAll(".content-toggle__toggle").forEach(e=>{var t;const n=null===(t=e.parentElement)||void 0===t?void 0:t.querySelector(".content-toggle__content");e.setAttribute("aria-expanded","false"),null==n||n.setAttribute("hidden","hidden")})},p=e=>{const t=e.parentElement;return t?t.classList.contains("toolbar")?t:p(t):e};let f=0;const v=[],b=()=>{v.forEach((e,t)=>{const{rendered:n,domElement:o}=e;if(d(o.classList)){if(!n){const n=o.getAttribute("data-focus-onload"),r=o.getAttribute("data-initial-tab");((e,t,n=0,o=!0,r=(e=>console.log(e)))=>{const l=t.querySelector(".switch,.nav__items"),a=l.querySelectorAll("a"),c=[];t.querySelectorAll("section").forEach(e=>{e.parentNode===t&&c.push(e)});const i=t.querySelector("button.tabbed-content__expand-all");if(i){const e=()=>{l.hidden=!0,c.forEach(e=>{e.hidden=!1})};i.removeEventListener("click",e),i.addEventListener("click",e)}l.setAttribute("role","tablist"),a.forEach((n,o)=>{var i;n.setAttribute("role","tab"),n.setAttribute("id",`tab${e}_${o+1}`),n.setAttribute("tabindex","-1"),null===(i=n.parentElement)||void 0===i||i.setAttribute("role","presentation");const s=e=>{e.preventDefault();const n=l.querySelector("[aria-selected]");e.currentTarget!==n&&u(a,c,n,e.currentTarget,t.classList,!0,e=>{r(e)})};n.removeEventListener("click",s),n.addEventListener("click",s);const d=e=>{const n=Array.prototype.indexOf.call(a,e.currentTarget);let l=null;"ArrowLeft"===e.key&&(l=n-1),"ArrowRight"===e.key&&(l=n+1),"ArrowDown"===e.key&&(l="down"),null!==l&&(e.preventDefault(),"down"===l?c[o].focus():a[l]&&u(a,c,e.currentTarget,a[l],t.classList,!0,e=>{r(e)}))};n.removeEventListener("keydown",d),n.addEventListener("keydown",d)}),c.forEach((e,t)=>{e.setAttribute("tabindex","-1"),e.setAttribute("aria-labelledby",a[t].id),e.hidden=!0,e.setAttribute("role","tabpanel")}),n>-1&&u(a,c,null,a[n],t.classList,o)})(t,o,r?parseInt(r,10):0,"false"!==n),e.rendered=!0}}else n&&((e=>{const t=e.querySelector(".nav__items"),n=null==t?void 0:t.querySelectorAll("a"),o=[];e.querySelectorAll("section").forEach(t=>{t.parentNode===e&&o.push(t)}),null==n||n.forEach(e=>{e.removeAttribute("aria-selected"),e.classList.remove("nav__item--active")}),o.forEach(e=>{e.hidden=!1,e.removeAttribute("role")})})(o),e.rendered=!1)})};(e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)})(()=>{document.querySelectorAll(".tabbed-content").forEach(e=>v.push({domElement:e,rendered:!1})),b(),(()=>{const e=document.querySelector("body");if(e){const t=window.getComputedStyle(e).getPropertyValue("--color-background"),n=document.querySelector('meta[name="theme-color"]');if(n)n.content=t;else{const e=document.createElement("meta");e.name="theme-color",e.content=t,document.getElementsByTagName("head")[0].appendChild(e)}}})();const e=document.querySelectorAll(".nav:not(.nav--vertical)");e.forEach(t=>s(e,t)),i(e),document.querySelectorAll(".table--wrap-medium-width, .table--wrap-default-width").forEach(e=>(e=>{const t=e.querySelector("thead"),n=e.querySelector("tbody"),o=e.querySelector("tfoot");if(t){const e=[];t.querySelectorAll("th").forEach(t=>{t.classList.contains("table__cell--self-explanatory")?e.push(""):e.push(t.innerHTML)});const r=[];n&&r.push(n),o&&r.push(o),r.forEach(t=>{t.querySelectorAll("tr").forEach(t=>{t.querySelectorAll("td, th").forEach((t,n)=>{e[n]&&t.setAttribute("data-label",e[n])})})})}})(e)),document.querySelectorAll(".content-toggle__content").forEach(e=>{((e,t,n,o)=>{var r;const l=[],a=(t,n,o)=>{o&&n.focus();const r=()=>{e.setAttribute("hidden","hidden"),t.removeAttribute("hidden"),t.setAttribute("aria-expanded","false"),t.focus()};return n.addEventListener("click",r),r},c=null==e?void 0:null===(r=e.parentElement)||void 0===r?void 0:r.querySelector(".content-toggle__toggle"),i=e.querySelectorAll(".content-toggle__close");if(c){const r=()=>{const r=c.getAttribute("aria-expanded");"function"==typeof n&&"false"===r&&n(e,c),c.setAttribute("aria-expanded","false"===r?"true":"false"),"true"===r?e.setAttribute("hidden","hidden"):e.removeAttribute("hidden"),"function"==typeof t&&t(e,c),c.hasAttribute("aria-haspopup")&&(c.setAttribute("hidden","hidden"),i.forEach(e=>{a(c,e,!0)})),"function"==typeof o&&o(e,c)};c.addEventListener("click",r),l.push({element:c,clickEvent:r}),i.forEach(e=>{const t=a(c,e,!1);l.push({element:e,clickEvent:t})})}})(e,e=>{(e=>{if(!l("--bp-medium")&&!l("--bp-low-height")){const t=r(parseInt(getComputedStyle(document.documentElement).getPropertyValue("--toolbar-popout-allowed-edge-distance").replace("rem,",""),10)),n=parseInt(getComputedStyle(e).width.replace("px",""),10),o=e.getBoundingClientRect().x,l=document.body.offsetWidth-t-n-o;l<0&&e.style.setProperty("--toolbar-popout-edge-overflow",`${l}px`)}})(e),(()=>{const e=document.querySelector("body");(l("--bp-medium")||l("--bp-low-height"))&&(null==e||e.classList.add("body--no-scroll"))})()},e=>m(p(e)),(e,t)=>{const n=t.getAttribute("aria-expanded"),r=p(e);"true"===n?null==r||r.classList.add("toolbar--has-popout"):null==r||r.classList.remove("toolbar--has-popout"),e.addEventListener("click",e=>{e.target.classList.contains("toolbar__popout")&&!o(e,"toolbar__filter__content")&&(m(r),(()=>{const e=document.querySelector("body");null==e||e.classList.remove("body--no-scroll")})())})})}),window.addEventListener("load",()=>{f=window.innerWidth}),window.addEventListener("resize",()=>{f>0&&window.innerWidth!==f&&(f=window.innerWidth,e.forEach(t=>s(e,t)),b())})})}])}));
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";n.r(t);const o=(e,t)=>{let n=!1;return e.composedPath().forEach(e=>{e.classList&&e.classList.contains(t)&&(n=!0)}),n},r=e=>e*parseFloat(getComputedStyle(document.documentElement).fontSize),l=e=>{return Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<r(parseInt(getComputedStyle(document.documentElement).getPropertyValue(e).replace("rem",""),10))},a=e=>{const t=e.parentElement;return t?t.classList.contains("nav")?t:a(t):e},c=(e,t=null)=>{e.forEach(e=>{const n=e.querySelector(".nav__toggle");e!==t&&(e.classList.contains("nav--toggled")&&(n.focus(),n.setAttribute("aria-expanded","false")),e.classList.remove("nav--toggled"))})},i=e=>{const t=[];return document.querySelectorAll(".nav__toggle").forEach(n=>{const o=()=>{const t=(e=>{const t=a(e),n=t.querySelector(".nav__items"),o=null==n?void 0:n.querySelector(".nav__item:last-of-type");null==n||n.classList.add("nav__items--fadeout");const r=null==n?void 0:n.querySelector(".nav__item--is-overflown");r&&r.focus();const l=()=>{t.classList.toggle("nav--toggled"),null==n||n.classList.remove("nav__items--fadeout"),null==o||o.removeEventListener("transitionend",l)};return null==o||o.addEventListener("transitionend",l),t})(n),o=n.getAttribute("aria-expanded");n.setAttribute("aria-expanded","false"===o?"true":"false"),c(e,t)};t.push({element:n,clickEvent:o}),n.addEventListener("click",o)}),t},s=(e,t)=>{var n;t.classList.remove("nav--toggled");const r=t.querySelector(".nav__items");if(r){const e=r.querySelectorAll(".nav__item"),n="nav__item--is-overflown",o="nav--has-overflow",l="nav__item--active";let a=!1;for(let r=e.length-1;r>=0;r-=1){const c=e[r];c.offsetTop>0?(c.classList.add(n),t.classList.add(o),a=!0):c.classList.contains(l)||c.classList.remove(n)}if(!a){t.classList.remove(o);const e=t.querySelector(`.${l}`);e&&e.classList.remove(n)}}const l=t=>{t.target.classList.contains("nav__toggle")||o(t,"nav__items")||c(e)};return null===(n=document.querySelector("body"))||void 0===n||n.addEventListener("click",l),{element:document.querySelector("body"),clickEvent:l}},d=e=>{const t=Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)/(()=>parseInt(window.getComputedStyle(document.documentElement).fontSize.replace("px",""),10))(),n=(e=>e.contains("tabbed-content--hide-tabs-on-medium-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-medium").replace("rem",""),10):e.contains("tabbed-content--hide-tabs-on-wide-width")?parseInt(getComputedStyle(document.documentElement).getPropertyValue("--bp-wide").replace("rem",""),10):-1)(e);return!(n>-1)||t<n},u=(e,t,n,o,r,l=!0,a=(e=>console.log(e)))=>{l&&o.focus(),o.removeAttribute("tabindex"),o.setAttribute("aria-selected","true"),o.classList.contains("switch__segment")?o.classList.add("switch__segment--active"):o.classList.add("nav__item--active"),n&&(n.removeAttribute("aria-selected"),n.setAttribute("tabindex","-1"),n.classList.contains("switch__segment")?n.classList.remove("switch__segment--active"):n.classList.remove("nav__item--active"));const c=Array.prototype.indexOf.call(e,o);if(Array.from(document.querySelectorAll(`[data-for="${t[c].id}"]`)).forEach(e=>{e.classList.add("tabbed-content-peripheral--active"),e.hidden=!1}),t[c].hidden=!1,n){const o=Array.prototype.indexOf.call(e,n);Array.from(document.querySelectorAll(`[data-for="${t[o].id}"]`)).forEach(e=>{e.classList.remove("tabbed-content-peripheral--active"),e.hidden=!0}),t[o].hidden=!0}o.dispatchEvent(new CustomEvent("switch-tab",{bubbles:!0,detail:{tab:c}})),a(c)},m=e=>{e.forEach((e,t)=>{const{rendered:n,domElement:o}=e;if(d(o.classList)){if(!n){const n=o.getAttribute("data-focus-onload"),r=o.getAttribute("data-initial-tab");((e,t,n=0,o=!0,r=(e=>console.log(e)))=>{const l=t.querySelector(".switch,.nav__items"),a=l.querySelectorAll("a"),c=[];t.querySelectorAll("section").forEach(e=>{e.parentNode===t&&c.push(e)});const i=t.querySelector("button.tabbed-content__expand-all");if(i){const e=()=>{l.hidden=!0,c.forEach(e=>{e.hidden=!1})};i.removeEventListener("click",e),i.addEventListener("click",e)}l.setAttribute("role","tablist"),a.forEach((n,o)=>{var i;n.setAttribute("role","tab"),n.setAttribute("id",`tab${e}_${o+1}`),n.setAttribute("tabindex","-1"),null===(i=n.parentElement)||void 0===i||i.setAttribute("role","presentation");const s=e=>{e.preventDefault();const n=l.querySelector("[aria-selected]");e.currentTarget!==n&&u(a,c,n,e.currentTarget,t.classList,!0,e=>{r(e)})};n.removeEventListener("click",s),n.addEventListener("click",s);const d=e=>{const n=Array.prototype.indexOf.call(a,e.currentTarget);let l=null;"ArrowLeft"===e.key&&(l=n-1),"ArrowRight"===e.key&&(l=n+1),"ArrowDown"===e.key&&(l="down"),null!==l&&(e.preventDefault(),"down"===l?c[o].focus():a[l]&&u(a,c,e.currentTarget,a[l],t.classList,!0,e=>{r(e)}))};n.removeEventListener("keydown",d),n.addEventListener("keydown",d)}),c.forEach((e,t)=>{e.setAttribute("tabindex","-1"),e.setAttribute("aria-labelledby",a[t].id),e.hidden=!0,e.setAttribute("role","tabpanel")}),n>-1&&u(a,c,null,a[n],t.classList,o)})(t,o,r?parseInt(r,10):0,"false"!==n),e.rendered=!0}}else n&&((e=>{const t=e.querySelector(".nav__items"),n=null==t?void 0:t.querySelectorAll("a"),o=[];e.querySelectorAll("section").forEach(t=>{t.parentNode===e&&o.push(t)}),null==n||n.forEach(e=>{e.removeAttribute("aria-selected"),e.classList.remove("nav__item--active")}),o.forEach(e=>{e.hidden=!1,e.removeAttribute("role")})})(o),e.rendered=!1)})},f=(e,t,n,o)=>{var r;const l=[],a=(t,n,o)=>{o&&n.focus();const r=()=>{e.setAttribute("hidden","hidden"),t.removeAttribute("hidden"),t.setAttribute("aria-expanded","false"),t.focus()};return n.addEventListener("click",r),r},c=null==e?void 0:null===(r=e.parentElement)||void 0===r?void 0:r.querySelector(".content-toggle__toggle"),i=e.querySelectorAll(".content-toggle__close");if(c){const r=()=>{const r=c.getAttribute("aria-expanded");"function"==typeof n&&"false"===r&&n(e,c),c.setAttribute("aria-expanded","false"===r?"true":"false"),"true"===r?e.setAttribute("hidden","hidden"):e.removeAttribute("hidden"),"function"==typeof t&&t(e,c),c.hasAttribute("aria-haspopup")&&(c.setAttribute("hidden","hidden"),i.forEach(e=>{a(c,e,!0)})),"function"==typeof o&&o(e,c)};c.addEventListener("click",r),l.push({element:c,clickEvent:r}),i.forEach(e=>{const t=a(c,e,!1);l.push({element:e,clickEvent:t})})}return l},p=e=>{e.querySelectorAll(".content-toggle__toggle").forEach(e=>{var t;const n=null===(t=e.parentElement)||void 0===t?void 0:t.querySelector(".content-toggle__content");e.setAttribute("aria-expanded","false"),null==n||n.setAttribute("hidden","hidden")})},v=e=>{const t=e.parentElement;return t?t.classList.contains("toolbar")?t:v(t):e};let b=0;(e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)})(()=>{const e=document.querySelectorAll(".tabbed-content"),t=[];e.forEach(e=>t.push({domElement:e,rendered:!1})),m(t),(()=>{const e=document.querySelector("body");if(e){const t=window.getComputedStyle(e).getPropertyValue("--color-background"),n=document.querySelector('meta[name="theme-color"]');if(n)n.content=t;else{const e=document.createElement("meta");e.name="theme-color",e.content=t,document.getElementsByTagName("head")[0].appendChild(e)}}})();const n=document.querySelectorAll(".nav:not(.nav--vertical)");n.forEach(e=>s(n,e)),i(n),document.querySelectorAll(".table--wrap-medium-width, .table--wrap-default-width").forEach(e=>(e=>{const t=e.querySelector("thead"),n=e.querySelector("tbody"),o=e.querySelector("tfoot");if(t){const e=[];t.querySelectorAll("th").forEach(t=>{t.classList.contains("table__cell--self-explanatory")?e.push(""):e.push(t.innerHTML)});const r=[];n&&r.push(n),o&&r.push(o),r.forEach(t=>{t.querySelectorAll("tr").forEach(t=>{t.querySelectorAll("td, th").forEach((t,n)=>{e[n]&&t.setAttribute("data-label",e[n])})})})}})(e)),document.querySelectorAll(".box .content-toggle__content").forEach(e=>{f(e)}),document.querySelectorAll(".toolbar .content-toggle__content").forEach(e=>{f(e,e=>{(e=>{if(!l("--bp-medium")&&!l("--bp-low-height")){const t=r(parseInt(getComputedStyle(document.documentElement).getPropertyValue("--toolbar-popout-allowed-edge-distance").replace("rem,",""),10)),n=parseInt(getComputedStyle(e).width.replace("px",""),10),o=e.getBoundingClientRect().x,l=document.body.offsetWidth-t-n-o;l<0&&e.style.setProperty("--toolbar-popout-edge-overflow",`${l}px`)}})(e),(()=>{const e=document.querySelector("body");(l("--bp-medium")||l("--bp-low-height"))&&(null==e||e.classList.add("body--no-scroll"))})()},e=>p(v(e)),(e,t)=>{const n=t.getAttribute("aria-expanded"),r=v(e);"true"===n?null==r||r.classList.add("toolbar--has-popout"):null==r||r.classList.remove("toolbar--has-popout"),e.addEventListener("click",e=>{e.target.classList.contains("toolbar__popout")&&!o(e,"toolbar__filter__content")&&(p(r),(()=>{const e=document.querySelector("body");null==e||e.classList.remove("body--no-scroll")})())})})}),window.addEventListener("load",()=>{b=window.innerWidth}),window.addEventListener("resize",()=>{b>0&&window.innerWidth!==b&&(b=window.innerWidth,n.forEach(e=>s(n,e)),m(t))})})}])}));
|
|
2
2
|
//# sourceMappingURL=app.js.map
|