inputs-wc 0.1.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/LICENSE +21 -0
- package/dist/cjs/alt-input.cjs.entry.js +35 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-d27e04ed.js +1326 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/inputs-wc.cjs.js +25 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/numeric-input.cjs.entry.js +41 -0
- package/dist/cjs/sample-form.cjs.entry.js +64 -0
- package/dist/cjs/tw-555edb3e.js +11966 -0
- package/dist/collection/collection-manifest.json +14 -0
- package/dist/collection/components/alt-input/alt-input.css +0 -0
- package/dist/collection/components/alt-input/alt-input.js +118 -0
- package/dist/collection/components/numeric-input/numeric-input.css +0 -0
- package/dist/collection/components/numeric-input/numeric-input.js +144 -0
- package/dist/collection/components/sample-form/button.js +8 -0
- package/dist/collection/components/sample-form/check.js +11 -0
- package/dist/collection/components/sample-form/radio.js +11 -0
- package/dist/collection/components/sample-form/sample-form.js +34 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/props.css +100 -0
- package/dist/collection/styles/shadow.css +480 -0
- package/dist/collection/tokens.css +379 -0
- package/dist/collection/utils/index.js +4 -0
- package/dist/collection/utils/store.js +58 -0
- package/dist/collection/utils/tw-version.js +4 -0
- package/dist/collection/utils/tw.js +5 -0
- package/dist/collection/utils/types.js +1 -0
- package/dist/components/alt-input.d.ts +11 -0
- package/dist/components/alt-input.js +53 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +1 -0
- package/dist/components/numeric-input.d.ts +11 -0
- package/dist/components/numeric-input.js +60 -0
- package/dist/components/sample-form.d.ts +11 -0
- package/dist/components/sample-form.js +78 -0
- package/dist/components/tw.js +11962 -0
- package/dist/esm/alt-input.entry.js +31 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-1c8d0134.js +1298 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/inputs-wc.js +20 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/numeric-input.entry.js +37 -0
- package/dist/esm/sample-form.entry.js +60 -0
- package/dist/esm/tw-88a8de4e.js +11962 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/inputs-wc/index.esm.js +0 -0
- package/dist/inputs-wc/inputs-wc.esm.js +1 -0
- package/dist/inputs-wc/p-1c4a76f0.js +1 -0
- package/dist/inputs-wc/p-352bc40d.entry.js +1 -0
- package/dist/inputs-wc/p-92a60dc3.js +2 -0
- package/dist/inputs-wc/p-b6a348f1.entry.js +1 -0
- package/dist/inputs-wc/p-c3a8f125.entry.js +1 -0
- package/dist/inputs-wc/p-e1255160.js +1 -0
- package/dist/inputs-wc/props.css +100 -0
- package/dist/inputs-wc/tokens.css +379 -0
- package/dist/loader/cdn.js +1 -0
- package/dist/loader/index.cjs.js +1 -0
- package/dist/loader/index.d.ts +24 -0
- package/dist/loader/index.es2017.js +1 -0
- package/dist/loader/index.js +2 -0
- package/dist/loader/package.json +11 -0
- package/dist/types/components/alt-input/alt-input.d.ts +9 -0
- package/dist/types/components/numeric-input/numeric-input.d.ts +11 -0
- package/dist/types/components/sample-form/button.d.ts +9 -0
- package/dist/types/components/sample-form/check.d.ts +5 -0
- package/dist/types/components/sample-form/radio.d.ts +5 -0
- package/dist/types/components/sample-form/sample-form.d.ts +4 -0
- package/dist/types/components.d.ts +81 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1680 -0
- package/dist/types/utils/index.d.ts +4 -0
- package/dist/types/utils/store.d.ts +6 -0
- package/dist/types/utils/tw-version.d.ts +3 -0
- package/dist/types/utils/tw.d.ts +3 -0
- package/dist/types/utils/types.d.ts +26 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +48 -0
- package/readme.md +75 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-1c8d0134.js';
|
|
2
|
+
import { a as actions, t as tw } from './tw-88a8de4e.js';
|
|
3
|
+
|
|
4
|
+
const altInputCss = "";
|
|
5
|
+
const AltInputStyle0 = altInputCss;
|
|
6
|
+
|
|
7
|
+
const AltInput = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.min = 0;
|
|
11
|
+
this.max = undefined;
|
|
12
|
+
this.xId = '';
|
|
13
|
+
this.value = 0;
|
|
14
|
+
this.isInvalid = (num) => {
|
|
15
|
+
const { min, max } = this;
|
|
16
|
+
return num < min || (max !== undefined && num > max);
|
|
17
|
+
};
|
|
18
|
+
this.handleInput = event => {
|
|
19
|
+
event.preventDefault();
|
|
20
|
+
const target = event.target;
|
|
21
|
+
const num = target.value != '' ? target.value : 0;
|
|
22
|
+
actions.update(this.xId, num);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return (h("input", { key: '4f722d7778500c3f5038667e0b977dd04389c185', class: tw('text-right', this.isInvalid(this.value) ? 'text-clrs-red' : 'text-clrs-navy'), type: "number", onInput: this.handleInput, value: this.value }));
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
AltInput.style = AltInputStyle0;
|
|
30
|
+
|
|
31
|
+
export { AltInput as alt_input };
|