@htmlbricks/hb-input-text 0.66.8 → 0.66.10

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,54 @@
1
+ # hb-input-text
2
+
3
+ ## Description
4
+
5
+ Single-line text field driven by a JSON `schemaentry` (id, value, placeholder, readonly, required, optional `validationRegex`, and `params` min/max length). Toggle Bootstrap validation styling with `show_validation`. Dispatches `setVal` whenever the value or validity changes (detail includes `value`, `valid`, `id`), and `clickEnter` when the user presses Enter inside the input.
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
+ * Optional default value.
19
+ */
20
+ value?: string | number | boolean;
21
+
22
+ readonly?: boolean;
23
+
24
+ /**
25
+ * This doesn't matter if the dependencies requirements aren't met.
26
+ */
27
+ required?: boolean;
28
+
29
+ validationRegex?: string;
30
+ /**
31
+ * Shows if value is not valid.
32
+ */
33
+ validationTip?: string;
34
+
35
+ placeholder?: string;
36
+
37
+ /**
38
+ * Other parameters that may be specific to a certain kind of form control.
39
+ */
40
+ params?: Record<string, any>;
41
+ };
42
+
43
+ export type Component = {
44
+ id?: string;
45
+ style?: string;
46
+
47
+ show_validation?: "yes" | "no";
48
+ schemaentry: FormSchemaEntry;
49
+ };
50
+
51
+ export type Events = {
52
+ setVal: { value: string, valid: boolean, id: string };
53
+ };
54
+ ```
package/manifest.json CHANGED
@@ -240,5 +240,5 @@
240
240
  "size": {},
241
241
  "iifePath": "main.iife.js",
242
242
  "repoName": "@htmlbricks/hb-input-text",
243
- "version": "0.66.8"
243
+ "version": "0.66.10"
244
244
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-input-text",
3
- "version": "0.66.8",
3
+ "version": "0.66.10",
4
4
  "contributors": [],
5
5
  "description": "Single-line text field driven by a JSON `schemaentry` (id, value, placeholder, readonly, required, optional `validationRegex`, and `params` min/max length). Toggle Bootstrap validation styling with `show_validation`. Dispatches `setVal` whenever the value or validity changes (detail includes `value`, `valid`, `id`), and `clickEnter` when the user presses Enter inside the input.",
6
6
  "licenses": [