├── .github ├── CODEOWNERS └── workflows │ ├── publish.yml │ ├── update_tokens.yml │ └── release.yml ├── .npmrc ├── .env_sample ├── prettier.config.js ├── .release-it.json ├── tokens ├── size │ ├── radius.json │ ├── spacing.json │ └── icon.json ├── color │ ├── primitive.json │ └── semantics.json └── text │ └── typography.json ├── NOTICE ├── package.json ├── config.json ├── README.md ├── CONTRIBUTING.md ├── .gitignore ├── scripts └── figma.js └── LICENSE /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @empitsu @jmblog @roana0229 -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | //registry.npmjs.org/:_authToken=${NPM_TOKEN} 2 | -------------------------------------------------------------------------------- /.env_sample: -------------------------------------------------------------------------------- 1 | FIGMA_TOKEN= 2 | FIGMA_DESIGN_TOKEN_FILE_KEY= 3 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@ubie/prettier-config'); 2 | -------------------------------------------------------------------------------- /.release-it.json: -------------------------------------------------------------------------------- 1 | { 2 | "git": { 3 | "commitMessage": "chore(release): 🤖 v${version}", 4 | "push": false 5 | }, 6 | "github": { 7 | "release": true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tokens/size/radius.json: -------------------------------------------------------------------------------- 1 | { 2 | "radius": { 3 | "full": { 4 | "value": "9999px" 5 | }, 6 | "lg": { 7 | "value": "12px" 8 | }, 9 | "md": { 10 | "value": "8px" 11 | }, 12 | "sm": { 13 | "value": "4px" 14 | }, 15 | "xl": { 16 | "value": "16px" 17 | }, 18 | "xs": { 19 | "value": "2px" 20 | }, 21 | "xxl": { 22 | "value": "24px" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Ubie Design Tokens 2 | Copyright (C) 2022 and onwards Ubie, Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish Package to npm 2 | on: 3 | push: 4 | tags: 5 | - 'v*' 6 | workflow_dispatch: 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | # Setup .npmrc file to publish to npm 14 | - uses: actions/setup-node@v4 15 | with: 16 | node-version: '20.x' 17 | registry-url: 'https://registry.npmjs.org' 18 | cache: 'npm' 19 | 20 | - run: npm ci 21 | 22 | - name: build tokens 23 | run: npm run build:tokens 24 | 25 | - run: npm publish 26 | env: 27 | NODE_AUTH_TOKEN: ${{ secrets.UBIE_NPM_TOKEN }} 28 | -------------------------------------------------------------------------------- /tokens/size/spacing.json: -------------------------------------------------------------------------------- 1 | { 2 | "size": { 3 | "spacing-lg": { 4 | "value": 1.5, 5 | "attributes": { 6 | "note": "24px" 7 | } 8 | }, 9 | "spacing-md": { 10 | "value": 1, 11 | "attributes": { 12 | "note": "16px" 13 | } 14 | }, 15 | "spacing-sm": { 16 | "value": 0.75, 17 | "attributes": { 18 | "note": "12px" 19 | } 20 | }, 21 | "spacing-xl": { 22 | "value": 2.5, 23 | "attributes": { 24 | "note": "40px" 25 | } 26 | }, 27 | "spacing-xs": { 28 | "value": 0.5, 29 | "attributes": { 30 | "note": "8px" 31 | } 32 | }, 33 | "spacing-xxl": { 34 | "value": 4, 35 | "attributes": { 36 | "note": "64px" 37 | } 38 | }, 39 | "spacing-xxs": { 40 | "value": 0.25, 41 | "attributes": { 42 | "note": "4px" 43 | } 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /tokens/size/icon.json: -------------------------------------------------------------------------------- 1 | { 2 | "icon": { 3 | "2xl": { 4 | "value": 4, 5 | "attributes": { 6 | "note": "64px" 7 | } 8 | }, 9 | "3xl": { 10 | "value": 5, 11 | "attributes": { 12 | "note": "80px" 13 | } 14 | }, 15 | "4xl": { 16 | "value": 6.5, 17 | "attributes": { 18 | "note": "104px" 19 | } 20 | }, 21 | "lg": { 22 | "value": 1.75, 23 | "attributes": { 24 | "note": "28px" 25 | } 26 | }, 27 | "md": { 28 | "value": 1.5, 29 | "attributes": { 30 | "note": "24px" 31 | } 32 | }, 33 | "sm": { 34 | "value": 1.25, 35 | "attributes": { 36 | "note": "20px" 37 | } 38 | }, 39 | "xl": { 40 | "value": 2, 41 | "attributes": { 42 | "note": "32px" 43 | } 44 | }, 45 | "xs": { 46 | "value": 1, 47 | "attributes": { 48 | "note": "16px" 49 | } 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@ubie/design-tokens", 3 | "version": "0.4.2", 4 | "description": "Ubie Design Tokens", 5 | "style": "dist/tokens.css", 6 | "main": "dist/tokens.js", 7 | "typings": "dist/tokens.d.ts", 8 | "files": [ 9 | "dist/**" 10 | ], 11 | "scripts": { 12 | "test": "echo \"Error: no test specified\" && exit 1", 13 | "build:tokens": "style-dictionary build", 14 | "build:figma": "node --env-file=.env ./scripts/figma.js", 15 | "fix": "prettier -w scripts", 16 | "prepublishOnly": "npm run build:tokens" 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "git+https://github.com/ubie-oss/design-tokens.git" 21 | }, 22 | "author": "", 23 | "license": "Apache-2.0", 24 | "bugs": { 25 | "url": "https://github.com/ubie-oss/design-tokens/issues" 26 | }, 27 | "homepage": "https://github.com/ubie-oss/design-tokens#readme", 28 | "devDependencies": { 29 | "@ubie/prettier-config": "^0.1.0", 30 | "node-fetch": "^3.2.0", 31 | "prettier": "^2.6.2", 32 | "style-dictionary": "^3.7.0" 33 | }, 34 | "publishConfig": { 35 | "access": "public" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "source": ["tokens/**/*.json"], 3 | "platforms": { 4 | "css": { 5 | "transformGroup": "css", 6 | "buildPath": "dist/", 7 | "files": [ 8 | { 9 | "destination": "tokens.css", 10 | "format": "css/variables", 11 | "options": { 12 | "outputReferences": true 13 | } 14 | }, 15 | { 16 | "destination": "tokens.scss", 17 | "format": "css/variables", 18 | "options": { 19 | "outputReferences": true 20 | } 21 | } 22 | ] 23 | }, 24 | "js": { 25 | "buildPath": "dist/", 26 | "transforms": ["attribute/cti", "name/cti/pascal", "size/rem", "color/hex8"], 27 | "files": [ 28 | { 29 | "destination": "tokens.js", 30 | "format": "javascript/module" 31 | } 32 | ] 33 | }, 34 | "ts": { 35 | "transformGroup": "js", 36 | "buildPath": "dist/", 37 | "files": [ 38 | { 39 | "destination": "tokens.d.ts", 40 | "format": "typescript/module-declarations" 41 | } 42 | ] 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /.github/workflows/update_tokens.yml: -------------------------------------------------------------------------------- 1 | name: Update Tokens 2 | 3 | on: [workflow_dispatch] 4 | 5 | jobs: 6 | create-pr: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v4 10 | with: 11 | ref: ${{ github.event.pull_request.head.ref }} 12 | fetch-depth: 0 13 | 14 | - name: Use Node.js 20 15 | uses: actions/setup-node@v4 16 | with: 17 | node-version: 20 18 | 19 | - name: Install dependencies 20 | run: npm ci 21 | 22 | - name: Get data from Figma 23 | run: FIGMA_TOKEN=${{ secrets.UBIE_FIGMA_TOKEN }} FIGMA_DESIGN_TOKEN_FILE_KEY=${{ secrets.FIGMA_DESIGN_TOKEN_FILE_KEY }} npm run build:figma 24 | 25 | - name: Build tokens 26 | run: npm run build:tokens 27 | 28 | - name: Create Pull Request 29 | uses: peter-evans/create-pull-request@v7 30 | with: 31 | token: ${{ secrets.GITHUB_TOKEN }} 32 | commit-message: 'feat:🎸 update tokens from figma' 33 | committer: GitHub 34 | author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> 35 | signoff: true 36 | branch: feat/update-tokens 37 | branch-suffix: timestamp 38 | delete-branch: true 39 | title: 'feat:🎸 update tokens from figma' 40 | body: Tokens has been updated 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ubie Design Tokens 2 | 3 | This is a package for using the design tokens defined in Ubie's products in development. Design tokens are managed in JSON format and are converted to the format for each platform using [Style Dictionary](https://amzn.github.io/style-dictionary/). 4 | 5 | Figma file is published in Figma Community. 6 | https://www.figma.com/community/file/1139108856002045571 7 | 8 | ## Usage 9 | 10 | ```bash 11 | npm install @ubie/design-tokens 12 | ``` 13 | 14 | This package contains files with three extensions: CSS, SCSS, and JS. 15 | 16 | ### CSS 17 | 18 | ```CSS 19 | @import url('node_modules/@ubie/design-tokens/dist/tokens.css'); 20 | ``` 21 | 22 | ### SCSS 23 | 24 | ```SCSS 25 | @import 'node_modules/@ubie/design-tokens/dist/tokens.scss'; 26 | ``` 27 | 28 | ### JS 29 | 30 | ```js 31 | import DesignTokens from '@ubie/design-tokens'; 32 | ``` 33 | 34 | ## Development 35 | 36 | 1. create .env file and include file id and token 37 | 38 | ```bash 39 | cp .env_sample .env 40 | ``` 41 | 42 | - You can generate a token from the settings page in Figma. 43 | - If you’re Ubie member and want to know FIGMA_DESIGN_TOKEN_FILE_KEY, please ask to `@designer` on Ubie Slack. 44 | 45 | 2. Convert design tokens defined in Figma to JSON format files 46 | 47 | ```bash 48 | npm run build:figma 49 | ``` 50 | 51 | 3. Converts JSON files to the format used by each platform 52 | 53 | ```bash 54 | npm run build:tokens 55 | ``` 56 | 57 | Edit `config.json` if you need to add a supported platform. 58 | 59 | ## LICENSE 60 | 61 | This Ubie Design Tokens is licensed under the [Apache License 2.0](https://github.com/ubie-oss/design-tokens/blob/main/LICENSE). 62 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Create Release PR 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | semver: 6 | description: 'New Version(semver)' 7 | required: true 8 | default: 'patch' 9 | type: choice 10 | options: 11 | - patch 12 | - minor 13 | - major 14 | 15 | jobs: 16 | auto-release: 17 | runs-on: ubuntu-latest 18 | env: 19 | NPM_TOKEN: ${{ secrets.UBIE_NPM_TOKEN }} 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | steps: 22 | - uses: actions/checkout@v4 23 | with: 24 | fetch-depth: 0 25 | - name: git config 26 | run: | 27 | git config user.name "${GITHUB_ACTOR}" 28 | git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" 29 | 30 | - uses: actions/setup-node@v4 31 | with: 32 | node-version: 20 33 | registry-url: 'https://registry.npmjs.org' 34 | - name: Set .npmrc 35 | run: echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc 36 | 37 | - name: Install 38 | run: npm ci 39 | - name: Build 40 | run: npm run build:tokens 41 | 42 | - name: Release 43 | run: npx release-it -i ${{ github.event.inputs.semver }} --ci 44 | 45 | - name: Set PACKAGE_VERSION 46 | run: echo "PACKAGE_VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV 47 | 48 | - name: Set GitHub Release Note 49 | id: release_note 50 | uses: actions/github-script@v7 51 | with: 52 | script: | 53 | const result = await exec.getExecOutput(`gh api "/repos/{owner}/{repo}/releases/generate-notes" -f tag_name="${process.env.PACKAGE_VERSION}" --jq .body`, [], { 54 | ignoreReturnCode: true, 55 | }) 56 | core.setOutput('stdout', result.stdout) 57 | env: 58 | PACKAGE_VERSION: ${{ env.PACKAGE_VERSION }} 59 | 60 | - name: Create Pull Request 61 | id: cpr 62 | uses: peter-evans/create-pull-request@v7 63 | with: 64 | token: ${{ secrets.GITHUB_TOKEN }} 65 | commit-message: 'chore(release): 🤖 v${{ env.PACKAGE_VERSION }}' 66 | committer: GitHub 67 | author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> 68 | assignees: ${{ github.actor }} 69 | signoff: true 70 | branch: release/${{ env.PACKAGE_VERSION }} 71 | branch-suffix: timestamp 72 | delete-branch: true 73 | title: 'chore(release): v${{ env.PACKAGE_VERSION }}' 74 | body: | 75 | ${{ steps.release_note.outputs.stdout }} 76 | labels: 'Type: Release' 77 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | The Ubie Design Tokens project accepts contributions via GitHub pull requests. This document outlines the process to help get your contribution accepted. 4 | 5 | ## Reporting a Security Issue 6 | 7 | Most of the time, when you find a bug in Ubie Design Tokens, it should be reported using [GitHub issues](https://github.com/ubie-oss/design-tokens/issues). However, if you are reporting a _security vulnerability_, please email a report to [security@dr-ubie.com](mailto:security@dr-ubie.com). This will give us a chance to try to fix the issue before it is exploited in the wild. 8 | 9 | ## Sign Your Work 10 | 11 | The sign-off is a simple line at the end of the explanation for a commit. All commits needs to be signed. Your signature certifies that you wrote the patch or otherwise have the right to contribute the material. The rules are pretty simple, if you can certify the below (from 12 | [developercertificate.org](https://developercertificate.org/)): 13 | 14 | ``` 15 | Developer Certificate of Origin 16 | Version 1.1 17 | 18 | Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 19 | 1 Letterman Drive 20 | Suite D4700 21 | San Francisco, CA, 94129 22 | 23 | Everyone is permitted to copy and distribute verbatim copies of this 24 | license document, but changing it is not allowed. 25 | 26 | Developer's Certificate of Origin 1.1 27 | 28 | By making a contribution to this project, I certify that: 29 | 30 | (a) The contribution was created in whole or in part by me and I 31 | have the right to submit it under the open source license 32 | indicated in the file; or 33 | 34 | (b) The contribution is based upon previous work that, to the best 35 | of my knowledge, is covered under an appropriate open source 36 | license and I have the right under that license to submit that 37 | work with modifications, whether created in whole or in part 38 | by me, under the same open source license (unless I am 39 | permitted to submit under a different license), as indicated 40 | in the file; or 41 | 42 | (c) The contribution was provided directly to me by some other 43 | person who certified (a), (b) or (c) and I have not modified 44 | it. 45 | 46 | (d) I understand and agree that this project and the contribution 47 | are public and that a record of the contribution (including all 48 | personal information I submit with it, including my sign-off) is 49 | maintained indefinitely and may be redistributed consistent with 50 | this project or the open source license(s) involved. 51 | ``` 52 | 53 | Then you just add a line to every git commit message: 54 | 55 | Signed-off-by: Joe Smith 56 | 57 | Use your real name (sorry, no pseudonyms or anonymous contributions.) 58 | 59 | If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`. 60 | 61 | Note: If your git config information is set properly then viewing the `git log` information for your commit will look something like this: 62 | 63 | ``` 64 | Author: Joe Smith 65 | Date: Thu Feb 2 11:41:15 2018 -0800 66 | 67 | Update README 68 | 69 | Signed-off-by: Joe Smith 70 | ``` 71 | 72 | Notice the `Author` and `Signed-off-by` lines match. If they don't your PR will be rejected by the automated DCO check. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.toptal.com/developers/gitignore/api/macos,node 3 | # Edit at https://www.toptal.com/developers/gitignore?templates=macos,node 4 | 5 | ### macOS ### 6 | # General 7 | .DS_Store 8 | .AppleDouble 9 | .LSOverride 10 | 11 | # Icon must end with two \r 12 | Icon 13 | 14 | 15 | # Thumbnails 16 | ._* 17 | 18 | # Files that might appear in the root of a volume 19 | .DocumentRevisions-V100 20 | .fseventsd 21 | .Spotlight-V100 22 | .TemporaryItems 23 | .Trashes 24 | .VolumeIcon.icns 25 | .com.apple.timemachine.donotpresent 26 | 27 | # Directories potentially created on remote AFP share 28 | .AppleDB 29 | .AppleDesktop 30 | Network Trash Folder 31 | Temporary Items 32 | .apdisk 33 | 34 | ### Node ### 35 | # Logs 36 | logs 37 | *.log 38 | npm-debug.log* 39 | yarn-debug.log* 40 | yarn-error.log* 41 | lerna-debug.log* 42 | .pnpm-debug.log* 43 | 44 | # Diagnostic reports (https://nodejs.org/api/report.html) 45 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 46 | 47 | # Runtime data 48 | pids 49 | *.pid 50 | *.seed 51 | *.pid.lock 52 | 53 | # Directory for instrumented libs generated by jscoverage/JSCover 54 | lib-cov 55 | 56 | # Coverage directory used by tools like istanbul 57 | coverage 58 | *.lcov 59 | 60 | # nyc test coverage 61 | .nyc_output 62 | 63 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 64 | .grunt 65 | 66 | # Bower dependency directory (https://bower.io/) 67 | bower_components 68 | 69 | # node-waf configuration 70 | .lock-wscript 71 | 72 | # Compiled binary addons (https://nodejs.org/api/addons.html) 73 | build/Release 74 | 75 | # Dependency directories 76 | node_modules/ 77 | jspm_packages/ 78 | 79 | # Snowpack dependency directory (https://snowpack.dev/) 80 | web_modules/ 81 | 82 | # TypeScript cache 83 | *.tsbuildinfo 84 | 85 | # Optional npm cache directory 86 | .npm 87 | 88 | # Optional eslint cache 89 | .eslintcache 90 | 91 | # Optional stylelint cache 92 | .stylelintcache 93 | 94 | # Microbundle cache 95 | .rpt2_cache/ 96 | .rts2_cache_cjs/ 97 | .rts2_cache_es/ 98 | .rts2_cache_umd/ 99 | 100 | # Optional REPL history 101 | .node_repl_history 102 | 103 | # Output of 'npm pack' 104 | *.tgz 105 | 106 | # Yarn Integrity file 107 | .yarn-integrity 108 | 109 | # dotenv environment variable files 110 | .env 111 | .env.development.local 112 | .env.test.local 113 | .env.production.local 114 | .env.local 115 | 116 | # parcel-bundler cache (https://parceljs.org/) 117 | .cache 118 | .parcel-cache 119 | 120 | # Next.js build output 121 | .next 122 | out 123 | 124 | # Nuxt.js build / generate output 125 | .nuxt 126 | dist 127 | 128 | # Gatsby files 129 | .cache/ 130 | # Comment in the public line in if your project uses Gatsby and not Next.js 131 | # https://nextjs.org/blog/next-9-1#public-directory-support 132 | # public 133 | 134 | # vuepress build output 135 | .vuepress/dist 136 | 137 | # vuepress v2.x temp and cache directory 138 | .temp 139 | 140 | # Docusaurus cache and generated files 141 | .docusaurus 142 | 143 | # Serverless directories 144 | .serverless/ 145 | 146 | # FuseBox cache 147 | .fusebox/ 148 | 149 | # DynamoDB Local files 150 | .dynamodb/ 151 | 152 | # TernJS port file 153 | .tern-port 154 | 155 | # Stores VSCode versions used for testing VSCode extensions 156 | .vscode-test 157 | 158 | # yarn v2 159 | .yarn/cache 160 | .yarn/unplugged 161 | .yarn/build-state.yml 162 | .yarn/install-state.gz 163 | .pnp.* 164 | 165 | ### Node Patch ### 166 | # Serverless Webpack directories 167 | .webpack/ 168 | 169 | # Optional stylelint cache 170 | 171 | # SvelteKit build / generate output 172 | .svelte-kit 173 | 174 | # End of https://www.toptal.com/developers/gitignore/api/macos,node -------------------------------------------------------------------------------- /tokens/color/primitive.json: -------------------------------------------------------------------------------- 1 | { 2 | "color": { 3 | "ubie-black-100": { 4 | "value": "#fafafaff" 5 | }, 6 | "ubie-black-1000": { 7 | "value": "#16191fff" 8 | }, 9 | "ubie-black-200": { 10 | "value": "#f6f6f6ff" 11 | }, 12 | "ubie-black-300": { 13 | "value": "#dcddddff" 14 | }, 15 | "ubie-black-400": { 16 | "value": "#c5c6c7ff" 17 | }, 18 | "ubie-black-500": { 19 | "value": "#96989aff" 20 | }, 21 | "ubie-black-600": { 22 | "value": "#686a6dff" 23 | }, 24 | "ubie-black-700": { 25 | "value": "#55575bff" 26 | }, 27 | "ubie-black-800": { 28 | "value": "#393c41ff" 29 | }, 30 | "ubie-black-900": { 31 | "value": "#32353aff" 32 | }, 33 | "ubie-blue-100": { 34 | "value": "#f0f2fcff" 35 | }, 36 | "ubie-blue-1000": { 37 | "value": "#1a285cff" 38 | }, 39 | "ubie-blue-200": { 40 | "value": "#cfd7f3ff" 41 | }, 42 | "ubie-blue-300": { 43 | "value": "#aab8e9ff" 44 | }, 45 | "ubie-blue-400": { 46 | "value": "#8296dfff" 47 | }, 48 | "ubie-blue-500": { 49 | "value": "#5d77d5ff" 50 | }, 51 | "ubie-blue-600": { 52 | "value": "#3959ccff" 53 | }, 54 | "ubie-blue-700": { 55 | "value": "#304cadff" 56 | }, 57 | "ubie-blue-800": { 58 | "value": "#283f91ff" 59 | }, 60 | "ubie-blue-900": { 61 | "value": "#203374ff" 62 | }, 63 | "ubie-green-100": { 64 | "value": "#e9faf4ff" 65 | }, 66 | "ubie-green-1000": { 67 | "value": "#125c41ff" 68 | }, 69 | "ubie-green-200": { 70 | "value": "#cbf3e5ff" 71 | }, 72 | "ubie-green-300": { 73 | "value": "#a2e9d0ff" 74 | }, 75 | "ubie-green-400": { 76 | "value": "#77dfbaff" 77 | }, 78 | "ubie-green-500": { 79 | "value": "#4ed5a5ff" 80 | }, 81 | "ubie-green-600": { 82 | "value": "#27cc91ff" 83 | }, 84 | "ubie-green-700": { 85 | "value": "#21ad7bff" 86 | }, 87 | "ubie-green-800": { 88 | "value": "#1c9167ff" 89 | }, 90 | "ubie-green-900": { 91 | "value": "#167453ff" 92 | }, 93 | "ubie-orange-100": { 94 | "value": "#fff9f0ff" 95 | }, 96 | "ubie-orange-1000": { 97 | "value": "#73480cff" 98 | }, 99 | "ubie-orange-200": { 100 | "value": "#ffe8c8ff" 101 | }, 102 | "ubie-orange-300": { 103 | "value": "#ffd79dff" 104 | }, 105 | "ubie-orange-400": { 106 | "value": "#ffc46fff" 107 | }, 108 | "ubie-orange-500": { 109 | "value": "#ffb243ff" 110 | }, 111 | "ubie-orange-600": { 112 | "value": "#ffa11aff" 113 | }, 114 | "ubie-orange-700": { 115 | "value": "#d98916ff" 116 | }, 117 | "ubie-orange-800": { 118 | "value": "#b57212ff" 119 | }, 120 | "ubie-orange-900": { 121 | "value": "#915c0fff" 122 | }, 123 | "ubie-pink-100": { 124 | "value": "#fcf0f5ff" 125 | }, 126 | "ubie-pink-1000": { 127 | "value": "#621632ff" 128 | }, 129 | "ubie-pink-200": { 130 | "value": "#f6ceddff" 131 | }, 132 | "ubie-pink-300": { 133 | "value": "#efa6c2ff" 134 | }, 135 | "ubie-pink-400": { 136 | "value": "#e87da5ff" 137 | }, 138 | "ubie-pink-500": { 139 | "value": "#e1568aff" 140 | }, 141 | "ubie-pink-600": { 142 | "value": "#da3170ff" 143 | }, 144 | "ubie-pink-700": { 145 | "value": "#b92a5fff" 146 | }, 147 | "ubie-pink-800": { 148 | "value": "#9b2350ff" 149 | }, 150 | "ubie-pink-900": { 151 | "value": "#7c1c40ff" 152 | }, 153 | "ubie-purple-100": { 154 | "value": "#f8effcff" 155 | }, 156 | "ubie-purple-1000": { 157 | "value": "#491667ff" 158 | }, 159 | "ubie-purple-200": { 160 | "value": "#e9cdf9ff" 161 | }, 162 | "ubie-purple-300": { 163 | "value": "#d7a6f3ff" 164 | }, 165 | "ubie-purple-400": { 166 | "value": "#c47deeff" 167 | }, 168 | "ubie-purple-500": { 169 | "value": "#b355e9ff" 170 | }, 171 | "ubie-purple-600": { 172 | "value": "#a230e4ff" 173 | }, 174 | "ubie-purple-700": { 175 | "value": "#8a29c2ff" 176 | }, 177 | "ubie-purple-800": { 178 | "value": "#7322a2ff" 179 | }, 180 | "ubie-purple-900": { 181 | "value": "#5c1b82ff" 182 | }, 183 | "ubie-red-100": { 184 | "value": "#fceff2ff" 185 | }, 186 | "ubie-red-1000": { 187 | "value": "#661526ff" 188 | }, 189 | "ubie-red-200": { 190 | "value": "#f8cdd6ff" 191 | }, 192 | "ubie-red-300": { 193 | "value": "#f3a5b6ff" 194 | }, 195 | "ubie-red-400": { 196 | "value": "#ed7b94ff" 197 | }, 198 | "ubie-red-500": { 199 | "value": "#e85474ff" 200 | }, 201 | "ubie-red-600": { 202 | "value": "#e32e55ff" 203 | }, 204 | "ubie-red-700": { 205 | "value": "#c12748ff" 206 | }, 207 | "ubie-red-800": { 208 | "value": "#a1213cff" 209 | }, 210 | "ubie-red-900": { 211 | "value": "#811a30ff" 212 | }, 213 | "ubie-white": { 214 | "value": "#ffffffff" 215 | } 216 | } 217 | } -------------------------------------------------------------------------------- /tokens/color/semantics.json: -------------------------------------------------------------------------------- 1 | { 2 | "color": { 3 | "background-black": { 4 | "value": "#fafafaff" 5 | }, 6 | "background-black-darken": { 7 | "value": "#f6f6f6ff" 8 | }, 9 | "background-black-inverse": { 10 | "value": "#686a6dff" 11 | }, 12 | "background-black-inverse-darken": { 13 | "value": "#55575bff" 14 | }, 15 | "background-blue": { 16 | "value": "#f0f2fcff" 17 | }, 18 | "background-blue-darken": { 19 | "value": "#cfd7f3ff" 20 | }, 21 | "background-blue-inverse": { 22 | "value": "#3959ccff" 23 | }, 24 | "background-blue-inverse-darken": { 25 | "value": "#283f91ff" 26 | }, 27 | "background-button-primary": { 28 | "value": "#3959ccff" 29 | }, 30 | "background-button-primary-darken": { 31 | "value": "#1a285cff" 32 | }, 33 | "background-green": { 34 | "value": "#e9faf4ff" 35 | }, 36 | "background-green-darken": { 37 | "value": "#cbf3e5ff" 38 | }, 39 | "background-green-inverse": { 40 | "value": "#27cc91ff" 41 | }, 42 | "background-green-inverse-darken": { 43 | "value": "#1c9167ff" 44 | }, 45 | "background-modal": { 46 | "value": "#00000080" 47 | }, 48 | "background-orange": { 49 | "value": "#fff9f0ff" 50 | }, 51 | "background-orange-darken": { 52 | "value": "#ffe8c8ff" 53 | }, 54 | "background-orange-inverse": { 55 | "value": "#ffa11aff" 56 | }, 57 | "background-orange-inverse-darken": { 58 | "value": "#b57212ff" 59 | }, 60 | "background-pink": { 61 | "value": "#fcf0f5ff" 62 | }, 63 | "background-pink-darken": { 64 | "value": "#f6ceddff" 65 | }, 66 | "background-pink-inverse": { 67 | "value": "#da3170ff" 68 | }, 69 | "background-pink-inverse-darken": { 70 | "value": "#9b2350ff" 71 | }, 72 | "background-purple": { 73 | "value": "#f8effcff" 74 | }, 75 | "background-purple-darken": { 76 | "value": "#e9cdf9ff" 77 | }, 78 | "background-purple-inverse": { 79 | "value": "#a230e4ff" 80 | }, 81 | "background-purple-inverse-darken": { 82 | "value": "#7322a2ff" 83 | }, 84 | "background-red": { 85 | "value": "#fceff2ff" 86 | }, 87 | "background-red-darken": { 88 | "value": "#f8cdd6ff" 89 | }, 90 | "background-red-inverse": { 91 | "value": "#e32e55ff" 92 | }, 93 | "background-red-inverse-darken": { 94 | "value": "#a1213cff" 95 | }, 96 | "background-white": { 97 | "value": "#ffffffff" 98 | }, 99 | "border-black": { 100 | "value": "#c5c6c7ff" 101 | }, 102 | "border-black-darken": { 103 | "value": "#96989aff" 104 | }, 105 | "border-black-lighten": { 106 | "value": "#f6f6f6ff" 107 | }, 108 | "border-blue": { 109 | "value": "#8296dfff" 110 | }, 111 | "border-blue-darken": { 112 | "value": "#5d77d5ff" 113 | }, 114 | "border-green": { 115 | "value": "#77dfbaff" 116 | }, 117 | "border-green-darken": { 118 | "value": "#4ed5a5ff" 119 | }, 120 | "border-orange": { 121 | "value": "#ffc46fff" 122 | }, 123 | "border-orange-darken": { 124 | "value": "#ffb243ff" 125 | }, 126 | "border-pink": { 127 | "value": "#e87da5ff" 128 | }, 129 | "border-pink-darken": { 130 | "value": "#e1568aff" 131 | }, 132 | "border-purple": { 133 | "value": "#c47deeff" 134 | }, 135 | "border-purple-darken": { 136 | "value": "#b355e9ff" 137 | }, 138 | "border-red": { 139 | "value": "#ed7b94ff" 140 | }, 141 | "border-red-darken": { 142 | "value": "#e85474ff" 143 | }, 144 | "border-white": { 145 | "value": "#ffffffff" 146 | }, 147 | "gradation-background-000": { 148 | "value": "#fcf0f5ff" 149 | }, 150 | "gradation-background-100": { 151 | "value": "#f0f2fcff" 152 | }, 153 | "gradation-icon-000": { 154 | "value": "#e87da5ff" 155 | }, 156 | "gradation-icon-085": { 157 | "value": "#aab8e9ff" 158 | }, 159 | "gradation-icon-100": { 160 | "value": "#c6cff1ff" 161 | }, 162 | "gradation-primary-000": { 163 | "value": "#efa6c2ff" 164 | }, 165 | "gradation-primary-100": { 166 | "value": "#aab8e9ff" 167 | }, 168 | "gradation-primary-accent-000": { 169 | "value": "#da3170ff" 170 | }, 171 | "gradation-primary-accent-050": { 172 | "value": "#a230e4ff" 173 | }, 174 | "gradation-primary-accent-100": { 175 | "value": "#3959ccff" 176 | }, 177 | "text-black": { 178 | "value": "#393c41ff" 179 | }, 180 | "text-black-darken": { 181 | "value": "#32353aff" 182 | }, 183 | "text-blue": { 184 | "value": "#283f91ff" 185 | }, 186 | "text-blue-darken": { 187 | "value": "#203374ff" 188 | }, 189 | "text-button": { 190 | "value": "#3959ccff" 191 | }, 192 | "text-button-alert": { 193 | "value": "#e32e55ff" 194 | }, 195 | "text-button-alert-darken": { 196 | "value": "#a1213cff" 197 | }, 198 | "text-button-darken": { 199 | "value": "#1a285cff" 200 | }, 201 | "text-disabled": { 202 | "value": "#dcddddff" 203 | }, 204 | "text-green": { 205 | "value": "#1c9167ff" 206 | }, 207 | "text-green-darken": { 208 | "value": "#167453ff" 209 | }, 210 | "text-link": { 211 | "value": "#3959ccff" 212 | }, 213 | "text-link-sub": { 214 | "value": "#686a6dff" 215 | }, 216 | "text-main": { 217 | "value": "#32353aff" 218 | }, 219 | "text-orange": { 220 | "value": "#b57212ff" 221 | }, 222 | "text-orange-darken": { 223 | "value": "#915c0fff" 224 | }, 225 | "text-pink": { 226 | "value": "#da3170ff" 227 | }, 228 | "text-pink-darken": { 229 | "value": "#7c1c40ff" 230 | }, 231 | "text-placeholder": { 232 | "value": "#96989aff" 233 | }, 234 | "text-purple": { 235 | "value": "#7322a2ff" 236 | }, 237 | "text-purple-darken": { 238 | "value": "#5c1b82ff" 239 | }, 240 | "text-red": { 241 | "value": "#a1213cff" 242 | }, 243 | "text-red-darken": { 244 | "value": "#811a30ff" 245 | }, 246 | "text-sub": { 247 | "value": "#686a6dff" 248 | }, 249 | "text-white": { 250 | "value": "#ffffffff" 251 | } 252 | } 253 | } -------------------------------------------------------------------------------- /scripts/figma.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const { promisify } = require('util'); 3 | const path = require('path'); 4 | const fetch = (...args) => import('node-fetch').then(({ default: fetch }) => fetch(...args)); 5 | const writeFile = promisify(fs.writeFile); 6 | 7 | const TOKEN = process.env.FIGMA_TOKEN; 8 | const FIGMA_FILE_KEY = process.env.FIGMA_DESIGN_TOKEN_FILE_KEY; 9 | const ROOT_FONT_SIZE = 16; 10 | 11 | const fetchFigma = (path) => 12 | fetch(`https://api.figma.com/v1/files/${FIGMA_FILE_KEY}${path}`, { 13 | headers: { 14 | 'X-FIGMA-TOKEN': TOKEN, 15 | }, 16 | }).then((response) => response.json()); 17 | 18 | const rgbaToHex = (r, g, b, a) => { 19 | const hr = Math.round(r).toString(16).padStart(2, '0'); 20 | const hg = Math.round(g).toString(16).padStart(2, '0'); 21 | const hb = Math.round(b).toString(16).padStart(2, '0'); 22 | const ha = !a 23 | ? '' 24 | : Math.round(a * 255) 25 | .toString(16) 26 | .padStart(2, '0'); 27 | 28 | return '#' + hr + hg + hb + ha; 29 | }; 30 | 31 | const sortObjectByKeys = (obj) => { 32 | return Object.keys(obj).sort().reduce((acc, key) => { 33 | acc[key] = obj[key]; 34 | return acc; 35 | }, {}); 36 | }; 37 | 38 | const extractAttribute = (name, document) => { 39 | if (name.startsWith('border')) { 40 | return document.strokes[0]; 41 | } else if (name.startsWith('text')) { 42 | return document.children[0].fills[0]; 43 | } else { 44 | return document.fills[0]; 45 | } 46 | }; 47 | 48 | const main = async () => { 49 | // Get components value 50 | const responseComponents = await fetchFigma('/components'); 51 | const components = responseComponents.meta.components; 52 | 53 | const componentNodeIds = components.map((component) => component.node_id); 54 | const componentNodeIdsQuery = componentNodeIds.join(','); 55 | const { nodes: componentNodes } = await fetchFigma(`/nodes?ids=${componentNodeIdsQuery}`); 56 | 57 | // Generate color tokens 58 | const primitiveColors = {}; 59 | 60 | Object.values(componentNodes) 61 | .filter(({ document }) => document.name.includes('PrimitiveColor')) 62 | .forEach(({ document }) => { 63 | const name = document.name.split('/')[1].toLowerCase(); 64 | const c = document.fills[0].color; 65 | primitiveColors[name] = { 66 | value: rgbaToHex(c.r * 255, c.g * 255, c.b * 255, c.a), 67 | }; 68 | }); 69 | 70 | const semanticColors = {}; 71 | 72 | Object.values(componentNodes) 73 | .filter(({ document }) => document.name.includes('SemanticColor')) 74 | .forEach(({ document }) => { 75 | const name = document.name.split('/')[1].toLowerCase(); 76 | 77 | // グラデーションの場合は、グラデーションの色を取得する 78 | if (document.fills && document.fills.length > 0 && document.fills[0].type === 'GRADIENT_LINEAR') { 79 | document.fills[0].gradientStops.forEach((gradientStop) => { 80 | const { color } = gradientStop; 81 | const alpha = gradientStop.opacity != null ? gradientStop.opacity : color.a; 82 | semanticColors[`${name}-${String(Math.floor(gradientStop.position * 100)).padStart(3, '0')}`] = { 83 | value: rgbaToHex(color.r * 255, color.g * 255, color.b * 255, alpha), 84 | }; 85 | }); 86 | } else { 87 | const attribute = extractAttribute(name, document); 88 | const { color } = attribute; 89 | const alpha = attribute.opacity != null ? attribute.opacity : color.a; 90 | semanticColors[name] = { 91 | value: rgbaToHex(color.r * 255, color.g * 255, color.b * 255, alpha), 92 | }; 93 | } 94 | }); 95 | 96 | const primitiveColorContent = JSON.stringify({ 97 | color: sortObjectByKeys(primitiveColors), 98 | }, null, 2); 99 | 100 | const semanticsColorContent = JSON.stringify({ 101 | color: sortObjectByKeys(semanticColors), 102 | }, null, 2); 103 | 104 | // Generate Spacing tokens 105 | const spacings = {}; 106 | Object.values(componentNodes) 107 | .filter(({ document }) => document.name.includes('Spacing')) 108 | .forEach(({ document }) => { 109 | const name = 'spacing' + '-' + document.name.split('/')[1].toLowerCase(); 110 | const srcValue = document.absoluteBoundingBox.width; 111 | const value = Number(srcValue) / ROOT_FONT_SIZE; 112 | spacings[name] = { 113 | value: value, 114 | attributes: { 115 | note: `${srcValue}px`, 116 | }, 117 | }; 118 | }); 119 | 120 | const spacingContent = JSON.stringify({ 121 | size: sortObjectByKeys(spacings), 122 | }, null, 2); 123 | 124 | // Generate Typography tokens 125 | const typography = {}; 126 | Object.values(componentNodes) 127 | .filter(({ document }) => document.name.includes('Typography')) 128 | .forEach(({ document }) => { 129 | const name = document.name.split('/')[1].toLowerCase(); 130 | const textComponent = document.children.find((child) => child.name === document.name && child.type === 'TEXT'); 131 | const srcLineHeight = textComponent.style.lineHeightPercentFontSize; 132 | const srcFontSize = textComponent.style.fontSize; 133 | const lineHeight = srcLineHeight / 100; 134 | const fontSize = srcFontSize / ROOT_FONT_SIZE + 'rem'; 135 | typography[[name, 'size'].join('-')] = { 136 | value: fontSize, 137 | attributes: { 138 | note: `${srcFontSize}px`, 139 | }, 140 | }; 141 | typography[[name, 'line'].join('-')] = { 142 | value: lineHeight, 143 | attributes: { 144 | note: `${srcLineHeight}%`, 145 | }, 146 | }; 147 | }); 148 | 149 | const typographyContent = JSON.stringify({ 150 | text: sortObjectByKeys({ 151 | ...typography, 152 | 'base-family': { 153 | value: 154 | "-apple-system, 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif, 'Segoe UI Emoji'", 155 | }, 156 | }), 157 | }, null, 2); 158 | 159 | // Generate Radius tokens 160 | const radius = {}; 161 | Object.values(componentNodes) 162 | .filter(({ document }) => document.name.includes('Radius')) 163 | .forEach(({ document }) => { 164 | const name = document.name.split('/')[1].toLowerCase(); 165 | const value = document.cornerRadius; 166 | radius[name] = { 167 | value: `${value}px`, 168 | }; 169 | }); 170 | 171 | const radiusContent = JSON.stringify({ 172 | radius: sortObjectByKeys(radius), 173 | }, null, 2); 174 | 175 | // Generate size/icon tokens 176 | const icon = {}; 177 | Object.values(componentNodes) 178 | .filter(({ document }) => document.name.includes('IconSize')) 179 | .forEach(({ document }) => { 180 | const name = document.name.split('/')[1].toLowerCase(); 181 | const srcValue = document.absoluteBoundingBox.width; 182 | const value = Number(srcValue) / ROOT_FONT_SIZE; 183 | icon[name] = { 184 | value: value, 185 | attributes: { 186 | note: `${srcValue}px`, 187 | }, 188 | }; 189 | }); 190 | 191 | const iconContent = JSON.stringify({ 192 | icon: sortObjectByKeys(icon), 193 | }, null, 2); 194 | 195 | await writeFile(path.resolve(__dirname, '../tokens/color/primitive.json'), primitiveColorContent); 196 | await writeFile(path.resolve(__dirname, '../tokens/color/semantics.json'), semanticsColorContent); 197 | await writeFile(path.resolve(__dirname, '../tokens/size/spacing.json'), spacingContent); 198 | await writeFile(path.resolve(__dirname, '../tokens/text/typography.json'), typographyContent); 199 | await writeFile(path.resolve(__dirname, '../tokens/size/radius.json'), radiusContent); 200 | await writeFile(path.resolve(__dirname, '../tokens/size/icon.json'), iconContent); 201 | console.log('DONE'); 202 | }; 203 | 204 | main(); 205 | -------------------------------------------------------------------------------- /tokens/text/typography.json: -------------------------------------------------------------------------------- 1 | { 2 | "text": { 3 | "base-family": { 4 | "value": "-apple-system, 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif, 'Segoe UI Emoji'" 5 | }, 6 | "body-lg-line": { 7 | "value": 1.7, 8 | "attributes": { 9 | "note": "170%" 10 | } 11 | }, 12 | "body-lg-narrow-line": { 13 | "value": 1.4, 14 | "attributes": { 15 | "note": "140%" 16 | } 17 | }, 18 | "body-lg-narrow-size": { 19 | "value": "1.125rem", 20 | "attributes": { 21 | "note": "18px" 22 | } 23 | }, 24 | "body-lg-size": { 25 | "value": "1.125rem", 26 | "attributes": { 27 | "note": "18px" 28 | } 29 | }, 30 | "body-lg-wide-line": { 31 | "value": 2, 32 | "attributes": { 33 | "note": "200%" 34 | } 35 | }, 36 | "body-lg-wide-size": { 37 | "value": "1.125rem", 38 | "attributes": { 39 | "note": "18px" 40 | } 41 | }, 42 | "body-md-line": { 43 | "value": 1.7, 44 | "attributes": { 45 | "note": "170%" 46 | } 47 | }, 48 | "body-md-narrow-line": { 49 | "value": 1.4, 50 | "attributes": { 51 | "note": "140%" 52 | } 53 | }, 54 | "body-md-narrow-size": { 55 | "value": "1rem", 56 | "attributes": { 57 | "note": "16px" 58 | } 59 | }, 60 | "body-md-size": { 61 | "value": "1rem", 62 | "attributes": { 63 | "note": "16px" 64 | } 65 | }, 66 | "body-md-wide-line": { 67 | "value": 2, 68 | "attributes": { 69 | "note": "200%" 70 | } 71 | }, 72 | "body-md-wide-size": { 73 | "value": "1rem", 74 | "attributes": { 75 | "note": "16px" 76 | } 77 | }, 78 | "body-sm-line": { 79 | "value": 1.7, 80 | "attributes": { 81 | "note": "170%" 82 | } 83 | }, 84 | "body-sm-narrow-line": { 85 | "value": 1.4, 86 | "attributes": { 87 | "note": "140%" 88 | } 89 | }, 90 | "body-sm-narrow-size": { 91 | "value": "0.875rem", 92 | "attributes": { 93 | "note": "14px" 94 | } 95 | }, 96 | "body-sm-size": { 97 | "value": "0.875rem", 98 | "attributes": { 99 | "note": "14px" 100 | } 101 | }, 102 | "body-sm-wide-line": { 103 | "value": 2, 104 | "attributes": { 105 | "note": "200%" 106 | } 107 | }, 108 | "body-sm-wide-size": { 109 | "value": "0.875rem", 110 | "attributes": { 111 | "note": "14px" 112 | } 113 | }, 114 | "body-xs-line": { 115 | "value": 1.7, 116 | "attributes": { 117 | "note": "170%" 118 | } 119 | }, 120 | "body-xs-narrow-line": { 121 | "value": 1.5, 122 | "attributes": { 123 | "note": "150%" 124 | } 125 | }, 126 | "body-xs-narrow-size": { 127 | "value": "0.75rem", 128 | "attributes": { 129 | "note": "12px" 130 | } 131 | }, 132 | "body-xs-size": { 133 | "value": "0.75rem", 134 | "attributes": { 135 | "note": "12px" 136 | } 137 | }, 138 | "body-xs-wide-line": { 139 | "value": 2, 140 | "attributes": { 141 | "note": "200%" 142 | } 143 | }, 144 | "body-xs-wide-size": { 145 | "value": "0.75rem", 146 | "attributes": { 147 | "note": "12px" 148 | } 149 | }, 150 | "button-lg-line": { 151 | "value": 1.5, 152 | "attributes": { 153 | "note": "150%" 154 | } 155 | }, 156 | "button-lg-size": { 157 | "value": "1rem", 158 | "attributes": { 159 | "note": "16px" 160 | } 161 | }, 162 | "button-md-line": { 163 | "value": 1.5, 164 | "attributes": { 165 | "note": "150%" 166 | } 167 | }, 168 | "button-md-size": { 169 | "value": "0.875rem", 170 | "attributes": { 171 | "note": "14px" 172 | } 173 | }, 174 | "button-sm-line": { 175 | "value": 1.5, 176 | "attributes": { 177 | "note": "150%" 178 | } 179 | }, 180 | "button-sm-size": { 181 | "value": "0.75rem", 182 | "attributes": { 183 | "note": "12px" 184 | } 185 | }, 186 | "heading-lg-line": { 187 | "value": 1.5, 188 | "attributes": { 189 | "note": "150%" 190 | } 191 | }, 192 | "heading-lg-size": { 193 | "value": "1.5rem", 194 | "attributes": { 195 | "note": "24px" 196 | } 197 | }, 198 | "heading-lg-wide-line": { 199 | "value": 1.7, 200 | "attributes": { 201 | "note": "170%" 202 | } 203 | }, 204 | "heading-lg-wide-size": { 205 | "value": "1.5rem", 206 | "attributes": { 207 | "note": "24px" 208 | } 209 | }, 210 | "heading-md-line": { 211 | "value": 1.5, 212 | "attributes": { 213 | "note": "150%" 214 | } 215 | }, 216 | "heading-md-size": { 217 | "value": "1.25rem", 218 | "attributes": { 219 | "note": "20px" 220 | } 221 | }, 222 | "heading-md-wide-line": { 223 | "value": 1.7, 224 | "attributes": { 225 | "note": "170%" 226 | } 227 | }, 228 | "heading-md-wide-size": { 229 | "value": "1.25rem", 230 | "attributes": { 231 | "note": "20px" 232 | } 233 | }, 234 | "heading-sm-line": { 235 | "value": 1.5, 236 | "attributes": { 237 | "note": "150%" 238 | } 239 | }, 240 | "heading-sm-size": { 241 | "value": "1.125rem", 242 | "attributes": { 243 | "note": "18px" 244 | } 245 | }, 246 | "heading-sm-wide-line": { 247 | "value": 1.7, 248 | "attributes": { 249 | "note": "170%" 250 | } 251 | }, 252 | "heading-sm-wide-size": { 253 | "value": "1.125rem", 254 | "attributes": { 255 | "note": "18px" 256 | } 257 | }, 258 | "heading-xl-line": { 259 | "value": 1.5, 260 | "attributes": { 261 | "note": "150%" 262 | } 263 | }, 264 | "heading-xl-size": { 265 | "value": "1.75rem", 266 | "attributes": { 267 | "note": "28px" 268 | } 269 | }, 270 | "heading-xl-wide-line": { 271 | "value": 1.7, 272 | "attributes": { 273 | "note": "170%" 274 | } 275 | }, 276 | "heading-xl-wide-size": { 277 | "value": "1.75rem", 278 | "attributes": { 279 | "note": "28px" 280 | } 281 | }, 282 | "heading-xs-line": { 283 | "value": 1.5, 284 | "attributes": { 285 | "note": "150%" 286 | } 287 | }, 288 | "heading-xs-size": { 289 | "value": "1rem", 290 | "attributes": { 291 | "note": "16px" 292 | } 293 | }, 294 | "heading-xs-wide-line": { 295 | "value": 1.7, 296 | "attributes": { 297 | "note": "170%" 298 | } 299 | }, 300 | "heading-xs-wide-size": { 301 | "value": "1rem", 302 | "attributes": { 303 | "note": "16px" 304 | } 305 | }, 306 | "heading-xxs-line": { 307 | "value": 1.5, 308 | "attributes": { 309 | "note": "150%" 310 | } 311 | }, 312 | "heading-xxs-size": { 313 | "value": "0.875rem", 314 | "attributes": { 315 | "note": "14px" 316 | } 317 | }, 318 | "heading-xxs-wide-line": { 319 | "value": 1.7, 320 | "attributes": { 321 | "note": "170%" 322 | } 323 | }, 324 | "heading-xxs-wide-size": { 325 | "value": "0.875rem", 326 | "attributes": { 327 | "note": "14px" 328 | } 329 | }, 330 | "tag-lg-line": { 331 | "value": 1.5, 332 | "attributes": { 333 | "note": "150%" 334 | } 335 | }, 336 | "tag-lg-size": { 337 | "value": "0.875rem", 338 | "attributes": { 339 | "note": "14px" 340 | } 341 | }, 342 | "tag-md-line": { 343 | "value": 1.5, 344 | "attributes": { 345 | "note": "150%" 346 | } 347 | }, 348 | "tag-md-size": { 349 | "value": "0.75rem", 350 | "attributes": { 351 | "note": "12px" 352 | } 353 | }, 354 | "tag-xs-line": { 355 | "value": 1.5, 356 | "attributes": { 357 | "note": "150%" 358 | } 359 | }, 360 | "tag-xs-size": { 361 | "value": "0.625rem", 362 | "attributes": { 363 | "note": "10px" 364 | } 365 | } 366 | } 367 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright 2022 Ubie, Inc. 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. --------------------------------------------------------------------------------