@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
29 lines (25 loc) • 3.81 kB
JavaScript
/**
* Configuration for the ordering of props, data attributes, CSS variables,
* component exports, namespace parts, and type suffixes in generated documentation.
*
* Each array defines the order in which items should appear. Items not in the array
* are placed at the position of the `__EVERYTHING_ELSE__` marker, sorted alphabetically.
*/
export const cssVariables = [];
export const dataAttributes = ['data-checked', 'data-unchecked', 'data-open', 'data-closed', 'data-panel-open', 'data-popup-open', 'data-popup-side', 'data-list-empty', 'data-pressed', 'data-selected', 'data-highlighted', 'data-dragging', 'data-orientation', 'data-disabled', 'data-readonly', 'data-required', 'data-valid', 'data-invalid', 'data-dirty', 'data-touched', 'data-uncentered', 'data-anchor-hidden', '__EVERYTHING_ELSE__', 'data-starting-style', 'data-ending-style'];
export const props = ['aria-label', 'aria-labelledby', 'name', 'label', 'defaultChecked', 'checked', 'onCheckedChange', 'indeterminate', 'defaultValue', 'value', 'onValueChange', 'onValueCommitted', 'allValues', 'defaultInputValue', 'inputValue', 'onInputValueChange', 'defaultOpen', 'open', 'onOpenChange', 'collapseToEmpty', 'showCollapsedFocus', 'initialExpanded', 'initialCollapsed', 'defaultPressed', 'pressed', 'onPressedChange', 'onPressedCommitted', 'snapPoints', 'defaultSnapPoint', 'snapPoint', 'onSnapPointChange', 'onClick', 'closeOnClick', 'errors', 'hidden', 'hiddenUntilFound', 'autoHighlight', 'keepHighlight', 'highlightItemOnHover', '__EVERYTHING_ELSE__', 'step', 'smallStep', 'largeStep', 'minStepsBetweenValues', 'min', 'max', 'allowWheelScrub', 'format', 'autoFocus', 'container', 'align', 'alignOffset', 'side', 'sideOffset', 'arrowPadding', 'anchor', 'collisionAvoidance', 'collisionBoundary', 'collisionPadding', 'sticky', 'positionMethod', 'trackAnchor', 'trackCursorAxis', 'initialFocus', 'finalFocus', 'match', 'forceShow', 'disabled', 'readOnly', 'required', 'valid', 'invalid', 'openOnHover', 'delay', 'closeDelay', 'timeout', 'disableHoverablePopup', 'loop', 'orientation', 'inputRef', 'validate', 'validationMode', 'validationDebounceTime', 'id', 'children', 'className', 'style', 'keepMounted', 'render'];
// Namespace member parts order (for sorting ComponentName.Part members)
// These define the order of parts within a component's namespace
export const namespaceParts = ['Root', 'Provider', 'Trigger', 'Value', 'Input', 'Icon', 'Clear', 'List', 'Portal', 'Backdrop', 'Positioner', 'Popup', 'Arrow', 'Item', 'Header', 'Panel', 'Content', 'Title', 'Description', 'Close', 'Action', 'Viewport', 'Image', 'Fallback', 'Indicator', 'Group', 'GroupLabel', 'Separator', 'Track', 'Thumb', 'Control', 'Label', 'Legend', 'Error', 'Validity', 'ScrubArea', 'ScrubAreaCursor', 'Decrement', 'Increment', 'Tab', 'Button', 'Link', 'Scrollbar', 'Corner', 'Status', 'Empty', 'Collection', 'Row', 'Chips', 'Chip', 'ChipRemove', 'ItemText', 'ItemIndicator', 'ScrollUpArrow', 'ScrollDownArrow', 'SubmenuRoot', 'SubmenuTrigger', 'RadioGroup', 'RadioItem', 'RadioItemIndicator', 'CheckboxItem', 'CheckboxItemIndicator', '__EVERYTHING_ELSE__' // Placeholder for all other parts
];
// Type suffixes (common namespace members like Props, State, etc.)
export const typeSuffixes = ['Props', 'State', 'Actions', 'ChangeEventReason', 'ChangeEventDetails', 'CommitEventReason', 'CommitEventDetails', 'HighlightEventReason', 'HighlightEventDetails', 'DataAttributes', 'CssVars', 'ToastObject', 'Orientation', 'Status', 'Value', 'ItemMetadata', 'ActivationDirection', 'ConditionalProps', '__EVERYTHING_ELSE__' // Placeholder for all other type suffixes
];
/** Default ordering configuration using the arrays defined in this file. */
export const defaultOrdering = {
cssVariables,
dataAttributes,
props,
namespaceParts,
typeSuffixes
};