├── CODEOWNERS ├── variant-switcher ├── src │ ├── ui.html │ ├── icons │ │ ├── index.tsx │ │ ├── Dropdown.tsx │ │ ├── Exchange.tsx │ │ └── Help.tsx │ ├── shared.ts │ ├── utils.ts │ ├── ui.css │ ├── code.ts │ └── ui.tsx ├── _assets_ │ ├── example.png │ ├── plugin-icon.png │ ├── deep-switch-diagram.png │ ├── plugin-icon.svg │ └── cover-art.svg ├── tsconfig.json ├── manifest.json ├── package.json ├── webpack.config.js ├── LICENSES.json ├── CHANGELOG.md └── README.md ├── _maintenance_ ├── icon-description │ ├── manifest.json │ ├── utils │ │ ├── concat-files.js │ │ └── build-material.js │ ├── tsconfig.json │ ├── package.json │ ├── LICENSES.json │ ├── ui.html │ ├── README.md │ ├── code.ts │ └── yarn.lock └── README.md ├── .gitignore ├── README.md ├── .github ├── dependabot.yml ├── ISSUE_TEMPLATE │ ├── feature-request.md │ └── bug-report.md ├── workflows │ └── blui-pr-actions.yml └── PULL_REQUEST_TEMPLATE.md └── LICENSE /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @jeffGreiner-eaton @surajeaton @ektaghag-eaton 2 | -------------------------------------------------------------------------------- /variant-switcher/src/ui.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /variant-switcher/_assets_/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-figma-plugins/HEAD/variant-switcher/_assets_/example.png -------------------------------------------------------------------------------- /variant-switcher/_assets_/plugin-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-figma-plugins/HEAD/variant-switcher/_assets_/plugin-icon.png -------------------------------------------------------------------------------- /variant-switcher/_assets_/deep-switch-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/etn-ccis/blui-figma-plugins/HEAD/variant-switcher/_assets_/deep-switch-diagram.png -------------------------------------------------------------------------------- /variant-switcher/src/icons/index.tsx: -------------------------------------------------------------------------------- 1 | import Exchange from './Exchange'; 2 | import Help from './Help'; 3 | import Dropdown from './Dropdown'; 4 | 5 | export { Exchange, Help, Dropdown }; 6 | -------------------------------------------------------------------------------- /_maintenance_/icon-description/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Icon Description", 3 | "id": "994359716504097058", 4 | "api": "1.0.0", 5 | "main": "build/code.js", 6 | "ui": "ui.html" 7 | } 8 | -------------------------------------------------------------------------------- /_maintenance_/icon-description/utils/concat-files.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | 3 | fs.writeFileSync('./build/code.js', fs.readFileSync('./build/matMeta.js') + ';\n' + fs.readFileSync('./build/code.js')); 4 | -------------------------------------------------------------------------------- /_maintenance_/icon-description/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2016", 4 | "typeRoots": ["./node_modules/@types", "./node_modules/@figma"], 5 | "outDir": "build" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /variant-switcher/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2016", 4 | "jsx": "react", 5 | "skipLibCheck": true, 6 | "typeRoots": ["./node_modules/@types", "./node_modules/@figma"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | **/dist 3 | **/build 4 | 5 | .DS_Store 6 | .env.local 7 | .env.development.local 8 | .env.test.local 9 | .env.production.local 10 | .idea/ 11 | .editorconfig 12 | .angulardoc.json 13 | 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Figma Plugins 2 | 3 | This library contains various plugins developed by the Brightlayer UI team for use with [Figma](https://www.figma.com/). 4 | 5 | The following plugins are avalable: 6 | 7 | - [Variant Switcher](./variant-switcher/README.md): recursively swaps component variants based on a specified property value. 8 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: 'npm' 4 | directory: '/variant-switcher' 5 | schedule: 6 | interval: 'monthly' 7 | day: 'monday' 8 | open-pull-requests-limit: 1 9 | target-branch: 'dev' 10 | labels: 11 | - 'external-dependency' 12 | -------------------------------------------------------------------------------- /variant-switcher/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Variant Switcher", 3 | "id": "971482182464094790", 4 | "api": "1.0.0", 5 | "main": "dist/code.js", 6 | "ui": "dist/ui.html", 7 | "editorType": ["figma", "figjam"], 8 | "documentAccess": "dynamic-page", 9 | "networkAccess": { "allowedDomains": ["none"] } 10 | } 11 | -------------------------------------------------------------------------------- /_maintenance_/README.md: -------------------------------------------------------------------------------- 1 | This folder contains scripts helpful to manage Brightlayer UI resources. They are not published as Figma plugins, but rather meant to be run in the local dev environment. 2 | 3 | - icon-description: 4 | 5 | Add descriptions to [Component Sticker Sheet](https://www.figma.com/community/file/1024360297793425107) icons so that they are easier to search. 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest an idea for this resource 4 | title: '' 5 | labels: 'enhancement, needs-review, brightlayer-ui' 6 | assignees: '' 7 | --- 8 | 9 | #### Describe the desired feature/functionality 10 | 11 | #### Additional Context (where / how would this be used) 12 | 13 | #### Is this request related to a current issue? 14 | 15 | #### Suggested implementation details 16 | -------------------------------------------------------------------------------- /.github/workflows/blui-pr-actions.yml: -------------------------------------------------------------------------------- 1 | name: blui-pr-actions 2 | on: 3 | pull_request_target: 4 | types: 5 | - opened 6 | 7 | permissions: 8 | pull-requests: write 9 | contents: read 10 | 11 | jobs: 12 | pr-labels: 13 | uses: etn-ccis/blui-automation/.github/workflows/blui-labels.yml@dev 14 | secrets: inherit 15 | 16 | pr-comment: 17 | uses: etn-ccis/blui-automation/.github/workflows/blui-comment.yml@dev 18 | secrets: inherit -------------------------------------------------------------------------------- /variant-switcher/src/icons/Dropdown.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | const DropdownIcon: React.FC = () => ( 4 | 10 | ); 11 | 12 | export default DropdownIcon; 13 | -------------------------------------------------------------------------------- /variant-switcher/src/icons/Exchange.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | const ExchangeIcon: React.FC = () => ( 4 | 10 | ); 11 | 12 | export default ExchangeIcon; 13 | -------------------------------------------------------------------------------- /variant-switcher/src/shared.ts: -------------------------------------------------------------------------------- 1 | /** 2 | Copyright (c) 2021-present, Eaton 3 | All rights reserved. 4 | This code is licensed under the BSD-3 license found in the LICENSE file in the root directory of this source tree and at https://opensource.org/licenses/BSD-3-Clause. 5 | **/ 6 | 7 | export const KEYS = { 8 | PROPERTY_NAME: 'property-name', 9 | FROM_VARIANT: 'from-variant', 10 | TO_VARIANT: 'to-variant', 11 | DEEP_SWITCH: 'deep-switch', 12 | FULL_DOCUMENT: 'full-document', 13 | EXACT_MATCH: 'exact-match', 14 | PLUGIN_STAY_OPEN: 'plugin-stay-open', 15 | MAIN_COMPONENT_NAME: 'main-component-name', 16 | SHOW_ADVANCED_OPTIONS: 'show-advanced-options', 17 | }; 18 | -------------------------------------------------------------------------------- /_maintenance_/icon-description/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "icon-description", 3 | "version": "0.0.0", 4 | "private": true, 5 | "main": "build/code.js", 6 | "scripts": { 7 | "build": "mkdir -p build && node ./utils/build-material.js && tsc -p tsconfig.json && node ./utils/concat-files.js", 8 | "generate:licenses": "npm-license-crawler -onlyDirectDependencies -json LICENSES.json" 9 | }, 10 | "author": "Brightlayer UI