@shopgate/engage 7.29.7-beta.2 → 7.29.8-beta.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{css}from'glamor';import{themeConfig}from'@shopgate/engage';var variables=themeConfig.variables,colors=themeConfig.colors;export var IMAGE_SPACE=72;var item=css({cursor:'pointer'}).toString();var itemNotLast=css({'&:not(:last-child)':{boxShadow:"0 1px 0 0 ".concat(colors.darkGray),marginBottom:1}}).toString();var itemSelected=css({background:"var(--color-background-accent, ".concat(colors.shade7,")"),boxShadow:"-".concat(variables.gap.bigger,"px 0 0 var(--color-background-accent, ").concat(colors.shade7,"), ").concat(variables.gap.bigger,"px 0 0 var(--color-background-accent, ").concat(colors.shade7,")"),marginTop:-1}).toString();var itemWithImage=css({marginLeft:IMAGE_SPACE}).toString();var innerContainer=css({minHeight:56,position:'relative'}).toString();export default{item:item,itemNotLast:itemNotLast,itemSelected:itemSelected,itemWithImage:itemWithImage,innerContainer:innerContainer};
|
|
1
|
+
import{css}from'glamor';import{themeConfig}from'@shopgate/engage';var variables=themeConfig.variables,colors=themeConfig.colors;export var IMAGE_SPACE=72;var item=css({margin:"0 ".concat(variables.gap.big,"px"),cursor:'pointer'}).toString();var itemNotLast=css({'&:not(:last-child)':{boxShadow:"0 1px 0 0 ".concat(colors.darkGray),marginBottom:1}}).toString();var itemSelected=css({background:"var(--color-background-accent, ".concat(colors.shade7,")"),boxShadow:"-".concat(variables.gap.bigger,"px 0 0 var(--color-background-accent, ").concat(colors.shade7,"), ").concat(variables.gap.bigger,"px 0 0 var(--color-background-accent, ").concat(colors.shade7,")"),marginTop:-1}).toString();var itemWithImage=css({marginLeft:IMAGE_SPACE}).toString();var innerContainer=css({minHeight:56,position:'relative'}).toString();export default{item:item,itemNotLast:itemNotLast,itemSelected:itemSelected,itemWithImage:itemWithImage,innerContainer:innerContainer};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopgate/engage",
|
|
3
|
-
"version": "7.29.
|
|
3
|
+
"version": "7.29.8-beta.1",
|
|
4
4
|
"description": "Shopgate's ENGAGE library.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Shopgate <support@shopgate.com>",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@emotion/react": "^11.14.0",
|
|
19
19
|
"@shopgate/native-modules": "1.0.0-beta.25",
|
|
20
|
-
"@shopgate/pwa-common": "7.29.
|
|
21
|
-
"@shopgate/pwa-common-commerce": "7.29.
|
|
22
|
-
"@shopgate/pwa-core": "7.29.
|
|
23
|
-
"@shopgate/pwa-ui-ios": "7.29.
|
|
24
|
-
"@shopgate/pwa-ui-material": "7.29.
|
|
25
|
-
"@shopgate/pwa-ui-shared": "7.29.
|
|
20
|
+
"@shopgate/pwa-common": "7.29.8-beta.1",
|
|
21
|
+
"@shopgate/pwa-common-commerce": "7.29.8-beta.1",
|
|
22
|
+
"@shopgate/pwa-core": "7.29.8-beta.1",
|
|
23
|
+
"@shopgate/pwa-ui-ios": "7.29.8-beta.1",
|
|
24
|
+
"@shopgate/pwa-ui-material": "7.29.8-beta.1",
|
|
25
|
+
"@shopgate/pwa-ui-shared": "7.29.8-beta.1",
|
|
26
26
|
"@stripe/react-stripe-js": "^1.16.5",
|
|
27
27
|
"@stripe/stripe-js": "^1.3.1",
|
|
28
28
|
"@virtuous/conductor": "~2.5.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React,{useCallback}from'react';import PropTypes from'prop-types';import{SheetDrawer,SheetList}from'@shopgate/engage/components';import Item from"../SheetItem";/**
|
|
1
|
+
import React,{useCallback}from'react';import PropTypes from'prop-types';import{SheetDrawer,SheetList}from'@shopgate/engage/components';import{makeStyles}from'@shopgate/engage/styles';import Item from"../SheetItem";var useStyles=makeStyles()({sheetList:{'& li':{margin:0}}});/**
|
|
2
2
|
* The CategorySheet component.
|
|
3
3
|
* @param {Object} props The component props.
|
|
4
4
|
* @param {Array} props.items The list of items to display.
|
|
@@ -8,4 +8,4 @@ import React,{useCallback}from'react';import PropTypes from'prop-types';import{S
|
|
|
8
8
|
* @param {Function} props.onSelect The selection handler.
|
|
9
9
|
* @param {string} props.selectedId The currently selected item id.
|
|
10
10
|
* @return {JSX.Element}
|
|
11
|
-
*/var CategorySheet=function CategorySheet(_ref){var items=_ref.items,label=_ref.label,onClose=_ref.onClose,open=_ref.open,selectedId=_ref.selectedId,onSelect=_ref.onSelect;var handleItemClick=useCallback(function(event){event.stopPropagation();onSelect(event.target.value);},[onSelect]);return React.createElement(SheetDrawer,{title:label,isOpen:open,onClose:onClose},React.createElement(SheetList,{className:"widget__nested-category-filter__sheet-list"},items.map(function(item){return React.createElement(Item,{item:item,key:item.id,onClick:handleItemClick,isSelected:item.id===selectedId});})));};CategorySheet.defaultProps={onClose:function onClose(){},onSelect:function onSelect(){},selectedId:null};export default CategorySheet;
|
|
11
|
+
*/var CategorySheet=function CategorySheet(_ref){var items=_ref.items,label=_ref.label,onClose=_ref.onClose,open=_ref.open,selectedId=_ref.selectedId,onSelect=_ref.onSelect;var _useStyles=useStyles(),classes=_useStyles.classes;var handleItemClick=useCallback(function(event){event.stopPropagation();onSelect(event.target.value);},[onSelect]);return React.createElement(SheetDrawer,{title:label,isOpen:open,onClose:onClose},React.createElement(SheetList,{className:"widget__nested-category-filter__sheet-list ".concat(classes.sheetList)},items.map(function(item){return React.createElement(Item,{item:item,key:item.id,onClick:handleItemClick,isSelected:item.id===selectedId});})));};CategorySheet.defaultProps={onClose:function onClose(){},onSelect:function onSelect(){},selectedId:null};export default CategorySheet;
|