@designsystem-se/af 41.0.1-beta.1 → 41.0.1-beta.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-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-CsnkG9DM.js → p-C9upnau2.js} +1 -1
- package/components/{p-DL56hj-Q.js → p-DdGvmUiV.js} +2 -2
- 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 +11 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/_form/form-label/form-label.js +12 -4
- package/dist/collection/design-tokens/components/_logo.variables.scss +18 -14
- package/dist/collection/styles/project.json +1 -2
- package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/p-189d472b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/styles/project.json +1 -2
- package/dist/esm/digi-arbetsformedlingen.js +1 -1
- package/dist/esm/digi-button_83.entry.js +11 -4
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/_form/form-label/form-label.d.ts +2 -1
- package/hydrate/index.js +12 -4
- package/hydrate/index.mjs +12 -4
- package/package.json +1 -1
- package/dist/digi-arbetsformedlingen/p-5c8111ef.entry.js +0 -1
|
@@ -5057,7 +5057,7 @@ const FormLabel = class {
|
|
|
5057
5057
|
this.afAnnounceIfOptionalText = text._t.optional.toLowerCase();
|
|
5058
5058
|
}
|
|
5059
5059
|
componentWillLoad() {
|
|
5060
|
-
this.
|
|
5060
|
+
this.setLabelText();
|
|
5061
5061
|
this.validateFor();
|
|
5062
5062
|
this.handleSlotVisibility();
|
|
5063
5063
|
}
|
|
@@ -5066,7 +5066,8 @@ const FormLabel = class {
|
|
|
5066
5066
|
logger_util.logger.warn(`digi-form-label must have a for attribute. Please add a for attribute using af-for`, this.hostElement);
|
|
5067
5067
|
}
|
|
5068
5068
|
}
|
|
5069
|
-
|
|
5069
|
+
setLabelText() {
|
|
5070
|
+
this.labelText = `${this.afLabel} ${this.requiredText}`;
|
|
5070
5071
|
if (!this.afLabel) {
|
|
5071
5072
|
logger_util.logger.warn(`digi-form-label must have a label. Please add a label using af-label`, this.hostElement);
|
|
5072
5073
|
}
|
|
@@ -5088,7 +5089,7 @@ const FormLabel = class {
|
|
|
5088
5089
|
}
|
|
5089
5090
|
}
|
|
5090
5091
|
render() {
|
|
5091
|
-
return (index.h("div", { key: '
|
|
5092
|
+
return (index.h("div", { key: '78c3c9cc7609ede22abcd68c16514c85b52c945e', class: "digi-form-label" }, index.h("div", { key: '5bd7a74e6508c261f489716673f011391bf7c0d8', class: "digi-form-label__label-group" }, this.afFor && this.afLabel && (index.h("label", { key: '6952422ebe4e447857befae6116fd7336046dc1f', class: "digi-form-label__label", htmlFor: this.afFor, id: this.afId }, index.h("span", { key: '2da61e9396c9c20b40ee4d80c21ae96e2a491e8f', tabindex: "-1", class: "digi-form-label__label--label" }, this.labelText), this.afDescription && (index.h("span", { key: '858d2ae39681662c278352e42b7bccb511279bd0', tabindex: "-1", class: "digi-form-label__label--description" }, this.afDescription)))), this.hasActionSlot && (index.h("div", { key: '7719bef7cfe38637a5ef4b71d5e9a6237ed48ff2', class: "digi-form-label__actions" }, index.h("slot", { key: '37bd2332a7d4e7fa15c4ff61a0cc26c92bed08d8', name: "actions" }))))));
|
|
5092
5093
|
}
|
|
5093
5094
|
get hostElement() { return index.getElement(this); }
|
|
5094
5095
|
static get watchers() { return {
|
|
@@ -5096,7 +5097,13 @@ const FormLabel = class {
|
|
|
5096
5097
|
"validateFor": 0
|
|
5097
5098
|
}],
|
|
5098
5099
|
"afLabel": [{
|
|
5099
|
-
"
|
|
5100
|
+
"setLabelText": 0
|
|
5101
|
+
}],
|
|
5102
|
+
"afRequired": [{
|
|
5103
|
+
"setLabelText": 0
|
|
5104
|
+
}],
|
|
5105
|
+
"afAnnounceIfOptional": [{
|
|
5106
|
+
"setLabelText": 0
|
|
5100
5107
|
}]
|
|
5101
5108
|
}; }
|
|
5102
5109
|
};
|