@fusion.dev/helix-core 0.109.1 → 0.109.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/custom-elements.json
CHANGED
|
@@ -9640,6 +9640,15 @@
|
|
|
9640
9640
|
"readonly": true,
|
|
9641
9641
|
"description": "Id of the description node, for `aria-describedby` on the control.\n\n`undefined` when there is nothing to point at, so the attribute is absent\nrather than pointing at an id that renders nothing."
|
|
9642
9642
|
},
|
|
9643
|
+
{
|
|
9644
|
+
"kind": "field",
|
|
9645
|
+
"name": "invalidity",
|
|
9646
|
+
"type": {
|
|
9647
|
+
"text": "'true' | undefined"
|
|
9648
|
+
},
|
|
9649
|
+
"readonly": true,
|
|
9650
|
+
"description": "`'true'` for `aria-invalid` on the control while a message is shown, and\n`undefined` otherwise, so the attribute is absent."
|
|
9651
|
+
},
|
|
9643
9652
|
{
|
|
9644
9653
|
"kind": "field",
|
|
9645
9654
|
"name": "feedback",
|
|
@@ -10043,6 +10052,14 @@
|
|
|
10043
10052
|
}
|
|
10044
10053
|
],
|
|
10045
10054
|
"attributes": [
|
|
10055
|
+
{
|
|
10056
|
+
"name": "aria-label",
|
|
10057
|
+
"type": {
|
|
10058
|
+
"text": "string | null"
|
|
10059
|
+
},
|
|
10060
|
+
"default": "null",
|
|
10061
|
+
"fieldName": "namedBy"
|
|
10062
|
+
},
|
|
10046
10063
|
{
|
|
10047
10064
|
"name": "feedback",
|
|
10048
10065
|
"type": {
|
|
@@ -33,6 +33,11 @@ export declare class MixinFieldInterface {
|
|
|
33
33
|
* rather than pointing at an id that renders nothing.
|
|
34
34
|
*/
|
|
35
35
|
readonly describedBy: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* `'true'` for `aria-invalid` on the control while a message is shown, and
|
|
38
|
+
* `undefined` otherwise, so the attribute is absent.
|
|
39
|
+
*/
|
|
40
|
+
readonly invalidity: 'true' | undefined;
|
|
36
41
|
/**
|
|
37
42
|
* The validation message shown under the control. It replaces the browser's
|
|
38
43
|
* message.
|
|
@@ -15,6 +15,7 @@ export const MixinField = (Base) => {
|
|
|
15
15
|
super(...arguments);
|
|
16
16
|
this.controlId = 'control';
|
|
17
17
|
this.labelId = 'label';
|
|
18
|
+
this.namedBy = null;
|
|
18
19
|
this.feedback = '';
|
|
19
20
|
this.hint = '';
|
|
20
21
|
this.label = '';
|
|
@@ -43,6 +44,9 @@ export const MixinField = (Base) => {
|
|
|
43
44
|
}
|
|
44
45
|
return this.hint === '' ? undefined : HINT_ID;
|
|
45
46
|
}
|
|
47
|
+
get invalidity() {
|
|
48
|
+
return this.resolvedFeedback === '' ? undefined : 'true';
|
|
49
|
+
}
|
|
46
50
|
renderGroupLabel() {
|
|
47
51
|
const hidden = this.label === '' ? this.getAttribute('aria-label') : null;
|
|
48
52
|
if (this.label === '' && !hidden) {
|
|
@@ -131,6 +135,9 @@ export const MixinField = (Base) => {
|
|
|
131
135
|
this.addEventListener('change', touch);
|
|
132
136
|
}
|
|
133
137
|
}
|
|
138
|
+
__decorate([
|
|
139
|
+
property({ attribute: 'aria-label' })
|
|
140
|
+
], FieldElement.prototype, "namedBy", void 0);
|
|
134
141
|
__decorate([
|
|
135
142
|
property()
|
|
136
143
|
], FieldElement.prototype, "feedback", void 0);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-core",
|
|
3
3
|
"description": "Helix element primitives: base classes, mixins, decorators, utilities.",
|
|
4
|
-
"version": "0.109.
|
|
4
|
+
"version": "0.109.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@floating-ui/dom": "^1.8.0",
|
|
37
|
-
"@fusion.dev/helix-icons": "0.109.
|
|
37
|
+
"@fusion.dev/helix-icons": "0.109.3"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@fusion.dev/helix-cem": "0.109.
|
|
41
|
-
"@fusion.dev/helix-testing": "0.109.
|
|
40
|
+
"@fusion.dev/helix-cem": "0.109.3",
|
|
41
|
+
"@fusion.dev/helix-testing": "0.109.3",
|
|
42
42
|
"@lit-labs/ssr": "^4.1.0",
|
|
43
43
|
"lit": "^3.2.1"
|
|
44
44
|
},
|