Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
225 commits
Select commit Hold shift + click to select a range
27caadb
Added required?: boolean; (#1491)
miksansegundo May 29, 2017
d6bdf20
Allow to change FontIcon for Tab by passing it into the factory (#1439)
ankurp Jul 13, 2017
4a13ff2
Fix media queries panel height calculations (#1467)
arpl Jul 13, 2017
4722904
Allow pass inverse to IconMenu (#1490)
kobanyan Jul 13, 2017
a6eb5c5
ListItem legend may be a node as well (#1496)
olegstepura Jul 13, 2017
7db3e34
Avoid undefined className when ProgressBar mode is determinate
javivelasco Jul 13, 2017
8304c1e
Merge branch 'dev' of github.com:soyjavi/react-toolbox into dev
javivelasco Jul 13, 2017
6290cf5
Added label to InputTheme interface (#1501)
mirandamon Jul 13, 2017
0e299a6
allows the Portal HOC root element to receive a style props. This all…
pablolmiranda Jul 13, 2017
df175e7
fix #1611 (#1612)
adumat Aug 2, 2017
fb5d0e1
requestAnimationFrame will only trigger if the browser window is visi…
binhqx Aug 2, 2017
16ae9bf
Remove discord link in README.md (#1593)
bbigras Aug 2, 2017
843b88a
solve #1444 and #1359. (#1587)
Aug 2, 2017
54d0cb5
Fix date-picker animation in IE11 (#1586)
AlexPrinz Aug 2, 2017
f8f528c
Do not show scrollbar on autocomplete component IE11 (#1515)
Doff3n Aug 2, 2017
f44833a
Apply padding 0 to everything but buttons in ListItemAction (#1571)
rubenmoya Aug 2, 2017
7403d5d
Add ThemeProvider Typescript type (#1576)
Pajn Aug 2, 2017
2124c8c
Docs/Install: Fix typos, clarify language (#1566)
gima Aug 2, 2017
431abb1
Add workaround to `is-component-of-type` for `react-hot-loader@^3` (#…
tomchentw Aug 2, 2017
fc9c180
Made role on input field a property (#1553)
jonasknutsen Aug 2, 2017
c1a2dba
fixed browser button fires onChange event twice (#1557)
nicolazj Aug 2, 2017
de69a14
Fix typescript bindings. (#1564)
Airblader Aug 2, 2017
934ffd2
Add `accept` property to `BrowseButton` (#1533)
Satyam Aug 2, 2017
6fd1421
Event passed for Radiogroup (#1544)
nilanshz Aug 2, 2017
736f23e
Issue 1459: Replace onClick handler in Dropdown component to onMouseD…
torpeyp Aug 2, 2017
cd6a130
Change tab style for ripple to work with Tabs (#1519)
osmelmora Aug 2, 2017
f93040e
Add variables for the App Bar's font size and weight. (#1518)
tarnasky Aug 2, 2017
79e031e
Add default export TypeScript type to IconButton (#1577)
Pajn Aug 2, 2017
94f6493
Feature/tabs a11y (#1513)
schlesiger Aug 2, 2017
e15ee8e
Fix Mobile Safari issues. (#1282)
Aug 2, 2017
13520e3
Fix bug where dropdowns don't close (#1548)
tobiasandersen Aug 2, 2017
2eb27c7
Remove max-height from dialog along with hidden overflow
javivelasco Aug 8, 2017
61228b1
Merge branch 'dev' of github.com:soyjavi/react-toolbox into dev
javivelasco Aug 8, 2017
4670098
Make checkbox border color according to spec
olegstepura Aug 9, 2017
889e9ca
Use hover effect on selected table row as well
olegstepura Aug 9, 2017
a46f095
Disabled input should be dashed not dotted
olegstepura Aug 9, 2017
478c9ae
Remove unknown prop multilineHint which React reports as passed to te…
olegstepura Aug 9, 2017
d9a0d7e
Add transition to hover effect in list items
olegstepura Aug 9, 2017
b660bcc
Make checkbox centered between table edge and next column start
olegstepura Aug 9, 2017
31fac7b
fix: of -> or in documentation
Aug 11, 2017
47d2f18
Fix mixed up type definitions for Dropdown
AlexanderOtavka Aug 12, 2017
0f51c06
IconMenu: active prop (fixes #1662).
adamhenson Aug 27, 2017
74bd2dc
IconMenu: active prop (#1662).
adamhenson Aug 27, 2017
bf790d7
IconMenu: active prop (#1662). more tests.
adamhenson Aug 28, 2017
0103d95
IconMenu: active prop (#1662).
adamhenson Aug 28, 2017
8b7fc07
Portal: Fix Invalid "style" PropType (#1664)
adamhenson Sep 1, 2017
91cb46d
Typescript definitions validation (#1163)
panjiesw Sep 1, 2017
071a4d3
Add `multiple` property to `BrowseButton` (#1656)
erquhart Sep 1, 2017
4ca6747
Update readme for Autocomplete (#1657)
pawelrychlik Sep 1, 2017
6d43f88
Fix lint issue (#1624)
Pajn Sep 1, 2017
e1f320c
Fix package.json
javivelasco Sep 1, 2017
11c3fb1
ListItem component theme prop extends ListItemTextTheme.
Sep 5, 2017
14eb6ca
Remove box-shadow on required inputs
rubenmoya Sep 18, 2017
f815fb5
Add title to <Avatar /> image
rubenmoya Sep 18, 2017
b381db4
Fix compatibility with typescript 2.4+ (#1615)
Sep 20, 2017
a828091
Allow autoFocus on Autocomplete component
Sep 21, 2017
ced94a4
Upgrade react-transition-group
Sep 26, 2017
75243c1
Merge branch 'dev' into table-selected-hover
olegstepura Oct 2, 2017
32e4096
Fix travis
olegstepura Oct 2, 2017
17a175b
Merge branch 'dev' into table-ckeckbox-spacing
olegstepura Oct 2, 2017
71341d9
Fix travis
olegstepura Oct 2, 2017
bc05c69
Use window.requestAnimationFrame in Tabs.js
cozybuild Nov 2, 2017
b0a7533
Update URLs to new .io domain
rubenmoya Nov 16, 2017
0286630
adds a span wrapper to the component button in case of its disabled a…
Nov 13, 2017
f78c084
small typo error corrected.
ctrlaltvikas Nov 23, 2017
25172c5
update defaults in input component config.css
jakerichan Nov 27, 2017
3d42ef9
Fix arrows updating issue when children change
merraysy Nov 29, 2017
4347125
Add onEscKeyDown and onOverlayClick fallbacks
merraysy Dec 12, 2017
4d64c73
onchange
bilalkosker Dec 20, 2017
2c92c37
Enable onKeyDown and onKeyUp props on Autocomplete component
clurdish Dec 21, 2017
b79c3da
Update Autocomplete TypeScript declaration file and readme with key c…
clurdish Dec 21, 2017
40aa354
TypeScript: snack-bar label accepts element
3af Jan 3, 2018
51a335b
Add missing Input import
3af Jan 23, 2018
4b93b0f
Merge pull request #1682 from rubenmoya/1639-fix-input-border-firefox
rubenmoya Jan 23, 2018
a91c04b
Merge pull request #1793 from 3af/patch-2
rubenmoya Jan 23, 2018
30d6c4a
Merge pull request #1780 from clurdish/dev
rubenmoya Jan 23, 2018
b76196f
Merge pull request #1778 from bilalkosker/dev
rubenmoya Jan 23, 2018
f462f7d
Merge pull request #1766 from jakerichan/input-element-variables
rubenmoya Jan 23, 2018
1ce99ad
Merge pull request #1764 from vikaskyadav/patch-1
rubenmoya Jan 23, 2018
a714a02
Merge pull request #1758 from rubenmoya/update-new-domain
rubenmoya Jan 23, 2018
2a6b62c
Merge pull request #1755 from pablolmiranda/fixes-tooltip-for-button
rubenmoya Jan 23, 2018
3f14725
Merge pull request #1737 from rndevfx/window-requestAnimationFrame
rubenmoya Jan 23, 2018
5cbcb48
Merge pull request #1683 from rubenmoya/1673-avatar-title
rubenmoya Jan 23, 2018
f75fd26
Merge pull request #1689 from velveret/autocomplete-autofocus
rubenmoya Jan 23, 2018
72dfd21
Merge pull request #1670 from alejandrofdiaz/dev
rubenmoya Jan 23, 2018
aeacbab
Merge pull request #1646 from AlexanderOtavka/patch-1
rubenmoya Jan 23, 2018
a917c8c
Merge pull request #1645 from psastras/fix-doc-typos
rubenmoya Jan 23, 2018
c462c0a
Merge pull request #1630 from olegstepura/list-hover-animation
rubenmoya Jan 23, 2018
fc8e142
Merge pull request #1628 from olegstepura/multilineHint
rubenmoya Jan 23, 2018
e87ffb9
Merge pull request #1768 from merraysy/dev
rubenmoya Jan 24, 2018
b5c755c
Merge pull request #1626 from olegstepura/table-selected-hover
rubenmoya Jan 24, 2018
48cb33e
Merge pull request #1625 from olegstepura/checkbox-border-color
rubenmoya Jan 24, 2018
874d9bf
Merge pull request #1627 from olegstepura/disabled-input
rubenmoya Jan 25, 2018
6925570
Don't handle key events if slider is disabled
rubenmoya Jan 29, 2018
c6a7b5b
Handle onChange in errored input in docs
rubenmoya Jan 29, 2018
a7d0c5b
Use innerRef to blur input
rubenmoya Jan 29, 2018
eb2dd38
Merge pull request #1797 from react-toolbox/input-error-handle-change
rubenmoya Jan 29, 2018
a841d2a
Merge pull request #1781 from 3af/patch-1
rubenmoya Jan 29, 2018
c6a7301
Merge branch 'upstream-dev' into iconmenu-active-prop
adamhenson Feb 10, 2018
7e4c12e
Update versions
rubenmoya Feb 20, 2018
d313e11
Update enzyme config files
rubenmoya Feb 20, 2018
c510029
Update tests to use Enzyme 3
rubenmoya Feb 20, 2018
ab2e789
Update tests to use css-transition-group 2
rubenmoya Feb 20, 2018
08ca837
Update tests to use react-dom/test-utils
rubenmoya Feb 20, 2018
f006708
Fix eslint errors
rubenmoya Feb 20, 2018
6357bed
Fix tsc errors
rubenmoya Feb 20, 2018
752cdd3
Revert "Update components to use css-transition-group 2"
rubenmoya Feb 21, 2018
c600247
Merge branch 'update-v2-react16' into upgrade-react-transition-group
rubenmoya Feb 21, 2018
0da9b72
Merge pull request #1701 from Merbs/upgrade-react-transition-group
rubenmoya Feb 21, 2018
f8a7e88
Use code instead of keyCode
rubenmoya Feb 21, 2018
286c3f7
Revert "Fix arrows updating issue when children change"
merraysy Feb 26, 2018
7f64a43
Merge pull request #1773 from merraysy/merraysy-timepicker-dismiss-issue
rubenmoya Feb 27, 2018
f24d128
Add falsy key example to AutocompleteTest
pmyers88 Feb 27, 2018
1dafc56
Move Input#validPresent to utils#isValuePresent
pmyers88 Feb 27, 2018
f79aaff
Check whether the query key has a value rather than whether it's truthy
pmyers88 Feb 27, 2018
73b2594
Pass the theme prop to TableRow child components
ying-rao Mar 2, 2018
a59af9a
Merge pull request #1814 from react-toolbox/update-v2-react16
rubenmoya Mar 3, 2018
1a7cbac
Merge branch 'dev' into fix-key-events-slider-disabled
rubenmoya Mar 3, 2018
6fa13f1
Use proper code values in KEYS constant 🤦🏻‍♂️
rubenmoya Mar 3, 2018
5ec952a
Merge pull request #1819 from pmyers88/autocomplete-handle-falsy-keys
rubenmoya Mar 3, 2018
570b921
Merge pull request #1633 from olegstepura/table-ckeckbox-spacing
rubenmoya Mar 3, 2018
a473c94
Merge pull request #1824 from yingzuo/passThemeProps
rubenmoya Mar 3, 2018
a325e20
Merge pull request #1663 from adamhenson/iconmenu-active-prop
rubenmoya Mar 3, 2018
24b98ed
Merge pull request #1796 from react-toolbox/fix-key-events-slider-dis…
rubenmoya Mar 5, 2018
470ffae
Link text has text-transform: capitalize, contrary to Material specs,…
KhushilMistry Mar 8, 2018
9020a14
Merge pull request #1828 from KhushilMistry/issue1774
rubenmoya Mar 13, 2018
4a5957b
Set Slider tabIndex to -1 when disabled
dylanseago Mar 20, 2018
af474dd
Add migration guide to the roadmap
AkosLukacs Mar 23, 2018
ecbdb12
Fix mismatch between NPM published version and package.json version
rubenmoya Jun 2, 2018
e362f6b
Release 2.0.0-beta.13
rubenmoya Jun 2, 2018
e0de3b8
remove postcss-cssnext and replace with postcss-preset-env
that1matt Jun 20, 2018
63354a7
update color() to color-mod()
that1matt Jun 20, 2018
9d1aef8
get docs folder working in local & prod env
that1matt Jun 21, 2018
1287d7e
update deps for docs site
that1matt Jun 21, 2018
52b6685
fix margin-top for logo in app-bar
that1matt Jun 21, 2018
664523c
set postcss-preset-env custom-properties preserve to false
that1matt Jun 26, 2018
bfca2e7
add whitespace escape code in markdown files to display tables correc…
that1matt Jun 26, 2018
1115d9e
update README to use postcss-preset-env instead of postcss-cssnext
that1matt Jun 26, 2018
c3bdb54
Add missing innerRef prop to typescript definition
rokoroku Jul 3, 2018
b6107b9
Add option for global variable config in README
that1matt Jul 4, 2018
799d832
Merge pull request #1862 from that1matt/add-postcss-preset-env
rubenmoya Jul 5, 2018
5bf1baf
Merge pull request #1866 from rokoroku/patch-1
rubenmoya Jul 5, 2018
46ecedb
Merge pull request #1836 from AkosLukacs/patch-1
rubenmoya Jul 5, 2018
0ae9f98
Merge pull request #1834 from dylanseago/slider-disabled-tabindex
rubenmoya Jul 5, 2018
691bac3
using ref callback instead of settimeout to update clockNode reference
ankurarora Jul 14, 2018
4dabce9
Merge pull request #1869 from ankurarora/fixes/fix-ref-error-in-timep…
rubenmoya Jul 16, 2018
e655e6c
fix(Dropdown): fix Dropdown not closing when click , resolves #1865
rezak-otmani Jul 24, 2018
3c3156a
Update package.json
Jono20201 Aug 24, 2018
ce30658
Merge pull request #1883 from Jono20201/patch-1
rubenmoya Aug 31, 2018
45b1cd8
fix(Dropdown): fix Dropdown not closing when click , resolves #1865
Sep 4, 2018
b0f7b10
add updated .gitignore and package-lock.json
that1matt Oct 19, 2018
3ec1b0e
upgrade jest, remove unneeded jest.polyfill.js, and move jest config
that1matt Oct 19, 2018
5b59286
update ramda
that1matt Oct 19, 2018
34ddcf1
upgrade style-loader
that1matt Oct 19, 2018
95f701e
upgrade webpack, webpack-dev-middleware, remove extract-css-text-plug…
that1matt Oct 19, 2018
0ddd3f0
fix old color() to color-mod() in style.css for spec
that1matt Oct 19, 2018
d8c579c
fix broken avatar links
that1matt Oct 19, 2018
5e19098
upgrade postcss plugins, and remove duplicate postcss-nesting plugin
that1matt Oct 19, 2018
4587036
remove normalize.css and replace with postcss-normalize
that1matt Oct 19, 2018
fdb177a
remove normalize.css check for style mocking
that1matt Oct 19, 2018
8b9904a
upgrade @types/node
that1matt Oct 19, 2018
8de8cf6
upgrade babel-loader, babel-eslint, & babel-plugin-react-transform
that1matt Oct 19, 2018
53d6619
upgrade gulp, gulp-babel, gulp-postcss, and update gulpfile to use ne…
that1matt Oct 19, 2018
8dff9de
remove sinon from package.json as it was removed in [23b4537]
that1matt Oct 19, 2018
760d020
fix rule missing quotes, and convert to stylelint.config.js
that1matt Oct 19, 2018
a19aea6
upgrade stylelint, stylelint-config-standard, and stylelint-order
that1matt Oct 19, 2018
3d9605b
fix spec style.css linter errors
that1matt Oct 19, 2018
4fa1e04
fix time_picker linter errors
that1matt Oct 19, 2018
20da90a
fix tabs linter errors
that1matt Oct 19, 2018
6047fc4
fix table linter errors
that1matt Oct 19, 2018
931f467
fix snackbar linter errors
that1matt Oct 19, 2018
bd511e4
fix slider linter errors
that1matt Oct 19, 2018
c467990
fix radio linter errors
that1matt Oct 19, 2018
cdb7a12
add postcss-calc to postcss plugin chain, to fix css calc() errors
that1matt Oct 19, 2018
0e0db05
fix progress_bar linter errors
that1matt Oct 19, 2018
15f86b0
fix menu linter errors
that1matt Oct 19, 2018
e3a163d
fix list linter errors
that1matt Oct 19, 2018
cfe1082
fix layout linter errors
that1matt Oct 19, 2018
a671a4a
fix dropdown linter errors
that1matt Oct 19, 2018
672efed
fix some date_picker linter errors
that1matt Oct 19, 2018
efa738c
fix chip linter errors
that1matt Oct 19, 2018
88a8340
fix checkbox linter errors
that1matt Oct 19, 2018
704441a
fix card linter errors
that1matt Oct 19, 2018
4fe7e0f
fix button linter errors
that1matt Oct 19, 2018
6bf936f
fix autocomplete linter errors
that1matt Oct 19, 2018
c5842bb
fix some of input linter erros
that1matt Oct 19, 2018
88c4738
change icon button background from red to gray
that1matt Oct 19, 2018
7832685
upgrade internal-ip
that1matt Oct 19, 2018
764254d
upgrade lint-staged, add husky, and move to husky pre-commit for runn…
that1matt Oct 19, 2018
b9c36dc
upgrade eslint, eslint-config-airbnb, eslint-import-resolver-webpack,…
that1matt Oct 19, 2018
2cab0ee
fix utils eslint errors
that1matt Oct 19, 2018
9c10432
fix eslint errors in prefixer & testing
that1matt Oct 19, 2018
935972b
fix eslint errors in react-css-themr mock
that1matt Oct 19, 2018
66e7293
eslint auto fixes with minor adjustments
that1matt Oct 19, 2018
69214ad
upgrade postcss-preset-env
that1matt Oct 19, 2018
f133e48
change package.json prepublish to parepare, and fix broken event targ…
that1matt Oct 19, 2018
6e38a73
upgrade to babel 7, upgrade gulp-babel & babel-loader to work with ba…
that1matt Oct 19, 2018
cb705f7
add @babel/plugin-transform-runtime, and remove @babel/polyfill from …
that1matt Oct 22, 2018
fff4c01
upgrade typescript, and add allowJS to tsconfig.json
that1matt Oct 22, 2018
801c32b
fix export components in index.js
that1matt Oct 22, 2018
2eef449
move variables.css & colors.css import into postcss.config.js
that1matt Oct 22, 2018
4f7f419
remove react-transform-hmr as it is deprecated
that1matt Oct 22, 2018
a5d50f2
add react-hot-loader, replace mini-css-extract-plugin with extract-cs…
that1matt Oct 23, 2018
32c7812
update package versions
that1matt Oct 23, 2018
cc9423b
upgrade extract-css-chunks-webpack-plugin
that1matt Oct 23, 2018
f268a14
rename .eslintrc to .eslintrc.js as .eslintrc is deprecated
that1matt Oct 23, 2018
02107d9
resolve linter errors, and update eslintrc.js file
that1matt Oct 23, 2018
00c1500
update README with postcss-preset-env changes
that1matt Oct 23, 2018
60cf3f6
remove extranous config option
that1matt Oct 23, 2018
38d5580
remove commented babel settings
that1matt Oct 24, 2018
a84e615
fix stylelint errors
that1matt Oct 24, 2018
9570207
remove yarn.lock
that1matt Oct 24, 2018
8702b0b
fix missing typings
that1matt Oct 24, 2018
6004b2b
Merge pull request #1889 from that1matt/dev-maintenance-upgrades
rubenmoya Oct 24, 2018
50b5238
rename .css to .module.css
that1matt Oct 25, 2018
73d5e08
Merge pull request #1891 from that1matt/css-naming
rubenmoya Oct 29, 2018
be2e2b2
fix css-transition animation for date & time picker
that1matt Oct 25, 2018
ae8f82d
fix stylelint errors
that1matt Oct 25, 2018
83ab5eb
apply translate3d instead of translateX for GPU rendering
that1matt Oct 29, 2018
51da5f0
Merge pull request #1890 from that1matt/picker-animation
rubenmoya Oct 29, 2018
dab5a98
Merge pull request #1872 from rezak-otmani/Dropwown
rubenmoya Nov 5, 2018
49ee1dc
Fix #1904 - update filename reference for variables and colors in readme
quetzaluz Dec 31, 2018
de8578c
Merge pull request #1905 from quetzaluz/1904-update-readme
rubenmoya May 29, 2019
1a3d422
Merge remote-tracking branch 'origin/react-toolbox12' into new-dev
cnunez01 Jul 19, 2019
cd45b58
Merge pull request #2 from sysadminpltw/react-toolbox12
cnunez01 Jul 19, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
module.exports = {
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 6
},
extends: 'airbnb',
env: {
browser: true,
es6: true,
jest: true,
node: true
},
plugins: [
'compat',
'import',
'jest',
'jsx-a11y',
'react'
],
rules: {
'compat/compat': 'error',
'func-names': 'off',
'global-require': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true,
optionalDependencies: false,
peerDependencies: false
}
],
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/label-has-for': 'off',
'jsx-a11y/label-has-associated-control': [
'error', {
depth: 3,
},
],
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/no-noninteractive-tabindex': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'no-underscore-dangle': 'off',
'no-use-before-define': 'off',
'react/destructuring-assignment': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-no-bind': 'error',
'react/no-find-dom-node': 'off',
'react/require-default-props': 'off',
'react/sort-prop-types': 'error'
}
}
33 changes: 0 additions & 33 deletions .stylelintrc

This file was deleted.

111 changes: 111 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

68 changes: 50 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# <a href='http://react-toolbox.com'><img src='http://i.imgur.com/VCSElQX.png' height='50'></a>
# <a href='http://react-toolbox.io'><img src='http://i.imgur.com/VCSElQX.png' height='50'></a>

[![npm version](https://img.shields.io/npm/v/react-toolbox.svg?style=flat-square)](https://www.npmjs.com/package/react-toolbox) [![Build Status](http://img.shields.io/travis/react-toolbox/react-toolbox/master.svg?style=flat-square)](https://travis-ci.org/react-toolbox/react-toolbox) [![NPM Status](http://img.shields.io/npm/dm/react-toolbox.svg?style=flat-square)](https://www.npmjs.org/package/react-toolbox) [![react-toolbox channel on discord](https://img.shields.io/badge/discord-%23react--toolbox%20%40%20reactiflux-61dafb.svg?style=flat-square)](https://discord.gg/0ZcbPKXt5bW9FLzM) [![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/javivelasco) [![OpenCollective](https://opencollective.com/react-toolbox/backers/badge.svg)](#backers)
[![npm version](https://img.shields.io/npm/v/react-toolbox.svg?style=flat-square)](https://www.npmjs.com/package/react-toolbox) [![Build Status](http://img.shields.io/travis/react-toolbox/react-toolbox/master.svg?style=flat-square)](https://travis-ci.org/react-toolbox/react-toolbox) [![NPM Status](http://img.shields.io/npm/dm/react-toolbox.svg?style=flat-square)](https://www.npmjs.org/package/react-toolbox) [![Donate](https://img.shields.io/badge/donate-paypal-blue.svg?style=flat-square)](https://paypal.me/javivelasco) [![OpenCollective](https://opencollective.com/react-toolbox/backers/badge.svg)](#backers)
[![OpenCollective](https://opencollective.com/react-toolbox/sponsors/badge.svg)](#sponsors)

React Toolbox is a set of [React](http://facebook.github.io/react/) components that implement [Google's Material Design specification](https://material.google.com/). It's powered by [CSS Modules](https://github.com/css-modules/css-modules) and harmoniously integrates with your [webpack](http://webpack.github.io/) workflow, although you can use any other module bundler. You can take a tour through our documentation website and try the components live!
Expand All @@ -17,7 +17,7 @@ $ npm install --save react-toolbox

## Prerequisites

React Toolbox uses [CSS Modules](https://github.com/css-modules/css-modules) by default to import stylesheets written using PostCSS/[cssnext](http://cssnext.io/) features. In case you want to import the components already bundled with CSS, your module bundler should be able to require these PostCSS modules.
React Toolbox uses [CSS Modules](https://github.com/css-modules/css-modules) by default to import stylesheets written using [PostCSS](https://github.com/postcss/postcss) & [postcss-preset-env](https://preset-env.cssdb.org/) features. In case you want to import the components already bundled with CSS, your module bundler should be able to require these PostCSS modules.

Although we recommend [webpack](https://webpack.github.io/), you are free to use whatever module bundler you want as long as it can compile and require PostCSS files located in your `node_modules`. If you are experiencing require errors, make sure your configuration satisfies this requirement.

Expand All @@ -33,8 +33,7 @@ Follow [these instructions](https://github.com/react-toolbox/react-toolbox-themr

```bash
npm install postcss-loader --save-dev
npm install postcss --save
npm install postcss-cssnext --save
npm install postcss postcss-preset-env postcss-calc --save
```

Configure webpack 1.x loader for .css files to use postcss:
Expand All @@ -49,15 +48,46 @@ Configure webpack 1.x loader for .css files to use postcss:
```
Declare plugins to be used by postcss (as part of webpack's config object):
```js
// webpack.config.js
postcss: () => {
return [
/* eslint-disable global-require */
require('postcss-cssnext'),
require('postcss-preset-env')({
stage: 0, // required to get all features that were from cssnext without enabling them one by one
features: {
'custom-properties': {
preserve: false, // required to output values instead of variables
},
'color-mod-function': true, // required to use color-mod()
}
}),
require('postcss-calc'), // required as postcss-preset-env doesn't have a reduce calc() funtion that cssnext did
/* eslint-enable global-require */
];
},
```

Configure webpack 2.x or 3.x loader for .css files to use postcss:
```js
// webpack.config.js
{
test: /\.css$/,
use: [
"style-loader",
{
loader: "css-loader",
options: {
modules: true, // default is false
sourceMap: true,
importLoaders: 1,
localIdentName: "[name]--[local]--[hash:base64:8]"
}
},
"postcss-loader"
]
}
```

## Basic usage

In this minimal example, we import a `Button` with styles already bundled:
Expand Down Expand Up @@ -95,7 +125,7 @@ First let's take a look on how the components are structured in the project. The
|---- theme.css
```

As you can see in the previous block, each folder includes: a Javascript file for each component/subcomponent; a README with documentation, an index Javascript file that imports and injects styles and dependencies for you, a default theme PostCSS/cssnext stylesheet and a config.css with configuration variables (CSS Custom Properties). Depending on whether you want the styles to be directly bundled or not, you can import components in **two** different ways.
As you can see in the previous block, each folder includes: a Javascript file for each component/subcomponent; a README with documentation, an index Javascript file that imports and injects styles and dependencies for you, a default theme PostCSS/preset-env stylesheet and a config.css with configuration variables (CSS Custom Properties). Depending on whether you want the styles to be directly bundled or not, you can import components in **two** different ways.

### Bundled component

Expand Down Expand Up @@ -192,14 +222,13 @@ export default App;

## Theming (configuration variables)

You can apply theming in multiple ways. First of all, you have to understand that React Toolbox stylesheets are written using PostCSS with cssnext features and use CSS Custom Properties from the **config** files we saw earlier. In addition, there are some global CSS Properties imported by each component: [colors](https://github.com/react-toolbox/react-toolbox/blob/dev/components/colors.css) and [variables](https://github.com/react-toolbox/react-toolbox/blob/dev/components/variables.css). You can override both the global and component-specific **variables** to get the results you want using one of the methods below.
You can apply theming in multiple ways. First of all, you have to understand that React Toolbox stylesheets are written using PostCSS with postcss-preset-env features and use CSS Custom Properties from the **config** files we saw earlier. In addition, there are some global CSS Properties imported by each component: [colors](https://github.com/react-toolbox/react-toolbox/blob/dev/components/colors.module.css) and [variables](https://github.com/react-toolbox/react-toolbox/blob/dev/components/variables.module.css). You can override both the global and component-specific **variables** to get the results you want using one of the methods below.

### Settings configuration variables in JavaScript

You can override both the global and component-specific CSS Custom Properties at build-time by supplying an object with these variable names and your desired values to the PostCSS customProperties plugin. i.e. if using postcss-next in webpack:
You can override both the global and component-specific CSS Custom Properties at build-time by supplying an object with these variable names and your desired values to the PostCSS `custom-properties` plugin. i.e. if using [postcss-preset-env](https://github.com/csstools/postcss-preset-env) in webpack:

```js

// This can also be stored in a separate file:
const reactToolboxVariables = {
'color-text': '#444548',
Expand All @@ -208,31 +237,34 @@ const reactToolboxVariables = {
'button-height': '30px',
};

// webpack's config object:
// webpack's config object: (webpack.config.js)
const config = {
...
postcss: () => {
return [
/* eslint-disable global-require */
require('postcss-cssnext')({
require('postcss-preset-env')({
stage: 0, // required to get all features that were from cssnext without enabling them one by one
features: {
customProperties: {
variables: reactToolboxVariables,
'custom-properties': {
preserve: false, // required to output values instead of variables
importFrom: reactToolboxVariables, // see postcss-preset-env for config options
},
},
'color-mod-function': true, // required to use color-mod()
}
}),
require('postcss-calc'), // required as postcss-preset-env doesn't have a reduce calc() funtion that cssnext did
/* optional - see next section */
require('postcss-modules-values'),
/* eslint-enable global-require */
];
},
}

```

### Settings configuration variables using CSS Module Values

Instead of using a JavaScript object for variables, you can use [CSS Module Values](https://github.com/css-modules/css-modules/blob/master/docs/values-variables.md) (`npm install postcss-modules-values --save`) and the [modules-values-extract](https://github.com/alexhisen/modules-values-extract) utility to declare these variables in component-specific theme .css files, where you would typically store additional style overrides.
Instead of using a JavaScript object for variables, you can use [CSS Module Values](https://github.com/css-modules/css-modules/blob/master/docs/values-variables.md) (`npm install postcss-modules-values --save`) and the [modules-values-extract](https://github.com/alexhisen/modules-values-extract) utility to declare these variables in component-specific theme `.css` files, where you would typically store additional style overrides.

CSS Module Values also offer the advantage that importing a css file with @value declarations makes these values properties of the imported style object, i.e.:

Expand All @@ -248,7 +280,7 @@ import styleVariables from './css/variables.css';
styleVariables.buttonPrimaryBackgroundColor
```

In [this demo project](https://github.com/alexhisen/mobx-forms-demo), modules-values-extract utility is used to extract all @values with dashes in their name from all css files in the /css folder and to feed them to customProperties in [webpack](https://github.com/alexhisen/mobx-forms-demo/blob/master/webpack.config.js). In the demo project, variables that are not specific to a particular component are in [variables.css](https://github.com/alexhisen/mobx-forms-demo/blob/master/src/css/variables.css) and button-specific variables are in [button.css](https://github.com/alexhisen/mobx-forms-demo/blob/master/src/css/button.css). Note that button.css also imports certain values from variables.css just to demonstrate this capability \(the import can also be used in a @value declaration\) and it uses CSS overrides instead of color variables that exist in the React-Toolbox Button component to show an alternative method if the variables are not sufficient.
In [this demo project](https://github.com/alexhisen/mobx-forms-demo), modules-values-extract utility is used to extract all @values with dashes in their name from all css files in the `/css` folder and to feed them to customProperties in [webpack](https://github.com/alexhisen/mobx-forms-demo/blob/master/webpack.config.js). In the demo project, variables that are not specific to a particular component are in [variables.css](https://github.com/alexhisen/mobx-forms-demo/blob/master/src/css/variables.css) and button-specific variables are in [button.css](https://github.com/alexhisen/mobx-forms-demo/blob/master/src/css/button.css). Note that button.css also imports certain values from variables.css just to demonstrate this capability \(the import can also be used in a @value declaration\) and it uses CSS overrides instead of color variables that exist in the React-Toolbox Button component to show an alternative method if the variables are not sufficient.

> **IMPORTANT: Changes to the module values do not take effect immediately with Webpack Hot-Module-Reload - webpack / webpack-dev-server must be restarted!**

Expand Down
4 changes: 2 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This document defines a manifesto and the main Roadmap 🚵 ideas for [React Toolbox](www.react-toolbox.com). It's not a fixed document and of course it's open to change. You can leave your feedback in [this gist](https://gist.github.com/javivelasco/259d2087c2a8c3e8f2c5c720d1fd3f2e) or you can also do it [through an issue](https://github.com/react-toolbox/react-toolbox/issues/new).
This document defines a manifesto and the main Roadmap 🚵 ideas for [React Toolbox](www.react-toolbox.io). It's not a fixed document and of course it's open to change. You can leave your feedback in [this gist](https://gist.github.com/javivelasco/259d2087c2a8c3e8f2c5c720d1fd3f2e) or you can also do it [through an issue](https://github.com/react-toolbox/react-toolbox/issues/new).

## The Manifesto

Expand Down Expand Up @@ -68,7 +68,7 @@ There is no fixed date, sorry. Being an open source project, it depends on contr

### Is there any migration guide to 2.0?

Not really. At the end we are just providing components and there are no big changes on them apart from huge refactors of some specific components that will be coming. If should be enough by checking changelogs and new documentation. In any case if you feel like a migration guide is needed, feel free to leave for feedback.
There is a [migration guide](https://github.com/react-toolbox/react-toolbox/wiki/Migrating-from-version-1.3-to-2.0) in the wiki.

### When will be released the new playground?

Expand Down
35 changes: 35 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = function (api) {
const env = api.env();
api.cache.using(() => env === 'development');

return {
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: [
'@babel/plugin-transform-runtime',
// Stage 0
'@babel/plugin-proposal-function-bind',

// Stage 1
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-logical-assignment-operators',
['@babel/plugin-proposal-optional-chaining', { loose: false }],
['@babel/plugin-proposal-pipeline-operator', { proposal: 'minimal' }],
['@babel/plugin-proposal-nullish-coalescing-operator', { loose: false }],
'@babel/plugin-proposal-do-expressions',

// Stage 2
['@babel/plugin-proposal-decorators', { legacy: true }],
'@babel/plugin-proposal-function-sent',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-numeric-separator',
'@babel/plugin-proposal-throw-expressions',

// Stage 3
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-syntax-import-meta',
['@babel/plugin-proposal-class-properties', { loose: false }],
'@babel/plugin-proposal-json-strings',
'react-hot-loader/babel',
],
};
};
3 changes: 3 additions & 0 deletions components/ThemeProvider.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {ThemeProvider} from 'react-css-themr'

export default ThemeProvider
27 changes: 27 additions & 0 deletions docs/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const path = require('path');
const toolboxVariables = require('./toolbox-variables');

module.exports = {
plugins: [
require('postcss-import')({
root: path.join(__dirname, './../'),
path: [
path.join(__dirname, './app'),
path.join(__dirname, './../components')
]
}),
require('postcss-mixins')(),
require('postcss-each')(),
require('postcss-apply')(),
require('postcss-preset-env')({
stage: 0,
features: {
'custom-properties': {
variables: toolboxVariables,
preserve: false
}
}
}),
require('postcss-reporter')({ clearMessages: true })
]
}
5 changes: 5 additions & 0 deletions husky.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
hooks: {
'pre-commit': 'npm run lint:staged',
},
};
17 changes: 17 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
moduleDirectories: [
'node_modules',
],
moduleNameMapper: {
'\\.css$': 'identity-obj-proxy',
},
modulePaths: [
'<rootDir>/components',
],
setupFiles: [
'./jest.setup.js',
],
snapshotSerializers: [
'enzyme-to-json/serializer',
],
};
8 changes: 7 additions & 1 deletion jest.setup.js
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
Object.defineProperty(window, 'requestAnimationFrame', { value: fn => fn() });
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';

configure({
adapter: new Adapter(),
disableLifecycleMethods: true,
});
6 changes: 6 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
'*.js': [
'eslint --fix',
'git add',
],
};
Loading