Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Implement the new API display design #37405

Merged
merged 98 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from 66 commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
bbabcc1
WIP
alexfauquette May 26, 2023
5e85fe4
add alerts
alexfauquette May 26, 2023
e906bee
use `<li>` instead of `<br>` for listing props description
alexfauquette May 29, 2023
39e1137
few style imrovement
alexfauquette May 29, 2023
16c640a
test new interactions
alexfauquette May 29, 2023
6ed87f2
light mode color adjustments
danilo-leal May 29, 2023
2bed3d2
Merge branch 'new-api-page' of https://github.com/alexfauquette/mater…
danilo-leal May 29, 2023
71f8a89
dark mode color adjustments
danilo-leal May 29, 2023
a78301b
more color adjusments
danilo-leal May 29, 2023
88197c9
minor tweaks
danilo-leal May 29, 2023
d05a93a
fix lint
danilo-leal May 29, 2023
420a443
further customizations + anchor link consistency between API & Markdown
danilo-leal May 29, 2023
a65d473
remove comments
alexfauquette May 30, 2023
ab76fa4
make hash works on base pages too
alexfauquette May 30, 2023
c26daa9
remove comments
alexfauquette May 30, 2023
afde5e2
simplify
alexfauquette May 30, 2023
0dc7b55
move slots
alexfauquette May 30, 2023
59451ee
fix
alexfauquette May 30, 2023
0269b3f
add typography spread back so we don't lose scroll anchoring
danilo-leal May 31, 2023
f419de7
switch border color to divider
danilo-leal May 31, 2023
c4e4b04
update docs:api
alexfauquette Jun 2, 2023
019e15c
run script
alexfauquette Jun 2, 2023
49b7ad2
update properties list
alexfauquette Jun 2, 2023
4adddae
Fix hook issues
alexfauquette Jun 2, 2023
033996c
Migrate Classes
alexfauquette Jun 2, 2023
ba49f31
Move the State information in note
alexfauquette Jun 2, 2023
c36a121
fix classenames and use translation
alexfauquette Jun 2, 2023
ea95686
style the signature
alexfauquette Jun 2, 2023
4ddee2a
border color tweak
danilo-leal Jun 5, 2023
b2c3c73
fix default prop class name
danilo-leal Jun 5, 2023
206c466
signature section color tweaks
danilo-leal Jun 5, 2023
2935ba2
making inline code block consistent with other code blocks across API…
danilo-leal Jun 5, 2023
856770f
bump up space a bit more
danilo-leal Jun 5, 2023
8a5930c
remove extra divider space
danilo-leal Jun 5, 2023
36077df
simplify copywriting in the repeating "You can learn..."
danilo-leal Jun 5, 2023
db9c22f
minor padding tweaks
danilo-leal Jun 5, 2023
cb5a5e3
Merge remote-tracking branch 'upstream/master' into new-api-page
alexfauquette Jun 9, 2023
bbf9a0f
docs:api
alexfauquette Jun 9, 2023
0bb0b22
add to clipboard
alexfauquette Jun 9, 2023
d8b56c6
Merge remote-tracking branch 'origin/master' into pr/37405
danilo-leal Jun 12, 2023
2a58647
Merge branch 'new-api-page' of https://github.com/alexfauquette/mater…
danilo-leal Jun 12, 2023
1b07615
Merge remote-tracking branch 'upstream/master' into new-api-page
alexfauquette Jun 13, 2023
afb8cea
scripts
alexfauquette Jun 13, 2023
b606142
Flavien's feedback: do not add empty objects
alexfauquette Jun 13, 2023
e3333b2
run script, save bytes \o/
alexfauquette Jun 13, 2023
1e20581
a few styling tweaks
danilo-leal Jun 14, 2023
6df9fda
danail proposal
alexfauquette Jun 15, 2023
4309a8b
fix special characters
alexfauquette Jun 15, 2023
ece6fa0
add extensions
alexfauquette Jun 16, 2023
82afdf6
hide link when too big
alexfauquette Jun 16, 2023
3d58342
feedbacks
alexfauquette Jun 22, 2023
bd3b658
Merge remote-tracking branch 'upstream/master' into new-api-page
alexfauquette Jun 29, 2023
c4b9cd0
remove added files
alexfauquette Jun 29, 2023
f699137
fix position
alexfauquette Jun 29, 2023
50d7e13
style changes and simplifications + remove "<br/>" from caveat with r…
danilo-leal Jun 29, 2023
ca5f882
yarn docs:api
danilo-leal Jun 29, 2023
004d812
remove unused object properties
alexfauquette Jun 30, 2023
2ff9036
remove <br>
alexfauquette Jun 30, 2023
310f4a2
fix scripts
alexfauquette Jun 30, 2023
a63d478
show arg name in signature
alexfauquette Jun 30, 2023
d7172aa
Andrew feedback
alexfauquette Jun 30, 2023
0bb0a36
rotate the svg link icon when currently selected + positioning adjust…
danilo-leal Jun 30, 2023
7bb7ce5
styling adjustments to Base's Global class and Default props items
danilo-leal Jun 30, 2023
e3afb92
Matt feedback
alexfauquette Jul 5, 2023
e977830
Merge branch 'new-api-page' of github.com:alexfauquette/material-ui i…
alexfauquette Jul 5, 2023
8cd700a
add divider
alexfauquette Jul 5, 2023
db87e1b
customizing code blocks colors
danilo-leal Jul 5, 2023
9965a1c
Merge remote-tracking branch 'upstream/master' into new-api-page
alexfauquette Jul 6, 2023
021d549
Update Alert
alexfauquette Jul 6, 2023
645c9b3
run script
alexfauquette Jul 6, 2023
ae24bda
Merge branch 'new-api-page' of github.com:alexfauquette/material-ui i…
alexfauquette Jul 6, 2023
e3718d5
make blocks different
alexfauquette Jul 6, 2023
64e1a18
use owner state
alexfauquette Jul 6, 2023
cc695ad
change default & signature paragraph font weight
danilo-leal Jul 6, 2023
ef045d2
Merge branch 'new-api-page' of https://github.com/alexfauquette/mater…
danilo-leal Jul 6, 2023
5fcd46d
add colon to "Signature"
danilo-leal Jul 6, 2023
e010564
remove duplicated "State" text
danilo-leal Jul 6, 2023
25ca0c0
customize the item note text visuals
danilo-leal Jul 6, 2023
c916b66
yarn prettier
danilo-leal Jul 6, 2023
703339d
change warning color back to yellow
danilo-leal Jul 10, 2023
21203d4
fix colors
danilo-leal Jul 10, 2023
272d95e
fix icon consistency
danilo-leal Jul 14, 2023
3a735c5
aligne props items
alexfauquette Jul 18, 2023
b843afd
Merge remote-tracking branch 'upstream/master' into new-api-page
alexfauquette Jul 18, 2023
978f78c
Merge remote-tracking branch 'upstream/master' into new-api-page
alexfauquette Jul 18, 2023
e4f12e1
docs:api
alexfauquette Jul 18, 2023
da3686d
fix
alexfauquette Jul 18, 2023
f8028b9
Add a feedback header
alexfauquette Jul 18, 2023
eaae9f2
customize the feedback alert
danilo-leal Jul 18, 2023
a9c1e62
remove breaking spaces
alexfauquette Jul 19, 2023
bd8b09b
replace all
alexfauquette Jul 19, 2023
31f1471
Merge remote-tracking branch 'origin/master' into pr/37405
danilo-leal Jul 19, 2023
e5a962e
updating colors and ditching the divider on the alert
danilo-leal Jul 19, 2023
bc4a06e
swap content order out
danilo-leal Jul 19, 2023
a897a4e
color adjustment
danilo-leal Jul 19, 2023
1447823
change the icon on the alert
danilo-leal Jul 19, 2023
301c99f
put the "ref is forwarded to the root" text in a callout and remove i…
danilo-leal Jul 19, 2023
b385919
update copywriting
danilo-leal Jul 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/badge.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ badge?: elementType, root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
}
},
"name": "Badge",
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/button.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
}
},
"name": "Button",
Expand Down
5 changes: 4 additions & 1 deletion docs/pages/base-ui/api/focus-trap.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"disableAutoFocus": { "type": { "name": "bool" }, "default": "false" },
"disableEnforceFocus": { "type": { "name": "bool" }, "default": "false" },
"disableRestoreFocus": { "type": { "name": "bool" }, "default": "false" },
"getTabbable": { "type": { "name": "func" } },
"getTabbable": {
"type": { "name": "func" },
"signature": { "type": "function(root: HTMLElement) => void", "describedArgs": [] }
},
"isEnabled": {
"type": { "name": "func" },
"default": "function defaultIsEnabled(): boolean {\n return true;\n}"
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/form-control.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
},
"value": { "type": { "name": "any" } }
},
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"name": "shape",
"description": "{ input?: elementType, root?: elementType, textarea?: elementType }"
},
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
},
"startAdornment": { "type": { "name": "node" } },
"type": {
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/menu-item.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
}
},
"name": "MenuItem",
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ listbox?: elementType, root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
}
},
"name": "Menu",
Expand Down
11 changes: 9 additions & 2 deletions docs/pages/base-ui/api/modal.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
"deprecated": true,
"deprecationInfo": "Use the <code>onClose</code> prop with the <code>reason</code> argument to handle the <code>backdropClick</code> events."
},
"onClose": { "type": { "name": "func" } },
"onClose": {
"type": { "name": "func" },
"signature": {
"type": "function(event: object, reason: string) => void",
"describedArgs": ["event", "reason"]
}
},
"onTransitionEnter": { "type": { "name": "func" } },
"onTransitionExited": { "type": { "name": "func" } },
"slotProps": {
Expand All @@ -29,7 +35,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ backdrop?: elementType, root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
}
},
"name": "Modal",
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/option-group.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"name": "shape",
"description": "{ label?: elementType, list?: elementType, root?: elementType }"
},
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
}
},
"name": "OptionGroup",
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/option.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
}
},
"name": "Option",
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/popper.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
},
"transition": { "type": { "name": "bool" }, "default": "false" }
},
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/select.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"name": "shape",
"description": "{ listbox?: elementType, popper?: elementType, root?: elementType }"
},
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
},
"value": { "type": { "name": "any" } }
},
Expand Down
38 changes: 32 additions & 6 deletions docs/pages/base-ui/api/slider.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@
},
"disabled": { "type": { "name": "bool" }, "default": "false" },
"disableSwap": { "type": { "name": "bool" }, "default": "false" },
"getAriaLabel": { "type": { "name": "func" } },
"getAriaValueText": { "type": { "name": "func" } },
"getAriaLabel": {
"type": { "name": "func" },
"signature": { "type": "function(index: number) => string", "describedArgs": ["index"] }
},
"getAriaValueText": {
"type": { "name": "func" },
"signature": {
"type": "function(value: number, index: number) => string",
"describedArgs": ["value", "index"]
}
},
"isRtl": { "type": { "name": "bool" }, "default": "false" },
"marks": {
"type": {
Expand All @@ -21,13 +30,29 @@
"max": { "type": { "name": "number" }, "default": "100" },
"min": { "type": { "name": "number" }, "default": "0" },
"name": { "type": { "name": "string" } },
"onChange": { "type": { "name": "func" } },
"onChangeCommitted": { "type": { "name": "func" } },
"onChange": {
"type": { "name": "func" },
"signature": {
"type": "function(event: Event, value: number | Array<number>, activeThumb: number) => void",
"describedArgs": ["event", "value", "activeThumb"]
}
},
"onChangeCommitted": {
"type": { "name": "func" },
"signature": {
"type": "function(event: React.SyntheticEvent | Event, value: number | Array<number>) => void",
"describedArgs": ["event", "value"]
}
},
"orientation": {
"type": { "name": "enum", "description": "'horizontal'<br>&#124;&nbsp;'vertical'" },
"default": "'horizontal'"
},
"scale": { "type": { "name": "func" }, "default": "function Identity(x) {\n return x;\n}" },
"scale": {
"type": { "name": "func" },
"default": "function Identity(x) {\n return x;\n}",
"signature": { "type": "function(x: any) => any", "describedArgs": [] }
},
"slotProps": {
"type": {
"name": "shape",
Expand All @@ -40,7 +65,8 @@
"name": "shape",
"description": "{ input?: elementType, mark?: elementType, markLabel?: elementType, rail?: elementType, root?: elementType, thumb?: elementType, track?: elementType, valueLabel?: elementType }"
},
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
},
"step": { "type": { "name": "number" }, "default": "1" },
"tabIndex": { "type": { "name": "number" } },
Expand Down
11 changes: 9 additions & 2 deletions docs/pages/base-ui/api/snackbar.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
"autoHideDuration": { "type": { "name": "number" }, "default": "null" },
"disableWindowBlurListener": { "type": { "name": "bool" }, "default": "false" },
"exited": { "type": { "name": "bool" }, "default": "true" },
"onClose": { "type": { "name": "func" } },
"onClose": {
"type": { "name": "func" },
"signature": {
"type": "function(event: React.SyntheticEvent<any> | Event, reason: string) => void",
"describedArgs": ["event", "reason"]
}
},
"open": { "type": { "name": "bool" } },
"resumeHideDuration": { "type": { "name": "number" } },
"slotProps": {
Expand All @@ -15,7 +21,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
}
},
"name": "Snackbar",
Expand Down
11 changes: 9 additions & 2 deletions docs/pages/base-ui/api/switch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
"checked": { "type": { "name": "bool" } },
"defaultChecked": { "type": { "name": "bool" } },
"disabled": { "type": { "name": "bool" } },
"onChange": { "type": { "name": "func" } },
"onChange": {
"type": { "name": "func" },
"signature": {
"type": "function(event: React.ChangeEvent<HTMLInputElement>) => void",
"describedArgs": ["event"]
}
},
"readOnly": { "type": { "name": "bool" } },
"required": { "type": { "name": "bool" } },
"slotProps": {
Expand All @@ -18,7 +24,8 @@
"name": "shape",
"description": "{ input?: elementType, root?: elementType, thumb?: elementType, track?: elementType<br>&#124;&nbsp;null }"
},
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
}
},
"name": "Switch",
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/tab-panel.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
},
"value": { "type": { "name": "union", "description": "number<br>&#124;&nbsp;string" } }
},
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/tab.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
},
"value": { "type": { "name": "union", "description": "number<br>&#124;&nbsp;string" } }
},
Expand Down
23 changes: 19 additions & 4 deletions docs/pages/base-ui/api/table-pagination.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
{
"props": {
"count": { "type": { "name": "number" }, "required": true },
"onPageChange": { "type": { "name": "func" }, "required": true },
"onPageChange": {
"type": { "name": "func" },
"required": true,
"signature": {
"type": "function(event: React.MouseEvent<HTMLButtonElement> | null, page: number) => void",
"describedArgs": ["event", "page"]
}
},
"page": { "type": { "name": "custom", "description": "integer" }, "required": true },
"rowsPerPage": { "type": { "name": "custom", "description": "integer" }, "required": true },
"getItemAriaLabel": {
"type": { "name": "func" },
"default": "function defaultGetAriaLabel(type: ItemAriaLabelType) {\n return `Go to ${type} page`;\n}"
"default": "function defaultGetAriaLabel(type: ItemAriaLabelType) {\n return `Go to ${type} page`;\n}",
"signature": { "type": "function(type: string) => string", "describedArgs": ["type"] }
},
"labelDisplayedRows": {
"type": { "name": "func" },
"default": "function defaultLabelDisplayedRows({ from, to, count }: LabelDisplayedRowsArgs) {\n return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;\n}"
},
"labelId": { "type": { "name": "string" } },
"labelRowsPerPage": { "type": { "name": "node" }, "default": "'Rows per page:'" },
"onRowsPerPageChange": { "type": { "name": "func" } },
"onRowsPerPageChange": {
"type": { "name": "func" },
"signature": {
"type": "function(event: React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>) => void",
"describedArgs": ["event"]
}
},
"rowsPerPageOptions": {
"type": {
"name": "arrayOf",
Expand All @@ -35,7 +49,8 @@
"name": "shape",
"description": "{ actions?: elementType, displayedRows?: elementType, menuItem?: elementType, root?: elementType, select?: elementType, selectLabel?: elementType, spacer?: elementType, toolbar?: elementType }"
},
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
}
},
"name": "TablePagination",
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/tabs-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
}
},
"name": "TabsList",
Expand Down
3 changes: 2 additions & 1 deletion docs/pages/base-ui/api/tabs.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
},
"slots": {
"type": { "name": "shape", "description": "{ root?: elementType }" },
"default": "{}"
"default": "{}",
"additionalPropsInfo": { "slotsApi": true }
},
"value": { "type": { "name": "union", "description": "number<br>&#124;&nbsp;string" } }
},
Expand Down
13 changes: 13 additions & 0 deletions docs/pages/base-ui/react-all-components/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocsV2';
import AppFrame from 'docs/src/modules/components/AppFrame';
import * as pageProps from 'docs/data/base/components/all-components/all-components.md?@mui/markdown';

export default function Page(props) {
const { userLanguage, ...other } = props;
return <MarkdownDocs {...pageProps} {...other} />;
}

Page.getLayout = (page) => {
return <AppFrame>{page}</AppFrame>;
};
7 changes: 0 additions & 7 deletions docs/pages/base-ui/react-components/index.js

This file was deleted.

Loading