@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
|
@@ -5055,7 +5055,7 @@ const FormLabel = class {
|
|
|
5055
5055
|
this.afAnnounceIfOptionalText = _t.optional.toLowerCase();
|
|
5056
5056
|
}
|
|
5057
5057
|
componentWillLoad() {
|
|
5058
|
-
this.
|
|
5058
|
+
this.setLabelText();
|
|
5059
5059
|
this.validateFor();
|
|
5060
5060
|
this.handleSlotVisibility();
|
|
5061
5061
|
}
|
|
@@ -5064,7 +5064,8 @@ 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
|
-
|
|
5067
|
+
setLabelText() {
|
|
5068
|
+
this.labelText = `${this.afLabel} ${this.requiredText}`;
|
|
5068
5069
|
if (!this.afLabel) {
|
|
5069
5070
|
logger.warn(`digi-form-label must have a label. Please add a label using af-label`, this.hostElement);
|
|
5070
5071
|
}
|
|
@@ -5086,7 +5087,7 @@ const FormLabel = class {
|
|
|
5086
5087
|
}
|
|
5087
5088
|
}
|
|
5088
5089
|
render() {
|
|
5089
|
-
return (h("div", { key: '
|
|
5090
|
+
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" }))))));
|
|
5090
5091
|
}
|
|
5091
5092
|
get hostElement() { return getElement(this); }
|
|
5092
5093
|
static get watchers() { return {
|
|
@@ -5094,7 +5095,13 @@ const FormLabel = class {
|
|
|
5094
5095
|
"validateFor": 0
|
|
5095
5096
|
}],
|
|
5096
5097
|
"afLabel": [{
|
|
5097
|
-
"
|
|
5098
|
+
"setLabelText": 0
|
|
5099
|
+
}],
|
|
5100
|
+
"afRequired": [{
|
|
5101
|
+
"setLabelText": 0
|
|
5102
|
+
}],
|
|
5103
|
+
"afAnnounceIfOptional": [{
|
|
5104
|
+
"setLabelText": 0
|
|
5098
5105
|
}]
|
|
5099
5106
|
}; }
|
|
5100
5107
|
};
|
|
@@ -5300,7 +5307,8 @@ const FormSelect = class {
|
|
|
5300
5307
|
this.optionsObserver = new MutationObserver(() => this.getOptions());
|
|
5301
5308
|
this.optionsObserver.observe(this.hostElement, {
|
|
5302
5309
|
childList: true,
|
|
5303
|
-
subtree: true
|
|
5310
|
+
subtree: true,
|
|
5311
|
+
characterData: true
|
|
5304
5312
|
});
|
|
5305
5313
|
this.getOptions();
|
|
5306
5314
|
this.afOnReady.emit();
|
|
@@ -5370,14 +5378,14 @@ const FormSelect = class {
|
|
|
5370
5378
|
: false;
|
|
5371
5379
|
}
|
|
5372
5380
|
render() {
|
|
5373
|
-
return (h(Host, { key: '
|
|
5381
|
+
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
|
|
5374
5382
|
? 'true'
|
|
5375
|
-
: '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: '
|
|
5383
|
+
: '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: {
|
|
5376
5384
|
'digi-form-select__select-option': true,
|
|
5377
5385
|
'digi-form-select__select-option--initial-value': true
|
|
5378
5386
|
}, disabled: true, selected: !this.afValue, value: "" }, this.afPlaceholder)), this.optionItems.map((option, index) => {
|
|
5379
5387
|
return (h("option", { key: index, class: "digi-form-select__select-option", value: option.value, selected: this.getSelectedItem(option) }, option.text));
|
|
5380
|
-
})), h("digi-icon-input-select-marker", { key: '
|
|
5388
|
+
})), 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)))))));
|
|
5381
5389
|
}
|
|
5382
5390
|
get hostElement() { return getElement(this); }
|
|
5383
5391
|
static get watchers() { return {
|