se-material-ui 0.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AppBar/AppBar.js +366 -0
- package/AppBar/index.js +14 -0
- package/AutoComplete/AutoComplete.js +690 -0
- package/AutoComplete/index.js +14 -0
- package/Avatar/Avatar.js +157 -0
- package/Avatar/index.js +14 -0
- package/Badge/Badge.js +161 -0
- package/Badge/index.js +14 -0
- package/BottomNavigation/BottomNavigation.js +94 -0
- package/BottomNavigation/BottomNavigationItem.js +111 -0
- package/BottomNavigation/index.js +20 -0
- package/CHANGELOG.md +2780 -0
- package/Card/Card.js +203 -0
- package/Card/CardActions.js +113 -0
- package/Card/CardExpandable.js +97 -0
- package/Card/CardHeader.js +217 -0
- package/Card/CardMedia.js +202 -0
- package/Card/CardText.js +108 -0
- package/Card/CardTitle.js +165 -0
- package/Card/index.js +45 -0
- package/Checkbox/Checkbox.js +279 -0
- package/Checkbox/index.js +14 -0
- package/Chip/Chip.js +336 -0
- package/Chip/index.js +14 -0
- package/CircularProgress/CircularProgress.js +258 -0
- package/CircularProgress/index.js +14 -0
- package/DatePicker/Calendar.js +469 -0
- package/DatePicker/CalendarActionButtons.js +94 -0
- package/DatePicker/CalendarMonth.js +160 -0
- package/DatePicker/CalendarToolbar.js +169 -0
- package/DatePicker/CalendarYear.js +179 -0
- package/DatePicker/DateDisplay.js +227 -0
- package/DatePicker/DatePicker.js +403 -0
- package/DatePicker/DatePickerDialog.js +246 -0
- package/DatePicker/DayButton.js +185 -0
- package/DatePicker/YearButton.js +148 -0
- package/DatePicker/dateUtils.js +204 -0
- package/DatePicker/index.js +14 -0
- package/Dialog/Dialog.js +595 -0
- package/Dialog/index.js +14 -0
- package/Divider/Divider.js +70 -0
- package/Divider/index.js +14 -0
- package/Drawer/Drawer.js +478 -0
- package/Drawer/index.js +14 -0
- package/DropDownMenu/DropDownMenu.js +578 -0
- package/DropDownMenu/index.js +20 -0
- package/FlatButton/FlatButton.js +332 -0
- package/FlatButton/FlatButtonLabel.js +80 -0
- package/FlatButton/index.js +14 -0
- package/FloatingActionButton/FloatingActionButton.js +378 -0
- package/FloatingActionButton/index.js +14 -0
- package/FontIcon/FontIcon.js +144 -0
- package/FontIcon/index.js +14 -0
- package/GridList/GridList.js +132 -0
- package/GridList/GridTile.js +292 -0
- package/GridList/index.js +20 -0
- package/IconButton/IconButton.js +368 -0
- package/IconButton/index.js +14 -0
- package/IconMenu/IconMenu.js +401 -0
- package/IconMenu/index.js +20 -0
- package/LICENSE +21 -0
- package/LinearProgress/LinearProgress.js +219 -0
- package/LinearProgress/index.js +14 -0
- package/List/List.js +95 -0
- package/List/ListItem.js +742 -0
- package/List/NestedList.js +53 -0
- package/List/index.js +25 -0
- package/List/makeSelectable.js +156 -0
- package/Menu/Menu.js +693 -0
- package/Menu/index.js +20 -0
- package/Menu/menuUtils.js +33 -0
- package/MenuItem/MenuItem.js +392 -0
- package/MenuItem/index.js +14 -0
- package/Paper/Paper.js +138 -0
- package/Paper/index.js +14 -0
- package/Popover/Popover.js +510 -0
- package/Popover/PopoverAnimationDefault.js +161 -0
- package/Popover/PopoverAnimationVertical.js +136 -0
- package/Popover/index.js +20 -0
- package/README.md +172 -0
- package/RadioButton/RadioButton.js +259 -0
- package/RadioButton/RadioButtonGroup.js +223 -0
- package/RadioButton/index.js +20 -0
- package/RaisedButton/RaisedButton.js +475 -0
- package/RaisedButton/index.js +14 -0
- package/RefreshIndicator/RefreshIndicator.js +400 -0
- package/RefreshIndicator/index.js +14 -0
- package/SelectField/SelectField.js +306 -0
- package/SelectField/index.js +14 -0
- package/Slider/Slider.js +867 -0
- package/Slider/index.js +14 -0
- package/Snackbar/Snackbar.js +303 -0
- package/Snackbar/SnackbarBody.js +167 -0
- package/Snackbar/index.js +14 -0
- package/Stepper/Step.js +148 -0
- package/Stepper/StepButton.js +201 -0
- package/Stepper/StepConnector.js +77 -0
- package/Stepper/StepContent.js +155 -0
- package/Stepper/StepLabel.js +191 -0
- package/Stepper/Stepper.js +148 -0
- package/Stepper/index.js +34 -0
- package/Subheader/Subheader.js +80 -0
- package/Subheader/index.js +14 -0
- package/SvgIcon/SvgIcon.js +151 -0
- package/SvgIcon/index.js +14 -0
- package/Table/Table.js +365 -0
- package/Table/TableBody.js +523 -0
- package/Table/TableFooter.js +139 -0
- package/Table/TableHeader.js +247 -0
- package/Table/TableHeaderColumn.js +188 -0
- package/Table/TableRow.js +269 -0
- package/Table/TableRowColumn.js +169 -0
- package/Table/index.js +45 -0
- package/Tabs/InkBar.js +90 -0
- package/Tabs/Tab.js +194 -0
- package/Tabs/TabTemplate.js +51 -0
- package/Tabs/Tabs.js +312 -0
- package/Tabs/index.js +20 -0
- package/TextField/EnhancedTextarea.js +243 -0
- package/TextField/TextField.js +577 -0
- package/TextField/TextFieldHint.js +80 -0
- package/TextField/TextFieldLabel.js +117 -0
- package/TextField/TextFieldUnderline.js +139 -0
- package/TextField/index.js +14 -0
- package/TimePicker/Clock.js +233 -0
- package/TimePicker/ClockHours.js +231 -0
- package/TimePicker/ClockMinutes.js +206 -0
- package/TimePicker/ClockNumber.js +130 -0
- package/TimePicker/ClockPointer.js +139 -0
- package/TimePicker/TimeDisplay.js +231 -0
- package/TimePicker/TimePicker.js +290 -0
- package/TimePicker/TimePickerDialog.js +194 -0
- package/TimePicker/index.js +14 -0
- package/TimePicker/timeUtils.js +95 -0
- package/Toggle/Toggle.js +319 -0
- package/Toggle/index.js +14 -0
- package/Toolbar/Toolbar.js +111 -0
- package/Toolbar/ToolbarGroup.js +199 -0
- package/Toolbar/ToolbarSeparator.js +92 -0
- package/Toolbar/ToolbarTitle.js +105 -0
- package/Toolbar/index.js +30 -0
- package/index.es.js +132 -0
- package/index.js +339 -0
- package/internal/AppCanvas.js +88 -0
- package/internal/AutoLockScrolling.js +113 -0
- package/internal/BeforeAfterWrapper.js +143 -0
- package/internal/CircleRipple.js +159 -0
- package/internal/ClearFix.js +63 -0
- package/internal/ClickAwayListener.js +118 -0
- package/internal/EnhancedButton.js +375 -0
- package/internal/EnhancedSwitch.js +450 -0
- package/internal/ExpandTransition.js +132 -0
- package/internal/ExpandTransitionChild.js +182 -0
- package/internal/FocusRipple.js +188 -0
- package/internal/Overlay.js +131 -0
- package/internal/RenderToLayer.js +168 -0
- package/internal/ScaleIn.js +115 -0
- package/internal/ScaleInChild.js +157 -0
- package/internal/SlideIn.js +124 -0
- package/internal/SlideInChild.js +139 -0
- package/internal/Tooltip.js +214 -0
- package/internal/TouchRipple.js +296 -0
- package/package.json +41 -0
- package/styles/MuiThemeProvider.js +60 -0
- package/styles/baseThemes/darkBaseTheme.js +37 -0
- package/styles/baseThemes/lightBaseTheme.js +45 -0
- package/styles/colors.js +290 -0
- package/styles/getMuiTheme.js +379 -0
- package/styles/index.js +63 -0
- package/styles/muiThemeable.js +50 -0
- package/styles/spacing.js +19 -0
- package/styles/transitions.js +34 -0
- package/styles/typography.js +31 -0
- package/styles/zIndex.js +17 -0
- package/svg-icons/action/accessibility.js +32 -0
- package/svg-icons/action/accessible.js +33 -0
- package/svg-icons/action/account-balance-wallet.js +32 -0
- package/svg-icons/action/account-balance.js +32 -0
- package/svg-icons/action/account-box.js +32 -0
- package/svg-icons/action/account-circle.js +32 -0
- package/svg-icons/action/add-shopping-cart.js +32 -0
- package/svg-icons/action/alarm-add.js +32 -0
- package/svg-icons/action/alarm-off.js +32 -0
- package/svg-icons/action/alarm-on.js +32 -0
- package/svg-icons/action/alarm.js +32 -0
- package/svg-icons/action/all-out.js +32 -0
- package/svg-icons/action/android.js +32 -0
- package/svg-icons/action/announcement.js +32 -0
- package/svg-icons/action/aspect-ratio.js +32 -0
- package/svg-icons/action/assessment.js +32 -0
- package/svg-icons/action/assignment-ind.js +32 -0
- package/svg-icons/action/assignment-late.js +32 -0
- package/svg-icons/action/assignment-return.js +32 -0
- package/svg-icons/action/assignment-returned.js +32 -0
- package/svg-icons/action/assignment-turned-in.js +32 -0
- package/svg-icons/action/assignment.js +32 -0
- package/svg-icons/action/autorenew.js +32 -0
- package/svg-icons/action/backup.js +32 -0
- package/svg-icons/action/book.js +32 -0
- package/svg-icons/action/bookmark-border.js +32 -0
- package/svg-icons/action/bookmark.js +32 -0
- package/svg-icons/action/bug-report.js +32 -0
- package/svg-icons/action/build.js +32 -0
- package/svg-icons/action/cached.js +32 -0
- package/svg-icons/action/camera-enhance.js +32 -0
- package/svg-icons/action/card-giftcard.js +32 -0
- package/svg-icons/action/card-membership.js +32 -0
- package/svg-icons/action/card-travel.js +32 -0
- package/svg-icons/action/change-history.js +32 -0
- package/svg-icons/action/check-circle.js +32 -0
- package/svg-icons/action/chrome-reader-mode.js +32 -0
- package/svg-icons/action/class.js +32 -0
- package/svg-icons/action/code.js +32 -0
- package/svg-icons/action/compare-arrows.js +32 -0
- package/svg-icons/action/copyright.js +32 -0
- package/svg-icons/action/credit-card.js +32 -0
- package/svg-icons/action/dashboard.js +32 -0
- package/svg-icons/action/date-range.js +32 -0
- package/svg-icons/action/delete-forever.js +32 -0
- package/svg-icons/action/delete.js +32 -0
- package/svg-icons/action/description.js +32 -0
- package/svg-icons/action/dns.js +32 -0
- package/svg-icons/action/done-all.js +32 -0
- package/svg-icons/action/done.js +32 -0
- package/svg-icons/action/donut-large.js +32 -0
- package/svg-icons/action/donut-small.js +32 -0
- package/svg-icons/action/eject.js +32 -0
- package/svg-icons/action/euro-symbol.js +32 -0
- package/svg-icons/action/event-seat.js +32 -0
- package/svg-icons/action/event.js +32 -0
- package/svg-icons/action/exit-to-app.js +32 -0
- package/svg-icons/action/explore.js +32 -0
- package/svg-icons/action/extension.js +32 -0
- package/svg-icons/action/face.js +32 -0
- package/svg-icons/action/favorite-border.js +32 -0
- package/svg-icons/action/favorite.js +32 -0
- package/svg-icons/action/feedback.js +32 -0
- package/svg-icons/action/find-in-page.js +32 -0
- package/svg-icons/action/find-replace.js +32 -0
- package/svg-icons/action/fingerprint.js +32 -0
- package/svg-icons/action/flight-land.js +32 -0
- package/svg-icons/action/flight-takeoff.js +32 -0
- package/svg-icons/action/flip-to-back.js +32 -0
- package/svg-icons/action/flip-to-front.js +32 -0
- package/svg-icons/action/g-translate.js +32 -0
- package/svg-icons/action/gavel.js +32 -0
- package/svg-icons/action/get-app.js +32 -0
- package/svg-icons/action/gif.js +32 -0
- package/svg-icons/action/grade.js +32 -0
- package/svg-icons/action/group-work.js +32 -0
- package/svg-icons/action/help-outline.js +32 -0
- package/svg-icons/action/help.js +32 -0
- package/svg-icons/action/highlight-off.js +32 -0
- package/svg-icons/action/history.js +32 -0
- package/svg-icons/action/home.js +32 -0
- package/svg-icons/action/hourglass-empty.js +32 -0
- package/svg-icons/action/hourglass-full.js +32 -0
- package/svg-icons/action/http.js +32 -0
- package/svg-icons/action/https.js +32 -0
- package/svg-icons/action/important-devices.js +32 -0
- package/svg-icons/action/info-outline.js +32 -0
- package/svg-icons/action/info.js +32 -0
- package/svg-icons/action/input.js +32 -0
- package/svg-icons/action/invert-colors.js +32 -0
- package/svg-icons/action/label-outline.js +32 -0
- package/svg-icons/action/label.js +32 -0
- package/svg-icons/action/language.js +32 -0
- package/svg-icons/action/launch.js +32 -0
- package/svg-icons/action/lightbulb-outline.js +32 -0
- package/svg-icons/action/line-style.js +32 -0
- package/svg-icons/action/line-weight.js +32 -0
- package/svg-icons/action/list.js +32 -0
- package/svg-icons/action/lock-open.js +32 -0
- package/svg-icons/action/lock-outline.js +32 -0
- package/svg-icons/action/lock.js +32 -0
- package/svg-icons/action/loyalty.js +32 -0
- package/svg-icons/action/markunread-mailbox.js +32 -0
- package/svg-icons/action/motorcycle.js +32 -0
- package/svg-icons/action/note-add.js +32 -0
- package/svg-icons/action/offline-pin.js +32 -0
- package/svg-icons/action/opacity.js +32 -0
- package/svg-icons/action/open-in-browser.js +32 -0
- package/svg-icons/action/open-in-new.js +32 -0
- package/svg-icons/action/open-with.js +32 -0
- package/svg-icons/action/pageview.js +32 -0
- package/svg-icons/action/pan-tool.js +32 -0
- package/svg-icons/action/payment.js +32 -0
- package/svg-icons/action/perm-camera-mic.js +32 -0
- package/svg-icons/action/perm-contact-calendar.js +32 -0
- package/svg-icons/action/perm-data-setting.js +32 -0
- package/svg-icons/action/perm-device-information.js +32 -0
- package/svg-icons/action/perm-identity.js +32 -0
- package/svg-icons/action/perm-media.js +32 -0
- package/svg-icons/action/perm-phone-msg.js +32 -0
- package/svg-icons/action/perm-scan-wifi.js +32 -0
- package/svg-icons/action/pets.js +36 -0
- package/svg-icons/action/picture-in-picture-alt.js +32 -0
- package/svg-icons/action/picture-in-picture.js +32 -0
- package/svg-icons/action/play-for-work.js +32 -0
- package/svg-icons/action/polymer.js +32 -0
- package/svg-icons/action/power-settings-new.js +32 -0
- package/svg-icons/action/pregnant-woman.js +32 -0
- package/svg-icons/action/print.js +32 -0
- package/svg-icons/action/query-builder.js +32 -0
- package/svg-icons/action/question-answer.js +32 -0
- package/svg-icons/action/receipt.js +32 -0
- package/svg-icons/action/record-voice-over.js +33 -0
- package/svg-icons/action/redeem.js +32 -0
- package/svg-icons/action/remove-shopping-cart.js +32 -0
- package/svg-icons/action/reorder.js +32 -0
- package/svg-icons/action/report-problem.js +32 -0
- package/svg-icons/action/restore-page.js +32 -0
- package/svg-icons/action/restore.js +32 -0
- package/svg-icons/action/room.js +32 -0
- package/svg-icons/action/rounded-corner.js +32 -0
- package/svg-icons/action/rowing.js +32 -0
- package/svg-icons/action/schedule.js +32 -0
- package/svg-icons/action/search.js +32 -0
- package/svg-icons/action/settings-applications.js +32 -0
- package/svg-icons/action/settings-backup-restore.js +32 -0
- package/svg-icons/action/settings-bluetooth.js +32 -0
- package/svg-icons/action/settings-brightness.js +32 -0
- package/svg-icons/action/settings-cell.js +32 -0
- package/svg-icons/action/settings-ethernet.js +32 -0
- package/svg-icons/action/settings-input-antenna.js +32 -0
- package/svg-icons/action/settings-input-component.js +32 -0
- package/svg-icons/action/settings-input-composite.js +32 -0
- package/svg-icons/action/settings-input-hdmi.js +32 -0
- package/svg-icons/action/settings-input-svideo.js +32 -0
- package/svg-icons/action/settings-overscan.js +32 -0
- package/svg-icons/action/settings-phone.js +32 -0
- package/svg-icons/action/settings-power.js +32 -0
- package/svg-icons/action/settings-remote.js +32 -0
- package/svg-icons/action/settings-voice.js +32 -0
- package/svg-icons/action/settings.js +32 -0
- package/svg-icons/action/shop-two.js +32 -0
- package/svg-icons/action/shop.js +32 -0
- package/svg-icons/action/shopping-basket.js +32 -0
- package/svg-icons/action/shopping-cart.js +32 -0
- package/svg-icons/action/speaker-notes-off.js +32 -0
- package/svg-icons/action/speaker-notes.js +32 -0
- package/svg-icons/action/spellcheck.js +32 -0
- package/svg-icons/action/stars.js +32 -0
- package/svg-icons/action/store.js +32 -0
- package/svg-icons/action/subject.js +32 -0
- package/svg-icons/action/supervisor-account.js +32 -0
- package/svg-icons/action/swap-horiz.js +32 -0
- package/svg-icons/action/swap-vert.js +32 -0
- package/svg-icons/action/swap-vertical-circle.js +32 -0
- package/svg-icons/action/system-update-alt.js +32 -0
- package/svg-icons/action/tab-unselected.js +32 -0
- package/svg-icons/action/tab.js +32 -0
- package/svg-icons/action/theaters.js +32 -0
- package/svg-icons/action/three-d-rotation.js +32 -0
- package/svg-icons/action/thumb-down.js +32 -0
- package/svg-icons/action/thumb-up.js +32 -0
- package/svg-icons/action/thumbs-up-down.js +32 -0
- package/svg-icons/action/timeline.js +32 -0
- package/svg-icons/action/toc.js +32 -0
- package/svg-icons/action/today.js +32 -0
- package/svg-icons/action/toll.js +32 -0
- package/svg-icons/action/touch-app.js +32 -0
- package/svg-icons/action/track-changes.js +32 -0
- package/svg-icons/action/translate.js +32 -0
- package/svg-icons/action/trending-down.js +32 -0
- package/svg-icons/action/trending-flat.js +32 -0
- package/svg-icons/action/trending-up.js +32 -0
- package/svg-icons/action/turned-in-not.js +32 -0
- package/svg-icons/action/turned-in.js +32 -0
- package/svg-icons/action/update.js +32 -0
- package/svg-icons/action/verified-user.js +32 -0
- package/svg-icons/action/view-agenda.js +32 -0
- package/svg-icons/action/view-array.js +32 -0
- package/svg-icons/action/view-carousel.js +32 -0
- package/svg-icons/action/view-column.js +32 -0
- package/svg-icons/action/view-day.js +32 -0
- package/svg-icons/action/view-headline.js +32 -0
- package/svg-icons/action/view-list.js +32 -0
- package/svg-icons/action/view-module.js +32 -0
- package/svg-icons/action/view-quilt.js +32 -0
- package/svg-icons/action/view-stream.js +32 -0
- package/svg-icons/action/view-week.js +32 -0
- package/svg-icons/action/visibility-off.js +32 -0
- package/svg-icons/action/visibility.js +32 -0
- package/svg-icons/action/watch-later.js +32 -0
- package/svg-icons/action/work.js +32 -0
- package/svg-icons/action/youtube-searched-for.js +32 -0
- package/svg-icons/action/zoom-in.js +32 -0
- package/svg-icons/action/zoom-out.js +32 -0
- package/svg-icons/alert/add-alert.js +32 -0
- package/svg-icons/alert/error-outline.js +32 -0
- package/svg-icons/alert/error.js +32 -0
- package/svg-icons/alert/warning.js +32 -0
- package/svg-icons/av/add-to-queue.js +32 -0
- package/svg-icons/av/airplay.js +32 -0
- package/svg-icons/av/album.js +32 -0
- package/svg-icons/av/art-track.js +32 -0
- package/svg-icons/av/av-timer.js +32 -0
- package/svg-icons/av/branding-watermark.js +32 -0
- package/svg-icons/av/call-to-action.js +32 -0
- package/svg-icons/av/closed-caption.js +32 -0
- package/svg-icons/av/equalizer.js +32 -0
- package/svg-icons/av/explicit.js +32 -0
- package/svg-icons/av/fast-forward.js +32 -0
- package/svg-icons/av/fast-rewind.js +32 -0
- package/svg-icons/av/featured-play-list.js +32 -0
- package/svg-icons/av/featured-video.js +32 -0
- package/svg-icons/av/fiber-dvr.js +32 -0
- package/svg-icons/av/fiber-manual-record.js +32 -0
- package/svg-icons/av/fiber-new.js +32 -0
- package/svg-icons/av/fiber-pin.js +32 -0
- package/svg-icons/av/fiber-smart-record.js +37 -0
- package/svg-icons/av/forward-10.js +32 -0
- package/svg-icons/av/forward-30.js +32 -0
- package/svg-icons/av/forward-5.js +32 -0
- package/svg-icons/av/games.js +32 -0
- package/svg-icons/av/hd.js +32 -0
- package/svg-icons/av/hearing.js +32 -0
- package/svg-icons/av/high-quality.js +32 -0
- package/svg-icons/av/library-add.js +32 -0
- package/svg-icons/av/library-books.js +32 -0
- package/svg-icons/av/library-music.js +32 -0
- package/svg-icons/av/loop.js +32 -0
- package/svg-icons/av/mic-none.js +32 -0
- package/svg-icons/av/mic-off.js +32 -0
- package/svg-icons/av/mic.js +32 -0
- package/svg-icons/av/movie.js +32 -0
- package/svg-icons/av/music-video.js +32 -0
- package/svg-icons/av/new-releases.js +32 -0
- package/svg-icons/av/not-interested.js +32 -0
- package/svg-icons/av/note.js +32 -0
- package/svg-icons/av/pause-circle-filled.js +32 -0
- package/svg-icons/av/pause-circle-outline.js +32 -0
- package/svg-icons/av/pause.js +32 -0
- package/svg-icons/av/play-arrow.js +32 -0
- package/svg-icons/av/play-circle-filled.js +32 -0
- package/svg-icons/av/play-circle-outline.js +32 -0
- package/svg-icons/av/playlist-add-check.js +32 -0
- package/svg-icons/av/playlist-add.js +32 -0
- package/svg-icons/av/playlist-play.js +32 -0
- package/svg-icons/av/queue-music.js +32 -0
- package/svg-icons/av/queue-play-next.js +32 -0
- package/svg-icons/av/queue.js +32 -0
- package/svg-icons/av/radio.js +32 -0
- package/svg-icons/av/recent-actors.js +32 -0
- package/svg-icons/av/remove-from-queue.js +32 -0
- package/svg-icons/av/repeat-one.js +32 -0
- package/svg-icons/av/repeat.js +32 -0
- package/svg-icons/av/replay-10.js +32 -0
- package/svg-icons/av/replay-30.js +32 -0
- package/svg-icons/av/replay-5.js +32 -0
- package/svg-icons/av/replay.js +32 -0
- package/svg-icons/av/shuffle.js +32 -0
- package/svg-icons/av/skip-next.js +32 -0
- package/svg-icons/av/skip-previous.js +32 -0
- package/svg-icons/av/slow-motion-video.js +32 -0
- package/svg-icons/av/snooze.js +32 -0
- package/svg-icons/av/sort-by-alpha.js +32 -0
- package/svg-icons/av/stop.js +32 -0
- package/svg-icons/av/subscriptions.js +32 -0
- package/svg-icons/av/subtitles.js +32 -0
- package/svg-icons/av/surround-sound.js +32 -0
- package/svg-icons/av/video-call.js +32 -0
- package/svg-icons/av/video-label.js +32 -0
- package/svg-icons/av/video-library.js +32 -0
- package/svg-icons/av/videocam-off.js +32 -0
- package/svg-icons/av/videocam.js +32 -0
- package/svg-icons/av/volume-down.js +32 -0
- package/svg-icons/av/volume-mute.js +32 -0
- package/svg-icons/av/volume-off.js +32 -0
- package/svg-icons/av/volume-up.js +32 -0
- package/svg-icons/av/web-asset.js +32 -0
- package/svg-icons/av/web.js +32 -0
- package/svg-icons/communication/business.js +32 -0
- package/svg-icons/communication/call-end.js +32 -0
- package/svg-icons/communication/call-made.js +32 -0
- package/svg-icons/communication/call-merge.js +32 -0
- package/svg-icons/communication/call-missed-outgoing.js +32 -0
- package/svg-icons/communication/call-missed.js +32 -0
- package/svg-icons/communication/call-received.js +32 -0
- package/svg-icons/communication/call-split.js +32 -0
- package/svg-icons/communication/call.js +32 -0
- package/svg-icons/communication/chat-bubble-outline.js +32 -0
- package/svg-icons/communication/chat-bubble.js +32 -0
- package/svg-icons/communication/chat.js +32 -0
- package/svg-icons/communication/clear-all.js +32 -0
- package/svg-icons/communication/comment.js +32 -0
- package/svg-icons/communication/contact-mail.js +32 -0
- package/svg-icons/communication/contact-phone.js +32 -0
- package/svg-icons/communication/contacts.js +32 -0
- package/svg-icons/communication/dialer-sip.js +32 -0
- package/svg-icons/communication/dialpad.js +32 -0
- package/svg-icons/communication/email.js +32 -0
- package/svg-icons/communication/forum.js +32 -0
- package/svg-icons/communication/import-contacts.js +32 -0
- package/svg-icons/communication/import-export.js +32 -0
- package/svg-icons/communication/invert-colors-off.js +32 -0
- package/svg-icons/communication/live-help.js +32 -0
- package/svg-icons/communication/location-off.js +32 -0
- package/svg-icons/communication/location-on.js +32 -0
- package/svg-icons/communication/mail-outline.js +32 -0
- package/svg-icons/communication/message.js +32 -0
- package/svg-icons/communication/no-sim.js +32 -0
- package/svg-icons/communication/phone.js +32 -0
- package/svg-icons/communication/phonelink-erase.js +32 -0
- package/svg-icons/communication/phonelink-lock.js +32 -0
- package/svg-icons/communication/phonelink-ring.js +32 -0
- package/svg-icons/communication/phonelink-setup.js +32 -0
- package/svg-icons/communication/portable-wifi-off.js +32 -0
- package/svg-icons/communication/present-to-all.js +32 -0
- package/svg-icons/communication/ring-volume.js +32 -0
- package/svg-icons/communication/rss-feed.js +33 -0
- package/svg-icons/communication/screen-share.js +32 -0
- package/svg-icons/communication/speaker-phone.js +32 -0
- package/svg-icons/communication/stay-current-landscape.js +32 -0
- package/svg-icons/communication/stay-current-portrait.js +32 -0
- package/svg-icons/communication/stay-primary-landscape.js +32 -0
- package/svg-icons/communication/stay-primary-portrait.js +32 -0
- package/svg-icons/communication/stop-screen-share.js +32 -0
- package/svg-icons/communication/swap-calls.js +32 -0
- package/svg-icons/communication/textsms.js +32 -0
- package/svg-icons/communication/voicemail.js +32 -0
- package/svg-icons/communication/vpn-key.js +32 -0
- package/svg-icons/content/add-box.js +32 -0
- package/svg-icons/content/add-circle-outline.js +32 -0
- package/svg-icons/content/add-circle.js +32 -0
- package/svg-icons/content/add.js +32 -0
- package/svg-icons/content/archive.js +32 -0
- package/svg-icons/content/backspace.js +32 -0
- package/svg-icons/content/block.js +32 -0
- package/svg-icons/content/clear.js +32 -0
- package/svg-icons/content/content-copy.js +32 -0
- package/svg-icons/content/content-cut.js +32 -0
- package/svg-icons/content/content-paste.js +32 -0
- package/svg-icons/content/create.js +32 -0
- package/svg-icons/content/delete-sweep.js +32 -0
- package/svg-icons/content/drafts.js +32 -0
- package/svg-icons/content/filter-list.js +32 -0
- package/svg-icons/content/flag.js +32 -0
- package/svg-icons/content/font-download.js +32 -0
- package/svg-icons/content/forward.js +32 -0
- package/svg-icons/content/gesture.js +32 -0
- package/svg-icons/content/inbox.js +32 -0
- package/svg-icons/content/link.js +32 -0
- package/svg-icons/content/low-priority.js +32 -0
- package/svg-icons/content/mail.js +32 -0
- package/svg-icons/content/markunread.js +32 -0
- package/svg-icons/content/move-to-inbox.js +32 -0
- package/svg-icons/content/next-week.js +32 -0
- package/svg-icons/content/redo.js +32 -0
- package/svg-icons/content/remove-circle-outline.js +32 -0
- package/svg-icons/content/remove-circle.js +32 -0
- package/svg-icons/content/remove.js +32 -0
- package/svg-icons/content/reply-all.js +32 -0
- package/svg-icons/content/reply.js +32 -0
- package/svg-icons/content/report.js +32 -0
- package/svg-icons/content/save.js +32 -0
- package/svg-icons/content/select-all.js +32 -0
- package/svg-icons/content/send.js +32 -0
- package/svg-icons/content/sort.js +32 -0
- package/svg-icons/content/text-format.js +32 -0
- package/svg-icons/content/unarchive.js +32 -0
- package/svg-icons/content/undo.js +32 -0
- package/svg-icons/content/weekend.js +32 -0
- package/svg-icons/device/access-alarm.js +32 -0
- package/svg-icons/device/access-alarms.js +32 -0
- package/svg-icons/device/access-time.js +32 -0
- package/svg-icons/device/add-alarm.js +32 -0
- package/svg-icons/device/airplanemode-active.js +33 -0
- package/svg-icons/device/airplanemode-inactive.js +32 -0
- package/svg-icons/device/battery-20.js +33 -0
- package/svg-icons/device/battery-30.js +33 -0
- package/svg-icons/device/battery-50.js +33 -0
- package/svg-icons/device/battery-60.js +33 -0
- package/svg-icons/device/battery-80.js +33 -0
- package/svg-icons/device/battery-90.js +33 -0
- package/svg-icons/device/battery-alert.js +32 -0
- package/svg-icons/device/battery-charging-20.js +33 -0
- package/svg-icons/device/battery-charging-30.js +33 -0
- package/svg-icons/device/battery-charging-50.js +33 -0
- package/svg-icons/device/battery-charging-60.js +33 -0
- package/svg-icons/device/battery-charging-80.js +33 -0
- package/svg-icons/device/battery-charging-90.js +33 -0
- package/svg-icons/device/battery-charging-full.js +32 -0
- package/svg-icons/device/battery-full.js +32 -0
- package/svg-icons/device/battery-std.js +32 -0
- package/svg-icons/device/battery-unknown.js +32 -0
- package/svg-icons/device/bluetooth-connected.js +32 -0
- package/svg-icons/device/bluetooth-disabled.js +32 -0
- package/svg-icons/device/bluetooth-searching.js +32 -0
- package/svg-icons/device/bluetooth.js +32 -0
- package/svg-icons/device/brightness-auto.js +32 -0
- package/svg-icons/device/brightness-high.js +32 -0
- package/svg-icons/device/brightness-low.js +32 -0
- package/svg-icons/device/brightness-medium.js +32 -0
- package/svg-icons/device/data-usage.js +32 -0
- package/svg-icons/device/developer-mode.js +32 -0
- package/svg-icons/device/devices.js +32 -0
- package/svg-icons/device/dvr.js +32 -0
- package/svg-icons/device/gps-fixed.js +32 -0
- package/svg-icons/device/gps-not-fixed.js +32 -0
- package/svg-icons/device/gps-off.js +32 -0
- package/svg-icons/device/graphic-eq.js +32 -0
- package/svg-icons/device/location-disabled.js +32 -0
- package/svg-icons/device/location-searching.js +32 -0
- package/svg-icons/device/network-cell.js +33 -0
- package/svg-icons/device/network-wifi.js +33 -0
- package/svg-icons/device/nfc.js +32 -0
- package/svg-icons/device/screen-lock-landscape.js +32 -0
- package/svg-icons/device/screen-lock-portrait.js +32 -0
- package/svg-icons/device/screen-lock-rotation.js +32 -0
- package/svg-icons/device/screen-rotation.js +32 -0
- package/svg-icons/device/sd-storage.js +32 -0
- package/svg-icons/device/settings-system-daydream.js +32 -0
- package/svg-icons/device/signal-cellular-0-bar.js +32 -0
- package/svg-icons/device/signal-cellular-1-bar.js +33 -0
- package/svg-icons/device/signal-cellular-2-bar.js +33 -0
- package/svg-icons/device/signal-cellular-3-bar.js +33 -0
- package/svg-icons/device/signal-cellular-4-bar.js +32 -0
- package/svg-icons/device/signal-cellular-connected-no-internet-0-bar.js +33 -0
- package/svg-icons/device/signal-cellular-connected-no-internet-1-bar.js +33 -0
- package/svg-icons/device/signal-cellular-connected-no-internet-2-bar.js +33 -0
- package/svg-icons/device/signal-cellular-connected-no-internet-3-bar.js +33 -0
- package/svg-icons/device/signal-cellular-connected-no-internet-4-bar.js +32 -0
- package/svg-icons/device/signal-cellular-no-sim.js +32 -0
- package/svg-icons/device/signal-cellular-null.js +32 -0
- package/svg-icons/device/signal-cellular-off.js +32 -0
- package/svg-icons/device/signal-wifi-0-bar.js +32 -0
- package/svg-icons/device/signal-wifi-1-bar-lock.js +34 -0
- package/svg-icons/device/signal-wifi-1-bar.js +33 -0
- package/svg-icons/device/signal-wifi-2-bar-lock.js +34 -0
- package/svg-icons/device/signal-wifi-2-bar.js +33 -0
- package/svg-icons/device/signal-wifi-3-bar-lock.js +33 -0
- package/svg-icons/device/signal-wifi-3-bar.js +33 -0
- package/svg-icons/device/signal-wifi-4-bar-lock.js +32 -0
- package/svg-icons/device/signal-wifi-4-bar.js +32 -0
- package/svg-icons/device/signal-wifi-off.js +32 -0
- package/svg-icons/device/storage.js +32 -0
- package/svg-icons/device/usb.js +32 -0
- package/svg-icons/device/wallpaper.js +32 -0
- package/svg-icons/device/widgets.js +32 -0
- package/svg-icons/device/wifi-lock.js +32 -0
- package/svg-icons/device/wifi-tethering.js +32 -0
- package/svg-icons/editor/attach-file.js +32 -0
- package/svg-icons/editor/attach-money.js +32 -0
- package/svg-icons/editor/border-all.js +32 -0
- package/svg-icons/editor/border-bottom.js +32 -0
- package/svg-icons/editor/border-clear.js +32 -0
- package/svg-icons/editor/border-color.js +33 -0
- package/svg-icons/editor/border-horizontal.js +32 -0
- package/svg-icons/editor/border-inner.js +32 -0
- package/svg-icons/editor/border-left.js +32 -0
- package/svg-icons/editor/border-outer.js +32 -0
- package/svg-icons/editor/border-right.js +32 -0
- package/svg-icons/editor/border-style.js +32 -0
- package/svg-icons/editor/border-top.js +32 -0
- package/svg-icons/editor/border-vertical.js +32 -0
- package/svg-icons/editor/bubble-chart.js +34 -0
- package/svg-icons/editor/drag-handle.js +32 -0
- package/svg-icons/editor/format-align-center.js +32 -0
- package/svg-icons/editor/format-align-justify.js +32 -0
- package/svg-icons/editor/format-align-left.js +32 -0
- package/svg-icons/editor/format-align-right.js +32 -0
- package/svg-icons/editor/format-bold.js +32 -0
- package/svg-icons/editor/format-clear.js +32 -0
- package/svg-icons/editor/format-color-fill.js +33 -0
- package/svg-icons/editor/format-color-reset.js +32 -0
- package/svg-icons/editor/format-color-text.js +33 -0
- package/svg-icons/editor/format-indent-decrease.js +32 -0
- package/svg-icons/editor/format-indent-increase.js +32 -0
- package/svg-icons/editor/format-italic.js +32 -0
- package/svg-icons/editor/format-line-spacing.js +32 -0
- package/svg-icons/editor/format-list-bulleted.js +32 -0
- package/svg-icons/editor/format-list-numbered.js +32 -0
- package/svg-icons/editor/format-paint.js +32 -0
- package/svg-icons/editor/format-quote.js +32 -0
- package/svg-icons/editor/format-shapes.js +32 -0
- package/svg-icons/editor/format-size.js +32 -0
- package/svg-icons/editor/format-strikethrough.js +32 -0
- package/svg-icons/editor/format-textdirection-l-to-r.js +32 -0
- package/svg-icons/editor/format-textdirection-r-to-l.js +32 -0
- package/svg-icons/editor/format-underlined.js +32 -0
- package/svg-icons/editor/functions.js +32 -0
- package/svg-icons/editor/highlight.js +32 -0
- package/svg-icons/editor/insert-chart.js +32 -0
- package/svg-icons/editor/insert-comment.js +32 -0
- package/svg-icons/editor/insert-drive-file.js +32 -0
- package/svg-icons/editor/insert-emoticon.js +32 -0
- package/svg-icons/editor/insert-invitation.js +32 -0
- package/svg-icons/editor/insert-link.js +32 -0
- package/svg-icons/editor/insert-photo.js +32 -0
- package/svg-icons/editor/linear-scale.js +32 -0
- package/svg-icons/editor/merge-type.js +32 -0
- package/svg-icons/editor/mode-comment.js +32 -0
- package/svg-icons/editor/mode-edit.js +32 -0
- package/svg-icons/editor/monetization-on.js +32 -0
- package/svg-icons/editor/money-off.js +32 -0
- package/svg-icons/editor/multiline-chart.js +32 -0
- package/svg-icons/editor/pie-chart-outlined.js +32 -0
- package/svg-icons/editor/pie-chart.js +32 -0
- package/svg-icons/editor/publish.js +32 -0
- package/svg-icons/editor/short-text.js +32 -0
- package/svg-icons/editor/show-chart.js +32 -0
- package/svg-icons/editor/space-bar.js +32 -0
- package/svg-icons/editor/strikethrough-s.js +32 -0
- package/svg-icons/editor/text-fields.js +32 -0
- package/svg-icons/editor/title.js +32 -0
- package/svg-icons/editor/vertical-align-bottom.js +32 -0
- package/svg-icons/editor/vertical-align-center.js +32 -0
- package/svg-icons/editor/vertical-align-top.js +32 -0
- package/svg-icons/editor/wrap-text.js +32 -0
- package/svg-icons/file/attachment.js +32 -0
- package/svg-icons/file/cloud-circle.js +32 -0
- package/svg-icons/file/cloud-done.js +32 -0
- package/svg-icons/file/cloud-download.js +32 -0
- package/svg-icons/file/cloud-off.js +32 -0
- package/svg-icons/file/cloud-queue.js +32 -0
- package/svg-icons/file/cloud-upload.js +32 -0
- package/svg-icons/file/cloud.js +32 -0
- package/svg-icons/file/create-new-folder.js +32 -0
- package/svg-icons/file/file-download.js +32 -0
- package/svg-icons/file/file-upload.js +32 -0
- package/svg-icons/file/folder-open.js +32 -0
- package/svg-icons/file/folder-shared.js +32 -0
- package/svg-icons/file/folder.js +32 -0
- package/svg-icons/hardware/cast-connected.js +32 -0
- package/svg-icons/hardware/cast.js +32 -0
- package/svg-icons/hardware/computer.js +32 -0
- package/svg-icons/hardware/desktop-mac.js +32 -0
- package/svg-icons/hardware/desktop-windows.js +32 -0
- package/svg-icons/hardware/developer-board.js +32 -0
- package/svg-icons/hardware/device-hub.js +32 -0
- package/svg-icons/hardware/devices-other.js +32 -0
- package/svg-icons/hardware/dock.js +32 -0
- package/svg-icons/hardware/gamepad.js +32 -0
- package/svg-icons/hardware/headset-mic.js +32 -0
- package/svg-icons/hardware/headset.js +32 -0
- package/svg-icons/hardware/keyboard-arrow-down.js +32 -0
- package/svg-icons/hardware/keyboard-arrow-left.js +32 -0
- package/svg-icons/hardware/keyboard-arrow-right.js +32 -0
- package/svg-icons/hardware/keyboard-arrow-up.js +32 -0
- package/svg-icons/hardware/keyboard-backspace.js +32 -0
- package/svg-icons/hardware/keyboard-capslock.js +32 -0
- package/svg-icons/hardware/keyboard-hide.js +32 -0
- package/svg-icons/hardware/keyboard-return.js +32 -0
- package/svg-icons/hardware/keyboard-tab.js +32 -0
- package/svg-icons/hardware/keyboard-voice.js +32 -0
- package/svg-icons/hardware/keyboard.js +32 -0
- package/svg-icons/hardware/laptop-chromebook.js +32 -0
- package/svg-icons/hardware/laptop-mac.js +32 -0
- package/svg-icons/hardware/laptop-windows.js +32 -0
- package/svg-icons/hardware/laptop.js +32 -0
- package/svg-icons/hardware/memory.js +32 -0
- package/svg-icons/hardware/mouse.js +32 -0
- package/svg-icons/hardware/phone-android.js +32 -0
- package/svg-icons/hardware/phone-iphone.js +32 -0
- package/svg-icons/hardware/phonelink-off.js +32 -0
- package/svg-icons/hardware/phonelink.js +32 -0
- package/svg-icons/hardware/power-input.js +32 -0
- package/svg-icons/hardware/router.js +32 -0
- package/svg-icons/hardware/scanner.js +32 -0
- package/svg-icons/hardware/security.js +32 -0
- package/svg-icons/hardware/sim-card.js +32 -0
- package/svg-icons/hardware/smartphone.js +32 -0
- package/svg-icons/hardware/speaker-group.js +34 -0
- package/svg-icons/hardware/speaker.js +32 -0
- package/svg-icons/hardware/tablet-android.js +32 -0
- package/svg-icons/hardware/tablet-mac.js +32 -0
- package/svg-icons/hardware/tablet.js +32 -0
- package/svg-icons/hardware/toys.js +32 -0
- package/svg-icons/hardware/tv.js +32 -0
- package/svg-icons/hardware/videogame-asset.js +32 -0
- package/svg-icons/hardware/watch.js +32 -0
- package/svg-icons/image/add-a-photo.js +32 -0
- package/svg-icons/image/add-to-photos.js +32 -0
- package/svg-icons/image/adjust.js +32 -0
- package/svg-icons/image/assistant-photo.js +32 -0
- package/svg-icons/image/assistant.js +32 -0
- package/svg-icons/image/audiotrack.js +32 -0
- package/svg-icons/image/blur-circular.js +32 -0
- package/svg-icons/image/blur-linear.js +32 -0
- package/svg-icons/image/blur-off.js +32 -0
- package/svg-icons/image/blur-on.js +32 -0
- package/svg-icons/image/brightness-1.js +32 -0
- package/svg-icons/image/brightness-2.js +32 -0
- package/svg-icons/image/brightness-3.js +32 -0
- package/svg-icons/image/brightness-4.js +32 -0
- package/svg-icons/image/brightness-5.js +32 -0
- package/svg-icons/image/brightness-6.js +32 -0
- package/svg-icons/image/brightness-7.js +32 -0
- package/svg-icons/image/broken-image.js +32 -0
- package/svg-icons/image/brush.js +32 -0
- package/svg-icons/image/burst-mode.js +32 -0
- package/svg-icons/image/camera-alt.js +33 -0
- package/svg-icons/image/camera-front.js +32 -0
- package/svg-icons/image/camera-rear.js +32 -0
- package/svg-icons/image/camera-roll.js +32 -0
- package/svg-icons/image/camera.js +32 -0
- package/svg-icons/image/center-focus-strong.js +32 -0
- package/svg-icons/image/center-focus-weak.js +32 -0
- package/svg-icons/image/collections-bookmark.js +32 -0
- package/svg-icons/image/collections.js +32 -0
- package/svg-icons/image/color-lens.js +32 -0
- package/svg-icons/image/colorize.js +32 -0
- package/svg-icons/image/compare.js +32 -0
- package/svg-icons/image/control-point-duplicate.js +32 -0
- package/svg-icons/image/control-point.js +32 -0
- package/svg-icons/image/crop-16-9.js +32 -0
- package/svg-icons/image/crop-3-2.js +32 -0
- package/svg-icons/image/crop-5-4.js +32 -0
- package/svg-icons/image/crop-7-5.js +32 -0
- package/svg-icons/image/crop-din.js +32 -0
- package/svg-icons/image/crop-free.js +32 -0
- package/svg-icons/image/crop-landscape.js +32 -0
- package/svg-icons/image/crop-original.js +32 -0
- package/svg-icons/image/crop-portrait.js +32 -0
- package/svg-icons/image/crop-rotate.js +32 -0
- package/svg-icons/image/crop-square.js +32 -0
- package/svg-icons/image/crop.js +32 -0
- package/svg-icons/image/dehaze.js +32 -0
- package/svg-icons/image/details.js +32 -0
- package/svg-icons/image/edit.js +32 -0
- package/svg-icons/image/exposure-neg-1.js +32 -0
- package/svg-icons/image/exposure-neg-2.js +32 -0
- package/svg-icons/image/exposure-plus-1.js +32 -0
- package/svg-icons/image/exposure-plus-2.js +32 -0
- package/svg-icons/image/exposure-zero.js +32 -0
- package/svg-icons/image/exposure.js +32 -0
- package/svg-icons/image/filter-1.js +32 -0
- package/svg-icons/image/filter-2.js +32 -0
- package/svg-icons/image/filter-3.js +32 -0
- package/svg-icons/image/filter-4.js +32 -0
- package/svg-icons/image/filter-5.js +32 -0
- package/svg-icons/image/filter-6.js +32 -0
- package/svg-icons/image/filter-7.js +32 -0
- package/svg-icons/image/filter-8.js +32 -0
- package/svg-icons/image/filter-9-plus.js +32 -0
- package/svg-icons/image/filter-9.js +32 -0
- package/svg-icons/image/filter-b-and-w.js +32 -0
- package/svg-icons/image/filter-center-focus.js +32 -0
- package/svg-icons/image/filter-drama.js +32 -0
- package/svg-icons/image/filter-frames.js +32 -0
- package/svg-icons/image/filter-hdr.js +32 -0
- package/svg-icons/image/filter-none.js +32 -0
- package/svg-icons/image/filter-tilt-shift.js +32 -0
- package/svg-icons/image/filter-vintage.js +32 -0
- package/svg-icons/image/filter.js +32 -0
- package/svg-icons/image/flare.js +32 -0
- package/svg-icons/image/flash-auto.js +32 -0
- package/svg-icons/image/flash-off.js +32 -0
- package/svg-icons/image/flash-on.js +32 -0
- package/svg-icons/image/flip.js +32 -0
- package/svg-icons/image/gradient.js +32 -0
- package/svg-icons/image/grain.js +32 -0
- package/svg-icons/image/grid-off.js +32 -0
- package/svg-icons/image/grid-on.js +32 -0
- package/svg-icons/image/hdr-off.js +32 -0
- package/svg-icons/image/hdr-on.js +32 -0
- package/svg-icons/image/hdr-strong.js +32 -0
- package/svg-icons/image/hdr-weak.js +32 -0
- package/svg-icons/image/healing.js +32 -0
- package/svg-icons/image/image-aspect-ratio.js +32 -0
- package/svg-icons/image/image.js +32 -0
- package/svg-icons/image/iso.js +32 -0
- package/svg-icons/image/landscape.js +32 -0
- package/svg-icons/image/leak-add.js +32 -0
- package/svg-icons/image/leak-remove.js +32 -0
- package/svg-icons/image/lens.js +32 -0
- package/svg-icons/image/linked-camera.js +34 -0
- package/svg-icons/image/looks-3.js +32 -0
- package/svg-icons/image/looks-4.js +32 -0
- package/svg-icons/image/looks-5.js +32 -0
- package/svg-icons/image/looks-6.js +32 -0
- package/svg-icons/image/looks-one.js +32 -0
- package/svg-icons/image/looks-two.js +32 -0
- package/svg-icons/image/looks.js +32 -0
- package/svg-icons/image/loupe.js +32 -0
- package/svg-icons/image/monochrome-photos.js +32 -0
- package/svg-icons/image/movie-creation.js +32 -0
- package/svg-icons/image/movie-filter.js +32 -0
- package/svg-icons/image/music-note.js +32 -0
- package/svg-icons/image/nature-people.js +32 -0
- package/svg-icons/image/nature.js +32 -0
- package/svg-icons/image/navigate-before.js +32 -0
- package/svg-icons/image/navigate-next.js +32 -0
- package/svg-icons/image/palette.js +32 -0
- package/svg-icons/image/panorama-fish-eye.js +32 -0
- package/svg-icons/image/panorama-horizontal.js +32 -0
- package/svg-icons/image/panorama-vertical.js +32 -0
- package/svg-icons/image/panorama-wide-angle.js +32 -0
- package/svg-icons/image/panorama.js +32 -0
- package/svg-icons/image/photo-album.js +32 -0
- package/svg-icons/image/photo-camera.js +33 -0
- package/svg-icons/image/photo-filter.js +32 -0
- package/svg-icons/image/photo-library.js +32 -0
- package/svg-icons/image/photo-size-select-actual.js +32 -0
- package/svg-icons/image/photo-size-select-large.js +32 -0
- package/svg-icons/image/photo-size-select-small.js +32 -0
- package/svg-icons/image/photo.js +32 -0
- package/svg-icons/image/picture-as-pdf.js +32 -0
- package/svg-icons/image/portrait.js +32 -0
- package/svg-icons/image/remove-red-eye.js +32 -0
- package/svg-icons/image/rotate-90-degrees-ccw.js +32 -0
- package/svg-icons/image/rotate-left.js +32 -0
- package/svg-icons/image/rotate-right.js +32 -0
- package/svg-icons/image/slideshow.js +32 -0
- package/svg-icons/image/straighten.js +32 -0
- package/svg-icons/image/style.js +32 -0
- package/svg-icons/image/switch-camera.js +32 -0
- package/svg-icons/image/switch-video.js +32 -0
- package/svg-icons/image/tag-faces.js +32 -0
- package/svg-icons/image/texture.js +32 -0
- package/svg-icons/image/timelapse.js +32 -0
- package/svg-icons/image/timer-10.js +32 -0
- package/svg-icons/image/timer-3.js +32 -0
- package/svg-icons/image/timer-off.js +32 -0
- package/svg-icons/image/timer.js +32 -0
- package/svg-icons/image/tonality.js +32 -0
- package/svg-icons/image/transform.js +32 -0
- package/svg-icons/image/tune.js +32 -0
- package/svg-icons/image/view-comfy.js +32 -0
- package/svg-icons/image/view-compact.js +32 -0
- package/svg-icons/image/vignette.js +32 -0
- package/svg-icons/image/wb-auto.js +32 -0
- package/svg-icons/image/wb-cloudy.js +32 -0
- package/svg-icons/image/wb-incandescent.js +32 -0
- package/svg-icons/image/wb-iridescent.js +32 -0
- package/svg-icons/image/wb-sunny.js +32 -0
- package/svg-icons/index.es.js +1922 -0
- package/svg-icons/index.js +4823 -0
- package/svg-icons/maps/add-location.js +32 -0
- package/svg-icons/maps/beenhere.js +32 -0
- package/svg-icons/maps/directions-bike.js +32 -0
- package/svg-icons/maps/directions-boat.js +32 -0
- package/svg-icons/maps/directions-bus.js +32 -0
- package/svg-icons/maps/directions-car.js +32 -0
- package/svg-icons/maps/directions-railway.js +32 -0
- package/svg-icons/maps/directions-run.js +32 -0
- package/svg-icons/maps/directions-subway.js +32 -0
- package/svg-icons/maps/directions-transit.js +32 -0
- package/svg-icons/maps/directions-walk.js +32 -0
- package/svg-icons/maps/directions.js +32 -0
- package/svg-icons/maps/edit-location.js +32 -0
- package/svg-icons/maps/ev-station.js +32 -0
- package/svg-icons/maps/flight.js +33 -0
- package/svg-icons/maps/hotel.js +32 -0
- package/svg-icons/maps/layers-clear.js +32 -0
- package/svg-icons/maps/layers.js +32 -0
- package/svg-icons/maps/local-activity.js +32 -0
- package/svg-icons/maps/local-airport.js +32 -0
- package/svg-icons/maps/local-atm.js +32 -0
- package/svg-icons/maps/local-bar.js +32 -0
- package/svg-icons/maps/local-cafe.js +32 -0
- package/svg-icons/maps/local-car-wash.js +32 -0
- package/svg-icons/maps/local-convenience-store.js +32 -0
- package/svg-icons/maps/local-dining.js +32 -0
- package/svg-icons/maps/local-drink.js +32 -0
- package/svg-icons/maps/local-florist.js +32 -0
- package/svg-icons/maps/local-gas-station.js +32 -0
- package/svg-icons/maps/local-grocery-store.js +32 -0
- package/svg-icons/maps/local-hospital.js +32 -0
- package/svg-icons/maps/local-hotel.js +32 -0
- package/svg-icons/maps/local-laundry-service.js +32 -0
- package/svg-icons/maps/local-library.js +32 -0
- package/svg-icons/maps/local-mall.js +32 -0
- package/svg-icons/maps/local-movies.js +32 -0
- package/svg-icons/maps/local-offer.js +32 -0
- package/svg-icons/maps/local-parking.js +32 -0
- package/svg-icons/maps/local-pharmacy.js +32 -0
- package/svg-icons/maps/local-phone.js +32 -0
- package/svg-icons/maps/local-pizza.js +32 -0
- package/svg-icons/maps/local-play.js +32 -0
- package/svg-icons/maps/local-post-office.js +32 -0
- package/svg-icons/maps/local-printshop.js +32 -0
- package/svg-icons/maps/local-see.js +33 -0
- package/svg-icons/maps/local-shipping.js +32 -0
- package/svg-icons/maps/local-taxi.js +32 -0
- package/svg-icons/maps/map.js +32 -0
- package/svg-icons/maps/my-location.js +32 -0
- package/svg-icons/maps/navigation.js +32 -0
- package/svg-icons/maps/near-me.js +32 -0
- package/svg-icons/maps/person-pin-circle.js +32 -0
- package/svg-icons/maps/person-pin.js +32 -0
- package/svg-icons/maps/pin-drop.js +32 -0
- package/svg-icons/maps/place.js +32 -0
- package/svg-icons/maps/rate-review.js +32 -0
- package/svg-icons/maps/restaurant-menu.js +32 -0
- package/svg-icons/maps/restaurant.js +32 -0
- package/svg-icons/maps/satellite.js +32 -0
- package/svg-icons/maps/store-mall-directory.js +32 -0
- package/svg-icons/maps/streetview.js +34 -0
- package/svg-icons/maps/subway.js +34 -0
- package/svg-icons/maps/terrain.js +32 -0
- package/svg-icons/maps/traffic.js +32 -0
- package/svg-icons/maps/train.js +32 -0
- package/svg-icons/maps/tram.js +32 -0
- package/svg-icons/maps/transfer-within-a-station.js +32 -0
- package/svg-icons/maps/zoom-out-map.js +32 -0
- package/svg-icons/navigation/apps.js +32 -0
- package/svg-icons/navigation/arrow-back.js +32 -0
- package/svg-icons/navigation/arrow-downward.js +32 -0
- package/svg-icons/navigation/arrow-drop-down-circle.js +32 -0
- package/svg-icons/navigation/arrow-drop-down.js +32 -0
- package/svg-icons/navigation/arrow-drop-up.js +32 -0
- package/svg-icons/navigation/arrow-forward.js +32 -0
- package/svg-icons/navigation/arrow-upward.js +32 -0
- package/svg-icons/navigation/cancel.js +32 -0
- package/svg-icons/navigation/check.js +32 -0
- package/svg-icons/navigation/chevron-left.js +32 -0
- package/svg-icons/navigation/chevron-right.js +32 -0
- package/svg-icons/navigation/close.js +32 -0
- package/svg-icons/navigation/expand-less.js +32 -0
- package/svg-icons/navigation/expand-more.js +32 -0
- package/svg-icons/navigation/first-page.js +32 -0
- package/svg-icons/navigation/fullscreen-exit.js +32 -0
- package/svg-icons/navigation/fullscreen.js +32 -0
- package/svg-icons/navigation/last-page.js +32 -0
- package/svg-icons/navigation/menu.js +32 -0
- package/svg-icons/navigation/more-horiz.js +32 -0
- package/svg-icons/navigation/more-vert.js +32 -0
- package/svg-icons/navigation/refresh.js +32 -0
- package/svg-icons/navigation/subdirectory-arrow-left.js +32 -0
- package/svg-icons/navigation/subdirectory-arrow-right.js +32 -0
- package/svg-icons/navigation/unfold-less.js +32 -0
- package/svg-icons/navigation/unfold-more.js +32 -0
- package/svg-icons/navigation-arrow-drop-right.js +33 -0
- package/svg-icons/notification/adb.js +32 -0
- package/svg-icons/notification/airline-seat-flat-angled.js +32 -0
- package/svg-icons/notification/airline-seat-flat.js +32 -0
- package/svg-icons/notification/airline-seat-individual-suite.js +32 -0
- package/svg-icons/notification/airline-seat-legroom-extra.js +32 -0
- package/svg-icons/notification/airline-seat-legroom-normal.js +32 -0
- package/svg-icons/notification/airline-seat-legroom-reduced.js +32 -0
- package/svg-icons/notification/airline-seat-recline-extra.js +32 -0
- package/svg-icons/notification/airline-seat-recline-normal.js +32 -0
- package/svg-icons/notification/bluetooth-audio.js +32 -0
- package/svg-icons/notification/confirmation-number.js +32 -0
- package/svg-icons/notification/disc-full.js +32 -0
- package/svg-icons/notification/do-not-disturb-alt.js +32 -0
- package/svg-icons/notification/do-not-disturb-off.js +32 -0
- package/svg-icons/notification/do-not-disturb-on.js +32 -0
- package/svg-icons/notification/do-not-disturb.js +32 -0
- package/svg-icons/notification/drive-eta.js +32 -0
- package/svg-icons/notification/enhanced-encryption.js +32 -0
- package/svg-icons/notification/event-available.js +32 -0
- package/svg-icons/notification/event-busy.js +32 -0
- package/svg-icons/notification/event-note.js +32 -0
- package/svg-icons/notification/folder-special.js +32 -0
- package/svg-icons/notification/live-tv.js +32 -0
- package/svg-icons/notification/mms.js +32 -0
- package/svg-icons/notification/more.js +32 -0
- package/svg-icons/notification/network-check.js +32 -0
- package/svg-icons/notification/network-locked.js +32 -0
- package/svg-icons/notification/no-encryption.js +32 -0
- package/svg-icons/notification/ondemand-video.js +32 -0
- package/svg-icons/notification/personal-video.js +32 -0
- package/svg-icons/notification/phone-bluetooth-speaker.js +32 -0
- package/svg-icons/notification/phone-forwarded.js +32 -0
- package/svg-icons/notification/phone-in-talk.js +32 -0
- package/svg-icons/notification/phone-locked.js +32 -0
- package/svg-icons/notification/phone-missed.js +32 -0
- package/svg-icons/notification/phone-paused.js +32 -0
- package/svg-icons/notification/power.js +32 -0
- package/svg-icons/notification/priority-high.js +33 -0
- package/svg-icons/notification/rv-hookup.js +32 -0
- package/svg-icons/notification/sd-card.js +32 -0
- package/svg-icons/notification/sim-card-alert.js +32 -0
- package/svg-icons/notification/sms-failed.js +32 -0
- package/svg-icons/notification/sms.js +32 -0
- package/svg-icons/notification/sync-disabled.js +32 -0
- package/svg-icons/notification/sync-problem.js +32 -0
- package/svg-icons/notification/sync.js +32 -0
- package/svg-icons/notification/system-update.js +32 -0
- package/svg-icons/notification/tap-and-play.js +32 -0
- package/svg-icons/notification/time-to-leave.js +32 -0
- package/svg-icons/notification/vibration.js +32 -0
- package/svg-icons/notification/voice-chat.js +32 -0
- package/svg-icons/notification/vpn-lock.js +32 -0
- package/svg-icons/notification/wc.js +32 -0
- package/svg-icons/notification/wifi.js +32 -0
- package/svg-icons/places/ac-unit.js +32 -0
- package/svg-icons/places/airport-shuttle.js +32 -0
- package/svg-icons/places/all-inclusive.js +32 -0
- package/svg-icons/places/beach-access.js +32 -0
- package/svg-icons/places/business-center.js +32 -0
- package/svg-icons/places/casino.js +32 -0
- package/svg-icons/places/child-care.js +34 -0
- package/svg-icons/places/child-friendly.js +32 -0
- package/svg-icons/places/fitness-center.js +32 -0
- package/svg-icons/places/free-breakfast.js +32 -0
- package/svg-icons/places/golf-course.js +33 -0
- package/svg-icons/places/hot-tub.js +33 -0
- package/svg-icons/places/kitchen.js +32 -0
- package/svg-icons/places/pool.js +33 -0
- package/svg-icons/places/room-service.js +32 -0
- package/svg-icons/places/rv-hookup.js +32 -0
- package/svg-icons/places/smoke-free.js +32 -0
- package/svg-icons/places/smoking-rooms.js +32 -0
- package/svg-icons/places/spa.js +33 -0
- package/svg-icons/social/cake.js +32 -0
- package/svg-icons/social/domain.js +32 -0
- package/svg-icons/social/group-add.js +32 -0
- package/svg-icons/social/group.js +32 -0
- package/svg-icons/social/location-city.js +32 -0
- package/svg-icons/social/mood-bad.js +32 -0
- package/svg-icons/social/mood.js +32 -0
- package/svg-icons/social/notifications-active.js +32 -0
- package/svg-icons/social/notifications-none.js +32 -0
- package/svg-icons/social/notifications-off.js +32 -0
- package/svg-icons/social/notifications-paused.js +32 -0
- package/svg-icons/social/notifications.js +32 -0
- package/svg-icons/social/pages.js +32 -0
- package/svg-icons/social/party-mode.js +32 -0
- package/svg-icons/social/people-outline.js +32 -0
- package/svg-icons/social/people.js +32 -0
- package/svg-icons/social/person-add.js +32 -0
- package/svg-icons/social/person-outline.js +32 -0
- package/svg-icons/social/person.js +32 -0
- package/svg-icons/social/plus-one.js +32 -0
- package/svg-icons/social/poll.js +32 -0
- package/svg-icons/social/public.js +32 -0
- package/svg-icons/social/school.js +32 -0
- package/svg-icons/social/sentiment-dissatisfied.js +34 -0
- package/svg-icons/social/sentiment-neutral.js +35 -0
- package/svg-icons/social/sentiment-satisfied.js +34 -0
- package/svg-icons/social/sentiment-very-dissatisfied.js +32 -0
- package/svg-icons/social/sentiment-very-satisfied.js +32 -0
- package/svg-icons/social/share.js +32 -0
- package/svg-icons/social/whatshot.js +32 -0
- package/svg-icons/toggle/check-box-outline-blank.js +32 -0
- package/svg-icons/toggle/check-box.js +32 -0
- package/svg-icons/toggle/indeterminate-check-box.js +32 -0
- package/svg-icons/toggle/radio-button-checked.js +32 -0
- package/svg-icons/toggle/radio-button-unchecked.js +32 -0
- package/svg-icons/toggle/star-border.js +32 -0
- package/svg-icons/toggle/star-half.js +32 -0
- package/svg-icons/toggle/star.js +32 -0
- package/utils/autoPrefix.js +10 -0
- package/utils/autoprefixer.js +79 -0
- package/utils/autoprefixerDynamic.js +40 -0
- package/utils/autoprefixerStatic.js +40 -0
- package/utils/callOnce.js +26 -0
- package/utils/childUtils.js +26 -0
- package/utils/colorManipulator.js +242 -0
- package/utils/deprecatedExport.js +22 -0
- package/utils/deprecatedPropType.js +38 -0
- package/utils/dom.js +24 -0
- package/utils/events.js +39 -0
- package/utils/propTypes.js +35 -0
- package/utils/rtl.js +89 -0
- package/utils/withWidth.js +132 -0
package/Menu/Menu.js
ADDED
|
@@ -0,0 +1,693 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
8
|
+
|
|
9
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
10
|
+
|
|
11
|
+
var _simpleAssign = require('simple-assign');
|
|
12
|
+
|
|
13
|
+
var _simpleAssign2 = _interopRequireDefault(_simpleAssign);
|
|
14
|
+
|
|
15
|
+
var _react = require('react');
|
|
16
|
+
|
|
17
|
+
var _react2 = _interopRequireDefault(_react);
|
|
18
|
+
|
|
19
|
+
var _propTypes = require('prop-types');
|
|
20
|
+
|
|
21
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
22
|
+
|
|
23
|
+
var _reactDom = require('react-dom');
|
|
24
|
+
|
|
25
|
+
var _reactDom2 = _interopRequireDefault(_reactDom);
|
|
26
|
+
|
|
27
|
+
var _shallowEqual = require('recompose/shallowEqual');
|
|
28
|
+
|
|
29
|
+
var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
|
|
30
|
+
|
|
31
|
+
var _ClickAwayListener = require('../internal/ClickAwayListener');
|
|
32
|
+
|
|
33
|
+
var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener);
|
|
34
|
+
|
|
35
|
+
var _keycode = require('keycode');
|
|
36
|
+
|
|
37
|
+
var _keycode2 = _interopRequireDefault(_keycode);
|
|
38
|
+
|
|
39
|
+
var _propTypes3 = require('../utils/propTypes');
|
|
40
|
+
|
|
41
|
+
var _propTypes4 = _interopRequireDefault(_propTypes3);
|
|
42
|
+
|
|
43
|
+
var _List = require('../List/List');
|
|
44
|
+
|
|
45
|
+
var _List2 = _interopRequireDefault(_List);
|
|
46
|
+
|
|
47
|
+
var _menuUtils = require('./menuUtils');
|
|
48
|
+
|
|
49
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
50
|
+
|
|
51
|
+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
52
|
+
|
|
53
|
+
function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); }
|
|
54
|
+
|
|
55
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
56
|
+
|
|
57
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
58
|
+
|
|
59
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
60
|
+
|
|
61
|
+
function getStyles(props, context) {
|
|
62
|
+
var desktop = props.desktop,
|
|
63
|
+
maxHeight = props.maxHeight,
|
|
64
|
+
width = props.width;
|
|
65
|
+
var muiTheme = context.muiTheme;
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
var styles = {
|
|
69
|
+
root: {
|
|
70
|
+
// Nested div because the List scales x faster than it scales y
|
|
71
|
+
zIndex: muiTheme.zIndex.menu,
|
|
72
|
+
maxHeight: maxHeight,
|
|
73
|
+
overflowY: maxHeight ? 'auto' : null
|
|
74
|
+
},
|
|
75
|
+
divider: {
|
|
76
|
+
marginTop: 7,
|
|
77
|
+
marginBottom: 8
|
|
78
|
+
},
|
|
79
|
+
list: {
|
|
80
|
+
display: 'table-cell',
|
|
81
|
+
paddingBottom: desktop ? 16 : 8,
|
|
82
|
+
paddingTop: desktop ? 16 : 8,
|
|
83
|
+
userSelect: 'none',
|
|
84
|
+
width: width
|
|
85
|
+
},
|
|
86
|
+
selectedMenuItem: {
|
|
87
|
+
color: muiTheme.menuItem.selectedTextColor
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return styles;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
var Menu = function (_Component) {
|
|
95
|
+
_inherits(Menu, _Component);
|
|
96
|
+
|
|
97
|
+
function Menu(props, context) {
|
|
98
|
+
_classCallCheck(this, Menu);
|
|
99
|
+
|
|
100
|
+
var _this = _possibleConstructorReturn(this, (Menu.__proto__ || Object.getPrototypeOf(Menu)).call(this, props, context));
|
|
101
|
+
|
|
102
|
+
_initialiseProps.call(_this);
|
|
103
|
+
|
|
104
|
+
var filteredChildren = _this.getFilteredChildren(props.children);
|
|
105
|
+
var selectedIndex = _this.getLastSelectedIndex(props, filteredChildren);
|
|
106
|
+
|
|
107
|
+
var newFocusIndex = props.disableAutoFocus ? -1 : selectedIndex >= 0 ? selectedIndex : 0;
|
|
108
|
+
if (newFocusIndex !== -1 && props.onMenuItemFocusChange) {
|
|
109
|
+
props.onMenuItemFocusChange(null, newFocusIndex);
|
|
110
|
+
}
|
|
111
|
+
_this.state = {
|
|
112
|
+
focusIndex: newFocusIndex,
|
|
113
|
+
isKeyboardFocused: props.initiallyKeyboardFocused,
|
|
114
|
+
keyWidth: props.desktop ? 64 : 56
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
_this.hotKeyHolder = new _menuUtils.HotKeyHolder();
|
|
118
|
+
return _this;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
_createClass(Menu, [{
|
|
122
|
+
key: 'componentDidMount',
|
|
123
|
+
value: function componentDidMount() {
|
|
124
|
+
if (this.props.autoWidth) {
|
|
125
|
+
this.setWidth();
|
|
126
|
+
}
|
|
127
|
+
this.setScollPosition();
|
|
128
|
+
}
|
|
129
|
+
}, {
|
|
130
|
+
key: 'componentWillReceiveProps',
|
|
131
|
+
value: function componentWillReceiveProps(nextProps) {
|
|
132
|
+
var selectedIndex = void 0;
|
|
133
|
+
var filteredChildren = this.getFilteredChildren(nextProps.children);
|
|
134
|
+
|
|
135
|
+
if (this.props.multiple !== true) {
|
|
136
|
+
selectedIndex = this.getLastSelectedIndex(nextProps, filteredChildren);
|
|
137
|
+
} else {
|
|
138
|
+
selectedIndex = this.state.focusIndex;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
var newFocusIndex = nextProps.disableAutoFocus ? -1 : selectedIndex >= 0 ? selectedIndex : 0;
|
|
142
|
+
if (newFocusIndex !== this.state.focusIndex && this.props.onMenuItemFocusChange) {
|
|
143
|
+
this.props.onMenuItemFocusChange(null, newFocusIndex);
|
|
144
|
+
}
|
|
145
|
+
this.setState({
|
|
146
|
+
focusIndex: newFocusIndex,
|
|
147
|
+
keyWidth: nextProps.desktop ? 64 : 56
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}, {
|
|
151
|
+
key: 'shouldComponentUpdate',
|
|
152
|
+
value: function shouldComponentUpdate(nextProps, nextState, nextContext) {
|
|
153
|
+
return !(0, _shallowEqual2.default)(this.props, nextProps) || !(0, _shallowEqual2.default)(this.state, nextState) || !(0, _shallowEqual2.default)(this.context, nextContext);
|
|
154
|
+
}
|
|
155
|
+
}, {
|
|
156
|
+
key: 'componentDidUpdate',
|
|
157
|
+
value: function componentDidUpdate() {
|
|
158
|
+
if (this.props.autoWidth) this.setWidth();
|
|
159
|
+
}
|
|
160
|
+
}, {
|
|
161
|
+
key: 'getValueLink',
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
// Do not use outside of this component, it will be removed once valueLink is deprecated
|
|
165
|
+
value: function getValueLink(props) {
|
|
166
|
+
return props.valueLink || {
|
|
167
|
+
value: props.value,
|
|
168
|
+
requestChange: props.onChange
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
}, {
|
|
172
|
+
key: 'setKeyboardFocused',
|
|
173
|
+
value: function setKeyboardFocused(keyboardFocused) {
|
|
174
|
+
this.setState({
|
|
175
|
+
isKeyboardFocused: keyboardFocused
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}, {
|
|
179
|
+
key: 'getFilteredChildren',
|
|
180
|
+
value: function getFilteredChildren(children) {
|
|
181
|
+
var filteredChildren = [];
|
|
182
|
+
_react2.default.Children.forEach(children, function (child) {
|
|
183
|
+
if (child) {
|
|
184
|
+
filteredChildren.push(child);
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
return filteredChildren;
|
|
188
|
+
}
|
|
189
|
+
}, {
|
|
190
|
+
key: 'cloneMenuItem',
|
|
191
|
+
value: function cloneMenuItem(child, childIndex, styles, index) {
|
|
192
|
+
var _this2 = this;
|
|
193
|
+
|
|
194
|
+
var childIsDisabled = child.props.disabled;
|
|
195
|
+
|
|
196
|
+
var selectedChildStyles = {};
|
|
197
|
+
if (!childIsDisabled) {
|
|
198
|
+
var selected = this.isChildSelected(child, this.props);
|
|
199
|
+
|
|
200
|
+
if (selected) {
|
|
201
|
+
(0, _simpleAssign2.default)(selectedChildStyles, styles.selectedMenuItem, this.props.selectedMenuItemStyle);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
var mergedChildStyles = (0, _simpleAssign2.default)({}, child.props.style, this.props.menuItemStyle, selectedChildStyles);
|
|
205
|
+
|
|
206
|
+
var extraProps = {
|
|
207
|
+
desktop: this.props.desktop,
|
|
208
|
+
style: mergedChildStyles
|
|
209
|
+
};
|
|
210
|
+
if (!childIsDisabled) {
|
|
211
|
+
var isFocused = childIndex === this.state.focusIndex;
|
|
212
|
+
var focusState = 'none';
|
|
213
|
+
if (isFocused) {
|
|
214
|
+
focusState = this.state.isKeyboardFocused ? 'keyboard-focused' : 'focused';
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
(0, _simpleAssign2.default)(extraProps, {
|
|
218
|
+
focusState: focusState,
|
|
219
|
+
onClick: function onClick(event) {
|
|
220
|
+
_this2.handleMenuItemClick(event, child, index);
|
|
221
|
+
if (child.props.onClick) child.props.onClick(event);
|
|
222
|
+
},
|
|
223
|
+
ref: isFocused ? 'focusedMenuItem' : null
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
return _react2.default.cloneElement(child, extraProps);
|
|
227
|
+
}
|
|
228
|
+
}, {
|
|
229
|
+
key: 'decrementKeyboardFocusIndex',
|
|
230
|
+
value: function decrementKeyboardFocusIndex(event) {
|
|
231
|
+
var index = this.state.focusIndex;
|
|
232
|
+
|
|
233
|
+
index--;
|
|
234
|
+
if (index < 0) index = 0;
|
|
235
|
+
|
|
236
|
+
this.setFocusIndex(event, index, true);
|
|
237
|
+
}
|
|
238
|
+
}, {
|
|
239
|
+
key: 'getMenuItemCount',
|
|
240
|
+
value: function getMenuItemCount(filteredChildren) {
|
|
241
|
+
var menuItemCount = 0;
|
|
242
|
+
filteredChildren.forEach(function (child) {
|
|
243
|
+
var childIsADivider = child.type && child.type.muiName === 'Divider';
|
|
244
|
+
var childIsDisabled = child.props.disabled;
|
|
245
|
+
if (!childIsADivider && !childIsDisabled) menuItemCount++;
|
|
246
|
+
});
|
|
247
|
+
return menuItemCount;
|
|
248
|
+
}
|
|
249
|
+
}, {
|
|
250
|
+
key: 'getLastSelectedIndex',
|
|
251
|
+
value: function getLastSelectedIndex(props, filteredChildren) {
|
|
252
|
+
var _this3 = this;
|
|
253
|
+
|
|
254
|
+
var selectedIndex = -1;
|
|
255
|
+
var menuItemIndex = 0;
|
|
256
|
+
|
|
257
|
+
filteredChildren.forEach(function (child) {
|
|
258
|
+
var childIsADivider = child.type && child.type.muiName === 'Divider';
|
|
259
|
+
|
|
260
|
+
if (_this3.isChildSelected(child, props)) selectedIndex = menuItemIndex;
|
|
261
|
+
if (!childIsADivider) menuItemIndex++;
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
return selectedIndex;
|
|
265
|
+
}
|
|
266
|
+
}, {
|
|
267
|
+
key: 'setFocusIndexStartsWith',
|
|
268
|
+
value: function setFocusIndexStartsWith(event, keys, filteredChildren) {
|
|
269
|
+
var foundIndex = -1;
|
|
270
|
+
_react2.default.Children.forEach(filteredChildren, function (child, index) {
|
|
271
|
+
if (foundIndex >= 0) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
var primaryText = child.props.primaryText;
|
|
275
|
+
|
|
276
|
+
if (typeof primaryText === 'string' && primaryText.substr(0, keys.length).toLowerCase() === keys.toLowerCase()) {
|
|
277
|
+
foundIndex = index;
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
if (foundIndex >= 0) {
|
|
281
|
+
this.setFocusIndex(event, foundIndex, true);
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
284
|
+
return false;
|
|
285
|
+
}
|
|
286
|
+
}, {
|
|
287
|
+
key: 'handleMenuItemClick',
|
|
288
|
+
value: function handleMenuItemClick(event, item, index) {
|
|
289
|
+
var children = this.props.children;
|
|
290
|
+
var multiple = this.props.multiple;
|
|
291
|
+
var valueLink = this.getValueLink(this.props);
|
|
292
|
+
var menuValue = valueLink.value;
|
|
293
|
+
var itemValue = item.props.value;
|
|
294
|
+
var focusIndex = _react2.default.isValidElement(children) ? 0 : children.indexOf(item);
|
|
295
|
+
|
|
296
|
+
this.setFocusIndex(event, focusIndex, false);
|
|
297
|
+
|
|
298
|
+
if (multiple) {
|
|
299
|
+
menuValue = menuValue || [];
|
|
300
|
+
|
|
301
|
+
var itemIndex = menuValue.indexOf(itemValue);
|
|
302
|
+
|
|
303
|
+
var _menuValue = menuValue,
|
|
304
|
+
_menuValue2 = _toArray(_menuValue),
|
|
305
|
+
newMenuValue = _menuValue2.slice(0);
|
|
306
|
+
|
|
307
|
+
if (itemIndex === -1) {
|
|
308
|
+
newMenuValue.push(itemValue);
|
|
309
|
+
} else {
|
|
310
|
+
newMenuValue.splice(itemIndex, 1);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
valueLink.requestChange(event, newMenuValue);
|
|
314
|
+
} else if (!multiple && itemValue !== menuValue) {
|
|
315
|
+
valueLink.requestChange(event, itemValue);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
this.props.onItemClick(event, item, index);
|
|
319
|
+
}
|
|
320
|
+
}, {
|
|
321
|
+
key: 'incrementKeyboardFocusIndex',
|
|
322
|
+
value: function incrementKeyboardFocusIndex(event, filteredChildren) {
|
|
323
|
+
var index = this.state.focusIndex;
|
|
324
|
+
var maxIndex = this.getMenuItemCount(filteredChildren) - 1;
|
|
325
|
+
|
|
326
|
+
index++;
|
|
327
|
+
if (index > maxIndex) index = maxIndex;
|
|
328
|
+
|
|
329
|
+
this.setFocusIndex(event, index, true);
|
|
330
|
+
}
|
|
331
|
+
}, {
|
|
332
|
+
key: 'isChildSelected',
|
|
333
|
+
value: function isChildSelected(child, props) {
|
|
334
|
+
var menuValue = this.getValueLink(props).value;
|
|
335
|
+
var childValue = child.props.value;
|
|
336
|
+
|
|
337
|
+
if (props.multiple) {
|
|
338
|
+
return menuValue && menuValue.length && menuValue.indexOf(childValue) !== -1;
|
|
339
|
+
} else {
|
|
340
|
+
return child.props.hasOwnProperty('value') && menuValue === childValue;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}, {
|
|
344
|
+
key: 'setFocusIndex',
|
|
345
|
+
value: function setFocusIndex(event, newIndex, isKeyboardFocused) {
|
|
346
|
+
if (this.props.onMenuItemFocusChange) {
|
|
347
|
+
// Do this even if `newIndex === this.state.focusIndex` to allow users
|
|
348
|
+
// to detect up-arrow on the first MenuItem or down-arrow on the last.
|
|
349
|
+
this.props.onMenuItemFocusChange(event, newIndex);
|
|
350
|
+
}
|
|
351
|
+
this.setState({
|
|
352
|
+
focusIndex: newIndex,
|
|
353
|
+
isKeyboardFocused: isKeyboardFocused
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
}, {
|
|
357
|
+
key: 'setScollPosition',
|
|
358
|
+
value: function setScollPosition() {
|
|
359
|
+
var desktop = this.props.desktop;
|
|
360
|
+
var focusedMenuItem = this.refs.focusedMenuItem;
|
|
361
|
+
var menuItemHeight = desktop ? 32 : 48;
|
|
362
|
+
|
|
363
|
+
if (focusedMenuItem) {
|
|
364
|
+
var selectedOffSet = _reactDom2.default.findDOMNode(focusedMenuItem).offsetTop;
|
|
365
|
+
|
|
366
|
+
// Make the focused item be the 2nd item in the list the user sees
|
|
367
|
+
var scrollTop = selectedOffSet - menuItemHeight;
|
|
368
|
+
if (scrollTop < menuItemHeight) scrollTop = 0;
|
|
369
|
+
|
|
370
|
+
_reactDom2.default.findDOMNode(this.refs.scrollContainer).scrollTop = scrollTop;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}, {
|
|
374
|
+
key: 'cancelScrollEvent',
|
|
375
|
+
value: function cancelScrollEvent(event) {
|
|
376
|
+
event.stopPropagation();
|
|
377
|
+
event.preventDefault();
|
|
378
|
+
return false;
|
|
379
|
+
}
|
|
380
|
+
}, {
|
|
381
|
+
key: 'setWidth',
|
|
382
|
+
value: function setWidth() {
|
|
383
|
+
var el = _reactDom2.default.findDOMNode(this);
|
|
384
|
+
var listEl = _reactDom2.default.findDOMNode(this.refs.list);
|
|
385
|
+
var elWidth = el.offsetWidth;
|
|
386
|
+
var keyWidth = this.state.keyWidth;
|
|
387
|
+
var minWidth = keyWidth * 1.5;
|
|
388
|
+
var keyIncrements = elWidth / keyWidth;
|
|
389
|
+
var newWidth = void 0;
|
|
390
|
+
|
|
391
|
+
keyIncrements = keyIncrements <= 1.5 ? 1.5 : Math.ceil(keyIncrements);
|
|
392
|
+
newWidth = keyIncrements * keyWidth;
|
|
393
|
+
|
|
394
|
+
if (newWidth < minWidth) newWidth = minWidth;
|
|
395
|
+
|
|
396
|
+
el.style.width = newWidth + 'px';
|
|
397
|
+
listEl.style.width = newWidth + 'px';
|
|
398
|
+
}
|
|
399
|
+
}, {
|
|
400
|
+
key: 'render',
|
|
401
|
+
value: function render() {
|
|
402
|
+
var _this4 = this;
|
|
403
|
+
|
|
404
|
+
var _props = this.props,
|
|
405
|
+
autoWidth = _props.autoWidth,
|
|
406
|
+
children = _props.children,
|
|
407
|
+
desktop = _props.desktop,
|
|
408
|
+
disableAutoFocus = _props.disableAutoFocus,
|
|
409
|
+
initiallyKeyboardFocused = _props.initiallyKeyboardFocused,
|
|
410
|
+
listStyle = _props.listStyle,
|
|
411
|
+
maxHeight = _props.maxHeight,
|
|
412
|
+
multiple = _props.multiple,
|
|
413
|
+
onItemClick = _props.onItemClick,
|
|
414
|
+
onEscKeyDown = _props.onEscKeyDown,
|
|
415
|
+
onMenuItemFocusChange = _props.onMenuItemFocusChange,
|
|
416
|
+
selectedMenuItemStyle = _props.selectedMenuItemStyle,
|
|
417
|
+
menuItemStyle = _props.menuItemStyle,
|
|
418
|
+
style = _props.style,
|
|
419
|
+
value = _props.value,
|
|
420
|
+
valueLink = _props.valueLink,
|
|
421
|
+
width = _props.width,
|
|
422
|
+
other = _objectWithoutProperties(_props, ['autoWidth', 'children', 'desktop', 'disableAutoFocus', 'initiallyKeyboardFocused', 'listStyle', 'maxHeight', 'multiple', 'onItemClick', 'onEscKeyDown', 'onMenuItemFocusChange', 'selectedMenuItemStyle', 'menuItemStyle', 'style', 'value', 'valueLink', 'width']);
|
|
423
|
+
|
|
424
|
+
var prepareStyles = this.context.muiTheme.prepareStyles;
|
|
425
|
+
|
|
426
|
+
var styles = getStyles(this.props, this.context);
|
|
427
|
+
|
|
428
|
+
var mergedRootStyles = (0, _simpleAssign2.default)(styles.root, style);
|
|
429
|
+
var mergedListStyles = (0, _simpleAssign2.default)(styles.list, listStyle);
|
|
430
|
+
|
|
431
|
+
var filteredChildren = this.getFilteredChildren(children);
|
|
432
|
+
|
|
433
|
+
var menuItemIndex = 0;
|
|
434
|
+
var newChildren = _react2.default.Children.map(filteredChildren, function (child, index) {
|
|
435
|
+
var childIsDisabled = child.props.disabled;
|
|
436
|
+
var childName = child.type ? child.type.muiName : '';
|
|
437
|
+
var newChild = child;
|
|
438
|
+
|
|
439
|
+
switch (childName) {
|
|
440
|
+
case 'MenuItem':
|
|
441
|
+
newChild = _this4.cloneMenuItem(child, menuItemIndex, styles, index);
|
|
442
|
+
break;
|
|
443
|
+
|
|
444
|
+
case 'Divider':
|
|
445
|
+
newChild = _react2.default.cloneElement(child, {
|
|
446
|
+
style: (0, _simpleAssign2.default)({}, styles.divider, child.props.style)
|
|
447
|
+
});
|
|
448
|
+
break;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
if (childName === 'MenuItem' && !childIsDisabled) {
|
|
452
|
+
menuItemIndex++;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return newChild;
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
return _react2.default.createElement(
|
|
459
|
+
_ClickAwayListener2.default,
|
|
460
|
+
{ onClickAway: this.handleClickAway },
|
|
461
|
+
_react2.default.createElement(
|
|
462
|
+
'div',
|
|
463
|
+
{
|
|
464
|
+
onKeyDown: this.handleKeyDown,
|
|
465
|
+
onWheel: this.handleOnWheel,
|
|
466
|
+
style: prepareStyles(mergedRootStyles),
|
|
467
|
+
ref: 'scrollContainer',
|
|
468
|
+
role: 'presentation'
|
|
469
|
+
},
|
|
470
|
+
_react2.default.createElement(
|
|
471
|
+
_List2.default,
|
|
472
|
+
_extends({}, other, {
|
|
473
|
+
ref: 'list',
|
|
474
|
+
style: mergedListStyles,
|
|
475
|
+
role: 'menu'
|
|
476
|
+
}),
|
|
477
|
+
newChildren
|
|
478
|
+
)
|
|
479
|
+
)
|
|
480
|
+
);
|
|
481
|
+
}
|
|
482
|
+
}]);
|
|
483
|
+
|
|
484
|
+
return Menu;
|
|
485
|
+
}(_react.Component);
|
|
486
|
+
|
|
487
|
+
Menu.propTypes = {
|
|
488
|
+
/**
|
|
489
|
+
* If true, the width of the menu will be set automatically
|
|
490
|
+
* according to the widths of its children,
|
|
491
|
+
* using proper keyline increments (64px for desktop,
|
|
492
|
+
* 56px otherwise).
|
|
493
|
+
*/
|
|
494
|
+
autoWidth: _propTypes2.default.bool,
|
|
495
|
+
/**
|
|
496
|
+
* The content of the menu. This is usually used to pass `MenuItem`
|
|
497
|
+
* elements.
|
|
498
|
+
*/
|
|
499
|
+
children: _propTypes2.default.node,
|
|
500
|
+
/**
|
|
501
|
+
* If true, the menu item will render with compact desktop styles.
|
|
502
|
+
*/
|
|
503
|
+
desktop: _propTypes2.default.bool,
|
|
504
|
+
/**
|
|
505
|
+
* If true, the menu will not be auto-focused.
|
|
506
|
+
*/
|
|
507
|
+
disableAutoFocus: _propTypes2.default.bool,
|
|
508
|
+
/**
|
|
509
|
+
* If true, the menu will be keyboard-focused initially.
|
|
510
|
+
*/
|
|
511
|
+
initiallyKeyboardFocused: _propTypes2.default.bool,
|
|
512
|
+
/**
|
|
513
|
+
* Override the inline-styles of the underlying `List` element.
|
|
514
|
+
*/
|
|
515
|
+
listStyle: _propTypes2.default.object,
|
|
516
|
+
/**
|
|
517
|
+
* The maximum height of the menu in pixels. If specified,
|
|
518
|
+
* the menu will be scrollable if it is taller than the provided
|
|
519
|
+
* height.
|
|
520
|
+
*/
|
|
521
|
+
maxHeight: _propTypes2.default.number,
|
|
522
|
+
/**
|
|
523
|
+
* Override the inline-styles of menu items.
|
|
524
|
+
*/
|
|
525
|
+
menuItemStyle: _propTypes2.default.object,
|
|
526
|
+
/**
|
|
527
|
+
* If true, `value` must be an array and the menu will support
|
|
528
|
+
* multiple selections.
|
|
529
|
+
*/
|
|
530
|
+
multiple: _propTypes2.default.bool,
|
|
531
|
+
/**
|
|
532
|
+
* Callback function fired when a menu item with `value` not
|
|
533
|
+
* equal to the current `value` of the menu is clicked.
|
|
534
|
+
*
|
|
535
|
+
* @param {object} event Click event targeting the menu item.
|
|
536
|
+
* @param {any} value If `multiple` is true, the menu's `value`
|
|
537
|
+
* array with either the menu item's `value` added (if
|
|
538
|
+
* it wasn't already selected) or omitted (if it was already selected).
|
|
539
|
+
* Otherwise, the `value` of the menu item.
|
|
540
|
+
*/
|
|
541
|
+
onChange: _propTypes2.default.func,
|
|
542
|
+
/**
|
|
543
|
+
* Callback function fired when the menu is focused and the *Esc* key
|
|
544
|
+
* is pressed.
|
|
545
|
+
*
|
|
546
|
+
* @param {object} event `keydown` event targeting the menu.
|
|
547
|
+
*/
|
|
548
|
+
onEscKeyDown: _propTypes2.default.func,
|
|
549
|
+
/**
|
|
550
|
+
* Callback function fired when a menu item is clicked.
|
|
551
|
+
*
|
|
552
|
+
* @param {object} event Click event targeting the menu item.
|
|
553
|
+
* @param {object} menuItem The menu item.
|
|
554
|
+
* @param {number} index The index of the menu item.
|
|
555
|
+
*/
|
|
556
|
+
onItemClick: _propTypes2.default.func,
|
|
557
|
+
/** @ignore */
|
|
558
|
+
onKeyDown: _propTypes2.default.func,
|
|
559
|
+
/**
|
|
560
|
+
* Callback function fired when the focus on a `MenuItem` is changed.
|
|
561
|
+
* There will be some "duplicate" changes reported if two different
|
|
562
|
+
* focusing event happen, for example if a `MenuItem` is focused via
|
|
563
|
+
* the keyboard and then it is clicked on.
|
|
564
|
+
*
|
|
565
|
+
* @param {object} event The event that triggered the focus change.
|
|
566
|
+
* The event can be null since the focus can be changed for non-event
|
|
567
|
+
* reasons such as prop changes.
|
|
568
|
+
* @param {number} newFocusIndex The index of the newly focused
|
|
569
|
+
* `MenuItem` or `-1` if focus was lost.
|
|
570
|
+
*/
|
|
571
|
+
onMenuItemFocusChange: _propTypes2.default.func,
|
|
572
|
+
/**
|
|
573
|
+
* Override the inline-styles of selected menu items.
|
|
574
|
+
*/
|
|
575
|
+
selectedMenuItemStyle: _propTypes2.default.object,
|
|
576
|
+
/**
|
|
577
|
+
* Override the inline-styles of the root element.
|
|
578
|
+
*/
|
|
579
|
+
style: _propTypes2.default.object,
|
|
580
|
+
/**
|
|
581
|
+
* If `multiple` is true, an array of the `value`s of the selected
|
|
582
|
+
* menu items. Otherwise, the `value` of the selected menu item.
|
|
583
|
+
* If provided, the menu will be a controlled component.
|
|
584
|
+
* This component also supports valueLink.
|
|
585
|
+
*/
|
|
586
|
+
value: _propTypes2.default.any,
|
|
587
|
+
/**
|
|
588
|
+
* ValueLink for the menu's `value`.
|
|
589
|
+
*/
|
|
590
|
+
valueLink: _propTypes2.default.object,
|
|
591
|
+
/**
|
|
592
|
+
* The width of the menu. If not specified, the menu's width
|
|
593
|
+
* will be set according to the widths of its children, using
|
|
594
|
+
* proper keyline increments (64px for desktop, 56px otherwise).
|
|
595
|
+
*/
|
|
596
|
+
width: _propTypes4.default.stringOrNumber
|
|
597
|
+
};
|
|
598
|
+
Menu.defaultProps = {
|
|
599
|
+
autoWidth: true,
|
|
600
|
+
desktop: false,
|
|
601
|
+
disableAutoFocus: false,
|
|
602
|
+
initiallyKeyboardFocused: false,
|
|
603
|
+
maxHeight: null,
|
|
604
|
+
multiple: false,
|
|
605
|
+
onChange: function onChange() {},
|
|
606
|
+
onEscKeyDown: function onEscKeyDown() {},
|
|
607
|
+
onItemClick: function onItemClick() {},
|
|
608
|
+
onKeyDown: function onKeyDown() {}
|
|
609
|
+
};
|
|
610
|
+
Menu.contextTypes = {
|
|
611
|
+
muiTheme: _propTypes2.default.object.isRequired
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
var _initialiseProps = function _initialiseProps() {
|
|
615
|
+
var _this5 = this;
|
|
616
|
+
|
|
617
|
+
this.handleClickAway = function (event) {
|
|
618
|
+
if (event.defaultPrevented) {
|
|
619
|
+
return;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
var focusIndex = _this5.state.focusIndex;
|
|
623
|
+
|
|
624
|
+
if (focusIndex < 0) {
|
|
625
|
+
return;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
var filteredChildren = _this5.getFilteredChildren(_this5.props.children);
|
|
629
|
+
var focusedItem = filteredChildren[focusIndex];
|
|
630
|
+
if (!!focusedItem && focusedItem.props.menuItems && focusedItem.props.menuItems.length > 0) {
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
_this5.setFocusIndex(event, -1, false);
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
this.handleKeyDown = function (event) {
|
|
638
|
+
var filteredChildren = _this5.getFilteredChildren(_this5.props.children);
|
|
639
|
+
var key = (0, _keycode2.default)(event);
|
|
640
|
+
switch (key) {
|
|
641
|
+
case 'down':
|
|
642
|
+
event.preventDefault();
|
|
643
|
+
_this5.incrementKeyboardFocusIndex(event, filteredChildren);
|
|
644
|
+
break;
|
|
645
|
+
case 'esc':
|
|
646
|
+
_this5.props.onEscKeyDown(event);
|
|
647
|
+
break;
|
|
648
|
+
case 'tab':
|
|
649
|
+
event.preventDefault();
|
|
650
|
+
if (event.shiftKey) {
|
|
651
|
+
_this5.decrementKeyboardFocusIndex(event);
|
|
652
|
+
} else {
|
|
653
|
+
_this5.incrementKeyboardFocusIndex(event, filteredChildren);
|
|
654
|
+
}
|
|
655
|
+
break;
|
|
656
|
+
case 'up':
|
|
657
|
+
event.preventDefault();
|
|
658
|
+
_this5.decrementKeyboardFocusIndex(event);
|
|
659
|
+
break;
|
|
660
|
+
default:
|
|
661
|
+
if (key && key.length === 1) {
|
|
662
|
+
var hotKeys = _this5.hotKeyHolder.append(key);
|
|
663
|
+
if (_this5.setFocusIndexStartsWith(event, hotKeys, filteredChildren)) {
|
|
664
|
+
event.preventDefault();
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
_this5.props.onKeyDown(event);
|
|
669
|
+
};
|
|
670
|
+
|
|
671
|
+
this.handleOnWheel = function (event) {
|
|
672
|
+
var scrollContainer = _this5.refs.scrollContainer;
|
|
673
|
+
// Only scroll lock if the the Menu is scrollable.
|
|
674
|
+
if (scrollContainer.scrollHeight <= scrollContainer.clientHeight) return;
|
|
675
|
+
|
|
676
|
+
var scrollTop = scrollContainer.scrollTop,
|
|
677
|
+
scrollHeight = scrollContainer.scrollHeight,
|
|
678
|
+
clientHeight = scrollContainer.clientHeight;
|
|
679
|
+
|
|
680
|
+
var wheelDelta = event.deltaY;
|
|
681
|
+
var isDeltaPositive = wheelDelta > 0;
|
|
682
|
+
|
|
683
|
+
if (isDeltaPositive && wheelDelta > scrollHeight - clientHeight - scrollTop) {
|
|
684
|
+
scrollContainer.scrollTop = scrollHeight;
|
|
685
|
+
return _this5.cancelScrollEvent(event);
|
|
686
|
+
} else if (!isDeltaPositive && -wheelDelta > scrollTop) {
|
|
687
|
+
scrollContainer.scrollTop = 0;
|
|
688
|
+
return _this5.cancelScrollEvent(event);
|
|
689
|
+
}
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
exports.default = Menu;
|
package/Menu/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.MenuItem = exports.Menu = undefined;
|
|
7
|
+
|
|
8
|
+
var _Menu2 = require('./Menu');
|
|
9
|
+
|
|
10
|
+
var _Menu3 = _interopRequireDefault(_Menu2);
|
|
11
|
+
|
|
12
|
+
var _MenuItem2 = require('../MenuItem');
|
|
13
|
+
|
|
14
|
+
var _MenuItem3 = _interopRequireDefault(_MenuItem2);
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
exports.Menu = _Menu3.default;
|
|
19
|
+
exports.MenuItem = _MenuItem3.default;
|
|
20
|
+
exports.default = _Menu3.default;
|