@aarhus-university/au-designsystem-delphinus 0.25.0 → 0.26.2
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/.eslintrc.js +35 -0
- package/CHANGELOG.md +40 -0
- package/Gruntfile.js +1 -0
- package/babel.config.js +16 -0
- package/build/figma-tokens/color-themes.json +4 -0
- package/build/figma-tokens/design-file.json +58 -0
- package/build/figma-tokens/design-system.json +58 -0
- package/build/js/app.js +1 -1
- package/build/js/app.js.map +1 -1
- package/{source/js/components/atom-picker.js → build/js/components/atom-picker.ts} +23 -24
- package/build/js/components/content-toggle.ts +46 -0
- package/{source/js/components/copy-hex-code.js → build/js/components/copy-hex-code.ts} +1 -1
- package/{source/js/components/helpers.js → build/js/components/helpers.ts} +12 -17
- package/build/js/components/modal-view.ts +69 -0
- package/{source/js/components/nav.js → build/js/components/nav.ts} +44 -62
- package/{source/js/components/ready.js → build/js/components/ready.ts} +2 -2
- package/{source/js/components/selection-list.js → build/js/components/selection-list.ts} +6 -6
- package/{source/js/components/table.js → build/js/components/table.ts} +4 -3
- package/{source/js/components/tabs.js → build/js/components/tabs.ts} +41 -18
- package/{source/js/components/toolbar.js → build/js/components/toolbar.ts} +8 -8
- package/{source/js/demo/app.js → build/js/demo/app.ts} +5 -3
- package/{source/js/production/app.js → build/js/production/app.ts} +5 -4
- package/build/projects/bachelor-applications/js/app.js +1 -1
- package/build/projects/bachelor-applications/js/app.js.map +1 -1
- package/build/projects/bachelor-applications/style.css +1 -1
- package/build/projects/bachelor-applications/style.css.map +1 -1
- package/build/projects/brightspace/style.css +1 -1
- package/build/projects/brightspace/style.css.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/medarbejdere/style.css +1 -1
- package/build/projects/medarbejdere/style.css.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/mitstudie/style.css +1 -1
- package/build/projects/mitstudie/style.css.map +1 -1
- package/build/projects/typo3/js/typo3.js.map +1 -1
- package/build/projects/typo3/style.css +1 -1
- package/build/projects/typo3/style.css.map +1 -1
- package/build/style.css +1 -1
- package/build/style.css.map +1 -1
- package/package.json +26 -6
- package/source/figma-tokens/borders-widths.json +5 -1
- package/source/figma-tokens/spacing.json +54 -0
- package/source/js/components/atom-picker.ts +140 -0
- package/source/js/components/content-toggle.ts +46 -0
- package/source/js/components/copy-hex-code.ts +15 -0
- package/source/js/components/helpers.ts +45 -0
- package/source/js/components/modal-view.ts +69 -0
- package/source/js/components/nav.ts +169 -0
- package/source/js/components/ready.ts +10 -0
- package/source/js/components/selection-list.ts +37 -0
- package/source/js/components/table.ts +44 -0
- package/source/js/components/tabs.ts +200 -0
- package/source/js/components/toolbar.ts +63 -0
- package/source/js/demo/app.ts +53 -0
- package/source/js/production/app.ts +67 -0
- package/source/style/_mixins/_processing-animation.scss +14 -6
- package/source/style/_mixins/_utility-button.scss +5 -1
- package/source/style/base/_buttons.scss +9 -5
- package/source/style/layout/_row.scss +2 -2
- package/source/style/module/_processing-state.scss +2 -2
- package/tsconfig.json +43 -0
- package/types/common/interfaces.d.ts +10 -0
- package/types/common/main.d.ts +2 -0
- package/types/common/package.json +5 -0
- package/webpack.config.js +49 -13
- package/.eslintrc +0 -19
- package/source/js/components/content-toggle.js +0 -44
- package/source/js/components/modal-view.js +0 -53
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
extends: [
|
|
4
|
+
'airbnb',
|
|
5
|
+
'plugin:@typescript-eslint/eslint-recommended',
|
|
6
|
+
'plugin:@typescript-eslint/recommended',
|
|
7
|
+
],
|
|
8
|
+
plugins: [
|
|
9
|
+
'react',
|
|
10
|
+
'@typescript-eslint',
|
|
11
|
+
],
|
|
12
|
+
parser: '@typescript-eslint/parser',
|
|
13
|
+
rules: {
|
|
14
|
+
'import/extensions': [0],
|
|
15
|
+
'react/jsx-filename-extension': [0],
|
|
16
|
+
'no-use-before-define': [0],
|
|
17
|
+
'@typescript-eslint/no-use-before-define': ['error'],
|
|
18
|
+
'no-shadow': 'off',
|
|
19
|
+
'@typescript-eslint/no-shadow': ['error'],
|
|
20
|
+
'react/no-danger': [0],
|
|
21
|
+
'linebreak-style': [0],
|
|
22
|
+
},
|
|
23
|
+
settings: {
|
|
24
|
+
react: {
|
|
25
|
+
version: 'detect',
|
|
26
|
+
},
|
|
27
|
+
'import/resolver': {
|
|
28
|
+
typescript: {},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
globals: {
|
|
32
|
+
AU: true,
|
|
33
|
+
$: true,
|
|
34
|
+
},
|
|
35
|
+
};
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
## 0.26.2 (May 30, 2022)
|
|
2
|
+
|
|
3
|
+
### Core Delphinus Updates
|
|
4
|
+
* Fixes alignment of processing animation in buttons and `processing-state` component, that could sometimes not be rotating around its' center. Now uses an svg-mask in stead of a D from AU Peto font. This will also prevent the occasional rotating D, if Peto font is not loaded.
|
|
5
|
+
|
|
6
|
+
### Delphinus Projects Updates
|
|
7
|
+
None
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 0.26.1 (May 23, 2022)
|
|
11
|
+
|
|
12
|
+
### Core Delphinus Updates
|
|
13
|
+
* Moved types folder to root and added missing package.json for automatic type recognition in other projects.
|
|
14
|
+
|
|
15
|
+
### Delphinus Projects Updates
|
|
16
|
+
None
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## 0.26.0 (May 23, 2022)
|
|
21
|
+
|
|
22
|
+
### Core Delphinus Updates
|
|
23
|
+
* Added support for Typescript and converted existing scripts to Typescript.
|
|
24
|
+
|
|
25
|
+
### Delphinus Projects Updates
|
|
26
|
+
None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## 0.25.0 (May 19, 2022)
|
|
31
|
+
|
|
32
|
+
### Core Delphinus Updates
|
|
33
|
+
* Added stepper component <https://delphinus.au.dk/components/stepper>.
|
|
34
|
+
* Fix missing red border on invalid checkbox and radiobutton input.
|
|
35
|
+
|
|
36
|
+
### Delphinus Projects Updates
|
|
37
|
+
None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
1
41
|
## 0.24.1 (April 21, 2022)
|
|
2
42
|
|
|
3
43
|
### Core Delphinus Updates
|
package/Gruntfile.js
CHANGED
package/babel.config.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
presets: [
|
|
3
|
+
'@babel/react',
|
|
4
|
+
'@babel/preset-typescript',
|
|
5
|
+
],
|
|
6
|
+
plugins: [
|
|
7
|
+
'@babel/plugin-proposal-object-rest-spread',
|
|
8
|
+
'@babel/plugin-proposal-optional-chaining',
|
|
9
|
+
['prismjs', {
|
|
10
|
+
languages: ['javascript', 'css', 'markup', 'jsx', 'pug'],
|
|
11
|
+
plugins: ['line-numbers'],
|
|
12
|
+
theme: 'tomorrow',
|
|
13
|
+
css: true,
|
|
14
|
+
}],
|
|
15
|
+
],
|
|
16
|
+
};
|
|
@@ -264,6 +264,10 @@
|
|
|
264
264
|
"BorderDefaultWidth": {
|
|
265
265
|
"value": "$borderWidths.Default",
|
|
266
266
|
"type": "spacing"
|
|
267
|
+
},
|
|
268
|
+
"BorderSlimWidth": {
|
|
269
|
+
"value": "$borderWidths.Slim",
|
|
270
|
+
"type": "spacing"
|
|
267
271
|
}
|
|
268
272
|
},
|
|
269
273
|
"spuareCircleSpacings": {
|
|
@@ -271,18 +275,34 @@
|
|
|
271
275
|
"value": "$otherSizes.SquareCircleCenter / -2 + $spacingSizes.Minus5 + $lineHieghts.Singleline.Default / 2",
|
|
272
276
|
"type": "spacing"
|
|
273
277
|
},
|
|
278
|
+
"Minus5AndSinglelineSmall": {
|
|
279
|
+
"value": "$otherSizes.SquareCircleCenter / -2 + $spacingSizes.Minus5 + $lineHieghts.Singleline.Small / 2",
|
|
280
|
+
"type": "spacing"
|
|
281
|
+
},
|
|
274
282
|
"Minus3AndSinglelineLarger": {
|
|
275
283
|
"value": "$otherSizes.SquareCircleCenter / -2 + $spacingSizes.Minus3 + $lineHieghts.Singleline.Larger / 2",
|
|
276
284
|
"type": "spacing"
|
|
277
285
|
},
|
|
286
|
+
"SinglelineSmall": {
|
|
287
|
+
"value": "$otherSizes.SquareCircleCenter / -2 + $lineHieghts.Singleline.Small / 2",
|
|
288
|
+
"type": "spacing"
|
|
289
|
+
},
|
|
278
290
|
"SinglelineDefault": {
|
|
279
291
|
"value": "$otherSizes.SquareCircleCenter / -2 + $lineHieghts.Singleline.Default / 2",
|
|
280
292
|
"type": "spacing"
|
|
281
293
|
},
|
|
294
|
+
"MultilineDefault": {
|
|
295
|
+
"value": "$otherSizes.SquareCircleCenter / -2 + $lineHieghts.Multiline.Default / 2",
|
|
296
|
+
"type": "spacing"
|
|
297
|
+
},
|
|
282
298
|
"SinglelineLarger": {
|
|
283
299
|
"value": "$otherSizes.SquareCircleCenter / -2 + $lineHieghts.Singleline.Larger / 2",
|
|
284
300
|
"type": "spacing"
|
|
285
301
|
},
|
|
302
|
+
"FontsizeLarger": {
|
|
303
|
+
"value": "$otherSizes.SquareCircleCenter / -2 + $fontSizes.Larger / 2",
|
|
304
|
+
"type": "spacing"
|
|
305
|
+
},
|
|
286
306
|
"Plus1": {
|
|
287
307
|
"value": "$otherSizes.SquareCircleCenter / -2 + $spacingSizes.Plus1 / 2",
|
|
288
308
|
"type": "spacing"
|
|
@@ -426,6 +446,40 @@
|
|
|
426
446
|
}
|
|
427
447
|
}
|
|
428
448
|
},
|
|
449
|
+
"SubtractSpacings": {
|
|
450
|
+
"Minus5From": {
|
|
451
|
+
"Minus4": {
|
|
452
|
+
"value": "$spacingSizes.Minus4 - $spacingSizes.Minus5",
|
|
453
|
+
"type": "spacing"
|
|
454
|
+
},
|
|
455
|
+
"Minus4AndSlimBorderWidth": {
|
|
456
|
+
"value": "$spacingsPlusBorderWidth.slimBorderWidth.Minus4 - $spacingSizes.Minus5",
|
|
457
|
+
"type": "spacing"
|
|
458
|
+
},
|
|
459
|
+
"Minus3": {
|
|
460
|
+
"value": "$spacingSizes.Minus3 - $spacingSizes.Minus5",
|
|
461
|
+
"type": "spacing"
|
|
462
|
+
},
|
|
463
|
+
"Minus3AndSlimBorderWidth": {
|
|
464
|
+
"value": "$spacingsPlusBorderWidth.slimBorderWidth.Minus3 - $spacingSizes.Minus5",
|
|
465
|
+
"type": "spacing"
|
|
466
|
+
},
|
|
467
|
+
"Minus2": {
|
|
468
|
+
"value": "$spacingSizes.Minus2 - $spacingSizes.Minus5",
|
|
469
|
+
"type": "spacing"
|
|
470
|
+
},
|
|
471
|
+
"Minus2AndSlimBorderWidth": {
|
|
472
|
+
"value": "$spacingsPlusBorderWidth.slimBorderWidth.Minus2 - $spacingSizes.Minus5",
|
|
473
|
+
"type": "spacing"
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
"Minus4From": {
|
|
477
|
+
"Minus3": {
|
|
478
|
+
"value": "$spacingSizes.Minus3 - $spacingSizes.Minus4",
|
|
479
|
+
"type": "spacing"
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
},
|
|
429
483
|
"blurSizes": {
|
|
430
484
|
"Default": {
|
|
431
485
|
"value": "3.2",
|
|
@@ -1179,6 +1233,10 @@
|
|
|
1179
1233
|
"value": "$spacingSizes.Plus1 / 2",
|
|
1180
1234
|
"type": "borderWidth"
|
|
1181
1235
|
},
|
|
1236
|
+
"HalfMultilineDefault": {
|
|
1237
|
+
"value": "$lineHieghts.Multiline.Default / 2",
|
|
1238
|
+
"type": "borderWidth"
|
|
1239
|
+
},
|
|
1182
1240
|
"Zero": {
|
|
1183
1241
|
"value": "$spacingSizes.Zero",
|
|
1184
1242
|
"type": "borderWidth"
|
|
@@ -664,6 +664,10 @@
|
|
|
664
664
|
"BorderDefaultWidth": {
|
|
665
665
|
"value": "$borderWidths.Default",
|
|
666
666
|
"type": "spacing"
|
|
667
|
+
},
|
|
668
|
+
"BorderSlimWidth": {
|
|
669
|
+
"value": "$borderWidths.Slim",
|
|
670
|
+
"type": "spacing"
|
|
667
671
|
}
|
|
668
672
|
},
|
|
669
673
|
"spuareCircleSpacings": {
|
|
@@ -671,18 +675,34 @@
|
|
|
671
675
|
"value": "$otherSizes.SquareCircleCenter / -2 + $spacingSizes.Minus5 + $lineHieghts.Singleline.Default / 2",
|
|
672
676
|
"type": "spacing"
|
|
673
677
|
},
|
|
678
|
+
"Minus5AndSinglelineSmall": {
|
|
679
|
+
"value": "$otherSizes.SquareCircleCenter / -2 + $spacingSizes.Minus5 + $lineHieghts.Singleline.Small / 2",
|
|
680
|
+
"type": "spacing"
|
|
681
|
+
},
|
|
674
682
|
"Minus3AndSinglelineLarger": {
|
|
675
683
|
"value": "$otherSizes.SquareCircleCenter / -2 + $spacingSizes.Minus3 + $lineHieghts.Singleline.Larger / 2",
|
|
676
684
|
"type": "spacing"
|
|
677
685
|
},
|
|
686
|
+
"SinglelineSmall": {
|
|
687
|
+
"value": "$otherSizes.SquareCircleCenter / -2 + $lineHieghts.Singleline.Small / 2",
|
|
688
|
+
"type": "spacing"
|
|
689
|
+
},
|
|
678
690
|
"SinglelineDefault": {
|
|
679
691
|
"value": "$otherSizes.SquareCircleCenter / -2 + $lineHieghts.Singleline.Default / 2",
|
|
680
692
|
"type": "spacing"
|
|
681
693
|
},
|
|
694
|
+
"MultilineDefault": {
|
|
695
|
+
"value": "$otherSizes.SquareCircleCenter / -2 + $lineHieghts.Multiline.Default / 2",
|
|
696
|
+
"type": "spacing"
|
|
697
|
+
},
|
|
682
698
|
"SinglelineLarger": {
|
|
683
699
|
"value": "$otherSizes.SquareCircleCenter / -2 + $lineHieghts.Singleline.Larger / 2",
|
|
684
700
|
"type": "spacing"
|
|
685
701
|
},
|
|
702
|
+
"FontsizeLarger": {
|
|
703
|
+
"value": "$otherSizes.SquareCircleCenter / -2 + $fontSizes.Larger / 2",
|
|
704
|
+
"type": "spacing"
|
|
705
|
+
},
|
|
686
706
|
"Plus1": {
|
|
687
707
|
"value": "$otherSizes.SquareCircleCenter / -2 + $spacingSizes.Plus1 / 2",
|
|
688
708
|
"type": "spacing"
|
|
@@ -826,6 +846,40 @@
|
|
|
826
846
|
}
|
|
827
847
|
}
|
|
828
848
|
},
|
|
849
|
+
"SubtractSpacings": {
|
|
850
|
+
"Minus5From": {
|
|
851
|
+
"Minus4": {
|
|
852
|
+
"value": "$spacingSizes.Minus4 - $spacingSizes.Minus5",
|
|
853
|
+
"type": "spacing"
|
|
854
|
+
},
|
|
855
|
+
"Minus4AndSlimBorderWidth": {
|
|
856
|
+
"value": "$spacingsPlusBorderWidth.slimBorderWidth.Minus4 - $spacingSizes.Minus5",
|
|
857
|
+
"type": "spacing"
|
|
858
|
+
},
|
|
859
|
+
"Minus3": {
|
|
860
|
+
"value": "$spacingSizes.Minus3 - $spacingSizes.Minus5",
|
|
861
|
+
"type": "spacing"
|
|
862
|
+
},
|
|
863
|
+
"Minus3AndSlimBorderWidth": {
|
|
864
|
+
"value": "$spacingsPlusBorderWidth.slimBorderWidth.Minus3 - $spacingSizes.Minus5",
|
|
865
|
+
"type": "spacing"
|
|
866
|
+
},
|
|
867
|
+
"Minus2": {
|
|
868
|
+
"value": "$spacingSizes.Minus2 - $spacingSizes.Minus5",
|
|
869
|
+
"type": "spacing"
|
|
870
|
+
},
|
|
871
|
+
"Minus2AndSlimBorderWidth": {
|
|
872
|
+
"value": "$spacingsPlusBorderWidth.slimBorderWidth.Minus2 - $spacingSizes.Minus5",
|
|
873
|
+
"type": "spacing"
|
|
874
|
+
}
|
|
875
|
+
},
|
|
876
|
+
"Minus4From": {
|
|
877
|
+
"Minus3": {
|
|
878
|
+
"value": "$spacingSizes.Minus3 - $spacingSizes.Minus4",
|
|
879
|
+
"type": "spacing"
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
},
|
|
829
883
|
"shadowSizes": {
|
|
830
884
|
"Front": {
|
|
831
885
|
"X": {
|
|
@@ -1711,6 +1765,10 @@
|
|
|
1711
1765
|
"value": "$spacingSizes.Plus1 / 2",
|
|
1712
1766
|
"type": "borderWidth"
|
|
1713
1767
|
},
|
|
1768
|
+
"HalfMultilineDefault": {
|
|
1769
|
+
"value": "$lineHieghts.Multiline.Default / 2",
|
|
1770
|
+
"type": "borderWidth"
|
|
1771
|
+
},
|
|
1714
1772
|
"Zero": {
|
|
1715
1773
|
"value": "$spacingSizes.Zero",
|
|
1716
1774
|
"type": "borderWidth"
|
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 r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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);
|
|
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 r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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 r=(e,t)=>{let n=!1;return e.composedPath().forEach(e=>{e.classList&&e.classList.contains(t)&&(n=!0)}),n},o=e=>{const t=e.parentElement;return t?t.classList.contains("nav")?t:o(t):e},a=(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"))})},l=e=>{document.querySelectorAll(".nav__toggle").forEach(t=>{t.addEventListener("click",()=>{const n=(e=>{const t=o(e),n=t.querySelector(".nav__items"),r=null==n?void 0:n.querySelector(".nav__item:last-of-type");null==n||n.classList.add("nav__items--fadeout");const a=null==n?void 0:n.querySelector(".nav__item");a&&a.focus();const l=()=>{t.classList.toggle("nav--toggled"),null==n||n.classList.remove("nav__items--fadeout"),null==r||r.removeEventListener("transitionend",l)};return null==r||r.addEventListener("transitionend",l),t})(t),r=t.getAttribute("aria-expanded");t.setAttribute("aria-expanded","false"===r?"true":"false"),a(e,n)})})},i=(e,t)=>{var n;t.classList.remove("nav--toggled");const o=t.querySelector(".nav__items");if(o){const e=o.querySelectorAll(".nav__item"),n="nav__item--is-overflown",r="nav--has-overflow",a="nav__item--active";let l=!1;for(let o=e.length-1;o>=0;o-=1){const i=e[o];i.offsetTop>0?(i.classList.add(n),t.classList.add(r),l=!0):i.classList.contains(a)||i.classList.remove(n)}if(!l){t.classList.remove(r);const e=t.querySelector(`.${a}`);e&&e.classList.remove(n)}}null===(n=document.querySelector("body"))||void 0===n||n.addEventListener("click",t=>{t.target.classList.contains("nav__toggle")||r(t,"nav__items")||a(e)})},c=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},s=(e,t,n,r,o,a=!0,l=(e=>console.log(e)))=>{a&&r.focus(),r.removeAttribute("tabindex"),r.setAttribute("aria-selected","true"),r.classList.add("nav__item--active"),n&&(n.removeAttribute("aria-selected"),n.setAttribute("tabindex","-1"),n.classList.remove("nav__item--active"));const i=Array.prototype.indexOf.call(e,r);if(t[i].hidden=!1,n){t[Array.prototype.indexOf.call(e,n)].hidden=!0}r.dispatchEvent(new CustomEvent("switch-tab",{bubbles:!0,detail:{tab:i}})),l(i)};let d=0;const u=[],f=()=>{u.forEach((e,t)=>{const{rendered:n,domElement:r}=e;if(c(r.classList)){if(!n){const n=r.getAttribute("data-focus-onload"),o=r.getAttribute("data-initial-tab");((e,t,n=0,r=!0,o=(e=>console.log(e)))=>{const a=t.querySelector(".nav__items"),l=a.querySelectorAll("a"),i=[];t.querySelectorAll("section").forEach(e=>{e.parentNode===t&&i.push(e)});const c=t.querySelector("button.tabbed-content__expand-all");if(c){const e=()=>{a.hidden=!0,i.forEach(e=>{e.hidden=!1})};c.removeEventListener("click",e),c.addEventListener("click",e)}a.setAttribute("role","tablist"),l.forEach((n,r)=>{var c;n.setAttribute("role","tab"),n.setAttribute("id",`tab${e}_${r+1}`),n.setAttribute("tabindex","-1"),null===(c=n.parentElement)||void 0===c||c.setAttribute("role","presentation");const d=e=>{e.preventDefault();const n=a.querySelector("[aria-selected]");e.currentTarget!==n&&s(l,i,n,e.currentTarget,t.classList,!0,e=>{o(e)})};n.removeEventListener("click",d),n.addEventListener("click",d);const u=e=>{const n=Array.prototype.indexOf.call(l,e.currentTarget);let a=null;"ArrowLeft"===e.key&&(a=n-1),"ArrowRight"===e.key&&(a=n+1),"ArrowDown"===e.key&&(a="down"),null!==a&&(e.preventDefault(),"down"===a?i[r].focus():l[a]&&s(l,i,e.currentTarget,l[a],t.classList,!0,e=>{o(e)}))};n.removeEventListener("keydown",u),n.addEventListener("keydown",u)}),i.forEach((e,t)=>{e.setAttribute("tabindex","-1"),e.setAttribute("aria-labelledby",l[t].id),e.hidden=!0,e.setAttribute("role","tabpanel")}),n>-1&&s(l,i,null,l[n],t.classList,r)})(t,r,o?parseInt(o,10):0,"false"!==n),e.rendered=!0}}else n&&((e=>{const t=e.querySelector(".nav__items"),n=null==t?void 0:t.querySelectorAll("a"),r=[];e.querySelectorAll("section").forEach(t=>{t.parentNode===e&&r.push(t)}),null==n||n.forEach(e=>{e.removeAttribute("aria-selected"),e.classList.remove("nav__item--active")}),r.forEach(e=>{e.hidden=!1,e.removeAttribute("role")})})(r),e.rendered=!1)})};(e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)})(()=>{document.querySelectorAll(".tabbed-content").forEach(e=>u.push({domElement:e,rendered:!1})),f(),(()=>{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=>i(e,t)),l(e),document.querySelectorAll(".table--wrap-medium-width, .table--wrap-default-width").forEach(e=>(e=>{const t=e.querySelector("thead"),n=e.querySelector("tbody"),r=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 o=[];n&&o.push(n),r&&o.push(r),o.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=>{var t;const n=(t,n,r)=>{if(n){r&&n.focus();const o=()=>{e.setAttribute("hidden","hidden"),t.removeAttribute("hidden"),t.setAttribute("aria-expanded","false"),t.focus()};n.removeEventListener("click",o),n.addEventListener("click",o)}},r=null==e?void 0:null===(t=e.parentElement)||void 0===t?void 0:t.querySelector(".content-toggle__toggle"),o=e.querySelector(".content-toggle__close");r&&(r.addEventListener("click",()=>{const t=r.getAttribute("aria-expanded");r.setAttribute("aria-expanded","false"===t?"true":"false"),"true"===t?e.setAttribute("hidden","hidden"):e.removeAttribute("hidden"),r.hasAttribute("aria-haspopup")&&(r.setAttribute("hidden","hidden"),n(r,o,!0))}),n(r,o,!1))})(e)}),window.addEventListener("load",()=>{d=window.innerWidth}),window.addEventListener("resize",()=>{d>0&&window.innerWidth!==d&&(d=window.innerWidth,e.forEach(t=>i(e,t)),f())})})}])}));
|
|
2
2
|
//# sourceMappingURL=app.js.map
|
package/build/js/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./source/js/components/ready.js","webpack:///./source/js/components/helpers.js","webpack:///./source/js/components/nav.js","webpack:///./source/js/components/table.js","webpack:///./source/js/components/tabs.js","webpack:///./source/js/production/app.js","webpack:///./source/js/components/content-toggle.js"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","fn","document","attachEvent","readyState","addEventListener","isElementWithClassNameInEventPath","event","className","found","path","composedPath","forEach","classList","contains","findNav","element","parent","parentNode","closeResponsiveNav","navElements","keepOpen","button","querySelector","focus","setAttribute","remove","setResponsiveToggle","querySelectorAll","nav","navItems","lastNavItem","add","firstElement","transitionListener","toggle","removeEventListener","toggleMenu","ariaExpanded","getAttribute","setResponsiveNav","navElement","navItemsParent","isOverflownClass","hasOverflowClass","isActiveClass","hasOverflown","length","offsetTop","isActive","e","target","w","Event","this","push","isBelowViewportLimit","widthInRem","Math","max","documentElement","clientWidth","innerWidth","parseInt","getComputedStyle","fontSize","replace","getBaseFontSize","mediaWidth","getPropertyValue","getMediaWidthBasedOnModifier","switchTab","tabs","panels","oldTab","newTab","callback","removeAttribute","index","Array","indexOf","hidden","windowInnerWidth","tabbedObjects","setTabs","tabObject","rendered","domElement","dataInitial","tabbed","initial","tablist","section","expandAll","expandAllEvent","panel","tab","tabClickEvent","preventDefault","currentTab","currentTarget","tabIndex","tabKeyEvent","dir","id","setTabbedContent","destroyTabs","body","bgColor","existingMeta","content","meta","createElement","getElementsByTagName","appendChild","setMetaThemeColor","table","head","foot","headers","h","innerHTML","rowContainers","rc","tr","cell","setResponsiveTable","setContentClose","contentClose","click","hasAttribute","setContentToggle"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,O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OG,aAAa,iBAAiB,GACrCH,EAAOE,SAETwG,EAAa5F,oBAAoB,QAAS6F,GAC1CD,EAAa3H,iBAAiB,QAAS4H,KAIrC3G,EAASwF,EAAQ5F,WAAWK,cAAc,2BAC1CyG,EAAelB,EAAQvF,cAAc,0BAE3CD,EAAOjB,iBAAiB,QAAS,KAC/B,MAAMiC,EAAehB,EAAOiB,aAAa,iBACzCjB,EAAOG,aAAa,gBAAkC,UAAjBa,GAChB,SAAjBA,EACFwE,EAAQrF,aAAa,SAAU,UAE/BqF,EAAQjC,gBAAgB,UAGtBvD,EAAO4G,aAAa,mBACtB5G,EAAOG,aAAa,SAAU,UAC9BsG,EAAgBzG,EAAQ0G,GAAc,MAI1CD,EAAgBzG,EAAQ0G,GAAc,IDcpCG,CAAiBhG,KAGnBrE,OAAOuC,iBAAiB,OAAQ,KAC9B6E,EAAmBpH,OAAOgG,aAG5BhG,OAAOuC,iBAAiB,SAAU,KAC5B6E,EAAmB,GAAKpH,OAAOgG,aAAeoB,IAChDA,EAAmBpH,OAAOgG,WAC1B1C,EAAYR,QAASlB,GAAM8C,EAAiBpB,EAAa1B,IACzD0F","file":"app.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* eslint-env browser */\nconst ready = (fn) => {\n if (document.attachEvent ? document.readyState === 'complete' : document.readyState !== 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n};\n\nexport default ready;\n","/* eslint-disable wrap-iife */\n/* eslint-disable import/prefer-default-export */\n/* eslint-env browser */\nconst copyToClipboard = (str) => {\n const el = document.createElement('textarea');\n el.value = str;\n document.body.appendChild(el);\n el.select();\n document.execCommand('copy');\n document.body.removeChild(el);\n};\n\n// planket fra https://hackernoon.com/copying-text-to-clipboard-with-javascript-df4d4988697f\n\nconst isElementWithClassNameInEventPath = (event, className) => {\n let found = false;\n const path = event.path || (event.composedPath && event.composedPath());\n path.forEach((p) => {\n if (p.classList) {\n if (p.classList.contains(className)) {\n found = true;\n }\n }\n });\n return found;\n};\n\nconst getBaseFontSize = () => parseInt(window.getComputedStyle(document.documentElement).fontSize.replace('px', ''), 10);\nconst setMetaThemeColor = () => {\n const body = document.querySelector('body');\n if (body) {\n const bgColor = window.getComputedStyle(body).getPropertyValue('--color-background');\n const existingMeta = document.querySelector('meta[name=\"theme-color\"]');\n if (existingMeta) {\n existingMeta.content = bgColor;\n } else {\n const meta = document.createElement('meta');\n meta.name = 'theme-color';\n meta.content = bgColor;\n document.getElementsByTagName('head')[0].appendChild(meta);\n }\n }\n};\n\nexport {\n copyToClipboard,\n isElementWithClassNameInEventPath,\n getBaseFontSize,\n setMetaThemeColor,\n};\n","/* eslint-env browser */\nimport { copyToClipboard, isElementWithClassNameInEventPath } from './helpers';\n\nconst findNav = (element) => {\n const parent = element.parentNode;\n if (parent.classList.contains('nav')) {\n return parent;\n }\n return findNav(parent);\n};\n\nconst closeResponsiveNav = (navElements, keepOpen = null) => {\n const navToggledClass = 'nav--toggled';\n navElements.forEach((n) => {\n const button = n.querySelector('.nav__toggle');\n if (n !== keepOpen) {\n if (n.classList.contains(navToggledClass)) {\n button.focus();\n button.setAttribute('aria-expanded', false);\n }\n n.classList.remove(navToggledClass);\n }\n });\n};\n\nconst setResponsiveToggle = (navElements) => {\n const toggleMenu = (button) => {\n const parent = findNav(button);\n\n const navItems = parent.querySelector('.nav__items');\n const lastNavItem = navItems.querySelector('.nav__item:last-of-type');\n navItems.classList.add('nav__items--fadeout');\n const firstElement = navItems.querySelector('.nav__item');\n if (firstElement) {\n firstElement.focus();\n }\n\n const transitionListener = () => {\n parent.classList.toggle('nav--toggled');\n navItems.classList.remove('nav__items--fadeout');\n lastNavItem.removeEventListener('transitionend', transitionListener);\n };\n\n lastNavItem.addEventListener('transitionend', transitionListener);\n return parent;\n };\n\n const toggle = document.querySelectorAll('.nav__toggle');\n toggle.forEach((button) => {\n button.addEventListener('click', () => {\n const nav = toggleMenu(button);\n const ariaExpanded = button.getAttribute('aria-expanded');\n button.setAttribute('aria-expanded', ariaExpanded === 'false');\n closeResponsiveNav(navElements, nav);\n });\n });\n};\n\nconst setResponsiveNav = (navElements, navElement) => {\n const navToggledClass = 'nav--toggled';\n const navItemsClass = 'nav__items';\n // gitlab #117\n navElement.classList.remove(navToggledClass);\n const navItemsParent = navElement.querySelector(`.${navItemsClass}`);\n\n if (navItemsParent) {\n const navItems = navItemsParent.querySelectorAll('.nav__item');\n const isOverflownClass = 'nav__item--is-overflown';\n const hasOverflowClass = 'nav--has-overflow';\n const isActiveClass = 'nav__item--active';\n let hasOverflown = false;\n\n for (let i = navItems.length - 1; i >= 0; i -= 1) {\n const nav = navItems[i];\n const top = nav.offsetTop;\n\n if (top > 0) {\n nav.classList.add(isOverflownClass);\n navElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n } else if (!nav.classList.contains(isActiveClass)) {\n nav.classList.remove(isOverflownClass);\n }\n }\n\n if (!hasOverflown) {\n navElement.classList.remove(hasOverflowClass);\n const isActive = navElement.querySelector(`.${isActiveClass}`);\n if (isActive) {\n isActive.classList.remove(isOverflownClass);\n }\n }\n }\n\n // gitlab #115\n document.querySelector('body').addEventListener('click', (e) => {\n if (!e.target.classList.contains('nav__toggle')\n && !isElementWithClassNameInEventPath(e, navItemsClass)) {\n closeResponsiveNav(navElements);\n }\n });\n};\n\nconst closeSubNav = (buttons, keepOpen = null) => {\n const subNavClass = 'sub-nav--toggled';\n buttons.forEach((button) => {\n if (button !== keepOpen) {\n if (button.parentNode.classList.contains(subNavClass)) {\n button.focus();\n button.setAttribute('aria-expanded', false);\n }\n button.parentNode.classList.remove(subNavClass);\n }\n });\n};\n\nconst setSubNavToggle = (buttons, button) => {\n const subNavClass = 'sub-nav--toggled';\n button.addEventListener('click', () => {\n button.parentNode.classList.toggle(subNavClass);\n if (button.parentNode.classList.contains(subNavClass)) {\n button.setAttribute('aria-expanded', true);\n } else {\n button.setAttribute('aria-expanded', false);\n }\n closeSubNav(buttons, button);\n });\n\n // gitlab #115\n document.querySelector('body').addEventListener('click', (e) => {\n if (!isElementWithClassNameInEventPath(e, 'sub-nav')) {\n closeSubNav(buttons);\n }\n });\n};\n\nconst setCopyToClipboard = (lang = 'da') => {\n const copySpans = document.querySelectorAll('.copy-to-clipboard__this');\n copySpans.forEach((span) => {\n const parentBtn = span.parentNode;\n const listener = () => {\n const toCopy = span.innerText;\n copyToClipboard(toCopy);\n // eslint-disable-next-line no-param-reassign\n span.innerText = lang === 'da' ? 'Kopieret' : 'Copied';\n parentBtn.removeEventListener('click', listener);\n setTimeout(() => {\n // eslint-disable-next-line no-param-reassign\n span.innerText = toCopy;\n parentBtn.addEventListener('click', listener);\n }, 1200);\n };\n if (parentBtn.classList.contains('copy-to-clipboard')) {\n parentBtn.addEventListener('click', listener);\n }\n });\n};\n\n// Event.composedPath\n// https://gist.github.com/rockinghelvetica/00b9f7b5c97a16d3de75ba99192ff05c\n((e, d, w) => {\n if (!e.composedPath) {\n // eslint-disable-next-line func-names\n e.composedPath = function () {\n if (this.path) {\n return this.path;\n }\n let { target } = this;\n\n this.path = [];\n while (target.parentNode !== null) {\n this.path.push(target);\n target = target.parentNode;\n }\n this.path.push(d, w);\n return this.path;\n };\n }\n})(Event.prototype, document, window);\n\nexport {\n findNav,\n setResponsiveToggle,\n setResponsiveNav,\n setSubNavToggle,\n setCopyToClipboard,\n};\n","/* eslint-disable import/prefer-default-export */\nconst setResponsiveTable = (table) => {\n const head = table.querySelector('thead');\n const body = table.querySelector('tbody');\n const foot = table.querySelector('tfoot');\n\n if (head) {\n const headers = [];\n const ths = head.querySelectorAll('th');\n ths.forEach((h) => {\n if (!h.classList.contains('table__cell--self-explanatory')) {\n headers.push(h.innerHTML); // Because innerText inherits stuff like text-transform\n } else {\n headers.push(''); // If header is self explanatory we do not add it\n }\n });\n\n const rowContainers = []; // Table elements that possibly contains <tr>'s\n if (body) {\n rowContainers.push(body);\n }\n if (foot) {\n rowContainers.push(foot);\n }\n\n rowContainers.forEach((rc) => {\n const rows = rc.querySelectorAll('tr');\n rows.forEach((tr) => {\n const cells = tr.querySelectorAll('td, th');\n cells.forEach((cell, i) => {\n if (headers[i]) {\n // if header is self explanatory we skip (value of array index is '' which is falsy)\n cell.setAttribute('data-label', headers[i]);\n }\n });\n });\n });\n }\n};\n\nexport {\n setResponsiveTable,\n};\n","/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable no-param-reassign */\nimport { getBaseFontSize } from './helpers';\n\nconst getMediaWidthBasedOnModifier = (classList) => {\n if (classList.contains('tabbed-content--hide-tabs-on-medium-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-medium').replace('rem', ''), 10);\n }\n if (classList.contains('tabbed-content--hide-tabs-on-wide-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-wide').replace('rem', ''), 10);\n }\n\n return -1;\n};\n\nconst isBelowViewportLimit = (classList) => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const widthInRem = viewportWidth / getBaseFontSize();\n const mediaWidth = getMediaWidthBasedOnModifier(classList);\n if (mediaWidth > -1) {\n return widthInRem < mediaWidth;\n }\n return true;\n};\n\nconst destroyTabs = (tabbed) => {\n const tablist = tabbed.querySelector('.nav__items');\n const tabs = tablist.querySelectorAll('a');\n const panels = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n tabs.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('nav__item--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst switchTab = (tabs, panels, oldTab, newTab, classList, focus = true, callback = () => { }) => {\n if (focus) {\n newTab.focus();\n }\n // Make the active tab focusable by the user (Tab key)\n newTab.removeAttribute('tabindex');\n // Set the selected state\n newTab.setAttribute('aria-selected', 'true');\n newTab.classList.add('nav__item--active');\n if (oldTab) {\n oldTab.removeAttribute('aria-selected');\n oldTab.setAttribute('tabindex', '-1');\n oldTab.classList.remove('nav__item--active');\n }\n\n const index = Array.prototype.indexOf.call(tabs, newTab);\n\n // Get the indices of the new and old tabs to find the correct\n // tab panels to show and hide\n panels[index].hidden = false;\n if (oldTab) {\n const oldIndex = Array.prototype.indexOf.call(tabs, oldTab);\n panels[oldIndex].hidden = true;\n }\n\n callback(index);\n};\n\nconst setTabbedContent = (key, tabbed, initial = 0, focus = true, callback = () => { }) => {\n const tablist = tabbed.querySelector('.nav__items');\n const tabs = tablist.querySelectorAll('a');\n const panels = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n\n const expandAll = tabbed.querySelector('button.tabbed-content__expand-all');\n if (expandAll) {\n const expandAllEvent = () => {\n tablist.hidden = true;\n panels.forEach((panel) => {\n panel.hidden = false;\n });\n };\n\n expandAll.removeEventListener('click', expandAllEvent);\n expandAll.addEventListener('click', expandAllEvent);\n }\n\n // Add the tablist role to the first <ul> in the .tabbed container\n tablist.setAttribute('role', 'tablist');\n\n // Add semantics are remove user focusability for each tab\n tabs.forEach((tab, i) => {\n tab.setAttribute('role', 'tab');\n tab.setAttribute('id', `tab${key}_${(i + 1)}`);\n tab.setAttribute('tabindex', '-1');\n tab.parentNode.setAttribute('role', 'presentation');\n\n // Handle clicking of tabs for mouse users\n const tabClickEvent = (e) => {\n e.preventDefault();\n const currentTab = tablist.querySelector('[aria-selected]');\n if (e.currentTarget !== currentTab) {\n switchTab(tabs, panels, currentTab, e.currentTarget, tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n };\n\n tab.removeEventListener('click', tabClickEvent);\n tab.addEventListener('click', tabClickEvent);\n\n // Handle keydown events for keyboard users\n const tabKeyEvent = (e) => {\n // Get the index of the current tab in the tabs node list\n const index = Array.prototype.indexOf.call(tabs, e.currentTarget);\n // Work out which key the user is pressing and\n // Calculate the new tab's index where appropriate\n let dir = null;\n if (e.key === 'ArrowLeft') {\n dir = index - 1;\n }\n if (e.key === 'ArrowRight') {\n dir = index + 1;\n }\n if (e.key === 'ArrowDown') {\n dir = 'down';\n }\n if (dir !== null) {\n e.preventDefault();\n // If the down key is pressed, move focus to the open panel,\n // otherwise switch to the adjacent tab\n if (dir === 'down') {\n panels[i].focus();\n } else if (tabs[dir]) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, e.currentTarget, tabs[dir], tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n }\n };\n tab.removeEventListener('keydown', tabKeyEvent);\n tab.addEventListener('keydown', tabKeyEvent);\n });\n\n // Add tab panel semantics and hide them all\n panels.forEach((panel, i) => {\n panel.setAttribute('tabindex', '-1');\n panel.setAttribute('aria-labelledby', tabs[i].id);\n // eslint-disable-next-line no-param-reassign\n panel.hidden = true;\n panel.setAttribute('role', 'tabpanel');\n });\n\n // Initially activate the first tab and reveal the first tab panel\n if (initial > -1) {\n switchTab(tabs, panels, null, tabs[initial], tabbed.classList, focus);\n }\n};\n\nexport {\n setTabbedContent,\n isBelowViewportLimit,\n destroyTabs,\n};\n","/* eslint-disable no-param-reassign */\n/* eslint-env browser */\nimport ready from '../components/ready';\nimport {\n setResponsiveNav,\n setResponsiveToggle,\n} from '../components/nav';\nimport { setResponsiveTable } from '../components/table';\nimport { setTabbedContent, isBelowViewportLimit, destroyTabs } from '../components/tabs';\nimport { setContentToggle } from '../components/content-toggle';\nimport { setMetaThemeColor } from '../components/helpers';\n\nlet windowInnerWidth = 0;\nconst tabbedObjects = [];\n\nconst setTabs = () => {\n tabbedObjects.forEach((tabObject, key) => {\n const { rendered, domElement } = tabObject;\n if (isBelowViewportLimit(domElement.classList)) {\n if (!rendered) {\n const focus = domElement.getAttribute('data-focus-onload');\n const dataInitial = domElement.getAttribute('data-initial-tab');\n const initial = dataInitial ? parseInt(dataInitial, 10) : 0;\n setTabbedContent(key, domElement, initial, focus !== 'false');\n tabObject.rendered = true;\n }\n } else if (rendered) {\n destroyTabs(domElement);\n tabObject.rendered = false;\n }\n });\n};\n\nready(() => {\n const tabbedContent = document.querySelectorAll('.tabbed-content');\n tabbedContent.forEach((tab) => tabbedObjects.push({\n domElement: tab,\n rendered: false,\n }));\n setTabs();\n setMetaThemeColor();\n\n const navElements = document.querySelectorAll('.nav:not(.nav--vertical)');\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setResponsiveToggle(navElements);\n\n const tables = document.querySelectorAll('.table--wrap-medium-width, .table--wrap-default-width');\n tables.forEach((table) => setResponsiveTable(table));\n\n const toggles = document.querySelectorAll('.content-toggle__content');\n toggles.forEach((toggle) => {\n setContentToggle(toggle);\n });\n\n window.addEventListener('load', () => {\n windowInnerWidth = window.innerWidth;\n });\n\n window.addEventListener('resize', () => {\n if (windowInnerWidth > 0 && window.innerWidth !== windowInnerWidth) {\n windowInnerWidth = window.innerWidth;\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setTabs();\n }\n });\n});\n","/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\nconst setContentToggle = (content) => {\n const setContentClose = (button, contentClose, focus) => {\n if (contentClose) {\n if (focus) {\n contentClose.focus();\n }\n const click = () => {\n content.setAttribute('hidden', 'hidden');\n button.removeAttribute('hidden');\n button.setAttribute('aria-expanded', false);\n button.focus();\n };\n contentClose.removeEventListener('click', click);\n contentClose.addEventListener('click', click);\n }\n };\n\n const button = content.parentNode.querySelector('.content-toggle__toggle');\n const contentClose = content.querySelector('.content-toggle__close');\n\n button.addEventListener('click', () => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n button.setAttribute('aria-expanded', ariaExpanded === 'false');\n if (ariaExpanded === 'true') {\n content.setAttribute('hidden', 'hidden');\n } else {\n content.removeAttribute('hidden');\n }\n\n if (button.hasAttribute('aria-haspopup')) {\n button.setAttribute('hidden', 'hidden');\n setContentClose(button, contentClose, true);\n }\n });\n\n setContentClose(button, contentClose, false);\n return button;\n};\n\nexport {\n setContentToggle,\n};\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./source/js/components/helpers.ts","webpack:///./source/js/components/nav.ts","webpack:///./source/js/components/tabs.ts","webpack:///./source/js/production/app.ts","webpack:///./source/js/components/ready.ts","webpack:///./source/js/components/table.ts","webpack:///./source/js/components/content-toggle.ts"],"names":["root","factory","exports","module","define","amd","a","i","window","installedModules","__webpack_require__","moduleId","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","isElementWithClassNameInEventPath","event","className","found","composedPath","forEach","classList","contains","findNav","element","parent","parentElement","closeResponsiveNav","navElements","keepOpen","button","querySelector","focus","setAttribute","remove","setResponsiveToggle","document","querySelectorAll","addEventListener","nav","navItems","lastNavItem","add","firstElement","transitionListener","toggle","removeEventListener","toggleMenu","ariaExpanded","getAttribute","setResponsiveNav","navElement","navItemsParent","isOverflownClass","hasOverflowClass","isActiveClass","hasOverflown","length","offsetTop","isActive","e","target","isBelowViewportLimit","widthInRem","Math","max","documentElement","clientWidth","innerWidth","parseInt","getComputedStyle","fontSize","replace","getBaseFontSize","mediaWidth","getPropertyValue","getMediaWidthBasedOnModifier","switchTab","tabs","panels","oldTab","newTab","_","callback","index","console","log","removeAttribute","Array","indexOf","hidden","dispatchEvent","CustomEvent","bubbles","detail","tab","windowInnerWidth","tabbedObjects","setTabs","tabObject","rendered","domElement","dataInitial","tabbed","initial","tablist","section","parentNode","push","expandAll","expandAllEvent","panel","tabClickEvent","preventDefault","currentTab","currentTarget","tabIndex","tabKeyEvent","dir","id","setTabbedContent","destroyTabs","fn","readyState","ready","body","bgColor","existingMeta","content","meta","createElement","getElementsByTagName","appendChild","setMetaThemeColor","table","head","foot","headers","h","innerHTML","rowContainers","rc","tr","cell","setResponsiveTable","setContentClose","contentClose","click","hasAttribute","setContentToggle"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,SACb,GAAqB,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,OACP,CACJ,IAAIK,EAAIL,IACR,IAAI,IAAIM,KAAKD,GAAuB,iBAAZJ,QAAuBA,QAAUF,GAAMO,GAAKD,EAAEC,IAPxE,CASGC,QAAQ,WACX,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUT,QAGnC,IAAIC,EAASM,EAAiBE,GAAY,CACzCJ,EAAGI,EACHC,GAAG,EACHV,QAAS,IAUV,OANAW,EAAQF,GAAUG,KAAKX,EAAOD,QAASC,EAAQA,EAAOD,QAASQ,GAG/DP,EAAOS,GAAI,EAGJT,EAAOD,QA0Df,OArDAQ,EAAoBK,EAAIF,EAGxBH,EAAoBM,EAAIP,EAGxBC,EAAoBO,EAAI,SAASf,EAASgB,EAAMC,GAC3CT,EAAoBU,EAAElB,EAASgB,IAClCG,OAAOC,eAAepB,EAASgB,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EAAGxG,iBAAiB,MAC5BjB,QAAS0H,IACEA,EAAGzG,iBAAiB,UAC5BjB,QAAQ,CAAC2H,EAAMpK,KACf8J,EAAQ9J,IAEVoK,EAAK9G,aAAa,aAAcwG,EAAQ9J,YFexBqK,CAAmBV,IAE7BlG,SAASC,iBAAiB,4BAClCjB,QAASyB,IGjDOmF,KAAqC,MAC7D,MAAMiB,EAAkB,CAACnH,EAAqBoH,EAA2BlH,KACvE,GAAIkH,EAAc,CACZlH,GACFkH,EAAalH,QAEf,MAAMmH,EAAQ,KACZnB,EAAQ/F,aAAa,SAAU,UAC/BH,EAAOyD,gBAAgB,UACvBzD,EAAOG,aAAa,gBAAiB,SACrCH,EAAOE,SAETkH,EAAapG,oBAAoB,QAASqG,GAC1CD,EAAa5G,iBAAiB,QAAS6G,KAIrCrH,EAASkG,aAAH,YAAGA,EAAStG,qBAAZ,aAAG,EAAwBK,cAAc,2BAC/CmH,EAAelB,EAAQjG,cAAc,0BAEvCD,IACFA,EAAOQ,iBAAiB,QAAS,KAC/B,MAAMU,EAAelB,EAAOmB,aAAa,iBACzCnB,EAAOG,aAAa,gBAAkC,UAAjBe,EAA2B,OAAS,SACpD,SAAjBA,EACFgF,EAAQ/F,aAAa,SAAU,UAE/B+F,EAAQzC,gBAAgB,UAGtBzD,EAAOsH,aAAa,mBACtBtH,EAAOG,aAAa,SAAU,UAC9BgH,EAAgBnH,EAAQoH,GAAc,MAI1CD,EAAgBnH,EAAQoH,GAAc,KHctCG,CAAiBxG,KAGnBjE,OAAO0D,iBAAiB,OAAQ,KAC9B0D,EAAmBpH,OAAOwF,aAG5BxF,OAAO0D,iBAAiB,SAAU,KAC5B0D,EAAmB,GAAKpH,OAAOwF,aAAe4B,IAChDA,EAAmBpH,OAAOwF,WAC1BxC,EAAYR,QAASZ,GAAM0C,EAAiBtB,EAAapB,IACzD0F","file":"app.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/* eslint-disable wrap-iife */\n/* eslint-disable import/prefer-default-export */\n/* eslint-env browser */\nconst copyToClipboard = (str: string): void => {\n // eslint-disable-next-line no-console\n navigator.clipboard.writeText(str).then(() => console.log(`${str} written to clipboard`));\n};\n\nconst isElementWithClassNameInEventPath = (event: MouseEvent, className: string): boolean => {\n let found = false;\n const path = event.composedPath();\n path.forEach((p: EventTarget): void => {\n if ((p as HTMLElement).classList) {\n if ((p as HTMLElement).classList.contains(className)) {\n found = true;\n }\n }\n });\n return found;\n};\n\nconst setMetaThemeColor = (): void => {\n const body = document.querySelector('body');\n if (body) {\n const bgColor = window.getComputedStyle(body).getPropertyValue('--color-background');\n const existingMeta = document.querySelector('meta[name=\"theme-color\"]') as HTMLMetaElement;\n if (existingMeta) {\n existingMeta.content = bgColor;\n } else {\n const meta = document.createElement('meta');\n meta.name = 'theme-color';\n meta.content = bgColor;\n document.getElementsByTagName('head')[0].appendChild(meta);\n }\n }\n};\n\nconst getBaseFontSize = (): number => parseInt(window.getComputedStyle(document.documentElement).fontSize.replace('px', ''), 10);\n\nexport {\n copyToClipboard,\n isElementWithClassNameInEventPath,\n getBaseFontSize,\n setMetaThemeColor,\n};\n","/* eslint-env browser */\nimport { copyToClipboard, isElementWithClassNameInEventPath } from './helpers';\n\nconst findNav = (element: HTMLElement): HTMLElement => {\n const parent = element.parentElement;\n if (parent) {\n if (parent.classList.contains('nav')) {\n return parent;\n }\n return findNav(parent);\n }\n return element;\n};\n\n// eslint-disable-next-line max-len\nconst closeResponsiveNav = (navElements: NodeListOf<Element>, keepOpen: HTMLElement | null = null): void => {\n const navToggledClass = 'nav--toggled';\n navElements.forEach((n) => {\n const button = n.querySelector('.nav__toggle') as HTMLElement;\n if (n !== keepOpen) {\n if (n.classList.contains(navToggledClass)) {\n button.focus();\n button.setAttribute('aria-expanded', 'false');\n }\n n.classList.remove(navToggledClass);\n }\n });\n};\n\nconst setResponsiveToggle = (navElements: NodeListOf<Element>): void => {\n const toggleMenu = (button: HTMLElement) => {\n const parent = findNav(button);\n\n const navItems = parent.querySelector('.nav__items');\n const lastNavItem = navItems?.querySelector('.nav__item:last-of-type');\n navItems?.classList.add('nav__items--fadeout');\n const firstElement = navItems?.querySelector('.nav__item') as HTMLElement;\n if (firstElement) {\n firstElement.focus();\n }\n\n const transitionListener = () => {\n parent.classList.toggle('nav--toggled');\n navItems?.classList.remove('nav__items--fadeout');\n lastNavItem?.removeEventListener('transitionend', transitionListener);\n };\n\n lastNavItem?.addEventListener('transitionend', transitionListener);\n return parent;\n };\n\n const toggle = document.querySelectorAll('.nav__toggle');\n toggle.forEach((button) => {\n button.addEventListener('click', () => {\n const nav = toggleMenu(button as HTMLElement);\n const ariaExpanded = button.getAttribute('aria-expanded');\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n closeResponsiveNav(navElements, nav);\n });\n });\n};\n\nconst setResponsiveNav = (navElements: NodeListOf<Element>, navElement: Element): void => {\n const navToggledClass = 'nav--toggled';\n const navItemsClass = 'nav__items';\n // gitlab #117\n navElement.classList.remove(navToggledClass);\n const navItemsParent = navElement.querySelector(`.${navItemsClass}`);\n\n if (navItemsParent) {\n const navItems = navItemsParent.querySelectorAll('.nav__item');\n const isOverflownClass = 'nav__item--is-overflown';\n const hasOverflowClass = 'nav--has-overflow';\n const isActiveClass = 'nav__item--active';\n let hasOverflown = false;\n\n for (let i = navItems.length - 1; i >= 0; i -= 1) {\n const nav = navItems[i] as HTMLElement;\n const top = nav.offsetTop;\n\n if (top > 0) {\n nav.classList.add(isOverflownClass);\n navElement.classList.add(hasOverflowClass);\n hasOverflown = true;\n } else if (!nav.classList.contains(isActiveClass)) {\n nav.classList.remove(isOverflownClass);\n }\n }\n\n if (!hasOverflown) {\n navElement.classList.remove(hasOverflowClass);\n const isActive = navElement.querySelector(`.${isActiveClass}`);\n if (isActive) {\n isActive.classList.remove(isOverflownClass);\n }\n }\n }\n\n // gitlab #115\n document.querySelector('body')?.addEventListener('click', (e) => {\n if (!(e.target as HTMLElement).classList.contains('nav__toggle')\n && !isElementWithClassNameInEventPath(e, navItemsClass)) {\n closeResponsiveNav(navElements);\n }\n });\n};\n\nconst closeSubNav = (buttons: NodeListOf<Element>, keepOpen: Element | null = null) => {\n const subNavClass = 'sub-nav--toggled';\n buttons.forEach((button) => {\n if (button !== keepOpen) {\n if (button?.parentElement?.classList.contains(subNavClass)) {\n (button as HTMLElement).focus();\n button.setAttribute('aria-expanded', 'false');\n }\n button?.parentElement?.classList.remove(subNavClass);\n }\n });\n};\n\nconst setSubNavToggle = (buttons: NodeListOf<Element>, button: Element): void => {\n const subNavClass = 'sub-nav--toggled';\n button.addEventListener('click', () => {\n button?.parentElement?.classList.toggle(subNavClass);\n if (button?.parentElement?.classList.contains(subNavClass)) {\n button.setAttribute('aria-expanded', 'true');\n } else {\n button.setAttribute('aria-expanded', 'false');\n }\n closeSubNav(buttons, button);\n });\n\n // gitlab #115\n document.querySelector('body')?.addEventListener('click', (e) => {\n if (!isElementWithClassNameInEventPath(e, 'sub-nav')) {\n closeSubNav(buttons);\n }\n });\n};\n\nconst setCopyToClipboard = (lang = 'da'): void => {\n const copySpans = document.querySelectorAll('.copy-to-clipboard__this') as NodeListOf<HTMLElement>;\n copySpans.forEach((span) => {\n const parentBtn = span.parentNode as HTMLElement;\n const listener = () => {\n const toCopy = span.innerText;\n copyToClipboard(toCopy);\n // eslint-disable-next-line no-param-reassign\n span.innerText = lang === 'da' ? 'Kopieret' : 'Copied';\n parentBtn?.removeEventListener('click', listener);\n setTimeout(() => {\n // eslint-disable-next-line no-param-reassign\n span.innerText = toCopy;\n parentBtn?.addEventListener('click', listener);\n }, 1200);\n };\n if (parentBtn?.classList.contains('copy-to-clipboard')) {\n parentBtn?.addEventListener('click', listener);\n }\n });\n};\n\nexport {\n findNav,\n setResponsiveToggle,\n setResponsiveNav,\n setSubNavToggle,\n setCopyToClipboard,\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable no-param-reassign */\nimport { getBaseFontSize } from './helpers';\n\nconst getMediaWidthBasedOnModifier = (classList: DOMTokenList): number => {\n if (classList.contains('tabbed-content--hide-tabs-on-medium-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-medium').replace('rem', ''), 10);\n }\n if (classList.contains('tabbed-content--hide-tabs-on-wide-width')) {\n return parseInt(getComputedStyle(document.documentElement).getPropertyValue('--bp-wide').replace('rem', ''), 10);\n }\n\n return -1;\n};\n\nconst isBelowViewportLimit = (classList: DOMTokenList): boolean => {\n const viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n const widthInRem = viewportWidth / getBaseFontSize();\n const mediaWidth = getMediaWidthBasedOnModifier(classList);\n if (mediaWidth > -1) {\n return widthInRem < mediaWidth;\n }\n return true;\n};\n\nconst destroyTabs = (tabbed: Element): void => {\n const tablist = tabbed.querySelector('.nav__items');\n const tabs = tablist?.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n tabs?.forEach((tab) => {\n tab.removeAttribute('aria-selected');\n tab.classList.remove('nav__item--active');\n });\n\n panels.forEach((panel) => {\n panel.hidden = false;\n panel.removeAttribute('role');\n });\n};\n\nconst switchTab = (\n tabs: NodeListOf<HTMLAnchorElement>,\n panels: HTMLElement[],\n oldTab: Element | null,\n newTab: HTMLElement,\n _: DOMTokenList,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number): void => console.log(index),\n): void => {\n if (focus) {\n newTab.focus();\n }\n // Make the active tab focusable by the user (Tab key)\n newTab.removeAttribute('tabindex');\n // Set the selected state\n newTab.setAttribute('aria-selected', 'true');\n newTab.classList.add('nav__item--active');\n if (oldTab) {\n oldTab.removeAttribute('aria-selected');\n oldTab.setAttribute('tabindex', '-1');\n oldTab.classList.remove('nav__item--active');\n }\n\n const index = Array.prototype.indexOf.call(tabs, newTab);\n\n // Get the indices of the new and old tabs to find the correct\n // tab panels to show and hide\n panels[index].hidden = false;\n if (oldTab) {\n const oldIndex = Array.prototype.indexOf.call(tabs, oldTab);\n panels[oldIndex].hidden = true;\n }\n\n // Dispatches custom event on every tab change\n newTab.dispatchEvent(new CustomEvent('switch-tab', {\n bubbles: true,\n detail: { tab: index },\n }));\n callback(index);\n};\n\nconst setTabbedContent = (\n key: number,\n tabbed: Element,\n initial = 0,\n focus = true,\n // eslint-disable-next-line no-console\n callback = (index: number) => console.log(index),\n): void => {\n const tablist = tabbed.querySelector('.nav__items') as HTMLElement;\n const tabs = tablist.querySelectorAll('a');\n const panels: HTMLElement[] = [];\n const sections = tabbed.querySelectorAll('section');\n sections.forEach((section) => {\n if (section.parentNode === tabbed) {\n panels.push(section);\n }\n });\n\n const expandAll = tabbed.querySelector('button.tabbed-content__expand-all');\n if (expandAll) {\n const expandAllEvent = () => {\n tablist.hidden = true;\n panels.forEach((panel: HTMLElement) => {\n panel.hidden = false;\n });\n };\n\n expandAll.removeEventListener('click', expandAllEvent);\n expandAll.addEventListener('click', expandAllEvent);\n }\n\n // Add the tablist role to the first <ul> in the .tabbed container\n tablist.setAttribute('role', 'tablist');\n\n // Add semantics are remove user focusability for each tab\n tabs.forEach((tab, i) => {\n tab.setAttribute('role', 'tab');\n tab.setAttribute('id', `tab${key}_${(i + 1)}`);\n tab.setAttribute('tabindex', '-1');\n tab.parentElement?.setAttribute('role', 'presentation');\n\n // Handle clicking of tabs for mouse users\n const tabClickEvent = (e: MouseEvent) => {\n e.preventDefault();\n const currentTab = tablist.querySelector('[aria-selected]');\n if (e.currentTarget !== currentTab) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, currentTab, e.currentTarget as HTMLElement, tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n };\n\n tab.removeEventListener('click', tabClickEvent);\n tab.addEventListener('click', tabClickEvent);\n\n // Handle keydown events for keyboard users\n const tabKeyEvent = (e: KeyboardEvent) => {\n // Get the index of the current tab in the tabs node list\n const index = Array.prototype.indexOf.call(tabs, e.currentTarget);\n // Work out which key the user is pressing and\n // Calculate the new tab's index where appropriate\n let dir: number | string | null = null;\n if (e.key === 'ArrowLeft') {\n dir = index - 1;\n }\n if (e.key === 'ArrowRight') {\n dir = index + 1;\n }\n if (e.key === 'ArrowDown') {\n dir = 'down';\n }\n if (dir !== null) {\n e.preventDefault();\n // If the down key is pressed, move focus to the open panel,\n // otherwise switch to the adjacent tab\n if (dir === 'down') {\n panels[i].focus();\n } else if (tabs[dir]) {\n // eslint-disable-next-line max-len\n switchTab(tabs, panels, e.currentTarget as Element, tabs[dir], tabbed.classList, true, (tabIndex) => {\n callback(tabIndex);\n });\n }\n }\n };\n tab.removeEventListener('keydown', tabKeyEvent);\n tab.addEventListener('keydown', tabKeyEvent);\n });\n\n // Add tab panel semantics and hide them all\n panels.forEach((panel: HTMLElement, i: number) => {\n panel.setAttribute('tabindex', '-1');\n panel.setAttribute('aria-labelledby', tabs[i].id);\n // eslint-disable-next-line no-param-reassign\n panel.hidden = true;\n panel.setAttribute('role', 'tabpanel');\n });\n\n // Initially activate the first tab and reveal the first tab panel\n if (initial > -1) {\n switchTab(tabs, panels, null, tabs[initial], tabbed.classList, focus);\n }\n};\n\nexport {\n setTabbedContent,\n isBelowViewportLimit,\n destroyTabs,\n};\n","/* eslint-disable no-param-reassign */\n/* eslint-env browser */\nimport ready from '../components/ready';\nimport {\n setResponsiveNav,\n setResponsiveToggle,\n} from '../components/nav';\nimport { setMetaThemeColor } from '../components/helpers';\nimport { setResponsiveTable } from '../components/table';\nimport { setTabbedContent, isBelowViewportLimit, destroyTabs } from '../components/tabs';\nimport { setContentToggle } from '../components/content-toggle';\n\nlet windowInnerWidth = 0;\n\nconst tabbedObjects: ITabbedObject[] = [];\n\nconst setTabs = (): void => {\n tabbedObjects.forEach((tabObject: ITabbedObject, key: number): void => {\n const { rendered, domElement } = tabObject;\n if (isBelowViewportLimit(domElement.classList)) {\n if (!rendered) {\n const focus = domElement.getAttribute('data-focus-onload');\n const dataInitial = domElement.getAttribute('data-initial-tab');\n const initial = dataInitial ? parseInt(dataInitial, 10) : 0;\n setTabbedContent(key, domElement, initial, focus !== 'false');\n tabObject.rendered = true;\n }\n } else if (rendered) {\n destroyTabs(domElement);\n tabObject.rendered = false;\n }\n });\n};\n\nready(() => {\n const tabbedContent = document.querySelectorAll('.tabbed-content');\n tabbedContent.forEach((tab) => tabbedObjects.push({\n domElement: tab,\n rendered: false,\n }));\n setTabs();\n setMetaThemeColor();\n\n const navElements = document.querySelectorAll('.nav:not(.nav--vertical)');\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setResponsiveToggle(navElements);\n\n const tables = document.querySelectorAll('.table--wrap-medium-width, .table--wrap-default-width');\n tables.forEach((table) => setResponsiveTable(table));\n\n const toggles = document.querySelectorAll('.content-toggle__content');\n toggles.forEach((toggle) => {\n setContentToggle(toggle);\n });\n\n window.addEventListener('load', () => {\n windowInnerWidth = window.innerWidth;\n });\n\n window.addEventListener('resize', () => {\n if (windowInnerWidth > 0 && window.innerWidth !== windowInnerWidth) {\n windowInnerWidth = window.innerWidth;\n navElements.forEach((n) => setResponsiveNav(navElements, n));\n setTabs();\n }\n });\n});\n","/* eslint-env browser */\nconst ready = (fn: () => void): void => {\n if (document.readyState !== 'loading') {\n fn();\n } else {\n document.addEventListener('DOMContentLoaded', fn);\n }\n};\n\nexport default ready;\n","/* eslint-disable import/prefer-default-export */\nconst setResponsiveTable = (table: Element): void => {\n const head = table.querySelector('thead');\n const body = table.querySelector('tbody');\n const foot = table.querySelector('tfoot');\n\n if (head) {\n const headers: string[] = [];\n const ths = head.querySelectorAll('th');\n ths.forEach((h) => {\n if (!h.classList.contains('table__cell--self-explanatory')) {\n headers.push(h.innerHTML); // Because innerText inherits stuff like text-transform\n } else {\n headers.push(''); // If header is self explanatory we do not add it\n }\n });\n\n const rowContainers: HTMLTableSectionElement[] = [];\n // Table elements that possibly contains <tr>'s\n if (body) {\n rowContainers.push(body);\n }\n if (foot) {\n rowContainers.push(foot);\n }\n\n rowContainers.forEach((rc) => {\n const rows = rc.querySelectorAll('tr');\n rows.forEach((tr) => {\n const cells = tr.querySelectorAll('td, th');\n cells.forEach((cell, i) => {\n if (headers[i]) {\n // if header is self explanatory we skip (value of array index is '' which is falsy)\n cell.setAttribute('data-label', headers[i]);\n }\n });\n });\n });\n }\n};\n\nexport {\n setResponsiveTable,\n};\n","/* eslint-env browser */\n/* eslint-disable import/prefer-default-export */\nconst setContentToggle = (content: Element): Element | null => {\n const setContentClose = (button: HTMLElement, contentClose: HTMLElement, focus: boolean) => {\n if (contentClose) {\n if (focus) {\n contentClose.focus();\n }\n const click = () => {\n content.setAttribute('hidden', 'hidden');\n button.removeAttribute('hidden');\n button.setAttribute('aria-expanded', 'false');\n button.focus();\n };\n contentClose.removeEventListener('click', click);\n contentClose.addEventListener('click', click);\n }\n };\n\n const button = content?.parentElement?.querySelector('.content-toggle__toggle') as HTMLElement;\n const contentClose = content.querySelector('.content-toggle__close') as HTMLElement;\n\n if (button) {\n button.addEventListener('click', () => {\n const ariaExpanded = button.getAttribute('aria-expanded');\n button.setAttribute('aria-expanded', ariaExpanded === 'false' ? 'true' : 'false');\n if (ariaExpanded === 'true') {\n content.setAttribute('hidden', 'hidden');\n } else {\n content.removeAttribute('hidden');\n }\n\n if (button.hasAttribute('aria-haspopup')) {\n button.setAttribute('hidden', 'hidden');\n setContentClose(button, contentClose, true);\n }\n });\n\n setContentClose(button, contentClose, false);\n }\n return button;\n};\n\nexport {\n setContentToggle,\n};\n"],"sourceRoot":""}
|