@htmlbricks/hb-bundle
Version:
Single IIFE loader for all HTML Bricks hb-* web components from the jsDelivr CDN, with optional Subresource Integrity; includes agent/LLM docs and theme CSS variables.
27 lines (22 loc) • 719 B
TypeScript
import type { FormSchemaEntryShared } from "../form/webcomponent.type";
export type InputCheckboxParams = {
/** `"switch"` renders a Bulma-style switch instead of a checkbox. */
type?: "checkbox" | "switch";
};
export type FormSchemaEntry = Omit<FormSchemaEntryShared, "params"> & {
/**
* Optional default value.
*/
value?: string | number | boolean;
params?: InputCheckboxParams;
};
export type Component = {
id?: string;
style?: string;
show_validation?: "yes" | "no";
/** JSON string from HTML, or a parsed object from JavaScript (`parseSchemaentryProp`). */
schemaentry?: string | FormSchemaEntry;
};
export type Events = {
setVal: { value: boolean; valid: boolean; id: string };
};