@designsystem-se/af 41.0.0 → 41.0.1-beta.1
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-B7_lQTCU.js → p-2QoafdpB.js} +5 -19
- package/components/{p-stxQJv63.js → p-CZNczF84.js} +1 -1
- package/components/{p-C9upnau2.js → p-CsnkG9DM.js} +1 -1
- package/components/{p-DdGvmUiV.js → p-DL56hj-Q.js} +2 -2
- package/dist/cjs/digi-arbetsformedlingen.cjs.js +1 -1
- package/dist/cjs/digi-button_83.cjs.entry.js +4 -11
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/_form/form-label/form-label.js +4 -12
- package/dist/collection/design-tokens/components/_logo.variables.scss +14 -18
- package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/p-5c8111ef.entry.js +1 -0
- package/dist/esm/digi-arbetsformedlingen.js +1 -1
- package/dist/esm/digi-button_83.entry.js +4 -11
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/_form/form-label/form-label.d.ts +1 -2
- package/hydrate/index.js +4 -12
- package/hydrate/index.mjs +4 -12
- package/package.json +2 -4
- package/dist/digi-arbetsformedlingen/p-189d472b.entry.js +0 -1
|
@@ -5055,7 +5055,7 @@ const FormLabel = class {
|
|
|
5055
5055
|
this.afAnnounceIfOptionalText = _t.optional.toLowerCase();
|
|
5056
5056
|
}
|
|
5057
5057
|
componentWillLoad() {
|
|
5058
|
-
this.
|
|
5058
|
+
this.warnIfMissingLabel();
|
|
5059
5059
|
this.validateFor();
|
|
5060
5060
|
this.handleSlotVisibility();
|
|
5061
5061
|
}
|
|
@@ -5064,8 +5064,7 @@ const FormLabel = class {
|
|
|
5064
5064
|
logger.warn(`digi-form-label must have a for attribute. Please add a for attribute using af-for`, this.hostElement);
|
|
5065
5065
|
}
|
|
5066
5066
|
}
|
|
5067
|
-
|
|
5068
|
-
this.labelText = `${this.afLabel} ${this.requiredText}`;
|
|
5067
|
+
warnIfMissingLabel() {
|
|
5069
5068
|
if (!this.afLabel) {
|
|
5070
5069
|
logger.warn(`digi-form-label must have a label. Please add a label using af-label`, this.hostElement);
|
|
5071
5070
|
}
|
|
@@ -5087,7 +5086,7 @@ const FormLabel = class {
|
|
|
5087
5086
|
}
|
|
5088
5087
|
}
|
|
5089
5088
|
render() {
|
|
5090
|
-
return (h("div", { key: '
|
|
5089
|
+
return (h("div", { key: 'd505cd974e5fad197c27502bbd5a69e03b6da4c9', class: "digi-form-label" }, h("div", { key: '438d01b31f6b2814ae6a1ca04c824ea08ea2be23', class: "digi-form-label__label-group" }, this.afFor && this.afLabel && (h("label", { key: 'f339da21e44bd1d80bc2bcd71f2a7b85ded421a3', class: "digi-form-label__label", htmlFor: this.afFor, id: this.afId }, h("span", { key: '49c6e41049caafd257d39c8e4bbd61054e618ac9', tabindex: "-1", class: "digi-form-label__label--label" }, `${this.afLabel} ${this.requiredText}`), this.afDescription && (h("span", { key: '857cf559d405dc425fb16289d216cc5ed500775f', tabindex: "-1", class: "digi-form-label__label--description" }, this.afDescription)))), this.hasActionSlot && (h("div", { key: '11a7132c78dc5467b25c8a09724a1d13f3a324c3', class: "digi-form-label__actions" }, h("slot", { key: 'f499d1b9d31ccc825723a880bea8f110658b462d', name: "actions" }))))));
|
|
5091
5090
|
}
|
|
5092
5091
|
get hostElement() { return getElement(this); }
|
|
5093
5092
|
static get watchers() { return {
|
|
@@ -5095,13 +5094,7 @@ const FormLabel = class {
|
|
|
5095
5094
|
"validateFor": 0
|
|
5096
5095
|
}],
|
|
5097
5096
|
"afLabel": [{
|
|
5098
|
-
"
|
|
5099
|
-
}],
|
|
5100
|
-
"afRequired": [{
|
|
5101
|
-
"setLabelText": 0
|
|
5102
|
-
}],
|
|
5103
|
-
"afAnnounceIfOptional": [{
|
|
5104
|
-
"setLabelText": 0
|
|
5097
|
+
"warnIfMissingLabel": 0
|
|
5105
5098
|
}]
|
|
5106
5099
|
}; }
|
|
5107
5100
|
};
|