UNPKG

@kern-ux-annex/kern-angular-kit

Version:

Angular-Umsetzung der KERN UX-Standard Komponenten

809 lines (808 loc) 25.2 kB
{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://kern-ux.de/schemas/kern-angular-kit.json", "title": "KERN Angular Kit Components", "description": "JSON Schema for KERN Angular Kit components configuration and validation", "type": "object", "definitions": { "KernAccordion": { "type": "object", "description": "Configuration for kern-accordion component", "properties": { "title": { "type": "string", "description": "The title text displayed in the accordion header" }, "open": { "type": "boolean", "default": false, "description": "Whether the accordion is initially expanded" } }, "required": ["title"], "additionalProperties": false }, "KernAccordionGroup": { "type": "object", "description": "Configuration for kern-accordion-group component", "properties": {}, "additionalProperties": false }, "KernAlert": { "type": "object", "description": "Configuration for kern-alert component", "properties": { "title": { "type": "string", "description": "The title text displayed in the alert" }, "type": { "type": "string", "enum": ["info", "success", "warning", "danger"], "default": "info", "description": "The visual style and semantic meaning of the alert" } }, "required": ["title"], "additionalProperties": false }, "KernBadge": { "type": "object", "description": "Configuration for kern-badge component", "properties": { "variant": { "type": "string", "enum": ["info", "success", "warning", "danger"], "default": "info", "description": "The visual style of the badge" }, "icon": { "type": ["string", "null"], "description": "Icon name to display in the badge" } }, "additionalProperties": false }, "KernButton": { "type": "object", "description": "Configuration for kern-button component", "properties": { "variant": { "type": "string", "enum": ["primary", "secondary", "tertiary"], "default": "primary", "description": "The visual style of the button" }, "block": { "type": "boolean", "default": false, "description": "Whether the button should take full width" }, "disabled": { "type": "boolean", "default": false, "description": "Whether the button is disabled" }, "type": { "type": "string", "enum": ["button", "submit", "reset"], "default": "button", "description": "The button type attribute" }, "iconLeft": { "type": ["string", "null"], "description": "Icon name to display on the left side" }, "iconRight": { "type": ["string", "null"], "description": "Icon name to display on the right side" }, "srOnlyLabel": { "type": "boolean", "default": false, "description": "Whether the label is screen reader only" } }, "additionalProperties": false }, "KernCard": { "type": "object", "description": "Configuration for kern-card component", "properties": { "title": { "type": ["string", "null"], "description": "The card title" }, "titleLinkHref": { "type": ["string", "null"], "description": "URL for the title link" }, "titleLinkTarget": { "type": "string", "enum": ["_self", "_blank", "_parent", "_top"], "default": "_self", "description": "Target for the title link" }, "preline": { "type": ["string", "null"], "description": "Text displayed above the title" }, "subline": { "type": ["string", "null"], "description": "Text displayed below the title" }, "imgSrc": { "type": ["string", "null"], "description": "Image source URL" }, "imgAlt": { "type": ["string", "null"], "description": "Image alt text" }, "size": { "type": "string", "enum": ["default", "small", "large"], "default": "default", "description": "The card size" }, "headingLevel": { "type": "string", "enum": ["1", "2", "3", "4", "5"], "default": "2", "description": "The heading level for the title" }, "btnPrimaryLabelText": { "type": ["string", "null"], "description": "Primary button label text" }, "btnSecondaryLabelText": { "type": ["string", "null"], "description": "Secondary button label text" } }, "additionalProperties": false }, "KernDialog": { "type": "object", "description": "Configuration for kern-dialog component", "properties": { "dialogId": { "type": "string", "description": "Custom ID for the dialog element (auto-generated if not provided)" }, "title": { "type": "string", "description": "The title text displayed in the dialog header" }, "btnCloseLabelText": { "type": "string", "default": "Schließen", "description": "Label text for the close button" }, "btnPrimaryLabelText": { "type": ["string", "null"], "description": "Label text for the primary action button (null to hide)" }, "btnSecondaryLabelText": { "type": ["string", "null"], "description": "Label text for the secondary action button (null to hide)" } }, "required": ["title"], "additionalProperties": false }, "KernDivider": { "type": "object", "description": "Configuration for kern-divider component", "properties": {}, "additionalProperties": false }, "KernIcon": { "type": "object", "description": "Configuration for kern-icon component", "properties": { "name": { "type": "string", "description": "The icon name/identifier" }, "size": { "type": "string", "description": "The icon size" } }, "required": ["name"], "additionalProperties": false }, "KernLink": { "type": "object", "description": "Configuration for kern-link component", "properties": { "href": { "type": "string", "description": "The link URL" }, "target": { "type": "string", "enum": ["_self", "_blank", "_parent", "_top"], "default": "_self", "description": "The link target" }, "external": { "type": "boolean", "default": false, "description": "Whether this is an external link" } }, "required": ["href"], "additionalProperties": false }, "KernLoader": { "type": "object", "description": "Configuration for kern-loader component", "properties": { "text": { "type": "string", "default": "Laden...", "description": "Loading text displayed alongside the spinner" } }, "additionalProperties": false }, "KernProgress": { "type": "object", "description": "Configuration for kern-progress component", "properties": { "value": { "type": "number", "description": "The current progress value" }, "max": { "type": "number", "default": 100, "description": "The maximum progress value" }, "label": { "type": "string", "description": "The progress label" } }, "required": ["value"], "additionalProperties": false }, "KernKopfzeile": { "type": "object", "description": "Configuration for kern-kopfzeile component", "properties": { "fluid": { "type": "boolean", "description": "If set, the element stretches to full width" } }, "additionalProperties": false }, "KernHeading": { "type": "object", "description": "Configuration for kern-heading component", "properties": { "level": { "type": "string", "enum": ["1", "2", "3", "4", "5", "6"], "default": "1", "description": "The heading level" }, "text": { "type": "string", "description": "The heading text content" } }, "required": ["text"], "additionalProperties": false }, "KernTableColumn": { "type": "object", "description": "Table column definition", "properties": { "key": { "type": "string", "description": "The data key for this column" }, "header": { "type": "string", "description": "The column header text" }, "numeric": { "type": "boolean", "default": false, "description": "Whether this column contains numeric data" } }, "required": ["key", "header"], "additionalProperties": false }, "KernTable": { "type": "object", "description": "Configuration for kern-table component", "properties": { "responsive": { "type": "boolean", "default": true, "description": "Whether the table is responsive" }, "small": { "type": "boolean", "default": false, "description": "Whether to use compact table styling" }, "striped": { "type": "boolean", "default": false, "description": "Whether to use striped row styling" }, "caption": { "type": ["string", "null"], "description": "Table caption text" }, "columns": { "type": "array", "items": { "$ref": "#/definitions/KernTableColumn" }, "description": "Table column definitions" }, "data": { "type": "array", "items": { "type": "object" }, "description": "Table data rows" }, "footer": { "type": ["array", "null"], "items": { "type": "object" }, "description": "Table footer rows" }, "rowHeaderKey": { "type": ["string", "null"], "description": "Key for row header column" } }, "required": ["columns", "data"], "additionalProperties": false }, "KernSummaryItem": { "type": "object", "properties": { "term": { "type": "string" }, "description": { "type": "string" } }, "required": ["term", "description"], "additionalProperties": false }, "KernSummary": { "type": "object", "description": "Configuration for kern-summary component", "properties": { "titleId": { "type": "string", "description": "Custom title ID" }, "title": { "type": ["string", "null"], "description": "Summary title" }, "titleNumber": { "type": ["string", "null"], "description": "Title number/prefix" }, "headingLevel": { "type": "string", "enum": ["1", "2", "3", "4", "5", "6"], "default": "3", "description": "Heading level for the title" }, "items": { "type": "array", "items": { "$ref": "#/definitions/KernSummaryItem" }, "description": "Summary items" }, "actionLinkHref": { "type": ["string", "null"], "description": "Action link URL" }, "actionLinkTarget": { "type": "string", "enum": ["_self", "_blank", "_parent", "_top"], "default": "_self", "description": "Action link target" } }, "required": ["items"], "additionalProperties": false }, "KernSummaryGroup": { "type": "object", "description": "Configuration for kern-summary-group component", "properties": {}, "additionalProperties": false }, "KernDescriptionList": { "type": "object", "description": "Configuration for kern-description-list component", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/KernSummaryItem" }, "description": "Description list items" }, "orientation": { "type": "string", "enum": ["horizontal", "vertical"], "description": "List orientation" } }, "required": ["items"], "additionalProperties": false }, "KernTasklistItem": { "type": "object", "properties": { "id": { "type": "string" }, "text": { "type": "string" }, "completed": { "type": "boolean", "default": false }, "href": { "type": "string" } }, "required": ["id", "text"], "additionalProperties": false }, "KernTasklist": { "type": "object", "description": "Configuration for kern-tasklist component", "properties": { "tasks": { "type": "array", "items": { "$ref": "#/definitions/KernTasklistItem" }, "description": "Task items" }, "editable": { "type": "boolean", "default": false, "description": "Whether tasks can be edited" } }, "required": ["tasks"], "additionalProperties": false }, "KernInputBase": { "type": "object", "description": "Base configuration shared by all form input components", "properties": { "inputId": { "type": "string", "description": "Custom ID for the input element (auto-generated if not provided)" }, "labelText": { "type": "string", "description": "Label text displayed for the input field" }, "optional": { "type": "boolean", "default": false, "description": "Whether to display '(optional)' in the label" }, "readonly": { "type": "boolean", "default": false, "description": "Whether the input is read-only" }, "required": { "type": "boolean", "default": false, "description": "Whether the input is required for form submission" } }, "required": ["labelText"] }, "KernFieldset": { "type": "object", "description": "Configuration for kern-fieldset component", "properties": { "legend": { "type": "string", "description": "Fieldset legend text" }, "required": { "type": "boolean", "default": false, "description": "Whether the fieldset is required" } }, "required": ["legend"], "additionalProperties": false }, "KernInputError": { "type": "object", "description": "Configuration for kern-input-error component", "properties": { "errorText": { "type": "string", "description": "Error message text" } }, "required": ["errorText"], "additionalProperties": false }, "KernInputHint": { "type": "object", "description": "Configuration for kern-input-hint component", "properties": { "hintText": { "type": "string", "description": "Hint message text" } }, "required": ["hintText"], "additionalProperties": false }, "KernInputText": { "allOf": [ { "$ref": "#/definitions/KernInputBase" }, { "type": "object", "description": "Configuration for kern-input-text component", "properties": { "inputmode": { "type": ["string", "null"], "enum": ["decimal", "numeric", null], "description": "Input mode hint for mobile keyboards" }, "maxlength": { "type": ["number", "null"], "minimum": 1, "description": "Maximum number of characters allowed" } } } ] }, "KernInputNumber": { "allOf": [ { "$ref": "#/definitions/KernInputBase" }, { "type": "object", "description": "Configuration for kern-input-number component", "properties": { "min": { "type": ["number", "null"], "description": "Minimum allowed value" }, "max": { "type": ["number", "null"], "description": "Maximum allowed value" }, "step": { "type": ["number", "null"], "description": "Step increment for the input" }, "autocomplete": { "type": ["string", "null"], "description": "Autocomplete attribute value" }, "placeholder": { "type": ["string", "null"], "description": "Placeholder text" } } } ] }, "KernInputDate": { "allOf": [ { "$ref": "#/definitions/KernInputBase" }, { "type": "object", "description": "Configuration for kern-input-date component", "properties": { "min": { "type": ["string", "null"], "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Minimum selectable date in YYYY-MM-DD format" }, "max": { "type": ["string", "null"], "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Maximum selectable date in YYYY-MM-DD format" } } } ] }, "KernInputFile": { "allOf": [ { "$ref": "#/definitions/KernInputBase" }, { "type": "object", "description": "Configuration for kern-input-file component", "properties": { "accept": { "type": ["string", "null"], "description": "Comma-separated list of accepted file types (MIME types or extensions)" }, "multiple": { "type": "boolean", "default": false, "description": "Whether multiple files can be selected" } } } ] }, "KernInputPassword": { "allOf": [ { "$ref": "#/definitions/KernInputBase" }, { "type": "object", "description": "Configuration for kern-input-password component", "properties": { "maxlength": { "type": ["number", "null"], "minimum": 1, "description": "Maximum number of characters allowed" } } } ] }, "KernInputRadio": { "allOf": [ { "$ref": "#/definitions/KernInputBase" }, { "type": "object", "description": "Configuration for kern-input-radio component", "properties": { "value": { "type": "string", "description": "The value submitted when this radio button is selected" }, "name": { "type": "string", "description": "Name attribute for grouping radio buttons together" } }, "required": ["value", "name"] } ] }, "KernInputSelect": { "allOf": [ { "$ref": "#/definitions/KernInputBase" }, { "type": "object", "description": "Configuration for kern-input-select component", "properties": { "emptyPlaceholder": { "type": "string", "default": "" } } } ] }, "KernInputTextarea": { "allOf": [ { "$ref": "#/definitions/KernInputBase" }, { "type": "object", "description": "Configuration for kern-input-textarea component", "properties": { "rows": { "type": ["number", "null"], "minimum": 1, "description": "Number of visible text lines for the textarea" }, "cols": { "type": ["number", "null"], "minimum": 1, "description": "Visible width of the textarea in characters" }, "maxlength": { "type": ["number", "null"], "minimum": 1, "description": "Maximum number of characters allowed" } } } ] }, "KernContainer": { "type": "object", "description": "Configuration for kern-container component", "properties": { "fluid": { "type": "boolean" } }, "additionalProperties": false }, "KernRow": { "type": "object", "description": "Configuration for kern-row component", "properties": { "verticalAlign": { "type": ["string", "null"], "enum": ["start", "center", "end", null] }, "horizontalAlign": { "type": ["string", "null"], "enum": [ "start", "center", "end", "around", "between", "evenly", null ] } }, "additionalProperties": false }, "KernCol": { "type": "object", "description": "Configuration for kern-col component", "properties": { "size": { "type": ["number", "object"] }, "offset": { "type": ["number", "object"] } }, "additionalProperties": false } }, "properties": { "components": { "type": "object", "description": "Component configurations organized by component selector", "properties": { "kern-accordion": { "$ref": "#/definitions/KernAccordion" }, "kern-accordion-group": { "$ref": "#/definitions/KernAccordionGroup" }, "kern-alert": { "$ref": "#/definitions/KernAlert" }, "kern-badge": { "$ref": "#/definitions/KernBadge" }, "kern-button": { "$ref": "#/definitions/KernButton" }, "kern-card": { "$ref": "#/definitions/KernCard" }, "kern-dialog": { "$ref": "#/definitions/KernDialog" }, "kern-divider": { "$ref": "#/definitions/KernDivider" }, "kern-icon": { "$ref": "#/definitions/KernIcon" }, "kern-link": { "$ref": "#/definitions/KernLink" }, "kern-loader": { "$ref": "#/definitions/KernLoader" }, "kern-progress": { "$ref": "#/definitions/KernProgress" }, "kern-kopfzeile": { "$ref": "#/definitions/KernKopfzeile" }, "kern-heading": { "$ref": "#/definitions/KernHeading" }, "kern-table": { "$ref": "#/definitions/KernTable" }, "kern-summary": { "$ref": "#/definitions/KernSummary" }, "kern-summary-group": { "$ref": "#/definitions/KernSummaryGroup" }, "kern-description-list": { "$ref": "#/definitions/KernDescriptionList" }, "kern-tasklist": { "$ref": "#/definitions/KernTasklist" }, "kern-fieldset": { "$ref": "#/definitions/KernFieldset" }, "kern-input-error": { "$ref": "#/definitions/KernInputError" }, "kern-input-hint": { "$ref": "#/definitions/KernInputHint" }, "kern-input-text": { "$ref": "#/definitions/KernInputText" }, "kern-input-number": { "$ref": "#/definitions/KernInputNumber" }, "kern-input-checkbox": { "$ref": "#/definitions/KernInputBase" }, "kern-input-date": { "$ref": "#/definitions/KernInputDate" }, "kern-input-email": { "$ref": "#/definitions/KernInputBase" }, "kern-input-file": { "$ref": "#/definitions/KernInputFile" }, "kern-input-password": { "$ref": "#/definitions/KernInputPassword" }, "kern-input-radio": { "$ref": "#/definitions/KernInputRadio" }, "kern-input-select": { "$ref": "#/definitions/KernInputSelect" }, "kern-input-tel": { "$ref": "#/definitions/KernInputBase" }, "kern-input-textarea": { "$ref": "#/definitions/KernInputTextarea" }, "kern-input-url": { "$ref": "#/definitions/KernInputBase" }, "kern-container": { "$ref": "#/definitions/KernContainer" }, "kern-row": { "$ref": "#/definitions/KernRow" }, "kern-col": { "$ref": "#/definitions/KernCol" } }, "additionalProperties": false } }, "additionalProperties": false }