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

[Joy] Add Autocomplete component #34315

Merged
merged 211 commits into from Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from 186 commits
Commits
Show all changes
211 commits
Select commit Hold shift + click to select a range
195cc86
init Autocomplete
siriwatknp Sep 1, 2022
df7f749
fix Select component slot
siriwatknp Sep 1, 2022
b394bf2
add flex none to prevent children shrink
siriwatknp Sep 1, 2022
5988f3a
add internal outline-inside
siriwatknp Sep 1, 2022
d4a35c0
add focus thickness variable
siriwatknp Sep 1, 2022
d361523
temp
siriwatknp Sep 1, 2022
1e198a0
add types
siriwatknp Sep 1, 2022
864a708
update styles
siriwatknp Sep 1, 2022
2be4a82
update chip label
siriwatknp Sep 2, 2022
a8aa5b4
bind controls id
siriwatknp Sep 3, 2022
44e606b
adjust Input to use values from form control
siriwatknp Sep 3, 2022
aeccd76
add classes to form control
siriwatknp Sep 3, 2022
c231fcb
use context for input
siriwatknp Sep 3, 2022
ed7dcc1
use context for Textarea
siriwatknp Sep 3, 2022
6d2826e
fix color
siriwatknp Sep 3, 2022
d1d61cc
add composition demo to textfield
siriwatknp Sep 3, 2022
60cd8e5
use FormControl
siriwatknp Sep 3, 2022
2023929
move to accessibility section
siriwatknp Sep 3, 2022
9a3593a
add registerEffect
siriwatknp Sep 3, 2022
f31452e
add tests
siriwatknp Sep 3, 2022
012636f
run proptypes
siriwatknp Sep 3, 2022
00b9cfa
run docs:formatted
siriwatknp Sep 3, 2022
514dbd7
fix id
siriwatknp Sep 3, 2022
d95645e
fix size bug
siriwatknp Sep 5, 2022
2f36905
fix list item classes
siriwatknp Sep 5, 2022
696f193
Add ListSubheader
siriwatknp Sep 5, 2022
46f6dcd
update demos
siriwatknp Sep 5, 2022
e58a034
add tests
siriwatknp Sep 5, 2022
2749ab0
remove instance size from MenuList
siriwatknp Sep 5, 2022
9dc1b38
fix Menu List integration
siriwatknp Sep 5, 2022
44a7062
remove unnecessary instanceSize
siriwatknp Sep 5, 2022
d2715f7
remove classes from ListItem props
siriwatknp Sep 5, 2022
6742f1d
add classes
siriwatknp Sep 5, 2022
654b31f
fix role calculation
siriwatknp Sep 5, 2022
017648e
unskip theme variant test
siriwatknp Sep 5, 2022
fc128e9
fix List size logic
siriwatknp Sep 5, 2022
841e4fa
update MenuListGroup demo
siriwatknp Sep 5, 2022
ed4e51f
rename playground to exclude it from argos
siriwatknp Sep 5, 2022
6cf0c92
fix Input styles
siriwatknp Sep 5, 2022
5502b2c
add comment
siriwatknp Sep 5, 2022
e1355d1
update demo
siriwatknp Sep 5, 2022
95deebe
update TabsDemo
siriwatknp Sep 5, 2022
a889a0b
fix flex
siriwatknp Sep 5, 2022
797e559
run proptypes
siriwatknp Sep 5, 2022
13ff783
fix proptypes
siriwatknp Sep 5, 2022
dfe2673
Merge branch 'joy/misc-fixes13' into joy/list-subheader2
siriwatknp Sep 5, 2022
e9155f4
run proptypes
siriwatknp Sep 5, 2022
af1466e
add tests
siriwatknp Sep 5, 2022
60f1527
add typescript test
siriwatknp Sep 5, 2022
1d796e5
Merge branch 'joy/list-subheader2' into joy/autocomplete2
siriwatknp Sep 5, 2022
580c704
Merge branch 'joy/form-control' into joy/autocomplete2
siriwatknp Sep 5, 2022
e19773b
wip
siriwatknp Sep 5, 2022
4d4edd9
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Sep 10, 2022
6e76c2c
add internal param to fix onBlur
siriwatknp Sep 10, 2022
f0b6348
add popper default modifiers
siriwatknp Sep 10, 2022
78ec504
use form control to get unique id
siriwatknp Sep 10, 2022
f931e8e
set position to initial for grouped options
siriwatknp Sep 11, 2022
2941610
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Sep 12, 2022
712dab2
mark focusVisible as optional
siriwatknp Sep 13, 2022
e969fcf
fix types
siriwatknp Sep 13, 2022
90ba76a
remove unnecessary classes
siriwatknp Sep 13, 2022
6e7edcd
run proptypes
siriwatknp Sep 13, 2022
fa2fb13
cleanup unused props
siriwatknp Sep 13, 2022
cf530dd
mark classNamePrefix as internal
siriwatknp Sep 13, 2022
2ea14aa
renderInput is not required
siriwatknp Sep 13, 2022
4bc5ed6
add comment
siriwatknp Sep 13, 2022
621a68f
init demos
siriwatknp Sep 13, 2022
3537a9b
add AutocompleteOption
siriwatknp Sep 14, 2022
57ad948
add more demos
siriwatknp Sep 14, 2022
749f2f3
add free solo dialog
siriwatknp Sep 14, 2022
609e3be
add grouped demo
siriwatknp Sep 14, 2022
9f43a0a
add disabled options demo
siriwatknp Sep 14, 2022
8230e33
temp Async demo
siriwatknp Sep 14, 2022
1180fba
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Sep 14, 2022
0f56208
add Async demo
siriwatknp Sep 14, 2022
8e6118c
chip: support onDelete
siriwatknp Sep 14, 2022
4d9251b
replace tag with limitTag
siriwatknp Sep 14, 2022
cc476cc
add demos
siriwatknp Sep 14, 2022
13421fe
fix color
siriwatknp Sep 14, 2022
f687527
fix sizes and add demo
siriwatknp Sep 14, 2022
d6d6e8d
add size demo
siriwatknp Sep 14, 2022
da74086
add Highlight demo
siriwatknp Sep 14, 2022
28203b4
add filter demo
siriwatknp Sep 14, 2022
9b74b02
minor fixes
siriwatknp Sep 14, 2022
1bce563
add InputAppearance demo
siriwatknp Sep 14, 2022
da20ff2
fix free solo without options
siriwatknp Sep 15, 2022
cab4bde
update content
siriwatknp Sep 15, 2022
13b96df
run proptypes
siriwatknp Sep 15, 2022
3c3b3b7
completeness
siriwatknp Sep 15, 2022
8e3b69c
fix typo
siriwatknp Sep 15, 2022
44c855f
add Error demo
siriwatknp Sep 15, 2022
a87f826
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Sep 15, 2022
dc65376
revert Select
siriwatknp Sep 15, 2022
60baf89
revert Textarea
siriwatknp Sep 15, 2022
6407bce
add outline-inside
siriwatknp Sep 15, 2022
f06b7f7
fix lint
siriwatknp Sep 15, 2022
96d9b83
run proptypes
siriwatknp Sep 15, 2022
5a95889
revert change
siriwatknp Sep 15, 2022
5ca62fa
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Sep 15, 2022
f77ef6f
add description
siriwatknp Sep 15, 2022
338b0f9
fix lint
siriwatknp Sep 15, 2022
460a3ba
revert change
siriwatknp Sep 15, 2022
17c29dd
try listbox slot
siriwatknp Sep 22, 2022
82392ae
add GithubLabel demo
siriwatknp Sep 22, 2022
ba369ce
add AutocompleteListbox
siriwatknp Sep 23, 2022
fb2e0e8
fix classname
siriwatknp Sep 23, 2022
d5130d6
move AutocompleteListbox into a separate component
siriwatknp Sep 23, 2022
e4bc286
add virtualize demo
siriwatknp Sep 23, 2022
9dc385f
add comment
siriwatknp Sep 23, 2022
6b28251
filter PopperUnstyled props
siriwatknp Sep 23, 2022
47da26e
update demo
siriwatknp Sep 23, 2022
f8d45cd
run proptypes
siriwatknp Sep 23, 2022
26b4e9b
add useSlot util
siriwatknp Sep 23, 2022
3300a98
use other instead of props
siriwatknp Sep 23, 2022
75e0d33
update Autocomplete with useSlot
siriwatknp Sep 23, 2022
bea21e9
reexport mergeSlot
siriwatknp Sep 23, 2022
dbac62b
make renderInput required
siriwatknp Sep 23, 2022
828c903
fix demos
siriwatknp Sep 23, 2022
64da477
remove 'context'
siriwatknp Sep 26, 2022
9e574b6
add theme spec
siriwatknp Sep 26, 2022
c3f1876
add initial tests
siriwatknp Sep 26, 2022
706cd21
test: add loading test
siriwatknp Sep 26, 2022
1c870ae
test: add more
siriwatknp Sep 26, 2022
afe605f
use Cancel icon
siriwatknp Sep 26, 2022
b407610
add tests
siriwatknp Sep 26, 2022
a60b0c5
fix tag delete
siriwatknp Sep 26, 2022
fb08c0c
test: add more
siriwatknp Sep 26, 2022
b1a1cd5
test: add more
siriwatknp Sep 26, 2022
fdc15d9
test: add mroe
siriwatknp Sep 26, 2022
7d49b1c
test: add warning tests
siriwatknp Sep 26, 2022
74f8506
test: add more
siriwatknp Sep 26, 2022
282952f
test: complete tests
siriwatknp Sep 26, 2022
c409c54
add option slot
siriwatknp Sep 26, 2022
dff35c7
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Sep 27, 2022
706cfb7
add test for AutocompleteOption
siriwatknp Sep 27, 2022
324c2b2
add tests for AutocompleteListbox
siriwatknp Sep 27, 2022
b56a3bb
fix dep cycle
siriwatknp Sep 27, 2022
c20545c
fix tests
siriwatknp Sep 27, 2022
8267c24
add option to spec
siriwatknp Sep 27, 2022
e59bb0a
add useSlot
siriwatknp Sep 27, 2022
d1ff73e
add single slot test
siriwatknp Sep 27, 2022
726c346
complete useSlot
siriwatknp Sep 28, 2022
a3f1c3b
revert to components and componentsProps
siriwatknp Sep 28, 2022
21f33c9
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Sep 28, 2022
31d76ac
Merge branch 'joy/use-slot' into joy/autocomplete
siriwatknp Sep 28, 2022
4e7f044
fix useSlot
siriwatknp Sep 28, 2022
0dc83e3
simplify useSlot logic
siriwatknp Sep 28, 2022
e181cac
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Sep 28, 2022
9f8910d
follow new format
siriwatknp Sep 28, 2022
22f73de
fix select
siriwatknp Sep 28, 2022
7f506cb
mark internal logic as unstable
siriwatknp Sep 28, 2022
d96e7b7
revert
siriwatknp Sep 28, 2022
02097d0
revert change
siriwatknp Sep 28, 2022
cdbe831
run proptypes
siriwatknp Sep 28, 2022
41341a7
fix proptypes
siriwatknp Sep 28, 2022
fd94bf4
fix lint
siriwatknp Sep 28, 2022
c0cc5c3
fix minor issues
siriwatknp Sep 28, 2022
535b9e4
fix outline-offset
siriwatknp Sep 28, 2022
54a1e22
rename variables to unstable_
siriwatknp Sep 28, 2022
cd37f8e
update demo
siriwatknp Sep 28, 2022
61fe7c7
fix useSlot and add tests
siriwatknp Sep 28, 2022
9780a9d
fix test
siriwatknp Sep 28, 2022
60e9b96
Merge branch 'master' into joy/autocomplete
siriwatknp Oct 4, 2022
c817bac
Apply suggestions from code review
siriwatknp Oct 19, 2022
1304c13
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Oct 21, 2022
167a4b4
Merge branch 'joy/autocomplete' of github.com:siriwatknp/material-ui …
siriwatknp Oct 21, 2022
44e3181
run proptypes
siriwatknp Oct 21, 2022
ef3e835
use _ to indicate internal variables
siriwatknp Oct 21, 2022
608f18b
Fix chip variables
siriwatknp Oct 21, 2022
42cc8ac
fix input variables
siriwatknp Oct 21, 2022
ccc1de1
fix internal input variable reference
siriwatknp Oct 21, 2022
7facf3c
Move Chip-minHeight to start decorator
siriwatknp Oct 21, 2022
91d754b
minor stuff
danilo-leal Oct 26, 2022
aac1fb6
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Oct 30, 2022
3e653eb
add focused style
siriwatknp Oct 31, 2022
3b8409a
update contents
siriwatknp Oct 31, 2022
9b1381b
Merge branch 'joy/autocomplete' of github.com:siriwatknp/material-ui …
siriwatknp Oct 31, 2022
58ba9c3
remove confused info
siriwatknp Oct 31, 2022
1717890
fix types
siriwatknp Oct 31, 2022
edfdd3b
only inherit components with only styles
siriwatknp Oct 31, 2022
badff02
add freeSolo
siriwatknp Oct 31, 2022
8e35862
simplify filter logic
siriwatknp Oct 31, 2022
8367e02
run proptypes
siriwatknp Oct 31, 2022
5c53f78
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Nov 2, 2022
611d97f
fix highlight issue
siriwatknp Nov 2, 2022
a244ab0
update comment and docs
siriwatknp Nov 2, 2022
a75bbc3
remove unstable prefix
siriwatknp Nov 4, 2022
3ae7a05
use defaultModifiers
siriwatknp Nov 4, 2022
367eda4
replace renderInput with slot
siriwatknp Nov 4, 2022
cf7548f
fix aria
siriwatknp Nov 4, 2022
0e844ca
fix disabled with form control
siriwatknp Nov 4, 2022
c7dde30
update start/end decorators
siriwatknp Nov 4, 2022
a7210ef
add type to html input
siriwatknp Nov 4, 2022
da9e781
update demos
siriwatknp Nov 4, 2022
78ceb05
add inputWrapper slot
siriwatknp Nov 4, 2022
38241cd
add decorators demo
siriwatknp Nov 4, 2022
df661ea
run docs:typescript
siriwatknp Nov 4, 2022
565e231
use `wrapper`
siriwatknp Nov 5, 2022
619a25a
remove `disablePortal` prop
siriwatknp Nov 5, 2022
9c3daa6
add CSS variables playground
siriwatknp Nov 5, 2022
055e1aa
run proptypes
siriwatknp Nov 5, 2022
5f473bc
run docs:typescript
siriwatknp Nov 5, 2022
65095af
set default variant mapping
siriwatknp Nov 5, 2022
e550038
minor fixes
siriwatknp Nov 5, 2022
9537f11
adjust content
siriwatknp Nov 5, 2022
bf9c233
add wrapper-gap variable
siriwatknp Nov 7, 2022
eeee7c4
fix default value
siriwatknp Nov 7, 2022
19448fe
Merge branch 'master' of https://github.com/mui/material-ui into joy/…
siriwatknp Nov 7, 2022
dfd50c2
Allow chip radius to be customized from parent
siriwatknp Nov 7, 2022
a531607
update docs
siriwatknp Nov 7, 2022
fe10864
remove the anatomy section
siriwatknp Nov 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
137 changes: 137 additions & 0 deletions docs/data/joy/components/autocomplete/Asynchronous.js
@@ -0,0 +1,137 @@
import * as React from 'react';
import FormControl from '@mui/joy/FormControl';
import FormLabel from '@mui/joy/FormLabel';
import Input from '@mui/joy/Input';
import Autocomplete from '@mui/joy/Autocomplete';
import CircularProgress from '@mui/joy/CircularProgress';

function sleep(delay = 0) {
return new Promise((resolve) => {
setTimeout(resolve, delay);
});
}

export default function Asynchronous() {
const [open, setOpen] = React.useState(false);
const [options, setOptions] = React.useState([]);
const loading = open && options.length === 0;

React.useEffect(() => {
let active = true;

if (!loading) {
return undefined;
}

(async () => {
await sleep(1e3); // For demo purposes.

if (active) {
setOptions([...topFilms]);
}
})();

return () => {
active = false;
};
}, [loading]);

React.useEffect(() => {
if (!open) {
setOptions([]);
}
}, [open]);

return (
<FormControl id="asynchronous-demo">
<FormLabel>Asynchronous</FormLabel>
<Autocomplete
sx={{ width: 300 }}
open={open}
onOpen={() => {
setOpen(true);
}}
onClose={() => {
setOpen(false);
}}
isOptionEqualToValue={(option, value) => option.title === value.title}
getOptionLabel={(option) => option.title}
options={options}
loading={loading}
renderInput={(params) => (
<Input
{...params}
placeholder="Asynchronous"
endDecorator={
<React.Fragment>
{loading ? (
<CircularProgress
size="sm"
sx={{ bgcolor: 'background.surface' }}
/>
) : null}
{params.endDecorator}
</React.Fragment>
}
sx={{
...(loading && {
'--Autocomplete-endDecorator-count': 3,
}),
}}
/>
)}
/>
</FormControl>
);
}

// Top films as rated by IMDb users. http://www.imdb.com/chart/top
const topFilms = [
{ title: 'The Shawshank Redemption', year: 1994 },
{ title: 'The Godfather', year: 1972 },
{ title: 'The Godfather: Part II', year: 1974 },
{ title: 'The Dark Knight', year: 2008 },
{ title: '12 Angry Men', year: 1957 },
{ title: "Schindler's List", year: 1993 },
{ title: 'Pulp Fiction', year: 1994 },
{
title: 'The Lord of the Rings: The Return of the King',
year: 2003,
},
{ title: 'The Good, the Bad and the Ugly', year: 1966 },
{ title: 'Fight Club', year: 1999 },
{
title: 'The Lord of the Rings: The Fellowship of the Ring',
year: 2001,
},
{
title: 'Star Wars: Episode V - The Empire Strikes Back',
year: 1980,
},
{ title: 'Forrest Gump', year: 1994 },
{ title: 'Inception', year: 2010 },
{
title: 'The Lord of the Rings: The Two Towers',
year: 2002,
},
{ title: "One Flew Over the Cuckoo's Nest", year: 1975 },
{ title: 'Goodfellas', year: 1990 },
{ title: 'The Matrix', year: 1999 },
{ title: 'Seven Samurai', year: 1954 },
{
title: 'Star Wars: Episode IV - A New Hope',
year: 1977,
},
{ title: 'City of God', year: 2002 },
{ title: 'Se7en', year: 1995 },
{ title: 'The Silence of the Lambs', year: 1991 },
{ title: "It's a Wonderful Life", year: 1946 },
{ title: 'Life Is Beautiful', year: 1997 },
{ title: 'The Usual Suspects', year: 1995 },
{ title: 'Léon: The Professional', year: 1994 },
{ title: 'Spirited Away', year: 2001 },
{ title: 'Saving Private Ryan', year: 1998 },
{ title: 'Once Upon a Time in the West', year: 1968 },
{ title: 'American History X', year: 1998 },
{ title: 'Interstellar', year: 2014 },
];
149 changes: 149 additions & 0 deletions docs/data/joy/components/autocomplete/AutocompleteError.js
@@ -0,0 +1,149 @@
import * as React from 'react';
import FormControl from '@mui/joy/FormControl';
import FormLabel from '@mui/joy/FormLabel';
import FormHelperText from '@mui/joy/FormHelperText';
import Autocomplete from '@mui/joy/Autocomplete';
import Input from '@mui/joy/Input';

export default function InputAppearance() {
return (
<FormControl error>
<FormLabel>Invalid</FormLabel>
<Autocomplete
placeholder="wrong"
options={top100Films}
renderInput={(params) => <Input {...params} placeholder="Error" />}
sx={{ width: 300 }}
/>
<FormHelperText>Opps! something went wrong.</FormHelperText>
</FormControl>
);
}

// Top 100 films as rated by IMDb users. http://www.imdb.com/chart/top
const top100Films = [
{ label: 'The Shawshank Redemption', year: 1994 },
{ label: 'The Godfather', year: 1972 },
{ label: 'The Godfather: Part II', year: 1974 },
{ label: 'The Dark Knight', year: 2008 },
{ label: '12 Angry Men', year: 1957 },
{ label: "Schindler's List", year: 1993 },
{ label: 'Pulp Fiction', year: 1994 },
{
label: 'The Lord of the Rings: The Return of the King',
year: 2003,
},
{ label: 'The Good, the Bad and the Ugly', year: 1966 },
{ label: 'Fight Club', year: 1999 },
{
label: 'The Lord of the Rings: The Fellowship of the Ring',
year: 2001,
},
{
label: 'Star Wars: Episode V - The Empire Strikes Back',
year: 1980,
},
{ label: 'Forrest Gump', year: 1994 },
{ label: 'Inception', year: 2010 },
{
label: 'The Lord of the Rings: The Two Towers',
year: 2002,
},
{ label: "One Flew Over the Cuckoo's Nest", year: 1975 },
{ label: 'Goodfellas', year: 1990 },
{ label: 'The Matrix', year: 1999 },
{ label: 'Seven Samurai', year: 1954 },
{
label: 'Star Wars: Episode IV - A New Hope',
year: 1977,
},
{ label: 'City of God', year: 2002 },
{ label: 'Se7en', year: 1995 },
{ label: 'The Silence of the Lambs', year: 1991 },
{ label: "It's a Wonderful Life", year: 1946 },
{ label: 'Life Is Beautiful', year: 1997 },
{ label: 'The Usual Suspects', year: 1995 },
{ label: 'Léon: The Professional', year: 1994 },
{ label: 'Spirited Away', year: 2001 },
{ label: 'Saving Private Ryan', year: 1998 },
{ label: 'Once Upon a Time in the West', year: 1968 },
{ label: 'American History X', year: 1998 },
{ label: 'Interstellar', year: 2014 },
{ label: 'Casablanca', year: 1942 },
{ label: 'City Lights', year: 1931 },
{ label: 'Psycho', year: 1960 },
{ label: 'The Green Mile', year: 1999 },
{ label: 'The Intouchables', year: 2011 },
{ label: 'Modern Times', year: 1936 },
{ label: 'Raiders of the Lost Ark', year: 1981 },
{ label: 'Rear Window', year: 1954 },
{ label: 'The Pianist', year: 2002 },
{ label: 'The Departed', year: 2006 },
{ label: 'Terminator 2: Judgment Day', year: 1991 },
{ label: 'Back to the Future', year: 1985 },
{ label: 'Whiplash', year: 2014 },
{ label: 'Gladiator', year: 2000 },
{ label: 'Memento', year: 2000 },
{ label: 'The Prestige', year: 2006 },
{ label: 'The Lion King', year: 1994 },
{ label: 'Apocalypse Now', year: 1979 },
{ label: 'Alien', year: 1979 },
{ label: 'Sunset Boulevard', year: 1950 },
{
label: 'Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb',
year: 1964,
},
{ label: 'The Great Dictator', year: 1940 },
{ label: 'Cinema Paradiso', year: 1988 },
{ label: 'The Lives of Others', year: 2006 },
{ label: 'Grave of the Fireflies', year: 1988 },
{ label: 'Paths of Glory', year: 1957 },
{ label: 'Django Unchained', year: 2012 },
{ label: 'The Shining', year: 1980 },
{ label: 'WALL·E', year: 2008 },
{ label: 'American Beauty', year: 1999 },
{ label: 'The Dark Knight Rises', year: 2012 },
{ label: 'Princess Mononoke', year: 1997 },
{ label: 'Aliens', year: 1986 },
{ label: 'Oldboy', year: 2003 },
{ label: 'Once Upon a Time in America', year: 1984 },
{ label: 'Witness for the Prosecution', year: 1957 },
{ label: 'Das Boot', year: 1981 },
{ label: 'Citizen Kane', year: 1941 },
{ label: 'North by Northwest', year: 1959 },
{ label: 'Vertigo', year: 1958 },
{
label: 'Star Wars: Episode VI - Return of the Jedi',
year: 1983,
},
{ label: 'Reservoir Dogs', year: 1992 },
{ label: 'Braveheart', year: 1995 },
{ label: 'M', year: 1931 },
{ label: 'Requiem for a Dream', year: 2000 },
{ label: 'Amélie', year: 2001 },
{ label: 'A Clockwork Orange', year: 1971 },
{ label: 'Like Stars on Earth', year: 2007 },
{ label: 'Taxi Driver', year: 1976 },
{ label: 'Lawrence of Arabia', year: 1962 },
{ label: 'Double Indemnity', year: 1944 },
{
label: 'Eternal Sunshine of the Spotless Mind',
year: 2004,
},
{ label: 'Amadeus', year: 1984 },
{ label: 'To Kill a Mockingbird', year: 1962 },
{ label: 'Toy Story 3', year: 2010 },
{ label: 'Logan', year: 2017 },
{ label: 'Full Metal Jacket', year: 1987 },
{ label: 'Dangal', year: 2016 },
{ label: 'The Sting', year: 1973 },
{ label: '2001: A Space Odyssey', year: 1968 },
{ label: "Singin' in the Rain", year: 1952 },
{ label: 'Toy Story', year: 1995 },
{ label: 'Bicycle Thieves', year: 1948 },
{ label: 'The Kid', year: 1921 },
{ label: 'Inglourious Basterds', year: 2009 },
{ label: 'Snatch', year: 2000 },
{ label: '3 Idiots', year: 2009 },
{ label: 'Monty Python and the Holy Grail', year: 1975 },
];