{
  "definitions": {
    "events": {
      "$ref": "#/definitions/Events",
      "$schema": "http://json-schema.org/draft-07/schema#",
      "definitions": {
        "Events": {
          "additionalProperties": false,
          "properties": {
            "getValues": {
              "$ref": "#/definitions/FormSubmitLikeDetail"
            },
            "submit": {
              "$ref": "#/definitions/FormSubmitLikeDetail"
            },
            "submitinvalid": {
              "additionalProperties": {
                "not": {}
              },
              "description": "Fired when validation fails after a submit attempt (including `submitted=\"yes\"`).",
              "type": "object"
            },
            "update": {
              "properties": {
                "_id": {
                  "type": "string"
                },
                "_valid": {
                  "type": "boolean"
                }
              },
              "required": [
                "_id",
                "_valid"
              ],
              "type": "object"
            }
          },
          "required": [
            "submitinvalid",
            "submit",
            "getValues",
            "update"
          ],
          "type": "object"
        },
        "FormSubmitLikeDetail": {
          "description": "`submit` / `getValues`: flat merge of `{ _valid }` and field ids → values.",
          "properties": {
            "_valid": {
              "type": "boolean"
            }
          },
          "required": [
            "_valid"
          ],
          "type": "object"
        }
      }
    },
    "component": {
      "$ref": "#/definitions/Component",
      "$schema": "http://json-schema.org/draft-07/schema#",
      "definitions": {
        "Component": {
          "additionalProperties": false,
          "properties": {
            "getvals": {
              "enum": [
                "yes",
                "no",
                null
              ],
              "type": [
                "string",
                "null"
              ]
            },
            "hide_submit": {
              "type": "boolean"
            },
            "i18nlang": {
              "type": "string"
            },
            "id": {
              "type": "string"
            },
            "isInvalid": {
              "type": "boolean"
            },
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/definitions/FormSchema"
                }
              ],
              "description": "From HTML: JSON string parsed in `$effect`; may be an object when set from JavaScript."
            },
            "show_validation": {
              "enum": [
                "yes",
                "no"
              ],
              "type": "string"
            },
            "style": {
              "type": "string"
            },
            "submitted": {
              "enum": [
                "yes",
                "no",
                null
              ],
              "type": [
                "string",
                "null"
              ]
            },
            "values": {
              "$ref": "#/definitions/FormValues"
            }
          },
          "required": [
            "schema"
          ],
          "type": "object"
        },
        "FormSchema": {
          "items": {
            "$ref": "#/definitions/FormSchemaEntry"
          },
          "type": "array"
        },
        "FormSchemaDependency": {
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string"
            },
            "values": {
              "items": {
                "type": [
                  "string",
                  "number",
                  "boolean"
                ]
              },
              "type": "array"
            }
          },
          "required": [
            "id"
          ],
          "type": "object"
        },
        "FormSchemaEntry": {
          "additionalProperties": false,
          "properties": {
            "dependencies": {
              "items": {
                "$ref": "#/definitions/FormSchemaDependency"
              },
              "type": "array"
            },
            "disabled": {
              "type": "boolean"
            },
            "id": {
              "type": "string"
            },
            "label": {
              "type": "string"
            },
            "params": {
              "additionalProperties": {},
              "type": "object"
            },
            "placeholder": {
              "type": "string"
            },
            "readonly": {
              "type": "boolean"
            },
            "required": {
              "type": "boolean"
            },
            "type": {
              "description": "Discriminator for `hb-form` rows (`row`, `text`, `number`, …). May be omitted on a standalone `schemaentry` when implied by the host tag.",
              "type": "string"
            },
            "validationRegex": {
              "type": "string"
            },
            "validationTip": {
              "type": "string"
            },
            "value": {}
          },
          "required": [
            "id",
            "type"
          ],
          "type": "object"
        },
        "FormValues": {
          "additionalProperties": {},
          "description": "Live / submitted values keyed by field id (plus metadata keys on dispatch payloads).",
          "type": "object"
        }
      }
    }
  },
  "description": "JSON `schema`-driven form engine: each entry’s `type` maps to an `hb-input-*` web component or layout `row`. Handles grouping, conditional visibility, validation messages, disabled state, and dispatches rich `update` payloads (field values + `_valid`) plus submit lifecycle events for programmatic backends.\n\nSchema type → custom element: `row` (layout columns only); `text` → `hb-input-text`; `textarea` → `hb-input-area`; `number` → `hb-input-number`; `email` → `hb-input-email`; `select` → `hb-input-select`; `radio` → `hb-input-radio`; `checkbox` → `hb-input-checkbox`; `date` → `hb-input-date`; `datetime` → `hb-input-datetime`; `color` → `hb-input-color`; `file` → `hb-input-file`; `range` → `hb-input-range`; `coords` → `hb-input-coords`; `arrayobjects` → `hb-input-array-objects`; `arraytags` → `hb-input-array-tags`. See README.md in this package for the full table.",
  "storybookArgs": {
    "schema": {
      "control": {
        "type": "array"
      }
    },
    "submitted": {
      "control": {
        "type": "boolean"
      }
    },
    "show_validation": {
      "control": {
        "type": "boolean"
      }
    },
    "set_valid": {
      "control": {
        "type": "boolean"
      }
    },
    "set_value": {
      "control": {
        "type": "boolean"
      }
    },
    "hide_submit": {
      "control": {
        "type": "boolean"
      }
    },
    "submit": {
      "action": "submit"
    },
    "submitinvalid": {
      "action": "submitinvalid"
    },
    "getValues": {
      "action": "getValues"
    },
    "update": {
      "action": "change"
    },
    "i18nlang": {
      "control": {
        "type": "select"
      },
      "options": [
        "en",
        "it"
      ]
    }
  },
  "styleSetup": {
    "vars": [
      {
        "name": "--bulma-column-gap",
        "valueType": "number",
        "defaultValue": "0.75rem",
        "description": "Root horizontal padding and column gap; sized to contain Bulma `.columns` negative margins."
      }
    ],
    "parts": [
      {
        "name": "button_container",
        "description": "Wrapper around the submit area and `other_buttons` slot."
      },
      {
        "name": "main_button",
        "description": "Primary submit `<button>` (Bulma `is-primary`)."
      }
    ]
  },
  "contributors": [],
  "htmlSlots": [
    {
      "name": "submit_button",
      "description": "Replaces the entire default submit button (including `submit_label`)."
    },
    {
      "name": "submit_label",
      "description": "Text inside the default submit button when `submit_button` is not overridden."
    },
    {
      "name": "other_buttons",
      "description": "Extra actions rendered beside the default submit control inside `button_container`."
    }
  ],
  "i18n": [
    {
      "lang": "it",
      "language": "italian"
    },
    {
      "lang": "en",
      "language": "english"
    }
  ],
  "examples": [
    {
      "name": "BasicFormHost",
      "data": {
        "schema": [
          {
            "id": "name-row",
            "type": "row",
            "params": {
              "columns": [
                {
                  "type": "text",
                  "placeholder": "Insert your first name here...",
                  "id": "firstName",
                  "required": true,
                  "label": "First Name",
                  "validationTip": "This field cannot be empty."
                },
                {
                  "type": "text",
                  "placeholder": "Insert your last name here...",
                  "id": "lastName",
                  "required": true,
                  "label": "Last Name",
                  "validationTip": "This field cannot be empty."
                },
                {
                  "type": "checkbox",
                  "placeholder": "Insert your last namez here...",
                  "id": "lastNamez",
                  "label": "Last Namez",
                  "validationTip": "This field cannot be emptyz."
                },
                {
                  "type": "select",
                  "placeholder": "Select something here...",
                  "id": "selectsomething",
                  "required": true,
                  "label": "Selection of something",
                  "validationTip": "This field cannot be empty.",
                  "params": {
                    "options": [
                      {
                        "label": "",
                        "value": "",
                        "id": "testid"
                      },
                      {
                        "label": "testlabel",
                        "value": "testvalue",
                        "id": "testid2"
                      },
                      {
                        "label": "testlabel3",
                        "value": "testvalue3",
                        "id": "testid3"
                      },
                      {
                        "label": "testlabel4",
                        "value": "testvalue4",
                        "id": "testid4"
                      },
                      {
                        "label": "testlabel5",
                        "value": "testvalue5",
                        "id": "testid5"
                      },
                      {
                        "label": "testlabel6",
                        "value": "testvalue6",
                        "id": "testid6"
                      },
                      {
                        "label": "testlabel7",
                        "value": "testvalue7",
                        "id": "testid7"
                      },
                      {
                        "label": "testlabel8",
                        "value": "testvalue8",
                        "id": "testid8"
                      },
                      {
                        "label": "testlabel9",
                        "value": "testvalue9",
                        "id": "testid9"
                      },
                      {
                        "label": "testlabel10",
                        "value": "testvalue10",
                        "id": "testid10"
                      }
                    ]
                  }
                },
                {
                  "type": "radio",
                  "placeholder": "radio something here...",
                  "id": "radiosomething",
                  "required": true,
                  "label": "Selection of something",
                  "validationTip": "This field cannot be empty.",
                  "params": {
                    "options": [
                      {
                        "label": "radio",
                        "value": "radio",
                        "id": "testid3"
                      },
                      {
                        "label": "radio2",
                        "value": "radi2o",
                        "id": "testid4"
                      },
                      {
                        "label": "radio3",
                        "value": "radio2",
                        "id": "testid4"
                      },
                      {
                        "label": "testlabel",
                        "value": "testvalue",
                        "id": "testid5"
                      }
                    ]
                  }
                }
              ]
            }
          },
          {
            "type": "coords",
            "id": "coords",
            "label": "Coords",
            "required": true,
            "validationTip": "This field cannot be empty."
          },
          {
            "type": "number",
            "id": "age",
            "required": true,
            "label": "Age",
            "params": {
              "min": 8,
              "max": 120
            },
            "validationTip": "Min 8, Max 120"
          },
          {
            "type": "text",
            "placeholder": "Insert your last name here...",
            "id": "lastName2",
            "required": true,
            "label": "Last Name",
            "validationTip": "This field cannot be empty."
          },
          {
            "type": "textarea",
            "placeholder": "Insert your last name22 here...",
            "id": "lastName22",
            "required": true,
            "label": "Last Name2",
            "validationTip": "This field cannot be empty2."
          }
        ]
      }
    },
    {
      "name": "FormHostWithFileTemplate",
      "data": {
        "schema": [
          {
            "type": "file",
            "placeholder": "Inserisci file",
            "id": "filetest",
            "required": true,
            "label": "File di default"
          },
          {
            "type": "number",
            "id": "age",
            "required": true,
            "label": "Age",
            "value": 9,
            "params": {
              "min": 8,
              "max": 120
            },
            "validationTip": "Min 8, Max 120"
          }
        ]
      }
    },
    {
      "name": "FormHostTemplateCompiled",
      "data": {
        "schema": [
          {
            "type": "text",
            "placeholder": "Inserisci titolo di default",
            "id": "defaultTitle",
            "required": true,
            "label": "Titolo di default",
            "value": "titolotest",
            "params": {
              "min": 8,
              "max": 120
            }
          },
          {
            "type": "checkbox",
            "placeholder": "Insert your last namez here...",
            "id": "lastNamez",
            "label": "Last Namez",
            "validationTip": "This field cannot be emptyz.",
            "value": "yes"
          },
          {
            "type": "number",
            "id": "age",
            "required": true,
            "label": "Age",
            "value": 9,
            "params": {
              "min": 8,
              "max": 120
            },
            "validationTip": "Min 8, Max 120"
          },
          {
            "type": "datetime",
            "label": "datetime",
            "placeholder": "Insert your last name here...",
            "id": "datelsastNafme66",
            "required": true,
            "validationTip": "This field cannot be empty.",
            "value": "2022-06-23T13:41:10.107Z"
          },
          {
            "type": "date",
            "label": "data",
            "placeholder": "Insert your last name here...",
            "id": "datelastName6kk6",
            "required": true,
            "validationTip": "This field cannot be empty.",
            "value": "1984-02-27"
          }
        ]
      }
    },
    {
      "name": "FormHostTemplateConditional",
      "data": {
        "schema": [
          {
            "type": "text",
            "placeholder": "Inserisci titolo di default",
            "id": "defaultTitleCond",
            "required": true,
            "label": "Titolo di default",
            "value": "titolotest",
            "params": {
              "min": 8,
              "max": 120
            }
          },
          {
            "type": "number",
            "id": "CondAge",
            "required": true,
            "dependencies": [
              {
                "id": "defaultTitleCond",
                "values": [
                  "00000000"
                ]
              }
            ],
            "label": "Age",
            "value": 9,
            "params": {
              "min": 8,
              "max": 120
            },
            "validationTip": "Min 8, Max 120"
          }
        ]
      }
    },
    {
      "name": "FormHostTemplateConditionalAndColumns",
      "data": {
        "schema": [
          {
            "id": "name-row",
            "type": "row",
            "params": {
              "columns": [
                {
                  "type": "text",
                  "placeholder": "Insert your first name here...",
                  "id": "firstName",
                  "required": true,
                  "label": "First Name",
                  "validationTip": "This field cannot be empty."
                },
                {
                  "type": "text",
                  "placeholder": "Insert your last name here...",
                  "id": "lastName",
                  "required": true,
                  "label": "Last Name",
                  "validationTip": "This field cannot be empty."
                },
                {
                  "type": "select",
                  "placeholder": "Select something here...",
                  "id": "selectsomething",
                  "label": "Selection of something",
                  "validationTip": "This field cannot be empty.",
                  "params": {
                    "options": [
                      {
                        "label": "",
                        "value": "",
                        "id": "testid"
                      },
                      {
                        "label": "testlabel",
                        "value": "testvalue",
                        "id": "testid2"
                      }
                    ]
                  },
                  "dependencies": [
                    {
                      "id": "CondAge",
                      "values": [
                        100
                      ]
                    }
                  ]
                },
                {
                  "type": "text",
                  "placeholder": "Insert your last namez here...",
                  "id": "lastNamez",
                  "label": "Last Namez",
                  "validationTip": "This field cannot be emptyz."
                },
                {
                  "type": "radio",
                  "placeholder": "radio something here...",
                  "id": "radiosomething",
                  "label": "Selection of something",
                  "validationTip": "This field cannot be empty.",
                  "params": {
                    "options": [
                      {
                        "label": "radio",
                        "value": "radio",
                        "id": "testid3"
                      },
                      {
                        "label": "radio2",
                        "value": "radi2o",
                        "id": "testid4"
                      },
                      {
                        "label": "radio3",
                        "value": "radio2",
                        "id": "testid4"
                      },
                      {
                        "label": "testlabel",
                        "value": "testvalue",
                        "id": "testid5"
                      }
                    ]
                  },
                  "dependencies": [
                    {
                      "id": "firstName",
                      "values": [
                        "00000000"
                      ]
                    }
                  ]
                }
              ]
            }
          },
          {
            "type": "color",
            "id": "colo",
            "label": "Last Color"
          },
          {
            "type": "number",
            "id": "CondAge",
            "dependencies": [
              {
                "id": "firstName",
                "values": [
                  "00000000"
                ]
              }
            ],
            "label": "Age",
            "value": 9,
            "params": {
              "min": 8,
              "max": 120
            },
            "validationTip": "Min 8, Max 120"
          }
        ]
      }
    },
    {
      "name": "FormHostTemplateWithArrayProp",
      "data": {
        "schema": [
          {
            "type": "file",
            "placeholder": "Inserisci file",
            "id": "filetest",
            "required": true,
            "label": "File di default"
          },
          {
            "placeholder": "Insert your last name here...",
            "id": "lastName",
            "validationTip": "This field cannot be empty.",
            "label": "Array of objects",
            "required": true,
            "params": {
              "schema": [
                {
                  "id": "name-row",
                  "type": "row",
                  "params": {
                    "columns": [
                      {
                        "type": "text",
                        "placeholder": "Insert your first name here...",
                        "id": "firstNamee",
                        "required": true,
                        "label": "First Namee",
                        "validationTip": "This field cannot be empty."
                      },
                      {
                        "type": "text",
                        "placeholder": "Insert your last name here...",
                        "id": "lastName",
                        "label": "Last Nam3e",
                        "validationTip": "This field cannot be empty."
                      }
                    ]
                  }
                }
              ]
            },
            "type": "arrayobjects"
          }
        ]
      }
    }
  ],
  "iifeIntegrity": "sha384-B5+KfYgHircl+BWhIhx/myKwTl44/9Lj6VywVmQzbUQC2WlMAiQWIVamip/qLUal",
  "dependencies": [
    {
      "name": "hb-input-area",
      "dependencies": []
    },
    {
      "name": "hb-input-array-objects",
      "dependencies": [
        {
          "name": "hb-form",
          "dependencies": []
        },
        {
          "name": "hb-table",
          "dependencies": [
            {
              "name": "hb-dialog",
              "dependencies": []
            },
            {
              "name": "hb-dialogform",
              "dependencies": [
                {
                  "name": "hb-dialog",
                  "dependencies": []
                },
                {
                  "name": "hb-form",
                  "dependencies": []
                }
              ]
            },
            {
              "name": "hb-paginate",
              "dependencies": [
                {
                  "name": "hb-input-number",
                  "dependencies": []
                },
                {
                  "name": "hb-input-select",
                  "dependencies": []
                }
              ]
            },
            {
              "name": "hb-tooltip",
              "dependencies": []
            }
          ]
        }
      ]
    },
    {
      "name": "hb-input-array-tags",
      "dependencies": []
    },
    {
      "name": "hb-input-checkbox",
      "dependencies": []
    },
    {
      "name": "hb-input-color",
      "dependencies": []
    },
    {
      "name": "hb-input-coords",
      "dependencies": [
        {
          "name": "hb-input-number",
          "dependencies": []
        },
        {
          "name": "hb-map",
          "dependencies": []
        }
      ]
    },
    {
      "name": "hb-input-date",
      "dependencies": []
    },
    {
      "name": "hb-input-datetime",
      "dependencies": [
        {
          "name": "hb-input-date",
          "dependencies": []
        },
        {
          "name": "hb-input-number",
          "dependencies": []
        }
      ]
    },
    {
      "name": "hb-input-email",
      "dependencies": []
    },
    {
      "name": "hb-input-file",
      "dependencies": []
    },
    {
      "name": "hb-input-number",
      "dependencies": []
    },
    {
      "name": "hb-input-radio",
      "dependencies": []
    },
    {
      "name": "hb-input-range",
      "dependencies": []
    },
    {
      "name": "hb-input-select",
      "dependencies": []
    },
    {
      "name": "hb-input-text",
      "dependencies": []
    }
  ],
  "screenshots": [],
  "licenses": [
    {
      "type": "Apache-2.0",
      "path": "LICENSE.md",
      "cost": 0,
      "currency": "EUR"
    }
  ],
  "readmePath": "README.md",
  "name": "hb-form",
  "category": "forms",
  "tags": [
    "forms"
  ],
  "size": {},
  "iifePath": "main.iife.js",
  "repoName": "@htmlbricks/hb-form",
  "version": "0.71.37"
}