diff --git a/.commitlintrc.json b/.commitlintrc.json new file mode 100644 index 000000000..f4fbb7dde --- /dev/null +++ b/.commitlintrc.json @@ -0,0 +1,3 @@ +{ + "extends": ["@commitlint/config-conventional"] +} diff --git a/.eslintrc.js b/.eslintrc.js index e276aee96..e6a22e179 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,9 +1,14 @@ module.exports = { - root: true, - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:storybook/recommended"], - env: { - "node": true - } -}; \ No newline at end of file + root: true, + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:storybook/recommended', + 'plugin:prettier/recommended', + ], + env: { + node: true, + }, +}; diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..fb7ceecb6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.snap filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..523251211 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,17 @@ +## SUMMARY: + +## GITHUB ISSUE (Open Source Contributors) + +## JIRA TASK (Eightfold Employees Only): + +## CHANGE TYPE: + +- [ ] Bugfix Pull Request +- [ ] Feature Pull Request + +## TEST COVERAGE: + +- [ ] Tests for this change already exist +- [ ] I have added unittests for this change + +## TEST PLAN: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..088233b76 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,49 @@ +name: Build + +on: + push: + branches: + - main + - main-next + pull_request: + branches: + - main + - main-next + +env: + NODE_VERSION: 16.14.2 +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Load cached node_modules + uses: actions/cache@v3 + with: + path: node_modules + key: node_modules-${{ hashFiles('yarn.lock') }} + - run: yarn + - run: yarn test + - name: Upload code coverage + uses: codecov/codecov-action@v2 + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Load cached node_modules + uses: actions/cache@v3 + with: + path: node_modules + key: node_modules-${{ hashFiles('yarn.lock') }} + - run: yarn + - run: yarn lint + diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml new file mode 100644 index 000000000..f9db6471b --- /dev/null +++ b/.github/workflows/chromatic.yml @@ -0,0 +1,26 @@ +name: 'Chromatic' + +on: push + +env: + NODE_VERSION: 16.14.2 +jobs: + chromatic-deployment: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Load cached node_modules + uses: actions/cache@v3 + with: + path: node_modules + key: node_modules-${{ hashFiles('yarn.lock') }} + - run: yarn + - name: Publish to Chromatic + uses: chromaui/action@v1 + with: + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 000000000..8f9803bf3 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,132 @@ +name: Publish Octuple + +on: + push: + tags: + - 'v*' + +env: + NODE_VERSION: 16.14.2 +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + - run: yarn + - run: yarn test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - name: Get version from tag + id: tag_name + run: | + echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v} + shell: bash + - name: Prerelease check + id: prerelease_check + if: contains(steps.tag_name.outputs.current_version, '-') + run: | + echo ::set-output name=prerelease::true + - name: Checkout code + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + registry-url: https://registry.npmjs.org/ + - name: Run Yarn + run: yarn + - name: Publish release to npm + if: steps.prerelease_check.outputs.prerelease != 'true' + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.npm_token }} + - name: Publish prerelease to npm + if: steps.prerelease_check.outputs.prerelease == 'true' + run: npm publish --tag prerelease + env: + NODE_AUTH_TOKEN: ${{ secrets.npm_token }} + - name: Get Changelog Entry + id: changelog_reader + uses: artlaman/conventional-changelog-reader-action@v1.1.0 + with: + version: ${{ steps.tag_name.outputs.current_version }} + path: ./CHANGELOG.md + - name: Create/update release + uses: ncipollo/release-action@v1 + with: + name: Release ${{ steps.changelog_reader.outputs.version }} + body: ${{ steps.changelog_reader.outputs.changes }} + prerelease: ${{ steps.prerelease_check.outputs.prerelease == 'true' }} + allowUpdates: true + token: ${{ secrets.GITHUB_TOKEN }} + - name: Slack Markdown Converter + id: slack_md_converter + uses: LoveToKnow/slackify-markdown-action@v1.0.0 + with: + text: ${{ steps.changelog_reader.outputs.changes }} + - name: Prepare slack message + id: slack_prepare + run: | + CHANGE_LOG="${{ steps.slack_md_converter.outputs.text }}" + CHANGE_LOG="$(echo "$CHANGE_LOG" | sed -z 's/\n/\\n/g')" + echo "::set-output name=changelog::${CHANGE_LOG}" + - name: Post to Slack channel + uses: slackapi/slack-github-action@v1.19.0 + with: + payload: | + { + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": "📦 Release ${{ steps.changelog_reader.outputs.version }}" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "${{ steps.slack_prepare.outputs.changelog }}" + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": " " + }, + "accessory": { + "type": "button", + "text": { + "type": "plain_text", + "text": "📦 Go to Release", + "emoji": true + }, + "url": "https://github.com/EightfoldAI/octuple/releases/tag/v${{ steps.changelog_reader.outputs.version }}" + } + } + ] + } + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + - run: yarn build-storybook + if: steps.prerelease_check.outputs.prerelease != 'true' + - name: Pushes to another repository + if: steps.prerelease_check.outputs.prerelease != 'true' + uses: cpina/github-action-push-to-another-repository@main + env: + API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + with: + source-directory: 'dist' + destination-github-username: 'EightfoldAI' + destination-repository-name: 'octuple.github.io' + user-email: ychhabra@eightfold.ai + target-branch: main + diff --git a/.gitignore b/.gitignore index 41290ff3a..23cd2d9b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. +# ide files +.idea + # dependencies /node_modules /.pnp @@ -13,12 +16,17 @@ /dist # misc +stats.json .DS_Store .env.local .env.development.local .env.test.local .env.production.local +*.scss.d.ts + npm-debug.log* yarn-debug.log* yarn-error.log* + +build-storybook.log diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 000000000..d71a03b9f --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn commitlint --edit $1 diff --git a/.husky/post-checkout b/.husky/post-checkout new file mode 100755 index 000000000..c37815e2b --- /dev/null +++ b/.husky/post-checkout @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-checkout'.\n"; exit 2; } +git lfs post-checkout "$@" diff --git a/.husky/post-commit b/.husky/post-commit new file mode 100755 index 000000000..e5230c305 --- /dev/null +++ b/.husky/post-commit @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-commit'.\n"; exit 2; } +git lfs post-commit "$@" diff --git a/.husky/post-merge b/.husky/post-merge new file mode 100755 index 000000000..c99b752a5 --- /dev/null +++ b/.husky/post-merge @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-merge'.\n"; exit 2; } +git lfs post-merge "$@" diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..d2ae35e84 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn lint-staged diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 000000000..216e91527 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/pre-push'.\n"; exit 2; } +git lfs pre-push "$@" diff --git a/.npmignore b/.npmignore index 01d00de32..f28e7aa72 100644 --- a/.npmignore +++ b/.npmignore @@ -7,6 +7,8 @@ src .storybook/ .vscode/ +.husky/ +.github/ LICENSE MANIFEST @@ -14,17 +16,23 @@ npm-debug.log* README.md stats.json tsconfig.json -webpack.config.js +webpack.common.js +webpack.dev.js +webpack.prod.js yarn.lock yarn-debug.log* yarn-error.log* +commitlint.config.js .eslintignore .eslintrc.js +.commitlintrc.json +.prettierrc.js .DS_Store .env.development.local .env.local .env.production.local .env.test.local +.versionrc.json -lib/octuple.js.LICENSE.txt \ No newline at end of file +lib/octuple.js.LICENSE.txt diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 000000000..7441bec94 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,7 @@ +module.exports = { + trailingComma: 'es5', + tabWidth: 4, + semi: true, + singleQuote: true, + jsxSingleQuote: false, +}; diff --git a/.storybook/main.js b/.storybook/main.js index 4405cf07d..34e764c22 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,56 +1,44 @@ -const path = require('path'); +const webpackCommon = require('../webpack.common'); module.exports = { stories: [ '../src/**/*.stories.mdx', - '../src/**/*.stories.@(js|jsx|ts|tsx)' + '../src/**/*.stories.@(js|jsx|ts|tsx)', ], addons: [ - '@storybook/addon-actions', - '@storybook/addon-docs', '@storybook/addon-essentials', '@storybook/addon-interactions', - '@storybook/addon-links' + '@storybook/addon-links', + 'storybook-css-modules', ], staticDirs: ['../public/assets'], - framework: "@storybook/react", + framework: '@storybook/react', core: { - "builder": "webpack5" + builder: 'webpack5', }, typescript: { check: false, checkOptions: {}, - reactDocgen: "react-docgen-typescript", + reactDocgen: 'react-docgen-typescript', reactDocgenTypescriptOptions: { shouldExtractLiteralValuesFromEnum: true, - propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true), + propFilter: (prop) => + prop.parent ? !/node_modules/.test(prop.parent.fileName) : true, }, }, webpackFinal: async (config, { configType }) => { - // `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION' - // You can change the configuration based on that. - // 'PRODUCTION' is used when building the static version of storybook. - - const fileLoaderRule = config.module.rules.find(rule => rule.test && rule.test.test('.svg')); - fileLoaderRule.exclude = /\.svg$/; - - config.module.rules.push( - { - test: /\.s[ca]ss|css$/, - use: ['style-loader', 'css-loader', 'resolve-url-loader', 'sass-loader'], - include: path.resolve(__dirname, '../') - }, - { - test: /\.svg$/, - use: ['@svgr/webpack', 'file-loader', 'url-loader'], - include: path.resolve(__dirname, '../') - } + const webpackCommonConfig = webpackCommon( + {}, + { mode: configType.toLowerCase() } ); - - config.resolve.fallback = { - http: false - } - - return config; - }, -}; \ No newline at end of file + return { + ...config, + optimization: webpackCommonConfig.optimization, + plugins: [...config.plugins, ...webpackCommonConfig.plugins], + module: { + ...config.module, + rules: webpackCommonConfig.module.rules, + }, + }; + }, +}; diff --git a/.storybook/manager.js b/.storybook/manager.js index d59e4c75b..f608b029d 100644 --- a/.storybook/manager.js +++ b/.storybook/manager.js @@ -1,7 +1,6 @@ import { addons } from '@storybook/addons'; -import { themes } from '@storybook/theming'; import octupleTheme from './octupleTheme'; addons.setConfig({ - theme: octupleTheme -}); \ No newline at end of file + theme: octupleTheme, +}); diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html index 2cffbe737..95a970841 100644 --- a/.storybook/preview-head.html +++ b/.storybook/preview-head.html @@ -1,228 +1,26 @@ - - + \ No newline at end of file + diff --git a/.versionrc.json b/.versionrc.json new file mode 100644 index 000000000..00297e594 --- /dev/null +++ b/.versionrc.json @@ -0,0 +1,14 @@ +{ + "types": [ + { "type": "feat", "section": "Features" }, + { "type": "fix", "section": "Bug Fixes" }, + { "type": "chore", "hidden": true }, + { "type": "docs", "hidden": true }, + { "type": "style", "hidden": true }, + { "type": "refactor", "hidden": true }, + { "type": "perf", "hidden": true }, + { "type": "test", "hidden": true } + ], + "commitUrlFormat": "https://github.com/EightfoldAI/octuple/commits/{{hash}}", + "compareUrlFormat": "https://github.com/EightfoldAI/octuple/compare/{{previousTag}}...{{currentTag}}" +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..2e4d87cd8 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,598 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [1.19.0](https://github.com/EightfoldAI/octuple/compare/v1.18.0...v1.19.0) (2022-07-25) + +### Features + +- added filter options ([#252](https://github.com/EightfoldAI/octuple/issues/252)) ([5d14a7c](https://github.com/EightfoldAI/octuple/commits/5d14a7c749109b1c07e3772e12d97001b5a6caa8)) + +### Bug Fixes + +- export TextInputSize ([#254](https://github.com/EightfoldAI/octuple/issues/254)) ([04ef8f0](https://github.com/EightfoldAI/octuple/commits/04ef8f004d584c608c214ad183663c0aef5efc12)) +- radiobutton: multiple radio buttons on the same page doesnt work as intended ([#253](https://github.com/EightfoldAI/octuple/issues/253)) ([664c531](https://github.com/EightfoldAI/octuple/commits/664c5311a8a90f240536a35ca66e47ab6ff4caec)) + +## [1.18.0](https://github.com/EightfoldAI/octuple/compare/v1.17.0...v1.18.0) (2022-07-21) + +### Features + +- icon: adds mdi "auto-fix" icon ([#236](https://github.com/EightfoldAI/octuple/issues/236)) ([e1b99bb](https://github.com/EightfoldAI/octuple/commits/e1b99bb7f7668717174ea31d927d7bf7203e52ec)) +- input: add inline prop ([#239](https://github.com/EightfoldAI/octuple/issues/239)) ([e52d79a](https://github.com/EightfoldAI/octuple/commits/e52d79a5ac411dbced3c19dabf618cf8262c189a)) +- input: add underline variant ([#237](https://github.com/EightfoldAI/octuple/issues/237)) ([553fee7](https://github.com/EightfoldAI/octuple/commits/553fee7ea5512541f1402069b8389751b29c9ece)) +- modal: add three additional header action button props ([#244](https://github.com/EightfoldAI/octuple/issues/244)) ([60abc1f](https://github.com/EightfoldAI/octuple/commits/60abc1f90ef8e18a277ccf48f8cfed74c84d153f)) + +### Bug Fixes + +- select: fixes pills, filtering, empty text, and spinner position ([#243](https://github.com/EightfoldAI/octuple/issues/243)) ([c1bcf24](https://github.com/EightfoldAI/octuple/commits/c1bcf24f47d75d70e1eb74c07a82681de370321a)) +- select: Move chevron indicator to the right side ([#240](https://github.com/EightfoldAI/octuple/issues/240)) ([e1d3ac0](https://github.com/EightfoldAI/octuple/commits/e1d3ac0071c93a3956a754aa7fc96b63a39b40d4)) +- toggle hover dropdown on click, fixed dropdown flicker on close ([#238](https://github.com/EightfoldAI/octuple/issues/238)) ([ad9f340](https://github.com/EightfoldAI/octuple/commits/ad9f340558875f9be148d47015d3ecd795a5e838)) +- usematchmedia: implement addlistener fallback for older browsers ([#241](https://github.com/EightfoldAI/octuple/issues/241)) ([f27b5bc](https://github.com/EightfoldAI/octuple/commits/f27b5bc35fea6b33af841384e85be1e175495245)) + +## [1.17.0](https://github.com/EightfoldAI/octuple/compare/v1.16.0...v1.17.0) (2022-07-14) + +### Features + +- add ability to pass custom class to table header ([#224](https://github.com/EightfoldAI/octuple/issues/224)) ([e819423](https://github.com/EightfoldAI/octuple/commits/e819423ff72688bf2597f2e1c6c67683dc8a0a6a)) +- datepicker: adds date and time picker components ([#233](https://github.com/EightfoldAI/octuple/issues/233)) ([14e652c](https://github.com/EightfoldAI/octuple/commits/14e652c52cffef5922807e24ea5d153a2bbcc30f)) + +### Bug Fixes + +- datepicker: adds missing module selector ([#235](https://github.com/EightfoldAI/octuple/issues/235)) ([4cf98b0](https://github.com/EightfoldAI/octuple/commits/4cf98b091aa268c0c47ea425ffd656a5f9740405)) +- prevent slider from firing onChange during init ([#232](https://github.com/EightfoldAI/octuple/issues/232)) ([5616347](https://github.com/EightfoldAI/octuple/commits/5616347496448384494a03b879c9c01fb2c5813e)) + +## [1.16.0](https://github.com/EightfoldAI/octuple/compare/v1.15.3...v1.16.0) (2022-07-08) + +### Features + +- add persistent bar ([#229](https://github.com/EightfoldAI/octuple/issues/229)) ([c760e07](https://github.com/EightfoldAI/octuple/commits/c760e0756b9cba57e03cced654ee45367a7f0d3b)) + +### [1.15.3](https://github.com/EightfoldAI/octuple/compare/v1.15.2...v1.15.3) (2022-07-08) + +### [1.15.2](https://github.com/EightfoldAI/octuple/compare/v1.15.1...v1.15.2) (2022-07-07) + +### [1.15.1](https://github.com/EightfoldAI/octuple/compare/v1.15.1-0...v1.15.1) (2022-07-07) + +### [1.15.1-0](https://github.com/EightfoldAI/octuple/compare/v1.15.0...v1.15.1-0) (2022-07-07) + +### Bug Fixes + +- export slider component ([#221](https://github.com/EightfoldAI/octuple/issues/221)) ([a048ad2](https://github.com/EightfoldAI/octuple/commits/a048ad29004907df24c38bdbcce308ca2ea90cd9)) + +## [1.15.0](https://github.com/EightfoldAI/octuple/compare/v1.14.3...v1.15.0) (2022-07-01) + +### Features + +- eng-22373: enable floating buttons ([#212](https://github.com/EightfoldAI/octuple/issues/212)) ([d1ac476](https://github.com/EightfoldAI/octuple/commits/d1ac476302172a387514bfcb4434afc881f06ec6)) + +### Bug Fixes + +- remove buttons from menu item ([#202](https://github.com/EightfoldAI/octuple/issues/202)) ([305c932](https://github.com/EightfoldAI/octuple/commits/305c932e1ee7e594ec6e856654a3baa97b1b4126)) + +### [1.14.3](https://github.com/EightfoldAI/octuple/compare/v1.14.2...v1.14.3) (2022-06-30) + +### Features + +- dropdown: add ability to portal ([#210](https://github.com/EightfoldAI/octuple/issues/210)) ([9a385ca](https://github.com/EightfoldAI/octuple/commits/9a385ca16aae7d8ae02a77b2439340b1e4d93499)) + +### Bug Fixes + +- table: increase selection column size, add border bottom header prop ([#209](https://github.com/EightfoldAI/octuple/issues/209)) ([2a36bee](https://github.com/EightfoldAI/octuple/commits/2a36beebce09cd58929b6ddc41b0e41b7fba0743)) + +### [1.14.2](https://github.com/EightfoldAI/octuple/compare/v1.14.1...v1.14.2) (2022-06-28) + +### Features + +- add layout type for radiogroup, checkboxgroup ([#207](https://github.com/EightfoldAI/octuple/issues/207)) ([3ecb719](https://github.com/EightfoldAI/octuple/commits/3ecb7192edf3c1767edb1f071d7f49985bc03ba8)) + +### Bug Fixes + +- tabs: allign first item to the left ([#208](https://github.com/EightfoldAI/octuple/issues/208)) ([daa2175](https://github.com/EightfoldAI/octuple/commits/daa21756884f1c0741d7e61d3b306b3e0daa5896)) +- update button font sizes and outline colors ([#206](https://github.com/EightfoldAI/octuple/issues/206)) ([2fccac3](https://github.com/EightfoldAI/octuple/commits/2fccac34714049486dd599405da15faa27969186)) + +### [1.14.1](https://github.com/EightfoldAI/octuple/compare/v1.13.0...v1.14.1) (2022-06-24) + +### Features + +- table: add table component ([#193](https://github.com/EightfoldAI/octuple/issues/193)) ([427bca7](https://github.com/EightfoldAI/octuple/commits/427bca77438eff26a02a5d13fcfc914f007c51f4)) + +### Bug Fixes + +- button: removes focus outline and border style when not in keyboard mode ([#205](https://github.com/EightfoldAI/octuple/issues/205)) ([142200e](https://github.com/EightfoldAI/octuple/commits/142200ef8f763dbecbbf0ef4eeb137567cf00aff)) + +## [1.14.0](https://github.com/EightfoldAI/octuple/compare/v1.13.0...v1.14.0) (2022-06-24) + +### Features + +- table: add table component ([#193](https://github.com/EightfoldAI/octuple/issues/193)) ([427bca7](https://github.com/EightfoldAI/octuple/commits/427bca77438eff26a02a5d13fcfc914f007c51f4)) + +### Bug Fixes + +- button: removes focus outline and border style when not in keyboard mode ([#205](https://github.com/EightfoldAI/octuple/issues/205)) ([142200e](https://github.com/EightfoldAI/octuple/commits/142200ef8f763dbecbbf0ef4eeb137567cf00aff)) + +## [1.13.0](https://github.com/EightfoldAI/octuple/compare/v1.8.0...v1.13.0) (2022-06-23) + +### Features + +- added navbar component ([#201](https://github.com/EightfoldAI/octuple/issues/201)) ([2866410](https://github.com/EightfoldAI/octuple/commits/286641030e28cab1ee47bc060a513c442b88e459)) + +## [1.12.0](https://github.com/EightfoldAI/octuple/compare/v1.11.2...v1.12.0) (2022-06-22) + +### Features + +- add Slider component ([#190](https://github.com/EightfoldAI/octuple/issues/190)) ([8c8712d](https://github.com/EightfoldAI/octuple/commits/8c8712db1abbd31d3e408b4e378031949b23d581)) + +### Bug Fixes + +- interaction bugs in input, accordion and buttons ([#198](https://github.com/EightfoldAI/octuple/issues/198)) ([f5c1246](https://github.com/EightfoldAI/octuple/commits/f5c1246bd4a31ad8c9796a0830820dddd5b2a20b)) + +### [1.11.2](https://github.com/EightfoldAI/octuple/compare/v1.11.1...v1.11.2) (2022-06-22) + +### Features + +- add ability to define theme at a component level ([#197](https://github.com/EightfoldAI/octuple/issues/197)) ([11ef3c0](https://github.com/EightfoldAI/octuple/commits/11ef3c0de582f1bc62990e0d1b2ae266fa3a432c)) + +### Bug Fixes + +- textarea: event persist issue in react 16 ([#199](https://github.com/EightfoldAI/octuple/issues/199)) ([4ea9809](https://github.com/EightfoldAI/octuple/commits/4ea9809de0eac70115597179e1938313b29e92f6)) + +### [1.11.1](https://github.com/EightfoldAI/octuple/compare/v1.11.0...v1.11.1) (2022-06-21) + +### Features + +- icon: adds two mdi icons, account eye and its outline variant ([#196](https://github.com/EightfoldAI/octuple/issues/196)) ([f1d744b](https://github.com/EightfoldAI/octuple/commits/f1d744b632e9dc1087a0e18979cc1169c7551201)) + +### Bug Fixes + +- add total in dependencies to pickup latest changes ([#195](https://github.com/EightfoldAI/octuple/issues/195)) ([11a6d4b](https://github.com/EightfoldAI/octuple/commits/11a6d4b8b198ef5fef157f0c22859a1d1a484a5c)) + +## [1.11.0](https://github.com/EightfoldAI/octuple/compare/v1.10.0...v1.11.0) (2022-06-16) + +### Features + +- add neutral menu type, add default dropdown offset ([#189](https://github.com/EightfoldAI/octuple/issues/189)) ([e70b338](https://github.com/EightfoldAI/octuple/commits/e70b338953a15694f92488d42b88487d5d710793)) +- button: adds counter badge support to all buttons ([#187](https://github.com/EightfoldAI/octuple/issues/187)) ([45eaec1](https://github.com/EightfoldAI/octuple/commits/45eaec1f04d9a8bf212bd0c776c50e5bfbfaab74)) + +### Bug Fixes + +- pagination: ensure jumper applies current page ([#182](https://github.com/EightfoldAI/octuple/issues/182)) ([16d26fa](https://github.com/EightfoldAI/octuple/commits/16d26fa6b593ba77b79be33fe813f3532379d3a8)) + +## [1.10.0](https://github.com/EightfoldAI/octuple/compare/v1.9.1...v1.10.0) (2022-06-14) + +### Features + +- empty: adds empty state component ([#180](https://github.com/EightfoldAI/octuple/issues/180)) ([9927e96](https://github.com/EightfoldAI/octuple/commits/9927e96641c014159c41c161da8d33707675cddb)) +- tooltip: adds portal prop to tooltips ([#179](https://github.com/EightfoldAI/octuple/issues/179)) ([e48479a](https://github.com/EightfoldAI/octuple/commits/e48479a8b0f5c8eac3439a322a6ee4a991edac26)) + +### Bug Fixes + +- inputs: adds forward ref support, adjusts default wait interval ([#177](https://github.com/EightfoldAI/octuple/issues/177)) ([996f8d6](https://github.com/EightfoldAI/octuple/commits/996f8d62f8dd28030f5fd41ce81434e24c6ae3a9)) +- pagination: enables page size and jumper controls and hides elements via total ([#178](https://github.com/EightfoldAI/octuple/issues/178)) ([d8de579](https://github.com/EightfoldAI/octuple/commits/d8de57926f4c2029a1e7379d40293cecd37aafc5)) +- radio button: add classnames prop to radio button ([#176](https://github.com/EightfoldAI/octuple/issues/176)) ([3810d9a](https://github.com/EightfoldAI/octuple/commits/3810d9a5d77d4effb6c6b0d71cbadf6fcbf1baca)) + +### [1.9.1](https://github.com/EightfoldAI/octuple/compare/v1.9.0...v1.9.1) (2022-06-13) + +### Bug Fixes + +- modal: disable scroll in body on x axis ([#173](https://github.com/EightfoldAI/octuple/issues/173)) ([d6f38df](https://github.com/EightfoldAI/octuple/commits/d6f38dfdde99abfc6892a631f34c0cc2d92a4a0b)) + +## [1.9.0](https://github.com/EightfoldAI/octuple/compare/v1.8.1...v1.9.0) (2022-06-13) + +### Features + +- adds select component ([#155](https://github.com/EightfoldAI/octuple/issues/155)) ([2dc3bd7](https://github.com/EightfoldAI/octuple/commits/2dc3bd7835da49a26adb16c6b1e75a8e1dcf1146)) + +### Bug Fixes + +- tooltip: allow pointer events when tooltip is disabled ([#172](https://github.com/EightfoldAI/octuple/issues/172)) ([c99e226](https://github.com/EightfoldAI/octuple/commits/c99e2264ed57f8988eff1343440cc473ef136680)) + +### [1.8.1](https://github.com/EightfoldAI/octuple/compare/v1.8.0...v1.8.1) (2022-06-10) + +### Bug Fixes + +- modal: make position strategy fixed by default ([#171](https://github.com/EightfoldAI/octuple/issues/171)) ([98c7af5](https://github.com/EightfoldAI/octuple/commits/98c7af58ef68a99815e7ddab279b0e478aa5b71a)) + +## [1.8.0](https://github.com/EightfoldAI/octuple/compare/v1.7.2...v1.8.0) (2022-06-08) + +### Bug Fixes + +- fixed search event persist issue ([#169](https://github.com/EightfoldAI/octuple/issues/169)) ([55c99df](https://github.com/EightfoldAI/octuple/commits/55c99dfe1aff29e6e91b1995b8c516086db061ff)) +- handle onScrollLock cleanly, dialog to render inside parent element ([#168](https://github.com/EightfoldAI/octuple/issues/168)) ([e9a5f0e](https://github.com/EightfoldAI/octuple/commits/e9a5f0e23d2de336aa2bca64c319b20003ab8c7d)) + +### [1.7.2](https://github.com/EightfoldAI/octuple/compare/v1.7.1...v1.7.2) (2022-06-02) + +### Bug Fixes + +- pass classnames to icons in base button ([#159](https://github.com/EightfoldAI/octuple/issues/159)) ([bcfb1a6](https://github.com/EightfoldAI/octuple/commits/bcfb1a66b0110b9e7f2ac9df579cf63596e7c249)) + +### [1.7.1](https://github.com/EightfoldAI/octuple/compare/v1.7.0...v1.7.1) (2022-06-01) + +### Bug Fixes + +- button: update default color scheme to use primary ([#158](https://github.com/EightfoldAI/octuple/issues/158)) ([a8af8d9](https://github.com/EightfoldAI/octuple/commits/a8af8d91772e02a9ab298c9bc2ee5e1ac4c3dc6d)) + +## [1.7.0](https://github.com/EightfoldAI/octuple/compare/v1.6.0...v1.7.0) (2022-05-31) + +### Bug Fixes + +- forward classNames to tab component ([#157](https://github.com/EightfoldAI/octuple/issues/157)) ([bb032ac](https://github.com/EightfoldAI/octuple/commits/bb032acf4a801bf2f57a8c9d7b5c04590ec7db16)) +- improve usability of checkbox, checkbox group, radio and radio group component ([#156](https://github.com/EightfoldAI/octuple/issues/156)) ([7369636](https://github.com/EightfoldAI/octuple/commits/736963614e8b0a311a70e8e953fd6b1bdcf79c9f)) + +## [1.6.0](https://github.com/EightfoldAI/octuple/compare/v1.5.3...v1.6.0) (2022-05-30) + +### Features + +- config provider: move css variables to root selector, make base font size configurable ([#150](https://github.com/EightfoldAI/octuple/issues/150)) ([db84a9b](https://github.com/EightfoldAI/octuple/commits/db84a9b50b44550f68c187e70c8e62d07733f0f7)) +- storybook: adds storybook controls and documentation ([#147](https://github.com/EightfoldAI/octuple/issues/147)) ([2ab1362](https://github.com/EightfoldAI/octuple/commits/2ab1362ec2ea3a8dc0361132d8126a51b5701ca8)) + +### Bug Fixes + +- modal: fix styling of modal header ([#149](https://github.com/EightfoldAI/octuple/issues/149)) ([10fc5d6](https://github.com/EightfoldAI/octuple/commits/10fc5d61bdc49b48e374c5ca2a61b6acdcc0ecaa)) +- selectors: adds null check to radio button onchange event ([#145](https://github.com/EightfoldAI/octuple/issues/145)) ([499c4f5](https://github.com/EightfoldAI/octuple/commits/499c4f5d96eba1f878e7113bfd792731d3aaa548)) + +### [1.5.3](https://github.com/EightfoldAI/octuple/compare/v1.5.2...v1.5.3) (2022-05-25) + +### Bug Fixes + +- extend RadioButtonProps and CheckBoxProps to OcBaseProps ([#143](https://github.com/EightfoldAI/octuple/issues/143)) ([08e9696](https://github.com/EightfoldAI/octuple/commits/08e969600a36c420ed12f3bb60b0cc48d65f947d)) +- remove classname prop from CheckBoxProps ([#144](https://github.com/EightfoldAI/octuple/issues/144)) ([bdce5c3](https://github.com/EightfoldAI/octuple/commits/bdce5c3c25e9f9486661ccf6b49eca8663ffdb06)) + +### [1.5.2](https://github.com/EightfoldAI/octuple/compare/v1.5.1...v1.5.2) (2022-05-24) + +### [1.5.1](https://github.com/EightfoldAI/octuple/compare/v1.5.0...v1.5.1) (2022-05-24) + +### Bug Fixes + +- exports: adds stack and selectors to exports ([#139](https://github.com/EightfoldAI/octuple/issues/139)) ([a209f3b](https://github.com/EightfoldAI/octuple/commits/a209f3ba2eca8e8a7a673e8bec17e1fefbc8344d)) + +## [1.5.0](https://github.com/EightfoldAI/octuple/compare/v1.4.0...v1.5.0) (2022-05-24) + +### Features + +- add ... ([#132](https://github.com/EightfoldAI/octuple/issues/132)) ([57e3ee7](https://github.com/EightfoldAI/octuple/commits/57e3ee7a5e8c2f52ecb162f7a1f5c6ef8c3e5e4c)) +- add Accordion component ([#126](https://github.com/EightfoldAI/octuple/issues/126)) ([9b9e7fe](https://github.com/EightfoldAI/octuple/commits/9b9e7fe670ddeedd40472f0b294fdc3cf69e6bf3)) +- add checkbox and radio button components ([#56](https://github.com/EightfoldAI/octuple/issues/56)) ([80bc310](https://github.com/EightfoldAI/octuple/commits/80bc310df554a7b0527dcf6403f2e31e0f6801d7)) +- added link component ([#135](https://github.com/EightfoldAI/octuple/issues/135)) ([b9ecc0f](https://github.com/EightfoldAI/octuple/commits/b9ecc0f09033e011a7b78121f584af5209f430b8)) + +### Bug Fixes + +- button: fixes bugs in split and toggle buttons ([#133](https://github.com/EightfoldAI/octuple/issues/133)) ([b28024d](https://github.com/EightfoldAI/octuple/commits/b28024dcb8d99e6e3ba9c36d45f97782cbb1911d)) + +## [1.4.0](https://github.com/EightfoldAI/octuple/compare/v1.3.0...v1.4.0) (2022-05-24) + +### Features + +- added avatar component ([#131](https://github.com/EightfoldAI/octuple/issues/131)) ([3f12842](https://github.com/EightfoldAI/octuple/commits/3f128427b6b8d819f18ae2cb5876994fe3c0f30e)) +- added support for icomoon icons ([#129](https://github.com/EightfoldAI/octuple/issues/129)) ([637f986](https://github.com/EightfoldAI/octuple/commits/637f986f6887fd360f55b22021bad8451b9494ee)) + +### Bug Fixes + +- click on menu item not working intermittently ([#128](https://github.com/EightfoldAI/octuple/issues/128)) ([d4d52a4](https://github.com/EightfoldAI/octuple/commits/d4d52a4868857a5440ee26cb0b0428a468a9fccc)) + +## [1.3.0](https://github.com/EightfoldAI/octuple/compare/v1.2.0...v1.3.0) (2022-05-19) + +### Features + +- pagination: adds pagination component ([#121](https://github.com/EightfoldAI/octuple/issues/121)) ([dd8fa43](https://github.com/EightfoldAI/octuple/commits/dd8fa438f81a286a7860bd5d55d11a9370b310fa)) + +### Bug Fixes + +- button: use root inverse text color instead of local variable ([#119](https://github.com/EightfoldAI/octuple/issues/119)) ([95f2c12](https://github.com/EightfoldAI/octuple/commits/95f2c1245279045dd40bedfa50aa962733186898)) +- input: fixes onchange handler of inputs ([#120](https://github.com/EightfoldAI/octuple/issues/120)) ([e5158e3](https://github.com/EightfoldAI/octuple/commits/e5158e381fe34ba98b596567964bf6184ea93647)) +- pixel baseline: removes rem calculations ([#124](https://github.com/EightfoldAI/octuple/issues/124)) ([2739633](https://github.com/EightfoldAI/octuple/commits/27396335937f95ffa99fead987ea2fdb4f447720)) +- snackbar: handle snackbar width on different screen sizes ([#116](https://github.com/EightfoldAI/octuple/issues/116)) ([c1b8d6c](https://github.com/EightfoldAI/octuple/commits/c1b8d6cac2a04216ea94d080628e50ddfabb8691)) +- text input: hides clear button for number inputs ([#118](https://github.com/EightfoldAI/octuple/issues/118)) ([2738e1d](https://github.com/EightfoldAI/octuple/commits/2738e1d0ac86556943f45a89e551d506c0215119)) + +## [1.2.0](https://github.com/EightfoldAI/octuple/compare/v1.1.0...v1.2.0) (2022-05-13) + +### Features + +- accessibility and i18n: adds keyboard focus, canvas direction support ([#109](https://github.com/EightfoldAI/octuple/issues/109)) ([c6704b3](https://github.com/EightfoldAI/octuple/commits/c6704b36db85c6c3ecd1f27f1a5f8e486ce987ff)) +- adds octuple spinner component ([#114](https://github.com/EightfoldAI/octuple/issues/114)) ([702931d](https://github.com/EightfoldAI/octuple/commits/702931d45d8101bfc37d938dbe01aabea0e4f6f3)) + +### Bug Fixes + +- button: ensures the height of buttons and clarifies class names ([#112](https://github.com/EightfoldAI/octuple/issues/112)) ([882b3fd](https://github.com/EightfoldAI/octuple/commits/882b3fdcdced40202bb959e6bb99fc9c2a5f4566)) +- text input: adds line height to text input to prevent descenders from clipping ([#113](https://github.com/EightfoldAI/octuple/issues/113)) ([362dc1b](https://github.com/EightfoldAI/octuple/commits/362dc1b557736c6a94a5bfaaf8d3f9cf89ae7459)) + +## [1.1.0](https://github.com/EightfoldAI/octuple/compare/v1.0.0...v1.1.0) (2022-05-05) + +### Features + +- abstract out common component props as oc base props, add ability to forward ref ([#106](https://github.com/EightfoldAI/octuple/issues/106)) ([f9c6f1b](https://github.com/EightfoldAI/octuple/commits/f9c6f1b601ac9a5aafba6b3e6b7783ac3265cb5c)) + +## [1.0.0](https://github.com/EightfoldAI/octuple/compare/v0.0.17...v1.0.0) (2022-05-03) + +### ⚠ BREAKING CHANGES + +- classnames and icon props must be updated to match latest + +- fix: match score: updates references and classname prop + +### Features + +- add match score component 🟢 🟢 🟢 ⚪️ ⚪️ ([#92](https://github.com/EightfoldAI/octuple/issues/92)) ([99f07ec](https://github.com/EightfoldAI/octuple/commits/99f07ec4179f22c05163b8d2da6263eaf2c99b76)) +- props: normalize label, classnames, button alignment and iconprops ([#97](https://github.com/EightfoldAI/octuple/issues/97)) ([5b3456a](https://github.com/EightfoldAI/octuple/commits/5b3456a322b977210f580383fb2e74e042e1fb31)) + +### Bug Fixes + +- tabs: use tab value to set the current active tab([#100](https://github.com/EightfoldAI/octuple/issues/100)) ([5e0ec1f](https://github.com/EightfoldAI/octuple/commits/5e0ec1f8962ab4a615e7c6f145d16fd4411c92ee)) + +### [0.0.17](https://github.com/EightfoldAI/octuple/compare/v0.0.16...v0.0.17) (2022-05-02) + +### Features + +- adds octuple badge, use badge in tabs ([#89](https://github.com/EightfoldAI/octuple/issues/89)) ([81f6fa5](https://github.com/EightfoldAI/octuple/commits/81f6fa596848ba041f163bf2ec71a1b989b3522a)) +- change menu item value to type any ([#93](https://github.com/EightfoldAI/octuple/issues/93)) ([b5cff2e](https://github.com/EightfoldAI/octuple/commits/b5cff2e6b808c3ddbf8b14b7e8461dca20ab5dc8)) + +### Bug Fixes + +- button: fixes button height and min width in flex layouts ([#95](https://github.com/EightfoldAI/octuple/issues/95)) ([0ba62c0](https://github.com/EightfoldAI/octuple/commits/0ba62c0adbd1c8d0a3c5df805d368f9bc1d86b21)) +- dropdown: fix memory leak in dropdowns, change position strategy to absolute ([#90](https://github.com/EightfoldAI/octuple/issues/90)) ([25de4bf](https://github.com/EightfoldAI/octuple/commits/25de4bfd78afa2dae2731bb7ff84910e719b1322)) +- tooltip: dont show tooltip if no content ([#94](https://github.com/EightfoldAI/octuple/issues/94)) ([13f6a2e](https://github.com/EightfoldAI/octuple/commits/13f6a2e70e8efa6529240e24508dc564a6bec327)) + +### [0.0.16](https://github.com/EightfoldAI/octuple/compare/v0.0.15...v0.0.16) (2022-04-28) + +### Features + +- adds octuple info bars ([#84](https://github.com/EightfoldAI/octuple/issues/84)) ([3ef3840](https://github.com/EightfoldAI/octuple/commits/3ef3840944a9c4a7e258644fc632ecc470650658)) +- adds octuple snackbar component ([#81](https://github.com/EightfoldAI/octuple/issues/81)) ([6559c78](https://github.com/EightfoldAI/octuple/commits/6559c78308417cff306ef7a19f17399f6b17768e)) +- button: adds two state button component ([#80](https://github.com/EightfoldAI/octuple/issues/80)) ([3ea58e3](https://github.com/EightfoldAI/octuple/commits/3ea58e35a7f3efa58c44647cad10af8784e9a542)) + +### Bug Fixes + +- modal scrollbar only if content is scrollable ([#78](https://github.com/EightfoldAI/octuple/issues/78)) ([e72ffb8](https://github.com/EightfoldAI/octuple/commits/e72ffb8ce2506bbf5d540f00220b701e2ff259c8)) +- panel: footer not sticking to the bottom ([#83](https://github.com/EightfoldAI/octuple/issues/83)) ([e31a070](https://github.com/EightfoldAI/octuple/commits/e31a070fe1ccbcc30f42de4ec9d53190fab78626)) +- tabs: remove background from tabs ([#85](https://github.com/EightfoldAI/octuple/issues/85)) ([4ddb663](https://github.com/EightfoldAI/octuple/commits/4ddb6630a6de32f8c62b679957af09a041e41b27)) + +### [0.0.15](https://github.com/EightfoldAI/octuple/compare/v0.0.14...v0.0.15) (2022-04-20) + +### Features + +- adds octuples modal component, handle mobile view in dialog ([#65](https://github.com/EightfoldAI/octuple/issues/65)) ([3dfd43f](https://github.com/EightfoldAI/octuple/commits/3dfd43f9763e44026de4e7f0a98928b083610db9)) + +### [0.0.14](https://github.com/EightfoldAI/octuple/compare/v0.0.13...v0.0.14) (2022-04-19) + +### Bug Fixes + +- button: move unreferenced global style into the module ([#74](https://github.com/EightfoldAI/octuple/issues/74)) ([3f87bcd](https://github.com/EightfoldAI/octuple/commits/3f87bcd7b9c612a3bcd103a9899a9f812d27d6cd)) + +### [0.0.13](https://github.com/EightfoldAI/octuple/compare/v0.0.12...v0.0.13) (2022-04-19) + +### Features + +- handle inverse themes in config provider ([#67](https://github.com/EightfoldAI/octuple/issues/67)) ([a8ac667](https://github.com/EightfoldAI/octuple/commits/a8ac667cc2e4f19f5fc68d31ad2a3b5f06badd4f)) + +### [0.0.12](https://github.com/EightfoldAI/octuple/compare/v0.0.11...v0.0.12) (2022-04-13) + +### Bug Fixes + +- input: ensures there is no visible outline on clear button hover ([#63](https://github.com/EightfoldAI/octuple/issues/63)) ([38258a9](https://github.com/EightfoldAI/octuple/commits/38258a95c1585d2dea053176bae0a5bc55674e4c)) + +### [0.0.11](https://github.com/EightfoldAI/octuple/compare/v0.0.10...v0.0.11) (2022-04-13) + +### Features + +- adds octuple panel component, add portal component ([#55](https://github.com/EightfoldAI/octuple/issues/55)) ([4e1a7e1](https://github.com/EightfoldAI/octuple/commits/4e1a7e14348f9bb6b4bbe281872b9d8ec5941e09)) +- adds octuples dialog component ([#58](https://github.com/EightfoldAI/octuple/issues/58)) ([7fbf365](https://github.com/EightfoldAI/octuple/commits/7fbf3651d3ce53c63f953a49bc9e53b0e42f8e84)) +- button: add split button component ([#57](https://github.com/EightfoldAI/octuple/issues/57)) ([46246b7](https://github.com/EightfoldAI/octuple/commits/46246b74514b3ae234517ecfa9a52fe9242ab9cd)) + +### Bug Fixes + +- button: fixes disruptive button foreground color state css variable reference ([#54](https://github.com/EightfoldAI/octuple/issues/54)) ([25a45be](https://github.com/EightfoldAI/octuple/commits/25a45be203c9f6e954e2fe7ba23c5ae26325c757)) + +### 0.0.10 (2022-04-11) + +### Features + +- Adds octuple list, menu, dropdown components ([#30](https://github.com/EightfoldAI/octuple/issues/30)) ([3f558f5](https://github.com/EightfoldAI/octuple/commits/3f558f57160c6a66273da9b33d9afda7f69097f4)) +- Adds octuple pills component ([#22](https://github.com/EightfoldAI/octuple/issues/22)) ([4ddec57](https://github.com/EightfoldAI/octuple/commits/4ddec57f60a8d4a0cf6b7a33a88a211e536c520f)) +- baseline font size: add use font size hook, update config provider using font size css var ([#50](https://github.com/EightfoldAI/octuple/issues/50)) ([4749c03](https://github.com/EightfoldAI/octuple/commits/4749c038c726a507e8c9ccf06111efbdd08e4438)) +- button and input: adds neutral button, exports components, renames enum to better match others ([#48](https://github.com/EightfoldAI/octuple/issues/48)) ([7fc3bf9](https://github.com/EightfoldAI/octuple/commits/7fc3bf9858ec6bc6cb9b380056299fb87b27587e)) +- changelog and commit linting: adds changelog scripts, commit message linter and updates readmes ([#18](https://github.com/EightfoldAI/octuple/issues/18)) ([6401ec5](https://github.com/EightfoldAI/octuple/commits/6401ec59f3470b7ad15b75ae93c6480c9f5d4ec6)) +- input component: adds searchbox, textarea and textinput components ([#40](https://github.com/EightfoldAI/octuple/issues/40)) ([22e6657](https://github.com/EightfoldAI/octuple/commits/22e6657029da8a739513b25e4442275542b38be8)) +- toggle button: adds toggle button and its hooks, updates scss ([#43](https://github.com/EightfoldAI/octuple/issues/43)) ([67149a2](https://github.com/EightfoldAI/octuple/commits/67149a2d6300279ac9befa8a4450f5765f4b905f)) + +### Bug Fixes + +- asset swap: updates highlight rectangle making it symmetrical ([#23](https://github.com/EightfoldAI/octuple/issues/23)) ([879589a](https://github.com/EightfoldAI/octuple/commits/879589a8c90453d16e037c906c4aaa5b89824d35)) +- button: refines button prop and adds form type support ([#19](https://github.com/EightfoldAI/octuple/issues/19)) ([44636b1](https://github.com/EightfoldAI/octuple/commits/44636b1650ec66ee7dfe61dbe34410ba24deacbc)) +- button: there was a missing scss selector ([#17](https://github.com/EightfoldAI/octuple/issues/17)) ([afb91ac](https://github.com/EightfoldAI/octuple/commits/afb91ac7ace612799567a03e1eb624790ec1d1e7)) +- commitlint: adds custom commitlint config ([#25](https://github.com/EightfoldAI/octuple/issues/25)) ([ebf31f9](https://github.com/EightfoldAI/octuple/commits/ebf31f965af5ba3c14ed03932e1b047f94b1982c)) +- handle menu item value type ([#44](https://github.com/EightfoldAI/octuple/issues/44)) ([cc66e8e](https://github.com/EightfoldAI/octuple/commits/cc66e8e57d7dd6c762f36e9ce03f3ad636afe2a5)) +- html base pixel unit: changes the base from 16 to 10 ([#34](https://github.com/EightfoldAI/octuple/issues/34)) ([61b4825](https://github.com/EightfoldAI/octuple/commits/61b482528bb91c34e3cdca79580034e88d34560b)) +- peer dependencies: ensure react is installed as a peer dependency ([#32](https://github.com/EightfoldAI/octuple/issues/32)) ([e079310](https://github.com/EightfoldAI/octuple/commits/e079310404aa3f9caebf7c2dbd09e4d7b81dad14)) +- pill button: updates hover state to match latest button styles ([#45](https://github.com/EightfoldAI/octuple/issues/45)) ([b98488f](https://github.com/EightfoldAI/octuple/commits/b98488f6740a8016d722306c96cd5b331f98b678)) +- pills: removes unused selectors ([#36](https://github.com/EightfoldAI/octuple/issues/36)) ([28b11ef](https://github.com/EightfoldAI/octuple/commits/28b11ef3e294564754a12d3e6510ca9e6406191b)) +- react: ignore react in production build to avoid conflicts ([#29](https://github.com/EightfoldAI/octuple/issues/29)) ([718c3f5](https://github.com/EightfoldAI/octuple/commits/718c3f54de05107b962f0313187f3f28aeee55b2)) +- readme: fixes asset and documentation urls ([#27](https://github.com/EightfoldAI/octuple/issues/27)) ([6c2fb07](https://github.com/EightfoldAI/octuple/commits/6c2fb0741a04265d4eaf6ec51d8d3a296a1c4519)) +- textarea: pixel push resize icon ([#46](https://github.com/EightfoldAI/octuple/issues/46)) ([bbf1e7e](https://github.com/EightfoldAI/octuple/commits/bbf1e7eb4e9f64fcceff44de7230840db186d060)) +- user agent border in tabs: overrides ua style ([#20](https://github.com/EightfoldAI/octuple/issues/20)) ([1396bbb](https://github.com/EightfoldAI/octuple/commits/1396bbb1f19bd5dad5232be09eb483cec1017f35)) + +### 0.0.9 (2022-04-11) + +### Features + +- Adds octuple list, menu, dropdown components ([#30](https://github.com/EightfoldAI/octuple/issues/30)) ([3f558f5](https://github.com/EightfoldAI/octuple/commits/3f558f57160c6a66273da9b33d9afda7f69097f4)) +- Adds octuple pills component ([#22](https://github.com/EightfoldAI/octuple/issues/22)) ([4ddec57](https://github.com/EightfoldAI/octuple/commits/4ddec57f60a8d4a0cf6b7a33a88a211e536c520f)) +- baseline font size: add use font size hook, update config provider using font size css var ([#50](https://github.com/EightfoldAI/octuple/issues/50)) ([4749c03](https://github.com/EightfoldAI/octuple/commits/4749c038c726a507e8c9ccf06111efbdd08e4438)) +- button and input: adds neutral button, exports components, renames enum to better match others ([#48](https://github.com/EightfoldAI/octuple/issues/48)) ([7fc3bf9](https://github.com/EightfoldAI/octuple/commits/7fc3bf9858ec6bc6cb9b380056299fb87b27587e)) +- changelog and commit linting: adds changelog scripts, commit message linter and updates readmes ([#18](https://github.com/EightfoldAI/octuple/issues/18)) ([6401ec5](https://github.com/EightfoldAI/octuple/commits/6401ec59f3470b7ad15b75ae93c6480c9f5d4ec6)) +- input component: adds searchbox, textarea and textinput components ([#40](https://github.com/EightfoldAI/octuple/issues/40)) ([22e6657](https://github.com/EightfoldAI/octuple/commits/22e6657029da8a739513b25e4442275542b38be8)) +- toggle button: adds toggle button and its hooks, updates scss ([#43](https://github.com/EightfoldAI/octuple/issues/43)) ([67149a2](https://github.com/EightfoldAI/octuple/commits/67149a2d6300279ac9befa8a4450f5765f4b905f)) + +### Bug Fixes + +- asset swap: updates highlight rectangle making it symmetrical ([#23](https://github.com/EightfoldAI/octuple/issues/23)) ([879589a](https://github.com/EightfoldAI/octuple/commits/879589a8c90453d16e037c906c4aaa5b89824d35)) +- button: refines button prop and adds form type support ([#19](https://github.com/EightfoldAI/octuple/issues/19)) ([44636b1](https://github.com/EightfoldAI/octuple/commits/44636b1650ec66ee7dfe61dbe34410ba24deacbc)) +- button: there was a missing scss selector ([#17](https://github.com/EightfoldAI/octuple/issues/17)) ([afb91ac](https://github.com/EightfoldAI/octuple/commits/afb91ac7ace612799567a03e1eb624790ec1d1e7)) +- commitlint: adds custom commitlint config ([#25](https://github.com/EightfoldAI/octuple/issues/25)) ([ebf31f9](https://github.com/EightfoldAI/octuple/commits/ebf31f965af5ba3c14ed03932e1b047f94b1982c)) +- handle menu item value type ([#44](https://github.com/EightfoldAI/octuple/issues/44)) ([cc66e8e](https://github.com/EightfoldAI/octuple/commits/cc66e8e57d7dd6c762f36e9ce03f3ad636afe2a5)) +- html base pixel unit: changes the base from 16 to 10 ([#34](https://github.com/EightfoldAI/octuple/issues/34)) ([61b4825](https://github.com/EightfoldAI/octuple/commits/61b482528bb91c34e3cdca79580034e88d34560b)) +- peer dependencies: ensure react is installed as a peer dependency ([#32](https://github.com/EightfoldAI/octuple/issues/32)) ([e079310](https://github.com/EightfoldAI/octuple/commits/e079310404aa3f9caebf7c2dbd09e4d7b81dad14)) +- pill button: updates hover state to match latest button styles ([#45](https://github.com/EightfoldAI/octuple/issues/45)) ([b98488f](https://github.com/EightfoldAI/octuple/commits/b98488f6740a8016d722306c96cd5b331f98b678)) +- pills: removes unused selectors ([#36](https://github.com/EightfoldAI/octuple/issues/36)) ([28b11ef](https://github.com/EightfoldAI/octuple/commits/28b11ef3e294564754a12d3e6510ca9e6406191b)) +- react: ignore react in production build to avoid conflicts ([#29](https://github.com/EightfoldAI/octuple/issues/29)) ([718c3f5](https://github.com/EightfoldAI/octuple/commits/718c3f54de05107b962f0313187f3f28aeee55b2)) +- readme: fixes asset and documentation urls ([#27](https://github.com/EightfoldAI/octuple/issues/27)) ([6c2fb07](https://github.com/EightfoldAI/octuple/commits/6c2fb0741a04265d4eaf6ec51d8d3a296a1c4519)) +- textarea: pixel push resize icon ([#46](https://github.com/EightfoldAI/octuple/issues/46)) ([bbf1e7e](https://github.com/EightfoldAI/octuple/commits/bbf1e7eb4e9f64fcceff44de7230840db186d060)) +- user agent border in tabs: overrides ua style ([#20](https://github.com/EightfoldAI/octuple/issues/20)) ([1396bbb](https://github.com/EightfoldAI/octuple/commits/1396bbb1f19bd5dad5232be09eb483cec1017f35)) + +### 0.0.8 (2022-04-09) + +### Features + +- Adds octuple list, menu, dropdown components ([#30](https://github.com/EightfoldAI/octuple/issues/30)) ([3f558f5](https://github.com/EightfoldAI/octuple/commits/3f558f57160c6a66273da9b33d9afda7f69097f4)) +- Adds octuple pills component ([#22](https://github.com/EightfoldAI/octuple/issues/22)) ([4ddec57](https://github.com/EightfoldAI/octuple/commits/4ddec57f60a8d4a0cf6b7a33a88a211e536c520f)) +- baseline font size: add use font size hook, update config provider using font size css var ([#50](https://github.com/EightfoldAI/octuple/issues/50)) ([4749c03](https://github.com/EightfoldAI/octuple/commits/4749c038c726a507e8c9ccf06111efbdd08e4438)) +- button and input: adds neutral button, exports components, renames enum to better match others ([#48](https://github.com/EightfoldAI/octuple/issues/48)) ([7fc3bf9](https://github.com/EightfoldAI/octuple/commits/7fc3bf9858ec6bc6cb9b380056299fb87b27587e)) +- changelog and commit linting: adds changelog scripts, commit message linter and updates readmes ([#18](https://github.com/EightfoldAI/octuple/issues/18)) ([6401ec5](https://github.com/EightfoldAI/octuple/commits/6401ec59f3470b7ad15b75ae93c6480c9f5d4ec6)) +- input component: adds searchbox, textarea and textinput components ([#40](https://github.com/EightfoldAI/octuple/issues/40)) ([22e6657](https://github.com/EightfoldAI/octuple/commits/22e6657029da8a739513b25e4442275542b38be8)) +- toggle button: adds toggle button and its hooks, updates scss ([#43](https://github.com/EightfoldAI/octuple/issues/43)) ([67149a2](https://github.com/EightfoldAI/octuple/commits/67149a2d6300279ac9befa8a4450f5765f4b905f)) + +### Bug Fixes + +- asset swap: updates highlight rectangle making it symmetrical ([#23](https://github.com/EightfoldAI/octuple/issues/23)) ([879589a](https://github.com/EightfoldAI/octuple/commits/879589a8c90453d16e037c906c4aaa5b89824d35)) +- button: refines button prop and adds form type support ([#19](https://github.com/EightfoldAI/octuple/issues/19)) ([44636b1](https://github.com/EightfoldAI/octuple/commits/44636b1650ec66ee7dfe61dbe34410ba24deacbc)) +- button: there was a missing scss selector ([#17](https://github.com/EightfoldAI/octuple/issues/17)) ([afb91ac](https://github.com/EightfoldAI/octuple/commits/afb91ac7ace612799567a03e1eb624790ec1d1e7)) +- commitlint: adds custom commitlint config ([#25](https://github.com/EightfoldAI/octuple/issues/25)) ([ebf31f9](https://github.com/EightfoldAI/octuple/commits/ebf31f965af5ba3c14ed03932e1b047f94b1982c)) +- handle menu item value type ([#44](https://github.com/EightfoldAI/octuple/issues/44)) ([cc66e8e](https://github.com/EightfoldAI/octuple/commits/cc66e8e57d7dd6c762f36e9ce03f3ad636afe2a5)) +- html base pixel unit: changes the base from 16 to 10 ([#34](https://github.com/EightfoldAI/octuple/issues/34)) ([61b4825](https://github.com/EightfoldAI/octuple/commits/61b482528bb91c34e3cdca79580034e88d34560b)) +- peer dependencies: ensure react is installed as a peer dependency ([#32](https://github.com/EightfoldAI/octuple/issues/32)) ([e079310](https://github.com/EightfoldAI/octuple/commits/e079310404aa3f9caebf7c2dbd09e4d7b81dad14)) +- pill button: updates hover state to match latest button styles ([#45](https://github.com/EightfoldAI/octuple/issues/45)) ([b98488f](https://github.com/EightfoldAI/octuple/commits/b98488f6740a8016d722306c96cd5b331f98b678)) +- pills: removes unused selectors ([#36](https://github.com/EightfoldAI/octuple/issues/36)) ([28b11ef](https://github.com/EightfoldAI/octuple/commits/28b11ef3e294564754a12d3e6510ca9e6406191b)) +- react: ignore react in production build to avoid conflicts ([#29](https://github.com/EightfoldAI/octuple/issues/29)) ([718c3f5](https://github.com/EightfoldAI/octuple/commits/718c3f54de05107b962f0313187f3f28aeee55b2)) +- readme: fixes asset and documentation urls ([#27](https://github.com/EightfoldAI/octuple/issues/27)) ([6c2fb07](https://github.com/EightfoldAI/octuple/commits/6c2fb0741a04265d4eaf6ec51d8d3a296a1c4519)) +- textarea: pixel push resize icon ([#46](https://github.com/EightfoldAI/octuple/issues/46)) ([bbf1e7e](https://github.com/EightfoldAI/octuple/commits/bbf1e7eb4e9f64fcceff44de7230840db186d060)) +- user agent border in tabs: overrides ua style ([#20](https://github.com/EightfoldAI/octuple/issues/20)) ([1396bbb](https://github.com/EightfoldAI/octuple/commits/1396bbb1f19bd5dad5232be09eb483cec1017f35)) + +### 0.0.7 (2022-04-07) + +### Features + +- Adds octuple list, menu, dropdown components ([#30](https://github.com/EightfoldAI/octuple/issues/30)) ([3f558f5](https://github.com/EightfoldAI/octuple/commits/3f558f57160c6a66273da9b33d9afda7f69097f4)) +- Adds octuple pills component ([#22](https://github.com/EightfoldAI/octuple/issues/22)) ([4ddec57](https://github.com/EightfoldAI/octuple/commits/4ddec57f60a8d4a0cf6b7a33a88a211e536c520f)) +- changelog and commit linting: adds changelog scripts, commit message linter and updates readmes ([#18](https://github.com/EightfoldAI/octuple/issues/18)) ([6401ec5](https://github.com/EightfoldAI/octuple/commits/6401ec59f3470b7ad15b75ae93c6480c9f5d4ec6)) +- input component: adds searchbox, textarea and textinput components ([#40](https://github.com/EightfoldAI/octuple/issues/40)) ([22e6657](https://github.com/EightfoldAI/octuple/commits/22e6657029da8a739513b25e4442275542b38be8)) +- toggle button: adds toggle button and its hooks, updates scss ([#43](https://github.com/EightfoldAI/octuple/issues/43)) ([67149a2](https://github.com/EightfoldAI/octuple/commits/67149a2d6300279ac9befa8a4450f5765f4b905f)) + +### Bug Fixes + +- asset swap: updates highlight rectangle making it symmetrical ([#23](https://github.com/EightfoldAI/octuple/issues/23)) ([879589a](https://github.com/EightfoldAI/octuple/commits/879589a8c90453d16e037c906c4aaa5b89824d35)) +- button: refines button prop and adds form type support ([#19](https://github.com/EightfoldAI/octuple/issues/19)) ([44636b1](https://github.com/EightfoldAI/octuple/commits/44636b1650ec66ee7dfe61dbe34410ba24deacbc)) +- button: there was a missing scss selector ([#17](https://github.com/EightfoldAI/octuple/issues/17)) ([afb91ac](https://github.com/EightfoldAI/octuple/commits/afb91ac7ace612799567a03e1eb624790ec1d1e7)) +- commitlint: adds custom commitlint config ([#25](https://github.com/EightfoldAI/octuple/issues/25)) ([ebf31f9](https://github.com/EightfoldAI/octuple/commits/ebf31f965af5ba3c14ed03932e1b047f94b1982c)) +- handle menu item value type ([#44](https://github.com/EightfoldAI/octuple/issues/44)) ([cc66e8e](https://github.com/EightfoldAI/octuple/commits/cc66e8e57d7dd6c762f36e9ce03f3ad636afe2a5)) +- html base pixel unit: changes the base from 16 to 10 ([#34](https://github.com/EightfoldAI/octuple/issues/34)) ([61b4825](https://github.com/EightfoldAI/octuple/commits/61b482528bb91c34e3cdca79580034e88d34560b)) +- peer dependencies: ensure react is installed as a peer dependency ([#32](https://github.com/EightfoldAI/octuple/issues/32)) ([e079310](https://github.com/EightfoldAI/octuple/commits/e079310404aa3f9caebf7c2dbd09e4d7b81dad14)) +- pill button: updates hover state to match latest button styles ([#45](https://github.com/EightfoldAI/octuple/issues/45)) ([b98488f](https://github.com/EightfoldAI/octuple/commits/b98488f6740a8016d722306c96cd5b331f98b678)) +- pills: removes unused selectors ([#36](https://github.com/EightfoldAI/octuple/issues/36)) ([28b11ef](https://github.com/EightfoldAI/octuple/commits/28b11ef3e294564754a12d3e6510ca9e6406191b)) +- react: ignore react in production build to avoid conflicts ([#29](https://github.com/EightfoldAI/octuple/issues/29)) ([718c3f5](https://github.com/EightfoldAI/octuple/commits/718c3f54de05107b962f0313187f3f28aeee55b2)) +- readme: fixes asset and documentation urls ([#27](https://github.com/EightfoldAI/octuple/issues/27)) ([6c2fb07](https://github.com/EightfoldAI/octuple/commits/6c2fb0741a04265d4eaf6ec51d8d3a296a1c4519)) +- textarea: pixel push resize icon ([#46](https://github.com/EightfoldAI/octuple/issues/46)) ([bbf1e7e](https://github.com/EightfoldAI/octuple/commits/bbf1e7eb4e9f64fcceff44de7230840db186d060)) +- user agent border in tabs: overrides ua style ([#20](https://github.com/EightfoldAI/octuple/issues/20)) ([1396bbb](https://github.com/EightfoldAI/octuple/commits/1396bbb1f19bd5dad5232be09eb483cec1017f35)) + +### 0.0.6 (2022-04-06) + +### Features + +- Adds octuple pills component ([#22](https://github.com/EightfoldAI/octuple/issues/22)) ([4ddec57](https://github.com/EightfoldAI/octuple/commits/4ddec57f60a8d4a0cf6b7a33a88a211e536c520f)) +- changelog and commit linting: adds changelog scripts, commit message linter and updates readmes ([#18](https://github.com/EightfoldAI/octuple/issues/18)) ([6401ec5](https://github.com/EightfoldAI/octuple/commits/6401ec59f3470b7ad15b75ae93c6480c9f5d4ec6)) + +### Bug Fixes + +- asset swap: updates highlight rectangle making it symmetrical ([#23](https://github.com/EightfoldAI/octuple/issues/23)) ([879589a](https://github.com/EightfoldAI/octuple/commits/879589a8c90453d16e037c906c4aaa5b89824d35)) +- button: refines button prop and adds form type support ([#19](https://github.com/EightfoldAI/octuple/issues/19)) ([44636b1](https://github.com/EightfoldAI/octuple/commits/44636b1650ec66ee7dfe61dbe34410ba24deacbc)) +- button: there was a missing scss selector ([#17](https://github.com/EightfoldAI/octuple/issues/17)) ([afb91ac](https://github.com/EightfoldAI/octuple/commits/afb91ac7ace612799567a03e1eb624790ec1d1e7)) +- commitlint: adds custom commitlint config ([#25](https://github.com/EightfoldAI/octuple/issues/25)) ([ebf31f9](https://github.com/EightfoldAI/octuple/commits/ebf31f965af5ba3c14ed03932e1b047f94b1982c)) +- html base pixel unit: changes the base from 16 to 10 ([#34](https://github.com/EightfoldAI/octuple/issues/34)) ([61b4825](https://github.com/EightfoldAI/octuple/commits/61b482528bb91c34e3cdca79580034e88d34560b)) +- peer dependencies: ensure react is installed as a peer dependency ([#32](https://github.com/EightfoldAI/octuple/issues/32)) ([e079310](https://github.com/EightfoldAI/octuple/commits/e079310404aa3f9caebf7c2dbd09e4d7b81dad14)) +- pills: removes unused selectors ([#36](https://github.com/EightfoldAI/octuple/issues/36)) ([28b11ef](https://github.com/EightfoldAI/octuple/commits/28b11ef3e294564754a12d3e6510ca9e6406191b)) +- react: ignore react in production build to avoid conflicts ([#29](https://github.com/EightfoldAI/octuple/issues/29)) ([718c3f5](https://github.com/EightfoldAI/octuple/commits/718c3f54de05107b962f0313187f3f28aeee55b2)) +- readme: fixes asset and documentation urls ([#27](https://github.com/EightfoldAI/octuple/issues/27)) ([6c2fb07](https://github.com/EightfoldAI/octuple/commits/6c2fb0741a04265d4eaf6ec51d8d3a296a1c4519)) +- user agent border in tabs: overrides ua style ([#20](https://github.com/EightfoldAI/octuple/issues/20)) ([1396bbb](https://github.com/EightfoldAI/octuple/commits/1396bbb1f19bd5dad5232be09eb483cec1017f35)) + +### 0.0.5 (2022-04-04) + +### Features + +- Adds octuple pills component ([#22](https://github.com/EightfoldAI/octuple/issues/22)) ([4ddec57](https://github.com/EightfoldAI/octuple/commits/4ddec57f60a8d4a0cf6b7a33a88a211e536c520f)) +- changelog and commit linting: adds changelog scripts, commit message linter and updates readmes ([#18](https://github.com/EightfoldAI/octuple/issues/18)) ([6401ec5](https://github.com/EightfoldAI/octuple/commits/6401ec59f3470b7ad15b75ae93c6480c9f5d4ec6)) + +### Bug Fixes + +- asset swap: updates highlight rectangle making it symmetrical ([#23](https://github.com/EightfoldAI/octuple/issues/23)) ([879589a](https://github.com/EightfoldAI/octuple/commits/879589a8c90453d16e037c906c4aaa5b89824d35)) +- button: refines button prop and adds form type support ([#19](https://github.com/EightfoldAI/octuple/issues/19)) ([44636b1](https://github.com/EightfoldAI/octuple/commits/44636b1650ec66ee7dfe61dbe34410ba24deacbc)) +- button: there was a missing scss selector ([#17](https://github.com/EightfoldAI/octuple/issues/17)) ([afb91ac](https://github.com/EightfoldAI/octuple/commits/afb91ac7ace612799567a03e1eb624790ec1d1e7)) +- commitlint: adds custom commitlint config ([#25](https://github.com/EightfoldAI/octuple/issues/25)) ([ebf31f9](https://github.com/EightfoldAI/octuple/commits/ebf31f965af5ba3c14ed03932e1b047f94b1982c)) +- html base pixel unit: changes the base from 16 to 10 ([#34](https://github.com/EightfoldAI/octuple/issues/34)) ([61b4825](https://github.com/EightfoldAI/octuple/commits/61b482528bb91c34e3cdca79580034e88d34560b)) +- peer dependencies: ensure react is installed as a peer dependency ([#32](https://github.com/EightfoldAI/octuple/issues/32)) ([e079310](https://github.com/EightfoldAI/octuple/commits/e079310404aa3f9caebf7c2dbd09e4d7b81dad14)) +- react: ignore react in production build to avoid conflicts ([#29](https://github.com/EightfoldAI/octuple/issues/29)) ([718c3f5](https://github.com/EightfoldAI/octuple/commits/718c3f54de05107b962f0313187f3f28aeee55b2)) +- readme: fixes asset and documentation urls ([#27](https://github.com/EightfoldAI/octuple/issues/27)) ([6c2fb07](https://github.com/EightfoldAI/octuple/commits/6c2fb0741a04265d4eaf6ec51d8d3a296a1c4519)) +- user agent border in tabs: overrides ua style ([#20](https://github.com/EightfoldAI/octuple/issues/20)) ([1396bbb](https://github.com/EightfoldAI/octuple/commits/1396bbb1f19bd5dad5232be09eb483cec1017f35)) + +### 0.0.4 (2022-04-04) + +### Features + +- Adds octuple pills component ([#22](https://github.com/EightfoldAI/octuple/issues/22)) ([4ddec57](https://github.com/EightfoldAI/octuple/commits/4ddec57f60a8d4a0cf6b7a33a88a211e536c520f)) +- changelog and commit linting: adds changelog scripts, commit message linter and updates readmes ([#18](https://github.com/EightfoldAI/octuple/issues/18)) ([6401ec5](https://github.com/EightfoldAI/octuple/commits/6401ec59f3470b7ad15b75ae93c6480c9f5d4ec6)) + +### Bug Fixes + +- asset swap: updates highlight rectangle making it symmetrical ([#23](https://github.com/EightfoldAI/octuple/issues/23)) ([879589a](https://github.com/EightfoldAI/octuple/commits/879589a8c90453d16e037c906c4aaa5b89824d35)) +- button: refines button prop and adds form type support ([#19](https://github.com/EightfoldAI/octuple/issues/19)) ([44636b1](https://github.com/EightfoldAI/octuple/commits/44636b1650ec66ee7dfe61dbe34410ba24deacbc)) +- button: there was a missing scss selector ([#17](https://github.com/EightfoldAI/octuple/issues/17)) ([afb91ac](https://github.com/EightfoldAI/octuple/commits/afb91ac7ace612799567a03e1eb624790ec1d1e7)) +- commitlint: adds custom commitlint config ([#25](https://github.com/EightfoldAI/octuple/issues/25)) ([ebf31f9](https://github.com/EightfoldAI/octuple/commits/ebf31f965af5ba3c14ed03932e1b047f94b1982c)) +- peer dependencies: ensure react is installed as a peer dependency ([#32](https://github.com/EightfoldAI/octuple/issues/32)) ([e079310](https://github.com/EightfoldAI/octuple/commits/e079310404aa3f9caebf7c2dbd09e4d7b81dad14)) +- react: ignore react in production build to avoid conflicts ([#29](https://github.com/EightfoldAI/octuple/issues/29)) ([718c3f5](https://github.com/EightfoldAI/octuple/commits/718c3f54de05107b962f0313187f3f28aeee55b2)) +- readme: fixes asset and documentation urls ([#27](https://github.com/EightfoldAI/octuple/issues/27)) ([6c2fb07](https://github.com/EightfoldAI/octuple/commits/6c2fb0741a04265d4eaf6ec51d8d3a296a1c4519)) +- user agent border in tabs: overrides ua style ([#20](https://github.com/EightfoldAI/octuple/issues/20)) ([1396bbb](https://github.com/EightfoldAI/octuple/commits/1396bbb1f19bd5dad5232be09eb483cec1017f35)) + +### 0.0.3 (2022-04-04) + +### Features + +- Adds octuple pills component ([#22](https://github.com/EightfoldAI/octuple/issues/22)) ([4ddec57](https://github.com/EightfoldAI/octuple/commits/4ddec57f60a8d4a0cf6b7a33a88a211e536c520f)) +- changelog and commit linting: adds changelog scripts, commit message linter and updates readmes ([#18](https://github.com/EightfoldAI/octuple/issues/18)) ([6401ec5](https://github.com/EightfoldAI/octuple/commits/6401ec59f3470b7ad15b75ae93c6480c9f5d4ec6)) + +### Bug Fixes + +- asset swap: updates highlight rectangle making it symmetrical ([#23](https://github.com/EightfoldAI/octuple/issues/23)) ([879589a](https://github.com/EightfoldAI/octuple/commits/879589a8c90453d16e037c906c4aaa5b89824d35)) +- button: refines button prop and adds form type support ([#19](https://github.com/EightfoldAI/octuple/issues/19)) ([44636b1](https://github.com/EightfoldAI/octuple/commits/44636b1650ec66ee7dfe61dbe34410ba24deacbc)) +- button: there was a missing scss selector ([#17](https://github.com/EightfoldAI/octuple/issues/17)) ([afb91ac](https://github.com/EightfoldAI/octuple/commits/afb91ac7ace612799567a03e1eb624790ec1d1e7)) +- react: ignore react in production build to avoid conflicts ([#29](https://github.com/EightfoldAI/octuple/issues/29)) ([718c3f5](https://github.com/EightfoldAI/octuple/commits/718c3f54de05107b962f0313187f3f28aeee55b2)) +- readme: fixes asset and documentation urls ([#27](https://github.com/EightfoldAI/octuple/issues/27)) ([6c2fb07](https://github.com/EightfoldAI/octuple/commits/6c2fb0741a04265d4eaf6ec51d8d3a296a1c4519)) +- user agent border in tabs: overrides ua style ([#20](https://github.com/EightfoldAI/octuple/issues/20)) ([1396bbb](https://github.com/EightfoldAI/octuple/commits/1396bbb1f19bd5dad5232be09eb483cec1017f35)) + +### 0.0.2 (2022-04-01) + +### Features + +- Adds octuple pills component ([#22](https://github.com/EightfoldAI/octuple/issues/22)) ([4ddec57](https://github.com/EightfoldAI/octuple/commits/4ddec57f60a8d4a0cf6b7a33a88a211e536c520f)) +- changelog and commit linting: adds changelog scripts, commit message linter and updates readmes ([#18](https://github.com/EightfoldAI/octuple/issues/18)) ([6401ec5](https://github.com/EightfoldAI/octuple/commits/6401ec59f3470b7ad15b75ae93c6480c9f5d4ec6)) + +### Bug Fixes + +- asset swap: updates highlight rectangle making it symmetrical ([#23](https://github.com/EightfoldAI/octuple/issues/23)) ([879589a](https://github.com/EightfoldAI/octuple/commits/879589a8c90453d16e037c906c4aaa5b89824d35)) +- button: refines button prop and adds form type support ([#19](https://github.com/EightfoldAI/octuple/issues/19)) ([44636b1](https://github.com/EightfoldAI/octuple/commits/44636b1650ec66ee7dfe61dbe34410ba24deacbc)) +- button: there was a missing scss selector ([#17](https://github.com/EightfoldAI/octuple/issues/17)) ([afb91ac](https://github.com/EightfoldAI/octuple/commits/afb91ac7ace612799567a03e1eb624790ec1d1e7)) +- readme: fixes asset and documentation urls ([#27](https://github.com/EightfoldAI/octuple/issues/27)) ([6c2fb07](https://github.com/EightfoldAI/octuple/commits/6c2fb0741a04265d4eaf6ec51d8d3a296a1c4519)) +- user agent border in tabs: overrides ua style ([#20](https://github.com/EightfoldAI/octuple/issues/20)) ([1396bbb](https://github.com/EightfoldAI/octuple/commits/1396bbb1f19bd5dad5232be09eb483cec1017f35)) + +### 0.0.1 (2022-04-01) + +### Features + +- Adds octuple pills component ([#22](https://github.com/EightfoldAI/octuple/issues/22)) ([4ddec57](https://github.com/EightfoldAI/octuple/commits/4ddec57f60a8d4a0cf6b7a33a88a211e536c520f)) +- changelog and commit linting: adds changelog scripts, commit message linter and updates readmes ([#18](https://github.com/EightfoldAI/octuple/issues/18)) ([6401ec5](https://github.com/EightfoldAI/octuple/commits/6401ec59f3470b7ad15b75ae93c6480c9f5d4ec6)) + +### Bug Fixes + +- asset swap: updates highlight rectangle making it symmetrical ([#23](https://github.com/EightfoldAI/octuple/issues/23)) ([879589a](https://github.com/EightfoldAI/octuple/commits/879589a8c90453d16e037c906c4aaa5b89824d35)) +- button: refines button prop and adds form type support ([#19](https://github.com/EightfoldAI/octuple/issues/19)) ([44636b1](https://github.com/EightfoldAI/octuple/commits/44636b1650ec66ee7dfe61dbe34410ba24deacbc)) +- button: there was a missing scss selector ([#17](https://github.com/EightfoldAI/octuple/issues/17)) ([afb91ac](https://github.com/EightfoldAI/octuple/commits/afb91ac7ace612799567a03e1eb624790ec1d1e7)) +- user agent border in tabs: overrides ua style ([#20](https://github.com/EightfoldAI/octuple/issues/20)) ([1396bbb](https://github.com/EightfoldAI/octuple/commits/1396bbb1f19bd5dad5232be09eb483cec1017f35)) + +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. diff --git a/README.md b/README.md index 04568b247..25b03e096 100644 --- a/README.md +++ b/README.md @@ -1,50 +1,86 @@ -Eightfold Octuple Design System Component Library -=================== +

+ +

+ +

Eightfold Octuple Design System Component Library

+ +
+ +[![npm version](https://badge.fury.io/js/@eightfold.ai%2Foctuple.svg)](https://badge.fury.io/js/@eightfold.ai%2Foctuple) ![node](https://img.shields.io/badge/node-16.14.2-brightgreen.svg) [![codecov](https://codecov.io/gh/ychhabra-eightfold/octuple/branch/main/graph/badge.svg?token=K2BV6M1JS5)](https://codecov.io/gh/ychhabra-eightfold/octuple) ![Build](https://github.com/EightfoldAI/octuple/actions/workflows/build.yml/badge.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) + +![bundlesize-js-image](https://img.badgesize.io/https:/unpkg.com/browse/@eightfold.ai/octuple/lib/octuple.js?label=octuple.js&compression=gzip) +![bundlesize-css-image](https://img.badgesize.io/https:/unpkg.com/browse/@eightfold.ai/octuple/lib/octuple.css?label=octuple.css&compression=gzip) + +
## About Octuple creates a shared language and visual consistency across different pages and channels. +It represents a collection of assets, utilities, and React components for building web applications. + +- Design (and development) work can be created and replicated quickly and at scale. +- Alleviates strain on design resources to focus on larger, more complex problems. +- Creates a unified language within and between crossfunctional teams. +- Creates visual consistency across products, channels, and (potentially siloed) departments. +- Serves as an educational tool and reference for junior-level designers and content contributors. + +Visit the Octuple [Storybook site](https://eightfoldai.github.io/octuple.github.io/). + +## Changelog + +You can view the complete list of additions, fixes, and changes in the [change log](https://github.com/EightfoldAI/octuple/blob/main/CHANGELOG.md) + +## Install + +To install Octuple in your project run the following command: + +Yarn + +``` +yarn add @eightfold.ai/octuple +``` + +NPM -* Design (and development) work can be created and replicated quickly and at scale. -* Alleviates strain on design resources to focus on larger, more complex problems. -* Creates a unified language within and between crossfunctional teams. -* Creates visual consistency across products, channels, and (potentially siloed) departments. -* Serves as an educational tool and reference for junior-level designers and content contributors. +``` +npm install @eightfold.ai/octuple +``` -## Prerequisites +## Usage -* Install the following: +```tsx +import { PrimaryButton } from '@eightfold.ai/octuple'; -* [Git](https://git-scm.com/) -* [Node](https://nodejs.org/en/download/) -* [Yarn](https://yarnpkg.com/getting-started/install) -* [NVM (optional to quickly use different verions of Node)](https://github.com/nvm-sh/nvm) +export const App = () => ( + <> + + +); +``` -## Available Scripts +And import styles manually: -from the project root folder, you can run: +```tsx +import '@eightfold.ai/octuple/lib/octuple.css'; +``` -### `yarn storybook` +## How can I contribute? -Runs the app in the development mode.\ -Open [http://localhost:2022](http://localhost:2022) to view it in the browser. +There are many ways to contribute to the Octuple project. Review the following sections to find out which one is right for you. -The page will reload if you make edits.\ -You will also see any lint errors in the console. +### Reporting bugs and suggesting enhancements using Eightfold's apps and services -### `yarn build-storybook` +Please use the 'Get Help' tool at the bottom of any screen to submit bugs and suggestions. -Builds the Octuple Design System Storybook project for deployment to the `dist` folder.\ +![Get Help](https://raw.githubusercontent.com/EightfoldAI/octuple/main/public/assets/GetHelp.png) -### `yarn test` +### Create an issue on GitHub -Runs the UTs.\ +![New Issue](https://raw.githubusercontent.com/EightfoldAI/octuple/main/public/assets/NewIssue.png) -### `yarn` +### Pull requests -Builds the Octuple Design System Component Library for prod publishing to NPM in to the `lib` folder.\ -Should also run the UTs as part of the process. -Your package is ready to be published! +Review the guidance for pull requests and the contribution workflow in our [contributor guide](https://github.com/EightfoldAI/octuple/blob/main/src/CONTRIBUTING.md). ## License diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 000000000..925d069ac --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,25 @@ +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'header-max-length': [0, 'always', 100], + 'subject-case': [0], + 'type-enum': [ + 2, + 'always', + [ + 'build', + 'chore', + 'ci', + 'docs', + 'feat', + 'fix', + 'perf', + 'refactor', + 'revert', + 'style', + 'test', + ], + ], + 'scope-empty': [0], + }, +}; diff --git a/config/env.js b/config/env.js new file mode 100644 index 000000000..3ffa06f5a --- /dev/null +++ b/config/env.js @@ -0,0 +1,104 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const paths = require('./paths'); + +// Make sure that including paths.js after env.js will read .env variables. +delete require.cache[require.resolve('./paths')]; + +const NODE_ENV = process.env.NODE_ENV; +if (!NODE_ENV) { + throw new Error( + 'The NODE_ENV environment variable is required but was not specified.' + ); +} + +// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use +const dotenvFiles = [ + `${paths.dotenv}.${NODE_ENV}.local`, + // Don't include `.env.local` for `test` environment + // since normally you expect tests to produce the same + // results for everyone + NODE_ENV !== 'test' && `${paths.dotenv}.local`, + `${paths.dotenv}.${NODE_ENV}`, + paths.dotenv, +].filter(Boolean); + +// Load environment variables from .env* files. Suppress warnings using silent +// if this file is missing. dotenv will never modify any environment variables +// that have already been set. Variable expansion is supported in .env files. +// https://github.com/motdotla/dotenv +// https://github.com/motdotla/dotenv-expand +dotenvFiles.forEach((dotenvFile) => { + if (fs.existsSync(dotenvFile)) { + require('dotenv-expand')( + require('dotenv').config({ + path: dotenvFile, + }) + ); + } +}); + +// We support resolving modules according to `NODE_PATH`. +// This lets you use absolute paths in imports inside large monorepos: +// https://github.com/facebook/create-react-app/issues/253. +// It works similar to `NODE_PATH` in Node itself: +// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders +// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored. +// Otherwise, we risk importing Node.js core modules into an app instead of webpack shims. +// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421 +// We also resolve them to make sure all tools using them work consistently. +const appDirectory = fs.realpathSync(process.cwd()); +process.env.NODE_PATH = (process.env.NODE_PATH || '') + .split(path.delimiter) + .filter((folder) => folder && !path.isAbsolute(folder)) + .map((folder) => path.resolve(appDirectory, folder)) + .join(path.delimiter); + +// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be +// injected into the application via DefinePlugin in webpack configuration. +const REACT_APP = /^REACT_APP_/i; + +function getClientEnvironment(publicUrl) { + const raw = Object.keys(process.env) + .filter((key) => REACT_APP.test(key)) + .reduce( + (env, key) => { + env[key] = process.env[key]; + return env; + }, + { + // Useful for determining whether we’re running in production mode. + // Most importantly, it switches React into the correct mode. + NODE_ENV: process.env.NODE_ENV || 'development', + // Useful for resolving the correct path to static assets in `public`. + // For example, . + // This should only be used as an escape hatch. Normally you would put + // images into the `src` and `import` them in code to get their paths. + PUBLIC_URL: publicUrl, + // We support configuring the sockjs pathname during development. + // These settings let a developer run multiple simultaneous projects. + // They are used as the connection `hostname`, `pathname` and `port` + // in webpackHotDevClient. They are used as the `sockHost`, `sockPath` + // and `sockPort` options in webpack-dev-server. + WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST, + WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH, + WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT, + // Whether or not react-refresh is enabled. + // It is defined here so it is available in the webpackHotDevClient. + FAST_REFRESH: process.env.FAST_REFRESH !== 'false', + } + ); + // Stringify all values so we can feed into webpack DefinePlugin + const stringified = { + 'process.env': Object.keys(raw).reduce((env, key) => { + env[key] = JSON.stringify(raw[key]); + return env; + }, {}), + }; + + return { raw, stringified }; +} + +module.exports = getClientEnvironment; diff --git a/config/getHttpsConfig.js b/config/getHttpsConfig.js new file mode 100644 index 000000000..64cf4ac39 --- /dev/null +++ b/config/getHttpsConfig.js @@ -0,0 +1,70 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const crypto = require('crypto'); +const chalk = require('react-dev-utils/chalk'); +const paths = require('./paths'); + +// Ensure the certificate and key provided are valid and if not +// throw an easy to debug error +function validateKeyAndCerts({ cert, key, keyFile, crtFile }) { + let encrypted; + try { + // publicEncrypt will throw an error with an invalid cert + encrypted = crypto.publicEncrypt(cert, Buffer.from('test')); + } catch (err) { + throw new Error( + `The certificate "${chalk.yellow(crtFile)}" is invalid.\n${ + err.message + }` + ); + } + + try { + // privateDecrypt will throw an error with an invalid key + crypto.privateDecrypt(key, encrypted); + } catch (err) { + throw new Error( + `The certificate key "${chalk.yellow(keyFile)}" is invalid.\n${ + err.message + }` + ); + } +} + +// Read file and throw an error if it doesn't exist +function readEnvFile(file, type) { + if (!fs.existsSync(file)) { + throw new Error( + `You specified ${chalk.cyan( + type + )} in your env, but the file "${chalk.yellow( + file + )}" can't be found.` + ); + } + return fs.readFileSync(file); +} + +// Get the https config +// Return cert files if provided in env, otherwise just true or false +function getHttpsConfig() { + const { SSL_CRT_FILE, SSL_KEY_FILE, HTTPS } = process.env; + const isHttps = HTTPS === 'true'; + + if (isHttps && SSL_CRT_FILE && SSL_KEY_FILE) { + const crtFile = path.resolve(paths.appPath, SSL_CRT_FILE); + const keyFile = path.resolve(paths.appPath, SSL_KEY_FILE); + const config = { + cert: readEnvFile(crtFile, 'SSL_CRT_FILE'), + key: readEnvFile(keyFile, 'SSL_KEY_FILE'), + }; + + validateKeyAndCerts({ ...config, keyFile, crtFile }); + return config; + } + return isHttps; +} + +module.exports = getHttpsConfig; diff --git a/config/jest/babelTransform.js b/config/jest/babelTransform.js new file mode 100644 index 000000000..39446fa61 --- /dev/null +++ b/config/jest/babelTransform.js @@ -0,0 +1,29 @@ +'use strict'; + +const babelJest = require('babel-jest').default; + +const hasJsxRuntime = (() => { + if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') { + return false; + } + + try { + require.resolve('react/jsx-runtime'); + return true; + } catch (e) { + return false; + } +})(); + +module.exports = babelJest.createTransformer({ + presets: [ + [ + require.resolve('babel-preset-react-app'), + { + runtime: hasJsxRuntime ? 'automatic' : 'classic', + }, + ], + ], + babelrc: false, + configFile: false, +}); diff --git a/config/jest/cssTransform.js b/config/jest/cssTransform.js new file mode 100644 index 000000000..e70083e7b --- /dev/null +++ b/config/jest/cssTransform.js @@ -0,0 +1,14 @@ +'use strict'; + +// This is a custom Jest transformer turning style imports into empty objects. +// http://facebook.github.io/jest/docs/en/webpack.html + +module.exports = { + process() { + return 'module.exports = {};'; + }, + getCacheKey() { + // The output is always the same. + return 'cssTransform'; + }, +}; diff --git a/config/jest/fileTransform.js b/config/jest/fileTransform.js new file mode 100644 index 000000000..8b5124cac --- /dev/null +++ b/config/jest/fileTransform.js @@ -0,0 +1,40 @@ +'use strict'; + +const path = require('path'); +const camelcase = require('camelcase'); + +// This is a custom Jest transformer turning file imports into filenames. +// http://facebook.github.io/jest/docs/en/webpack.html + +module.exports = { + process(src, filename) { + const assetFilename = JSON.stringify(path.basename(filename)); + + if (filename.match(/\.svg$/)) { + // Based on how SVGR generates a component name: + // https://github.com/smooth-code/svgr/blob/01b194cf967347d43d4cbe6b434404731b87cf27/packages/core/src/state.js#L6 + const pascalCaseFilename = camelcase(path.parse(filename).name, { + pascalCase: true, + }); + const componentName = `Svg${pascalCaseFilename}`; + return `const React = require('react'); + module.exports = { + __esModule: true, + default: ${assetFilename}, + ReactComponent: React.forwardRef(function ${componentName}(props, ref) { + return { + $$typeof: Symbol.for('react.element'), + type: 'svg', + ref: ref, + key: null, + props: Object.assign({}, props, { + children: ${assetFilename} + }) + }; + }), + };`; + } + + return `module.exports = ${assetFilename};`; + }, +}; diff --git a/config/jest/identity-obj-proxy-revised.js b/config/jest/identity-obj-proxy-revised.js new file mode 100644 index 000000000..38ee4e299 --- /dev/null +++ b/config/jest/identity-obj-proxy-revised.js @@ -0,0 +1,16 @@ +// Proxy for jest tests to convert css moodule class names. +// Based on https://medium.com/trabe/testing-css-modules-in-react-components-with-jest-enzyme-and-a-custom-modulenamemapper-8ff86c7d18a2 + +module.exports = new Proxy( + {}, + { + get: function getter(target, key) { + if (key === '__esModule') { + return false; + } + + // Convert camelCase to kebab-case for class selectors in unit tests. + return key.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`); + }, + } +); diff --git a/config/modules.js b/config/modules.js new file mode 100644 index 000000000..99ebd26e6 --- /dev/null +++ b/config/modules.js @@ -0,0 +1,134 @@ +'use strict'; + +const fs = require('fs'); +const path = require('path'); +const paths = require('./paths'); +const chalk = require('react-dev-utils/chalk'); +const resolve = require('resolve'); + +/** + * Get additional module paths based on the baseUrl of a compilerOptions object. + * + * @param {Object} options + */ +function getAdditionalModulePaths(options = {}) { + const baseUrl = options.baseUrl; + + if (!baseUrl) { + return ''; + } + + const baseUrlResolved = path.resolve(paths.appPath, baseUrl); + + // We don't need to do anything if `baseUrl` is set to `node_modules`. This is + // the default behavior. + if (path.relative(paths.appNodeModules, baseUrlResolved) === '') { + return null; + } + + // Allow the user set the `baseUrl` to `appSrc`. + if (path.relative(paths.appSrc, baseUrlResolved) === '') { + return [paths.appSrc]; + } + + // If the path is equal to the root directory we ignore it here. + // We don't want to allow importing from the root directly as source files are + // not transpiled outside of `src`. We do allow importing them with the + // absolute path (e.g. `src/Components/Button.js`) but we set that up with + // an alias. + if (path.relative(paths.appPath, baseUrlResolved) === '') { + return null; + } + + // Otherwise, throw an error. + throw new Error( + chalk.red.bold( + "Your project's `baseUrl` can only be set to `src` or `node_modules`." + + ' Create React App does not support other values at this time.' + ) + ); +} + +/** + * Get webpack aliases based on the baseUrl of a compilerOptions object. + * + * @param {*} options + */ +function getWebpackAliases(options = {}) { + const baseUrl = options.baseUrl; + + if (!baseUrl) { + return {}; + } + + const baseUrlResolved = path.resolve(paths.appPath, baseUrl); + + if (path.relative(paths.appPath, baseUrlResolved) === '') { + return { + src: paths.appSrc, + }; + } +} + +/** + * Get jest aliases based on the baseUrl of a compilerOptions object. + * + * @param {*} options + */ +function getJestAliases(options = {}) { + const baseUrl = options.baseUrl; + + if (!baseUrl) { + return {}; + } + + const baseUrlResolved = path.resolve(paths.appPath, baseUrl); + + if (path.relative(paths.appPath, baseUrlResolved) === '') { + return { + '^src/(.*)$': '/src/$1', + }; + } +} + +function getModules() { + // Check if TypeScript is setup + const hasTsConfig = fs.existsSync(paths.appTsConfig); + const hasJsConfig = fs.existsSync(paths.appJsConfig); + + if (hasTsConfig && hasJsConfig) { + throw new Error( + 'You have both a tsconfig.json and a jsconfig.json. If you are using TypeScript please remove your jsconfig.json file.' + ); + } + + let config; + + // If there's a tsconfig.json we assume it's a + // TypeScript project and set up the config + // based on tsconfig.json + if (hasTsConfig) { + const ts = require(resolve.sync('typescript', { + basedir: paths.appNodeModules, + })); + config = ts.readConfigFile(paths.appTsConfig, ts.sys.readFile).config; + // Otherwise we'll check if there is jsconfig.json + // for non TS projects. + } else if (hasJsConfig) { + config = require(paths.appJsConfig); + } + + config = config || {}; + const options = config.compilerOptions || {}; + + const additionalModulePaths = getAdditionalModulePaths(options); + + return { + additionalModulePaths: additionalModulePaths, + webpackAliases: getWebpackAliases(options), + jestAliases: getJestAliases(options), + hasTsConfig, + }; +} + +module.exports = getModules(); diff --git a/config/paths.js b/config/paths.js new file mode 100644 index 000000000..4eb0cabdd --- /dev/null +++ b/config/paths.js @@ -0,0 +1,75 @@ +'use strict'; + +const path = require('path'); +const fs = require('fs'); +const getPublicUrlOrPath = require('react-dev-utils/getPublicUrlOrPath'); + +// Make sure any symlinks in the project folder are resolved: +// https://github.com/facebook/create-react-app/issues/637 +const appDirectory = fs.realpathSync(process.cwd()); +const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath); + +// We use `PUBLIC_URL` environment variable or "homepage" field to infer +// "public path" at which the app is served. +// webpack needs to know it to put the right