New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tenon-io/tenon-ui

Package Overview
Dependencies
Maintainers
7
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tenon-io/tenon-ui - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

es/modules/layout/disclosure/Disclosure.js

9

CHANGELOG.md
# Changelog
## [1.1.0] 2018-11-27
### Features
- Add Disclosure widget to Tenon UI (#22)
### Bugfixes
- Overriding the input type ignored (#19)
## [1.0.1] 2018-11-20
### Bugfix
### Bugfixes
- Fixed issue where adding a user onChange handler caused the bindings to break.

@@ -6,0 +13,0 @@

@@ -35,2 +35,8 @@ import _Form from './modules/forms/tenonForm/Form';

export { _FocusCatcher as FocusCatcher };
import _Disclosure from './modules/layout/disclosure/Disclosure';
export { _Disclosure as Disclosure };
import _Trigger from './modules/layout/disclosure/Trigger';
export { _Trigger as Trigger };
import _Target from './modules/layout/disclosure/Target';
export { _Target as Target };

@@ -37,0 +43,0 @@

34

es/modules/forms/tenonForm/FormControllers.js

@@ -85,4 +85,2 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

*
* If the type is radioGroup, extra id's are required.
*
* @param props

@@ -131,5 +129,5 @@ */

name = _props.name,
type = _props.type;
formControllerType = _props.formControllerType;
registerControl(name, this.controlId, defaultValues[type], true, '');
registerControl(name, this.controlId, defaultValues[formControllerType], true, '');
setControlValidity(name, this.runValidation(getControlValue(name)));

@@ -377,3 +375,3 @@ };

* @function
* Return the render props object per type.
* Return the render props object per formControllerType.
*/

@@ -394,3 +392,3 @@

children = _props4.children,
type = _props4.type,
formControllerType = _props4.formControllerType,
getControlValidity = _props4.getControlValidity,

@@ -408,3 +406,3 @@ getControlErrorText = _props4.getControlErrorText,

validators = _props4.validators,
rest = _objectWithoutProperties(_props4, ['children', 'type', 'getControlValidity', 'getControlErrorText', 'name', 'required', 'registerErrors', 'component', 'deregisterControl', 'registerControl', 'setControlValue', 'getControlValue', 'setControlValidity', 'validators']);
rest = _objectWithoutProperties(_props4, ['children', 'formControllerType', 'getControlValidity', 'getControlErrorText', 'name', 'required', 'registerErrors', 'component', 'deregisterControl', 'registerControl', 'setControlValue', 'getControlValue', 'setControlValidity', 'validators']);

@@ -415,3 +413,3 @@ var renderProps = _extends({

required: required === true || required === 'true'
}, this.buildRenderObject(type));
}, this.buildRenderObject(formControllerType));

@@ -429,5 +427,5 @@ return component ? React.createElement(component, _extends({}, renderProps, rest), children) : children && children(renderProps);

name = _props5.name,
type = _props5.type;
formControllerType = _props5.formControllerType;
setControlValue(name, type === controllerType.checkbox ? e.target.checked : e.target.value);
setControlValue(name, formControllerType === controllerType.checkbox ? e.target.checked : e.target.value);
};

@@ -624,3 +622,3 @@

this.getTypeSpecificRenderProps = function (type) {
this.getTypeSpecificRenderProps = function (formControllerType) {
var commonRenderProps = {

@@ -632,3 +630,3 @@ getLabelProps: _this2.getLabelProps,

switch (type) {
switch (formControllerType) {
case controllerType.textarea:

@@ -664,4 +662,4 @@ return _extends({

this.buildRenderObject = memoize(function (type) {
return _this2.getTypeSpecificRenderProps(type);
this.buildRenderObject = memoize(function (formControllerType) {
return _this2.getTypeSpecificRenderProps(formControllerType);
});

@@ -672,3 +670,3 @@ }, _temp);

* @function
* Function to return the controller based on type. Fetches the
* Function to return the controller based on formControllerType. Fetches the
* React Context exposed functionality from the smart form

@@ -696,3 +694,3 @@ * containing the Context provider and expose it as props

} : {};
var getController = function getController(props, type) {
var getController = function getController(props, formControllerType) {
return React.createElement(

@@ -704,3 +702,5 @@ FormContext.Consumer,

FormController,
_extends({}, props, contextProps, { type: type }),
_extends({}, props, contextProps, {
formControllerType: formControllerType
}),
props.children

@@ -707,0 +707,0 @@ );

'use strict';
exports.__esModule = true;
exports.FocusCatcher = exports.Tab = exports.Tabs = exports.SpinnerButton = exports.Spinner = exports.Notification = exports.CheckboxGroup = exports.Checkbox = exports.RadioGroup = exports.Select = exports.TextArea = exports.Input = exports.H = exports.LevelBoundary = exports.Heading = exports.ErrorBlock = exports.RadioGroupController = exports.SelectController = exports.TextareaController = exports.TextInputController = exports.Form = undefined;
exports.Target = exports.Trigger = exports.Disclosure = exports.FocusCatcher = exports.Tab = exports.Tabs = exports.SpinnerButton = exports.Spinner = exports.Notification = exports.CheckboxGroup = exports.Checkbox = exports.RadioGroup = exports.Select = exports.TextArea = exports.Input = exports.H = exports.LevelBoundary = exports.Heading = exports.ErrorBlock = exports.RadioGroupController = exports.SelectController = exports.TextareaController = exports.TextInputController = exports.Form = undefined;

@@ -133,2 +133,14 @@ var _FormControllers = require('./modules/forms/tenonForm/FormControllers');

var _Disclosure2 = require('./modules/layout/disclosure/Disclosure');
var _Disclosure3 = _interopRequireDefault(_Disclosure2);
var _Trigger2 = require('./modules/layout/disclosure/Trigger');
var _Trigger3 = _interopRequireDefault(_Trigger2);
var _Target2 = require('./modules/layout/disclosure/Target');
var _Target3 = _interopRequireDefault(_Target2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -149,2 +161,5 @@

exports.Tabs = _Tabs3.default;
exports.FocusCatcher = _FocusCatcher3.default;
exports.FocusCatcher = _FocusCatcher3.default;
exports.Disclosure = _Disclosure3.default;
exports.Trigger = _Trigger3.default;
exports.Target = _Target3.default;

@@ -107,4 +107,2 @@ 'use strict';

*
* If the type is radioGroup, extra id's are required.
*
* @param props

@@ -153,5 +151,5 @@ */

name = _props.name,
type = _props.type;
formControllerType = _props.formControllerType;
registerControl(name, this.controlId, defaultValues[type], true, '');
registerControl(name, this.controlId, defaultValues[formControllerType], true, '');
setControlValidity(name, this.runValidation(getControlValue(name)));

@@ -399,3 +397,3 @@ };

* @function
* Return the render props object per type.
* Return the render props object per formControllerType.
*/

@@ -416,3 +414,3 @@

children = _props4.children,
type = _props4.type,
formControllerType = _props4.formControllerType,
getControlValidity = _props4.getControlValidity,

@@ -430,3 +428,3 @@ getControlErrorText = _props4.getControlErrorText,

validators = _props4.validators,
rest = _objectWithoutProperties(_props4, ['children', 'type', 'getControlValidity', 'getControlErrorText', 'name', 'required', 'registerErrors', 'component', 'deregisterControl', 'registerControl', 'setControlValue', 'getControlValue', 'setControlValidity', 'validators']);
rest = _objectWithoutProperties(_props4, ['children', 'formControllerType', 'getControlValidity', 'getControlErrorText', 'name', 'required', 'registerErrors', 'component', 'deregisterControl', 'registerControl', 'setControlValue', 'getControlValue', 'setControlValidity', 'validators']);

@@ -437,3 +435,3 @@ var renderProps = _extends({

required: required === true || required === 'true'
}, this.buildRenderObject(type));
}, this.buildRenderObject(formControllerType));

@@ -451,5 +449,5 @@ return component ? _react2.default.createElement(component, _extends({}, renderProps, rest), children) : children && children(renderProps);

name = _props5.name,
type = _props5.type;
formControllerType = _props5.formControllerType;
setControlValue(name, type === controllerType.checkbox ? e.target.checked : e.target.value);
setControlValue(name, formControllerType === controllerType.checkbox ? e.target.checked : e.target.value);
};

@@ -646,3 +644,3 @@

this.getTypeSpecificRenderProps = function (type) {
this.getTypeSpecificRenderProps = function (formControllerType) {
var commonRenderProps = {

@@ -654,3 +652,3 @@ getLabelProps: _this2.getLabelProps,

switch (type) {
switch (formControllerType) {
case controllerType.textarea:

@@ -686,4 +684,4 @@ return _extends({

this.buildRenderObject = (0, _memoizeOne2.default)(function (type) {
return _this2.getTypeSpecificRenderProps(type);
this.buildRenderObject = (0, _memoizeOne2.default)(function (formControllerType) {
return _this2.getTypeSpecificRenderProps(formControllerType);
});

@@ -694,3 +692,3 @@ }, _temp);

* @function
* Function to return the controller based on type. Fetches the
* Function to return the controller based on formControllerType. Fetches the
* React Context exposed functionality from the smart form

@@ -718,3 +716,3 @@ * containing the Context provider and expose it as props

} : {};
var getController = function getController(props, type) {
var getController = function getController(props, formControllerType) {
return _react2.default.createElement(

@@ -726,3 +724,5 @@ _FormContext2.default.Consumer,

FormController,
_extends({}, props, contextProps, { type: type }),
_extends({}, props, contextProps, {
formControllerType: formControllerType
}),
props.children

@@ -729,0 +729,0 @@ );

{
"name": "@tenon-io/tenon-ui",
"version": "1.0.1",
"version": "1.1.0",
"description": "Tenon-ui components library",

@@ -73,3 +73,3 @@ "contributors": [

"node-sass-chokidar": "1.3.3",
"npm-run-all": "4.1.3",
"npm-run-all": "4.1.5",
"nwb": "0.22.0",

@@ -76,0 +76,0 @@ "prettier": "1.15.2",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc