@designsystem-se/af 38.1.0 → 38.2.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/digi-calendar-datepicker.js +10 -6
- package/components/digi-form-checkbox.js +1 -1
- package/components/digi-form-error-list.js +33 -1
- package/components/digi-form-filter.js +1 -1
- package/components/digi-form-select-filter.js +84 -47
- package/components/{p-13c09880.js → p-f84f590e.js} +2 -2
- package/custom-elements.json +9 -1
- package/dist/cjs/digi-arbetsformedlingen.cjs.js +1 -1
- package/dist/cjs/digi-button_11.cjs.entry.js +1194 -0
- package/dist/cjs/digi-calendar-datepicker.cjs.entry.js +15 -13
- package/dist/cjs/digi-code-block_3.cjs.entry.js +6 -6
- package/dist/cjs/digi-dialog.cjs.entry.js +6 -6
- package/dist/cjs/digi-footer-card.cjs.entry.js +29 -0
- package/dist/cjs/digi-footer.cjs.entry.js +74 -0
- package/dist/cjs/digi-form-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/digi-form-error-list.cjs.entry.js +39 -7
- package/dist/cjs/digi-form-file-upload.cjs.entry.js +9 -10
- package/dist/cjs/digi-form-input-search.cjs.entry.js +6 -7
- package/dist/cjs/digi-form-receipt.cjs.entry.js +6 -6
- package/dist/cjs/digi-header-avatar.cjs.entry.js +114 -0
- package/dist/cjs/digi-header-navigation-item.cjs.entry.js +27 -0
- package/dist/cjs/digi-header-navigation.cjs.entry.js +228 -0
- package/dist/cjs/digi-header-notification.cjs.entry.js +23 -0
- package/dist/cjs/digi-header.cjs.entry.js +115 -0
- package/dist/cjs/digi-icon-accessibility-universal.cjs.entry.js +30 -0
- package/dist/cjs/digi-icon-bars.cjs.entry.js +30 -0
- package/dist/cjs/digi-icon-bell-filled.cjs.entry.js +30 -0
- package/dist/cjs/digi-icon-envelope.cjs.entry.js +30 -0
- package/dist/cjs/{digi-link-external.cjs.entry.js → digi-icon-external-link-alt_2.cjs.entry.js} +24 -0
- package/dist/cjs/digi-icon-globe.cjs.entry.js +30 -0
- package/dist/cjs/digi-icon-sign.cjs.entry.js +30 -0
- package/dist/cjs/digi-icon-x.cjs.entry.js +30 -0
- package/dist/cjs/digi-layout-block_2.cjs.entry.js +92 -0
- package/dist/cjs/digi-link.cjs.entry.js +75 -0
- package/dist/cjs/digi-logo.cjs.entry.js +49 -0
- package/dist/cjs/digi-media-image_2.cjs.entry.js +167 -0
- package/dist/cjs/digi-navigation-pagination.cjs.entry.js +6 -6
- package/dist/cjs/digi-navigation-sidebar-button.cjs.entry.js +30 -0
- package/dist/cjs/digi-notification-alert.cjs.entry.js +6 -6
- package/dist/cjs/digi-notification-error-page.cjs.entry.js +6 -6
- package/dist/cjs/digi-title-logo.cjs.entry.js +133 -0
- package/dist/cjs/digi-tools-feedback.cjs.entry.js +6 -6
- package/dist/cjs/digi-typography.cjs.entry.js +26 -0
- package/dist/cjs/digi-util-breakpoint-observer.cjs.entry.js +48 -0
- package/dist/cjs/footer-card-variation.enum-99555edc.js +8 -0
- package/dist/cjs/{form-input-type.enum-9c8ee12a.js → form-input-type.enum-1fb2180a.js} +14 -0
- package/dist/cjs/{form-file-upload-variation.enum-634cfae8.js → form-validation-message-variation.enum-c5ec3e2d.js} +7 -0
- package/dist/cjs/index-7a477838.js +84 -20
- package/dist/cjs/index.cjs.js +73 -73
- package/dist/cjs/layout-container-max-width.enum-7e637f44.js +21 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/logo-color.enum-76f6c506.js +7 -0
- package/dist/cjs/{typography-variation.enum-c0ef9190.js → typography-variation.enum-9aab5027.js} +28 -33
- package/dist/collection/components/_calendar/calendar-datepicker/calendar-datepicker.js +53 -6
- package/dist/collection/components/_form/form-checkbox/form-checkbox.js +8 -5
- package/dist/collection/components/_form/form-error-list/form-error-list.js +20 -1
- package/dist/collection/components/_form/form-select-filter/form-select-filter.js +85 -48
- package/dist/collection/design-tokens/components/_logo.variables.scss +17 -15
- package/dist/digi-arbetsformedlingen/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-8833044b.entry.js → p-02731621.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-0ef5ec06.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-10261517.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-37c0ea9e.entry.js → p-2295239c.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-97f66789.entry.js → p-25371300.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-2c685e4f.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-300aa9ef.js +1 -0
- package/dist/digi-arbetsformedlingen/p-3887bb40.js +1 -0
- package/dist/digi-arbetsformedlingen/p-3efa2f0b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-47ab0b39.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-4e9f2f05.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-ddd659bf.entry.js → p-655cda00.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-6abd8d58.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-7e77bbe7.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-7e85c9e3.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-8713df13.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-8d9f4f10.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-8ef41ad9.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-18880083.entry.js → p-986a1582.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-9dd41cc4.js +1 -0
- package/dist/digi-arbetsformedlingen/p-a0c77dff.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-a2008b0a.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-e5bd5a7e.entry.js → p-b3283953.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-beba49c2.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-bf80a488.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-a186888d.entry.js → p-c3e0f6dd.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-c553b73b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-c604694f.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-c604a480.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-c64b4626.js +1 -0
- package/dist/digi-arbetsformedlingen/p-c7a512ee.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-c7d079d0.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-c9dfda73.js +1 -0
- package/dist/digi-arbetsformedlingen/p-d6d7b1d8.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-db246e29.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-39468f49.entry.js → p-de22ce43.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-ecc2e481.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-ee88e3f1.js +1 -0
- package/dist/digi-arbetsformedlingen/p-f2e16531.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-f5bcd77b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-f87c0b45.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-fa77fcf7.entry.js +1 -0
- package/dist/esm/digi-arbetsformedlingen.js +1 -1
- package/dist/esm/digi-button_11.entry.js +1180 -0
- package/dist/esm/digi-calendar-datepicker.entry.js +14 -12
- package/dist/esm/digi-code-block_3.entry.js +6 -6
- package/dist/esm/digi-dialog.entry.js +6 -6
- package/dist/esm/digi-footer-card.entry.js +25 -0
- package/dist/esm/digi-footer.entry.js +70 -0
- package/dist/esm/digi-form-checkbox.entry.js +2 -2
- package/dist/esm/digi-form-error-list.entry.js +39 -7
- package/dist/esm/digi-form-file-upload.entry.js +1 -2
- package/dist/esm/digi-form-input-search.entry.js +1 -2
- package/dist/esm/digi-form-receipt.entry.js +6 -6
- package/dist/esm/digi-header-avatar.entry.js +110 -0
- package/dist/esm/digi-header-navigation-item.entry.js +23 -0
- package/dist/esm/digi-header-navigation.entry.js +224 -0
- package/dist/esm/digi-header-notification.entry.js +19 -0
- package/dist/esm/digi-header.entry.js +111 -0
- package/dist/esm/digi-icon-accessibility-universal.entry.js +26 -0
- package/dist/esm/digi-icon-bars.entry.js +26 -0
- package/dist/esm/digi-icon-bell-filled.entry.js +26 -0
- package/dist/esm/digi-icon-envelope.entry.js +26 -0
- package/dist/esm/{digi-link-external.entry.js → digi-icon-external-link-alt_2.entry.js} +25 -2
- package/dist/esm/digi-icon-globe.entry.js +26 -0
- package/dist/esm/digi-icon-sign.entry.js +26 -0
- package/dist/esm/digi-icon-x.entry.js +26 -0
- package/dist/esm/digi-layout-block_2.entry.js +87 -0
- package/dist/esm/digi-link.entry.js +71 -0
- package/dist/esm/digi-logo.entry.js +45 -0
- package/dist/esm/digi-media-image_2.entry.js +162 -0
- package/dist/esm/digi-navigation-pagination.entry.js +6 -6
- package/dist/esm/digi-navigation-sidebar-button.entry.js +26 -0
- package/dist/esm/digi-notification-alert.entry.js +6 -6
- package/dist/esm/digi-notification-error-page.entry.js +6 -6
- package/dist/esm/digi-title-logo.entry.js +129 -0
- package/dist/esm/digi-tools-feedback.entry.js +6 -6
- package/dist/esm/digi-typography.entry.js +22 -0
- package/dist/esm/digi-util-breakpoint-observer.entry.js +44 -0
- package/dist/esm/footer-card-variation.enum-cc732148.js +8 -0
- package/dist/esm/{form-input-type.enum-3da3db27.js → form-input-type.enum-a6bba983.js} +15 -1
- package/dist/esm/{form-file-upload-variation.enum-9c49ec5e.js → form-validation-message-variation.enum-f7835fc5.js} +8 -1
- package/dist/esm/index-148a7577.js +84 -20
- package/dist/esm/index.js +6 -6
- package/dist/esm/layout-container-max-width.enum-c40018ac.js +21 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/logo-color.enum-8593dca6.js +7 -0
- package/dist/esm/{typography-variation.enum-c85d7857.js → typography-variation.enum-fdda731c.js} +29 -34
- package/dist/types/components/_calendar/calendar-datepicker/calendar-datepicker.d.ts +10 -0
- package/dist/types/components/_form/form-checkbox/form-checkbox.d.ts +5 -2
- package/dist/types/components/_form/form-error-list/form-error-list.d.ts +3 -0
- package/dist/types/components/_form/form-select-filter/form-select-filter.d.ts +22 -3
- package/dist/types/components.d.ts +26 -6
- package/hydrate/index.js +129 -56
- package/hydrate/index.mjs +129 -56
- package/package.json +1 -1
- package/dist/cjs/digi-button_27.cjs.entry.js +0 -1380
- package/dist/cjs/digi-form-input.cjs.entry.js +0 -194
- package/dist/cjs/digi-form-label_3.cjs.entry.js +0 -129
- package/dist/cjs/digi-form-select-filter.cjs.entry.js +0 -564
- package/dist/cjs/digi-icon-check.cjs.entry.js +0 -30
- package/dist/cjs/digi-icon-chevron-down.cjs.entry.js +0 -30
- package/dist/cjs/digi-icon-validation-error_2.cjs.entry.js +0 -53
- package/dist/cjs/form-input-search-variation.enum-e0e025b1.js +0 -15
- package/dist/cjs/form-input-variation.enum-c750520c.js +0 -29
- package/dist/cjs/form-validation-message-variation.enum-855ae0be.js +0 -8
- package/dist/digi-arbetsformedlingen/p-111fb07d.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-1f956af8.js +0 -1
- package/dist/digi-arbetsformedlingen/p-2788683e.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-2d2f6950.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-30dc159d.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-4841b4e1.js +0 -1
- package/dist/digi-arbetsformedlingen/p-59073668.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-7933b555.js +0 -1
- package/dist/digi-arbetsformedlingen/p-82611050.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-82a74908.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-88b4d03a.js +0 -1
- package/dist/digi-arbetsformedlingen/p-905ccb30.js +0 -1
- package/dist/digi-arbetsformedlingen/p-9c053cf8.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-9dae073c.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-d595e8a3.js +0 -1
- package/dist/digi-arbetsformedlingen/p-eda570be.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-ef689144.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-f0a405ca.entry.js +0 -1
- package/dist/esm/digi-button_27.entry.js +0 -1350
- package/dist/esm/digi-form-input.entry.js +0 -190
- package/dist/esm/digi-form-label_3.entry.js +0 -123
- package/dist/esm/digi-form-select-filter.entry.js +0 -560
- package/dist/esm/digi-icon-check.entry.js +0 -26
- package/dist/esm/digi-icon-chevron-down.entry.js +0 -26
- package/dist/esm/digi-icon-validation-error_2.entry.js +0 -48
- package/dist/esm/form-input-search-variation.enum-6d8dc10a.js +0 -15
- package/dist/esm/form-input-variation.enum-64d9450f.js +0 -29
- package/dist/esm/form-validation-message-variation.enum-bcef8a9d.js +0 -8
package/dist/cjs/{typography-variation.enum-c0ef9190.js → typography-variation.enum-9aab5027.js}
RENAMED
|
@@ -51,13 +51,6 @@ exports.DialogVariation = void 0;
|
|
|
51
51
|
DialogVariation["SECONDARY"] = "secondary";
|
|
52
52
|
})(exports.DialogVariation || (exports.DialogVariation = {}));
|
|
53
53
|
|
|
54
|
-
exports.FooterCardVariation = void 0;
|
|
55
|
-
(function (FooterCardVariation) {
|
|
56
|
-
FooterCardVariation["NONE"] = "none";
|
|
57
|
-
FooterCardVariation["ICON"] = "icon";
|
|
58
|
-
FooterCardVariation["BORDER"] = "border";
|
|
59
|
-
})(exports.FooterCardVariation || (exports.FooterCardVariation = {}));
|
|
60
|
-
|
|
61
54
|
exports.FooterVariation = void 0;
|
|
62
55
|
(function (FooterVariation) {
|
|
63
56
|
FooterVariation["LARGE"] = "large";
|
|
@@ -74,6 +67,34 @@ exports.FormErrorListHeadingLevel = void 0;
|
|
|
74
67
|
FormErrorListHeadingLevel["H6"] = "h6";
|
|
75
68
|
})(exports.FormErrorListHeadingLevel || (exports.FormErrorListHeadingLevel = {}));
|
|
76
69
|
|
|
70
|
+
exports.FormInputMode = void 0;
|
|
71
|
+
(function (FormInputMode) {
|
|
72
|
+
FormInputMode["DEFAULT"] = "";
|
|
73
|
+
FormInputMode["NONE"] = "none";
|
|
74
|
+
FormInputMode["TEXT"] = "text";
|
|
75
|
+
FormInputMode["DECIMAL"] = "decimal";
|
|
76
|
+
FormInputMode["NUMERIC"] = "numeric";
|
|
77
|
+
FormInputMode["TEL"] = "tel";
|
|
78
|
+
FormInputMode["SEARCH"] = "search";
|
|
79
|
+
FormInputMode["EMAIL"] = "email";
|
|
80
|
+
FormInputMode["URL"] = "url";
|
|
81
|
+
})(exports.FormInputMode || (exports.FormInputMode = {}));
|
|
82
|
+
|
|
83
|
+
exports.FormInputValidation = void 0;
|
|
84
|
+
(function (FormInputValidation) {
|
|
85
|
+
FormInputValidation["SUCCESS"] = "success";
|
|
86
|
+
FormInputValidation["ERROR"] = "error";
|
|
87
|
+
FormInputValidation["WARNING"] = "warning";
|
|
88
|
+
FormInputValidation["NEUTRAL"] = "neutral";
|
|
89
|
+
})(exports.FormInputValidation || (exports.FormInputValidation = {}));
|
|
90
|
+
|
|
91
|
+
exports.FormInputVariation = void 0;
|
|
92
|
+
(function (FormInputVariation) {
|
|
93
|
+
FormInputVariation["SMALL"] = "small";
|
|
94
|
+
FormInputVariation["MEDIUM"] = "medium";
|
|
95
|
+
FormInputVariation["LARGE"] = "large";
|
|
96
|
+
})(exports.FormInputVariation || (exports.FormInputVariation = {}));
|
|
97
|
+
|
|
77
98
|
exports.FormFieldsetValidation = void 0;
|
|
78
99
|
(function (FormFieldsetValidation) {
|
|
79
100
|
FormFieldsetValidation["SUCCESS"] = "success";
|
|
@@ -179,32 +200,6 @@ exports.InfoCardHeadingLevel = void 0;
|
|
|
179
200
|
InfoCardHeadingLevel["H6"] = "h6";
|
|
180
201
|
})(exports.InfoCardHeadingLevel || (exports.InfoCardHeadingLevel = {}));
|
|
181
202
|
|
|
182
|
-
exports.LayoutBlockContainer = void 0;
|
|
183
|
-
(function (LayoutBlockContainer) {
|
|
184
|
-
LayoutBlockContainer["STATIC"] = "static";
|
|
185
|
-
LayoutBlockContainer["FLUID"] = "fluid";
|
|
186
|
-
LayoutBlockContainer["NONE"] = "none";
|
|
187
|
-
})(exports.LayoutBlockContainer || (exports.LayoutBlockContainer = {}));
|
|
188
|
-
|
|
189
|
-
exports.LayoutContainerVariation = void 0;
|
|
190
|
-
(function (LayoutContainerVariation) {
|
|
191
|
-
LayoutContainerVariation["STATIC"] = "static";
|
|
192
|
-
LayoutContainerVariation["FLUID"] = "fluid";
|
|
193
|
-
LayoutContainerVariation["NONE"] = "none";
|
|
194
|
-
})(exports.LayoutContainerVariation || (exports.LayoutContainerVariation = {}));
|
|
195
|
-
|
|
196
|
-
exports.LayoutContainerMaxWidth = void 0;
|
|
197
|
-
(function (LayoutContainerMaxWidth) {
|
|
198
|
-
LayoutContainerMaxWidth["WIDTH_1200"] = "1200";
|
|
199
|
-
LayoutContainerMaxWidth["WIDTH_1400"] = "1400";
|
|
200
|
-
})(exports.LayoutContainerMaxWidth || (exports.LayoutContainerMaxWidth = {}));
|
|
201
|
-
|
|
202
|
-
exports.LogoColor = void 0;
|
|
203
|
-
(function (LogoColor) {
|
|
204
|
-
LogoColor["PRIMARY"] = "primary";
|
|
205
|
-
LogoColor["SECONDARY"] = "secondary";
|
|
206
|
-
})(exports.LogoColor || (exports.LogoColor = {}));
|
|
207
|
-
|
|
208
203
|
exports.NotificationAlertHeadingLevel = void 0;
|
|
209
204
|
(function (NotificationAlertHeadingLevel) {
|
|
210
205
|
NotificationAlertHeadingLevel["H1"] = "h1";
|
|
@@ -41,6 +41,8 @@ export class CalendarDatepicker {
|
|
|
41
41
|
this.afCloseOnSelect = false;
|
|
42
42
|
this.afOpenCalendarTo = undefined;
|
|
43
43
|
this.afErrorMessageIsAlert = true;
|
|
44
|
+
this.afAnnounceIfOptional = false;
|
|
45
|
+
this.afAnnounceIfOptionalText = undefined;
|
|
44
46
|
}
|
|
45
47
|
afDisableValidationChangeHandler(newVal) {
|
|
46
48
|
if (!newVal) {
|
|
@@ -372,9 +374,9 @@ export class CalendarDatepicker {
|
|
|
372
374
|
return this.afSelectedDates;
|
|
373
375
|
}
|
|
374
376
|
render() {
|
|
375
|
-
return (h(Host, { key: '
|
|
377
|
+
return (h(Host, { key: 'a22b366eece8bdf2a6d66ba7b4561093391ad16d', tabindex: -1 }, h("div", { key: '5ec3557df78bb012f2e10f1852252e78e2470ee3', class: Object.assign({ 'digi-calendar-datepicker': true }, this.cssModifiers), id: `${this.afId}-datepicker` }, h("div", { key: '1215a13021718ac98ad2a4a7a5bae3c456385124', class: "digi-calendar-datepicker__input-field" }, h("digi-form-input", { key: '8794d312452fe11f0f9052bbdd238e5570ec55f0', ref: (el) => (this._input = el), class: 'digi-calendar-datepicker__input-component', afLabel: this.afLabel, afLabelDescription: this.afLabelDescription, afName: this.afName, afValue: this.inputValue, afValidation: this.hasBuiltInValidationError()
|
|
376
378
|
? FormInputValidation.ERROR
|
|
377
|
-
: this.afValidation, afValidationText: this.getErrorText(), afId: this.afId, afAriaDescribedby: `${this.afId}--validation-message`, afRequired: this.afRequired, afRequiredText: this.afRequiredText, onAfOnChange: (evt) => {
|
|
379
|
+
: this.afValidation, afValidationText: this.getErrorText(), afId: this.afId, afAriaDescribedby: `${this.afId}--validation-message`, afRequired: this.afRequired, afRequiredText: this.afRequiredText, afAnnounceIfOptional: this.afAnnounceIfOptional, afAnnounceIfOptionalText: this.afAnnounceIfOptionalText, onAfOnChange: (evt) => {
|
|
378
380
|
evt.stopImmediatePropagation();
|
|
379
381
|
this.parseInput(evt);
|
|
380
382
|
}, onAfOnBlur: (evt) => {
|
|
@@ -389,11 +391,11 @@ export class CalendarDatepicker {
|
|
|
389
391
|
e.preventDefault();
|
|
390
392
|
const focusableDateButton = this.hostElement.querySelector('.digi-calendar__date[tabindex="0"]');
|
|
391
393
|
focusableDateButton === null || focusableDateButton === void 0 ? void 0 : focusableDateButton.focus();
|
|
392
|
-
} }, h("button", { key: '
|
|
394
|
+
} }, h("button", { key: 'c953ddf0c99cfd3b892941da7da4a887b342fd78', id: this.afId + '-button', class: "digi-calendar-datepicker__input-button", slot: "button", "aria-label": this.showCalendar
|
|
393
395
|
? this.afCloseCalendarAriaLabel
|
|
394
|
-
: this.afOpenCalendarAriaLabel, "aria-controls": "calendar-popup", "aria-expanded": this.showCalendar ? 'true' : 'false', onClick: () => this.toggleCalendar(), type: "button" }, h("digi-icon-calendar-alt", { key: '
|
|
396
|
+
: this.afOpenCalendarAriaLabel, "aria-controls": "calendar-popup", "aria-expanded": this.showCalendar ? 'true' : 'false', onClick: () => this.toggleCalendar(), type: "button" }, h("digi-icon-calendar-alt", { key: '46c7387d404b77911b97f31c10e7147bd436c7e3', class: "digi-calendar-datepicker__button-icon", slot: "icon" })))), h("div", { key: '91894a4219afa79d913f558f5d1cc6b410b535ce', class: "digi-calendar-datepicker__calendar", id: "calendar-popup" }, h("p", { key: '989fc17ea7a95aa014a26e09f7db7f59fe53a36b', role: "alert", class: "digi-calendar-datepicker__sr-instructions" }, this.showCalendar
|
|
395
397
|
? `${_t.calendar.screenReaderInstructions}${this.screenReaderUpdateTrigger ? '\u200B' : ''}`
|
|
396
|
-
: ''), h("digi-calendar", { key: '
|
|
398
|
+
: ''), h("digi-calendar", { key: '6e62fb845769eca0a9b8cb21e4a09a5620804d42', afActive: this.showCalendar, afShowWeekNumber: this.afShowWeekNumber, afMultipleDates: this.afMultipleDates, afYearSelect: this.afYearSelect, afSelectedDates: this.getSelectedDates, afMinDate: this.afMinDate, afMaxDate: this.afMaxDate, "aria-hidden": !this.showCalendar, afOpenCalendarTo: this.afOpenCalendarTo, onAfOnDateSelectedChange: (evt) => {
|
|
397
399
|
evt.stopImmediatePropagation();
|
|
398
400
|
this.parseCalendar(evt);
|
|
399
401
|
}, onKeyDown: (e) => {
|
|
@@ -404,7 +406,7 @@ export class CalendarDatepicker {
|
|
|
404
406
|
return;
|
|
405
407
|
e.preventDefault();
|
|
406
408
|
this.focusOnCalendarInput();
|
|
407
|
-
} })), this.afCloseOnSelect && !this.afMultipleDates && (h("div", { key: '
|
|
409
|
+
} })), this.afCloseOnSelect && !this.afMultipleDates && (h("div", { key: 'd9f3eb470b29a0ab96134f1e4666743efacd7448', class: "digi-calendar-datepicker__selected-date-alert", role: this.errorMessageIsAlert ? 'alert' : null }, this.afSelectedDates.length > 0
|
|
408
410
|
? `${_t.calendar.datepicker.selectedDate}: ${this.datesToInputString(this.afSelectedDates)}`
|
|
409
411
|
: '')))));
|
|
410
412
|
}
|
|
@@ -974,6 +976,51 @@ export class CalendarDatepicker {
|
|
|
974
976
|
"attribute": "af-error-message-is-alert",
|
|
975
977
|
"reflect": false,
|
|
976
978
|
"defaultValue": "true"
|
|
979
|
+
},
|
|
980
|
+
"afAnnounceIfOptional": {
|
|
981
|
+
"type": "boolean",
|
|
982
|
+
"mutable": false,
|
|
983
|
+
"complexType": {
|
|
984
|
+
"original": "boolean",
|
|
985
|
+
"resolved": "boolean",
|
|
986
|
+
"references": {}
|
|
987
|
+
},
|
|
988
|
+
"required": false,
|
|
989
|
+
"optional": false,
|
|
990
|
+
"docs": {
|
|
991
|
+
"tags": [{
|
|
992
|
+
"name": "en",
|
|
993
|
+
"text": "Set this to true if the form contains more required fields than optional fields."
|
|
994
|
+
}],
|
|
995
|
+
"text": "S\u00E4tt denna till true om formul\u00E4ret inneh\u00E5ller fler obligatoriska f\u00E4lt \u00E4n valfria."
|
|
996
|
+
},
|
|
997
|
+
"getter": false,
|
|
998
|
+
"setter": false,
|
|
999
|
+
"attribute": "af-announce-if-optional",
|
|
1000
|
+
"reflect": false,
|
|
1001
|
+
"defaultValue": "false"
|
|
1002
|
+
},
|
|
1003
|
+
"afAnnounceIfOptionalText": {
|
|
1004
|
+
"type": "string",
|
|
1005
|
+
"mutable": false,
|
|
1006
|
+
"complexType": {
|
|
1007
|
+
"original": "string",
|
|
1008
|
+
"resolved": "string",
|
|
1009
|
+
"references": {}
|
|
1010
|
+
},
|
|
1011
|
+
"required": false,
|
|
1012
|
+
"optional": false,
|
|
1013
|
+
"docs": {
|
|
1014
|
+
"tags": [{
|
|
1015
|
+
"name": "en",
|
|
1016
|
+
"text": "Set text for afAnnounceIfOptional."
|
|
1017
|
+
}],
|
|
1018
|
+
"text": "S\u00E4tter text f\u00F6r afAnnounceIfOptional."
|
|
1019
|
+
},
|
|
1020
|
+
"getter": false,
|
|
1021
|
+
"setter": false,
|
|
1022
|
+
"attribute": "af-announce-if-optional-text",
|
|
1023
|
+
"reflect": false
|
|
977
1024
|
}
|
|
978
1025
|
};
|
|
979
1026
|
}
|
|
@@ -110,7 +110,7 @@ export class FormCheckbox {
|
|
|
110
110
|
this.afOnInput.emit(e);
|
|
111
111
|
}
|
|
112
112
|
render() {
|
|
113
|
-
return (h(Host, { key: '
|
|
113
|
+
return (h(Host, { key: 'e8ca1dfe96537dd438a4b6c206adfc7c9fd64d9c', tabindex: -1 }, h("div", { key: '850911b7ffdcea222b12c2c883cf93b63f703b4f', class: Object.assign({ 'digi-form-checkbox': true }, this.cssModifiers) }, h("input", { key: '923a49d0402e6b3034d3e8e6d43033692695c830', class: "digi-form-checkbox__input", ref: (el) => {
|
|
114
114
|
var _a;
|
|
115
115
|
this._input = el;
|
|
116
116
|
(_a = this === null || this === void 0 ? void 0 : this.afInputRef) === null || _a === void 0 ? void 0 : _a.call(this, el);
|
|
@@ -118,7 +118,7 @@ export class FormCheckbox {
|
|
|
118
118
|
? null
|
|
119
119
|
: `${this.afAriaDescribedby ? `${this.afAriaDescribedby} ` : ''}${this.afDescription ? `${this.afId}-description` : ''}`, "aria-labelledby": this.afAriaLabelledby, "aria-label": this.afAriaLabel, "aria-invalid": this.afValidation === FormCheckboxValidation.ERROR
|
|
120
120
|
? 'true'
|
|
121
|
-
: 'false', required: this.afRequired, id: this.afId, name: this.afName, type: "checkbox", checked: this.afChecked, value: this.afValue, indeterminate: this.afIndeterminate, autofocus: this.afAutofocus ? this.afAutofocus : null }), h("label", { key: '
|
|
121
|
+
: 'false', required: this.afRequired, id: this.afId, name: this.afName, type: "checkbox", checked: this.afChecked, value: this.afValue, indeterminate: this.afIndeterminate, autofocus: this.afAutofocus ? this.afAutofocus : null }), h("label", { key: 'dccbd4e83dbc757483a18ac22d1539ef83dfb534', htmlFor: this.afId, class: "digi-form-checkbox__label" }, h("span", { key: '1cbc88be9d74dab3e04472bc9462712377447d4a', class: "digi-form-checkbox__box" }), this.afLabel), !!this.afDescription && (h("p", { key: 'bdab264d9d13520858c581d2664c0d53171a1415', id: `${this.afId}-description`, class: "digi-form-checkbox__description" }, this.afDescription)))));
|
|
122
122
|
}
|
|
123
123
|
static get is() { return "digi-form-checkbox"; }
|
|
124
124
|
static get encapsulation() { return "scoped"; }
|
|
@@ -573,10 +573,13 @@ export class FormCheckbox {
|
|
|
573
573
|
"optional": false,
|
|
574
574
|
"docs": {
|
|
575
575
|
"tags": [{
|
|
576
|
-
"name": "
|
|
577
|
-
"text": "
|
|
576
|
+
"name": "ignore",
|
|
577
|
+
"text": "S\u00E4tter specifikt tabindex f\u00F6r input. Anv\u00E4nds till v\u00E5r komponent Multifiter\nd\u00E4r vi vill manipulera tabbordningen f\u00F6r att underl\u00E4tta navigeringen f\u00F6r tangentbordsanv\u00E4ndare"
|
|
578
|
+
}, {
|
|
579
|
+
"name": "en",
|
|
580
|
+
"text": "Set specific tabindex for input. Used in our component Multifilter \nwhere we want to manipulate the tab order to facilitate navigation for keyboard users."
|
|
578
581
|
}],
|
|
579
|
-
"text": "
|
|
582
|
+
"text": ""
|
|
580
583
|
},
|
|
581
584
|
"getter": false,
|
|
582
585
|
"setter": false,
|
|
@@ -3,6 +3,7 @@ import { randomIdGenerator } from "../../../global/utils/randomIdGenerator";
|
|
|
3
3
|
import { FormErrorListHeadingLevel } from "./form-error-list-heading-level.enum";
|
|
4
4
|
import { TypographyVariation } from "../../../enums";
|
|
5
5
|
import { NotificationAlertVariation } from "../../_notification/notification-alert/notification-alert-variation.enum";
|
|
6
|
+
import { applyStencilScope } from "../../../global/utils/applyStencilScope/applyStencilScope.util";
|
|
6
7
|
/**
|
|
7
8
|
* @enums FormErrorListHeadingLevel - form-error-list-heading-level.enum.ts
|
|
8
9
|
* @swedishName Felmeddelandelista
|
|
@@ -23,6 +24,24 @@ export class FormErrorList {
|
|
|
23
24
|
async afMSetHeadingFocus() {
|
|
24
25
|
this.setHeadingFocus();
|
|
25
26
|
}
|
|
27
|
+
connectedCallback() {
|
|
28
|
+
this.observer = new MutationObserver((mutations) => {
|
|
29
|
+
const hasChildChanges = mutations.some(mutation => mutation.type === 'childList');
|
|
30
|
+
if (hasChildChanges) {
|
|
31
|
+
const hostElement = this.hostElement.querySelector('.digi-form-error-list');
|
|
32
|
+
applyStencilScope(hostElement, hostElement);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
this.observer.observe(this.hostElement, {
|
|
36
|
+
childList: true,
|
|
37
|
+
subtree: true
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
if (this.observer) {
|
|
42
|
+
this.observer.disconnect();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
26
45
|
componentDidLoad() {
|
|
27
46
|
this.setHeadingFocus();
|
|
28
47
|
this.afOnReady.emit();
|
|
@@ -49,7 +68,7 @@ export class FormErrorList {
|
|
|
49
68
|
this.afOnClickLink.emit({ id });
|
|
50
69
|
}
|
|
51
70
|
render() {
|
|
52
|
-
return (h("div", { key: '
|
|
71
|
+
return (h("div", { key: '9471a904e95c6304644d884e15aac90d3b0fbad1', class: "digi-form-error-list", id: this.afId }, h("digi-notification-alert", { key: '13a8bf3037570f929f470cc2a531156d552ca53a', ref: (el) => (this._notificationAlert = el), "af-heading": this.afHeading, "af-heading-level": this.afHeadingLevel, "af-variation": NotificationAlertVariation.DANGER }, this.afDescription && (h("digi-typography", { key: '8e8ef106286f426b0cbcfd904407582e79e8ce24', "af-variation": TypographyVariation.SMALL }, h("p", { key: '51175a8da94efe46a262ce365994aa3c23983f2e', class: "digi-form-error-list__description" }, this.afDescription))), h("slot", { key: 'b9f5287d0e2c0326100a094a48fa5e7ab314b92f' }))));
|
|
53
72
|
}
|
|
54
73
|
static get is() { return "digi-form-error-list"; }
|
|
55
74
|
static get encapsulation() { return "scoped"; }
|
|
@@ -16,6 +16,10 @@ import { FormSelectFilterValidation } from "./form-select-validation.enum";
|
|
|
16
16
|
export class FormSelectFilter {
|
|
17
17
|
constructor() {
|
|
18
18
|
this._searchQuery = '';
|
|
19
|
+
/** True when `value` was set from outside (e.g. Angular CVA) — then value is selection master. */
|
|
20
|
+
this._valueIsMaster = false;
|
|
21
|
+
/** Guards internal `value` writes so they don't flip `_valueIsMaster`. */
|
|
22
|
+
this._updatingValueInternally = false;
|
|
19
23
|
this.isOpen = false;
|
|
20
24
|
this.focusListItemIndex = 0;
|
|
21
25
|
this.focusInList = false;
|
|
@@ -49,17 +53,19 @@ export class FormSelectFilter {
|
|
|
49
53
|
this.afFilterButtonAriaDescribedby = undefined;
|
|
50
54
|
this.afErrorMessageIsAlert = true;
|
|
51
55
|
}
|
|
52
|
-
onValueChanged(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
onValueChanged(newValue) {
|
|
57
|
+
let parsedValue;
|
|
58
|
+
if (typeof newValue === 'string') {
|
|
59
|
+
parsedValue = newValue ? JSON.parse(newValue) : [];
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
parsedValue = newValue || [];
|
|
63
|
+
}
|
|
64
|
+
if (!this._updatingValueInternally) {
|
|
65
|
+
this._valueIsMaster = true;
|
|
62
66
|
}
|
|
67
|
+
this.value = parsedValue;
|
|
68
|
+
this.syncValueAndSelectedListItems('valueChange');
|
|
63
69
|
}
|
|
64
70
|
handleListItems() {
|
|
65
71
|
if (this.afListItems) {
|
|
@@ -75,15 +81,7 @@ export class FormSelectFilter {
|
|
|
75
81
|
}
|
|
76
82
|
this.giveItemsValueIfNoneExist();
|
|
77
83
|
this.sortListAlphabetically();
|
|
78
|
-
|
|
79
|
-
if (selectedListItems && selectedListItems.length > 0) {
|
|
80
|
-
this._selectedItems = [...selectedListItems];
|
|
81
|
-
this.afOnSelect.emit(this._selectedItems);
|
|
82
|
-
this.value = this._selectedItems;
|
|
83
|
-
}
|
|
84
|
-
else if (this.value && this.value.length > 0) {
|
|
85
|
-
this._selectedItems = [...this.value];
|
|
86
|
-
}
|
|
84
|
+
this.syncValueAndSelectedListItems('afListItemsChange');
|
|
87
85
|
this.filterResults();
|
|
88
86
|
}
|
|
89
87
|
catch (e) {
|
|
@@ -135,14 +133,58 @@ export class FormSelectFilter {
|
|
|
135
133
|
focusOnElement() {
|
|
136
134
|
this._toggleButton.focus();
|
|
137
135
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
136
|
+
componentWillLoad() {
|
|
137
|
+
/* Stencil @Watch does not run for the initial prop value.
|
|
138
|
+
* Given that Angular Control Value Accessors writeValue often sets `value` before willLoad —
|
|
139
|
+
* we need to force a value check here with bootstrapInitialValue .*/
|
|
140
|
+
this.bootstrapInitialValue();
|
|
141
|
+
this.handleListItems();
|
|
142
|
+
}
|
|
143
|
+
bootstrapInitialValue() {
|
|
144
|
+
if (typeof this.value === 'string') {
|
|
145
|
+
const parsed = this.value ? JSON.parse(this.value) : [];
|
|
146
|
+
this._updatingValueInternally = true;
|
|
147
|
+
this.value = parsed;
|
|
148
|
+
this._updatingValueInternally = false;
|
|
149
|
+
}
|
|
150
|
+
if (Array.isArray(this.value) && this.value.length > 0) {
|
|
151
|
+
this._valueIsMaster = true;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Keep `value` and `afListItems[].selected` in sync.
|
|
156
|
+
* - If `value` was set externally (`_valueIsMaster`), value wins on list updates.
|
|
157
|
+
* - Otherwise selection is seeded from `afListItems[].selected` (React/vanilla data-as-master).
|
|
158
|
+
* Does not emit `afOnSelect` — that is reserved for user interaction so Angular Control Value Accessors
|
|
159
|
+
* does not get feedback loops on prop sync.
|
|
160
|
+
*/
|
|
161
|
+
syncValueAndSelectedListItems(whereDidTheChangeComeFrom) {
|
|
162
|
+
if (!this._afListItems) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
if (whereDidTheChangeComeFrom === 'afListItemsChange') {
|
|
166
|
+
if (this._valueIsMaster) {
|
|
167
|
+
this.applyValueToListItems(this.value);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
this._selectedItems = this._afListItems.filter((item) => item.selected);
|
|
171
|
+
this.setValueInternally([...this._selectedItems]);
|
|
172
|
+
}
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
this.applyValueToListItems(this.value);
|
|
176
|
+
}
|
|
177
|
+
applyValueToListItems(value) {
|
|
178
|
+
const selectedValues = new Set((value !== null && value !== void 0 ? value : []).map((item) => item.value));
|
|
179
|
+
this._afListItems.forEach((item) => {
|
|
180
|
+
item.selected = selectedValues.has(item.value);
|
|
181
|
+
});
|
|
182
|
+
this._selectedItems = this._afListItems.filter((item) => selectedValues.has(item.value));
|
|
183
|
+
}
|
|
184
|
+
setValueInternally(nextValue) {
|
|
185
|
+
this._updatingValueInternally = true;
|
|
186
|
+
this.value = nextValue;
|
|
187
|
+
this._updatingValueInternally = false;
|
|
146
188
|
}
|
|
147
189
|
setClosed(focusToggleButton = false) {
|
|
148
190
|
this.isOpen = false;
|
|
@@ -201,9 +243,6 @@ export class FormSelectFilter {
|
|
|
201
243
|
this.setClosed(true);
|
|
202
244
|
this.afOnFilterClosed.emit();
|
|
203
245
|
}
|
|
204
|
-
componentWillLoad() {
|
|
205
|
-
this.handleListItems();
|
|
206
|
-
}
|
|
207
246
|
setFocusItem() {
|
|
208
247
|
const element = this.inputItem(`${this.afId}-select-filter-list`, this.focusListItemIndex);
|
|
209
248
|
if (element) {
|
|
@@ -308,16 +347,14 @@ export class FormSelectFilter {
|
|
|
308
347
|
}
|
|
309
348
|
filterResults() {
|
|
310
349
|
if (this._searchQuery && this._searchQuery.length > 0) {
|
|
311
|
-
this._filteredResult =
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
})
|
|
317
|
-
];
|
|
350
|
+
this._filteredResult = this._afListItems.filter((item) => {
|
|
351
|
+
return item.label
|
|
352
|
+
.toLowerCase()
|
|
353
|
+
.includes(this._searchQuery.toLowerCase());
|
|
354
|
+
});
|
|
318
355
|
}
|
|
319
356
|
else {
|
|
320
|
-
this._filteredResult =
|
|
357
|
+
this._filteredResult = this._afListItems;
|
|
321
358
|
}
|
|
322
359
|
}
|
|
323
360
|
inputSearchKeyboardHandler(e) {
|
|
@@ -337,7 +374,7 @@ export class FormSelectFilter {
|
|
|
337
374
|
}
|
|
338
375
|
resetSelectItems(close = false) {
|
|
339
376
|
this._selectedItems = [];
|
|
340
|
-
this.
|
|
377
|
+
this.setValueInternally([]);
|
|
341
378
|
this.afOnSelect.emit([]);
|
|
342
379
|
this._searchQuery = '';
|
|
343
380
|
this.filterResults();
|
|
@@ -367,7 +404,7 @@ export class FormSelectFilter {
|
|
|
367
404
|
this._selectedItems = [item];
|
|
368
405
|
this.emitFilterClosedEvent();
|
|
369
406
|
}
|
|
370
|
-
this.
|
|
407
|
+
this.setValueInternally([...this._selectedItems]);
|
|
371
408
|
this.afOnSelect.emit(this._selectedItems);
|
|
372
409
|
this.filterResults();
|
|
373
410
|
}
|
|
@@ -458,16 +495,16 @@ export class FormSelectFilter {
|
|
|
458
495
|
} }, h("slot", { name: "empty-search-result" })))));
|
|
459
496
|
}
|
|
460
497
|
render() {
|
|
461
|
-
return (h(Host, { key: '
|
|
498
|
+
return (h(Host, { key: '1a07fd41c8f9ccc1fbd0ca768fd3f87fc719dec4', tabindex: -1 }, h("div", { key: '6492705706e717048243892a3f8b269fa26dc6b9', class: Object.assign({ 'digi-form-select-filter': true }, this.cssModifiers), role: "application", id: `${this.afId}-identifier` }, h("digi-form-label", { key: '99d0e29f7dad712882c0a3c5fd3f468af7dd5c55', afLabel: this.afFilterButtonTextLabel, afFor: `${this.afId}`, afId: `${this.afId}-label`, class: "digi-form-select-filter__label", afDescription: this.afDescription, afRequired: this.afRequired, afAnnounceIfOptional: this.afAnnounceIfOptional, afRequiredText: this.afRequiredText, afAnnounceIfOptionalText: this.afAnnounceIfOptionalText }), h("digi-util-keydown-handler", { key: 'a53d9d63b71557554da9442511af10870e345263', onAfOnEsc: () => this.escHandler() }, h("button", { key: '260c22654935d7422d5fc30a47fbd0c37ec00f0c', type: "button", id: `${this.afId}`, class: "digi-form-select-filter__toggle-button", onClick: () => this.toggleDropdown(), ref: (el) => (this._toggleButton = el), "aria-haspopup": "true", "aria-label": this.ariaLabel, "aria-describedby": `${this.afFilterButtonAriaDescribedby} ${this.afId}--validation-message`, "aria-controls": `${this.afId}-dropdown-menu`, "aria-expanded": this.isOpen }, h("div", { key: 'b92a13d75d3e320a39ca99128354178c01c1ff0d', class: Object.assign({ 'digi-form-filter__toggle-button-wrapper': true }, this.cssModifiersToggleButtonWrapper) }, h("digi-icon-check", { key: '37ab06f299d37c36516a7b809472bb300d244c18', class: Object.assign({ 'digi-form-select-filter__toggle-button-indicator': true }, this.cssModifiersToggleButtonIndicator), slot: "icon" }), h("span", { key: 'ca373143f83ab3da2e6579b3a0e1e145a10d2235', class: "digi-form-select-filter__toggle-button-text" }, this.renderButtonLabel)), h("digi-icon-chevron-down", { key: '1a62747454653ceafa650e329301a8975179d75d', class: "digi-form-select-filter__toggle-icon" })), h("div", { key: 'b0cafd4ce8ad8017f60e8fab88417512a6698f20', id: `${this.afId}-dropdown-menu`, tabindex: this.isOpen ? '-1' : undefined, class: {
|
|
462
499
|
'digi-form-select-filter__dropdown': true,
|
|
463
500
|
'digi-form-select-filter__dropdown--right': this.afAlignRight,
|
|
464
501
|
'digi-form-select-filter__dropdown--hidden': !this.isOpen
|
|
465
|
-
} }, h("fieldset", { key: '
|
|
502
|
+
} }, h("fieldset", { key: 'f98295e8e804f93428489daf5844df9854ed6053' }, h("div", { key: 'c614d142260b6eaa0b6ea643b34f135551aaf1ec', class: "digi-form-select-filter__header" }, h("legend", { key: 'f1c94bf0ea6e3745d8965fbe5bfdf0a298d7b4f0', class: "digi-form-select-filter__legend" }, this.afFilterButtonTextLabel), h("digi-form-input", { key: '6def27fd94b52e666c3e8dac4385ddf874f85bd1', afLabel: this.afName, afId: `${this.afId}-search`, afVariation: FormInputVariation.MEDIUM, afType: FormInputType.SEARCH, afValidation: FormInputValidation.NEUTRAL, onAfOnFocus: () => {
|
|
466
503
|
this.focusListItemIndex = 0;
|
|
467
504
|
99;
|
|
468
505
|
}, onAfOnKeyup: (e) => {
|
|
469
506
|
this.inputSearchKeyboardHandler(e.detail);
|
|
470
|
-
}, onAfOnInput: (e) => this.inputSearchInputHandler(e.detail), afValue: this._searchQuery, class: "digi-form-select-filter__search-input", afAriaControls: `${this.afId}-select-filter-list`, afAutocomplete: "off", afAriaAutocomplete: "none" }), this.renderEmptyStateBox()), h("div", { key: '
|
|
507
|
+
}, onAfOnInput: (e) => this.inputSearchInputHandler(e.detail), afValue: this._searchQuery, class: "digi-form-select-filter__search-input", afAriaControls: `${this.afId}-select-filter-list`, afAutocomplete: "off", afAriaAutocomplete: "none" }), this.renderEmptyStateBox()), h("div", { key: 'bcfc446573bb4b8f88aabdde1a8b6da1a6ac51f7', class: "digi-form-select-filter__scroll" }, h("digi-util-keydown-handler", { key: '656253e1dba64d2906ae9b195063300fe5cbd900', onAfOnDown: (e) => this.downHandler(e), onAfOnRight: (e) => this.downHandler(e), onAfOnUp: (e) => this.upHandler(e), onAfOnLeft: (e) => this.upHandler(e), onAfOnHome: (e) => this.homeHandler(e), onAfOnEnd: (e) => this.endHandler(e), onAfOnEnter: (e) => this.enterHandler(e), onAfOnSpace: (e) => this.spaceHandler(e), onAfOnTab: () => this.tabHandler(), onAfOnShiftTab: () => this.shiftHandler() }, h("ul", { key: '4a42a8ee02e3921710aa00826b31558ed1f9a485', class: "digi-form-select-filter__list", "aria-labelledby": `${this.afId}`, id: `${this.afId}-select-filter-list`, role: this.afMultipleItems ? '' : 'radiogroup', "aria-invalid": this.afMultipleItems
|
|
471
508
|
? 'false'
|
|
472
509
|
: this.afValidation ===
|
|
473
510
|
FormSelectFilterValidation.ERROR
|
|
@@ -476,11 +513,11 @@ export class FormSelectFilter {
|
|
|
476
513
|
? false
|
|
477
514
|
: this.afRequired
|
|
478
515
|
? 'true'
|
|
479
|
-
: 'false' }, this.showNeutralValue && (h("li", { key: '
|
|
516
|
+
: 'false' }, this.showNeutralValue && (h("li", { key: '40d30a579a332fec15b5c3f38865eacce0a8c2ee', class: "digi-form-select-filter__item", role: "radio", "aria-required": this.afMultipleItems
|
|
480
517
|
? 'false'
|
|
481
518
|
: this.afRequired
|
|
482
519
|
? 'true'
|
|
483
|
-
: 'false', "aria-checked": this._selectedItems.length === 0 ? 'true' : 'false', onClick: () => this.resetSelectItems(true), tabIndex: 0, "aria-label": this.afFilterButtonText }, this._selectedItems.length === 0 && (h("digi-icon-check", { key: '
|
|
520
|
+
: 'false', "aria-checked": this._selectedItems.length === 0 ? 'true' : 'false', onClick: () => this.resetSelectItems(true), tabIndex: 0, "aria-label": this.afFilterButtonText }, this._selectedItems.length === 0 && (h("digi-icon-check", { key: '43f446e70c707681dd1de50e11af511e8c4d060e', class: "digi-form-select-filter__item__icon", "aria-hidden": 'true' })), this.afFilterButtonText)), this._filteredResult &&
|
|
484
521
|
this._filteredResult.map((item, index) => {
|
|
485
522
|
return (h("li", { class: "digi-form-select-filter__item", key: index, dir: item.dir, lang: item.lang, "aria-checked": this.isSelected(item.value) ? 'true' : 'false', role: this.afMultipleItems ? 'checkbox' : 'radio', "aria-required": this.afMultipleItems
|
|
486
523
|
? 'false'
|
|
@@ -496,9 +533,9 @@ export class FormSelectFilter {
|
|
|
496
533
|
: index === 0
|
|
497
534
|
? 0
|
|
498
535
|
: -1 }, this.isSelected(item.value) && (h("digi-icon-check", { class: "digi-form-select-filter__item__icon", "aria-hidden": 'true' })), item.label));
|
|
499
|
-
}))))), this.afMultipleItems && (h("div", { key: '
|
|
536
|
+
}))))), this.afMultipleItems && (h("div", { key: 'f94a71fb292baf936c9358e33316f1ee93ce37f3', class: "digi-form-select-filter__footer" }, !this.afHideResetButton && (h("digi-button", { key: '305beb8e5f817d46d5f7b5364e4125c101cbaed5', "af-variation": "secondary", "af-aria-label": this.afResetButtonTextAriaLabel, onClick: () => this.resetSelectItems(), class: "digi-form-select-filter__reset-button" }, this.afResetButtonText)), h("digi-util-keydown-handler", { key: '3bf7f1f1bcd2a4e07fd900ba4b6377decc617cd7', onAfOnUp: () => this.setFocusItem() }, h("digi-button", { key: 'eaa1389239c8b5e93ecac2ed2f6ed09fcda81863', ref: (el) => (this._submitButton = el), "af-variation": "primary", "af-aria-label": this.afSubmitButtonTextAriaLabel, onClick: () => {
|
|
500
537
|
this.setClosed(true);
|
|
501
|
-
}, class: "digi-form-select-filter__submit-button" }, this.afSubmitButtonText)))))), h("div", { key: '
|
|
538
|
+
}, class: "digi-form-select-filter__submit-button" }, this.afSubmitButtonText)))))), h("div", { key: '213a685ba0d080e873721d526c1517e62f1779be', class: "digi-form-select__footer" }, h("div", { key: '81b470b19af8e472e50a789a6116448b8204359e', "aria-atomic": "true", role: this.errorMessageIsAlert ? 'alert' : null, id: `${this.afId}--validation-message` }, this.showValidation() && (h("digi-form-validation-message", { key: '457f29208d032eb29e7bb94c9db9fb9634866524', "af-variation": this.afValidation }, this.afValidationText)))))));
|
|
502
539
|
}
|
|
503
540
|
static get is() { return "digi-form-select-filter"; }
|
|
504
541
|
static get encapsulation() { return "scoped"; }
|
|
@@ -740,7 +777,7 @@ export class FormSelectFilter {
|
|
|
740
777
|
"docs": {
|
|
741
778
|
"tags": [{
|
|
742
779
|
"name": "ignore",
|
|
743
|
-
"text":
|
|
780
|
+
"text": "Propertyn `value` finns inte dokumenterad p\u00E5 komponentens sida p\u00E5 dokumentationswebben, utan\n\u00E4r endast till f\u00F6r att anv\u00E4ndas tillsammans med Angulars Control Value Accessors (CVA).\nAnv\u00E4nds CVA f\u00F6r att hantera komponentens v\u00E4rden s\u00E5 ska inte afListItems anv\u00E4ndas f\u00F6r att\np\u00E5verka vilka val som \u00E4r gjorda eller ej.\nExempel p\u00E5 b\u00E5da s\u00E4tten att hantera datat finns i Angular Playground."
|
|
744
781
|
}],
|
|
745
782
|
"text": ""
|
|
746
783
|
},
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
--digi--
|
|
5
|
-
--digi--
|
|
6
|
-
--digi--
|
|
7
|
-
--digi--
|
|
8
|
-
|
|
9
|
-
--digi--
|
|
10
|
-
--digi--
|
|
11
|
-
--digi--
|
|
12
|
-
--digi--
|
|
13
|
-
|
|
14
|
-
--digi--
|
|
15
|
-
--digi--
|
|
1
|
+
@use '../../../../../../styles/src/digi-styles.utils' as *;
|
|
2
|
+
|
|
3
|
+
@mixin digi-logo--variables() {
|
|
4
|
+
--digi--logo--img--min-width: #{rem(256)};
|
|
5
|
+
--digi--logo--img--max-width:#{rem(292)};
|
|
6
|
+
--digi--logo--img--max-width--large: #{rem(368)};
|
|
7
|
+
--digi--logo--img--max-width--system: #{rem(44)};
|
|
8
|
+
|
|
9
|
+
--digi--logo--padding: 1.375rem;
|
|
10
|
+
--digi--logo--padding--wide: var(--digi--gutter--larger);
|
|
11
|
+
--digi--logo--padding--large: var(--digi--gutter--medium);
|
|
12
|
+
--digi--logo--padding--large--wide: var(--digi--gutter--larger);
|
|
13
|
+
|
|
14
|
+
--digi--logo--primary--symbol: var(--digi--color--logotype--primary--symbol);
|
|
15
|
+
--digi--logo--secondary--symbol: var(--digi--color--logotype--secondary--symbol);
|
|
16
|
+
--digi--logo--primary--text: var(--digi--color--logotype--primary--text);
|
|
17
|
+
--digi--logo--secondary--text: var(--digi--color--logotype--secondary--text);
|
|
16
18
|
}
|
|
@@ -15,4 +15,6 @@
|
|
|
15
15
|
--digi--logo--secondary--symbol: var(--digi--color--logotype--secondary--symbol);
|
|
16
16
|
--digi--logo--primary--text: var(--digi--color--logotype--primary--text);
|
|
17
17
|
--digi--logo--secondary--text: var(--digi--color--logotype--secondary--text);
|
|
18
|
+
}g: 1.375rem;
|
|
19
|
+
--digi--title-logo-gap: 9px;
|
|
18
20
|
}
|