@htmlbricks/hb-input-radio 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-radio
2
+
3
+ ## Description
4
+
5
+ Radio group built from `schemaentry.params.options` with a shared `name` derived from the field id. Parses JSON `schemaentry` for initial `value` and supports required validation with optional Bootstrap feedback via `show_validation` and `validationTip`. Dispatches `setVal` with the selected string `value`, `valid`, and `id` whenever the choice changes.
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 | undefined;
54
+ };
55
+
56
+ export type Events = {
57
+ setVal: { value: string; valid: boolean; id: string };
58
+ };
59
+ ```
package/manifest.json CHANGED
@@ -183,5 +183,5 @@
183
183
  "size": {},
184
184
  "iifePath": "main.iife.js",
185
185
  "repoName": "@htmlbricks/hb-input-radio",
186
- "version": "0.66.8"
186
+ "version": "0.66.9"
187
187
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-input-radio",
3
- "version": "0.66.8",
3
+ "version": "0.66.9",
4
4
  "contributors": [],
5
5
  "description": "Radio group built from `schemaentry.params.options` with a shared `name` derived from the field id. Parses JSON `schemaentry` for initial `value` and supports required validation with optional Bootstrap feedback via `show_validation` and `validationTip`. Dispatches `setVal` with the selected string `value`, `valid`, and `id` whenever the choice changes.",
6
6
  "licenses": [