@popmenu/ordering-ui 0.92.0 → 0.94.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/index.es.js +57 -15
- package/build/index.es.js.map +1 -1
- package/build/index.js +56 -14
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button as Button$1, makeStyles as makeStyles$1, Box, Typography as Typography$1, Link as Link$1, Paper as Paper$1, Avatar as Avatar$1, Card, CardActionArea, FormControl, Select, InputAdornment, MenuItem as MenuItem$1, TextField, RadioGroup, FormControlLabel as FormControlLabel$1, Radio as Radio$2, FormGroup, Checkbox as Checkbox$2, Menu, Tabs, Chip, DialogTitle as DialogTitle$1, IconButton as IconButton$1, withStyles, Switch as Switch$2 } from '@material-ui/core';
|
|
2
2
|
export * from '@material-ui/core';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import React__default, { forwardRef,
|
|
4
|
+
import React__default, { forwardRef, createContext, createElement, useContext, useState } from 'react';
|
|
5
5
|
import { makeStyles, lighten } from '@material-ui/core/styles';
|
|
6
6
|
import '@material-ui/lab/Alert';
|
|
7
7
|
import '@material-ui/core/AppBar';
|
|
@@ -170,7 +170,7 @@ var useDishCardStyles = makeStyles(function (theme) {
|
|
|
170
170
|
});
|
|
171
171
|
});
|
|
172
172
|
|
|
173
|
-
var useStyles$
|
|
173
|
+
var useStyles$5 = makeStyles$1(function () { return ({
|
|
174
174
|
img: {
|
|
175
175
|
objectFit: 'cover',
|
|
176
176
|
width: '100%',
|
|
@@ -180,7 +180,7 @@ var useStyles$6 = makeStyles$1(function () { return ({
|
|
|
180
180
|
var MenuItemImg = function (props) {
|
|
181
181
|
var _a = props.image, image = _a === void 0 ? {} : _a;
|
|
182
182
|
var src = image.src, alt = image.alt;
|
|
183
|
-
var classes = useStyles$
|
|
183
|
+
var classes = useStyles$5();
|
|
184
184
|
if (!src || !alt) {
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
@@ -191,37 +191,37 @@ var MenuItemInfo = function (props) {
|
|
|
191
191
|
return (React__default.createElement(Box, { display: "flex", flexGrow: 1, flexDirection: "column", height: "100%" }, props.children));
|
|
192
192
|
};
|
|
193
193
|
|
|
194
|
-
var _path$
|
|
194
|
+
var _path$2p;
|
|
195
195
|
|
|
196
|
-
function _extends$
|
|
196
|
+
function _extends$5p() { _extends$5p = 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$5p.apply(this, arguments); }
|
|
197
197
|
|
|
198
198
|
function SvgChevronDown(props) {
|
|
199
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
199
|
+
return /*#__PURE__*/React.createElement("svg", _extends$5p({
|
|
200
200
|
viewBox: "0 0 16 16",
|
|
201
201
|
fill: "none",
|
|
202
202
|
strokeLinecap: "round",
|
|
203
203
|
strokeLinejoin: "round",
|
|
204
204
|
width: "1em",
|
|
205
205
|
height: "1em"
|
|
206
|
-
}, props), _path$
|
|
206
|
+
}, props), _path$2p || (_path$2p = /*#__PURE__*/React.createElement("path", {
|
|
207
207
|
d: "M4 6l4 4 4-4",
|
|
208
208
|
stroke: "currentColor"
|
|
209
209
|
})));
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
var _path$
|
|
212
|
+
var _path$2o;
|
|
213
213
|
|
|
214
|
-
function _extends$
|
|
214
|
+
function _extends$5o() { _extends$5o = 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$5o.apply(this, arguments); }
|
|
215
215
|
|
|
216
216
|
function SvgChevronUp(props) {
|
|
217
|
-
return /*#__PURE__*/React.createElement("svg", _extends$
|
|
217
|
+
return /*#__PURE__*/React.createElement("svg", _extends$5o({
|
|
218
218
|
viewBox: "0 0 16 16",
|
|
219
219
|
fill: "none",
|
|
220
220
|
strokeLinecap: "round",
|
|
221
221
|
strokeLinejoin: "round",
|
|
222
222
|
width: "1em",
|
|
223
223
|
height: "1em"
|
|
224
|
-
}, props), _path$
|
|
224
|
+
}, props), _path$2o || (_path$2o = /*#__PURE__*/React.createElement("path", {
|
|
225
225
|
d: "M12 10L8 6l-4 4",
|
|
226
226
|
stroke: "currentColor"
|
|
227
227
|
})));
|
|
@@ -1038,7 +1038,7 @@ Link.defaultProps = {
|
|
|
1038
1038
|
};
|
|
1039
1039
|
Link.displayName = 'Link';
|
|
1040
1040
|
|
|
1041
|
-
var useStyles$
|
|
1041
|
+
var useStyles$4$1 = makeStyles$1(function (_a) {
|
|
1042
1042
|
var spacing = _a.spacing;
|
|
1043
1043
|
return ({
|
|
1044
1044
|
root: {
|
|
@@ -1052,7 +1052,7 @@ var useStyles$5 = makeStyles$1(function (_a) {
|
|
|
1052
1052
|
});
|
|
1053
1053
|
var Paper = forwardRef(function (props, ref) {
|
|
1054
1054
|
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
1055
|
-
var classes = useStyles$
|
|
1055
|
+
var classes = useStyles$4$1(props);
|
|
1056
1056
|
return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
1057
1057
|
});
|
|
1058
1058
|
Paper.displayName = 'Paper';
|
|
@@ -1205,6 +1205,45 @@ makeStyles$1(function (theme) { return ({
|
|
|
1205
1205
|
},
|
|
1206
1206
|
}); });
|
|
1207
1207
|
|
|
1208
|
+
makeStyles$1(function () { return ({
|
|
1209
|
+
root: {
|
|
1210
|
+
display: 'flex',
|
|
1211
|
+
flexDirection: 'column',
|
|
1212
|
+
alignItems: 'center',
|
|
1213
|
+
gridGap: 16,
|
|
1214
|
+
},
|
|
1215
|
+
}); });
|
|
1216
|
+
|
|
1217
|
+
var FollowerAuthenticationDialogContext = createContext(null);
|
|
1218
|
+
FollowerAuthenticationDialogContext.Provider;
|
|
1219
|
+
|
|
1220
|
+
makeStyles$1(function () { return ({
|
|
1221
|
+
form: {
|
|
1222
|
+
display: 'flex',
|
|
1223
|
+
flexDirection: 'column',
|
|
1224
|
+
alignItems: 'center',
|
|
1225
|
+
width: '100%',
|
|
1226
|
+
gridGap: 16,
|
|
1227
|
+
},
|
|
1228
|
+
}); });
|
|
1229
|
+
|
|
1230
|
+
makeStyles$1(function () { return ({
|
|
1231
|
+
main: {
|
|
1232
|
+
width: '100%',
|
|
1233
|
+
display: 'flex',
|
|
1234
|
+
flexDirection: 'column',
|
|
1235
|
+
gridGap: 16,
|
|
1236
|
+
},
|
|
1237
|
+
}); });
|
|
1238
|
+
|
|
1239
|
+
makeStyles$1(function () { return ({
|
|
1240
|
+
root: {
|
|
1241
|
+
position: 'absolute',
|
|
1242
|
+
top: 0,
|
|
1243
|
+
right: 0,
|
|
1244
|
+
},
|
|
1245
|
+
}); });
|
|
1246
|
+
|
|
1208
1247
|
var ReactionCounter = function (props) {
|
|
1209
1248
|
var count = props.count, icon = props.icon;
|
|
1210
1249
|
return (React__default.createElement(Box, { display: "flex", alignItems: "center", gridGap: 6 },
|
|
@@ -1501,6 +1540,9 @@ var DishCheckoutCard = function (props) {
|
|
|
1501
1540
|
var handleQuantityChange = function (event) {
|
|
1502
1541
|
return onQuantityChange(id, parseInt(event.target.value, 10));
|
|
1503
1542
|
};
|
|
1543
|
+
var labelString = function (label) {
|
|
1544
|
+
return label.replace(/[^a-zA-Z\s]/g, '').toLowerCase();
|
|
1545
|
+
};
|
|
1504
1546
|
return (React__default.createElement(Box, { className: classes.root },
|
|
1505
1547
|
React__default.createElement(Box, { display: "flex", justifyContent: "space-between", gridGap: 3 },
|
|
1506
1548
|
React__default.createElement(Box, null,
|
|
@@ -1520,7 +1562,7 @@ var DishCheckoutCard = function (props) {
|
|
|
1520
1562
|
React__default.createElement(Icon, { icon: SvgTrash, size: "large" })))),
|
|
1521
1563
|
React__default.createElement(Box, { display: "flex", gridGap: 16, alignItems: "center" },
|
|
1522
1564
|
React__default.createElement(FormControl, { variant: "outlined", hiddenLabel: true },
|
|
1523
|
-
React__default.createElement(Select, { disabled: disabled, open: open, value: quantity, labelId: "select-label-" + id, onClick: function () { return setOpen(!open); }, disableUnderline: true, onChange: handleQuantityChange, fullWidth: true, startAdornment: React__default.createElement(InputAdornment, { position: "start" },
|
|
1565
|
+
React__default.createElement(Select, { disabled: disabled, open: open, value: quantity, labelId: "select-label-" + id, "aria-label": labelString(name) + " quantity select", onClick: function () { return setOpen(!open); }, disableUnderline: true, onChange: handleQuantityChange, fullWidth: true, startAdornment: React__default.createElement(InputAdornment, { position: "start" },
|
|
1524
1566
|
React__default.createElement(Icon, { icon: open ? SvgChevronUp : SvgChevronDown, size: "large" })), inputProps: { shrink: false }, MenuProps: {
|
|
1525
1567
|
disablePortal: true,
|
|
1526
1568
|
anchorOrigin: {
|
|
@@ -1533,7 +1575,7 @@ var DishCheckoutCard = function (props) {
|
|
|
1533
1575
|
},
|
|
1534
1576
|
getContentAnchorEl: null,
|
|
1535
1577
|
classes: { paper: classes.selectPaper },
|
|
1536
|
-
}, className: classes.select }, Array.from({ length: 99 }, function (_, index) { return (React__default.createElement(MenuItem$1, { key: index + 1, value: index + 1 }, index + 1)); }))),
|
|
1578
|
+
}, className: classes.select }, Array.from({ length: 99 }, function (_, index) { return (React__default.createElement(MenuItem$1, { key: index + 1, value: index + 1, "aria-label": "" + (index + 1) }, index + 1)); }))),
|
|
1537
1579
|
React__default.createElement(Typography, { className: classes.price }, formattedPrice)),
|
|
1538
1580
|
warningMessage && (React__default.createElement(Box, { className: classes.warning },
|
|
1539
1581
|
React__default.createElement(Box, { paddingTop: 0.25 },
|