@htmlbricks/hb-input-number 0.66.8 → 0.66.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/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # hb-input-number
2
+
3
+ ## Description
4
+
5
+ Numeric input with optional `min` / `max` from `schemaentry.params` (native attributes are omitted when bounds are not set). Validates required fields and range when both ends are defined; with no min/max it still dispatches `clickEnter` on Enter. Emits `setVal` with `{ value, valid, id }` and supports `show_validation` plus `validationTip`.
6
+
7
+ ## Types
8
+
9
+ ```typescript
10
+ export type FormSchemaEntry = {
11
+ /**
12
+ * This will be both the key of the object when submitting the form's data,
13
+ * and also the id in the DOM.
14
+ */
15
+ id: string;
16
+
17
+ /**
18
+ * The descriptive label that will show alongside the form control.
19
+ */
20
+ label?: string;
21
+
22
+ /**
23
+ * Optional default value.
24
+ */
25
+ value?: number;
26
+
27
+ readonly?: boolean;
28
+
29
+ /**
30
+ * This doesn't matter if the dependencies requirements aren't met.
31
+ */
32
+ required?: boolean;
33
+
34
+ validationRegex?: string;
35
+ /**
36
+ * Shows if value is not valid.
37
+ */
38
+ validationTip?: string;
39
+
40
+ placeholder?: string;
41
+
42
+ /**
43
+ * Other parameters that may be specific to a certain kind of form control.
44
+ */
45
+ params?: Record<string, any>;
46
+ };
47
+
48
+ export type Component = {
49
+ id?: string;
50
+ style?: string;
51
+ show_validation?: "yes" | "no";
52
+ schemaentry: FormSchemaEntry | undefined;
53
+ };
54
+
55
+ export type Events = {
56
+ setVal: { value: number; valid: boolean; id: string };
57
+ clickEnter: { value: string; valid: boolean; id?: string };
58
+ };
59
+ ```
package/manifest.json CHANGED
@@ -265,5 +265,5 @@
265
265
  "size": {},
266
266
  "iifePath": "main.iife.js",
267
267
  "repoName": "@htmlbricks/hb-input-number",
268
- "version": "0.66.8"
268
+ "version": "0.66.9"
269
269
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-input-number",
3
- "version": "0.66.8",
3
+ "version": "0.66.9",
4
4
  "contributors": [],
5
5
  "description": "Numeric input with optional `min` / `max` from `schemaentry.params` (native attributes are omitted when bounds are not set). Validates required fields and range when both ends are defined; with no min/max it still dispatches `clickEnter` on Enter. Emits `setVal` with `{ value, valid, id }` and supports `show_validation` plus `validationTip`.",
6
6
  "licenses": [