@cscfi/csc-ui 2.2.7 → 2.2.9
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/dist/cjs/c-autocomplete_34.cjs.entry.js +10 -9
- package/dist/cjs/c-autocomplete_34.cjs.entry.js.map +1 -1
- package/dist/cjs/c-slider.cjs.entry.js +2 -2
- package/dist/cjs/c-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/csc-ui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/c-input/c-input.js +5 -24
- package/dist/collection/components/c-input/c-input.js.map +1 -1
- package/dist/collection/components/c-slider/c-slider.js +3 -3
- package/dist/collection/components/c-slider/c-slider.js.map +1 -1
- package/dist/collection/components/c-text-field/c-text-field.js +8 -6
- package/dist/collection/components/c-text-field/c-text-field.js.map +1 -1
- package/dist/components/c-autocomplete.js +1 -1
- package/dist/components/c-input.js +1 -1
- package/dist/components/c-select.js +1 -1
- package/dist/components/c-slider.js +3 -3
- package/dist/components/c-slider.js.map +1 -1
- package/dist/components/c-text-field.js +9 -7
- package/dist/components/c-text-field.js.map +1 -1
- package/dist/components/{p-aa75dd47.js → p-fc209a6c.js} +6 -8
- package/dist/components/p-fc209a6c.js.map +1 -0
- package/dist/csc-ui/csc-ui.esm.js +1 -1
- package/dist/csc-ui/csc-ui.esm.js.map +1 -1
- package/dist/csc-ui/{p-af181b9b.entry.js → p-1727bdd2.entry.js} +2 -2
- package/dist/csc-ui/p-1727bdd2.entry.js.map +1 -0
- package/dist/csc-ui/{p-23b2eb59.entry.js → p-bb0494ca.entry.js} +2 -2
- package/dist/csc-ui/p-bb0494ca.entry.js.map +1 -0
- package/dist/esm/c-autocomplete_34.entry.js +10 -9
- package/dist/esm/c-autocomplete_34.entry.js.map +1 -1
- package/dist/esm/c-slider.entry.js +2 -2
- package/dist/esm/c-slider.entry.js.map +1 -1
- package/dist/esm/csc-ui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/additional-types.d.ts +14 -0
- package/dist/types/components/c-input/c-input.d.ts +1 -2
- package/dist/types/components/c-slider/c-slider.d.ts +1 -1
- package/dist/types/components/c-text-field/c-text-field.d.ts +2 -2
- package/dist/types/components.d.ts +14 -22
- package/package.json +3 -3
- package/vscode-data.json +4 -8
- package/dist/components/p-aa75dd47.js.map +0 -1
- package/dist/csc-ui/p-23b2eb59.entry.js.map +0 -1
- package/dist/csc-ui/p-af181b9b.entry.js.map +0 -1
|
@@ -1074,9 +1074,8 @@ const CInput = class {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
};
|
|
1076
1076
|
this.active = false;
|
|
1077
|
-
this.
|
|
1077
|
+
this.automaticFocus = false;
|
|
1078
1078
|
this.disabled = false;
|
|
1079
|
-
this.form = false;
|
|
1080
1079
|
this.hideDetails = false;
|
|
1081
1080
|
this.hint = '';
|
|
1082
1081
|
this.hostId = undefined;
|
|
@@ -1128,7 +1127,7 @@ const CInput = class {
|
|
|
1128
1127
|
}
|
|
1129
1128
|
componentDidLoad() {
|
|
1130
1129
|
var _a, _b, _c, _d;
|
|
1131
|
-
if (this.
|
|
1130
|
+
if (this.automaticFocus) {
|
|
1132
1131
|
setTimeout(() => {
|
|
1133
1132
|
this._onFocus(false);
|
|
1134
1133
|
}, 500);
|
|
@@ -1245,9 +1244,9 @@ const CInput = class {
|
|
|
1245
1244
|
filled: !!this.value,
|
|
1246
1245
|
[`c-input--${this.variant}`]: true,
|
|
1247
1246
|
};
|
|
1248
|
-
return (h(Host, { key: '
|
|
1247
|
+
return (h(Host, { key: '3eaed9b18bae4e0d5891d3aaf05258a2f004d510', disabled: this.disabled }, h("div", { key: '91f379e0225ec22f735ecfb0027d69eeeed782d9', id: 'announce-' + this.inputId, class: "visuallyhidden", "aria-live": "polite", "aria-atomic": "true" }, this.statusText), h("div", { key: 'b88a244f97c62653ab6f26dbf907849bd1adbf4c', class: containerClasses }, h("div", { key: '85244770af3e46cbaf8da75304c2af39bccd32f8', class: "c-input__control" }, h("div", { key: '74e11458e36a8fc2efcafff74af9b6b00ed723ed', class: "c-input__slot", onClick: () => this._onFocus() }, this._renderBorders(), h("div", { key: 'da43ec53065b0961700ae79f624a1652deaf895e', class: "c-input__field", style: {
|
|
1249
1248
|
'--_c-input-label-position': this.preSlotWidth + 'px',
|
|
1250
|
-
} }, h("slot", { key: '
|
|
1249
|
+
} }, h("slot", { key: 'df38e347976436b599536f9d0ab5cbb5ac3fa545', name: "pre" }), this._renderLabel(), h("slot", { key: '6d3de5e123c8867a3ed0c11a63811245b68b03e3' }))), this.variant === 'select' && h("slot", { key: '86333618f43eba0c502219e856c7ed0be891a7b4', name: "dropdown" }), !this.hideDetails && (h("c-message", { key: 'd83e818f53579dfbf25d838f615d5479e8454705', hint: this.hint, inputId: this.inputId, valid: this.valid, validation: this.validation }))))));
|
|
1251
1250
|
}
|
|
1252
1251
|
get el() { return getElement(this); }
|
|
1253
1252
|
static get watchers() { return {
|
|
@@ -2517,8 +2516,8 @@ const CTextField = class {
|
|
|
2517
2516
|
return;
|
|
2518
2517
|
this.type = this.type === 'password' ? 'text' : 'password';
|
|
2519
2518
|
};
|
|
2520
|
-
this.
|
|
2521
|
-
this.
|
|
2519
|
+
this.automaticFocus = false;
|
|
2520
|
+
this.automaticCapitalize = '';
|
|
2522
2521
|
this.autocorrect = '';
|
|
2523
2522
|
this.autocomplete = '';
|
|
2524
2523
|
this.disabled = false;
|
|
@@ -2577,7 +2576,9 @@ const CTextField = class {
|
|
|
2577
2576
|
onChange: this._handleChange,
|
|
2578
2577
|
onBlur: this._handleBlur,
|
|
2579
2578
|
},
|
|
2580
|
-
input: Object.assign(Object.assign(Object.assign({ type: this.type, min: this.min, max: this.max, step: this.step }, (!!this.autocomplete && { autocomplete: this.autocomplete })), (!!this.
|
|
2579
|
+
input: Object.assign(Object.assign(Object.assign({ type: this.type, min: this.min, max: this.max, step: this.step }, (!!this.autocomplete && { autocomplete: this.autocomplete })), (!!this.automaticCapitalize && {
|
|
2580
|
+
autocapitalize: this.automaticCapitalize,
|
|
2581
|
+
})), (!!this.autocorrect && { autocorrect: this.autocorrect })),
|
|
2581
2582
|
textArea: {
|
|
2582
2583
|
rows: this.rows,
|
|
2583
2584
|
},
|
|
@@ -2612,7 +2613,7 @@ const CTextField = class {
|
|
|
2612
2613
|
return (h("svg", { class: classes, viewBox: "0 0 24 24", onClick: this._togglePasswordVisibility }, h("path", { d: this.passwordIcon })));
|
|
2613
2614
|
}
|
|
2614
2615
|
render() {
|
|
2615
|
-
return (h(Host, { key: '
|
|
2616
|
+
return (h(Host, { key: '30e52b03222db98c2e7ea02e9055340a6cb5478a' }, h("c-input", { key: '7e0016c74fa52d4157ad4d19bd382f3b946bbaaf', autofocus: this.automaticFocus, disabled: this.disabled, "hide-details": this.hideDetails, hint: this.hint, id: this.hostId, "input-id": this._inputId, label: this.label, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, rows: this.rows, shadow: this.shadow, type: this.type, valid: this.valid, validate: this.validate, "validate-on-blur": this.validateOnBlur, validation: this.validation, value: this.value }, h("slot", { key: '42617ce4d85480bad4a4860cc89e9585f245854f', name: "pre", slot: "pre" }), this._renderInputElement(), this._renderPasswordToggle(), this._renderDateToggle(), h("slot", { key: 'e1621de972ff312ff35967e3fb8ac08bffedf8bd', name: "post" }))));
|
|
2616
2617
|
}
|
|
2617
2618
|
static get formAssociated() { return true; }
|
|
2618
2619
|
get hiddenEl() { return getElement(this); }
|