@htmlbricks/hb-input-email 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,60 @@
1
+ # hb-input-email
2
+
3
+ ## Description
4
+
5
+ `type="email"` field using `schemaentry` for id, value, placeholder, readonly, and required, with extra checks for a sensible address shape plus optional `validationRegex` and `params` min/max length. Use `show_validation` for Bootstrap states and `validationTip`. Dispatches `setVal` on updates and `clickEnter` when Enter is pressed.
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?: string | number | boolean;
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
+
52
+ show_validation?: "yes" | "no";
53
+ schemaentry: FormSchemaEntry;
54
+ };
55
+
56
+ export type Events = {
57
+ setVal: { value: string; valid: boolean; id: string };
58
+ clickEnter: { value: string; valid: boolean; id?: string };
59
+ };
60
+ ```
package/manifest.json CHANGED
@@ -197,5 +197,5 @@
197
197
  "size": {},
198
198
  "iifePath": "main.iife.js",
199
199
  "repoName": "@htmlbricks/hb-input-email",
200
- "version": "0.66.8"
200
+ "version": "0.66.10"
201
201
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-input-email",
3
- "version": "0.66.8",
3
+ "version": "0.66.10",
4
4
  "contributors": [],
5
5
  "description": "`type=\"email\"` field using `schemaentry` for id, value, placeholder, readonly, and required, with extra checks for a sensible address shape plus optional `validationRegex` and `params` min/max length. Use `show_validation` for Bootstrap states and `validationTip`. Dispatches `setVal` on updates and `clickEnter` when Enter is pressed.",
6
6
  "licenses": [