@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
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.
|
|
26835
|
+
this.setLabelText();
|
|
26836
26836
|
this.validateFor();
|
|
26837
26837
|
this.handleSlotVisibility();
|
|
26838
26838
|
}
|
|
@@ -26841,7 +26841,8 @@ 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
|
-
|
|
26844
|
+
setLabelText() {
|
|
26845
|
+
this.labelText = `${this.afLabel} ${this.requiredText}`;
|
|
26845
26846
|
if (!this.afLabel) {
|
|
26846
26847
|
logger.warn(`digi-form-label must have a label. Please add a label using af-label`, this.hostElement);
|
|
26847
26848
|
}
|
|
@@ -26863,7 +26864,7 @@ class FormLabel {
|
|
|
26863
26864
|
}
|
|
26864
26865
|
}
|
|
26865
26866
|
render() {
|
|
26866
|
-
return (hAsync("div", { key: '
|
|
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" }))))));
|
|
26867
26868
|
}
|
|
26868
26869
|
get hostElement() { return getElement(this); }
|
|
26869
26870
|
static get watchers() { return {
|
|
@@ -26871,7 +26872,13 @@ class FormLabel {
|
|
|
26871
26872
|
"validateFor": 0
|
|
26872
26873
|
}],
|
|
26873
26874
|
"afLabel": [{
|
|
26874
|
-
"
|
|
26875
|
+
"setLabelText": 0
|
|
26876
|
+
}],
|
|
26877
|
+
"afRequired": [{
|
|
26878
|
+
"setLabelText": 0
|
|
26879
|
+
}],
|
|
26880
|
+
"afAnnounceIfOptional": [{
|
|
26881
|
+
"setLabelText": 0
|
|
26875
26882
|
}]
|
|
26876
26883
|
}; }
|
|
26877
26884
|
static get style() { return formLabelCss(); }
|
|
@@ -26887,6 +26894,7 @@ class FormLabel {
|
|
|
26887
26894
|
"afAnnounceIfOptional": [4, "af-announce-if-optional"],
|
|
26888
26895
|
"afRequiredText": [1, "af-required-text"],
|
|
26889
26896
|
"afAnnounceIfOptionalText": [1, "af-announce-if-optional-text"],
|
|
26897
|
+
"labelText": [32],
|
|
26890
26898
|
"hasActionSlot": [32]
|
|
26891
26899
|
},
|
|
26892
26900
|
"$listeners$": undefined,
|
|
@@ -27367,7 +27375,8 @@ class FormSelect {
|
|
|
27367
27375
|
this.optionsObserver = new MutationObserver(() => this.getOptions());
|
|
27368
27376
|
this.optionsObserver.observe(this.hostElement, {
|
|
27369
27377
|
childList: true,
|
|
27370
|
-
subtree: true
|
|
27378
|
+
subtree: true,
|
|
27379
|
+
characterData: true
|
|
27371
27380
|
});
|
|
27372
27381
|
this.getOptions();
|
|
27373
27382
|
this.afOnReady.emit();
|
|
@@ -27437,14 +27446,14 @@ class FormSelect {
|
|
|
27437
27446
|
: false;
|
|
27438
27447
|
}
|
|
27439
27448
|
render() {
|
|
27440
|
-
return (hAsync(Host, { key: '
|
|
27449
|
+
return (hAsync(Host, { key: '25781b1ef869d40adddd56e0bc76df15fb38824d', tabindex: -1 }, hAsync("div", { key: '134a4405b623a02f203539a0dc7e7a2b273a8997', class: Object.assign({ 'digi-form-select': true }, this.cssModifiers) }, hAsync("div", { key: '131cd12bd401525cd24568864087860947f78411', class: "digi-form-select__label-group" }, hAsync("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 })), hAsync("div", { key: '0b7f01ce1e8cb0ceb1e0dcc2c34ebf4766789804', class: "digi-form-select__select-wrapper" }, hAsync("select", { key: '76cdaf0d9afbaea218f1ef7aa9c938cb7cbc81c1', class: "digi-form-select__select", name: this.afName, id: this.afId, "aria-label": this.afAriaLabel, "aria-invalid": this.afValidation === FormSelectValidation.ERROR
|
|
27441
27450
|
? 'true'
|
|
27442
|
-
: '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 && (hAsync("option", { key: '
|
|
27451
|
+
: '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 && (hAsync("option", { key: '50a6a16127c45e1d7bf18c9bf23d269f35360cf4', class: {
|
|
27443
27452
|
'digi-form-select__select-option': true,
|
|
27444
27453
|
'digi-form-select__select-option--initial-value': true
|
|
27445
27454
|
}, disabled: true, selected: !this.afValue, value: "" }, this.afPlaceholder)), this.optionItems.map((option, index) => {
|
|
27446
27455
|
return (hAsync("option", { key: index, class: "digi-form-select__select-option", value: option.value, selected: this.getSelectedItem(option) }, option.text));
|
|
27447
|
-
})), hAsync("digi-icon-input-select-marker", { key: '
|
|
27456
|
+
})), hAsync("digi-icon-input-select-marker", { key: '4f18ad875e8c9ce10c658c667f1fcf5530db9eb2', class: "digi-form-select__icon", slot: "icon" })), hAsync("div", { key: '723e27711db96646df989f4a7ed87e68b85434df', hidden: true }, hAsync("slot", { key: '0d0048a91cb95c882c43ac6f319f53f7e994a8bb' })), hAsync("div", { key: '42eff52b99714e2b1f53e58c50a0a9e8059efeeb', class: "digi-form-select__footer" }, hAsync("div", { key: '30f66c55f4595c1c2621d733e6e997b45d09600e', "aria-atomic": "true", role: this.errorMessageIsAlert ? 'alert' : null, id: `${this.afId}--validation-message` }, this.showValidation() && (hAsync("digi-form-validation-message", { key: '7affedbbffd3a8bd13c562e21a24fd02562042a0', "af-variation": this.afValidation }, this.afValidationText)))))));
|
|
27448
27457
|
}
|
|
27449
27458
|
get hostElement() { return getElement(this); }
|
|
27450
27459
|
static get watchers() { return {
|
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.
|
|
26833
|
+
this.setLabelText();
|
|
26834
26834
|
this.validateFor();
|
|
26835
26835
|
this.handleSlotVisibility();
|
|
26836
26836
|
}
|
|
@@ -26839,7 +26839,8 @@ 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
|
-
|
|
26842
|
+
setLabelText() {
|
|
26843
|
+
this.labelText = `${this.afLabel} ${this.requiredText}`;
|
|
26843
26844
|
if (!this.afLabel) {
|
|
26844
26845
|
logger.warn(`digi-form-label must have a label. Please add a label using af-label`, this.hostElement);
|
|
26845
26846
|
}
|
|
@@ -26861,7 +26862,7 @@ class FormLabel {
|
|
|
26861
26862
|
}
|
|
26862
26863
|
}
|
|
26863
26864
|
render() {
|
|
26864
|
-
return (hAsync("div", { key: '
|
|
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" }))))));
|
|
26865
26866
|
}
|
|
26866
26867
|
get hostElement() { return getElement(this); }
|
|
26867
26868
|
static get watchers() { return {
|
|
@@ -26869,7 +26870,13 @@ class FormLabel {
|
|
|
26869
26870
|
"validateFor": 0
|
|
26870
26871
|
}],
|
|
26871
26872
|
"afLabel": [{
|
|
26872
|
-
"
|
|
26873
|
+
"setLabelText": 0
|
|
26874
|
+
}],
|
|
26875
|
+
"afRequired": [{
|
|
26876
|
+
"setLabelText": 0
|
|
26877
|
+
}],
|
|
26878
|
+
"afAnnounceIfOptional": [{
|
|
26879
|
+
"setLabelText": 0
|
|
26873
26880
|
}]
|
|
26874
26881
|
}; }
|
|
26875
26882
|
static get style() { return formLabelCss(); }
|
|
@@ -26885,6 +26892,7 @@ class FormLabel {
|
|
|
26885
26892
|
"afAnnounceIfOptional": [4, "af-announce-if-optional"],
|
|
26886
26893
|
"afRequiredText": [1, "af-required-text"],
|
|
26887
26894
|
"afAnnounceIfOptionalText": [1, "af-announce-if-optional-text"],
|
|
26895
|
+
"labelText": [32],
|
|
26888
26896
|
"hasActionSlot": [32]
|
|
26889
26897
|
},
|
|
26890
26898
|
"$listeners$": undefined,
|
|
@@ -27365,7 +27373,8 @@ class FormSelect {
|
|
|
27365
27373
|
this.optionsObserver = new MutationObserver(() => this.getOptions());
|
|
27366
27374
|
this.optionsObserver.observe(this.hostElement, {
|
|
27367
27375
|
childList: true,
|
|
27368
|
-
subtree: true
|
|
27376
|
+
subtree: true,
|
|
27377
|
+
characterData: true
|
|
27369
27378
|
});
|
|
27370
27379
|
this.getOptions();
|
|
27371
27380
|
this.afOnReady.emit();
|
|
@@ -27435,14 +27444,14 @@ class FormSelect {
|
|
|
27435
27444
|
: false;
|
|
27436
27445
|
}
|
|
27437
27446
|
render() {
|
|
27438
|
-
return (hAsync(Host, { key: '
|
|
27447
|
+
return (hAsync(Host, { key: '25781b1ef869d40adddd56e0bc76df15fb38824d', tabindex: -1 }, hAsync("div", { key: '134a4405b623a02f203539a0dc7e7a2b273a8997', class: Object.assign({ 'digi-form-select': true }, this.cssModifiers) }, hAsync("div", { key: '131cd12bd401525cd24568864087860947f78411', class: "digi-form-select__label-group" }, hAsync("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 })), hAsync("div", { key: '0b7f01ce1e8cb0ceb1e0dcc2c34ebf4766789804', class: "digi-form-select__select-wrapper" }, hAsync("select", { key: '76cdaf0d9afbaea218f1ef7aa9c938cb7cbc81c1', class: "digi-form-select__select", name: this.afName, id: this.afId, "aria-label": this.afAriaLabel, "aria-invalid": this.afValidation === FormSelectValidation.ERROR
|
|
27439
27448
|
? 'true'
|
|
27440
|
-
: '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 && (hAsync("option", { key: '
|
|
27449
|
+
: '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 && (hAsync("option", { key: '50a6a16127c45e1d7bf18c9bf23d269f35360cf4', class: {
|
|
27441
27450
|
'digi-form-select__select-option': true,
|
|
27442
27451
|
'digi-form-select__select-option--initial-value': true
|
|
27443
27452
|
}, disabled: true, selected: !this.afValue, value: "" }, this.afPlaceholder)), this.optionItems.map((option, index) => {
|
|
27444
27453
|
return (hAsync("option", { key: index, class: "digi-form-select__select-option", value: option.value, selected: this.getSelectedItem(option) }, option.text));
|
|
27445
|
-
})), hAsync("digi-icon-input-select-marker", { key: '
|
|
27454
|
+
})), hAsync("digi-icon-input-select-marker", { key: '4f18ad875e8c9ce10c658c667f1fcf5530db9eb2', class: "digi-form-select__icon", slot: "icon" })), hAsync("div", { key: '723e27711db96646df989f4a7ed87e68b85434df', hidden: true }, hAsync("slot", { key: '0d0048a91cb95c882c43ac6f319f53f7e994a8bb' })), hAsync("div", { key: '42eff52b99714e2b1f53e58c50a0a9e8059efeeb', class: "digi-form-select__footer" }, hAsync("div", { key: '30f66c55f4595c1c2621d733e6e997b45d09600e', "aria-atomic": "true", role: this.errorMessageIsAlert ? 'alert' : null, id: `${this.afId}--validation-message` }, this.showValidation() && (hAsync("digi-form-validation-message", { key: '7affedbbffd3a8bd13c562e21a24fd02562042a0', "af-variation": this.afValidation }, this.afValidationText)))))));
|
|
27446
27455
|
}
|
|
27447
27456
|
get hostElement() { return getElement(this); }
|
|
27448
27457
|
static get watchers() { return {
|
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.1-beta.
|
|
4
|
+
"version": "41.0.1-beta.3",
|
|
5
5
|
"description": "Web Components for Digi Designsystem",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"main": "./dist/index.cjs.js",
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"contributes": {
|
|
23
23
|
"html": {
|
|
24
|
-
"customData": [
|
|
24
|
+
"customData": [
|
|
25
|
+
"./custom-elements.json"
|
|
26
|
+
]
|
|
25
27
|
}
|
|
26
28
|
},
|
|
27
29
|
"publishConfig": {
|