@popmenu/ordering-ui 0.78.0 → 0.79.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.d.ts +3 -0
- package/build/components/MenuItem/MenuItem.styles.d.ts +1 -0
- package/build/components/MenuItem/MenuItemImg.d.ts +3 -0
- package/build/components/MenuItem/MenuItemInfo.d.ts +4 -0
- package/build/components/MenuItem/MenuItemPrice.d.ts +3 -0
- package/build/components/MenuItem/MenuItemProps.d.ts +31 -0
- package/build/components/MenuItem/MenuItemReactions.d.ts +3 -0
- package/build/components/MenuItem/MenuItemTags.d.ts +3 -0
- package/build/components/MenuItem/index.d.ts +2 -0
- package/build/components/MenuItemGroup/MenuItemGroup.d.ts +4 -0
- package/build/components/MenuItemGroup/MenuItemGroupStyles.d.ts +1 -0
- package/build/components/MenuItemGroup/index.d.ts +1 -0
- package/build/components/MenuSection/MenuSection.d.ts +3 -0
- package/build/components/MenuSection/MenuSectionProps.d.ts +5 -0
- package/build/components/MenuSection/MenuSectionStyles.d.ts +1 -0
- package/build/components/MenuSection/index.d.ts +2 -0
- package/build/components/MenuSectionGroup/MenuSectionGroup.d.ts +5 -0
- package/build/components/MenuSectionGroup/index.d.ts +1 -0
- package/build/components/SelectableChipGroup/SelectableChipGroupProps.d.ts +2 -2
- package/build/components/index.d.ts +4 -1
- package/build/index.es.js +1078 -1002
- package/build/index.es.js.map +1 -1
- package/build/index.js +1063 -985
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var core = require('@material-ui/core');
|
|
6
6
|
var React = require('react');
|
|
7
|
+
var styles = require('@material-ui/core/styles');
|
|
7
8
|
require('@material-ui/lab/Alert');
|
|
8
9
|
require('@material-ui/core/AppBar');
|
|
9
10
|
var MuiAvatar = require('@material-ui/core/Avatar');
|
|
10
|
-
var styles = require('@material-ui/core/styles');
|
|
11
11
|
require('@material-ui/core/Badge');
|
|
12
12
|
var MuiButton = require('@material-ui/core/Button');
|
|
13
13
|
var CircularProgress = require('@material-ui/core/CircularProgress');
|
|
@@ -45,7 +45,7 @@ var MuiRadio = require('@material-ui/core/Radio');
|
|
|
45
45
|
require('@material-ui/core/TextField');
|
|
46
46
|
var MuiSwitch = require('@material-ui/core/Switch');
|
|
47
47
|
var Tab = require('@material-ui/core/Tab');
|
|
48
|
-
|
|
48
|
+
require('@material-ui/core/Tabs');
|
|
49
49
|
var MuiToggleButton = require('@material-ui/lab/ToggleButton');
|
|
50
50
|
var MuiToggleButtonGroup = require('@material-ui/lab/ToggleButtonGroup');
|
|
51
51
|
var MuiTooltip = require('@material-ui/core/Tooltip');
|
|
@@ -87,7 +87,6 @@ var MuiIconButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiIconButton);
|
|
|
87
87
|
var MuiRadio__default = /*#__PURE__*/_interopDefaultLegacy(MuiRadio);
|
|
88
88
|
var MuiSwitch__default = /*#__PURE__*/_interopDefaultLegacy(MuiSwitch);
|
|
89
89
|
var Tab__default = /*#__PURE__*/_interopDefaultLegacy(Tab);
|
|
90
|
-
var Tabs__default = /*#__PURE__*/_interopDefaultLegacy(Tabs);
|
|
91
90
|
var MuiToggleButton__default = /*#__PURE__*/_interopDefaultLegacy(MuiToggleButton);
|
|
92
91
|
var MuiToggleButtonGroup__default = /*#__PURE__*/_interopDefaultLegacy(MuiToggleButtonGroup);
|
|
93
92
|
var MuiTooltip__default = /*#__PURE__*/_interopDefaultLegacy(MuiTooltip);
|
|
@@ -148,1031 +147,1037 @@ var Button$1 = React.forwardRef(function (props, ref) {
|
|
|
148
147
|
});
|
|
149
148
|
Button$1.displayName = 'Button';
|
|
150
149
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
150
|
+
var useDishCardStyles = styles.makeStyles(function (theme) { return ({
|
|
151
|
+
cardActionArea: {
|
|
152
|
+
display: 'flex',
|
|
153
|
+
gridGap: 16,
|
|
154
|
+
height: '100%',
|
|
155
|
+
},
|
|
156
|
+
card: {
|
|
157
|
+
// TODO: https://app.shortcut.com/popmenu/story/92467/hide-menuitem-borders-in-2-column-view-widths
|
|
158
|
+
'&:after': {
|
|
159
|
+
content: '""',
|
|
160
|
+
position: 'absolute',
|
|
161
|
+
backgroundColor: '#E0E0E0',
|
|
162
|
+
width: '100%',
|
|
163
|
+
height: 1,
|
|
164
|
+
bottom: -16,
|
|
165
|
+
left: 0,
|
|
166
|
+
},
|
|
167
|
+
height: 185,
|
|
168
|
+
position: 'relative',
|
|
169
|
+
overflow: 'visible',
|
|
170
|
+
},
|
|
171
|
+
cardTitle: {
|
|
172
|
+
fontWeight: 500,
|
|
173
|
+
fontSize: 18,
|
|
174
|
+
lineHeight: '27px',
|
|
175
|
+
color: theme.palette.grey[900],
|
|
176
|
+
'-webkit-line-clamp': 2,
|
|
177
|
+
display: '-webkit-box',
|
|
178
|
+
'-webkit-box-orient': 'vertical',
|
|
179
|
+
textOverflow: 'ellipsis',
|
|
180
|
+
overflow: 'hidden',
|
|
181
|
+
},
|
|
182
|
+
cardDescription: {
|
|
183
|
+
fontWeight: 400,
|
|
184
|
+
fontSize: 14,
|
|
185
|
+
lineHeight: '20px',
|
|
186
|
+
color: theme.palette.grey[700],
|
|
187
|
+
'-webkit-line-clamp': 2,
|
|
188
|
+
display: '-webkit-box',
|
|
189
|
+
'-webkit-box-orient': 'vertical',
|
|
190
|
+
textOverflow: 'ellipsis',
|
|
191
|
+
overflow: 'hidden',
|
|
192
|
+
},
|
|
193
|
+
}); });
|
|
188
194
|
|
|
189
|
-
var
|
|
195
|
+
var useStyles$5 = core.makeStyles(function () { return ({
|
|
196
|
+
img: {
|
|
197
|
+
objectFit: 'cover',
|
|
198
|
+
width: '100%',
|
|
199
|
+
height: '100%',
|
|
200
|
+
},
|
|
201
|
+
}); });
|
|
202
|
+
var MenuItemImg = function (props) {
|
|
203
|
+
var _a = props.image, image = _a === void 0 ? {} : _a;
|
|
204
|
+
var src = image.src, alt = image.alt;
|
|
205
|
+
var classes = useStyles$5();
|
|
206
|
+
if (!src || !alt) {
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
return (React__default['default'].createElement(core.Box, { width: 125, height: "100%", borderRadius: 16, overflow: "hidden", flexShrink: 0 }, React__default['default'].createElement("img", { src: src, alt: alt, className: classes.img })));
|
|
210
|
+
};
|
|
190
211
|
|
|
191
|
-
|
|
212
|
+
var MenuItemInfo = function (props) {
|
|
213
|
+
return (React__default['default'].createElement(core.Box, { display: "flex", flexGrow: 1, flexDirection: "column", height: "100%" }, props.children));
|
|
214
|
+
};
|
|
192
215
|
|
|
193
|
-
|
|
194
|
-
|
|
216
|
+
var _path$1f;
|
|
217
|
+
|
|
218
|
+
function _extends$2M() { _extends$2M = 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$2M.apply(this, arguments); }
|
|
219
|
+
|
|
220
|
+
function SvgChevronDown(props) {
|
|
221
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2M({
|
|
195
222
|
viewBox: "0 0 16 16",
|
|
196
223
|
fill: "none",
|
|
197
224
|
strokeLinecap: "round",
|
|
198
225
|
strokeLinejoin: "round",
|
|
199
226
|
width: "1em",
|
|
200
227
|
height: "1em"
|
|
201
|
-
}, props), _path$
|
|
202
|
-
d: "
|
|
228
|
+
}, props), _path$1f || (_path$1f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
229
|
+
d: "M4 6l4 4 4-4",
|
|
203
230
|
stroke: "currentColor"
|
|
204
231
|
})));
|
|
205
232
|
}
|
|
206
233
|
|
|
207
|
-
var
|
|
208
|
-
var spacing = _a.spacing, palette = _a.palette;
|
|
209
|
-
var getFontSize = function (_a) {
|
|
210
|
-
var size = _a.size;
|
|
211
|
-
var sizes = {
|
|
212
|
-
inherit: 'inherit',
|
|
213
|
-
small: spacing(1.5),
|
|
214
|
-
medium: spacing(2),
|
|
215
|
-
large: spacing(2.5),
|
|
216
|
-
'extra-large': spacing(3),
|
|
217
|
-
};
|
|
218
|
-
return size ? sizes[size] : 'inherit';
|
|
219
|
-
};
|
|
220
|
-
var getColor = function (props) {
|
|
221
|
-
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
222
|
-
var value = 'inherit';
|
|
223
|
-
if (props.color) {
|
|
224
|
-
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
225
|
-
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
226
|
-
value = palette[color][variant];
|
|
227
|
-
}
|
|
228
|
-
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
229
|
-
value = props.color;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
return value;
|
|
233
|
-
};
|
|
234
|
-
return {
|
|
235
|
-
root: {
|
|
236
|
-
color: getColor,
|
|
237
|
-
fontSize: getFontSize,
|
|
238
|
-
strokeWidth: '1.3px',
|
|
239
|
-
},
|
|
240
|
-
};
|
|
241
|
-
});
|
|
234
|
+
var _path$1e;
|
|
242
235
|
|
|
243
|
-
var
|
|
236
|
+
function _extends$2L() { _extends$2L = 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$2L.apply(this, arguments); }
|
|
244
237
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
238
|
+
function SvgChevronUp(props) {
|
|
239
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2L({
|
|
240
|
+
viewBox: "0 0 16 16",
|
|
241
|
+
fill: "none",
|
|
242
|
+
strokeLinecap: "round",
|
|
243
|
+
strokeLinejoin: "round",
|
|
244
|
+
width: "1em",
|
|
245
|
+
height: "1em"
|
|
246
|
+
}, props), _path$1e || (_path$1e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
247
|
+
d: "M12 10L8 6l-4 4",
|
|
248
|
+
stroke: "currentColor"
|
|
249
|
+
})));
|
|
250
|
+
}
|
|
250
251
|
|
|
251
|
-
|
|
252
|
-
/* global define */
|
|
252
|
+
var _path$13;
|
|
253
253
|
|
|
254
|
-
(function () {
|
|
254
|
+
function _extends$2s() { _extends$2s = 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$2s.apply(this, arguments); }
|
|
255
255
|
|
|
256
|
-
|
|
256
|
+
function SvgCheck(props) {
|
|
257
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2s({
|
|
258
|
+
viewBox: "0 0 16 16",
|
|
259
|
+
fill: "none",
|
|
260
|
+
strokeLinecap: "round",
|
|
261
|
+
strokeLinejoin: "round",
|
|
262
|
+
width: "1em",
|
|
263
|
+
height: "1em"
|
|
264
|
+
}, props), _path$13 || (_path$13 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
265
|
+
d: "M13.333 4L6 11.333 2.667 8",
|
|
266
|
+
stroke: "currentColor"
|
|
267
|
+
})));
|
|
268
|
+
}
|
|
257
269
|
|
|
258
|
-
|
|
259
|
-
var classes = [];
|
|
270
|
+
var _g$1m, _defs$K;
|
|
260
271
|
|
|
261
|
-
|
|
262
|
-
var arg = arguments[i];
|
|
263
|
-
if (!arg) continue;
|
|
272
|
+
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); }
|
|
264
273
|
|
|
265
|
-
|
|
274
|
+
function SvgClock(props) {
|
|
275
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2q({
|
|
276
|
+
viewBox: "0 0 16 16",
|
|
277
|
+
fill: "none",
|
|
278
|
+
strokeLinecap: "round",
|
|
279
|
+
strokeLinejoin: "round",
|
|
280
|
+
width: "1em",
|
|
281
|
+
height: "1em"
|
|
282
|
+
}, props), _g$1m || (_g$1m = /*#__PURE__*/React__namespace.createElement("g", {
|
|
283
|
+
clipPath: "url(#clock_svg__clip0_8_5092)",
|
|
284
|
+
stroke: "currentColor"
|
|
285
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
286
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333z"
|
|
287
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
288
|
+
d: "M8 4v4l2.667 1.333"
|
|
289
|
+
}))), _defs$K || (_defs$K = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
290
|
+
id: "clock_svg__clip0_8_5092"
|
|
291
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
292
|
+
fill: "currentColor",
|
|
293
|
+
d: "M0 0h16v16H0z"
|
|
294
|
+
})))));
|
|
295
|
+
}
|
|
266
296
|
|
|
267
|
-
|
|
268
|
-
classes.push(arg);
|
|
269
|
-
} else if (Array.isArray(arg)) {
|
|
270
|
-
if (arg.length) {
|
|
271
|
-
var inner = classNames.apply(null, arg);
|
|
272
|
-
if (inner) {
|
|
273
|
-
classes.push(inner);
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
} else if (argType === 'object') {
|
|
277
|
-
if (arg.toString === Object.prototype.toString) {
|
|
278
|
-
for (var key in arg) {
|
|
279
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
280
|
-
classes.push(key);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
} else {
|
|
284
|
-
classes.push(arg.toString());
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
297
|
+
var _g$1l, _defs$J;
|
|
288
298
|
|
|
289
|
-
|
|
290
|
-
}
|
|
299
|
+
function _extends$2o() { _extends$2o = 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$2o.apply(this, arguments); }
|
|
291
300
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
301
|
+
function SvgXCircle(props) {
|
|
302
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2o({
|
|
303
|
+
viewBox: "0 0 16 16",
|
|
304
|
+
fill: "none",
|
|
305
|
+
strokeLinecap: "round",
|
|
306
|
+
strokeLinejoin: "round",
|
|
307
|
+
width: "1em",
|
|
308
|
+
height: "1em"
|
|
309
|
+
}, props), _g$1l || (_g$1l = /*#__PURE__*/React__namespace.createElement("g", {
|
|
310
|
+
clipPath: "url(#x-circle_svg__clip0_8_6136)",
|
|
311
|
+
stroke: "currentColor"
|
|
312
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
313
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zM10 6l-4 4m0-4l4 4"
|
|
314
|
+
}))), _defs$J || (_defs$J = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
315
|
+
id: "x-circle_svg__clip0_8_6136"
|
|
316
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
317
|
+
fill: "currentColor",
|
|
318
|
+
d: "M0 0h16v16H0z"
|
|
319
|
+
})))));
|
|
320
|
+
}
|
|
300
321
|
|
|
301
|
-
var
|
|
322
|
+
var _path$$;
|
|
302
323
|
|
|
303
|
-
var
|
|
304
|
-
var Icon = function (props) {
|
|
305
|
-
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
306
|
-
var classes = useIconStyles(props);
|
|
307
|
-
var isValid = true;
|
|
308
|
-
if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
|
|
309
|
-
isValid = false;
|
|
310
|
-
}
|
|
311
|
-
return isValid
|
|
312
|
-
? React.createElement(icon, __assign({ className: classNames$1([classes.root, iconStaticClassName, className]) }, restProps))
|
|
313
|
-
: null;
|
|
314
|
-
};
|
|
315
|
-
Icon.defaultProps = {
|
|
316
|
-
size: 'inherit',
|
|
317
|
-
color: 'inherit',
|
|
318
|
-
};
|
|
319
|
-
Icon.displayName = 'Icon';
|
|
320
|
-
|
|
321
|
-
var LoadingStatus;
|
|
322
|
-
(function (LoadingStatus) {
|
|
323
|
-
LoadingStatus["ERROR"] = "ERROR";
|
|
324
|
-
LoadingStatus["LOADED"] = "LOADED";
|
|
325
|
-
LoadingStatus["PENDING"] = "PENDING";
|
|
326
|
-
})(LoadingStatus || (LoadingStatus = {}));
|
|
327
|
-
var useImgProps = function (avatarProps) {
|
|
328
|
-
var _a = React__default['default'].useState(LoadingStatus.PENDING), loaded = _a[0], setLoaded = _a[1];
|
|
329
|
-
var imgProps = __assign(__assign({}, avatarProps.imgProps), { onLoad: function (event) {
|
|
330
|
-
var _a, _b;
|
|
331
|
-
setLoaded(LoadingStatus.LOADED);
|
|
332
|
-
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
333
|
-
} });
|
|
334
|
-
return { imgProps: imgProps, loaded: loaded };
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
var getAvatarDimensions = function (theme, props) {
|
|
338
|
-
var factors = {
|
|
339
|
-
'extra-small': 3,
|
|
340
|
-
small: 4,
|
|
341
|
-
medium: 5,
|
|
342
|
-
large: 6,
|
|
343
|
-
'extra-large': 12.5,
|
|
344
|
-
};
|
|
345
|
-
var sizeFactor = factors[props.size || 'medium'];
|
|
346
|
-
return theme.spacing(sizeFactor);
|
|
347
|
-
};
|
|
348
|
-
var getAvatarFontSize = function (props) {
|
|
349
|
-
var fontSizes = {
|
|
350
|
-
'extra-small': '0.75rem',
|
|
351
|
-
small: '1rem',
|
|
352
|
-
medium: '1rem',
|
|
353
|
-
large: '1.25rem',
|
|
354
|
-
'extra-large': '3.5rem',
|
|
355
|
-
};
|
|
356
|
-
return fontSizes[props.size];
|
|
357
|
-
};
|
|
358
|
-
var useAvatarStyles = styles.makeStyles(function (theme) { return ({
|
|
359
|
-
root: function (props) { return ({
|
|
360
|
-
width: getAvatarDimensions(theme, props),
|
|
361
|
-
height: getAvatarDimensions(theme, props),
|
|
362
|
-
fontSize: getAvatarFontSize(props),
|
|
363
|
-
backgroundColor: props.loaded === LoadingStatus.LOADED ? 'transparent' : props.background,
|
|
364
|
-
color: theme.palette.getContrastText(props.background),
|
|
365
|
-
objectFit: props.fit,
|
|
366
|
-
}); },
|
|
367
|
-
fallback: function (props) { return ({
|
|
368
|
-
fontSize: getAvatarDimensions(theme, props),
|
|
369
|
-
strokeWidth: 1,
|
|
370
|
-
}); },
|
|
371
|
-
}); });
|
|
372
|
-
|
|
373
|
-
var Avatar = React.forwardRef(function (props, ref) {
|
|
374
|
-
var children = props.children, src = props.src, alt = props.alt, fallback = props.fallback, muiProps = __rest(props, ["children", "src", "alt", "fallback"]);
|
|
375
|
-
var _a = useImgProps(props), imgProps = _a.imgProps, loaded = _a.loaded;
|
|
376
|
-
var classes = useAvatarStyles(__assign(__assign({}, props), { loaded: loaded }));
|
|
377
|
-
var displayAltTextFallback = src && alt;
|
|
378
|
-
var displayNoFallback = fallback === 'none';
|
|
379
|
-
var displayCustomFallback = fallback !== 'none' && typeof fallback !== 'undefined';
|
|
380
|
-
var Fallback;
|
|
381
|
-
if (displayAltTextFallback) {
|
|
382
|
-
Fallback = null;
|
|
383
|
-
}
|
|
384
|
-
else if (displayNoFallback) {
|
|
385
|
-
Fallback = ' ';
|
|
386
|
-
}
|
|
387
|
-
else if (displayCustomFallback) {
|
|
388
|
-
Fallback = fallback;
|
|
389
|
-
}
|
|
390
|
-
else {
|
|
391
|
-
Fallback = React__default['default'].createElement(Icon, { icon: SvgUser, className: classes.fallback });
|
|
392
|
-
}
|
|
393
|
-
return (React__default['default'].createElement(MuiAvatar__default['default'], __assign({ ref: ref, classes: { root: classes.root }, src: src, alt: alt }, muiProps, { imgProps: imgProps }), children || Fallback));
|
|
394
|
-
});
|
|
395
|
-
Avatar.defaultProps = {
|
|
396
|
-
size: 'medium',
|
|
397
|
-
fit: 'cover',
|
|
398
|
-
background: '#E0E0E0',
|
|
399
|
-
};
|
|
400
|
-
Avatar.displayName = 'Avatar';
|
|
401
|
-
|
|
402
|
-
styles.makeStyles(function (theme) { return ({
|
|
403
|
-
circle: {
|
|
404
|
-
backgroundColor: theme.palette.grey[300],
|
|
405
|
-
borderRadius: '50%',
|
|
406
|
-
height: theme.spacing(0.65),
|
|
407
|
-
width: theme.spacing(0.65),
|
|
408
|
-
margin: theme.spacing(1) + "px 0 " + theme.spacing(1) + "px " + theme.spacing(1) + "px",
|
|
409
|
-
},
|
|
410
|
-
container: {
|
|
411
|
-
border: "1px solid " + theme.palette.secondary.light,
|
|
412
|
-
borderRadius: theme.spacing(0.5),
|
|
413
|
-
flexGrow: 1,
|
|
414
|
-
},
|
|
415
|
-
titleBar: {
|
|
416
|
-
display: 'flex',
|
|
417
|
-
flexDirection: 'row',
|
|
418
|
-
borderBottom: "1px solid " + theme.palette.secondary.light,
|
|
419
|
-
width: '100%',
|
|
420
|
-
},
|
|
421
|
-
}); });
|
|
422
|
-
|
|
423
|
-
var useButtonStyles = styles.makeStyles(function () { return ({
|
|
424
|
-
root: {
|
|
425
|
-
minWidth: 'unset',
|
|
426
|
-
},
|
|
427
|
-
label: {
|
|
428
|
-
textTransform: function (_a) {
|
|
429
|
-
var textTransform = _a.textTransform;
|
|
430
|
-
return textTransform;
|
|
431
|
-
},
|
|
432
|
-
},
|
|
433
|
-
}); });
|
|
434
|
-
|
|
435
|
-
var Button = React.forwardRef(function (props, ref) {
|
|
436
|
-
props.textTransform; var loading = props.loading, classesOverride = props.classes, className = props.className, muiProps = __rest(props, ["textTransform", "loading", "classes", "className"]);
|
|
437
|
-
props.classes; var styleProps = __rest(props, ["classes"]);
|
|
438
|
-
var classes = useButtonStyles(styleProps);
|
|
439
|
-
var typography = styles.useTheme().typography;
|
|
440
|
-
var loadingIndicator = {
|
|
441
|
-
startIcon: React__default['default'].createElement(CircularProgress__default['default'], { color: "inherit", size: typography.button.fontSize }),
|
|
442
|
-
disabled: true,
|
|
443
|
-
};
|
|
444
|
-
return (React__default['default'].createElement(MuiButton__default['default'], __assign({ ref: ref, classes: __assign(__assign({}, classes), classesOverride), className: classNames$1([className, 'pm-button']) }, muiProps, (loading && loadingIndicator))));
|
|
445
|
-
});
|
|
446
|
-
Button.displayName = 'Button';
|
|
447
|
-
|
|
448
|
-
var Checkbox = React.forwardRef(function (props, ref) {
|
|
449
|
-
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
|
|
450
|
-
var control = React__default['default'].createElement(MuiCheckbox__default['default'], __assign({ disabled: label ? undefined : disabled }, muiProps));
|
|
451
|
-
return label ? (React__default['default'].createElement(FormControlLabel__default['default'], __assign({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
452
|
-
});
|
|
453
|
-
Checkbox.displayName = 'Checkbox';
|
|
454
|
-
|
|
455
|
-
var getBackground = function (theme) { return function (props) {
|
|
456
|
-
var variant = props.variant, severity = props.severity;
|
|
457
|
-
var background = theme.palette.grey[100];
|
|
458
|
-
var backgrounds = {
|
|
459
|
-
outlined: 'none',
|
|
460
|
-
error: 'error.main',
|
|
461
|
-
warning: 'warning.main',
|
|
462
|
-
info: 'info.light',
|
|
463
|
-
success: 'success.light',
|
|
464
|
-
};
|
|
465
|
-
if (variant === 'outlined') {
|
|
466
|
-
background = backgrounds[variant];
|
|
467
|
-
}
|
|
468
|
-
else if (severity) {
|
|
469
|
-
var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
|
|
470
|
-
background = theme.palette[color][colorVariant];
|
|
471
|
-
}
|
|
472
|
-
return background;
|
|
473
|
-
}; };
|
|
474
|
-
var getColor = function (theme) { return function (props) {
|
|
475
|
-
var variant = props.variant, severity = props.severity;
|
|
476
|
-
var textColor;
|
|
477
|
-
if (variant === 'outlined' && severity) {
|
|
478
|
-
var textColors = {
|
|
479
|
-
error: theme.palette.error.main,
|
|
480
|
-
info: theme.palette.info.main,
|
|
481
|
-
warning: theme.palette.warning.dark,
|
|
482
|
-
success: theme.palette.success.dark,
|
|
483
|
-
};
|
|
484
|
-
textColor = textColors[severity];
|
|
485
|
-
}
|
|
486
|
-
else if (variant === 'outlined' && !severity) {
|
|
487
|
-
textColor = theme.palette.grey[700];
|
|
488
|
-
}
|
|
489
|
-
else if ((variant === 'default' || variant === undefined) && severity) {
|
|
490
|
-
var textColors = {
|
|
491
|
-
error: theme.palette.common.white,
|
|
492
|
-
info: theme.palette.secondary.main,
|
|
493
|
-
warning: theme.palette.secondary.main,
|
|
494
|
-
success: theme.palette.secondary.main,
|
|
495
|
-
};
|
|
496
|
-
textColor = textColors[severity];
|
|
497
|
-
}
|
|
498
|
-
return textColor;
|
|
499
|
-
}; };
|
|
500
|
-
var getBorder = function (theme) { return function (props) {
|
|
501
|
-
var variant = props.variant, severity = props.severity;
|
|
502
|
-
var borderColor;
|
|
503
|
-
if (variant === 'outlined' && severity) {
|
|
504
|
-
var borderColors = {
|
|
505
|
-
error: theme.palette.error.main,
|
|
506
|
-
info: theme.palette.info.main,
|
|
507
|
-
warning: theme.palette.warning.dark,
|
|
508
|
-
success: theme.palette.success.dark,
|
|
509
|
-
};
|
|
510
|
-
borderColor = borderColors[severity];
|
|
511
|
-
}
|
|
512
|
-
return borderColor;
|
|
513
|
-
}; };
|
|
514
|
-
styles.makeStyles(function (theme) { return ({
|
|
515
|
-
root: {
|
|
516
|
-
background: getBackground(theme),
|
|
517
|
-
color: getColor(theme),
|
|
518
|
-
borderColor: getBorder(theme),
|
|
519
|
-
borderRadius: theme.spacing(0.5),
|
|
520
|
-
},
|
|
521
|
-
icon: {
|
|
522
|
-
color: 'inherit',
|
|
523
|
-
height: theme.spacing(2),
|
|
524
|
-
width: theme.spacing(2),
|
|
525
|
-
},
|
|
526
|
-
deleteIcon: {
|
|
527
|
-
color: theme.palette.grey[500],
|
|
528
|
-
},
|
|
529
|
-
}); });
|
|
530
|
-
|
|
531
|
-
var defaultTypographyProps = {
|
|
532
|
-
variant: 'body1',
|
|
533
|
-
};
|
|
534
|
-
|
|
535
|
-
var weights = {
|
|
536
|
-
regular: 400,
|
|
537
|
-
medium: 500,
|
|
538
|
-
'semi-bold': 600,
|
|
539
|
-
bold: 700,
|
|
540
|
-
};
|
|
541
|
-
var getCustomColor = function (theme, color) {
|
|
542
|
-
var isCommonColor = color && ['white', 'black'].includes(color);
|
|
543
|
-
var isGreyColor = color && color.match(/^grey\.\d{3}/);
|
|
544
|
-
var isSemanticColor = color && color.match(/(primary|secondary|info|success|error|warning).?(light|dark)?/);
|
|
545
|
-
var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
|
|
546
|
-
switch (true) {
|
|
547
|
-
case isCommonColor:
|
|
548
|
-
return theme.palette.common[color];
|
|
549
|
-
case Boolean(isGreyColor):
|
|
550
|
-
var scale = color.split('.')[1];
|
|
551
|
-
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
552
|
-
case Boolean(isSemanticColor):
|
|
553
|
-
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
554
|
-
return theme.palette[paletteKey][variant];
|
|
555
|
-
case isTextColor:
|
|
556
|
-
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
557
|
-
default:
|
|
558
|
-
return undefined;
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
var useTypographyStyles = styles.makeStyles(function (theme) {
|
|
562
|
-
var _a;
|
|
563
|
-
return ({
|
|
564
|
-
root: (_a = {},
|
|
565
|
-
_a["& ." + iconStaticClassName] = {
|
|
566
|
-
position: 'relative',
|
|
567
|
-
top: '0.125em',
|
|
568
|
-
padding: '0 0.125em',
|
|
569
|
-
boxSizing: 'content-box',
|
|
570
|
-
},
|
|
571
|
-
_a.fontFamily = theme.typography.fontFamily,
|
|
572
|
-
_a.fontWeight = function (_a) {
|
|
573
|
-
var variant = _a.variant, weight = _a.weight;
|
|
574
|
-
return (weight ? weights[weight] : theme.typography[variant].fontWeight);
|
|
575
|
-
},
|
|
576
|
-
_a.fontSize = function (_a) {
|
|
577
|
-
var variant = _a.variant;
|
|
578
|
-
return theme.typography[variant].fontSize;
|
|
579
|
-
},
|
|
580
|
-
_a.lineHeight = function (_a) {
|
|
581
|
-
var variant = _a.variant;
|
|
582
|
-
return theme.typography[variant].lineHeight;
|
|
583
|
-
},
|
|
584
|
-
_a.textTransform = function (_a) {
|
|
585
|
-
var variant = _a.variant;
|
|
586
|
-
return theme.typography[variant].textTransform;
|
|
587
|
-
},
|
|
588
|
-
_a.color = function (_a) {
|
|
589
|
-
var color = _a.color, variant = _a.variant;
|
|
590
|
-
return (color && getCustomColor(theme, color)) || theme.typography[variant].color;
|
|
591
|
-
},
|
|
592
|
-
_a),
|
|
593
|
-
caption: {
|
|
594
|
-
display: 'inline',
|
|
595
|
-
},
|
|
596
|
-
overline: {
|
|
597
|
-
display: 'inline',
|
|
598
|
-
},
|
|
599
|
-
});
|
|
600
|
-
});
|
|
601
|
-
|
|
602
|
-
var Typography = React.forwardRef(function (props, ref) {
|
|
603
|
-
props.weight; props.color; var restProps = __rest(props, ["weight", "color"]);
|
|
604
|
-
var classes = useTypographyStyles(__assign({}, props));
|
|
605
|
-
var variantMapping = { subtitle1: 'p' };
|
|
606
|
-
return React__default['default'].createElement(core.Typography, __assign({ ref: ref, classes: classes, variantMapping: variantMapping }, restProps));
|
|
607
|
-
});
|
|
608
|
-
Typography.displayName = 'Typography';
|
|
609
|
-
Typography.defaultProps = defaultTypographyProps;
|
|
610
|
-
|
|
611
|
-
var getFadeStop = function (_a, typographyVariant) {
|
|
612
|
-
var typography = _a.typography;
|
|
613
|
-
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
614
|
-
? typography[typographyVariant].lineHeight + "rem"
|
|
615
|
-
: typography[typographyVariant].lineHeight;
|
|
616
|
-
};
|
|
617
|
-
core.makeStyles(function (theme) { return ({
|
|
618
|
-
overlay: {
|
|
619
|
-
position: 'absolute',
|
|
620
|
-
top: 0,
|
|
621
|
-
left: 0,
|
|
622
|
-
height: '100%',
|
|
623
|
-
width: '100%',
|
|
624
|
-
background: function (props) { return "linear-gradient(to top, white, #FFF0 " + getFadeStop(theme, props.typographyVariant) + ")"; },
|
|
625
|
-
},
|
|
626
|
-
}); });
|
|
627
|
-
|
|
628
|
-
var SemanticColors;
|
|
629
|
-
(function (SemanticColors) {
|
|
630
|
-
SemanticColors["PRIMARY_MAIN"] = "primary.main";
|
|
631
|
-
SemanticColors["PRIMARY_DARK"] = "primary.dark";
|
|
632
|
-
SemanticColors["PRIMARY_LIGHT"] = "primary.light";
|
|
633
|
-
SemanticColors["SECONDARY_MAIN"] = "secondary.main";
|
|
634
|
-
SemanticColors["SECONDARY_DARK"] = "secondary.dark";
|
|
635
|
-
SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
|
|
636
|
-
})(SemanticColors || (SemanticColors = {}));
|
|
637
|
-
core.makeStyles(function (theme) { return ({
|
|
638
|
-
dividerRoot: {
|
|
639
|
-
gap: theme.spacing(2),
|
|
640
|
-
},
|
|
641
|
-
textRoot: {
|
|
642
|
-
color: function (props) {
|
|
643
|
-
var textColor = props.textColor;
|
|
644
|
-
if (Object.values(SemanticColors).includes(textColor)) {
|
|
645
|
-
var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
646
|
-
return theme.palette[semanticColor][shade];
|
|
647
|
-
}
|
|
648
|
-
else if (textColor) {
|
|
649
|
-
return textColor;
|
|
650
|
-
}
|
|
651
|
-
else {
|
|
652
|
-
return 'black';
|
|
653
|
-
}
|
|
654
|
-
},
|
|
655
|
-
textTransform: function (props) { return props.textTransform; },
|
|
656
|
-
},
|
|
657
|
-
dividerLine: {
|
|
658
|
-
backgroundColor: function (props) {
|
|
659
|
-
var dividerColor = props.dividerColor;
|
|
660
|
-
if (Object.values(SemanticColors).includes(dividerColor)) {
|
|
661
|
-
var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
662
|
-
return theme.palette[semanticColor][shade];
|
|
663
|
-
}
|
|
664
|
-
else if (dividerColor) {
|
|
665
|
-
return dividerColor;
|
|
666
|
-
}
|
|
667
|
-
else {
|
|
668
|
-
return theme.palette.grey[500];
|
|
669
|
-
}
|
|
670
|
-
},
|
|
671
|
-
},
|
|
672
|
-
}); });
|
|
673
|
-
|
|
674
|
-
var IconButton = React.forwardRef(function (props, ref) {
|
|
675
|
-
return React__default['default'].createElement(MuiIconButton__default['default'], __assign({ ref: ref }, props));
|
|
676
|
-
});
|
|
677
|
-
IconButton.displayName = 'IconButton';
|
|
678
|
-
IconButton.defaultProps = {
|
|
679
|
-
color: 'secondary',
|
|
680
|
-
};
|
|
681
|
-
|
|
682
|
-
var useLinkStyles = styles.makeStyles(function (theme) { return ({
|
|
683
|
-
root: function (props) {
|
|
684
|
-
var _a;
|
|
685
|
-
return (__assign(__assign({ display: 'flex' }, (props.color === undefined && { color: theme.palette.info.main })), (_a = {}, _a["& ." + iconStaticClassName] = {
|
|
686
|
-
alignSelf: 'center',
|
|
687
|
-
}, _a)));
|
|
688
|
-
},
|
|
689
|
-
}); });
|
|
690
|
-
|
|
691
|
-
var Link = React.forwardRef(function (props, ref) {
|
|
692
|
-
var children = props.children, muiProps = __rest(props, ["children"]);
|
|
693
|
-
var classes = useLinkStyles(props);
|
|
694
|
-
return (React__default['default'].createElement(core.Link, __assign({ ref: ref, classes: { root: classes.root } }, muiProps), children));
|
|
695
|
-
});
|
|
696
|
-
Link.defaultProps = {
|
|
697
|
-
variant: 'body1',
|
|
698
|
-
};
|
|
699
|
-
Link.displayName = 'Link';
|
|
700
|
-
|
|
701
|
-
var useStyles$1 = core.makeStyles(function (_a) {
|
|
702
|
-
var spacing = _a.spacing;
|
|
703
|
-
return ({
|
|
704
|
-
root: {
|
|
705
|
-
'&:last-child': {
|
|
706
|
-
marginBottom: 0,
|
|
707
|
-
},
|
|
708
|
-
marginBottom: spacing(4),
|
|
709
|
-
padding: spacing(4),
|
|
710
|
-
},
|
|
711
|
-
});
|
|
712
|
-
});
|
|
713
|
-
var Paper = React.forwardRef(function (props, ref) {
|
|
714
|
-
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
715
|
-
var classes = useStyles$1(props);
|
|
716
|
-
return React__default['default'].createElement(core.Paper, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
717
|
-
});
|
|
718
|
-
Paper.displayName = 'Paper';
|
|
719
|
-
Paper.defaultProps = {
|
|
720
|
-
legacyStyles: false,
|
|
721
|
-
};
|
|
722
|
-
|
|
723
|
-
var Radio = React.forwardRef(function (props, ref) {
|
|
724
|
-
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
|
|
725
|
-
var control = React__default['default'].createElement(MuiRadio__default['default'], __assign({ disabled: label ? undefined : disabled }, muiProps));
|
|
726
|
-
return label ? (React__default['default'].createElement(FormControlLabel__default['default'], __assign({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
727
|
-
});
|
|
728
|
-
Radio.displayName = 'Radio';
|
|
729
|
-
|
|
730
|
-
styles.makeStyles(function () { return ({
|
|
731
|
-
textfield: {
|
|
732
|
-
background: function (props) { return (props.backgroundTransparency ? '#FFFFFF44' : 'none'); },
|
|
733
|
-
borderTopLeftRadius: 4,
|
|
734
|
-
borderBottomLeftRadius: 4,
|
|
735
|
-
'& fieldset': {
|
|
736
|
-
borderRight: 'none',
|
|
737
|
-
borderTopRightRadius: 0,
|
|
738
|
-
borderBottomRightRadius: 0,
|
|
739
|
-
},
|
|
740
|
-
},
|
|
741
|
-
button: {
|
|
742
|
-
borderTopLeftRadius: 0,
|
|
743
|
-
borderBottomLeftRadius: 0,
|
|
744
|
-
alignSelf: 'stretch',
|
|
745
|
-
},
|
|
746
|
-
input: {
|
|
747
|
-
color: function (props) { return props.inputTextColor || 'inherit'; },
|
|
748
|
-
'&$focused fieldset': {
|
|
749
|
-
top: -4,
|
|
750
|
-
},
|
|
751
|
-
},
|
|
752
|
-
focused: {},
|
|
753
|
-
}); });
|
|
754
|
-
|
|
755
|
-
var useSwitchStyles = styles.makeStyles(function (theme) { return ({
|
|
756
|
-
checked: {
|
|
757
|
-
'& $thumb': {
|
|
758
|
-
background: theme.palette.success.main,
|
|
759
|
-
},
|
|
760
|
-
'&& + $track': {
|
|
761
|
-
backgroundColor: theme.palette.success.main,
|
|
762
|
-
},
|
|
763
|
-
},
|
|
764
|
-
thumb: {},
|
|
765
|
-
track: {},
|
|
766
|
-
}); });
|
|
767
|
-
|
|
768
|
-
var Switch = React.forwardRef(function (props, ref) {
|
|
769
|
-
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
|
|
770
|
-
var classes = useSwitchStyles(props);
|
|
771
|
-
var control = React__default['default'].createElement(MuiSwitch__default['default'], __assign({ classes: classes, disabled: label ? undefined : disabled }, muiProps));
|
|
772
|
-
return label ? (React__default['default'].createElement(FormControlLabel__default['default'], __assign({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
773
|
-
});
|
|
774
|
-
Switch.displayName = 'Switch';
|
|
775
|
-
|
|
776
|
-
var useToggleButtonStyles = styles.makeStyles(function (theme) { return ({
|
|
777
|
-
root: {
|
|
778
|
-
color: theme.palette.text.primary,
|
|
779
|
-
},
|
|
780
|
-
selected: {
|
|
781
|
-
'&&': {
|
|
782
|
-
'&:hover': {
|
|
783
|
-
backgroundColor: function (props) { return theme.palette[props.color || 'primary'].dark; },
|
|
784
|
-
},
|
|
785
|
-
backgroundColor: function (props) { return theme.palette[props.color || 'primary'].main; },
|
|
786
|
-
color: 'white',
|
|
787
|
-
},
|
|
788
|
-
},
|
|
789
|
-
}); });
|
|
790
|
-
|
|
791
|
-
var ToggleButton = React.forwardRef(function (props, ref) {
|
|
792
|
-
var children = props.children, muiProps = __rest(props, ["children"]);
|
|
793
|
-
var classes = useToggleButtonStyles(props);
|
|
794
|
-
return (React__default['default'].createElement(MuiToggleButton__default['default'], __assign({ ref: ref, classes: {
|
|
795
|
-
root: classes.root,
|
|
796
|
-
selected: classes.selected,
|
|
797
|
-
} }, muiProps), children));
|
|
798
|
-
});
|
|
799
|
-
ToggleButton.defaultProps = {
|
|
800
|
-
color: 'primary',
|
|
801
|
-
};
|
|
802
|
-
ToggleButton.displayName = 'ToggleButton';
|
|
803
|
-
|
|
804
|
-
var useToggleButtonGroupStyles = styles.makeStyles(function (theme) { return ({
|
|
805
|
-
root: {
|
|
806
|
-
'&&': {
|
|
807
|
-
backgroundColor: theme.palette.grey[300],
|
|
808
|
-
},
|
|
809
|
-
},
|
|
810
|
-
}); });
|
|
811
|
-
|
|
812
|
-
var ToggleButtonGroup = React.forwardRef(function (props, ref) {
|
|
813
|
-
var children = props.children, _a = props.color, color = _a === void 0 ? 'primary' : _a, muiProps = __rest(props, ["children", "color"]);
|
|
814
|
-
var classes = useToggleButtonGroupStyles(props);
|
|
815
|
-
var childrenWithProps = React__default['default'].Children.map(children, function (child) {
|
|
816
|
-
if (!React__default['default'].isValidElement(child)) {
|
|
817
|
-
return null;
|
|
818
|
-
}
|
|
819
|
-
return React__default['default'].cloneElement(child, { color: color });
|
|
820
|
-
});
|
|
821
|
-
return (React__default['default'].createElement(MuiToggleButtonGroup__default['default'], __assign({ ref: ref, classes: { root: classes.root } }, muiProps), childrenWithProps));
|
|
822
|
-
});
|
|
823
|
-
ToggleButtonGroup.displayName = 'ToggleButtonGroup';
|
|
824
|
-
|
|
825
|
-
var useTooltipStyles = styles.makeStyles(function (_a) {
|
|
826
|
-
var typography = _a.typography;
|
|
827
|
-
return ({
|
|
828
|
-
tooltip: {
|
|
829
|
-
fontSize: typography.pxToRem(16),
|
|
830
|
-
},
|
|
831
|
-
});
|
|
832
|
-
});
|
|
833
|
-
|
|
834
|
-
var Tooltip = React.forwardRef(function (props, ref) {
|
|
835
|
-
var classes = useTooltipStyles(props);
|
|
836
|
-
return React__default['default'].createElement(MuiTooltip__default['default'], __assign({ ref: ref, classes: classes }, props));
|
|
837
|
-
});
|
|
838
|
-
Tooltip.displayName = 'Tooltip';
|
|
324
|
+
function _extends$2g() { _extends$2g = 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$2g.apply(this, arguments); }
|
|
839
325
|
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
display: 'none',
|
|
854
|
-
},
|
|
855
|
-
'-moz-appearance': 'textfield',
|
|
856
|
-
minWidth: 40,
|
|
857
|
-
padding: 0,
|
|
858
|
-
textAlign: 'center',
|
|
859
|
-
},
|
|
860
|
-
adornedStart: {
|
|
861
|
-
padding: 0,
|
|
862
|
-
},
|
|
863
|
-
adornedEnd: {
|
|
864
|
-
padding: 0,
|
|
865
|
-
},
|
|
866
|
-
}); });
|
|
326
|
+
function SvgHeart(props) {
|
|
327
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2g({
|
|
328
|
+
viewBox: "0 0 16 16",
|
|
329
|
+
fill: "none",
|
|
330
|
+
strokeLinecap: "round",
|
|
331
|
+
strokeLinejoin: "round",
|
|
332
|
+
width: "1em",
|
|
333
|
+
height: "1em"
|
|
334
|
+
}, props), _path$$ || (_path$$ = /*#__PURE__*/React__namespace.createElement("path", {
|
|
335
|
+
d: "M13.893 3.074a3.667 3.667 0 00-5.186 0L8 3.78l-.707-.706A3.668 3.668 0 002.107 8.26l.706.707L8 14.154l5.187-5.187.706-.707a3.667 3.667 0 000-5.186v0z",
|
|
336
|
+
stroke: "currentColor"
|
|
337
|
+
})));
|
|
338
|
+
}
|
|
867
339
|
|
|
868
|
-
var
|
|
340
|
+
var _g$18, _defs$C;
|
|
869
341
|
|
|
870
|
-
function _extends$
|
|
342
|
+
function _extends$22() { _extends$22 = 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$22.apply(this, arguments); }
|
|
871
343
|
|
|
872
|
-
function
|
|
873
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
344
|
+
function SvgMinusCircle(props) {
|
|
345
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$22({
|
|
874
346
|
viewBox: "0 0 16 16",
|
|
875
347
|
fill: "none",
|
|
876
348
|
strokeLinecap: "round",
|
|
877
349
|
strokeLinejoin: "round",
|
|
878
350
|
width: "1em",
|
|
879
351
|
height: "1em"
|
|
880
|
-
}, props),
|
|
881
|
-
|
|
352
|
+
}, props), _g$18 || (_g$18 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
353
|
+
clipPath: "url(#minus-circle_svg__clip0_8_5970)",
|
|
882
354
|
stroke: "currentColor"
|
|
883
|
-
}
|
|
355
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
356
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zM5.333 8h5.334"
|
|
357
|
+
}))), _defs$C || (_defs$C = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
358
|
+
id: "minus-circle_svg__clip0_8_5970"
|
|
359
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
360
|
+
fill: "currentColor",
|
|
361
|
+
d: "M0 0h16v16H0z"
|
|
362
|
+
})))));
|
|
884
363
|
}
|
|
885
364
|
|
|
886
|
-
var _path$
|
|
365
|
+
var _path$R;
|
|
887
366
|
|
|
888
|
-
function _extends$
|
|
367
|
+
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); }
|
|
889
368
|
|
|
890
|
-
function
|
|
891
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
369
|
+
function SvgPlus(props) {
|
|
370
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1_({
|
|
892
371
|
viewBox: "0 0 16 16",
|
|
893
372
|
fill: "none",
|
|
894
373
|
strokeLinecap: "round",
|
|
895
374
|
strokeLinejoin: "round",
|
|
896
375
|
width: "1em",
|
|
897
376
|
height: "1em"
|
|
898
|
-
}, props), _path$
|
|
899
|
-
d: "
|
|
377
|
+
}, props), _path$R || (_path$R = /*#__PURE__*/React__namespace.createElement("path", {
|
|
378
|
+
d: "M8 3.333v9.334M3.333 8h9.334",
|
|
900
379
|
stroke: "currentColor"
|
|
901
380
|
})));
|
|
902
381
|
}
|
|
903
382
|
|
|
904
|
-
var
|
|
383
|
+
var _g$17, _defs$B;
|
|
905
384
|
|
|
906
|
-
function _extends$
|
|
385
|
+
function _extends$1Z() { _extends$1Z = 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$1Z.apply(this, arguments); }
|
|
907
386
|
|
|
908
|
-
function
|
|
909
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
387
|
+
function SvgPlusCircle(props) {
|
|
388
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1Z({
|
|
910
389
|
viewBox: "0 0 16 16",
|
|
911
390
|
fill: "none",
|
|
912
391
|
strokeLinecap: "round",
|
|
913
392
|
strokeLinejoin: "round",
|
|
914
393
|
width: "1em",
|
|
915
394
|
height: "1em"
|
|
916
|
-
}, props),
|
|
917
|
-
|
|
395
|
+
}, props), _g$17 || (_g$17 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
396
|
+
clipPath: "url(#plus-circle_svg__clip0_8_5870)",
|
|
918
397
|
stroke: "currentColor"
|
|
919
|
-
}
|
|
398
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
399
|
+
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-9.334v5.334M5.333 8h5.334"
|
|
400
|
+
}))), _defs$B || (_defs$B = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
401
|
+
id: "plus-circle_svg__clip0_8_5870"
|
|
402
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
403
|
+
fill: "currentColor",
|
|
404
|
+
d: "M0 0h16v16H0z"
|
|
405
|
+
})))));
|
|
920
406
|
}
|
|
921
407
|
|
|
922
|
-
var
|
|
408
|
+
var _path$N;
|
|
923
409
|
|
|
924
|
-
function _extends$
|
|
410
|
+
function _extends$1R() { _extends$1R = 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$1R.apply(this, arguments); }
|
|
925
411
|
|
|
926
|
-
function
|
|
927
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
412
|
+
function SvgTag(props) {
|
|
413
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1R({
|
|
928
414
|
viewBox: "0 0 16 16",
|
|
929
415
|
fill: "none",
|
|
930
416
|
strokeLinecap: "round",
|
|
931
417
|
strokeLinejoin: "round",
|
|
932
418
|
width: "1em",
|
|
933
419
|
height: "1em"
|
|
934
|
-
}, props),
|
|
935
|
-
|
|
420
|
+
}, props), _path$N || (_path$N = /*#__PURE__*/React__namespace.createElement("path", {
|
|
421
|
+
d: "M13.727 8.94l-4.78 4.78a1.334 1.334 0 01-1.887 0L1.333 8V1.333H8l5.727 5.727a1.333 1.333 0 010 1.88v0zm-9.06-4.273h.007",
|
|
936
422
|
stroke: "currentColor"
|
|
937
|
-
}
|
|
938
|
-
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333z"
|
|
939
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
940
|
-
d: "M8 4v4l2.667 1.333"
|
|
941
|
-
}))), _defs$K || (_defs$K = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
942
|
-
id: "clock_svg__clip0_8_5092"
|
|
943
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
944
|
-
fill: "currentColor",
|
|
945
|
-
d: "M0 0h16v16H0z"
|
|
946
|
-
})))));
|
|
423
|
+
})));
|
|
947
424
|
}
|
|
948
425
|
|
|
949
|
-
var
|
|
426
|
+
var _path$y;
|
|
950
427
|
|
|
951
|
-
function _extends$
|
|
428
|
+
function _extends$1m() { _extends$1m = 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$1m.apply(this, arguments); }
|
|
952
429
|
|
|
953
|
-
function
|
|
954
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
430
|
+
function SvgTrash(props) {
|
|
431
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1m({
|
|
955
432
|
viewBox: "0 0 16 16",
|
|
956
433
|
fill: "none",
|
|
957
434
|
strokeLinecap: "round",
|
|
958
435
|
strokeLinejoin: "round",
|
|
959
436
|
width: "1em",
|
|
960
437
|
height: "1em"
|
|
961
|
-
}, props),
|
|
962
|
-
|
|
438
|
+
}, props), _path$y || (_path$y = /*#__PURE__*/React__namespace.createElement("path", {
|
|
439
|
+
d: "M2 4h12M5.333 4V2.667a1.333 1.333 0 011.334-1.333h2.666a1.333 1.333 0 011.334 1.333V4m2 0v9.334a1.333 1.333 0 01-1.334 1.333H4.667a1.333 1.333 0 01-1.334-1.333V4h9.334zm-6 3.333v4m2.666-4v4",
|
|
963
440
|
stroke: "currentColor"
|
|
964
|
-
}
|
|
965
|
-
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zM10 6l-4 4m0-4l4 4"
|
|
966
|
-
}))), _defs$J || (_defs$J = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
967
|
-
id: "x-circle_svg__clip0_8_6136"
|
|
968
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
969
|
-
fill: "currentColor",
|
|
970
|
-
d: "M0 0h16v16H0z"
|
|
971
|
-
})))));
|
|
441
|
+
})));
|
|
972
442
|
}
|
|
973
443
|
|
|
974
|
-
var _path
|
|
444
|
+
var _path$d, _path2$1;
|
|
975
445
|
|
|
976
|
-
function _extends$
|
|
446
|
+
function _extends$w() { _extends$w = 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$w.apply(this, arguments); }
|
|
977
447
|
|
|
978
|
-
function
|
|
979
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
448
|
+
function SvgReviews(props) {
|
|
449
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
980
450
|
viewBox: "0 0 16 16",
|
|
981
451
|
fill: "none",
|
|
982
452
|
strokeLinecap: "round",
|
|
983
453
|
strokeLinejoin: "round",
|
|
984
454
|
width: "1em",
|
|
985
455
|
height: "1em"
|
|
986
|
-
}, props), _path
|
|
987
|
-
d: "
|
|
456
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
457
|
+
d: "M14 7.667a5.587 5.587 0 01-.6 2.533 5.666 5.666 0 01-5.067 3.133 5.588 5.588 0 01-2.533-.6L2 14l1.267-3.8a5.586 5.586 0 01-.6-2.533A5.667 5.667 0 015.8 2.6 5.587 5.587 0 018.333 2h.334A5.654 5.654 0 0114 7.333v.334z",
|
|
988
458
|
stroke: "currentColor"
|
|
459
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
460
|
+
d: "M8.375 5.363a.2.2 0 01.358 0l.578 1.17a.2.2 0 00.15.11l1.292.189a.2.2 0 01.11.34l-.934.911a.2.2 0 00-.057.177l.22 1.286a.2.2 0 01-.29.21L8.647 9.15a.2.2 0 00-.186 0l-1.155.608a.2.2 0 01-.29-.211l.22-1.286a.2.2 0 00-.058-.177l-.934-.91a.2.2 0 01.11-.341l1.293-.19a.2.2 0 00.15-.109l.578-1.17z",
|
|
461
|
+
fill: "currentColor"
|
|
989
462
|
})));
|
|
990
463
|
}
|
|
991
464
|
|
|
992
|
-
|
|
465
|
+
/*! *****************************************************************************
|
|
466
|
+
Copyright (c) Microsoft Corporation.
|
|
467
|
+
|
|
468
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
469
|
+
purpose with or without fee is hereby granted.
|
|
470
|
+
|
|
471
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
472
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
473
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
474
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
475
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
476
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
477
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
478
|
+
***************************************************************************** */
|
|
479
|
+
|
|
480
|
+
var __assign = function() {
|
|
481
|
+
__assign = Object.assign || function __assign(t) {
|
|
482
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
483
|
+
s = arguments[i];
|
|
484
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
485
|
+
}
|
|
486
|
+
return t;
|
|
487
|
+
};
|
|
488
|
+
return __assign.apply(this, arguments);
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
function __rest(s, e) {
|
|
492
|
+
var t = {};
|
|
493
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
494
|
+
t[p] = s[p];
|
|
495
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
496
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
497
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
498
|
+
t[p[i]] = s[p[i]];
|
|
499
|
+
}
|
|
500
|
+
return t;
|
|
501
|
+
}
|
|
993
502
|
|
|
994
|
-
|
|
503
|
+
var _path$M;
|
|
995
504
|
|
|
996
|
-
function
|
|
997
|
-
|
|
505
|
+
function _extends$1L() { _extends$1L = 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$1L.apply(this, arguments); }
|
|
506
|
+
|
|
507
|
+
function SvgUser(props) {
|
|
508
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1L({
|
|
998
509
|
viewBox: "0 0 16 16",
|
|
999
510
|
fill: "none",
|
|
1000
511
|
strokeLinecap: "round",
|
|
1001
512
|
strokeLinejoin: "round",
|
|
1002
513
|
width: "1em",
|
|
1003
514
|
height: "1em"
|
|
1004
|
-
}, props),
|
|
1005
|
-
|
|
515
|
+
}, props), _path$M || (_path$M = /*#__PURE__*/React__namespace.createElement("path", {
|
|
516
|
+
d: "M13.333 14v-1.333A2.667 2.667 0 0010.667 10H5.333a2.667 2.667 0 00-2.666 2.667V14M8 7.333A2.667 2.667 0 108 2a2.667 2.667 0 000 5.333z",
|
|
1006
517
|
stroke: "currentColor"
|
|
1007
|
-
}
|
|
1008
|
-
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zM5.333 8h5.334"
|
|
1009
|
-
}))), _defs$C || (_defs$C = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
1010
|
-
id: "minus-circle_svg__clip0_8_5970"
|
|
1011
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1012
|
-
fill: "currentColor",
|
|
1013
|
-
d: "M0 0h16v16H0z"
|
|
1014
|
-
})))));
|
|
518
|
+
})));
|
|
1015
519
|
}
|
|
1016
520
|
|
|
1017
|
-
var
|
|
521
|
+
var useIconStyles = core.makeStyles(function (_a) {
|
|
522
|
+
var spacing = _a.spacing, palette = _a.palette;
|
|
523
|
+
var getFontSize = function (_a) {
|
|
524
|
+
var size = _a.size;
|
|
525
|
+
var sizes = {
|
|
526
|
+
inherit: 'inherit',
|
|
527
|
+
small: spacing(1.5),
|
|
528
|
+
medium: spacing(2),
|
|
529
|
+
large: spacing(2.5),
|
|
530
|
+
'extra-large': spacing(3),
|
|
531
|
+
};
|
|
532
|
+
return size ? sizes[size] : 'inherit';
|
|
533
|
+
};
|
|
534
|
+
var getColor = function (props) {
|
|
535
|
+
var semanticColors = ['primary', 'secondary', 'info', 'success', 'warning', 'error'];
|
|
536
|
+
var value = 'inherit';
|
|
537
|
+
if (props.color) {
|
|
538
|
+
if (semanticColors.includes(props.color.split('.')[0])) {
|
|
539
|
+
var _a = props.color.split('.'), color = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
540
|
+
value = palette[color][variant];
|
|
541
|
+
}
|
|
542
|
+
else if (props.color.search(/^(rgb|hsla|#)/) !== -1) {
|
|
543
|
+
value = props.color;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
return value;
|
|
547
|
+
};
|
|
548
|
+
return {
|
|
549
|
+
root: {
|
|
550
|
+
color: getColor,
|
|
551
|
+
fontSize: getFontSize,
|
|
552
|
+
strokeWidth: '1.3px',
|
|
553
|
+
},
|
|
554
|
+
};
|
|
555
|
+
});
|
|
556
|
+
|
|
557
|
+
var classnames$1 = {exports: {}};
|
|
558
|
+
|
|
559
|
+
/*!
|
|
560
|
+
Copyright (c) 2018 Jed Watson.
|
|
561
|
+
Licensed under the MIT License (MIT), see
|
|
562
|
+
http://jedwatson.github.io/classnames
|
|
563
|
+
*/
|
|
564
|
+
|
|
565
|
+
(function (module) {
|
|
566
|
+
/* global define */
|
|
567
|
+
|
|
568
|
+
(function () {
|
|
569
|
+
|
|
570
|
+
var hasOwn = {}.hasOwnProperty;
|
|
571
|
+
|
|
572
|
+
function classNames() {
|
|
573
|
+
var classes = [];
|
|
574
|
+
|
|
575
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
576
|
+
var arg = arguments[i];
|
|
577
|
+
if (!arg) continue;
|
|
578
|
+
|
|
579
|
+
var argType = typeof arg;
|
|
580
|
+
|
|
581
|
+
if (argType === 'string' || argType === 'number') {
|
|
582
|
+
classes.push(arg);
|
|
583
|
+
} else if (Array.isArray(arg)) {
|
|
584
|
+
if (arg.length) {
|
|
585
|
+
var inner = classNames.apply(null, arg);
|
|
586
|
+
if (inner) {
|
|
587
|
+
classes.push(inner);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
} else if (argType === 'object') {
|
|
591
|
+
if (arg.toString === Object.prototype.toString) {
|
|
592
|
+
for (var key in arg) {
|
|
593
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
594
|
+
classes.push(key);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
} else {
|
|
598
|
+
classes.push(arg.toString());
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
return classes.join(' ');
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
if (module.exports) {
|
|
607
|
+
classNames.default = classNames;
|
|
608
|
+
module.exports = classNames;
|
|
609
|
+
} else {
|
|
610
|
+
window.classNames = classNames;
|
|
611
|
+
}
|
|
612
|
+
}());
|
|
613
|
+
}(classnames$1));
|
|
614
|
+
|
|
615
|
+
var classNames$1 = classnames$1.exports;
|
|
616
|
+
|
|
617
|
+
var iconStaticClassName = 'pop-icon';
|
|
618
|
+
var Icon = function (props) {
|
|
619
|
+
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
620
|
+
var classes = useIconStyles(props);
|
|
621
|
+
var isValid = true;
|
|
622
|
+
if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
|
|
623
|
+
isValid = false;
|
|
624
|
+
}
|
|
625
|
+
return isValid
|
|
626
|
+
? React.createElement(icon, __assign({ className: classNames$1([classes.root, iconStaticClassName, className]) }, restProps))
|
|
627
|
+
: null;
|
|
628
|
+
};
|
|
629
|
+
Icon.defaultProps = {
|
|
630
|
+
size: 'inherit',
|
|
631
|
+
color: 'inherit',
|
|
632
|
+
};
|
|
633
|
+
Icon.displayName = 'Icon';
|
|
634
|
+
|
|
635
|
+
var LoadingStatus;
|
|
636
|
+
(function (LoadingStatus) {
|
|
637
|
+
LoadingStatus["ERROR"] = "ERROR";
|
|
638
|
+
LoadingStatus["LOADED"] = "LOADED";
|
|
639
|
+
LoadingStatus["PENDING"] = "PENDING";
|
|
640
|
+
})(LoadingStatus || (LoadingStatus = {}));
|
|
641
|
+
var useImgProps = function (avatarProps) {
|
|
642
|
+
var _a = React__default['default'].useState(LoadingStatus.PENDING), loaded = _a[0], setLoaded = _a[1];
|
|
643
|
+
var imgProps = __assign(__assign({}, avatarProps.imgProps), { onLoad: function (event) {
|
|
644
|
+
var _a, _b;
|
|
645
|
+
setLoaded(LoadingStatus.LOADED);
|
|
646
|
+
(_b = (_a = avatarProps.imgProps) === null || _a === void 0 ? void 0 : _a.onLoad) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
647
|
+
} });
|
|
648
|
+
return { imgProps: imgProps, loaded: loaded };
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
var getAvatarDimensions = function (theme, props) {
|
|
652
|
+
var factors = {
|
|
653
|
+
'extra-small': 3,
|
|
654
|
+
small: 4,
|
|
655
|
+
medium: 5,
|
|
656
|
+
large: 6,
|
|
657
|
+
'extra-large': 12.5,
|
|
658
|
+
};
|
|
659
|
+
var sizeFactor = factors[props.size || 'medium'];
|
|
660
|
+
return theme.spacing(sizeFactor);
|
|
661
|
+
};
|
|
662
|
+
var getAvatarFontSize = function (props) {
|
|
663
|
+
var fontSizes = {
|
|
664
|
+
'extra-small': '0.75rem',
|
|
665
|
+
small: '1rem',
|
|
666
|
+
medium: '1rem',
|
|
667
|
+
large: '1.25rem',
|
|
668
|
+
'extra-large': '3.5rem',
|
|
669
|
+
};
|
|
670
|
+
return fontSizes[props.size];
|
|
671
|
+
};
|
|
672
|
+
var useAvatarStyles = styles.makeStyles(function (theme) { return ({
|
|
673
|
+
root: function (props) { return ({
|
|
674
|
+
width: getAvatarDimensions(theme, props),
|
|
675
|
+
height: getAvatarDimensions(theme, props),
|
|
676
|
+
fontSize: getAvatarFontSize(props),
|
|
677
|
+
backgroundColor: props.loaded === LoadingStatus.LOADED ? 'transparent' : props.background,
|
|
678
|
+
color: theme.palette.getContrastText(props.background),
|
|
679
|
+
objectFit: props.fit,
|
|
680
|
+
}); },
|
|
681
|
+
fallback: function (props) { return ({
|
|
682
|
+
fontSize: getAvatarDimensions(theme, props),
|
|
683
|
+
strokeWidth: 1,
|
|
684
|
+
}); },
|
|
685
|
+
}); });
|
|
1018
686
|
|
|
1019
|
-
|
|
687
|
+
var Avatar = React.forwardRef(function (props, ref) {
|
|
688
|
+
var children = props.children, src = props.src, alt = props.alt, fallback = props.fallback, muiProps = __rest(props, ["children", "src", "alt", "fallback"]);
|
|
689
|
+
var _a = useImgProps(props), imgProps = _a.imgProps, loaded = _a.loaded;
|
|
690
|
+
var classes = useAvatarStyles(__assign(__assign({}, props), { loaded: loaded }));
|
|
691
|
+
var displayAltTextFallback = src && alt;
|
|
692
|
+
var displayNoFallback = fallback === 'none';
|
|
693
|
+
var displayCustomFallback = fallback !== 'none' && typeof fallback !== 'undefined';
|
|
694
|
+
var Fallback;
|
|
695
|
+
if (displayAltTextFallback) {
|
|
696
|
+
Fallback = null;
|
|
697
|
+
}
|
|
698
|
+
else if (displayNoFallback) {
|
|
699
|
+
Fallback = ' ';
|
|
700
|
+
}
|
|
701
|
+
else if (displayCustomFallback) {
|
|
702
|
+
Fallback = fallback;
|
|
703
|
+
}
|
|
704
|
+
else {
|
|
705
|
+
Fallback = React__default['default'].createElement(Icon, { icon: SvgUser, className: classes.fallback });
|
|
706
|
+
}
|
|
707
|
+
return (React__default['default'].createElement(MuiAvatar__default['default'], __assign({ ref: ref, classes: { root: classes.root }, src: src, alt: alt }, muiProps, { imgProps: imgProps }), children || Fallback));
|
|
708
|
+
});
|
|
709
|
+
Avatar.defaultProps = {
|
|
710
|
+
size: 'medium',
|
|
711
|
+
fit: 'cover',
|
|
712
|
+
background: '#E0E0E0',
|
|
713
|
+
};
|
|
714
|
+
Avatar.displayName = 'Avatar';
|
|
1020
715
|
|
|
1021
|
-
function
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
}
|
|
716
|
+
styles.makeStyles(function (theme) { return ({
|
|
717
|
+
circle: {
|
|
718
|
+
backgroundColor: theme.palette.grey[300],
|
|
719
|
+
borderRadius: '50%',
|
|
720
|
+
height: theme.spacing(0.65),
|
|
721
|
+
width: theme.spacing(0.65),
|
|
722
|
+
margin: theme.spacing(1) + "px 0 " + theme.spacing(1) + "px " + theme.spacing(1) + "px",
|
|
723
|
+
},
|
|
724
|
+
container: {
|
|
725
|
+
border: "1px solid " + theme.palette.secondary.light,
|
|
726
|
+
borderRadius: theme.spacing(0.5),
|
|
727
|
+
flexGrow: 1,
|
|
728
|
+
},
|
|
729
|
+
titleBar: {
|
|
730
|
+
display: 'flex',
|
|
731
|
+
flexDirection: 'row',
|
|
732
|
+
borderBottom: "1px solid " + theme.palette.secondary.light,
|
|
733
|
+
width: '100%',
|
|
734
|
+
},
|
|
735
|
+
}); });
|
|
1034
736
|
|
|
1035
|
-
var
|
|
737
|
+
var useButtonStyles = styles.makeStyles(function () { return ({
|
|
738
|
+
root: {
|
|
739
|
+
minWidth: 'unset',
|
|
740
|
+
},
|
|
741
|
+
label: {
|
|
742
|
+
textTransform: function (_a) {
|
|
743
|
+
var textTransform = _a.textTransform;
|
|
744
|
+
return textTransform;
|
|
745
|
+
},
|
|
746
|
+
},
|
|
747
|
+
}); });
|
|
1036
748
|
|
|
1037
|
-
|
|
749
|
+
var Button = React.forwardRef(function (props, ref) {
|
|
750
|
+
props.textTransform; var loading = props.loading, classesOverride = props.classes, className = props.className, muiProps = __rest(props, ["textTransform", "loading", "classes", "className"]);
|
|
751
|
+
props.classes; var styleProps = __rest(props, ["classes"]);
|
|
752
|
+
var classes = useButtonStyles(styleProps);
|
|
753
|
+
var typography = styles.useTheme().typography;
|
|
754
|
+
var loadingIndicator = {
|
|
755
|
+
startIcon: React__default['default'].createElement(CircularProgress__default['default'], { color: "inherit", size: typography.button.fontSize }),
|
|
756
|
+
disabled: true,
|
|
757
|
+
};
|
|
758
|
+
return (React__default['default'].createElement(MuiButton__default['default'], __assign({ ref: ref, classes: __assign(__assign({}, classes), classesOverride), className: classNames$1([className, 'pm-button']) }, muiProps, (loading && loadingIndicator))));
|
|
759
|
+
});
|
|
760
|
+
Button.displayName = 'Button';
|
|
1038
761
|
|
|
1039
|
-
function
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
width: "1em",
|
|
1046
|
-
height: "1em"
|
|
1047
|
-
}, props), _g$17 || (_g$17 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
1048
|
-
clipPath: "url(#plus-circle_svg__clip0_8_5870)",
|
|
1049
|
-
stroke: "currentColor"
|
|
1050
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1051
|
-
d: "M8 14.667A6.667 6.667 0 108 1.334a6.667 6.667 0 000 13.333zm0-9.334v5.334M5.333 8h5.334"
|
|
1052
|
-
}))), _defs$B || (_defs$B = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("clipPath", {
|
|
1053
|
-
id: "plus-circle_svg__clip0_8_5870"
|
|
1054
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1055
|
-
fill: "currentColor",
|
|
1056
|
-
d: "M0 0h16v16H0z"
|
|
1057
|
-
})))));
|
|
1058
|
-
}
|
|
762
|
+
var Checkbox = React.forwardRef(function (props, ref) {
|
|
763
|
+
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
|
|
764
|
+
var control = React__default['default'].createElement(MuiCheckbox__default['default'], __assign({ disabled: label ? undefined : disabled }, muiProps));
|
|
765
|
+
return label ? (React__default['default'].createElement(FormControlLabel__default['default'], __assign({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
766
|
+
});
|
|
767
|
+
Checkbox.displayName = 'Checkbox';
|
|
1059
768
|
|
|
1060
|
-
var
|
|
769
|
+
var getBackground = function (theme) { return function (props) {
|
|
770
|
+
var variant = props.variant, severity = props.severity;
|
|
771
|
+
var background = theme.palette.grey[100];
|
|
772
|
+
var backgrounds = {
|
|
773
|
+
outlined: 'none',
|
|
774
|
+
error: 'error.main',
|
|
775
|
+
warning: 'warning.main',
|
|
776
|
+
info: 'info.light',
|
|
777
|
+
success: 'success.light',
|
|
778
|
+
};
|
|
779
|
+
if (variant === 'outlined') {
|
|
780
|
+
background = backgrounds[variant];
|
|
781
|
+
}
|
|
782
|
+
else if (severity) {
|
|
783
|
+
var _a = backgrounds[severity].split('.'), color = _a[0], colorVariant = _a[1];
|
|
784
|
+
background = theme.palette[color][colorVariant];
|
|
785
|
+
}
|
|
786
|
+
return background;
|
|
787
|
+
}; };
|
|
788
|
+
var getColor = function (theme) { return function (props) {
|
|
789
|
+
var variant = props.variant, severity = props.severity;
|
|
790
|
+
var textColor;
|
|
791
|
+
if (variant === 'outlined' && severity) {
|
|
792
|
+
var textColors = {
|
|
793
|
+
error: theme.palette.error.main,
|
|
794
|
+
info: theme.palette.info.main,
|
|
795
|
+
warning: theme.palette.warning.dark,
|
|
796
|
+
success: theme.palette.success.dark,
|
|
797
|
+
};
|
|
798
|
+
textColor = textColors[severity];
|
|
799
|
+
}
|
|
800
|
+
else if (variant === 'outlined' && !severity) {
|
|
801
|
+
textColor = theme.palette.grey[700];
|
|
802
|
+
}
|
|
803
|
+
else if ((variant === 'default' || variant === undefined) && severity) {
|
|
804
|
+
var textColors = {
|
|
805
|
+
error: theme.palette.common.white,
|
|
806
|
+
info: theme.palette.secondary.main,
|
|
807
|
+
warning: theme.palette.secondary.main,
|
|
808
|
+
success: theme.palette.secondary.main,
|
|
809
|
+
};
|
|
810
|
+
textColor = textColors[severity];
|
|
811
|
+
}
|
|
812
|
+
return textColor;
|
|
813
|
+
}; };
|
|
814
|
+
var getBorder = function (theme) { return function (props) {
|
|
815
|
+
var variant = props.variant, severity = props.severity;
|
|
816
|
+
var borderColor;
|
|
817
|
+
if (variant === 'outlined' && severity) {
|
|
818
|
+
var borderColors = {
|
|
819
|
+
error: theme.palette.error.main,
|
|
820
|
+
info: theme.palette.info.main,
|
|
821
|
+
warning: theme.palette.warning.dark,
|
|
822
|
+
success: theme.palette.success.dark,
|
|
823
|
+
};
|
|
824
|
+
borderColor = borderColors[severity];
|
|
825
|
+
}
|
|
826
|
+
return borderColor;
|
|
827
|
+
}; };
|
|
828
|
+
styles.makeStyles(function (theme) { return ({
|
|
829
|
+
root: {
|
|
830
|
+
background: getBackground(theme),
|
|
831
|
+
color: getColor(theme),
|
|
832
|
+
borderColor: getBorder(theme),
|
|
833
|
+
borderRadius: theme.spacing(0.5),
|
|
834
|
+
},
|
|
835
|
+
icon: {
|
|
836
|
+
color: 'inherit',
|
|
837
|
+
height: theme.spacing(2),
|
|
838
|
+
width: theme.spacing(2),
|
|
839
|
+
},
|
|
840
|
+
deleteIcon: {
|
|
841
|
+
color: theme.palette.grey[500],
|
|
842
|
+
},
|
|
843
|
+
}); });
|
|
1061
844
|
|
|
1062
|
-
|
|
845
|
+
var defaultTypographyProps = {
|
|
846
|
+
variant: 'body1',
|
|
847
|
+
};
|
|
1063
848
|
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
849
|
+
var weights = {
|
|
850
|
+
regular: 400,
|
|
851
|
+
medium: 500,
|
|
852
|
+
'semi-bold': 600,
|
|
853
|
+
bold: 700,
|
|
854
|
+
};
|
|
855
|
+
var getCustomColor = function (theme, color) {
|
|
856
|
+
var isCommonColor = color && ['white', 'black'].includes(color);
|
|
857
|
+
var isGreyColor = color && color.match(/^grey\.\d{3}/);
|
|
858
|
+
var isSemanticColor = color && color.match(/(primary|secondary|info|success|error|warning).?(light|dark)?/);
|
|
859
|
+
var isTextColor = color && ['textPrimary', 'textSecondary'].includes(color);
|
|
860
|
+
switch (true) {
|
|
861
|
+
case isCommonColor:
|
|
862
|
+
return theme.palette.common[color];
|
|
863
|
+
case Boolean(isGreyColor):
|
|
864
|
+
var scale = color.split('.')[1];
|
|
865
|
+
return theme.palette.grey[scale] || theme.palette.grey[900];
|
|
866
|
+
case Boolean(isSemanticColor):
|
|
867
|
+
var _a = color.split('.'), paletteKey = _a[0], _b = _a[1], variant = _b === void 0 ? 'main' : _b;
|
|
868
|
+
return theme.palette[paletteKey][variant];
|
|
869
|
+
case isTextColor:
|
|
870
|
+
return theme.palette.text[color.slice(4).toLowerCase()];
|
|
871
|
+
default:
|
|
872
|
+
return undefined;
|
|
873
|
+
}
|
|
874
|
+
};
|
|
875
|
+
var useTypographyStyles = styles.makeStyles(function (theme) {
|
|
876
|
+
var _a;
|
|
877
|
+
return ({
|
|
878
|
+
root: (_a = {},
|
|
879
|
+
_a["& ." + iconStaticClassName] = {
|
|
880
|
+
position: 'relative',
|
|
881
|
+
top: '0.125em',
|
|
882
|
+
padding: '0 0.125em',
|
|
883
|
+
boxSizing: 'content-box',
|
|
884
|
+
},
|
|
885
|
+
_a.fontFamily = theme.typography.fontFamily,
|
|
886
|
+
_a.fontWeight = function (_a) {
|
|
887
|
+
var variant = _a.variant, weight = _a.weight;
|
|
888
|
+
return (weight ? weights[weight] : theme.typography[variant].fontWeight);
|
|
889
|
+
},
|
|
890
|
+
_a.fontSize = function (_a) {
|
|
891
|
+
var variant = _a.variant;
|
|
892
|
+
return theme.typography[variant].fontSize;
|
|
893
|
+
},
|
|
894
|
+
_a.lineHeight = function (_a) {
|
|
895
|
+
var variant = _a.variant;
|
|
896
|
+
return theme.typography[variant].lineHeight;
|
|
897
|
+
},
|
|
898
|
+
_a.textTransform = function (_a) {
|
|
899
|
+
var variant = _a.variant;
|
|
900
|
+
return theme.typography[variant].textTransform;
|
|
901
|
+
},
|
|
902
|
+
_a.color = function (_a) {
|
|
903
|
+
var color = _a.color, variant = _a.variant;
|
|
904
|
+
return (color && getCustomColor(theme, color)) || theme.typography[variant].color;
|
|
905
|
+
},
|
|
906
|
+
_a),
|
|
907
|
+
caption: {
|
|
908
|
+
display: 'inline',
|
|
909
|
+
},
|
|
910
|
+
overline: {
|
|
911
|
+
display: 'inline',
|
|
912
|
+
},
|
|
913
|
+
});
|
|
914
|
+
});
|
|
1077
915
|
|
|
1078
|
-
var
|
|
916
|
+
var Typography = React.forwardRef(function (props, ref) {
|
|
917
|
+
props.weight; props.color; var restProps = __rest(props, ["weight", "color"]);
|
|
918
|
+
var classes = useTypographyStyles(__assign({}, props));
|
|
919
|
+
var variantMapping = { subtitle1: 'p' };
|
|
920
|
+
return React__default['default'].createElement(core.Typography, __assign({ ref: ref, classes: classes, variantMapping: variantMapping }, restProps));
|
|
921
|
+
});
|
|
922
|
+
Typography.displayName = 'Typography';
|
|
923
|
+
Typography.defaultProps = defaultTypographyProps;
|
|
1079
924
|
|
|
1080
|
-
|
|
925
|
+
var getFadeStop = function (_a, typographyVariant) {
|
|
926
|
+
var typography = _a.typography;
|
|
927
|
+
return !isNaN(Number(typography[typographyVariant].lineHeight))
|
|
928
|
+
? typography[typographyVariant].lineHeight + "rem"
|
|
929
|
+
: typography[typographyVariant].lineHeight;
|
|
930
|
+
};
|
|
931
|
+
core.makeStyles(function (theme) { return ({
|
|
932
|
+
overlay: {
|
|
933
|
+
position: 'absolute',
|
|
934
|
+
top: 0,
|
|
935
|
+
left: 0,
|
|
936
|
+
height: '100%',
|
|
937
|
+
width: '100%',
|
|
938
|
+
background: function (props) { return "linear-gradient(to top, white, #FFF0 " + getFadeStop(theme, props.typographyVariant) + ")"; },
|
|
939
|
+
},
|
|
940
|
+
}); });
|
|
1081
941
|
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
}
|
|
942
|
+
var SemanticColors;
|
|
943
|
+
(function (SemanticColors) {
|
|
944
|
+
SemanticColors["PRIMARY_MAIN"] = "primary.main";
|
|
945
|
+
SemanticColors["PRIMARY_DARK"] = "primary.dark";
|
|
946
|
+
SemanticColors["PRIMARY_LIGHT"] = "primary.light";
|
|
947
|
+
SemanticColors["SECONDARY_MAIN"] = "secondary.main";
|
|
948
|
+
SemanticColors["SECONDARY_DARK"] = "secondary.dark";
|
|
949
|
+
SemanticColors["SECONDARY_LIGHT"] = "secondary.light";
|
|
950
|
+
})(SemanticColors || (SemanticColors = {}));
|
|
951
|
+
core.makeStyles(function (theme) { return ({
|
|
952
|
+
dividerRoot: {
|
|
953
|
+
gap: theme.spacing(2),
|
|
954
|
+
},
|
|
955
|
+
textRoot: {
|
|
956
|
+
color: function (props) {
|
|
957
|
+
var textColor = props.textColor;
|
|
958
|
+
if (Object.values(SemanticColors).includes(textColor)) {
|
|
959
|
+
var _a = textColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
960
|
+
return theme.palette[semanticColor][shade];
|
|
961
|
+
}
|
|
962
|
+
else if (textColor) {
|
|
963
|
+
return textColor;
|
|
964
|
+
}
|
|
965
|
+
else {
|
|
966
|
+
return 'black';
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
textTransform: function (props) { return props.textTransform; },
|
|
970
|
+
},
|
|
971
|
+
dividerLine: {
|
|
972
|
+
backgroundColor: function (props) {
|
|
973
|
+
var dividerColor = props.dividerColor;
|
|
974
|
+
if (Object.values(SemanticColors).includes(dividerColor)) {
|
|
975
|
+
var _a = dividerColor.split('.'), semanticColor = _a[0], shade = _a[1];
|
|
976
|
+
return theme.palette[semanticColor][shade];
|
|
977
|
+
}
|
|
978
|
+
else if (dividerColor) {
|
|
979
|
+
return dividerColor;
|
|
980
|
+
}
|
|
981
|
+
else {
|
|
982
|
+
return theme.palette.grey[500];
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
},
|
|
986
|
+
}); });
|
|
1095
987
|
|
|
1096
|
-
var
|
|
988
|
+
var IconButton = React.forwardRef(function (props, ref) {
|
|
989
|
+
return React__default['default'].createElement(MuiIconButton__default['default'], __assign({ ref: ref }, props));
|
|
990
|
+
});
|
|
991
|
+
IconButton.displayName = 'IconButton';
|
|
992
|
+
IconButton.defaultProps = {
|
|
993
|
+
color: 'secondary',
|
|
994
|
+
};
|
|
1097
995
|
|
|
1098
|
-
|
|
996
|
+
var useLinkStyles = styles.makeStyles(function (theme) { return ({
|
|
997
|
+
root: function (props) {
|
|
998
|
+
var _a;
|
|
999
|
+
return (__assign(__assign({ display: 'flex' }, (props.color === undefined && { color: theme.palette.info.main })), (_a = {}, _a["& ." + iconStaticClassName] = {
|
|
1000
|
+
alignSelf: 'center',
|
|
1001
|
+
}, _a)));
|
|
1002
|
+
},
|
|
1003
|
+
}); });
|
|
1099
1004
|
|
|
1100
|
-
function
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
d: "M14 7.667a5.587 5.587 0 01-.6 2.533 5.666 5.666 0 01-5.067 3.133 5.588 5.588 0 01-2.533-.6L2 14l1.267-3.8a5.586 5.586 0 01-.6-2.533A5.667 5.667 0 015.8 2.6 5.587 5.587 0 018.333 2h.334A5.654 5.654 0 0114 7.333v.334z",
|
|
1110
|
-
stroke: "currentColor"
|
|
1111
|
-
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1112
|
-
d: "M8.375 5.363a.2.2 0 01.358 0l.578 1.17a.2.2 0 00.15.11l1.292.189a.2.2 0 01.11.34l-.934.911a.2.2 0 00-.057.177l.22 1.286a.2.2 0 01-.29.21L8.647 9.15a.2.2 0 00-.186 0l-1.155.608a.2.2 0 01-.29-.211l.22-1.286a.2.2 0 00-.058-.177l-.934-.91a.2.2 0 01.11-.341l1.293-.19a.2.2 0 00.15-.109l.578-1.17z",
|
|
1113
|
-
fill: "currentColor"
|
|
1114
|
-
})));
|
|
1115
|
-
}
|
|
1005
|
+
var Link = React.forwardRef(function (props, ref) {
|
|
1006
|
+
var children = props.children, muiProps = __rest(props, ["children"]);
|
|
1007
|
+
var classes = useLinkStyles(props);
|
|
1008
|
+
return (React__default['default'].createElement(core.Link, __assign({ ref: ref, classes: { root: classes.root } }, muiProps), children));
|
|
1009
|
+
});
|
|
1010
|
+
Link.defaultProps = {
|
|
1011
|
+
variant: 'body1',
|
|
1012
|
+
};
|
|
1013
|
+
Link.displayName = 'Link';
|
|
1116
1014
|
|
|
1117
|
-
var
|
|
1015
|
+
var useStyles$4 = core.makeStyles(function (_a) {
|
|
1016
|
+
var spacing = _a.spacing;
|
|
1017
|
+
return ({
|
|
1018
|
+
root: {
|
|
1019
|
+
'&:last-child': {
|
|
1020
|
+
marginBottom: 0,
|
|
1021
|
+
},
|
|
1022
|
+
marginBottom: spacing(4),
|
|
1023
|
+
padding: spacing(4),
|
|
1024
|
+
},
|
|
1025
|
+
});
|
|
1026
|
+
});
|
|
1027
|
+
var Paper = React.forwardRef(function (props, ref) {
|
|
1028
|
+
var legacyStyles = props.legacyStyles, restProps = __rest(props, ["legacyStyles"]);
|
|
1029
|
+
var classes = useStyles$4(props);
|
|
1030
|
+
return React__default['default'].createElement(core.Paper, __assign({}, ref, { classes: __assign({}, (legacyStyles && classes)) }, restProps));
|
|
1031
|
+
});
|
|
1032
|
+
Paper.displayName = 'Paper';
|
|
1033
|
+
Paper.defaultProps = {
|
|
1034
|
+
legacyStyles: false,
|
|
1035
|
+
};
|
|
1118
1036
|
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1037
|
+
var Radio = React.forwardRef(function (props, ref) {
|
|
1038
|
+
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
|
|
1039
|
+
var control = React__default['default'].createElement(MuiRadio__default['default'], __assign({ disabled: label ? undefined : disabled }, muiProps));
|
|
1040
|
+
return label ? (React__default['default'].createElement(FormControlLabel__default['default'], __assign({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
1041
|
+
});
|
|
1042
|
+
Radio.displayName = 'Radio';
|
|
1124
1043
|
|
|
1125
|
-
(function (
|
|
1126
|
-
|
|
1044
|
+
styles.makeStyles(function () { return ({
|
|
1045
|
+
textfield: {
|
|
1046
|
+
background: function (props) { return (props.backgroundTransparency ? '#FFFFFF44' : 'none'); },
|
|
1047
|
+
borderTopLeftRadius: 4,
|
|
1048
|
+
borderBottomLeftRadius: 4,
|
|
1049
|
+
'& fieldset': {
|
|
1050
|
+
borderRight: 'none',
|
|
1051
|
+
borderTopRightRadius: 0,
|
|
1052
|
+
borderBottomRightRadius: 0,
|
|
1053
|
+
},
|
|
1054
|
+
},
|
|
1055
|
+
button: {
|
|
1056
|
+
borderTopLeftRadius: 0,
|
|
1057
|
+
borderBottomLeftRadius: 0,
|
|
1058
|
+
alignSelf: 'stretch',
|
|
1059
|
+
},
|
|
1060
|
+
input: {
|
|
1061
|
+
color: function (props) { return props.inputTextColor || 'inherit'; },
|
|
1062
|
+
'&$focused fieldset': {
|
|
1063
|
+
top: -4,
|
|
1064
|
+
},
|
|
1065
|
+
},
|
|
1066
|
+
focused: {},
|
|
1067
|
+
}); });
|
|
1127
1068
|
|
|
1128
|
-
(function () {
|
|
1069
|
+
var useSwitchStyles = styles.makeStyles(function (theme) { return ({
|
|
1070
|
+
checked: {
|
|
1071
|
+
'& $thumb': {
|
|
1072
|
+
background: theme.palette.success.main,
|
|
1073
|
+
},
|
|
1074
|
+
'&& + $track': {
|
|
1075
|
+
backgroundColor: theme.palette.success.main,
|
|
1076
|
+
},
|
|
1077
|
+
},
|
|
1078
|
+
thumb: {},
|
|
1079
|
+
track: {},
|
|
1080
|
+
}); });
|
|
1129
1081
|
|
|
1130
|
-
|
|
1082
|
+
var Switch = React.forwardRef(function (props, ref) {
|
|
1083
|
+
var label = props.label, disabled = props.disabled, LabelProps = props.LabelProps, muiProps = __rest(props, ["label", "disabled", "LabelProps"]);
|
|
1084
|
+
var classes = useSwitchStyles(props);
|
|
1085
|
+
var control = React__default['default'].createElement(MuiSwitch__default['default'], __assign({ classes: classes, disabled: label ? undefined : disabled }, muiProps));
|
|
1086
|
+
return label ? (React__default['default'].createElement(FormControlLabel__default['default'], __assign({ disabled: disabled, inputRef: ref, control: control, label: label }, LabelProps))) : (control);
|
|
1087
|
+
});
|
|
1088
|
+
Switch.displayName = 'Switch';
|
|
1131
1089
|
|
|
1132
|
-
|
|
1133
|
-
|
|
1090
|
+
var useToggleButtonStyles = styles.makeStyles(function (theme) { return ({
|
|
1091
|
+
root: {
|
|
1092
|
+
color: theme.palette.text.primary,
|
|
1093
|
+
},
|
|
1094
|
+
selected: {
|
|
1095
|
+
'&&': {
|
|
1096
|
+
'&:hover': {
|
|
1097
|
+
backgroundColor: function (props) { return theme.palette[props.color || 'primary'].dark; },
|
|
1098
|
+
},
|
|
1099
|
+
backgroundColor: function (props) { return theme.palette[props.color || 'primary'].main; },
|
|
1100
|
+
color: 'white',
|
|
1101
|
+
},
|
|
1102
|
+
},
|
|
1103
|
+
}); });
|
|
1134
1104
|
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1105
|
+
var ToggleButton = React.forwardRef(function (props, ref) {
|
|
1106
|
+
var children = props.children, muiProps = __rest(props, ["children"]);
|
|
1107
|
+
var classes = useToggleButtonStyles(props);
|
|
1108
|
+
return (React__default['default'].createElement(MuiToggleButton__default['default'], __assign({ ref: ref, classes: {
|
|
1109
|
+
root: classes.root,
|
|
1110
|
+
selected: classes.selected,
|
|
1111
|
+
} }, muiProps), children));
|
|
1112
|
+
});
|
|
1113
|
+
ToggleButton.defaultProps = {
|
|
1114
|
+
color: 'primary',
|
|
1115
|
+
};
|
|
1116
|
+
ToggleButton.displayName = 'ToggleButton';
|
|
1138
1117
|
|
|
1139
|
-
|
|
1118
|
+
var useToggleButtonGroupStyles = styles.makeStyles(function (theme) { return ({
|
|
1119
|
+
root: {
|
|
1120
|
+
'&&': {
|
|
1121
|
+
backgroundColor: theme.palette.grey[300],
|
|
1122
|
+
},
|
|
1123
|
+
},
|
|
1124
|
+
}); });
|
|
1140
1125
|
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1154
|
-
classes.push(key);
|
|
1155
|
-
}
|
|
1156
|
-
}
|
|
1157
|
-
} else {
|
|
1158
|
-
classes.push(arg.toString());
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1126
|
+
var ToggleButtonGroup = React.forwardRef(function (props, ref) {
|
|
1127
|
+
var children = props.children, _a = props.color, color = _a === void 0 ? 'primary' : _a, muiProps = __rest(props, ["children", "color"]);
|
|
1128
|
+
var classes = useToggleButtonGroupStyles(props);
|
|
1129
|
+
var childrenWithProps = React__default['default'].Children.map(children, function (child) {
|
|
1130
|
+
if (!React__default['default'].isValidElement(child)) {
|
|
1131
|
+
return null;
|
|
1132
|
+
}
|
|
1133
|
+
return React__default['default'].cloneElement(child, { color: color });
|
|
1134
|
+
});
|
|
1135
|
+
return (React__default['default'].createElement(MuiToggleButtonGroup__default['default'], __assign({ ref: ref, classes: { root: classes.root } }, muiProps), childrenWithProps));
|
|
1136
|
+
});
|
|
1137
|
+
ToggleButtonGroup.displayName = 'ToggleButtonGroup';
|
|
1162
1138
|
|
|
1163
|
-
|
|
1164
|
-
|
|
1139
|
+
var useTooltipStyles = styles.makeStyles(function (_a) {
|
|
1140
|
+
var typography = _a.typography;
|
|
1141
|
+
return ({
|
|
1142
|
+
tooltip: {
|
|
1143
|
+
fontSize: typography.pxToRem(16),
|
|
1144
|
+
},
|
|
1145
|
+
});
|
|
1146
|
+
});
|
|
1165
1147
|
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
}
|
|
1172
|
-
}());
|
|
1173
|
-
}(classnames));
|
|
1148
|
+
var Tooltip = React.forwardRef(function (props, ref) {
|
|
1149
|
+
var classes = useTooltipStyles(props);
|
|
1150
|
+
return React__default['default'].createElement(MuiTooltip__default['default'], __assign({ ref: ref, classes: classes }, props));
|
|
1151
|
+
});
|
|
1152
|
+
Tooltip.displayName = 'Tooltip';
|
|
1174
1153
|
|
|
1175
|
-
|
|
1154
|
+
core.makeStyles(function () { return ({
|
|
1155
|
+
root: {
|
|
1156
|
+
height: 56,
|
|
1157
|
+
},
|
|
1158
|
+
}); });
|
|
1159
|
+
core.makeStyles(function (theme) { return ({
|
|
1160
|
+
root: {
|
|
1161
|
+
height: '100%',
|
|
1162
|
+
width: 'min-content',
|
|
1163
|
+
borderRadius: theme.spacing(1),
|
|
1164
|
+
},
|
|
1165
|
+
input: {
|
|
1166
|
+
'&::-webkit-clear-button, &::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
|
|
1167
|
+
display: 'none',
|
|
1168
|
+
},
|
|
1169
|
+
'-moz-appearance': 'textfield',
|
|
1170
|
+
minWidth: 40,
|
|
1171
|
+
padding: 0,
|
|
1172
|
+
textAlign: 'center',
|
|
1173
|
+
},
|
|
1174
|
+
adornedStart: {
|
|
1175
|
+
padding: 0,
|
|
1176
|
+
},
|
|
1177
|
+
adornedEnd: {
|
|
1178
|
+
padding: 0,
|
|
1179
|
+
},
|
|
1180
|
+
}); });
|
|
1176
1181
|
|
|
1177
1182
|
var ReactionCounter = function (props) {
|
|
1178
1183
|
var count = props.count, icon = props.icon;
|
|
@@ -1186,60 +1191,34 @@ var ReactionCounterGroup = function (props) {
|
|
|
1186
1191
|
return (React__default['default'].createElement(core.Box, { display: "flex", gridGap: 16 }, children));
|
|
1187
1192
|
};
|
|
1188
1193
|
|
|
1189
|
-
var
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
height: '185px',
|
|
1198
|
-
justifyContent: 'space-between',
|
|
1199
|
-
padding: isMobile ? 0 : theme.spacing(2.5),
|
|
1200
|
-
cursor: 'pointer',
|
|
1201
|
-
color: theme.palette.grey[900],
|
|
1202
|
-
};
|
|
1203
|
-
},
|
|
1204
|
-
description: {
|
|
1205
|
-
color: '#616161',
|
|
1206
|
-
marginTop: theme.spacing(0.25),
|
|
1207
|
-
marginBottom: theme.spacing(1.5),
|
|
1208
|
-
width: '100%',
|
|
1209
|
-
},
|
|
1210
|
-
image: {
|
|
1211
|
-
borderRadius: '16px',
|
|
1212
|
-
objectFit: 'cover',
|
|
1213
|
-
marginLeft: theme.spacing(2),
|
|
1214
|
-
width: '125px',
|
|
1215
|
-
height: '100%',
|
|
1216
|
-
},
|
|
1217
|
-
plusIcon: {
|
|
1218
|
-
height: '100%',
|
|
1219
|
-
padding: theme.spacing(0.25),
|
|
1220
|
-
background: '#0076CB',
|
|
1221
|
-
color: theme.palette.common.white,
|
|
1222
|
-
borderRadius: '30px',
|
|
1223
|
-
marginRight: theme.spacing(1),
|
|
1224
|
-
},
|
|
1225
|
-
title: {
|
|
1226
|
-
fontSize: '1.125rem',
|
|
1227
|
-
},
|
|
1228
|
-
truncate: {
|
|
1229
|
-
'-webkit-line-clamp': 2,
|
|
1230
|
-
display: '-webkit-box',
|
|
1231
|
-
'-webkit-box-orient': 'vertical',
|
|
1232
|
-
textOverflow: 'ellipsis',
|
|
1233
|
-
overflow: 'hidden',
|
|
1234
|
-
},
|
|
1235
|
-
price: {
|
|
1236
|
-
fontSize: '1.25rem',
|
|
1237
|
-
},
|
|
1238
|
-
}); });
|
|
1194
|
+
var MenuItemReactions = function (props) {
|
|
1195
|
+
var likeCount = props.likeCount, reviewCount = props.reviewCount;
|
|
1196
|
+
var showLikes = likeCount ? likeCount > 0 : false;
|
|
1197
|
+
var showReviews = reviewCount ? reviewCount > 0 : false;
|
|
1198
|
+
return (React__default['default'].createElement(ReactionCounterGroup, null,
|
|
1199
|
+
showLikes && React__default['default'].createElement(ReactionCounter, { icon: SvgHeart, count: likeCount !== null && likeCount !== void 0 ? likeCount : 0 }),
|
|
1200
|
+
showReviews && React__default['default'].createElement(ReactionCounter, { icon: SvgReviews, count: reviewCount !== null && reviewCount !== void 0 ? reviewCount : 0 })));
|
|
1201
|
+
};
|
|
1239
1202
|
|
|
1240
|
-
var
|
|
1241
|
-
var
|
|
1242
|
-
return (
|
|
1203
|
+
var useStyles$3 = core.makeStyles(function (_a) {
|
|
1204
|
+
var palette = _a.palette, spacing = _a.spacing;
|
|
1205
|
+
return ({
|
|
1206
|
+
plusIcon: {
|
|
1207
|
+
height: '100%',
|
|
1208
|
+
padding: spacing(0.25),
|
|
1209
|
+
background: palette.info.main,
|
|
1210
|
+
color: palette.info.contrastText,
|
|
1211
|
+
borderRadius: '30px',
|
|
1212
|
+
marginRight: spacing(1),
|
|
1213
|
+
},
|
|
1214
|
+
});
|
|
1215
|
+
});
|
|
1216
|
+
var MenuItemPrice = function (props) {
|
|
1217
|
+
var classes = useStyles$3();
|
|
1218
|
+
return (React__default['default'].createElement(core.Box, { display: "flex", alignItems: "center" },
|
|
1219
|
+
React__default['default'].createElement(core.Box, { display: "flex", className: classes.plusIcon },
|
|
1220
|
+
React__default['default'].createElement(Icon, { icon: SvgPlus, size: "medium" })),
|
|
1221
|
+
React__default['default'].createElement(core.Typography, null, props.price)));
|
|
1243
1222
|
};
|
|
1244
1223
|
|
|
1245
1224
|
var useItemtagStyles = styles.makeStyles(function (theme) { return ({
|
|
@@ -1270,35 +1249,34 @@ var ItemTag = React.forwardRef(function (props, ref) {
|
|
|
1270
1249
|
React__default['default'].createElement(Typography, { variant: "caption", className: classes.text }, children)));
|
|
1271
1250
|
});
|
|
1272
1251
|
|
|
1273
|
-
var
|
|
1274
|
-
var
|
|
1252
|
+
var ItemTagGroup = function (props) {
|
|
1253
|
+
var children = props.children;
|
|
1254
|
+
return (React__default['default'].createElement(core.Box, { display: "flex", gridGap: 6, ml: 1, flexWrap: "wrap" }, children));
|
|
1255
|
+
};
|
|
1256
|
+
|
|
1257
|
+
var MenuItemTags = function (props) {
|
|
1258
|
+
var itemTags = props.itemTags;
|
|
1259
|
+
return (React__default['default'].createElement(ItemTagGroup, null, itemTags === null || itemTags === void 0 ? void 0 : itemTags.slice(0, 5).map(function (itemTag) { return (React__default['default'].createElement(ItemTag, { key: itemTag.name, alt: itemTag.name, color: itemTag.color }, itemTag.abbr)); })));
|
|
1260
|
+
};
|
|
1261
|
+
|
|
1262
|
+
var MenuItem = React.forwardRef(function (props, ref) {
|
|
1263
|
+
var onClick = props.onClick, id = props.id, title = props.title, description = props.description;
|
|
1275
1264
|
var classes = useDishCardStyles(props);
|
|
1276
|
-
var
|
|
1277
|
-
|
|
1278
|
-
var getTruncatedSizePx = function (typography) {
|
|
1279
|
-
var lineHeightRem = parseFloat(theme.typography[typography].lineHeight);
|
|
1280
|
-
var collapsedSizeRem = 2 * lineHeightRem;
|
|
1281
|
-
var documentFontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
1282
|
-
return collapsedSizeRem * documentFontSize;
|
|
1265
|
+
var handleClick = function (event) {
|
|
1266
|
+
onClick(id, event);
|
|
1283
1267
|
};
|
|
1284
|
-
return (React__default['default'].createElement(core.
|
|
1285
|
-
React__default['default'].createElement(core.
|
|
1286
|
-
React__default['default'].createElement(
|
|
1287
|
-
React__default['default'].createElement(core.
|
|
1288
|
-
|
|
1289
|
-
React__default['default'].createElement(
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
React__default['default'].createElement(
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
React__default['default'].createElement(core.Box, { display: "flex", className: classes.plusIcon },
|
|
1297
|
-
React__default['default'].createElement(Icon, { icon: SvgPlus, size: "medium" })),
|
|
1298
|
-
React__default['default'].createElement(Typography, { className: classes.price }, price)),
|
|
1299
|
-
React__default['default'].createElement(ItemTagGroup, null, itemTags.map(function (itemTag, i) { return (React__default['default'].createElement(ItemTag, { key: i, alt: itemTag.abbr, color: itemTag.color }, itemTag.abbr)); })))),
|
|
1300
|
-
validImage && React__default['default'].createElement("img", { src: image.src, alt: image.alt, className: classes.image })));
|
|
1301
|
-
};
|
|
1268
|
+
return (React__default['default'].createElement(core.Card, { className: classes.card, ref: ref, elevation: 0, "data-component-type": "menu-item" },
|
|
1269
|
+
React__default['default'].createElement(core.CardActionArea, { className: classes.cardActionArea, onClick: handleClick },
|
|
1270
|
+
React__default['default'].createElement(MenuItemInfo, null,
|
|
1271
|
+
React__default['default'].createElement(core.Typography, { className: classes.cardTitle }, title),
|
|
1272
|
+
React__default['default'].createElement(core.Typography, { className: classes.cardDescription, paragraph: true }, description),
|
|
1273
|
+
React__default['default'].createElement(MenuItemReactions, { likeCount: props.likeCount, reviewCount: props.reviewCount }),
|
|
1274
|
+
React__default['default'].createElement(core.Box, { display: "flex", justifyContent: "space-between", alignItems: "end", flexGrow: 1 },
|
|
1275
|
+
React__default['default'].createElement(MenuItemPrice, { price: props.price }),
|
|
1276
|
+
React__default['default'].createElement(MenuItemTags, { itemTags: props.itemTags }))),
|
|
1277
|
+
React__default['default'].createElement(MenuItemImg, { image: props.image }))));
|
|
1278
|
+
});
|
|
1279
|
+
MenuItem.displayName = 'MenuItem';
|
|
1302
1280
|
|
|
1303
1281
|
var useDishCheckoutCardStyles = styles.makeStyles(function (theme) { return ({
|
|
1304
1282
|
root: {
|
|
@@ -1492,6 +1470,66 @@ var useStatusTagStyles = styles.makeStyles(function (theme) { return ({
|
|
|
1492
1470
|
},
|
|
1493
1471
|
}); });
|
|
1494
1472
|
|
|
1473
|
+
var classnames = {exports: {}};
|
|
1474
|
+
|
|
1475
|
+
/*!
|
|
1476
|
+
Copyright (c) 2018 Jed Watson.
|
|
1477
|
+
Licensed under the MIT License (MIT), see
|
|
1478
|
+
http://jedwatson.github.io/classnames
|
|
1479
|
+
*/
|
|
1480
|
+
|
|
1481
|
+
(function (module) {
|
|
1482
|
+
/* global define */
|
|
1483
|
+
|
|
1484
|
+
(function () {
|
|
1485
|
+
|
|
1486
|
+
var hasOwn = {}.hasOwnProperty;
|
|
1487
|
+
|
|
1488
|
+
function classNames() {
|
|
1489
|
+
var classes = [];
|
|
1490
|
+
|
|
1491
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1492
|
+
var arg = arguments[i];
|
|
1493
|
+
if (!arg) continue;
|
|
1494
|
+
|
|
1495
|
+
var argType = typeof arg;
|
|
1496
|
+
|
|
1497
|
+
if (argType === 'string' || argType === 'number') {
|
|
1498
|
+
classes.push(arg);
|
|
1499
|
+
} else if (Array.isArray(arg)) {
|
|
1500
|
+
if (arg.length) {
|
|
1501
|
+
var inner = classNames.apply(null, arg);
|
|
1502
|
+
if (inner) {
|
|
1503
|
+
classes.push(inner);
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
} else if (argType === 'object') {
|
|
1507
|
+
if (arg.toString === Object.prototype.toString) {
|
|
1508
|
+
for (var key in arg) {
|
|
1509
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1510
|
+
classes.push(key);
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
} else {
|
|
1514
|
+
classes.push(arg.toString());
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
return classes.join(' ');
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
if (module.exports) {
|
|
1523
|
+
classNames.default = classNames;
|
|
1524
|
+
module.exports = classNames;
|
|
1525
|
+
} else {
|
|
1526
|
+
window.classNames = classNames;
|
|
1527
|
+
}
|
|
1528
|
+
}());
|
|
1529
|
+
}(classnames));
|
|
1530
|
+
|
|
1531
|
+
var classNames = classnames.exports;
|
|
1532
|
+
|
|
1495
1533
|
var StatusTag = function (props) {
|
|
1496
1534
|
var variant = props.variant, label = props.label, _a = props.color, color = _a === void 0 ? 'default' : _a;
|
|
1497
1535
|
var classes = useStatusTagStyles(props);
|
|
@@ -1866,26 +1904,24 @@ var useSelectableChipGroupStyles = styles.makeStyles(function (theme) { return (
|
|
|
1866
1904
|
root: {
|
|
1867
1905
|
display: 'flex',
|
|
1868
1906
|
alignItems: 'center',
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
},
|
|
1873
|
-
},
|
|
1907
|
+
},
|
|
1908
|
+
flexContainer: {
|
|
1909
|
+
gridGap: theme.spacing(1.5),
|
|
1874
1910
|
},
|
|
1875
1911
|
}); });
|
|
1876
1912
|
|
|
1877
1913
|
var SelectableChipGroup = function (props) {
|
|
1878
1914
|
var children = props.children, muiProps = __rest$1(props, ["children"]);
|
|
1879
1915
|
var classes = useSelectableChipGroupStyles(props);
|
|
1880
|
-
return (React__default['default'].createElement(
|
|
1916
|
+
return (React__default['default'].createElement(core.Tabs, __assign$1({ TabIndicatorProps: {
|
|
1881
1917
|
hidden: true,
|
|
1882
|
-
}, variant: "scrollable", scrollButtons: "off", classes:
|
|
1918
|
+
}, variant: "scrollable", scrollButtons: "off", classes: classes }, muiProps),
|
|
1883
1919
|
React__default['default'].createElement(core.Box, { minWidth: "1px" }),
|
|
1884
1920
|
children,
|
|
1885
1921
|
React__default['default'].createElement(core.Box, { minWidth: "1px" })));
|
|
1886
1922
|
};
|
|
1887
1923
|
|
|
1888
|
-
var useStyles = core.makeStyles(function (_a) {
|
|
1924
|
+
var useStyles$2 = core.makeStyles(function (_a) {
|
|
1889
1925
|
var spacing = _a.spacing;
|
|
1890
1926
|
return ({
|
|
1891
1927
|
root: {
|
|
@@ -1903,12 +1939,51 @@ var useStyles = core.makeStyles(function (_a) {
|
|
|
1903
1939
|
});
|
|
1904
1940
|
var SelectedMenuFiltersList = function (props) {
|
|
1905
1941
|
var filters = props.filters, onChipClick = props.onChipClick;
|
|
1906
|
-
var classes = useStyles();
|
|
1942
|
+
var classes = useStyles$2();
|
|
1907
1943
|
return (React__default['default'].createElement(React__default['default'].Fragment, null, filters.map(function (filter, index) { return (React__default['default'].createElement(core.Chip, { key: filter.name + "-" + index, classes: classes, deleteIcon: React__default['default'].createElement(SvgXCircle, null), onDelete: function (event) { return onChipClick(filter, event); }, label: React__default['default'].createElement(React__default['default'].Fragment, null,
|
|
1908
1944
|
React__default['default'].createElement(ItemTag, { alt: filter.abbr, color: filter.color }, filter.abbr),
|
|
1909
1945
|
React__default['default'].createElement(core.Typography, { variant: "caption" }, filter.name)) })); })));
|
|
1910
1946
|
};
|
|
1911
1947
|
|
|
1948
|
+
var MenuSectionGroup = React.forwardRef(function (props, ref) {
|
|
1949
|
+
var children = props.children, restProps = __rest$1(props, ["children"]);
|
|
1950
|
+
return (React__default['default'].createElement(core.Box, __assign$1({ display: "flex", flexDirection: "column", gridGap: 40, marginBottom: 4 }, restProps, { ref: ref }, { "data-component-type": "menu-section-group" }), children));
|
|
1951
|
+
});
|
|
1952
|
+
MenuSectionGroup.displayName = 'MenuSectionGroup';
|
|
1953
|
+
|
|
1954
|
+
var useStyles$1 = core.makeStyles(function () { return ({
|
|
1955
|
+
title: {
|
|
1956
|
+
fontWeight: 400,
|
|
1957
|
+
fontSize: 20,
|
|
1958
|
+
lineHeight: '30px',
|
|
1959
|
+
},
|
|
1960
|
+
}); });
|
|
1961
|
+
|
|
1962
|
+
var MenuSection = React.forwardRef(function (props, ref) {
|
|
1963
|
+
var name = props.name, children = props.children, restProps = __rest$1(props, ["name", "children"]);
|
|
1964
|
+
var classes = useStyles$1();
|
|
1965
|
+
return (React__default['default'].createElement(core.Box, __assign$1({}, restProps, { ref: ref }, { "data-component-type": "menu-section" }),
|
|
1966
|
+
React__default['default'].createElement(core.Box, { marginTop: 1, marginBottom: 4 },
|
|
1967
|
+
React__default['default'].createElement(core.Typography, { className: classes.title }, name)),
|
|
1968
|
+
children));
|
|
1969
|
+
});
|
|
1970
|
+
MenuSection.displayName = 'MenuSection';
|
|
1971
|
+
|
|
1972
|
+
var useStyles = core.makeStyles(function () { return ({
|
|
1973
|
+
main: {
|
|
1974
|
+
display: 'grid',
|
|
1975
|
+
// tune so that 2x columns hit at the md breakpoint
|
|
1976
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(280px, 1fr))',
|
|
1977
|
+
gridGap: 32,
|
|
1978
|
+
},
|
|
1979
|
+
}); });
|
|
1980
|
+
|
|
1981
|
+
var MenuItemGroup = React.forwardRef(function (props, ref) {
|
|
1982
|
+
var classes = useStyles();
|
|
1983
|
+
return (React__default['default'].createElement(core.Box, __assign$1({ className: classes.main }, { ref: ref }, { "data-component-type": "menu-item-group" }), props.children));
|
|
1984
|
+
});
|
|
1985
|
+
MenuItemGroup.displayName = 'MenuItemGroup';
|
|
1986
|
+
|
|
1912
1987
|
var palette = {
|
|
1913
1988
|
primary: {
|
|
1914
1989
|
light: '#7B7FA3',
|
|
@@ -2024,7 +2099,6 @@ var orderingTheme = {
|
|
|
2024
2099
|
};
|
|
2025
2100
|
|
|
2026
2101
|
exports.Button = Button$1;
|
|
2027
|
-
exports.DishCard = DishCard;
|
|
2028
2102
|
exports.DishCheckoutCard = DishCheckoutCard;
|
|
2029
2103
|
exports.DishDetailsReview = DishDetailsReview;
|
|
2030
2104
|
exports.DishModifierCard = DishModifierCard;
|
|
@@ -2033,6 +2107,10 @@ exports.ItemTagGroup = ItemTagGroup;
|
|
|
2033
2107
|
exports.LocationCard = LocationCard;
|
|
2034
2108
|
exports.MenuDropdown = MenuDropdown;
|
|
2035
2109
|
exports.MenuFilter = MenuFilter;
|
|
2110
|
+
exports.MenuItem = MenuItem;
|
|
2111
|
+
exports.MenuItemGroup = MenuItemGroup;
|
|
2112
|
+
exports.MenuSection = MenuSection;
|
|
2113
|
+
exports.MenuSectionGroup = MenuSectionGroup;
|
|
2036
2114
|
exports.QuantityPicker = QuantityPicker;
|
|
2037
2115
|
exports.ReactionCounter = ReactionCounter;
|
|
2038
2116
|
exports.ReactionCounterGroup = ReactionCounterGroup;
|