smoothly 0.1.93 → 0.1.94
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/smoothly-accordion_47.cjs.entry.js +5 -1
- package/dist/cjs/smoothly-input.cjs.entry.js +5 -1
- package/dist/collection/components/input/index.js +6 -0
- package/dist/custom-elements/index.js +5 -1
- package/dist/esm/smoothly-accordion_47.entry.js +5 -1
- package/dist/esm/smoothly-input.entry.js +5 -1
- package/dist/smoothly/{p-39db800c.entry.js → p-eea1f7db.entry.js} +1 -1
- package/dist/smoothly/smoothly-input.entry.js +5 -1
- package/dist/types/components/input/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -41,6 +41,9 @@ let SmoothlyInput = class {
|
|
|
41
41
|
if (value != before)
|
|
42
42
|
this.smoothlyChanged.emit({ name: this.name, value });
|
|
43
43
|
}
|
|
44
|
+
onCurrency() {
|
|
45
|
+
this.state = Object.assign(Object.assign({}, this.state), { value: this.newState({ value: this.formatter.toString(this.value), selection: this.state.selection }).value });
|
|
46
|
+
}
|
|
44
47
|
componentWillLoad() {
|
|
45
48
|
const value = this.formatter.toString(this.value) || "";
|
|
46
49
|
const start = value.length;
|
|
@@ -181,7 +184,8 @@ let SmoothlyInput = class {
|
|
|
181
184
|
return (h(Host, { class: { "has-value": ((_a = this.state) === null || _a === void 0 ? void 0 : _a.value) != undefined && ((_b = this.state) === null || _b === void 0 ? void 0 : _b.value) != "" } }, h("input", { name: this.name, type: (_c = this.state) === null || _c === void 0 ? void 0 : _c.type, placeholder: this.placeholder, required: this.required, autocomplete: this.autocomplete ? (_d = this.state) === null || _d === void 0 ? void 0 : _d.autocomplete : "off", disabled: this.disabled, pattern: ((_e = this.state) === null || _e === void 0 ? void 0 : _e.pattern) && ((_f = this.state) === null || _f === void 0 ? void 0 : _f.pattern.source), value: (_g = this.state) === null || _g === void 0 ? void 0 : _g.value, onInput: (e) => this.onInput(e), onFocus: e => this.onFocus(e), onClick: e => this.onClick(e), onBlur: e => this.onBlur(e), onKeyDown: e => this.onKeyDown(e), ref: (el) => (this.inputElement = el), onPaste: e => this.onPaste(e) }), h("smoothly-icon", { name: "alert-circle", color: "danger", fill: "clear", size: "small" }), h("label", { htmlFor: this.name }, h("slot", null))));
|
|
182
185
|
}
|
|
183
186
|
static get watchers() { return {
|
|
184
|
-
"value": ["valueWatcher"]
|
|
187
|
+
"value": ["valueWatcher"],
|
|
188
|
+
"currency": ["onCurrency"]
|
|
185
189
|
}; }
|
|
186
190
|
};
|
|
187
191
|
function getLocale() {
|