├── .babelrc.js
├── .circleci
└── config.yml
├── .eslintrc
├── .gitignore
├── .vscode
├── extensions.json
├── launch.json
├── settings.json
├── snippets.code-snippets
└── tasks.json
├── .vscodeignore
├── LICENSE.md
├── README.md
├── docs
└── snippet.gif
├── icon.png
├── package-lock.json
├── package.json
├── scripts
└── buildReadme.ts
├── src
├── createSnippet.tsx
├── extension.ts
├── getExistingImports.ts
├── once.ts
├── snippets
│ ├── index.ts
│ ├── muiAppBar.tsx
│ ├── muiAppBarMenu.tsx
│ ├── muiBottomNavigation.tsx
│ ├── muiBottomNavigationAction.tsx
│ ├── muiButton.tsx
│ ├── muiButtonGroup.tsx
│ ├── muiButtonGroupSize.tsx
│ ├── muiButtonGroupVertical.tsx
│ ├── muiButtonSize.tsx
│ ├── muiButtonText.tsx
│ ├── muiButtonWithIcon.tsx
│ ├── muiCardHeader.tsx
│ ├── muiCardMedia.tsx
│ ├── muiCheckboxLabel.tsx
│ ├── muiCheckboxLabelPlacement.tsx
│ ├── muiContainer.tsx
│ ├── muiDialog.tsx
│ ├── muiDialogSimple.tsx
│ ├── muiDrawerPermanent.tsx
│ ├── muiDrawerPersistent.tsx
│ ├── muiDrawerTemporary.tsx
│ ├── muiEndAdornment.tsx
│ ├── muiExpansionPanel.tsx
│ ├── muiExpansionPanelControlled.tsx
│ ├── muiFab.tsx
│ ├── muiFabExtended.tsx
│ ├── muiFormControl.tsx
│ ├── muiFormControlGroup.tsx
│ ├── muiGridContainer.tsx
│ ├── muiGridContainerCenter.tsx
│ ├── muiGridContainerFull.tsx
│ ├── muiGridListSubheader.tsx
│ ├── muiGridListTilebar.tsx
│ ├── muiIconButton.tsx
│ ├── muiMenu.tsx
│ ├── muiMenuItem.tsx
│ ├── muiMenuPopupState.tsx
│ ├── muiRadioGroup.tsx
│ ├── muiRadioLabel.tsx
│ ├── muiRadioLabelPlacement.tsx
│ ├── muiSelectItem.tsx
│ ├── muiSliderContinuous.tsx
│ ├── muiSliderDiscrete.tsx
│ ├── muiSnackbar.tsx
│ ├── muiSnackbarContent.tsx
│ ├── muiStartAdornment.tsx
│ ├── muiStep.tsx
│ ├── muiStepContent.tsx
│ ├── muiStepOptional.tsx
│ ├── muiStepper.tsx
│ ├── muiSwipeableViews.tsx
│ ├── muiSwitch.tsx
│ ├── muiSwitchLabel.tsx
│ ├── muiSwitchLabelPlacement.tsx
│ ├── muiTabPanel.tsx
│ ├── muiTabs.tsx
│ ├── muiTabsScrollable.tsx
│ ├── muiTextField.tsx
│ ├── muiTextFieldMore.tsx
│ ├── muiTextFieldSelect.tsx
│ ├── muiTextFieldVariant.tsx
│ ├── muiTooltip.tsx
│ └── muiTypography.tsx
└── test
│ ├── .eslintrc
│ ├── runTest.ts
│ └── suite
│ ├── .eslintrc
│ ├── extension.test.ts
│ └── index.ts
├── tsconfig.json
└── typings
├── markdown-escape
└── index.d.ts
├── nyc
└── index.d.ts
└── require-glob
└── index.d.ts
/.babelrc.js:
--------------------------------------------------------------------------------
1 | module.exports = function (api) {
2 | const plugins = ['@babel/plugin-transform-runtime']
3 | const presets = [
4 | ['@babel/preset-env', { targets: { node: 10 } }],
5 | '@babel/preset-react',
6 | '@babel/preset-typescript',
7 | ]
8 |
9 | if (api.env('coverage')) {
10 | plugins.push('babel-plugin-istanbul')
11 | }
12 |
13 | return { plugins, presets }
14 | }
15 |
--------------------------------------------------------------------------------
/.circleci/config.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | jobs:
3 | build:
4 | docker:
5 | - image: circleci/node:12.16-browsers
6 |
7 | steps:
8 | - checkout
9 | - run:
10 | name: Setup NPM Token
11 | command: |
12 | yarn config set registry "https://registry.npmjs.org/"
13 | echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
14 | echo "registry=https://registry.npmjs.org/" >> .npmrc
15 | - run:
16 | name: Install Dependencies
17 | command: yarn install --frozen-lockfile
18 | - run:
19 | name: build
20 | command: yarn vscode:prepublish
21 | - run:
22 | name: upload test coverage
23 | command: yarn codecov || true
24 | - run:
25 | name: release
26 | command: yarn run semantic-release
27 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "@jedwards1211/eslint-config-typescript",
4 | "@jedwards1211/eslint-config-react",
5 | "prettier",
6 | "prettier/@typescript-eslint"
7 | ],
8 | "rules": {
9 | "@typescript-eslint/no-explicit-any": 0
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | coverage
2 | .nyc_output
3 | .vscode-test/
4 | node_modules
5 | out
6 | .eslintcache
7 | /*.js
8 | /*.js.flow
9 | /*.d.ts
10 | !/.babelrc.js
11 | *.vsix
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846
3 | // for the documentation about the extensions.json format
4 | "recommendations": ["ms-vscode.vscode-typescript-tslint-plugin"]
5 | }
6 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | // A launch configuration that compiles the extension and then opens it inside a new window
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | {
6 | "version": "0.2.0",
7 | "configurations": [
8 | {
9 | "name": "Run Extension",
10 | "type": "extensionHost",
11 | "request": "launch",
12 | "runtimeExecutable": "${execPath}",
13 | "args": ["--extensionDevelopmentPath=${workspaceFolder}"],
14 | "outFiles": ["${workspaceFolder}/out/**/*.js"],
15 | "preLaunchTask": "${defaultBuildTask}"
16 | },
17 | {
18 | "name": "Extension Tests",
19 | "type": "extensionHost",
20 | "request": "launch",
21 | "runtimeExecutable": "${execPath}",
22 | "args": [
23 | "--extensionDevelopmentPath=${workspaceFolder}",
24 | "--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
25 | ],
26 | "outFiles": ["${workspaceFolder}/out/test/**/*.js"],
27 | "preLaunchTask": "${defaultBuildTask}"
28 | }
29 | ]
30 | }
31 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | // Place your settings in this file to overwrite default and user settings.
2 | {
3 | "files.exclude": {
4 | "out": false // set this to true to hide the "out" folder with the compiled JS files
5 | },
6 | "search.exclude": {
7 | "out": true // set this to false to include "out" folder in search results
8 | },
9 | // Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10 | "typescript.tsc.autoDetect": "off"
11 | }
12 |
--------------------------------------------------------------------------------
/.vscode/snippets.code-snippets:
--------------------------------------------------------------------------------
1 | {
2 | "Snippet Template": {
3 | "prefix": "snip",
4 | "body": [
5 | "import * as React from 'react'",
6 | "import { SnippetOptions } from './index'",
7 | "",
8 | "export const description = '$1'",
9 | "",
10 | "export const body = ({ $, Components: { $2 } }: SnippetOptions) => (",
11 | " $3",
12 | ")",
13 | ""
14 | ]
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | // See https://go.microsoft.com/fwlink/?LinkId=733558
2 | // for the documentation about the tasks.json format
3 | {
4 | "version": "2.0.0",
5 | "tasks": [
6 | {
7 | "type": "npm",
8 | "script": "build:watch",
9 | "problemMatcher": {
10 | "owner": "babel",
11 | "fileLocation": "relative",
12 | "pattern": {
13 | "regexp": "^(.*?)Error: ([^:]+): ([^(\\n]+)(\\d+:\\d+)?",
14 | "file": 2,
15 | "location": 4,
16 | "code": 1,
17 | "message": 3
18 | },
19 | "background": {
20 | "activeOnStart": true,
21 | "beginsPattern": "^\\[nodemon\\] starting",
22 | "endsPattern": "^Successfully compiled"
23 | }
24 | },
25 | "isBackground": true,
26 | "presentation": {
27 | "reveal": "never"
28 | },
29 | "group": {
30 | "kind": "build",
31 | "isDefault": true
32 | }
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/.vscodeignore:
--------------------------------------------------------------------------------
1 | **
2 | !node_modules
3 | !out
4 | !LICENSE.md
5 | !package.json
6 | !README.md
7 | !yarn.lock
8 | !icon.png
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016-present Andy Edwards
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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Snippets for Material-UI
2 |
3 | 
4 |
5 | [](https://circleci.com/gh/vscodeshift/material-ui-snippets)
6 | [](https://github.com/semantic-release/semantic-release)
7 | [](http://commitizen.github.io/cz-cli/)
8 | [](https://marketplace.visualstudio.com/items?itemName=vscodeshift.material-ui-snippets)
9 |
10 | **Note:** There are two ways to insert these:
11 |
12 | - **Trigger Suggest** (⌃Space on macOS) and then type in the name; or you can
13 | enable the **Editor: Tab Completion** setting, then type the name of the
14 | snippet and press Tab.
15 | - Execute the corresponding **editor commands** like `Material-UI: insert