@shopgate/pwa-ui-shared 7.20.0-beta.9 → 7.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AddToCartButton/index.js +2 -1
- package/Checkbox/index.js +4 -4
- package/Checkbox/style.js +1 -1
- package/Chip/index.js +2 -2
- package/Chip/style.js +2 -2
- package/Form/Checkbox/index.js +17 -3
- package/package.json +5 -5
package/AddToCartButton/index.js
CHANGED
|
@@ -11,7 +11,8 @@ import _regeneratorRuntime from"@babel/runtime/regenerator";function _typeof(obj
|
|
|
11
11
|
* - Show cart icon again.
|
|
12
12
|
* @param {Event} e Event
|
|
13
13
|
*/_defineProperty(_this2,"handleClick",function(e){// Ignore clicks when check mark or loading spinner is shown or the button is disabled.
|
|
14
|
-
if(_this2.state.showCheckmark||_this2.props.isLoading||_this2.props.isDisabled){return;}/** */var handleCompletion=function handleCompletion(){_this2.setState({showCheckmark:true});setTimeout(function(){_this2.setState({showCheckmark:false});},900);};var result=_this2.props.onClick(e);if(result
|
|
14
|
+
if(_this2.state.showCheckmark||_this2.props.isLoading||_this2.props.isDisabled){return;}/** */var handleCompletion=function handleCompletion(){_this2.setState({showCheckmark:true});setTimeout(function(){_this2.setState({showCheckmark:false});},900);};var result=_this2.props.onClick(e);if(result===false){// Do not trigger animation when adding to cart was aborted by the parent component (PWA-2764)
|
|
15
|
+
return;}if(result instanceof Promise){_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(){return _regeneratorRuntime.wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.prev=0;_context.next=3;return result;case 3:handleCompletion();_context.next=8;break;case 6:_context.prev=6;_context.t0=_context["catch"](0);case 8:case"end":return _context.stop();}},_callee,null,[[0,6]]);}))();return;}handleCompletion();});/**
|
|
15
16
|
* Handles the cart animation end event.
|
|
16
17
|
* Resets the showCheckmark state to null in order to
|
|
17
18
|
* prevent the icon from animating after changing visibility
|
package/Checkbox/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var _excluded=["checkedClassName","unCheckedClassName","className"];function _extends(){_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;};return _extends.apply(this,arguments);}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key];}}return target;}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}import React from'react';import PropTypes from'prop-types';import classNames from'classnames';import BaseCheckbox from'@shopgate/pwa-common/components/Checkbox';import CheckedIcon from"../icons/CheckedIcon";import UncheckedIcon from"../icons/UncheckedIcon";import styles from"./style";/**
|
|
2
2
|
* The checkbox template component.
|
|
3
3
|
* @param {Object} props The component props
|
|
4
|
-
* @param {string} props.
|
|
5
|
-
* @param {string} props.
|
|
6
|
-
* @param {string} props.
|
|
7
|
-
* @returns {JSX}
|
|
4
|
+
* @param {string} props.className Class for the underlying Checkbox component
|
|
5
|
+
* @param {string} props.checkedClassName Class for checked icon.
|
|
6
|
+
* @param {string} props.unCheckedClassName Class for unchecked icon.
|
|
7
|
+
* @returns {JSX.Element}
|
|
8
8
|
*/var Checkbox=function Checkbox(_ref){var checkedClassName=_ref.checkedClassName,unCheckedClassName=_ref.unCheckedClassName,className=_ref.className,props=_objectWithoutProperties(_ref,_excluded);return React.createElement(BaseCheckbox,_extends({},props,{className:"ui-shared__checkbox ".concat(className),checkedIcon:React.createElement(CheckedIcon,{className:classNames(styles.icon,checkedClassName,'checkedIcon')}),uncheckedIcon:React.createElement(UncheckedIcon,{className:classNames(styles.icon,unCheckedClassName,'uncheckedIcon')})}));};Checkbox.defaultProps={checkedClassName:styles.checkedIcon,className:'',unCheckedClassName:styles.uncheckedIcon};export default Checkbox;
|
package/Checkbox/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var icon=css({width:24,height:24}).toString();var checkedIcon=css({color:"var(--color-secondary, ".concat(themeConfig.colors.accent,")")}).toString();var uncheckedIcon=css({color:themeConfig.colors.shade6}).toString();export default{icon:icon,checkedIcon:checkedIcon,uncheckedIcon:uncheckedIcon};
|
|
1
|
+
import{css}from'glamor';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var icon=css({width:24,height:24,flexShrink:0}).toString();var checkedIcon=css({color:"var(--color-secondary, ".concat(themeConfig.colors.accent,")")}).toString();var uncheckedIcon=css({color:themeConfig.colors.shade6}).toString();export default{icon:icon,checkedIcon:checkedIcon,uncheckedIcon:uncheckedIcon};
|
package/Chip/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React,{useRef,useCallback,useEffect}from'react';import PropTypes from'prop-types';import Button from'@shopgate/pwa-common/components/Button';import
|
|
1
|
+
import React,{useRef,useCallback,useEffect}from'react';import PropTypes from'prop-types';import Button from'@shopgate/pwa-common/components/Button';import ResponsiveContainer from'@shopgate/engage/components/ResponsiveContainer';import CrossIcon from"../icons/CrossIcon";import styles from"./style";/**
|
|
2
2
|
* The chip component.
|
|
3
3
|
* @param {Object} props The component props.
|
|
4
4
|
* @returns {JSX}
|
|
5
|
-
*/function Chip(props){var removable=props.removable,children=props.children,id=props.id,onClick=props.onClick,onRemove=props.onRemove,invert=props.invert,removeLabel=props.removeLabel,editLabel=props.editLabel;var ref=useRef(null);var handleRemove=useCallback(function(){onRemove(id);},[onRemove,id]);useEffect(function(){ref.current.removeAttribute('style');});return React.createElement("div",{ref:ref,className:"ui-shared__chip ".concat(styles.chip(removable,invert)),"data-test-id":id},removable&&React.createElement(Button,{className:styles.removeButton,onClick:handleRemove,testId:"removeFilter","aria-label":removeLabel},React.createElement(ResponsiveContainer,{breakpoint:"<=xs",appAlways:true},React.createElement(CrossIcon,{size:16
|
|
5
|
+
*/function Chip(props){var removable=props.removable,children=props.children,id=props.id,onClick=props.onClick,onRemove=props.onRemove,invert=props.invert,removeLabel=props.removeLabel,editLabel=props.editLabel;var ref=useRef(null);var handleRemove=useCallback(function(){onRemove(id);},[onRemove,id]);useEffect(function(){ref.current.removeAttribute('style');});return React.createElement("div",{ref:ref,className:"ui-shared__chip ".concat(styles.chip(removable,invert)),"data-test-id":id},removable&&React.createElement(Button,{className:styles.removeButton,onClick:handleRemove,testId:"removeFilter","aria-label":removeLabel},React.createElement(ResponsiveContainer,{breakpoint:"<=xs",appAlways:true},React.createElement(CrossIcon,{size:16})),React.createElement(ResponsiveContainer,{breakpoint:">xs",webOnly:true},React.createElement(CrossIcon,{size:18}))),React.createElement(Button,{className:styles.name,onClick:onClick,"aria-label":editLabel},children));}Chip.defaultProps={invert:false,onClick:function onClick(){},onRemove:function onRemove(){},removable:true,removeLabel:null,editLabel:null};export default Chip;
|
package/Chip/style.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _extends(){_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;};return _extends.apply(this,arguments);}import{css}from'glamor';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{
|
|
1
|
+
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _extends(){_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;};return _extends.apply(this,arguments);}import{css}from'glamor';import{responsiveMediaQuery}from'@shopgate/engage/styles';import{hasNewServices}from'@shopgate/engage/core/helpers';import{themeConfig}from'@shopgate/engage';/**
|
|
2
2
|
* Gets a basic style object for the chip layout.
|
|
3
3
|
* @param {boolean} hasRemoveButton Whether this chip has a remove button.
|
|
4
4
|
* @returns {Object} The style object.
|
|
@@ -7,4 +7,4 @@ function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj
|
|
|
7
7
|
* @param {boolean} hasRemoveButton Whether this chip has a remove button.
|
|
8
8
|
* @param {boolean} inverted Whether the colors of the chip are inverted.
|
|
9
9
|
* @returns {string} The style class name.
|
|
10
|
-
*/var chip=function chip(){var hasRemoveButton=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var inverted=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return css(_extends({},chipBase(hasRemoveButton),{backgroundColor:inverted?
|
|
10
|
+
*/var chip=function chip(){var hasRemoveButton=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;var inverted=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return css(_extends({},chipBase(hasRemoveButton),{},hasNewServices()?{backgroundColor:inverted?'var(--color-primary)':'var(--color-primary-contrast)',color:inverted?'var(--color-primary-contrast)':'var(--color-primary)'}:{backgroundColor:inverted?'var(--color-secondary)':'var(--color-secondary-contrast)',color:inverted?'var(--color-secondary-contrast)':'var(--color-secondary)','--color-text-high-emphasis':inverted?'var(--color-secondary-contrast)':'var(--color-secondary)'})).toString();};var removeButton=css(_defineProperty({flexShrink:0,padding:0},responsiveMediaQuery('>xs',{webOnly:true}),{padding:'0 5px',fontSize:'1.125rem'})).toString();var name=css(_defineProperty({paddingLeft:themeConfig.variables.gap.small*0.5,paddingRight:themeConfig.variables.gap.small*0.5,paddingTop:3,paddingBottom:3,fontSize:12,fontWeight:500,textOverflow:'ellipsis',maxWidth:'100%',whiteSpace:'nowrap',overflow:'hidden',display:'block',lineHeight:'1',color:'inherit'},responsiveMediaQuery('>xs',{webOnly:true}),{fontSize:'0.875rem',lineHeight:'1.25rem',padding:'6px 8px 6px 0'})).toString();export default{chip:chip,removeButton:removeButton,name:name};
|
package/Form/Checkbox/index.js
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
var _excluded=["name","label","onChange","className","errorText","translateErrorText","showErrorText"];function _typeof(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}function _extends(){_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;};return _extends.apply(this,arguments);}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key];}}return target;}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}function _callSuper(_this,derived,args){function isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){return false;}}derived=_getPrototypeOf(derived);return _possibleConstructorReturn(_this,isNativeReflectConstruct()?Reflect.construct(derived,args||[],_getPrototypeOf(_this).constructor):derived.apply(_this,args));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{PureComponent}from'react';import PropTypes from'prop-types';import classNames from'classnames';import I18n from'@shopgate/pwa-common/components/I18n';import UICheckbox from'@shopgate/pwa-ui-shared/Checkbox';import FormElement from'@shopgate/pwa-ui-shared/FormElement';import style from"./style";/**
|
|
1
|
+
var _excluded=["name","label","onChange","className","errorText","translateErrorText","showErrorText","checkboxClassName"];function _typeof(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj;};}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};}return _typeof(obj);}function _extends(){_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;};return _extends.apply(this,arguments);}function _objectWithoutProperties(source,excluded){if(source==null)return{};var target=_objectWithoutPropertiesLoose(source,excluded);var key,i;if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++){key=sourceSymbolKeys[i];if(excluded.indexOf(key)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key];}}return target;}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor;}function _callSuper(_this,derived,args){function isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(e){return false;}}derived=_getPrototypeOf(derived);return _possibleConstructorReturn(_this,isNativeReflectConstruct()?Reflect.construct(derived,args||[],_getPrototypeOf(_this).constructor):derived.apply(_this,args));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import React,{PureComponent}from'react';import PropTypes from'prop-types';import classNames from'classnames';import I18n from'@shopgate/pwa-common/components/I18n';import UICheckbox from'@shopgate/pwa-ui-shared/Checkbox';import FormElement from'@shopgate/pwa-ui-shared/FormElement';import style from"./style";/**
|
|
2
|
+
* @typedef {Object} Props
|
|
3
|
+
* @property {string} label Label for the checkbox
|
|
4
|
+
* @property {string} name Name for the form element that's used as "htmlFor" attribute to create
|
|
5
|
+
* a connection between label and checkbox elements.
|
|
6
|
+
* @property {string} [checkboxClassName] Class name for the underlying Checkbox component
|
|
7
|
+
* @property {string} [className] Class name for the underlying FormElement component
|
|
8
|
+
* @property {boolean} [defaultChecked] Whether the checkbox is checked by default
|
|
9
|
+
* @property {boolean} [disabled] Whether the checkbox is disabled (default `false`)
|
|
10
|
+
* @property {string} [errorText] An error text for the form element
|
|
11
|
+
* @property {boolean} [showErrorText] Whether to show the error text when present (default `true`)
|
|
12
|
+
* @property {boolean} [translateErrorText] Whether `errorText` is a translation key
|
|
13
|
+
* @property {Function} [onChange] Change handler for the checkbox
|
|
14
|
+
*/ /**
|
|
2
15
|
* A component that provides a styled checkbox field.
|
|
3
|
-
* @
|
|
16
|
+
* @extends {React.Component<Props>}
|
|
17
|
+
* @returns {JSX.Element}
|
|
4
18
|
*/var Checkbox=/*#__PURE__*/function(_PureComponent){function Checkbox(){_classCallCheck(this,Checkbox);return _callSuper(this,Checkbox,arguments);}_inherits(Checkbox,_PureComponent);return _createClass(Checkbox,[{key:"render",value:/**
|
|
5
19
|
* @return {JSX}
|
|
6
|
-
*/function render(){var _this$props=this.props,name=_this$props.name,label=_this$props.label,onChange=_this$props.onChange,className=_this$props.className,errorText=_this$props.errorText,translateErrorText=_this$props.translateErrorText,showErrorText=_this$props.showErrorText,restProps=_objectWithoutProperties(_this$props,_excluded);return React.createElement(FormElement,{className:classNames(className,style.root,'checkbox','ui-shared__form__checkbox'),htmlFor:name,errorText:errorText,translateErrorText:translateErrorText,hasUnderline:false,hasPlaceholder:false,disabled:restProps.disabled,showErrorText:showErrorText},React.createElement(UICheckbox,_extends({},restProps,{name:name,onCheck:onChange,checkedClassName:"".concat(className," ").concat(style.checked),unCheckedClassName:className,labelPosition:"right",label:React.createElement("div",{className:classNames(style.labelWrapper,'label')},React.createElement(I18n.Text,{className:style.label,string:label}))})));}}]);}(PureComponent);_defineProperty(Checkbox,"defaultProps",{className:'',defaultChecked:undefined,errorText:'',label:'',onChange:function onChange(){},translateErrorText:true,disabled:false,showErrorText:true});export default Checkbox;
|
|
20
|
+
*/function render(){var _this$props=this.props,name=_this$props.name,label=_this$props.label,onChange=_this$props.onChange,className=_this$props.className,errorText=_this$props.errorText,translateErrorText=_this$props.translateErrorText,showErrorText=_this$props.showErrorText,checkboxClassName=_this$props.checkboxClassName,restProps=_objectWithoutProperties(_this$props,_excluded);return React.createElement(FormElement,{className:classNames(className,style.root,'checkbox','ui-shared__form__checkbox'),htmlFor:name,errorText:errorText,translateErrorText:translateErrorText,hasUnderline:false,hasPlaceholder:false,disabled:restProps.disabled,showErrorText:showErrorText},React.createElement(UICheckbox,_extends({},restProps,{className:checkboxClassName,name:name,onCheck:onChange,checkedClassName:"".concat(className," ").concat(style.checked),unCheckedClassName:className,labelPosition:"right",label:typeof label==='string'?React.createElement("div",{className:classNames(style.labelWrapper,'label')},React.createElement(I18n.Text,{className:style.label,string:label})):label})));}}]);}(PureComponent);_defineProperty(Checkbox,"defaultProps",{className:'',checkboxClassName:undefined,defaultChecked:undefined,errorText:'',label:'',onChange:function onChange(){},translateErrorText:true,disabled:false,showErrorText:true});export default Checkbox;
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/pwa-ui-shared",
|
|
3
|
-
"version": "7.20.0
|
|
3
|
+
"version": "7.20.0",
|
|
4
4
|
"description": "Shopgate's shared UI components.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@shopgate/pwa-ui-ios": "7.20.0
|
|
9
|
-
"@shopgate/pwa-ui-material": "7.20.0
|
|
8
|
+
"@shopgate/pwa-ui-ios": "7.20.0",
|
|
9
|
+
"@shopgate/pwa-ui-material": "7.20.0",
|
|
10
10
|
"react-day-picker": "^7.4.8"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@shopgate/pwa-common": "7.20.0
|
|
14
|
-
"@shopgate/pwa-common-commerce": "7.20.0
|
|
13
|
+
"@shopgate/pwa-common": "7.20.0",
|
|
14
|
+
"@shopgate/pwa-common-commerce": "7.20.0",
|
|
15
15
|
"classnames": "2.3.3",
|
|
16
16
|
"react": "~16.12.0"
|
|
17
17
|
},
|