Files
medusa-store/www/apps/ui/specs/components/DatePicker/DatePicker.json
Shahed Nasser d1a1135328 docs: migrate UI docs (#13245)
* docs: create a new UI docs project (#13233)

* docs: create a new UI docs project

* fix installation errors

* docs: migrate UI docs content to new project (#13241)

* Fix content

* added examples for some components

* finish adding examples

* lint fix

* fix build errors

* delete empty files

* path fixes + refactor

* fix build error
2025-08-20 11:42:25 +03:00

422 lines
11 KiB
JSON

{
"description": "",
"methods": [],
"displayName": "DatePicker",
"props": {
"aria-describedby": {
"description": "Identifies the element (or elements) that describes the object.",
"required": false,
"tsType": {
"name": "string"
}
},
"aria-details": {
"description": "Identifies the element (or elements) that provide a detailed, extended description for the object.",
"required": false,
"tsType": {
"name": "string"
}
},
"aria-label": {
"description": "Defines a string value that labels the current element.",
"required": false,
"tsType": {
"name": "string"
}
},
"aria-labelledby": {
"description": "Identifies the element (or elements) that labels the current element.",
"required": false,
"tsType": {
"name": "string"
}
},
"autoFocus": {
"description": "Whether the element should receive focus on render.",
"required": false,
"tsType": {
"name": "boolean"
}
},
"defaultOpen": {
"description": "Whether the overlay is open by default (uncontrolled).",
"required": false,
"tsType": {
"name": "boolean"
}
},
"description": {
"description": "A description for the field. Provides a hint such as specific requirements for what to choose.",
"required": false,
"tsType": {
"name": "ReactNode",
"elements": [],
"raw": "ReactNode"
}
},
"errorMessage": {
"description": "An error message for the field.",
"required": false,
"tsType": {
"name": "union",
"raw": "ReactNode \\| (v: ValidationResult) => ReactNode",
"elements": [
{
"name": "ReactNode",
"elements": [],
"raw": "ReactNode"
},
{
"name": "signature",
"type": "function",
"raw": "(v: ValidationResult) => ReactNode",
"signature": {
"arguments": [
{
"name": "v",
"type": {
"name": "ValidationResult"
},
"rest": false
}
],
"return": {
"name": "ReactNode"
}
}
}
]
}
},
"hideTimeZone": {
"description": "Whether to hide the time zone abbreviation.",
"required": false,
"tsType": {
"name": "boolean"
}
},
"hourCycle": {
"description": "Whether to display the time in 12 or 24 hour format. By default, this is determined by the user's locale.",
"required": false,
"tsType": {
"name": "union",
"raw": "12 \\| 24",
"elements": [
{
"name": "literal",
"value": "12"
},
{
"name": "literal",
"value": "24"
}
]
}
},
"id": {
"description": "The element's unique identifier. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id).",
"required": false,
"tsType": {
"name": "string"
}
},
"isDisabled": {
"description": "Whether the input is disabled.",
"required": false,
"tsType": {
"name": "boolean"
}
},
"isInvalid": {
"description": "Whether the input value is invalid.",
"required": false,
"tsType": {
"name": "boolean"
}
},
"isOpen": {
"description": "Whether the overlay is open by default (controlled).",
"required": false,
"tsType": {
"name": "boolean"
}
},
"isReadOnly": {
"description": "Whether the input can be selected but not changed by the user.",
"required": false,
"tsType": {
"name": "boolean"
}
},
"isRequired": {
"description": "Whether user input is required on the input before form submission.",
"required": false,
"tsType": {
"name": "boolean"
}
},
"label": {
"description": "The content to display as the label.",
"required": false,
"tsType": {
"name": "ReactNode",
"elements": [],
"raw": "ReactNode"
}
},
"name": {
"description": "The name of the input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).",
"required": false,
"tsType": {
"name": "string"
}
},
"onBlur": {
"description": "Handler that is called when the element loses focus.",
"required": false,
"tsType": {
"name": "signature",
"type": "function",
"raw": "(e: FocusEvent<Element, Element>) => void",
"signature": {
"arguments": [
{
"name": "e",
"type": {
"name": "FocusEvent",
"elements": [],
"raw": "FocusEvent<Element, Element>"
},
"rest": false
}
],
"return": {
"name": "void"
}
}
}
},
"onFocus": {
"description": "Handler that is called when the element receives focus.",
"required": false,
"tsType": {
"name": "signature",
"type": "function",
"raw": "(e: FocusEvent<Element, Element>) => void",
"signature": {
"arguments": [
{
"name": "e",
"type": {
"name": "FocusEvent",
"elements": [],
"raw": "FocusEvent<Element, Element>"
},
"rest": false
}
],
"return": {
"name": "void"
}
}
}
},
"onFocusChange": {
"description": "Handler that is called when the element's focus status changes.",
"required": false,
"tsType": {
"name": "signature",
"type": "function",
"raw": "(isFocused: boolean) => void",
"signature": {
"arguments": [
{
"name": "isFocused",
"type": {
"name": "boolean"
},
"rest": false
}
],
"return": {
"name": "void"
}
}
}
},
"onKeyDown": {
"description": "Handler that is called when a key is pressed.",
"required": false,
"tsType": {
"name": "signature",
"type": "function",
"raw": "(e: KeyboardEvent) => void",
"signature": {
"arguments": [
{
"name": "e",
"type": {
"name": "KeyboardEvent",
"elements": [],
"raw": "KeyboardEvent"
},
"rest": false
}
],
"return": {
"name": "void"
}
}
}
},
"onKeyUp": {
"description": "Handler that is called when a key is released.",
"required": false,
"tsType": {
"name": "signature",
"type": "function",
"raw": "(e: KeyboardEvent) => void",
"signature": {
"arguments": [
{
"name": "e",
"type": {
"name": "KeyboardEvent",
"elements": [],
"raw": "KeyboardEvent"
},
"rest": false
}
],
"return": {
"name": "void"
}
}
}
},
"onOpenChange": {
"description": "Handler that is called when the overlay's open state changes.",
"required": false,
"tsType": {
"name": "signature",
"type": "function",
"raw": "(isOpen: boolean) => void",
"signature": {
"arguments": [
{
"name": "isOpen",
"type": {
"name": "boolean"
},
"rest": false
}
],
"return": {
"name": "void"
}
}
}
},
"pageBehavior": {
"description": "Controls the behavior of paging. Pagination either works by advancing the visible page by visibleDuration (default) or one unit of visibleDuration.",
"required": false,
"tsType": {
"name": "PageBehavior",
"elements": [],
"raw": "PageBehavior"
}
},
"placeholderValue": {
"description": "A placeholder date that influences the format of the placeholder shown when no value is selected. Defaults to today's date at midnight.",
"required": false,
"tsType": {
"name": "union",
"raw": "CalendarDate \\| CalendarDateTime",
"elements": [
{
"name": "CalendarDate",
"elements": [],
"raw": "CalendarDate"
},
{
"name": "CalendarDateTime",
"elements": [],
"raw": "CalendarDateTime"
}
]
}
},
"shouldForceLeadingZeros": {
"description": "Whether to always show leading zeros in the month, day, and hour fields.\nBy default, this is determined by the user's locale.",
"required": false,
"tsType": {
"name": "boolean"
}
},
"validate": {
"description": "A function that returns an error message if a given value is invalid.\nValidation errors are displayed to the user when the form is submitted\nif `validationBehavior=\"native\"`. For realtime validation, use the `isInvalid`\nprop instead.",
"required": false,
"tsType": {
"name": "signature",
"type": "function",
"raw": "(value: CalendarDate \\| CalendarDateTime) => undefined \\| null \\| true \\| ValidationError",
"signature": {
"arguments": [
{
"name": "value",
"type": {
"name": "union",
"raw": "CalendarDate \\| CalendarDateTime",
"elements": [
{
"name": "CalendarDate"
},
{
"name": "CalendarDateTime"
}
]
},
"rest": false
}
],
"return": {
"name": "union",
"raw": "undefined \\| null \\| true \\| ValidationError",
"elements": [
{
"name": "undefined"
},
{
"name": "null"
},
{
"name": "true"
},
{
"name": "ValidationError"
}
]
}
}
}
},
"validationBehavior": {
"description": "Whether to use native HTML form validation to prevent form submission\nwhen the value is missing or invalid, or mark the field as required\nor invalid via ARIA.",
"required": false,
"tsType": {
"name": "union",
"raw": "\"aria\" \\| \"native\"",
"elements": [
{
"name": "literal",
"value": "\"aria\""
},
{
"name": "literal",
"value": "\"native\""
}
]
}
}
}
}