Skip to content

Commit

Permalink
Docs gen
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiks committed Apr 15, 2024
1 parent 181b21d commit a96ce97
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 89 deletions.
8 changes: 8 additions & 0 deletions docs/pages/base-ui/api/number-field-root.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
{
"props": {
"allowWheelScrub": { "type": { "name": "bool" }, "default": "false" },
"autoFocus": { "type": { "name": "bool" }, "default": "false" },
"className": { "type": { "name": "union", "description": "func<br>&#124;&nbsp;string" } },
"defaultValue": { "type": { "name": "number" } },
"disabled": { "type": { "name": "bool" }, "default": "false" },
"format": {
"type": {
"name": "shape",
"description": "{ compactDisplay?: 'long'<br>&#124;&nbsp;'short', currency?: string, currencyDisplay?: string, currencySign?: string, localeMatcher?: string, maximumFractionDigits?: number, maximumSignificantDigits?: number, minimumFractionDigits?: number, minimumIntegerDigits?: number, minimumSignificantDigits?: number, notation?: 'compact'<br>&#124;&nbsp;'engineering'<br>&#124;&nbsp;'scientific'<br>&#124;&nbsp;'standard', signDisplay?: 'always'<br>&#124;&nbsp;'auto'<br>&#124;&nbsp;'exceptZero'<br>&#124;&nbsp;'never', style?: string, unit?: string, unitDisplay?: 'long'<br>&#124;&nbsp;'narrow'<br>&#124;&nbsp;'short', useGrouping?: bool }"
}
},
"id": { "type": { "name": "string" } },
"invalid": { "type": { "name": "bool" }, "default": "false" },
"largeStep": { "type": { "name": "number" }, "default": "10" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
"allowWheelScrub": {
"description": "Whether to allow the user to scrub the input value with the mouse wheel while focused and hovering over the input."
},
"autoFocus": { "description": "If <code>true</code>, the input element is focused on mount." },
"className": {
"description": "Class names applied to the element or a function that returns them based on the component&#39;s state."
},
"defaultValue": {
"description": "The default value of the input element. Use when the component is not controlled."
},
"disabled": { "description": "If <code>true</code>, the input element is disabled." },
"format": { "description": "Options to format the input value." },
"id": { "description": "The id of the input element." },
"invalid": { "description": "If <code>true</code>, the input element is invalid." },
"largeStep": {
Expand Down
89 changes: 0 additions & 89 deletions docs/translations/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,95 +224,6 @@
"/base-ui/react-checkbox": "Checkbox",
"/base-ui/react-number-field": "Number Field",
"/base-ui/react-switch": "Switch",
"/base-ui/react-toggle-button-group": "Toggle Button Group",
"data-display": "Data display",
"/base-ui/react-badge": "Badge",
"/base-ui/react-tooltip": "Tooltip",
"feedback": "Feedback",
"/base-ui/react-snackbar": "Snackbar",
"surfaces": "Surfaces",
"/base-ui/react-accordion": "Accordion",
"navigation": "Navigation",
"/base-ui/react-drawer": "Drawer",
"/base-ui/react-menu": "Menu",
"/base-ui/react-pagination": "Pagination",
"/base-ui/react-table-pagination": "Table Pagination",
"/base-ui/react-tabs": "Tabs",
"utils": "Utils",
"/base-ui/react-click-away-listener": "Click-Away Listener",
"/base-ui/react-focus-trap": "Focus Trap",
"/base-ui/react-form-control": "Form Control",
"/base-ui/react-modal": "Modal",
"/base-ui/react-no-ssr": "No-SSR",
"/base-ui/react-popper": "Popper",
"/base-ui/react-popup": "Popup",
"/base-ui/react-portal": "Portal",
"/base-ui/react-textarea-autosize": "Textarea Autosize",
"/base-ui/react-transitions": "Transitions",
"/base-ui/react-badge/components-api/#badge": "Badge",
"/base-ui/react-button/components-api/#button": "Button",
"/base-ui/react-checkbox/components-api/#checkbox-indicator": "CheckboxIndicator",
"/base-ui/react-checkbox/components-api/#checkbox-root": "CheckboxRoot",
"/base-ui/react-click-away-listener/components-api/#click-away-listener": "ClickAwayListener",
"/base-ui/react-transitions/components-api/#css-animation": "CssAnimation",
"/base-ui/react-transitions/components-api/#css-transition": "CssTransition",
"/base-ui/react-menu/components-api/#dropdown": "Dropdown",
"/base-ui/react-focus-trap/components-api/#focus-trap": "FocusTrap",
"/base-ui/react-form-control/components-api/#form-control": "FormControl",
"/base-ui/react-input/components-api/#input": "Input",
"/base-ui/react-menu/components-api/#menu": "Menu",
"/base-ui/react-menu/components-api/#menu-button": "MenuButton",
"/base-ui/react-menu/components-api/#menu-item": "MenuItem",
"/base-ui/react-modal/components-api/#modal": "Modal",
"/base-ui/react-no-ssr/components-api/#no-ssr": "NoSsr",
"/base-ui/react-number-field/components-api/#number-field-decrement": "NumberFieldDecrement",
"/base-ui/react-number-field/components-api/#number-field-group": "NumberFieldGroup",
"/base-ui/react-number-field/components-api/#number-field-increment": "NumberFieldIncrement",
"/base-ui/react-number-field/components-api/#number-field-input": "NumberFieldInput",
"/base-ui/react-number-field/components-api/#number-field-root": "NumberFieldRoot",
"/base-ui/react-number-field/components-api/#number-field-scrub-area": "NumberFieldScrubArea",
"/base-ui/react-number-field/components-api/#number-field-scrub-area-cursor": "NumberFieldScrubAreaCursor",
"/base-ui/react-select/components-api/#option": "Option",
"/base-ui/react-select/components-api/#option-group": "OptionGroup",
"/base-ui/react-popper/components-api/#popper": "Popper",
"/base-ui/react-popup/components-api/#popup": "Popup",
"/base-ui/react-portal/components-api/#portal": "Portal",
"/base-ui/react-select/components-api/#select": "Select",
"/base-ui/react-slider/components-api/#slider": "Slider",
"/base-ui/react-snackbar/components-api/#snackbar": "Snackbar",
"/base-ui/react-switch/components-api/#switch-root": "SwitchRoot",
"/base-ui/react-switch/components-api/#switch-thumb": "SwitchThumb",
"/base-ui/react-tabs/components-api/#tab": "Tab",
"/base-ui/react-tabs/components-api/#tab-panel": "TabPanel",
"/base-ui/react-table-pagination/components-api/#table-pagination": "TablePagination",
"/base-ui/react-tabs/components-api/#tabs": "Tabs",
"/base-ui/react-tabs/components-api/#tabs-list": "TabsList",
"/base-ui/react-textarea-autosize/components-api/#textarea-autosize": "TextareaAutosize",
"/base-ui/react-autocomplete/hooks-api/#use-autocomplete": "useAutocomplete",
"/base-ui/react-badge/hooks-api/#use-badge": "useBadge",
"/base-ui/react-button/hooks-api/#use-button": "useButton",
"/base-ui/react-checkbox/hooks-api/#use-checkbox": "useCheckbox",
"/base-ui/react-menu/hooks-api/#use-dropdown": "useDropdown",
"/base-ui/react-form-control/hooks-api/#use-form-control-context": "useFormControlContext",
"/base-ui/react-input/hooks-api/#use-input": "useInput",
"/base-ui/react-menu/hooks-api/#use-menu": "useMenu",
"/base-ui/react-menu/hooks-api/#use-menu-button": "useMenuButton",
"/base-ui/react-menu/hooks-api/#use-menu-item": "useMenuItem",
"/base-ui/react-menu/hooks-api/#use-menu-item-context-stabilizer": "useMenuItemContextStabilizer",
"/base-ui/react-modal/hooks-api/#use-modal": "useModal",
"/base-ui/react-number-field/hooks-api/#use-number-field": "useNumberField",
"/base-ui/react-select/hooks-api/#use-option": "useOption",
"/base-ui/react-select/hooks-api/#use-option-context-stabilizer": "useOptionContextStabilizer",
"/base-ui/react-select/hooks-api/#use-select": "useSelect",
"/base-ui/react-slider/hooks-api/#use-slider": "useSlider",
"/base-ui/react-snackbar/hooks-api/#use-snackbar": "useSnackbar",
"/base-ui/react-switch/hooks-api/#use-switch": "useSwitch",
"/base-ui/react-tabs/hooks-api/#use-tab": "useTab",
"/base-ui/react-tabs/hooks-api/#use-tab-panel": "useTabPanel",
"/base-ui/react-tabs/hooks-api/#use-tabs": "useTabs",
"/base-ui/react-tabs/hooks-api/#use-tabs-list": "useTabsList",
"/base-ui/react-transitions/hooks-api/#use-transition-state-manager": "useTransitionStateManager",
"/base-ui/react-transitions/hooks-api/#use-transition-trigger": "useTransitionTrigger",
"/base-ui/guides": "How-to guides",
"/base-ui/guides/working-with-tailwind-css": "Working with Tailwind CSS",
"/base-ui/guides/overriding-component-structure": "Overriding component structure",
Expand Down
30 changes: 30 additions & 0 deletions packages/mui-base/src/NumberField/NumberFieldRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ NumberFieldRoot.propTypes /* remove-proptypes */ = {
* @default false
*/
allowWheelScrub: PropTypes.bool,
/**
* If `true`, the input element is focused on mount.
* @default false
*/
autoFocus: PropTypes.bool,
/**
* @ignore
*/
Expand All @@ -115,11 +120,36 @@ NumberFieldRoot.propTypes /* remove-proptypes */ = {
* Class names applied to the element or a function that returns them based on the component's state.
*/
className: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
/**
* The default value of the input element. Use when the component is not controlled.
*/
defaultValue: PropTypes.number,
/**
* If `true`, the input element is disabled.
* @default false
*/
disabled: PropTypes.bool,
/**
* Options to format the input value.
*/
format: PropTypes.shape({
compactDisplay: PropTypes.oneOf(['long', 'short']),
currency: PropTypes.string,
currencyDisplay: PropTypes.string,
currencySign: PropTypes.string,
localeMatcher: PropTypes.string,
maximumFractionDigits: PropTypes.number,
maximumSignificantDigits: PropTypes.number,
minimumFractionDigits: PropTypes.number,
minimumIntegerDigits: PropTypes.number,
minimumSignificantDigits: PropTypes.number,
notation: PropTypes.oneOf(['compact', 'engineering', 'scientific', 'standard']),
signDisplay: PropTypes.oneOf(['always', 'auto', 'exceptZero', 'never']),
style: PropTypes.string,
unit: PropTypes.string,
unitDisplay: PropTypes.oneOf(['long', 'narrow', 'short']),
useGrouping: PropTypes.bool,
}),
/**
* The id of the input element.
*/
Expand Down

0 comments on commit a96ce97

Please sign in to comment.