index
int64
0
0
repo_id
stringlengths
16
181
file_path
stringlengths
28
270
content
stringlengths
1
11.6M
__index_level_0__
int64
0
10k
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/toolbar/toolbar.json
{ "componentDescription": "", "propDescriptions": { "children": { "description": "The Toolbar children, usually a mixture of <code>IconButton</code>, <code>Button</code> and <code>Typography</code>. The Toolbar is a flex container, allowing flex item properties to be used to lay out the children." }, "classes": { "description": "Override or extend the styles applied to the component." }, "component": { "description": "The component used for the root node. Either a string to use a HTML element or a component." }, "disableGutters": { "description": "If <code>true</code>, disables gutter padding." }, "sx": { "description": "The system prop that allows defining system overrides as well as additional CSS styles." }, "variant": { "description": "The variant to use." } }, "classDescriptions": { "root": { "description": "Styles applied to the root element." }, "gutters": { "description": "Styles applied to {{nodeName}} unless {{conditions}}.", "nodeName": "the root element", "conditions": "<code>disableGutters={true}</code>" }, "regular": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"regular\"</code>" }, "dense": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"dense\"</code>" } } }
5,700
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/tooltip/tooltip.json
{ "componentDescription": "", "propDescriptions": { "arrow": { "description": "If <code>true</code>, adds an arrow to the tooltip." }, "children": { "description": "Tooltip reference element.", "requiresRef": true }, "classes": { "description": "Override or extend the styles applied to the component." }, "components": { "description": "The components used for each slot inside.<br>This prop is an alias for the <code>slots</code> prop. It&#39;s recommended to use the <code>slots</code> prop instead." }, "componentsProps": { "description": "The extra props for the slot components. You can override the existing props or add new ones.<br>This prop is an alias for the <code>slotProps</code> prop. It&#39;s recommended to use the <code>slotProps</code> prop instead, as <code>componentsProps</code> will be deprecated in the future." }, "describeChild": { "description": "Set to <code>true</code> if the <code>title</code> acts as an accessible description. By default the <code>title</code> acts as an accessible label for the child." }, "disableFocusListener": { "description": "Do not respond to focus-visible events." }, "disableHoverListener": { "description": "Do not respond to hover events." }, "disableInteractive": { "description": "Makes a tooltip not interactive, i.e. it will close when the user hovers over the tooltip before the <code>leaveDelay</code> is expired." }, "disableTouchListener": { "description": "Do not respond to long press touch events." }, "enterDelay": { "description": "The number of milliseconds to wait before showing the tooltip. This prop won&#39;t impact the enter touch delay (<code>enterTouchDelay</code>)." }, "enterNextDelay": { "description": "The number of milliseconds to wait before showing the tooltip when one was already recently opened." }, "enterTouchDelay": { "description": "The number of milliseconds a user must touch the element before showing the tooltip." }, "followCursor": { "description": "If <code>true</code>, the tooltip follow the cursor over the wrapped element." }, "id": { "description": "This prop is used to help implement the accessibility logic. If you don&#39;t provide this prop. It falls back to a randomly generated id." }, "leaveDelay": { "description": "The number of milliseconds to wait before hiding the tooltip. This prop won&#39;t impact the leave touch delay (<code>leaveTouchDelay</code>)." }, "leaveTouchDelay": { "description": "The number of milliseconds after the user stops touching an element before hiding the tooltip." }, "onClose": { "description": "Callback fired when the component requests to be closed.", "typeDescriptions": { "event": "The event source of the callback." } }, "onOpen": { "description": "Callback fired when the component requests to be open.", "typeDescriptions": { "event": "The event source of the callback." } }, "open": { "description": "If <code>true</code>, the component is shown." }, "placement": { "description": "Tooltip placement." }, "PopperComponent": { "description": "The component used for the popper." }, "PopperProps": { "description": "Props applied to the <a href=\"/material-ui/api/popper/\"><code>Popper</code></a> element." }, "slotProps": { "description": "The extra props for the slot components. You can override the existing props or add new ones.<br>This prop is an alias for the <code>componentsProps</code> prop, which will be deprecated in the future." }, "slots": { "description": "The components used for each slot inside.<br>This prop is an alias for the <code>components</code> prop, which will be deprecated in the future." }, "sx": { "description": "The system prop that allows defining system overrides as well as additional CSS styles." }, "title": { "description": "Tooltip title. Zero-length titles string, undefined, null and false are never displayed." }, "TransitionComponent": { "description": "The component used for the transition. <a href=\"/material-ui/transitions/#transitioncomponent-prop\">Follow this guide</a> to learn more about the requirements for this component." }, "TransitionProps": { "description": "Props applied to the transition element. By default, the element is based on this <a href=\"http://reactcommunity.org/react-transition-group/transition/\"><code>Transition</code></a> component." } }, "classDescriptions": { "popper": { "description": "Styles applied to {{nodeName}}.", "nodeName": "the Popper component" }, "popperInteractive": { "description": "Styles applied to {{nodeName}} unless {{conditions}}.", "nodeName": "the Popper component", "conditions": "<code>disableInteractive={true}</code>" }, "popperArrow": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the Popper component", "conditions": "<code>arrow={true}</code>" }, "popperClose": { "description": "Styles applied to {{nodeName}} unless {{conditions}}.", "nodeName": "the Popper component", "conditions": "the tooltip is open" }, "tooltip": { "description": "Styles applied to {{nodeName}}.", "nodeName": "the tooltip (label wrapper) element" }, "tooltipArrow": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the tooltip (label wrapper) element", "conditions": "<code>arrow={true}</code>" }, "arrow": { "description": "Styles applied to {{nodeName}}.", "nodeName": "the arrow element" }, "touch": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the tooltip (label wrapper) element", "conditions": "the tooltip is opened by touch" }, "tooltipPlacementLeft": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the tooltip (label wrapper) element", "conditions": "<code>placement</code> contains &quot;left&quot;" }, "tooltipPlacementRight": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the tooltip (label wrapper) element", "conditions": "<code>placement</code> contains &quot;right&quot;" }, "tooltipPlacementTop": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the tooltip (label wrapper) element", "conditions": "<code>placement</code> contains &quot;top&quot;" }, "tooltipPlacementBottom": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the tooltip (label wrapper) element", "conditions": "<code>placement</code> contains &quot;bottom&quot;" } } }
5,701
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/typography/typography.json
{ "componentDescription": "", "propDescriptions": { "align": { "description": "Set the text-align on the component." }, "children": { "description": "The content of the component." }, "classes": { "description": "Override or extend the styles applied to the component." }, "component": { "description": "The component used for the root node. Either a string to use a HTML element or a component." }, "gutterBottom": { "description": "If <code>true</code>, the text will have a bottom margin." }, "noWrap": { "description": "If <code>true</code>, the text will not wrap, but instead will truncate with a text overflow ellipsis.<br>Note that text overflow can only happen with block or inline-block level elements (the element needs to have a width in order to overflow)." }, "paragraph": { "description": "If <code>true</code>, the element will be a paragraph element." }, "sx": { "description": "The system prop that allows defining system overrides as well as additional CSS styles." }, "variant": { "description": "Applies the theme typography styles." }, "variantMapping": { "description": "The component maps the variant prop to a range of different HTML element types. For instance, subtitle1 to <code>&lt;h6&gt;</code>. If you wish to change that mapping, you can provide your own. Alternatively, you can use the <code>component</code> prop." } }, "classDescriptions": { "root": { "description": "Styles applied to the root element." }, "body2": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"body2\"</code>" }, "body1": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"body1\"</code>" }, "caption": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"caption\"</code>" }, "button": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"button\"</code>" }, "h1": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"h1\"</code>" }, "h2": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"h2\"</code>" }, "h3": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"h3\"</code>" }, "h4": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"h4\"</code>" }, "h5": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"h5\"</code>" }, "h6": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"h6\"</code>" }, "subtitle1": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"subtitle1\"</code>" }, "subtitle2": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"subtitle2\"</code>" }, "overline": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"overline\"</code>" }, "inherit": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>variant=\"inherit\"</code>" }, "alignLeft": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>align=\"left\"</code>" }, "alignCenter": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>align=\"center\"</code>" }, "alignRight": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>align=\"right\"</code>" }, "alignJustify": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>align=\"justify\"</code>" }, "noWrap": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>nowrap={true}</code>" }, "gutterBottom": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>gutterBottom={true}</code>" }, "paragraph": { "description": "Styles applied to {{nodeName}} if {{conditions}}.", "nodeName": "the root element", "conditions": "<code>paragraph={true}</code>" } } }
5,702
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-autocomplete/use-autocomplete.json
{ "hookDescription": "", "parametersDescriptions": { "autoComplete": { "description": "If <code>true</code>, the portion of the selected suggestion that has not been typed by the user, known as the completion string, appears inline after the input cursor in the textbox. The inline completion string is visually highlighted and has a selected state." }, "autoHighlight": { "description": "If <code>true</code>, the first option is automatically highlighted." }, "autoSelect": { "description": "If <code>true</code>, the selected option becomes the value of the input when the Autocomplete loses focus unless the user chooses a different option or changes the character string in the input.<br>When using <code>freeSolo</code> mode, the typed value will be the input value if the Autocomplete loses focus without highlighting an option." }, "blurOnSelect": { "description": "<p>Control if the input should be blurred when an option is selected:</p>\n<ul>\n<li><code>false</code> the input is not blurred.</li>\n<li><code>true</code> the input is always blurred.</li>\n<li><code>touch</code> the input is blurred after a touch event.</li>\n<li><code>mouse</code> the input is blurred after a mouse event.</li>\n</ul>\n" }, "clearOnBlur": { "description": "If <code>true</code>, the input&#39;s text is cleared on blur if no value is selected.<br>Set to <code>true</code> if you want to help the user enter a new value. Set to <code>false</code> if you want to help the user resume their search." }, "clearOnEscape": { "description": "If <code>true</code>, clear all values when the user presses escape and the popup is closed." }, "componentName": { "description": "The component name that is using this hook. Used for warnings." }, "defaultValue": { "description": "The default value. Use when the component is not controlled." }, "disableClearable": { "description": "If <code>true</code>, the input can&#39;t be cleared." }, "disableCloseOnSelect": { "description": "If <code>true</code>, the popup won&#39;t close when a value is selected." }, "disabled": { "description": "If <code>true</code>, the component is disabled." }, "disabledItemsFocusable": { "description": "If <code>true</code>, will allow focus on disabled items." }, "disableListWrap": { "description": "If <code>true</code>, the list box in the popup will not wrap focus." }, "filterOptions": { "description": "A function that determines the filtered options to be rendered on search." }, "filterSelectedOptions": { "description": "If <code>true</code>, hide the selected options from the list box." }, "freeSolo": { "description": "If <code>true</code>, the Autocomplete is free solo, meaning that the user input is not bound to provided options." }, "getOptionDisabled": { "description": "Used to determine the disabled state for a given option." }, "getOptionLabel": { "description": "Used to determine the string value for a given option. It&#39;s used to fill the input (and the list box options if <code>renderOption</code> is not provided).<br>If used in free solo mode, it must accept both the type of the options and a string." }, "groupBy": { "description": "If provided, the options will be grouped under the returned string. The groupBy value is also used as the text for group headings when <code>renderGroup</code> is not provided." }, "handleHomeEndKeys": { "description": "If <code>true</code>, the component handles the &quot;Home&quot; and &quot;End&quot; keys when the popup is open. It should move focus to the first option and last option, respectively." }, "id": { "description": "This prop is used to help implement the accessibility logic. If you don&#39;t provide an id it will fall back to a randomly generated one." }, "includeInputInList": { "description": "If <code>true</code>, the highlight can move to the input." }, "inputValue": { "description": "The input value." }, "isOptionEqualToValue": { "description": "Used to determine if the option represents the given value. Uses strict equality by default. โš ๏ธ Both arguments need to be handled, an option can only match with one value." }, "multiple": { "description": "If <code>true</code>, <code>value</code> must be an array and the menu will support multiple selections." }, "onChange": { "description": "Callback fired when the value changes." }, "onClose": { "description": "Callback fired when the popup requests to be closed. Use in controlled mode (see open)." }, "onHighlightChange": { "description": "Callback fired when the highlight option changes." }, "onInputChange": { "description": "Callback fired when the input value changes." }, "onOpen": { "description": "Callback fired when the popup requests to be opened. Use in controlled mode (see open)." }, "open": { "description": "If <code>true</code>, the component is shown." }, "openOnFocus": { "description": "If <code>true</code>, the popup will open on input focus." }, "options": { "description": "Array of options." }, "readOnly": { "description": "If <code>true</code>, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted." }, "selectOnFocus": { "description": "If <code>true</code>, the input&#39;s text is selected on focus. It helps the user clear the selected value." }, "value": { "description": "The value of the autocomplete.<br>The value must have reference equality with the option in order to be selected. You can customize the equality behavior with the <code>isOptionEqualToValue</code> prop." } }, "returnValueDescriptions": { "anchorEl": { "description": "An HTML element that is used to set the position of the component." }, "dirty": { "description": "If <code>true</code>, the component input has some values." }, "expanded": { "description": "If <code>true</code>, the listbox is being displayed." }, "focused": { "description": "If <code>true</code>, the component is focused." }, "focusedTag": { "description": "Index of the focused tag for the component." }, "getClearProps": { "description": "Resolver for the <code>clear</code> button element&#39;s props." }, "getInputLabelProps": { "description": "Resolver for the input label element&#39;s props." }, "getInputProps": { "description": "Resolver for the input element&#39;s props." }, "getListboxProps": { "description": "Resolver for the listbox component&#39;s props." }, "getOptionProps": { "description": "Resolver for the rendered option element&#39;s props." }, "getPopupIndicatorProps": { "description": "Resolver for the popup icon&#39;s props." }, "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "getTagProps": { "description": "A tag props getter." }, "groupedOptions": { "description": "The options to render. It&#39;s either <code>Value[]</code> or <code>AutocompleteGroupedOption&lt;Value&gt;[]</code> if the groupBy prop is provided." }, "id": { "description": "Id for the Autocomplete." }, "inputValue": { "description": "The input value." }, "popupOpen": { "description": "If <code>true</code>, the popup is open on the component." }, "setAnchorEl": { "description": "Setter for the component <code>anchorEl</code>." }, "value": { "description": "The value of the autocomplete." } } }
5,703
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-badge/use-badge.json
{ "hookDescription": "", "parametersDescriptions": { "badgeContent": { "description": "The content rendered within the badge." }, "invisible": { "description": "If <code>true</code>, the badge is invisible." }, "max": { "description": "Max count to show." }, "showZero": { "description": "Controls whether the badge is hidden when <code>badgeContent</code> is zero." } }, "returnValueDescriptions": { "badgeContent": { "description": "Defines the content that&#39;s displayed inside the badge." }, "displayValue": { "description": "Value to be displayed in the badge. If <code>badgeContent</code> is greater than <code>max</code>, it will return <code>max+</code>." }, "invisible": { "description": "If <code>true</code>, the component will not be visible." }, "max": { "description": "Maximum number to be displayed in the badge." } } }
5,704
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-button/use-button.json
{ "hookDescription": "", "parametersDescriptions": { "disabled": { "description": "If <code>true</code>, the component is disabled." }, "focusableWhenDisabled": { "description": "If <code>true</code>, allows a disabled button to receive focus." }, "type": { "description": "Type attribute applied when the <code>component</code> is <code>button</code>." } }, "returnValueDescriptions": { "active": { "description": "If <code>true</code>, the component is active (pressed)." }, "focusVisible": { "description": "If <code>true</code>, the component is being focused using keyboard." }, "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "rootRef": { "description": "A ref to the component&#39;s root DOM element." }, "setFocusVisible": { "description": "Callback for setting the <code>focusVisible</code> param." } } }
5,705
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-dropdown/use-dropdown.json
{ "hookDescription": "", "parametersDescriptions": { "defaultOpen": { "description": "If <code>true</code>, the dropdown is initially open." }, "onOpenChange": { "description": "Callback fired when the component requests to be opened or closed." }, "open": { "description": "Allows to control whether the dropdown is open. This is a controlled counterpart of <code>defaultOpen</code>." } }, "returnValueDescriptions": { "contextValue": { "description": "The value to be passed into the DropdownContext provider." }, "open": { "description": "If <code>true</code>, the dropdown is open." } } }
5,706
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-form-control-context/use-form-control-context.json
{ "hookDescription": "", "parametersDescriptions": {}, "returnValueDescriptions": { "disabled": { "description": "If <code>true</code>, the label, input and helper text should be displayed in a disabled state." }, "error": { "description": "If <code>true</code>, the label is displayed in an error state." }, "filled": { "description": "If <code>true</code>, the form element has some value." }, "focused": { "description": "If <code>true</code>, the form element is focused and not disabled." }, "onBlur": { "description": "Callback fired when the form element has lost focus." }, "onChange": { "description": "Callback fired when the form element&#39;s value is modified." }, "onFocus": { "description": "Callback fired when the form element receives focus." }, "required": { "description": "If <code>true</code>, the label will indicate that the <code>input</code> is required." }, "value": { "description": "The value of the form element." } } }
5,707
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-input/use-input.json
{ "hookDescription": "", "parametersDescriptions": { "defaultValue": { "description": "The default value. Use when the component is not controlled." }, "disabled": { "description": "If <code>true</code>, the component is disabled. The prop defaults to the value (<code>false</code>) inherited from the parent FormControl component." }, "error": { "description": "If <code>true</code>, the <code>input</code> will indicate an error by setting the <code>aria-invalid</code> attribute. The prop defaults to the value (<code>false</code>) inherited from the parent FormControl component." }, "required": { "description": "If <code>true</code>, the <code>input</code> element is required. The prop defaults to the value (<code>false</code>) inherited from the parent FormControl component." } }, "returnValueDescriptions": { "disabled": { "description": "If <code>true</code>, the component will be disabled." }, "error": { "description": "If <code>true</code>, the <code>input</code> will indicate an error by setting the <code>aria-invalid</code> attribute." }, "focused": { "description": "If <code>true</code>, the <code>input</code> will be focused." }, "formControlContext": { "description": "Return value from the <code>useFormControlContext</code> hook." }, "getInputProps": { "description": "Resolver for the input slot&#39;s props." }, "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "required": { "description": "If <code>true</code>, the <code>input</code> will indicate that it&#39;s required." }, "value": { "description": "The <code>value</code> of the <code>input</code> element." } } }
5,708
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-menu-button/use-menu-button.json
{ "hookDescription": "", "parametersDescriptions": { "disabled": { "description": "If <code>true</code>, the component is disabled." }, "focusableWhenDisabled": { "description": "If <code>true</code>, allows a disabled button to receive focus." }, "rootRef": { "description": "The ref to the root element." } }, "returnValueDescriptions": { "active": { "description": "If <code>true</code>, the component is active (pressed)." }, "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "rootRef": { "description": "The ref to the root element." } } }
5,709
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-menu-item-context-stabilizer/use-menu-item-context-stabilizer.json
{ "hookDescription": "Stabilizes the ListContext value for the MenuItem component, so it doesn't change when sibling items update.\n\n@param id The id of the MenuItem. If undefined, it will be generated with useId.\n@returns The stable ListContext value and the id of the MenuItem.", "parametersDescriptions": {}, "returnValueDescriptions": {} }
5,710
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-menu-item/use-menu-item.json
{ "hookDescription": "", "parametersDescriptions": {}, "returnValueDescriptions": { "disabled": { "description": "If <code>true</code>, the component is disabled." }, "focusVisible": { "description": "If <code>true</code>, the component is being focused using keyboard." }, "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "highlighted": { "description": "If <code>true</code>, the component is being highlighted." }, "index": { "description": "0-based index of the item in the menu." }, "rootRef": { "description": "The ref to the component&#39;s root DOM element." }, "totalItemCount": { "description": "Total number of items in the menu." } } }
5,711
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-menu/use-menu.json
{ "hookDescription": "", "parametersDescriptions": { "disabledItemsFocusable": { "description": "If <code>true</code>, it will be possible to highlight disabled items." }, "disableListWrap": { "description": "If <code>true</code>, the highlight will not wrap around the list if arrow keys are used." }, "id": { "description": "The id of the menu. If not provided, it will be generated." }, "listboxRef": { "description": "The ref to the menu&#39;s listbox node." }, "onItemsChange": { "description": "Callback fired when the menu items change." } }, "returnValueDescriptions": { "contextValue": { "description": "The value to be passed into the MenuProvider." }, "dispatch": { "description": "Action dispatcher for the menu component. Allows to programmatically control the menu." }, "getListboxProps": { "description": "Resolver for the listbox slot&#39;s props." }, "highlightedValue": { "description": "The highlighted option in the menu listbox." }, "listboxRef": { "description": "The ref to the menu&#39;s listbox node." }, "menuItems": { "description": "Items in the menu listbox." }, "open": { "description": "If <code>true</code>, the menu is open." }, "triggerElement": { "description": "An element that triggers the visibility of the menu." } } }
5,712
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-modal/use-modal.json
{ "hookDescription": "", "parametersDescriptions": { "children": { "description": "A single child content element." }, "closeAfterTransition": { "description": "When set to true the Modal waits until a nested Transition is completed before closing." }, "container": { "description": "An HTML element or function that returns one. The <code>container</code> will have the portal children appended to it.<br>By default, it uses the body of the top-level document object, so it&#39;s simply <code>document.body</code> most of the time." }, "disableEscapeKeyDown": { "description": "If <code>true</code>, hitting escape will not fire the <code>onClose</code> callback." }, "disableScrollLock": { "description": "Disable the scroll lock behavior." }, "onClose": { "description": "Callback fired when the component requests to be closed. The <code>reason</code> parameter can optionally be used to control the response to <code>onClose</code>." }, "onTransitionEnter": { "description": "A function called when a transition enters." }, "onTransitionExited": { "description": "A function called when a transition has exited." }, "open": { "description": "If <code>true</code>, the component is shown." } }, "returnValueDescriptions": { "exited": { "description": "If <code>true</code>, the exiting transition finished (to be used for unmounting the component)." }, "getBackdropProps": { "description": "Resolver for the backdrop slot&#39;s props." }, "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "getTransitionProps": { "description": "Resolver for the transition related props." }, "hasTransition": { "description": "If <code>true</code>, the component&#39;s child is transition component." }, "isTopModal": { "description": "If <code>true</code>, the modal is the top most one." }, "portalRef": { "description": "A ref to the component&#39;s portal DOM element." }, "rootRef": { "description": "A ref to the component&#39;s root DOM element." } } }
5,713
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-number-input/use-number-input.json
{ "hookDescription": "", "parametersDescriptions": { "defaultValue": { "description": "The default value. Use when the component is not controlled." }, "disabled": { "description": "If <code>true</code>, the component is disabled. The prop defaults to the value (<code>false</code>) inherited from the parent FormControl component." }, "error": { "description": "If <code>true</code>, the <code>input</code> will indicate an error by setting the <code>aria-invalid</code> attribute. The prop defaults to the value (<code>false</code>) inherited from the parent FormControl component." }, "inputId": { "description": "The <code>id</code> attribute of the input element." }, "inputRef": { "description": "The ref of the input element." }, "max": { "description": "The maximum value." }, "min": { "description": "The minimum value." }, "onChange": { "description": "Callback fired after the value is clamped and changes - when the <code>input</code> is blurred or when the stepper buttons are triggered. Called with <code>undefined</code> when the value is unset." }, "onInputChange": { "description": "Callback fired when the <code>input</code> value changes after each keypress, before clamping is applied. Note that <code>event.target.value</code> may contain values that fall outside of <code>min</code> and <code>max</code> or are otherwise &quot;invalid&quot;." }, "readOnly": { "description": "If <code>true</code>, the <code>input</code> element becomes read-only. The stepper buttons remain active, with the addition that they are now keyboard focusable." }, "required": { "description": "If <code>true</code>, the <code>input</code> element is required. The prop defaults to the value (<code>false</code>) inherited from the parent FormControl component." }, "shiftMultiplier": { "description": "Multiplier applied to <code>step</code> if the shift key is held while incrementing or decrementing the value. Defaults to <code>10</code>." }, "step": { "description": "The amount that the value changes on each increment or decrement." }, "value": { "description": "The current value. Use when the component is controlled." } }, "returnValueDescriptions": { "disabled": { "description": "If <code>true</code>, the component will be disabled." }, "error": { "description": "If <code>true</code>, the <code>input</code> will indicate an error by setting the <code>aria-invalid</code> attribute." }, "focused": { "description": "If <code>true</code>, the <code>input</code> will be focused." }, "formControlContext": { "description": "Return value from the <code>useFormControlContext</code> hook." }, "getDecrementButtonProps": { "description": "Resolver for the decrement button slot&#39;s props." }, "getIncrementButtonProps": { "description": "Resolver for the increment button slot&#39;s props." }, "getInputProps": { "description": "Resolver for the input slot&#39;s props." }, "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "inputValue": { "description": "The dirty <code>value</code> of the <code>input</code> element when it is in focus." }, "isDecrementDisabled": { "description": "If <code>true</code>, the decrement button will be disabled. e.g. when the <code>value</code> is already at <code>min</code>" }, "isIncrementDisabled": { "description": "If <code>true</code>, the increment button will be disabled. e.g. when the <code>value</code> is already at <code>max</code>" }, "required": { "description": "If <code>true</code>, the <code>input</code> will indicate that it&#39;s required." }, "value": { "description": "The clamped <code>value</code> of the <code>input</code> element." } } }
5,714
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-option-context-stabilizer/use-option-context-stabilizer.json
{ "hookDescription": "Stabilizes the ListContext value for the Option component, so it doesn't change when sibling Options update.\n\n@param value The value of the Option.\n@returns The stable ListContext value.", "parametersDescriptions": {}, "returnValueDescriptions": {} }
5,715
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-option/use-option.json
{ "hookDescription": "", "parametersDescriptions": {}, "returnValueDescriptions": { "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "highlighted": { "description": "If <code>true</code>, the option is highlighted." }, "rootRef": { "description": "Ref to the root slot DOM node." }, "selected": { "description": "If <code>true</code>, the option is selected." } } }
5,716
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-select/use-select.json
{ "hookDescription": "", "parametersDescriptions": { "areOptionsEqual": { "description": "A function used to determine if two options&#39; values are equal. By default, reference equality is used.<br>There is a performance impact when using the <code>areOptionsEqual</code> prop (proportional to the number of options). Therefore, it&#39;s recommented to use the default reference equality comparison whenever possible." }, "buttonRef": { "description": "The ref of the trigger button element." }, "defaultOpen": { "description": "If <code>true</code>, the select will be open by default." }, "defaultValue": { "description": "The default selected value. Use when the component is not controlled." }, "disabled": { "description": "If <code>true</code>, the select is disabled." }, "getOptionAsString": { "description": "A function used to convert the option label to a string. This is useful when labels are elements and need to be converted to plain text to enable keyboard navigation with character keys." }, "getSerializedValue": { "description": "A function to convert the currently selected value to a string. Used to set a value of a hidden input associated with the select, so that the selected value can be posted with a form." }, "listboxId": { "description": "The <code>id</code> attribute of the listbox element." }, "listboxRef": { "description": "The ref of the listbox element." }, "multiple": { "description": "If <code>true</code>, the end user can select multiple values. This affects the type of the <code>value</code>, <code>defaultValue</code>, and <code>onChange</code> props." }, "name": { "description": "The <code>name</code> attribute of the hidden input element. This is useful when the select is embedded in a form and you want to access the selected value in the form data." }, "onChange": { "description": "Callback fired when an option is selected." }, "onHighlightChange": { "description": "Callback fired when an option is highlighted." }, "onOpenChange": { "description": "Callback fired when the listbox is opened or closed." }, "open": { "description": "Controls the open state of the select&#39;s listbox. This is the controlled equivalent of the <code>defaultOpen</code> prop." }, "options": { "description": "An alternative way to specify the options. If this parameter is set, options defined as JSX children are ignored." }, "required": { "description": "If <code>true</code>, the select embedded in a form must have a selected value. Otherwise, the form submission will fail." }, "value": { "description": "The selected value. Set to <code>null</code> to deselect all options." } }, "returnValueDescriptions": { "buttonActive": { "description": "If <code>true</code>, the trigger button is active (pressed)." }, "buttonFocusVisible": { "description": "If <code>true</code>, the trigger button has a visible focus." }, "buttonRef": { "description": "Ref to the button slot DOM node." }, "contextValue": { "description": "A value to be passed to the <code>SelectProvider</code> component." }, "disabled": { "description": "If <code>true</code>, the select is disabled." }, "dispatch": { "description": "Action dispatcher for the select component. Allows to programmatically control the select." }, "getButtonProps": { "description": "Resolver for the button slot&#39;s props." }, "getHiddenInputProps": { "description": "Resolver for the hidden input slot&#39;s props." }, "getListboxProps": { "description": "Resolver for the listbox slot&#39;s props." }, "getOptionMetadata": { "description": "A function that returns the metadata of an option with a given value." }, "highlightedOption": { "description": "The value of the highlighted option." }, "listboxRef": { "description": "Ref to the listbox slot DOM node." }, "open": { "description": "If <code>true</code>, the listbox is open." }, "options": { "description": "Values of all the registered options." }, "value": { "description": "The value of the selected option(s)." } } }
5,717
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-slider/use-slider.json
{ "hookDescription": "", "parametersDescriptions": { "aria-labelledby": { "description": "The id of the element containing a label for the slider." }, "defaultValue": { "description": "The default value. Use when the component is not controlled." }, "disabled": { "description": "If <code>true</code>, the component is disabled." }, "disableSwap": { "description": "If <code>true</code>, the active thumb doesn&#39;t swap when moving pointer over a thumb while dragging another thumb." }, "isRtl": { "description": "If <code>true</code> the Slider will be rendered right-to-left (with the lowest value on the right-hand side)." }, "marks": { "description": "Marks indicate predetermined values to which the user can move the slider. If <code>true</code> the marks are spaced according the value of the <code>step</code> prop. If an array, it should contain objects with <code>value</code> and an optional <code>label</code> keys." }, "max": { "description": "The maximum allowed value of the slider. Should not be equal to min." }, "min": { "description": "The minimum allowed value of the slider. Should not be equal to max." }, "name": { "description": "Name attribute of the hidden <code>input</code> element." }, "onChange": { "description": "Callback function that is fired when the slider&#39;s value changed." }, "onChangeCommitted": { "description": "Callback function that is fired when the <code>mouseup</code> is triggered." }, "orientation": { "description": "The component orientation." }, "rootRef": { "description": "The ref attached to the root of the Slider." }, "scale": { "description": "A transformation function, to change the scale of the slider." }, "step": { "description": "The granularity with which the slider can step through values. (A &quot;discrete&quot; slider.) The <code>min</code> prop serves as the origin for the valid values. We recommend (max - min) to be evenly divisible by the step.<br>When step is <code>null</code>, the thumb can only be slid onto marks provided with the <code>marks</code> prop." }, "tabIndex": { "description": "Tab index attribute of the hidden <code>input</code> element." }, "value": { "description": "The value of the slider. For ranged sliders, provide an array with two values." } }, "returnValueDescriptions": { "active": { "description": "The active index of the slider." }, "axis": { "description": "The orientation of the slider." }, "axisProps": { "description": "Returns the <code>offset</code> and <code>leap</code> methods to calculate the positioning styles based on the slider axis." }, "dragging": { "description": "If <code>true</code>, the slider is being dragged." }, "focusedThumbIndex": { "description": "The index of the thumb which is focused on the slider." }, "getHiddenInputProps": { "description": "Resolver for the hidden input slot&#39;s props." }, "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "getThumbProps": { "description": "Resolver for the thumb slot&#39;s props." }, "getThumbStyle": { "description": "Resolver for the thumb slot&#39;s style prop." }, "marks": { "description": "The marks of the slider. Marks indicate predetermined values to which the user can move the slider." }, "open": { "description": "The thumb index for the current value when in hover state." }, "range": { "description": "If <code>true</code>, the slider is a range slider when the <code>value</code> prop passed is an array." }, "rootRef": { "description": "Ref to the root slot&#39;s DOM node." }, "trackLeap": { "description": "The track leap for the current value of the slider." }, "trackOffset": { "description": "The track offset for the current value of the slider." }, "values": { "description": "The possible values of the slider." } } }
5,718
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-snackbar/use-snackbar.json
{ "hookDescription": "The basic building block for creating custom snackbar.", "parametersDescriptions": { "autoHideDuration": { "description": "The number of milliseconds to wait before automatically calling the <code>onClose</code> function. <code>onClose</code> should then set the state of the <code>open</code> prop to hide the Snackbar. This behavior is disabled by default with the <code>null</code> value." }, "disableWindowBlurListener": { "description": "If <code>true</code>, the <code>autoHideDuration</code> timer will expire even if the window is not focused." }, "onClose": { "description": "Callback fired when the component requests to be closed. Typically <code>onClose</code> is used to set state in the parent component, which is used to control the <code>Snackbar</code> <code>open</code> prop. The <code>reason</code> parameter can optionally be used to control the response to <code>onClose</code>, for example ignoring <code>clickaway</code>." }, "open": { "description": "If <code>true</code>, the component is shown." }, "resumeHideDuration": { "description": "The number of milliseconds to wait before dismissing after user interaction. If <code>autoHideDuration</code> prop isn&#39;t specified, it does nothing. If <code>autoHideDuration</code> prop is specified but <code>resumeHideDuration</code> isn&#39;t, we default to <code>autoHideDuration / 2</code> ms." } }, "returnValueDescriptions": { "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "onClickAway": { "description": "Callback fired when a &quot;click away&quot; event is detected." } } }
5,719
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-switch/use-switch.json
{ "hookDescription": "The basic building block for creating custom switches.", "parametersDescriptions": { "checked": { "description": "If <code>true</code>, the component is checked." }, "defaultChecked": { "description": "The default checked state. Use when the component is not controlled." }, "disabled": { "description": "If <code>true</code>, the component is disabled." }, "onChange": { "description": "Callback fired when the state is changed." }, "readOnly": { "description": "If <code>true</code>, the component is read only." }, "required": { "description": "If <code>true</code>, the <code>input</code> element is required." } }, "returnValueDescriptions": { "checked": { "description": "If <code>true</code>, the component will be checked." }, "disabled": { "description": "If <code>true</code>, the component will be disabled." }, "focusVisible": { "description": "If <code>true</code>, it indicates that the component is being focused using keyboard." }, "getInputProps": { "description": "Resolver for the input slot&#39;s props." }, "inputRef": { "description": "Ref to the input slot&#39;s DOM node." }, "readOnly": { "description": "If <code>true</code>, the component will be read only." } } }
5,720
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-tab-panel/use-tab-panel.json
{ "hookDescription": "", "parametersDescriptions": { "id": { "description": "The id of the TabPanel." }, "rootRef": { "description": "The ref of the TabPanel." }, "value": { "description": "The value of the TabPanel. It will be shown when the Tab with the corresponding value is selected." } }, "returnValueDescriptions": { "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "hidden": { "description": "If <code>true</code>, it indicates that the tab panel will be hidden." } } }
5,721
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-tab/use-tab.json
{ "hookDescription": "", "parametersDescriptions": { "disabled": { "description": "If <code>true</code>, the tab will be disabled." }, "id": { "description": "The id of the tab. If not provided, it will be automatically generated." }, "onChange": { "description": "If <code>true</code>, the tab will be disabled." }, "onClick": { "description": "Callback fired when the tab is clicked." }, "rootRef": { "description": "Ref to the root slot&#39;s DOM element." }, "value": { "description": "The value of the tab. It&#39;s used to associate the tab with a tab panel(s) with the same value. If the value is not provided, it falls back to the position index." } }, "returnValueDescriptions": { "active": { "description": "If <code>true</code>, the tab is active (as in <code>:active</code> pseudo-class; in other words, pressed)." }, "focusVisible": { "description": "If <code>true</code>, the tab has visible focus. This is a workaround for browsers that do not support this feature natively." }, "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "highlighted": { "description": "If <code>true</code>, the tab is highlighted." }, "index": { "description": "0-based index of the tab in the list of tabs." }, "rootRef": { "description": "Ref to the root slot&#39;s DOM element." }, "selected": { "description": "If <code>true</code>, the tab is selected." }, "setFocusVisible": { "description": "Sets the focus-visible state of the tab. This is a workaround for browsers that do not support this feature natively." }, "totalTabsCount": { "description": "Total number of tabs in the nearest parent TabsList. This can be used to determine if the tab is the last one to style it accordingly." } } }
5,722
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-tabs-list/use-tabs-list.json
{ "hookDescription": "", "parametersDescriptions": { "rootRef": { "description": "Ref to the root element." } }, "returnValueDescriptions": { "contextValue": { "description": "The value to be passed to the TabListProvider above all the tabs." }, "dispatch": { "description": "Action dispatcher for the tabs list component. Allows to programmatically control the tabs list." }, "getRootProps": { "description": "Resolver for the root slot&#39;s props." }, "highlightedValue": { "description": "The value of the currently highlighted tab." }, "isRtl": { "description": "If <code>true</code>, it will indicate that the text&#39;s direction in right-to-left." }, "orientation": { "description": "The component orientation (layout flow direction)." }, "selectedValue": { "description": "The value of the currently selected tab." } } }
5,723
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/use-tabs/use-tabs.json
{ "hookDescription": "", "parametersDescriptions": { "defaultValue": { "description": "The default value. Use when the component is not controlled." }, "direction": { "description": "The direction of the text." }, "onChange": { "description": "Callback invoked when new value is being set." }, "orientation": { "description": "The component orientation (layout flow direction)." }, "selectionFollowsFocus": { "description": "If <code>true</code> the selected tab changes on focus. Otherwise it only changes on activation." }, "value": { "description": "The value of the currently selected <code>Tab</code>. If you don&#39;t want any selected <code>Tab</code>, you can set this prop to <code>false</code>." } }, "returnValueDescriptions": { "contextValue": { "description": "Returns the values to be passed to the tabs provider." } } }
5,724
0
petrpan-code/mui/material-ui/docs/translations/api-docs
petrpan-code/mui/material-ui/docs/translations/api-docs/zoom/zoom.json
{ "componentDescription": "The Zoom transition can be used for the floating variant of the\n[Button](/material-ui/react-button/#floating-action-buttons) component.\nIt uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.", "propDescriptions": { "addEndListener": { "description": "Add a custom transition end trigger. Called with the transitioning DOM node and a done callback. Allows for more fine grained transition end logic. Note: Timeouts are still used as a fallback if provided." }, "appear": { "description": "Perform the enter transition when it first mounts if <code>in</code> is also <code>true</code>. Set this to <code>false</code> to disable this behavior." }, "children": { "description": "A single child content element.", "requiresRef": true }, "easing": { "description": "The transition timing function. You may specify a single easing or a object containing enter and exit values." }, "in": { "description": "If <code>true</code>, the component will transition in." }, "timeout": { "description": "The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object." } }, "classDescriptions": {} }
5,725
0
petrpan-code/mui/material-ui/docs
petrpan-code/mui/material-ui/docs/types/docs.d.ts
declare module 'docs/src/modules/components/HighlightedCode' { import * as React from 'react'; import { StyledComponentProps } from '@mui/material/styles'; type ClassKey = 'root'; export interface Props extends StyledComponentProps<ClassKey> { className?: string; /** * plain string */ code: string; copyButtonHidden?: boolean; copyButtonProps?: JSX.IntrinsicElements['button']; /** * short identifier of the code language * see @mui/markdown/prism for possible languages */ language: string; /** * The component used for the root node. * @default MarkdownElement */ component?: React.ElementType; sx?: object; } export default function HighlightedCode(props: Props): React.ReactElement; } declare module '@trendmicro/react-interpolate'; declare module 'react-imask';
5,726
0
petrpan-code/mui/material-ui/docs
petrpan-code/mui/material-ui/docs/types/fg-loadcss.d.ts
declare module 'fg-loadcss';
5,727
0
petrpan-code/mui/material-ui/docs
petrpan-code/mui/material-ui/docs/types/icons.d.ts
declare module '@mui/icons-material'; declare module '@mui/icons-material/*';
5,728
0
petrpan-code/mui/material-ui
petrpan-code/mui/material-ui/examples/.eslintrc.js
module.exports = { rules: { 'import/namespace': 'off', 'import/no-unresolved': 'off', 'import/extensions': 'off', 'import/named': 'off', 'import/no-duplicates': 'off', 'import/no-named-as-default': 'off', 'import/default': 'off', 'import/no-named-as-default-member': 'off', 'import/order': 'off', // create-vite generates .jsx 'react/jsx-filename-extension': 'off', }, };
5,729
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-cra-ts/README.md
# Base UI - Create React App example in TypeScript [Base UI](https://mui.com/base-ui/) is a library of unstyled React UI components and hooks. [Create React App](https://create-react-app.dev/) is a framework for quickly creating a new React project without the need to configure complex build tools or development environments. ## How to use Download the example [or clone the repo](https://github.com/mui/material-ui): <!-- #default-branch-switch --> ```bash curl https://codeload.github.com/mui/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/base-ui-cra-ts cd base-ui-cra-ts ``` Install it and run: ```bash npm install npm start ``` or: <!-- #default-branch-switch --> [![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/mui/material-ui/tree/master/examples/base-ui-cra-ts) [![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/mui/material-ui/tree/master/examples/base-ui-cra-ts)
5,730
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-cra-ts/package.json
{ "name": "base-ui-cra-ts", "version": "5.0.0", "private": true, "dependencies": { "@mui/base": "latest", "@types/react": "latest", "@types/react-dom": "latest", "react": "latest", "react-dom": "latest", "react-scripts": "latest", "typescript": "latest" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] }, "devDependencies": { "@babel/plugin-proposal-private-property-in-object": "latest" } }
5,731
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-cra-ts/tsconfig.json
{ "compilerOptions": { "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react" }, "include": ["src"] }
5,732
0
petrpan-code/mui/material-ui/examples/base-ui-cra-ts
petrpan-code/mui/material-ui/examples/base-ui-cra-ts/public/index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" /> <meta name="viewport" content="initial-scale=1, width=device-width" /> <title>CRA + Base UI + TS</title> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> <div id="root"></div> </body> </html>
5,733
0
petrpan-code/mui/material-ui/examples/base-ui-cra-ts
petrpan-code/mui/material-ui/examples/base-ui-cra-ts/src/App.tsx
import * as React from 'react'; import './index.css'; export default function App() { return ( <div className="box"> <h1>Base UI + Create React App scaffold (TypeScript)</h1> <div className="item"> <a href="https://mui.com/base-ui/">Base UI</a> is a library of unstyled React UI components which includes prebuilt components with production-ready functionality, along with low-level hooks for transferring that functionality to other components. </div> <div className="item"> <a href="https://create-react-app.dev/">Create React App</a> is a framework for quickly creating a new React project without the need to configure complex build tools or development environments. </div> <span> Created with ๐Ÿ’™ by <a href="https://mui.com">MUI</a>. </span> </div> ); }
5,734
0
petrpan-code/mui/material-ui/examples/base-ui-cra-ts
petrpan-code/mui/material-ui/examples/base-ui-cra-ts/src/index.css
.item { border: 1px solid #000000; padding: 20px; border-radius: 4px; margin-bottom: 20px; } .box { flex-grow: 1; max-width: 800px; margin: auto; padding: 15px; font-family: sans-serif; line-height: 1.5; }
5,735
0
petrpan-code/mui/material-ui/examples/base-ui-cra-ts
petrpan-code/mui/material-ui/examples/base-ui-cra-ts/src/index.tsx
import * as React from 'react'; import * as ReactDOM from 'react-dom/client'; import App from './App'; const rootElement = document.getElementById('root'); const root = ReactDOM.createRoot(rootElement!); root.render(<App />);
5,736
0
petrpan-code/mui/material-ui/examples/base-ui-cra-ts
petrpan-code/mui/material-ui/examples/base-ui-cra-ts/src/react-app-env.d.ts
/// <reference types="react-scripts" />
5,737
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-cra/README.md
# Base UI - Create React App example in JavaScript [Base UI](https://mui.com/base-ui/) is a library of unstyled React UI components and hooks. [Create React App](https://create-react-app.dev/) is a framework for quickly creating a new React project without the need to configure complex build tools or development environments. ## How to use Download the example [or clone the repo](https://github.com/mui/material-ui): <!-- #default-branch-switch --> ```bash curl https://codeload.github.com/mui/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/base-ui-cra cd base-ui-cra ``` Install it and run: ```bash npm install npm start ``` or: <!-- #default-branch-switch --> [![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/mui/material-ui/tree/master/examples/base-ui-cra) [![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/mui/material-ui/tree/master/examples/base-ui-cra)
5,738
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-cra/package.json
{ "name": "base-ui-cra", "version": "5.0.0", "private": true, "dependencies": { "@mui/base": "latest", "react": "latest", "react-dom": "latest", "react-scripts": "latest" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] }, "devDependencies": { "@babel/plugin-proposal-private-property-in-object": "latest" } }
5,739
0
petrpan-code/mui/material-ui/examples/base-ui-cra
petrpan-code/mui/material-ui/examples/base-ui-cra/public/index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="description" content="Web site created using create-react-app" /> <title>CRA + Base UI</title> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> <div id="root"></div> </body> </html>
5,740
0
petrpan-code/mui/material-ui/examples/base-ui-cra
petrpan-code/mui/material-ui/examples/base-ui-cra/src/App.js
import * as React from 'react'; import './index.css'; export default function App() { return ( <div className="box"> <h1>Base UI + Create React App scaffold (JavaScript)</h1> <div className="item"> <a href="https://mui.com/base-ui/">Base UI</a> is a library of unstyled React UI components and hooks. </div> <div className="item"> <a href="https://create-react-app.dev/">Create React App</a> is a framework for quickly creating a new React project without the need to configure complex build tools or development environments. </div> <span> Created with ๐Ÿ’™ by <a href="https://mui.com">MUI</a>. </span> </div> ); }
5,741
0
petrpan-code/mui/material-ui/examples/base-ui-cra
petrpan-code/mui/material-ui/examples/base-ui-cra/src/index.css
.item { border: 1px solid #000000; padding: 20px; border-radius: 4px; margin-bottom: 20px; } .box { flex-grow: 1; max-width: 800px; margin: auto; padding: 15px; font-family: sans-serif; line-height: 1.5; }
5,742
0
petrpan-code/mui/material-ui/examples/base-ui-cra
petrpan-code/mui/material-ui/examples/base-ui-cra/src/index.js
import * as React from 'react'; import * as ReactDOM from 'react-dom/client'; import App from './App'; const rootElement = document.getElementById('root'); const root = ReactDOM.createRoot(rootElement); root.render(<App />);
5,743
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/README.md
# Base UI - Next.js App Router with Tailwind CSS example in TypeScript This is a [Next.js](https://nextjs.org/) project bootstrapped using [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with Base UI installed and Tailwind CSS for styles. ## How to use Download the example [or clone the repo](https://github.com/mui/material-ui): <!-- #default-branch-switch --> ```bash curl https://codeload.github.com/mui/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/base-ui-nextjs-tailwind-ts cd base-ui-nextjs-tailwind-ts ``` Install it and run: ```bash npm install npm run dev ``` or <!-- #default-branch-switch --> [![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/mui/material-ui/tree/master/examples/base-ui-nextjs-tailwind-ts) [![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/mui/material-ui/tree/master/examples/base-ui-nextjs-tailwind-ts) ## Learn more To learn more about this example: - [Next.js documentation](https://nextjs.org/docs) - learn about Next.js features and API. - [Customizing Base UI](https://mui.com/base-ui/getting-started/customization/) - strategies for styling and customizing Base UI.
5,744
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/next.config.js
/** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, swcMinify: true, }; module.exports = nextConfig;
5,745
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/package.json
{ "name": "base-ui-nextjs-tailwind-ts", "version": "5.0.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint", "post-update": "echo \"codesandbox preview only, need an update\" && yarn upgrade --latest" }, "dependencies": { "@mui/base": "latest", "clsx": "latest", "next": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "@types/node": "latest", "@types/react": "latest", "@types/react-dom": "latest", "autoprefixer": "latest", "eslint": "latest", "eslint-config-next": "latest", "postcss": "latest", "postcss-nesting": "latest", "tailwindcss": "latest", "typescript": "latest" } }
5,746
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/postcss.config.js
module.exports = { plugins: { 'tailwindcss/nesting': 'postcss-nesting', tailwindcss: {}, autoprefixer: {}, }, };
5,747
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/tailwind.config.js
/** @type {import('tailwindcss').Config} */ module.exports = { content: ['./src/app/**/*.{js,ts,jsx,tsx,mdx}', './src/components/**/*.{js,ts,jsx,tsx,mdx}'], theme: { extend: {}, }, plugins: [], };
5,748
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/tsconfig.json
{ "compilerOptions": { "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", "incremental": true, "plugins": [ { "name": "next" } ], "paths": { "@/*": ["./src/*"] } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"] }
5,749
0
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/src
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/src/app/components.tsx
'use client'; import * as React from 'react'; import clsx from 'clsx'; import { Select as BaseSelect, SelectProps, SelectOwnerState, SelectRootSlotProps, } from '@mui/base/Select'; import { Option, OptionProps, OptionOwnerState } from '@mui/base/Option'; import { Slider as BaseSlider, SliderProps, SliderOwnerState } from '@mui/base/Slider'; const SelectButton = React.forwardRef(function SelectButton< TValue extends {}, Multiple extends boolean, >(props: SelectRootSlotProps<TValue, Multiple>, ref: React.ForwardedRef<HTMLButtonElement>) { const { ownerState, ...other } = props; return ( <button type="button" {...other} ref={ref}> {other.children} <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" className="text-base absolute h-full top-0 right-1" > <path d="m7 10 5 5 5-5H7z" /> </svg> </button> ); }); // the components exported from this file have function props which are non-serializable // therefore they are additionally wrapped with 'use client' here // https://nextjs.org/docs/app/building-your-application/rendering/composition-patterns#passing-props-from-server-to-client-components-serialization export function SelectOption(props: OptionProps<string>) { const { slotProps = { root: {}, }, ...rest } = props; return ( <Option slotProps={{ root: (ownerState: OptionOwnerState<string>) => ({ ...slotProps.root, className: clsx( 'list-none p-2 rounded-[1px] cursor-pointer last-of-type:border-b-0', ownerState.selected && 'bg-blue-100 text-blue-900', ownerState.highlighted && 'bg-gray-100 text-gray-900', ownerState.highlighted && ownerState.selected && 'bg-gray-700 text-gray-50', ownerState.disabled ? 'text-gray-400' : 'hover:bg-gray-100, hover:text-gray-300', ), }), }} {...rest} /> ); } export const Select = React.forwardRef(function Select<TValue extends {}, Multiple extends boolean>( props: SelectProps<TValue, Multiple>, ref: React.ForwardedRef<HTMLButtonElement>, ) { const { slotProps = { root: {}, listbox: {}, popper: {}, }, ...rest } = props; return ( <BaseSelect {...rest} ref={ref} slots={{ root: SelectButton, ...props.slots, }} slotProps={{ root: (ownerState: SelectOwnerState<string, false>) => ({ ...slotProps.root, className: clsx( 'text-gray-300 text-sm box-border min-width-[72px] py-2 px-3 rounded-sm text-left leading-normal bg-gray-900 border-[0] font-medium relative hover:bg-gray-400 hover:text-gray-900', ownerState.focusVisible && 'border-blue-400 outline-[3px] outline-solid outline-blue-200', ), }), listbox: { ...slotProps.listbox, className: 'text-sm box-border p-0 mb-3 rounded-sm overflow-auto outline-0 bg-[rgb(14,20,27)] border border-solid border-gray-700 text-gray-300 shadow-[0_1px_2px_#a0aab4] max-h-[240px]', }, popper: { ...slotProps.popper, className: 'z-[1]', }, }} /> ); }); export const Slider = React.forwardRef(function Slider( props: SliderProps, ref: React.ForwardedRef<HTMLElement>, ) { const { slotProps = { root: {}, rail: {}, track: {}, thumb: {}, mark: {}, markLabel: {}, valueLabel: {}, }, ...rest } = props; return ( <BaseSlider {...rest} slotProps={{ root: (ownerState: SliderOwnerState) => ({ ...slotProps.root, className: clsx( 'text-blue-500 h-1.5 w-full py-4 inline-block relative cursor-pointer touch-none top-[-1px] hover:opacity-100', ownerState.disabled && 'pointer-events-none cursor-default text-gray-300 opacity-50', ), }), rail: { ...slotProps.rail, className: 'block absolute w-full h-1.5 rounded-full bg-gray-700 opacity-40', }, track: { ...slotProps.track, className: 'block absolute h-1.5 rounded-full bg-current', }, thumb: { ...slotProps.thumb, className: 'absolute w-5 h-5 ml-[-8px] mt-[-7.5px] box-border rounded-[50%] outline-0 bg-white', // TODO: add hover/focusVisible/active box-shadow }, // TODO: where does markActive go? mark: { ...slotProps.mark, className: 'absolute w-1 h-1 rounded-sm bg-current top-2/4 opacity-0', }, markLabel: { ...slotProps.markLabel, className: 'text-[10px] font-extrabold uppercase text-gray-300 absolute top-5 mt-2 data-[index="1"]:translate-x-[-100%]', }, }} ref={ref} /> ); });
5,750
0
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/src
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/src/app/globals.css
@tailwind base; @tailwind components; @tailwind utilities; @layer components { /* This is an alternative to using function props and ownerState to style a component. The corresponding Switch component can be rendered in page.tsx without a use-client directive, but you cannot easily import the class names like in JS/TS. However this may not be a viable pattern since you'll typically pass other non-serializable props like event handers to components, which means you will have to add your own 'use-client' boundaries in your app anyway. */ .switch { &.Mui-checked { .MuiSwitch-thumb { @apply left-[20px] top-[2.5px] bg-white; } .MuiSwitch-track { @apply bg-blue-400; } } &.Mui-focusVisible .MuiSwitch-thumb { @apply shadow-[0_0_1px_8px_rgba(0,0,0,0.25)]; } &.Mui-disabled { @apply opacity-40 cursor-not-allowed; } } }
5,751
0
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/src
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/src/app/layout.tsx
import * as React from 'react'; import { IBM_Plex_Sans } from 'next/font/google'; import './globals.css'; const font = IBM_Plex_Sans({ weight: ['400', '500', '700'], subsets: ['latin'], display: 'swap', }); export const metadata = { title: 'Create Next App', description: 'Generated by create next app', }; export default function RootLayout({ children }: { children: React.ReactNode }) { return ( <html lang="en"> <body className={font.className}>{children}</body> </html> ); }
5,752
0
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/src
petrpan-code/mui/material-ui/examples/base-ui-nextjs-tailwind-ts/src/app/page.tsx
import * as React from 'react'; import { Switch } from '@mui/base/Switch'; import { Select, SelectOption, Slider } from './components'; function Heading(props: { children: React.ReactNode }) { return ( <h2 className="font-bold text-gray-400 uppercase text-base mt-3 mb-2">{props.children}</h2> ); } function Section(props: { children: React.ReactNode }) { return ( <div className="grid grid-cols-3 grid-rows-[40px] gap-x-16 items-center min-h-[40px] py-1.5 border-t-[1px] border-solid border-gray-700"> {props.children} </div> ); } function Label(props: { children: React.ReactNode }) { return <h3 className="font-medium leading-none text-gray-300 col-span-2">{props.children}</h3>; } const HOURS = [ '12AM', '1AM', '2AM', '3AM', '4AM', '5AM', '6AM', '7AM', '8AM', '9AM', '10AM', '11AM', '12PM', '1PM', '2PM', '3PM', '4PM', '5PM', '6PM', '7PM', '8PM', '9PM', '10PM', '11PM', ]; export default function Home() { return ( <main className="flex justify-center items-center w-full h-screen"> <div className="bg-[rgb(14,20,27)] rounded-lg p-6"> <Heading>Night Mode</Heading> <Section> <Label>Schedule Night Mode</Label> <Switch slotProps={{ root: { className: 'switch col-span-1 relative inline-block w-[40px] h-[24px] cursor-pointer justify-self-end', }, input: { 'aria-label': 'Schedule Night Mode', className: 'cursor-inherit absolute w-full h-full top-0 left-0 opacity-0 z-[1] m-0', }, track: { className: 'bg-gray-400 rounded-2xl block w-full h-full absolute border-[3px] border-solid border-[rgb(14,20,27)]', }, thumb: { className: 'block w-[20px] h-[20px] top-[2.5px] left-[-2px] rounded-2xl bg-white relative', }, }} defaultChecked /> </Section> <Section> <Label>Auto-Enable Between</Label> <div className="col-span-1 grid grid-cols-[1fr_auto_1fr] items-center"> <Select defaultValue="9PM"> {HOURS.map((hour) => ( <SelectOption key={`from-${hour}`} value={hour}> {hour} </SelectOption> ))} </Select> <span className="text-gray-300 text-sm text-medium mx-2">and</span> <Select defaultValue="6AM"> {HOURS.map((hour) => ( <SelectOption key={`to-${hour}`} value={hour}> {hour} </SelectOption> ))} </Select> </div> </Section> <Section> <Label>Night Mode Tint</Label> <div className="col-span-1 self-stretch"> <Slider aria-label="Night mode tint" defaultValue={37} marks={[ { value: 0, label: 'Cool', }, { value: 100, label: 'Warm', }, ]} /> </div> </Section> </div> </main> ); }
5,753
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/README.md
# Base UI - Vite.js example with Tailwind CSS in TypeScript [Base UI](https://mui.com/base-ui/) is a library of unstyled React UI components and hooks. [Vite](https://vitejs.dev/) is a build tool that aims to provide a faster and leaner development experience for modern web projects, consisting of a dev server and a build command [Tailwind CSS](https://tailwindcss.com/) is a utility-first CSS framework that provides low-level CSS classes that can be composed to build custom UI designs. ## How to use Download the example [or clone the repo](https://github.com/mui/material-ui): ```bash curl https://codeload.github.com/mui/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/base-ui-vite-tailwind-ts cd base-ui-vite-tailwind-ts ``` Install it and run: ```bash npm install npm start ``` or: <!-- #default-branch-switch --> [![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/mui/material-ui/tree/master/examples/base-ui-vite-tailwind-ts) [![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/mui/material-ui/tree/master/examples/base-ui-vite-tailwind-ts)
5,754
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Vite + React + TS</title> </head> <body> <div id="root"></div> <script type="module" src="/src/main.tsx"></script> </body> </html>
5,755
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/package.json
{ "name": "base-ui-vite-tailwind-ts", "private": true, "version": "5.0.0", "type": "module", "scripts": { "dev": "vite", "build": "tsc && vite build", "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { "@mui/base": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "@types/react": "latest", "@types/react-dom": "latest", "@typescript-eslint/eslint-plugin": "latest", "@typescript-eslint/parser": "latest", "@vitejs/plugin-react": "latest", "autoprefixer": "latest", "eslint": "latest", "eslint-plugin-react-hooks": "latest", "eslint-plugin-react-refresh": "latest", "postcss": "latest", "tailwindcss": "latest", "typescript": "latest", "vite": "latest" }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } }
5,756
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/postcss.config.js
export default { plugins: { tailwindcss: {}, autoprefixer: {}, }, };
5,757
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/tailwind.config.js
/** @type {import('tailwindcss').Config} */ export default { content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], theme: { extend: {}, }, plugins: [], };
5,758
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/tsconfig.json
{ "compilerOptions": { "target": "ES2020", "useDefineForClassFields": true, "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true, /* Bundler mode */ "moduleResolution": "bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", /* Linting */ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, "include": ["src"], "references": [{ "path": "./tsconfig.node.json" }] }
5,759
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/tsconfig.node.json
{ "compilerOptions": { "composite": true, "skipLibCheck": true, "module": "ESNext", "moduleResolution": "bundler", "allowSyntheticDefaultImports": true }, "include": ["vite.config.ts"] }
5,760
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/vite.config.ts
import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], });
5,761
0
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/public/vite.svg
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
5,762
0
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/src/App.tsx
import * as React from 'react'; export default function App() { return ( <div className="p-8"> <h1 className="text-3xl font-semibold mb-4"> Base UI + Vite.js + Tailwind CSS in TypeScript </h1> <ul> <li className="card"> <a href="https://mui.com/base-ui/" className="link"> Base UI </a>{' '} is a library of unstyled React UI components and hooks. </li> <li className="card"> <a href="https://vitejs.dev/" className="link"> Vite </a>{' '} is a build tool that aims to provide a faster and leaner development experience for modern web projects, consisting of a dev server and a build command. </li> <li className="card"> <a href="https://tailwindcss.com/" className="link"> Tailwind CSS </a>{' '} is a utility-first CSS framework that provides low-level CSS classes that can be composed to build custom UI designs. </li> </ul> <span> Created with ๐Ÿ’™ by{' '} <a href="https://mui.com" className="link"> MUI </a> . </span> </div> ); }
5,763
0
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/src/index.css
@tailwind base; @tailwind components; @tailwind utilities;
5,764
0
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/src/main.tsx
import * as React from 'react'; import * as ReactDOM from 'react-dom/client'; import App from './App.tsx'; import './index.css'; ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( <React.StrictMode> <App /> </React.StrictMode>, );
5,765
0
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/src/vite-env.d.ts
/// <reference types="vite/client" />
5,766
0
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/src
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind-ts/src/assets/logo.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
5,767
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind/README.md
# Base UI - Vite.js example with Tailwind CSS [Base UI](https://mui.com/base-ui/) is a library of unstyled React UI components and hooks. [Vite](https://vitejs.dev/) is a build tool that aims to provide a faster and leaner development experience for modern web projects, consisting of a dev server and a build command [Tailwind CSS](https://tailwindcss.com/) is a utility-first CSS framework that provides low-level CSS classes that can be composed to build custom UI designs. ## How to use Download the example [or clone the repo](https://github.com/mui/material-ui): ```bash curl https://codeload.github.com/mui/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/base-ui-vite-tailwind cd base-ui-vite-tailwind ``` Install it and run: ```bash npm install npm start ``` or: <!-- #default-branch-switch --> [![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/mui/material-ui/tree/master/examples/base-ui-vite-tailwind) [![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/mui/material-ui/tree/master/examples/base-ui-vite-tailwind)
5,768
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind/index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" /> <meta name="viewport" content="initial-scale=1, width=device-width" /> <title>Vite + Base UI + Tailwind CSS</title> </head> <body> <div id="root"></div> <script type="module" src="/src/main.jsx"></script> </body> </html>
5,769
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind/package.json
{ "name": "base-ui-vite-tailwind", "private": true, "version": "5.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview" }, "dependencies": { "@mui/base": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "@types/react": "latest", "@types/react-dom": "latest", "@vitejs/plugin-react": "latest", "autoprefixer": "latest", "postcss": "latest", "tailwindcss": "latest", "vite": "latest" } }
5,770
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind/postcss.config.js
export default { plugins: { tailwindcss: {}, autoprefixer: {}, }, };
5,771
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind/tailwind.config.js
/** @type {import('tailwindcss').Config} */ export default { content: ['./index.html', './src/**/*.{js,jsx}'], theme: { extend: {}, }, plugins: [], };
5,772
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind/vite.config.js
import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], });
5,773
0
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind/public/vite.svg
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
5,774
0
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind/src/App.jsx
import * as React from 'react'; export default function App() { return ( <div className="p-8"> <h1 className="text-3xl font-semibold mb-4">Base UI + Vite.js + Tailwind CSS</h1> <ul> <li className="card"> <a href="https://mui.com/base-ui/" className="link"> Base UI </a>{' '} is a library of unstyled React UI components and hooks. </li> <li className="card"> <a href="https://vitejs.dev/" className="link"> Vite </a>{' '} is a build tool that aims to provide a faster and leaner development experience for modern web projects, consisting of a dev server and a build command. </li> <li className="card"> <a href="https://tailwindcss.com/" className="link"> Tailwind CSS </a>{' '} is a utility-first CSS framework that provides low-level CSS classes that can be composed to build custom UI designs. </li> </ul> <span> Created with ๐Ÿ’™ by{' '} <a href="https://mui.com" className="link"> MUI </a> . </span> </div> ); }
5,775
0
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind/src/main.jsx
import * as React from 'react'; import * as ReactDOM from 'react-dom/client'; import App from './App'; import './styles.css'; ReactDOM.createRoot(document.getElementById('root')).render( <React.StrictMode> <App /> </React.StrictMode>, );
5,776
0
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind/src/styles.css
@tailwind base; @tailwind components; @tailwind utilities; @layer components { .card { @apply max-w-[70ch] rounded-lg border border-gray-400 p-6 mb-6; } .link { @apply border-b border-blue-700 text-blue-700 hover:border-b-2 hover:border-blue-400 hover:text-blue-500; } }
5,777
0
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind/src
petrpan-code/mui/material-ui/examples/base-ui-vite-tailwind/src/assets/react.svg
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
5,778
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts/README.md
# Joy UI - Create React App example in TypeScript `@mui/joy` is still in early development and is not recommended for use in production. ## How to use Download the example [or clone the repo](https://github.com/mui/material-ui): <!-- #default-branch-switch --> ```bash curl https://codeload.github.com/mui/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/joy-ui-cra-ts cd joy-ui-cra-ts ``` Install it and run: ```bash npm install npm start ``` or: <!-- #default-branch-switch --> [![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/mui/material-ui/tree/master/examples/joy-ui-cra-ts) [![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/mui/material-ui/tree/master/examples/joy-ui-cra-ts) ## What's next? <!-- #default-branch-switch --> You now have a working example project. You can head back to the documentation and continue by browsing the [templates](https://mui.com/joy-ui/getting-started/templates/) section.
5,779
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts/package.json
{ "name": "joy-ui-cra-ts", "version": "5.0.0", "private": true, "dependencies": { "@emotion/react": "latest", "@emotion/styled": "latest", "@mui/joy": "latest", "@types/react": "latest", "@types/react-dom": "latest", "react": "latest", "react-dom": "latest", "react-scripts": "latest", "typescript": "latest" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } }
5,780
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts/tsconfig.json
{ "compilerOptions": { "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react" }, "include": ["src"] }
5,781
0
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts/public/index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" /> <meta name="viewport" content="initial-scale=1, width=device-width" /> <title>CRA + Joy UI + TS</title> <!-- Fonts to support Joy Design --> <link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" /> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> <div id="root"></div> </body> </html>
5,782
0
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts/public/manifest.json
{ "short_name": "Your Orders", "name": "Your Orders", "icons": [ { "src": "favicon.ico", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" } ], "start_url": ".", "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff" }
5,783
0
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts/src/App.tsx
import * as React from 'react'; import { CssVarsProvider } from '@mui/joy/styles'; import Button from '@mui/joy/Button'; export default function App() { return ( <CssVarsProvider> <Button>Button</Button> </CssVarsProvider> ); }
5,784
0
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts/src/index.tsx
import * as React from 'react'; import * as ReactDOM from 'react-dom/client'; import App from './App'; const rootElement = document.getElementById('root'); const root = ReactDOM.createRoot(rootElement!); root.render(<App />);
5,785
0
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts
petrpan-code/mui/material-ui/examples/joy-ui-cra-ts/src/react-app-env.d.ts
/// <reference types="react-scripts" />
5,786
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/README.md
# Joy UI - Next.js App Router with TypeScript This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). ## How to use Download the example [or clone the repo](https://github.com/mui/material-ui): <!-- #default-branch-switch --> ```bash curl https://codeload.github.com/mui/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/joy-ui-nextjs-ts cd joy-ui-nextjs-ts ``` Install it and run: ```bash npm install npm run dev ``` Open [http://localhost:3000](http://localhost:3000) with your web browser to see the result. or: <!-- #default-branch-switch --> [![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/mui/material-ui/tree/master/examples/joy-ui-nextjs-ts) [![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/mui/material-ui/tree/master/examples/joy-ui-nextjs-ts) ## Learn more To learn more about this example: - [Next.js documentation](https://nextjs.org/docs) - learn about Next.js features and API. - [Customizing Joy UI](https://mui.com/joy-ui/customization/approaches/) - approaches to customizing Joy UI. ## What's next? <!-- #default-branch-switch --> You now have a working example project. You can head back to the documentation and continue by browsing the [templates](https://mui.com/joy-ui/getting-started/templates/) section.
5,787
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/next.config.js
/** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, swcMinify: true, }; module.exports = nextConfig;
5,788
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/package.json
{ "name": "joy-ui-nextjs-ts", "version": "5.0.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "next lint", "post-update": "echo \"codesandbox preview only, need an update\" && yarn upgrade --latest" }, "dependencies": { "@emotion/cache": "latest", "@emotion/react": "latest", "@emotion/styled": "latest", "@mui/joy": "latest", "next": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "@types/node": "latest", "@types/react": "latest", "@types/react-dom": "latest", "eslint": "latest", "eslint-config-next": "latest", "typescript": "latest" } }
5,789
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/tsconfig.json
{ "compilerOptions": { "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", "incremental": true, "plugins": [ { "name": "next" } ], "paths": { "@/*": ["./src/*"] } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"] }
5,790
0
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/src
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/src/app/layout.tsx
import * as React from 'react'; import ThemeRegistry from '@/components/ThemeRegistry/ThemeRegistry'; export const metadata = { title: 'Create Next App', description: 'Generated by create next app', }; export default function RootLayout({ children }: { children: React.ReactNode }) { return ( <html lang="en"> <body> <ThemeRegistry>{children}</ThemeRegistry> </body> </html> ); }
5,791
0
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/src
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/src/app/page.tsx
import * as React from 'react'; import Sheet from '@mui/joy/Sheet'; import Typography from '@mui/joy/Typography'; import FormControl from '@mui/joy/FormControl'; import FormLabel from '@mui/joy/FormLabel'; import Input from '@mui/joy/Input'; import Button from '@mui/joy/Button'; import Link from '@mui/joy/Link'; export default function Home() { return ( <Sheet sx={{ display: 'flex', flexFlow: 'row nowrap', justifyContent: 'center', alignItems: 'center', minHeight: '100vh', }} > <Sheet sx={{ width: 300, mx: 'auto', my: 4, py: 3, px: 2, display: 'flex', flexDirection: 'column', gap: 2, borderRadius: 'sm', boxShadow: 'md', }} variant="outlined" > <div> <Typography level="h4" component="h1"> <strong>Welcome back ๐Ÿ‘‹</strong> </Typography> <Typography level="body-sm">Sign in to continue.</Typography> </div> <FormControl id="email"> <FormLabel>Email</FormLabel> <Input name="email" type="email" placeholder="[email protected]" /> </FormControl> <FormControl id="password"> <FormLabel>Password</FormLabel> <Input name="password" type="password" placeholder="password" /> </FormControl> <Button sx={{ mt: 1 }}>Log in</Button> <Typography endDecorator={<Link href="/sign-up">Sign up</Link>} fontSize="sm" sx={{ alignSelf: 'center' }} > Don&apos;t have an account? </Typography> </Sheet> </Sheet> ); }
5,792
0
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/src/app
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/src/app/sign-up/page.tsx
import * as React from 'react'; import Sheet from '@mui/joy/Sheet'; import Typography from '@mui/joy/Typography'; import FormControl from '@mui/joy/FormControl'; import FormLabel from '@mui/joy/FormLabel'; import Input from '@mui/joy/Input'; import Button from '@mui/joy/Button'; import Link from '@mui/joy/Link'; export default function SignUp() { return ( <Sheet sx={{ display: 'flex', flexFlow: 'row nowrap', justifyContent: 'center', alignItems: 'center', minHeight: '100vh', }} > <Sheet sx={{ width: 300, mx: 'auto', my: 4, py: 3, px: 2, display: 'flex', flexDirection: 'column', gap: 2, borderRadius: 'sm', boxShadow: 'md', }} variant="outlined" > <div> <Typography level="h4" component="h1"> <strong>Welcome ๐Ÿ‘‹</strong> </Typography> <Typography level="body-sm">Sign up for an account.</Typography> </div> <FormControl> <FormLabel>Email</FormLabel> <Input name="email" type="email" placeholder="[email protected]" /> </FormControl> <FormControl> <FormLabel>Password</FormLabel> <Input name="password" type="password" placeholder="password" /> </FormControl> <Button sx={{ mt: 1 }}>Create account</Button> <Typography endDecorator={<Link href="/">Log in</Link>} fontSize="sm" sx={{ alignSelf: 'center' }} > Already have an account? </Typography> </Sheet> </Sheet> ); }
5,793
0
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/src/components
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/src/components/ThemeRegistry/EmotionCache.tsx
'use client'; import * as React from 'react'; import createCache from '@emotion/cache'; import { useServerInsertedHTML } from 'next/navigation'; import { CacheProvider as DefaultCacheProvider } from '@emotion/react'; import type { EmotionCache, Options as OptionsOfCreateCache } from '@emotion/cache'; export type NextAppDirEmotionCacheProviderProps = { /** This is the options passed to createCache() from 'import createCache from "@emotion/cache"' */ options: Omit<OptionsOfCreateCache, 'insertionPoint'>; /** By default <CacheProvider /> from 'import { CacheProvider } from "@emotion/react"' */ CacheProvider?: (props: { value: EmotionCache; children: React.ReactNode; }) => React.JSX.Element | null; children: React.ReactNode; }; // Adapted from https://github.com/garronej/tss-react/blob/main/src/next/appDir.tsx export default function NextAppDirEmotionCacheProvider(props: NextAppDirEmotionCacheProviderProps) { const { options, CacheProvider = DefaultCacheProvider, children } = props; const [registry] = React.useState(() => { const cache = createCache(options); cache.compat = true; const prevInsert = cache.insert; let inserted: { name: string; isGlobal: boolean }[] = []; cache.insert = (...args) => { const [selector, serialized] = args; if (cache.inserted[serialized.name] === undefined) { inserted.push({ name: serialized.name, isGlobal: !selector, }); } return prevInsert(...args); }; const flush = () => { const prevInserted = inserted; inserted = []; return prevInserted; }; return { cache, flush }; }); useServerInsertedHTML(() => { const inserted = registry.flush(); if (inserted.length === 0) { return null; } let styles = ''; let dataEmotionAttribute = registry.cache.key; const globals: { name: string; style: string; }[] = []; inserted.forEach(({ name, isGlobal }) => { const style = registry.cache.inserted[name]; if (typeof style !== 'boolean') { if (isGlobal) { globals.push({ name, style }); } else { styles += style; dataEmotionAttribute += ` ${name}`; } } }); return ( <React.Fragment> {globals.map(({ name, style }) => ( <style key={name} data-emotion={`${registry.cache.key}-global ${name}`} // eslint-disable-next-line react/no-danger dangerouslySetInnerHTML={{ __html: style }} /> ))} {styles && ( <style data-emotion={dataEmotionAttribute} // eslint-disable-next-line react/no-danger dangerouslySetInnerHTML={{ __html: styles }} /> )} </React.Fragment> ); }); return <CacheProvider value={registry.cache}>{children}</CacheProvider>; }
5,794
0
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/src/components
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/src/components/ThemeRegistry/ThemeRegistry.tsx
'use client'; import * as React from 'react'; import { CssVarsProvider } from '@mui/joy/styles'; import CssBaseline from '@mui/joy/CssBaseline'; import NextAppDirEmotionCacheProvider from './EmotionCache'; import theme from './theme'; export default function ThemeRegistry({ children }: { children: React.ReactNode }) { return ( <NextAppDirEmotionCacheProvider options={{ key: 'joy' }}> <CssVarsProvider theme={theme}> <CssBaseline /> {children} </CssVarsProvider> </NextAppDirEmotionCacheProvider> ); }
5,795
0
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/src/components
petrpan-code/mui/material-ui/examples/joy-ui-nextjs-ts/src/components/ThemeRegistry/theme.ts
import { extendTheme } from '@mui/joy/styles'; import { Inter, Source_Code_Pro } from 'next/font/google'; const inter = Inter({ subsets: ['latin'], adjustFontFallback: false, // prevent NextJS from adding its own fallback font fallback: ['var(--joy-fontFamily-fallback)'], // use Joy UI's fallback font display: 'swap', }); const sourceCodePro = Source_Code_Pro({ subsets: ['latin'], adjustFontFallback: false, // prevent NextJS from adding its own fallback font fallback: [ // the default theme's fallback for monospace fonts 'ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', 'monospace', ], display: 'swap', }); const theme = extendTheme({ fontFamily: { body: inter.style.fontFamily, display: inter.style.fontFamily, code: sourceCodePro.style.fontFamily, }, components: { JoyButton: { styleOverrides: { root: ({ ownerState }) => ({ ...(ownerState.color === 'primary' && { backgroundColor: '#4338ca', }), }), }, }, }, }); export default theme;
5,796
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/joy-ui-vite-ts/README.md
# Joy UI - Vite.js in TypeScript example [Joy UI](https://mui.com/joy-ui/getting-started/) is a library of beautifully designed React UI components built to spark joy in the development process. [Vite](https://vitejs.dev/) is a build tool that aims to provide a faster and leaner development experience for modern web projects, consisting of a dev server and a build command. ## How to use Download the example [or clone the repo](https://github.com/mui/material-ui): ```bash curl https://codeload.github.com/mui/material-ui/tar.gz/master | tar -xz --strip=2 material-ui-master/examples/joy-ui-vite-ts cd joy-ui-vite-ts ``` Install it and run: ```bash npm install npm run dev ``` or: <!-- #default-branch-switch --> [![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/mui/material-ui/tree/master/examples/joy-ui-vite-ts) [![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/mui/material-ui/tree/master/examples/joy-ui-vite-ts) ## The idea behind the example This example uses [Vite.js](https://github.com/vitejs/vite). It includes `@mui/joy` and it's peer dependencies. ## What's next? <!-- #default-branch-switch --> You now have a working example project. You can head back to the documentation and continue by browsing the [templates](https://mui.com/joy-ui/getting-started/templates/) section.
5,797
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/joy-ui-vite-ts/index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" /> <meta name="viewport" content="initial-scale=1, width=device-width" /> <title>Vite + Joy UI + TS</title> <!-- Fonts to support Joy Design --> <link rel="preconnect" href="https://fonts.googleapis.com" /> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" /> </head> <body> <div id="root"></div> <script type="module" src="/src/main.tsx"></script> </body> </html>
5,798
0
petrpan-code/mui/material-ui/examples
petrpan-code/mui/material-ui/examples/joy-ui-vite-ts/package.json
{ "name": "joy-ui-vite-ts", "private": true, "version": "5.0.0", "type": "module", "scripts": { "dev": "vite", "build": "tsc && vite build", "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { "@emotion/react": "latest", "@emotion/styled": "latest", "@mui/joy": "latest", "react": "latest", "react-dom": "latest" }, "devDependencies": { "@types/react": "latest", "@types/react-dom": "latest", "@vitejs/plugin-react": "latest", "typescript": "latest", "vite": "latest" } }
5,799