@designsystem-se/af 41.0.1-beta.1 → 41.0.1-beta.3
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 +4 -4
- package/components/digi-calendar.js +1 -1
- package/components/digi-form-file-upload.js +1 -1
- package/components/digi-form-input-search.js +2 -2
- package/components/digi-form-input.js +1 -1
- package/components/digi-form-label.js +1 -1
- package/components/digi-form-select-filter.js +2 -2
- package/components/digi-form-select.js +1 -1
- package/components/digi-form-textarea.js +1 -1
- package/components/{p-2QoafdpB.js → p-B7_lQTCU.js} +19 -5
- package/components/{p-DL56hj-Q.js → p-DI0_hUPN.js} +2 -2
- package/components/{p-CsnkG9DM.js → p-DRVEvFMd.js} +6 -5
- package/components/{p-CZNczF84.js → p-stxQJv63.js} +1 -1
- package/dist/cjs/digi-arbetsformedlingen.cjs.js +1 -1
- package/dist/cjs/digi-button_83.cjs.entry.js +16 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/_form/form-label/form-label.js +12 -4
- package/dist/collection/components/_form/form-select/form-select.js +5 -4
- package/dist/collection/design-tokens/components/_logo.variables.scss +17 -15
- package/dist/digi-arbetsformedlingen/design-tokens/components/_logo.variables.scss +15 -17
- package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/p-3f6d6a9e.entry.js +1 -0
- package/dist/esm/digi-arbetsformedlingen.js +1 -1
- package/dist/esm/digi-button_83.entry.js +16 -8
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/_form/form-label/form-label.d.ts +2 -1
- package/hydrate/index.js +17 -8
- package/hydrate/index.mjs +17 -8
- package/package.json +4 -2
- package/dist/digi-arbetsformedlingen/p-5c8111ef.entry.js +0 -1
|
@@ -52,10 +52,10 @@ import './p-rhVqmQwC.js';
|
|
|
52
52
|
import './p-DPq588Q4.js';
|
|
53
53
|
import { r as randomIdGenerator } from './p-BGaIliX6.js';
|
|
54
54
|
import { d as detectClickOutside } from './p-CZrDWyoh.js';
|
|
55
|
-
import { i as isBefore, a as isAfter, d as defineCustomElement$e } from './p-
|
|
56
|
-
import { d as defineCustomElement$d } from './p-
|
|
57
|
-
import { d as defineCustomElement$c } from './p-
|
|
58
|
-
import { d as defineCustomElement$b } from './p-
|
|
55
|
+
import { i as isBefore, a as isAfter, d as defineCustomElement$e } from './p-DI0_hUPN.js';
|
|
56
|
+
import { d as defineCustomElement$d } from './p-stxQJv63.js';
|
|
57
|
+
import { d as defineCustomElement$c } from './p-B7_lQTCU.js';
|
|
58
|
+
import { d as defineCustomElement$b } from './p-DRVEvFMd.js';
|
|
59
59
|
import { d as defineCustomElement$a } from './p-DNhJBhBA.js';
|
|
60
60
|
import { d as defineCustomElement$9 } from './p-QvPB-fXB.js';
|
|
61
61
|
import { d as defineCustomElement$8 } from './p-If6yBCD2.js';
|
|
@@ -4,7 +4,7 @@ import { r as randomIdGenerator } from './p-BGaIliX6.js';
|
|
|
4
4
|
import { b as FormFileUploadVariation, a as FormFileUploadValidation, F as FormFileUploadHeadingLevel } from './p-BfyJgcLA.js';
|
|
5
5
|
import { U as UtilBreakpointObserverBreakpoints } from './p-DPq588Q4.js';
|
|
6
6
|
import { F as FormValidationMessageVariation } from './p-B8hpiXmh.js';
|
|
7
|
-
import { d as defineCustomElement$c } from './p-
|
|
7
|
+
import { d as defineCustomElement$c } from './p-B7_lQTCU.js';
|
|
8
8
|
import { d as defineCustomElement$b } from './p-DNhJBhBA.js';
|
|
9
9
|
import { d as defineCustomElement$a } from './p-CZyhC6V4.js';
|
|
10
10
|
import { d as defineCustomElement$9 } from './p-CY9JtFvE.js';
|
|
@@ -6,8 +6,8 @@ import { a as ButtonType } from './p-DNHRmpND.js';
|
|
|
6
6
|
import { d as detectClickOutside } from './p-CZrDWyoh.js';
|
|
7
7
|
import { d as detectFocusOutside } from './p-C4cIvg7J.js';
|
|
8
8
|
import { d as defineCustomElement$9 } from './p-Do7Ss2Xr.js';
|
|
9
|
-
import { d as defineCustomElement$8 } from './p-
|
|
10
|
-
import { d as defineCustomElement$7 } from './p-
|
|
9
|
+
import { d as defineCustomElement$8 } from './p-stxQJv63.js';
|
|
10
|
+
import { d as defineCustomElement$7 } from './p-B7_lQTCU.js';
|
|
11
11
|
import { d as defineCustomElement$6 } from './p-DNhJBhBA.js';
|
|
12
12
|
import { d as defineCustomElement$5 } from './p-CxOO6YS2.js';
|
|
13
13
|
import { d as defineCustomElement$4 } from './p-DGmIU_0z.js';
|
|
@@ -55,8 +55,8 @@ import './p-CHxBAbI8.js';
|
|
|
55
55
|
import './p-rhVqmQwC.js';
|
|
56
56
|
import './p-DPq588Q4.js';
|
|
57
57
|
import { d as defineCustomElement$b } from './p-Do7Ss2Xr.js';
|
|
58
|
-
import { d as defineCustomElement$a } from './p-
|
|
59
|
-
import { d as defineCustomElement$9 } from './p-
|
|
58
|
+
import { d as defineCustomElement$a } from './p-stxQJv63.js';
|
|
59
|
+
import { d as defineCustomElement$9 } from './p-B7_lQTCU.js';
|
|
60
60
|
import { d as defineCustomElement$8 } from './p-DNhJBhBA.js';
|
|
61
61
|
import { d as defineCustomElement$7 } from './p-325es5bG.js';
|
|
62
62
|
import { d as defineCustomElement$6 } from './p-Cfbx6VQY.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host, t as transformTag } from './p-DpVBL-Kg.js';
|
|
2
2
|
import { r as randomIdGenerator } from './p-BGaIliX6.js';
|
|
3
3
|
import { a as FormTextareaVariation, F as FormTextareaValidation } from './p-DogB9kfH.js';
|
|
4
|
-
import { d as defineCustomElement$6 } from './p-
|
|
4
|
+
import { d as defineCustomElement$6 } from './p-B7_lQTCU.js';
|
|
5
5
|
import { d as defineCustomElement$5 } from './p-DNhJBhBA.js';
|
|
6
6
|
import { d as defineCustomElement$4 } from './p-DGmIU_0z.js';
|
|
7
7
|
import { d as defineCustomElement$3 } from './p-hjUJnJkg.js';
|
|
@@ -33,7 +33,7 @@ const FormLabel = /*@__PURE__*/ proxyCustomElement(class FormLabel extends H {
|
|
|
33
33
|
this.afAnnounceIfOptionalText = _t.optional.toLowerCase();
|
|
34
34
|
}
|
|
35
35
|
componentWillLoad() {
|
|
36
|
-
this.
|
|
36
|
+
this.setLabelText();
|
|
37
37
|
this.validateFor();
|
|
38
38
|
this.handleSlotVisibility();
|
|
39
39
|
}
|
|
@@ -42,7 +42,8 @@ const FormLabel = /*@__PURE__*/ proxyCustomElement(class FormLabel extends H {
|
|
|
42
42
|
logger.warn(`digi-form-label must have a for attribute. Please add a for attribute using af-for`, this.hostElement);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
setLabelText() {
|
|
46
|
+
this.labelText = `${this.afLabel} ${this.requiredText}`;
|
|
46
47
|
if (!this.afLabel) {
|
|
47
48
|
logger.warn(`digi-form-label must have a label. Please add a label using af-label`, this.hostElement);
|
|
48
49
|
}
|
|
@@ -64,7 +65,7 @@ const FormLabel = /*@__PURE__*/ proxyCustomElement(class FormLabel extends H {
|
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
render() {
|
|
67
|
-
return (h("div", { key: '
|
|
68
|
+
return (h("div", { key: '78c3c9cc7609ede22abcd68c16514c85b52c945e', class: "digi-form-label" }, h("div", { key: '5bd7a74e6508c261f489716673f011391bf7c0d8', class: "digi-form-label__label-group" }, this.afFor && this.afLabel && (h("label", { key: '6952422ebe4e447857befae6116fd7336046dc1f', class: "digi-form-label__label", htmlFor: this.afFor, id: this.afId }, h("span", { key: '2da61e9396c9c20b40ee4d80c21ae96e2a491e8f', tabindex: "-1", class: "digi-form-label__label--label" }, this.labelText), this.afDescription && (h("span", { key: '858d2ae39681662c278352e42b7bccb511279bd0', tabindex: "-1", class: "digi-form-label__label--description" }, this.afDescription)))), this.hasActionSlot && (h("div", { key: '7719bef7cfe38637a5ef4b71d5e9a6237ed48ff2', class: "digi-form-label__actions" }, h("slot", { key: '37bd2332a7d4e7fa15c4ff61a0cc26c92bed08d8', name: "actions" }))))));
|
|
68
69
|
}
|
|
69
70
|
get hostElement() { return this; }
|
|
70
71
|
static get watchers() { return {
|
|
@@ -72,7 +73,13 @@ const FormLabel = /*@__PURE__*/ proxyCustomElement(class FormLabel extends H {
|
|
|
72
73
|
"validateFor": 0
|
|
73
74
|
}],
|
|
74
75
|
"afLabel": [{
|
|
75
|
-
"
|
|
76
|
+
"setLabelText": 0
|
|
77
|
+
}],
|
|
78
|
+
"afRequired": [{
|
|
79
|
+
"setLabelText": 0
|
|
80
|
+
}],
|
|
81
|
+
"afAnnounceIfOptional": [{
|
|
82
|
+
"setLabelText": 0
|
|
76
83
|
}]
|
|
77
84
|
}; }
|
|
78
85
|
static get style() { return formLabelCss(); }
|
|
@@ -85,13 +92,20 @@ const FormLabel = /*@__PURE__*/ proxyCustomElement(class FormLabel extends H {
|
|
|
85
92
|
"afAnnounceIfOptional": [4, "af-announce-if-optional"],
|
|
86
93
|
"afRequiredText": [1, "af-required-text"],
|
|
87
94
|
"afAnnounceIfOptionalText": [1, "af-announce-if-optional-text"],
|
|
95
|
+
"labelText": [32],
|
|
88
96
|
"hasActionSlot": [32]
|
|
89
97
|
}, undefined, {
|
|
90
98
|
"afFor": [{
|
|
91
99
|
"validateFor": 0
|
|
92
100
|
}],
|
|
93
101
|
"afLabel": [{
|
|
94
|
-
"
|
|
102
|
+
"setLabelText": 0
|
|
103
|
+
}],
|
|
104
|
+
"afRequired": [{
|
|
105
|
+
"setLabelText": 0
|
|
106
|
+
}],
|
|
107
|
+
"afAnnounceIfOptional": [{
|
|
108
|
+
"setLabelText": 0
|
|
95
109
|
}]
|
|
96
110
|
}]);
|
|
97
111
|
function defineCustomElement() {
|
|
@@ -4,8 +4,8 @@ import { d as detectClickOutside } from './p-CZrDWyoh.js';
|
|
|
4
4
|
import { d as detectFocusOutside } from './p-C4cIvg7J.js';
|
|
5
5
|
import { l as logger } from './p-DdB9j8uV.js';
|
|
6
6
|
import { _ as _t } from './p-DsO1BTml.js';
|
|
7
|
-
import { d as defineCustomElement$a } from './p-
|
|
8
|
-
import { d as defineCustomElement$9 } from './p-
|
|
7
|
+
import { d as defineCustomElement$a } from './p-B7_lQTCU.js';
|
|
8
|
+
import { d as defineCustomElement$9 } from './p-DRVEvFMd.js';
|
|
9
9
|
import { d as defineCustomElement$8 } from './p-DNhJBhBA.js';
|
|
10
10
|
import { d as defineCustomElement$7 } from './p-If6yBCD2.js';
|
|
11
11
|
import { d as defineCustomElement$6 } from './p-BfdPFRyd.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host, t as transformTag } from './p-DpVBL-Kg.js';
|
|
2
2
|
import { r as randomIdGenerator } from './p-BGaIliX6.js';
|
|
3
3
|
import { a as FormSelectVariation, F as FormSelectValidation } from './p-DCS1KcvC.js';
|
|
4
|
-
import { d as defineCustomElement$6 } from './p-
|
|
4
|
+
import { d as defineCustomElement$6 } from './p-B7_lQTCU.js';
|
|
5
5
|
import { d as defineCustomElement$5 } from './p-DNhJBhBA.js';
|
|
6
6
|
import { d as defineCustomElement$4 } from './p-DEK-Ohmx.js';
|
|
7
7
|
import { d as defineCustomElement$3 } from './p-DGmIU_0z.js';
|
|
@@ -91,7 +91,8 @@ const FormSelect = /*@__PURE__*/ proxyCustomElement(class FormSelect extends H {
|
|
|
91
91
|
this.optionsObserver = new MutationObserver(() => this.getOptions());
|
|
92
92
|
this.optionsObserver.observe(this.hostElement, {
|
|
93
93
|
childList: true,
|
|
94
|
-
subtree: true
|
|
94
|
+
subtree: true,
|
|
95
|
+
characterData: true
|
|
95
96
|
});
|
|
96
97
|
this.getOptions();
|
|
97
98
|
this.afOnReady.emit();
|
|
@@ -161,14 +162,14 @@ const FormSelect = /*@__PURE__*/ proxyCustomElement(class FormSelect extends H {
|
|
|
161
162
|
: false;
|
|
162
163
|
}
|
|
163
164
|
render() {
|
|
164
|
-
return (h(Host, { key: '
|
|
165
|
+
return (h(Host, { key: '25781b1ef869d40adddd56e0bc76df15fb38824d', tabindex: -1 }, h("div", { key: '134a4405b623a02f203539a0dc7e7a2b273a8997', class: Object.assign({ 'digi-form-select': true }, this.cssModifiers) }, h("div", { key: '131cd12bd401525cd24568864087860947f78411', class: "digi-form-select__label-group" }, h("digi-form-label", { key: '0144ed5018666da00966461aee1e0cb716fd3dc4', afFor: this.afId, afLabel: this.afLabel, afId: `${this.afId}-label`, afDescription: this.afDescription, afRequired: this.afRequired, afAnnounceIfOptional: this.afAnnounceIfOptional, afRequiredText: this.afRequiredText, afAnnounceIfOptionalText: this.afAnnounceIfOptionalText })), h("div", { key: '0b7f01ce1e8cb0ceb1e0dcc2c34ebf4766789804', class: "digi-form-select__select-wrapper" }, h("select", { key: '76cdaf0d9afbaea218f1ef7aa9c938cb7cbc81c1', class: "digi-form-select__select", name: this.afName, id: this.afId, "aria-label": this.afAriaLabel, "aria-invalid": this.afValidation === FormSelectValidation.ERROR
|
|
165
166
|
? 'true'
|
|
166
|
-
: 'false', "aria-describedby": `${this.afId}--validation-message`, ref: (el) => (this._select = el), required: this.afRequired ? this.afRequired : null, onFocus: (e) => this.focusHandler(e), onFocusout: (e) => this.focusoutHandler(e), onBlur: (e) => this.blurHandler(e), onChange: (e) => this.changeHandler(e), onInput: (e) => this.selectHandler(e), autoFocus: this.afAutofocus ? this.afAutofocus : null }, this.hasPlaceholder && (h("option", { key: '
|
|
167
|
+
: 'false', "aria-describedby": `${this.afId}--validation-message`, ref: (el) => (this._select = el), required: this.afRequired ? this.afRequired : null, onFocus: (e) => this.focusHandler(e), onFocusout: (e) => this.focusoutHandler(e), onBlur: (e) => this.blurHandler(e), onChange: (e) => this.changeHandler(e), onInput: (e) => this.selectHandler(e), autoFocus: this.afAutofocus ? this.afAutofocus : null }, this.hasPlaceholder && (h("option", { key: '50a6a16127c45e1d7bf18c9bf23d269f35360cf4', class: {
|
|
167
168
|
'digi-form-select__select-option': true,
|
|
168
169
|
'digi-form-select__select-option--initial-value': true
|
|
169
170
|
}, disabled: true, selected: !this.afValue, value: "" }, this.afPlaceholder)), this.optionItems.map((option, index) => {
|
|
170
171
|
return (h("option", { key: index, class: "digi-form-select__select-option", value: option.value, selected: this.getSelectedItem(option) }, option.text));
|
|
171
|
-
})), h("digi-icon-input-select-marker", { key: '
|
|
172
|
+
})), h("digi-icon-input-select-marker", { key: '4f18ad875e8c9ce10c658c667f1fcf5530db9eb2', class: "digi-form-select__icon", slot: "icon" })), h("div", { key: '723e27711db96646df989f4a7ed87e68b85434df', hidden: true }, h("slot", { key: '0d0048a91cb95c882c43ac6f319f53f7e994a8bb' })), h("div", { key: '42eff52b99714e2b1f53e58c50a0a9e8059efeeb', class: "digi-form-select__footer" }, h("div", { key: '30f66c55f4595c1c2621d733e6e997b45d09600e', "aria-atomic": "true", role: this.errorMessageIsAlert ? 'alert' : null, id: `${this.afId}--validation-message` }, this.showValidation() && (h("digi-form-validation-message", { key: '7affedbbffd3a8bd13c562e21a24fd02562042a0', "af-variation": this.afValidation }, this.afValidationText)))))));
|
|
172
173
|
}
|
|
173
174
|
get hostElement() { return this; }
|
|
174
175
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host, t as transformTag } from './p-DpVBL-Kg.js';
|
|
2
2
|
import { r as randomIdGenerator } from './p-BGaIliX6.js';
|
|
3
3
|
import { b as FormInputType, a as FormInputMode, F as FormInputButtonVariation, d as FormInputVariation, c as FormInputValidation } from './p-7F-7XlTz.js';
|
|
4
|
-
import { d as defineCustomElement$5 } from './p-
|
|
4
|
+
import { d as defineCustomElement$5 } from './p-B7_lQTCU.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './p-DNhJBhBA.js';
|
|
6
6
|
import { d as defineCustomElement$3 } from './p-DGmIU_0z.js';
|
|
7
7
|
import { d as defineCustomElement$2 } from './p-hjUJnJkg.js';
|