@popmenu/ordering-ui 0.84.1 → 0.85.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/DialogSection/DialogSection.d.ts +7 -0
- package/build/components/DialogSection/index.d.ts +1 -0
- package/build/components/DialogTitle/DialogTitle.d.ts +8 -0
- package/build/components/DialogTitle/index.d.ts +1 -0
- package/build/components/DishCheckoutCard/DishCheckoutCardProps.d.ts +5 -3
- package/build/components/DishDetailsReview/DishDetailsReviewProps.d.ts +4 -4
- package/build/components/DishModifierCard/DishModifierCardProps.d.ts +3 -3
- package/build/components/LocationCard/LocationCardProps.d.ts +1 -1
- package/build/components/index.d.ts +2 -0
- package/build/index.es.js +116 -26
- package/build/index.es.js.map +1 -1
- package/build/index.js +116 -24
- package/build/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DialogSection } from './DialogSection';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DialogTitle } from './DialogTitle';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export interface DishCheckoutCardProps {
|
|
2
|
+
/** Adds a border to the bottom of the card */
|
|
3
|
+
borderBottom?: boolean;
|
|
2
4
|
/** Modifiers of the dish in tuple format */
|
|
3
5
|
modifiers?: [string, string][];
|
|
4
6
|
/** Id of the dish */
|
|
@@ -9,14 +11,14 @@ export interface DishCheckoutCardProps {
|
|
|
9
11
|
name: string;
|
|
10
12
|
/** Quantity of dish selected */
|
|
11
13
|
quantity: number;
|
|
12
|
-
/** Price of
|
|
14
|
+
/** Price of an item. numbers will be prepended with the currencySymbol from OrderingAppContext. */
|
|
13
15
|
price: number | string;
|
|
14
16
|
/** Callback for edit button */
|
|
15
17
|
onEdit: () => void;
|
|
16
18
|
/** Callback for delete button */
|
|
17
19
|
onDelete: () => void;
|
|
18
|
-
/** Callback
|
|
19
|
-
|
|
20
|
+
/** Callback for change of select element */
|
|
21
|
+
onQuantityChange: (id: number, value: number) => void;
|
|
20
22
|
/** Special instructions text */
|
|
21
23
|
specialInstructions?: string | null;
|
|
22
24
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export interface DishDetailsReviewProps {
|
|
2
2
|
/** name of the restaurant follower user who posted the review */
|
|
3
|
-
userName
|
|
3
|
+
userName?: string;
|
|
4
4
|
/** url information for follower profile picture that may be provided */
|
|
5
|
-
userAvatarUrl
|
|
5
|
+
userAvatarUrl?: string;
|
|
6
6
|
/** the text of the review */
|
|
7
7
|
content: string;
|
|
8
|
-
/**
|
|
9
|
-
|
|
8
|
+
/** time since the review was created */
|
|
9
|
+
createdAgo: string;
|
|
10
10
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare type ModifierValue = {
|
|
2
|
-
id: number
|
|
3
|
-
price?: number
|
|
2
|
+
id: number;
|
|
3
|
+
price?: number;
|
|
4
4
|
quantity?: number;
|
|
5
5
|
};
|
|
6
6
|
declare type Modifier = {
|
|
7
7
|
id: number;
|
|
8
8
|
name: string;
|
|
9
|
-
price
|
|
9
|
+
price?: string;
|
|
10
10
|
};
|
|
11
11
|
declare type OnChange = (value: Array<ModifierValue>, checked?: boolean) => void;
|
|
12
12
|
interface Base {
|
|
@@ -5,7 +5,7 @@ export interface LocationCardProps extends Omit<MuiCardProps, 'onClick'> {
|
|
|
5
5
|
/** Renders the name of the restaurant location */
|
|
6
6
|
name: string;
|
|
7
7
|
/** Renders the address of the restaurant location */
|
|
8
|
-
address
|
|
8
|
+
address?: string;
|
|
9
9
|
/** Renders the appropriate availability of the restaurant location */
|
|
10
10
|
availability?: string | ReactNode;
|
|
11
11
|
/** Renders the distance of the restaurant location (if applicable) */
|
|
@@ -21,3 +21,5 @@ export { MenuSectionGroup } from './MenuSectionGroup';
|
|
|
21
21
|
export { MenuSection, MenuSectionProps } from './MenuSection';
|
|
22
22
|
export { MenuItemGroup } from './MenuItemGroup';
|
|
23
23
|
export { PageSection } from './PageSection';
|
|
24
|
+
export { DialogTitle } from './DialogTitle';
|
|
25
|
+
export { DialogSection } from './DialogSection';
|
package/build/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button as Button$2, 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, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Radio as Radio$1, Menu, TextField, Tabs, Chip } from '@material-ui/core';
|
|
1
|
+
import { Button as Button$2, 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, FormControlLabel as FormControlLabel$1, Checkbox as Checkbox$1, Radio as Radio$1, Menu, TextField, Tabs, Chip, DialogTitle as DialogTitle$1, IconButton as IconButton$1 } from '@material-ui/core';
|
|
2
2
|
export * from '@material-ui/core';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { forwardRef, createElement, createContext, useContext, useState } from 'react';
|
|
@@ -149,7 +149,7 @@ var useDishCardStyles = makeStyles(function (theme) { return ({
|
|
|
149
149
|
},
|
|
150
150
|
}); });
|
|
151
151
|
|
|
152
|
-
var useStyles$
|
|
152
|
+
var useStyles$6 = makeStyles$1(function () { return ({
|
|
153
153
|
img: {
|
|
154
154
|
objectFit: 'cover',
|
|
155
155
|
width: '100%',
|
|
@@ -159,7 +159,7 @@ var useStyles$5 = makeStyles$1(function () { return ({
|
|
|
159
159
|
var MenuItemImg = function (props) {
|
|
160
160
|
var _a = props.image, image = _a === void 0 ? {} : _a;
|
|
161
161
|
var src = image.src, alt = image.alt;
|
|
162
|
-
var classes = useStyles$
|
|
162
|
+
var classes = useStyles$6();
|
|
163
163
|
if (!src || !alt) {
|
|
164
164
|
return null;
|
|
165
165
|
}
|
|
@@ -251,6 +251,24 @@ function SvgClock(props) {
|
|
|
251
251
|
})))));
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
+
var _path$13;
|
|
255
|
+
|
|
256
|
+
function _extends$2r() { _extends$2r = 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$2r.apply(this, arguments); }
|
|
257
|
+
|
|
258
|
+
function SvgX(props) {
|
|
259
|
+
return /*#__PURE__*/React.createElement("svg", _extends$2r({
|
|
260
|
+
viewBox: "0 0 16 16",
|
|
261
|
+
fill: "none",
|
|
262
|
+
strokeLinecap: "round",
|
|
263
|
+
strokeLinejoin: "round",
|
|
264
|
+
width: "1em",
|
|
265
|
+
height: "1em"
|
|
266
|
+
}, props), _path$13 || (_path$13 = /*#__PURE__*/React.createElement("path", {
|
|
267
|
+
d: "M12 4l-8 8m0-8l8 8",
|
|
268
|
+
stroke: "currentColor"
|
|
269
|
+
})));
|
|
270
|
+
}
|
|
271
|
+
|
|
254
272
|
var _g$1m, _defs$J;
|
|
255
273
|
|
|
256
274
|
function _extends$2q() { _extends$2q = 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$2q.apply(this, arguments); }
|
|
@@ -969,7 +987,7 @@ Link.defaultProps = {
|
|
|
969
987
|
};
|
|
970
988
|
Link.displayName = 'Link';
|
|
971
989
|
|
|
972
|
-
var useStyles$
|
|
990
|
+
var useStyles$5 = makeStyles$1(function (_a) {
|
|
973
991
|
var spacing = _a.spacing;
|
|
974
992
|
return ({
|
|
975
993
|
root: {
|
|
@@ -983,7 +1001,7 @@ var useStyles$4 = makeStyles$1(function (_a) {
|
|
|
983
1001
|
});
|
|
984
1002
|
var Paper = forwardRef(function (props, ref) {
|
|
985
1003
|
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
986
|
-
var classes = useStyles$
|
|
1004
|
+
var classes = useStyles$5(props);
|
|
987
1005
|
return React__default.createElement(Paper$1, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
988
1006
|
});
|
|
989
1007
|
Paper.displayName = 'Paper';
|
|
@@ -1157,7 +1175,7 @@ var MenuItemReactions = function (props) {
|
|
|
1157
1175
|
showReviews && React__default.createElement(ReactionCounter, { icon: SvgReviews, count: reviewCount !== null && reviewCount !== void 0 ? reviewCount : 0 })));
|
|
1158
1176
|
};
|
|
1159
1177
|
|
|
1160
|
-
var useStyles$
|
|
1178
|
+
var useStyles$4 = makeStyles$1(function (_a) {
|
|
1161
1179
|
var palette = _a.palette, spacing = _a.spacing;
|
|
1162
1180
|
return ({
|
|
1163
1181
|
plusIcon: {
|
|
@@ -1171,7 +1189,7 @@ var useStyles$3 = makeStyles$1(function (_a) {
|
|
|
1171
1189
|
});
|
|
1172
1190
|
});
|
|
1173
1191
|
var MenuItemPrice = function (props) {
|
|
1174
|
-
var classes = useStyles$
|
|
1192
|
+
var classes = useStyles$4();
|
|
1175
1193
|
return (React__default.createElement(Box, { display: "flex", alignItems: "center" },
|
|
1176
1194
|
React__default.createElement(Box, { display: "flex", className: classes.plusIcon },
|
|
1177
1195
|
React__default.createElement(Icon, { icon: SvgPlus, size: "medium" })),
|
|
@@ -1237,13 +1255,23 @@ MenuItem.displayName = 'MenuItem';
|
|
|
1237
1255
|
|
|
1238
1256
|
var useDishCheckoutCardStyles = makeStyles(function (theme) { return ({
|
|
1239
1257
|
root: {
|
|
1258
|
+
'&:first-of-type': {
|
|
1259
|
+
paddingTop: 0,
|
|
1260
|
+
},
|
|
1261
|
+
'&:last-of-type': {
|
|
1262
|
+
paddingBottom: 0,
|
|
1263
|
+
borderBottom: 'none',
|
|
1264
|
+
},
|
|
1240
1265
|
color: theme.palette.grey[900],
|
|
1241
1266
|
padding: theme.spacing(2, 0),
|
|
1242
1267
|
display: 'flex',
|
|
1243
1268
|
flexDirection: 'column',
|
|
1244
1269
|
width: '100%',
|
|
1245
1270
|
gridGap: theme.spacing(2),
|
|
1246
|
-
|
|
1271
|
+
borderBottom: function (_a) {
|
|
1272
|
+
var borderBottom = _a.borderBottom;
|
|
1273
|
+
return (borderBottom ? '1px solid #E0E0E0' : 'none');
|
|
1274
|
+
},
|
|
1247
1275
|
},
|
|
1248
1276
|
deleteButton: {
|
|
1249
1277
|
color: theme.palette.info.main,
|
|
@@ -1251,6 +1279,11 @@ var useDishCheckoutCardStyles = makeStyles(function (theme) { return ({
|
|
|
1251
1279
|
editButton: {
|
|
1252
1280
|
color: theme.palette.info.main,
|
|
1253
1281
|
},
|
|
1282
|
+
name: {
|
|
1283
|
+
fontSize: 16,
|
|
1284
|
+
fontWeight: 500,
|
|
1285
|
+
lineHeight: '24px',
|
|
1286
|
+
},
|
|
1254
1287
|
price: {
|
|
1255
1288
|
fontSize: '18px',
|
|
1256
1289
|
},
|
|
@@ -1258,10 +1291,10 @@ var useDishCheckoutCardStyles = makeStyles(function (theme) { return ({
|
|
|
1258
1291
|
paddingLeft: 'unset',
|
|
1259
1292
|
borderRadius: '25px',
|
|
1260
1293
|
'& fieldset': {
|
|
1261
|
-
borderColor: theme.palette.grey[
|
|
1294
|
+
borderColor: theme.palette.grey[700],
|
|
1262
1295
|
},
|
|
1263
1296
|
'&.Mui-focused .MuiOutlinedInput-notchedOutline': {
|
|
1264
|
-
borderColor: theme.palette.grey[
|
|
1297
|
+
borderColor: theme.palette.grey[700],
|
|
1265
1298
|
borderWidth: '1px',
|
|
1266
1299
|
},
|
|
1267
1300
|
'& .MuiSelect-root': {
|
|
@@ -1297,15 +1330,18 @@ var OrderingAppContextProvider = function (props) {
|
|
|
1297
1330
|
|
|
1298
1331
|
var DishCheckoutCard = function (props) {
|
|
1299
1332
|
var _a;
|
|
1300
|
-
var id = props.id, name = props.name, quantity = props.quantity, modifiers = props.modifiers, onDelete = props.onDelete, onEdit = props.onEdit,
|
|
1333
|
+
var id = props.id, name = props.name, quantity = props.quantity, modifiers = props.modifiers, onDelete = props.onDelete, onEdit = props.onEdit, onQuantityChange = props.onQuantityChange, price = props.price, specialInstructions = props.specialInstructions, disabled = props.disabled;
|
|
1301
1334
|
var classes = useDishCheckoutCardStyles(props);
|
|
1302
1335
|
var appContext = useOrderingAppContext()[0];
|
|
1303
1336
|
var _b = useState(false), open = _b[0], setOpen = _b[1];
|
|
1304
1337
|
var formattedPrice = typeof price === 'number' ? "" + ((_a = appContext.currencySymbol) !== null && _a !== void 0 ? _a : '') + price.toFixed(2) : price;
|
|
1338
|
+
var handleQuantityChange = function (event) {
|
|
1339
|
+
return onQuantityChange(id, parseInt(event.target.value, 10));
|
|
1340
|
+
};
|
|
1305
1341
|
return (React__default.createElement(Box, { className: classes.root },
|
|
1306
1342
|
React__default.createElement(Box, { display: "flex", justifyContent: "space-between", gridGap: 3 },
|
|
1307
1343
|
React__default.createElement(Box, null,
|
|
1308
|
-
React__default.createElement(Typography, { variant: "h6" }, name),
|
|
1344
|
+
React__default.createElement(Typography, { variant: "h6", className: classes.name }, name),
|
|
1309
1345
|
modifiers &&
|
|
1310
1346
|
modifiers.map(function (modifier, i) { return (React__default.createElement(Typography, { key: i, variant: "body2" },
|
|
1311
1347
|
modifier[0],
|
|
@@ -1321,7 +1357,7 @@ var DishCheckoutCard = function (props) {
|
|
|
1321
1357
|
React__default.createElement(Icon, { icon: SvgTrash, size: "large" })))),
|
|
1322
1358
|
React__default.createElement(Box, { display: "flex", gridGap: 16, alignItems: "center" },
|
|
1323
1359
|
React__default.createElement(FormControl, { variant: "outlined", hiddenLabel: true },
|
|
1324
|
-
React__default.createElement(Select, { disabled: disabled, open: open, value: quantity, labelId: "select-label-" + id, onClick: function () { return setOpen(!open); }, disableUnderline: true, onChange:
|
|
1360
|
+
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" },
|
|
1325
1361
|
React__default.createElement(Icon, { icon: open ? SvgChevronUp : SvgChevronDown, size: "large" })), inputProps: { shrink: false }, MenuProps: {
|
|
1326
1362
|
disablePortal: true,
|
|
1327
1363
|
anchorOrigin: {
|
|
@@ -1339,14 +1375,14 @@ var DishCheckoutCard = function (props) {
|
|
|
1339
1375
|
};
|
|
1340
1376
|
|
|
1341
1377
|
var DishDetailsReview = forwardRef(function (props) {
|
|
1342
|
-
var userName = props.userName, userAvatarUrl = props.userAvatarUrl, content = props.content,
|
|
1378
|
+
var userName = props.userName, userAvatarUrl = props.userAvatarUrl, content = props.content, createdAgo = props.createdAgo;
|
|
1343
1379
|
return (React__default.createElement(Box, { display: "flex" },
|
|
1344
1380
|
React__default.createElement(Box, { mr: 1 },
|
|
1345
1381
|
React__default.createElement(Avatar, { size: "small", src: userAvatarUrl })),
|
|
1346
1382
|
React__default.createElement(Box, { width: "100%" },
|
|
1347
1383
|
React__default.createElement(Box, { display: "flex", justifyContent: "space-between", mb: 1 },
|
|
1348
1384
|
React__default.createElement(Typography, { color: "grey.600", style: { display: 'flex', alignItems: 'center' } }, userName),
|
|
1349
|
-
React__default.createElement(Typography, { color: "grey.600", variant: "subtitle1", style: { display: 'flex', alignItems: 'center' } },
|
|
1385
|
+
React__default.createElement(Typography, { color: "grey.600", variant: "subtitle1", style: { display: 'flex', alignItems: 'center' } }, createdAgo)),
|
|
1350
1386
|
React__default.createElement(Typography, { color: "grey.900", weight: "regular" }, content))));
|
|
1351
1387
|
});
|
|
1352
1388
|
DishDetailsReview.displayName = 'DishDetailsReview';
|
|
@@ -1669,11 +1705,11 @@ var LocationCard = function (props) {
|
|
|
1669
1705
|
React__default.createElement(Box, { display: "flex", justifyContent: "space-between" },
|
|
1670
1706
|
React__default.createElement(Typography, { className: classes.name }, name),
|
|
1671
1707
|
selected && React__default.createElement(Icon, { icon: SvgCheck, size: "extra-large", className: classes.checkIcon })),
|
|
1672
|
-
React__default.createElement(Typography, { className: classes.address, variant: "body2" }, address),
|
|
1708
|
+
address && (React__default.createElement(Typography, { className: classes.address, variant: "body2" }, address)),
|
|
1673
1709
|
React__default.createElement(Typography, { className: classes.distance }, distance)),
|
|
1674
|
-
React__default.createElement(Box, { className: classes.availability },
|
|
1710
|
+
availability && (React__default.createElement(Box, { className: classes.availability },
|
|
1675
1711
|
React__default.createElement(Icon, { icon: SvgClock, size: "large" }),
|
|
1676
|
-
React__default.createElement(Typography, { variant: "body2" }, availability))))));
|
|
1712
|
+
React__default.createElement(Typography, { variant: "body2" }, availability)))))));
|
|
1677
1713
|
};
|
|
1678
1714
|
|
|
1679
1715
|
var _g, _defs;
|
|
@@ -1739,8 +1775,9 @@ var MenuDropdown = function (props) {
|
|
|
1739
1775
|
}, className: classes.select }, menuOptions.map(function (option, index) { return (React__default.createElement(MenuItem$1, { key: index, value: option.id }, option.name)); }))));
|
|
1740
1776
|
};
|
|
1741
1777
|
|
|
1742
|
-
var useMenuFilterStyles = makeStyles(function () { return ({
|
|
1778
|
+
var useMenuFilterStyles = makeStyles(function (theme) { return ({
|
|
1743
1779
|
triggerLabel: {
|
|
1780
|
+
color: theme.palette.info.main,
|
|
1744
1781
|
whiteSpace: 'nowrap',
|
|
1745
1782
|
},
|
|
1746
1783
|
}); });
|
|
@@ -1908,7 +1945,7 @@ var SelectableChipGroup = function (props) {
|
|
|
1908
1945
|
React__default.createElement(Box, { minWidth: "1px" })));
|
|
1909
1946
|
};
|
|
1910
1947
|
|
|
1911
|
-
var useStyles$
|
|
1948
|
+
var useStyles$3 = makeStyles$1(function (_a) {
|
|
1912
1949
|
var spacing = _a.spacing;
|
|
1913
1950
|
return ({
|
|
1914
1951
|
root: {
|
|
@@ -1926,7 +1963,7 @@ var useStyles$2 = makeStyles$1(function (_a) {
|
|
|
1926
1963
|
});
|
|
1927
1964
|
var SelectedMenuFiltersList = function (props) {
|
|
1928
1965
|
var filters = props.filters, onChipClick = props.onChipClick;
|
|
1929
|
-
var classes = useStyles$
|
|
1966
|
+
var classes = useStyles$3();
|
|
1930
1967
|
return (React__default.createElement(React__default.Fragment, null, filters.map(function (filter, index) { return (React__default.createElement(Chip, { key: filter.name + "-" + index, classes: classes, deleteIcon: React__default.createElement(SvgXCircle, null), onDelete: function (event) { return onChipClick(filter, event); }, label: React__default.createElement(React__default.Fragment, null,
|
|
1931
1968
|
React__default.createElement(ItemTag, { alt: filter.abbr, color: filter.color }, filter.abbr),
|
|
1932
1969
|
React__default.createElement(Typography$1, { variant: "caption" }, filter.name)) })); })));
|
|
@@ -1938,7 +1975,7 @@ var MenuSectionGroup = forwardRef(function (props, ref) {
|
|
|
1938
1975
|
});
|
|
1939
1976
|
MenuSectionGroup.displayName = 'MenuSectionGroup';
|
|
1940
1977
|
|
|
1941
|
-
var useStyles$
|
|
1978
|
+
var useStyles$2 = makeStyles$1(function () { return ({
|
|
1942
1979
|
title: {
|
|
1943
1980
|
fontWeight: 400,
|
|
1944
1981
|
fontSize: 20,
|
|
@@ -1948,7 +1985,7 @@ var useStyles$1 = makeStyles$1(function () { return ({
|
|
|
1948
1985
|
|
|
1949
1986
|
var MenuSection = forwardRef(function (props, ref) {
|
|
1950
1987
|
var name = props.name, children = props.children, restProps = __rest$1(props, ["name", "children"]);
|
|
1951
|
-
var classes = useStyles$
|
|
1988
|
+
var classes = useStyles$2();
|
|
1952
1989
|
return (React__default.createElement(Box, __assign$1({}, restProps, { ref: ref }, { "data-component-type": "menu-section" }),
|
|
1953
1990
|
React__default.createElement(Box, { marginTop: 1, marginBottom: 4 },
|
|
1954
1991
|
React__default.createElement(Typography$1, { className: classes.title }, name)),
|
|
@@ -1956,7 +1993,7 @@ var MenuSection = forwardRef(function (props, ref) {
|
|
|
1956
1993
|
});
|
|
1957
1994
|
MenuSection.displayName = 'MenuSection';
|
|
1958
1995
|
|
|
1959
|
-
var useStyles = makeStyles$1(function () { return ({
|
|
1996
|
+
var useStyles$1 = makeStyles$1(function () { return ({
|
|
1960
1997
|
main: {
|
|
1961
1998
|
display: 'grid',
|
|
1962
1999
|
// tune so that 2x columns hit at the md breakpoint
|
|
@@ -1966,13 +2003,33 @@ var useStyles = makeStyles$1(function () { return ({
|
|
|
1966
2003
|
}); });
|
|
1967
2004
|
|
|
1968
2005
|
var MenuItemGroup = forwardRef(function (props, ref) {
|
|
1969
|
-
var classes = useStyles();
|
|
2006
|
+
var classes = useStyles$1();
|
|
1970
2007
|
return (React__default.createElement(Box, __assign$1({ className: classes.main }, { ref: ref }, { "data-component-type": "menu-item-group" }), props.children));
|
|
1971
2008
|
});
|
|
1972
2009
|
MenuItemGroup.displayName = 'MenuItemGroup';
|
|
1973
2010
|
|
|
1974
2011
|
var PageSection = function (props) { return (React__default.createElement(Box, { p: 4, borderBottom: "1px solid #E0E0E0" }, props.children)); };
|
|
1975
2012
|
|
|
2013
|
+
var useStyles = makeStyles$1(function () { return ({
|
|
2014
|
+
closeButton: {
|
|
2015
|
+
padding: 0,
|
|
2016
|
+
},
|
|
2017
|
+
}); });
|
|
2018
|
+
var DialogTitle = function (props) {
|
|
2019
|
+
var Icon = props.Icon, title = props.title, onClose = props.onClose;
|
|
2020
|
+
var classes = useStyles();
|
|
2021
|
+
return (React__default.createElement(DialogTitle$1, null,
|
|
2022
|
+
React__default.createElement(Box, { display: "flex", alignItems: "center", gridGap: 16 },
|
|
2023
|
+
Icon && Icon,
|
|
2024
|
+
React__default.createElement(Typography$1, { variant: "h6" }, title)),
|
|
2025
|
+
React__default.createElement(IconButton$1, { color: "inherit", className: classes.closeButton, "aria-label": "Close dialog", onClick: onClose },
|
|
2026
|
+
React__default.createElement(SvgX, null))));
|
|
2027
|
+
};
|
|
2028
|
+
|
|
2029
|
+
var DialogSection = function (props) {
|
|
2030
|
+
return (React__default.createElement(Box, { paddingTop: 4, paddingBottom: props.borderBottom ? 4 : 0, paddingX: props.edgeToEdge ? 0 : 2, borderBottom: props.borderBottom ? '1px solid #E0E0E0' : undefined }, props.children));
|
|
2031
|
+
};
|
|
2032
|
+
|
|
1976
2033
|
var palette = {
|
|
1977
2034
|
primary: {
|
|
1978
2035
|
light: '#7B7FA3',
|
|
@@ -2012,6 +2069,36 @@ var overrides = {
|
|
|
2012
2069
|
root: {
|
|
2013
2070
|
borderRadius: 32,
|
|
2014
2071
|
textTransform: 'none',
|
|
2072
|
+
padding: '18px 16px',
|
|
2073
|
+
},
|
|
2074
|
+
outlined: {
|
|
2075
|
+
padding: 'inherit',
|
|
2076
|
+
},
|
|
2077
|
+
},
|
|
2078
|
+
MuiDialogTitle: {
|
|
2079
|
+
root: {
|
|
2080
|
+
display: 'flex',
|
|
2081
|
+
alignItems: 'center',
|
|
2082
|
+
justifyContent: 'space-between',
|
|
2083
|
+
borderBottom: '1px solid #E0E0E0',
|
|
2084
|
+
},
|
|
2085
|
+
},
|
|
2086
|
+
MuiDialogContent: {
|
|
2087
|
+
root: {
|
|
2088
|
+
'&:first-child': {
|
|
2089
|
+
paddingTop: 0,
|
|
2090
|
+
},
|
|
2091
|
+
paddingTop: 0,
|
|
2092
|
+
paddingRight: 0,
|
|
2093
|
+
paddingLeft: 0,
|
|
2094
|
+
display: 'flex',
|
|
2095
|
+
flexDirection: 'column',
|
|
2096
|
+
},
|
|
2097
|
+
},
|
|
2098
|
+
MuiDialogActions: {
|
|
2099
|
+
root: {
|
|
2100
|
+
padding: 16,
|
|
2101
|
+
boxShadow: '-4px 0px 8px 0px #0000001A',
|
|
2015
2102
|
},
|
|
2016
2103
|
},
|
|
2017
2104
|
};
|
|
@@ -2020,6 +2107,9 @@ var props = {
|
|
|
2020
2107
|
MuiButton: {
|
|
2021
2108
|
disableElevation: true,
|
|
2022
2109
|
},
|
|
2110
|
+
MuiDialogTitle: {
|
|
2111
|
+
disableTypography: true,
|
|
2112
|
+
},
|
|
2023
2113
|
};
|
|
2024
2114
|
|
|
2025
2115
|
var fonts = ['"Poppins"', '"sans-serif"'];
|
|
@@ -2087,5 +2177,5 @@ var orderingTheme = {
|
|
|
2087
2177
|
props: props,
|
|
2088
2178
|
};
|
|
2089
2179
|
|
|
2090
|
-
export { Button$1 as Button, DishCheckoutCard, DishDetailsReview, DishModifierCard, ItemTag, ItemTagGroup, LocationCard, MenuDropdown, MenuFilter, MenuItem, MenuItemGroup, MenuSection, MenuSectionGroup, OrderingAppContext, OrderingAppContextProvider, PageSection, QuantityPicker, ReactionCounter, ReactionCounterGroup, SelectableChip, SelectableChipGroup, SelectedMenuFiltersList, StatusTag, orderingTheme, useOrderingAppContext };
|
|
2180
|
+
export { Button$1 as Button, DialogSection, DialogTitle, DishCheckoutCard, DishDetailsReview, DishModifierCard, ItemTag, ItemTagGroup, LocationCard, MenuDropdown, MenuFilter, MenuItem, MenuItemGroup, MenuSection, MenuSectionGroup, OrderingAppContext, OrderingAppContextProvider, PageSection, QuantityPicker, ReactionCounter, ReactionCounterGroup, SelectableChip, SelectableChipGroup, SelectedMenuFiltersList, StatusTag, orderingTheme, useOrderingAppContext };
|
|
2091
2181
|
//# sourceMappingURL=index.es.js.map
|