Commit Graph

168 Commits (master)

Author SHA1 Message Date
Vitaliy Filippov ba3993c811 Fix table styles, pass `style` to top-level element in inputs 2019-05-07 16:50:56 +03:00
Vitaliy Filippov 83dd1c93b7 Clearable dropdown & autocomplete, fix dropdown behaviour, always-controlled inputs 2018-07-17 20:15:40 +03:00
Phil Myers 1dafc5676f Move Input#validPresent to utils#isValuePresent 2018-02-27 13:19:57 -05:00
Rubén Moya 874d9bf606
Merge pull request #1627 from olegstepura/disabled-input
Disabled input should be dashed not dotted
2018-01-25 09:02:30 +01:00
Rubén Moya a714a02dc7
Merge pull request #1758 from rubenmoya/update-new-domain
Update URLs to new .io domain
2018-01-23 18:17:10 +01:00
Rubén Moya f462f7dd43
Merge pull request #1766 from jakerichan/input-element-variables
Update defaults in input component config.css
2018-01-23 18:15:32 +01:00
Jake Richan 25172c5f15 update defaults in input component config.css
Use color-text variable for label and border color. This seems like an intuitive default since the default background is transparent. Also, the input element needs the option to set a custom color value, otherwise setting a custom background is limited to what works with the overall text-color.
2017-11-27 15:58:49 -07:00
rubenmoya b0a7533e7c Update URLs to new .io domain 2017-11-16 19:11:31 +01:00
rubenmoya 14eb6cae8d Remove box-shadow on required inputs 2017-09-18 19:57:40 +02:00
Panjie Setiawan Wicaksono 91cb46db84 Typescript definitions validation (#1163)
* initial attempt to validate ts definitions

* ignore .vscode

* Add other spect & some fixes:

- Add target prop to Button
- Add value prop to MenuItem
- Make label optional in Tab
- Improve Tooltip types

* Add tsc validation to travis

* fix typo in travis build step
2017-09-01 17:51:41 +02:00
Oleg Stepura a46f0956c5 Disabled input should be dashed not dotted 2017-08-09 12:55:09 +02:00
Izak Filmalter e15ee8ee05 Fix Mobile Safari issues. (#1282)
* Add $input-icon-right-space var to add the correct spacing to the input based on Material Spec.

https://material.io/guidelines/components/text-fields.html#text-fields-s
ingle-line-text-field

* Fix Mobile Safari Issues.

Remove added border-radius for inputs from Safari. Fix `Object.entries
is not a function` for autocomplete.

* Remove new line.

* Add callback functions to slider for when slider starts being dragged, and when it stops.
2017-08-02 18:31:46 +02:00
Jonas Knutsen fc9c1802c7 Made role on input field a property (#1553) 2017-08-02 18:22:05 +02:00
Nathan Miranda 6290cf5ab2 Added label to InputTheme interface (#1501) 2017-07-13 20:29:33 +02:00
Javi Velasco 9a9396fa0b Fix tests 2017-05-24 10:38:04 +02:00
Daniel Barreiro 9619d85916 Fixes #1452 (#1454)
* Fixes #1452

Avoid using .bind within the render method of components.

* Fixed JS comment into proper JSX comment
2017-05-22 18:28:16 +02:00
Brock Wills ae09770cd4 Importing PropTypes from prop-types rather than react (#1413) 2017-04-17 16:14:17 +02:00
codeaid 4ff1cc9734 Added missing onKey(Down|Up) input property definitions (#1318) 2017-04-02 14:13:16 +02:00
Pavel Vorona d5f2c98075 Don't spread state in setState, it's already done by react (#1336) 2017-03-21 12:10:00 +01:00
Javi Velasco e366bedcf7 Fix #1219 2017-02-07 17:23:04 +01:00
Javi Velasco ba29686d46 Allow numbers for Input value prop. Fixes #1180 2017-02-07 15:19:09 +01:00
Rubén Moya c6ce6aa336 handle defaultValue to <Input /> (#1178) 2017-01-29 14:15:24 +01:00
Izak Filmalter 0360eb8d05 Add $input-icon-right-space var to add the correct spacing to the input based on Material Spec. (#1188)
https://material.io/guidelines/components/text-fields.html#text-fields-s
ingle-line-text-field
2017-01-29 13:35:55 +01:00
Javi Velasco 9d6ec1eedd Update dependencies and linter (#1180) 2017-01-26 18:05:32 +01:00
Artur Eshenbrener eff4b841b8 Typescript: document Input methods (#1154) 2017-01-21 13:16:56 +01:00
Javi Velasco badc0cb277 Merge branch 'dev' of github.com:soyjavi/react-toolbox into dev
* 'dev' of github.com:soyjavi/react-toolbox:
  Restructure typescript definitions (#1114)
  Enable dynamic source for single value Autocomplete (#1120)
  Add suggestionMatch option to disable filtering (#1122)
  Expose onEscKeyDown on Drawer component (#1150)
  Add inverse to <MenuIcon /> (#1147)
  Added proper type definitions for dialog actions so typescript users can pass on props to the generated buttons (#1098)
  Remove diacritic signs in query and suggestions (#1115)
  Update Button README.md (#1081)
  feat(a11y): add alt attribute to set alternative text for the icon or image (#1102)
  Add backers and Sponsors (#1137)
2017-01-18 11:03:30 +01:00
Javi Velasco 7e26773c6d Fixes #1127 2017-01-18 10:56:03 +01:00
Panjie Setiawan Wicaksono f365724ee8 Restructure typescript definitions (#1114)
* ts: restructure typescript definitions

- Add each raw components  types
- Update layout props to the new layout implementation
- Add table definitions
- Add HOC types

* fix ListItem typescript definition

* add themr identifiers definitions

* simplify React.ReactNode properties

* React.ReactNode | string => React.ReactNode is already indirectly type aliased to string
2017-01-18 08:37:37 +01:00
Javi Velasco 81acda7162 Migrate styles to PostCSS (#666)
* Add postcss-next postcss-include and reporter

* Add stylelint

* Add CSS colors

* Add CSS custom media queries

* Use dashes for CSS colors

* Add base CSS variables

* Remove AppBar SASS dependency from spec page

* Migrate AppBar style to PostCSS

* Migrate Avatar style to PostCSS

* Migrate Ripple style to PostCSS

* Remove unneeded media CSS import in Avatar

* Add shadows to CSS variables

* Migrate Button style to PostCSS

* Update webpack test config and linting from npm

* Migrate Input style to PostCSS

* Add missing input config variables for Dropdown and Autocomplete

* Migrate Chip style to PostCSS

* Migrate Autocomplete style to PostCSS

* Migrate Dropdown style to PostCSS

* Migrate animations to PostCSS

* Migrate Card style to PostCSS

* Migrate Checkbox style to PostCSS

* Migrate DataPicker style to PostCSS

* Migrate Dialog style to PostCSS

* Migrate Drawer style to PostCSS

* Add postcss-mixins and postcss-each

* Migrate Layout style to PostCSS

* Fix bug in button theme

* Bugfix in avatar css

* Add some missing nesting notations

* Migrate Link style to PostCSS

* Migrate List style to PostCSS

* Migrate Menu style to PostCSS

* Migrate Navigation style to PostCSS

* Migrate Overlay style to PostCSS

* Migrate ProgressBar style to PostCSS

* Migrate Radio style to PostCSS

* Migrate Slider style to PostCSS

* Migrate Snackbar style to PostCSS

* Migrate Switch style to PostCSS

* Migrate Table style to PostCSS

* Migrate Tabs style to PostCSS

* Migrate TimePicker to PostCSS

* Migrate Tooltip styles to PostCSS

* Update webpack config for testing and tests

* Migrate commons to PostCSS

* Remove sass from main project

* Bye from docs to sass

* Build with CSS

* Remove unneded deps for sass in docs subproject

* Fix tests

* use 4p shadow in AppBar as spec indicates

* Fixed typo in list/config.css

* Fix tests

* Fix linter errors

* Latest build

* Release 2.0.0-beta.0

* Remove sass lint

* fixes old sass var in css config

* Update linter

* New Table implementation

* Fix old sass var in list/config.css

See da0c47041e.

* Remove normalize.css from commons.css

* Update dependencies

* Latest build

* Input ready to accept visible hint

* Prepare slider and progress to be disabled

* Render Snackbar using Portal

* Refactor Dialog, Drawer and Overlay to be used in Layout

* Add inner layer to AppBar

* New layout

* Use Layout in spec

* Latest build

* remove layout playground example

* add smTablet and lgTablet to NavDrawer in Layout readme

* add default prop className to Layout, NavDrawer and Sidebar

* fix css linter errors in card and slider

* Typings for Table component

* Add missing Drawer identifier

* Update lib build

* Adds onQueryChange callback property to Autocomplete

The onQueryChange callback is called when the value of the query changes in Autocomplete.
It is called with the new query value.

* Fix #966

* Fix #965

* Fixes #976

* Updated css-related dependencies

Removed usages of `addDependencyTo` since it's deprecated and not needed anymore.
See https://github.com/postcss/postcss-import#adddependencyto

* Enabled HMR for styles by disabling extracting them to a CSS file

* Remove lib from repo

* Remove lib

* Fixes #1021

* Build using Gulp

* Export ThemeProvider from react-css-themr

* Add CHANGELOG to release command

* Release 2.0.0-beta.1

* Remove immutability helper

* Update dependencies

* Fix Tooltip trying to render after it's been unmounted

* Fixes #1038

* Release 2.0.0-beta.2

* Add ramda, refactor utils and remove slide animation modules

* Remove separate slide animations modules

* Remove box-sizing reset and body rule

* Remove commons.css

* Release 2.0.0-beta.4

* Update dependencies

* Fixes #1061

* More aggresive guard condition for multiple autocomplete

* Fix typeof check in isBrowser function

* Fixes an issue when specs are opened with browsers that do not support Object.entries().

* Import from ramda using the 'import XXX from "ramda/src/XXX"' pattern so that bundle sizes will be smaller for not including the whole ramda package.

* Fix #1032

* Fix tests

* Update yarn.lock

* Fixes #1064
2017-01-05 02:42:18 +01:00
katzoo b5e0c6207e update typings to 1.3.3 2016-12-19 20:13:36 +01:00
masakij f00687564b refactor propTypes more descriptive 2016-12-14 11:42:24 +09:00
masakij ce3fbfc913 relaxing propTypes of Input & Autocomplete 2016-12-12 16:18:03 +09:00
Antti Ahti df81465350 Update Google URLs 2016-11-06 21:18:36 +02:00
Javi Velasco a1e6dd2379 Merge pull request #848 from rrott/fix/766-input_hint_text
Updated to show hint on input if label is empty
2016-10-22 16:51:58 +02:00
Matthew 8d62c8fe55 * Fixed trailing comma. 2016-10-13 13:19:06 +08:00
Matthew a50c1c406e * Added multiline height, see #811 2016-10-13 08:15:33 +08:00
Roman Rott 1fa9a0a58d
Updated to show hint on input if lable is empty 2016-10-09 14:37:43 +03:00
Per Bergqwist def8643a0a Import React namespace, fix problem with @types 2016-09-02 09:18:33 +02:00
Per Bergqwist 34313b823e Fixed errors for Typescript 2.0.2 2016-08-31 08:41:16 +02:00
Per Bergqwist 213411ba55 Fixes for typescript definitions, typos etc. 2016-08-10 09:35:51 +02:00
Javi Velasco 77b0a4a57d Fix linter warnings 2016-08-07 21:23:14 +02:00
Javi Velasco ea3917e10c Change method name to match lib convention 2016-08-06 18:30:08 +02:00
Javi Velasco beb0ca4465 Merge branch 'multiline-maxlength-fix' of https://github.com/SimonSelg/react-toolbox into SimonSelg-multiline-maxlength-fix
* 'multiline-maxlength-fix' of https://github.com/SimonSelg/react-toolbox:
  feat(dist): add newest build
  doc(input): add note about handleChange implementation
  fix(input): don't remove the maxLenght attribute from inputs
  feat(input): prevent insertion of characters if maxLength is reached
  fix(input): always recalculate size
  feat(input): set the default row amount for multiline inputs to 1
  feat(input): implement maxLength in js rather then using the maxlength prop of the input field
  refactor(input): move autoresize to didUpdate
  fix(input): only remove resize event listerner if it exists
  docs(input): fix multiline example and add maxLength to it
  fix(multiline input): autoresize after initial render too
2016-08-06 18:25:17 +02:00
Simon Selg f29e570d29 doc(input): add note about handleChange implementation 2016-08-04 22:15:59 +02:00
Simon Selg 6f03fb553a fix(input): don't remove the maxLenght attribute from inputs
We still rely on it when using non-multiline inputs (=> the input element is used), only when using textareas we use our custom maxlength logic.
2016-08-04 22:15:58 +02:00
Simon Selg 70823afcb3 feat(input): prevent insertion of characters if maxLength is reached
Previously we'd let the user insert a character, and then, if the resulting string was to long remove it again (through onChange). That creates unnessesary DOM modifications and store updates, and more importantly, diverges from the behavior of the native maxlength attribute of <textarea>.

Now we prevent the characters from beeing inserted in the first place if the length reaches maxlenght.
2016-08-04 22:15:58 +02:00
Simon Selg d1fcc14cb1 fix(input): always recalculate size
The assumstion that an equal amount of characters consume the same size is wrong as not all fonts are monospaced.
2016-08-04 22:15:58 +02:00
Javi Velasco 023a7323b8 Fixes #663 2016-08-04 20:48:52 +02:00
Simon Selg 056cd6ddb1 feat(input): set the default row amount for multiline inputs to 1 2016-08-04 03:46:20 +02:00
Simon Selg a8dbad121f feat(input): implement maxLength in js rather then using the maxlength prop of the input field
This is explained in #685. Fixes #685 therefore.
2016-08-04 03:45:38 +02:00