├── types └── index.d.ts ├── .eslintrc.json ├── src ├── components │ ├── Txt │ │ ├── index.js │ │ └── Txt.vue │ ├── Icon │ │ ├── index.js │ │ └── Icon.vue │ ├── Input │ │ ├── index.js │ │ └── Input.vue │ ├── Label │ │ ├── index.js │ │ └── Label.vue │ ├── Radio │ │ ├── index.js │ │ └── Radio.vue │ ├── Title │ │ ├── index.js │ │ └── Title.vue │ ├── Button │ │ ├── index.js │ │ └── Button.vue │ ├── Divider │ │ ├── index.js │ │ └── Divider.vue │ ├── Select │ │ ├── index.js │ │ └── Select.vue │ ├── Toggle │ │ ├── index.js │ │ └── Toggle.vue │ ├── Tooltip │ │ ├── index.js │ │ └── Tooltip.vue │ ├── Checkbox │ │ ├── index.js │ │ └── Checkbox.vue │ ├── NumInput │ │ ├── index.js │ │ └── NumInput.vue │ ├── Textarea │ │ ├── index.js │ │ └── Textarea.vue │ ├── Disclosure │ │ ├── index.js │ │ └── Disclosure.vue │ ├── IconButton │ │ ├── index.js │ │ └── IconButton.vue │ ├── DisclosureItem │ │ ├── index.js │ │ └── DisclosureItem.vue │ └── index.js ├── assets │ ├── icons │ │ ├── caret-up.svg │ │ ├── caret-down.svg │ │ ├── caret-left.svg │ │ ├── caret-right.svg │ │ ├── minus.svg │ │ ├── plus.svg │ │ ├── spacing.svg │ │ ├── star-on.svg │ │ ├── layout-align-horizontal-centers.svg │ │ ├── layout-align-vertical-centers.svg │ │ ├── layout-grid-columns.svg │ │ ├── layout-grid-rows.svg │ │ ├── warning-large.svg │ │ ├── warning.svg │ │ ├── layout-align-left.svg │ │ ├── layout-align-top.svg │ │ ├── list.svg │ │ ├── stroke-weight.svg │ │ ├── layout-align-bottom.svg │ │ ├── layout-align-right.svg │ │ ├── tidy-up-list-horizontal.svg │ │ ├── tidy-up-list-vertical.svg │ │ ├── distribute-vertical-spacing.svg │ │ ├── auto-layout-horizontal.svg │ │ ├── distribute-horizontal-spacing.svg │ │ ├── play.svg │ │ ├── angle.svg │ │ ├── auto-layout-vertical.svg │ │ ├── back.svg │ │ ├── corner-radius.svg │ │ ├── corners.svg │ │ ├── instance.svg │ │ ├── forward.svg │ │ ├── check.svg │ │ ├── frame.svg │ │ ├── vertical-padding.svg │ │ ├── draft.svg │ │ ├── horizontal-padding.svg │ │ ├── list-tile.svg │ │ ├── close.svg │ │ ├── list-detailed.svg │ │ ├── arrow-up-down.svg │ │ ├── arrow-left-right.svg │ │ ├── link-broken.svg │ │ ├── recent.svg │ │ ├── lock-off.svg │ │ ├── resolve-filled.svg │ │ ├── tidy-up-grid.svg │ │ ├── link-connected.svg │ │ ├── layout-grid-uniform.svg │ │ ├── star-off.svg │ │ ├── lock-on.svg │ │ ├── sort-top-bottom.svg │ │ ├── eyedropper.svg │ │ ├── group.svg │ │ ├── search-large.svg │ │ ├── ellipses.svg │ │ ├── resolve.svg │ │ ├── trash.svg │ │ ├── resize-to-fit.svg │ │ ├── sort-alpha-dsc.svg │ │ ├── heart-fill.svg │ │ ├── sort-alpha-asc.svg │ │ ├── styles.svg │ │ ├── visible.svg │ │ ├── search.svg │ │ ├── hyperlink.svg │ │ ├── component.svg │ │ ├── hidden.svg │ │ ├── adjust.svg │ │ ├── alert.svg │ │ ├── theme.svg │ │ ├── image.svg │ │ ├── smiley.svg │ │ ├── timer.svg │ │ ├── reverse.svg │ │ ├── blend.svg │ │ ├── key.svg │ │ ├── effects.svg │ │ ├── break.svg │ │ ├── blend-empty.svg │ │ ├── spinner.svg │ │ ├── share.svg │ │ ├── tooltip.svg │ │ ├── tooltip-inverse.svg │ │ ├── swap.svg │ │ ├── random.svg │ │ ├── library.svg │ │ ├── settings.svg │ │ └── heart.svg │ └── style │ │ ├── _animation.scss │ │ ├── index.scss │ │ ├── _layout.scss │ │ ├── _typography.scss │ │ ├── _color.scss │ │ ├── _icon.scss │ │ └── _util.scss ├── mixins │ └── uniqueId.js ├── serve.js ├── build.js └── Demo.vue ├── babel.config.js ├── .gitignore ├── vue.config.js ├── misc └── hero.svg ├── public └── index.html ├── LICENSE ├── package.json └── README.md /types/index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'figma-plugin-ds-vue' 2 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["plugin:vue/base"] 3 | } 4 | -------------------------------------------------------------------------------- /src/components/Txt/index.js: -------------------------------------------------------------------------------- 1 | import Txt from './Txt.vue' 2 | 3 | export default Txt 4 | -------------------------------------------------------------------------------- /src/components/Icon/index.js: -------------------------------------------------------------------------------- 1 | import Icon from './Icon.vue' 2 | 3 | export default Icon 4 | -------------------------------------------------------------------------------- /src/components/Input/index.js: -------------------------------------------------------------------------------- 1 | import Input from './Input.vue' 2 | 3 | export default Input 4 | -------------------------------------------------------------------------------- /src/components/Label/index.js: -------------------------------------------------------------------------------- 1 | import Label from './Label.vue' 2 | 3 | export default Label 4 | -------------------------------------------------------------------------------- /src/components/Radio/index.js: -------------------------------------------------------------------------------- 1 | import Radio from './Radio.vue' 2 | 3 | export default Radio 4 | -------------------------------------------------------------------------------- /src/components/Title/index.js: -------------------------------------------------------------------------------- 1 | import Title from './Title.vue' 2 | 3 | export default Title 4 | -------------------------------------------------------------------------------- /src/components/Button/index.js: -------------------------------------------------------------------------------- 1 | import Button from './Button.vue' 2 | 3 | export default Button 4 | -------------------------------------------------------------------------------- /src/components/Divider/index.js: -------------------------------------------------------------------------------- 1 | import Divider from './Divider.vue' 2 | 3 | export default Divider 4 | -------------------------------------------------------------------------------- /src/components/Select/index.js: -------------------------------------------------------------------------------- 1 | import Select from './Select.vue' 2 | 3 | export default Select 4 | -------------------------------------------------------------------------------- /src/components/Toggle/index.js: -------------------------------------------------------------------------------- 1 | import Toggle from './Toggle.vue' 2 | 3 | export default Toggle 4 | -------------------------------------------------------------------------------- /src/components/Tooltip/index.js: -------------------------------------------------------------------------------- 1 | import Tooltip from './Tooltip.vue' 2 | 3 | export default Tooltip 4 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/components/Checkbox/index.js: -------------------------------------------------------------------------------- 1 | import Checkbox from './Checkbox.vue' 2 | 3 | export default Checkbox 4 | -------------------------------------------------------------------------------- /src/components/NumInput/index.js: -------------------------------------------------------------------------------- 1 | import NumInput from './NumInput.vue' 2 | 3 | export default NumInput 4 | -------------------------------------------------------------------------------- /src/components/Textarea/index.js: -------------------------------------------------------------------------------- 1 | import Textarea from './Textarea.vue' 2 | 3 | export default Textarea 4 | -------------------------------------------------------------------------------- /src/components/Disclosure/index.js: -------------------------------------------------------------------------------- 1 | import Disclosure from './Disclosure.vue' 2 | 3 | export default Disclosure 4 | -------------------------------------------------------------------------------- /src/components/IconButton/index.js: -------------------------------------------------------------------------------- 1 | import IconButton from './IconButton.vue' 2 | 3 | export default IconButton 4 | -------------------------------------------------------------------------------- /src/components/DisclosureItem/index.js: -------------------------------------------------------------------------------- 1 | import DisclosureItem from './DisclosureItem.vue' 2 | 3 | export default DisclosureItem 4 | -------------------------------------------------------------------------------- /src/assets/icons/caret-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/caret-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/caret-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/caret-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/minus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/plus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/spacing.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/star-on.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/layout-align-horizontal-centers.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/layout-align-vertical-centers.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/layout-grid-columns.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/layout-grid-rows.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/warning-large.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/warning.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/style/_animation.scss: -------------------------------------------------------------------------------- 1 | .spinning { 2 | animation: rotating 1s linear infinite; 3 | } 4 | @keyframes rotating { 5 | from { 6 | transform: rotate(0deg); 7 | } 8 | to { 9 | transform: rotate(360deg); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/assets/icons/layout-align-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/layout-align-top.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/list.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/stroke-weight.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/layout-align-bottom.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/layout-align-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/tidy-up-list-horizontal.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/tidy-up-list-vertical.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/distribute-vertical-spacing.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/auto-layout-horizontal.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/distribute-horizontal-spacing.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/play.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/angle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/auto-layout-vertical.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/back.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/corner-radius.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/corners.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/instance.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/forward.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/check.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/frame.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/vertical-padding.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/mixins/uniqueId.js: -------------------------------------------------------------------------------- 1 | export default { 2 | data() { 3 | return { 4 | // Create unique ID so clicking the label also (un)checks the box 5 | uniqueId: 6 | '_' + 7 | Math.random() 8 | .toString(36) 9 | .substr(2, 9) 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/serve.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Demo from './Demo.vue' 3 | 4 | // import global figma-ds styles 5 | import './assets/style/index.scss' 6 | 7 | Vue.config.productionTip = false 8 | 9 | new Vue({ 10 | render: (h) => h(Demo) 11 | }).$mount('#app') 12 | -------------------------------------------------------------------------------- /src/assets/icons/draft.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/horizontal-padding.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/list-tile.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/list-detailed.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/arrow-up-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/arrow-left-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /src/assets/icons/link-broken.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/recent.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | chainWebpack: (config) => { 3 | // Inline svg icons because Figma doesn't support external assets 4 | config.module.rule('svg').uses.clear() 5 | config.module 6 | .rule('svg') 7 | .test(/\.(svg)$/) 8 | .use('url-loader') 9 | .loader('url-loader') 10 | }, 11 | productionSourceMap: false 12 | } 13 | -------------------------------------------------------------------------------- /src/assets/icons/lock-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/resolve-filled.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/style/index.scss: -------------------------------------------------------------------------------- 1 | @import 'layout'; 2 | @import 'typography'; 3 | @import 'color'; 4 | @import 'icon'; 5 | @import 'animation'; 6 | @import 'util'; 7 | 8 | * { 9 | box-sizing: border-box; 10 | } 11 | 12 | body { 13 | position: relative; 14 | box-sizing: border-box; 15 | margin: 0; 16 | padding: 0; 17 | font-family: 'Inter', sans-serif; 18 | } 19 | -------------------------------------------------------------------------------- /src/assets/icons/tidy-up-grid.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/link-connected.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/layout-grid-uniform.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/star-off.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/lock-on.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/sort-top-bottom.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/eyedropper.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/group.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/search-large.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/Divider/Divider.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 13 | 14 | 23 | -------------------------------------------------------------------------------- /src/assets/icons/ellipses.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/resolve.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/trash.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/resize-to-fit.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/sort-alpha-dsc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/heart-fill.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/assets/icons/sort-alpha-asc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/styles.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /misc/hero.svg: -------------------------------------------------------------------------------- 1 | 8 | 12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/icons/visible.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/search.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/hyperlink.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/style/_layout.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | /* Spacing + Sizing */ 3 | --size-xxxsmall: 4px; 4 | --size-xxsmall: 8px; 5 | --size-xsmall: 16px; 6 | --size-small: 24px; 7 | --size-medium: 32px; 8 | --size-large: 40px; 9 | --size-xlarge: 48px; 10 | --size-xxlarge: 64px; 11 | --size-xxxlarge: 80px; 12 | 13 | /* Border radius */ 14 | --border-radius-small: 2px; 15 | --border-radius-medium: 5px; 16 | --border-radius-large: 6px; 17 | 18 | /* Shadows */ 19 | --shadow-hud: 0 5px 17px rgba(0, 0, 0, 0.2), 0 2px 7px rgba(0, 0, 0, 0.15); 20 | --shadow-floating-window: 0 2px 14px rgba(0, 0, 0, 0.15); 21 | } 22 | -------------------------------------------------------------------------------- /src/assets/icons/component.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/hidden.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/adjust.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/alert.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/theme.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/image.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/smiley.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/timer.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/assets/icons/reverse.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/blend.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/key.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/effects.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/Title/Title.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 15 | 16 | 32 | -------------------------------------------------------------------------------- /src/assets/icons/break.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/Disclosure/Disclosure.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 30 | 31 | 40 | -------------------------------------------------------------------------------- /src/components/Icon/Icon.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 32 | 33 | 39 | -------------------------------------------------------------------------------- /src/components/Label/Label.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 15 | 16 | 32 | -------------------------------------------------------------------------------- /src/assets/icons/blend-empty.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/spinner.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/share.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icons/tooltip.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/assets/icons/tooltip-inverse.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/components/index.js: -------------------------------------------------------------------------------- 1 | /* Default Export components to use in Test.vue component */ 2 | /* This is not part of the build */ 3 | 4 | import Button from './Button' 5 | import Checkbox from './Checkbox' 6 | import Disclosure from './Disclosure' 7 | import DisclosureItem from './DisclosureItem' 8 | import Divider from './Divider' 9 | import Icon from './Icon' 10 | import IconButton from './IconButton' 11 | import Input from './Input' 12 | import Label from './Label' 13 | import NumInput from './NumInput' 14 | import Radio from './Radio' 15 | import Select from './Select' 16 | import Toggle from './Toggle' 17 | import Textarea from './Textarea' 18 | import Txt from './Txt' 19 | import Title from './Title' 20 | import Tooltip from './Tooltip' 21 | 22 | export default { 23 | Button, 24 | Checkbox, 25 | Disclosure, 26 | DisclosureItem, 27 | Divider, 28 | Icon, 29 | IconButton, 30 | Input, 31 | Label, 32 | NumInput, 33 | Radio, 34 | Select, 35 | Toggle, 36 | Textarea, 37 | Txt, 38 | Title, 39 | Tooltip 40 | } 41 | -------------------------------------------------------------------------------- /src/assets/icons/swap.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/build.js: -------------------------------------------------------------------------------- 1 | /* Components */ 2 | 3 | import Button from './components/Button' 4 | import Checkbox from './components/Checkbox' 5 | import Disclosure from './components/Disclosure' 6 | import DisclosureItem from './components/DisclosureItem' 7 | import Divider from './components/Divider' 8 | import Icon from './components/Icon' 9 | import IconButton from './components/IconButton' 10 | import Input from './components/Input' 11 | import Label from './components/Label' 12 | import NumInput from './components/NumInput' 13 | import Radio from './components/Radio' 14 | import Select from './components/Select' 15 | import Toggle from './components/Toggle' 16 | import Textarea from './components/Textarea' 17 | import Txt from './components/Txt' 18 | import Title from './components/Title' 19 | import Tooltip from './components/Tooltip' 20 | 21 | export { 22 | Button, 23 | Checkbox, 24 | Disclosure, 25 | DisclosureItem, 26 | Divider, 27 | Icon, 28 | IconButton, 29 | Input, 30 | Label, 31 | NumInput, 32 | Radio, 33 | Select, 34 | Toggle, 35 | Textarea, 36 | Txt, 37 | Title, 38 | Tooltip 39 | } 40 | 41 | /* Style */ 42 | 43 | import './assets/style/index.scss' 44 | -------------------------------------------------------------------------------- /src/assets/icons/random.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Alexander Widua 4 | Copyright (c) 2020 Thomas Lowry @ figma-plugin-ds-svelte (MIT) 5 | Copyright (c) 2019 berezadev @ vue-figma-boilerplate (MIT) 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. -------------------------------------------------------------------------------- /src/assets/icons/library.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "figma-plugin-ds-vue", 3 | "version": "2.0.0", 4 | "description": "Vue component library that matches the Figma Design System for building Figma plugins.", 5 | "private": false, 6 | "main": "./dist/figma-plugin-ds-vue.umd.js", 7 | "style": "./dist/figma-plugin-ds-vue.css", 8 | "scripts": { 9 | "serve": "vue-cli-service serve src/serve.js --mode development", 10 | "build": "vue-cli-service build src/serve.js --dest demo --no-clean", 11 | "build-lib": "vue-cli-service build --target lib --name figma-plugin-ds-vue src/build.js", 12 | "prepublishOnly": "npm run build-lib" 13 | }, 14 | "dependencies": {}, 15 | "devDependencies": { 16 | "@vue/cli-plugin-babel": "~4.5.0", 17 | "@vue/cli-plugin-eslint": "~4.5.0", 18 | "@vue/cli-service": "~4.5.0", 19 | "babel-eslint": "^10.1.0", 20 | "core-js": "^3.6.5", 21 | "eslint": "^6.7.2", 22 | "eslint-plugin-vue": "^6.2.2", 23 | "sass": "^1.26.5", 24 | "sass-loader": "^8.0.2", 25 | "vue": "^2.6.11", 26 | "vue-template-compiler": "^2.6.11" 27 | }, 28 | "peerDependencies": { 29 | "vue": "^2.6.11" 30 | }, 31 | "repository": { 32 | "type": "git", 33 | "url": "git+https://github.com/alexwidua/figma-plugin-ds-vue.git" 34 | }, 35 | "files": [ 36 | "dist/*", 37 | "types/*" 38 | ], 39 | "types": "./types/index.d.ts", 40 | "keywords": [ 41 | "vue", 42 | "figma", 43 | "plugin", 44 | "ds", 45 | "design", 46 | "system", 47 | "ui", 48 | "component", 49 | "library" 50 | ], 51 | "author": "Alexander Widua", 52 | "license": "MIT", 53 | "bugs": { 54 | "url": "https://github.com/alexwidua/figma-plugin-ds-vue/issues" 55 | }, 56 | "homepage": "https://github.com/alexwidua/figma-plugin-ds-vue#readme" 57 | } 58 | -------------------------------------------------------------------------------- /src/assets/icons/settings.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/style/_typography.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-weight: 400; 3 | font-family: 'Inter'; 4 | font-style: normal; 5 | src: url('https://rsms.me/inter/font-files/Inter-Regular.woff2?v=3.7') 6 | format('woff2'), 7 | url('https://rsms.me/inter/font-files/Inter-Regular.woff?v=3.7') 8 | format('woff'); 9 | } 10 | 11 | @font-face { 12 | font-weight: 500; 13 | font-family: 'Inter'; 14 | font-style: normal; 15 | src: url('https://rsms.me/inter/font-files/Inter-Medium.woff2?v=3.7') 16 | format('woff2'), 17 | url('https://rsms.me/inter/font-files/Inter-Medium.woff2?v=3.7') 18 | format('woff'); 19 | } 20 | 21 | @font-face { 22 | font-weight: 600; 23 | font-family: 'Inter'; 24 | font-style: normal; 25 | src: url('https://rsms.me/inter/font-files/Inter-SemiBold.woff2?v=3.7') 26 | format('woff2'), 27 | url('https://rsms.me/inter/font-files/Inter-SemiBold.woff2?v=3.7') 28 | format('woff'); 29 | } 30 | 31 | :root { 32 | /* Font stack */ 33 | --font-stack: 'Inter', sans-serif; 34 | 35 | /* Font sizes */ 36 | --font-size-xsmall: 11px; 37 | --font-size-small: 12px; 38 | --font-size-large: 13px; 39 | --font-size-xlarge: 14px; 40 | 41 | /* Font weights */ 42 | --font-weight-normal: 400; 43 | --font-weight-medium: 500; 44 | --font-weight-bold: 600; 45 | 46 | /* Lineheight */ 47 | --font-line-height: 16px; /* Use For xsmall, small font sizes */ 48 | --font-line-height-large: 24px; /* Use For large, xlarge font sizes */ 49 | 50 | /* Letterspacing */ 51 | --font-letter-spacing-pos-xsmall: 0.005em; 52 | --font-letter-spacing-neg-xsmall: 0.01em; 53 | --font-letter-spacing-pos-small: 0; 54 | --font-letter-spacing-neg-small: 0.005em; 55 | --font-letter-spacing-pos-large: -0.0025em; 56 | --font-letter-spacing-neg-large: 0.0025em; 57 | --font-letter-spacing-pos-xlarge: -0.001em; 58 | --font-letter-spacing-neg-xlarge: -0.001em; 59 | } 60 | -------------------------------------------------------------------------------- /src/assets/style/_color.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | /* Accent */ 3 | --blue: #18a0fb; // Primary accent; indicate primary and/or interactive elements 4 | --green: #1bc47d; // Very sparingly used; communicate active state (plugin 'Installed' label) 5 | --yellow: #ffeb00; // Indicate cautionary conditions 6 | --red: #f24822; // Indicate error 7 | --purple: #7b61ff; // Indicate Component & Instance nodes 8 | --hot-pink: #ff00ff; // Assistive UI canvas decorations 9 | 10 | /* Basic Foreground */ 11 | --black: #000; // Active states (text being edited, table cells being highlighted) 12 | --black8: rgba(0, 0, 0, 0.8); // Most commonly used foreground color 13 | --black8-opaque: #333333; // Opaque version of black8 14 | --black3: rgba(0, 0, 0, 0.3); // Lower-priority el's (disabled UI, labels) 15 | --black3-opaque: #b3b3b3; // Opaque version of black3 16 | --white: #fff; // Primary background for UI, text on menus 17 | --white8: rgba(255, 255, 255, 0.8); // Only used for toolbar 18 | --white4: rgba(255, 255, 255, 0.4); // Disabled menu items on black 19 | 20 | /* Basic Background */ 21 | --bg-white: #fff; // Positive backgrounds (property panels, sidebar) 22 | --bg-grey: #f0f0f0; // Bg for buttons, controls & other interactive items in active/selected state 23 | --bg-silver: #e5e5e5; // Sidebar seperator lines & default canvas bg 24 | --bg-black: #000; // Tabstrip bg in desktop app (fullscreen mode) 25 | --bg-hud: #222; // All heads-up display elements (menus, visual bell) 26 | --bg-toolbar: #2c2c2c; // Toolbars 27 | 28 | /* Special */ 29 | --black1: rgba(0, 0, 0, 0.1); // Outline of UI controls 30 | --white2: rgba(255, 255, 255, 0.2); // Menu seperators 31 | --blue3: rgba(24, 145, 251, 0.3); // Text range selection 32 | --purple4: rgba(123, 97, 255, 0.4); // Disabled component layers 33 | --selection-a: #daebf7; // Background of selected cells (layer sidebar) 34 | --selection-b: #edf5fa; // ^ 35 | --hover-fill: rgba(0, 0, 0, 0.06); // If no outline during hover 36 | 37 | /* Mutliplayer */ 38 | --mp-y: #ffc700; 39 | --mp-g: #1bc47d; 40 | --mp-r: #ef5533; 41 | --mp-b: #18a0fb; 42 | --mp-p: #907cff; 43 | --mp-t: #00b5ce; 44 | --mp-s: #ee46d3; 45 | } 46 | -------------------------------------------------------------------------------- /src/assets/icons/heart.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/components/IconButton/IconButton.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 50 | 51 | 107 | -------------------------------------------------------------------------------- /src/components/Txt/Txt.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 49 | 50 | 111 | -------------------------------------------------------------------------------- /src/components/Textarea/Textarea.vue: -------------------------------------------------------------------------------- 1 |