@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.
@@ -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-DdGvmUiV.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-C9upnau2.js';
55
+ import { i as isBefore, a as isAfter, d as defineCustomElement$e } from './p-DL56hj-Q.js';
56
+ import { d as defineCustomElement$d } from './p-CZNczF84.js';
57
+ import { d as defineCustomElement$c } from './p-2QoafdpB.js';
58
+ import { d as defineCustomElement$b } from './p-CsnkG9DM.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';
@@ -1,4 +1,4 @@
1
- import { C as Calendar, d as defineCustomElement$1 } from './p-DdGvmUiV.js';
1
+ import { C as Calendar, d as defineCustomElement$1 } from './p-DL56hj-Q.js';
2
2
 
3
3
  const DigiCalendar = Calendar;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -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-B7_lQTCU.js';
7
+ import { d as defineCustomElement$c } from './p-2QoafdpB.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-stxQJv63.js';
10
- import { d as defineCustomElement$7 } from './p-B7_lQTCU.js';
9
+ import { d as defineCustomElement$8 } from './p-CZNczF84.js';
10
+ import { d as defineCustomElement$7 } from './p-2QoafdpB.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';
@@ -1,4 +1,4 @@
1
- import { F as FormInput, d as defineCustomElement$1 } from './p-stxQJv63.js';
1
+ import { F as FormInput, d as defineCustomElement$1 } from './p-CZNczF84.js';
2
2
 
3
3
  const DigiFormInput = FormInput;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { F as FormLabel, d as defineCustomElement$1 } from './p-B7_lQTCU.js';
1
+ import { F as FormLabel, d as defineCustomElement$1 } from './p-2QoafdpB.js';
2
2
 
3
3
  const DigiFormLabel = FormLabel;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -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-stxQJv63.js';
59
- import { d as defineCustomElement$9 } from './p-B7_lQTCU.js';
58
+ import { d as defineCustomElement$a } from './p-CZNczF84.js';
59
+ import { d as defineCustomElement$9 } from './p-2QoafdpB.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,4 +1,4 @@
1
- import { F as FormSelect, d as defineCustomElement$1 } from './p-C9upnau2.js';
1
+ import { F as FormSelect, d as defineCustomElement$1 } from './p-CsnkG9DM.js';
2
2
 
3
3
  const DigiFormSelect = FormSelect;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -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-B7_lQTCU.js';
4
+ import { d as defineCustomElement$6 } from './p-2QoafdpB.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.setLabelText();
36
+ this.warnIfMissingLabel();
37
37
  this.validateFor();
38
38
  this.handleSlotVisibility();
39
39
  }
@@ -42,8 +42,7 @@ 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
- setLabelText() {
46
- this.labelText = `${this.afLabel} ${this.requiredText}`;
45
+ warnIfMissingLabel() {
47
46
  if (!this.afLabel) {
48
47
  logger.warn(`digi-form-label must have a label. Please add a label using af-label`, this.hostElement);
49
48
  }
@@ -65,7 +64,7 @@ const FormLabel = /*@__PURE__*/ proxyCustomElement(class FormLabel extends H {
65
64
  }
66
65
  }
67
66
  render() {
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" }))))));
67
+ 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" }))))));
69
68
  }
70
69
  get hostElement() { return this; }
71
70
  static get watchers() { return {
@@ -73,13 +72,7 @@ const FormLabel = /*@__PURE__*/ proxyCustomElement(class FormLabel extends H {
73
72
  "validateFor": 0
74
73
  }],
75
74
  "afLabel": [{
76
- "setLabelText": 0
77
- }],
78
- "afRequired": [{
79
- "setLabelText": 0
80
- }],
81
- "afAnnounceIfOptional": [{
82
- "setLabelText": 0
75
+ "warnIfMissingLabel": 0
83
76
  }]
84
77
  }; }
85
78
  static get style() { return formLabelCss(); }
@@ -92,20 +85,13 @@ const FormLabel = /*@__PURE__*/ proxyCustomElement(class FormLabel extends H {
92
85
  "afAnnounceIfOptional": [4, "af-announce-if-optional"],
93
86
  "afRequiredText": [1, "af-required-text"],
94
87
  "afAnnounceIfOptionalText": [1, "af-announce-if-optional-text"],
95
- "labelText": [32],
96
88
  "hasActionSlot": [32]
97
89
  }, undefined, {
98
90
  "afFor": [{
99
91
  "validateFor": 0
100
92
  }],
101
93
  "afLabel": [{
102
- "setLabelText": 0
103
- }],
104
- "afRequired": [{
105
- "setLabelText": 0
106
- }],
107
- "afAnnounceIfOptional": [{
108
- "setLabelText": 0
94
+ "warnIfMissingLabel": 0
109
95
  }]
110
96
  }]);
111
97
  function defineCustomElement() {
@@ -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-B7_lQTCU.js';
4
+ import { d as defineCustomElement$5 } from './p-2QoafdpB.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';
@@ -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-B7_lQTCU.js';
4
+ import { d as defineCustomElement$6 } from './p-2QoafdpB.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';
@@ -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-B7_lQTCU.js';
8
- import { d as defineCustomElement$9 } from './p-C9upnau2.js';
7
+ import { d as defineCustomElement$a } from './p-2QoafdpB.js';
8
+ import { d as defineCustomElement$9 } from './p-CsnkG9DM.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';