{"version":3,"file":"DatePicker.cjs","names":[],"sources":["../../../src/components/DatePicker/DatePicker.tsx"],"sourcesContent":["/**\n * @tempest-limits props-count — label, helperText and error are the three states of\n * one message slot that every input in this SDK shares; removing them pushes the\n * scaffolding back into the app. DatePicker adds min, max and mode on top, which are\n * the field's own semantics.\n */\nimport { forwardRef } from \"react\";\nimport type { InputHTMLAttributes } from \"react\";\nimport { Input } from \"@/components/Input\";\n\nexport interface DatePickerProps extends Omit<\n    InputHTMLAttributes<HTMLInputElement>,\n    \"type\" | \"value\" | \"onChange\" | \"size\"\n> {\n    /** ISO date string (`YYYY-MM-DD`) or empty. */\n    value: string;\n    onChange: (value: string) => void;\n    label?: string;\n    helperText?: string;\n    error?: string;\n    /** Lower bound (`YYYY-MM-DD`). */\n    min?: string;\n    /** Upper bound (`YYYY-MM-DD`). */\n    max?: string;\n    /** Mode. `date` (default), `datetime-local`, `time`, or `month`. */\n    mode?: \"date\" | \"datetime-local\" | \"time\" | \"month\";\n    wrapperClassName?: string;\n}\n\n/**\n * Thin wrapper around the native `<input type=\"date\">` (or `datetime-local`,\n * `time`, `month`). For richer pickers, pair with `react-datepicker` directly\n * — this primitive keeps the SDK dep-free.\n */\nexport const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function DatePicker(\n    { value, onChange, mode = \"date\", ...props },\n    ref,\n) {\n    return (\n        <Input\n            {...props}\n            ref={ref}\n            type={mode}\n            value={value}\n            onChange={(event) => onChange(event.target.value)}\n        />\n    );\n});\n"],"mappings":"4FAkCA,IAAa,GAAA,EAAa,EAAA,WAAA,CAA8C,SACpE,CAAE,QAAO,WAAU,OAAO,OAAQ,GAAG,GACrC,EACF,CACE,OACI,EAAA,EAAA,IAAA,CAAC,EAAA,MAAD,CACI,GAAI,EACC,MACL,KAAM,EACC,QACP,SAAW,GAAU,EAAS,EAAM,OAAO,KAAK,CACnD,CAAA,CAET,CAAC"}