{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "description": "# drayman-timepicker\n\nTimepicker powered by [ngx-material-timepicker](https://github.com/Agranom/ngx-material-timepicker) library.\n\n## Example of usage\n\n![](media://drayman-timepicker.gif)\n\n```typescript\nimport customParseFormat = require('dayjs/plugin/customParseFormat');\nimport dayjs from 'dayjs';\ndayjs.extend(customParseFormat);\n\nmodule.exports = async ({ forceUpdate }) => {\n     const time: { start?: string; end?: string } = {};\n     let timeLeft: { hours: number; minutes: number };\n\n     const onTimeChange = async (timeType: 'start' | 'end', { value }) => {\n         time[timeType] = value;\n         if (time.start && time.end) {\n             const start = dayjs(time.start, 'HH:mm');\n             const end = dayjs(time.end, 'HH:mm');\n             const diff = end.subtract(start);\n             timeLeft = { hours: diff.hour(), minutes: diff.minute() };\n             await forceUpdate();\n         }\n     }\n\n     const wrapperStyle: CSS = {\n         display: 'grid',\n         'grid-auto-flow': 'column',\n     }\n\n     return () => {\n         return [\n             <container key=\"wrapper\" style={wrapperStyle}>\n                 <drayman-timepicker\n                     key=\"start\"\n                     label=\"Start time\"\n                     onValueChange={onTimeChange.bind(this, 'start')}\n                     value={time.start}\n                 />\n                 <drayman-timepicker\n                     key=\"end\"\n                     label=\"End time\"\n                     onValueChange={onTimeChange.bind(this, 'end')}\n                     showNowButton\n                     value={time.end}\n                 />\n             </container>,\n             <html key=\"info\">\n                 {timeLeft && <p>Time left: {timeLeft.hours} hours and {timeLeft.minutes} minutes.</p>}\n             </html>\n         ];\n     }\n}\n```",
    "properties": {
        "appearance": {
            "description": "Appearance style for the field.\nWether `outline` (default), `legacy`, `fill` or `standard`.",
            "enum": [
                "fill",
                "legacy",
                "outline",
                "standard"
            ],
            "type": "string"
        },
        "disabled": {
            "description": "Whether the control is disabled.",
            "type": "boolean"
        },
        "error": {
            "description": "Error text to be shown underneath the form field control.",
            "type": "string"
        },
        "helpText": {
            "description": "Hint text to be shown underneath the form field control.",
            "type": "string"
        },
        "label": {
            "description": "The floating label for a field.",
            "type": "string"
        },
        "onValueChange": {
            "description": "Executed with an input value from user.",
            "type": "object"
        },
        "onValueChangeStart": {
            "description": "Executed when user starts typing.",
            "type": "object"
        },
        "placeholder": {
            "description": "The placeholder text.",
            "type": "string"
        },
        "showNowButton": {
            "description": "Wether to show now button or not.",
            "type": "boolean"
        },
        "updateOnBlur": {
            "description": "Wether value of the field should be emitted when user is blurred out of the control.",
            "type": "boolean"
        },
        "value": {
            "description": "Value of the input.",
            "type": "string"
        }
    },
    "type": "object"
}

