Skip to content

Commit

Permalink
[pickers] Unify JSDoc for all the disabled and readOnly props (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle authored Nov 12, 2024
1 parent 60d0913 commit 5ee9eab
Show file tree
Hide file tree
Showing 127 changed files with 561 additions and 185 deletions.
2 changes: 2 additions & 0 deletions docs/pages/x/api/date-pickers/date-picker-toolbar.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"required": true
},
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"disabled": { "type": { "name": "bool" }, "default": "false" },
"hidden": { "type": { "name": "bool" }, "default": "`true` for Desktop, `false` for Mobile." },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"sx": {
"type": {
"name": "union",
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/x/api/date-pickers/date-range-picker-toolbar.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"required": true
},
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"disabled": { "type": { "name": "bool" }, "default": "false" },
"hidden": { "type": { "name": "bool" }, "default": "`true` for Desktop, `false` for Mobile." },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"sx": {
"type": {
"name": "union",
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/date-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
},
"open": { "type": { "name": "bool" }, "default": "false" },
"rangePosition": { "type": { "name": "enum", "description": "'end'<br>&#124;&nbsp;'start'" } },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/x/api/date-pickers/date-time-picker-toolbar.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"required": true
},
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"disabled": { "type": { "name": "bool" }, "default": "false" },
"hidden": { "type": { "name": "bool" }, "default": "`true` for Desktop, `false` for Mobile." },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"sx": {
"type": {
"name": "union",
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"required": true
},
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"disabled": { "type": { "name": "bool" }, "default": "false" },
"hidden": { "type": { "name": "bool" }, "default": "`true` for Desktop, `false` for Mobile." },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"sx": {
"type": {
"name": "union",
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/date-time-range-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
}
},
"rangePosition": { "type": { "name": "enum", "description": "'end'<br>&#124;&nbsp;'start'" } },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/desktop-date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
},
"open": { "type": { "name": "bool" }, "default": "false" },
"rangePosition": { "type": { "name": "enum", "description": "'end'<br>&#124;&nbsp;'start'" } },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
}
},
"rangePosition": { "type": { "name": "enum", "description": "'end'<br>&#124;&nbsp;'start'" } },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/desktop-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/mobile-date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
},
"open": { "type": { "name": "bool" }, "default": "false" },
"rangePosition": { "type": { "name": "enum", "description": "'end'<br>&#124;&nbsp;'start'" } },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/mobile-date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
}
},
"rangePosition": { "type": { "name": "enum", "description": "'end'<br>&#124;&nbsp;'start'" } },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/mobile-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/month-calendar.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"props": {
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"defaultValue": { "type": { "name": "object" } },
"disabled": { "type": { "name": "bool" } },
"disabled": { "type": { "name": "bool" }, "default": "false" },
"disableFuture": { "type": { "name": "bool" }, "default": "false" },
"disableHighlightToday": { "type": { "name": "bool" }, "default": "false" },
"disablePast": { "type": { "name": "bool" }, "default": "false" },
Expand All @@ -19,7 +19,7 @@
"describedArgs": ["value"]
}
},
"readOnly": { "type": { "name": "bool" } },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"referenceDate": {
"type": { "name": "object" },
"default": "The closest valid month using the validation props, except callbacks such as `shouldDisableMonth`."
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/x/api/date-pickers/pickers-layout.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"props": {
"isRtl": { "type": { "name": "bool" }, "required": true },
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"disabled": { "type": { "name": "bool" }, "default": "false" },
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"slotProps": { "type": { "name": "object" }, "default": "{}" },
"slots": {
"type": { "name": "object" },
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/static-date-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
}
},
"rangePosition": { "type": { "name": "enum", "description": "'end'<br>&#124;&nbsp;'start'" } },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/static-date-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/static-time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/x/api/date-pickers/time-picker-toolbar.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"required": true
},
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"disabled": { "type": { "name": "bool" }, "default": "false" },
"hidden": { "type": { "name": "bool" }, "default": "`true` for Desktop, `false` for Mobile." },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"sx": {
"type": {
"name": "union",
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/date-pickers/time-picker.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"orientation": {
"type": { "name": "enum", "description": "'landscape'<br>&#124;&nbsp;'portrait'" }
},
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"reduceAnimations": {
"type": { "name": "bool" },
"default": "`@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13"
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/x/api/date-pickers/year-calendar.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"props": {
"classes": { "type": { "name": "object" }, "additionalInfo": { "cssApi": true } },
"defaultValue": { "type": { "name": "object" } },
"disabled": { "type": { "name": "bool" } },
"disabled": { "type": { "name": "bool" }, "default": "false" },
"disableFuture": { "type": { "name": "bool" }, "default": "false" },
"disableHighlightToday": { "type": { "name": "bool" }, "default": "false" },
"disablePast": { "type": { "name": "bool" }, "default": "false" },
Expand All @@ -15,7 +15,7 @@
"describedArgs": ["value"]
}
},
"readOnly": { "type": { "name": "bool" } },
"readOnly": { "type": { "name": "bool" }, "default": "false" },
"referenceDate": {
"type": { "name": "object" },
"default": "The closest valid year using the validation props, except callbacks such as `shouldDisableYear`."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"defaultValue": {
"description": "The default selected value. Used when the component is not controlled."
},
"disabled": { "description": "If <code>true</code>, the picker and text field are disabled." },
"disabled": {
"description": "If <code>true</code>, the component is disabled. When disabled, the value cannot be changed and no interaction is possible."
},
"disableFuture": {
"description": "If <code>true</code>, disable values after the current date for date components, time for time components and both for date time components."
},
Expand Down Expand Up @@ -68,7 +70,9 @@
"openTo": {
"description": "The default visible view. Used when the component view is not controlled. Must be a valid option from <code>views</code> list."
},
"readOnly": { "description": "Make picker read only." },
"readOnly": {
"description": "If <code>true</code>, the component is read-only. When read-only, the value cannot be changed but the user can interact with the interface."
},
"reduceAnimations": { "description": "If <code>true</code>, disable heavy animations." },
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"defaultValue": {
"description": "The default value. Use when the component is not controlled."
},
"disabled": { "description": "If <code>true</code>, the component is disabled." },
"disabled": {
"description": "If <code>true</code>, the component is disabled. When disabled, the value cannot be changed and no interaction is possible."
},
"disableFuture": {
"description": "If <code>true</code>, disable values after the current date for date components, time for time components and both for date time components."
},
Expand Down Expand Up @@ -77,7 +79,7 @@
"typeDescriptions": { "newValue": "The new selected sections." }
},
"readOnly": {
"description": "It prevents the user from changing the value of the field (not from interacting with the field)."
"description": "If <code>true</code>, the component is read-only. When read-only, the value cannot be changed but the user can interact with the interface."
},
"referenceDate": {
"description": "The date used to generate a part of the new value that is not present in the format when both <code>value</code> and <code>defaultValue</code> are empty. For example, on time fields it will be used to determine the date to set."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@
"componentDescription": "",
"propDescriptions": {
"classes": { "description": "Override or extend the styles applied to the component." },
"disabled": {
"description": "If <code>true</code>, the component is disabled. When disabled, the value cannot be changed and no interaction is possible."
},
"hidden": { "description": "If <code>true</code>, show the toolbar even in desktop mode." },
"onViewChange": {
"description": "Callback called when a toolbar is clicked",
"typeDescriptions": { "view": "The view to open" }
},
"readOnly": {
"description": "If <code>true</code>, the component is read-only. When read-only, the value cannot be changed but the user can interact with the interface."
},
"sx": {
"description": "The system prop that allows defining system overrides as well as additional CSS styles."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"desktopModeMediaQuery": {
"description": "CSS media query when <code>Mobile</code> mode will be changed to <code>Desktop</code>."
},
"disabled": { "description": "If <code>true</code>, the picker and text field are disabled." },
"disabled": {
"description": "If <code>true</code>, the component is disabled. When disabled, the value cannot be changed and no interaction is possible."
},
"disableFuture": {
"description": "If <code>true</code>, disable values after the current date for date components, time for time components and both for date time components."
},
Expand Down Expand Up @@ -107,6 +109,9 @@
"description": "The default visible view. Used when the component view is not controlled. Must be a valid option from <code>views</code> list."
},
"orientation": { "description": "Force rendering in particular orientation." },
"readOnly": {
"description": "If <code>true</code>, the component is read-only. When read-only, the value cannot be changed but the user can interact with the interface."
},
"reduceAnimations": { "description": "If <code>true</code>, disable heavy animations." },
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"disableAutoMonthSwitching": {
"description": "If <code>true</code>, after selecting <code>start</code> date calendar will not automatically switch to the month of <code>end</code> date."
},
"disabled": { "description": "If <code>true</code>, the picker and text field are disabled." },
"disabled": {
"description": "If <code>true</code>, the component is disabled. When disabled, the value cannot be changed and no interaction is possible."
},
"disableDragEditing": {
"description": "If <code>true</code>, editing dates by dragging is disabled."
},
Expand Down Expand Up @@ -84,7 +86,9 @@
"rangePosition": {
"description": "The position in the currently edited date range. Used when the component position is controlled."
},
"readOnly": { "description": "Make picker read only." },
"readOnly": {
"description": "If <code>true</code>, the component is read-only. When read-only, the value cannot be changed but the user can interact with the interface."
},
"reduceAnimations": { "description": "If <code>true</code>, disable heavy animations." },
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@
"componentDescription": "",
"propDescriptions": {
"classes": { "description": "Override or extend the styles applied to the component." },
"disabled": {
"description": "If <code>true</code>, the component is disabled. When disabled, the value cannot be changed and no interaction is possible."
},
"hidden": { "description": "If <code>true</code>, show the toolbar even in desktop mode." },
"onViewChange": {
"description": "Callback called when a toolbar is clicked",
"typeDescriptions": { "view": "The view to open" }
},
"readOnly": {
"description": "If <code>true</code>, the component is read-only. When read-only, the value cannot be changed but the user can interact with the interface."
},
"sx": {
"description": "The system prop that allows defining system overrides as well as additional CSS styles."
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
"disableAutoMonthSwitching": {
"description": "If <code>true</code>, after selecting <code>start</code> date calendar will not automatically switch to the month of <code>end</code> date."
},
"disabled": { "description": "If <code>true</code>, the picker and text field are disabled." },
"disabled": {
"description": "If <code>true</code>, the component is disabled. When disabled, the value cannot be changed and no interaction is possible."
},
"disableDragEditing": {
"description": "If <code>true</code>, editing dates by dragging is disabled."
},
Expand Down Expand Up @@ -116,6 +118,9 @@
"rangePosition": {
"description": "The position in the currently edited date range. Used when the component position is controlled."
},
"readOnly": {
"description": "If <code>true</code>, the component is read-only. When read-only, the value cannot be changed but the user can interact with the interface."
},
"reduceAnimations": { "description": "If <code>true</code>, disable heavy animations." },
"referenceDate": {
"description": "The date used to generate the new value when both <code>value</code> and <code>defaultValue</code> are empty."
Expand Down
Loading

0 comments on commit 5ee9eab

Please sign in to comment.