@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/hydrate/index.js CHANGED
@@ -26832,7 +26832,7 @@ class FormLabel {
26832
26832
  this.afAnnounceIfOptionalText = _t.optional.toLowerCase();
26833
26833
  }
26834
26834
  componentWillLoad() {
26835
- this.setLabelText();
26835
+ this.warnIfMissingLabel();
26836
26836
  this.validateFor();
26837
26837
  this.handleSlotVisibility();
26838
26838
  }
@@ -26841,8 +26841,7 @@ class FormLabel {
26841
26841
  logger.warn(`digi-form-label must have a for attribute. Please add a for attribute using af-for`, this.hostElement);
26842
26842
  }
26843
26843
  }
26844
- setLabelText() {
26845
- this.labelText = `${this.afLabel} ${this.requiredText}`;
26844
+ warnIfMissingLabel() {
26846
26845
  if (!this.afLabel) {
26847
26846
  logger.warn(`digi-form-label must have a label. Please add a label using af-label`, this.hostElement);
26848
26847
  }
@@ -26864,7 +26863,7 @@ class FormLabel {
26864
26863
  }
26865
26864
  }
26866
26865
  render() {
26867
- return (hAsync("div", { key: '78c3c9cc7609ede22abcd68c16514c85b52c945e', class: "digi-form-label" }, hAsync("div", { key: '5bd7a74e6508c261f489716673f011391bf7c0d8', class: "digi-form-label__label-group" }, this.afFor && this.afLabel && (hAsync("label", { key: '6952422ebe4e447857befae6116fd7336046dc1f', class: "digi-form-label__label", htmlFor: this.afFor, id: this.afId }, hAsync("span", { key: '2da61e9396c9c20b40ee4d80c21ae96e2a491e8f', tabindex: "-1", class: "digi-form-label__label--label" }, this.labelText), this.afDescription && (hAsync("span", { key: '858d2ae39681662c278352e42b7bccb511279bd0', tabindex: "-1", class: "digi-form-label__label--description" }, this.afDescription)))), this.hasActionSlot && (hAsync("div", { key: '7719bef7cfe38637a5ef4b71d5e9a6237ed48ff2', class: "digi-form-label__actions" }, hAsync("slot", { key: '37bd2332a7d4e7fa15c4ff61a0cc26c92bed08d8', name: "actions" }))))));
26866
+ return (hAsync("div", { key: 'd505cd974e5fad197c27502bbd5a69e03b6da4c9', class: "digi-form-label" }, hAsync("div", { key: '438d01b31f6b2814ae6a1ca04c824ea08ea2be23', class: "digi-form-label__label-group" }, this.afFor && this.afLabel && (hAsync("label", { key: 'f339da21e44bd1d80bc2bcd71f2a7b85ded421a3', class: "digi-form-label__label", htmlFor: this.afFor, id: this.afId }, hAsync("span", { key: '49c6e41049caafd257d39c8e4bbd61054e618ac9', tabindex: "-1", class: "digi-form-label__label--label" }, `${this.afLabel} ${this.requiredText}`), this.afDescription && (hAsync("span", { key: '857cf559d405dc425fb16289d216cc5ed500775f', tabindex: "-1", class: "digi-form-label__label--description" }, this.afDescription)))), this.hasActionSlot && (hAsync("div", { key: '11a7132c78dc5467b25c8a09724a1d13f3a324c3', class: "digi-form-label__actions" }, hAsync("slot", { key: 'f499d1b9d31ccc825723a880bea8f110658b462d', name: "actions" }))))));
26868
26867
  }
26869
26868
  get hostElement() { return getElement(this); }
26870
26869
  static get watchers() { return {
@@ -26872,13 +26871,7 @@ class FormLabel {
26872
26871
  "validateFor": 0
26873
26872
  }],
26874
26873
  "afLabel": [{
26875
- "setLabelText": 0
26876
- }],
26877
- "afRequired": [{
26878
- "setLabelText": 0
26879
- }],
26880
- "afAnnounceIfOptional": [{
26881
- "setLabelText": 0
26874
+ "warnIfMissingLabel": 0
26882
26875
  }]
26883
26876
  }; }
26884
26877
  static get style() { return formLabelCss(); }
@@ -26894,7 +26887,6 @@ class FormLabel {
26894
26887
  "afAnnounceIfOptional": [4, "af-announce-if-optional"],
26895
26888
  "afRequiredText": [1, "af-required-text"],
26896
26889
  "afAnnounceIfOptionalText": [1, "af-announce-if-optional-text"],
26897
- "labelText": [32],
26898
26890
  "hasActionSlot": [32]
26899
26891
  },
26900
26892
  "$listeners$": undefined,
package/hydrate/index.mjs CHANGED
@@ -26830,7 +26830,7 @@ class FormLabel {
26830
26830
  this.afAnnounceIfOptionalText = _t.optional.toLowerCase();
26831
26831
  }
26832
26832
  componentWillLoad() {
26833
- this.setLabelText();
26833
+ this.warnIfMissingLabel();
26834
26834
  this.validateFor();
26835
26835
  this.handleSlotVisibility();
26836
26836
  }
@@ -26839,8 +26839,7 @@ class FormLabel {
26839
26839
  logger.warn(`digi-form-label must have a for attribute. Please add a for attribute using af-for`, this.hostElement);
26840
26840
  }
26841
26841
  }
26842
- setLabelText() {
26843
- this.labelText = `${this.afLabel} ${this.requiredText}`;
26842
+ warnIfMissingLabel() {
26844
26843
  if (!this.afLabel) {
26845
26844
  logger.warn(`digi-form-label must have a label. Please add a label using af-label`, this.hostElement);
26846
26845
  }
@@ -26862,7 +26861,7 @@ class FormLabel {
26862
26861
  }
26863
26862
  }
26864
26863
  render() {
26865
- return (hAsync("div", { key: '78c3c9cc7609ede22abcd68c16514c85b52c945e', class: "digi-form-label" }, hAsync("div", { key: '5bd7a74e6508c261f489716673f011391bf7c0d8', class: "digi-form-label__label-group" }, this.afFor && this.afLabel && (hAsync("label", { key: '6952422ebe4e447857befae6116fd7336046dc1f', class: "digi-form-label__label", htmlFor: this.afFor, id: this.afId }, hAsync("span", { key: '2da61e9396c9c20b40ee4d80c21ae96e2a491e8f', tabindex: "-1", class: "digi-form-label__label--label" }, this.labelText), this.afDescription && (hAsync("span", { key: '858d2ae39681662c278352e42b7bccb511279bd0', tabindex: "-1", class: "digi-form-label__label--description" }, this.afDescription)))), this.hasActionSlot && (hAsync("div", { key: '7719bef7cfe38637a5ef4b71d5e9a6237ed48ff2', class: "digi-form-label__actions" }, hAsync("slot", { key: '37bd2332a7d4e7fa15c4ff61a0cc26c92bed08d8', name: "actions" }))))));
26864
+ return (hAsync("div", { key: 'd505cd974e5fad197c27502bbd5a69e03b6da4c9', class: "digi-form-label" }, hAsync("div", { key: '438d01b31f6b2814ae6a1ca04c824ea08ea2be23', class: "digi-form-label__label-group" }, this.afFor && this.afLabel && (hAsync("label", { key: 'f339da21e44bd1d80bc2bcd71f2a7b85ded421a3', class: "digi-form-label__label", htmlFor: this.afFor, id: this.afId }, hAsync("span", { key: '49c6e41049caafd257d39c8e4bbd61054e618ac9', tabindex: "-1", class: "digi-form-label__label--label" }, `${this.afLabel} ${this.requiredText}`), this.afDescription && (hAsync("span", { key: '857cf559d405dc425fb16289d216cc5ed500775f', tabindex: "-1", class: "digi-form-label__label--description" }, this.afDescription)))), this.hasActionSlot && (hAsync("div", { key: '11a7132c78dc5467b25c8a09724a1d13f3a324c3', class: "digi-form-label__actions" }, hAsync("slot", { key: 'f499d1b9d31ccc825723a880bea8f110658b462d', name: "actions" }))))));
26866
26865
  }
26867
26866
  get hostElement() { return getElement(this); }
26868
26867
  static get watchers() { return {
@@ -26870,13 +26869,7 @@ class FormLabel {
26870
26869
  "validateFor": 0
26871
26870
  }],
26872
26871
  "afLabel": [{
26873
- "setLabelText": 0
26874
- }],
26875
- "afRequired": [{
26876
- "setLabelText": 0
26877
- }],
26878
- "afAnnounceIfOptional": [{
26879
- "setLabelText": 0
26872
+ "warnIfMissingLabel": 0
26880
26873
  }]
26881
26874
  }; }
26882
26875
  static get style() { return formLabelCss(); }
@@ -26892,7 +26885,6 @@ class FormLabel {
26892
26885
  "afAnnounceIfOptional": [4, "af-announce-if-optional"],
26893
26886
  "afRequiredText": [1, "af-required-text"],
26894
26887
  "afAnnounceIfOptionalText": [1, "af-announce-if-optional-text"],
26895
- "labelText": [32],
26896
26888
  "hasActionSlot": [32]
26897
26889
  },
26898
26890
  "$listeners$": undefined,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@designsystem-se/af",
3
3
  "author": "Arbetsförmedlingen",
4
- "version": "41.0.0",
4
+ "version": "41.0.1-beta.1",
5
5
  "description": "Web Components for Digi Designsystem",
6
6
  "license": "Apache-2.0",
7
7
  "main": "./dist/index.cjs.js",
@@ -21,9 +21,7 @@
21
21
  },
22
22
  "contributes": {
23
23
  "html": {
24
- "customData": [
25
- "./custom-elements.json"
26
- ]
24
+ "customData": ["./custom-elements.json"]
27
25
  }
28
26
  },
29
27
  "publishConfig": {