@nectary/components 5.6.7 → 5.7.0
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/bundle.js +15 -1
- package/field/index.js +8 -0
- package/input/index.js +7 -1
- package/package.json +1 -1
package/bundle.js
CHANGED
|
@@ -5299,9 +5299,12 @@ class Input extends NectaryElement {
|
|
|
5299
5299
|
"value",
|
|
5300
5300
|
"placeholder",
|
|
5301
5301
|
"mask",
|
|
5302
|
+
"max",
|
|
5303
|
+
"min",
|
|
5302
5304
|
"invalid",
|
|
5303
5305
|
"disabled",
|
|
5304
5306
|
"size",
|
|
5307
|
+
"step",
|
|
5305
5308
|
"autocomplete",
|
|
5306
5309
|
"autofocus",
|
|
5307
5310
|
"data-size",
|
|
@@ -5399,7 +5402,10 @@ class Input extends NectaryElement {
|
|
|
5399
5402
|
}
|
|
5400
5403
|
case "autocomplete":
|
|
5401
5404
|
case "maxlength":
|
|
5402
|
-
case "required":
|
|
5405
|
+
case "required":
|
|
5406
|
+
case "max":
|
|
5407
|
+
case "min":
|
|
5408
|
+
case "step": {
|
|
5403
5409
|
updateAttribute(this.#$input, name, newVal);
|
|
5404
5410
|
break;
|
|
5405
5411
|
}
|
|
@@ -6591,6 +6597,7 @@ class Field extends NectaryElement {
|
|
|
6591
6597
|
this.shouldShowTopSection();
|
|
6592
6598
|
this.#$label.addEventListener("click", this.#onLabelClick, options);
|
|
6593
6599
|
this.#$tooltipSlot.addEventListener("slotchange", this.#onTooltipSlotChange, options);
|
|
6600
|
+
this.#$inputSlot.addEventListener("slotchange", this.#onInputSlotChange, options);
|
|
6594
6601
|
}
|
|
6595
6602
|
disconnectedCallback() {
|
|
6596
6603
|
this.#controller.abort();
|
|
@@ -6674,6 +6681,13 @@ class Field extends NectaryElement {
|
|
|
6674
6681
|
#onTooltipSlotChange = () => {
|
|
6675
6682
|
setClass(this.#$tooltipWrapper, "empty", this.#$tooltipSlot.assignedElements().length === 0);
|
|
6676
6683
|
};
|
|
6684
|
+
#onInputSlotChange = () => {
|
|
6685
|
+
const inputElement = getFirstSlotElement(this.#$inputSlot);
|
|
6686
|
+
const labelText = this.#$label.textContent;
|
|
6687
|
+
if (inputElement !== null && labelText != null && labelText.length > 0) {
|
|
6688
|
+
inputElement.setAttribute("aria-label", "label");
|
|
6689
|
+
}
|
|
6690
|
+
};
|
|
6677
6691
|
}
|
|
6678
6692
|
defineCustomElement("sinch-field", Field);
|
|
6679
6693
|
const doFilesSatisfySize$1 = (files, size) => {
|
package/field/index.js
CHANGED
|
@@ -34,6 +34,7 @@ class Field extends NectaryElement {
|
|
|
34
34
|
this.shouldShowTopSection();
|
|
35
35
|
this.#$label.addEventListener("click", this.#onLabelClick, options);
|
|
36
36
|
this.#$tooltipSlot.addEventListener("slotchange", this.#onTooltipSlotChange, options);
|
|
37
|
+
this.#$inputSlot.addEventListener("slotchange", this.#onInputSlotChange, options);
|
|
37
38
|
}
|
|
38
39
|
disconnectedCallback() {
|
|
39
40
|
this.#controller.abort();
|
|
@@ -117,6 +118,13 @@ class Field extends NectaryElement {
|
|
|
117
118
|
#onTooltipSlotChange = () => {
|
|
118
119
|
setClass(this.#$tooltipWrapper, "empty", this.#$tooltipSlot.assignedElements().length === 0);
|
|
119
120
|
};
|
|
121
|
+
#onInputSlotChange = () => {
|
|
122
|
+
const inputElement = getFirstSlotElement(this.#$inputSlot);
|
|
123
|
+
const labelText = this.#$label.textContent;
|
|
124
|
+
if (inputElement !== null && labelText != null && labelText.length > 0) {
|
|
125
|
+
inputElement.setAttribute("aria-label", "label");
|
|
126
|
+
}
|
|
127
|
+
};
|
|
120
128
|
}
|
|
121
129
|
defineCustomElement("sinch-field", Field);
|
|
122
130
|
export {
|
package/input/index.js
CHANGED
|
@@ -133,9 +133,12 @@ class Input extends NectaryElement {
|
|
|
133
133
|
"value",
|
|
134
134
|
"placeholder",
|
|
135
135
|
"mask",
|
|
136
|
+
"max",
|
|
137
|
+
"min",
|
|
136
138
|
"invalid",
|
|
137
139
|
"disabled",
|
|
138
140
|
"size",
|
|
141
|
+
"step",
|
|
139
142
|
"autocomplete",
|
|
140
143
|
"autofocus",
|
|
141
144
|
"data-size",
|
|
@@ -233,7 +236,10 @@ class Input extends NectaryElement {
|
|
|
233
236
|
}
|
|
234
237
|
case "autocomplete":
|
|
235
238
|
case "maxlength":
|
|
236
|
-
case "required":
|
|
239
|
+
case "required":
|
|
240
|
+
case "max":
|
|
241
|
+
case "min":
|
|
242
|
+
case "step": {
|
|
237
243
|
updateAttribute(this.#$input, name, newVal);
|
|
238
244
|
break;
|
|
239
245
|
}
|