@designsystem-se/af 39.2.1 → 39.2.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/components/digi-bar-chart.js +67 -17
- package/components/digi-calendar-datepicker.js +1 -1
- package/components/digi-calendar-week-view.js +51 -6
- package/components/digi-calendar.js +1 -1
- package/components/digi-chart-line.js +57 -14
- package/components/digi-navigation-vertical-menu.js +27 -13
- package/components/digi-tablist.js +36 -13
- package/components/{p-CrUxQ9d0.js → p-C5A2t93y.js} +1 -1
- package/dist/cjs/{calendar-week-view-heading-level.enum-NEkm5SUq.js → calendar-week-view-heading-level.enum-BI2f9bbk.js} +7 -0
- package/dist/cjs/digi-arbetsformedlingen.cjs.js +1 -1
- package/dist/cjs/{digi-button_5.cjs.entry.js → digi-badge-notification_8.cjs.entry.js} +436 -7
- package/dist/cjs/digi-bar-chart.cjs.entry.js +67 -17
- package/dist/cjs/digi-calendar-datepicker.cjs.entry.js +1 -2
- package/dist/cjs/digi-calendar_2.cjs.entry.js +1 -1
- package/dist/cjs/digi-chart-line.cjs.entry.js +57 -14
- package/dist/cjs/digi-code-block_3.cjs.entry.js +1 -2
- package/dist/cjs/digi-dialog.cjs.entry.js +1 -2
- package/dist/cjs/digi-footer.cjs.entry.js +1 -2
- package/dist/cjs/digi-form-error-list.cjs.entry.js +1 -2
- package/dist/cjs/digi-form-receipt.cjs.entry.js +1 -2
- package/dist/cjs/digi-form-select-filter.cjs.entry.js +1 -2
- package/dist/cjs/digi-header-navigation.cjs.entry.js +1 -2
- package/dist/cjs/digi-header.cjs.entry.js +1 -2
- package/dist/cjs/digi-navigation-pagination.cjs.entry.js +1 -2
- package/dist/cjs/digi-navigation-vertical-menu.cjs.entry.js +27 -13
- package/dist/cjs/digi-notification-alert.cjs.entry.js +1 -2
- package/dist/cjs/digi-notification-error-page.cjs.entry.js +1 -2
- package/dist/cjs/digi-title-logo.cjs.entry.js +1 -2
- package/dist/cjs/digi-tools-feedback.cjs.entry.js +1 -2
- package/dist/cjs/index-Cn1hHaSy.js +2 -14
- package/dist/cjs/index.cjs.js +6 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/_calendar/calendar/calendar.css +5 -6
- package/dist/collection/components/_calendar/week-view/calendar-week-view.js +53 -8
- package/dist/collection/components/_chart/bar-chart/bar-chart.css +1 -1
- package/dist/collection/components/_chart/bar-chart/bar-chart.js +66 -16
- package/dist/collection/components/_chart/chart-line/chart-line.js +57 -14
- package/dist/collection/components/_navigation/navigation-tablist/navigation-tablist.js +36 -13
- package/dist/collection/components/_navigation/navigation-vertical-menu/navigation-vertical-menu.js +27 -13
- package/dist/collection/design-tokens/components/_logo.variables.scss +2 -0
- package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/index.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/p-0f7e995a.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-26f6a310.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-3b42582a.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-4384644b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-47513f97.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-569c628c.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-668d38d9.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-66f34ca5.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-6cb1c6ea.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-6e256f0c.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-71a8478d.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-9df345c4.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-BBOpiDGx.js +1 -0
- package/dist/digi-arbetsformedlingen/p-a1deddb1.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-beebbc90.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-ee58a938.entry.js → p-c7ade486.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-d065e751.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-d150094c.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-df8efa59.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-e2b0b070.entry.js +1 -0
- package/dist/esm/{calendar-week-view-heading-level.enum-DH_-wpLB.js → calendar-week-view-heading-level.enum-BBOpiDGx.js} +8 -1
- package/dist/esm/digi-arbetsformedlingen.js +1 -1
- package/dist/esm/{digi-button_5.entry.js → digi-badge-notification_8.entry.js} +435 -9
- package/dist/esm/digi-bar-chart.entry.js +67 -17
- package/dist/esm/digi-calendar-datepicker.entry.js +1 -2
- package/dist/esm/digi-calendar_2.entry.js +1 -1
- package/dist/esm/digi-chart-line.entry.js +57 -14
- package/dist/esm/digi-code-block_3.entry.js +1 -2
- package/dist/esm/digi-dialog.entry.js +1 -2
- package/dist/esm/digi-footer.entry.js +1 -2
- package/dist/esm/digi-form-error-list.entry.js +1 -2
- package/dist/esm/digi-form-receipt.entry.js +1 -2
- package/dist/esm/digi-form-select-filter.entry.js +1 -2
- package/dist/esm/digi-header-navigation.entry.js +1 -2
- package/dist/esm/digi-header.entry.js +1 -2
- package/dist/esm/digi-navigation-pagination.entry.js +1 -2
- package/dist/esm/digi-navigation-vertical-menu.entry.js +27 -13
- package/dist/esm/digi-notification-alert.entry.js +1 -2
- package/dist/esm/digi-notification-error-page.entry.js +1 -2
- package/dist/esm/digi-title-logo.entry.js +1 -2
- package/dist/esm/digi-tools-feedback.entry.js +1 -2
- package/dist/esm/index-BnKuq1L7.js +2 -14
- package/dist/esm/index.js +1 -2
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/_calendar/week-view/calendar-week-view.d.ts +4 -2
- package/dist/types/components/_chart/bar-chart/bar-chart.d.ts +4 -2
- package/dist/types/components/_chart/chart-line/chart-line.d.ts +3 -1
- package/dist/types/components/_navigation/navigation-tablist/navigation-tablist.d.ts +4 -2
- package/dist/types/components/_navigation/navigation-vertical-menu/navigation-vertical-menu.d.ts +7 -2
- package/dist/types/components.d.ts +3 -3
- package/hydrate/index.js +236 -64
- package/hydrate/index.mjs +236 -64
- package/package.json +1 -1
- package/dist/cjs/badge-notification-shape.enum-CEyEo2G5.js +0 -8
- package/dist/cjs/digi-badge-notification.cjs.entry.js +0 -65
- package/dist/cjs/digi-tablist-panel.cjs.entry.js +0 -20
- package/dist/cjs/digi-tablist.cjs.entry.js +0 -289
- package/dist/digi-arbetsformedlingen/p-0394e694.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-09b52191.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-0c88f210.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-151248bf.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-26099889.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-52a27991.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-5ee5766d.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-626c1bf5.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-674a7a94.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-6c1fd994.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-7682ad6f.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-7f180ce2.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-88bec555.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-CKoZU0-H.js +0 -1
- package/dist/digi-arbetsformedlingen/p-DH_-wpLB.js +0 -1
- package/dist/digi-arbetsformedlingen/p-a556608d.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-b3410fbd.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-e002ceb8.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-e6ee5a17.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-ec6dd177.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-eee1b91f.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-fea63204.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-ff73fa2f.entry.js +0 -1
- package/dist/esm/badge-notification-shape.enum-CKoZU0-H.js +0 -8
- package/dist/esm/digi-badge-notification.entry.js +0 -63
- package/dist/esm/digi-tablist-panel.entry.js +0 -18
- package/dist/esm/digi-tablist.entry.js +0 -287
|
@@ -1,13 +1,74 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-Cn1hHaSy.js');
|
|
4
|
+
var calendarWeekViewHeadingLevel_enum = require('./calendar-week-view-heading-level.enum-BI2f9bbk.js');
|
|
4
5
|
var randomIdGenerator_util = require('./randomIdGenerator.util-C8XR2Tn1.js');
|
|
5
6
|
var buttonVariation_enum = require('./button-variation.enum-ngMqFLdW.js');
|
|
6
7
|
var buttonType_enum = require('./button-type.enum-2UH0KkO-.js');
|
|
7
8
|
var text = require('./text-Cu3CaHGj.js');
|
|
8
9
|
var index$2 = require('./index-Bdlw-Iuy.js');
|
|
9
|
-
var
|
|
10
|
+
var logger_util = require('./logger.util-DUhrcCTY.js');
|
|
10
11
|
var index$1 = require('./index-Snltmefx.js');
|
|
12
|
+
var navigationTablist_types = require('./navigation-tablist.types-B5QU-sSH.js');
|
|
13
|
+
|
|
14
|
+
const badgeNotificationCss = () => `.sc-digi-badge-notification-h{--digi--badge-notification--color--text:var(--digi--color--text--secondary);--digi--badge-notification--color--border:var(--digi--color--border--notification);--digi--badge-notification--background-color:var(--digi--color--background--notification);--digi--badge-notification--font-weight:var(--digi--global--typography--font-weight--semibold)}.sc-digi-badge-notification-h .digi-badge-notification.sc-digi-badge-notification{font-size:0.75rem;font-weight:var(--digi--badge-notification--font-weight);border-width:var(--digi--border-width--secondary);border-style:solid;color:var(--digi--badge-notification--color--text);background-color:var(--digi--badge-notification--background-color);border-color:var(--BORDER-COLOR)}.sc-digi-badge-notification-h .digi-badge-notification--circle.sc-digi-badge-notification{--BORDER-COLOR:var(--digi--badge-notification--color--border);display:flex;justify-content:center;align-items:center;white-space:nowrap;text-align:center;border-radius:50%;height:1.25rem;width:1.25rem}.sc-digi-badge-notification-h .digi-badge-notification--oval.sc-digi-badge-notification{--BORDER-COLOR:var(--digi--badge-notification--color--border);display:flex;justify-content:center;align-items:center;white-space:nowrap;text-align:center;border-radius:0.75rem;height:1.125rem;width:1.5625rem;padding-left:0.25rem;padding-right:0.25rem}.sc-digi-badge-notification-h .digi-badge-notification--pill.sc-digi-badge-notification{--BORDER-COLOR:var(--digi--badge-notification--color--border);display:inline-block;padding-left:0.5rem;padding-right:0.5rem;border-radius:0.75rem;height:1.125rem}`;
|
|
15
|
+
|
|
16
|
+
const BadgeNotification = class {
|
|
17
|
+
constructor(hostRef) {
|
|
18
|
+
index.registerInstance(this, hostRef);
|
|
19
|
+
this.afShape = calendarWeekViewHeadingLevel_enum.BadgeNotificationShape.PILL;
|
|
20
|
+
/**
|
|
21
|
+
* Värdet som ska skrivas ut i notifieringen.
|
|
22
|
+
* @en The value to be displayed in the badge.
|
|
23
|
+
*/
|
|
24
|
+
this.afValue = '';
|
|
25
|
+
}
|
|
26
|
+
afValueChangeHandler() {
|
|
27
|
+
this.checkProps();
|
|
28
|
+
}
|
|
29
|
+
get cssModifiers() {
|
|
30
|
+
return {
|
|
31
|
+
'digi-badge-notification--circle': this.afShape === calendarWeekViewHeadingLevel_enum.BadgeNotificationShape.CIRCLE,
|
|
32
|
+
'digi-badge-notification--oval': this.afShape === calendarWeekViewHeadingLevel_enum.BadgeNotificationShape.OVAL,
|
|
33
|
+
'digi-badge-notification--pill': this.afShape === calendarWeekViewHeadingLevel_enum.BadgeNotificationShape.PILL
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
componentWillLoad() {
|
|
37
|
+
this.checkProps();
|
|
38
|
+
}
|
|
39
|
+
checkProps() {
|
|
40
|
+
let valueAsNumber;
|
|
41
|
+
if (this.afValue !== null &&
|
|
42
|
+
this.afValue !== undefined &&
|
|
43
|
+
this.afValue !== '') {
|
|
44
|
+
valueAsNumber = Number(this.afValue);
|
|
45
|
+
}
|
|
46
|
+
if (!isNaN(valueAsNumber)) {
|
|
47
|
+
if (valueAsNumber >= 100) {
|
|
48
|
+
this.afValue = '+99';
|
|
49
|
+
this.afShape = calendarWeekViewHeadingLevel_enum.BadgeNotificationShape.PILL;
|
|
50
|
+
}
|
|
51
|
+
else if (valueAsNumber < 100 && valueAsNumber >= 10) {
|
|
52
|
+
this.afShape = calendarWeekViewHeadingLevel_enum.BadgeNotificationShape.OVAL;
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
this.afShape = calendarWeekViewHeadingLevel_enum.BadgeNotificationShape.CIRCLE;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
this.afShape = calendarWeekViewHeadingLevel_enum.BadgeNotificationShape.PILL;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
render() {
|
|
63
|
+
return (index.h(index.Host, { key: '2a3f82fe0bf3d3b43ee858a0184fb7d0045656f7' }, index.h("div", { key: 'f652cc5b76bdc72b4778fd16a1a9d270fe2400ea', class: Object.assign({ 'digi-badge-notification': true }, this.cssModifiers), "aria-label": this.afAriaLabel }, index.h("div", { key: 'ece907bc0004e24eafd221ead41300f7acd803ea', class: `${this.afShape}` }, index.h("span", { key: 'c83210ebbbcad768073095e52b601adc80a0645d' }, this.afValue)))));
|
|
64
|
+
}
|
|
65
|
+
static get watchers() { return {
|
|
66
|
+
"afValue": [{
|
|
67
|
+
"afValueChangeHandler": 0
|
|
68
|
+
}]
|
|
69
|
+
}; }
|
|
70
|
+
};
|
|
71
|
+
BadgeNotification.style = badgeNotificationCss();
|
|
11
72
|
|
|
12
73
|
const buttonCss = () => `@charset "UTF-8";.sc-digi-button-h{--digi--button--color--background--primary--default:var(--digi--color--background--interactive--default--primary);--digi--button--color--background--primary--hover:var(--digi--color--background--interactive--hover--primary);--digi--button--color--background--primary--focus:var(--digi--color--background--interactive--hover--primary);--digi--button--color--background--primary--active:var(--digi--color--background--interactive--hover--primary);--digi--button--color--background--secondary--default:var(--digi--color--background--interactive--default--secondary);--digi--button--color--background--secondary--hover:var(--digi--color--background--interactive--hover--secondary);--digi--button--color--background--secondary--focus:var(--digi--color--background--interactive--hover--secondary);--digi--button--color--background--secondary--active:var(--digi--color--background--interactive--hover--secondary);--digi--button--color--background--function--default:transparent;--digi--button--color--background--function--hover:transparent;--digi--button--color--background--function--focus:transparent;--digi--button--color--background--function--active:transparent;--digi--button--color--text--primary--default:var(--digi--color--text--interactive--secondary);--digi--button--color--text--primary--hover:var(--digi--color--text--interactive--secondary);--digi--button--color--text--primary--focus:var(--digi--color--text--interactive--secondary);--digi--button--color--text--primary--active:var(--digi--color--text--interactive--secondary);--digi--button--color--text--secondary--default:var(--digi--color--text--interactive--brand-primary);--digi--button--color--text--secondary--hover:var(--digi--color--text--interactive--brand-primary);--digi--button--color--text--secondary--focus:var(--digi--color--text--interactive--brand-primary);--digi--button--color--text--secondary--active:var(--digi--color--text--interactive--brand-primary);--digi--button--color--text--function--default:var(--digi--color--text--interactive--primary);--digi--button--color--text--function--hover:var(--digi--color--text--interactive--primary);--digi--button--color--text--function--focus:var(--digi--color--text--interactive--primary);--digi--button--color--text--function--active:var(--digi--color--text--interactive--primary);--digi--button--color--border--primary--default:var(--digi--color--background--interactive--default--primary);--digi--button--color--border--primary--hover:var(--digi--color--background--interactive--hover--primary);--digi--button--color--border--primary--focus:var(--digi--color--background--interactive--default--primary);--digi--button--color--border--primary--active:var(--digi--color--background--interactive--default--primary);--digi--button--color--border--secondary--default:var(--digi--color--border--interactive--default--primary);--digi--button--color--border--secondary--hover:var(--digi--color--border--interactive--hover--secondary);--digi--button--color--border--secondary--focus:var(--digi--color--border--interactive--default--primary);--digi--button--color--border--secondary--active:var(--digi--color--border--interactive--default--primary);--digi--button--color--border--function--default:initial;--digi--button--color--border--function--hover:initial;--digi--button--color--border--function--focus:initial;--digi--button--color--border--function--active:initial;--digi--button--color--icon--primary--default:var(--digi--color--icon--secondary);--digi--button--color--icon--primary--hover:var(--digi--color--icon--secondary);--digi--button--color--icon--primary--focus:var(--digi--color--icon--secondary);--digi--button--color--icon--primary--active:var(--digi--color--icon--secondary);--digi--button--color--icon--secondary--default:var(--digi--color--icon--brand-primary);--digi--button--color--icon--secondary--hover:var(--digi--color--icon--brand-primary);--digi--button--color--icon--secondary--focus:var(--digi--color--icon--brand-primary);--digi--button--color--icon--secondary--active:var(--digi--color--icon--brand-primary);--digi--button--color--icon--function--default:var(--digi--color--icon--cta);--digi--button--color--icon--function--hover:var(--digi--color--icon--cta);--digi--button--color--icon--function--focus:var(--digi--color--icon--cta);--digi--button--color--icon--function--active:var(--digi--color--icon--cta);--digi--button--border-width--primary--default:var(--digi--border-width--primary);--digi--button--border-width--primary--hover:var(--digi--border-width--primary);--digi--button--border-width--secondary--default:var(--digi--border-width--primary);--digi--button--border-width--secondary--hover:var(--digi--border-width--primary);--digi--button--border-width--function--default:initial;--digi--button--border-width--function--hover:initial;--digi--button--border-style--primary--default:var(--digi--border-style--primary);--digi--button--border-style--primary--hover:var(--digi--border-style--primary);--digi--button--border-style--primary--focus:var(--digi--border-style--primary);--digi--button--border-style--primary--active:var(--digi--border-style--primary);--digi--button--border-style--secondary--default:var(--digi--border-style--primary);--digi--button--border-style--secondary--hover:var(--digi--border-style--primary);--digi--button--border-style--secondary--focus:var(--digi--border-style--primary);--digi--button--border-style--secondary--active:var(--digi--border-style--primary);--digi--button--border-style--function--default:var(--digi--border-style--secondary);--digi--button--border-style--function--hover:var(--digi--border-style--secondary);--digi--button--border-style--function--focus:var(--digi--border-style--secondary);--digi--button--border-style--function--active:var(--digi--border-style--secondary);--digi--button--border-radius--primary--default:var(--digi--border-radius--secondary);--digi--button--border-radius--primary--hover:var(--digi--border-radius--secondary);--digi--button--border-radius--primary--focus:var(--digi--border-radius--secondary);--digi--button--border-radius--primary--active:var(--digi--border-radius--secondary);--digi--button--border-radius--secondary--default:var(--digi--border-radius--secondary);--digi--button--border-radius--secondary--hover:var(--digi--border-radius--secondary);--digi--button--border-radius--secondary--focus:var(--digi--border-radius--secondary);--digi--button--border-radius--secondary--active:var(--digi--border-radius--secondary);--digi--button--border-radius--function--default:initial;--digi--button--border-radius--function--hover:initial;--digi--button--border-radius--function--focus:initial;--digi--button--border-radius--function--active:initial;--digi--button--padding--small:var(--digi--gutter--button-block-small) var(--digi--gutter--button-inline-small);--digi--button--padding--medium:var(--digi--gutter--button-block-medium) var(--digi--gutter--button-inline-medium);--digi--button--padding--large:var(--digi--gutter--button-block-large) var(--digi--gutter--button-inline-large);--digi--button--font-size--small:var(--digi--global--typography--font-size--interaction-small);--digi--button--font-size--medium:var(--digi--global--typography--font-size--interaction-medium);--digi--button--font-family:var(--digi--global--typography--font-family--default);--digi--button--font-weight--default:var(--digi--typography--button--font-weight--desktop);--digi--button--font-weight--function:var(--digi--typography--label--font-weight--desktop);--digi--button--width:initial;--digi--button--display:initial;--digi--button--justify-content--default:initial;--digi--button--justify-content--full-width:center;--digi--button--align-items:center;--digi--button--text-align--default:initial;--digi--button--text-align--full-width:center;--digi--button--outline--default:initial;--digi--button--outline--focus:initial;--digi--button--box-shadow:none;--digi--button--cursor:pointer;--digi--button--icon--spacing:var(--digi--gutter--large);--digi--button--min-height--small:unset}.sc-digi-button-h .digi-button--variation-primary.sc-digi-button{--COLOR--BACKGROUND--DEFAULT:var(--digi--button--color--background--primary--default);--COLOR--BACKGROUND--HOVER:var(--digi--button--color--background--primary--hover);--COLOR--BACKGROUND--FOCUS:var(--digi--button--color--background--primary--focus);--COLOR--BACKGROUND--ACTIVE:var(--digi--button--color--background--primary--active);--COLOR--TEXT--DEFAULT:var(--digi--button--color--text--primary--default);--COLOR--TEXT--HOVER:var(--digi--button--color--text--primary--hover);--COLOR--TEXT--FOCUS:var(--digi--button--color--text--primary--focus);--COLOR--TEXT--ACTIVE:var(--digi--button--color--text--primary--active);--COLOR--ICON--DEFAULT:var(--digi--button--color--icon--primary--default);--COLOR--ICON--HOVER:var(--digi--button--color--icon--primary--hover);--COLOR--ICON--FOCUS:var(--digi--button--color--icon--primary--focus);--COLOR--ICON--ACTIVE:var(--digi--button--color--icon--primary--active);--COLOR--BORDER--DEFAULT:var(--digi--button--color--border--primary--default);--COLOR--BORDER--HOVER:var(--digi--button--color--border--primary--hover);--COLOR--BORDER--FOCUS:var(--digi--button--color--border--primary--focus);--COLOR--BORDER--ACTIVE:var(--digi--button--color--border--primary--active);--BORDER-RADIUS--DEFAULT:var(--digi--button--border-radius--primary--default);--BORDER-RADIUS--HOVER:var(--digi--button--border-radius--primary--hover);--BORDER-RADIUS--FOCUS:var(--digi--button--border-radius--primary--focus);--BORDER-RADIUS--ACTIVE:var(--digi--button--border-radius--primary--active);--BORDER-WIDTH--DEFAULT:var(--digi--button--border-width--primary--default);--BORDER-WIDTH--HOVER:var(--digi--button--border-width--primary--hover);--BORDER-WIDTH--FOCUS:var(--digi--button--border-width--primary--focus);--BORDER-WIDTH--ACTIVE:var(--digi--button--border-width--primary--active);--BORDER-STYLE--DEFAULT:var(--digi--button--border-style--primary--default);--BORDER-STYLE--HOVER:var(--digi--button--border-style--primary--hover);--BORDER-STYLE--FOCUS:var(--digi--button--border-style--primary--focus);--BORDER-STYLE--ACTIVE:var(--digi--button--border-style--primary--active);--FONT-WEIGHT:var(--digi--button--font-weight--default)}.sc-digi-button-h .digi-button--variation-secondary.sc-digi-button{--COLOR--BACKGROUND--DEFAULT:var(--digi--button--color--background--secondary--default);--COLOR--BACKGROUND--HOVER:var(--digi--button--color--background--secondary--hover);--COLOR--BACKGROUND--FOCUS:var(--digi--button--color--background--secondary--focus);--COLOR--BACKGROUND--ACTIVE:var(--digi--button--color--background--secondary--active);--COLOR--TEXT--DEFAULT:var(--digi--button--color--text--secondary--default);--COLOR--TEXT--HOVER:var(--digi--button--color--text--secondary--hover);--COLOR--TEXT--FOCUS:var(--digi--button--color--text--secondary--focus);--COLOR--TEXT--ACTIVE:var(--digi--button--color--text--secondary--active);--COLOR--ICON--DEFAULT:var(--digi--button--color--icon--secondary--default);--COLOR--ICON--HOVER:var(--digi--button--color--icon--secondary--hover);--COLOR--ICON--FOCUS:var(--digi--button--color--icon--secondary--focus);--COLOR--ICON--ACTIVE:var(--digi--button--color--icon--secondary--active);--COLOR--BORDER--DEFAULT:var(--digi--button--color--border--secondary--default);--COLOR--BORDER--HOVER:var(--digi--button--color--border--secondary--hover);--COLOR--BORDER--FOCUS:var(--digi--button--color--border--secondary--focus);--COLOR--BORDER--ACTIVE:var(--digi--button--color--border--secondary--active);--BORDER-RADIUS--DEFAULT:var(--digi--button--border-radius--secondary--default);--BORDER-RADIUS--HOVER:var(--digi--button--border-radius--secondary--hover);--BORDER-RADIUS--FOCUS:var(--digi--button--border-radius--secondary--focus);--BORDER-RADIUS--ACTIVE:var(--digi--button--border-radius--secondary--active);--BORDER-WIDTH--DEFAULT:var(--digi--button--border-width--secondary--default);--BORDER-WIDTH--HOVER:var(--digi--button--border-width--secondary--hover);--BORDER-WIDTH--FOCUS:var(--digi--button--border-width--secondary--focus);--BORDER-WIDTH--ACTIVE:var(--digi--button--border-width--secondary--active);--BORDER-STYLE--DEFAULT:var(--digi--button--border-style--secondary--default);--BORDER-STYLE--HOVER:var(--digi--button--border-style--secondary--hover);--BORDER-STYLE--FOCUS:var(--digi--button--border-style--secondary--focus);--BORDER-STYLE--ACTIVE:var(--digi--button--border-style--secondary--active);--FONT-WEIGHT:var(--digi--button--font-weight--default)}.sc-digi-button-h .digi-button--variation-function.sc-digi-button{--COLOR--BACKGROUND--DEFAULT:var(--digi--button--color--background--function--default);--COLOR--BACKGROUND--HOVER:var(--digi--button--color--background--function--hover);--COLOR--BACKGROUND--FOCUS:var(--digi--button--color--background--function--focus);--COLOR--BACKGROUND--ACTIVE:var(--digi--button--color--background--function--active);--COLOR--TEXT--DEFAULT:var(--digi--button--color--text--function--default);--COLOR--TEXT--HOVER:var(--digi--button--color--text--function--hover);--COLOR--TEXT--FOCUS:var(--digi--button--color--text--function--focus);--COLOR--TEXT--ACTIVE:var(--digi--button--color--text--function--active);--COLOR--ICON--DEFAULT:var(--digi--button--color--icon--function--default);--COLOR--ICON--HOVER:var(--digi--button--color--icon--function--hover);--COLOR--ICON--FOCUS:var(--digi--button--color--icon--function--focus);--COLOR--ICON--ACTIVE:var(--digi--button--color--icon--function--active);--COLOR--BORDER--DEFAULT:var(--digi--button--color--border--function--default);--COLOR--BORDER--HOVER:var(--digi--button--color--border--function--hover);--COLOR--BORDER--FOCUS:var(--digi--button--color--border--function--focus);--COLOR--BORDER--ACTIVE:var(--digi--button--color--border--function--active);--BORDER-RADIUS--DEFAULT:var(--digi--button--border-radius--function--default);--BORDER-RADIUS--HOVER:var(--digi--button--border-radius--function--hover);--BORDER-RADIUS--FOCUS:var(--digi--button--border-radius--function--focus);--BORDER-RADIUS--ACTIVE:var(--digi--button--border-radius--function--active);--BORDER-WIDTH--DEFAULT:var(--digi--button--border-width--function--default);--BORDER-WIDTH--HOVER:var(--digi--button--border-width--function--hover);--BORDER-WIDTH--FOCUS:var(--digi--button--border-width--function--focus);--BORDER-WIDTH--ACTIVE:var(--digi--button--border-width--function--active);--BORDER-STYLE--DEFAULT:var(--digi--button--border-style--function--default);--BORDER-STYLE--HOVER:var(--digi--button--border-style--function--hover);--BORDER-STYLE--FOCUS:var(--digi--button--border-style--function--focus);--BORDER-STYLE--ACTIVE:var(--digi--button--border-style--function--active);--FONT-WEIGHT:var(--digi--button--font-weight--function)}.sc-digi-button-h .digi-button--variation-function.sc-digi-button:hover,.sc-digi-button-h .digi-button--variation-function.sc-digi-button:focus{text-decoration:underline}.sc-digi-button-h .digi-button--size-small.sc-digi-button{--FONT-SIZE:var(--digi--button--font-size--small);--PADDING:var(--digi--button--padding--small);--MIN-HEIGHT:var(--digi--button--min-height--small)}.sc-digi-button-h .digi-button--size-medium.sc-digi-button{--FONT-SIZE:var(--digi--button--font-size--medium);--PADDING:var(--digi--button--padding--medium);--MIN-HEIGHT:var(--digi--button--min-height--small)}.sc-digi-button-h .digi-button--size-large.sc-digi-button{--FONT-SIZE:var(--digi--button--font-size--large);--PADDING:var(--digi--button--padding--large);--MIN-HEIGHT:var(--digi--button--min-height--small)}.sc-digi-button-h .digi-button.sc-digi-button-s>[slot^=icon],.sc-digi-button-h .digi-button .sc-digi-button-s>[slot^=icon]{--digi--icon--height:1em;--digi--icon--width:1em;--digi--icon--color:var(--COLOR--ICON--DEFAULT);min-height:0}.sc-digi-button-h .digi-button.sc-digi-button{font-family:var(--digi--button--font-family);background:var(--COLOR--BACKGROUND--DEFAULT);color:var(--COLOR--TEXT--DEFAULT);padding:var(--PADDING);border-radius:var(--BORDER-RADIUS--DEFAULT);border-width:var(--BORDER-WIDTH--DEFAULT);border-style:var(--BORDER-STYLE--DEFAULT);border-color:var(--COLOR--BORDER--DEFAULT);font-weight:var(--FONT-WEIGHT);font-size:var(--FONT-SIZE);outline:var(--digi--button--outline--default);box-shadow:var(--digi--button--box-shadow);text-align:var(--digi--button--text-align--default);width:var(--digi--button--width);display:var(--digi--button--display);justify-content:var(--digi--button--justify-content--default);cursor:var(--digi--button--cursor);min-height:var(--MIN-HEIGHT);align-items:var(--digi--button--align-items);white-space:nowrap}@media (any-hover: hover){.sc-digi-button-h .digi-button.sc-digi-button:hover{background:var(--COLOR--BACKGROUND--HOVER);border-radius:var(--BORDER-RADIUS--HOVER);border-width:var(--BORDER-WIDTH--HOVER);border-style:var(--BORDER-STYLE--HOVER);border-color:var(--COLOR--BORDER--HOVER);color:var(--COLOR--TEXT--HOVER)}.sc-digi-button-h .digi-button:hover.sc-digi-button-s>[slot^=icon],.sc-digi-button-h .digi-button:hover .sc-digi-button-s>[slot^=icon]{--digi--icon--color:var(--COLOR--ICON--HOVER)}}.sc-digi-button-h .digi-button.sc-digi-button:focus-visible{background:var(--COLOR--BACKGROUND--FOCUS);color:var(--COLOR--TEXT--FOCUS);border-style:var(--BORDER-STYLE--FOCUS);border-color:var(--COLOR--BORDER--FOCUS);outline:2px solid black;outline-offset:2px;box-shadow:0px 0px 0px 5px white}.sc-digi-button-h .digi-button:focus-visible.sc-digi-button-s>[slot^=icon],.sc-digi-button-h .digi-button:focus-visible .sc-digi-button-s>[slot^=icon]{--digi--icon--color:var(--COLOR--ICON--FOCUS)}.sc-digi-button-h .digi-button.sc-digi-button:active{background:var(--COLOR--BACKGROUND--ACTIVE);color:var(--COLOR--TEXT--ACTIVE)}.sc-digi-button-h .digi-button:active.sc-digi-button-s>[slot^=icon],.sc-digi-button-h .digi-button:active .sc-digi-button-s>[slot^=icon]{--digi--icon--color:var(--COLOR--ICON--ACTIVE)}.sc-digi-button-h .digi-button--icon.sc-digi-button,.sc-digi-button-h .digi-button--icon-secondary.sc-digi-button{--digi--button--display:flex;align-items:center;justify-content:var(--digi--button--justify-content--default);gap:var(--digi--button--icon--spacing)}.sc-digi-button-h .digi-button--full-width.sc-digi-button{--digi--button--width:100%;--digi--button--text-align--default:var(--digi--button--text-align--full-width);--digi--button--justify-content--default:var(--digi--button--justify-content--full-width)}`;
|
|
13
74
|
|
|
@@ -2287,7 +2348,30 @@ const CalendarWeekView = class {
|
|
|
2287
2348
|
this.weekDays = [...newDates];
|
|
2288
2349
|
}
|
|
2289
2350
|
afDatesUpdate() {
|
|
2290
|
-
|
|
2351
|
+
// Angular/React can connect the element before afDates is set.
|
|
2352
|
+
if (this.afDates == null || this.afDates === '') {
|
|
2353
|
+
return;
|
|
2354
|
+
}
|
|
2355
|
+
const hadDates = this.dates.length > 0;
|
|
2356
|
+
let dateList;
|
|
2357
|
+
try {
|
|
2358
|
+
if (Array.isArray(this.afDates)) {
|
|
2359
|
+
dateList = [...this.afDates];
|
|
2360
|
+
}
|
|
2361
|
+
else if (typeof this.afDates === 'string') {
|
|
2362
|
+
dateList = JSON.parse(this.afDates);
|
|
2363
|
+
}
|
|
2364
|
+
else {
|
|
2365
|
+
return;
|
|
2366
|
+
}
|
|
2367
|
+
}
|
|
2368
|
+
catch (_a) {
|
|
2369
|
+
logger_util.logger.warn(`Invalid JSON in "af-dates" attribute`, this.hostElement);
|
|
2370
|
+
return;
|
|
2371
|
+
}
|
|
2372
|
+
if (!Array.isArray(dateList)) {
|
|
2373
|
+
return;
|
|
2374
|
+
}
|
|
2291
2375
|
this.dates = [
|
|
2292
2376
|
...dateList.sort((a, b) => {
|
|
2293
2377
|
const c = new Date(a);
|
|
@@ -2295,6 +2379,9 @@ const CalendarWeekView = class {
|
|
|
2295
2379
|
return this.getTime(c) - this.getTime(d);
|
|
2296
2380
|
})
|
|
2297
2381
|
];
|
|
2382
|
+
if (!hadDates && this.dates.length > 0) {
|
|
2383
|
+
this.initDates();
|
|
2384
|
+
}
|
|
2298
2385
|
}
|
|
2299
2386
|
/**
|
|
2300
2387
|
* Kan användas för att manuellt sätta om det aktiva datumet. Formatet måste vara 'yyyy-MM-dd'.
|
|
@@ -2318,6 +2405,9 @@ const CalendarWeekView = class {
|
|
|
2318
2405
|
this.afOnWeekChange.emit('next');
|
|
2319
2406
|
}
|
|
2320
2407
|
initDates() {
|
|
2408
|
+
if (this.dates.length === 0) {
|
|
2409
|
+
return;
|
|
2410
|
+
}
|
|
2321
2411
|
this.minDate = new Date(this.dates[0]);
|
|
2322
2412
|
this.maxDate = new Date(this.dates[this.dates.length - 1]);
|
|
2323
2413
|
this.selectedDate = format(new Date(this.dates[0]), 'yyyy-MM-dd', {
|
|
@@ -2329,9 +2419,23 @@ const CalendarWeekView = class {
|
|
|
2329
2419
|
}
|
|
2330
2420
|
componentWillLoad() {
|
|
2331
2421
|
this.afDatesUpdate();
|
|
2332
|
-
|
|
2422
|
+
// Angular attaches the host first and binds `[afDates]` on the next frame
|
|
2423
|
+
// (Stencil 4.36+). @Watch skips that first assignment, so if dates are not
|
|
2424
|
+
// here yet, wait one frame. React/vanilla that already set the prop skip
|
|
2425
|
+
// the delay.
|
|
2426
|
+
if (this.dates.length === 0) {
|
|
2427
|
+
return new Promise((resolve) => {
|
|
2428
|
+
requestAnimationFrame(() => {
|
|
2429
|
+
this.afDatesUpdate();
|
|
2430
|
+
resolve();
|
|
2431
|
+
});
|
|
2432
|
+
});
|
|
2433
|
+
}
|
|
2333
2434
|
}
|
|
2334
2435
|
componentDidLoad() {
|
|
2436
|
+
if (this.dates.length === 0) {
|
|
2437
|
+
this.afDatesUpdate();
|
|
2438
|
+
}
|
|
2335
2439
|
this.afOnReady.emit();
|
|
2336
2440
|
}
|
|
2337
2441
|
get prevWeekText() {
|
|
@@ -2355,7 +2459,7 @@ const CalendarWeekView = class {
|
|
|
2355
2459
|
format(new Date(lastDate), 'MMMM yyyy', { locale: locale });
|
|
2356
2460
|
}
|
|
2357
2461
|
render() {
|
|
2358
|
-
return (index.h("div", { key: '
|
|
2462
|
+
return (index.h("div", { key: '44d49828a7f43a1f3943aaf0af4139f402844bf0', class: "digi-calendar-week-view" }, index.h("nav", { key: '44ba98a7c433077c2c11c55b150a5cc2f1d38ac2', class: "digi-calendar-week-view__timepicker" }, index.h("div", { key: '160ce73dc293abd69193c2b1750c9fd7400b8804', class: "digi-calendar-week-view__dates" }, index.h("div", { key: '2d60245978d9c7615f3ff5ec7b9d8d628e16f843', class: "digi-calendar-week-view__flex" }, index.h("digi-typography", { key: '23a1c94d0575061951f67f46782144de52e5e662' }, index.h(this.afHeadingLevel, { key: 'a183705a035f4d3d57ced74920221f40bbe6019f', role: "status", class: "digi-calendar-week-view__heading" }, index.h("span", { key: '147910745991716f3557491c6e6aa702f479e8c7', class: "digi-calendar-week-view__month" }, this.currentMonth), index.h("span", { key: '0d91367cd6066a2b35349edd0ff93e20b5326f04', class: "digi-calendar-week-view__week" }, ' ', "v.", this.currentWeek))), index.h("ul", { key: 'fdff670cf241e05920e19e0ce6e601b62ae9a3f0', class: "digi-calendar-week-view__date-list" }, this.weekDays.map((dateItem) => {
|
|
2359
2463
|
const date = format(new Date(dateItem), 'd', {
|
|
2360
2464
|
locale: locale
|
|
2361
2465
|
});
|
|
@@ -2375,16 +2479,17 @@ const CalendarWeekView = class {
|
|
|
2375
2479
|
} }, day), index.h("span", { class: "digi-calendar-week-view__date-button-date" }, date), index.h("span", { "aria-hidden": "true", class: {
|
|
2376
2480
|
'digi-calendar-week-view__date-button-circle': dateItem === this.todaysDate
|
|
2377
2481
|
} })))));
|
|
2378
|
-
})))), index.h("digi-button", { key: '
|
|
2482
|
+
})))), index.h("digi-button", { key: 'dbae5227d0316a5a67febc7de83b1c4c5cfc1044', onClick: () => this.prevWeek(), class: {
|
|
2379
2483
|
'digi-calendar-week-view__week-button digi-calendar-week-view__week-button--previous': true,
|
|
2380
2484
|
'digi-calendar-week-view__week-button--keep-left': this.currentWeek == getISOWeek(this.maxDate),
|
|
2381
2485
|
'digi-calendar-week-view__week-button--hidden': !(this.currentWeek > getISOWeek(this.minDate))
|
|
2382
|
-
}, "af-variation": "secondary" }, index.h("digi-icon-chevron-left", { key: '
|
|
2486
|
+
}, "af-variation": "secondary" }, index.h("digi-icon-chevron-left", { key: '65d0f656a0d35911d39f9b8e9ade224be54d4371', slot: "icon" }), this.prevWeekText), index.h("digi-button", { key: '68d9b3d6c929d0185f412add980a542b3c86fbb2', onClick: () => this.nextWeek(), class: {
|
|
2383
2487
|
'digi-calendar-week-view__week-button digi-calendar-week-view__week-button--next': true,
|
|
2384
2488
|
'digi-calendar-week-view__week-button--keep-right': this.currentWeek == getISOWeek(this.minDate),
|
|
2385
2489
|
'digi-calendar-week-view__week-button--hidden': !(this.currentWeek < getISOWeek(this.maxDate))
|
|
2386
|
-
}, "af-variation": "secondary" }, index.h("digi-icon-chevron-right", { key: '
|
|
2490
|
+
}, "af-variation": "secondary" }, index.h("digi-icon-chevron-right", { key: 'a9e688f815a5053aa709cfeb9359131f73df21c0', slot: "icon-secondary" }), this.nextWeekText)), index.h("div", { key: '7d1073f6cd1982fda2ce7dcb60532c94bd1d0634', role: "status", "aria-live": "assertive", class: "digi-calendar-week-view__result", id: `${this.afId}-result` }, index.h("digi-typography", { key: 'db7ce0ca80485df1e4ae67200f2cd90cc80938d5' }, index.h("slot", { key: 'f08f447ae89612dfcea56c638024220bc29e7914' })))));
|
|
2387
2491
|
}
|
|
2492
|
+
get hostElement() { return index.getElement(this); }
|
|
2388
2493
|
static get watchers() { return {
|
|
2389
2494
|
"selectedDate": [{
|
|
2390
2495
|
"selectedDateChangeHandler": 0
|
|
@@ -2443,6 +2548,327 @@ const IconChevronRight = class {
|
|
|
2443
2548
|
};
|
|
2444
2549
|
IconChevronRight.style = iconChevronRightCss();
|
|
2445
2550
|
|
|
2551
|
+
const navigationTablistCss = () => `.sc-digi-tablist-h{--tab-active-border-color:var(--digi--color--marking--navigation--selected);--tab-text-color:var(--digi--color--text--primary);--tab-icon-primary--color:var(--digi--color--icon--primary);--tab-icon-primary--color-hover:var(--digi--color--icon--primary);--tab-icon-primary--color-active:var(--digi--color--icon--primary)}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist{font-family:var(--digi--global--typography--font-family--default);color:var(--digi--color--text--primary);position:relative;display:flex;gap:1rem;background-color:var(--digi--color--background--primary);margin-bottom:2.875rem;border-bottom:1px solid var(--digi--color--divider--secondary)}.sc-digi-tablist-h .digi-tablist--overflow-scroll.sc-digi-tablist .control-wrapper.sc-digi-tablist{display:none !important}.sc-digi-tablist-h .digi-tablist--overflow-scroll.sc-digi-tablist [role=tablist].sc-digi-tablist{overflow-x:auto}.sc-digi-tablist-h .digi-tablist--overflow-controls.sc-digi-tablist [role=tablist].sc-digi-tablist{overflow-x:hidden}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist button.sc-digi-tablist{background:none;border:none;padding:0;font-family:inherit}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist [role=tablist].sc-digi-tablist{display:flex;font-weight:bold;flex-grow:1;width:100%}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .control-wrapper.sc-digi-tablist{position:absolute;z-index:20;display:flex;align-items:center;justify-content:center;height:100%}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .control-wrapper.sc-digi-tablist .tab-control-button.sc-digi-tablist{display:flex;align-items:center;justify-content:center;background-color:var(--digi--color--background--interactive--default--tertiary);border-radius:6px;min-height:auto;padding:0.75rem;aspect-ratio:1;cursor:pointer}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .control-wrapper.sc-digi-tablist .tab-control-button.sc-digi-tablist digi-icon-chevron-right.sc-digi-tablist,.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .control-wrapper.sc-digi-tablist .tab-control-button.sc-digi-tablist digi-icon-chevron-left.sc-digi-tablist{--digi--icon--color:var(--digi--color--icon--cta)}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.sc-digi-tablist{cursor:pointer;white-space:nowrap}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.sc-digi-tablist .content-wrapper.sc-digi-tablist{position:relative;height:2.75rem;display:flex;flex-direction:column;transition:background-color 0.1s linear}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.sc-digi-tablist .tablist-content.sc-digi-tablist{flex:1;display:flex;padding-right:0.75rem;padding-left:0.75rem}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.sc-digi-tablist [class*=digi-icon-].sc-digi-tablist:not(svg){--digi--icon--width:1rem;--digi--icon--color:var(--tab-icon-primary--color);padding-right:var(--digi--gutter--smaller)}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.sc-digi-tablist digi-badge-notification.sc-digi-tablist{margin-left:-0.125rem}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.sc-digi-tablist .title.sc-digi-tablist{font-size:1rem;flex-direction:column;display:flex;align-items:center;justify-content:center;font-weight:normal;color:var(--tab-text-color)}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.sc-digi-tablist .title.sc-digi-tablist::after{content:attr(data-text);content:attr(data-text)/"";height:0;visibility:hidden;overflow:hidden;user-select:none;pointer-events:none;font-weight:bold}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.sc-digi-tablist .indicator.sc-digi-tablist{height:0.25rem;width:100%;visibility:hidden;background-color:var(--tab-active-border-color)}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.sc-digi-tablist:focus{outline:none;box-shadow:none}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.sc-digi-tablist:focus-visible{z-index:10;outline:2px solid black;outline-offset:-3px;box-shadow:0px 0px 0px 5px inset white}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.sc-digi-tablist:hover:not(.is-active) .title.sc-digi-tablist{color:var(--digi--color--text--interactive--primary);text-decoration:underline}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.sc-digi-tablist:hover:not(.is-active) [class*=digi-icon-].sc-digi-tablist:not(svg){--tab-icon-primary--color:var(--tab-icon-primary--color-hover)}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.is-active.sc-digi-tablist .title.sc-digi-tablist{font-weight:bold}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.is-active.sc-digi-tablist svg.sc-digi-tablist{transform:translateX(-0.125rem)}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.is-active.sc-digi-tablist [class*=digi-icon-].sc-digi-tablist:not(svg){--tab-icon-primary--color:var(--tab-icon-primary--color-active)}.sc-digi-tablist-h .digi-tablist.sc-digi-tablist .digi-tab.is-active.sc-digi-tablist .indicator.sc-digi-tablist{visibility:visible}`;
|
|
2552
|
+
|
|
2553
|
+
const NavigationTablist = class {
|
|
2554
|
+
constructor(hostRef) {
|
|
2555
|
+
index.registerInstance(this, hostRef);
|
|
2556
|
+
this.afTabChange = index.createEvent(this, "afTabChange", 7);
|
|
2557
|
+
this.afTabFocusChange = index.createEvent(this, "afTabFocusChange", 7);
|
|
2558
|
+
this.tabRefs = {};
|
|
2559
|
+
this.activeTab = 0;
|
|
2560
|
+
this.selectedTab = 0;
|
|
2561
|
+
this.windowTab = 0;
|
|
2562
|
+
this.tabs = [];
|
|
2563
|
+
this.listOverflows = false;
|
|
2564
|
+
this.showPrev = false;
|
|
2565
|
+
this.showNext = false;
|
|
2566
|
+
/**
|
|
2567
|
+
* Bestämmer beteende då flikar överflödar
|
|
2568
|
+
* * @en Set overflow behaviour
|
|
2569
|
+
*/
|
|
2570
|
+
this.afOverflowMode = navigationTablist_types.OverflowMode.Controls;
|
|
2571
|
+
this.handleResize = () => {
|
|
2572
|
+
if (!this.tablistRef)
|
|
2573
|
+
return;
|
|
2574
|
+
// Ensure we measure after any layout/paint from the resize
|
|
2575
|
+
if (this._requestAnimationFrame)
|
|
2576
|
+
cancelAnimationFrame(this._requestAnimationFrame);
|
|
2577
|
+
this._requestAnimationFrame = requestAnimationFrame(() => {
|
|
2578
|
+
var _a, _b;
|
|
2579
|
+
const el = this.tablistRef;
|
|
2580
|
+
const containerWidth = el.clientWidth;
|
|
2581
|
+
const contentWidth = el.scrollWidth;
|
|
2582
|
+
// Tolerance ≈ 1 physical pixel to absorb zoom/subpixel jitter
|
|
2583
|
+
const tolerance = 1 / ((window === null || window === void 0 ? void 0 : window.devicePixelRatio) || 1);
|
|
2584
|
+
// Guard against div-by-zero
|
|
2585
|
+
const tabsCount = Math.max((_b = (_a = this.tabs) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0, 1);
|
|
2586
|
+
const avgTabWidth = contentWidth / tabsCount;
|
|
2587
|
+
// How many whole tabs fit? Nudge by tolerance to avoid off-by-one at zoom edges
|
|
2588
|
+
const tabsPerWindow = Math.floor((containerWidth + tolerance) / avgTabWidth);
|
|
2589
|
+
this.tabsPerWindow = Math.max(1, Math.min(tabsPerWindow, tabsCount));
|
|
2590
|
+
// Ensure windowTab stays within valid bounds after resize
|
|
2591
|
+
const maxValidWindowTab = Math.max(0, tabsCount - this.tabsPerWindow);
|
|
2592
|
+
if (this.windowTab > maxValidWindowTab) {
|
|
2593
|
+
this.windowTab = maxValidWindowTab;
|
|
2594
|
+
}
|
|
2595
|
+
// Overflow check with tolerance
|
|
2596
|
+
this.listOverflows = contentWidth - containerWidth > tolerance;
|
|
2597
|
+
// (Optional) if you have left/right “handles”, compute visibility too:
|
|
2598
|
+
this.showPrev = el.scrollLeft > tolerance;
|
|
2599
|
+
this.showNext =
|
|
2600
|
+
el.scrollLeft + el.clientWidth < el.scrollWidth - tolerance;
|
|
2601
|
+
});
|
|
2602
|
+
};
|
|
2603
|
+
}
|
|
2604
|
+
handleKey(e) {
|
|
2605
|
+
if (this.focusCaptured()) {
|
|
2606
|
+
let captureKey = true;
|
|
2607
|
+
switch (e.key) {
|
|
2608
|
+
case ' ':
|
|
2609
|
+
case 'Enter':
|
|
2610
|
+
return this.setActiveTabAndFocus(this.selectedTab);
|
|
2611
|
+
case 'ArrowLeft':
|
|
2612
|
+
if (e.shiftKey) {
|
|
2613
|
+
this.handleTabControl(navigationTablist_types.Direction.Previous);
|
|
2614
|
+
}
|
|
2615
|
+
else {
|
|
2616
|
+
this.focusTab(this.selectedTab - 1);
|
|
2617
|
+
}
|
|
2618
|
+
break;
|
|
2619
|
+
case 'ArrowRight':
|
|
2620
|
+
if (e.shiftKey) {
|
|
2621
|
+
this.handleTabControl(navigationTablist_types.Direction.Next);
|
|
2622
|
+
}
|
|
2623
|
+
else {
|
|
2624
|
+
this.focusTab(this.selectedTab + 1);
|
|
2625
|
+
}
|
|
2626
|
+
break;
|
|
2627
|
+
case 'Home':
|
|
2628
|
+
if (e.shiftKey) {
|
|
2629
|
+
return this.focusTab(0);
|
|
2630
|
+
}
|
|
2631
|
+
else {
|
|
2632
|
+
return this.moveWindow(0);
|
|
2633
|
+
}
|
|
2634
|
+
case 'End':
|
|
2635
|
+
if (e.shiftKey) {
|
|
2636
|
+
return this.focusTab(this.tabs.length - 1);
|
|
2637
|
+
}
|
|
2638
|
+
else {
|
|
2639
|
+
return this.moveWindow(this.tabs.length - 1);
|
|
2640
|
+
}
|
|
2641
|
+
default:
|
|
2642
|
+
captureKey = false;
|
|
2643
|
+
}
|
|
2644
|
+
if (captureKey) {
|
|
2645
|
+
e.preventDefault();
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
syncPanels() {
|
|
2650
|
+
var _a;
|
|
2651
|
+
const activeId = (_a = this.tabs[this.activeTab]) === null || _a === void 0 ? void 0 : _a.id;
|
|
2652
|
+
for (const panel of this.getSlottedPanels()) {
|
|
2653
|
+
panel.isVisible = panel.tab === activeId;
|
|
2654
|
+
}
|
|
2655
|
+
}
|
|
2656
|
+
handleTabPropChange(tabId) {
|
|
2657
|
+
this.setActiveTabById(tabId);
|
|
2658
|
+
}
|
|
2659
|
+
syncControls() {
|
|
2660
|
+
const tabGroup = Math.floor(this.windowTab / this.tabsPerWindow);
|
|
2661
|
+
const numberOfGroups = Math.ceil(this.tabs.length / this.tabsPerWindow);
|
|
2662
|
+
this.showPrev = tabGroup > 0;
|
|
2663
|
+
this.showNext = tabGroup < numberOfGroups - 1;
|
|
2664
|
+
}
|
|
2665
|
+
syncWindow(tabIdx) {
|
|
2666
|
+
const tab = this.tabs[tabIdx];
|
|
2667
|
+
const tabRef = this.tabRefs[tab.id];
|
|
2668
|
+
const listBox = this.tablistRef.getBoundingClientRect();
|
|
2669
|
+
const tabBox = tabRef.getBoundingClientRect();
|
|
2670
|
+
const centeredOffset = tabRef.offsetLeft - listBox.width / 2 + tabBox.width / 2;
|
|
2671
|
+
const maxLeft = this.tablistRef.scrollWidth - listBox.width;
|
|
2672
|
+
const left = Math.max(Math.min(centeredOffset, maxLeft), 0);
|
|
2673
|
+
this.tablistRef.scrollTo({
|
|
2674
|
+
left,
|
|
2675
|
+
behavior: 'smooth'
|
|
2676
|
+
});
|
|
2677
|
+
}
|
|
2678
|
+
syncFocus(tabIdx) {
|
|
2679
|
+
const tabRef = this.tabRefs[this.tabs[tabIdx].id];
|
|
2680
|
+
tabRef.focus({ preventScroll: true });
|
|
2681
|
+
this.windowTab = tabIdx;
|
|
2682
|
+
}
|
|
2683
|
+
setupTabs(tabs) {
|
|
2684
|
+
// Angular/React can connect the element before afTabs is set.
|
|
2685
|
+
if (tabs == null || tabs === '') {
|
|
2686
|
+
return;
|
|
2687
|
+
}
|
|
2688
|
+
const hadTabs = this.tabs.length > 0;
|
|
2689
|
+
if (typeof tabs === 'string') {
|
|
2690
|
+
this.tabs = JSON.parse(tabs);
|
|
2691
|
+
}
|
|
2692
|
+
else if (Array.isArray(tabs)) {
|
|
2693
|
+
this.tabs = tabs;
|
|
2694
|
+
}
|
|
2695
|
+
else {
|
|
2696
|
+
throw new Error('Invalid format or no tabs supplied');
|
|
2697
|
+
}
|
|
2698
|
+
if (!hadTabs) {
|
|
2699
|
+
this.setupInitialTab();
|
|
2700
|
+
}
|
|
2701
|
+
this.syncPanels();
|
|
2702
|
+
}
|
|
2703
|
+
getSlottedPanels() {
|
|
2704
|
+
return Array.from(this.hostElement.querySelectorAll('digi-tablist-panel')).filter((panel) => panel.closest('digi-tablist') === this.hostElement);
|
|
2705
|
+
}
|
|
2706
|
+
setActiveTabById(id) {
|
|
2707
|
+
const tabIdx = this.tabs.findIndex((tab) => tab.id === id);
|
|
2708
|
+
if (tabIdx > -1) {
|
|
2709
|
+
this.activeTab = tabIdx;
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
setupInitialTab() {
|
|
2713
|
+
if (this.afActiveTab != null) {
|
|
2714
|
+
return this.setActiveTabById(this.afActiveTab);
|
|
2715
|
+
}
|
|
2716
|
+
else if (this.afInitialTab != null) {
|
|
2717
|
+
return this.setActiveTabById(this.afInitialTab);
|
|
2718
|
+
}
|
|
2719
|
+
}
|
|
2720
|
+
setupResizeHandler() {
|
|
2721
|
+
this.resizeObserver = new ResizeObserver(() => this.handleResize());
|
|
2722
|
+
this.resizeObserver.observe(this.tablistRef);
|
|
2723
|
+
}
|
|
2724
|
+
handleTabChange(tab) {
|
|
2725
|
+
const idx = this.tabs.findIndex(({ id }) => id === tab.id);
|
|
2726
|
+
this.setActiveTabAndFocus(idx);
|
|
2727
|
+
this.afTabChange.emit(tab);
|
|
2728
|
+
}
|
|
2729
|
+
handleTabControl(direction) {
|
|
2730
|
+
// Calculate the current window group
|
|
2731
|
+
const currentGroup = Math.floor(this.windowTab / this.tabsPerWindow);
|
|
2732
|
+
const totalGroups = Math.ceil(this.tabs.length / this.tabsPerWindow);
|
|
2733
|
+
let newGroup;
|
|
2734
|
+
if (direction === navigationTablist_types.Direction.Next) {
|
|
2735
|
+
newGroup = Math.min(currentGroup + 1, totalGroups - 1);
|
|
2736
|
+
}
|
|
2737
|
+
else {
|
|
2738
|
+
newGroup = Math.max(currentGroup - 1, 0);
|
|
2739
|
+
}
|
|
2740
|
+
// Move to the first tab of the target group
|
|
2741
|
+
const newWindowTab = newGroup * this.tabsPerWindow;
|
|
2742
|
+
this.moveWindow(newWindowTab);
|
|
2743
|
+
}
|
|
2744
|
+
setActiveTabAndFocus(tabIdx) {
|
|
2745
|
+
this.activeTab = tabIdx;
|
|
2746
|
+
this.focusTab(tabIdx);
|
|
2747
|
+
}
|
|
2748
|
+
focusTab(tabIdx) {
|
|
2749
|
+
this.selectedTab = this.nextTabIdx(tabIdx);
|
|
2750
|
+
const currentTab = this.tabs[this.selectedTab];
|
|
2751
|
+
this.afTabFocusChange.emit(currentTab);
|
|
2752
|
+
}
|
|
2753
|
+
moveWindow(tabIdx) {
|
|
2754
|
+
tabIdx = Math.max(0, Math.min(tabIdx, this.tabs.length - 1));
|
|
2755
|
+
this.windowTab = tabIdx;
|
|
2756
|
+
}
|
|
2757
|
+
nextTabIdx(tabIdx) {
|
|
2758
|
+
if (tabIdx >= this.tabs.length) {
|
|
2759
|
+
return 0;
|
|
2760
|
+
}
|
|
2761
|
+
else if (tabIdx < 0) {
|
|
2762
|
+
return this.tabs.length - 1;
|
|
2763
|
+
}
|
|
2764
|
+
return tabIdx;
|
|
2765
|
+
}
|
|
2766
|
+
focusCaptured() {
|
|
2767
|
+
return this.tabs.some((tab) => this.tabRefs[tab.id] === document.activeElement);
|
|
2768
|
+
}
|
|
2769
|
+
componentWillLoad() {
|
|
2770
|
+
this.setupTabs(this.afTabs);
|
|
2771
|
+
this.setupInitialTab();
|
|
2772
|
+
// Angular attaches the host first and binds `[afTabs]` on the next frame
|
|
2773
|
+
// (Stencil 4.36+). @Watch skips that first assignment, so if tabs are not
|
|
2774
|
+
// here yet, wait one frame. React/vanilla that already set the prop skip
|
|
2775
|
+
// the delay.
|
|
2776
|
+
if (this.tabs.length === 0) {
|
|
2777
|
+
return new Promise((resolve) => {
|
|
2778
|
+
requestAnimationFrame(() => {
|
|
2779
|
+
this.setupTabs(this.afTabs);
|
|
2780
|
+
this.setupInitialTab();
|
|
2781
|
+
resolve();
|
|
2782
|
+
});
|
|
2783
|
+
});
|
|
2784
|
+
}
|
|
2785
|
+
}
|
|
2786
|
+
componentDidLoad() {
|
|
2787
|
+
var _a, _b, _c;
|
|
2788
|
+
this.setupTabs(this.afTabs);
|
|
2789
|
+
// Also listen to window resize for viewport zoom changes
|
|
2790
|
+
if (window) {
|
|
2791
|
+
window.addEventListener('resize', this.handleResize, { passive: true });
|
|
2792
|
+
}
|
|
2793
|
+
// Recalculate once fonts finish loading (text width changes with webfonts)
|
|
2794
|
+
(_c = (_b = (_a = document.fonts) === null || _a === void 0 ? void 0 : _a.ready) === null || _b === void 0 ? void 0 : _b.then) === null || _c === void 0 ? void 0 : _c.call(_b, () => this.handleResize());
|
|
2795
|
+
this.setupResizeHandler();
|
|
2796
|
+
this.handleResize();
|
|
2797
|
+
this.syncPanels();
|
|
2798
|
+
this.syncControls();
|
|
2799
|
+
}
|
|
2800
|
+
disconnectedCallback() {
|
|
2801
|
+
var _a;
|
|
2802
|
+
if (window) {
|
|
2803
|
+
window.removeEventListener('resize', this.handleResize);
|
|
2804
|
+
}
|
|
2805
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
2806
|
+
if (this._requestAnimationFrame)
|
|
2807
|
+
cancelAnimationFrame(this._requestAnimationFrame);
|
|
2808
|
+
}
|
|
2809
|
+
render() {
|
|
2810
|
+
return (index.h(index.Host, { key: 'b2d71ff4b3f2c2fa22feffbc298360c1b3202b1d' }, index.h("div", { key: 'df48ffc9fdabfca380675c7232af5fef80c445b9', class: {
|
|
2811
|
+
'digi-tablist': true,
|
|
2812
|
+
'digi-tablist--overflow-scroll': this.afOverflowMode === navigationTablist_types.OverflowMode.Scroll,
|
|
2813
|
+
'digi-tablist--overflow-controls': this.afOverflowMode === navigationTablist_types.OverflowMode.Controls
|
|
2814
|
+
} }, index.h("div", { key: '797f70a00aa1e3dd8a3b54d43808b9515259723c', class: "control-wrapper", style: {
|
|
2815
|
+
left: '0',
|
|
2816
|
+
visibility: this.showPrev ? 'visible' : 'hidden'
|
|
2817
|
+
} }, index.h("button", { key: '415237740bc65dd5cfdb0e57eb44307c9d838670', tabIndex: -1, type: "button", "aria-hidden": "true", class: { 'tab-control-button': true }, onClick: () => this.handleTabControl(navigationTablist_types.Direction.Previous) }, index.h("digi-icon-chevron-left", { key: '59f2d43ba38c7d4ebdd85a575b2e89c0fec62381' }))), index.h("div", { key: '01602338cbd7a63f48cdcf541629e76bac46dd4c', role: "tablist", ref: (ref) => (this.tablistRef = ref), "aria-labelledby": this.afAriaLabelledby, "aria-label": this.afAriaLabel }, this.tabs.map((tab) => {
|
|
2818
|
+
const focusable = tab.id === this.tabs[this.selectedTab].id;
|
|
2819
|
+
const isActive = tab.id === this.tabs[this.activeTab].id;
|
|
2820
|
+
const Icon = `digi-icon-${tab.icon}`;
|
|
2821
|
+
const badgeValue = tab.badgeValue;
|
|
2822
|
+
return (index.h("button", { ref: (ref) => (this.tabRefs[tab.id] = ref), class: {
|
|
2823
|
+
'digi-tab': true,
|
|
2824
|
+
'is-active': isActive
|
|
2825
|
+
}, id: `tab-${tab.id}`, role: "tab", type: "button", tabindex: focusable ? '0' : '-1', "aria-label": tab.ariaLabel, "aria-selected": isActive.toString(), "aria-controls": `tabpanel-${tab.id}`, onClick: () => this.handleTabChange(tab) }, index.h("div", { class: "content-wrapper" }, index.h("span", { class: "tablist-content" }, tab.icon && index.h(Icon, { "aria-hidden": "true" }), index.h("span", { class: "title", "data-text": tab.title }, tab.title), tab.badgeValue && (index.h("digi-badge-notification", { afValue: badgeValue, "aria-hidden": "true" }))), index.h("div", { class: "indicator" }))));
|
|
2826
|
+
})), index.h("div", { key: 'db28ea61c349d7aaf057e84b607c4f851b3f6712', class: "control-wrapper", style: {
|
|
2827
|
+
right: '0',
|
|
2828
|
+
visibility: this.showNext ? 'visible' : 'hidden'
|
|
2829
|
+
} }, index.h("button", { key: '83513f2d64cc0578155d305f21dfb1ca4a412cc6', tabIndex: -1, type: "button", "aria-hidden": "true", class: { 'tab-control-button': true }, onClick: () => this.handleTabControl(navigationTablist_types.Direction.Next) }, index.h("digi-icon-chevron-right", { key: '9263e864c21ea5358f301214fbadda6ed7d3c74a' })))), index.h("div", { key: '205efbbb3aab40f51f9f85f8d74a4026970c7144', role: "presentation" }, index.h("slot", { key: 'e753d718f852072745f5c2a49f6189fb62f3645b', onSlotchange: () => this.syncPanels() }))));
|
|
2830
|
+
}
|
|
2831
|
+
get hostElement() { return index.getElement(this); }
|
|
2832
|
+
static get watchers() { return {
|
|
2833
|
+
"activeTab": [{
|
|
2834
|
+
"syncPanels": 0
|
|
2835
|
+
}],
|
|
2836
|
+
"afActiveTab": [{
|
|
2837
|
+
"handleTabPropChange": 0
|
|
2838
|
+
}],
|
|
2839
|
+
"windowTab": [{
|
|
2840
|
+
"syncControls": 0
|
|
2841
|
+
}, {
|
|
2842
|
+
"syncWindow": 0
|
|
2843
|
+
}],
|
|
2844
|
+
"listOverflows": [{
|
|
2845
|
+
"syncControls": 0
|
|
2846
|
+
}],
|
|
2847
|
+
"selectedTab": [{
|
|
2848
|
+
"syncFocus": 0
|
|
2849
|
+
}],
|
|
2850
|
+
"afTabs": [{
|
|
2851
|
+
"setupTabs": 0
|
|
2852
|
+
}]
|
|
2853
|
+
}; }
|
|
2854
|
+
};
|
|
2855
|
+
NavigationTablist.style = navigationTablistCss();
|
|
2856
|
+
|
|
2857
|
+
const NavigationTabPanel = class {
|
|
2858
|
+
constructor(hostRef) {
|
|
2859
|
+
index.registerInstance(this, hostRef);
|
|
2860
|
+
this.isVisible = false;
|
|
2861
|
+
}
|
|
2862
|
+
render() {
|
|
2863
|
+
return (index.h(index.Host, { key: '253b1c6e0b466c8e806aeec2a6e99f86172b3324' }, index.h("div", { key: '9639af8c2a404a738c2c07c437f0537f81f5a72f', id: `tabpanel-${this.tab}`, role: "tabpanel", "aria-labelledby": `tab-${this.tab}`, style: {
|
|
2864
|
+
display: this.isVisible ? 'initial' : 'none',
|
|
2865
|
+
overflowX: 'hidden',
|
|
2866
|
+
overflowY: 'auto'
|
|
2867
|
+
} }, index.h("slot", { key: '3383cb70665259583d172e82f9c2dd38a81cec3c' }))));
|
|
2868
|
+
}
|
|
2869
|
+
get hostElement() { return index.getElement(this); }
|
|
2870
|
+
};
|
|
2871
|
+
|
|
2446
2872
|
const typographyCss = () => `digi-typography{--digi--typography--h1--margin--small:var(--digi--margin--h1-small);--digi--typography--h1--margin--medium:var(--digi--margin--h1-medium);--digi--typography--h1--margin--large:var(--digi--margin--h1-large);--digi--typography--h2--margin--small:var(--digi--margin--h2-small);--digi--typography--h2--margin--large:var(--digi--margin--h2-large);--digi--typography--h3--margin--small:var(--digi--margin--h3-small);--digi--typography--h3--margin--large:var(--digi--margin--h3-large);--digi--typography--h4--margin--small:var(--digi--margin--h4-h6-small);--digi--typography--h4--margin--large:var(--digi--margin--h4-h6-large);--digi--typography--h5--margin--small:var(--digi--margin--h4-h6-small);--digi--typography--h6--margin--large:var(--digi--margin--h4-h6-large);--digi--typography--paragraph--margin--small:var(--digi--margin--text-small);--digi--typography--paragraph--margin--large:var(--digi--margin--text-large);--digi--typography--paragraph--margin-top:initial;--digi--typography--color--text:var(--digi--color--text--primary);--digi--typography--text-decoration-thickness--hover:0.156em;--digi--typography--text-decoration-thickness--default:0.05em;--digi--typography--text-underline-offset:3px;font-family:var(--digi--global--typography--font-family--default);color:var(--digi--typography--color--text);font-size:var(--FONT-SIZE--BODY);line-height:var(--LINE-HEIGHT--BODY);font-weight:var(--FONT-WEIGHT--BODY);text-decoration:var(--TEXT-DECORATION--BODY);--FONT-SIZE--BODY:var(--digi--typography--body--font-size--mobile);--LINE-HEIGHT--BODY:var(--digi--typography--body--line-height--mobile);--FONT-WEIGHT--BODY:var(--digi--typography--body--font-weight--mobile);--TEXT-DECORATION--BODY:var( --digi--typography--body--text-decoration--mobile );--MARGIN--BODY:var(--digi--typography--paragraph--margin--small);--FONT-SIZE--LINK:var(--digi--typography--link--font-size--mobile);--LINE-HEIGHT--LINK:var(--digi--typography--link--line-height--mobile);--FONT-WEIGHT--LINK:var(--digi--typography--link--font-weight--mobile);--TEXT-DECORATION--LINK:var( --digi--typography--link--text-decoration--mobile );--FONT-SIZE--HEADING-1:var(--digi--typography--heading-1--font-size--mobile);--LINE-HEIGHT--HEADING-1:var( --digi--typography--heading-1--line-height--mobile );--FONT-WEIGHT--HEADING-1:var( --digi--typography--heading-1--font-weight--mobile );--TEXT-DECORATION--HEADING-1:var( --digi--typography--heading-1--text-decoration--mobile );--MARGIN--HEADING-1:var(--digi--typography--h1--margin--small);--FONT-SIZE--HEADING-2:var(--digi--typography--heading-2--font-size--mobile);--LINE-HEIGHT--HEADING-2:var( --digi--typography--heading-2--line-height--mobile );--FONT-WEIGHT--HEADING-2:var( --digi--typography--heading-2--font-weight--mobile );--TEXT-DECORATION--HEADING-2:var( --digi--typography--heading-2--text-decoration--mobile );--MARGIN--HEADING-2:var(--digi--typography--h2--margin--small);--FONT-SIZE--HEADING-3:var(--digi--typography--heading-3--font-size--mobile);--LINE-HEIGHT--HEADING-3:var( --digi--typography--heading-3--line-height--mobile );--FONT-WEIGHT--HEADING-3:var( --digi--typography--heading-3--font-weight--mobile );--TEXT-DECORATION--HEADING-3:var( --digi--typography--heading-3--text-decoration--mobile );--MARGIN--HEADING-3:var(--digi--typography--h3--margin--small);--FONT-SIZE--HEADING-4:var(--digi--typography--heading-4--font-size--mobile);--LINE-HEIGHT--HEADING-4:var( --digi--typography--heading-4--line-height--mobile );--FONT-WEIGHT--HEADING-4:var( --digi--typography--heading-4--font-weight--mobile );--TEXT-DECORATION--HEADING-4:var( --digi--typography--heading-4--text-decoration--mobile );--MARGIN--HEADING-4:var(--digi--typography--h4--margin--small);--FONT-SIZE--HEADING-5:var(--digi--typography--heading-4--font-size--mobile);--LINE-HEIGHT--HEADING-5:var( --digi--typography--heading-4--line-height--mobile );--FONT-WEIGHT--HEADING-5:var( --digi--typography--heading-4--font-weight--mobile );--TEXT-DECORATION--HEADING-5:var( --digi--typography--heading-4--text-decoration--mobile );--MARGIN--HEADING-5:var(--digi--typography--h4--margin--small);--FONT-SIZE--HEADING-6:var(--digi--typography--heading-4--font-size--mobile);--LINE-HEIGHT--HEADING-6:var( --digi--typography--heading-4--line-height--mobile );--FONT-WEIGHT--HEADING-6:var( --digi--typography--heading-4--font-weight--mobile );--TEXT-DECORATION--HEADING-6:var( --digi--typography--heading-4--text-decoration--mobile );--MARGIN--HEADING-6:var(--digi--typography--h4--margin--small)}@media (min-width: 61.9375rem){digi-typography{--FONT-SIZE--BODY:var(--digi--typography--body--font-size--desktop);--LINE-HEIGHT--BODY:var(--digi--typography--body--line-height--desktop);--FONT-WEIGHT--BODY:var(--digi--typography--body--font-weight--desktop);--TEXT-DECORATION--BODY:var( --digi--typography--body--text-decoration--desktop );--MARGIN--BODY:var(--digi--typography--paragraph--margin--small);--FONT-SIZE--LINK:var(--digi--typography--link--font-size--desktop);--LINE-HEIGHT--LINK:var(--digi--typography--link--line-height--desktop);--FONT-WEIGHT--LINK:var(--digi--typography--link--font-weight--desktop);--TEXT-DECORATION--LINK:var( --digi--typography--link--text-decoration--desktop );--FONT-SIZE--HEADING-1:var( --digi--typography--heading-1--font-size--desktop );--LINE-HEIGHT--HEADING-1:var( --digi--typography--heading-1--line-height--desktop );--FONT-WEIGHT--HEADING-1:var( --digi--typography--heading-1--font-weight--desktop );--TEXT-DECORATION--HEADING-1:var( --digi--typography--heading-1--text-decoration--desktop );--MARGIN--HEADING-1:var(--digi--typography--h1--margin--medium);--FONT-SIZE--HEADING-2:var( --digi--typography--heading-2--font-size--desktop );--LINE-HEIGHT--HEADING-2:var( --digi--typography--heading-2--line-height--desktop );--FONT-WEIGHT--HEADING-2:var( --digi--typography--heading-2--font-weight--desktop );--TEXT-DECORATION--HEADING-2:var( --digi--typography--heading-2--text-decoration--desktop );--MARGIN--HEADING-2:var(--digi--typography--h2--margin--small);--FONT-SIZE--HEADING-3:var( --digi--typography--heading-3--font-size--desktop );--LINE-HEIGHT--HEADING-3:var( --digi--typography--heading-3--line-height--desktop );--FONT-WEIGHT--HEADING-3:var( --digi--typography--heading-3--font-weight--desktop );--TEXT-DECORATION--HEADING-3:var( --digi--typography--heading-3--text-decoration--desktop );--MARGIN--HEADING-3:var(--digi--typography--h3--margin--small);--FONT-SIZE--HEADING-4:var( --digi--typography--heading-4--font-size--desktop );--LINE-HEIGHT--HEADING-4:var( --digi--typography--heading-4--line-height--desktop );--FONT-WEIGHT--HEADING-4:var( --digi--typography--heading-4--font-weight--desktop );--TEXT-DECORATION--HEADING-4:var( --digi--typography--heading-4--text-decoration--desktop );--MARGIN--HEADING-4:var(--digi--typography--h4--margin--small);--FONT-SIZE--HEADING-5:var( --digi--typography--heading-4--font-size--desktop );--LINE-HEIGHT--HEADING-5:var( --digi--typography--heading-4--line-height--desktop );--FONT-WEIGHT--HEADING-5:var( --digi--typography--heading-4--font-weight--desktop );--TEXT-DECORATION--HEADING-5:var( --digi--typography--heading-4--text-decoration--desktop );--MARGIN--HEADING-5:var(--digi--typography--h5--margin--small);--FONT-SIZE--HEADING-6:var( --digi--typography--heading-4--font-size--desktop );--LINE-HEIGHT--HEADING-6:var( --digi--typography--heading-4--line-height--desktop );--FONT-WEIGHT--HEADING-6:var( --digi--typography--heading-4--font-weight--desktop );--TEXT-DECORATION--HEADING-6:var( --digi--typography--heading-4--text-decoration--desktop );--MARGIN--HEADING-6:var(--digi--typography--h6--margin--small)}}digi-typography h1,digi-typography h2,digi-typography h3,digi-typography h4,digi-typography h5,digi-typography h6{margin-top:0;}digi-typography h1,digi-typography .digi-h1{font-size:var(--FONT-SIZE--HEADING-1);line-height:var(--LINE-HEIGHT--HEADING-1);font-weight:var(--FONT-WEIGHT--HEADING-1);text-decoration:var(--TEXT-DECORATION--HEADING-1);margin-bottom:var(--MARGIN--HEADING-1)}digi-typography h2,digi-typography .digi-h2{font-size:var(--FONT-SIZE--HEADING-2);line-height:var(--LINE-HEIGHT--HEADING-2);font-weight:var(--FONT-WEIGHT--HEADING-2);text-decoration:var(--TEXT-DECORATION--HEADING-2);margin-bottom:var(--MARGIN--HEADING-2)}digi-typography h3,digi-typography .digi-h3{font-size:var(--FONT-SIZE--HEADING-3);line-height:var(--LINE-HEIGHT--HEADING-3);font-weight:var(--FONT-WEIGHT--HEADING-3);text-decoration:var(--TEXT-DECORATION--HEADING-3);margin-bottom:var(--MARGIN--HEADING-3)}digi-typography h4,digi-typography .digi-h4{font-size:var(--FONT-SIZE--HEADING-4);line-height:var(--LINE-HEIGHT--HEADING-4);font-weight:var(--FONT-WEIGHT--HEADING-4);text-decoration:var(--TEXT-DECORATION--HEADING-4);margin-bottom:var(--MARGIN--HEADING-4)}digi-typography h5,digi-typography .digi-h5{font-size:var(--FONT-SIZE--HEADING-5);line-height:var(--LINE-HEIGHT--HEADING-5);font-weight:var(--FONT-WEIGHT--HEADING-5);text-decoration:var(--TEXT-DECORATION--HEADING-5);margin-bottom:var(--MARGIN--HEADING-5)}digi-typography h6,digi-typography .digi-h6{font-size:var(--FONT-SIZE--HEADING-6);line-height:var(--LINE-HEIGHT--HEADING-6);font-weight:var(--FONT-WEIGHT--HEADING-6);text-decoration:var(--TEXT-DECORATION--HEADING-6);margin-bottom:var(--MARGIN--HEADING-6)}digi-typography p,digi-typography blockquote{font-size:var(--FONT-SIZE--BODY);line-height:var(--LINE-HEIGHT--BODY);font-weight:var(--FONT-WEIGHT--BODY);text-decoration:var(--TEXT-DECORATION--BODY);margin-top:initial;margin-bottom:var(--MARGIN--BODY);max-width:var(--digi--paragraph-width--medium)}digi-typography p:last-child,digi-typography blockquote:last-child{margin-bottom:0}digi-typography blockquote{margin-inline:0}digi-typography digi-typography-preamble{display:block;margin-bottom:var(--MARGIN--BODY)}digi-typography digi-typography-preamble:last-child{margin-bottom:0}digi-typography ul,digi-typography ol,digi-typography dl{font-size:var(--FONT-SIZE--BODY);line-height:var(--LINE-HEIGHT--BODY);font-weight:var(--FONT-WEIGHT--BODY);text-decoration:var(--TEXT-DECORATION--BODY);max-width:var(--digi--paragraph-width--medium);margin-bottom:var(--MARGIN--BODY)}digi-typography ul,digi-typography ol{margin:0 0 var(--MARGIN--BODY) 0;padding-inline-start:1.5rem}digi-typography ul li,digi-typography ol li{margin-top:initial;margin-bottom:0.5rem;box-sizing:border-box;width:100%;padding-left:0}digi-typography ul li:last-child,digi-typography ol li:last-child{margin-bottom:0}digi-typography a{font-size:1em;line-height:var(--LINE-HEIGHT--LINK);font-weight:inherit;text-decoration:var(--TEXT-DECORATION--LINK);color:var(--digi--color--text--interactive--primary);text-decoration-thickness:var(--digi--typography--text-decoration-thickness--default);text-underline-offset:var(--digi--typography--text-underline-offset)}digi-typography a:hover{text-decoration:var(--TEXT-DECORATION--LINK);text-decoration-thickness:var(--digi--typography--text-decoration-thickness--hover)}digi-typography a:focus-visible{outline:2px solid black;outline-offset:2px;box-shadow:0px 0px 0px 5px white}digi-typography a:visited{color:var(--digi--color--text--interactive--visited)}digi-typography .digi-typography--hide-visited a:visited{color:var(--digi--color--text--interactive--primary)}digi-typography strong{font-weight:var(--digi--typography--label--font-weight--desktop)}`;
|
|
2447
2873
|
|
|
2448
2874
|
const Typography = class {
|
|
@@ -2460,8 +2886,11 @@ const Typography = class {
|
|
|
2460
2886
|
};
|
|
2461
2887
|
Typography.style = typographyCss();
|
|
2462
2888
|
|
|
2889
|
+
exports.digi_badge_notification = BadgeNotification;
|
|
2463
2890
|
exports.digi_button = Button;
|
|
2464
2891
|
exports.digi_calendar_week_view = CalendarWeekView;
|
|
2465
2892
|
exports.digi_icon_chevron_left = IconChevronLeft;
|
|
2466
2893
|
exports.digi_icon_chevron_right = IconChevronRight;
|
|
2894
|
+
exports.digi_tablist = NavigationTablist;
|
|
2895
|
+
exports.digi_tablist_panel = NavigationTabPanel;
|
|
2467
2896
|
exports.digi_typography = Typography;
|