├── .babelrc ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .flowconfig ├── .gitignore ├── .prettierrc ├── .travis.yml ├── .vscode └── settings.json ├── CHANGELOG.md ├── LICENSE ├── PACKAGE_BOILERPLATE.md ├── README.md ├── example ├── .gitignore ├── LICENSE ├── README.md ├── gatsby-browser.js ├── gatsby-config.js ├── gatsby-node.js ├── gatsby-ssr.js ├── package-lock.json ├── package.json ├── src │ ├── components │ │ ├── header.js │ │ ├── layout.css │ │ ├── layout.js │ │ └── seo.js │ ├── images │ │ └── origen-logo.png │ └── pages │ │ ├── 404.js │ │ ├── dialog-example.js │ │ └── index.js └── yarn.lock ├── flow-typed └── npm │ └── @material-ui │ └── core_v4.x.x.js ├── package.json ├── src ├── components │ └── MUICookieConsent.jsx └── index.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "targets": { 7 | "node": 6 8 | } 9 | } 10 | ], 11 | "@babel/preset-flow", 12 | "@babel/preset-react" 13 | ], 14 | "plugins": ["@babel/plugin-proposal-class-properties"] 15 | } 16 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | # Change these settings to your own preference 10 | indent_style = space 11 | indent_size = 2 12 | 13 | # We recommend you to keep these unchanged 14 | end_of_line = lf 15 | charset = utf-8 16 | trim_trailing_whitespace = true 17 | insert_final_newline = true 18 | 19 | [*.md] 20 | trim_trailing_whitespace = false 21 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | coverage 2 | dist 3 | node_modules 4 | example 5 | flow-typed/* -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": [ 4 | "airbnb-base", 5 | "plugin:flowtype/recommended", 6 | "plugin:prettier/recommended", 7 | "plugin:react/recommended", 8 | "prettier", 9 | "prettier/flowtype" 10 | ], 11 | "plugins": [ 12 | "flowtype", 13 | "prettier", 14 | "react" 15 | ], 16 | "env": { 17 | "jest": true 18 | }, 19 | "rules": { 20 | "import/no-unresolved": [2, { "ignore": ["react", "@material-ui\/.*"] }] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | .*/dist 3 | .*/coverage 4 | 5 | [libs] 6 | ./flow-typed/ -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | coverage 3 | dist 4 | node_modules 5 | *.log 6 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "singleQuote": true, 4 | "trailingComma": "all", 5 | "prettier.eslintIntegration": true 6 | } -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - v8 4 | script: 5 | - yarn lint 6 | - yarn test --coverage 7 | cache: 8 | - yarn 9 | after_success: 10 | - bash <(curl -s https://codecov.io/bash) 11 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.tabSize": 2, 3 | "files.associations": { 4 | ".eslintrc": "jsonc", 5 | "*.json": "jsonc" 6 | }, 7 | "flow.useNPMPackagedFlow": true, 8 | "javascript.validate.enable": false, 9 | "prettier.eslintIntegration": true, 10 | "typescript.validate.enable": false 11 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # [0.1.0](https://github.com/OrigenStudio/material-ui-cookie-consent/compare/v0.1.0-rc.1...v0.1.0) (2019-05-31) 2 | 3 | 4 | 5 | # [0.1.0-rc.1](https://github.com/OrigenStudio/material-ui-cookie-consent/compare/v0.0.1...v0.1.0-rc.1) (2019-05-30) 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Origen Studio 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PACKAGE_BOILERPLATE.md: -------------------------------------------------------------------------------- 1 | # nod 2 | 3 | [![NPM version](https://img.shields.io/npm/v/generator-nod.svg?style=flat-square)](https://npmjs.org/package/generator-nod) 4 | [![Build Status](https://img.shields.io/travis/diegohaz/nod/master.svg?style=flat-square)](https://travis-ci.org/diegohaz/nod) [![Coverage Status](https://img.shields.io/codecov/c/github/diegohaz/nod/master.svg?style=flat-square)](https://codecov.io/gh/diegohaz/nod/branch/master) 5 | 6 | NodeJS module generator/boilerplate. 7 | 8 |

9 | 10 | ## Features 11 | 12 | - [**Babel**](https://babeljs.io/) - Write next generation JavaScript today. 13 | - [**Jest**](https://facebook.github.io/jest) - JavaScript testing framework used by Facebook. 14 | - [**ESLint**](http://eslint.org/) - Make sure you are writing a quality code. 15 | - [**Prettier**](https://prettier.io/) - Enforces a consistent style by parsing your code and re-printing it. 16 | - [**Flow**](https://flowtype.org/) - A static type checker for JavaScript used heavily within Facebook. 17 | - [**Travis CI**](https://travis-ci.org) - Automate tests and linting for every push or pull request. 18 | - [**Documentation**](http://documentation.js.org/) - A documentation system so good, you'll actually write documentation. 19 | - [**Conventional Changelog**](https://github.com/conventional-changelog/conventional-changelog) - Generate a changelog from git metadata. 20 | 21 | ## Install 22 | 23 | The easiest way to use **nod** is through the Yeoman Generator. 24 | 25 | ```sh 26 | $ npm install -g yo generator-nod 27 | $ yo nod 28 | ``` 29 | 30 | If you don't want to use the generator, you can also download or `git clone` this repo 31 | 32 | ```sh 33 | $ git clone https://github.com/diegohaz/nod my-module 34 | $ cd my-module 35 | $ rm -rf .git 36 | $ npm install # or yarn 37 | ``` 38 | 39 | Just make sure to edit `package.json`, `README.md` and `LICENSE` files accordingly with your module's info. 40 | 41 | ## Commands 42 | 43 | ```sh 44 | $ npm test # run tests with Jest 45 | $ npm run coverage # run tests with coverage and open it on browser 46 | $ npm run lint # lint code 47 | $ npm run docs # generate docs 48 | $ npm run build # generate docs and transpile code 49 | ``` 50 | 51 | ### Publish 52 | 53 | ```sh 54 | $ npm version patch|minor|major 55 | $ npm publish 56 | ``` 57 | 58 | It'll automatically run `test`, `lint`, `docs`, `build`, generate `CHANGELOG.md`, and push commits and tags to the remote repository. 59 | 60 | ## Removing stuff 61 | 62 |
Flow 63 | 64 | 1. Remove `.flowconfig` file. 65 | 66 | 2. Remove `flow` from `package.json`: 67 | 68 | ```diff 69 | "scripts": { 70 | - "flow": "flow check", 71 | - "flowbuild": "flow-copy-source src dist", 72 | - "prebuild": "npm run docs && npm run clean && npm run flowbuild", 73 | + "prebuild": "npm run docs && npm run clean", 74 | }, 75 | "devDependencies": { 76 | - "@babel/preset-flow": "^7.0.0", 77 | - "eslint-plugin-flowtype": "^2.50.0", 78 | - "eslint-plugin-flowtype-errors": "^3.5.1", 79 | - "flow-bin": "^0.81.0", 80 | - "flow-copy-source": "^2.0.2", 81 | } 82 | ``` 83 | 84 | 3. Remove `flow` from `.babelrc`: 85 | 86 | ```diff 87 | "presets": [ 88 | - "@babel/preset-flow" 89 | ] 90 | ``` 91 | 92 | 4. Remove `flow` from `.eslintrc`: 93 | 94 | ```diff 95 | "extends": [ 96 | - "plugin:flowtype/recommended", 97 | - "prettier/flowtype" 98 | ], 99 | "plugins": [ 100 | - "flowtype", 101 | - "flowtype-errors" 102 | ], 103 | "rules": { 104 | - "flowtype-errors/show-errors": "error" 105 | } 106 | ``` 107 | 108 | 5. Run `yarn`. 109 | 110 |
111 | 112 |
Documentation 113 | 114 | 1. Remove `documentation` from `package.json`: 115 | 116 | ```diff 117 | "scripts": { 118 | - "docs": "documentation readme src --section=API", 119 | - "postdocs": "git add README.md", 120 | - "prebuild": "npm run docs && npm run clean", 121 | + "prebuild": "npm run clean", 122 | }, 123 | "devDependencies": { 124 | - "documentation": "^8.0.0", 125 | } 126 | ``` 127 | 128 | 2. Run `yarn`. 129 | 130 |
131 | 132 | ## Adding stuff 133 | 134 |
TypeScript 135 | 136 | 1. Install dependencies: 137 | 138 | ```sh 139 | yarn add -D @babel/preset-typescript @types/jest @typescript-eslint/eslint-plugin @typescript-eslint/parser typescript 140 | ``` 141 | 142 | 2. Update `package.json`: 143 | 144 | ```diff 145 | + "types": "dist/ts/src", 146 | "scripts": { 147 | + "type-check": "tsc --noEmit", 148 | - "lint": "eslint .", 149 | + "lint": "eslint . --ext js,ts,tsx", 150 | - "build": "babel src -d dist", 151 | + "build": "tsc --emitDeclarationOnly && babel src -d dist -x .js,.ts,.tsx", 152 | }, 153 | "lint-staged": { 154 | - "*.js": [ 155 | + "*.{js,ts,tsx}": [ 156 | - "eslint --fix", 157 | + "eslint --fix --ext js,ts,tsx", 158 | "git add" 159 | ] 160 | } 161 | ``` 162 | 163 | 3. Create `tsconfig.json` 164 | 165 | ```json 166 | { 167 | "compilerOptions": { 168 | "outDir": "dist/ts", 169 | "target": "esnext", 170 | "module": "esnext", 171 | "moduleResolution": "node", 172 | "jsx": "react", 173 | "strict": true, 174 | "declaration": true, 175 | "noFallthroughCasesInSwitch": true, 176 | "noImplicitReturns": true, 177 | "noUnusedLocals": true, 178 | "noUnusedParameters": true, 179 | "stripInternal": true 180 | } 181 | } 182 | ``` 183 | 184 | 4. Update `.babelrc`: 185 | 186 | ```diff 187 | "presets": [ 188 | + "@babel/preset-typescript" 189 | ] 190 | ``` 191 | 192 | 5. Update `.eslintrc` with these settings: 193 | 194 | ```json 195 | "settings": { 196 | "import/resolver": { 197 | "node": { 198 | "extensions": [".js", ".jsx", ".ts", ".tsx"] 199 | } 200 | } 201 | }, 202 | "overrides": [ 203 | { 204 | "files": ["**/*.ts", "**/*.tsx"], 205 | "parser": "@typescript-eslint/parser", 206 | "parserOptions": { 207 | "project": "./tsconfig.json" 208 | }, 209 | "plugins": [ 210 | "@typescript-eslint" 211 | ], 212 | "rules": { 213 | "no-undef": "off", 214 | "no-unused-vars": "off", 215 | "no-restricted-globals": "off" 216 | } 217 | } 218 | ] 219 | ``` 220 | 221 |
222 | 223 | ## API 224 | 225 | 226 | 227 | #### Table of Contents 228 | 229 | - [sayHello](#sayhello) 230 | - [Parameters](#parameters) 231 | 232 | ### sayHello 233 | 234 | This function says hello. 235 | 236 | #### Parameters 237 | 238 | - `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Some name to say hello for. 239 | 240 | Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The hello. 241 | 242 | ## License 243 | 244 | MIT © [Diego Haz](https://github.com/diegohaz) 245 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Material-UI Cookie Consent 2 | 3 | Material-UI component that show a cookie consent message. 4 | 5 | ## Example 6 | 7 | Check this [example site](https://material-ui-cookie-consent.origen.studio) 8 | 9 | ## Dependencies 10 | 11 | This package has the following peer dependencies that need to be installed manually: 12 | 13 | ```json 14 | { 15 | "@material-ui/core": "^4.0.1", 16 | "react": "^16.8.6", 17 | "react-dom": "^16.8.6" 18 | } 19 | ``` 20 | 21 | ## Installation 22 | 23 | ```sh 24 | yarn add material-ui-cookie-consent 25 | ``` 26 | 27 | or 28 | 29 | ```sh 30 | npm install material-ui-cookie-consent 31 | ``` 32 | 33 | ## Usage - Simple example 34 | 35 | ```js 36 | import MUICookieConsent from 'material-ui-cookie-consent'; 37 | 38 | // .... 39 | 44 | //.... 45 | ``` 46 | 47 | ## API 48 | 49 | 50 | 51 | #### Table of Contents 52 | 53 | - [MUICookieConsent](#muicookieconsent) 54 | - [Parameters](#parameters) 55 | - [handleScroll](#handlescroll) 56 | - [handleAccept](#handleaccept) 57 | 58 | ### MUICookieConsent 59 | 60 | **Extends React.Component** 61 | 62 | This component is the MUICookieConsent it pops a Snackbar or a Dialog informing the user about cookie consent. 63 | 64 | #### Parameters 65 | 66 | - `props` **Props** 67 | 68 | #### handleScroll 69 | 70 | checks whether scroll has exceeded set amount and fire accept if so. 71 | 72 | #### handleAccept 73 | 74 | Set a persistent cookie 75 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # dotenv environment variables file 55 | .env 56 | 57 | # gatsby files 58 | .cache/ 59 | public 60 | 61 | # Mac files 62 | .DS_Store 63 | 64 | # Yarn 65 | yarn-error.log 66 | .pnp/ 67 | .pnp.js 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | -------------------------------------------------------------------------------- /example/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 gatsbyjs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | 2 |

3 | 4 | Gatsby 5 | 6 |

7 |

8 | Gatsby's default starter 9 |

10 | 11 | Kick off your project with this default boilerplate. This starter ships with the main Gatsby configuration files you might need to get up and running blazing fast with the blazing fast app generator for React. 12 | 13 | _Have another more specific idea? You may want to check out our vibrant collection of [official and community-created starters](https://www.gatsbyjs.org/docs/gatsby-starters/)._ 14 | 15 | ## 🚀 Quick start 16 | 17 | 1. **Create a Gatsby site.** 18 | 19 | Use the Gatsby CLI to create a new site, specifying the default starter. 20 | 21 | ```sh 22 | # create a new Gatsby site using the default starter 23 | npx gatsby new my-default-starter https://github.com/gatsbyjs/gatsby-starter-default 24 | ``` 25 | 26 | 1. **Start developing.** 27 | 28 | Navigate into your new site’s directory and start it up. 29 | 30 | ```sh 31 | cd my-default-starter/ 32 | gatsby develop 33 | ``` 34 | 35 | 1. **Open the source code and start editing!** 36 | 37 | Your site is now running at `http://localhost:8000`! 38 | 39 | _Note: You'll also see a second link: _`http://localhost:8000/___graphql`_. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.org/tutorial/part-five/#introducing-graphiql)._ 40 | 41 | Open the `my-default-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time! 42 | 43 | ## 🧐 What's inside? 44 | 45 | A quick look at the top-level files and directories you'll see in a Gatsby project. 46 | 47 | . 48 | ├── node_modules 49 | ├── src 50 | ├── .gitignore 51 | ├── gatsby-browser.js 52 | ├── gatsby-config.js 53 | ├── gatsby-node.js 54 | ├── gatsby-ssr.js 55 | ├── LICENSE 56 | ├── package-lock.json 57 | ├── package.json 58 | └── README.md 59 | 60 | 1. **`/node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed. 61 | 62 | 2. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. `src` is a convention for “source code”. 63 | 64 | 3. **`.gitignore`**: This file tells git which files it should not track / not maintain a version history for. 65 | 66 | 4. **`.prettierrc`**: This is a configuration file for [Prettier](https://prettier.io/). Prettier is a tool to help keep the formatting of your code consistent. 67 | 68 | 5. **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.org/docs/browser-apis/) (if any). These allow customization/extension of default Gatsby settings affecting the browser. 69 | 70 | 6. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the [config docs](https://www.gatsbyjs.org/docs/gatsby-config/) for more detail). 71 | 72 | 7. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby Node APIs](https://www.gatsbyjs.org/docs/node-apis/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process. 73 | 74 | 8. **`gatsby-ssr.js`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://www.gatsbyjs.org/docs/ssr-apis/) (if any). These allow customization of default Gatsby settings affecting server-side rendering. 75 | 76 | 9. **`LICENSE`**: Gatsby is licensed under the MIT license. 77 | 78 | 10. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(You won’t change this file directly).** 79 | 80 | 11. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc). This manifest is how npm knows which packages to install for your project. 81 | 82 | 12. **`README.md`**: A text file containing useful reference information about your project. 83 | 84 | ## 🎓 Learning Gatsby 85 | 86 | Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.org/). Here are some places to start: 87 | 88 | - **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.org/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process. 89 | 90 | - **To dive straight into code samples, head [to our documentation](https://www.gatsbyjs.org/docs/).** In particular, check out the _Guides_, _API Reference_, and _Advanced Tutorials_ sections in the sidebar. 91 | 92 | ## 💫 Deploy 93 | 94 | [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-default) 95 | 96 | 97 | -------------------------------------------------------------------------------- /example/gatsby-browser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Implement Gatsby's Browser APIs in this file. 3 | * 4 | * See: https://www.gatsbyjs.org/docs/browser-apis/ 5 | */ 6 | 7 | // You can delete this file if you're not using it 8 | -------------------------------------------------------------------------------- /example/gatsby-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | siteMetadata: { 3 | title: `Material UI Cookie Consent`, 4 | description: `Accept cookies with Material Style`, 5 | author: `hello@origen.studio` 6 | }, 7 | plugins: [ 8 | `gatsby-plugin-react-helmet`, 9 | { 10 | resolve: `gatsby-source-filesystem`, 11 | options: { 12 | name: `images`, 13 | path: `${__dirname}/src/images` 14 | } 15 | }, 16 | `gatsby-transformer-sharp`, 17 | `gatsby-plugin-sharp`, 18 | { 19 | resolve: `gatsby-plugin-manifest`, 20 | options: { 21 | name: `Material-UI-Cookie-Consent`, 22 | short_name: `MUICookies`, 23 | start_url: `/`, 24 | background_color: `#e86693`, 25 | theme_color: `#e86693`, 26 | display: `minimal-ui`, 27 | icon: `src/images/origen-logo.png` // This path is relative to the root of the site. 28 | } 29 | } 30 | // this (optional) plugin enables Progressive Web App + Offline functionality 31 | // To learn more, visit: https://gatsby.app/offline 32 | // 'gatsby-plugin-offline', 33 | ] 34 | }; 35 | -------------------------------------------------------------------------------- /example/gatsby-node.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Implement Gatsby's Node APIs in this file. 3 | * 4 | * See: https://www.gatsbyjs.org/docs/node-apis/ 5 | */ 6 | 7 | // You can delete this file if you're not using it 8 | -------------------------------------------------------------------------------- /example/gatsby-ssr.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Implement Gatsby's SSR (Server Side Rendering) APIs in this file. 3 | * 4 | * See: https://www.gatsbyjs.org/docs/ssr-apis/ 5 | */ 6 | 7 | // You can delete this file if you're not using it 8 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "material-ui-cookie-consent-example", 3 | "private": true, 4 | "description": "Cookie consent UI using Material-UI components", 5 | "version": "0.1.0", 6 | "author": { 7 | "name": "Origen Studio", 8 | "email": "hello@origen.studio", 9 | "url": "https://www.origen.studio" 10 | }, 11 | "dependencies": { 12 | "@material-ui/core": "^4.0.1", 13 | "gatsby": "^2.1.4", 14 | "gatsby-image": "^2.0.29", 15 | "gatsby-plugin-manifest": "^2.0.17", 16 | "gatsby-plugin-offline": "^2.0.23", 17 | "gatsby-plugin-react-helmet": "^3.0.6", 18 | "gatsby-plugin-sharp": "^2.0.20", 19 | "gatsby-source-filesystem": "^2.0.20", 20 | "gatsby-transformer-sharp": "^2.1.13", 21 | "material-ui-cookie-consent": "^0.1.0", 22 | "prop-types": "^15.7.2", 23 | "react": "^16.8.2", 24 | "react-dom": "^16.8.2", 25 | "react-helmet": "^5.2.0" 26 | }, 27 | "keywords": [ 28 | "gatsby" 29 | ], 30 | "license": "MIT", 31 | "scripts": { 32 | "build": "gatsby build", 33 | "develop": "gatsby develop", 34 | "start": "npm run develop", 35 | "serve": "gatsby serve", 36 | "test": "echo \"Write tests! -> https://gatsby.app/unit-testing\"", 37 | "deploy": "gatsby build && surge public material-ui-cookie-consent.origen.studio" 38 | }, 39 | "repository": { 40 | "type": "git", 41 | "url": "https://github.com/gatsbyjs/gatsby-starter-default" 42 | }, 43 | "bugs": { 44 | "url": "https://github.com/gatsbyjs/gatsby/issues" 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /example/src/components/header.js: -------------------------------------------------------------------------------- 1 | import { Link } from "gatsby"; 2 | import PropTypes from "prop-types"; 3 | import React from "react"; 4 | 5 | const Header = ({ siteTitle }) => ( 6 |
12 |
19 |

20 | 27 | {siteTitle} 28 | 29 |

30 |
31 |
32 | ); 33 | 34 | Header.propTypes = { 35 | siteTitle: PropTypes.string 36 | }; 37 | 38 | Header.defaultProps = { 39 | siteTitle: `` 40 | }; 41 | 42 | export default Header; 43 | -------------------------------------------------------------------------------- /example/src/components/layout.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-family: sans-serif; 3 | -ms-text-size-adjust: 100%; 4 | -webkit-text-size-adjust: 100%; 5 | } 6 | body { 7 | margin: 0; 8 | } 9 | article, 10 | aside, 11 | details, 12 | figcaption, 13 | figure, 14 | footer, 15 | header, 16 | main, 17 | menu, 18 | nav, 19 | section, 20 | summary { 21 | display: block; 22 | } 23 | audio, 24 | canvas, 25 | progress, 26 | video { 27 | display: inline-block; 28 | } 29 | audio:not([controls]) { 30 | display: none; 31 | height: 0; 32 | } 33 | progress { 34 | vertical-align: baseline; 35 | } 36 | [hidden], 37 | template { 38 | display: none; 39 | } 40 | a { 41 | background-color: transparent; 42 | -webkit-text-decoration-skip: objects; 43 | } 44 | a:active, 45 | a:hover { 46 | outline-width: 0; 47 | } 48 | abbr[title] { 49 | border-bottom: none; 50 | text-decoration: underline; 51 | text-decoration: underline dotted; 52 | } 53 | b, 54 | strong { 55 | font-weight: inherit; 56 | font-weight: bolder; 57 | } 58 | dfn { 59 | font-style: italic; 60 | } 61 | h1 { 62 | font-size: 2em; 63 | margin: 0.67em 0; 64 | } 65 | mark { 66 | background-color: #ff0; 67 | color: #000; 68 | } 69 | small { 70 | font-size: 80%; 71 | } 72 | sub, 73 | sup { 74 | font-size: 75%; 75 | line-height: 0; 76 | position: relative; 77 | vertical-align: baseline; 78 | } 79 | sub { 80 | bottom: -0.25em; 81 | } 82 | sup { 83 | top: -0.5em; 84 | } 85 | img { 86 | border-style: none; 87 | } 88 | svg:not(:root) { 89 | overflow: hidden; 90 | } 91 | code, 92 | kbd, 93 | pre, 94 | samp { 95 | font-family: monospace, monospace; 96 | font-size: 1em; 97 | } 98 | figure { 99 | margin: 1em 40px; 100 | } 101 | hr { 102 | box-sizing: content-box; 103 | height: 0; 104 | overflow: visible; 105 | } 106 | button, 107 | input, 108 | optgroup, 109 | select, 110 | textarea { 111 | font: inherit; 112 | margin: 0; 113 | } 114 | optgroup { 115 | font-weight: 700; 116 | } 117 | button, 118 | input { 119 | overflow: visible; 120 | } 121 | button, 122 | select { 123 | text-transform: none; 124 | } 125 | [type="reset"], 126 | [type="submit"], 127 | button, 128 | html [type="button"] { 129 | -webkit-appearance: button; 130 | } 131 | [type="button"]::-moz-focus-inner, 132 | [type="reset"]::-moz-focus-inner, 133 | [type="submit"]::-moz-focus-inner, 134 | button::-moz-focus-inner { 135 | border-style: none; 136 | padding: 0; 137 | } 138 | [type="button"]:-moz-focusring, 139 | [type="reset"]:-moz-focusring, 140 | [type="submit"]:-moz-focusring, 141 | button:-moz-focusring { 142 | outline: 1px dotted ButtonText; 143 | } 144 | fieldset { 145 | border: 1px solid silver; 146 | margin: 0 2px; 147 | padding: 0.35em 0.625em 0.75em; 148 | } 149 | legend { 150 | box-sizing: border-box; 151 | color: inherit; 152 | display: table; 153 | max-width: 100%; 154 | padding: 0; 155 | white-space: normal; 156 | } 157 | textarea { 158 | overflow: auto; 159 | } 160 | [type="checkbox"], 161 | [type="radio"] { 162 | box-sizing: border-box; 163 | padding: 0; 164 | } 165 | [type="number"]::-webkit-inner-spin-button, 166 | [type="number"]::-webkit-outer-spin-button { 167 | height: auto; 168 | } 169 | [type="search"] { 170 | -webkit-appearance: textfield; 171 | outline-offset: -2px; 172 | } 173 | [type="search"]::-webkit-search-cancel-button, 174 | [type="search"]::-webkit-search-decoration { 175 | -webkit-appearance: none; 176 | } 177 | ::-webkit-input-placeholder { 178 | color: inherit; 179 | opacity: 0.54; 180 | } 181 | ::-webkit-file-upload-button { 182 | -webkit-appearance: button; 183 | font: inherit; 184 | } 185 | html { 186 | font: 112.5%/1.45em georgia, serif; 187 | box-sizing: border-box; 188 | overflow-y: scroll; 189 | } 190 | * { 191 | box-sizing: inherit; 192 | } 193 | *:before { 194 | box-sizing: inherit; 195 | } 196 | *:after { 197 | box-sizing: inherit; 198 | } 199 | body { 200 | color: hsla(0, 0%, 0%, 0.8); 201 | font-family: georgia, serif; 202 | font-weight: normal; 203 | word-wrap: break-word; 204 | font-kerning: normal; 205 | -moz-font-feature-settings: "kern", "liga", "clig", "calt"; 206 | -ms-font-feature-settings: "kern", "liga", "clig", "calt"; 207 | -webkit-font-feature-settings: "kern", "liga", "clig", "calt"; 208 | font-feature-settings: "kern", "liga", "clig", "calt"; 209 | } 210 | img { 211 | max-width: 100%; 212 | margin-left: 0; 213 | margin-right: 0; 214 | margin-top: 0; 215 | padding-bottom: 0; 216 | padding-left: 0; 217 | padding-right: 0; 218 | padding-top: 0; 219 | margin-bottom: 1.45rem; 220 | } 221 | h1 { 222 | margin-left: 0; 223 | margin-right: 0; 224 | margin-top: 0; 225 | padding-bottom: 0; 226 | padding-left: 0; 227 | padding-right: 0; 228 | padding-top: 0; 229 | margin-bottom: 1.45rem; 230 | color: inherit; 231 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 232 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 233 | font-weight: bold; 234 | text-rendering: optimizeLegibility; 235 | font-size: 2.25rem; 236 | line-height: 1.1; 237 | } 238 | h2 { 239 | margin-left: 0; 240 | margin-right: 0; 241 | margin-top: 0; 242 | padding-bottom: 0; 243 | padding-left: 0; 244 | padding-right: 0; 245 | padding-top: 0; 246 | margin-bottom: 1.45rem; 247 | color: inherit; 248 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 249 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 250 | font-weight: bold; 251 | text-rendering: optimizeLegibility; 252 | font-size: 1.62671rem; 253 | line-height: 1.1; 254 | } 255 | h3 { 256 | margin-left: 0; 257 | margin-right: 0; 258 | margin-top: 0; 259 | padding-bottom: 0; 260 | padding-left: 0; 261 | padding-right: 0; 262 | padding-top: 0; 263 | margin-bottom: 1.45rem; 264 | color: inherit; 265 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 266 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 267 | font-weight: bold; 268 | text-rendering: optimizeLegibility; 269 | font-size: 1.38316rem; 270 | line-height: 1.1; 271 | } 272 | h4 { 273 | margin-left: 0; 274 | margin-right: 0; 275 | margin-top: 0; 276 | padding-bottom: 0; 277 | padding-left: 0; 278 | padding-right: 0; 279 | padding-top: 0; 280 | margin-bottom: 1.45rem; 281 | color: inherit; 282 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 283 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 284 | font-weight: bold; 285 | text-rendering: optimizeLegibility; 286 | font-size: 1rem; 287 | line-height: 1.1; 288 | } 289 | h5 { 290 | margin-left: 0; 291 | margin-right: 0; 292 | margin-top: 0; 293 | padding-bottom: 0; 294 | padding-left: 0; 295 | padding-right: 0; 296 | padding-top: 0; 297 | margin-bottom: 1.45rem; 298 | color: inherit; 299 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 300 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 301 | font-weight: bold; 302 | text-rendering: optimizeLegibility; 303 | font-size: 0.85028rem; 304 | line-height: 1.1; 305 | } 306 | h6 { 307 | margin-left: 0; 308 | margin-right: 0; 309 | margin-top: 0; 310 | padding-bottom: 0; 311 | padding-left: 0; 312 | padding-right: 0; 313 | padding-top: 0; 314 | margin-bottom: 1.45rem; 315 | color: inherit; 316 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 317 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 318 | font-weight: bold; 319 | text-rendering: optimizeLegibility; 320 | font-size: 0.78405rem; 321 | line-height: 1.1; 322 | } 323 | hgroup { 324 | margin-left: 0; 325 | margin-right: 0; 326 | margin-top: 0; 327 | padding-bottom: 0; 328 | padding-left: 0; 329 | padding-right: 0; 330 | padding-top: 0; 331 | margin-bottom: 1.45rem; 332 | } 333 | ul { 334 | margin-left: 1.45rem; 335 | margin-right: 0; 336 | margin-top: 0; 337 | padding-bottom: 0; 338 | padding-left: 0; 339 | padding-right: 0; 340 | padding-top: 0; 341 | margin-bottom: 1.45rem; 342 | list-style-position: outside; 343 | list-style-image: none; 344 | } 345 | ol { 346 | margin-left: 1.45rem; 347 | margin-right: 0; 348 | margin-top: 0; 349 | padding-bottom: 0; 350 | padding-left: 0; 351 | padding-right: 0; 352 | padding-top: 0; 353 | margin-bottom: 1.45rem; 354 | list-style-position: outside; 355 | list-style-image: none; 356 | } 357 | dl { 358 | margin-left: 0; 359 | margin-right: 0; 360 | margin-top: 0; 361 | padding-bottom: 0; 362 | padding-left: 0; 363 | padding-right: 0; 364 | padding-top: 0; 365 | margin-bottom: 1.45rem; 366 | } 367 | dd { 368 | margin-left: 0; 369 | margin-right: 0; 370 | margin-top: 0; 371 | padding-bottom: 0; 372 | padding-left: 0; 373 | padding-right: 0; 374 | padding-top: 0; 375 | margin-bottom: 1.45rem; 376 | } 377 | p { 378 | margin-left: 0; 379 | margin-right: 0; 380 | margin-top: 0; 381 | padding-bottom: 0; 382 | padding-left: 0; 383 | padding-right: 0; 384 | padding-top: 0; 385 | margin-bottom: 1.45rem; 386 | } 387 | figure { 388 | margin-left: 0; 389 | margin-right: 0; 390 | margin-top: 0; 391 | padding-bottom: 0; 392 | padding-left: 0; 393 | padding-right: 0; 394 | padding-top: 0; 395 | margin-bottom: 1.45rem; 396 | } 397 | pre { 398 | margin-left: 0; 399 | margin-right: 0; 400 | margin-top: 0; 401 | margin-bottom: 1.45rem; 402 | font-size: 0.85rem; 403 | line-height: 1.42; 404 | background: hsla(0, 0%, 0%, 0.04); 405 | border-radius: 3px; 406 | overflow: auto; 407 | word-wrap: normal; 408 | padding: 1.45rem; 409 | } 410 | table { 411 | margin-left: 0; 412 | margin-right: 0; 413 | margin-top: 0; 414 | padding-bottom: 0; 415 | padding-left: 0; 416 | padding-right: 0; 417 | padding-top: 0; 418 | margin-bottom: 1.45rem; 419 | font-size: 1rem; 420 | line-height: 1.45rem; 421 | border-collapse: collapse; 422 | width: 100%; 423 | } 424 | fieldset { 425 | margin-left: 0; 426 | margin-right: 0; 427 | margin-top: 0; 428 | padding-bottom: 0; 429 | padding-left: 0; 430 | padding-right: 0; 431 | padding-top: 0; 432 | margin-bottom: 1.45rem; 433 | } 434 | blockquote { 435 | margin-left: 1.45rem; 436 | margin-right: 1.45rem; 437 | margin-top: 0; 438 | padding-bottom: 0; 439 | padding-left: 0; 440 | padding-right: 0; 441 | padding-top: 0; 442 | margin-bottom: 1.45rem; 443 | } 444 | form { 445 | margin-left: 0; 446 | margin-right: 0; 447 | margin-top: 0; 448 | padding-bottom: 0; 449 | padding-left: 0; 450 | padding-right: 0; 451 | padding-top: 0; 452 | margin-bottom: 1.45rem; 453 | } 454 | noscript { 455 | margin-left: 0; 456 | margin-right: 0; 457 | margin-top: 0; 458 | padding-bottom: 0; 459 | padding-left: 0; 460 | padding-right: 0; 461 | padding-top: 0; 462 | margin-bottom: 1.45rem; 463 | } 464 | iframe { 465 | margin-left: 0; 466 | margin-right: 0; 467 | margin-top: 0; 468 | padding-bottom: 0; 469 | padding-left: 0; 470 | padding-right: 0; 471 | padding-top: 0; 472 | margin-bottom: 1.45rem; 473 | } 474 | hr { 475 | margin-left: 0; 476 | margin-right: 0; 477 | margin-top: 0; 478 | padding-bottom: 0; 479 | padding-left: 0; 480 | padding-right: 0; 481 | padding-top: 0; 482 | margin-bottom: calc(1.45rem - 1px); 483 | background: hsla(0, 0%, 0%, 0.2); 484 | border: none; 485 | height: 1px; 486 | } 487 | address { 488 | margin-left: 0; 489 | margin-right: 0; 490 | margin-top: 0; 491 | padding-bottom: 0; 492 | padding-left: 0; 493 | padding-right: 0; 494 | padding-top: 0; 495 | margin-bottom: 1.45rem; 496 | } 497 | b { 498 | font-weight: bold; 499 | } 500 | strong { 501 | font-weight: bold; 502 | } 503 | dt { 504 | font-weight: bold; 505 | } 506 | th { 507 | font-weight: bold; 508 | } 509 | li { 510 | margin-bottom: calc(1.45rem / 2); 511 | } 512 | ol li { 513 | padding-left: 0; 514 | } 515 | ul li { 516 | padding-left: 0; 517 | } 518 | li > ol { 519 | margin-left: 1.45rem; 520 | margin-bottom: calc(1.45rem / 2); 521 | margin-top: calc(1.45rem / 2); 522 | } 523 | li > ul { 524 | margin-left: 1.45rem; 525 | margin-bottom: calc(1.45rem / 2); 526 | margin-top: calc(1.45rem / 2); 527 | } 528 | blockquote *:last-child { 529 | margin-bottom: 0; 530 | } 531 | li *:last-child { 532 | margin-bottom: 0; 533 | } 534 | p *:last-child { 535 | margin-bottom: 0; 536 | } 537 | li > p { 538 | margin-bottom: calc(1.45rem / 2); 539 | } 540 | code { 541 | font-size: 0.85rem; 542 | line-height: 1.45rem; 543 | } 544 | kbd { 545 | font-size: 0.85rem; 546 | line-height: 1.45rem; 547 | } 548 | samp { 549 | font-size: 0.85rem; 550 | line-height: 1.45rem; 551 | } 552 | abbr { 553 | border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5); 554 | cursor: help; 555 | } 556 | acronym { 557 | border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5); 558 | cursor: help; 559 | } 560 | abbr[title] { 561 | border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5); 562 | cursor: help; 563 | text-decoration: none; 564 | } 565 | thead { 566 | text-align: left; 567 | } 568 | td, 569 | th { 570 | text-align: left; 571 | border-bottom: 1px solid hsla(0, 0%, 0%, 0.12); 572 | font-feature-settings: "tnum"; 573 | -moz-font-feature-settings: "tnum"; 574 | -ms-font-feature-settings: "tnum"; 575 | -webkit-font-feature-settings: "tnum"; 576 | padding-left: 0.96667rem; 577 | padding-right: 0.96667rem; 578 | padding-top: 0.725rem; 579 | padding-bottom: calc(0.725rem - 1px); 580 | } 581 | th:first-child, 582 | td:first-child { 583 | padding-left: 0; 584 | } 585 | th:last-child, 586 | td:last-child { 587 | padding-right: 0; 588 | } 589 | tt, 590 | code { 591 | background-color: hsla(0, 0%, 0%, 0.04); 592 | border-radius: 3px; 593 | font-family: "SFMono-Regular", Consolas, "Roboto Mono", "Droid Sans Mono", 594 | "Liberation Mono", Menlo, Courier, monospace; 595 | padding: 0; 596 | padding-top: 0.2em; 597 | padding-bottom: 0.2em; 598 | } 599 | pre code { 600 | background: none; 601 | line-height: 1.42; 602 | } 603 | code:before, 604 | code:after, 605 | tt:before, 606 | tt:after { 607 | letter-spacing: -0.2em; 608 | content: " "; 609 | } 610 | pre code:before, 611 | pre code:after, 612 | pre tt:before, 613 | pre tt:after { 614 | content: ""; 615 | } 616 | @media only screen and (max-width: 480px) { 617 | html { 618 | font-size: 100%; 619 | } 620 | } 621 | -------------------------------------------------------------------------------- /example/src/components/layout.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | import { StaticQuery, graphql } from "gatsby"; 4 | import Typography from '@material-ui/core/Typography'; 5 | import MUILink from '@material-ui/core/Link'; 6 | 7 | import Header from "./header"; 8 | import "./layout.css"; 9 | 10 | const Layout = ({ children }) => ( 11 | ( 22 | <> 23 |
24 |
32 |
{children}
33 |
34 | 35 | Built by Origen Studio 36 | 37 |
38 |
39 | 40 | )} 41 | /> 42 | ); 43 | 44 | Layout.propTypes = { 45 | children: PropTypes.node.isRequired 46 | }; 47 | 48 | export default Layout; 49 | -------------------------------------------------------------------------------- /example/src/components/seo.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import PropTypes from "prop-types"; 3 | import Helmet from "react-helmet"; 4 | import { StaticQuery, graphql } from "gatsby"; 5 | 6 | function SEO({ description, lang, meta, keywords, title }) { 7 | return ( 8 | { 11 | const metaDescription = 12 | description || data.site.siteMetadata.description; 13 | return ( 14 | 0 56 | ? { 57 | name: `keywords`, 58 | content: keywords.join(`, `) 59 | } 60 | : [] 61 | ) 62 | .concat(meta)} 63 | /> 64 | ); 65 | }} 66 | /> 67 | ); 68 | } 69 | 70 | SEO.defaultProps = { 71 | lang: `en`, 72 | meta: [], 73 | keywords: [] 74 | }; 75 | 76 | SEO.propTypes = { 77 | description: PropTypes.string, 78 | lang: PropTypes.string, 79 | meta: PropTypes.array, 80 | keywords: PropTypes.arrayOf(PropTypes.string), 81 | title: PropTypes.string.isRequired 82 | }; 83 | 84 | export default SEO; 85 | 86 | const detailsQuery = graphql` 87 | query DefaultSEOQuery { 88 | site { 89 | siteMetadata { 90 | title 91 | description 92 | author 93 | } 94 | } 95 | } 96 | `; 97 | -------------------------------------------------------------------------------- /example/src/images/origen-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OrigenStudio/material-ui-cookie-consent/9f2035dbe8ea9f43bffdcd82053ad4317b99a160/example/src/images/origen-logo.png -------------------------------------------------------------------------------- /example/src/pages/404.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Typography from '@material-ui/core/Typography'; 3 | import { Link } from "gatsby"; 4 | 5 | import Layout from "../components/layout"; 6 | import SEO from "../components/seo"; 7 | 8 | const NotFoundPage = () => ( 9 | 10 | 11 | NOT FOUND 12 | 13 | You just hit a route that doesn't exist... take me home. 14 | 15 | 16 | ); 17 | 18 | export default NotFoundPage; 19 | -------------------------------------------------------------------------------- /example/src/pages/dialog-example.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Link } from "gatsby"; 3 | import Typography from '@material-ui/core/Typography'; 4 | import MUICookieConsent from "material-ui-cookie-consent"; // using link 5 | 6 | import Layout from "../components/layout"; 7 | import SEO from "../components/seo"; 8 | 9 | const IndexPage = () => ( 10 | 11 | 16 | 20 | Example page for Material UI Cookie Consent 21 | 22 | Back to snackbar 23 | 24 | 25 | ); 26 | 27 | export default IndexPage; 28 | -------------------------------------------------------------------------------- /example/src/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Link } from "gatsby"; 3 | import Typography from '@material-ui/core/Typography'; 4 | import MUILink from '@material-ui/core/Link'; 5 | import MUICookieConsent from "material-ui-cookie-consent"; // using link 6 | 7 | import Layout from "../components/layout"; 8 | import SEO from "../components/seo"; 9 | 10 | const repoUrl = 'https://github.com/OrigenStudio/material-ui-cookie-consent'; 11 | 12 | const IndexPage = () => ( 13 | 14 | 18 | 22 | 23 | Example page for Material UI Cookie Consent 24 | 25 | 26 | Example with Dialog 27 | 28 | 29 | Check {repoUrl} for more details. 30 | 31 | 32 | ); 33 | 34 | export default IndexPage; 35 | -------------------------------------------------------------------------------- /flow-typed/npm/@material-ui/core_v4.x.x.js: -------------------------------------------------------------------------------- 1 | declare module '@material-ui/core/@@utils' { 2 | // Utilities used in this definition: 3 | 4 | // Currently the flow.js do not support `Pick` operator 5 | declare export type $$Pick = $Diff>; 6 | } 7 | declare module '@material-ui/core/@@JSS' { 8 | declare export type GenerateId = (rule: {}, sheet?: mixed) => string; 9 | 10 | declare export type StyleSheetFactoryOptions = { 11 | media?: string, 12 | meta?: string, 13 | generateId?: GenerateId, 14 | classNamePrefix?: string, 15 | }; 16 | } 17 | declare module '@material-ui/core/@@csstype' { 18 | // I don't use `CSSStyleDeclaration` https://github.com/facebook/flow/blob/fa89aadb55ae9bb37c71e14d7274935903d501ce/lib/cssom.js#L71 19 | // Because all properties are described as `string` 20 | // But `JSS`(material-ui based on this) also support number: `{width: 10}` 21 | 22 | // Copied from https://unpkg.com/csstype@2.6.4/index.js.flow 23 | // I copied not all the properties but only took those that are needed by the component 24 | 25 | declare type Globals = 'inherit' | 'initial' | 'revert' | 'unset'; 26 | declare type ContentPosition = 27 | | 'center' 28 | | 'end' 29 | | 'flex-end' 30 | | 'flex-start' 31 | | 'start'; 32 | declare type SelfPosition = 33 | | 'center' 34 | | 'end' 35 | | 'flex-end' 36 | | 'flex-start' 37 | | 'self-end' 38 | | 'self-start' 39 | | 'start'; 40 | 41 | declare type ContentDistribution = 42 | | 'space-around' 43 | | 'space-between' 44 | | 'space-evenly' 45 | | 'stretch'; 46 | 47 | declare type AlignContentProperty = 48 | | Globals 49 | | ContentDistribution 50 | | ContentPosition 51 | | 'baseline' 52 | | 'normal' 53 | | string; 54 | declare type AlignItemsProperty = 55 | | Globals 56 | | SelfPosition 57 | | 'baseline' 58 | | 'normal' 59 | | 'stretch' 60 | | string; 61 | declare type AlignSelfProperty = 62 | | Globals 63 | | SelfPosition 64 | | 'auto' 65 | | 'baseline' 66 | | 'normal' 67 | | 'stretch' 68 | | string; 69 | 70 | declare type Color = 'currentcolor' | string; 71 | declare type LineStyle = 72 | | 'dashed' 73 | | 'dotted' 74 | | 'double' 75 | | 'groove' 76 | | 'hidden' 77 | | 'inset' 78 | | 'none' 79 | | 'outset' 80 | | 'ridge' 81 | | 'solid'; 82 | declare type LineWidth = TLength | 'medium' | 'thick' | 'thin'; 83 | declare type BorderProperty = 84 | | Globals 85 | | LineWidth 86 | | LineStyle 87 | | Color 88 | | string; 89 | 90 | declare type BorderBottomProperty = 91 | | Globals 92 | | LineWidth 93 | | LineStyle 94 | | Color 95 | | string; 96 | declare type BorderColorProperty = Globals | Color | string; 97 | declare type BorderLeftProperty = 98 | | Globals 99 | | LineWidth 100 | | LineStyle 101 | | Color 102 | | string; 103 | 104 | declare type BorderRadiusProperty = Globals | TLength | string; 105 | declare type BorderRightProperty = 106 | | Globals 107 | | LineWidth 108 | | LineStyle 109 | | Color 110 | | string; 111 | 112 | declare type BorderTopProperty = 113 | | Globals 114 | | LineWidth 115 | | LineStyle 116 | | Color 117 | | string; 118 | declare type BottomProperty = Globals | TLength | 'auto' | string; 119 | declare type BoxShadowProperty = Globals | 'none' | string; 120 | declare type ColorProperty = Globals | Color; 121 | declare type CursorProperty = Globals | string; 122 | 123 | declare type DisplayInside = 124 | | '-ms-flexbox' 125 | | '-ms-grid' 126 | | '-webkit-flex' 127 | | 'flex' 128 | | 'flow' 129 | | 'flow-root' 130 | | 'grid' 131 | | 'ruby' 132 | | 'table'; 133 | declare type DisplayOutside = 'block' | 'inline' | 'run-in'; 134 | declare type DisplayInternal = 135 | | 'ruby-base' 136 | | 'ruby-base-container' 137 | | 'ruby-text' 138 | | 'ruby-text-container' 139 | | 'table-caption' 140 | | 'table-cell' 141 | | 'table-column' 142 | | 'table-column-group' 143 | | 'table-footer-group' 144 | | 'table-header-group' 145 | | 'table-row' 146 | | 'table-row-group'; 147 | declare type DisplayProperty = 148 | | Globals 149 | | DisplayOutside 150 | | DisplayInside 151 | | DisplayInternal 152 | | 'contents' 153 | | 'list-item' 154 | | 'none' 155 | | string; 156 | declare type FlexProperty = 157 | | Globals 158 | | TLength 159 | | 'auto' 160 | | 'available' 161 | | 'content' 162 | | 'fit-content' 163 | | 'max-content' 164 | | 'min-content' 165 | | 'none' 166 | | string 167 | | number; 168 | declare type FlexDirectionProperty = 169 | | Globals 170 | | 'column' 171 | | 'column-reverse' 172 | | 'row' 173 | | 'row-reverse'; 174 | 175 | declare type GlobalsNumber = Globals | number; 176 | declare type FlexWrapProperty = Globals | 'nowrap' | 'wrap' | 'wrap-reverse'; 177 | declare type FontFamilyProperty = Globals | string; 178 | 179 | declare type FontSizeProperty = 180 | | Globals 181 | | TLength 182 | | 'larger' 183 | | 'smaller' 184 | | string; 185 | declare type FontWeightAbsolute = 'bold' | 'normal' | number; 186 | 187 | declare type FontWeightProperty = 188 | | Globals 189 | | FontWeightAbsolute 190 | | 'bolder' 191 | | 'lighter'; 192 | declare type HeightProperty = Globals | TLength | string; 193 | declare type JustifyContentProperty = 194 | | Globals 195 | | ContentDistribution 196 | | ContentPosition 197 | | 'left' 198 | | 'normal' 199 | | 'right' 200 | | string; 201 | declare type LeftProperty = Globals | TLength | 'auto' | string; 202 | 203 | declare type MaxHeightProperty = Globals | TLength | 'none' | string; 204 | declare type WidthProperty = Globals | TLength | string; 205 | declare type TextAlignProperty = 206 | | Globals 207 | | 'center' 208 | | 'end' 209 | | 'justify' 210 | | 'left' 211 | | 'match-parent' 212 | | 'right' 213 | | 'start'; 214 | 215 | declare type ZIndexProperty = Globals | 'auto' | number; 216 | declare type TopProperty = Globals | TLength | 'auto' | string; 217 | 218 | declare type RightProperty = Globals | TLength | 'auto' | string; 219 | declare type PositionProperty = 220 | | Globals 221 | | '-webkit-sticky' 222 | | 'absolute' 223 | | 'fixed' 224 | | 'relative' 225 | | 'static' 226 | | 'sticky'; 227 | declare type MaxWidthProperty = Globals | TLength | string; 228 | declare type OverflowProperty = 229 | | Globals 230 | | 'auto' 231 | | 'clip' 232 | | 'hidden' 233 | | 'scroll' 234 | | 'visible'; 235 | 236 | declare type MinHeightProperty = Globals | TLength | string; 237 | declare type MinWidthProperty = Globals | TLength | string; 238 | 239 | declare export type Properties = { 240 | alignContent?: AlignContentProperty, 241 | alignItems?: AlignItemsProperty, 242 | alignSelf?: AlignSelfProperty, 243 | border?: BorderProperty, 244 | borderBottom?: BorderBottomProperty, 245 | borderColor?: BorderColorProperty, 246 | borderLeft?: BorderLeftProperty, 247 | borderRadius?: BorderRadiusProperty, 248 | borderRight?: BorderRightProperty, 249 | borderTop?: BorderTopProperty, 250 | bottom?: BottomProperty, 251 | boxShadow?: BoxShadowProperty | BoxShadowProperty[], 252 | color?: ColorProperty | ColorProperty[], 253 | cursor?: CursorProperty | CursorProperty[], 254 | display?: DisplayProperty | DisplayProperty[], 255 | flex?: FlexProperty | FlexProperty[], 256 | flexDirection?: FlexDirectionProperty, 257 | flexGrow?: GlobalsNumber, 258 | flexShrink?: GlobalsNumber, 259 | flexWrap?: FlexWrapProperty, 260 | fontFamily?: FontFamilyProperty, 261 | fontSize?: FontSizeProperty, 262 | fontWeight?: FontWeightProperty, 263 | height?: HeightProperty | HeightProperty[], 264 | justifyContent?: JustifyContentProperty | JustifyContentProperty[], 265 | left?: LeftProperty | LeftProperty[], 266 | maxHeight?: MaxHeightProperty, 267 | maxWidth?: MaxWidthProperty, 268 | minHeight?: MinHeightProperty, 269 | minWidth?: MinWidthProperty, 270 | overflowX?: OverflowProperty, 271 | overflowY?: OverflowProperty, 272 | position?: PositionProperty, 273 | right?: RightProperty, 274 | textAlign?: TextAlignProperty | TextAlignProperty[], 275 | top?: TopProperty | TopProperty[], 276 | width?: WidthProperty | WidthProperty[], 277 | zIndex?: ZIndexProperty | ZIndexProperty[], 278 | }; 279 | } 280 | declare module '@material-ui/core/@@dom' { 281 | import type { Properties } from '@material-ui/core/@@csstype'; 282 | 283 | // Material-UI use `JSS` witch support number and string for values, example: `{width: 10, height: '100%'}` 284 | declare export type CSS$Properties = Properties; 285 | 286 | // At the moment there is no possibility to withdraw the React types for Html Element. 287 | // ... in the future will be replaced with exact types for a specific element (div, li, inout, ...) 288 | declare export type HTMLImageAttributes = {}; 289 | declare export type HTMLDivAttributes = {}; 290 | declare export type HTMLInputAttributes = {}; 291 | declare export type HTMLSpanAttributes = {}; 292 | declare export type HTMLLabelAttributes = {}; 293 | declare export type HTMLUListAttributes = {}; 294 | declare export type HTMLLIAttributes = {}; 295 | declare export type HTMLElementAttributes = {}; 296 | declare export type HTMLParagraphAttributes = {}; 297 | } 298 | declare module '@material-ui/core/transitions/transition/@@react-transition-group/Transition' { 299 | // The version `2.9.1` based on this: // 300 | // https://github.com/mui-org/material-ui/blob/d0c7b070156b30908cee2b9c657469a3d6f406b3/packages/material-ui/package.json#L44 301 | 302 | // Types copied from: https://unpkg.com/@types/react-transition-group@2.9.1/Transition.d.ts 303 | 304 | declare export type EndHandler = ( 305 | node: HTMLElement, 306 | done: () => void 307 | ) => mixed; 308 | declare export type EnterHandler = ( 309 | node: HTMLElement, 310 | isAppearing: boolean 311 | ) => mixed; 312 | declare export type ExitHandler = (node: HTMLElement) => mixed; 313 | 314 | declare export var UNMOUNTED: 'unmounted'; 315 | declare export var EXITED: 'exited'; 316 | declare export var ENTERING: 'entering'; 317 | declare export var ENTERED: 'entered'; 318 | declare export var EXITING: 'exiting'; 319 | 320 | declare export type TransitionActions = { 321 | appear?: boolean, 322 | enter?: boolean, 323 | exit?: boolean, 324 | }; 325 | 326 | declare export type TransitionStatus = 327 | | typeof ENTERING 328 | | typeof ENTERED 329 | | typeof EXITING 330 | | typeof EXITED 331 | | typeof UNMOUNTED; 332 | 333 | declare export type TransitionChildren = 334 | | React$Node 335 | | ((status: TransitionStatus) => React$Node); 336 | 337 | declare export type TransitionProps = TransitionActions & { 338 | timeout: number | {| enter?: number, exit?: number |}, 339 | children?: TransitionChildren, 340 | in?: boolean, 341 | mountOnEnter?: boolean, 342 | unmountOnExit?: boolean, 343 | addEndListener?: EndHandler, 344 | onEnter?: EnterHandler, 345 | onEntering?: EnterHandler, 346 | onEntered?: EnterHandler, 347 | onExit?: ExitHandler, 348 | onExiting?: ExitHandler, 349 | onExited?: ExitHandler, 350 | }; 351 | } 352 | 353 | /////////////////////////////////////////////////////////////////////////////// 354 | declare module '@material-ui/core/flow-types' { 355 | import type { 356 | CSSProperties, 357 | StyledComponentProps, 358 | } from '@material-ui/core/styles/withStyles'; 359 | 360 | // TODO 361 | declare export type PaletteType = any; 362 | 363 | declare export type PropTypes$Alignment = 364 | | 'inherit' 365 | | 'left' 366 | | 'center' 367 | | 'right' 368 | | 'justify'; 369 | declare export type PropTypes$Color = 370 | | 'inherit' 371 | | 'primary' 372 | | 'secondary' 373 | | 'default'; 374 | declare export type PropTypes$Margin = 'none' | 'dense' | 'normal'; 375 | 376 | declare export type CommonComponentProps = { 377 | className?: string, 378 | style?: CSSProperties, 379 | }; 380 | 381 | declare export type Color = {| 382 | [50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900]: string, 383 | A100: string, 384 | A200: string, 385 | A400: string, 386 | A700: string, 387 | |}; 388 | 389 | declare export type InheritStandardProps< 390 | BaseProps: {}, 391 | Removals: ?{} 392 | > = $Diff< 393 | BaseProps, 394 | { 395 | ...$Exact, 396 | innerRef: any, 397 | classes: any, 398 | className: any, 399 | style: any, 400 | } 401 | >; 402 | 403 | declare export type StandardProps< 404 | ClassesKeys: string, 405 | AdditionalProps: {}, 406 | InheritedProps: {}, 407 | Removals: ?{} 408 | > = $ReadOnly< 409 | InheritStandardProps & 410 | StyledComponentProps & 411 | CommonComponentProps & 412 | AdditionalProps 413 | >; 414 | } 415 | 416 | declare module '@material-ui/core/OverridableComponent' { 417 | import type { StyledComponentProps } from '@material-ui/core/styles/withStyles'; 418 | import type { CommonComponentProps } from '@material-ui/core/flow-types'; 419 | /** 420 | * A component whose root component can be controlled via a `component` prop. 421 | * 422 | * Adjusts valid props based on the type of `component` 423 | */ 424 | declare export interface OverridableTypeMap { 425 | props: *; 426 | defaultComponent: *; 427 | classKey: *; 428 | } 429 | 430 | declare export type OverridableComponent = { 431 | (props: DefaultComponentProps): React$Node, 432 | // TODO: readme issue 1 433 | // ( 434 | // props: { component?: Component } & OverrideProps 435 | // ): React$Node, 436 | }; 437 | 438 | /** 439 | * props of the component if `component={Component}` is used 440 | */ 441 | declare export type OverrideProps< 442 | M: OverridableTypeMap, 443 | C: React$ElementType 444 | > = BaseProps & 445 | $Diff< 446 | React$ElementConfig, 447 | // next props collected from CommonProps 448 | { 449 | className: any, 450 | style: any, 451 | classes: any, 452 | innerRef: any, 453 | } 454 | >; 455 | 456 | /** 457 | * props if `component={Component}` is NOT used 458 | */ 459 | declare export type DefaultComponentProps< 460 | M: OverridableTypeMap 461 | > = BaseProps & 462 | $Diff< 463 | React$ElementConfig<$ElementType>, 464 | BaseProps 465 | >; 466 | 467 | /** 468 | * props defined on the component (+ common material-ui props) 469 | */ 470 | declare export type BaseProps = $ElementType< 471 | M, 472 | 'props' 473 | > & 474 | CommonProps; 475 | 476 | /** 477 | * props that are valid for material-ui components 478 | */ 479 | declare export type CommonProps = StyledComponentProps< 480 | $ElementType 481 | > & 482 | CommonComponentProps; 483 | 484 | declare export type SimplifiedPropsOf = React$ElementConfig; 485 | } 486 | declare module '@material-ui/core/transitions' { 487 | import type { 488 | TransitionStatus as BaseTransitionStatus, 489 | TransitionProps as BaseTransitionProps, 490 | TransitionActions, 491 | } from '@material-ui/core/transitions/transition/@@react-transition-group/Transition'; 492 | import type { CSSProperties } from '@material-ui/core/styles/withStyles'; 493 | import type { $$Pick } from '@material-ui/core/@@utils'; 494 | 495 | declare type _TransitionHandler = { 496 | onEnter: any, 497 | onEntering: any, 498 | onEntered: any, 499 | onExit: any, 500 | onExiting: any, 501 | onExited: any, 502 | }; 503 | 504 | declare export type TransitionHandlerKeys = $Keys<_TransitionHandler>; 505 | 506 | declare export type TransitionHandlerProps = $$Pick< 507 | _TransitionHandler, 508 | BaseTransitionProps 509 | >; 510 | 511 | declare type _Transition = { 512 | in: any, 513 | mountOnEnter: any, 514 | unmountOnExit: any, 515 | timeout: any, 516 | addEndListener: any, 517 | ...$Exact<_TransitionHandler>, 518 | }; 519 | 520 | declare export type TransitionKeys = $Keys<_Transition>; 521 | declare type $TransitionProps = $$Pick<_Transition, BaseTransitionProps>; 522 | 523 | declare export type TransitionStatus = BaseTransitionStatus; 524 | declare export type TransitionProps = TransitionActions & { 525 | ...$TransitionProps, 526 | } & { 527 | style?: CSSProperties, 528 | }; 529 | } 530 | declare module '@material-ui/core/transitions/transition' { 531 | declare export * from '@material-ui/core/transitions' 532 | } 533 | 534 | declare module '@material-ui/core/colors' { 535 | declare export { default as amber } from '@material-ui/core/colors/amber'; 536 | declare export { default as blue } from '@material-ui/core/colors/blue'; 537 | declare export { 538 | default as blueGrey, 539 | } from '@material-ui/core/colors/blueGrey'; 540 | declare export { default as brown } from '@material-ui/core/colors/brown'; 541 | declare export { default as common } from '@material-ui/core/colors/common'; 542 | declare export { default as cyan } from '@material-ui/core/colors/cyan'; 543 | declare export { 544 | default as deepOrange, 545 | } from '@material-ui/core/colors/deepOrange'; 546 | declare export { 547 | default as deepPurple, 548 | } from '@material-ui/core/colors/deepPurple'; 549 | declare export { default as green } from '@material-ui/core/colors/green'; 550 | declare export { default as grey } from '@material-ui/core/colors/grey'; 551 | declare export { default as indigo } from '@material-ui/core/colors/indigo'; 552 | declare export { 553 | default as lightBlue, 554 | } from '@material-ui/core/colors/lightBlue'; 555 | declare export { 556 | default as lightGreen, 557 | } from '@material-ui/core/colors/lightGreen'; 558 | declare export { default as lime } from '@material-ui/core/colors/lime'; 559 | declare export { default as orange } from '@material-ui/core/colors/orange'; 560 | declare export { default as pink } from '@material-ui/core/colors/pink'; 561 | declare export { default as purple } from '@material-ui/core/colors/purple'; 562 | declare export { default as red } from '@material-ui/core/colors/red'; 563 | declare export { default as teal } from '@material-ui/core/colors/teal'; 564 | declare export { default as yellow } from '@material-ui/core/colors/yellow'; 565 | } 566 | declare module '@material-ui/core/colors/amber' { 567 | import type { Color } from '@material-ui/core/flow-types'; 568 | declare export default Color; 569 | } 570 | declare module '@material-ui/core/colors/blue' { 571 | import type { Color } from '@material-ui/core/flow-types'; 572 | declare export default Color; 573 | } 574 | declare module '@material-ui/core/colors/blueGrey' { 575 | import type { Color } from '@material-ui/core/flow-types'; 576 | declare export default Color; 577 | } 578 | declare module '@material-ui/core/colors/brown' { 579 | import type { Color } from '@material-ui/core/flow-types'; 580 | declare export default Color; 581 | } 582 | declare module '@material-ui/core/colors/common' { 583 | declare export type CommonColors = {| 584 | black: string, 585 | white: string, 586 | |}; 587 | 588 | declare export default CommonColors; 589 | } 590 | declare module '@material-ui/core/colors/cyan' { 591 | import type { Color } from '@material-ui/core/flow-types'; 592 | declare export default Color; 593 | } 594 | declare module '@material-ui/core/colors/deepOrange' { 595 | import type { Color } from '@material-ui/core/flow-types'; 596 | declare export default Color; 597 | } 598 | declare module '@material-ui/core/colors/deepPurple' { 599 | import type { Color } from '@material-ui/core/flow-types'; 600 | declare export default Color; 601 | } 602 | declare module '@material-ui/core/colors/green' { 603 | import type { Color } from '@material-ui/core/flow-types'; 604 | declare export default Color; 605 | } 606 | declare module '@material-ui/core/colors/grey' { 607 | import type { Color } from '@material-ui/core/flow-types'; 608 | declare export default Color; 609 | } 610 | declare module '@material-ui/core/colors/indigo' { 611 | import type { Color } from '@material-ui/core/flow-types'; 612 | declare export default Color; 613 | } 614 | declare module '@material-ui/core/colors/lightBlue' { 615 | import type { Color } from '@material-ui/core/flow-types'; 616 | declare export default Color; 617 | } 618 | declare module '@material-ui/core/colors/lightGreen' { 619 | import type { Color } from '@material-ui/core/flow-types'; 620 | declare export default Color; 621 | } 622 | declare module '@material-ui/core/colors/lime' { 623 | import type { Color } from '@material-ui/core/flow-types'; 624 | declare export default Color; 625 | } 626 | declare module '@material-ui/core/colors/orange' { 627 | import type { Color } from '@material-ui/core/flow-types'; 628 | declare export default Color; 629 | } 630 | declare module '@material-ui/core/colors/pink' { 631 | import type { Color } from '@material-ui/core/flow-types'; 632 | declare export default Color; 633 | } 634 | declare module '@material-ui/core/colors/purple' { 635 | import type { Color } from '@material-ui/core/flow-types'; 636 | declare export default Color; 637 | } 638 | declare module '@material-ui/core/colors/red' { 639 | import type { Color } from '@material-ui/core/flow-types'; 640 | declare export default Color; 641 | } 642 | declare module '@material-ui/core/colors/teal' { 643 | import type { Color } from '@material-ui/core/flow-types'; 644 | declare export default Color; 645 | } 646 | declare module '@material-ui/core/colors/yellow' { 647 | import type { Color } from '@material-ui/core/flow-types'; 648 | declare export default Color; 649 | } 650 | 651 | declare module '@material-ui/core/utils' { 652 | declare export * from '@material-ui/core/utils/helpers' 653 | declare export * from '@material-ui/core/utils/reactHelpers' 654 | declare export { 655 | default as requirePropFactory, 656 | } from '@material-ui/core/utils/requirePropFactory'; 657 | declare export { 658 | default as ownerWindow, 659 | } from '@material-ui/core/utils/ownerWindow'; 660 | } 661 | declare module '@material-ui/core/utils/helpers' { 662 | declare export type ChainedFunction = 663 | | ((...args: Array) => mixed) 664 | | void 665 | | null; 666 | 667 | declare export function capitalize(str: string): string; 668 | 669 | declare export function contains(obj: {}, pred: {}): boolean; 670 | 671 | declare export function createChainedFunction( 672 | ...args: Array 673 | ): (...args: Array) => mixed; 674 | } 675 | declare module '@material-ui/core/utils/ownerWindow' { 676 | // https://github.com/facebook/flow/blob/e812492d9f642c0345e70407e77d16768a55be81/lib/bom.js#L36 677 | declare type $Window = any; 678 | 679 | declare export default (node: Node, fallback?: $Window) => $Window; 680 | } 681 | declare module '@material-ui/core/utils/reactHelpers' { 682 | declare export type NamedMuiComponent = React$ComponentType & { 683 | muiName: string, 684 | }; 685 | 686 | declare export type NamedMuiElement = { 687 | type: NamedMuiComponent, 688 | // TODO: need StandardProps 689 | props: any, 690 | key: string | number | null, 691 | }; 692 | 693 | declare export function isMuiElement( 694 | element: any, 695 | muiNames: Array 696 | ): boolean; 697 | 698 | declare export function setRef(ref: React$Ref, value: T | null): void; 699 | } 700 | declare module '@material-ui/core/utils/requirePropFactory' { 701 | declare export default (componentNameInError: string) => any; 702 | } 703 | 704 | declare module '@material-ui/core/styles/colorManipulator' { 705 | declare export type ColorFormat = 'rgb' | 'rgba' | 'hsl' | 'hsla'; 706 | declare export type ColorObject = { 707 | type: ColorFormat, 708 | values: [number, number, number] | [number, number, number, number], 709 | }; 710 | 711 | declare export function recomposeColor(color: ColorObject): string; 712 | declare export function convertHexToRGB(hex: string): string; 713 | declare export function rgbToHex(color: string): string; 714 | declare export function decomposeColor(color: string): ColorObject; 715 | declare export function getContrastRatio( 716 | foreground: string, 717 | background: string 718 | ): number; 719 | declare export function getLuminance(color: string): number; 720 | declare export function emphasize( 721 | color: string, 722 | coefficient?: number 723 | ): string; 724 | declare export function fade(color: string, value: number): string; 725 | declare export function darken(color: string, coefficient?: number): string; 726 | declare export function lighten(color: string, coefficient?: number): string; 727 | } 728 | declare module '@material-ui/core/styles/createBreakpoints' { 729 | declare export type Breakpoint = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; 730 | 731 | declare export type BreakpointValues = { [key: Breakpoint]: number }; 732 | 733 | declare export type Breakpoints = {| 734 | keys: Breakpoint[], 735 | values: BreakpointValues, 736 | up: (key: Breakpoint | number) => string, 737 | down: (key: Breakpoint | number) => string, 738 | between: (start: Breakpoint, end: Breakpoint) => string, 739 | only: (key: Breakpoint) => string, 740 | width: (key: Breakpoint) => number, 741 | |}; 742 | 743 | declare export type BreakpointsOptions = $Shape<{| 744 | ...Breakpoints, 745 | unit: string, 746 | step: number, 747 | |}>; 748 | 749 | declare export var keys: Array; 750 | 751 | declare export default (options: BreakpointsOptions) => Breakpoints; 752 | } 753 | declare module '@material-ui/core/styles/createSpacing' { 754 | declare export type SpacingArgument = number | string; 755 | 756 | declare export type Spacing = { 757 | (value1: SpacingArgument): number, 758 | (value1: SpacingArgument, value2: SpacingArgument): string, 759 | ( 760 | value1: SpacingArgument, 761 | value2: SpacingArgument, 762 | value3: SpacingArgument 763 | ): string, 764 | ( 765 | value1: SpacingArgument, 766 | value2: SpacingArgument, 767 | value3: SpacingArgument, 768 | value4: SpacingArgument 769 | ): string, 770 | }; 771 | 772 | declare export type SpacingOptions = number | Spacing; 773 | 774 | declare export default (spacing?: SpacingOptions) => Spacing; 775 | } 776 | declare module '@material-ui/core/styles/zIndex' { 777 | declare export type ZIndex = { 778 | mobileStepper: number, 779 | appBar: number, 780 | drawer: number, 781 | modal: number, 782 | snackbar: number, 783 | tooltip: number, 784 | }; 785 | 786 | declare export type ZIndexOptions = $Shape; 787 | declare export default ZIndex; 788 | } 789 | declare module '@material-ui/core/styles/transitions' { 790 | declare export type Easing = {| 791 | easeInOut: string, 792 | easeOut: string, 793 | easeIn: string, 794 | sharp: string, 795 | |}; 796 | 797 | declare export var easing: Easing; 798 | 799 | declare export type Duration = {| 800 | shortest: number, 801 | shorter: number, 802 | short: number, 803 | standard: number, 804 | complex: number, 805 | enteringScreen: number, 806 | leavingScreen: number, 807 | |}; 808 | 809 | declare export var duration: Duration; 810 | 811 | declare export function formatMs(milliseconds: number): string; 812 | 813 | declare export type Transitions = {| 814 | easing: Easing, 815 | duration: Duration, 816 | create( 817 | props: string | string[], 818 | options?: $Shape<{| 819 | duration: number | string, 820 | easing: string, 821 | delay: number | string, 822 | |}> 823 | ): string, 824 | getAutoHeightDuration(height: number): number, 825 | |}; 826 | 827 | declare export type TransitionsOptions = {| 828 | easing?: $Shape, 829 | duration?: $Shape, 830 | create?: ( 831 | props: string | string[], 832 | options?: $Shape<{ 833 | duration: number | string, 834 | easing: string, 835 | delay: number | string, 836 | }> 837 | ) => string, 838 | getAutoHeightDuration?: (height: number) => number, 839 | |}; 840 | 841 | declare export default Transitions; 842 | } 843 | declare module '@material-ui/core/styles/createMixins' { 844 | import type { Breakpoints } from '@material-ui/core/styles/createBreakpoints'; 845 | import type { Spacing } from '@material-ui/core/styles/createSpacing'; 846 | import type { CSSProperties } from '@material-ui/core/styles/withStyles'; 847 | 848 | declare export type Mixins = { 849 | gutters: (styles?: CSSProperties) => CSSProperties, 850 | toolbar: CSSProperties, 851 | }; 852 | 853 | declare export type MixinsOptions = $Shape; 854 | 855 | declare export default ( 856 | breakpoints: Breakpoints, 857 | spacing: Spacing, 858 | mixins: MixinsOptions 859 | ) => Mixins; 860 | } 861 | declare module '@material-ui/core/styles/createMuiTheme' { 862 | import type { 863 | Breakpoints, 864 | BreakpointsOptions, 865 | } from '@material-ui/core/styles/createBreakpoints'; 866 | import type { 867 | Mixins, 868 | MixinsOptions, 869 | } from '@material-ui/core/styles/createMixins'; 870 | import type { 871 | Palette, 872 | PaletteOptions, 873 | } from '@material-ui/core/styles/createPalette'; 874 | import type { 875 | Typography, 876 | TypographyOptions, 877 | } from '@material-ui/core/styles/createTypography'; 878 | import type { Shadows } from '@material-ui/core/styles/shadows'; 879 | import type { Shape, ShapeOptions } from '@material-ui/core/styles/shape'; 880 | import type { 881 | Spacing, 882 | SpacingOptions, 883 | } from '@material-ui/core/styles/createSpacing'; 884 | import type { 885 | Transitions, 886 | TransitionsOptions, 887 | } from '@material-ui/core/styles/transitions'; 888 | import type { ZIndex, ZIndexOptions } from '@material-ui/core/styles/zIndex'; 889 | import type { Overrides } from '@material-ui/core/styles/overrides'; 890 | import type { ComponentsProps } from '@material-ui/core/styles/props'; 891 | 892 | declare export type Direction = 'ltr' | 'rtl'; 893 | 894 | declare export type ThemeOptions = {| 895 | shape?: ShapeOptions, 896 | breakpoints?: BreakpointsOptions, 897 | direction?: Direction, 898 | mixins?: MixinsOptions, 899 | overrides?: Overrides, 900 | palette?: PaletteOptions, 901 | props?: ComponentsProps, 902 | shadows?: Shadows, 903 | spacing?: SpacingOptions, 904 | transitions?: TransitionsOptions, 905 | typography?: TypographyOptions | ((palette: Palette) => TypographyOptions), 906 | zIndex?: ZIndexOptions, 907 | |}; 908 | 909 | declare export type Theme = {| 910 | shape: Shape, 911 | breakpoints: Breakpoints, 912 | direction: Direction, 913 | mixins: Mixins, 914 | overrides?: Overrides, 915 | palette: Palette, 916 | props?: ComponentsProps, 917 | shadows: Shadows, 918 | spacing: Spacing, 919 | transitions: Transitions, 920 | typography: Typography, 921 | zIndex: ZIndex, 922 | |}; 923 | 924 | declare export default (options?: ThemeOptions) => Theme; 925 | } 926 | declare module '@material-ui/core/styles/createPalette' { 927 | import type { Color, PaletteType } from '@material-ui/core/flow-types'; 928 | import type { CommonColors } from '@material-ui/core/colors/common'; 929 | 930 | declare export type ColorPartial = $Shape; 931 | 932 | declare export type TypeText = {| 933 | primary: string, 934 | secondary: string, 935 | disabled: string, 936 | hint: string, 937 | |}; 938 | 939 | declare export type TypeAction = {| 940 | active: string, 941 | hover: string, 942 | hoverOpacity: number, 943 | selected: string, 944 | disabled: string, 945 | disabledBackground: string, 946 | |}; 947 | 948 | declare export type TypeBackground = {| 949 | default: string, 950 | paper: string, 951 | |}; 952 | 953 | declare export type TypeDivider = string; 954 | 955 | declare export type PaletteColorOptions = 956 | | SimplePaletteColorOptions 957 | | ColorPartial; 958 | 959 | declare export type SimplePaletteColorOptions = {| 960 | light?: string, 961 | main: string, 962 | dark?: string, 963 | contrastText?: string, 964 | |}; 965 | 966 | declare export type PaletteColor = {| 967 | light: string, 968 | main: string, 969 | dark: string, 970 | contrastText: string, 971 | |}; 972 | 973 | declare export type TypeObject = {| 974 | text: TypeText, 975 | action: TypeAction, 976 | divider: TypeDivider, 977 | background: TypeBackground, 978 | |}; 979 | 980 | declare export var light: TypeObject; 981 | declare export var dark: TypeObject; 982 | 983 | declare export type Palette = {| 984 | common: CommonColors, 985 | type: PaletteType, 986 | contrastThreshold: number, 987 | tonalOffset: number, 988 | primary: PaletteColor, 989 | secondary: PaletteColor, 990 | error: PaletteColor, 991 | grey: Color, 992 | text: TypeText, 993 | divider: TypeDivider, 994 | action: TypeAction, 995 | background: TypeBackground, 996 | getContrastText: (background: string) => string, 997 | augmentColor: { 998 | ( 999 | color: ColorPartial, 1000 | mainShade?: number | string, 1001 | lightShade?: number | string, 1002 | darkShade?: number | string 1003 | ): PaletteColor, 1004 | (color: PaletteColorOptions): PaletteColor, 1005 | }, 1006 | |}; 1007 | 1008 | declare export type PartialTypeObject = $ObjMap< 1009 | TypeObject, 1010 | (V) => $Shape 1011 | >; 1012 | 1013 | declare export type PaletteOptions = {| 1014 | primary?: PaletteColorOptions, 1015 | secondary?: PaletteColorOptions, 1016 | error?: PaletteColorOptions, 1017 | type?: PaletteType, 1018 | tonalOffset?: number, 1019 | contrastThreshold?: number, 1020 | common?: $Shape, 1021 | grey?: ColorPartial, 1022 | text?: $Shape, 1023 | divider?: string, 1024 | action?: $Shape, 1025 | background?: $Shape, 1026 | getContrastText?: (background: string) => string, 1027 | |}; 1028 | 1029 | declare export default (palette: PaletteOptions) => Palette; 1030 | } 1031 | declare module '@material-ui/core/styles/createStyles' { 1032 | import type { StyleRules } from '@material-ui/core/styles/withStyles'; 1033 | 1034 | declare export default { 1035 | (styles: StyleRules): StyleRules, 1036 | }; 1037 | } 1038 | declare module '@material-ui/core/styles/createTypography' { 1039 | import type { Palette } from '@material-ui/core/styles/createPalette'; 1040 | import type { CSSProperties } from '@material-ui/core/styles/withStyles'; 1041 | 1042 | declare export type ThemeStyle = 1043 | | 'h1' 1044 | | 'h2' 1045 | | 'h3' 1046 | | 'h4' 1047 | | 'h5' 1048 | | 'h6' 1049 | | 'subtitle1' 1050 | | 'subtitle2' 1051 | | 'body1' 1052 | | 'body2' 1053 | | 'caption' 1054 | | 'button' 1055 | | 'overline'; 1056 | 1057 | declare export type FontStyle = {| 1058 | fontSize: number, 1059 | fontFamily: $ElementType, 1060 | fontWeightLight: $ElementType, 1061 | fontWeightRegular: $ElementType, 1062 | fontWeightMedium: $ElementType, 1063 | |}; 1064 | 1065 | declare export type FontStyleOptions = $Shape<{| 1066 | ...FontStyle, 1067 | htmlFontSize: number, 1068 | allVariants: CSSProperties, 1069 | |}>; 1070 | 1071 | declare export type TypographyStyle = {| 1072 | color: $ElementType, 1073 | fontFamily: $ElementType, 1074 | fontSize: $ElementType, 1075 | fontStyle: $ElementType, 1076 | fontWeight: $ElementType, 1077 | letterSpacing?: $ElementType, 1078 | lineHeight?: $ElementType, 1079 | textTransform?: $ElementType, 1080 | |}; 1081 | 1082 | declare export type TypographyStyleOptions = $Shape; 1083 | 1084 | declare export type TypographyUtils = {| 1085 | pxToRem: (px: number) => string, 1086 | |}; 1087 | 1088 | declare export type Typography = {| 1089 | [ThemeStyle]: TypographyStyle, 1090 | ...FontStyle, 1091 | ...TypographyUtils, 1092 | |}; 1093 | 1094 | declare export type TypographyOptions = {| 1095 | [ThemeStyle]: TypographyStyleOptions, 1096 | ...FontStyleOptions, 1097 | |}; 1098 | 1099 | declare export default ( 1100 | palette: Palette, 1101 | typography: TypographyOptions | ((palette: Palette) => TypographyOptions) 1102 | ) => Typography; 1103 | } 1104 | declare module '@material-ui/core/styles/makeStyles' { 1105 | import type { 1106 | ClassKeyOfStyles, 1107 | ClassNameMap, 1108 | PropsOfStyles, 1109 | Styles, 1110 | WithStylesOptions, 1111 | } from '@material-ui/core/styles/withStyles'; 1112 | 1113 | declare export type StylesHook> = ( 1114 | props: PropsOfStyles 1115 | ) => ClassNameMap>; 1116 | 1117 | declare export default { 1118 | ( 1119 | styles: Styles, 1120 | options?: WithStylesOptions 1121 | ): StylesHook>, 1122 | }; 1123 | } 1124 | declare module '@material-ui/core/styles/overrides' { 1125 | // TODO 1126 | declare export type Overrides = {}; 1127 | declare export type ComponentNameToClassKey = {}; 1128 | } 1129 | declare module '@material-ui/core/styles/props' { 1130 | // TODO 1131 | declare export type ComponentsProps = {}; 1132 | declare export type ComponentsPropsList = {}; 1133 | } 1134 | declare module '@material-ui/core/styles/shadows' { 1135 | declare export type Shadows = [ 1136 | 'none', 1137 | string, 1138 | string, 1139 | string, 1140 | string, 1141 | string, 1142 | string, 1143 | string, 1144 | string, 1145 | string, 1146 | string, 1147 | string, 1148 | string, 1149 | string, 1150 | string, 1151 | string, 1152 | string, 1153 | string, 1154 | string, 1155 | string, 1156 | string, 1157 | string, 1158 | string, 1159 | string, 1160 | string, 1161 | ]; 1162 | 1163 | declare export default Shadows; 1164 | } 1165 | declare module '@material-ui/core/styles/shape' { 1166 | declare export type Shape = {| 1167 | borderRadius: number, 1168 | |}; 1169 | 1170 | declare export type ShapeOptions = $Shape; 1171 | 1172 | declare export default Shape; 1173 | } 1174 | declare module '@material-ui/core/styles/useTheme' { 1175 | import type { Theme } from '@material-ui/core/styles/createMuiTheme'; 1176 | 1177 | declare export default { 1178 | (): T, 1179 | }; 1180 | } 1181 | declare module '@material-ui/core/styles/withStyles' { 1182 | import type { StyleSheetFactoryOptions } from '@material-ui/core/@@JSS'; 1183 | import type { CSS$Properties } from '@material-ui/core/@@dom'; 1184 | import type { Theme } from '@material-ui/core/styles/createMuiTheme'; 1185 | 1186 | declare export type CSSProperties = CSS$Properties; 1187 | 1188 | declare export type StyleRules = { 1189 | [ClassKey]: CSSProperties, 1190 | }; 1191 | 1192 | declare export type StyleRulesCallback = ( 1193 | theme: Theme 1194 | ) => StyleRules; 1195 | 1196 | declare export type Styles = 1197 | | StyleRules 1198 | | StyleRulesCallback; 1199 | 1200 | declare type _PropsOfStyles> = Props; 1201 | declare type _ClassKeyOfStyles< 1202 | ClassKey: string, 1203 | S: Styles 1204 | > = ClassKey; 1205 | 1206 | declare export type PropsOfStyles> = _PropsOfStyles<*, S>; 1207 | declare export type ClassKeyOfStyles> = _ClassKeyOfStyles< 1208 | * 1209 | >; 1210 | 1211 | declare export type WithStylesOptions = StyleSheetFactoryOptions & { 1212 | flip?: boolean, 1213 | name?: string, 1214 | }; 1215 | 1216 | declare export type ClassNameMap = { [Keys]: string }; 1217 | 1218 | declare export type StyledComponentProps = { 1219 | classes?: ClassNameMap, 1220 | innerRef?: React$Ref, 1221 | }; 1222 | 1223 | declare export type EnhancedPropsTheme = $Diff & 1224 | StyledComponentProps; 1225 | 1226 | declare export type EnhancedProps = $Diff & 1227 | StyledComponentProps 1228 | 1229 | declare export default { 1230 | ( 1231 | style: Styles, 1232 | options?: Options 1233 | ): >( 1234 | Component: Comp 1235 | ) => React$ComponentType< 1236 | EnhancedPropsTheme, ClassKey> 1237 | >, 1238 | ( 1239 | style: Styles, 1240 | options?: Options 1241 | ): >( 1242 | Component: Comp 1243 | ) => React$ComponentType< 1244 | EnhancedProps, ClassKey> 1245 | >, 1246 | }; 1247 | } 1248 | declare module '@material-ui/core/styles/withTheme' { 1249 | import type { Theme } from '@material-ui/core/styles/createMuiTheme'; 1250 | 1251 | declare export type WithTheme = { 1252 | theme: Theme, 1253 | }; 1254 | 1255 | declare export type ThemedComponentProps = { ...WithTheme } & { 1256 | innerRef?: React$Ref, 1257 | }; 1258 | 1259 | declare export default { 1260 | >( 1261 | Component: Comp 1262 | ): React$ComponentType< 1263 | $Diff, WithTheme> & ThemedComponentProps 1264 | >, 1265 | }; 1266 | } 1267 | declare module '@material-ui/core/styles/responsiveFontSizes' { 1268 | import type { Theme } from '@material-ui/core/styles/createMuiTheme'; 1269 | import type { Breakpoint } from '@material-ui/core/styles/createBreakpoints'; 1270 | import type { ThemeStyle } from '@material-ui/core/styles/createTypography'; 1271 | 1272 | declare export type ResponsiveFontSizesOptions = {| 1273 | breakpoints?: Breakpoint[], 1274 | disableAlign?: boolean, 1275 | factor?: number, 1276 | variants?: ThemeStyle, 1277 | |}; 1278 | 1279 | declare export default ( 1280 | theme: Theme, 1281 | options?: ResponsiveFontSizesOptions 1282 | ) => Theme; 1283 | } 1284 | declare module '@material-ui/core/styles/MuiThemeProvider' { 1285 | // TODO: export type { ThemeProvider } from '@material-ui/styles'; 1286 | declare type ThemeProvider = React$ComponentType; 1287 | 1288 | declare export default ThemeProvider; 1289 | } 1290 | declare module '@material-ui/core/styles' { 1291 | declare export * from '@material-ui/core/styles/colorManipulator' 1292 | declare export { 1293 | default as createMuiTheme, 1294 | Theme, 1295 | Direction, 1296 | } from '@material-ui/core/styles/createMuiTheme'; 1297 | declare export { 1298 | default as createPalette, 1299 | PaletteColorOptions, 1300 | SimplePaletteColorOptions, 1301 | } from '@material-ui/core/styles/createPalette'; 1302 | declare export { 1303 | default as createStyles, 1304 | } from '@material-ui/core/styles/createStyles'; 1305 | declare export { 1306 | TypographyStyle, 1307 | } from '@material-ui/core/styles/createTypography'; 1308 | declare export { 1309 | default as makeStyles, 1310 | } from '@material-ui/core/styles/makeStyles'; 1311 | declare export { ComponentsPropsList } from '@material-ui/core/styles/props'; 1312 | declare export * from '@material-ui/core/styles/transitions' 1313 | declare export { 1314 | default as useTheme, 1315 | } from '@material-ui/core/styles/useTheme'; 1316 | declare export { 1317 | default as withStyles, 1318 | StyleRules, 1319 | StyleRulesCallback, 1320 | StyledComponentProps, 1321 | } from '@material-ui/core/styles/withStyles'; 1322 | declare export { 1323 | default as withTheme, 1324 | WithTheme, 1325 | } from '@material-ui/core/styles/withTheme'; 1326 | declare export { 1327 | default as MuiThemeProvider, 1328 | } from '@material-ui/core/styles/MuiThemeProvider'; 1329 | declare export { 1330 | default as responsiveFontSizes, 1331 | } from '@material-ui/core/styles/responsiveFontSizes'; 1332 | } 1333 | 1334 | declare module '@material-ui/core/Paper' { 1335 | import type { StandardProps } from '@material-ui/core/flow-types'; 1336 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1337 | 1338 | declare export type PaperClassKey = 1339 | | 'root' 1340 | | 'rounded' 1341 | | 'elevation0' 1342 | | 'elevation1' 1343 | | 'elevation2' 1344 | | 'elevation3' 1345 | | 'elevation4' 1346 | | 'elevation5' 1347 | | 'elevation6' 1348 | | 'elevation7' 1349 | | 'elevation8' 1350 | | 'elevation9' 1351 | | 'elevation10' 1352 | | 'elevation11' 1353 | | 'elevation12' 1354 | | 'elevation13' 1355 | | 'elevation14' 1356 | | 'elevation15' 1357 | | 'elevation16' 1358 | | 'elevation17' 1359 | | 'elevation18' 1360 | | 'elevation19' 1361 | | 'elevation20' 1362 | | 'elevation21' 1363 | | 'elevation22' 1364 | | 'elevation23' 1365 | | 'elevation24'; 1366 | 1367 | declare export type PaperProps = StandardProps< 1368 | PaperClassKey, 1369 | { 1370 | component?: React$ElementType, 1371 | elevation?: number, 1372 | square?: boolean, 1373 | }, 1374 | HTMLDivAttributes, 1375 | void 1376 | >; 1377 | 1378 | declare export default React$ComponentType; 1379 | } 1380 | declare module '@material-ui/core/Paper/Paper' { 1381 | declare export * from '@material-ui/core/Paper' 1382 | } 1383 | 1384 | declare module '@material-ui/core/AppBar' { 1385 | import type { 1386 | StandardProps, 1387 | PropTypes$Color, 1388 | } from '@material-ui/core/flow-types'; 1389 | import type { PaperProps } from '@material-ui/core/Paper'; 1390 | 1391 | declare export type AppBarClassKey = 1392 | | 'root' 1393 | | 'positionFixed' 1394 | | 'positionAbsolute' 1395 | | 'positionSticky' 1396 | | 'positionStatic' 1397 | | 'positionRelative' 1398 | | 'colorDefault' 1399 | | 'colorPrimary' 1400 | | 'colorSecondary'; 1401 | 1402 | declare export type AppBarProps = StandardProps< 1403 | AppBarClassKey, 1404 | { 1405 | color?: PropTypes$Color, 1406 | position?: 'fixed' | 'absolute' | 'sticky' | 'static' | 'relative', 1407 | }, 1408 | PaperProps, 1409 | void 1410 | >; 1411 | 1412 | declare export default React$ComponentType; 1413 | } 1414 | declare module '@material-ui/core/AppBar/AppBar' { 1415 | declare export * from '@material-ui/core/AppBar' 1416 | } 1417 | 1418 | declare module '@material-ui/core/Avatar' { 1419 | import type { HTMLImageAttributes } from '@material-ui/core/@@dom'; 1420 | import type { 1421 | OverridableComponent, 1422 | SimplifiedPropsOf, 1423 | } from '@material-ui/core/OverridableComponent'; 1424 | 1425 | declare export type AvatarClassKey = 'root' | 'colorDefault' | 'img'; 1426 | 1427 | declare type Avatar = OverridableComponent<{ 1428 | props: { 1429 | alt?: string, 1430 | childrenClassName?: string, 1431 | imgProps?: HTMLImageAttributes, 1432 | sizes?: string, 1433 | src?: string, 1434 | srcSet?: string, 1435 | }, 1436 | defaultComponent: 'div', 1437 | classKey: AvatarClassKey, 1438 | }>; 1439 | 1440 | declare export type AvatarProps = SimplifiedPropsOf; 1441 | 1442 | declare export default Avatar; 1443 | } 1444 | declare module '@material-ui/core/Avatar/Avatar' { 1445 | declare export * from '@material-ui/core/Avatar' 1446 | } 1447 | 1448 | declare module '@material-ui/core/Backdrop' { 1449 | import type { StandardProps } from '@material-ui/core/flow-types'; 1450 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1451 | import type { FadeProps } from '@material-ui/core/Fade'; 1452 | import type { TransitionProps } from '@material-ui/core/transitions'; 1453 | 1454 | declare export type BackdropClassKey = 'root' | 'invisible'; 1455 | 1456 | declare export type BackdropProps = StandardProps< 1457 | BackdropClassKey, 1458 | { 1459 | open: boolean, 1460 | invisible?: boolean, 1461 | onClick?: ({}) => mixed, 1462 | transitionDuration?: $ElementType, 1463 | }, 1464 | HTMLDivAttributes & { ...FadeProps }, 1465 | void 1466 | >; 1467 | 1468 | declare export default React$ComponentType; 1469 | } 1470 | declare module '@material-ui/core/Backdrop/Backdrop' { 1471 | declare export * from '@material-ui/core/Backdrop' 1472 | } 1473 | 1474 | declare module '@material-ui/core/Badge' { 1475 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1476 | import type { 1477 | StandardProps, 1478 | PropTypes$Color, 1479 | } from '@material-ui/core/flow-types'; 1480 | 1481 | declare export type BadgeClassKey = 1482 | | 'root' 1483 | | 'badge' 1484 | | 'colorPrimary' 1485 | | 'colorSecondary' 1486 | | 'colorError' 1487 | | 'invisible' 1488 | | 'dot'; 1489 | 1490 | declare export type BadgeProps = StandardProps< 1491 | BadgeClassKey, 1492 | { 1493 | children: React$Node, 1494 | badgeContent?: React$Node, 1495 | color?: PropTypes$Color | 'error', 1496 | component?: React$ElementType, 1497 | invisible?: boolean, 1498 | max?: number, 1499 | showZero?: boolean, 1500 | variant?: 'standard' | 'dot', 1501 | }, 1502 | HTMLDivAttributes, 1503 | void 1504 | >; 1505 | 1506 | declare export default React$ComponentType; 1507 | } 1508 | declare module '@material-ui/core/Badge/Badge' { 1509 | declare export * from '@material-ui/core/Badge' 1510 | } 1511 | 1512 | declare module '@material-ui/core/BottomNavigation' { 1513 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1514 | import type { StandardProps } from '@material-ui/core/flow-types'; 1515 | 1516 | declare export type BottomNavigationClassKey = 'root'; 1517 | 1518 | declare export type BottomNavigationProps = StandardProps< 1519 | BottomNavigationClassKey, 1520 | { 1521 | component?: React$ElementType, 1522 | children: React$Node, 1523 | onChange?: (event: {}, value: any) => mixed, 1524 | showLabels?: boolean, 1525 | value?: any, 1526 | }, 1527 | HTMLDivAttributes, 1528 | { onChange: any } 1529 | >; 1530 | 1531 | declare export default React$ComponentType; 1532 | } 1533 | declare module '@material-ui/core/BottomNavigation/BottomNavigation' { 1534 | declare export * from '@material-ui/core/BottomNavigation' 1535 | } 1536 | 1537 | declare module '@material-ui/core/Box' { 1538 | import type { $$Pick } from '@material-ui/core/@@utils'; 1539 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1540 | import type { CSSProperties } from '@material-ui/core/styles/withStyles'; 1541 | 1542 | declare type PropsByCSSProperties = { 1543 | ...$$Pick< 1544 | { 1545 | alignContent: any, 1546 | alignItems: any, 1547 | alignSelf: any, 1548 | border: any, 1549 | borderBottom: any, 1550 | borderColor: any, 1551 | borderLeft: any, 1552 | borderRadius: any, 1553 | borderRight: any, 1554 | borderTop: any, 1555 | bottom: any, 1556 | boxShadow: any, 1557 | color: any, 1558 | cursor: any, 1559 | display: any, 1560 | flex: any, 1561 | flexDirection: any, 1562 | flexGrow: any, 1563 | flexShrink: any, 1564 | flexWrap: any, 1565 | fontFamily: any, 1566 | fontSize: any, 1567 | fontWeight: any, 1568 | height: any, 1569 | justifyContent: any, 1570 | left: any, 1571 | maxHeight: any, 1572 | maxWidth: any, 1573 | minHeight: any, 1574 | minWidth: any, 1575 | overflowX: any, 1576 | overflowY: any, 1577 | position: any, 1578 | right: any, 1579 | textAlign: any, 1580 | top: any, 1581 | width: any, 1582 | zIndex: any, 1583 | }, 1584 | CSSProperties 1585 | >, 1586 | }; 1587 | 1588 | declare export type BoxProps = PropsByCSSProperties & 1589 | HTMLDivAttributes & { 1590 | component?: React$ElementType, 1591 | // styled API 1592 | clone?: boolean, 1593 | // Box specific props 1594 | bgcolor?: string, 1595 | displayPrint?: string, 1596 | m?: string | number, 1597 | mb?: string | number, 1598 | ml?: string | number, 1599 | mr?: string | number, 1600 | mt?: string | number, 1601 | mx?: string | number, 1602 | my?: string | number, 1603 | order?: string | number, 1604 | p?: string | number, 1605 | pb?: string | number, 1606 | pl?: string | number, 1607 | pr?: string | number, 1608 | pt?: string | number, 1609 | px?: string | number, 1610 | py?: string | number, 1611 | }; 1612 | 1613 | declare export default React$ComponentType; 1614 | } 1615 | declare module '@material-ui/core/Box/Box' { 1616 | declare export * from '@material-ui/core/Box' 1617 | } 1618 | 1619 | declare module '@material-ui/core/Breadcrumbs' { 1620 | import type { 1621 | OverridableComponent, 1622 | SimplifiedPropsOf, 1623 | } from '@material-ui/core/OverridableComponent'; 1624 | 1625 | declare export type BreadcrumbsClassKey = 'root' | 'ol' | 'separator'; 1626 | 1627 | declare type Breadcrumbs = OverridableComponent<{ 1628 | props: { 1629 | itemsAfterCollapse?: boolean, 1630 | itemsBeforeCollapse?: boolean, 1631 | maxItems?: number, 1632 | separator?: React$Node, 1633 | }, 1634 | defaultComponent: 'nav', 1635 | classKey: BreadcrumbsClassKey, 1636 | }>; 1637 | 1638 | declare export type BreadcrumbsProps = SimplifiedPropsOf; 1639 | 1640 | declare export default Breadcrumbs; 1641 | } 1642 | declare module '@material-ui/core/Breadcrumbs/Breadcrumbs' { 1643 | declare export * from '@material-ui/core/Breadcrumbs' 1644 | } 1645 | 1646 | declare module '@material-ui/core/Card' { 1647 | import type { StandardProps } from '@material-ui/core/flow-types'; 1648 | import type { PaperProps } from '@material-ui/core/Paper'; 1649 | 1650 | declare export type CardClassKey = 'root'; 1651 | 1652 | declare export type CardProps = StandardProps< 1653 | CardClassKey, 1654 | { 1655 | raised?: boolean, 1656 | }, 1657 | PaperProps, 1658 | void 1659 | >; 1660 | 1661 | declare export default React$ComponentType; 1662 | } 1663 | declare module '@material-ui/core/Card/Card' { 1664 | declare export * from '@material-ui/core/Card' 1665 | } 1666 | 1667 | declare module '@material-ui/core/CardActions' { 1668 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1669 | import type { StandardProps } from '@material-ui/core/flow-types'; 1670 | 1671 | declare export type CardActionsClassKey = 'root' | 'spacing'; 1672 | 1673 | declare export type CardActionsProps = StandardProps< 1674 | CardActionsClassKey, 1675 | { 1676 | disableSpacing?: boolean, 1677 | }, 1678 | HTMLDivAttributes, 1679 | void 1680 | >; 1681 | 1682 | declare export default React$ComponentType; 1683 | } 1684 | declare module '@material-ui/core/CardActions/CardActions' { 1685 | declare export * from '@material-ui/core/CardActions' 1686 | } 1687 | 1688 | declare module '@material-ui/core/CardContent' { 1689 | import type { StandardProps } from '@material-ui/core/flow-types'; 1690 | import type { PaperProps } from '@material-ui/core/Paper'; 1691 | 1692 | declare export type CardContentClassKey = 'root'; 1693 | 1694 | declare export type CardContentProps = StandardProps< 1695 | CardContentClassKey, 1696 | { 1697 | component?: React$ElementType, 1698 | }, 1699 | PaperProps, 1700 | void 1701 | >; 1702 | 1703 | declare export default React$ComponentType; 1704 | } 1705 | declare module '@material-ui/core/CardContent/CardContent' { 1706 | declare export * from '@material-ui/core/CardContent' 1707 | } 1708 | 1709 | declare module '@material-ui/core/CircularProgress' { 1710 | import type { StandardProps } from '@material-ui/core/flow-types'; 1711 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1712 | declare export type CircularProgressClassKey = 1713 | | 'root' 1714 | | 'static' 1715 | | 'indeterminate' 1716 | | 'colorPrimary' 1717 | | 'colorSecondary' 1718 | | 'svg' 1719 | | 'circle' 1720 | | 'circleStatic' 1721 | | 'circleIndeterminate' 1722 | | 'circleDisableShrink'; 1723 | 1724 | declare export type CircularProgressProps = StandardProps< 1725 | CircularProgressClassKey, 1726 | { 1727 | color?: 'primary' | 'secondary' | 'inherit', 1728 | disableShrink?: boolean, 1729 | size?: number | string, 1730 | thickness?: number, 1731 | value?: number, 1732 | variant?: 'determinate' | 'indeterminate' | 'static', 1733 | }, 1734 | HTMLDivAttributes, 1735 | void 1736 | >; 1737 | 1738 | declare export default React$ComponentType; 1739 | } 1740 | declare module '@material-ui/core/CircularProgress/CircularProgress' { 1741 | declare export * from '@material-ui/core/CircularProgress' 1742 | } 1743 | 1744 | declare module '@material-ui/core/ClickAwayListener' { 1745 | declare export type ClickAwayListenerProps = {| 1746 | children: React$Node, 1747 | onClickAway: (event: {} /*SyntheticMouseEvent*/) => mixed, 1748 | mouseEvent?: 'onClick' | 'onMouseDown' | 'onMouseUp' | false, 1749 | touchEvent?: 'onTouchStart' | 'onTouchEnd' | false, 1750 | |}; 1751 | 1752 | declare export default React$ComponentType; 1753 | } 1754 | declare module '@material-ui/core/ClickAwayListener/ClickAwayListener' { 1755 | declare export * from '@material-ui/core/ClickAwayListener' 1756 | } 1757 | 1758 | declare module '@material-ui/core/Container' { 1759 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1760 | import type { StandardProps } from '@material-ui/core/flow-types'; 1761 | 1762 | declare export type ContainerClassKey = 1763 | | 'root' 1764 | | 'fixed' 1765 | | 'maxWidthXs' 1766 | | 'maxWidthSm' 1767 | | 'maxWidthMd' 1768 | | 'maxWidthLg' 1769 | | 'maxWidthXl'; 1770 | 1771 | declare export type ContainerProps = StandardProps< 1772 | ContainerClassKey, 1773 | { 1774 | component?: React$ElementType, 1775 | fixed?: boolean, 1776 | maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false, 1777 | }, 1778 | HTMLDivAttributes, 1779 | void 1780 | >; 1781 | 1782 | declare export default React$ComponentType; 1783 | } 1784 | declare module '@material-ui/core/Container/Container' { 1785 | declare export * from '@material-ui/core/Container' 1786 | } 1787 | 1788 | declare module '@material-ui/core/CssBaseline' { 1789 | declare export type CssBaselineClassKey = '@global'; 1790 | 1791 | declare export type CssBaselineProps = {| 1792 | children?: React$Node, 1793 | |}; 1794 | 1795 | declare export default React$ComponentType; 1796 | } 1797 | declare module '@material-ui/core/CssBaseline/CssBaseline' { 1798 | declare export * from '@material-ui/core/CssBaseline' 1799 | } 1800 | 1801 | declare module '@material-ui/core/DialogActions' { 1802 | import type { StandardProps } from '@material-ui/core/flow-types'; 1803 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1804 | declare export type DialogActionsClassKey = 'root' | 'spacing'; 1805 | 1806 | declare export type DialogActionsProps = StandardProps< 1807 | DialogActionsClassKey, 1808 | { 1809 | disableSpacing?: boolean, 1810 | }, 1811 | HTMLDivAttributes, 1812 | void 1813 | >; 1814 | 1815 | declare export default React$ComponentType; 1816 | } 1817 | declare module '@material-ui/core/DialogActions/DialogActions' { 1818 | declare export * from '@material-ui/core/DialogActions' 1819 | } 1820 | 1821 | declare module '@material-ui/core/DialogContent' { 1822 | import type { StandardProps } from '@material-ui/core/flow-types'; 1823 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1824 | declare export type DialogContentClassKey = 'root'; 1825 | 1826 | declare export type DialogContentProps = StandardProps< 1827 | DialogContentClassKey, 1828 | { 1829 | dividers?: boolean, 1830 | }, 1831 | HTMLDivAttributes, 1832 | void 1833 | >; 1834 | 1835 | declare export default React$ComponentType; 1836 | } 1837 | declare module '@material-ui/core/DialogContent/DialogContent' { 1838 | declare export * from '@material-ui/core/DialogContent' 1839 | } 1840 | 1841 | declare module '@material-ui/core/DialogTitle' { 1842 | import type { StandardProps } from '@material-ui/core/flow-types'; 1843 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1844 | declare export type DialogTitleClassKey = 'root'; 1845 | 1846 | declare export type DialogTitleProps = StandardProps< 1847 | DialogTitleClassKey, 1848 | { 1849 | disableTypography?: boolean, 1850 | }, 1851 | HTMLDivAttributes, 1852 | void 1853 | >; 1854 | 1855 | declare export default React$ComponentType; 1856 | } 1857 | declare module '@material-ui/core/DialogTitle/DialogTitle' { 1858 | declare export * from '@material-ui/core/DialogTitle' 1859 | } 1860 | 1861 | declare module '@material-ui/core/ExpansionPanelActions' { 1862 | import type { StandardProps } from '@material-ui/core/flow-types'; 1863 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1864 | 1865 | declare export type ExpansionPanelActionsClassKey = 'root' | 'spacing'; 1866 | 1867 | declare export type ExpansionPanelActionsProps = StandardProps< 1868 | ExpansionPanelActionsClassKey, 1869 | {}, 1870 | HTMLDivAttributes, 1871 | void 1872 | >; 1873 | 1874 | declare export default React$ComponentType; 1875 | } 1876 | declare module '@material-ui/core/ExpansionPanelActions/ExpansionPanelActions' { 1877 | declare export * from '@material-ui/core/ExpansionPanelActions' 1878 | } 1879 | 1880 | declare module '@material-ui/core/ExpansionPanelDetails' { 1881 | import type { StandardProps } from '@material-ui/core/flow-types'; 1882 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1883 | 1884 | declare export type ExpansionPanelDetailsClassKey = 'root' | 'spacing'; 1885 | 1886 | declare export type ExpansionPanelDetailsProps = StandardProps< 1887 | ExpansionPanelDetailsClassKey, 1888 | {}, 1889 | HTMLDivAttributes, 1890 | void 1891 | >; 1892 | 1893 | declare export default React$ComponentType; 1894 | } 1895 | declare module '@material-ui/core/ExpansionPanelDetails/ExpansionPanelDetails' { 1896 | declare export * from '@material-ui/core/ExpansionPanelDetails' 1897 | } 1898 | 1899 | declare module '@material-ui/core/Fade' { 1900 | import type { Theme } from '@material-ui/core/styles/createMuiTheme'; 1901 | import type { TransitionProps } from '@material-ui/core/transitions/transition'; 1902 | 1903 | declare export type FadeProps = TransitionProps & { 1904 | ref?: React$Ref, 1905 | theme?: Theme, 1906 | }; 1907 | 1908 | declare export default React$ComponentType; 1909 | } 1910 | declare module '@material-ui/core/Fade/Fade' { 1911 | declare export * from '@material-ui/core/Fade' 1912 | } 1913 | 1914 | declare module '@material-ui/core/ButtonBase/TouchRipple' { 1915 | import type { StandardProps } from '@material-ui/core/flow-types'; 1916 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 1917 | 1918 | declare export type TouchRippleClassKey = 1919 | | 'root' 1920 | | 'ripple' 1921 | | 'rippleVisible' 1922 | | 'ripplePulsate' 1923 | | 'child' 1924 | | 'childLeaving' 1925 | | 'childPulsate'; 1926 | 1927 | declare export type TouchRippleProps = StandardProps< 1928 | TouchRippleClassKey, 1929 | { center?: boolean }, 1930 | HTMLDivAttributes, 1931 | void 1932 | >; 1933 | 1934 | declare export default React$ComponentType; 1935 | } 1936 | declare module '@material-ui/core/ButtonBase' { 1937 | import type { TouchRippleProps } from '@material-ui/core/ButtonBase/TouchRipple'; 1938 | import type { 1939 | OverridableComponent, 1940 | OverridableTypeMap, 1941 | } from '@material-ui/core/OverridableComponent'; 1942 | 1943 | declare export type ButtonBaseActions = { 1944 | focusVisible(): void, 1945 | }; 1946 | 1947 | declare export type ButtonBaseClassKey = 'root' | 'disabled' | 'focusVisible'; 1948 | 1949 | declare export type ButtonBaseOwnProps = { 1950 | action?: (actions: ButtonBaseActions) => mixed, 1951 | buttonRef?: React$Ref, 1952 | centerRipple?: boolean, 1953 | disabled?: boolean, 1954 | disableRipple?: boolean, 1955 | disableTouchRipple?: boolean, 1956 | focusRipple?: boolean, 1957 | focusVisibleClassName?: string, 1958 | onFocusVisible?: ({}) => mixed, 1959 | TouchRippleProps?: $Shape, 1960 | // TODO: remove when fix `ExtendButtonBase` 1961 | href?: string, 1962 | }; 1963 | 1964 | /* 1965 | TODO: readme issue 1 1966 | ((props: { href: string } & OverrideProps, 'a'>) => React$Node); 1967 | */ 1968 | declare export type ExtendButtonBase< 1969 | M: OverridableTypeMap 1970 | > = OverridableComponent<{ 1971 | props: ButtonBaseOwnProps & $ElementType, 1972 | defaultComponent: $ElementType, 1973 | classKey: $ElementType, 1974 | }>; 1975 | 1976 | declare type ButtonBase = OverridableComponent<{ 1977 | props: ButtonBaseOwnProps, 1978 | defaultComponent: 'button', 1979 | classKey: ButtonBaseClassKey, 1980 | }>; 1981 | 1982 | declare export type ButtonBaseProps = ButtonBaseOwnProps; 1983 | 1984 | declare export default ButtonBase; 1985 | } 1986 | declare module '@material-ui/core/ButtonBase/ButtonBase' { 1987 | declare export * from '@material-ui/core/ButtonBase' 1988 | } 1989 | 1990 | declare module '@material-ui/core/Button' { 1991 | import type { OverrideProps } from '@material-ui/core/OverridableComponent'; 1992 | import type { 1993 | ButtonBaseOwnProps, 1994 | ExtendButtonBase, 1995 | } from '@material-ui/core/ButtonBase'; 1996 | import type { PropTypes$Color } from '@material-ui/core/flow-types'; 1997 | 1998 | declare export type ButtonClassKey = 1999 | | 'root' 2000 | | 'label' 2001 | | 'text' 2002 | | 'textPrimary' 2003 | | 'textSecondary' 2004 | | 'outlined' 2005 | | 'outlinedPrimary' 2006 | | 'outlinedSecondary' 2007 | | 'contained' 2008 | | 'containedPrimary' 2009 | | 'containedSecondary' 2010 | | 'focusVisible' 2011 | | 'disabled' 2012 | | 'colorInherit' 2013 | | 'sizeSmall' 2014 | | 'sizeLarge' 2015 | | 'fullWidth'; 2016 | 2017 | declare type OwnProps = { 2018 | color?: PropTypes$Color, 2019 | fullWidth?: boolean, 2020 | // TODO: `ButtonBaseOwnProps` already include `href` attribute, but as hack 2021 | // href?: string, 2022 | size?: 'small' | 'medium' | 'large', 2023 | variant?: 'text' | 'outlined' | 'contained', 2024 | }; 2025 | 2026 | declare export type ButtonProps< 2027 | DefaultComponent: React$ElementType, 2028 | Props: {} 2029 | > = OverrideProps< 2030 | { 2031 | props: Props & OwnProps & ButtonBaseOwnProps, 2032 | defaultComponent: DefaultComponent, 2033 | classKey: ButtonClassKey, 2034 | }, 2035 | DefaultComponent 2036 | >; 2037 | 2038 | declare export default ExtendButtonBase<{ 2039 | props: OwnProps, 2040 | defaultComponent: 'button', 2041 | classKey: ButtonClassKey, 2042 | }>; 2043 | } 2044 | declare module '@material-ui/core/Button/Button' { 2045 | declare export * from '@material-ui/core/Button' 2046 | } 2047 | 2048 | declare module '@material-ui/core/BottomNavigationAction' { 2049 | import type { StandardProps } from '@material-ui/core/flow-types'; 2050 | import type { ButtonBaseProps } from '@material-ui/core/ButtonBase'; 2051 | 2052 | declare export type BottomNavigationActionClassKey = 2053 | | 'root' 2054 | | 'selected' 2055 | | 'iconOnly' 2056 | | 'wrapper' 2057 | | 'label'; 2058 | 2059 | declare export type BottomNavigationActionProps = StandardProps< 2060 | BottomNavigationActionClassKey, 2061 | { 2062 | icon?: string | React$Element, 2063 | label?: React$Node, 2064 | onChange?: (event: {}, value: mixed) => mixed, 2065 | onClick?: ({}) => mixed, 2066 | selected?: boolean, 2067 | showLabel?: boolean, 2068 | value?: mixed, 2069 | }, 2070 | ButtonBaseProps, 2071 | { onChange: any } 2072 | >; 2073 | 2074 | declare export default React$ComponentType; 2075 | } 2076 | declare module '@material-ui/core/BottomNavigationAction/BottomNavigationAction' { 2077 | declare export * from '@material-ui/core/BottomNavigationAction' 2078 | } 2079 | 2080 | declare module '@material-ui/core/CardActionArea' { 2081 | import type { StandardProps } from '@material-ui/core/flow-types'; 2082 | import type { ButtonBaseProps } from '@material-ui/core/ButtonBase'; 2083 | 2084 | declare export type CardActionAreaClassKey = 2085 | | 'root' 2086 | | 'focusVisible' 2087 | | 'focusHighlight'; 2088 | 2089 | declare export type CardActionAreaProps = StandardProps< 2090 | CardActionAreaClassKey, 2091 | { 2092 | focusVisibleClassName?: string, 2093 | }, 2094 | ButtonBaseProps, 2095 | void 2096 | >; 2097 | 2098 | declare export default React$ComponentType; 2099 | } 2100 | declare module '@material-ui/core/CardActionArea/CardActionArea' { 2101 | declare export * from '@material-ui/core/CardActionArea' 2102 | } 2103 | 2104 | declare module '@material-ui/core/Typography' { 2105 | import type { 2106 | StandardProps, 2107 | PropTypes$Alignment, 2108 | } from '@material-ui/core/flow-types'; 2109 | import type { HTMLElementAttributes } from '@material-ui/core/@@dom'; 2110 | import type { ThemeStyle } from '@material-ui/core/styles/createTypography'; 2111 | 2112 | declare export type TypographyClassKey = 2113 | | 'root' 2114 | | 'h1' 2115 | | 'h2' 2116 | | 'h3' 2117 | | 'h4' 2118 | | 'h5' 2119 | | 'h6' 2120 | | 'subtitle1' 2121 | | 'subtitle2' 2122 | | 'body1' 2123 | | 'body2' 2124 | | 'caption' 2125 | | 'button' 2126 | | 'overline' 2127 | | 'srOnly' 2128 | | 'alignLeft' 2129 | | 'alignCenter' 2130 | | 'alignRight' 2131 | | 'alignJustify' 2132 | | 'noWrap' 2133 | | 'gutterBottom' 2134 | | 'paragraph' 2135 | | 'colorInherit' 2136 | | 'colorSecondary' 2137 | | 'colorTextSecondary' 2138 | | 'colorError' 2139 | | 'displayInline' 2140 | | 'displayBlock'; 2141 | 2142 | declare export type TypographyStyle = ThemeStyle | 'srOnly'; 2143 | 2144 | declare export type TypographyProps = StandardProps< 2145 | TypographyClassKey, 2146 | { 2147 | align?: PropTypes$Alignment, 2148 | color?: 2149 | | 'initial' 2150 | | 'inherit' 2151 | | 'primary' 2152 | | 'secondary' 2153 | | 'textPrimary' 2154 | | 'textSecondary' 2155 | | 'error', 2156 | component?: React$ElementType, 2157 | display?: 'initial' | 'block' | 'inline', 2158 | gutterBottom?: boolean, 2159 | noWrap?: boolean, 2160 | paragraph?: boolean, 2161 | variant?: TypographyStyle | 'inherit', 2162 | variantMapping?: { [TypographyStyle]: string }, 2163 | }, 2164 | HTMLElementAttributes, 2165 | void 2166 | >; 2167 | 2168 | declare export default React$ComponentType; 2169 | } 2170 | declare module '@material-ui/core/Typography/Typography' { 2171 | declare export * from '@material-ui/core/Typography' 2172 | } 2173 | 2174 | declare module '@material-ui/core/CardHeader' { 2175 | import type { StandardProps } from '@material-ui/core/flow-types'; 2176 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 2177 | import type { TypographyProps } from '@material-ui/core/Typography'; 2178 | 2179 | declare export type CardHeaderClassKey = 2180 | | 'root' 2181 | | 'avatar' 2182 | | 'action' 2183 | | 'content' 2184 | | 'title' 2185 | | 'subheader'; 2186 | 2187 | declare export type CardHeaderProps = StandardProps< 2188 | CardHeaderClassKey, 2189 | { 2190 | action?: React$Node, 2191 | avatar?: React$Node, 2192 | component?: React$ElementType, 2193 | disableTypography?: boolean, 2194 | subheader?: React$Node, 2195 | subheaderTypographyProps?: $Shape, 2196 | title?: React$Node, 2197 | titleTypographyProps?: $Shape, 2198 | }, 2199 | HTMLDivAttributes, 2200 | { title: any } 2201 | >; 2202 | 2203 | declare export default React$ComponentType; 2204 | } 2205 | declare module '@material-ui/core/CardHeader/CardHeader' { 2206 | declare export * from '@material-ui/core/CardHeader' 2207 | } 2208 | 2209 | declare module '@material-ui/core/CardMedia' { 2210 | import type { 2211 | OverridableComponent, 2212 | SimplifiedPropsOf, 2213 | } from '@material-ui/core/OverridableComponent'; 2214 | 2215 | declare export type CardMediaClassKey = 'root' | 'media'; 2216 | 2217 | declare type CardMedia = OverridableComponent<{ 2218 | props: { 2219 | image?: string, 2220 | src?: string, 2221 | }, 2222 | defaultComponent: 'div', 2223 | classKey: CardMediaClassKey, 2224 | }>; 2225 | 2226 | declare export type CardMediaProps = SimplifiedPropsOf; 2227 | 2228 | declare export default CardMedia; 2229 | } 2230 | declare module '@material-ui/core/CardMedia/CardMedia' { 2231 | declare export * from '@material-ui/core/CardMedia' 2232 | } 2233 | 2234 | declare module '@material-ui/core/Chip' { 2235 | import type { PropTypes$Color } from '@material-ui/core/flow-types'; 2236 | import type { 2237 | OverridableComponent, 2238 | SimplifiedPropsOf, 2239 | } from '@material-ui/core/OverridableComponent'; 2240 | 2241 | declare export type ChipClassKey = 2242 | | 'root' 2243 | | 'colorPrimary' 2244 | | 'colorSecondary' 2245 | | 'clickable' 2246 | | 'clickableColorPrimary' 2247 | | 'clickableColorSecondary' 2248 | | 'deletable' 2249 | | 'deletableColorPrimary' 2250 | | 'deletableColorSecondary' 2251 | | 'outlined' 2252 | | 'outlinedPrimary' 2253 | | 'outlinedSecondary' 2254 | | 'avatar' 2255 | | 'avatarColorPrimary' 2256 | | 'avatarColorSecondary' 2257 | | 'avatarChildren' 2258 | | 'icon' 2259 | | 'iconColorPrimary' 2260 | | 'iconColorSecondary' 2261 | | 'label' 2262 | | 'deleteIcon' 2263 | | 'deleteIconColorPrimary' 2264 | | 'deleteIconColorSecondary' 2265 | | 'deleteIconOutlinedColorPrimary' 2266 | | 'deleteIconOutlinedColorSecondary'; 2267 | 2268 | declare type Chip = OverridableComponent<{ 2269 | props: { 2270 | avatar?: React$Element, 2271 | clickable?: boolean, 2272 | color?: PropTypes$Color, 2273 | deleteIcon?: React$Element, 2274 | icon?: React$Element, 2275 | label?: React$Node, 2276 | onDelete?: mixed => mixed, 2277 | variant?: 'default' | 'outlined', 2278 | }, 2279 | defaultComponent: 'div', 2280 | classKey: ChipClassKey, 2281 | }>; 2282 | 2283 | declare export type ChipProps = SimplifiedPropsOf; 2284 | 2285 | declare export default Chip; 2286 | } 2287 | declare module '@material-ui/core/Chip/Chip' { 2288 | declare export * from '@material-ui/core/Chip' 2289 | } 2290 | 2291 | declare module '@material-ui/core/Collapse' { 2292 | import type { StandardProps } from '@material-ui/core/flow-types'; 2293 | import type { Theme } from '@material-ui/core/styles/createMuiTheme'; 2294 | import type { TransitionProps } from '@material-ui/core/transitions/transition'; 2295 | 2296 | declare export type CollapseClassKey = 2297 | | 'container' 2298 | | 'entered' 2299 | | 'wrapper' 2300 | | 'wrapperInner'; 2301 | 2302 | declare export type CollapseProps = StandardProps< 2303 | CollapseClassKey, 2304 | { 2305 | children?: React$Node, 2306 | component?: React$ElementType, 2307 | collapsedHeight?: string, 2308 | theme?: Theme, 2309 | timeout?: $ElementType | 'auto', 2310 | }, 2311 | TransitionProps, 2312 | { timeout: any } 2313 | >; 2314 | 2315 | declare export default React$ComponentType; 2316 | } 2317 | declare module '@material-ui/core/Collapse/Collapse' { 2318 | declare export * from '@material-ui/core/Collapse' 2319 | } 2320 | 2321 | declare module '@material-ui/core/Portal' { 2322 | declare export type PortalProps = {| 2323 | children: React$Element, 2324 | container?: React$ElementRef | null, 2325 | disablePortal?: boolean, 2326 | onRendered?: () => mixed, 2327 | |}; 2328 | 2329 | declare export default class Portal< 2330 | Container: React$ElementType 2331 | > extends React$Component> {} 2332 | } 2333 | declare module '@material-ui/core/Portal/Portal' { 2334 | declare export * from '@material-ui/core/Portal' 2335 | } 2336 | 2337 | declare module '@material-ui/core/Modal' { 2338 | import type { StandardProps } from '@material-ui/core/flow-types'; 2339 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 2340 | import type { BackdropProps } from '@material-ui/core/Backdrop'; 2341 | import type { PortalProps } from '@material-ui/core/Portal'; 2342 | 2343 | declare export type ModalClassKey = 'root' | 'hidden'; 2344 | 2345 | declare export type ModalProps = StandardProps< 2346 | ModalClassKey, 2347 | { 2348 | children: React$Element, 2349 | open: boolean, 2350 | 2351 | BackdropComponent?: React$ElementType, 2352 | BackdropProps?: $Shape, 2353 | closeAfterTransition?: boolean, 2354 | 2355 | // Copied from: container?: $ElementType, 'container'>, 2356 | container?: React$ElementRef | null, 2357 | disableAutoFocus?: boolean, 2358 | disableBackdropClick?: boolean, 2359 | disableEnforceFocus?: boolean, 2360 | disableEscapeKeyDown?: boolean, 2361 | disablePortal?: $ElementType, 'disablePortal'>, 2362 | disableRestoreFocus?: boolean, 2363 | hideBackdrop?: boolean, 2364 | keepMounted?: boolean, 2365 | onBackdropClick?: () => mixed, 2366 | onClose?: (event: {}, reason: 'backdropClick' | 'escapeKeyDown') => mixed, 2367 | onEscapeKeyDown?: () => mixed, 2368 | onRendered?: $ElementType, 'onRendered'>, 2369 | }, 2370 | HTMLDivAttributes, 2371 | { children: any } 2372 | >; 2373 | 2374 | declare export default class Modal< 2375 | Container: React$ElementType 2376 | > extends React$Component> {} 2377 | } 2378 | declare module '@material-ui/core/Modal/Modal' { 2379 | declare export * from '@material-ui/core/Modal' 2380 | } 2381 | 2382 | declare module '@material-ui/core/Dialog' { 2383 | import type { StandardProps } from '@material-ui/core/flow-types'; 2384 | import type { ModalProps } from '@material-ui/core/Modal'; 2385 | import type { PaperProps } from '@material-ui/core/Paper'; 2386 | import type { 2387 | TransitionHandlerProps, 2388 | TransitionProps, 2389 | } from '@material-ui/core/transitions/transition'; 2390 | 2391 | declare export type DialogClassKey = 2392 | | 'root' 2393 | | 'scrollPaper' 2394 | | 'scrollBody' 2395 | | 'container' 2396 | | 'paper' 2397 | | 'paperScrollPaper' 2398 | | 'paperScrollBody' 2399 | | 'paperWidthFalse' 2400 | | 'paperWidthXs' 2401 | | 'paperWidthSm' 2402 | | 'paperWidthMd' 2403 | | 'paperWidthLg' 2404 | | 'paperWidthXl' 2405 | | 'paperFullWidth' 2406 | | 'paperFullScreen'; 2407 | 2408 | declare export type DialogProps = StandardProps< 2409 | DialogClassKey, 2410 | { 2411 | children: React$Node, 2412 | fullScreen?: boolean, 2413 | fullWidth?: boolean, 2414 | maxWidth?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | false, 2415 | PaperComponent?: React$ElementType, 2416 | PaperProps?: $Shape, 2417 | scroll?: 'body' | 'paper', 2418 | TransitionComponent?: React$ElementType, 2419 | transitionDuration?: $ElementType, 2420 | TransitionProps?: TransitionProps, 2421 | }, 2422 | ModalProps & $Shape, 2423 | { children: any } 2424 | >; 2425 | 2426 | declare export default class Dialog< 2427 | Container: React$ElementType 2428 | > extends React$Component> {} 2429 | } 2430 | declare module '@material-ui/core/Dialog/Dialog' { 2431 | declare export * from '@material-ui/core/Dialog' 2432 | } 2433 | 2434 | declare module '@material-ui/core/DialogContentText' { 2435 | import type { StandardProps } from '@material-ui/core/flow-types'; 2436 | import type { TypographyProps } from '@material-ui/core/Typography'; 2437 | 2438 | declare export type DialogContentTextClassKey = 'root'; 2439 | declare export type DialogContentTextProps = StandardProps< 2440 | DialogContentTextClassKey, 2441 | {}, 2442 | TypographyProps, 2443 | void 2444 | >; 2445 | declare export default React$ComponentType; 2446 | } 2447 | declare module '@material-ui/core/DialogContentText/DialogContentText' { 2448 | declare export * from '@material-ui/core/DialogContentText' 2449 | } 2450 | 2451 | declare module '@material-ui/core/Divider' { 2452 | import type { 2453 | OverridableComponent, 2454 | SimplifiedPropsOf, 2455 | } from '@material-ui/core/OverridableComponent'; 2456 | 2457 | declare export type DividerClassKey = 2458 | | 'root' 2459 | | 'absolute' 2460 | | 'inset' 2461 | | 'light' 2462 | | 'middle'; 2463 | 2464 | declare type Divider = OverridableComponent<{ 2465 | props: { 2466 | absolute?: boolean, 2467 | light?: boolean, 2468 | variant?: 'fullWidth' | 'inset' | 'middle', 2469 | }, 2470 | defaultComponent: 'hr', 2471 | classKey: DividerClassKey, 2472 | }>; 2473 | 2474 | declare export type DividerProps = SimplifiedPropsOf; 2475 | 2476 | declare export default Divider; 2477 | } 2478 | declare module '@material-ui/core/Divider/Divider' { 2479 | declare export * from '@material-ui/core/Divider' 2480 | } 2481 | 2482 | declare module '@material-ui/core/Slide' { 2483 | import type { Theme } from '@material-ui/core/styles/createMuiTheme'; 2484 | import type { TransitionProps } from '@material-ui/core/transitions/transition'; 2485 | 2486 | declare export type SlideProps = TransitionProps & { 2487 | direction: 'left' | 'right' | 'up' | 'down', 2488 | ref?: React$Ref, 2489 | theme?: Theme, 2490 | }; 2491 | 2492 | declare export default React$ComponentType; 2493 | } 2494 | declare module '@material-ui/core/Slide/Slide' { 2495 | declare export * from '@material-ui/core/Slide' 2496 | } 2497 | 2498 | declare module '@material-ui/core/Drawer' { 2499 | import type { StandardProps } from '@material-ui/core/flow-types'; 2500 | import type { ModalProps } from '@material-ui/core/Modal'; 2501 | import type { SlideProps } from '@material-ui/core/Slide'; 2502 | import type { PaperProps } from '@material-ui/core/Paper'; 2503 | import type { Theme } from '@material-ui/core/styles/createMuiTheme'; 2504 | import type { 2505 | TransitionHandlerProps, 2506 | TransitionProps, 2507 | } from '@material-ui/core/transitions/transition'; 2508 | 2509 | declare export type DrawerClassKey = 2510 | | 'root' 2511 | | 'docked' 2512 | | 'paper' 2513 | | 'paperAnchorLeft' 2514 | | 'paperAnchorRight' 2515 | | 'paperAnchorTop' 2516 | | 'paperAnchorBottom' 2517 | | 'paperAnchorDockedLeft' 2518 | | 'paperAnchorDockedTop' 2519 | | 'paperAnchorDockedRight' 2520 | | 'paperAnchorDockedBottom' 2521 | | 'modal'; 2522 | declare export type DrawerProps = StandardProps< 2523 | DrawerClassKey, 2524 | { 2525 | anchor?: 'left' | 'top' | 'right' | 'bottom', 2526 | children?: React$Node, 2527 | elevation?: number, 2528 | ModalProps?: $Shape>, 2529 | open?: boolean, 2530 | PaperProps?: $Shape, 2531 | SlideProps?: $Shape, 2532 | theme?: Theme, 2533 | transitionDuration?: $ElementType, 2534 | variant?: 'permanent' | 'persistent' | 'temporary', 2535 | }, 2536 | ModalProps & $Shape, 2537 | { 2538 | open: any, 2539 | children: any, 2540 | } 2541 | >; 2542 | declare export default class Modal< 2543 | Container: React$ElementType 2544 | > extends React$Component> {} 2545 | } 2546 | declare module '@material-ui/core/Drawer/Drawer' { 2547 | declare export * from '@material-ui/core/Drawer' 2548 | } 2549 | 2550 | declare module '@material-ui/core/ExpansionPanel' { 2551 | import type { StandardProps } from '@material-ui/core/flow-types'; 2552 | import type { PaperProps } from '@material-ui/core/Paper'; 2553 | import type { TransitionProps } from '@material-ui/core/transitions/transition'; 2554 | 2555 | declare export type ExpansionPanelClassKey = 2556 | | 'root' 2557 | | 'rounded' 2558 | | 'expanded' 2559 | | 'disabled'; 2560 | 2561 | declare export type ExpansionPanelProps = StandardProps< 2562 | ExpansionPanelClassKey, 2563 | { 2564 | defaultExpanded?: boolean, 2565 | disabled?: boolean, 2566 | expanded?: boolean, 2567 | onChange?: (event: {}, expanded: boolean) => mixed, 2568 | TransitionComponent?: React$ElementType, 2569 | TransitionProps?: TransitionProps, 2570 | }, 2571 | PaperProps, 2572 | { onChange: any } 2573 | >; 2574 | 2575 | declare export default React$ComponentType; 2576 | } 2577 | declare module '@material-ui/core/ExpansionPanel/ExpansionPanel' { 2578 | declare export * from '@material-ui/core/ExpansionPanel' 2579 | } 2580 | 2581 | declare module '@material-ui/core/Grid' { 2582 | import type { StandardProps } from '@material-ui/core/flow-types'; 2583 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 2584 | 2585 | declare export type GridItemsAlignment = 2586 | | 'flex-start' 2587 | | 'center' 2588 | | 'flex-end' 2589 | | 'stretch' 2590 | | 'baseline'; 2591 | 2592 | declare export type GridContentAlignment = 2593 | | 'stretch' 2594 | | 'center' 2595 | | 'flex-start' 2596 | | 'flex-end' 2597 | | 'space-between' 2598 | | 'space-around'; 2599 | 2600 | declare export type GridDirection = 2601 | | 'row' 2602 | | 'row-reverse' 2603 | | 'column' 2604 | | 'column-reverse'; 2605 | 2606 | declare export type GridSpacing = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; 2607 | 2608 | declare export type GridJustification = 2609 | | 'flex-start' 2610 | | 'center' 2611 | | 'flex-end' 2612 | | 'space-between' 2613 | | 'space-around' 2614 | | 'space-evenly'; 2615 | 2616 | declare export type GridWrap = 'nowrap' | 'wrap' | 'wrap-reverse'; 2617 | 2618 | declare export type GridSize = 2619 | | 'auto' 2620 | | 1 2621 | | 2 2622 | | 3 2623 | | 4 2624 | | 5 2625 | | 6 2626 | | 7 2627 | | 8 2628 | | 9 2629 | | 10 2630 | | 11 2631 | | 12; 2632 | 2633 | declare export type GridClassKey = 2634 | | 'container' 2635 | | 'item' 2636 | | 'direction-xs-column' 2637 | | 'direction-xs-column-reverse' 2638 | | 'direction-xs-row-reverse' 2639 | | 'wrap-xs-nowrap' 2640 | | 'wrap-xs-wrap-reverse' 2641 | | 'align-items-xs-center' 2642 | | 'align-items-xs-flex-start' 2643 | | 'align-items-xs-flex-end' 2644 | | 'align-items-xs-baseline' 2645 | | 'align-content-xs-center' 2646 | | 'align-content-xs-flex-start' 2647 | | 'align-content-xs-flex-end' 2648 | | 'align-content-xs-space-between' 2649 | | 'align-content-xs-space-around' 2650 | | 'justify-xs-center' 2651 | | 'justify-xs-flex-end' 2652 | | 'justify-xs-space-between' 2653 | | 'justify-xs-space-around' 2654 | | 'spacing-xs-1' 2655 | | 'spacing-xs-2' 2656 | | 'spacing-xs-3' 2657 | | 'spacing-xs-4' 2658 | | 'spacing-xs-5' 2659 | | 'spacing-xs-6' 2660 | | 'spacing-xs-7' 2661 | | 'spacing-xs-8' 2662 | | 'spacing-xs-9' 2663 | | 'spacing-xs-10' 2664 | | 'grid-xs-auto' 2665 | | 'grid-xs-true' 2666 | | 'grid-xs-1' 2667 | | 'grid-xs-2' 2668 | | 'grid-xs-3' 2669 | | 'grid-xs-4' 2670 | | 'grid-xs-5' 2671 | | 'grid-xs-6' 2672 | | 'grid-xs-7' 2673 | | 'grid-xs-8' 2674 | | 'grid-xs-9' 2675 | | 'grid-xs-10' 2676 | | 'grid-xs-11' 2677 | | 'grid-xs-12'; 2678 | 2679 | declare type BreakpointProps = { 2680 | xs?: boolean | GridSize, 2681 | sm?: boolean | GridSize, 2682 | md?: boolean | GridSize, 2683 | lg?: boolean | GridSize, 2684 | xl?: boolean | GridSize, 2685 | }; 2686 | 2687 | declare export type GridProps = StandardProps< 2688 | GridClassKey, 2689 | { 2690 | alignContent?: GridContentAlignment, 2691 | alignItems?: GridItemsAlignment, 2692 | component?: React$ElementType, 2693 | container?: boolean, 2694 | direction?: GridDirection, 2695 | item?: boolean, 2696 | justify?: GridJustification, 2697 | spacing?: GridSpacing, 2698 | wrap?: GridWrap, 2699 | zeroMinWidth?: boolean, 2700 | }, 2701 | BreakpointProps & HTMLDivAttributes, 2702 | void 2703 | >; 2704 | 2705 | declare export default React$ComponentType; 2706 | } 2707 | declare module '@material-ui/core/Grid/Grid' { 2708 | declare export * from '@material-ui/core/Grid' 2709 | } 2710 | 2711 | declare module '@material-ui/core/GridList' { 2712 | import type { StandardProps } from '@material-ui/core/flow-types'; 2713 | import type { HTMLUListAttributes } from '@material-ui/core/@@dom'; 2714 | 2715 | declare export type GridListClassKey = 'root'; 2716 | 2717 | declare export type GridListProps = StandardProps< 2718 | GridListClassKey, 2719 | { 2720 | component?: React$ElementType, 2721 | cellHeight?: number | 'auto', 2722 | cols?: number, 2723 | spacing?: number, 2724 | }, 2725 | HTMLUListAttributes, 2726 | void 2727 | >; 2728 | 2729 | declare export default React$ComponentType; 2730 | } 2731 | declare module '@material-ui/core/GridList/GridList' { 2732 | declare export * from '@material-ui/core/GridList' 2733 | } 2734 | 2735 | declare module '@material-ui/core/GridListTile' { 2736 | import type { StandardProps } from '@material-ui/core/flow-types'; 2737 | import type { HTMLLIAttributes } from '@material-ui/core/@@dom'; 2738 | 2739 | declare export type GridListTileClassKey = 2740 | | 'root' 2741 | | 'tile' 2742 | | 'imgFullHeight' 2743 | | 'imgFullWidth'; 2744 | 2745 | declare export type GridListTileProps = StandardProps< 2746 | GridListTileClassKey, 2747 | { 2748 | component?: React$ElementType, 2749 | cols?: number, 2750 | rows?: number, 2751 | }, 2752 | HTMLLIAttributes, 2753 | void 2754 | >; 2755 | 2756 | declare export default React$ComponentType; 2757 | } 2758 | declare module '@material-ui/core/GridListTile/GridListTile' { 2759 | declare export * from '@material-ui/core/GridListTile' 2760 | } 2761 | 2762 | declare module '@material-ui/core/GridListTileBar' { 2763 | import type { StandardProps } from '@material-ui/core/flow-types'; 2764 | 2765 | declare export type GridListTileBarClassKey = 2766 | | 'root' 2767 | | 'titlePositionBottom' 2768 | | 'titlePositionTop' 2769 | | 'rootSubtitle' 2770 | | 'titleWrap' 2771 | | 'titleWrapActionPosLeft' 2772 | | 'titleWrapActionPosRight' 2773 | | 'title' 2774 | | 'subtitle' 2775 | | 'actionIcon' 2776 | | 'actionIconActionPosLeft'; 2777 | 2778 | declare export type GridListTileBarProps = StandardProps< 2779 | GridListTileBarClassKey, 2780 | { 2781 | actionIcon?: React$Node, 2782 | subtitle?: React$Node, 2783 | title?: React$Node, 2784 | actionPosition?: 'left' | 'right', 2785 | titlePosition?: 'top' | 'bottom', 2786 | }, 2787 | {}, 2788 | void 2789 | >; 2790 | 2791 | declare export default React$ComponentType; 2792 | } 2793 | declare module '@material-ui/core/GridListTileBar/GridListTileBar' { 2794 | declare export * from '@material-ui/core/GridListTileBar' 2795 | } 2796 | 2797 | declare module '@material-ui/core/Grow' { 2798 | import type { Theme } from '@material-ui/core/styles/createMuiTheme'; 2799 | import type { TransitionProps } from '@material-ui/core/transitions/transition'; 2800 | 2801 | declare export type GrowProps = { 2802 | ref?: React$Ref, 2803 | theme?: Theme, 2804 | timeout?: $ElementType | 'auto', 2805 | } & $Diff; 2806 | 2807 | declare export default React$ComponentType; 2808 | } 2809 | declare module '@material-ui/core/Grow/Grow' { 2810 | declare export * from '@material-ui/core/Grow' 2811 | } 2812 | 2813 | declare module '@material-ui/core/Hidden' { 2814 | import type { Breakpoint } from '@material-ui/core/styles/createBreakpoints'; 2815 | 2816 | declare export type HiddenProps = {| 2817 | implementation?: 'js' | 'css', 2818 | initialWidth?: Breakpoint, 2819 | only?: Breakpoint | Array, 2820 | lgDown?: boolean, 2821 | lgUp?: boolean, 2822 | mdDown?: boolean, 2823 | mdUp?: boolean, 2824 | smDown?: boolean, 2825 | smUp?: boolean, 2826 | xlDown?: boolean, 2827 | xlUp?: boolean, 2828 | xsDown?: boolean, 2829 | xsUp?: boolean, 2830 | |}; 2831 | 2832 | declare export default React$ComponentType; 2833 | } 2834 | declare module '@material-ui/core/Hidden/Hidden' { 2835 | declare export * from '@material-ui/core/Hidden' 2836 | } 2837 | 2838 | declare module '@material-ui/core/NoSsr' { 2839 | declare export type NoSsrProps = {| 2840 | defer?: boolean, 2841 | fallback?: React$Node, 2842 | children: React$Node, 2843 | |}; 2844 | 2845 | declare export default React$ComponentType; 2846 | } 2847 | declare module '@material-ui/core/NoSsr/NoSsr' { 2848 | declare export * from '@material-ui/core/NoSsr' 2849 | } 2850 | 2851 | declare module '@material-ui/core/InputBase' { 2852 | import type { StandardProps } from '@material-ui/core/flow-types'; 2853 | import type { HTMLUListAttributes } from '@material-ui/core/@@dom'; 2854 | 2855 | declare export type InputBaseClassKey = 2856 | | 'root' 2857 | | 'formControl' 2858 | | 'focused' 2859 | | 'disabled' 2860 | | 'adornedEnd' 2861 | | 'adornedStart' 2862 | | 'error' 2863 | | 'marginDense' 2864 | | 'multiline' 2865 | | 'fullWidth' 2866 | | 'input' 2867 | | 'inputMarginDense' 2868 | | 'inputMultiline' 2869 | | 'inputTypeSearch' 2870 | | 'inputAdornedStart' 2871 | | 'inputAdornedEnd'; 2872 | 2873 | declare export type InputBaseComponentProps = {}; 2874 | declare export type InputBaseProps = StandardProps< 2875 | InputBaseClassKey, 2876 | { 2877 | autoComplete?: string, 2878 | autoFocus?: boolean, 2879 | defaultValue?: mixed, 2880 | disabled?: boolean, 2881 | endAdornment?: React$Node, 2882 | error?: boolean, 2883 | fullWidth?: boolean, 2884 | id?: string, 2885 | inputComponent?: React$ElementType, 2886 | inputProps?: InputBaseComponentProps, 2887 | inputRef?: React$Ref, 2888 | margin?: 'dense' | 'none', 2889 | multiline?: boolean, 2890 | name?: string, 2891 | placeholder?: string, 2892 | readOnly?: boolean, 2893 | required?: boolean, 2894 | renderPrefix?: (state: {| 2895 | disabled?: boolean, 2896 | error?: boolean, 2897 | filled?: boolean, 2898 | focused?: boolean, 2899 | margin?: 'dense' | 'none' | 'normal', 2900 | required?: boolean, 2901 | startAdornment?: React$Node, 2902 | |}) => React$Node, 2903 | rows?: string | number, 2904 | rowsMax?: string | number, 2905 | startAdornment?: React$Node, 2906 | type?: string, 2907 | value?: mixed, 2908 | onFilled?: () => mixed, 2909 | }, 2910 | HTMLUListAttributes, 2911 | void 2912 | >; 2913 | 2914 | declare export default React$ComponentType; 2915 | } 2916 | declare module '@material-ui/core/InputBase/InputBase' { 2917 | declare export * from '@material-ui/core/InputBase' 2918 | } 2919 | 2920 | declare module '@material-ui/core/Input' { 2921 | import type { StandardProps } from '@material-ui/core/flow-types'; 2922 | import type { InputBaseProps } from '@material-ui/core/InputBase'; 2923 | 2924 | declare export type InputClassKey = 2925 | | 'root' 2926 | | 'formControl' 2927 | | 'focused' 2928 | | 'disabled' 2929 | | 'underline' 2930 | | 'error' 2931 | | 'multiline' 2932 | | 'fullWidth' 2933 | | 'input' 2934 | | 'inputMarginDense' 2935 | | 'inputMultiline' 2936 | | 'inputTypeSearch'; 2937 | 2938 | declare export type InputProps = StandardProps< 2939 | InputClassKey, 2940 | { 2941 | disableUnderline?: boolean, 2942 | }, 2943 | InputBaseProps, 2944 | void 2945 | >; 2946 | 2947 | declare export default React$ComponentType; 2948 | } 2949 | declare module '@material-ui/core/Input/Input' { 2950 | declare export * from '@material-ui/core/Input' 2951 | } 2952 | 2953 | declare module '@material-ui/core/NativeSelect' { 2954 | import type { StandardProps } from '@material-ui/core/flow-types'; 2955 | import type { InputProps } from '@material-ui/core/Input'; 2956 | 2957 | declare export type NativeSelectClassKey = 2958 | | 'root' 2959 | | 'select' 2960 | | 'selectMenu' 2961 | | 'disabled' 2962 | | 'icon' 2963 | | 'filled' 2964 | | 'outlined'; 2965 | 2966 | declare type _InputProps = $Diff< 2967 | InputProps, 2968 | { 2969 | value: any, 2970 | onChange: any, 2971 | } 2972 | >; 2973 | 2974 | declare export type NativeSelectProps = StandardProps< 2975 | NativeSelectClassKey, 2976 | { 2977 | variant?: 'standard' | 'outlined' | 'filled', 2978 | IconComponent?: React$ElementType, 2979 | input?: React$Node, 2980 | value?: mixed, 2981 | onChange?: (event: {}, child: React$Node) => mixed, 2982 | }, 2983 | _InputProps, 2984 | void 2985 | >; 2986 | 2987 | declare export default React$ComponentType; 2988 | } 2989 | declare module '@material-ui/core/NativeSelect/NativeSelect' { 2990 | declare export * from '@material-ui/core/NativeSelect' 2991 | } 2992 | 2993 | declare module '@material-ui/core/Icon' { 2994 | import type { StandardProps } from '@material-ui/core/flow-types'; 2995 | import type { PropTypes$Color } from '@material-ui/core/flow-types'; 2996 | import type { HTMLSpanAttributes } from '@material-ui/core/@@dom'; 2997 | 2998 | declare export type IconClassKey = 2999 | | 'root' 3000 | | 'colorSecondary' 3001 | | 'colorAction' 3002 | | 'colorDisabled' 3003 | | 'colorError' 3004 | | 'colorPrimary' 3005 | | 'fontSizeInherit' 3006 | | 'fontSizeSmall' 3007 | | 'fontSizeLarge'; 3008 | 3009 | declare export type IconProps = StandardProps< 3010 | IconClassKey, 3011 | { 3012 | component?: React$ElementType, 3013 | fontSize?: 'inherit' | 'default' | 'small' | 'large', 3014 | color?: PropTypes$Color | 'action' | 'disabled' | 'error', 3015 | }, 3016 | HTMLSpanAttributes, 3017 | void 3018 | >; 3019 | 3020 | declare export default React$ComponentType; 3021 | } 3022 | declare module '@material-ui/core/Icon/Icon' { 3023 | declare export * from '@material-ui/core/Icon' 3024 | } 3025 | 3026 | declare module '@material-ui/core/InputAdornment' { 3027 | import type { StandardProps } from '@material-ui/core/flow-types'; 3028 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 3029 | 3030 | declare export type InputAdornmentClassKey = 3031 | | 'root' 3032 | | 'filled' 3033 | | 'positionStart' 3034 | | 'positionEnd' 3035 | | 'disablePointerEvents'; 3036 | 3037 | declare export type InputAdornmentProps = StandardProps< 3038 | InputAdornmentClassKey, 3039 | { 3040 | position: 'start' | 'end', 3041 | variant?: 'standard' | 'outlined' | 'filled', 3042 | disablePointerEvents?: boolean, 3043 | disableTypography?: boolean, 3044 | component?: React$ElementType, 3045 | }, 3046 | HTMLDivAttributes, 3047 | void 3048 | >; 3049 | 3050 | declare export default React$ComponentType; 3051 | } 3052 | declare module '@material-ui/core/InputAdornment/InputAdornment' { 3053 | declare export * from '@material-ui/core/InputAdornment' 3054 | } 3055 | 3056 | declare module '@material-ui/core/FormLabel' { 3057 | import type { HTMLLabelAttributes } from '@material-ui/core/@@dom'; 3058 | import type { 3059 | OverridableComponent, 3060 | SimplifiedPropsOf, 3061 | } from '@material-ui/core/OverridableComponent'; 3062 | 3063 | declare export type FormLabelClassKey = 3064 | | 'root' 3065 | | 'focused' 3066 | | 'disabled' 3067 | | 'error' 3068 | | 'filled' 3069 | | 'required' 3070 | | 'asterisk'; 3071 | 3072 | declare type FormLabel = OverridableComponent<{ 3073 | props: { 3074 | disabled?: boolean, 3075 | error?: boolean, 3076 | filled?: boolean, 3077 | focused?: boolean, 3078 | required?: boolean, 3079 | } & HTMLLabelAttributes, 3080 | defaultComponent: 'label', 3081 | classKey: FormLabelClassKey, 3082 | }>; 3083 | 3084 | declare export type FormLabelProps = SimplifiedPropsOf; 3085 | 3086 | declare export default FormLabel; 3087 | } 3088 | declare module '@material-ui/core/FormLabel/FormLabel' { 3089 | declare export * from '@material-ui/core/FormLabel' 3090 | } 3091 | 3092 | declare module '@material-ui/core/InputLabel' { 3093 | import type { StandardProps } from '@material-ui/core/flow-types'; 3094 | import type { FormLabelProps } from '@material-ui/core/FormLabel'; 3095 | 3096 | declare export type InputLabelClassKey = 3097 | | 'root' 3098 | | 'focused' 3099 | | 'disabled' 3100 | | 'error' 3101 | | 'required' 3102 | | 'asterisk' 3103 | | 'formControl' 3104 | | 'marginDense' 3105 | | 'shrink' 3106 | | 'animated' 3107 | | 'filled' 3108 | | 'outlined'; 3109 | 3110 | declare export type InputLabelProps = StandardProps< 3111 | InputLabelClassKey, 3112 | { 3113 | disableAnimation?: boolean, 3114 | shrink?: boolean, 3115 | variant?: 'standard' | 'outlined' | 'filled', 3116 | }, 3117 | FormLabelProps, 3118 | void 3119 | >; 3120 | 3121 | declare export default React$ComponentType; 3122 | } 3123 | declare module '@material-ui/core/InputLabel/InputLabel' { 3124 | declare export * from '@material-ui/core/InputLabel' 3125 | } 3126 | 3127 | declare module '@material-ui/core/IconButton' { 3128 | import type { SimplifiedPropsOf } from '@material-ui/core/OverridableComponent'; 3129 | import type { ExtendButtonBase } from '@material-ui/core/ButtonBase'; 3130 | import type { PropTypes$Color } from '@material-ui/core/flow-types'; 3131 | 3132 | declare export type IconButtonClassKey = 3133 | | 'root' 3134 | | 'edgeStart' 3135 | | 'edgeEnd' 3136 | | 'colorInherit' 3137 | | 'colorPrimary' 3138 | | 'colorSecondary' 3139 | | 'disabled' 3140 | | 'sizeSmall' 3141 | | 'label'; 3142 | 3143 | declare type IconButton = ExtendButtonBase<{ 3144 | props: { 3145 | color?: PropTypes$Color, 3146 | edge?: 'start' | 'end' | false, 3147 | size?: 'small' | 'medium', 3148 | }, 3149 | defaultComponent: 'button', 3150 | classKey: IconButtonClassKey, 3151 | }>; 3152 | 3153 | declare export type IconButtonProps = SimplifiedPropsOf; 3154 | 3155 | declare export default IconButton; 3156 | } 3157 | declare module '@material-ui/core/IconButton/IconButton' { 3158 | declare export * from '@material-ui/core/IconButton' 3159 | } 3160 | 3161 | declare module '@material-ui/core/internal/SwitchBase' { 3162 | import type { HTMLInputAttributes } from '@material-ui/core/@@dom'; 3163 | import type { StandardProps } from '@material-ui/core/flow-types'; 3164 | import type { IconButtonProps } from '@material-ui/core/IconButton'; 3165 | 3166 | declare export type SwitchBaseClassKey = 3167 | | 'root' 3168 | | 'checked' 3169 | | 'disabled' 3170 | | 'input'; 3171 | 3172 | declare export type SwitchBaseProps = StandardProps< 3173 | SwitchBaseClassKey, 3174 | { 3175 | checkedIcon: React$Node, 3176 | icon: React$Node, 3177 | autoFocus?: boolean, 3178 | checked?: boolean, 3179 | defaultChecked?: boolean, 3180 | disabled?: boolean, 3181 | disableRipple?: boolean, 3182 | inputProps?: HTMLInputAttributes, 3183 | inputRef?: React$Ref, 3184 | name?: string, 3185 | onChange?: (event: {}, checked: boolean) => mixed, 3186 | readOnly?: boolean, 3187 | required?: boolean, 3188 | tabIndex?: number, 3189 | value?: mixed, 3190 | }, 3191 | IconButtonProps, 3192 | { 3193 | onChange: any, 3194 | value: any, 3195 | } 3196 | >; 3197 | 3198 | declare export default React$ComponentType; 3199 | } 3200 | 3201 | declare module '@material-ui/core/Checkbox' { 3202 | import type { StandardProps } from '@material-ui/core/flow-types'; 3203 | import type { 3204 | SwitchBaseProps, 3205 | SwitchBaseClassKey, 3206 | } from '@material-ui/core/internal/SwitchBase'; 3207 | 3208 | declare export type CheckboxClassKey = 3209 | | SwitchBaseClassKey 3210 | | 'indeterminate' 3211 | | 'colorPrimary' 3212 | | 'colorSecondary'; 3213 | 3214 | declare export type CheckboxProps = StandardProps< 3215 | CheckboxClassKey, 3216 | { 3217 | color?: 'primary' | 'secondary' | 'default', 3218 | icon?: React$Node, 3219 | checkedIcon?: React$Node, 3220 | indeterminate?: boolean, 3221 | indeterminateIcon?: React$Node, 3222 | }, 3223 | SwitchBaseProps, 3224 | { 3225 | checkedIcon: any, 3226 | color: any, 3227 | icon: any, 3228 | } 3229 | >; 3230 | 3231 | declare export default React$ComponentType; 3232 | } 3233 | declare module '@material-ui/core/Checkbox/Checkbox' { 3234 | declare export * from '@material-ui/core/Checkbox' 3235 | } 3236 | 3237 | declare module '@material-ui/core/ExpansionPanelSummary' { 3238 | import type { StandardProps } from '@material-ui/core/flow-types'; 3239 | import type { IconButtonProps } from '@material-ui/core/IconButton'; 3240 | import type { ButtonBaseProps } from '@material-ui/core/ButtonBase'; 3241 | 3242 | declare export type ExpansionPanelSummaryClassKey = 3243 | | 'root' 3244 | | 'expanded' 3245 | | 'focused' 3246 | | 'disabled' 3247 | | 'content' 3248 | | 'expandIcon'; 3249 | 3250 | declare export type ExpansionPanelSummaryProps = StandardProps< 3251 | ExpansionPanelSummaryClassKey, 3252 | { 3253 | expanded?: boolean, 3254 | expandIcon?: React$Node, 3255 | IconButtonProps?: { ...IconButtonProps }, 3256 | onChange?: ({}) => mixed, 3257 | }, 3258 | ButtonBaseProps, 3259 | void 3260 | >; 3261 | 3262 | declare export default React$ComponentType; 3263 | } 3264 | declare module '@material-ui/core/ExpansionPanelSummary/ExpansionPanelSummary' { 3265 | declare export * from '@material-ui/core/ExpansionPanelSummary' 3266 | } 3267 | 3268 | declare module '@material-ui/core/Fab' { 3269 | import type { SimplifiedPropsOf } from '@material-ui/core/OverridableComponent'; 3270 | import type { ExtendButtonBase } from '@material-ui/core/ButtonBase'; 3271 | import type { PropTypes$Color } from '@material-ui/core/flow-types'; 3272 | 3273 | declare export type FabClassKey = 3274 | | 'root' 3275 | | 'edgeStart' 3276 | | 'edgeEnd' 3277 | | 'colorInherit' 3278 | | 'colorPrimary' 3279 | | 'colorSecondary' 3280 | | 'disabled' 3281 | | 'sizeSmall' 3282 | | 'label'; 3283 | 3284 | declare type Fab = ExtendButtonBase<{ 3285 | props: { 3286 | color?: PropTypes$Color, 3287 | size?: 'small' | 'medium' | 'large', 3288 | variant?: 'round' | 'extended', 3289 | }, 3290 | defaultComponent: 'button', 3291 | classKey: FabClassKey, 3292 | }>; 3293 | 3294 | declare export type FabProps = SimplifiedPropsOf; 3295 | 3296 | declare export default Fab; 3297 | } 3298 | declare module '@material-ui/core/Fab/Fab' { 3299 | declare export * from '@material-ui/core/Fab' 3300 | } 3301 | 3302 | declare module '@material-ui/core/FilledInput' { 3303 | import type { StandardProps } from '@material-ui/core/flow-types'; 3304 | import type { InputBaseProps } from '@material-ui/core/InputBase'; 3305 | 3306 | declare export type FilledInputClassKey = 3307 | | 'root' 3308 | | 'underline' 3309 | | 'focused' 3310 | | 'disabled' 3311 | | 'adornedStart' 3312 | | 'adornedEnd' 3313 | | 'error' 3314 | | 'multiline' 3315 | | 'input' 3316 | | 'inputMarginDense' 3317 | | 'inputMultiline' 3318 | | 'inputAdornedStart' 3319 | | 'inputAdornedEnd'; 3320 | 3321 | declare export type FilledInputProps = StandardProps< 3322 | FilledInputClassKey, 3323 | { 3324 | disableUnderline?: boolean, 3325 | }, 3326 | InputBaseProps, 3327 | void 3328 | >; 3329 | 3330 | declare export default React$ComponentType; 3331 | } 3332 | declare module '@material-ui/core/FilledInput/FilledInput' { 3333 | declare export * from '@material-ui/core/FilledInput' 3334 | } 3335 | 3336 | declare module '@material-ui/core/FormControl' { 3337 | import type { PropTypes$Margin } from '@material-ui/core/flow-types'; 3338 | import type { 3339 | OverridableComponent, 3340 | SimplifiedPropsOf, 3341 | } from '@material-ui/core/OverridableComponent'; 3342 | 3343 | declare export type FormControlClassKey = 3344 | | 'root' 3345 | | 'marginNormal' 3346 | | 'marginDense' 3347 | | 'fullWidth'; 3348 | 3349 | declare type FormControl = OverridableComponent<{ 3350 | props: { 3351 | disabled?: boolean, 3352 | error?: boolean, 3353 | fullWidth?: boolean, 3354 | margin?: PropTypes$Margin, 3355 | onBlur?: ({}) => mixed, 3356 | onFocus?: ({}) => mixed, 3357 | required?: boolean, 3358 | variant?: 'standard' | 'outlined' | 'filled', 3359 | }, 3360 | defaultComponent: 'div', 3361 | classKey: FormControlClassKey, 3362 | }>; 3363 | 3364 | declare export type FormControlProps = SimplifiedPropsOf; 3365 | 3366 | declare export default FormControl; 3367 | } 3368 | declare module '@material-ui/core/FormControl/FormControl' { 3369 | declare export * from '@material-ui/core/FormControl' 3370 | } 3371 | 3372 | declare module '@material-ui/core/FormControlLabel' { 3373 | import type { StandardProps } from '@material-ui/core/flow-types'; 3374 | import type { HTMLLabelAttributes } from '@material-ui/core/@@dom'; 3375 | 3376 | declare export type FormControlLabelClassKey = 3377 | | 'root' 3378 | | 'start' 3379 | | 'disabled' 3380 | | 'label'; 3381 | 3382 | declare export type FormControlLabelProps = StandardProps< 3383 | FormControlLabelClassKey, 3384 | { 3385 | label: React$Node, 3386 | control: React$Element, 3387 | checked?: boolean, 3388 | disabled?: boolean, 3389 | inputRef?: React$Ref, 3390 | labelPlacement?: 'end' | 'start' | 'top' | 'bottom', 3391 | name?: string, 3392 | onChange?: (event: {}, checked: boolean) => mixed, 3393 | value?: mixed, 3394 | }, 3395 | HTMLLabelAttributes, 3396 | { onChange: any } 3397 | >; 3398 | 3399 | declare export default React$ComponentType; 3400 | } 3401 | declare module '@material-ui/core/FormControlLabel/FormControlLabel' { 3402 | declare export * from '@material-ui/core/FormControlLabel' 3403 | } 3404 | 3405 | declare module '@material-ui/core/FormGroup' { 3406 | import type { StandardProps } from '@material-ui/core/flow-types'; 3407 | import type { HTMLDivAttributes } from '@material-ui/core/@@dom'; 3408 | 3409 | declare export type FormGroupClassKey = 'root' | 'row'; 3410 | 3411 | declare export type FormGroupProps = StandardProps< 3412 | FormGroupClassKey, 3413 | { 3414 | row?: boolean, 3415 | }, 3416 | HTMLDivAttributes, 3417 | void 3418 | >; 3419 | 3420 | declare export default React$ComponentType; 3421 | } 3422 | declare module '@material-ui/core/FormGroup/FormGroup' { 3423 | declare export * from '@material-ui/core/FormGroup' 3424 | } 3425 | 3426 | declare module '@material-ui/core/FormHelperText' { 3427 | import type { StandardProps } from '@material-ui/core/flow-types'; 3428 | import type { HTMLParagraphAttributes } from '@material-ui/core/@@dom'; 3429 | 3430 | declare export type FormHelperTextClassKey = 3431 | | 'root' 3432 | | 'error' 3433 | | 'disabled' 3434 | | 'marginDense' 3435 | | 'focused' 3436 | | 'filled' 3437 | | 'contained' 3438 | | 'required'; 3439 | 3440 | declare export type FormHelperTextProps = StandardProps< 3441 | FormHelperTextClassKey, 3442 | { 3443 | disabled?: boolean, 3444 | error?: boolean, 3445 | filled?: boolean, 3446 | focused?: boolean, 3447 | required?: boolean, 3448 | component?: React$ElementType, 3449 | margin?: 'dense', 3450 | variant?: 'standard' | 'outlined' | 'filled', 3451 | }, 3452 | HTMLParagraphAttributes, 3453 | void 3454 | >; 3455 | 3456 | declare export default React$ComponentType; 3457 | } 3458 | declare module '@material-ui/core/FormHelperText/FormHelperText' { 3459 | declare export * from '@material-ui/core/FormHelperText' 3460 | } 3461 | declare module '@material-ui/core/Snackbar' { 3462 | declare export default any; 3463 | } 3464 | declare module '@material-ui/core/useMediaQuery' { 3465 | declare export interface MuiMediaQueryListEvent { 3466 | matches: boolean; 3467 | } 3468 | 3469 | declare export interface MuiMediaQueryList { 3470 | matches: boolean; 3471 | addListener: (listener: MuiMediaQueryListListener) => void; 3472 | removeListener: (listener: MuiMediaQueryListListener) => void; 3473 | } 3474 | 3475 | declare export type MuiMediaQueryListListener = (event: MuiMediaQueryListEvent) => void; 3476 | 3477 | declare export interface Options { 3478 | defaultMatches?: boolean; 3479 | noSsr?: boolean; 3480 | ssrMatchMedia?: (query: string) => MuiMediaQueryList; 3481 | } 3482 | 3483 | declare type UseMediaQuery = (query: string, options?: Options) => boolean; 3484 | 3485 | declare export default UseMediaQuery; 3486 | } 3487 | declare module '@material-ui/core/useMediaQuery/useMediaQueryTheme' { 3488 | declare export { default } from '@material-ui/core/useMediaQuery' 3489 | } 3490 | 3491 | /////////////////////////////////////////////////////////////////////////////// 3492 | 3493 | declare module '@material-ui/core' { 3494 | declare export { default as Paper } from '@material-ui/core/Paper'; 3495 | declare export { default as AppBar } from '@material-ui/core/AppBar'; 3496 | declare export { default as Avatar } from '@material-ui/core/Avatar'; 3497 | declare export { default as Backdrop } from '@material-ui/core/Backdrop'; 3498 | declare export { default as Badge } from '@material-ui/core/Badge'; 3499 | declare export { default as Box } from '@material-ui/core/Box'; 3500 | declare export { default as Card } from '@material-ui/core/Card'; 3501 | declare export { default as Container } from '@material-ui/core/Container'; 3502 | declare export { default as Fade } from '@material-ui/core/Fade'; 3503 | declare export { default as ButtonBase } from '@material-ui/core/ButtonBase'; 3504 | declare export { default as Typography } from '@material-ui/core/Typography'; 3505 | declare export { default as CardHeader } from '@material-ui/core/CardHeader'; 3506 | declare export { default as CardMedia } from '@material-ui/core/CardMedia'; 3507 | declare export { default as Chip } from '@material-ui/core/Chip'; 3508 | declare export { default as Collapse } from '@material-ui/core/Collapse'; 3509 | declare export { default as Portal } from '@material-ui/core/Portal'; 3510 | declare export { default as Modal } from '@material-ui/core/Modal'; 3511 | declare export { default as Dialog } from '@material-ui/core/Dialog'; 3512 | declare export { default as Divider } from '@material-ui/core/Divider'; 3513 | declare export { default as Slide } from '@material-ui/core/Slide'; 3514 | declare export { default as Drawer } from '@material-ui/core/Drawer'; 3515 | declare export { default as Grid } from '@material-ui/core/Grid'; 3516 | declare export { default as GridList } from '@material-ui/core/GridList'; 3517 | declare export { default as Grow } from '@material-ui/core/Grow'; 3518 | declare export { default as NoSsr } from '@material-ui/core/NoSsr'; 3519 | declare export { default as Hidden } from '@material-ui/core/Hidden'; 3520 | declare export { default as InputBase } from '@material-ui/core/InputBase'; 3521 | declare export { default as Input } from '@material-ui/core/Input'; 3522 | declare export { default as Icon } from '@material-ui/core/Icon'; 3523 | declare export { default as FormLabel } from '@material-ui/core/FormLabel'; 3524 | declare export { default as InputLabel } from '@material-ui/core/InputLabel'; 3525 | declare export { default as Button } from '@material-ui/core/Button'; 3526 | declare export { default as IconButton } from '@material-ui/core/IconButton'; 3527 | declare export { default as Checkbox } from '@material-ui/core/Checkbox'; 3528 | declare export { default as Fab } from '@material-ui/core/Fab'; 3529 | declare export { default as FormGroup } from '@material-ui/core/FormGroup'; 3530 | declare export { 3531 | default as FormHelperText, 3532 | } from '@material-ui/core/FormHelperText'; 3533 | declare export { 3534 | default as FormControlLabel, 3535 | } from '@material-ui/core/FormControlLabel'; 3536 | declare export { 3537 | default as FormControl, 3538 | } from '@material-ui/core/FormControl'; 3539 | 3540 | declare export { 3541 | default as FilledInput, 3542 | } from '@material-ui/core/FilledInput'; 3543 | 3544 | declare export { 3545 | default as ExpansionPanelSummary, 3546 | } from '@material-ui/core/ExpansionPanelSummary'; 3547 | 3548 | declare export { 3549 | default as InputAdornment, 3550 | } from '@material-ui/core/InputAdornment'; 3551 | 3552 | declare export { 3553 | default as NativeSelect, 3554 | } from '@material-ui/core/NativeSelect'; 3555 | 3556 | declare export { 3557 | default as GridListTile, 3558 | } from '@material-ui/core/GridListTile'; 3559 | declare export { 3560 | default as GridListTileBar, 3561 | } from '@material-ui/core/GridListTileBar'; 3562 | 3563 | declare export { 3564 | default as ExpansionPanel, 3565 | } from '@material-ui/core/ExpansionPanel'; 3566 | 3567 | declare export { 3568 | default as DialogContentText, 3569 | } from '@material-ui/core/DialogContentText'; 3570 | 3571 | declare export { 3572 | default as CardActionArea, 3573 | } from '@material-ui/core/CardActionArea'; 3574 | 3575 | declare export { 3576 | default as BottomNavigationAction, 3577 | } from '@material-ui/core/BottomNavigationAction'; 3578 | 3579 | declare export { 3580 | default as ExpansionPanelDetails, 3581 | } from '@material-ui/core/ExpansionPanelDetails'; 3582 | declare export { 3583 | default as ExpansionPanelActions, 3584 | } from '@material-ui/core/ExpansionPanelActions'; 3585 | declare export { 3586 | default as DialogTitle, 3587 | } from '@material-ui/core/DialogTitle'; 3588 | declare export { 3589 | default as DialogContent, 3590 | } from '@material-ui/core/DialogContent'; 3591 | declare export { 3592 | default as DialogActions, 3593 | } from '@material-ui/core/DialogActions'; 3594 | declare export { 3595 | default as CssBaseline, 3596 | } from '@material-ui/core/CssBaseline'; 3597 | declare export { 3598 | default as ClickAwayListener, 3599 | } from '@material-ui/core/ClickAwayListener'; 3600 | 3601 | declare export { 3602 | default as CircularProgress, 3603 | } from '@material-ui/core/CircularProgress'; 3604 | declare export { 3605 | default as CardContent, 3606 | } from '@material-ui/core/CardContent'; 3607 | declare export { 3608 | default as CardActions, 3609 | } from '@material-ui/core/CardActions'; 3610 | declare export { 3611 | default as Breadcrumbs, 3612 | } from '@material-ui/core/Breadcrumbs'; 3613 | declare export { 3614 | default as BottomNavigation, 3615 | } from '@material-ui/core/BottomNavigation'; 3616 | } 3617 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "material-ui-cookie-consent", 3 | "version": "0.1.0", 4 | "description": "Cookie consent UI using Material-UI components", 5 | "license": "MIT", 6 | "repository": "https://github.com/OrigenStudio/material-ui-cookie-consent", 7 | "main": "dist/index.js", 8 | "author": { 9 | "name": "Origen Studio", 10 | "email": "hello@origen.studio", 11 | "url": "https://www.origen.studio" 12 | }, 13 | "files": [ 14 | "dist", 15 | "src" 16 | ], 17 | "scripts": { 18 | "test": "echo There are no tests yet.\n", 19 | "coverage": "npm test -- --coverage", 20 | "postcoverage": "opn coverage/lcov-report/index.html", 21 | "lint": "eslint .", 22 | "flow": "flow check", 23 | "docs": "documentation readme src --section=API", 24 | "postdocs": "git add README.md", 25 | "clean": "rimraf dist", 26 | "flowbuild": "flow-copy-source src dist", 27 | "prebuild": "npm run docs && npm run clean && npm run flowbuild", 28 | "build": "babel src -d dist", 29 | "preversion": "npm run lint && npm test && npm run build", 30 | "version": "standard-changelog && git add CHANGELOG.md", 31 | "postpublish": "git push origin master --follow-tags" 32 | }, 33 | "husky": { 34 | "hooks": { 35 | "pre-commit": "lint-staged" 36 | } 37 | }, 38 | "lint-staged": { 39 | "*.js": [ 40 | "eslint --fix", 41 | "git add" 42 | ] 43 | }, 44 | "keywords": [ 45 | "material-ui", 46 | "cookies" 47 | ], 48 | "peerDependencies": { 49 | "@material-ui/core": "^4.0.1", 50 | "react": "^16.8.6", 51 | "react-dom": "^16.8.6" 52 | }, 53 | "dependencies": { 54 | "js-cookie": "^2.2.0" 55 | }, 56 | "devDependencies": { 57 | "@babel/cli": "7.2.3", 58 | "@babel/core": "7.2.2", 59 | "@babel/plugin-proposal-class-properties": "7.3.0", 60 | "@babel/preset-env": "7.3.1", 61 | "@babel/preset-flow": "7.0.0", 62 | "@babel/preset-react": "^7.0.0", 63 | "babel-eslint": "10.0.1", 64 | "babel-jest": "24.0.0", 65 | "documentation": "9.1.1", 66 | "eslint": "5.12.1", 67 | "eslint-config-airbnb-base": "13.1.0", 68 | "eslint-config-prettier": "4.0.0", 69 | "eslint-plugin-flowtype": "3.2.1", 70 | "eslint-plugin-import": "2.15.0", 71 | "eslint-plugin-prettier": "3.0.1", 72 | "eslint-plugin-react": "^7.13.0", 73 | "flow-bin": "^0.99.0", 74 | "flow-copy-source": "2.0.2", 75 | "husky": "1.3.1", 76 | "jest": "24.0.0", 77 | "lint-staged": "8.1.1", 78 | "opn-cli": "4.0.0", 79 | "prettier": "1.16.1", 80 | "rimraf": "2.6.3", 81 | "standard-changelog": "2.0.6" 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/components/MUICookieConsent.jsx: -------------------------------------------------------------------------------- 1 | // @flow 2 | /* eslint-disable no-unused-vars */ 3 | import * as React from 'react'; 4 | import Cookies from 'js-cookie'; 5 | import Snackbar from '@material-ui/core/Snackbar'; 6 | import Button from '@material-ui/core/Button'; 7 | import Dialog from '@material-ui/core/Dialog'; 8 | import DialogActions from '@material-ui/core/DialogActions'; 9 | import DialogContent from '@material-ui/core/DialogContent'; 10 | import DialogContentText from '@material-ui/core/DialogContentText'; 11 | import DialogTitle from '@material-ui/core/DialogTitle'; 12 | 13 | declare var window: ?EventTarget; 14 | declare var document: ?Document; 15 | 16 | type Props = { 17 | componentType?: 'Dialog' | 'Snackbar', 18 | cookieName: string, 19 | cookieValue?: string | boolean | number, 20 | acceptOnScroll?: boolean, 21 | acceptOnScrollPercentage?: number, 22 | onAccept?: () => void | null, 23 | expires?: number | Date, 24 | hideOnAccept?: boolean, 25 | children?: React.Node, 26 | title?: string | null, 27 | message?: string, 28 | acceptButtonLabel?: string, 29 | debug?: boolean, 30 | extraCookieOptions?: any, 31 | snackbarAnchor?: { 32 | horizontal: 'left' | 'center' | 'right', 33 | vertical: 'top' | 'bottom', 34 | }, 35 | actions?: ?React.Node, 36 | }; 37 | type State = { 38 | visible: boolean, 39 | }; 40 | 41 | /** 42 | * This component is the MUICookieConsent it pops a Snackbar or a Dialog informing the user about cookie consent. 43 | */ 44 | export default class MUICookieConsent extends React.Component { 45 | static defaultProps = { 46 | componentType: 'Snackbar', 47 | cookieValue: '', 48 | acceptOnScroll: false, 49 | acceptOnScrollPercentage: 25, 50 | expires: 365, 51 | hideOnAccept: true, 52 | debug: false, 53 | extraCookiesOptions: undefined, 54 | snackbarAnchor: { horizontal: 'center', vertical: 'bottom' }, 55 | children: null, 56 | message: 'I love cookies!', 57 | title: null, 58 | acceptButtonLabel: 'Accept', 59 | actions: null, 60 | }; 61 | 62 | constructor(props: Props) { 63 | super(props); 64 | this.state = { 65 | visible: false, 66 | }; 67 | } 68 | 69 | componentDidMount() { 70 | const { cookieName, debug, acceptOnScroll } = this.props; 71 | 72 | if (Cookies.get(cookieName) === undefined || debug) { 73 | this.setState({ visible: true }); 74 | } 75 | 76 | if (window && acceptOnScroll) { 77 | window.addEventListener('scroll', this.handleScroll, { passive: true }); 78 | } 79 | } 80 | 81 | componentWillUnmount() { 82 | if (window) { 83 | window.removeEventListener('scroll', this.handleScroll); 84 | } 85 | } 86 | 87 | /** 88 | * checks whether scroll has exceeded set amount and fire accept if so. 89 | */ 90 | handleScroll = () => { 91 | const { acceptOnScrollPercentage } = this.props; 92 | if (document && typeof acceptOnScrollPercentage === 'number') { 93 | const rootNode = document.documentElement || document.body; 94 | 95 | if (rootNode) { 96 | // (top / (height - height)) * 100 97 | const percentage = 98 | (rootNode.scrollTop / 99 | (rootNode.scrollHeight - rootNode.clientHeight)) * 100 | 100; 101 | 102 | if (percentage > acceptOnScrollPercentage) { 103 | this.handleAccept(); 104 | } 105 | } 106 | } 107 | }; 108 | 109 | /** 110 | * Set a persistent cookie 111 | */ 112 | handleAccept = () => { 113 | const { 114 | cookieName, 115 | cookieValue, 116 | expires, 117 | hideOnAccept, 118 | onAccept, 119 | extraCookieOptions, 120 | } = this.props; 121 | 122 | if (onAccept) { 123 | onAccept(); 124 | } 125 | 126 | if (window) { 127 | window.removeEventListener('scroll', this.handleScroll); 128 | } 129 | 130 | Cookies.set(cookieName, cookieValue, { expires, ...extraCookieOptions }); 131 | 132 | if (hideOnAccept) { 133 | this.setState({ visible: false }); 134 | } 135 | }; 136 | 137 | render() { 138 | const { 139 | componentType, 140 | children, 141 | message, 142 | snackbarAnchor, 143 | title, 144 | acceptButtonLabel, 145 | actions, 146 | } = this.props; 147 | 148 | const childrenWithProps = React.Children.map(children, child => 149 | React.cloneElement(child, { onAccept: this.handleAccept }), 150 | ); 151 | 152 | switch (componentType) { 153 | case 'Snackbar': 154 | return children ? ( 155 | 156 | {childrenWithProps} 157 | 158 | ) : ( 159 | {message}} 163 | action={[ 164 | ...React.Children.toArray(actions), 165 | , 173 | ]} 174 | /> 175 | ); 176 | case 'Dialog': 177 | return ( 178 | 179 | {children ? ( 180 | childrenWithProps 181 | ) : ( 182 | <> 183 | {title ? {title} : null} 184 | 185 | 189 | {message} 190 | 191 | 192 | 193 | {actions} 194 | 197 | 198 | 199 | )} 200 | 201 | ); 202 | default: 203 | return null; 204 | } 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | // eslint-disable-next-line import/no-unresolved 4 | export { default } from './components/MUICookieConsent'; 5 | --------------------------------------------------------------------------------