@popmenu/ordering-ui 0.95.0 → 0.97.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/build/components/MenuItem/MenuItem.styles.d.ts +1 -1
- package/build/components/MenuItem/MenuItemProps.d.ts +1 -1
- package/build/index.es.js +40 -42
- package/build/index.es.js.map +1 -1
- package/build/index.js +39 -41
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- package/build/components/DishCard/DishCard.d.ts +0 -3
- package/build/components/DishCard/DishCard.styles.d.ts +0 -2
- package/build/components/DishCard/DishCardProps.d.ts +0 -29
- package/build/components/DishCard/index.d.ts +0 -2
package/build/index.js
CHANGED
|
@@ -154,7 +154,7 @@ var Button = React.forwardRef(function (props, ref) {
|
|
|
154
154
|
});
|
|
155
155
|
Button.displayName = 'Button';
|
|
156
156
|
|
|
157
|
-
var
|
|
157
|
+
var useMenuItemStyles = styles.makeStyles(function (theme) {
|
|
158
158
|
var _a, _b;
|
|
159
159
|
return ({
|
|
160
160
|
cardActionArea: (_a = {
|
|
@@ -200,6 +200,7 @@ var useDishCardStyles = styles.makeStyles(function (theme) {
|
|
|
200
200
|
fontWeight: 400,
|
|
201
201
|
fontSize: 14,
|
|
202
202
|
lineHeight: '20px',
|
|
203
|
+
marginBottom: theme.spacing(1),
|
|
203
204
|
color: theme.palette.grey[700],
|
|
204
205
|
'-webkit-line-clamp': 2,
|
|
205
206
|
display: '-webkit-box',
|
|
@@ -516,6 +517,25 @@ function SvgTrash(props) {
|
|
|
516
517
|
})));
|
|
517
518
|
}
|
|
518
519
|
|
|
520
|
+
var _g$11;
|
|
521
|
+
|
|
522
|
+
function _extends$1G() { _extends$1G = 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$1G.apply(this, arguments); }
|
|
523
|
+
|
|
524
|
+
function SvgRestaurantMenu(props) {
|
|
525
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1G({
|
|
526
|
+
viewBox: "0 0 16 16",
|
|
527
|
+
fill: "none",
|
|
528
|
+
strokeLinecap: "round",
|
|
529
|
+
strokeLinejoin: "round",
|
|
530
|
+
width: "1em",
|
|
531
|
+
height: "1em"
|
|
532
|
+
}, props), _g$11 || (_g$11 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
533
|
+
stroke: "currentColor"
|
|
534
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
535
|
+
d: "M11.334.667l-8 2.666h8V.667zM3.333 3.333h9.333v11.333H3.333zM5.333 8h5.334m-5.334 2.333h1m2 0h2.334"
|
|
536
|
+
}))));
|
|
537
|
+
}
|
|
538
|
+
|
|
519
539
|
var _path$h, _path2$3;
|
|
520
540
|
|
|
521
541
|
function _extends$C() { _extends$C = 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$C.apply(this, arguments); }
|
|
@@ -1470,7 +1490,7 @@ StatusTag.displayName = 'StatusTag';
|
|
|
1470
1490
|
|
|
1471
1491
|
var MenuItem = React.forwardRef(function (props, ref) {
|
|
1472
1492
|
var onClick = props.onClick, id = props.id, description = props.description, isOutOfStock = props.isOutOfStock, title = props.title, loading = props.loading;
|
|
1473
|
-
var classes =
|
|
1493
|
+
var classes = useMenuItemStyles(props);
|
|
1474
1494
|
var handleClick = function (event) {
|
|
1475
1495
|
onClick(id, event);
|
|
1476
1496
|
};
|
|
@@ -1949,40 +1969,8 @@ var LocationCard = function (props) {
|
|
|
1949
1969
|
React__default['default'].createElement(Typography, { variant: "body2" }, availability)))))));
|
|
1950
1970
|
};
|
|
1951
1971
|
|
|
1952
|
-
var _g, _defs;
|
|
1953
|
-
|
|
1954
|
-
function _extends$1() { _extends$1 = 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$1.apply(this, arguments); }
|
|
1955
|
-
|
|
1956
|
-
function SvgRestaurantMenuIcon(props) {
|
|
1957
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
1958
|
-
width: 20,
|
|
1959
|
-
height: 21,
|
|
1960
|
-
fill: "none",
|
|
1961
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
1962
|
-
}, props), _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
1963
|
-
clipPath: "url(#restaurant-menu-icon_svg__clip0_3133_12817)",
|
|
1964
|
-
stroke: "#2E3042",
|
|
1965
|
-
strokeWidth: 1.667,
|
|
1966
|
-
strokeLinejoin: "round"
|
|
1967
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1968
|
-
d: "M14.167 1.623l-10 3.333h10V1.623z",
|
|
1969
|
-
strokeLinecap: "round"
|
|
1970
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
1971
|
-
d: "M4.167 4.957h11.667v14.167H4.167z"
|
|
1972
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
1973
|
-
d: "M6.667 10.79h6.667m-6.667 2.916h1.25m2.5 0h2.917",
|
|
1974
|
-
strokeLinecap: "round"
|
|
1975
|
-
}))), _defs || (_defs = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
1976
|
-
id: "restaurant-menu-icon_svg__clip0_3133_12817"
|
|
1977
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1978
|
-
fill: "#fff",
|
|
1979
|
-
transform: "translate(0 .79)",
|
|
1980
|
-
d: "M0 0h20v20H0z"
|
|
1981
|
-
})))));
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1984
1972
|
var useMenuDropdownStyles = styles.makeStyles(function (theme) {
|
|
1985
|
-
var _a;
|
|
1973
|
+
var _a, _b;
|
|
1986
1974
|
return ({
|
|
1987
1975
|
formControl: (_a = {},
|
|
1988
1976
|
_a[theme.breakpoints.up('lg')] = {
|
|
@@ -1995,11 +1983,17 @@ var useMenuDropdownStyles = styles.makeStyles(function (theme) {
|
|
|
1995
1983
|
gridGap: theme.spacing(1),
|
|
1996
1984
|
},
|
|
1997
1985
|
select: {
|
|
1998
|
-
'& .MuiSelect-root': {
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
1986
|
+
'& .MuiSelect-root': (_b = {
|
|
1987
|
+
color: '#212121',
|
|
1988
|
+
padding: theme.spacing(1, 0.5, 1, 0.5),
|
|
1989
|
+
zIndex: 10
|
|
1990
|
+
},
|
|
1991
|
+
_b[theme.breakpoints.down('md')] = {
|
|
1992
|
+
width: 0,
|
|
1993
|
+
minWidth: 0,
|
|
1994
|
+
padding: 0,
|
|
1995
|
+
},
|
|
1996
|
+
_b),
|
|
2003
1997
|
},
|
|
2004
1998
|
unavailable: {
|
|
2005
1999
|
color: theme.palette.grey[700],
|
|
@@ -2011,9 +2005,13 @@ var MenuDropdown = function (props) {
|
|
|
2011
2005
|
var menuOptions = props.menuOptions, onSelect = props.onSelect, selectedOptionId = props.selectedOptionId;
|
|
2012
2006
|
var classes = useMenuDropdownStyles(props);
|
|
2013
2007
|
var _a = React.useState(false), open = _a[0], setOpen = _a[1];
|
|
2008
|
+
var isMobile = core.useMediaQuery(function (_a) {
|
|
2009
|
+
var breakpoints = _a.breakpoints;
|
|
2010
|
+
return breakpoints.down('md');
|
|
2011
|
+
});
|
|
2014
2012
|
return (React__default['default'].createElement(core.FormControl, { hiddenLabel: true, classes: { root: classes.formControl } },
|
|
2015
2013
|
React__default['default'].createElement(core.Select, { open: open, value: selectedOptionId, labelId: "menu-dropdown-select", onClick: function () { return setOpen(!open); }, disableUnderline: true, onChange: function (event) { return onSelect(event.target.value); }, fullWidth: true, startAdornment: React__default['default'].createElement(core.InputAdornment, { position: "start" },
|
|
2016
|
-
React__default['default'].createElement(Icon, { icon:
|
|
2014
|
+
React__default['default'].createElement(Icon, { icon: SvgRestaurantMenu, size: isMobile ? 'extra-large' : 'large' })), IconComponent: function () { return (React__default['default'].createElement(core.InputAdornment, { position: "end" },
|
|
2017
2015
|
React__default['default'].createElement(Icon, { color: "#0076CB", icon: open ? SvgChevronUp : SvgChevronDown, size: "large" }))); }, MenuProps: {
|
|
2018
2016
|
disablePortal: true,
|
|
2019
2017
|
anchorOrigin: {
|