@shopgate/pwa-ui-shared 7.27.2-beta.6 → 7.27.2-beta.7
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.
|
@@ -6,7 +6,7 @@ function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj
|
|
|
6
6
|
* The styles for the invisible hint text.
|
|
7
7
|
*/var placeholderInactive=css({opacity:0}).toString();/**
|
|
8
8
|
* Additional left spacing when a left element is present
|
|
9
|
-
*/var leftOffset=css({left:
|
|
9
|
+
*/var leftOffset=css({left:'var(--form-element-left-offset, 26px)',width:'calc(100% - var(--form-element-left-offset, 26px))'}).toString();/**
|
|
10
10
|
* Gets the style classes for the underline element.
|
|
11
11
|
* @param {boolean} visible Whether the hint is visible.
|
|
12
12
|
* @param {boolean} hasLeftElement - Whether a left element is present.
|
package/NoResults/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React,{useMemo}from'react';import PropTypes from'prop-types';import classNames from'classnames';import I18n from'@shopgate/pwa-common/components/I18n';import{themeConfig}from'@shopgate/pwa-common/helpers/config';import{svgToDataUrl}from'@shopgate/engage/core';import Icon from"./components/Icon";import styles from"./style";var _ref=themeConfig||{},_ref$svgImages=_ref.svgImages,svgImages=_ref$svgImages===void 0?{}:_ref$svgImages;var _ref2=svgImages||{},_ref2$noResultsImage=_ref2.noResultsImage,noResultsImage=_ref2$noResultsImage===void 0?'':_ref2$noResultsImage;/**
|
|
2
2
|
* The NoResults component.
|
|
3
3
|
* @param {Object} props The component props.
|
|
4
4
|
* @returns {JSX.Element}
|
|
5
|
-
*/var NoResults=function NoResults(props){return React.createElement("div",{className:classNames(styles.wrapper,props.className,' ui-shared__no-results'),"data-test-id":"noResults"},React.createElement("div",{className:styles.icon},React.createElement(Icon,null)),React.createElement("div",{role:"alert","aria-atomic":"true"},React.createElement("div",{className:styles.headline},React.createElement(I18n.Text,{string:props.headlineText,params:props})),React.createElement("div",{className:styles.text},React.createElement(I18n.Text,{string:props.bodyText,params:props}))));};NoResults.defaultProps={className:null};export default NoResults;
|
|
5
|
+
*/var NoResults=function NoResults(props){var imageSRC=useMemo(function(){return svgToDataUrl(noResultsImage);},[]);return React.createElement("div",{className:classNames(styles.wrapper,props.className,' ui-shared__no-results'),"data-test-id":"noResults"},React.createElement("div",{className:classNames(styles.icon,'no-results__image')},noResultsImage?React.createElement("img",{src:imageSRC,alt:""}):React.createElement(Icon,null)),React.createElement("div",{role:"alert","aria-atomic":"true"},React.createElement("div",{className:styles.headline},React.createElement(I18n.Text,{string:props.headlineText,params:props})),React.createElement("div",{className:styles.text},React.createElement(I18n.Text,{string:props.bodyText,params:props}))));};NoResults.defaultProps={className:null};export default NoResults;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
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 React from'react';import Icon from'@shopgate/pwa-common/components/Icon';import{themeConfig}from'@shopgate/pwa-common/helpers/config';var fallback='<path d="M0 0h24v24H0z" fill="none"/><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>';/**
|
|
2
|
+
* The Person icon component
|
|
3
|
+
*
|
|
4
|
+
* @link https://fonts.google.com/icons?selected=Material+Icons:person
|
|
5
|
+
*
|
|
6
|
+
* @param {Object} props - Icon component props.
|
|
7
|
+
* @returns {JSX.Element}
|
|
8
|
+
*/var PersonIcon=function PersonIcon(props){return React.createElement(Icon,_extends({content:themeConfig.icons.person||fallback},props));};export default PersonIcon;
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/pwa-ui-shared",
|
|
3
|
-
"version": "7.27.2-beta.
|
|
3
|
+
"version": "7.27.2-beta.7",
|
|
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.27.2-beta.
|
|
9
|
-
"@shopgate/pwa-ui-material": "7.27.2-beta.
|
|
8
|
+
"@shopgate/pwa-ui-ios": "7.27.2-beta.7",
|
|
9
|
+
"@shopgate/pwa-ui-material": "7.27.2-beta.7",
|
|
10
10
|
"react-day-picker": "^7.4.8"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@shopgate/pwa-common": "7.27.2-beta.
|
|
14
|
-
"@shopgate/pwa-common-commerce": "7.27.2-beta.
|
|
13
|
+
"@shopgate/pwa-common": "7.27.2-beta.7",
|
|
14
|
+
"@shopgate/pwa-common-commerce": "7.27.2-beta.7",
|
|
15
15
|
"classnames": "2.5.1",
|
|
16
16
|
"react": "~16.14.0"
|
|
17
17
|
},
|