uniforms-bootstrap4
Advanced tools
Comparing version 1.0.0-rc.4 to 1.0.0-rc.5
@@ -36,6 +36,6 @@ 'use strict'; | ||
_react2.default.createElement( | ||
'div', | ||
'section', | ||
{ className: 'card-block' }, | ||
_react2.default.createElement( | ||
'div', | ||
'section', | ||
{ className: 'card-text' }, | ||
@@ -42,0 +42,0 @@ children, |
@@ -30,10 +30,5 @@ 'use strict'; | ||
var FormGroup = function FormGroup(_ref) { | ||
var grid = _ref.grid; | ||
var // grid is either a int [1-11] or object {xs:6,sm:4,md:2} | ||
className = _ref.className; | ||
var children = _ref.children; | ||
var className = _ref.className; | ||
var // class name for the whole .form-group | ||
helpClassName = _ref.helpClassName; | ||
var // class name for the help text (default: 'text-muted') | ||
wrapClassName = _ref.wrapClassName; | ||
var // class name for the div wrapping the input(s) | ||
disabled = _ref.disabled; | ||
@@ -43,8 +38,13 @@ var // boolean, if true, show fields as disabled | ||
var // error validation response | ||
grid = _ref.grid; | ||
var // grid is either a int [1-11] or object {xs:6,sm:4,md:2} | ||
help = _ref.help; | ||
var // help text | ||
helpClassName = _ref.helpClassName; | ||
var // class name for the help text (default: 'text-muted') | ||
label = _ref.label; | ||
var // string label (or false) | ||
required = _ref.required; | ||
var children = _ref.children; | ||
var wrapClassName // class name for the section wrapping the input(s) | ||
= _ref.wrapClassName; | ||
return _react2.default.createElement( | ||
@@ -61,3 +61,3 @@ 'section', | ||
grid || wrapClassName ? _react2.default.createElement( | ||
'div', | ||
'section', | ||
{ className: (0, _classnames2.default)(wrapClassName, (0, _gridClassName2.default)(grid, 'input')) }, | ||
@@ -64,0 +64,0 @@ children, |
@@ -54,3 +54,3 @@ 'use strict'; | ||
_react2.default.createElement( | ||
'div', | ||
'section', | ||
{ className: (0, _classnames2.default)('card-title', { error: error, required: required }, 'field item') }, | ||
@@ -64,5 +64,5 @@ _react2.default.createElement( | ||
_react2.default.createElement( | ||
'div', | ||
'section', | ||
{ className: 'label label-default label-pill pull-xs-right' }, | ||
_react2.default.createElement(_ListAddField2.default, { name: name + '.$', className: '' }) | ||
_react2.default.createElement(_ListAddField2.default, { name: name + '.$' }) | ||
) | ||
@@ -69,0 +69,0 @@ ) |
@@ -30,3 +30,3 @@ 'use strict'; | ||
_react2.default.createElement( | ||
'div', | ||
'section', | ||
{ className: 'list-group-item-top text-xs-right', style: { marginBottom: 5 } }, | ||
@@ -33,0 +33,0 @@ _react2.default.createElement( |
@@ -17,6 +17,6 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _uniforms = require('uniforms'); | ||
var _react = require('react'); | ||
var _AutoField = require('../fields/AutoField'); | ||
@@ -23,0 +23,0 @@ |
@@ -17,6 +17,6 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _uniforms = require('uniforms'); | ||
var _react = require('react'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -23,0 +23,0 @@ |
@@ -17,2 +17,4 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _uniforms = require('uniforms'); | ||
@@ -78,2 +80,7 @@ | ||
exports.default = QuickForm; | ||
exports.default = QuickForm; | ||
QuickForm.propTypes = _extends({}, _uniforms.QuickForm.propTypes, { | ||
grid: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]) | ||
}); |
@@ -17,2 +17,4 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _uniforms = require('uniforms'); | ||
@@ -51,2 +53,7 @@ | ||
exports.default = ValidatedForm; | ||
exports.default = ValidatedForm; | ||
ValidatedForm.propTypes = _extends({}, _uniforms.ValidatedForm.propTypes, { | ||
grid: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]) | ||
}); |
@@ -17,2 +17,4 @@ 'use strict'; | ||
var _react = require('react'); | ||
var _uniforms = require('uniforms'); | ||
@@ -78,2 +80,7 @@ | ||
exports.default = ValidatedQuickForm; | ||
exports.default = ValidatedQuickForm; | ||
ValidatedQuickForm.propTypes = _extends({}, _uniforms.ValidatedQuickForm.propTypes, { | ||
grid: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]) | ||
}); |
{ | ||
"name": "uniforms-bootstrap4", | ||
"version": "1.0.0-rc.4", | ||
"version": "1.0.0-rc.5", | ||
"main": "lib/index.js", | ||
@@ -40,3 +40,3 @@ "jsnext:main": "src/index.js", | ||
"react": "^15.0.2", | ||
"uniforms": "^1.0.0-rc.4" | ||
"uniforms": "^1.0.0-rc.5" | ||
}, | ||
@@ -43,0 +43,0 @@ "babel": { |
# uniforms-bootstrap4 | ||
> bootstrap4 UI components for `uniforms`. | ||
> Bootstrap4 UI components for `uniforms`. | ||
@@ -12,17 +12,1 @@ ## Install | ||
For more in depth documentation see: [https://github.com/vazco/uniforms/](https://github.com/vazco/uniforms/). | ||
## Roadmap | ||
- [x] ErrorsField | ||
- [x] ListAddField | ||
- [x] ListDelField | ||
- [x] ListField | ||
- [x] ListItemField | ||
- [ ] Figure out how to get `grid` from AutoForm into fields | ||
- [ ] Add Support: autoform.options --> select options | ||
- [ ] Configure: ListAdd/ListDel octicon / glyphicon / text / etc | ||
- [ ] Configure: ListField label styling options | ||
- [ ] Configure: ErrorsField class styling | ||
- [ ] MAYBE Add wrapped DateTimePicker widget from react-widgets (new package) | ||
- [ ] Establish a github pages demo, or a meteorapp.com demo or something | ||
@@ -12,4 +12,4 @@ import React from 'react'; | ||
)} {...props}> | ||
<div className="card-block"> | ||
<div className="card-text"> | ||
<section className="card-block"> | ||
<section className="card-text"> | ||
{children} | ||
@@ -23,4 +23,4 @@ <ul className="list"> | ||
</ul> | ||
</div> | ||
</div> | ||
</section> | ||
</section> | ||
</section> | ||
@@ -27,0 +27,0 @@ ) |
@@ -13,13 +13,13 @@ import React from 'react'; | ||
const FormGroup = ({ | ||
grid, // grid is either a int [1-11] or object {xs:6,sm:4,md:2} | ||
children, | ||
className, // class name for the whole .form-group | ||
helpClassName, // class name for the help text (default: 'text-muted') | ||
wrapClassName, // class name for the div wrapping the input(s) | ||
disabled, // boolean, if true, show fields as disabled | ||
error, // error validation response | ||
grid, // grid is either a int [1-11] or object {xs:6,sm:4,md:2} | ||
help, // help text | ||
helpClassName, // class name for the help text (default: 'text-muted') | ||
label, // string label (or false) | ||
required, | ||
children | ||
}) => ( | ||
wrapClassName // class name for the section wrapping the input(s) | ||
}) => | ||
<section | ||
@@ -40,6 +40,6 @@ className={classnames( | ||
{(grid || wrapClassName) ? ( | ||
<div className={classnames(wrapClassName, gridClassName(grid, 'input'))}> | ||
<section className={classnames(wrapClassName, gridClassName(grid, 'input'))}> | ||
{children} | ||
{makeHelp(help, helpClassName)} | ||
</div> | ||
</section> | ||
) : ( | ||
@@ -52,5 +52,4 @@ <span> | ||
</section> | ||
) | ||
; | ||
export default FormGroup; |
@@ -32,7 +32,3 @@ import React from 'react'; | ||
<section className="card-block"> | ||
<div className={classnames( | ||
'card-title', | ||
{error, required}, | ||
'field item' | ||
)}> | ||
<section className={classnames('card-title', {error, required}, 'field item')}> | ||
<label className="control-label"> | ||
@@ -42,6 +38,6 @@ {label} | ||
<div className="label label-default label-pill pull-xs-right"> | ||
<ListAddField name={`${name}.$`} className="" /> | ||
</div> | ||
</div> | ||
<section className="label label-default label-pill pull-xs-right"> | ||
<ListAddField name={`${name}.$`} /> | ||
</section> | ||
</section> | ||
</section> | ||
@@ -51,3 +47,2 @@ )} | ||
<ul className="list-group list-group-flush"> | ||
{children ? ( | ||
@@ -67,4 +62,4 @@ value.map((item, index) => | ||
) : ( | ||
value.map( | ||
(item, index) => <ListItemField | ||
value.map((item, index) => | ||
<ListItemField | ||
key={index} | ||
@@ -71,0 +66,0 @@ label={null} |
@@ -12,7 +12,7 @@ import React from 'react'; | ||
<div className="list-group-item-top text-xs-right" style={{marginBottom: 5}}> | ||
<section className="list-group-item-top text-xs-right" style={{marginBottom: 5}}> | ||
<span className="label label-default label-pill"> | ||
<ListDelField name={props.name} /> | ||
</span> | ||
</div> | ||
</section> | ||
@@ -19,0 +19,0 @@ <section className="middle aligned content"> |
import classnames from 'classnames'; | ||
import {PropTypes} from 'react'; | ||
import {AutoForm as Base} from 'uniforms'; | ||
import {PropTypes} from 'react'; | ||
@@ -5,0 +5,0 @@ import AutoField from '../fields/AutoField'; |
import classnames from 'classnames'; | ||
import {PropTypes} from 'react'; | ||
import {BaseForm as Base} from 'uniforms'; | ||
import {PropTypes} from 'react'; | ||
@@ -5,0 +5,0 @@ export default class BaseForm extends Base { |
import classnames from 'classnames'; | ||
import {PropTypes} from 'react'; | ||
import {QuickForm as Base} from 'uniforms'; | ||
@@ -30,1 +31,9 @@ | ||
} | ||
QuickForm.propTypes = { | ||
...Base.propTypes, | ||
grid: PropTypes.oneOfType([ | ||
PropTypes.string, | ||
PropTypes.number | ||
]) | ||
}; |
import classnames from 'classnames'; | ||
import {PropTypes} from 'react'; | ||
import {ValidatedForm as Base} from 'uniforms'; | ||
@@ -14,1 +15,9 @@ | ||
} | ||
ValidatedForm.propTypes = { | ||
...Base.propTypes, | ||
grid: PropTypes.oneOfType([ | ||
PropTypes.string, | ||
PropTypes.number | ||
]) | ||
}; |
import classnames from 'classnames'; | ||
import {PropTypes} from 'react'; | ||
import {ValidatedQuickForm as Base} from 'uniforms'; | ||
@@ -30,1 +31,9 @@ | ||
} | ||
ValidatedQuickForm.propTypes = { | ||
...Base.propTypes, | ||
grid: PropTypes.oneOfType([ | ||
PropTypes.string, | ||
PropTypes.number | ||
]) | ||
}; |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
82200
48
1804
12
1