diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 3fed1fce7..000000000 --- a/.babelrc +++ /dev/null @@ -1,20 +0,0 @@ -{ - "presets": [ - ["es2015", {"modules": false}], - "react" - ], - "plugins": [ - "transform-object-rest-spread" - ], - "env": { - "lib-dir": { - "plugins": ["transform-es2015-modules-commonjs"] - }, - "webpack": { - "plugins": ["transform-es2015-modules-commonjs"] - }, - "test": { - "plugins": ["transform-es2015-modules-commonjs"] - } - } -} diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 5f7037303..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,63 +0,0 @@ -var ecmaFeatures = { - 'jsx': true, - 'arrowFunctions': true, - 'blockBindings': true, - 'defaultParams': true, - 'destructuring': true, - 'forOf': true, - 'generators': true, - 'objectLiteralComputedProperties': true, - 'objectLiteralShorthandMethods': true, - 'objectLiteralShorthandProperties': true, - 'experimentalObjectRestSpread': true, - 'restParams': true, - 'spread': true, - 'templateStrings': true, - 'modules': true, - 'classes': true -}; - -var rules = { - 'comma-dangle': 0, - 'new-cap': 0, - 'arrow-body-style': 0, - 'prefer-template': 0, - 'no-underscore-dangle': 0, - 'object-shorthand': 0, - 'func-names': 0, - 'no-extra-parens': ['error', 'functions'], - 'dot-notation': 0, - 'max-len': 0, - 'camelcase': 0, - 'react/jsx-pascal-case': 0, - 'prefer-const': 0, - 'react/jsx-filename-extension': 0, - 'linebreak-style': 0, - 'react/require-extension': 0, - 'react/no-children-prop': 0, - 'react/require-default-props': 0, - 'react/forbid-prop-types': 0, - 'jsx-a11y/no-noninteractive-element-interactions': 1 -}; - -module.exports = { - "root": true, - 'extends': 'airbnb', - 'env': { - 'browser': true, - 'node': true, - 'es6': true - }, - 'globals': { - 'describe': true, - 'it': true - }, - 'plugins': [ - 'react' - ], - 'parserOptions': { - 'sourceType': 'module', - 'ecmaFeatures': ecmaFeatures - }, - rules: rules -}; diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..0e1b9c08b --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,92 @@ +{ + "root": true, + "extends": [ + "airbnb", + "prettier", + "plugin:storybook/recommended" + ], + "parser": "@babel/eslint-parser", + "env": { + "browser": true, + "node": true, + "es6": true + }, + "plugins": [ + "react" + ], + "rules": { + "react/forbid-foreign-prop-types": 0, + "comma-dangle": 0, + "new-cap": 0, + "arrow-body-style": 0, + "prefer-template": 0, + "no-underscore-dangle": 0, + "object-shorthand": 0, + "func-names": 0, + "dot-notation": 0, + "max-len": 0, + "camelcase": 0, + "react/jsx-pascal-case": 0, + "prefer-const": 0, + "operator-linebreak": 0, + "react/jsx-filename-extension": 0, + "linebreak-style": 0, + "react/require-extension": 0, + "react/no-children-prop": 0, + "react/require-default-props": 0, + "react/forbid-prop-types": 0, + "jsx-a11y/no-noninteractive-element-interactions": 0, + "import/no-webpack-loader-syntax": 0, + "import/no-unresolved": 0, + "react/jsx-props-no-spreading": 0, + "react/destructuring-assignment": 0, + "jsx-a11y/click-events-have-key-events": 0, + "jsx-a11y/no-static-element-interactions": 0, + "react/jsx-no-constructed-context-values": 0, + "consistent-return": 0, + "no-restricted-globals": 0, + "no-nested-ternary": 0, + "import/prefer-default-export": 0, + "prefer-destructuring": [ + "error", + { + "array": false, + "object": true + } + ], + "import/no-extraneous-dependencies": 0, + "no-param-reassign": 0, + "jsx-a11y/mouse-events-have-key-events": 0 + }, + "parserOptions": { + "sourceType": "module", + "ecmaFeatures": { + "jsx": true, + "arrowFunctions": true, + "blockBindings": true, + "defaultParams": true, + "destructuring": true, + "forOf": true, + "generators": true, + "objectLiteralComputedProperties": true, + "objectLiteralShorthandMethods": true, + "objectLiteralShorthandProperties": true, + "experimentalObjectRestSpread": true, + "restParams": true, + "spread": true, + "templateStrings": true, + "modules": true, + "classes": true + } + }, + "overrides": [ + { + "files": [ + "testUtils.js" + ], + "env": { + "jest": true + } + } + ] +} \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..88552ce2c --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +tidelift: npm/reactstrap +custom: https://www.paypal.me/evansharp diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..601dea123 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,101 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: daily + time: "13:00" + open-pull-requests-limit: 10 + ignore: + - dependency-name: conventional-recommended-bump + versions: + - ">= 5.a, < 6" + - dependency-name: conventional-recommended-bump + versions: + - ">= 6.a, < 7" + - dependency-name: cross-env + versions: + - ">= 5.a, < 6" + - dependency-name: cross-env + versions: + - ">= 6.a, < 7" + - dependency-name: cross-env + versions: + - ">= 7.a, < 8" + - dependency-name: css-loader + versions: + - ">= 3.a, < 4" + - dependency-name: customize-cra + versions: + - ">= 1.a, < 2" + - dependency-name: ejs + versions: + - ">= 3.a, < 4" + - dependency-name: raw-loader + versions: + - ">= 4.a, < 5" + - dependency-name: react-helmet + versions: + - ">= 6.a, < 7" + - dependency-name: react-router + versions: + - ">= 4.a, < 5" + - dependency-name: react-router + versions: + - ">= 5.a, < 6" + - dependency-name: react-scripts + versions: + - "> 2.1.1" + - dependency-name: react-scripts + versions: + - ">= 3.a, < 4" + - dependency-name: react-transition-group + versions: + - ">= 4.a, < 5" + - dependency-name: rollup + versions: + - ">= 2.a, < 3" + - dependency-name: rollup-plugin-babel-minify + versions: + - ">= 10.a, < 11" + - dependency-name: rollup-plugin-babel-minify + versions: + - ">= 9.a, < 10" + - dependency-name: rollup-plugin-node-resolve + versions: + - ">= 5.a, < 6" + - dependency-name: style-loader + versions: + - ">= 1.a, < 2" + - dependency-name: css-loader + versions: + - 5.0.1 + - 5.0.2 + - 5.1.0 + - 5.1.1 + - 5.1.2 + - 5.1.3 + - 5.1.4 + - 5.2.0 + - 5.2.1 + - 5.2.3 + - dependency-name: "@types/react" + versions: + - 17.0.1 + - 17.0.2 + - 17.0.3 + - dependency-name: mini-css-extract-plugin + versions: + - 1.3.5 + - 1.3.6 + - 1.3.7 + - 1.3.8 + - 1.3.9 + - dependency-name: "@babel/plugin-proposal-object-rest-spread" + versions: + - 7.12.13 + - 7.13.0 + - dependency-name: webpack-cli + versions: + - 4.4.0 + - 4.5.0 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000..a7a230c82 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,30 @@ +name: Test Coverage + +on: + push: + branches: [ master, bootstrap5 ] + pull_request: + branches: [ master, bootstrap5 ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v2 + + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + cache: 'yarn' + + - run: rm -rf node_modules && yarn install --frozen-lockfile + - name: Run Coverage + run: | + npm run cover -- --runInBand + - name: Upload to Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..49b49a86e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,18 @@ +name: Manually Publish Docs +on: workflow_dispatch +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v2 + with: + node-version: '12.x' + registry-url: 'https://registry.npmjs.org' + - name: Install dependencies + run: rm -rf node_modules && yarn install --frozen-lockfile + - name: Publish Docs + env: + GITHUB_TOKEN: ${{ secrets.REACTSTRAP_DOCS_GITHUB_TOKEN }} + run: ./scripts/docs diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 000000000..10ffaedf7 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,46 @@ +on: + push: + branches: + - master +name: Release Bot +jobs: + release-pr: + runs-on: ubuntu-latest + steps: + - uses: GoogleCloudPlatform/release-please-action@v3 + id: release-please + with: + release-type: node + package-name: "reactstrap" + changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":true},{"type":"refactor","section":"Miscellaneous","hidden":false}]' + command: release-pr + + release: + runs-on: ubuntu-latest + steps: + - uses: GoogleCloudPlatform/release-please-action@v3 + id: release + with: + release-type: node + package-name: "reactstrap" + command: github-release + - uses: actions/checkout@v2 + if: ${{ steps.release.outputs.release_created }} + - uses: actions/setup-node@v2 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + if: ${{ steps.release.outputs.release_created }} + - name: Install dependencies + run: rm -rf node_modules && yarn install --frozen-lockfile + if: ${{ steps.release.outputs.release_created }} + - name: Publish package + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + if: ${{ steps.release.outputs.release_created }} + - name: Publish Docs + env: + GITHUB_TOKEN: ${{ secrets.REACTSTRAP_TOKEN }} + run: ./scripts/docs + if: ${{ steps.release.outputs.release_created }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..5332c8cd8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ master, release-* ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + - run: rm -rf node_modules && yarn install --frozen-lockfile + - run: npm run lint + - run: npm run build --if-present + - run: npm run test:ci diff --git a/.gitignore b/.gitignore index f06f3ddb5..a296b70e6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ node_modules /dist /build /lib +/esm +/es +.DS_Store .idea .history npm-debug.log diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..48082f72f --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +12 diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1 @@ +{} diff --git a/.storybook/main.cjs b/.storybook/main.cjs new file mode 100644 index 000000000..3a41deab1 --- /dev/null +++ b/.storybook/main.cjs @@ -0,0 +1,11 @@ +module.exports = { + stories: [ + '../stories/**/*.stories.mdx', + '../stories/**/*.stories.js' + ], + addons: [ + '@storybook/addon-links', + '@storybook/addon-docs' + ], + staticDirs: ['../static'] +}; diff --git a/.storybook/manager-head.html b/.storybook/manager-head.html new file mode 100644 index 000000000..3266b9c00 --- /dev/null +++ b/.storybook/manager-head.html @@ -0,0 +1 @@ + diff --git a/.storybook/manager.cjs b/.storybook/manager.cjs new file mode 100644 index 000000000..e5f450653 --- /dev/null +++ b/.storybook/manager.cjs @@ -0,0 +1,43 @@ +import { addons } from '@storybook/addons'; +import { STORY_RENDERED } from '@storybook/core-events' +import { create } from '@storybook/theming'; + +const theme = create({ + base: 'light', + brandTitle: 'Reactstrap', + brandUrl: 'https://github.com/reactstrap/reactstrap', + brandImage: 'logo.svg', +}); + +addons.setConfig({ + theme +}); + +addons.register('TitleAddon', api => { + const customTitle = 'Reactstrap'; + let interval = null; + const setTitle = () => { + clearTimeout(interval); + + let storyData = null; + try { + storyData = api.getCurrentStoryData(); + } catch(e) {} + + let title; + if (!storyData) { + title = customTitle; + } else { + title = `${storyData.kind} - ${storyData.name} ⋅ ${customTitle}` + } + + if (document.title !== title) { + document.title = title; + } + interval = setTimeout(setTitle, 100); + }; + setTitle(); + api.on(STORY_RENDERED, story => { + setTitle(); + }) +}) diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html new file mode 100644 index 000000000..adfb667a5 --- /dev/null +++ b/.storybook/preview-head.html @@ -0,0 +1,13 @@ + + + \ No newline at end of file diff --git a/.storybook/preview.cjs b/.storybook/preview.cjs new file mode 100644 index 000000000..660fc6f52 --- /dev/null +++ b/.storybook/preview.cjs @@ -0,0 +1,18 @@ +export const parameters = { + actions: { argTypesRegex: "^on[A-Z].*" }, + controls: { + hideNoControlsWarning: true, + matchers: { + date: /Date$/ + }, + }, + options: { + storySort: { + order: ['Home', ['Installation', 'GitHub', 'Upgrading', 'Themes'], '*'] + } + }, + viewMode: 'docs', + previewTabs: { + canvas: { hidden: true }, + }, +} diff --git a/.storybook/webpack.config.cjs b/.storybook/webpack.config.cjs new file mode 100644 index 000000000..21208aa9a --- /dev/null +++ b/.storybook/webpack.config.cjs @@ -0,0 +1,11 @@ +const path = require('path'); + +module.exports = async ({ config }) => { + config.resolve = { + alias: { + reactstrap: path.resolve(__dirname, '../src/') + }, + }; + + return config; +}; diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6e1d769ad..000000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -sudo: false -dist: trusty -language: node_js -node_js: -- 10 -cache: - directories: - - node_modules -before_script: -- chmod +x scripts/docs -script: -- npm run lint -- npm run cover -- --runInBand -after_script: -- npm run report-coverage -after_success: -- scripts/docs -env: - global: - secure: Jb9Q9+XnCh+n5uNJuqUmLmPG6mUUv7iTi5bNeK6TpLdrVKk+2mLdobV3iRUy/DEqNLwt2lxwzp1oq4YI/lZ0vlUam7HpFWpSf4PAI8ckGRqFdus7K45o+zxHLJ2zBQwXacsZB204qtO8RDdXaNb9PjRGNFdKm3ZuqZTv6PkO+hS05EFxmcW95HiSHpV/qPxKjEsDdCpoTNEA3MP0dNtSKygeht2nFQVr7WkOhkjDvUtU9EypkGbJeBCd0AckqXM0Qvmdi++csyz5VRQhhUwI/2BKSjbBVUZ6Q3m8sX2p4G/wFEbhXl5eKTzAYLuf+9kT9Jg+gKdT30PoChx2NPKHv0XS8BOrKQScs6KIwOVH2/CNCKqAxh3HkCMSONmqEQRqBK1V/gSCZ4zDX9PgrfyE23FLN/GM4YtBlkVCMLh8Y/hiapXUaDobxh/o2tfOoQkeoZWZeoeIydhwULTDSG2R3PKV7rkGYas0VQ+qtU+i8VG+PzjPT4DRf4xIKzNzJbFIq9oTNYBTasWi6+OKzNw0uH3ydmRzf+GxaTwOIdR3nRQMQN60dH+6qeJkrIvpfrGAB5gqTutXPfe0xf2rMrW6dyipnSgGlk1JOgA+cU4CPyHql1OA+ox/kIQ4I3PIJBu5YYE3amFmKLu3vnDHELSzM1CYeOs0sDasRyiDkKE79l0= -branches: - only: - - master - - "/^\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/" -before_deploy: -- echo 'Preparing to publish' -- npm run build -deploy: - provider: npm - email: dumbdrum@gmail.com - api_key: - secure: Fth8EnmhP+/TV7Uj5Czz3nwuek40GOnIlWRppqGs2IA+Q/le7V3R4xvgTlA/p5xN17IH1EhT/UVZBoNd1lOi6wcbgqrkeqPTarqNbkhzaEFJokNBkOJR7FmGC41Y76XbqPl2zeU//p+7dtrCEUacXCDWEfoCjA34GHaD0snd2yuPXYH0FOy1YkydauqGjLg8Y65g3f94xxAnY2Wm2TJzC5rnCjKPMXKEKAX6LpI5UIbq8UDPP8sFv+JpAkgI1/ygY8daBOeIurJEUUoVNazZWtvgdMFcBlL90QbP62HTU1vGTMK7cNT64COTlOrP4BdvIgWh1KaYXiboEwFrooA3fp/1KDNcCC1sXmXa2UoFOAUh9vr4SFBA8vE7tjWEvYtI2zCVD8b5ekLGfPandezKolh8V3sbeJrDFhY0G9lap8ftHWQejohvG/6xjI+/pe+UDpHH1USIqf0DtAnDn5mNWWav/5xCp8HlsIsmh5EKCM3//a8aWY6H+eMfeEFPzU/X3jC4ZUGZ+D5ZGQQ/NX9tvyeoH0pnRnlZil8MAjf/e2/IWu66ruAUde3eMpX4h+w0q8bVGvH4ObR7QKiJdTntwJSsp9iO4uBHTSpoo9yYO9ycepMAc5af0Np7K1xOv7ja5BvMesSVzyZsbDK3Q8iOOWBDk54bqV7PrFtRPn+VIjk= - skip_cleanup: true - on: - tags: true diff --git a/CHANGELOG.md b/CHANGELOG.md index c16b644bb..7bb91fe9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,773 @@ +# [9.0.0-8](https://github.com/reactstrap/reactstrap/compare/v9.0.0-7...v9.0.0-8) (2021-10-15) + + +### Bug Fixes + +* **Button:** remove extra close icon in `btn-close` ([#2318](https://github.com/reactstrap/reactstrap/issues/2318)) ([f1289c7](https://github.com/reactstrap/reactstrap/commit/f1289c79cc4828cf84b0d6d842297b52dc1fe102)) +* **Label:** add `form-label` class for labels of vertical forms ([#2317](https://github.com/reactstrap/reactstrap/issues/2317)) ([43d0a37](https://github.com/reactstrap/reactstrap/commit/43d0a37e597f3081a3ebe633f6d041e4f62e111d)) +* **types:** add 'swtch' to `InputType` ([#2340](https://github.com/reactstrap/reactstrap/issues/2340)) ([f449c1c](https://github.com/reactstrap/reactstrap/commit/f449c1c10e38af03719aebb19534075b6b46f40c)) + + + +# [9.0.0-7](https://github.com/reactstrap/reactstrap/compare/v9.0.0-6...v9.0.0-7) (2021-09-27) + + +### Bug Fixes + +* **types:** remove duplicate types/lib/index.d.ts ([#2316](https://github.com/reactstrap/reactstrap/issues/2316)) ([38f8060](https://github.com/reactstrap/reactstrap/commit/38f80603f42d114915c22f88549a1d73d6fd545d)) + + + +# [9.0.0-6](https://github.com/reactstrap/reactstrap/compare/v9.0.0-5...v9.0.0-6) (2021-09-24) + + +### Bug Fixes + +* **build:** set --compress false for microbundle build ([#2314](https://github.com/reactstrap/reactstrap/issues/2314)) ([a119aae](https://github.com/reactstrap/reactstrap/commit/a119aaedd6e598cb9bd7d4b4e1cde68e21b58f9c)) + + + +# [9.0.0-5](https://github.com/reactstrap/reactstrap/compare/v9.0.0-4...v9.0.0-5) (2021-09-23) + + +### Bug Fixes + +* **types:** export UncontrolledAccordion types ([#2313](https://github.com/reactstrap/reactstrap/issues/2313)) ([600e5d4](https://github.com/reactstrap/reactstrap/commit/600e5d4ccc2140d3fd9c5221cc2d5355b57e3afe)) + + + +# [9.0.0-4](https://github.com/reactstrap/reactstrap/compare/v9.0.0-3...v9.0.0-4) (2021-09-23) + + +### Bug Fixes + +* **types:** export AccordionBody types ([#2312](https://github.com/reactstrap/reactstrap/issues/2312)) ([ef202b3](https://github.com/reactstrap/reactstrap/commit/ef202b39ada495bfdd25425a58635e3a633000a0)) + + + +# [9.0.0-3](https://github.com/reactstrap/reactstrap/compare/v9.0.0-2...v9.0.0-3) (2021-09-23) + + +### Bug Fixes + +* **popover:** add default popper offset for popover ([d49dc3f](https://github.com/reactstrap/reactstrap/commit/d49dc3f215bea461d325e95b735f4a2becd7fc91)) +* **types:** import React for UncontrolledAccordion type defs ([#2292](https://github.com/reactstrap/reactstrap/issues/2292)) ([6e5ebb7](https://github.com/reactstrap/reactstrap/commit/6e5ebb7276bf0432f108f6f45335638e4343b9fc)) +* **types:** use types from @popperjs/core ([55da7db](https://github.com/reactstrap/reactstrap/commit/55da7dbdb1197abc0e858ba67298cd530c068e78)) + + +### Features + +* **forms:** Add support for floating labels ([b9ad8cc](https://github.com/reactstrap/reactstrap/commit/b9ad8ccdf084deec8510289e806fd7e51aadbc89)) +* **Navbar:** add container options ([00b88f7](https://github.com/reactstrap/reactstrap/commit/00b88f7ac97d20d9230af6d1ea43cb40e99916ca)) + + + +# [9.0.0-2](https://github.com/reactstrap/reactstrap/compare/v9.0.0-0...v9.0.0-2) (2021-09-22) + + +### Features + +* **accordion:** add `flush` support and `stayOpen` support ([272b773](https://github.com/reactstrap/reactstrap/commit/272b773972a16f60d581a13a5807277884a1693f)) +* **bs5:** add Offcanvas ([df61c93](https://github.com/reactstrap/reactstrap/commit/df61c937f941a166538e9c7012d6b51c56ea6a41)) +* **carousel:** add Bootstrap5 updates ([1cca298](https://github.com/reactstrap/reactstrap/commit/1cca298f74f85599fa8e5b22fa73e15ebc76315d)) +* **collapse:** add horizontal collapse ([45d28fe](https://github.com/reactstrap/reactstrap/commit/45d28fec7becf71f0e57fe0612db6b9ff74fdb9a)) +* **ListGroup:** Add ListGroupNumbered ([ea4621e](https://github.com/reactstrap/reactstrap/commit/ea4621e5d90f717dcc84e295658767eed6fef486)) +* **Placeholder:** add component ([0b315ab](https://github.com/reactstrap/reactstrap/commit/0b315abc0428f9fa6096115a39e6697b7e61abd8)) + + + +# [9.0.0-0](https://github.com/reactstrap/reactstrap/compare/8.9.0...9.0.0-0) (2021-03-03) + + +### Bug Fixes + +* **InputGroup:** toggle if clicking dropdown input ([6915b7b](https://github.com/reactstrap/reactstrap/commit/6915b7b9ff463d84dd3064c1560018bd322ad175)) + + +### Code Refactoring + +* **PopperContent:** update positionedFix prop to strategy ([fa1f1ed](https://github.com/reactstrap/reactstrap/commit/fa1f1eddcab1d3a5b70ad8861aef128eafa19fc1)) + + +### Features + +* **bs5:** add accordion ([#2105](https://github.com/reactstrap/reactstrap/issues/2105)) ([115d204](https://github.com/reactstrap/reactstrap/commit/115d20476c1916106a35eb6e4010f488d99cffb9)) +* **bs5:** Convert Dropdown & DropdownMenu to RTL ([aa51131](https://github.com/reactstrap/reactstrap/commit/aa511319d30a109efb0245afe8b7b275ceff167e)) +* **bs5:** Update tooltip/popover arrow classes ([1c9c037](https://github.com/reactstrap/reactstrap/commit/1c9c037ad9129a68f99acbdda6779fa8ca23193d)) +* **Dropdown:** Add backwards compatible left & right ([61aca5d](https://github.com/reactstrap/reactstrap/commit/61aca5db428c05beb9a2c5f1631d1cf57e357b0a)) +* remove form-control-file class ([6ea074a](https://github.com/reactstrap/reactstrap/commit/6ea074aa0feecb19fe6a33524362eb8cae1fbb6b)), closes [/getbootstrap.com/docs/5.0/migration/#forms-2](https://github.com//getbootstrap.com/docs/5.0/migration//issues/forms-2) +* remove InputGroupAddon ([706869f](https://github.com/reactstrap/reactstrap/commit/706869fa0b05019e38d78d8877afab7d3481a67a)) +* replace form-control-range with form-range ([bd8383d](https://github.com/reactstrap/reactstrap/commit/bd8383d5bb68f74c3a17e7bafe58196e41ae3992)), closes [/getbootstrap.com/docs/5.0/migration/#forms-2](https://github.com//getbootstrap.com/docs/5.0/migration//issues/forms-2) +* support form switch ([87156f5](https://github.com/reactstrap/reactstrap/commit/87156f589eb585ddcc01a2120f757bbd38c0ab62)) +* use form-select class with native select ([1764eb3](https://github.com/reactstrap/reactstrap/commit/1764eb32a39ac4788086922aac55d3fbd72dea83)), closes [/getbootstrap.com/docs/5.0/migration/#forms-2](https://github.com//getbootstrap.com/docs/5.0/migration//issues/forms-2) +* **bs5:** Rename margin utils ([407546c](https://github.com/reactstrap/reactstrap/commit/407546cb490ea7522b38bd0b9d81a54efde6f2f0)) +* **bs5:** Replace .btn-block with utility classes ([755ede1](https://github.com/reactstrap/reactstrap/commit/755ede18b943667a94e40875e7bc82b38c53cb70)) +* **bs5:** change .close to .btn-close ([#2116](https://github.com/reactstrap/reactstrap/issues/2116)) ([0cdc1ce](https://github.com/reactstrap/reactstrap/commit/0cdc1ced7ca505b9899b327a9cf39288acc1b6c8)) +* **bs5:** change no-gutters class to gx-0 in Row ([#2119](https://github.com/reactstrap/reactstrap/issues/2119)) ([884bc98](https://github.com/reactstrap/reactstrap/commit/884bc9841d53030de5fb1a33dc3cc58e7e3651c5)) +* **bs5:** convert .sr-only to .visually-hidden ([4b5b9e5](https://github.com/reactstrap/reactstrap/commit/4b5b9e57933c0321c94a1951a96d40c1f59e305a)) +* **bs5:** replace form-group class with mb-3 ([c807567](https://github.com/reactstrap/reactstrap/commit/c807567a6f9b460211f34f6d477eb24794a4cd11)) +* **bs5:** update badge classes ([#2117](https://github.com/reactstrap/reactstrap/issues/2117)) ([695f06b](https://github.com/reactstrap/reactstrap/commit/695f06b876eda563715e7619e32106cdea246084)) +* update input group to have type dropdown ([5ce2b49](https://github.com/reactstrap/reactstrap/commit/5ce2b492c607372863d5b8d81d6953a7435ef557)) +* **bs5:** Support xxl breakpoint ([13d5311](https://github.com/reactstrap/reactstrap/commit/13d5311d6a6d4eb1ef14bc5667bf1bbe83c07107)) +* **Carousel:** Add dark prop ([ba25aa0](https://github.com/reactstrap/reactstrap/commit/ba25aa0d9219b0441af3b1fe0c475596725821b6)) +* **DropdownMenu:** add-dark-prop ([5cc8c49](https://github.com/reactstrap/reactstrap/commit/5cc8c493565528b2cefd15882852eacf72bfa2f4)) +* **modal:** add fullscreen option to Modal component ([e6eb36e](https://github.com/reactstrap/reactstrap/commit/e6eb36e4e0e8ea7f329c969aaff60b6e807efbc9)) + + +### BREAKING CHANGES + +* **PopperContent:** to update the old `positionFixed` popper prop to the new `strategy` prop. + +# [8.10.0](https://github.com/reactstrap/reactstrap/compare/8.9.0...8.10.0) (2021-09-02) + + +### Features + +* **Dropdown:** add support for listbox or menu role ([#2077](https://github.com/reactstrap/reactstrap/issues/2077)) ([fd9e988](https://github.com/reactstrap/reactstrap/commit/fd9e9888b7712905a85684f7822fc75fde38c069)) + + + +# [8.9.0](https://github.com/reactstrap/reactstrap/compare/8.8.1...8.9.0) (2021-01-19) + + +### Features + +* **Modal:** Add trapFocus prop ([#2073](https://github.com/reactstrap/reactstrap/issues/2073)) ([6e0fd56](https://github.com/reactstrap/reactstrap/commit/6e0fd565b66c9a16b3187adcb71d52d2d9db2902)) +* **Progress:** Add barStyle prop ([#2075](https://github.com/reactstrap/reactstrap/issues/2075)) ([27faa8e](https://github.com/reactstrap/reactstrap/commit/27faa8e5c575314070f1a35e1969c81e25b13942)) + + + +## [9.2.3](https://github.com/reactstrap/reactstrap/compare/v9.2.2...v9.2.3) (2024-09-26) + + +### Bug Fixes + +* **UncontrolledAccordion:** prevent setOpen to set undefined value for open ([#2814](https://github.com/reactstrap/reactstrap/issues/2814)) ([717a5e8](https://github.com/reactstrap/reactstrap/commit/717a5e84263da39eccbd18e88530395afe374d66)) + +## [9.2.2](https://github.com/reactstrap/reactstrap/compare/v9.2.1...v9.2.2) (2024-01-19) + + +### Bug Fixes + +* dropdown with inNavbar bug ([18cc094](https://github.com/reactstrap/reactstrap/commit/18cc094afa8d4e95785d823eb735e06c28547d19)) + +## [9.2.1](https://github.com/reactstrap/reactstrap/compare/v9.2.0...v9.2.1) (2023-10-05) + + +### Bug Fixes + +* **#1680:** arrowClass not applied to arrow ([#2772](https://github.com/reactstrap/reactstrap/issues/2772)) ([aeaf180](https://github.com/reactstrap/reactstrap/commit/aeaf180701511377ab6a00830ccac4fb96e84028)) +* **#2755:** make offcanvas example code readable ([#2768](https://github.com/reactstrap/reactstrap/issues/2768)) ([b932582](https://github.com/reactstrap/reactstrap/commit/b932582798911ebd57ad6735baf9f4fa21d8af7a)) + +## [9.2.0](https://github.com/reactstrap/reactstrap/compare/v9.1.10...v9.2.0) (2023-06-09) + + +### Features + +* **modal:** add 'aria-modal="true"' to modal ([2a43591](https://github.com/reactstrap/reactstrap/commit/2a43591f6d6f2fd6e1e5f7f3bd65caf9efd7f7ab)) + + +### Bug Fixes + +* **#2662:** remove many instances of default props ([#2752](https://github.com/reactstrap/reactstrap/issues/2752)) ([b7d571c](https://github.com/reactstrap/reactstrap/commit/b7d571c777de6169de01da5cc14f2eb28988071a)) + +## [9.1.10](https://github.com/reactstrap/reactstrap/compare/v9.1.9...v9.1.10) (2023-05-13) + + +### Bug Fixes + +* **#2427:** error building esm files ([#2748](https://github.com/reactstrap/reactstrap/issues/2748)) ([04d571d](https://github.com/reactstrap/reactstrap/commit/04d571dcaa630ccbc8b8363ad06dad436f11780e)) +* properly pass in `isOpen` in modal test ([#2745](https://github.com/reactstrap/reactstrap/issues/2745)) ([8cb0515](https://github.com/reactstrap/reactstrap/commit/8cb051522ddfad48c08651604744caea25b5e68e)) + +## [9.1.9](https://github.com/reactstrap/reactstrap/compare/v9.1.8...v9.1.9) (2023-04-11) + + +### Bug Fixes + +* **#2730:** import error ([#2733](https://github.com/reactstrap/reactstrap/issues/2733)) ([2547f3a](https://github.com/reactstrap/reactstrap/commit/2547f3acfd12299dc0f4e2a5863c5cf82a203ef4)) + +## [9.1.8](https://github.com/reactstrap/reactstrap/compare/v9.1.7...v9.1.8) (2023-03-29) + + +### Bug Fixes + +* esm and lib folder not included in release ([e974d0c](https://github.com/reactstrap/reactstrap/commit/e974d0c180ebece9e35614da595e9cab2d8684b6)) + +## [9.1.7](https://github.com/reactstrap/reactstrap/compare/v9.1.6...v9.1.7) (2023-03-22) + + +### Bug Fixes + +* **#1289:** prevent error in Strict Mode ([#2672](https://github.com/reactstrap/reactstrap/issues/2672)) ([2695bfa](https://github.com/reactstrap/reactstrap/commit/2695bfaca471f187abe2464621509d0b09e64b9f)) +* **#2660:** dropdown closes for complex children ([#2673](https://github.com/reactstrap/reactstrap/issues/2673)) ([fa1fcc8](https://github.com/reactstrap/reactstrap/commit/fa1fcc84511582f5e22d42c73c2ff1bb8c805f9b)) +* **#2664:** close offcanvas when fade is false ([#2677](https://github.com/reactstrap/reactstrap/issues/2677)) ([dac3587](https://github.com/reactstrap/reactstrap/commit/dac3587bc16006697008ed6f248be268f49de4e5)) +* **docs:** remove storybook errors ([#2675](https://github.com/reactstrap/reactstrap/issues/2675)) ([d0f188b](https://github.com/reactstrap/reactstrap/commit/d0f188b31bf9ccd5f262a46bb42ea87dd644049d)) +* issue where attributes could not be passed to the element ([19233ae](https://github.com/reactstrap/reactstrap/commit/19233ae45014045a6b103619b2b43fb4f386d02a)) +* treeshaking ([#2708](https://github.com/reactstrap/reactstrap/issues/2708)) ([fa46b94](https://github.com/reactstrap/reactstrap/commit/fa46b941004bfd37eb5bd2fcdce435d1ddac5066)) + +## [9.1.6](https://github.com/reactstrap/reactstrap/compare/v9.1.5...v9.1.6) (2023-02-17) + + +### ⚠ BREAKING CHANGES + +* add forwardRef to all components that contain innerRef + +### Features + +* add forwardRef to all components that contain innerRef ([17a141a](https://github.com/reactstrap/reactstrap/commit/17a141acbe9af558c1c3e7cb34fc051c1b1d8d0e)) + + +### Bug Fixes + +* convert functional components to be forwardRef components vs redefining them as such ([86578ab](https://github.com/reactstrap/reactstrap/commit/86578ab1f9e06653b03db06ed99263fba5e5e279)) +* **Label:** migrate label to rtl ([#2665](https://github.com/reactstrap/reactstrap/issues/2665)) ([8c5cc2b](https://github.com/reactstrap/reactstrap/commit/8c5cc2bac0c219275896657db21f5c2ea5ecdffe)) +* revert v10 merge ([3392ce9](https://github.com/reactstrap/reactstrap/commit/3392ce924ad304e97cede43ddef013a88ef84a6e)) + + +### Miscellaneous + +* release 9.1.6 ([f32f3d2](https://github.com/reactstrap/reactstrap/commit/f32f3d247b767592a80091e3f1733946b2f74ada)) + +### [9.1.5](https://www.github.com/reactstrap/reactstrap/compare/v9.1.4...v9.1.5) (2022-10-27) + + +### Bug Fixes + +* **accordion:** type error of open in uncontrolledAccordionProps ([#2611](https://www.github.com/reactstrap/reactstrap/issues/2611)) ([b46a23c](https://www.github.com/reactstrap/reactstrap/commit/b46a23c897cca1e8c53729c5e222411028be169d)) +* ensure initial overflow status is stored when opening multiple modals ([c0191ec](https://www.github.com/reactstrap/reactstrap/commit/c0191ecbbba96f3652e6359111a258a33771e2c1)) + +### [9.1.4](https://www.github.com/reactstrap/reactstrap/compare/v9.1.3...v9.1.4) (2022-08-26) + + +### Bug Fixes + +* **#2467:** keyboard support for dropdown listbox ([#2584](https://www.github.com/reactstrap/reactstrap/issues/2584)) ([f04d3a7](https://www.github.com/reactstrap/reactstrap/commit/f04d3a7976bb8623d7d7453d5195cb1d57f5a6dd)) +* **#2593:** fix key prop waring for dropdown ([#2594](https://www.github.com/reactstrap/reactstrap/issues/2594)) ([69526c1](https://www.github.com/reactstrap/reactstrap/commit/69526c1e1a24739fa5d6f13bc5aa4dfd49beeac5)) + +### [9.1.3](https://www.github.com/reactstrap/reactstrap/compare/v9.1.2...v9.1.3) (2022-08-02) + + +### Bug Fixes + +* Use the new `nodeRef` API for `Collapse` ([9527654](https://www.github.com/reactstrap/reactstrap/commit/9527654b74e5695efbb31dff0ebd29812cdef1ee)) + +### [9.1.2](https://www.github.com/reactstrap/reactstrap/compare/v9.1.1...v9.1.2) (2022-07-13) + + +### Bug Fixes + +* **#2545:** change proptype of Spinner size ([2175cbb](https://www.github.com/reactstrap/reactstrap/commit/2175cbb8f1df23b851a693a968021dfa8be15a7b)) +* **#2559:** Removed unused react import from stories ([a3ccab5](https://www.github.com/reactstrap/reactstrap/commit/a3ccab5fb737b6f3c3607ddee57f2fb0524448f5)) +* **exports:** Exports CloseButtom from index.d.ts ([ba815ee](https://www.github.com/reactstrap/reactstrap/commit/ba815eeb3999134ae5ae3e12a1dfdcbfaab00deb)) + +### [9.1.1](https://www.github.com/reactstrap/reactstrap/compare/v9.1.0...v9.1.1) (2022-06-08) + + +### Bug Fixes + +* **DropdownMenu:** add types to updateOnSelect ([e5cd524](https://www.github.com/reactstrap/reactstrap/commit/e5cd52445ee5247a6408c75a212009f345f7270e)) + +## [9.1.0](https://www.github.com/reactstrap/reactstrap/compare/v9.0.4...v9.1.0) (2022-06-08) + + +### Features + +* **CloseButton:** add close button ([9e656f5](https://www.github.com/reactstrap/reactstrap/commit/9e656f50c4d35cb8e32b826316f8761e80af9c3e)) + + +### Bug Fixes + +* **#2411:** remove scroll from body when modal open ([9d71faa](https://www.github.com/reactstrap/reactstrap/commit/9d71faada222f67683bf19acece3c20b3364a6df)) +* add a flag to DropdownMenu for Popper update ([74a9e4e](https://www.github.com/reactstrap/reactstrap/commit/74a9e4ef5ad8cfdf4e1ab2b9509a0e4ca52c8886)) + +### [9.0.4](https://www.github.com/reactstrap/reactstrap/compare/v9.0.3...v9.0.4) (2022-06-02) + + +### Bug Fixes + +* **#2393:** captions visible twice ([c20fa93](https://www.github.com/reactstrap/reactstrap/commit/c20fa9397ea09811ed2b4da33b136f2aa1e98957)) +* **#2515:** Add missing Typescript exports for Placeholders ([f9e0dfa](https://www.github.com/reactstrap/reactstrap/commit/f9e0dfab37ae0ae2c2183964fa78dc863af320f3)) +* **#2521:** fix `form-check-label`/`form-label` class on Label ([6aee08b](https://www.github.com/reactstrap/reactstrap/commit/6aee08b3bebdbdb1320c4f18382b28d5bc474dd7)) +* **Offcanvas:** make types match existing `direction` prop ([6e60f08](https://www.github.com/reactstrap/reactstrap/commit/6e60f08db14b0f7896c703f41fb6c4c2b7362fd6)) + + +### Miscellaneous + +* **Button:** convert button to use hooks ([19f85d3](https://www.github.com/reactstrap/reactstrap/commit/19f85d30d3c01f8f60762db55b123efddb4d152b)) + +### [9.0.3](https://www.github.com/reactstrap/reactstrap/compare/v9.0.2...v9.0.3) (2022-05-26) + + +### Bug Fixes + +* **#2501:** Since React 18, errors on Popover and Tooltip ([1110c9c](https://www.github.com/reactstrap/reactstrap/commit/1110c9c39f6018cc0289b419ba887adbe434e301)) + +### [9.0.2](https://www.github.com/reactstrap/reactstrap/compare/v9.0.1...v9.0.2) (2022-04-13) + + +### Bug Fixes + +* `form-row` was removed from Bootsttap 5 ([601845d](https://www.github.com/reactstrap/reactstrap/commit/601845d1c8b687d7c2a8494f5131c728ce1a532c)) +* **docs:** fixed naming in Accordion module ([29beb09](https://www.github.com/reactstrap/reactstrap/commit/29beb09ed4a353ebc2d77611a51cea4d34409bf6)) +* **FormGroup:** dont pass switch prop to tag [#2415](https://www.github.com/reactstrap/reactstrap/issues/2415) ([b63981e](https://www.github.com/reactstrap/reactstrap/commit/b63981eb54af34e1332dfb84c670e2cbca937ee8)) + +### [9.0.1](https://www.github.com/reactstrap/reactstrap/compare/v9.0.0...v9.0.1) (2021-11-12) + + +### Bug Fixes + +* add common js bundle to exports field ([#2386](https://www.github.com/reactstrap/reactstrap/issues/2386)) ([c5bc0fe](https://www.github.com/reactstrap/reactstrap/commit/c5bc0fe54ea27cedb1a43a8dfe37738d13bd4eb6)) + +## [9.0.0](https://www.github.com/reactstrap/reactstrap/compare/v8.10.1...v9.0.0) (2021-10-27) + + +### ⚠ BREAKING CHANGES + +* update positionedFix prop to strategy +* upgrade to popper 2 +* remove CustomInput +* remove old InputGroupButtonDropdown +* remove InputGroupAddon +* remove Jumbotron component (#2118) + +### Features + +* **accordion:** add `flush` support and `stayOpen` support ([a6050f5](https://www.github.com/reactstrap/reactstrap/commit/a6050f5ea6cc9ceba63db702663242b571e9f602)) +* **bs5:** add accordion ([#2105](https://www.github.com/reactstrap/reactstrap/issues/2105)) ([1c09448](https://www.github.com/reactstrap/reactstrap/commit/1c09448fdcfbe5db68e057911546ad2d036e805e)) +* **bs5:** add Offcanvas ([9a4bcca](https://www.github.com/reactstrap/reactstrap/commit/9a4bcca7b299f358bb3b953996a9d4afb2f7b602)) +* **bs5:** change .close to .btn-close ([#2116](https://www.github.com/reactstrap/reactstrap/issues/2116)) ([be4df60](https://www.github.com/reactstrap/reactstrap/commit/be4df609ac21cdcbb56c635600dce8eae6c819f1)) +* **bs5:** change no-gutters class to gx-0 in Row ([#2119](https://www.github.com/reactstrap/reactstrap/issues/2119)) ([85b8933](https://www.github.com/reactstrap/reactstrap/commit/85b8933304cb0ae529b6f5d24574b98a929a35bc)) +* **bs5:** convert .sr-only to .visually-hidden ([702ad55](https://www.github.com/reactstrap/reactstrap/commit/702ad553b37a25ab516fc147201622ad122c39d1)) +* **bs5:** Convert Dropdown & DropdownMenu to RTL ([7417984](https://www.github.com/reactstrap/reactstrap/commit/741798459178b825f53cedaa54c33326a81b8564)) +* **bs5:** Rename margin utils ([35a37ef](https://www.github.com/reactstrap/reactstrap/commit/35a37ef21d751207b4951aa5b6aca34b9efd4d5a)) +* **bs5:** Replace .btn-block with utility classes ([4dc1dcd](https://www.github.com/reactstrap/reactstrap/commit/4dc1dcd21bd51d7bd88b40a0b249e02b0edaf0b0)) +* **bs5:** replace form-group class with mb-3 ([cbcb2e3](https://www.github.com/reactstrap/reactstrap/commit/cbcb2e3abc240f64833967996cce4c4878529170)) +* **bs5:** Support xxl breakpoint ([4fb7cdd](https://www.github.com/reactstrap/reactstrap/commit/4fb7cdd7791d11071fdc473e990ca704e0374fc2)) +* **bs5:** update badge classes ([#2117](https://www.github.com/reactstrap/reactstrap/issues/2117)) ([7859900](https://www.github.com/reactstrap/reactstrap/commit/785990048f88699df5f31111c525fdaa7d34a640)) +* **bs5:** Update tooltip/popover arrow classes ([9ad870e](https://www.github.com/reactstrap/reactstrap/commit/9ad870ea3518a9a81716e945d46c06a7c341d7fe)) +* **carousel:** add Bootstrap5 updates ([a698814](https://www.github.com/reactstrap/reactstrap/commit/a69881437fe3d861c44e9493c1983c7c7d13ae34)) +* **Carousel:** Add dark prop ([01f64df](https://www.github.com/reactstrap/reactstrap/commit/01f64dfcf89a44e41754f7669d46830af942b826)) +* **collapse:** add horizontal collapse ([f780187](https://www.github.com/reactstrap/reactstrap/commit/f7801874dc5b8777c8624709f99d62feb19b3563)) +* **Dropdown:** Add backwards compatible left & right ([f8b415f](https://www.github.com/reactstrap/reactstrap/commit/f8b415f9a989b4363adc4ba79c190db9fb0d38f0)) +* **DropdownMenu:** add-dark-prop ([2e22d7b](https://www.github.com/reactstrap/reactstrap/commit/2e22d7bbfa3764399c41ae8d360346c255e4bc44)) +* **forms:** Add support for floating labels ([1cc8a14](https://www.github.com/reactstrap/reactstrap/commit/1cc8a14577b044d10fdea4f804996f49afca04d8)) +* **ListGroup:** Add ListGroupNumbered ([02b3b71](https://www.github.com/reactstrap/reactstrap/commit/02b3b71e62668493f61253a6a67919ec4c18ba97)) +* **modal:** add fullscreen option to Modal component ([a580f23](https://www.github.com/reactstrap/reactstrap/commit/a580f23a8eeefae21b0c6ba36b8da470ee925cd2)) +* **Navbar:** add container options ([f0054bf](https://www.github.com/reactstrap/reactstrap/commit/f0054bf6ef8945e591f79fe403ece3f33a5cef8a)) +* **Placeholder:** add component ([0c9294c](https://www.github.com/reactstrap/reactstrap/commit/0c9294c44108310a84c7f2518bfd9d631d51e835)) +* remove CustomInput ([c0e8a68](https://www.github.com/reactstrap/reactstrap/commit/c0e8a68348c52aaee55168d8601fb534597b6313)) +* remove form-control-file class ([f601576](https://www.github.com/reactstrap/reactstrap/commit/f6015765fb4988e484483b77b032ea00ebde59c2)) +* remove InputGroupAddon ([322d0ad](https://www.github.com/reactstrap/reactstrap/commit/322d0add23f42e917f50286ba796eea4af64c6ae)) +* remove Jumbotron component ([#2118](https://www.github.com/reactstrap/reactstrap/issues/2118)) ([2c912ab](https://www.github.com/reactstrap/reactstrap/commit/2c912abfb6027890d54ac091e18d515152cc395f)) +* remove old InputGroupButtonDropdown ([3df07f6](https://www.github.com/reactstrap/reactstrap/commit/3df07f62b62a2648e13f344cdc3a8c864b6a8b07)) +* replace form-control-range with form-range ([06868e2](https://www.github.com/reactstrap/reactstrap/commit/06868e28dd2a399297b5f9c9efc6b226487386b8)) +* support form switch ([f403595](https://www.github.com/reactstrap/reactstrap/commit/f40359558e083306e33cb0bdafba9ad615a6bbe3)) +* update input group to have type dropdown ([6c60226](https://www.github.com/reactstrap/reactstrap/commit/6c602261dd26f8eebf8a4ebd32e0bed8a08522ef)) +* update positionedFix prop to strategy ([65bf0f0](https://www.github.com/reactstrap/reactstrap/commit/65bf0f0dae5732dc4a7daef59717fa35c0a2a07d)) +* upgrade to popper 2 ([35840ef](https://www.github.com/reactstrap/reactstrap/commit/35840ef90ab6a3f5ae94a57cbde8331fc791870b)) +* use form-select class with native select ([1e6204b](https://www.github.com/reactstrap/reactstrap/commit/1e6204b925e23d97d38532265f4828964e0e1638)) + + +### Bug Fixes + +* **build:** set --compress false for microbundle build ([#2314](https://www.github.com/reactstrap/reactstrap/issues/2314)) ([26c85fb](https://www.github.com/reactstrap/reactstrap/commit/26c85fbdbf04399aab392565c3e6027023886538)) +* **Button:** remove extra close icon in `btn-close` ([#2318](https://www.github.com/reactstrap/reactstrap/issues/2318)) ([e4affb4](https://www.github.com/reactstrap/reactstrap/commit/e4affb41a15eb0e1d723b3f835cafb8959b4f5d9)) +* **InputGroup:** toggle if clicking dropdown input ([1adc147](https://www.github.com/reactstrap/reactstrap/commit/1adc147d600309705ad25116121b89ad65b6409d)) +* **Label:** add `form-label` class for labels of vertical forms ([#2317](https://www.github.com/reactstrap/reactstrap/issues/2317)) ([3bfce12](https://www.github.com/reactstrap/reactstrap/commit/3bfce12c4bdc9615399e8821629328f8a441d9b8)) +* **popover:** add default popper offset for popover ([cef32c6](https://www.github.com/reactstrap/reactstrap/commit/cef32c6a051fdfe532d6e3b1e86b8dcf60087558)) +* **ToastHeader:** Remove charCode default property. ([#2343](https://www.github.com/reactstrap/reactstrap/issues/2343)) ([03bbd15](https://www.github.com/reactstrap/reactstrap/commit/03bbd1508a2262a34a8960e1faa95585689fbaea)), closes [#2338](https://www.github.com/reactstrap/reactstrap/issues/2338) +* **types:** add 'swtch' to `InputType` ([#2340](https://www.github.com/reactstrap/reactstrap/issues/2340)) ([302d41e](https://www.github.com/reactstrap/reactstrap/commit/302d41eb20054d5bf9c6fd1ddc651dbafcce46f1)) +* **types:** export AccordionBody types ([#2312](https://www.github.com/reactstrap/reactstrap/issues/2312)) ([d4c184b](https://www.github.com/reactstrap/reactstrap/commit/d4c184bd5c738b0905d02e56a6f2705e2cd9bb70)) +* **types:** export UncontrolledAccordion types ([#2313](https://www.github.com/reactstrap/reactstrap/issues/2313)) ([f7d5cd6](https://www.github.com/reactstrap/reactstrap/commit/f7d5cd664417cbbeb3e17f6ab0097ec024647c64)) +* **types:** import React for UncontrolledAccordion type defs ([#2292](https://www.github.com/reactstrap/reactstrap/issues/2292)) ([54df194](https://www.github.com/reactstrap/reactstrap/commit/54df194dd36205d782ec1985b383a1e18137186b)) +* **types:** remove duplicate types/lib/index.d.ts ([#2316](https://www.github.com/reactstrap/reactstrap/issues/2316)) ([52bd719](https://www.github.com/reactstrap/reactstrap/commit/52bd7192c453c5333c00603f6bc8555f4e10b5f6)) +* **types:** use types from @popperjs/core ([10fd0b2](https://www.github.com/reactstrap/reactstrap/commit/10fd0b28d661b368bead1006ea075435ad911d55)) + +### [8.10.1](https://www.github.com/reactstrap/reactstrap/compare/v8.10.0...v8.10.1) (2021-10-26) + + +### Bug Fixes + +* **UncontrolledDropdown:** Fix onToggle - a consistent isOpen value ([ee54164](https://www.github.com/reactstrap/reactstrap/commit/ee54164a142c9ae4d43a2a8db4f6a5c088b4eff9)) + +## [8.8.1](https://github.com/reactstrap/reactstrap/compare/8.8.0...8.8.1) (2020-12-29) + + +### Bug Fixes + +* Prevent popover/tooltip rendering if target not resolved ([#2059](https://github.com/reactstrap/reactstrap/issues/2059)) ([de06e9f](https://github.com/reactstrap/reactstrap/commit/de06e9ff12e954c92ba0964e615723e9a44f9269)) + + + +# [8.8.0](https://github.com/reactstrap/reactstrap/compare/8.7.1...8.8.0) (2020-12-23) + + +### Bug Fixes + +* **Modal:** Trap focus on opened modal ([#1941](https://github.com/reactstrap/reactstrap/issues/1941)) ([bf46484](https://github.com/reactstrap/reactstrap/commit/bf46484d2ee1e0d570170d59152fcd0346bfe434)), closes [#1497](https://github.com/reactstrap/reactstrap/issues/1497) [#1679](https://github.com/reactstrap/reactstrap/issues/1679) +* Make tooltips fade out ([#2041](https://github.com/reactstrap/reactstrap/issues/2041)) ([3fb5476](https://github.com/reactstrap/reactstrap/commit/3fb5476515aa01e658426e72dfbe5e7bc517b460)) +* **Popover:** Select correct parent target when target children clicked ([#2038](https://github.com/reactstrap/reactstrap/issues/2038)) ([6740a57](https://github.com/reactstrap/reactstrap/commit/6740a57268dd87704c0215aa45a7e38babb5b426)), closes [#1990](https://github.com/reactstrap/reactstrap/issues/1990) + + +### Features + +* add List and ListInlineItem components ([#2033](https://github.com/reactstrap/reactstrap/issues/2033)) ([a97a834](https://github.com/reactstrap/reactstrap/commit/a97a8345f3998e9388d42550b8e70aaa62a5be50)) +* add positionFixed prop to Tooltip and Popover ([#2039](https://github.com/reactstrap/reactstrap/issues/2039)) ([a330ce6](https://github.com/reactstrap/reactstrap/commit/a330ce65e1a38dd0a14e1bc0ca37f86740964df1)) +* **Dropdown:** Added container prop to DropdownMenu using React.portal ([#2016](https://github.com/reactstrap/reactstrap/issues/2016)) ([bd313c2](https://github.com/reactstrap/reactstrap/commit/bd313c23e5d1dee984e65e5fdc167fe83f3831a9)) + + + +## [8.7.1](https://github.com/reactstrap/reactstrap/compare/8.7.0...8.7.1) (2020-11-03) + + +### Bug Fixes + +* **types:** Fix Col and Input types ([#2008](https://github.com/reactstrap/reactstrap/issues/2008)) ([363dfbe](https://github.com/reactstrap/reactstrap/commit/363dfbe6a46ef04c61f0b249bd5c0a80ec1c1e3e)) +* **types:** Fix reference to CSSModule ([#2007](https://github.com/reactstrap/reactstrap/issues/2007)) ([54afca4](https://github.com/reactstrap/reactstrap/commit/54afca47879fbb8a2713b57ff452fa566e5255d1)) + + + +# [8.7.0](https://github.com/reactstrap/reactstrap/compare/8.6.0...8.7.0) (2020-10-31) + + +### Bug Fixes + +* **DropdownMenu:** Prevent manual styles from overriding popper styles ([#1984](https://github.com/reactstrap/reactstrap/issues/1984)) ([dc2401b](https://github.com/reactstrap/reactstrap/commit/dc2401b388777b011bc6c75426a86a78013a2b8c)) +* **Progress:** Fix parent element props being spread to children ([#1970](https://github.com/reactstrap/reactstrap/issues/1970)) ([c6a790c](https://github.com/reactstrap/reactstrap/commit/c6a790c7f4bdbfac0540d53896834638edf9c793)) +* **types:** Add missing innerRef typings ([#1994](https://github.com/reactstrap/reactstrap/issues/1994)) ([fe24f69](https://github.com/reactstrap/reactstrap/commit/fe24f69be2dc9953896c49be73254f7787ad34ff)), closes [#1993](https://github.com/reactstrap/reactstrap/issues/1993) + + +### Features + +* Add typescript definitions ([#1976](https://github.com/reactstrap/reactstrap/issues/1976)) ([2a47626](https://github.com/reactstrap/reactstrap/commit/2a47626dc088f1983239f606c91f6294c7e756d7)) +* **DropdownItem:** Add support for .dropdown-item-text ([#1971](https://github.com/reactstrap/reactstrap/issues/1971)) ([c41b172](https://github.com/reactstrap/reactstrap/commit/c41b172180b92ba3f53444ca8f409c1cd10f895d)) + + + +# [8.6.0](https://github.com/reactstrap/reactstrap/compare/8.5.1...8.6.0) (2020-09-18) + + +### Bug Fixes + +* **Input:** Allow numbers for size prop ([#1948](https://github.com/reactstrap/reactstrap/issues/1948)) ([b4c45af](https://github.com/reactstrap/reactstrap/commit/b4c45afe658ee5008274fbf687b22d35dfe12c51)) +* **Progress:** pass attributes to nested Progress bar ([#1919](https://github.com/reactstrap/reactstrap/issues/1919)) ([f3c2586](https://github.com/reactstrap/reactstrap/commit/f3c2586bbf1cc86459b5c2fd4cb025512aead432)), closes [#1847](https://github.com/reactstrap/reactstrap/issues/1847) [#1847](https://github.com/reactstrap/reactstrap/issues/1847) + + +### Features + +* **Button:** onClick of inner button returns value of props.onClick. ([f09cdd6](https://github.com/reactstrap/reactstrap/commit/f09cdd6c2fb496948760e962383b1fa657a2c5e0)) + + + +## [8.5.1](https://github.com/reactstrap/reactstrap/compare/8.5.0...8.5.1) (2020-06-24) + + +### Bug Fixes + +* **polyfill:** check that window exists before defining CustomEvent ([#1855](https://github.com/reactstrap/reactstrap/issues/1855)) ([74b6802](https://github.com/reactstrap/reactstrap/commit/74b6802)) + + + +# [8.5.0](https://github.com/reactstrap/reactstrap/compare/8.4.1...8.5.0) (2020-06-23) + + +### Bug Fixes + +* **Carousel:** ie11 compatibility changes([#799](https://github.com/reactstrap/reactstrap/issues/799)) ([#1585](https://github.com/reactstrap/reactstrap/issues/1585)) ([1fd2d22](https://github.com/reactstrap/reactstrap/commit/1fd2d22)), closes [/github.com/reactjs/react-transition-group/blob/9e3b2d3c09b78e755bdc837b7b38337812ede2c9/src/TransitionGroup.js#L11](https://github.com//github.com/reactjs/react-transition-group/blob/9e3b2d3c09b78e755bdc837b7b38337812ede2c9/src/TransitionGroup.js/issues/L11) +* **CustomInput:** hidden attribute [#1741](https://github.com/reactstrap/reactstrap/issues/1741) ([#1777](https://github.com/reactstrap/reactstrap/issues/1777)) ([bb39b55](https://github.com/reactstrap/reactstrap/commit/bb39b55)) +* **DropdownToggle:** fix 0 value [#1496](https://github.com/reactstrap/reactstrap/issues/1496) ([#1780](https://github.com/reactstrap/reactstrap/issues/1780)) ([c4f86d5](https://github.com/reactstrap/reactstrap/commit/c4f86d5)) +* **Input:** Aria-invalid attribute ([#1782](https://github.com/reactstrap/reactstrap/issues/1782)) ([ca113f1](https://github.com/reactstrap/reactstrap/commit/ca113f1)) +* **Modal:** fix modal close immediately unmounted ([c8def29](https://github.com/reactstrap/reactstrap/commit/c8def29)), closes [#1323](https://github.com/reactstrap/reactstrap/issues/1323) +* **TooltipPopoverWrapper:** replacing find with filter to preve… ([#1776](https://github.com/reactstrap/reactstrap/issues/1776)) ([54648b6](https://github.com/reactstrap/reactstrap/commit/54648b6)), closes [#1774](https://github.com/reactstrap/reactstrap/issues/1774) + + +### Features + +* **Input:** Use form-control-range for range inputs ([#1772](https://github.com/reactstrap/reactstrap/issues/1772)) ([56c1d77](https://github.com/reactstrap/reactstrap/commit/56c1d77)) +* **Modal:** Allow passing in an element selector to append mod… ([#1817](https://github.com/reactstrap/reactstrap/issues/1817)) ([8f8cc98](https://github.com/reactstrap/reactstrap/commit/8f8cc98)) +* **Modal:** match container behaviour to targetPropType like of Popover and Tooltip ([#1844](https://github.com/reactstrap/reactstrap/issues/1844)) ([6ea2488](https://github.com/reactstrap/reactstrap/commit/6ea2488)) +* **PopoverContent:** add x-out-of-boundaries attribute ([607ce10](https://github.com/reactstrap/reactstrap/commit/607ce10)), closes [#1835](https://github.com/reactstrap/reactstrap/issues/1835) +* **Progress:** add aria props ([#1681](https://github.com/reactstrap/reactstrap/issues/1681)) ([#1787](https://github.com/reactstrap/reactstrap/issues/1787)) ([93f171d](https://github.com/reactstrap/reactstrap/commit/93f171d)) +* **Progress:** Allow passing in custom style object ([#1771](https://github.com/reactstrap/reactstrap/issues/1771)) ([a79417a](https://github.com/reactstrap/reactstrap/commit/a79417a)) +* **TooltipPopoverWrapper:** scheduleUpdate as render prop ([#1792](https://github.com/reactstrap/reactstrap/issues/1792)) ([cda6fe9](https://github.com/reactstrap/reactstrap/commit/cda6fe9)) + + + +## [8.4.1](https://github.com/reactstrap/reactstrap/compare/8.4.0...8.4.1) (2020-01-27) + + +### Bug Fixes + +* **Modal:** Allow esc to close static backdrop modal when keybo… ([#1767](https://github.com/reactstrap/reactstrap/issues/1767)) ([49da7b5](https://github.com/reactstrap/reactstrap/commit/49da7b5)), closes [#1766](https://github.com/reactstrap/reactstrap/issues/1766) +* **Tooltip,Popover:** account for shadowDOM target ([#1769](https://github.com/reactstrap/reactstrap/issues/1769)) ([10ccf12](https://github.com/reactstrap/reactstrap/commit/10ccf12)), closes [#1691](https://github.com/reactstrap/reactstrap/issues/1691) + + + +# [8.4.0](https://github.com/reactstrap/reactstrap/compare/8.3.2...8.4.0) (2020-01-17) + + +### Bug Fixes + +* revert breaking change ([#1760](https://github.com/reactstrap/reactstrap/issues/1760)) ([eb37426](https://github.com/reactstrap/reactstrap/commit/eb37426)) + + + +## [8.3.2](https://github.com/reactstrap/reactstrap/compare/8.3.1...8.3.2) (2020-01-16) + + +### Bug Fixes + +* **Modal:** Prevent static backdrop animation when modal clicked ([#1755](https://github.com/reactstrap/reactstrap/issues/1755)) ([79efb4a](https://github.com/reactstrap/reactstrap/commit/79efb4a)) + + + +## [8.3.1](https://github.com/reactstrap/reactstrap/compare/8.3.0...8.3.1) (2020-01-15) + + +### Bug Fixes + +* **build:** fix DropdownContext import/export ([96188f4](https://github.com/reactstrap/reactstrap/commit/96188f4)) + + + +# [8.3.0](https://github.com/reactstrap/reactstrap/compare/8.2.0...8.3.0) (2020-01-15) + +## NOT PUBLISHED TO NPM DUE TO RELEASE BUILD FAILURE, USE 8.3.1 + +### Bug Fixes + +* remove aria-hidden attribute from tooltips and popovers ([#1747](https://github.com/reactstrap/reactstrap/issues/1747)) ([009a2bd](https://github.com/reactstrap/reactstrap/commit/009a2bd)) +* **Dropdown:** Avoid preventDefault for things like F5 ([#1464](https://github.com/reactstrap/reactstrap/issues/1464)) ([305d3f0](https://github.com/reactstrap/reactstrap/commit/305d3f0)), closes [#1453](https://github.com/reactstrap/reactstrap/issues/1453) +* **DropdownContext:** wrap dropdown components to provide context prop ([64847df](https://github.com/reactstrap/reactstrap/commit/64847df)), closes [#1457](https://github.com/reactstrap/reactstrap/issues/1457) [#1462](https://github.com/reactstrap/reactstrap/issues/1462) +* **DropdownToggle:** pass innerRef to popper ([c088c58](https://github.com/reactstrap/reactstrap/commit/c088c58)), closes [#1471](https://github.com/reactstrap/reactstrap/issues/1471) +* **Modal:** run close based on prop, not state ([310b061](https://github.com/reactstrap/reactstrap/commit/310b061)), closes [#1626](https://github.com/reactstrap/reactstrap/issues/1626) +* **Tooltip:** autohide broken since default delay was zero ([#1733](https://github.com/reactstrap/reactstrap/issues/1733)) ([87a6bda](https://github.com/reactstrap/reactstrap/commit/87a6bda)), closes [#1692](https://github.com/reactstrap/reactstrap/issues/1692) +* **Tooltip:** fix nested elements within target ([#1746](https://github.com/reactstrap/reactstrap/issues/1746)) ([fed4bcf](https://github.com/reactstrap/reactstrap/commit/fed4bcf)), closes [#1736](https://github.com/reactstrap/reactstrap/issues/1736) +* **Tooltip:** fix render failure if target ref is null ([#1734](https://github.com/reactstrap/reactstrap/issues/1734)) ([853b56e](https://github.com/reactstrap/reactstrap/commit/853b56e)), closes [#1686](https://github.com/reactstrap/reactstrap/issues/1686) + + +### Features + +* **Carousel:** Add touch swipe support ([#1731](https://github.com/reactstrap/reactstrap/issues/1731)) ([8a12330](https://github.com/reactstrap/reactstrap/commit/8a12330)) +* **Modal:** Added static backdrop animation defined in Bootstr… ([#1750](https://github.com/reactstrap/reactstrap/issues/1750)) ([7d44f36](https://github.com/reactstrap/reactstrap/commit/7d44f36)) + + + +# [8.2.0](https://github.com/reactstrap/reactstrap/compare/8.1.1...8.2.0) (2019-12-05) + + +### Bug Fixes + +* **getTarget:** return array like when allElements parameter is true ([#1687](https://github.com/reactstrap/reactstrap/issues/1687)) ([0702c45](https://github.com/reactstrap/reactstrap/commit/0702c45)) +* **Tooltip:** default value of trigger changed ([#1695](https://github.com/reactstrap/reactstrap/issues/1695)) ([ae48d93](https://github.com/reactstrap/reactstrap/commit/ae48d93)), closes [#1676](https://github.com/reactstrap/reactstrap/issues/1676) + + +### Features + +* **ButtonToggle:** add focus styling on button and toggle ([#1660](https://github.com/reactstrap/reactstrap/issues/1660)) ([8980713](https://github.com/reactstrap/reactstrap/commit/8980713)), closes [#1648](https://github.com/reactstrap/reactstrap/issues/1648) +* **Container:** Added responsive container support ([#1724](https://github.com/reactstrap/reactstrap/issues/1724)) ([31bb211](https://github.com/reactstrap/reactstrap/commit/31bb211)), closes [#1721](https://github.com/reactstrap/reactstrap/issues/1721) +* **ListGroup:** Add horizontal prop ([#1715](https://github.com/reactstrap/reactstrap/issues/1715)) ([284a543](https://github.com/reactstrap/reactstrap/commit/284a543)) +* **Navbar:** adds NavbarText component ([#1711](https://github.com/reactstrap/reactstrap/issues/1711)) ([6db1083](https://github.com/reactstrap/reactstrap/commit/6db1083)), closes [#1707](https://github.com/reactstrap/reactstrap/issues/1707) +* **Popover/Tooltip:** add popperClassName property ([#1674](https://github.com/reactstrap/reactstrap/issues/1674)) ([44e85a8](https://github.com/reactstrap/reactstrap/commit/44e85a8)), closes [#1484](https://github.com/reactstrap/reactstrap/issues/1484) +* **Row:** Add row columns support ([#1720](https://github.com/reactstrap/reactstrap/issues/1720)) ([1fb3c17](https://github.com/reactstrap/reactstrap/commit/1fb3c17)) +* **UncontrolledDropdown:** add onToggle callback ([#1705](https://github.com/reactstrap/reactstrap/issues/1705)) ([d9cae30](https://github.com/reactstrap/reactstrap/commit/d9cae30)) + + + +## [8.1.1](https://github.com/reactstrap/reactstrap/compare/8.1.0...8.1.1) (2019-10-18) + + +### Bug Fixes + +* **Carousel:** rename unsafe lifecycles ([940438f](https://github.com/reactstrap/reactstrap/commit/940438f)) +* **Dropdown:** fixed a11y property error message ([#1673](https://github.com/reactstrap/reactstrap/issues/1673))([87d28b6](https://github.com/reactstrap/reactstrap/commit/87d28b6)), closes [#1670](https://github.com/reactstrap/reactstrap/issues/1670) + + + +# [8.1.0](https://github.com/reactstrap/reactstrap/compare/8.0.1...8.1.0) (2019-10-18) + + +### Bug Fixes + +* **ButtonDropdown:** add close event when Escape key is pressed ([#1634](https://github.com/reactstrap/reactstrap/issues/1634)) ([#1635](https://github.com/reactstrap/reactstrap/issues/1635)) ([911d779](https://github.com/reactstrap/reactstrap/commit/911d779)) +* **Carousel:** Add pointer on hover for controls ([#1654](https://github.com/reactstrap/reactstrap/issues/1654)) ([32f0c0d](https://github.com/reactstrap/reactstrap/commit/32f0c0d)), closes [#1631](https://github.com/reactstrap/reactstrap/issues/1631) +* **Collapse:** add aria-expanded attribute ([#1657](https://github.com/reactstrap/reactstrap/issues/1657)) ([2fdf15a](https://github.com/reactstrap/reactstrap/commit/2fdf15a)) +* **CustomInput:** remove type prop from input node when type is select ([3e4c23f](https://github.com/reactstrap/reactstrap/commit/3e4c23f)) +* **CustomInput[type=file]:** add CustomFileInput component ([#1461](https://github.com/reactstrap/reactstrap/issues/1461)) ([25e2480](https://github.com/reactstrap/reactstrap/commit/25e2480)), closes [#1460](https://github.com/reactstrap/reactstrap/issues/1460) +* **Dropdown:** disabled toggle ([#1571](https://github.com/reactstrap/reactstrap/issues/1571)) ([b4edeb8](https://github.com/reactstrap/reactstrap/commit/b4edeb8)), closes [#1542](https://github.com/reactstrap/reactstrap/issues/1542) +* **Tooltip:** Support for multiple target elements ([#1465](https://github.com/reactstrap/reactstrap/issues/1465)) ([45775c0](https://github.com/reactstrap/reactstrap/commit/45775c0)), closes [#1185](https://github.com/reactstrap/reactstrap/issues/1185) [#1185](https://github.com/reactstrap/reactstrap/issues/1185) [#1185](https://github.com/reactstrap/reactstrap/issues/1185) [#1185](https://github.com/reactstrap/reactstrap/issues/1185) +* **UncontrolledCarousel:** use item.key instead of item.src as… ([#1649](https://github.com/reactstrap/reactstrap/issues/1649)) ([5b9e758](https://github.com/reactstrap/reactstrap/commit/5b9e758)), closes [#1536](https://github.com/reactstrap/reactstrap/issues/1536) +* **Popover:** PopperContent memory leak ([#1669](https://github.com/reactstrap/reactstrap/issues/1669)) ([54d459c](https://github.com/reactstrap/reactstrap/commit/5b9e758)), closes [#1482](https://github.com/reactstrap/reactstrap/issues/1482) [#1488](https://github.com/reactstrap/reactstrap/issues/1488) [#1664](https://github.com/reactstrap/reactstrap/issues/1664) + + +### Features + +* **Dropdown:** add a11y prop to tab moves focus ([#1600](https://github.com/reactstrap/reactstrap/issues/1600)) ([1bd965f](https://github.com/reactstrap/reactstrap/commit/1bd965f)), closes [#1441](https://github.com/reactstrap/reactstrap/issues/1441) +* **NavbarToggler:** add aria-label to NavbarToggler ([#1633](https://github.com/reactstrap/reactstrap/issues/1633)) ([dc0b8ae](https://github.com/reactstrap/reactstrap/commit/dc0b8ae)), closes [#1632](https://github.com/reactstrap/reactstrap/issues/1632) + + + + +## [8.0.1](https://github.com/reactstrap/reactstrap/compare/8.0.0...8.0.1) (2019-07-10) + + +### Bug Fixes + +* **DropdownMenu:** Allow positionFixed prop to be passed through ([#1538](https://github.com/reactstrap/reactstrap/issues/1538)) ([01466ae](https://github.com/reactstrap/reactstrap/commit/01466ae)), closes [#1473](https://github.com/reactstrap/reactstrap/issues/1473) +* **FormGroup:** allow disable when tag is fieldset ([#1547](https://github.com/reactstrap/reactstrap/issues/1547)) ([0736f80](https://github.com/reactstrap/reactstrap/commit/0736f80)), closes [#1546](https://github.com/reactstrap/reactstrap/issues/1546) +* **Modal:** handle init modal in SSR ([#1495](https://github.com/reactstrap/reactstrap/issues/1495)) ([c844ab1](https://github.com/reactstrap/reactstrap/commit/c844ab1)) +* **Modal:** update condition to call `setFocus` in case open mo… ([#1514](https://github.com/reactstrap/reactstrap/issues/1514)) ([ae6fe93](https://github.com/reactstrap/reactstrap/commit/ae6fe93)) +* **Tooltip:** clear timeouts on unmount ([#1562](https://github.com/reactstrap/reactstrap/issues/1562)) ([e85238b](https://github.com/reactstrap/reactstrap/commit/e85238b)), closes [#1255](https://github.com/reactstrap/reactstrap/issues/1255) + + + + +# [8.0.0](https://github.com/reactstrap/reactstrap/compare/7.1.0...8.0.0) (2019-04-03) + + +### Bug Fixes + +* **Carousel:** remove inappropriate role=listbox ([#1385](https://github.com/reactstrap/reactstrap/issues/1385)) ([32eb8ed](https://github.com/reactstrap/reactstrap/commit/32eb8ed)) +* **Modal:** fix exception in focus management ([#1382](https://github.com/reactstrap/reactstrap/issues/1382)) ([5cc9af5](https://github.com/reactstrap/reactstrap/commit/5cc9af5)) +* **Modal:** set Modal.openCount floor to 0 ([#1368](https://github.com/reactstrap/reactstrap/issues/1368)) ([71f9574](https://github.com/reactstrap/reactstrap/commit/71f9574)) +* **Popover:** touch not opening popover on mobile ([#1425](https://github.com/reactstrap/reactstrap/issues/1425)) ([#1426](https://github.com/reactstrap/reactstrap/issues/1426)) ([ad2a9a0](https://github.com/reactstrap/reactstrap/commit/ad2a9a0)) +* **Table:** add CSS Module support for responsive Table ([#1429](https://github.com/reactstrap/reactstrap/issues/1429)) ([#1430](https://github.com/reactstrap/reactstrap/issues/1430)) ([1e2dc5b](https://github.com/reactstrap/reactstrap/commit/1e2dc5b)) +* **utils:** Shim Element in non-DOM environments ([#1387](https://github.com/reactstrap/reactstrap/issues/1387)) ([eb4ee93](https://github.com/reactstrap/reactstrap/commit/eb4ee93)) + + +### Code Refactoring + +* **Modal, Dropdown{*}, PopperContent, Tabs:** go to React Async Rendering ([#1427](https://github.com/reactstrap/reactstrap/issues/1427)) ([1afb2c2](https://github.com/reactstrap/reactstrap/commit/1afb2c2)) + + +### Features + +* **CustomInput:** added htmlFor prop ([#1417](https://github.com/reactstrap/reactstrap/issues/1417)) ([a590880](https://github.com/reactstrap/reactstrap/commit/a590880)) +* **Modal:** add optional return focus after close ([#1424](https://github.com/reactstrap/reactstrap/issues/1424)) ([33cfce6](https://github.com/reactstrap/reactstrap/commit/33cfce6)) +* **Modal:** add scrollable prop ([#1435](https://github.com/reactstrap/reactstrap/issues/1435)) ([9f7dd45](https://github.com/reactstrap/reactstrap/commit/9f7dd45)) +* **pagination-links:** added props for first and last. changed carets… ([#1410](https://github.com/reactstrap/reactstrap/issues/1410)) ([70cfca2](https://github.com/reactstrap/reactstrap/commit/70cfca2)) +* **Popover:** add default toggleable fade support ([#1364](https://github.com/reactstrap/reactstrap/issues/1364)) ([#1364](https://github.com/reactstrap/reactstrap/issues/1364)) ([ee15c86](https://github.com/reactstrap/reactstrap/commit/ee15c86)), closes [#363](https://github.com/reactstrap/reactstrap/issues/363) +* **Popover/Tooltip:** ability to pass through flip prop ([#1443](https://github.com/reactstrap/reactstrap/issues/1443)) ([4a5a8a3](https://github.com/reactstrap/reactstrap/commit/4a5a8a3)) +* **Toast:** add support for Toasts ([#1447](https://github.com/reactstrap/reactstrap/issues/1447)) ([7ea7610](https://github.com/reactstrap/reactstrap/commit/7ea7610)), closes [#1384](https://github.com/reactstrap/reactstrap/issues/1384) [#1346](https://github.com/reactstrap/reactstrap/issues/1346) + + +### BREAKING CHANGES + +* **Modal, Dropdown{*}, PopperContent, Tabs:** using new Context API, react-popper v. '1.3.3' +* **pagination-links:** Now the `next` and `previous` props are displaying single carets instead of double caret. To get the old style, use `first` and `last` props instead of `previous` and `next` respectfully and set `aria-label` to `Next` or `Previous`. +* **Popover:** Popover and Tooltip will now fade in and out (like bootstrap's default). To get the previous behavior use fade={false} + + +### Removed Deprecations + +* **`Card`'s `block` prop**: use `Card`s `body` prop. +* **`Input`'s `static` prop**: use `Input`s `plaintext` prop. +* **`Dropdown`'s `dropup` prop**: use `Dropdown`s `direction` prop with the value of `"up"`. +* **`Navbar`'s `toggleable` prop**: use `Navbar`s `expand` prop (see docs)`. +* **inverse prop**: use `dark` prop. +* **CardBlock**: use `CardBody`. +* **InputGroupButton**: use `InputGroupAddon`. +* **NavDropdown**: use `Dropdown` with `nav` prop. +* **PopoverContent**: use `PopoverBody`. +* **PopoverTitle**: use `PopoverHeader`. +* **UncontrolledNavDropdown**: use `UncontrolledDropdown` with `nav` prop. + + + +# [7.1.0](https://github.com/reactstrap/reactstrap/compare/7.0.2...7.1.0) (2019-01-15) + + +### Bug Fixes + +* **NavLink:** console error while using [@reach](https://github.com/reach)/Router ([#1350](https://github.com/reactstrap/reactstrap/issues/1350)) ([477e1a8](https://github.com/reactstrap/reactstrap/commit/477e1a8)), closes [#1308](https://github.com/reactstrap/reactstrap/issues/1308) + + +### Features + +* support forwardRef components as tag ([4cda8bf](https://github.com/reactstrap/reactstrap/commit/4cda8bf)) +* **Popover:** add legacy trigger, replacing unreleased isInteractive prop ([6b3c3ce](https://github.com/reactstrap/reactstrap/commit/6b3c3ce)) +* **Popover:** backward-compatible Popover behavior ([#1360](https://github.com/reactstrap/reactstrap/issues/1360)) ([1d5ce83](https://github.com/reactstrap/reactstrap/commit/1d5ce83)), closes [#1349](https://github.com/reactstrap/reactstrap/issues/1349) +* **Spinner:** Add spinner component ([#1352](https://github.com/reactstrap/reactstrap/issues/1352)) ([45952e2](https://github.com/reactstrap/reactstrap/commit/45952e2)), closes [#1347](https://github.com/reactstrap/reactstrap/issues/1347) +* **Switch:** Add support for CustomInput type='switch' ([#1353](https://github.com/reactstrap/reactstrap/issues/1353)) ([7c1e166](https://github.com/reactstrap/reactstrap/commit/7c1e166)), closes [#1348](https://github.com/reactstrap/reactstrap/issues/1348) + + + + +## [7.0.2](https://github.com/reactstrap/reactstrap/compare/7.0.0...7.0.2) (2018-12-31) + + +### Bug Fixes + +* fix release artifacts ([#1345](https://github.com/reactstrap/reactstrap/issues/1345)) ([b5710ef](https://github.com/reactstrap/reactstrap/commit/b5710ef)) +* **npm:** fix published files ([7eedbab](https://github.com/reactstrap/reactstrap/commit/7eedbab)) + + + + +## [7.0.1](https://github.com/reactstrap/reactstrap/compare/7.0.0...7.0.1) (2018-12-31) + + +### Bug Fixes + +* fix release artifacts ([#1345](https://github.com/reactstrap/reactstrap/issues/1345)) ([b5710ef](https://github.com/reactstrap/reactstrap/commit/b5710ef)) + + + + +# [7.0.0](https://github.com/reactstrap/reactstrap/compare/6.5.0...7.0.0) (2018-12-29) + + +### Bug Fixes + +* **CardTitle,CardSubtitle:** div as default tag ([#1298](https://github.com/reactstrap/reactstrap/issues/1298)) ([ea0f1f0](https://github.com/reactstrap/reactstrap/commit/ea0f1f0)), closes [#1297](https://github.com/reactstrap/reactstrap/issues/1297) +* **CarouselIndicators:** li key generate from provided item values ([#1311](https://github.com/reactstrap/reactstrap/issues/1311)) ([fd7506d](https://github.com/reactstrap/reactstrap/commit/fd7506d)), closes [#1310](https://github.com/reactstrap/reactstrap/issues/1310) +* **Dropdown:** enter key triggers onClick -- correction ([#1306](https://github.com/reactstrap/reactstrap/issues/1306)) ([6b50732](https://github.com/reactstrap/reactstrap/commit/6b50732)) +* **Dropdown:** improve keyboard ux, WAI-ARIA ([#1293](https://github.com/reactstrap/reactstrap/issues/1293)) ([506c46a](https://github.com/reactstrap/reactstrap/commit/506c46a)) +* **Dropdown:** Null check on children ([#1294](https://github.com/reactstrap/reactstrap/issues/1294)) ([#1295](https://github.com/reactstrap/reactstrap/issues/1295)) ([dcfde3b](https://github.com/reactstrap/reactstrap/commit/dcfde3b)) +* **FormGroup:** remove `.position-relative` ([#1270](https://github.com/reactstrap/reactstrap/issues/1270)) ([01eb5f9](https://github.com/reactstrap/reactstrap/commit/01eb5f9)), closes [#1269](https://github.com/reactstrap/reactstrap/issues/1269) +* **Input:** make plaintext output input by default ([#1226](https://github.com/reactstrap/reactstrap/issues/1226)) ([ff64c76](https://github.com/reactstrap/reactstrap/commit/ff64c76)), closes [#1225](https://github.com/reactstrap/reactstrap/issues/1225) +* **Modal:** don't propagate handled escape key event ([#1317](https://github.com/reactstrap/reactstrap/issues/1317)) ([5d45b26](https://github.com/reactstrap/reactstrap/commit/5d45b26)) +* **Modal:** only show backdrop when prop is true ([#1271](https://github.com/reactstrap/reactstrap/issues/1271)) ([07ec4b5](https://github.com/reactstrap/reactstrap/commit/07ec4b5)), closes [#1267](https://github.com/reactstrap/reactstrap/issues/1267) +* **PopperContent:** Use create portal instead of unstable_renderSubtreeIntoContainer ([#1254](https://github.com/reactstrap/reactstrap/issues/1254)) ([81da8c5](https://github.com/reactstrap/reactstrap/commit/81da8c5)), closes [#1216](https://github.com/reactstrap/reactstrap/issues/1216) + + +### Features + +* **Badge:** allow innerRef ([#1264](https://github.com/reactstrap/reactstrap/issues/1264)) ([2caaaa5](https://github.com/reactstrap/reactstrap/commit/2caaaa5)) +* **CardBody:** add innerRef to CardBody ([#1318](https://github.com/reactstrap/reactstrap/issues/1318)) ([4b0474f](https://github.com/reactstrap/reactstrap/commit/4b0474f)), closes [#1314](https://github.com/reactstrap/reactstrap/issues/1314) +* **Table:** add innerRef prop ([#1296](https://github.com/reactstrap/reactstrap/issues/1296)) ([bb84c85](https://github.com/reactstrap/reactstrap/commit/bb84c85)) +* **Tooltip,Popover:** base component for Tooltip and Popover ([#1222](https://github.com/reactstrap/reactstrap/issues/1222)) ([b45907b](https://github.com/reactstrap/reactstrap/commit/b45907b)), closes [#1022](https://github.com/reactstrap/reactstrap/issues/1022) [#1181](https://github.com/reactstrap/reactstrap/issues/1181) + + +### BREAKING CHANGES + +* **Input:** previously plaintext on Input would output a 'p' tag. To better line up with bootstrap it will not output an 'input' tag. If you need a 'p' tag, provide tag="p" prop +* **Popover:** Popover will no longer dismiss when clicking away from it. To get this behaviour please use trigger="focus". In 7.1.0, trigger="legacy" has been added to get the exact previous behavior. + + + + +# [6.5.0](https://github.com/reactstrap/reactstrap/compare/6.4.0...6.5.0) (2018-10-04) + + +### Bug Fixes + +* **boundariesElement:** add DOMElement to allowed proptypes ([#1238](https://github.com/reactstrap/reactstrap/issues/1238)) ([cfe7318](https://github.com/reactstrap/reactstrap/commit/cfe7318)) +* **Dropdown:** enter key triggers onClick ([#1232](https://github.com/reactstrap/reactstrap/issues/1232)) ([f2528da](https://github.com/reactstrap/reactstrap/commit/f2528da)), closes [#1228](https://github.com/reactstrap/reactstrap/issues/1228) +* **Modal:** do not trigger focus on SVG elements ([#1212](https://github.com/reactstrap/reactstrap/issues/1212)) ([c7e6ef5](https://github.com/reactstrap/reactstrap/commit/c7e6ef5)), closes [#1208](https://github.com/reactstrap/reactstrap/issues/1208) +* **Modal:** use static openCount to become resilient to classList modification ([#1190](https://github.com/reactstrap/reactstrap/issues/1190)) ([c8ceeeb](https://github.com/reactstrap/reactstrap/commit/c8ceeeb)), closes [#1189](https://github.com/reactstrap/reactstrap/issues/1189) +* **Tooltip:** clear timers on component unmount ([#1180](https://github.com/reactstrap/reactstrap/issues/1180)) ([9fea409](https://github.com/reactstrap/reactstrap/commit/9fea409)) + + +### Features + +* **Button:** add close icon support ([#1206](https://github.com/reactstrap/reactstrap/issues/1206)) ([02f5e9a](https://github.com/reactstrap/reactstrap/commit/02f5e9a)), closes [#1182](https://github.com/reactstrap/reactstrap/issues/1182) +* **FormGrid:** Add form-row ([#1237](https://github.com/reactstrap/reactstrap/issues/1237)) ([205e80d](https://github.com/reactstrap/reactstrap/commit/205e80d)), closes [#1195](https://github.com/reactstrap/reactstrap/issues/1195) +* **Modal:** add custom close button ([#1168](https://github.com/reactstrap/reactstrap/issues/1168)) ([5f33a1a](https://github.com/reactstrap/reactstrap/commit/5f33a1a)) +* **Popover/Tooltip:** Implented usage of react 16.3 RefObject as target ([#1200](https://github.com/reactstrap/reactstrap/issues/1200)) ([0eade39](https://github.com/reactstrap/reactstrap/commit/0eade39)), closes [#1198](https://github.com/reactstrap/reactstrap/issues/1198) + + + # [6.4.0](https://github.com/reactstrap/reactstrap/compare/6.3.1...6.4.0) (2018-08-17) @@ -1266,4 +2036,3 @@ custom elements should render their html “tags”. * **Buttons:** support block level buttons ([f9cf8db](https://github.com/reactstrap/reactstrap/commit/f9cf8db)) * **Dropdowns:** add examples ([3d48e8c](https://github.com/reactstrap/reactstrap/commit/3d48e8c)) * **Dropdowns:** basic dropdown, toggle, menu & menu items ([750aaf9](https://github.com/reactstrap/reactstrap/commit/750aaf9)) - diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..2680b24b8 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at me@thesharpieone.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fe2bda538..ea5d8a41b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,6 +3,7 @@ If you have found an issue or would like to request a new feature, simply create a new issue detailing the request. We also welcome pull requests. See below for information on getting started with development and submitting pull requests. ## Found an Issue? + If you find a bug in the source code or a mistake in the documentation, you can help us by submitting an issue to our [GitHub Repository](https://github.com/reactstrap/reactstrap/issues/new). Even better you can submit a Pull Request with a fix. @@ -14,10 +15,10 @@ with a fix. You can request a new feature by submitting an issue to our [GitHub Repository](https://github.com/reactstrap/reactstrap/issues/new). If you would like to implement a new feature then consider what kind of change it is: -* **Major Changes** that you wish to contribute to the project should be discussed first in a [GitHub Issue](https://github.com/reactstrap/reactstrap/issues/new) or [Slack](https://reactstrap.slack.com) so that we can better coordinate our efforts, prevent -duplication of work, and help you to craft the change so that it is successfully accepted into the -project. Slack invites can be obtained [here](https://reactstrap.herokuapp.com/). -* **Small Changes** can be crafted and submitted to the [GitHub Repository](https://github.com/reactstrap/reactstrap) as a Pull Request. +- **Major Changes** that you wish to contribute to the project should be discussed first in a [GitHub Issue](https://github.com/reactstrap/reactstrap/issues/new) or [Slack](https://reactstrap.slack.com) so that we can better coordinate our efforts, prevent + duplication of work, and help you to craft the change so that it is successfully accepted into the + project. Slack invites can be obtained [here](https://reactstrap.herokuapp.com/). +- **Small Changes** can be crafted and submitted to the [GitHub Repository](https://github.com/reactstrap/reactstrap) as a Pull Request. ### Submitting a Pull Request @@ -29,7 +30,9 @@ If you wish to submit a pull request for a new feature or issue, you should star - All changes from every developer must go through code review before they will be merged. - All changes must pass the CI build. Travis CI will automatically update your PR with the build status. - All changes must have unit tests. +- All changes must have Typescript types in the [`types`](./types) directory. - All components must have a demo implementation in the `docs/lib/examples` directory. +- Make sure to run `yarn lint` and `yarn prettier` on your work before submitting the PR ## Resources diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index c319d3d95..2fd9890a4 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -29,8 +29,12 @@ paste error message with stacktrack here ### Code diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 9a367031d..79377934e 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -1,23 +1,25 @@ + - [ ] Bug fix - [ ] New feature -- [ ] Chore +- [ ] Chore - [ ] Breaking change - [ ] There is an open issue which this change addresses - [ ] I have read the **[CONTRIBUTING](./CONTRIBUTING.md)** document. - [ ] My commits follow the [Git Commit Guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits) - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. -- - [ ] I have updated the documentation accordingly. + - [ ] I have updated the documentation accordingly. +- [ ] My change requires a change to [Typescript typings](./types/lib). + - [ ] I have updated the typings accordingly. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. - diff --git a/README.md b/README.md index c3e1e8384..de3b95b0d 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,33 @@ [](https://reactstrap.github.io) -[](https://cdnjs.com/libraries/reactstrap) [](https://www.npmjs.com/package/reactstrap) [](https://travis-ci.org/reactstrap/reactstrap) [](https://coveralls.io/github/reactstrap/reactstrap?branch=master) [](https://github.com/reactstrap/reactstrap/blob/master/LICENSE) +[](https://www.npmjs.com/package/reactstrap) [](https://github.com/reactstrap/reactstrap) [](https://coveralls.io/github/reactstrap/reactstrap?branch=master) [](https://github.com/reactstrap/reactstrap/blob/master/LICENSE) # reactstrap -Stateless React Components for Bootstrap 4. +Stateless React Components for Bootstrap 5. + +If you're using Bootstrap 4, you'll need to use [Reactstrap v8](https://deploy-preview-2356--reactstrap.netlify.app/) ## Getting Started -Follow the [create-react-app instructions](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md) **up to** the `Adding Bootstrap` section and instead follow the reactstrap version of [adding bootstrap](#adding-bootstrap). +Follow the [create-react-app instructions](https://create-react-app.dev/docs/getting-started) to get started and then follow the reactstrap version of [adding bootstrap](#adding-bootstrap). ### tl;dr + ``` +npx create-react-app my-app +cd my-app/ +npm start +``` +or, if npx (Node >= 6 and npm >= 5.2 ) not available + ``` npm install -g create-react-app create-react-app my-app cd my-app/ npm start -``` +``` Then open [http://localhost:3000/](http://localhost:3000/) to see your app. The initial structure of your app is setup. Next, let's [add reactstrap and bootstrap](#adding-bootstrap). @@ -27,8 +36,8 @@ Then open [http://localhost:3000/](http://localhost:3000/) to see your app. The Install reactstrap and Bootstrap from NPM. Reactstrap does not include Bootstrap CSS so this needs to be installed as well: ``` -npm install --save bootstrap@4.1.1 -npm install --save reactstrap react@^16.3.2 react-dom@^16.3.2 +npm i bootstrap +npm i reactstrap react react-dom ``` Import Bootstrap CSS in the ```src/index.js``` file: @@ -56,94 +65,9 @@ These libraries are not bundled with Reactstrap and required at runtime: * [**react**](https://www.npmjs.com/package/react) * [**react-dom**](https://www.npmjs.com/package/react-dom) -##### Optional Dependencies - -These libraries are not included in the main distribution file `reactstrap.min.js` and need to be manually -included when using components that require transitions or popover effects (e.g. Tooltip, Modal, etc). - - * [**react-transition-group**](https://www.npmjs.com/package/react-transition-group) - * [**react-popper**](https://www.npmjs.com/package/react-popper) - - -### CDN - -If you prefer to include Reactstrap globally by marking `reactstrap` as external in your application, the -`reactstrap` library provides various single-file distributions, which are hosted on the following CDNs: - -* [**cdnjs**](https://cdnjs.com/libraries/reactstrap) -```html - - - - - -``` - -* [**unpkg**](https://unpkg.com/reactstrap/) -```html - - - - - -``` - -> **Note**: To load a specific version of Reactstrap replace `6.0.1` with the version number. - -#### Versions - -Reactstrap has two primary distribution versions: - -1) `reactstrap.min.js` - - This file **excludes** the optional dependencies – `react-popper` and `react-transition-group`. - This is the recommended approach (similar approach in Bootstrap's JavaScript components) for including - Reactstrap as it reduces the filesize and gives more flexibility in configuring needed dependencies. - - **Recommended use cases:** - - * Small, medium, or large applications - * Applications that do not use any transitions or popper components - * Applications that directly use `react-popper` or `react-transition-group` – Reactstrap and your application - will use the single global version included - - 2) `reactstrap.full.min.js` - - This file **includes** the optional dependencies – `react-popper` and `react-transition-group` - - **Recommended use cases:** - - * Small applications - - -#### Example - -```html - - -
- - - - - - - - - - - - - - - - - -``` - ## About the Project -This library contains React Bootstrap 4 components that favor composition and control. The library does not depend on jQuery or Bootstrap javascript. However, [Poppers.js](https://popper.js.org/) via [react-popper](https://github.com/souporserious/react-popper) is relied upon for advanced positioning of content like Tooltips, Popovers, and auto-flipping Dropdowns. +This library contains React Bootstrap components that favor composition and control. The library does not depend on jQuery or Bootstrap javascript. However, [Poppers.js](https://popper.js.org/) via [react-popper](https://github.com/popperjs/react-popper) is relied upon for advanced positioning of content like Tooltips, Popovers, and auto-flipping Dropdowns. There are a few core concepts to understand in order to make the most out of this library. @@ -179,7 +103,7 @@ There are a few core concepts to understand in order to make the most out of thi - `color` - applies color classes, ex: `` - `size` - for controlling size classes. ex: `` - `tag` - customize component output by passing in an element name or Component - - boolean based props (attributes) when possible for alternative style classes or `sr-only` content + - boolean based props (attributes) when possible for alternative style classes or `visually-hidden` content ## [Documentation](https://reactstrap.github.io) @@ -188,6 +112,12 @@ https://reactstrap.github.io Documentation search is powered by [Algolia's DocSearch](https://community.algolia.com/docsearch/). +## [CodeSandbox Examples](https://github.com/reactstrap/code-sandbox-examples) + +Here are some ready-to-go examples for [CodeSandbox](https://codesandbox.io/) that you can experiment with. + +https://github.com/reactstrap/code-sandbox-examples + ## [Contributing](CONTRIBUTING.md) ## Development @@ -195,68 +125,45 @@ Documentation search is powered by [Algolia's DocSearch](https://community.algol Install dependencies: ```sh -npm install +yarn install ``` Run examples at [http://localhost:8080/](http://localhost:8080/) with webpack dev server: ```sh -npm start +yarn start ``` Run tests & coverage report: ```sh -npm test +yarn cover ``` Watch tests: ```sh -npm run test-watch +yarn test ``` ## Releasing -#### Create Release Branch - -Note: you must have the `GITHUB_TOKEN` environment variable set to a valid GitHub token with write access to your repo. - -To create a release branch and changelog, run the following command, optionally with a semantic release type (major, minor, patch) (if not provided, it will default to semver (it's best to let it default)): - -```bash -./scripts/release-- -- {AlertExampleSource} - -
-- --{`Alert.propTypes = { - className: PropTypes.string, - closeClassName: PropTypes.string, - color: PropTypes.string, // default: 'success' - isOpen: PropTypes.bool, // default: true - toggle: PropTypes.func, - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - // Controls the transition of the alert fading in and out - // See [Fade](/components/fade/) for more details - transition: PropTypes.shape(Fade.propTypes), -}`} - -
-- -- {AlertLinkExampleSource} - -
-- -- {AlertContentExampleSource} - -
-- -- {AlertDismissExampleSource} - -
- For the most basic use-case an uncontrolled component can provide the functionality wanted without the need to manage/control the state of the component. UncontrolledAlert
does not require isOpen
nor toggle
props to work.
-
-- -- {AlertUncontrolledDismissExampleSource} - -
- Fade can be disbaled using fade=false
.
-
--- {AlertFadelessExampleSource} - -
Scale to parent
---- {BadgeExampleSource} - -
Badges can be used as part of links or buttons to provide a counter.
---- {BadgeButtonExampleSource} - -
--- {BadgeVariationsExampleSource} - -
--- {BadgePillsExampleSource} - -
Adding the href
prop (without specifying a tag
prop) will default the badge to a link.
--- {BadgeLinksExampleSource} - -
--- {BreadcrumbExampleSource} - -
---{`Breadcrumb.propTypes = { - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - listTag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string, - listClassName: PropTypes.string, - cssModule: PropTypes.object, - children: PropTypes.node, - 'aria-label': PropTypes.string -}; - -BreadcrumbItem.propTypes = { - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - active: PropTypes.bool, - className: PropTypes.string, - cssModule: PropTypes.object, -}; -`} - -
Breadcrumbs can work without the usage of list markup.
---- {BreadcrumbNoListExampleSource} - -
--- {ButtonDropdownExampleSource} - -
---{`ButtonDropdown.propTypes = { - disabled: PropTypes.bool, - direction: PropTypes.oneOf(['up', 'down', 'left', 'right']), - group: PropTypes.bool, - isOpen: PropTypes.bool, - tag: PropTypes.string, - toggle: PropTypes.func -}; - -DropdownToggle.propTypes = { - caret: PropTypes.bool, - color: PropTypes.string, - disabled: PropTypes.bool, - onClick: PropTypes.func, - 'data-toggle': PropTypes.string, - 'aria-haspopup': PropTypes.bool -};`} - -
---{` -- `} -- Text - -- -Header -Action -Another Action -- Another Action -
---{` -- - `} -- - -Header -Action -Another Action -- Another Action -
---{` -- - -- Large Button - -- -Another Action -Another Action -- `} -- Small Button - -- -Another Action -Another Action -
---{` -- - -- Dropup - -- -Another Action -Another Action -{ this.setState({ btnDropleft: !this.state.btnDropleft }); }}> - - -- Dropleft - -- -Another Action -Another Action -{ this.setState({ btnDropright: !this.state.btnDropright }); }}> - `} -- Dropright - -- -Another Action -Another Action -
--- {ButtonGroupExampleSource} - -
---{`ButtonGroup.propTypes = { - ariaLabel: PropTypes.string, - className: PropTypes.string, - role: PropTypes.string, - size: PropTypes.string, - vertical: PropTypes.bool -};`} - -
--- {ButtonToolbarExampleSource} - -
---{` -- - - - - -- - - - - -- - - - `} -
---{` -- - - `} -- -- Dropdown - -- -Dropdown Link -Dropdown Link -
---{` -- - - `} -- -- Dropdown - -- -Dropdown Link -Dropdown Link -
--- {ButtonExampleSource} - -
---{`Button.propTypes = { - active: PropTypes.bool, - block: PropTypes.bool, - color: PropTypes.string, // default: 'secondary' - disabled: PropTypes.bool, - - // Pass in a Component to override default button element - // example: react-router Link - // default: 'button' - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - - // ref will only get you a reference to the Button component, use innerRef to get a reference to the DOM element (for things like focus management). - innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - - onClick: PropTypes.func, - size: PropTypes.string -}`} - -
--- {ButtonOutlineSource} - -
---{`{' '} -`} - -
---{`{' '} -`} - -
---{` -`} - -
---{`{' '} -`} - -
-- --{`{' '} -`} - -
- In order to have checkbox and radio buttons, your component needs to manage the state of which button(s) are active/select. It is not in the opinion of this library to manage state within it's components so it is left up to you. Below is a simple example showcasing how this could be done using the components which already exist in this library. -
---- {ButtonStatefulSource} - -
--- {CardExampleSource} - -
---{`Card.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - inverse: PropTypes.bool, - color: PropTypes.string, - body: PropTypes.bool, - className: PropTypes.string -}; - -CardBody.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string -}; - -CardColumns.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string -}; - -CardDeck.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string -}; - -CardFooter.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string -}; - -CardGroup.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string -}; - -CardHeader.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string -}; - -CardImg.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string, - // Use top or bottom to position image via "card-img-top" or "card-img-bottom" - top: PropTypes.bool, - bottom: PropTypes.bool -}; - -CardImgOverlay.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string -}; - -CardLink.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string, - // ref will only get you a reference to the CardLink component, use innerRef to get a reference to the DOM element (for things like focus management). - innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]) -}; - -CardSubtitle.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string -}; - -CardText.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string -}; - -CardTitle.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.string -};`} - -
--- {CardContentExampleSource} - -
--- {CardSizingExampleSource} - -
--- {CardAlignmentExampleSource} - -
--- {CardHeaderFooterExampleSource} - -
--- {CardImageCapsExampleSource} - -
--- {CardImageOverlayExampleSource} - -
--- {CardBackgroundsExampleSource} - -
--- {CardOutlineExampleSource} - -
--- {CardGroupsExampleSource} - -
--- {CardDecksExampleSource} - -
--- {CardColumnsExampleSource} - -
-- -- {CarouselExampleSource} - -
-- --{`Carousel.propTypes = { - // the current active slide of the carousel - activeIndex: PropTypes.number, - // a function which should advance the carousel to the next slide (via activeIndex) - next: PropTypes.func.isRequired, - // a function which should advance the carousel to the previous slide (via activeIndex) - previous: PropTypes.func.isRequired, - // controls if the left and right arrow keys should control the carousel - keyboard: PropTypes.bool, - /* If set to "hover", pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on - * mouseleave. If set to false, hovering over the carousel won't pause it. (default: "hover") - */ - pause: PropTypes.oneOf(['hover', false]), - // Autoplays the carousel after the user manually cycles the first item. If "carousel", autoplays the carousel on load. - // This is how bootstrap defines it... I would prefer a bool named autoplay or something... - ride: PropTypes.oneOf(['carousel']), - // the interval at which the carousel automatically cycles (default: 5000) - interval: PropTypes.oneOfType([ - PropTypes.number, - PropTypes.string, - PropTypes.bool, - ]), - children: PropTypes.array, - // called when the mouse enters the Carousel - mouseEnter: PropTypes.func, - // called when the mouse exits the Carousel - mouseLeave: PropTypes.func, - // controls whether the slide animation on the Carousel works or not - slide: PropTypes.bool, - cssModule: PropTypes.object, -};`} - -
-- --{`CarouselItem.propTypes = { - ...Transition.propTypes, - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - in: PropTypes.bool, - cssModule: PropTypes.object, - children: PropTypes.node, - slide: PropTypes.bool, -};`} - -
-- --{`CarouselControl.propTypes = { - direction: PropTypes.oneOf(['prev', 'next']).isRequired, - onClickHandler: PropTypes.func.isRequired, - cssModule: PropTypes.object, - directionText: PropTypes.string -};`} - -
-- --{`CarouselIndicators.propTypes = { - items: PropTypes.array.isRequired, - activeIndex: PropTypes.number.isRequired, - cssModule: PropTypes.object, - onClickHandler: PropTypes.func.isRequired -};`} - -
-- --{`CarouselCaption.propTypes = { - captionHeader: PropTypes.string, - captionText: PropTypes.string.isRequired, - cssModule: PropTypes.object -};`} - -
- For the most basic use-case an uncontrolled component can provide the functionality wanted without the need to manage/control the state of the component. UncontrolledCarousel
does not require previous
, next
nor activeIndex
props to work.
- Anything provided to a normal Carousel
can also be provided to UncontrolledCarousel
, overriding the control UncontrolledCarousel
provides. Additionally, you can hide the controls by passing false
to the controls
prop
- and you can disable the indicators by passing false
to the indicators
prop; both are visible by default. Autoplay (ride="carousel"
) is enabled by default, you can disable it by passing false
to the autoPlay
prop.
-
-- -- {CarouselUncontrolledExampleSource} - -
Same as Carousel (except children) can be overridden plus the following
--- --{`UncontrolledCarousel.propTypes = { - items: PropTypes.array.isRequired, - indicators: PropTypes.bool, // default: true - controls: PropTypes.bool, // default: true - autoPlay: PropTypes.bool, // default: true -};`} - -
--- {CarouselCustomTagExampleSource} - -
-- -{CollapseExampleSource} -
-- -- {`Collapse.propTypes = { - ...Transition.propTypes, - isOpen: PropTypes.bool, - children: PropTypes.oneOfType([ - PropTypes.arrayOf(PropTypes.node), - PropTypes.node - ]), - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - className: PropTypes.node, - navbar: PropTypes.bool, - cssModule: PropTypes.object, - innerRef: PropTypes.object, -};`} - -
- Use the onEnter
, onEntering, onEntered, onExiting and onExited props for
- callbacks when the Collapse has finished opening (entering) or closing (exiting).
-
--{CollapseEventsExampleSource} -
- For the most basic use-case, an uncontrolled component can provide the functionality
- wanted without the need to manage/control the state of the component.{' '}
- UncontrolledCollapse
does not require an isOpen
prop. Instead
- pass a toggler
prop. The toggler
prop is a string which will run
- querySelectorAll to find dom elements which will trigger toggle.
-
--{UncontrolledCollapseExampleSource} -
- The Dropdown
component is used to pass the isOpen
& toggle
props via context to the following components: DropdownToggle
, DropdownMenu
. The DropdownToggle
uses the Button
component internally, meaning it also accepts all the props the Button component accepts.
-
--- {DropdownExampleSource} - -
---{`Dropdown.propTypes = { - disabled: PropTypes.bool, - direction: PropTypes.oneOf(['up', 'down', 'left', 'right']), - group: PropTypes.bool, - isOpen: PropTypes.bool, - // For Dropdown usage inside a Nav - nav: PropTypes.bool, - active: PropTypes.bool, - // For Dropdown usage inside a Navbar (disables popper) - inNavbar: PropTypes.bool, - tag: PropTypes.string, // default: 'div' unless nav=true, then 'li' - toggle: PropTypes.func, - setActiveFromChild: PropTypes.bool -}; - -DropdownToggle.propTypes = { - caret: PropTypes.bool, - color: PropTypes.string, - className: PropTypes.string, - disabled: PropTypes.bool, - onClick: PropTypes.func, - 'data-toggle': PropTypes.string, - 'aria-haspopup': PropTypes.bool, - // For DropdownToggle usage inside a Nav - nav: PropTypes.bool, - // Defaults to Button component - tag: PropTypes.any -}; - -DropdownMenu.propTypes = { - tag: PropTypes.string, - children: PropTypes.node.isRequired, - right: PropTypes.bool, - flip: PropTypes.bool, // default: true, - className: PropTypes.string, - cssModule: PropTypes.object, - // Custom modifiers that are passed to DropdownMenu.js, see https://popper.js.org/popper-documentation.html#modifiers - modifiers: PropTypes.object, - persist: PropTypes.bool // presist the popper, even when closed. See #779 for reasoning -}; - -DropdownItem.propTypes = { - children: PropTypes.node, - active: PropTypes.bool, - disabled: PropTypes.bool, - divider: PropTypes.bool, - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - header: PropTypes.bool, - onClick: PropTypes.func, - className: PropTypes.string, - cssModule: PropTypes.object, - toggle: PropTypes.bool // default: true -};`} - -
To align the DropdownMenu
to the right, add a right
prop to Dropdown
.
---{` -- `} -- This dropdown's menu is right-aligned - -- -Header -Action -Another Action -- Another Action -
---{' -Header '} -
---{' -'} -
---{' -Action '} -
---{' -Action '} -
---{` -- - -- Dropdown - -- ... - -- - -- Dropdown - -- ... - -- `} -- Dropdown - -- ... - -
-- -- {CustomDropdownExampleSource} - -
- For the most basic use-case an uncontrolled component can provide the functionality wanted without the need to manage/control the state of the component. UncontrolledDropdown
does not require isOpen
nor toggle
props to work. For the ButtonDropdown
flavor, an uncontrolled component have been made as well; UncontrolledButtonDropdown
.
-
--- {DropdownUncontrolledExampleSource} - -
-- --{` -- - -- Dropup - -- -Another Action -Another Action -{ this.setState({ btnDropleft: !this.state.btnDropleft }); }}> - - -- Dropleft - -- -Another Action -Another Action -{ this.setState({ btnDropright: !this.state.btnDropright }); }}> - `} -- Dropright - -- -Another Action -Another Action -
-- --{` -- `} -- Dropdown - -{ - return { - ...data, - styles: { - ...data.styles, - overflow: 'auto', - maxHeight: 100, - }, - }; - }, - }, - }} - > - -Another Action -Another Action -Another Action -Another Action -Another Action -Another Action -Another Action -Another Action -Another Action -Another Action -
- Use setActiveFromChild
prop to automatically set the dropdown to active when any of the dropdown menu items are active. Note: this prop will not work in conjunction with react-router Link
and activeClassName
.
-
--- {DropdownSetActiveFromChildSource} - -
-- -- {FadeExampleSource} - -
---{`Fade.propTypes = { - // Controls if the fade is currently showing or not (default: true) - in: PropTypes.bool, - - // All of these match [react-transition-group/Transition](https://reactcommunity.org/react-transition-group/#Transition) props - mountOnEnter: PropTypes.bool, - unmountOnExit: PropTypes.bool, - appear: PropTypes.bool, // (default: true) - enter: PropTypes.bool, // (default: true) - exit: PropTypes.bool, // (default: true) - timeout: PropTypes.oneOfType([ // (default: 150) - PropTypes.number, - PropTypes.shape({ - enter: PropTypes.number, - exit: PropTypes.number, - }).isRequired, - ]), - addEndListener: PropTypes.func, - onEnter: PropTypes.func, - onEntering: PropTypes.func, - onEntered: PropTypes.func, - onExit: PropTypes.func, - onExiting: PropTypes.func, - onExited: PropTypes.func, - - // The component(s) that should be faded - children: PropTypes.oneOfType([ - PropTypes.arrayOf(PropTypes.node), - PropTypes.node - ]), - // Pass in a component or primitive component name to override the default element - // (default: 'div') - tag: PropTypes.oneOfType([PropTypes.string, PropTypes.func]), - // Class always applied to the Fade element (default: 'fade') - baseClass: PropTypes.string, - // Class applied to transition the Fade element in (default: 'show') - baseClassActive: PropTypes.string, - // Other classes that should always be applied - className: PropTypes.string, - cssModule: PropTypes.object, - - // Any other props provided will be applied to the element created (specified by tag) -}`} - -
-- -- {FormExampleSource} - -
-- --{`Input.propTypes = { - children: PropTypes.node, - // type can be things like text, password, (typical input types) as well as select and textarea, providing children as you normally would to those. - type: PropTypes.string, - size: PropTypes.string, - bsSize: PropTypes.string, - state: deprecated(PropTypes.string, 'Please use the prop "valid"'), - valid: PropTypes.bool, // applied the is-valid class when true, does nothing when false - invalid: PropTypes.bool, // applied the is-invalid class when true, does nothing when false - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - // ref will only get you a reference to the Input component, use innerRef to get a reference to the DOM input (for things like focus management). - innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - static: deprecated(PropTypes.bool, 'Please use the prop "plaintext"'), - plaintext: PropTypes.bool, - addon: PropTypes.bool, - className: PropTypes.string, - cssModule: PropTypes.object, -};`} -{`CustomInput.propTypes = { - className: PropTypes.string, - id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, - type: PropTypes.string.isRequired, // radio, checkbox, select, range. - label: PropTypes.string, // used for checkbox and radios - inline: PropTypes.bool, - valid: PropTypes.bool, // applied the is-invalid class when true, does nothing when false - invalid: PropTypes.bool, // applied the is-valid class when true, does nothing when false - bsSize: PropTypes.string, - cssModule: PropTypes.object, - children: PropTypes.oneOfType([PropTypes.node, PropTypes.array, PropTypes.func]), // for type="select" - // innerRef would be referenced to select node or input DOM node, depends on type property - innerRef: PropTypes.oneOfType([ - PropTypes.object, - PropTypes.string, - PropTypes.func, - ]) -};`} - -
-- -- {FormGridExampleSource} - -
-- -- {FormInlineExampleSource} - -
-- -- {FormFeedbackExampleSource} - -
-- -- {InputTypeExampleSource} - -
-- -- {InlineCheckboxesExampleSource} - -
-- -- {InputSizingExampleSource} - -
-- -- {InputGridSizingExampleSource} - -
-- -- {LabelHiddenExampleSource} - -
--- {CustomControlsExampleSource} - -
--- {OverviewExampleSource} - -
---{`InputGroup.propTypes = { - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - size: PropTypes.string, - className: PropTypes.string -}; - -InputGroupAddOn.propTypes = { - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - addonType: PropTypes.oneOf(['prepend', 'append']).isRequired, - className: PropTypes.string -}; - -InputGroupButton.propTypes = { - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - addonType: PropTypes.oneOf(['prepend', 'append']).isRequired, - children: PropTypes.node, - groupClassName: PropTypes.string, // only used in shorthand - groupAttributes: PropTypes.object, // only used in shorthand - className: PropTypes.string -};`} - -
-- -- {AddonExampleSource} - -
-- -- {AddonSizingExampleSource} - -
-- -- {ButtonExampleSource} - -
- Button shorthand is deprecated. Below are the updated examples of how to use InputGroupAddon
to
- accomplish the same output.
-
- Button shorthand is a convenience method for adding just a button. It is triggered when only a single string
- is the child. A Button will be created and all of the props will be passed to it with the exception of
- groupClassName
and groupAttributes
, which are used to added classes and attributes
- to the wrapping container. This means you can add your onClick
and other handlers directly to
- InputGroupButton
. If you want your string to not be wrapped in a button, then you really want to
- use InputGroupAddon
(see Addons above for that).
-
--- {ButtonShorthandExampleSource} - -
--- {JumbotronExampleSource} - -
-- --{`Jumbotron.propTypes = { - // Pass in a Component to override default element - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - fluid: PropTypes.bool, - className: PropTypes.string -};`} - -
--- {JumbotronFluidExampleSource} - -
--- {LayoutExampleSource} - -
---{`Container.propTypes = { - fluid: PropTypes.bool - // applies .container-fluid class -}`} - -
---{`Row.propTypes = { - noGutters: PropTypes.bool -}`} - -
---{`const stringOrNumberProp = PropTypes.oneOfType([PropTypes.number, PropTypes.string]); -const columnProps = PropTypes.oneOfType([ - PropTypes.string, - PropTypes.number, - PropTypes.bool, - PropTypes.shape({ - size: PropTypes.oneOfType([PropTypes.bool, PropTypes.number, PropTypes.string]), - // example size values: - // 12 || "12" => col-12 or col-\`width\`-12 - // auto => col-auto or col-\`width\`-auto - // true => col or col-\`width\` - order: stringOrNumberProp, - offset: stringOrNumberProp - }) -]); - -Col.propTypes = { - xs: columnProps, - sm: columnProps, - md: columnProps, - lg: columnProps, - xl: columnProps, - // override the predefined width (the ones above) with your own custom widths. - // see https://github.com/reactstrap/reactstrap/issues/297#issuecomment-273556116 - widths: PropTypes.array, -}`} - -
--- {ListGroupExampleSource} - -
-- - --{ - `ListGroup.propTypes = { - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - // boolean to render list group items edge-to-edge in a parent container - flush: PropTypes.bool, - className: PropTypes.string, - cssModule: PropTypes.object, - }` - } - -
-- - -- {ListGroupBadgeExampleSource} - -
-- - -- {ListGroupDisabledItemsExampleSource} - -
Note: you need add action props to make these buttons fit the list.
--- - -- {ListGroupAnchorsAndButtonsExampleSource} - -
-- - -- {ListGroupContextualClassesExampleSource} - -
-- - -- {ListGroupCustomContentExampleSource} - -
--- {ListGroupFlushExampleSource} - -
--- {MediaExampleSource} - -
---{`Media.propTypes = { - body: PropTypes.bool, - bottom: PropTypes.bool, - children: PropTypes.node, - className: PropTypes.string, - heading: PropTypes.bool, - left: PropTypes.bool, - list: PropTypes.bool, - middle: PropTypes.bool, - object: PropTypes.bool, - right: PropTypes.bool, - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - top: PropTypes.bool, -};`} - -
--- {MediaNestedExampleSource} - -
--- {MediaAlignmentExampleSource} - -
--- {MediaListExampleSource} - -
--- {ModalExampleSource} - -
-- --{`Modal.propTypes = { - // boolean to control the state of the popover - isOpen: PropTypes.bool, - autoFocus: PropTypes.bool, - // if modal should be centered vertically in viewport - centered: PropTypes.bool, - // corresponds to bootstrap's modal sizes, ie. 'lg' or 'sm' - size: PropTypes.string, - // callback for toggling isOpen in the controlling component - toggle: PropTypes.func, - role: PropTypes.string, // defaults to "dialog" - // used to reference the ID of the title element in the modal - labelledBy: PropTypes.string, - keyboard: PropTypes.bool, - // control backdrop, see http://v4-alpha.getbootstrap.com/components/modal/#options - backdrop: PropTypes.oneOfType([ - PropTypes.bool, - PropTypes.oneOf(['static']) - ]), - // allows for a node/componet to exist next to the modal (outside of it). Useful for external close buttons - // external: PropTypes.node, - // called on componentDidMount - onEnter: PropTypes.func, - // called on componentWillUnmount - onExit: PropTypes.func, - // called when done transitioning in - onOpened: PropTypes.func, - // called when done transitioning out - onClosed: PropTypes.func, - className: PropTypes.string, - wrapClassName: PropTypes.string, - modalClassName: PropTypes.string, - backdropClassName: PropTypes.string, - contentClassName: PropTypes.string, - // boolean to control whether the fade transition occurs (default: true) - fade: PropTypes.bool, - cssModule: PropTypes.object, - // zIndex defaults to 1000. - zIndex: PropTypes.oneOfType([ - PropTypes.number, - PropTypes.string, - ]), - // backdropTransition - controls backdrop transition - // timeout is 150ms by default to match bootstrap - // see [Fade](/components/fade/) for more details - backdropTransition: PropTypes.shape(Fade.propTypes), - // modalTransition - controls modal transition - // timeout is 300ms by default to match bootstrap - // see [Fade](/components/fade/) for more details - modalTransition: PropTypes.shape(Fade.propTypes), - innerRef: PropTypes.object, -}`} - -
-- -- {ModalBackdropExampleSource} - -
-- -- {ModalNestedExampleSource} - -
-- -- {ModalCustomTimeoutExampleSource} - -
-- -- {ModalFadelessExampleSource} - -
-- -- {ModalExternalExampleSource} - -
--- {ModalCustomCloseIconExampleSource} - -
--- {NavbarExampleSource} - -
See also Navs for additional components and PropTypes.
----{`Navbar.propTypes = { - light: PropTypes.bool, - dark: PropTypes.bool, - fixed: PropTypes.string, - color: PropTypes.string, - role: PropTypes.string, - expand: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]), - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]) - // pass in custom element to use -}`} - -
---{`NavbarBrand.propTypes = { - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]) - // pass in custom element to use -}`} - -
- Place the NavbarToggler
after NavbarBrand
to have it appear on the right (typical setup).
- Reverse the order to have it appear on the left
-
--- {NavbarTogglerExampleSource} - -
---{`NavbarToggler.propTypes = { - type: PropTypes.string, - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]) - // pass in custom element to use -}`} - -
--- {NavsExampleSource} - -
---{`Nav.propTypes = { - tabs: PropTypes.bool, - pills: PropTypes.bool, - card: PropTypes.bool, - justified: PropTypes.bool, - fill: PropTypes.bool, - vertical: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]), - horizontal: PropTypes.string, - navbar: PropTypes.bool, - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]) - // pass in custom element to use -}`} - -
---{`NavItem.propTypes = { - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - active: PropTypes.bool, - // pass in custom element to use -}`} - -
---{`NavLink.propTypes = { - disabled: PropTypes.bool, - active: PropTypes.bool, - // pass in custom element to use - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - // ref will only get you a reference to the NavLink component, use innerRef to get a reference to the DOM element (for things like focus management). - innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.string]) -}`} - -
--- {NavVerticalExampleSource} - -
--- {NavTabsExampleSource} - -
--- {NavPillsExampleSource} - -
--- {PaginationExampleSource} - -
---{`Pagination.propTypes = { - children: PropTypes.node, - className: PropTypes.string, - listClassName: PropTypes.string, - cssModule: PropTypes.object, - size: PropTypes.string, - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - listTag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - 'aria-label': PropTypes.string -}; - -PaginationItem.propTypes = { - active: PropTypes.bool, - children: PropTypes.node, - className: PropTypes.string, - cssModule: PropTypes.object, - disabled: PropTypes.bool, - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), -}; - -PaginationLink.propTypes = { - children: PropTypes.node, - className: PropTypes.string, - cssModule: PropTypes.object, - next: PropTypes.bool, - previous: PropTypes.bool, - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - 'aria-label': PropTypes.string -}; -`} - -
--- {PaginationStateExampleSource} - -
--- {PaginationSizingLargeExampleSource} - -
--- {PaginationSizingSmallExampleSource} - -
Popovers are built with https://popper.js.org/ via https://github.com/souporserious/react-popper.
---- {PopoverExampleSource} - -
---{`Popover.propTypes = { - // boolean to control the state of the popover - isOpen: PropTypes.bool, - // callback for toggling isOpen in the controlling component - toggle: PropTypes.func, - // boundaries for popper, can be scrollParent, window, viewport, or any DOM element - boundariesElement: PropTypes.string, - target: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.func, - DOMElement, // instanceof Element (https://developer.mozilla.org/en-US/docs/Web/API/Element) - ]).isRequired, - // Where to inject the popper DOM node, default to body - container: PropTypes.oneOfType([PropTypes.string, PropTypes.func, DOMElement]), - className: PropTypes.string, - // Apply class to the inner-popover - innerClassName: PropTypes.string, - disabled: PropTypes.bool, - hideArrow: PropTypes.bool, - placementPrefix: PropTypes.string, - delay: PropTypes.oneOfType([ - PropTypes.shape({ show: PropTypes.number, hide: PropTypes.number }), - PropTypes.number, - ]), - placement: PropTypes.oneOf([ - 'auto', - 'auto-start', - 'auto-end', - 'top', - 'top-start', - 'top-end', - 'right', - 'right-start', - 'right-end', - 'bottom', - 'bottom-start', - 'bottom-end', - 'left', - 'left-start', - 'left-end', - ]), - // Custom modifiers that are passed to Popper.js, see https://popper.js.org/popper-documentation.html#modifiers - modifiers: PropTypes.object, - offset: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.number - ]) -}`} - -
--- {PopoverExampleMultiSource} - -
--- {ProgressExampleSource} - -
-- --{`Progress.propTypes = { - multi: PropTypes.bool, - bar: PropTypes.bool, // used in combination with multi - tag: PropTypes.string, - value: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.number, - ]), - max: PropTypes.oneOf([ - PropTypes.string, - PropTypes.number, - ]), - animated: PropTypes.bool, - striped: PropTypes.bool, - color: PropTypes.string, - className: PropTypes.string, - barClassName: PropTypes.string // used to add class to the inner progress-bar element -}; - -Progress.defaultProps = { - tag: 'progress', - value: 0, - max: 100, -};`} - -
-- -- {ProgressColorExampleSource} - -
-- -- {ProgressLabelsExampleSource} - -
-- -- {ProgressStripedExampleSource} - -
- The animated
prop also adds the striped
prop; there is no need to pass both.
-
-- -- {ProgressAnimatedExampleSource} - -
-- -- {ProgressMultiExampleSource} - -
-- -- {ProgressMaxExampleSource} - -
--- {TableExampleSource} - -
---{`Table.propTypes = { -// Pass in a Component to override default element -tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), -size: PropTypes.string, -bordered: PropTypes.bool, -borderless: PropTypes.bool, -striped: PropTypes.bool, -dark: PropTypes.bool, -hover: PropTypes.bool, -responsive: PropTypes.bool -};`} - -
--- {TableDarkExampleSource} - -
--- {TableStripedExampleSource} - -
--- {TableBorderedExampleSource} - -
--- {TableBorderlessExampleSource} - -
--- {TableHoverExampleSource} - -
--- {TableSizingExampleSource} - -
--- {TableResponsiveExampleSource} - -
--- {TabsExampleSource} - -
Tooltips are built with https://popper.js.org/ via https://github.com/souporserious/react-popper.
---- {TooltipExampleSource} - -
--{`Tooltip.propTypes = { - // boundaries for popper, can be scrollParent, window, viewport, or any DOM element - boundariesElement: PropTypes.string, - // boolean to control the state of the tooltip - isOpen: PropTypes.bool, - hideArrow: PropTypes.bool, - // callback for toggling isOpen in the controlling component. It will receive an object with info about the event that triggered it - toggle: PropTypes.func, - // target element or element ID, popover is attached to this element - target: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.func, - DOMElement, // instanceof Element (https://developer.mozilla.org/en-US/docs/Web/API/Element) - ]).isRequired, - // Where to inject the popper DOM node, default to body - container: PropTypes.oneOfType([PropTypes.string, PropTypes.func, DOMElement]), - // optionally override show/hide delays - default { show: 0, hide: 250 } - delay: PropTypes.oneOfType([ - PropTypes.shape({ show: PropTypes.number, hide: PropTypes.number }), - PropTypes.number - ]), - className: PropTypes.string, - // Apply class to the inner-tooltip - innerClassName: PropTypes.string, - // Apply class to the arrow-tooltip ('arrow' by default) - arrowClassName: PropTypes.string, - // optionally hide tooltip when hovering over tooltip content - default true - autohide: PropTypes.bool, - // convenience attachments for popover - placement: PropTypes.oneOf([ - 'auto', - 'auto-start', - 'auto-end', - 'top', - 'top-start', - 'top-end', - 'right', - 'right-start', - 'right-end', - 'bottom', - 'bottom-start', - 'bottom-end', - 'left', - 'left-start', - 'left-end', - ]), - // Custom modifiers that are passed to Popper.js, see https://popper.js.org/popper-documentation.html#modifiers - modifiers: PropTypes.object, - offset: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.number - ]), - // Custom ref handler that will be assigned to the "ref" of the wrapping the tooltip elements - innerRef: PropTypes.oneOfType([ - PropTypes.func, - PropTypes.string, - PropTypes.object - ]), - trigger: PropTypes.string, -}`} - - -- ); - } -} diff --git a/docs/lib/Components/index.js b/docs/lib/Components/index.js deleted file mode 100644 index 25ee4afe6..000000000 --- a/docs/lib/Components/index.js +++ /dev/null @@ -1,117 +0,0 @@ -import React from 'react'; -import Content from '../UI/Content'; - -const items = [ - { - name: 'Alerts', - to: '/components/alerts/' - }, - { - name: 'Badge', - to: '/components/badge/' - }, - { - name: 'Breadcrumbs', - to: '/components/breadcrumbs/' - }, - { - name: 'Buttons', - to: '/components/buttons/' - }, - { - name: 'Button Dropdown', - to: '/components/button-dropdown/' - }, - { - name: 'Button Group', - to: '/components/button-group/' - }, - { - name: 'Card', - to: '/components/card/' - }, - { - name: 'Collapse', - to: '/components/collapse/', - }, - { - name: 'Carousel', - to: '/components/carousel/' - }, - { - name: 'Dropdowns', - to: '/components/dropdowns/' - }, - { - name: 'Fade', - to: '/components/fade/' - }, - { - name: 'Form', - to: '/components/form/' - }, - { - name: 'Input Group', - to: '/components/input-group/' - }, - { - name: 'Jumbotron', - to: '/components/jumbotron/' - }, - { - name: 'Layout', - to: '/components/layout/' - }, - { - name: 'List Group', - to: '/components/listgroup/' - }, - { - name: 'Media', - to: '/components/media/' - }, - { - name: 'Modals', - to: '/components/modals/' - }, - { - name: 'Navbar', - to: '/components/navbar/' - }, - { - name: 'Navs', - to: '/components/navs/' - }, - { - name: 'Pagination', - to: '/components/pagination/' - }, - { - name: 'Popovers', - to: '/components/popovers/' - }, - { - name: 'Progress', - to: '/components/progress/' - }, - { - name: 'Tables', - to: '/components/tables/' - }, - { - name: 'Tabs', - to: '/components/tabs/' - }, - { - name: 'Tooltips', - to: '/components/tooltips/' - } -]; - -function Components(props) { - return ( -Tooltip Disable Autohide ---- --- {TooltipExampleAutoHideSource} - -Tooltips List ---- --- {TooltipExampleMultiSource} - -Uncontrolled Tooltip -- For the most basic use-case an uncontrolled component can provide the functionality wanted without the need to manage/control the state of the component.
-UncontrolledTooltip
does not requireisOpen
nortoggle
props to work. ---- --- {TooltipExampleUncontrolledSource} - -- ); -} - -export default Components; diff --git a/docs/lib/Home/index.js b/docs/lib/Home/index.js deleted file mode 100644 index af6a5a397..000000000 --- a/docs/lib/Home/index.js +++ /dev/null @@ -1,145 +0,0 @@ -import React from 'react'; -import { PrismCode } from 'react-prism'; -import { Button, Container, Row, Col, Jumbotron } from 'reactstrap'; -import { Link } from 'react-router'; -import Example from '../examples/import-basic'; - -const importBasic = require('!!raw!../examples/import-basic'); - -export default () => { - return ( - -- ); -}; diff --git a/docs/lib/NotFound/index.js b/docs/lib/NotFound/index.js deleted file mode 100644 index fca4e373b..000000000 --- a/docs/lib/NotFound/index.js +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import { Button, Container, Row, Col } from 'reactstrap'; -import { Link } from 'react-router'; -import Helmet from 'react-helmet'; - -export default () => { - return ( -- -- --
-- -
--
reactstrap
-- Easy to use React Bootstrap 4 components -
-- - -
- -- --
-- Installation
-
-NPM
-Install reactstrap and peer dependencies via NPM
---npm install --save reactstrap react react-dom -Import the components you need
---- --- {importBasic} - -Getting Started with Create React App
-Follow the create-react-app instructions up to the
-Adding Bootstrap
section and instead follow the reactstrap version of adding bootstrap.tl;dr
----{`npm install -g create-react-app - -create-react-app my-app -cd my-app/ -npm start`} - -- Then open http://localhost:3000/ to see your app. The initial structure of your app is setup. Next, let's add reactstrap and bootstrap. -
-Adding Bootstrap
-Install reactstrap and Bootstrap from NPM. Reactstrap does not include Bootstrap CSS so this needs to be installed as well:
---- {`npm install bootstrap --save -npm install --save reactstrap react react-dom`} - -Import Bootstrap CSS in the
-src/index.js
file:--import 'bootstrap/dist/css/bootstrap.min.css'; -Import required reactstrap components within
-src/App.js
file or your custom component files:--- {`import { Button } from 'reactstrap';`} - -Now you are ready to use the imported reactstrap components within your component hierarchy defined in the render method. Here is an example
-App.js
redone using reactstrap.CDN
-Reactstrap can be included directly in your application's bundle or excluded during compilation and linked directly to a CDN.
---- https://cdnjs.cloudflare.com/ajax/libs/reactstrap/4.8.0/reactstrap.min.js - ---- Note: When using the external CDN library, be sure to include the required dependencies as necessary prior to the Reactstrap library: -
--
-- React
-- ReactTransitionGroup
-Check out the demo here
-About the Project
-
-This library contains React Bootstrap 4 components that favor composition and control. The library does not depend on jQuery or Bootstrap javascript. However, https://popper.js.org/ via https://github.com/souporserious/react-popper is relied upon for advanced positioning of content like Tooltips, Popovers, and auto-flipping Dropdowns.
-There are a few core concepts to understand in order to make the most out of this library.
-1) Your content is expected to be composed via props.children rather than using named props to pass in Components.
----{`// Content passed in via props -const Example = (props) => { - return ( - -This is a tooltip
- ); -} - -// Content passed in as children (Preferred) -const PreferredExample = (props) => { - return ( -example !- This is a tooltip example. -
- ); -}`} -- -- - 2) Attributes in this library are used to pass in state, conveniently apply modifier classes, enable advanced functionality (like popperjs), or automatically include non-content based elements. -
-Examples:
--
- -- -
isOpen
- current state for items like dropdown, popover, tooltip- -
toggle
- callback for toggling isOpen in the controlling component- -
color
- applies color classes, ex:{''}
- -
size
for controlling size classes. ex:{''}
- -
tag
- customize component output by passing in an element name or Component- boolean based props (attributes) when possible for alternative style classes or sr-only content
--- ); -}; diff --git a/docs/lib/UI/Content.js b/docs/lib/UI/Content.js deleted file mode 100644 index 76450a5ae..000000000 --- a/docs/lib/UI/Content.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Link } from 'react-router'; -import PropTypes from 'prop-types'; -import { Container, Row, Col, Nav, NavItem, NavLink } from 'reactstrap'; - -const propTypes = { - children: PropTypes.node, - items: PropTypes.array, - title: PropTypes.string, -}; - -function Content({ items, children, title }) { - return ( -- - -- --
-- -
--
404 - Not Found
-- Can't find what you're looking for? Open up an issue. -
-- - -
- -- - ); -} - -Content.propTypes = propTypes; -export default Content; diff --git a/docs/lib/UI/DocSearch.js b/docs/lib/UI/DocSearch.js deleted file mode 100644 index 06a86da0b..000000000 --- a/docs/lib/UI/DocSearch.js +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import { Form, Input } from 'reactstrap'; - -export default () => { - return ( - - ); -}; diff --git a/docs/lib/UI/Footer.js b/docs/lib/UI/Footer.js deleted file mode 100644 index 223855058..000000000 --- a/docs/lib/UI/Footer.js +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import { Container, Row, Col } from 'reactstrap'; - -export default () => { - return ( --
-- -- -{title}
- -- {children} - - -- ); -}; diff --git a/docs/lib/UI/Layout.js b/docs/lib/UI/Layout.js deleted file mode 100644 index 6650703f4..000000000 --- a/docs/lib/UI/Layout.js +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react'; -import Helmet from 'react-helmet'; -import Footer from './Footer'; -import Nav from './Nav'; - -export default (props) => { - return ( -- --
-- - - -
- --- ); -}; diff --git a/docs/lib/UI/Nav.js b/docs/lib/UI/Nav.js deleted file mode 100644 index 2759b47a0..000000000 --- a/docs/lib/UI/Nav.js +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import { Link } from 'react-router'; -import { NavbarToggler, Container, Collapse, Navbar, NavbarBrand, Nav, NavItem, NavLink } from 'reactstrap'; -import DocSearch from './DocSearch'; - -export default class UINav extends React.Component { - constructor(props) { - super(props); - - this.toggleNavbar = this.toggleNavbar.bind(this); - this.state = { - showNavbar: false - }; - } - toggleNavbar(e) { - e.preventDefault(); - this.setState({ - showNavbar: !this.state.showNavbar - }); - } - render() { - return ( -- - {props.children} - - - - ); - } -} diff --git a/docs/lib/UI/PageTitle.js b/docs/lib/UI/PageTitle.js deleted file mode 100644 index 87c8cc015..000000000 --- a/docs/lib/UI/PageTitle.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import Helmet from 'react-helmet'; - -function PageTitle({ tag: Tag, title, ...props }) { - return ( -- -reactstrap -- - - -- ); -} - -PageTitle.propTypes = { - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - title: PropTypes.string.isRequired, -}; - -PageTitle.defaultProps = { - tag: 'h2', - className: 'h3', -}; - -export default PageTitle; diff --git a/docs/lib/UI/SectionTitle.js b/docs/lib/UI/SectionTitle.js deleted file mode 100644 index e87de886b..000000000 --- a/docs/lib/UI/SectionTitle.js +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; - -function SectionTitle({ tag: Tag, children, ...props }) { - return {title} {children} ; -} - -SectionTitle.propTypes = { - tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]), - children: PropTypes.string.isRequired, -}; - -SectionTitle.defaultProps = { - tag: 'h3', -}; - -export default SectionTitle; diff --git a/docs/lib/UI/index.js b/docs/lib/UI/index.js deleted file mode 100644 index 0abd814e6..000000000 --- a/docs/lib/UI/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import Footer from './Footer'; -import Nav from './Nav'; -import Layout from './Layout'; - -export default { - Nav, - Layout, - Footer -}; diff --git a/docs/lib/Utilities/ClearfixPage.js b/docs/lib/Utilities/ClearfixPage.js deleted file mode 100644 index 81664b21a..000000000 --- a/docs/lib/Utilities/ClearfixPage.js +++ /dev/null @@ -1,32 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0, import/newline-after-import: 0 */ -import React from 'react'; -import { PrismCode } from 'react-prism'; -import PageTitle from '../UI/PageTitle'; - -import ClearfixExample from '../examples/Clearfix'; -const ClearfixExampleSource = require('!!raw!../examples/Clearfix'); - -export default function ClearfixPage() { - return ( --- ); -} diff --git a/docs/lib/Utilities/ColorsPage.js b/docs/lib/Utilities/ColorsPage.js deleted file mode 100644 index f20d955d7..000000000 --- a/docs/lib/Utilities/ColorsPage.js +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0, import/newline-after-import: 0 */ -import React from 'react'; -import { PrismCode } from 'react-prism'; -import PageTitle from '../UI/PageTitle'; - -import ColorExample from '../examples/Color'; -const ColorExampleSource = require('!!raw!../examples/Color'); - -export default function ColorsPage() { - return ( -- - Easily clear
float
s by adding -.clearfix
- to the parent element. - Utilizes - the micro clearfix as popularized by Nicolas Gallagher. - Can also be used as a mixin. -...- ---- --- {ClearfixExampleSource} - --- ); -} diff --git a/docs/lib/Utilities/index.js b/docs/lib/Utilities/index.js deleted file mode 100644 index 14946bc48..000000000 --- a/docs/lib/Utilities/index.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import Content from '../UI/Content'; - -const items = [ - { - name: 'Colors', - to: '/utilities/colors/' - }, - { - name: 'Clearfix', - to: '/utilities/clearfix/' - } -]; - -function Utilities(props) { - return ( -- - Convey meaning through color with a handful of emphasis utility - classes. These may also be applied to links and will darken on hover - just like our default link styles. -
---- --- {ColorExampleSource} - -- ); -} - -export default Utilities; diff --git a/docs/lib/app.js b/docs/lib/app.js deleted file mode 100644 index 7449345a9..000000000 --- a/docs/lib/app.js +++ /dev/null @@ -1,94 +0,0 @@ -import 'bootstrap-css'; -import React from 'react'; -import ReactDOM from 'react-dom'; -import ReactDOMServer from 'react-dom/server'; -import { Router, RouterContext, match, browserHistory, createMemoryHistory } from 'react-router'; -import Helmet from 'react-helmet'; -import routes from './routes'; - -// Client render (optional): -if (typeof document !== 'undefined') { - const outlet = document.getElementById('app'); - browserHistory.listen(function (location) { - window.ga('set', 'page', location.pathname); - window.ga('send', 'pageview'); - }); - - let Holder; - window.addEventListener('DOMContentLoaded', () => { - Holder = require('holderjs'); - }); - - ReactDOM.hydrate( - { - window.scrollTo(0, 0); - - if (Holder) { - Holder.run(); - } - }} - history={browserHistory} - routes={routes} - />, - outlet - ); -} - -// Exported static site renderer: -export default (locals, callback) => { - const history = createMemoryHistory(); - const location = history.createLocation(locals.path); - - match({ routes, location }, (error, redirectLocation, renderProps) => { - let url; - if (redirectLocation && redirectLocation.pathname) { - url = redirectLocation.pathname; - callback(null, ` - - - - - - `); - } - const body = ReactDOMServer.renderToString( ); - const head = Helmet.rewind(); - let markup = ` - - - - - - ${head.title.toString()} - ${head.meta.toString()} - - - - - - - ${body}- - - - - - - `; - callback(null, markup); - }); -}; diff --git a/docs/lib/examples/Alert.js b/docs/lib/examples/Alert.js deleted file mode 100644 index 150acd65e..000000000 --- a/docs/lib/examples/Alert.js +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import { Alert } from 'reactstrap'; - -const Example = (props) => { - return ( --- ); -}; - -export default Example; diff --git a/docs/lib/examples/AlertContent.js b/docs/lib/examples/AlertContent.js deleted file mode 100644 index 8b3256468..000000000 --- a/docs/lib/examples/AlertContent.js +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react'; -import { Alert } from 'reactstrap'; - -const Example = (props) => { - return ( -- This is a primary alert — check it out! - -- This is a secondary alert — check it out! - -- This is a success alert — check it out! - -- This is a danger alert — check it out! - -- This is a warning alert — check it out! - -- This is a info alert — check it out! - -- This is a light alert — check it out! - -- This is a dark alert — check it out! - --- ); -}; - -export default Example; diff --git a/docs/lib/examples/AlertDismiss.js b/docs/lib/examples/AlertDismiss.js deleted file mode 100644 index f9ffa3a5f..000000000 --- a/docs/lib/examples/AlertDismiss.js +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import { Alert } from 'reactstrap'; - -class AlertExample extends React.Component { - constructor(props) { - super(props); - - this.state = { - visible: true - }; - - this.onDismiss = this.onDismiss.bind(this); - } - - onDismiss() { - this.setState({ visible: false }); - } - - render() { - return ( -- -Well done!
-- Aww yeah, you successfully read this important alert message. This example text is going - to run a bit longer so that you can see how spacing within an alert works with this kind - of content. -
-
-- Whenever you need to, be sure to use margin utilities to keep things nice and tidy. -
-- I am an alert and I can be dismissed! - - ); - } -} - -export default AlertExample; diff --git a/docs/lib/examples/AlertFadeless.js b/docs/lib/examples/AlertFadeless.js deleted file mode 100644 index 2f62be19b..000000000 --- a/docs/lib/examples/AlertFadeless.js +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react'; -import { UncontrolledAlert } from 'reactstrap'; -import Alert from '../../../src/Alert'; - -export class AlertFadelessExample extends React.Component { - - constructor(props) { - super(props); - - this.state = { - visible: true - }; - - this.onDismiss = this.onDismiss.bind(this); - } - - onDismiss() { - this.setState({ visible: false }); - } - - render() { - return ( --- ); - } -} - -export function UncontrolledAlertFadelessExample() { - return ( -- I am a primary alert and I can be dismissed without animating! - --- ); -} diff --git a/docs/lib/examples/AlertLink.js b/docs/lib/examples/AlertLink.js deleted file mode 100644 index 6395bfe03..000000000 --- a/docs/lib/examples/AlertLink.js +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import { Alert } from 'reactstrap'; - -const Example = (props) => { - return ( -- I am an alert and I can be dismissed without animating! - --- ); -}; - -export default Example; diff --git a/docs/lib/examples/AlertUncontrolledDismiss.js b/docs/lib/examples/AlertUncontrolledDismiss.js deleted file mode 100644 index 1f596ba57..000000000 --- a/docs/lib/examples/AlertUncontrolledDismiss.js +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; -import { UncontrolledAlert } from 'reactstrap'; - -function AlertExample() { - return ( -- This is a primary alert with an example link. Give it a click if you like. - -- This is a secondary alert with an example link. Give it a click if you like. - -- This is a success alert with an example link. Give it a click if you like. - -- This is a danger alert with an example link. Give it a click if you like. - -- This is a warning alert with an example link. Give it a click if you like. - -- This is a info alert with an example link. Give it a click if you like. - -- This is a light alert with an example link. Give it a click if you like. - -- This is a dark alert with an example link. Give it a click if you like. - -- I am an alert and I can be dismissed! - - ); -} - -export default AlertExample; diff --git a/docs/lib/examples/Badge.js b/docs/lib/examples/Badge.js deleted file mode 100644 index 42291144f..000000000 --- a/docs/lib/examples/Badge.js +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import { Badge } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( --- ); - } -} diff --git a/docs/lib/examples/BadgeButton.js b/docs/lib/examples/BadgeButton.js deleted file mode 100644 index acb221765..000000000 --- a/docs/lib/examples/BadgeButton.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { Badge, Button } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -Heading
-New Heading
-New Heading
-New Heading
-New Heading
-New Heading
-New - -- ); - } -} diff --git a/docs/lib/examples/BadgeLinks.js b/docs/lib/examples/BadgeLinks.js deleted file mode 100644 index 0c2f85af3..000000000 --- a/docs/lib/examples/BadgeLinks.js +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import { Badge } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( --- ); - } -} diff --git a/docs/lib/examples/BadgePills.js b/docs/lib/examples/BadgePills.js deleted file mode 100644 index ed559cddd..000000000 --- a/docs/lib/examples/BadgePills.js +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import { Badge } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -Primary -Secondary -Success -Danger -Warning -Info -Light -Dark --- ); - } -} diff --git a/docs/lib/examples/BadgeVariations.js b/docs/lib/examples/BadgeVariations.js deleted file mode 100644 index 313a06be2..000000000 --- a/docs/lib/examples/BadgeVariations.js +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import { Badge } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -Primary -Secondary -Success -Danger -Warning -Info -Light -Dark --- ); - } -} diff --git a/docs/lib/examples/Breadcrumb.js b/docs/lib/examples/Breadcrumb.js deleted file mode 100644 index e8333ead7..000000000 --- a/docs/lib/examples/Breadcrumb.js +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react'; -import { Breadcrumb, BreadcrumbItem } from 'reactstrap'; - -const Example = (props) => { - return ( - - ); -}; - -export default Example; diff --git a/docs/lib/examples/BreadcrumbNoList.js b/docs/lib/examples/BreadcrumbNoList.js deleted file mode 100644 index d0851fff1..000000000 --- a/docs/lib/examples/BreadcrumbNoList.js +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import { Breadcrumb, BreadcrumbItem } from 'reactstrap'; - -const Example = (props) => { - return ( -Primary -Secondary -Success -Danger -Warning -Info -Light -Dark --- ); -}; - -export default Example; diff --git a/docs/lib/examples/Button.js b/docs/lib/examples/Button.js deleted file mode 100644 index 178012d9e..000000000 --- a/docs/lib/examples/Button.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { Button } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- -Home -Library -Data -Bootstrap -- {' '} - {' '} - {' '} - {' '} - {' '} - {' '} - -- ); - } -} diff --git a/docs/lib/examples/ButtonDropdown.js b/docs/lib/examples/ButtonDropdown.js deleted file mode 100644 index 86da15bdd..000000000 --- a/docs/lib/examples/ButtonDropdown.js +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react'; -import { ButtonDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - dropdownOpen: false - }; - } - - toggle() { - this.setState({ - dropdownOpen: !this.state.dropdownOpen - }); - } - - render() { - return ( -- - ); - } -} diff --git a/docs/lib/examples/ButtonDropdownMulti.js b/docs/lib/examples/ButtonDropdownMulti.js deleted file mode 100644 index f2b23aa1b..000000000 --- a/docs/lib/examples/ButtonDropdownMulti.js +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react'; -import { ButtonDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - dropdownOpen: false - }; - } - - toggle() { - this.setState({ - dropdownOpen: !this.state.dropdownOpen - }); - } - - render() { - return ( -- Button Dropdown - -- -Header -Action -Another Action -- Another Action -- - ); - } -} diff --git a/docs/lib/examples/ButtonDropdownMultiSplit.js b/docs/lib/examples/ButtonDropdownMultiSplit.js deleted file mode 100644 index 2c4ac95d7..000000000 --- a/docs/lib/examples/ButtonDropdownMultiSplit.js +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import { Button, ButtonDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - dropdownOpen: false - }; - } - - toggle() { - this.setState({ - dropdownOpen: !this.state.dropdownOpen - }); - } - - render() { - return ( -- {this.props.text} - -- -Header -Action -Another Action -- Another Action -- - - ); - } -} diff --git a/docs/lib/examples/ButtonGroup.js b/docs/lib/examples/ButtonGroup.js deleted file mode 100644 index a399d7425..000000000 --- a/docs/lib/examples/ButtonGroup.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { Button, ButtonGroup } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- - -Header -Action -Another Action -- Another Action -- - - - - ); - } -} diff --git a/docs/lib/examples/ButtonOutline.js b/docs/lib/examples/ButtonOutline.js deleted file mode 100644 index 84ce3de3e..000000000 --- a/docs/lib/examples/ButtonOutline.js +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import { Button } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- {' '} - {' '} - {' '} - {' '} - {' '} - -- ); - } -} diff --git a/docs/lib/examples/ButtonStateful.js b/docs/lib/examples/ButtonStateful.js deleted file mode 100644 index 088226710..000000000 --- a/docs/lib/examples/ButtonStateful.js +++ /dev/null @@ -1,51 +0,0 @@ -import React, { Component } from 'react'; -import { Button, ButtonGroup } from 'reactstrap'; - -class Example extends Component { - constructor (props) { - super(props); - - this.state = { cSelected: [] }; - - this.onRadioBtnClick = this.onRadioBtnClick.bind(this); - this.onCheckboxBtnClick = this.onCheckboxBtnClick.bind(this); - } - - onRadioBtnClick(rSelected) { - this.setState({ rSelected }); - } - - onCheckboxBtnClick(selected) { - const index = this.state.cSelected.indexOf(selected); - if (index < 0) { - this.state.cSelected.push(selected); - } else { - this.state.cSelected.splice(index, 1); - } - this.setState({ cSelected: [...this.state.cSelected] }); - } - - render() { - return ( --- ); - } -} - -export default Example; \ No newline at end of file diff --git a/docs/lib/examples/ButtonToolbar.js b/docs/lib/examples/ButtonToolbar.js deleted file mode 100644 index 30c5c9172..000000000 --- a/docs/lib/examples/ButtonToolbar.js +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import { Button, ButtonGroup, ButtonToolbar } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -Radio Buttons
-- - - - -Selected: {this.state.rSelected}
- -Checkbox Buttons
-- - - - -Selected: {JSON.stringify(this.state.cSelected)}
-- - ); - } -} diff --git a/docs/lib/examples/Card.js b/docs/lib/examples/Card.js deleted file mode 100644 index c53a9b3a3..000000000 --- a/docs/lib/examples/Card.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import { Card, CardImg, CardText, CardBody, - CardTitle, CardSubtitle, Button } from 'reactstrap'; - -const Example = (props) => { - return ( -- - - - - -- - - - -- - --- ); -}; - -export default Example; diff --git a/docs/lib/examples/CardAlignment.js b/docs/lib/examples/CardAlignment.js deleted file mode 100644 index 5c219f665..000000000 --- a/docs/lib/examples/CardAlignment.js +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import { Card, Button, CardTitle, CardText } from 'reactstrap'; - -const Example = (props) => { - return ( -- -- - -Card title -Card subtitle -Some quick example text to build on the card title and make up the bulk of the card's content. - --- ); -}; - -export default Example; diff --git a/docs/lib/examples/CardBackgrounds.js b/docs/lib/examples/CardBackgrounds.js deleted file mode 100644 index 5a04bd582..000000000 --- a/docs/lib/examples/CardBackgrounds.js +++ /dev/null @@ -1,41 +0,0 @@ -import React from 'react'; -import { Card, Button, CardTitle, CardText } from 'reactstrap'; - -const Example = (props) => { - return ( -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - --- ); -}; - -export default Example; diff --git a/docs/lib/examples/CardColumns.js b/docs/lib/examples/CardColumns.js deleted file mode 100644 index dc6287556..000000000 --- a/docs/lib/examples/CardColumns.js +++ /dev/null @@ -1,51 +0,0 @@ -import React from 'react'; -import { Card, Button, CardImg, CardTitle, CardText, CardColumns, - CardSubtitle, CardBody } from 'reactstrap'; - -const Example = (props) => { - return ( -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- - ); -}; - -export default Example; diff --git a/docs/lib/examples/CardContentTypes.js b/docs/lib/examples/CardContentTypes.js deleted file mode 100644 index 926f47ac5..000000000 --- a/docs/lib/examples/CardContentTypes.js +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import { Card, CardImg, CardText, CardBody, CardLink, - CardTitle, CardSubtitle } from 'reactstrap'; - -const Example = (props) => { - return ( -- -- - -Card title -Card subtitle -This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. - -- -- - -- -Card title -Card subtitle -This card has supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -- - -Card title -Card subtitle -This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - --- ); -}; - -export default Example; diff --git a/docs/lib/examples/CardDecks.js b/docs/lib/examples/CardDecks.js deleted file mode 100644 index c40761ee8..000000000 --- a/docs/lib/examples/CardDecks.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Card, Button, CardImg, CardTitle, CardText, CardDeck, - CardSubtitle, CardBody } from 'reactstrap'; - -const Example = (props) => { - return ( -- -- -Card title -Card subtitle --
- -Some quick example text to build on the card title and make up the bulk of the card's content. -Card Link -Another Link -- - ); -}; - -export default Example; diff --git a/docs/lib/examples/CardGroups.js b/docs/lib/examples/CardGroups.js deleted file mode 100644 index aecbcc212..000000000 --- a/docs/lib/examples/CardGroups.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Card, Button, CardImg, CardTitle, CardText, CardGroup, - CardSubtitle, CardBody } from 'reactstrap'; - -const Example = (props) => { - return ( -- -- - -Card title -Card subtitle -This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. - -- -- - -Card title -Card subtitle -This card has supporting text below as a natural lead-in to additional content. - -- -- - -Card title -Card subtitle -This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action. - -- - ); -}; - -export default Example; diff --git a/docs/lib/examples/CardHeaderFooter.js b/docs/lib/examples/CardHeaderFooter.js deleted file mode 100644 index bac1ee866..000000000 --- a/docs/lib/examples/CardHeaderFooter.js +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import { Card, Button, CardHeader, CardFooter, CardBody, - CardTitle, CardText } from 'reactstrap'; - -const Example = (props) => { - return ( -- -- - -Card title -Card subtitle -This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. - -- -- - -Card title -Card subtitle -This card has supporting text below as a natural lead-in to additional content. - -- -- - -Card title -Card subtitle -This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action. - --- ); -}; - -export default Example; diff --git a/docs/lib/examples/CardImageCaps.js b/docs/lib/examples/CardImageCaps.js deleted file mode 100644 index d3b29c46c..000000000 --- a/docs/lib/examples/CardImageCaps.js +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import { Card, CardBody, Button, CardTitle, CardText, CardImg } from 'reactstrap'; - -const Example = (props) => { - return ( -- - -Header -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -Footer -- -Featured -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -Footer --- ); -}; - -export default Example; diff --git a/docs/lib/examples/CardImageOverlay.js b/docs/lib/examples/CardImageOverlay.js deleted file mode 100644 index 90093f3a8..000000000 --- a/docs/lib/examples/CardImageOverlay.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import { Card, CardTitle, CardText, CardImg, CardImgOverlay } from 'reactstrap'; - -const Example = (props) => { - return ( -- -- - -Card Title -This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. -- Last updated 3 mins ago - -- -- -Card Title -This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. -- Last updated 3 mins ago - -- -- ); -}; - -export default Example; diff --git a/docs/lib/examples/CardOutline.js b/docs/lib/examples/CardOutline.js deleted file mode 100644 index fd49a27b4..000000000 --- a/docs/lib/examples/CardOutline.js +++ /dev/null @@ -1,41 +0,0 @@ -import React from 'react'; -import { Card, Button, CardTitle, CardText } from 'reactstrap'; - -const Example = (props) => { - return ( -- -- - -Card Title -This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer. -- Last updated 3 mins ago - --- ); -}; - -export default Example; diff --git a/docs/lib/examples/CardSizing.js b/docs/lib/examples/CardSizing.js deleted file mode 100644 index 990b316e0..000000000 --- a/docs/lib/examples/CardSizing.js +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import { Card, Button, CardTitle, CardText, Row, Col } from 'reactstrap'; - -const Example = (props) => { - return ( -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - --
- ); -}; - -export default Example; diff --git a/docs/lib/examples/Carousel.js b/docs/lib/examples/Carousel.js deleted file mode 100644 index a09e3306a..000000000 --- a/docs/lib/examples/Carousel.js +++ /dev/null @@ -1,96 +0,0 @@ -import React, { Component } from 'react'; -import { - Carousel, - CarouselItem, - CarouselControl, - CarouselIndicators, - CarouselCaption -} from 'reactstrap'; - -const items = [ - { - src: 'data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22800%22%20height%3D%22400%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20400%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_15ba800aa1d%20text%20%7B%20fill%3A%23555%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A40pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_15ba800aa1d%22%3E%3Crect%20width%3D%22800%22%20height%3D%22400%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22285.921875%22%20y%3D%22218.3%22%3EFirst%20slide%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E', - altText: 'Slide 1', - caption: 'Slide 1' - }, - { - src: 'data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22800%22%20height%3D%22400%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20400%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_15ba800aa20%20text%20%7B%20fill%3A%23444%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A40pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_15ba800aa20%22%3E%3Crect%20width%3D%22800%22%20height%3D%22400%22%20fill%3D%22%23666%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22247.3203125%22%20y%3D%22218.3%22%3ESecond%20slide%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E', - altText: 'Slide 2', - caption: 'Slide 2' - }, - { - src: 'data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22800%22%20height%3D%22400%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20400%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_15ba800aa21%20text%20%7B%20fill%3A%23333%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A40pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_15ba800aa21%22%3E%3Crect%20width%3D%22800%22%20height%3D%22400%22%20fill%3D%22%23555%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22277%22%20y%3D%22218.3%22%3EThird%20slide%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E', - altText: 'Slide 3', - caption: 'Slide 3' - } -]; - -class Example extends Component { - constructor(props) { - super(props); - this.state = { activeIndex: 0 }; - this.next = this.next.bind(this); - this.previous = this.previous.bind(this); - this.goToIndex = this.goToIndex.bind(this); - this.onExiting = this.onExiting.bind(this); - this.onExited = this.onExited.bind(this); - } - - onExiting() { - this.animating = true; - } - - onExited() { - this.animating = false; - } - - next() { - if (this.animating) return; - const nextIndex = this.state.activeIndex === items.length - 1 ? 0 : this.state.activeIndex + 1; - this.setState({ activeIndex: nextIndex }); - } - - previous() { - if (this.animating) return; - const nextIndex = this.state.activeIndex === 0 ? items.length - 1 : this.state.activeIndex - 1; - this.setState({ activeIndex: nextIndex }); - } - - goToIndex(newIndex) { - if (this.animating) return; - this.setState({ activeIndex: newIndex }); - } - - render() { - const { activeIndex } = this.state; - - const slides = items.map((item) => { - return ( -- - - -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- - - -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- - ); - }); - - return ( --
- - - ); - } -} - - -export default Example; diff --git a/docs/lib/examples/CarouselCustomTag.js b/docs/lib/examples/CarouselCustomTag.js deleted file mode 100644 index 491f39350..000000000 --- a/docs/lib/examples/CarouselCustomTag.js +++ /dev/null @@ -1,107 +0,0 @@ -import React, { Component } from 'react'; -import { - Carousel, - CarouselItem, - CarouselControl, - CarouselIndicators, - CarouselCaption -} from 'reactstrap'; - -const items = [ - { - id: 1, - altText: 'Slide 1', - caption: 'Slide 1' - }, - { - id: 2, - altText: 'Slide 2', - caption: 'Slide 2' - }, - { - id: 3, - altText: 'Slide 3', - caption: 'Slide 3' - } -]; - -class Example extends Component { - constructor(props) { - super(props); - this.state = { activeIndex: 0 }; - this.next = this.next.bind(this); - this.previous = this.previous.bind(this); - this.goToIndex = this.goToIndex.bind(this); - this.onExiting = this.onExiting.bind(this); - this.onExited = this.onExited.bind(this); - } - - onExiting() { - this.animating = true; - } - - onExited() { - this.animating = false; - } - - next() { - if (this.animating) return; - const nextIndex = this.state.activeIndex === items.length - 1 ? 0 : this.state.activeIndex + 1; - this.setState({ activeIndex: nextIndex }); - } - - previous() { - if (this.animating) return; - const nextIndex = this.state.activeIndex === 0 ? items.length - 1 : this.state.activeIndex - 1; - this.setState({ activeIndex: nextIndex }); - } - - goToIndex(newIndex) { - if (this.animating) return; - this.setState({ activeIndex: newIndex }); - } - - render() { - const { activeIndex } = this.state; - - const slides = items.map((item) => { - return ( -- {slides} - - - - - ); - }); - - return ( -- - -- ); - } -} - -export default Example; diff --git a/docs/lib/examples/CarouselUncontrolled.js b/docs/lib/examples/CarouselUncontrolled.js deleted file mode 100644 index daa757bad..000000000 --- a/docs/lib/examples/CarouselUncontrolled.js +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import { UncontrolledCarousel } from 'reactstrap'; - -const items = [ - { - src: 'data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22800%22%20height%3D%22400%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20400%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_15ba800aa1d%20text%20%7B%20fill%3A%23555%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A40pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_15ba800aa1d%22%3E%3Crect%20width%3D%22800%22%20height%3D%22400%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22285.921875%22%20y%3D%22218.3%22%3EFirst%20slide%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E', - altText: 'Slide 1', - caption: 'Slide 1', - header: 'Slide 1 Header' - }, - { - src: 'data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22800%22%20height%3D%22400%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20400%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_15ba800aa20%20text%20%7B%20fill%3A%23444%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A40pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_15ba800aa20%22%3E%3Crect%20width%3D%22800%22%20height%3D%22400%22%20fill%3D%22%23666%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22247.3203125%22%20y%3D%22218.3%22%3ESecond%20slide%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E', - altText: 'Slide 2', - caption: 'Slide 2', - header: 'Slide 2 Header' - }, - { - src: 'data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22800%22%20height%3D%22400%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20400%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_15ba800aa21%20text%20%7B%20fill%3A%23333%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A40pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_15ba800aa21%22%3E%3Crect%20width%3D%22800%22%20height%3D%22400%22%20fill%3D%22%23555%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22277%22%20y%3D%22218.3%22%3EThird%20slide%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E', - altText: 'Slide 3', - caption: 'Slide 3', - header: 'Slide 3 Header' - } -]; - -const Example = () =>- -- {slides} - - - ; - -export default Example; diff --git a/docs/lib/examples/Clearfix.js b/docs/lib/examples/Clearfix.js deleted file mode 100644 index 26c36c658..000000000 --- a/docs/lib/examples/Clearfix.js +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; - -const Example = () => { - return ( - - - -- ); -}; - -export default Example; diff --git a/docs/lib/examples/Collapse.js b/docs/lib/examples/Collapse.js deleted file mode 100644 index cff2b340a..000000000 --- a/docs/lib/examples/Collapse.js +++ /dev/null @@ -1,34 +0,0 @@ -import React, { Component } from 'react'; -import { Collapse, Button, CardBody, Card } from 'reactstrap'; - -class Example extends Component { - constructor(props) { - super(props); - this.toggle = this.toggle.bind(this); - this.state = { collapse: false }; - } - - toggle() { - this.setState({ collapse: !this.state.collapse }); - } - - render() { - return ( -- -- ); - } -} - -export default Example; diff --git a/docs/lib/examples/CollapseEvents.js b/docs/lib/examples/CollapseEvents.js deleted file mode 100644 index 2c2c03cf5..000000000 --- a/docs/lib/examples/CollapseEvents.js +++ /dev/null @@ -1,61 +0,0 @@ -import React, { Component } from 'react'; -import { Collapse, Button, CardBody, Card } from 'reactstrap'; - -class Example extends Component { - constructor(props) { - super(props); - this.onEntering = this.onEntering.bind(this); - this.onEntered = this.onEntered.bind(this); - this.onExiting = this.onExiting.bind(this); - this.onExited = this.onExited.bind(this); - this.toggle = this.toggle.bind(this); - this.state = { collapse: false, status: 'Closed' }; - } - - onEntering() { - this.setState({ status: 'Opening...' }); - } - - onEntered() { - this.setState({ status: 'Opened' }); - } - - onExiting() { - this.setState({ status: 'Closing...' }); - } - - onExited() { - this.setState({ status: 'Closed' }); - } - - toggle() { - this.setState({ collapse: !this.state.collapse }); - } - - render() { - return ( -- -- -- Anim pariatur cliche reprehenderit, - enim eiusmod high life accusamus terry richardson ad squid. Nihil - anim keffiyeh helvetica, craft beer labore wes anderson cred - nesciunt sapiente ea proident. - -- -- ); - } -} - -export default Example; diff --git a/docs/lib/examples/CollapseUncontrolled.js b/docs/lib/examples/CollapseUncontrolled.js deleted file mode 100644 index cfc34fe07..000000000 --- a/docs/lib/examples/CollapseUncontrolled.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import { UncontrolledCollapse, Button, CardBody, Card } from 'reactstrap'; - -const Example = () => ( -Current state: {this.state.status}
-- -- -- Anim pariatur cliche reprehenderit, - enim eiusmod high life accusamus terry richardson ad squid. Nihil - anim keffiyeh helvetica, craft beer labore wes anderson cred - nesciunt sapiente ea proident. - -- --); - -export default Example; diff --git a/docs/lib/examples/Color.js b/docs/lib/examples/Color.js deleted file mode 100644 index 2d29436e6..000000000 --- a/docs/lib/examples/Color.js +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; - -const Example = () => { - return ( -- -- -- Lorem ipsum dolor sit amet consectetur adipisicing elit. Nesciunt magni, voluptas debitis - similique porro a molestias consequuntur earum odio officiis natus, amet hic, iste sed - dignissimos esse fuga! Minus, alias. - --- ); -}; - -export default Example; diff --git a/docs/lib/examples/CustomControls.js b/docs/lib/examples/CustomControls.js deleted file mode 100644 index 0fd6ac26b..000000000 --- a/docs/lib/examples/CustomControls.js +++ /dev/null @@ -1,90 +0,0 @@ -import React from 'react'; -import { CustomInput, Form, FormGroup, Label } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( - - ); - } -} diff --git a/docs/lib/examples/CustomDropdown.js b/docs/lib/examples/CustomDropdown.js deleted file mode 100644 index 91796e150..000000000 --- a/docs/lib/examples/CustomDropdown.js +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react'; -import { Dropdown, DropdownMenu, DropdownToggle } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - dropdownOpen: false - }; - } - - toggle() { - this.setState({ - dropdownOpen: !this.state.dropdownOpen - }); - } - - render() { - return ( -Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.
-Nullam id dolor id nibh ultricies vehicula ut id elit.
-Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
-Maecenas sed diam eget risus varius blandit sit amet non magna.
-Etiam porta sem malesuada magna mollis euismod.
-Donec ullamcorper nulla non metus auctor fringilla.
-Etiam porta sem malesuada ultricies vehicula.
-- - ); - } -} diff --git a/docs/lib/examples/Dropdown.js b/docs/lib/examples/Dropdown.js deleted file mode 100644 index f5521e878..000000000 --- a/docs/lib/examples/Dropdown.js +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react'; -import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - dropdownOpen: false - }; - } - - toggle() { - this.setState(prevState => ({ - dropdownOpen: !prevState.dropdownOpen - })); - } - - render() { - return ( -- Custom Dropdown Content - -- -Custom dropdown item-Custom dropdown item-Custom dropdown item-Custom dropdown item-- - ); - } -} diff --git a/docs/lib/examples/DropdownSetActiveFromChild.js b/docs/lib/examples/DropdownSetActiveFromChild.js deleted file mode 100644 index 088a078e6..000000000 --- a/docs/lib/examples/DropdownSetActiveFromChild.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import { Navbar, Nav, NavItem, NavLink, UncontrolledDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap'; - -export default function Example () { - return ( -- Dropdown - -- -Header -Action -Another Action -- Another Action -- - - ); -} diff --git a/docs/lib/examples/DropdownSizing.js b/docs/lib/examples/DropdownSizing.js deleted file mode 100644 index 23adf3d65..000000000 --- a/docs/lib/examples/DropdownSizing.js +++ /dev/null @@ -1,33 +0,0 @@ -import React from 'react'; -import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - dropdownOpen: false - }; - } - - toggle() { - this.setState({ - dropdownOpen: !this.state.dropdownOpen - }); - } - - render() { - return ( -- - ); - } -} diff --git a/docs/lib/examples/Fade.js b/docs/lib/examples/Fade.js deleted file mode 100644 index 162de7828..000000000 --- a/docs/lib/examples/Fade.js +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import { Button, Fade } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - this.state = { fadeIn: true }; - this.toggle = this.toggle.bind(this); - } - - render() { - return ( -- Dropdown - -- -Header -Action -- -- ); - } - - toggle() { - this.setState({ - fadeIn: !this.state.fadeIn - }); - } -}; diff --git a/docs/lib/examples/Form.js b/docs/lib/examples/Form.js deleted file mode 100644 index 4fae646f4..000000000 --- a/docs/lib/examples/Form.js +++ /dev/null @@ -1,79 +0,0 @@ -import React from 'react'; -import { Button, Form, FormGroup, Label, Input, FormText } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( - - ); - } -} diff --git a/docs/lib/examples/FormFeedback.js b/docs/lib/examples/FormFeedback.js deleted file mode 100644 index 9d5b3f37e..000000000 --- a/docs/lib/examples/FormFeedback.js +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import { Form, FormGroup, Label, Input, FormFeedback, FormText } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( - - ); - } -} diff --git a/docs/lib/examples/FormGrid.js b/docs/lib/examples/FormGrid.js deleted file mode 100644 index 63739fdf0..000000000 --- a/docs/lib/examples/FormGrid.js +++ /dev/null @@ -1,90 +0,0 @@ -import React from 'react'; -import { Col, Button, Form, FormGroup, Label, Input, FormText } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( - - ); - } -} diff --git a/docs/lib/examples/FormInline.js b/docs/lib/examples/FormInline.js deleted file mode 100644 index f89f560e0..000000000 --- a/docs/lib/examples/FormInline.js +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import { Button, Form, FormGroup, Label, Input } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( - - ); - } -} diff --git a/docs/lib/examples/InlineCheckboxes.js b/docs/lib/examples/InlineCheckboxes.js deleted file mode 100644 index 719f64d97..000000000 --- a/docs/lib/examples/InlineCheckboxes.js +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import { Form, FormGroup, Label, Input } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( - - ); - } -} diff --git a/docs/lib/examples/InputGridSizing.js b/docs/lib/examples/InputGridSizing.js deleted file mode 100644 index 59044228c..000000000 --- a/docs/lib/examples/InputGridSizing.js +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react'; -import { Col, Form, FormGroup, Label, Input } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( - - ); - } -} diff --git a/docs/lib/examples/InputGroupAddon.js b/docs/lib/examples/InputGroupAddon.js deleted file mode 100644 index 9199934b5..000000000 --- a/docs/lib/examples/InputGroupAddon.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react'; -import { InputGroup, InputGroupText, InputGroupAddon, Input } from 'reactstrap'; - -const Example = (props) => { - return ( -- This content will fade in and out as the button is pressed - --- ); -}; - -export default Example; diff --git a/docs/lib/examples/InputGroupButton.js b/docs/lib/examples/InputGroupButton.js deleted file mode 100644 index ef3eeb6d7..000000000 --- a/docs/lib/examples/InputGroupButton.js +++ /dev/null @@ -1,82 +0,0 @@ -import React from 'react'; -import { - InputGroup, - InputGroupAddon, - InputGroupButtonDropdown, - InputGroupDropdown, - Input, - Button, - Dropdown, - DropdownToggle, - DropdownMenu, - DropdownItem - } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggleDropDown = this.toggleDropDown.bind(this); - this.toggleSplit = this.toggleSplit.bind(this); - this.state = { - dropdownOpen: false, - splitButtonOpen: false - }; - } - - toggleDropDown() { - this.setState({ - dropdownOpen: !this.state.dropdownOpen - }); - } - - toggleSplit() { - this.setState({ - splitButtonOpen: !this.state.splitButtonOpen - }); - } - - - render() { - return ( -- -- - -To the Left! -
-- - -- -To the Right! -
-- -- - -To the Left! -- -To the Right! --- ); - } -} diff --git a/docs/lib/examples/InputGroupButtonDropdown.js b/docs/lib/examples/InputGroupButtonDropdown.js deleted file mode 100644 index 87f0a31d9..000000000 --- a/docs/lib/examples/InputGroupButtonDropdown.js +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { InputGroupButtonDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap'; - -const propTypes = { - addonType: PropTypes.oneOf(['prepend', 'append']).isRequired, -}; - -class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - dropdownOpen: false - }; - } - - toggle() { - this.setState({ - dropdownOpen: !this.state.dropdownOpen - }); - } - - render() { - const { addonType } = this.props; - - return ( -- -- -
-- - -- -- Button Dropdown - -- -Header -Action -Another Action -- Another Action -
-- -- - - -- - -Header -Action -Another Action -- Another Action -- - - ); - } -} - -Example.propTypes = propTypes; - -export default Example; diff --git a/docs/lib/examples/InputGroupButtonShorthand.js b/docs/lib/examples/InputGroupButtonShorthand.js deleted file mode 100644 index 2d935da09..000000000 --- a/docs/lib/examples/InputGroupButtonShorthand.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react'; -import { InputGroup, InputGroupAddon, Button, Input } from 'reactstrap'; - -const Example = (props) => { - return ( -- Button Dropdown - -- -Header -Action -Another Action -- Another Action --- ); -}; - -export default Example; diff --git a/docs/lib/examples/InputGroupOverview.js b/docs/lib/examples/InputGroupOverview.js deleted file mode 100644 index 45c08cfcd..000000000 --- a/docs/lib/examples/InputGroupOverview.js +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import { InputGroup, InputGroupAddon, InputGroupText, Input } from 'reactstrap'; - -const Example = (props) => { - return ( -- -- - - -
-- - -- - -
-- -- - - -- - --- ); -}; - -export default Example; diff --git a/docs/lib/examples/InputGroupSizing.js b/docs/lib/examples/InputGroupSizing.js deleted file mode 100644 index 1f7522119..000000000 --- a/docs/lib/examples/InputGroupSizing.js +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import { InputGroup, InputGroupAddon, Input } from 'reactstrap'; - -const Example = (props) => { - return ( -- -@ - -
-- -- - -- - -
-- - -@example.com -
-- -- - -$ -$ -- -$ -$ -
-- -$ - -.00 --- ); -}; - -export default Example; diff --git a/docs/lib/examples/InputSizing.js b/docs/lib/examples/InputSizing.js deleted file mode 100644 index 4cb0d74d8..000000000 --- a/docs/lib/examples/InputSizing.js +++ /dev/null @@ -1,23 +0,0 @@ -import React from 'react'; -import { Form, Input } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( - - ); - } -} diff --git a/docs/lib/examples/InputType.js b/docs/lib/examples/InputType.js deleted file mode 100644 index 6bdbe219f..000000000 --- a/docs/lib/examples/InputType.js +++ /dev/null @@ -1,95 +0,0 @@ -import React from 'react'; -import { Button, Form, FormGroup, Label, Input, FormText } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( - - ); - } -} diff --git a/docs/lib/examples/Jumbotron.js b/docs/lib/examples/Jumbotron.js deleted file mode 100644 index ad6e8750e..000000000 --- a/docs/lib/examples/Jumbotron.js +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import { Jumbotron, Button } from 'reactstrap'; - -const Example = (props) => { - return ( -- -@lg - -
-- -@normal - -
-- -@sm - --- ); -}; - -export default Example; diff --git a/docs/lib/examples/JumbotronFluid.js b/docs/lib/examples/JumbotronFluid.js deleted file mode 100644 index d5c8ed25c..000000000 --- a/docs/lib/examples/JumbotronFluid.js +++ /dev/null @@ -1,17 +0,0 @@ -import React from 'react'; -import { Jumbotron, Container } from 'reactstrap'; - -const Example = (props) => { - return ( -- -Hello, world!
-This is a simple hero unit, a simple Jumbotron-style component for calling extra attention to featured content or information.
-
-It uses utility classes for typography and spacing to space content out within the larger container.
-- -
--- ); -}; - -export default Example; diff --git a/docs/lib/examples/LabelHidden.js b/docs/lib/examples/LabelHidden.js deleted file mode 100644 index 193a12d1c..000000000 --- a/docs/lib/examples/LabelHidden.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import { Button, Form, FormGroup, Label, Input } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( - - ); - } -} diff --git a/docs/lib/examples/Layout.js b/docs/lib/examples/Layout.js deleted file mode 100644 index 2afc39e36..000000000 --- a/docs/lib/examples/Layout.js +++ /dev/null @@ -1,44 +0,0 @@ -import React from 'react'; -import { Container, Row, Col } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- -- -Fluid jumbotron
-This is a modified jumbotron that occupies the entire horizontal space of its parent.
-- - ); - } -} diff --git a/docs/lib/examples/ListGroup.js b/docs/lib/examples/ListGroup.js deleted file mode 100644 index 0777f5b47..000000000 --- a/docs/lib/examples/ListGroup.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import { ListGroup, ListGroupItem } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( --
-.col - -
-.col - .col - .col - .col - -
-.col-3 - .col-auto - variable width content - .col-3 - -
-.col-6 - .col-6 - -
-.col-6 .col-sm-4 - .col-6 .col-sm-4 - .col-sm-4 - -
-.col-sm-6 .col-sm-order-2 .col-sm-offset-2 - -
-.col-sm-12 .col-md-6 .col-md-offset-3 - -
-.col-sm .col-sm-offset-1 - .col-sm .col-sm-offset-1 - - - ); - } -} diff --git a/docs/lib/examples/ListGroupAnchorsAndButtons.js b/docs/lib/examples/ListGroupAnchorsAndButtons.js deleted file mode 100644 index 6c7cb3cc6..000000000 --- a/docs/lib/examples/ListGroupAnchorsAndButtons.js +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import { ListGroup, ListGroupItem } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -Cras justo odio -Dapibus ac facilisis in -Morbi leo risus -Porta ac consectetur ac -Vestibulum at eros --- ); - } -} diff --git a/docs/lib/examples/ListGroupBadge.js b/docs/lib/examples/ListGroupBadge.js deleted file mode 100644 index 64b6bc999..000000000 --- a/docs/lib/examples/ListGroupBadge.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { ListGroup, ListGroupItem, Badge } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -Anchors
-Be sure to not use the standard
-.btn
classes here.- - -Cras justo odio -Dapibus ac facilisis in -Morbi leo risus -Porta ac consectetur ac -Vestibulum at eros -Buttons
-- -Cras justo odio -Dapibus ac facilisis in -Morbi leo risus -Porta ac consectetur ac -Vestibulum at eros -- - ); - } -} diff --git a/docs/lib/examples/ListGroupContextualClasses.js b/docs/lib/examples/ListGroupContextualClasses.js deleted file mode 100644 index 33d1847f2..000000000 --- a/docs/lib/examples/ListGroupContextualClasses.js +++ /dev/null @@ -1,15 +0,0 @@ -import React from 'react'; -import { ListGroup, ListGroupItem } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -Cras justo odio -14 Dapibus ac facilisis in -2 Morbi leo risus -1 - - ); - } -} diff --git a/docs/lib/examples/ListGroupCustomContent.js b/docs/lib/examples/ListGroupCustomContent.js deleted file mode 100644 index 6986ac8bf..000000000 --- a/docs/lib/examples/ListGroupCustomContent.js +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import { ListGroup, ListGroupItem, ListGroupItemHeading, ListGroupItemText } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -Cras justo odio -Dapibus ac facilisis in -Morbi leo risus -Porta ac consectetur ac -- - ); - } -} diff --git a/docs/lib/examples/ListGroupDisabledItems.js b/docs/lib/examples/ListGroupDisabledItems.js deleted file mode 100644 index 5fdd2ba70..000000000 --- a/docs/lib/examples/ListGroupDisabledItems.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import { ListGroup, ListGroupItem } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- -List group item heading -- Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit. - -- -List group item heading -- Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit. - -- -List group item heading -- Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit. - -- - ); - } -} diff --git a/docs/lib/examples/ListGroupFlush.js b/docs/lib/examples/ListGroupFlush.js deleted file mode 100644 index fdb397623..000000000 --- a/docs/lib/examples/ListGroupFlush.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import { ListGroup, ListGroupItem } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -Cras justo odio -Dapibus ac facilisis in -Morbi leo risus -Porta ac consectetur ac -Vestibulum at eros -- - ); - } -} diff --git a/docs/lib/examples/Media.js b/docs/lib/examples/Media.js deleted file mode 100644 index 54bcc046f..000000000 --- a/docs/lib/examples/Media.js +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import { Media } from 'reactstrap'; - -const Example = () => { - return ( -Cras justo odio -Dapibus ac facilisis in -Morbi leo risus -Porta ac consectetur ac -Vestibulum at eros -- - ); -}; - -export default Example; diff --git a/docs/lib/examples/MediaAlignment.js b/docs/lib/examples/MediaAlignment.js deleted file mode 100644 index 413b933e1..000000000 --- a/docs/lib/examples/MediaAlignment.js +++ /dev/null @@ -1,44 +0,0 @@ -import React from 'react'; -import { Media } from 'reactstrap'; - -const Example = () => { - return ( -- -- - -- Media heading - - Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. --- ); -}; - -export default Example; diff --git a/docs/lib/examples/MediaList.js b/docs/lib/examples/MediaList.js deleted file mode 100644 index 6df37a2e2..000000000 --- a/docs/lib/examples/MediaList.js +++ /dev/null @@ -1,66 +0,0 @@ -import React from 'react'; -import { Media } from 'reactstrap'; - -const Example = () => { - return ( -- -- -- - -- Top aligned media - - Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -- -- -- - -- Middle aligned media - - Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -- -- -- - -- Bottom aligned media - - Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -- - ); -}; - -export default Example; diff --git a/docs/lib/examples/MediaNested.js b/docs/lib/examples/MediaNested.js deleted file mode 100644 index 5c41c6b41..000000000 --- a/docs/lib/examples/MediaNested.js +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import { Media } from 'reactstrap'; - -const Example = () => { - return ( -- -- -- - -- Media heading - - Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -- -- -- - -- Nested media heading - - Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -- -- -- - -- Nested media heading - - Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -- -- -- - -- Nested media heading - - Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -- -- -- Media heading - - Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -- -- - - ); -}; - -export default Example; diff --git a/docs/lib/examples/Modal.js b/docs/lib/examples/Modal.js deleted file mode 100644 index c3ed892bb..000000000 --- a/docs/lib/examples/Modal.js +++ /dev/null @@ -1,41 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ - -import React from 'react'; -import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; - -class ModalExample extends React.Component { - constructor(props) { - super(props); - this.state = { - modal: false - }; - - this.toggle = this.toggle.bind(this); - } - - toggle() { - this.setState({ - modal: !this.state.modal - }); - } - - render() { - return ( -- -- - -- Media heading - - Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -- -- -- - -- Nested media heading - - Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus. -- -- ); - } -} - -export default ModalExample; diff --git a/docs/lib/examples/ModalBackdrop.js b/docs/lib/examples/ModalBackdrop.js deleted file mode 100644 index 313329984..000000000 --- a/docs/lib/examples/ModalBackdrop.js +++ /dev/null @@ -1,62 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ - -import React from 'react'; -import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Input, Label, Form, FormGroup } from 'reactstrap'; - -class ModalExample extends React.Component { - constructor(props) { - super(props); - this.state = { - modal: false, - backdrop: true - }; - - this.toggle = this.toggle.bind(this); - this.changeBackdrop = this.changeBackdrop.bind(this); - } - - toggle() { - this.setState({ - modal: !this.state.modal - }); - } - - changeBackdrop(e) { - let value = e.target.value; - if (value !== 'static') { - value = JSON.parse(value); - } - this.setState({ backdrop: value }); - } - - render() { - return ( -- -Modal title -- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -- {' '} - - -- -- ); - } -} - -export default ModalExample; diff --git a/docs/lib/examples/ModalCustomCloseIcon.js b/docs/lib/examples/ModalCustomCloseIcon.js deleted file mode 100644 index 6aa63bd74..000000000 --- a/docs/lib/examples/ModalCustomCloseIcon.js +++ /dev/null @@ -1,41 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ - -import React from 'react'; -import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; - -class ModalExample extends React.Component { - constructor(props) { - super(props); - this.state = { - modal: false - }; - - this.toggle = this.toggle.bind(this); - } - - toggle() { - this.setState({ - modal: !this.state.modal - }); - } - - render() { - return ( -- -Modal title -- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -- {' '} - - -- -- ); - } -} - -export default ModalExample; diff --git a/docs/lib/examples/ModalCustomTimeout.js b/docs/lib/examples/ModalCustomTimeout.js deleted file mode 100644 index 3173a0d79..000000000 --- a/docs/lib/examples/ModalCustomTimeout.js +++ /dev/null @@ -1,42 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ - -import React from 'react'; -import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; - -class ModalExample extends React.Component { - constructor(props) { - super(props); - this.state = { - modal: false - }; - - this.toggle = this.toggle.bind(this); - } - - toggle() { - this.setState({ - modal: !this.state.modal - }); - } - - render() { - return ( -- -Modal title -- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -- {' '} - - -- -- ); - } -} - -export default ModalExample; diff --git a/docs/lib/examples/ModalExternal.js b/docs/lib/examples/ModalExternal.js deleted file mode 100644 index f196af7a6..000000000 --- a/docs/lib/examples/ModalExternal.js +++ /dev/null @@ -1,43 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ - -import React from 'react'; -import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; - -class ModalExample extends React.Component { - constructor(props) { - super(props); - this.state = { - modal: false - }; - - this.toggle = this.toggle.bind(this); - } - - toggle() { - this.setState({ - modal: !this.state.modal - }); - } - - render() { - const externalCloseBtn = ; - return ( -- -Modal title -- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -- {' '} - - -- -- ); - } -} - -export default ModalExample; diff --git a/docs/lib/examples/ModalFadeless.js b/docs/lib/examples/ModalFadeless.js deleted file mode 100644 index 30cfe70b2..000000000 --- a/docs/lib/examples/ModalFadeless.js +++ /dev/null @@ -1,41 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ - -import React from 'react'; -import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; - -class ModalExample extends React.Component { - constructor(props) { - super(props); - this.state = { - modal: false - }; - - this.toggle = this.toggle.bind(this); - } - - toggle() { - this.setState({ - modal: !this.state.modal - }); - } - - render() { - return ( -- -Modal title -- Look at the top right of the page/viewport! -
- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -- {' '} - - -- -- ); - } -} - -export default ModalExample; diff --git a/docs/lib/examples/ModalNested.js b/docs/lib/examples/ModalNested.js deleted file mode 100644 index 6e23e3a9c..000000000 --- a/docs/lib/examples/ModalNested.js +++ /dev/null @@ -1,69 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ - -import React from 'react'; -import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; - -class ModalExample extends React.Component { - constructor(props) { - super(props); - this.state = { - modal: false, - nestedModal: false, - closeAll: false - }; - - this.toggle = this.toggle.bind(this); - this.toggleNested = this.toggleNested.bind(this); - this.toggleAll = this.toggleAll.bind(this); - } - - toggle() { - this.setState({ - modal: !this.state.modal - }); - } - - toggleNested() { - this.setState({ - nestedModal: !this.state.nestedModal, - closeAll: false - }); - } - - toggleAll() { - this.setState({ - nestedModal: !this.state.nestedModal, - closeAll: true - }); - } - - render() { - return ( -- -Modal title -- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -- {' '} - - -- -- ); - } -} - -export default ModalExample; diff --git a/docs/lib/examples/NavPills.js b/docs/lib/examples/NavPills.js deleted file mode 100644 index 2f04c4b54..000000000 --- a/docs/lib/examples/NavPills.js +++ /dev/null @@ -1,52 +0,0 @@ -import React from 'react'; -import { Nav, NavItem, Dropdown, DropdownItem, DropdownToggle, DropdownMenu, NavLink } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - dropdownOpen: false - }; - } - - toggle() { - this.setState({ - dropdownOpen: !this.state.dropdownOpen - }); - } - - render() { - return ( -- -Modal title -- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. - -
- -- -Nested Modal title -Stuff and things -- {' '} - - -- {' '} - - -- -- ); - } -} diff --git a/docs/lib/examples/NavTabs.js b/docs/lib/examples/NavTabs.js deleted file mode 100644 index 04c62ddde..000000000 --- a/docs/lib/examples/NavTabs.js +++ /dev/null @@ -1,52 +0,0 @@ -import React from 'react'; -import { Nav, NavItem, Dropdown, DropdownItem, DropdownToggle, DropdownMenu, NavLink } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - dropdownOpen: false - }; - } - - toggle() { - this.setState({ - dropdownOpen: !this.state.dropdownOpen - }); - } - - render() { - return ( -- -- ); - } -} diff --git a/docs/lib/examples/NavVertical.js b/docs/lib/examples/NavVertical.js deleted file mode 100644 index 310d8092a..000000000 --- a/docs/lib/examples/NavVertical.js +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import { Nav, NavItem, NavLink } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( --- ); - } -} diff --git a/docs/lib/examples/Navbar.js b/docs/lib/examples/Navbar.js deleted file mode 100644 index 0b8c4a711..000000000 --- a/docs/lib/examples/Navbar.js +++ /dev/null @@ -1,66 +0,0 @@ -import React from 'react'; -import { - Collapse, - Navbar, - NavbarToggler, - NavbarBrand, - Nav, - NavItem, - NavLink, - UncontrolledDropdown, - DropdownToggle, - DropdownMenu, - DropdownItem } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - isOpen: false - }; - } - toggle() { - this.setState({ - isOpen: !this.state.isOpen - }); - } - render() { - return ( -List Based
- -
-Link based
- --- ); - } -} diff --git a/docs/lib/examples/NavbarToggler.js b/docs/lib/examples/NavbarToggler.js deleted file mode 100644 index ad226741c..000000000 --- a/docs/lib/examples/NavbarToggler.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Collapse, Navbar, NavbarToggler, NavbarBrand, Nav, NavItem, NavLink } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggleNavbar = this.toggleNavbar.bind(this); - this.state = { - collapsed: true - }; - } - - toggleNavbar() { - this.setState({ - collapsed: !this.state.collapsed - }); - } - render() { - return ( -- -reactstrap -- - - --- ); - } -} diff --git a/docs/lib/examples/Navs.js b/docs/lib/examples/Navs.js deleted file mode 100644 index d44589baf..000000000 --- a/docs/lib/examples/Navs.js +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import { Nav, NavItem, NavLink } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- -reactstrap -- - - --- ); - } -} diff --git a/docs/lib/examples/Pagination.js b/docs/lib/examples/Pagination.js deleted file mode 100644 index 7e734aca3..000000000 --- a/docs/lib/examples/Pagination.js +++ /dev/null @@ -1,42 +0,0 @@ -import React from 'react'; -import { Pagination, PaginationItem, PaginationLink } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -List Based
- -
-Link Based
- -- - ); - } -} diff --git a/docs/lib/examples/PaginationSizingLarge.js b/docs/lib/examples/PaginationSizingLarge.js deleted file mode 100644 index ab8d392c7..000000000 --- a/docs/lib/examples/PaginationSizingLarge.js +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; -import { Pagination, PaginationItem, PaginationLink } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- -- - -- 1 - -- -- 2 - -- -- 3 - -- -- 4 - -- -- 5 - -- -- - - ); - } -} diff --git a/docs/lib/examples/PaginationSizingSmall.js b/docs/lib/examples/PaginationSizingSmall.js deleted file mode 100644 index b96035c68..000000000 --- a/docs/lib/examples/PaginationSizingSmall.js +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; -import { Pagination, PaginationItem, PaginationLink } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- -- - -- 1 - -- -- 2 - -- -- 3 - -- -- - - ); - } -} diff --git a/docs/lib/examples/PaginationState.js b/docs/lib/examples/PaginationState.js deleted file mode 100644 index 9004d52ec..000000000 --- a/docs/lib/examples/PaginationState.js +++ /dev/null @@ -1,42 +0,0 @@ -import React from 'react'; -import { Pagination, PaginationItem, PaginationLink } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- -- - -- 1 - -- -- 2 - -- -- 3 - -- -- - - ); - } -} diff --git a/docs/lib/examples/Popover.js b/docs/lib/examples/Popover.js deleted file mode 100644 index 86319b398..000000000 --- a/docs/lib/examples/Popover.js +++ /dev/null @@ -1,34 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ -import React from 'react'; -import { Button, Popover, PopoverHeader, PopoverBody } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - popoverOpen: false - }; - } - - toggle() { - this.setState({ - popoverOpen: !this.state.popoverOpen - }); - } - - render() { - return ( -- -- - -- 1 - -- -- 2 - -- -- 3 - -- -- 4 - -- -- 5 - -- -- - -- ); - } -} diff --git a/docs/lib/examples/PopoverMulti.js b/docs/lib/examples/PopoverMulti.js deleted file mode 100644 index 2c75ad01e..000000000 --- a/docs/lib/examples/PopoverMulti.js +++ /dev/null @@ -1,74 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ - -import React from 'react'; -import { Button, Popover, PopoverHeader, PopoverBody } from 'reactstrap'; - -class PopoverItem extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - popoverOpen: false - }; - } - - toggle() { - this.setState({ - popoverOpen: !this.state.popoverOpen - }); - } - - render() { - return ( - - -- -Popover Title -Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. -- - - ); - } -} - -class PopoverExampleMulti extends React.Component { - constructor(props) { - super(props); - - this.state = { - popovers: [ - { - placement: 'top', - text: 'Top' - }, - { - placement: 'bottom', - text: 'Bottom' - }, - { - placement: 'left', - text: 'Left' - }, - { - placement: 'right', - text: 'Right' - } - ] - }; - } - - render() { - return ( -Popover Title -Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. -- { this.state.popovers.map((popover, i) => { - return- ); - } -} - -export default PopoverExampleMulti; diff --git a/docs/lib/examples/Progress.js b/docs/lib/examples/Progress.js deleted file mode 100644 index 55bf15107..000000000 --- a/docs/lib/examples/Progress.js +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import { Progress } from 'reactstrap'; - -const Example = (props) => { - return ( -; - })} - -- ); -}; - -export default Example; diff --git a/docs/lib/examples/ProgressAnimated.js b/docs/lib/examples/ProgressAnimated.js deleted file mode 100644 index 724e3c5f5..000000000 --- a/docs/lib/examples/ProgressAnimated.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import { Progress } from 'reactstrap'; - -const Example = (props) => { - return ( -0%- -25%- -50%- -75%- -100%- -Multiple bars- --- ); -}; - -export default Example; diff --git a/docs/lib/examples/ProgressColor.js b/docs/lib/examples/ProgressColor.js deleted file mode 100644 index dd8086573..000000000 --- a/docs/lib/examples/ProgressColor.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import { Progress } from 'reactstrap'; - -const Example = (props) => { - return ( -- - - - - - -- - - - -- ); -}; - -export default Example; diff --git a/docs/lib/examples/ProgressLabels.js b/docs/lib/examples/ProgressLabels.js deleted file mode 100644 index 70c0e2ad0..000000000 --- a/docs/lib/examples/ProgressLabels.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import { Progress } from 'reactstrap'; - -const Example = (props) => { - return ( -- - - - - -- ); -}; - -export default Example; diff --git a/docs/lib/examples/ProgressMulti.js b/docs/lib/examples/ProgressMulti.js deleted file mode 100644 index 4676a6347..000000000 --- a/docs/lib/examples/ProgressMulti.js +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; -import { Progress } from 'reactstrap'; - -const Example = (props) => { - return ( -25% -1/2 -You're almost there! -You did it! -- -Meh -Wow! -Cool -20% -!! --- ); -}; - -export default Example; diff --git a/docs/lib/examples/ProgressStriped.js b/docs/lib/examples/ProgressStriped.js deleted file mode 100644 index 06acfb35e..000000000 --- a/docs/lib/examples/ProgressStriped.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import { Progress } from 'reactstrap'; - -const Example = (props) => { - return ( -Plain-- -- - - - - With Labels-- -Meh -Wow! -25% -LOOK OUT!! -Stripes and Animations-- -Stripes -Animated Stripes -Plain --- ); -}; - -export default Example; diff --git a/docs/lib/examples/Table.js b/docs/lib/examples/Table.js deleted file mode 100644 index 787da6849..000000000 --- a/docs/lib/examples/Table.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Table } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- - - - - - -- - - - - -
- ); - } -} diff --git a/docs/lib/examples/TableBordered.js b/docs/lib/examples/TableBordered.js deleted file mode 100644 index 0204019e5..000000000 --- a/docs/lib/examples/TableBordered.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Table } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- - - -# -First Name -Last Name -Username -- -1 -Mark -Otto -@mdo -- -2 -Jacob -Thornton -@fat -- - -3 -Larry -the Bird -- -
- ); - } -} diff --git a/docs/lib/examples/TableBorderless.js b/docs/lib/examples/TableBorderless.js deleted file mode 100644 index f511501c8..000000000 --- a/docs/lib/examples/TableBorderless.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Table } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- - - -# -First Name -Last Name -Username -- -1 -Mark -Otto -@mdo -- -2 -Jacob -Thornton -@fat -- - -3 -Larry -the Bird -- -
- ); - } -} diff --git a/docs/lib/examples/TableDark.js b/docs/lib/examples/TableDark.js deleted file mode 100644 index 8d938f541..000000000 --- a/docs/lib/examples/TableDark.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Table } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- - - -# -First Name -Last Name -Username -- -1 -Mark -Otto -@mdo -- -2 -Jacob -Thornton -@fat -- - -3 -Larry -the Bird -- -
- ); - } -} diff --git a/docs/lib/examples/TableHover.js b/docs/lib/examples/TableHover.js deleted file mode 100644 index f1aa2cf59..000000000 --- a/docs/lib/examples/TableHover.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Table } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- - - -# -First Name -Last Name -Username -- -1 -Mark -Otto -@mdo -- -2 -Jacob -Thornton -@fat -- - -3 -Larry -the Bird -- -
- ); - } -} diff --git a/docs/lib/examples/TableResponsive.js b/docs/lib/examples/TableResponsive.js deleted file mode 100644 index bca1a5603..000000000 --- a/docs/lib/examples/TableResponsive.js +++ /dev/null @@ -1,51 +0,0 @@ -import React from 'react'; -import { Table } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- - - -# -First Name -Last Name -Username -- -1 -Mark -Otto -@mdo -- -2 -Jacob -Thornton -@fat -- - -3 -Larry -the Bird -- -
- ); - } -} diff --git a/docs/lib/examples/TableSizing.js b/docs/lib/examples/TableSizing.js deleted file mode 100644 index d3f6ea7d2..000000000 --- a/docs/lib/examples/TableSizing.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Table } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- - - -# -Table heading -Table heading -Table heading -Table heading -Table heading -Table heading -- -1 -Table cell -Table cell -Table cell -Table cell -Table cell -Table cell -- -2 -Table cell -Table cell -Table cell -Table cell -Table cell -Table cell -- - -3 -Table cell -Table cell -Table cell -Table cell -Table cell -Table cell -- -
- ); - } -} diff --git a/docs/lib/examples/TableStriped.js b/docs/lib/examples/TableStriped.js deleted file mode 100644 index b17e96053..000000000 --- a/docs/lib/examples/TableStriped.js +++ /dev/null @@ -1,39 +0,0 @@ -import React from 'react'; -import { Table } from 'reactstrap'; - -export default class Example extends React.Component { - render() { - return ( -- - - -# -First Name -Last Name -Username -- -1 -Mark -Otto -@mdo -- -2 -Jacob -Thornton -@fat -- - -3 -Larry -the Bird -- -
- ); - } -} diff --git a/docs/lib/examples/Tabs.js b/docs/lib/examples/Tabs.js deleted file mode 100644 index 5c971144d..000000000 --- a/docs/lib/examples/Tabs.js +++ /dev/null @@ -1,73 +0,0 @@ -import React from 'react'; -import { TabContent, TabPane, Nav, NavItem, NavLink, Card, Button, CardTitle, CardText, Row, Col } from 'reactstrap'; -import classnames from 'classnames'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - activeTab: '1' - }; - } - - toggle(tab) { - if (this.state.activeTab !== tab) { - this.setState({ - activeTab: tab - }); - } - } - render() { - return ( -- - - -# -First Name -Last Name -Username -- -1 -Mark -Otto -@mdo -- -2 -Jacob -Thornton -@fat -- - -3 -Larry -the Bird -- -- ); - } -} diff --git a/docs/lib/examples/Tooltip.js b/docs/lib/examples/Tooltip.js deleted file mode 100644 index 090f33c58..000000000 --- a/docs/lib/examples/Tooltip.js +++ /dev/null @@ -1,31 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ -import React from 'react'; -import { Tooltip } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - tooltipOpen: false - }; - } - - toggle() { - this.setState({ - tooltipOpen: !this.state.tooltipOpen - }); - } - - render() { - return ( -- -- --
-- Tab 1 Contents
- -- --
-- - - -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - -- - - -Special Title Treatment -With supporting text below as a natural lead-in to additional content. - --- ); - } -} diff --git a/docs/lib/examples/TooltipAutoHide.js b/docs/lib/examples/TooltipAutoHide.js deleted file mode 100644 index 90e8237c4..000000000 --- a/docs/lib/examples/TooltipAutoHide.js +++ /dev/null @@ -1,31 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ -import React from 'react'; -import { Tooltip } from 'reactstrap'; - -export default class Example extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - tooltipOpen: false - }; - } - - toggle() { - this.setState({ - tooltipOpen: !this.state.tooltipOpen - }); - } - - render() { - return ( -Somewhere in here is a tooltip.
-- Hello world! - --- ); - } -} diff --git a/docs/lib/examples/TooltipMulti.js b/docs/lib/examples/TooltipMulti.js deleted file mode 100644 index 2eb70cc6e..000000000 --- a/docs/lib/examples/TooltipMulti.js +++ /dev/null @@ -1,73 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ - -import React from 'react'; -import { Button, Tooltip } from 'reactstrap'; - -class TooltipItem extends React.Component { - constructor(props) { - super(props); - - this.toggle = this.toggle.bind(this); - this.state = { - tooltipOpen: false - }; - } - - toggle() { - this.setState({ - tooltipOpen: !this.state.tooltipOpen - }); - } - - render() { - return ( - - -Sometimes you need to allow users to select text within a tooltip.
-- Try to select this text! - -- Tooltip Content! - - - ); - } -} - -class TooltipExampleMulti extends React.Component { - constructor(props) { - super(props); - - this.state = { - tooltips: [ - { - placement: 'top', - text: 'Top' - }, - { - placement: 'bottom', - text: 'Bottom' - }, - { - placement: 'left', - text: 'Left' - }, - { - placement: 'right', - text: 'Right' - } - ] - }; - } - - render() { - return ( -- { this.state.tooltips.map((tooltip, i) => { - return- ); - } -} - -export default TooltipExampleMulti; diff --git a/docs/lib/examples/TooltipUncontrolled.js b/docs/lib/examples/TooltipUncontrolled.js deleted file mode 100644 index fc4afdb26..000000000 --- a/docs/lib/examples/TooltipUncontrolled.js +++ /dev/null @@ -1,14 +0,0 @@ -/* eslint react/no-multi-comp: 0, react/prop-types: 0 */ -import React from 'react'; -import { UncontrolledTooltip } from 'reactstrap'; - -export default function Example() { - return ( -; - })} - -- ); -} diff --git a/docs/lib/examples/import-basic.js b/docs/lib/examples/import-basic.js deleted file mode 100644 index 6f91ac6eb..000000000 --- a/docs/lib/examples/import-basic.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from 'react'; -import { Button } from 'reactstrap'; - -export default (props) => { - return ( - - ); -}; diff --git a/docs/lib/routes.js b/docs/lib/routes.js deleted file mode 100644 index 59b8f92c5..000000000 --- a/docs/lib/routes.js +++ /dev/null @@ -1,78 +0,0 @@ -import React from 'react'; -import { Route, IndexRoute, IndexRedirect } from 'react-router'; -import Home from './Home'; -import LayoutPage from './Components/LayoutPage'; -import NavsPage from './Components/NavsPage'; -import NavbarPage from './Components/NavbarPage'; -import BreadcrumbsPage from './Components/BreadcrumbsPage'; -import ButtonsPage from './Components/ButtonsPage'; -import ButtonGroupPage from './Components/ButtonGroupPage'; -import ButtonDropdownPage from './Components/ButtonDropdownPage'; -import DropdownsPage from './Components/DropdownsPage'; -import FadePage from './Components/FadePage'; -import FormPage from './Components/FormPage'; -import InputGroupPage from './Components/InputGroupPage'; -import PopoversPage from './Components/PopoversPage'; -import ProgressPage from './Components/ProgressPage'; -import TooltipsPage from './Components/TooltipsPage'; -import BadgePage from './Components/BadgePage'; -import MediaPage from './Components/MediaPage'; -import ModalsPage from './Components/ModalsPage'; -import CardPage from './Components/CardPage'; -import TablesPage from './Components/TablesPage'; -import PaginationPage from './Components/PaginationPage'; -import TabsPage from './Components/TabsPage'; -import JumbotronPage from './Components/JumbotronPage'; -import AlertsPage from './Components/AlertsPage'; -import CollapsePage from './Components/CollapsePage'; -import CarouselPage from './Components/CarouselPage'; -import ListGroupPage from './Components/ListGroupPage'; -import ClearfixPage from './Utilities/ClearfixPage'; -import ColorsPage from './Utilities/ColorsPage'; -import NotFound from './NotFound'; -import Components from './Components'; -import Utilities from './Utilities'; -import UI from './UI'; - -const routes = ( -Somewhere in here is a tooltip.
-- Hello world! - -- -); - -export default routes; diff --git a/docs/static/docs.css b/docs/static/docs.css deleted file mode 100644 index 252efd3c0..000000000 --- a/docs/static/docs.css +++ /dev/null @@ -1,327 +0,0 @@ -.container-fluid { - max-width: 1200px; -} - -.nav-tabs .nav-link { - cursor: pointer; -} - -@media (max-width: 575px) { - .navbar-toggleable > .container { - width: 100%; - padding-right: 15px; - padding-left: 15px; - } -} - -.jumbotron-header, .jumbotron-header p:last-child, .navbar { - margin-bottom: 0 -} - -.jumbotron-header .btn { - margin-right: 1rem; -} - -.jumbotron-header .btn + .btn { - margin-right: 0; -} - -@media (max-width: 543px) { - .jumbotron-header .btn { - display: block; - margin: 0 0 1rem 0; - } -} - -.content { - margin-top: 2rem; -} - -.header .navbar-nav .nav-link.active { - color: #333; -} - -.header.navbar { - padding-left: 0; - padding-right: 0; -} - -.footer { - margin-top: 2rem; - padding: 2rem 0; - border-top: 1px solid #e7e7e7; -} - -.footer .social { - margin-bottom: 0; -} - -.footer .social a { - display: inline-block; -} - -.footer .social img { - display: block; -} - -.navbar-collapse .container-fluid { - padding: 2rem 2.5rem; - border-bottom: 1px solid #55595c -} -.navbar-collapse .text-muted, .navbar-collapse h4 { - color: #818a91 -} -.about { - float: left; - max-width: 30rem; - margin-right: 3rem -} -.social a { - font-weight: 500; - color: #eceeef -} -.social a:hover { - color: #fff -} -.jumbotron-header { - padding-top: 2rem; - padding-bottom: 2rem; - background-color: #fff -} -.jumbotron-heading { - font-weight: 300 -} - -footer { - padding-top: 3rem; - padding-bottom: 3rem -} -footer p { - margin-bottom: .25rem -} - -h1,h2,h3,h4,h5,h6,strong,b { - font-weight: 300; -} - -h1,h2,h3 { - margin-bottom: 1rem; -} - -.docs-example { - position: relative; - padding: 3em 1em 1em; - border: 1px solid #d8d8d8; - margin: 1.5rem 0 0; -} - -.docs-example::before { - position: absolute; - left: 0; - top: 0; - padding: 1em; - color: #aaa; - font-size: smaller; - font-weight: 500; - content: 'EXAMPLE'; -} - -.docs-example::after { - clear: both; - content: " "; - display: table; -} - -.docs-example .card { - max-width: 320px; -} - -pre, code { - background: #f5f5f5; - border-radius: 0; - border-color: #d8d8d8; - margin: 0; -} - -.docs-example + pre { - border: 1px solid #d8d8d8; - border-top: none; - padding: 1em; - margin-top: 0 !important; - clear: both; -} - -.docs-sidebar .nav-item { - padding: .2rem 0 .2rem 0; -} - -.docs-sidebar .nav-link { - color: #888; - padding: .3rem .5rem .3rem 1rem; - border-left: 2px solid transparent; -} - -.docs-sidebar .nav-link:hover { - color: #777 -} - -.docs-sidebar .nav-link.active { - color: #666; - border-left: 2px solid #d9534f; -} - -.docs-example > .container .row { - margin-bottom: 1rem; -} - -.docs-example > .container .row > [class^="col"] { - padding-top: .75rem; - padding-bottom: .75rem; - background-color: #E5EDF5; - border: 1px solid #C9C1D5; - color: #5F5F5F; -} - -.docs-example .form-control + .form-control { - margin-top: .5rem; -} - -.docs-example .nav-tabs { - margin-bottom: 1rem; -} - -.docs-example .progress { - margin-bottom: 1rem; -} - - -/* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+bash+jsx&plugins=autolinker */ -/** - * okaidia theme for JavaScript, CSS and HTML - * Loosely based on Monokai textmate theme by http://www.monokai.nl/ - * @author ocodia - */ - - code[class*="language-"], - pre[class*="language-"] { - color: #f8f8f2; - background: none; - text-shadow: 0 1px rgba(0, 0, 0, 0.3); - text-align: left; - white-space: pre; - word-spacing: normal; - word-break: normal; - word-wrap: normal; - line-height: 1.5; - - -moz-tab-size: 4; - -o-tab-size: 4; - tab-size: 4; - - -webkit-hyphens: none; - -moz-hyphens: none; - -ms-hyphens: none; - hyphens: none; - } - - /* Code blocks */ - pre[class*="language-"] { - padding: 1em; - margin: 1.5em 0; - overflow: auto; - } - - :not(pre) > code[class*="language-"], - pre[class*="language-"] { - background: #272822; - } - - /* Inline code */ - :not(pre) > code[class*="language-"] { - padding: .1em; - border-radius: .3em; - white-space: normal; - } - - .token.comment, - .token.prolog, - .token.doctype, - .token.cdata { - color: slategray; - } - - .token.punctuation { - color: #f8f8f2; - } - - .namespace { - opacity: .7; - } - - .token.property, - .token.tag, - .token.constant, - .token.symbol, - .token.deleted { - color: #f92672; - } - - .token.boolean, - .token.number { - color: #ae81ff; - } - - .token.selector, - .token.attr-name, - .token.string, - .token.char, - .token.builtin, - .token.inserted { - color: #a6e22e; - } - - .token.operator, - .token.entity, - .token.url, - .language-css .token.string, - .style .token.string, - .token.variable { - color: #f8f8f2; - } - - .token.atrule, - .token.attr-value, - .token.function { - color: #e6db74; - } - - .token.keyword { - color: #66d9ef; - } - - .token.regex, - .token.important { - color: #fd971f; - } - - .token.important, - .token.bold { - font-weight: bold; - } - .token.italic { - font-style: italic; - } - - .token.entity { - cursor: help; - } - - .token a { - color: inherit; - } - -code .tag { - font-size: inherit; - padding: 0; - display: inherit; -} diff --git a/docs/static/favicon.ico b/docs/static/favicon.ico deleted file mode 100644 index a117a65ae..000000000 Binary files a/docs/static/favicon.ico and /dev/null differ diff --git a/docs/static/logo.png b/docs/static/logo.png deleted file mode 100644 index b507429db..000000000 Binary files a/docs/static/logo.png and /dev/null differ diff --git a/docs/static/prism.js b/docs/static/prism.js deleted file mode 100644 index c79fda5a3..000000000 --- a/docs/static/prism.js +++ /dev/null @@ -1,9 +0,0 @@ -/* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+bash+jsx&plugins=autolinker */ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){h.lastIndex=0;var _=h.exec(w),P=1;if(!_&&m&&b!=t.length-1){if(h.lastIndex=k,_=h.exec(e),!_)break;for(var A=_.index+(d?_[1].length:0),j=_.index+_[0].length,x=b,O=k,S=t.length;S>x&&(j>O||!t[x].type&&!t[x-1].greedy);++x)O+=t[x].length,A>=O&&(++b,k=O);if(t[b]instanceof s||t[x-1].greedy)continue;P=x-b,w=e.slice(k,O),_.index-=k}if(_){d&&(p=_[1].length);var A=_.index+p,_=_[0].slice(p),j=A+_.length,N=w.slice(0,A),C=w.slice(j),E=[b,P];N&&(++b,k+=N.length,E.push(N));var L=new s(u,f?n.tokenize(_,f):_,y,_,m);if(E.push(L),C&&E.push(C),Array.prototype.splice.apply(t,E),1!=P&&n.matchGrammar(e,t,a,b,k,!0,u),l)break}else if(l)break}}}}},tokenize:function(e,t){var a=[e],r=t.rest;if(r){for(var i in r)t[i]=r[i];delete t.rest}return n.matchGrammar(e,a,t,0,0,!1),a},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,i=0;r=a[i++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var i={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if("comment"==i.type&&(i.attributes.spellcheck="true"),e.alias){var l="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}n.hooks.run("wrap",i);var o=Object.keys(i.attributes).map(function(e){return e+'="'+(i.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+(o?" "+o:"")+">"+i.content+""+i.tag+">"},!_self.document)return _self.addEventListener?(_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,i=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),i&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,!document.addEventListener||n.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\s\S])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\s\S]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; -Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:{pattern:/("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.util.clone(Prism.languages.css),Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/( +- - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - + + \ No newline at end of file diff --git a/static/logo.svg b/static/logo.svg new file mode 100644 index 000000000..00572bb4d --- /dev/null +++ b/static/logo.svg @@ -0,0 +1,78 @@ + \ No newline at end of file diff --git a/static/themes/bamburgh-react-admin-dashboard-reactstrap-pro.jpg b/static/themes/bamburgh-react-admin-dashboard-reactstrap-pro.jpg new file mode 100644 index 000000000..fad6e644b Binary files /dev/null and b/static/themes/bamburgh-react-admin-dashboard-reactstrap-pro.jpg differ diff --git a/stories/.eslintrc.json b/stories/.eslintrc.json new file mode 100644 index 000000000..8d343ab86 --- /dev/null +++ b/stories/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "no-unused-vars": ["error", { "args": "none" }] + } +} diff --git a/stories/Accordion.stories.js b/stories/Accordion.stories.js new file mode 100644 index 000000000..b33f8f19e --- /dev/null +++ b/stories/Accordion.stories.js @@ -0,0 +1,20 @@ +export default { + title: 'Components/Accordion', + parameters: { + docs: { + description: { + component: ` +[Bootstrap Accordion](https://getbootstrap.com/docs/5.1/components/accordion/) + +Used to build vertically collapsing accordions. + `, + }, + }, + }, +}; + +export { default as Accordion } from './examples/Accordion/Accordion'; +export { default as Flush } from './examples/Accordion/AccordionFlush'; +export { default as Uncontrolled } from './examples/Accordion/AccordionUncontrolled'; +export { default as StayOpen } from './examples/Accordion/AccordionStayOpen'; +export { default as Props } from './examples/Accordion/AccordionProps'; diff --git a/stories/Alert.stories.js b/stories/Alert.stories.js new file mode 100644 index 000000000..c83b3bb1c --- /dev/null +++ b/stories/Alert.stories.js @@ -0,0 +1,22 @@ +export default { + title: 'Components/Alert', + parameters: { + docs: { + description: { + component: ` +[Bootstrap Alert](https://getbootstrap.com/docs/5.1/components/alerts/) + +Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. + `, + }, + }, + }, +}; + +export { default as Alert } from './examples/Alert/Alert'; +export { default as Colors } from './examples/Alert/Colors'; +export { default as Content } from './examples/Alert/Content'; +export { default as AlertLink } from './examples/Alert/Link'; +export { default as Dismiss } from './examples/Alert/Dismiss'; +export { default as UncontrolledDismiss } from './examples/Alert/UncontrolledDismiss'; +export { default as Props } from './examples/Alert/Props'; diff --git a/stories/Badge.stories.js b/stories/Badge.stories.js new file mode 100644 index 000000000..9e13048ed --- /dev/null +++ b/stories/Badge.stories.js @@ -0,0 +1,22 @@ +export default { + title: 'Components/Badge', + parameters: { + docs: { + description: { + component: ` +[Bootstrap Badge](https://getbootstrap.com/docs/5.1/components/badge/) + +A small count and labeling component. + `, + }, + }, + }, +}; + +export { default as Badge } from './examples/Badge/Badge'; +export { default as Headings } from './examples/Badge/Headings'; +export { default as Buttons } from './examples/Badge/Button'; +export { default as BackgroundColors } from './examples/Badge/Variations'; +export { default as Links } from './examples/Badge/Links'; +export { default as PillBadges } from './examples/Badge/Pills'; +export { default as Props } from './examples/Badge/Props'; diff --git a/stories/Breadcrumb.stories.js b/stories/Breadcrumb.stories.js new file mode 100644 index 000000000..b87d125b7 --- /dev/null +++ b/stories/Breadcrumb.stories.js @@ -0,0 +1,18 @@ +export default { + title: 'Components/Breadcrumb', + parameters: { + docs: { + description: { + component: ` +[Bootstrap Breadcrumb](https://getbootstrap.com/docs/5.1/components/breadcrumb/) + +Indicate the current page’s location within a navigational hierarchy that automatically adds separators. + `, + }, + }, + }, +}; + +export { default as Breadcrumb } from './examples/Breadcrump/Breadcrumb'; +export { default as NoList } from './examples/Breadcrump/NoList'; +export { default as Props } from './examples/Breadcrump/Props'; diff --git a/stories/Button.stories.js b/stories/Button.stories.js new file mode 100644 index 000000000..b4bb0f1a4 --- /dev/null +++ b/stories/Button.stories.js @@ -0,0 +1,22 @@ +export default { + title: 'Components/Button', + parameters: { + docs: { + description: { + component: ` +[Bootstrap Buttons](https://getbootstrap.com/docs/5.1/components/buttons/) + +Custom Buttons for actions in forms, dialogs, and more with support for multiple sizes, states, and more. + `, + }, + }, + }, +}; + +export { default as Button } from './examples/Button/Button'; +export { default as Variants } from './examples/Button/Colors'; +export { default as CustomTags } from './examples/Button/Tags'; +export { default as Outline } from './examples/Button/Outline'; +export { default as Sizes } from './examples/Button/Size'; +export { default as Disabled } from './examples/Button/Disabled'; +export { default as Props } from './examples/Button/Props'; diff --git a/stories/ButtonGroup.stories.js b/stories/ButtonGroup.stories.js new file mode 100644 index 000000000..9e371a2e1 --- /dev/null +++ b/stories/ButtonGroup.stories.js @@ -0,0 +1,23 @@ +export default { + title: 'Components/ButtonGroup', + parameters: { + docs: { + description: { + component: ` +[Bootstrap Buttons](https://getbootstrap.com/docs/5.1/components/buttons/) + +Group a series of buttons together on a single line or stack them in a vertical column. + `, + }, + }, + }, +}; + +export { default as ButtonGroup } from './examples/ButtonGroup/ButtonGroup'; +export { default as MixedStyles } from './examples/ButtonGroup/MixedStyles'; +export { default as CheckboxAndRadio } from './examples/ButtonGroup/Stateful'; +export { default as ButtonToolbar } from './examples/ButtonGroup/Toolbar'; +export { default as Sizing } from './examples/ButtonGroup/Sizing'; +export { default as Nesting } from './examples/ButtonGroup/Nesting'; +export { default as Vertical } from './examples/ButtonGroup/Vertical'; +export { default as Props } from './examples/ButtonGroup/Props'; diff --git a/stories/Card.stories.js b/stories/Card.stories.js new file mode 100644 index 000000000..bca8df6a6 --- /dev/null +++ b/stories/Card.stories.js @@ -0,0 +1,29 @@ +export default { + title: 'Components/Card', + parameters: { + docs: { + description: { + component: ` +[Bootstrap Card](https://getbootstrap.com/docs/5.1/components/card/) + +Cards provide a flexible and extensible content container with multiple variants and options. + `, + }, + }, + }, +}; + +export { default as Card } from './examples/Card/Card'; +export { default as ContentTypes } from './examples/Card/ContentTypes'; +export { default as ListGroups } from './examples/Card/ListGroup'; +export { default as KitchenSink } from './examples/Card/KitchenSInk'; +export { default as HeadersAndFooters } from './examples/Card/HeaderFooter'; +export { default as Sizing } from './examples/Card/Sizing'; +export { default as TextAlignment } from './examples/Card/Alignment'; +export { default as ImageCaps } from './examples/Card/ImageCaps'; +export { default as ImageOverlay } from './examples/Card/ImageOverlay'; +export { default as Backgrounds } from './examples/Card/Backgrounds'; +export { default as Border } from './examples/Card/Outline'; +export { default as CardGroups } from './examples/Card/Groups'; +export { default as CardColumns } from './examples/Card/Columns'; +export { default as Props } from './examples/Card/Props'; diff --git a/stories/Carousel.stories.js b/stories/Carousel.stories.js new file mode 100644 index 000000000..b20a7897a --- /dev/null +++ b/stories/Carousel.stories.js @@ -0,0 +1,19 @@ +export default { + title: 'Components/Carousel', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Carousel](https://getbootstrap.com/docs/5.1/components/carousel/) + + A slideshow component for cycling through elements, images, or slides of text — like a carousel. + `, + }, + }, + }, +}; + +export { default as Carousel } from './examples/Carousel/Carousel'; +export { default as CustomTag } from './examples/Carousel/CustomTag'; +export { default as Uncontrolled } from './examples/Carousel/Uncontrolled'; +export { default as Props } from './examples/Carousel/Props'; diff --git a/stories/CloseButton.stories.js b/stories/CloseButton.stories.js new file mode 100644 index 000000000..9e0e3cf06 --- /dev/null +++ b/stories/CloseButton.stories.js @@ -0,0 +1,19 @@ +export default { + title: 'Components/CloseButton', + parameters: { + docs: { + description: { + component: ` + [Bootstrap CloseButton](https://getbootstrap.com/docs/5.2/components/close-button/) + + A generic close button for dismissing content like modals and alerts. + `, + }, + }, + }, +}; + +export { default as CloseButton } from './examples/CloseButton/CloseButton'; +export { default as CloseButtonDisabled } from './examples/CloseButton/Disabled'; +export { default as CloseButtonWhite } from './examples/CloseButton/White'; +export { default as Props } from './examples/CloseButton/Props'; diff --git a/stories/Collapse.stories.js b/stories/Collapse.stories.js new file mode 100644 index 000000000..bcda9b66f --- /dev/null +++ b/stories/Collapse.stories.js @@ -0,0 +1,20 @@ +export default { + title: 'Components/Collapse', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Collapse](https://getbootstrap.com/docs/5.1/components/collapse/) + + Toggle the visibility of content across your project with Collapse. + `, + }, + }, + }, +}; + +export { default as Collapse } from './examples/Collapse/Collapse'; +export { default as CollapseEvents } from './examples/Collapse/Events'; +export { default as CollapseHorizontal } from './examples/Collapse/Horizontal'; +export { default as CollapseUncontrolled } from './examples/Collapse/Uncontrolled'; +export { default as Props } from './examples/Collapse/Props'; diff --git a/stories/Dropdown.stories.js b/stories/Dropdown.stories.js new file mode 100644 index 000000000..52eb3eb7a --- /dev/null +++ b/stories/Dropdown.stories.js @@ -0,0 +1,26 @@ +export default { + title: 'Components/Dropdown', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Dropdowns](https://getbootstrap.com/docs/5.1/components/dropdowns/) + + Toggle contextual overlays for displaying lists of links and more with Dropdowns. + `, + }, + }, + }, +}; + +export { default as Dropdown } from './examples/Dropdown/Dropdown'; +export { default as SplitButton } from './examples/Dropdown/Split'; +export { default as Sizing } from './examples/Dropdown/Sizing'; +export { default as DarkDropdown } from './examples/Dropdown/Dark'; +export { default as Directions } from './examples/Dropdown/DirectionKitchen'; +export { default as SetActiveFromChild } from './examples/Dropdown/SetActiveFromChild'; + +export { default as Container } from './examples/Dropdown/Container'; +export { default as Uncontrolled } from './examples/Dropdown/Uncontrolled'; +export { default as CustomDropdown } from './examples/Dropdown/Custom'; +export { default as Props } from './examples/Dropdown/Props'; diff --git a/stories/Fade.stories.js b/stories/Fade.stories.js new file mode 100644 index 000000000..a4eecf8de --- /dev/null +++ b/stories/Fade.stories.js @@ -0,0 +1,6 @@ +export default { + title: 'Components/Fade', +}; + +export { default as Fade } from './examples/Fade'; +export { default as Props } from './examples/FadeProps'; diff --git a/stories/Forms.stories.js b/stories/Forms.stories.js new file mode 100644 index 000000000..0c49342ce --- /dev/null +++ b/stories/Forms.stories.js @@ -0,0 +1,29 @@ +export default { + title: 'Components/Forms', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Forms](https://getbootstrap.com/docs/5.1/forms/overview/) + + Form controls, layout options, and custom components for creating a wide variety of forms. + `, + }, + }, + }, +}; + +export { default as Input } from './examples/Form/Input'; +export { default as Form } from './examples/Form/Form'; +export { default as FormFeedback } from './examples/Form/FormFeedback'; +export { default as FormGrid } from './examples/Form/FormGrid'; +export { default as FormGridFormRow } from './examples/Form/FormGridFormRow'; +export { default as FormInline } from './examples/Form/FormInline'; +export { default as FloatingLabels } from './examples/Form/LabelFloating'; +export { default as HiddenLabels } from './examples/Form/LabelHidden'; +export { default as InlineCheckboxes } from './examples/Form/InlineCheckboxes'; +export { default as InputGridSizing } from './examples/Form/InputGridSizing'; +export { default as InputSizing } from './examples/Form/InputSizing'; +export { default as InputType } from './examples/Form/InputType'; +export { default as Switches } from './examples/Form/Switches'; +export { default as Props } from './examples/Form/FormProps'; diff --git a/stories/GitHub.stories.mdx b/stories/GitHub.stories.mdx new file mode 100644 index 000000000..10b7ccdc5 --- /dev/null +++ b/stories/GitHub.stories.mdx @@ -0,0 +1,10 @@ +import { Meta } from '@storybook/addon-docs'; +import { Button } from 'reactstrap'; + + + +### Reactstrap is hosted on GitHub: + +[https://github.com/reactstrap/reactstrap](https://github.com/reactstrap/reactstrap) + +For support, please create [an issue](https://github.com/reactstrap/reactstrap/issues). diff --git a/stories/Index.stories.mdx b/stories/Index.stories.mdx new file mode 100644 index 000000000..626d44605 --- /dev/null +++ b/stories/Index.stories.mdx @@ -0,0 +1,129 @@ +import { Meta } from '@storybook/addon-docs'; +import { Button } from 'reactstrap'; + + + + + +### Reactstrap is a [React](https://reactjs.org) component library for [Bootstrap](https://getbootstrap.com) + +Reactstrap is currently compatible with Bootstrap 5.1. If you are using Bootstrap 4, you'll need to use [Reactstrap v8](https://deploy-preview-2356--reactstrap.netlify.app/) + +## Getting Started + +### Install Reactstrap: + +```sh +npm install reactstrap react react-dom +``` + +Reactstrap currently requires React 16.8 or higher. + +### Include Bootstrap + +Either: + +1. Import Bootstrap in your application code: + +```sh +npm install --save bootstrap +``` + +```javascript +import 'bootstrap/dist/css/bootstrap.min.css'; +``` + +2. or include Bootstrap from a CDN URL in your HTML layout: + +```html + + + +``` + +### Import components: + +```jsx +import React from 'react'; +import { Button } from 'reactstrap'; + +export default (props) => { + return ; +}; +``` + +## About + +Unlike some component libraries, Reactstrap does not embed its own styles, and instead depends on the Bootstrap CSS framework for its styles and theme. +This allows you to have consistent styles across your React-based components and static parts of your site, and allows you to include your own custom Bootstrap theme when needed. + +Unlike using Bootstrap in HTML, Reactstrap exports all the correct Bootstrap classes automatically, and don't need to use or include Bootstrap's JavaScript files or add data attributes to trigger functionality. Instead, components are defined in React-friendly components with appropriate props for you to control. + +So instead of: + +```html + ++ ++ + ++ + ++ + ++ + ++ ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ + ++ ++``` + +You can use: + +```jsx +// React +import { Modal, ModalBody, ModalHeader } from 'reactstrap'; +... +++ +setOpen(false)}> + + +``` + +#### CSSModule + +You can use `cssModule` to change the underlying component's default CSS className. This is an escape hatch +if you do not want to use the default bootstrap class. + +For example Button renders with a default class `.btn`. You can use + +```jsx + +``` + +so that Button renders with `.hyperspeed-btn` instead of `.btn`. + +You can use `setGlobalCssModule` function to set custom classes globally. + +```jsx +import { Util } from 'reactstrap'; + +Util.setGlobalCssModule({ + btn: 'hyperspeed-btn', +}); +``` diff --git a/stories/InputGroup.stories.js b/stories/InputGroup.stories.js new file mode 100644 index 000000000..7b0707c04 --- /dev/null +++ b/stories/InputGroup.stories.js @@ -0,0 +1,21 @@ +export default { + title: 'Components/InputGroup', + parameters: { + docs: { + description: { + component: ` + [Bootstrap InputGroup](https://getbootstrap.com/docs/5.1/forms/input-group/) + + Extend form controls by adding text, buttons, or button groups on either side of textual inputs, custom selects, and custom file inputs. + `, + }, + }, + }, +}; + +export { default as InputGroup } from './examples/InputGroup/Overview'; +export { default as Sizing } from './examples/InputGroup/Sizing'; +export { default as MultipleAddons } from './examples/InputGroup/Addon'; +export { default as ButtonAddons } from './examples/InputGroup/Button'; +export { default as ButtonShorthand } from './examples/InputGroup/ButtonShorthand'; +export { default as Props } from './examples/InputGroup/Props'; diff --git a/stories/Layout.stories.js b/stories/Layout.stories.js new file mode 100644 index 000000000..e6d644b81 --- /dev/null +++ b/stories/Layout.stories.js @@ -0,0 +1,19 @@ +export default { + title: 'Components/Layout', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Layout](https://getbootstrap.com/docs/5.1/layout/grid/) + + Powerful mobile-first flexbox grid to build layouts of all shapes and sizes thanks to a twelve column system, six default responsive tiers. + `, + }, + }, + }, +}; + +export { default as Layout } from './examples/Layout'; +export { default as LayoutRowCols } from './examples/LayoutRowCols'; +export { default as ContainerResponsive } from './examples/ContainerResponsive'; +export { default as Props } from './examples/LayoutProps'; diff --git a/stories/List.stories.js b/stories/List.stories.js new file mode 100644 index 000000000..8901d668d --- /dev/null +++ b/stories/List.stories.js @@ -0,0 +1,16 @@ +export default { + title: 'Components/List', + parameters: { + docs: { + description: { + component: + '[Bootstrap Lists](https://getbootstrap.com/docs/5.1/content/typography/#lists)', + }, + }, + }, +}; + +export { default as List } from './examples/List/List'; +export { default as Inline } from './examples/List/Inline'; +export { default as Unstyled } from './examples/List/Unstyled'; +export { default as Props } from './examples/List/Props'; diff --git a/stories/ListGroup.stories.js b/stories/ListGroup.stories.js new file mode 100644 index 000000000..ebce31b44 --- /dev/null +++ b/stories/ListGroup.stories.js @@ -0,0 +1,26 @@ +export default { + title: 'Components/ListGroup', + parameters: { + docs: { + description: { + component: ` + [Bootstrap ListGroup](https://getbootstrap.com/docs/5.1/components/list-group/) + + A flexible and powerful component for displaying a series of content. + `, + }, + }, + }, +}; + +export { default as ListGroup } from './examples/ListGroup/ListGroup'; +export { default as Active } from './examples/ListGroup/Active'; +export { default as DisabledItems } from './examples/ListGroup/DisabledItems'; +export { default as LinksAndButtons } from './examples/ListGroup/LinksAndButtons'; +export { default as Flush } from './examples/ListGroup/Flush'; +export { default as Numbered } from './examples/ListGroup/Numbered'; +export { default as Horizontal } from './examples/ListGroup/Horizontal'; +export { default as ContextualClasses } from './examples/ListGroup/ContextualClasses'; +export { default as Badge } from './examples/ListGroup/Badge'; +export { default as CustomContent } from './examples/ListGroup/CustomContent'; +export { default as Props } from './examples/ListGroup/Props'; diff --git a/stories/Modal.stories.js b/stories/Modal.stories.js new file mode 100644 index 000000000..0f8be1f7b --- /dev/null +++ b/stories/Modal.stories.js @@ -0,0 +1,26 @@ +export default { + title: 'Components/Modal', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Modal](https://getbootstrap.com/docs/5.1/components/modal/) + + Add dialogs to your site for lightboxes, user notifications, or completely custom content. + `, + }, + }, + }, +}; + +export { default as Modal } from './examples/Modal/Modal'; +export { default as Backdrop } from './examples/Modal/Backdrop'; +export { default as CustomCloseButton } from './examples/Modal/CustomCloseButton'; +export { default as CustomTimeout } from './examples/Modal/CustomTimeout'; +export { default as Destructuring } from './examples/Modal/Destructuring'; +export { default as External } from './examples/Modal/External'; +export { default as Fadeless } from './examples/Modal/Fadeless'; +export { default as FocusAfterClose } from './examples/Modal/FocusAfterClose'; +export { default as Fullscreen } from './examples/Modal/Fullscreen'; +export { default as Nested } from './examples/Modal/Nested'; +export { default as Props } from './examples/Modal/Props'; diff --git a/stories/Nav.stories.js b/stories/Nav.stories.js new file mode 100644 index 000000000..e18644966 --- /dev/null +++ b/stories/Nav.stories.js @@ -0,0 +1,23 @@ +export default { + title: 'Components/Nav', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Navs](https://getbootstrap.com/docs/5.1/components/navs-tabs/) + + Bootstrap’s navigation components. + `, + }, + }, + }, +}; + +export { default as Navs } from './examples/Nav/Navs'; +export { default as Vertical } from './examples/Nav/Vertical'; +export { default as Tabs } from './examples/Nav/Tabs'; +export { default as Pills } from './examples/Nav/Pills'; +export { default as Fill } from './examples/Nav/Fill'; +export { default as Justify } from './examples/Nav/Justify'; +export { default as TabPane } from './examples/Nav/TabPane'; +export { default as Props } from './examples/Nav/Props'; diff --git a/stories/Navbar.stories.js b/stories/Navbar.stories.js new file mode 100644 index 000000000..a9399dbc2 --- /dev/null +++ b/stories/Navbar.stories.js @@ -0,0 +1,19 @@ +export default { + title: 'Components/Navbar', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Navbar](https://getbootstrap.com/docs/5.1/components/navbar/) + + Bootstrap’s powerful, responsive navigation header. Includes support for branding, navigation, and more. + `, + }, + }, + }, +}; + +export { default as Navbar } from './examples/Navbar/Navbar'; +export { default as Brand } from './examples/Navbar/Brand'; +export { default as NavbarToggler } from './examples/Navbar/Toggler'; +export { default as Props } from './examples/Navbar/Props'; diff --git a/stories/Offcanvas.stories.js b/stories/Offcanvas.stories.js new file mode 100644 index 000000000..08d24e928 --- /dev/null +++ b/stories/Offcanvas.stories.js @@ -0,0 +1,17 @@ +export default { + title: 'Components/Offcanvas', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Offcanvas](https://getbootstrap.com/docs/5.1/components/offcanvas/) + + Add hidden sidebars into your project for navigation, shopping carts, and more. + `, + }, + }, + }, +}; + +export { default as Offcanvas } from './examples/Offcanvas/Offcanvas'; +export { default as Props } from './examples/Offcanvas/OffcanvasProps'; diff --git a/stories/Pagination.stories.js b/stories/Pagination.stories.js new file mode 100644 index 000000000..41beeaf83 --- /dev/null +++ b/stories/Pagination.stories.js @@ -0,0 +1,20 @@ +export default { + title: 'Components/Pagination', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Pagination](https://getbootstrap.com/docs/5.1/components/pagination/) + + Use Pagination to indicate that a series of related content exists across multiple pages. + `, + }, + }, + }, +}; + +export { default as Pagination } from './examples/Pagination/Pagination'; +export { default as Large } from './examples/Pagination/SizingLarge'; +export { default as Small } from './examples/Pagination/SizingSmall'; +export { default as State } from './examples/Pagination/State'; +export { default as Props } from './examples/Pagination/Props'; diff --git a/stories/Placeholder.stories.js b/stories/Placeholder.stories.js new file mode 100644 index 000000000..6e546988c --- /dev/null +++ b/stories/Placeholder.stories.js @@ -0,0 +1,20 @@ +export default { + title: 'Components/Placeholder', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Placeholder](https://getbootstrap.com/docs/5.2/components/placeholders/) + + Use loading placeholders for your components or pages to indicate something may still be loading. + `, + }, + }, + }, +}; + +export { default as Placeholder } from './examples/Placeholder/Placeholder'; +export { default as Color } from './examples/Placeholder/Color'; +export { default as Sizing } from './examples/Placeholder/Size'; +export { default as Animation } from './examples/Placeholder/Animation'; +export { default as Props } from './examples/Placeholder/Props'; diff --git a/stories/Popover.stories.js b/stories/Popover.stories.js new file mode 100644 index 000000000..cb2dc24cb --- /dev/null +++ b/stories/Popover.stories.js @@ -0,0 +1,18 @@ +export default { + title: 'Components/Popover', + parameters: { + docs: { + description: { + component: + '[Bootstrap Popovers](https://getbootstrap.com/docs/5.1/components/popovers/)', + }, + }, + }, +}; + +export { default as Popover } from './examples/Popover/Popover'; +export { default as Focus } from './examples/Popover/Focus'; +export { default as FourDirections } from './examples/Popover/Multi'; +export { default as Uncontrolled } from './examples/Popover/Uncontrolled'; +export { default as Update } from './examples/Popover/Update'; +export { default as Props } from './examples/Popover/Props'; diff --git a/stories/Progress.stories.js b/stories/Progress.stories.js new file mode 100644 index 000000000..bf2ee17fc --- /dev/null +++ b/stories/Progress.stories.js @@ -0,0 +1,21 @@ +export default { + title: 'Components/Progress', + parameters: { + docs: { + description: { + component: + '[Bootstrap Progress](https://getbootstrap.com/docs/5.1/components/progress/)', + }, + }, + }, +}; + +export { default as Progress } from './examples/Progress/Progress'; +export { default as Labels } from './examples/Progress/Labels'; +export { default as Height } from './examples/Progress/Height'; +export { default as Color } from './examples/Progress/Color'; +export { default as Multi } from './examples/Progress/Multi'; +export { default as Striped } from './examples/Progress/Striped'; +export { default as Animated } from './examples/Progress/Animated'; +export { default as Max } from './examples/Progress/Max'; +export { default as Props } from './examples/Progress/Props'; diff --git a/stories/Spinner.stories.js b/stories/Spinner.stories.js new file mode 100644 index 000000000..3bd3ff085 --- /dev/null +++ b/stories/Spinner.stories.js @@ -0,0 +1,23 @@ +export default { + title: 'Components/Spinner', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Spinners](https://getbootstrap.com/docs/5.1/components/spinners/) + + Indicate the loading state of a component or page with Spinners. + `, + }, + }, + }, +}; + +export { default as Spinner } from './examples/Spinner/Spinner'; +export { default as Colors } from './examples/Spinner/Colors'; +export { default as GrowingSpinner } from './examples/Spinner/Grower'; +export { default as Alignment } from './examples/Spinner/Alignment'; +export { default as Size } from './examples/Spinner/Size'; +export { default as CustomSize } from './examples/Spinner/CustomSize'; +export { default as Buttons } from './examples/Spinner/Button'; +export { default as Props } from './examples/Spinner/Props'; diff --git a/stories/Table.stories.js b/stories/Table.stories.js new file mode 100644 index 000000000..381b239b3 --- /dev/null +++ b/stories/Table.stories.js @@ -0,0 +1,22 @@ +export default { + title: 'Components/Table', + parameters: { + docs: { + description: { + component: + '[Bootstrap Tables](https://getbootstrap.com/docs/5.1/content/tables/)', + }, + }, + }, +}; + +export { default as Table } from './examples/Table/Table'; +export { default as Variants } from './examples/Table/Variants'; +export { default as Striped } from './examples/Table/Striped'; +export { default as HoverableRows } from './examples/Table/Hover'; +export { default as Bordered } from './examples/Table/Bordered'; +export { default as Borderless } from './examples/Table/Borderless'; +export { default as SmallTable } from './examples/Table/Sizing'; +export { default as Dark } from './examples/Table/Dark'; +export { default as Responsive } from './examples/Table/Responsive'; +export { default as Props } from './examples/Table/Props'; diff --git a/stories/Toast.stories.js b/stories/Toast.stories.js new file mode 100644 index 000000000..e92c069bb --- /dev/null +++ b/stories/Toast.stories.js @@ -0,0 +1,19 @@ +export default { + title: 'Components/Toast', + parameters: { + docs: { + description: { + component: ` + [Bootstrap Toasts](https://getbootstrap.com/docs/5.1/components/toasts/) + + Push notifications to your visitors with a Toast, a lightweight and easily customizable alert message. + `, + }, + }, + }, +}; + +export { default as Toast } from './examples/Toast'; +export { default as ToastDismiss } from './examples/ToastDismiss'; +export { default as ToastHeaderIcon } from './examples/ToastHeaderIcon'; +export { default as Props } from './examples/ToastProps'; diff --git a/stories/Tooltip.stories.js b/stories/Tooltip.stories.js new file mode 100644 index 000000000..160253592 --- /dev/null +++ b/stories/Tooltip.stories.js @@ -0,0 +1,18 @@ +export default { + title: 'Components/Tooltip', + parameters: { + docs: { + description: { + component: + '[Bootstrap Tooltips](https://getbootstrap.com/docs/5.1/components/tooltips/)', + }, + }, + }, +}; + +export { default as Tooltip } from './examples/Tooltip/Tooltip'; +export { default as Directions } from './examples/Tooltip/Directions'; +export { default as AutoHide } from './examples/Tooltip/AutoHide'; +export { default as Uncontrolled } from './examples/Tooltip/Uncontrolled'; +export { default as Update } from './examples/Tooltip/Update'; +export { default as Props } from './examples/Tooltip/Props'; diff --git a/stories/Upgrading.stories.mdx b/stories/Upgrading.stories.mdx new file mode 100644 index 000000000..ea8ec4d6d --- /dev/null +++ b/stories/Upgrading.stories.mdx @@ -0,0 +1,34 @@ +import { Meta } from '@storybook/addon-docs'; + + + +# Upgrading to Reactstrap 9 + +Reactstrap 9+ now requires on [Bootstrap 5.1+](https://getbootstrap.com/docs/5.1/getting-started/introduction/). +Do not upgrade to Reactstrap v9 if you are using Bootstrap version 4. + +Please see the Bootstrap [Migration Guide](https://getbootstrap.com/docs/5.1/migration/#components) for more details. + +### Removed components + +- InputGroupAddon - + This in no longer needed in Bootstrap 5, you can now add Buttons, Inputs directly to InputGroups in the order you wish. +- InputGroupButtonDropdown - + This can now be replaced with a regular Dropdown component. +- CustomInput - + These are no longer needed in Bootstrap 5, since all form inputs will be styled by Bootstrap instead of browser default. + The existing Input component now supports file, select, switch, and range types. +- Jumbotron - + Jumbotrons have been removed from Bootstrap 5, can be replaced with `+ Modal title + ++ Modal body text goes here. + +`. + Jumbotron fluid can be replaced with `` + +### Components with breaking changes: + +- Tooltip/Popover/DropdownMenu - + The `modifiers` prop will now conform to the new popper2 modifiers, which take an array instead of an object. + `offset` prop is now an array of 2 numbers that represent skidding and distance. See [popper docs](https://popper.js.org/docs/v2/modifiers/) for more details. +- ModalHeader/ToastHeader - + Bootstrap 5 no longer supports custom close icons, so this feature was removed from ModalHeader and ToastHeader. +- Dropdown/DropdownMenu - + The `left` and `right` properties are deprecated, but still supported for backwards compatibility. + Now replaced with `start` and `end` in Bootstrap 5. diff --git a/stories/examples/Accordion/Accordion.js b/stories/examples/Accordion/Accordion.js new file mode 100644 index 000000000..7ffdeb6e5 --- /dev/null +++ b/stories/examples/Accordion/Accordion.js @@ -0,0 +1,15 @@ +import Example from './AccordionExample'; +// eslint-disable-next-line import/extensions +import AccordionCode from '!!raw-loader!./AccordionExample'; + +export default Example; + +Example.parameters = { + docs: { + source: { + code: AccordionCode, + language: 'jsx', + type: 'auto', + }, + }, +}; diff --git a/stories/examples/Accordion/AccordionExample.js b/stories/examples/Accordion/AccordionExample.js new file mode 100644 index 000000000..4c1e8be92 --- /dev/null +++ b/stories/examples/Accordion/AccordionExample.js @@ -0,0 +1,57 @@ +import React, { useState } from 'react'; +import { + Accordion, + AccordionBody, + AccordionHeader, + AccordionItem, +} from 'reactstrap'; + +function Example(props) { + const [open, setOpen] = useState('1'); + const toggle = (id) => { + if (open === id) { + setOpen(''); + } else { + setOpen(id); + } + }; + + return ( +++ ); +} + +export default Example; diff --git a/stories/examples/Accordion/AccordionFlush.js b/stories/examples/Accordion/AccordionFlush.js new file mode 100644 index 000000000..fdbc2a746 --- /dev/null +++ b/stories/examples/Accordion/AccordionFlush.js @@ -0,0 +1,19 @@ +import Example from './AccordionFlushExample'; +// eslint-disable-next-line import/extensions +import AccordionCode from '!!raw-loader!./AccordionFlushExample'; + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'Add `flush` to remove the default background-color, some borders, and some rounded corners to render accordions edge-to-edge with their parent container.', + }, + source: { + code: AccordionCode, + language: 'jsx', + type: 'auto', + }, + }, +}; diff --git a/stories/examples/Accordion/AccordionFlushExample.js b/stories/examples/Accordion/AccordionFlushExample.js new file mode 100644 index 000000000..42d9f4f8d --- /dev/null +++ b/stories/examples/Accordion/AccordionFlushExample.js @@ -0,0 +1,57 @@ +import React, { useState } from 'react'; +import { + Accordion, + AccordionBody, + AccordionHeader, + AccordionItem, +} from 'reactstrap'; + +function Example(props) { + const [open, setOpen] = useState(''); + const toggle = (id) => { + if (open === id) { + setOpen(''); + } else { + setOpen(id); + } + }; + + return ( ++ ++ +Accordion Item 1 ++ This is the first item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can + go within the +.accordion-body
, though the transition + does limit overflow. ++ +Accordion Item 2 ++ This is the second item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can + go within the +.accordion-body
, though the transition + does limit overflow. ++ +Accordion Item 3 ++ This is the third item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can + go within the +.accordion-body
, though the transition + does limit overflow. +++ ); +} + +export default Example; diff --git a/stories/examples/Accordion/AccordionProps.js b/stories/examples/Accordion/AccordionProps.js new file mode 100644 index 000000000..2a1d8190b --- /dev/null +++ b/stories/examples/Accordion/AccordionProps.js @@ -0,0 +1,18 @@ +import React from 'react'; +import { + Accordion, + AccordionBody, + AccordionHeader, + AccordionItem, +} from 'reactstrap'; +import Props from '../Props'; + +function Example() { + return ( ++ ++ +Accordion Item 1 ++ This is the first item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can + go within the +.accordion-body
, though the transition + does limit overflow. ++ +Accordion Item 2 ++ This is the second item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can + go within the +.accordion-body
, though the transition + does limit overflow. ++ +Accordion Item 3 ++ This is the third item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can + go within the +.accordion-body
, though the transition + does limit overflow. ++ ); +} + +export default Example; diff --git a/stories/examples/Accordion/AccordionStayOpen.js b/stories/examples/Accordion/AccordionStayOpen.js new file mode 100644 index 000000000..258f7638d --- /dev/null +++ b/stories/examples/Accordion/AccordionStayOpen.js @@ -0,0 +1,55 @@ +import React from 'react'; +import { + UncontrolledAccordion, + AccordionBody, + AccordionHeader, + AccordionItem, +} from 'reactstrap'; + +function Example(props) { + return ( + + + ); +} + +Example.parameters = { + docs: { + description: { + story: + 'Add `stayOpen` to make accordion items stay open when another item is opened.', + }, + }, +}; + +export default Example; diff --git a/stories/examples/Accordion/AccordionUncontrolled.js b/stories/examples/Accordion/AccordionUncontrolled.js new file mode 100644 index 000000000..ab9674268 --- /dev/null +++ b/stories/examples/Accordion/AccordionUncontrolled.js @@ -0,0 +1,55 @@ +import React from 'react'; +import { + UncontrolledAccordion, + AccordionBody, + AccordionHeader, + AccordionItem, +} from 'reactstrap'; + +function Example(props) { + return ( ++ +Accordion Item 1 ++ This is the first item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can go + within the +.accordion-body
, though the transition does + limit overflow. ++ +Accordion Item 2 ++ This is the second item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can go + within the +.accordion-body
, though the transition does + limit overflow. ++ +Accordion Item 3 ++ This is the third item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can go + within the +.accordion-body
, though the transition does + limit overflow. ++ + ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'Or if you hate messing with states, you can always use an `UncontrolledAccordion`', + }, + }, +}; diff --git a/stories/examples/Accordion/AccordionUncontrolledExample.js b/stories/examples/Accordion/AccordionUncontrolledExample.js new file mode 100644 index 000000000..e9f5c10b0 --- /dev/null +++ b/stories/examples/Accordion/AccordionUncontrolledExample.js @@ -0,0 +1,48 @@ +import React from 'react'; +import { + UncontrolledAccordion, + AccordionBody, + AccordionHeader, + AccordionItem, +} from 'reactstrap'; + +function Example(props) { + return ( ++ +Accordion Item 1 ++ This is the first item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can go + within the +.accordion-body
, though the transition does + limit overflow. ++ +Accordion Item 2 ++ This is the second item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can go + within the +.accordion-body
, though the transition does + limit overflow. ++ +Accordion Item 3 ++ This is the third item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can go + within the +.accordion-body
, though the transition does + limit overflow. +++ ); +} + +export default Example; diff --git a/stories/examples/Alert/Alert.js b/stories/examples/Alert/Alert.js new file mode 100644 index 000000000..80a5a2485 --- /dev/null +++ b/stories/examples/Alert/Alert.js @@ -0,0 +1,21 @@ +import React from 'react'; +import { Alert } from 'reactstrap'; +import { colors } from '../options'; + +function Example(args) { + return+ ++ +Accordion Item 1 ++ This is the first item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can + go within the +.accordion-body
, though the transition + does limit overflow. ++ +Accordion Item 2 ++ This is the second item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can + go within the +.accordion-body
, though the transition + does limit overflow. ++ +Accordion Item 3 ++ This is the third item's accordion body. + You can modify any of this with custom CSS or overriding our default + variables. It's also worth noting that just about any HTML can + go within the +.accordion-body
, though the transition + does limit overflow. +; +} + +Example.args = { + children: 'Hey! Pay attention.', + color: 'primary', +}; + +Example.argTypes = { + color: { + control: { type: 'select' }, + options: colors, + }, +}; + +export default Example; diff --git a/stories/examples/Alert/Colors.js b/stories/examples/Alert/Colors.js new file mode 100644 index 000000000..1f881cd27 --- /dev/null +++ b/stories/examples/Alert/Colors.js @@ -0,0 +1,17 @@ +import React from 'react'; +import { Alert } from 'reactstrap'; +import { colors } from '../options'; + +function Example(props) { + return ( + <> + {colors.map((color) => ( + + This is a primary alert — check it out! + + ))} + > + ); +} + +export default Example; diff --git a/stories/examples/Alert/Content.js b/stories/examples/Alert/Content.js new file mode 100644 index 000000000..7d0b420c1 --- /dev/null +++ b/stories/examples/Alert/Content.js @@ -0,0 +1,31 @@ +import React from 'react'; +import { Alert } from 'reactstrap'; + +function Example(props) { + return ( ++ + ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'Alerts can also contain additional HTML elements like headings, paragraphs and dividers.', + }, + }, +}; diff --git a/stories/examples/Alert/Dismiss.js b/stories/examples/Alert/Dismiss.js new file mode 100644 index 000000000..2cdc55fc8 --- /dev/null +++ b/stories/examples/Alert/Dismiss.js @@ -0,0 +1,18 @@ +import Example from './DismissExample'; +// eslint-disable-next-line import/extensions +import AlertDismiss from '!!raw-loader!./DismissExample'; + +export default Example; + +Example.parameters = { + docs: { + description: { + story: 'Alerts can also be dismissed.', + }, + source: { + code: AlertDismiss, + language: 'jsx', + type: 'auto', + }, + }, +}; diff --git a/stories/examples/Alert/DismissExample.js b/stories/examples/Alert/DismissExample.js new file mode 100644 index 000000000..15a5c63d5 --- /dev/null +++ b/stories/examples/Alert/DismissExample.js @@ -0,0 +1,16 @@ +import React, { useState } from 'react'; +import { Alert } from 'reactstrap'; + +function AlertExample(props) { + const [visible, setVisible] = useState(true); + + const onDismiss = () => setVisible(false); + + return ( +Well done!
++ Aww yeah, you successfully read this important alert message. This + example text is going to run a bit longer so that you can see how + spacing within an alert works with this kind of content. +
+
++ Whenever you need to, be sure to use margin utilities to keep things + nice and tidy. +
++ I am an alert and I can be dismissed! + + ); +} + +export default AlertExample; diff --git a/stories/examples/Alert/Fadeless.js b/stories/examples/Alert/Fadeless.js new file mode 100644 index 000000000..0e4bf39a7 --- /dev/null +++ b/stories/examples/Alert/Fadeless.js @@ -0,0 +1,27 @@ +import React, { useState } from 'react'; +import { UncontrolledAlert } from 'reactstrap'; +import Alert from '../../../src/Alert'; + +export function AlertFadelessExample(props) { + const [visible, setVisible] = useState(true); + + const onDismiss = () => setVisible(false); + + return ( +++ ); +} + +export function UncontrolledAlertFadelessExample() { + return ( ++ I am a primary alert and I can be dismissed without animating! + +++ ); +} diff --git a/stories/examples/Alert/Link.js b/stories/examples/Alert/Link.js new file mode 100644 index 000000000..9d853ad96 --- /dev/null +++ b/stories/examples/Alert/Link.js @@ -0,0 +1,34 @@ +import React from 'react'; +import { Alert } from 'reactstrap'; +import { colors } from '../options'; + +function Example(props) { + return ( + <> + {colors.map((color) => ( ++ I am an alert and I can be dismissed without animating! + ++ This is a primary alert with{' '} + + an example link + + . Give it a click if you like. + + ))} + > + ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: 'Alerts get a matching link color.', + }, + }, +}; diff --git a/stories/examples/Alert/Props.js b/stories/examples/Alert/Props.js new file mode 100644 index 000000000..4c5e7d0cb --- /dev/null +++ b/stories/examples/Alert/Props.js @@ -0,0 +1,9 @@ +import React from 'react'; +import { Alert } from 'reactstrap'; +import Props from '../Props'; + +function Example() { + return; +} + +export default Example; diff --git a/stories/examples/Alert/UncontrolledDismiss.js b/stories/examples/Alert/UncontrolledDismiss.js new file mode 100644 index 000000000..de4d4d65e --- /dev/null +++ b/stories/examples/Alert/UncontrolledDismiss.js @@ -0,0 +1,21 @@ +import React from 'react'; +import { UncontrolledAlert } from 'reactstrap'; + +function Example(props) { + return ( + + I am an alert and I can be dismissed! + + ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'And if you are not a fan of using state, you can always use `UncontrolledAlert`.', + }, + }, +}; diff --git a/stories/examples/Badge/Badge.js b/stories/examples/Badge/Badge.js new file mode 100644 index 000000000..fbe62fd3a --- /dev/null +++ b/stories/examples/Badge/Badge.js @@ -0,0 +1,22 @@ +import React from 'react'; +import { Badge } from 'reactstrap'; +import { colors } from '../options'; + +function Example(args) { + return; +} + +Example.args = { + children: 'New', + color: 'primary', + pill: false, +}; + +Example.argTypes = { + color: { + control: { type: 'select' }, + options: colors, + }, +}; + +export default Example; diff --git a/stories/examples/Badge/Button.js b/stories/examples/Badge/Button.js new file mode 100644 index 000000000..a703e7a8a --- /dev/null +++ b/stories/examples/Badge/Button.js @@ -0,0 +1,23 @@ +import React from 'react'; +import { Badge, Button } from 'reactstrap'; + +function Example(props) { + return ( + + ++ ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'Badges can be used as part of links or buttons to provide a counter.', + }, + }, +}; diff --git a/stories/examples/Badge/Headings.js b/stories/examples/Badge/Headings.js new file mode 100644 index 000000000..786b49171 --- /dev/null +++ b/stories/examples/Badge/Headings.js @@ -0,0 +1,38 @@ +import React from 'react'; +import { Badge } from 'reactstrap'; + +function Example(args) { + return ( + <> ++ Example Heading
+New ++ Example Heading
+New ++ Example Heading
+New ++ Example Heading
+New ++ Example Heading
+New ++ Example Heading
+ > + ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'Badges scale to match the size of the immediate parent element by using relative font sizing and em units. ', + }, + }, +}; diff --git a/stories/examples/Badge/Links.js b/stories/examples/Badge/Links.js new file mode 100644 index 000000000..fda768c26 --- /dev/null +++ b/stories/examples/Badge/Links.js @@ -0,0 +1,35 @@ +import React from 'react'; +import { Badge } from 'reactstrap'; + +function Example(props) { + return ( +New +++ ); +} + +export default Example; diff --git a/stories/examples/Badge/Pills.js b/stories/examples/Badge/Pills.js new file mode 100644 index 000000000..e83df79c1 --- /dev/null +++ b/stories/examples/Badge/Pills.js @@ -0,0 +1,44 @@ +import React from 'react'; +import { Badge } from 'reactstrap'; + +function Example(props) { + return ( ++ Primary + ++ Secondary + ++ Success + ++ Danger + ++ Warning + ++ Info + ++ Light + ++ Dark + +++ ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'Use the `pill` prop to make badges more rounded with a larger border-radius.', + }, + }, +}; diff --git a/stories/examples/Badge/Props.js b/stories/examples/Badge/Props.js new file mode 100644 index 000000000..b1679bcd9 --- /dev/null +++ b/stories/examples/Badge/Props.js @@ -0,0 +1,9 @@ +import React from 'react'; +import { Badge } from 'reactstrap'; +import Props from '../Props'; + +function Example() { + return+ Primary + ++ Secondary + ++ Success + ++ Danger + ++ Warning + ++ Info + ++ Light + ++ Dark + +; +} + +export default Example; diff --git a/stories/examples/Badge/Variations.js b/stories/examples/Badge/Variations.js new file mode 100644 index 000000000..c357b7558 --- /dev/null +++ b/stories/examples/Badge/Variations.js @@ -0,0 +1,30 @@ +import React from 'react'; +import { Badge } from 'reactstrap'; + +function Example(props) { + return ( + ++ ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'Change `color` prop to quickly change the appearance of a badge. You can add `text-dark` class name to get darker text for light backgrounds.', + }, + }, +}; diff --git a/stories/examples/Breadcrump/Breadcrumb.js b/stories/examples/Breadcrump/Breadcrumb.js new file mode 100644 index 000000000..f67c733b7 --- /dev/null +++ b/stories/examples/Breadcrump/Breadcrumb.js @@ -0,0 +1,32 @@ +import React from 'react'; +import { Breadcrumb, BreadcrumbItem } from 'reactstrap'; + +function Example(props) { + return ( + <> +Primary +Secondary +Success +Danger +Warning +Info ++ Light + +Dark ++ +Home ++ ++ {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */} + Home + +Library ++ + > + ); +} + +export default Example; diff --git a/stories/examples/Breadcrump/NoList.js b/stories/examples/Breadcrump/NoList.js new file mode 100644 index 000000000..7c223a25c --- /dev/null +++ b/stories/examples/Breadcrump/NoList.js @@ -0,0 +1,23 @@ +import React from 'react'; +import { Breadcrumb, BreadcrumbItem } from 'reactstrap'; + +function Example(props) { + return ( ++ {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */} + Home + ++ {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */} + Library + +Data ++ + ); +} + +export default Example; diff --git a/stories/examples/Breadcrump/Props.js b/stories/examples/Breadcrump/Props.js new file mode 100644 index 000000000..6feeea381 --- /dev/null +++ b/stories/examples/Breadcrump/Props.js @@ -0,0 +1,9 @@ +import React from 'react'; +import { Breadcrumb, BreadcrumbItem } from 'reactstrap'; +import Props from '../Props'; + +function Example() { + return+ Home + ++ Library + ++ Data + ++ Bootstrap + +; +} + +export default Example; diff --git a/stories/examples/Button/Button.js b/stories/examples/Button/Button.js new file mode 100644 index 000000000..86b62f842 --- /dev/null +++ b/stories/examples/Button/Button.js @@ -0,0 +1,34 @@ +import React from 'react'; +import { Button } from 'reactstrap'; +import { colors } from '../options'; + +function Example(args) { + return ( + + ++ ); +} + +Example.args = { + children: 'Click Me', + color: 'primary', + outline: false, + size: undefined, + block: false, + active: false, + close: false, +}; + +Example.argTypes = { + color: { + control: { type: 'select' }, + options: colors, + }, + size: { + control: { type: 'select' }, + options: ['', 'sm', 'lg'], + }, +}; + +export default Example; diff --git a/stories/examples/Button/Colors.js b/stories/examples/Button/Colors.js new file mode 100644 index 000000000..976b3a227 --- /dev/null +++ b/stories/examples/Button/Colors.js @@ -0,0 +1,26 @@ +import React from 'react'; +import { Button } from 'reactstrap'; + +function Example(props) { + return ( ++ {' '} + {' '} + {' '} + {' '} + {' '} + ++ ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'There are several predefined button styles, each serving its own semantic purpose, with a few extras thrown in for more control.', + }, + }, +}; diff --git a/stories/examples/Button/Disabled.js b/stories/examples/Button/Disabled.js new file mode 100644 index 000000000..fe6aa7b67 --- /dev/null +++ b/stories/examples/Button/Disabled.js @@ -0,0 +1,23 @@ +import React from 'react'; +import { Button } from 'reactstrap'; + +function Example(props) { + return ( ++ {' '} ++ ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'Make buttons look inactive by adding the disabled prop to `Button`. Disabled buttons have `pointer-events: none` applied to, preventing hover and active states from triggering.', + }, + }, +}; diff --git a/stories/examples/Button/Outline.js b/stories/examples/Button/Outline.js new file mode 100644 index 000000000..a8cc79e69 --- /dev/null +++ b/stories/examples/Button/Outline.js @@ -0,0 +1,38 @@ +import React from 'react'; +import { Button } from 'reactstrap'; + +function Example(props) { + return ( ++ {' '} + {' '} + {' '} + {' '} + {' '} + ++ ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'In need of a button, but not the hefty background colors they bring? Add `outline` prop to remove all background images and colors on any button.', + }, + }, +}; diff --git a/stories/examples/Button/Props.js b/stories/examples/Button/Props.js new file mode 100644 index 000000000..d80589ae9 --- /dev/null +++ b/stories/examples/Button/Props.js @@ -0,0 +1,9 @@ +import React from 'react'; +import { Button } from 'reactstrap'; +import Props from '../Props'; + +function Example() { + return; +} + +export default Example; diff --git a/stories/examples/Button/Size.js b/stories/examples/Button/Size.js new file mode 100644 index 000000000..302e39bba --- /dev/null +++ b/stories/examples/Button/Size.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { Button } from 'reactstrap'; + +function Example(props) { + return ( + + {' '} + {' '} + {' '} ++ ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'Fancy larger or smaller buttons? Add `size` prop with `lg` or `sm` values to make button bigger or smaller.', + }, + }, +}; diff --git a/stories/examples/Button/Tags.js b/stories/examples/Button/Tags.js new file mode 100644 index 000000000..b6e49bc0a --- /dev/null +++ b/stories/examples/Button/Tags.js @@ -0,0 +1,25 @@ +import React from 'react'; +import { Button } from 'reactstrap'; + +function Example(props) { + return ( ++ {' '} + {' '} + {' '} ++ ); +} + +export default Example; + +Example.parameters = { + docs: { + description: { + story: + 'The button classes are designed to be used with the `