@popmenu/ordering-ui 0.121.2 → 0.122.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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export interface DishCheckoutCardProps {
|
|
2
2
|
/** Adds a border to the bottom of the card */
|
|
3
3
|
borderBottom?: boolean;
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
/** disables all interactive elements in the card, like "edit" or "delete" */
|
|
5
|
+
disabled?: boolean;
|
|
6
6
|
/** Id of the dish */
|
|
7
7
|
id: number;
|
|
8
8
|
/** Dish image information */
|
|
@@ -10,20 +10,22 @@ export interface DishCheckoutCardProps {
|
|
|
10
10
|
alt?: string;
|
|
11
11
|
src?: string | null;
|
|
12
12
|
};
|
|
13
|
-
/**
|
|
14
|
-
|
|
13
|
+
/** Edit and remove button text and aria-label */
|
|
14
|
+
messages: Record<'edit' | 'ariaEdit' | 'ariaDelete', string>;
|
|
15
|
+
/** Modifier group object of the dish */
|
|
16
|
+
modifierGroups?: ModifierGroupsType[];
|
|
15
17
|
/** Name of the dish */
|
|
16
18
|
name: string;
|
|
17
|
-
/** Quantity of dish selected */
|
|
18
|
-
quantity: number;
|
|
19
|
-
/** Price of an item. numbers will be prepended with the currencySymbol from OrderingAppContext. */
|
|
20
|
-
price: number | string;
|
|
21
19
|
/** Callback for edit button */
|
|
22
20
|
onEdit: () => void;
|
|
23
21
|
/** Callback for delete button */
|
|
24
22
|
onDelete: () => void;
|
|
25
23
|
/** Callback for change of select element */
|
|
26
24
|
onQuantityChange: (id: number, value: number) => void;
|
|
25
|
+
/** Price of an item. numbers will be prepended with the currencySymbol from OrderingAppContext. */
|
|
26
|
+
price: number | string;
|
|
27
|
+
/** Quantity of dish selected */
|
|
28
|
+
quantity: number;
|
|
27
29
|
/** Special instructions text */
|
|
28
30
|
specialInstructions?: string | null;
|
|
29
31
|
/** If item is in cart but is not unavailable */
|
package/build/index.es.js
CHANGED
|
@@ -1621,7 +1621,7 @@ var OrderingAppContextProvider = function (props) {
|
|
|
1621
1621
|
|
|
1622
1622
|
var DishCheckoutCard = function (props) {
|
|
1623
1623
|
var _a;
|
|
1624
|
-
var id = props.id, name = props.name, quantity = props.quantity, modifierGroups = props.modifierGroups, onDelete = props.onDelete, onEdit = props.onEdit, onQuantityChange = props.onQuantityChange, price = props.price, specialInstructions = props.specialInstructions, disabled = props.disabled, warningMessage = props.warningMessage, _b = props.image, image = _b === void 0 ? {} : _b;
|
|
1624
|
+
var id = props.id, name = props.name, quantity = props.quantity, modifierGroups = props.modifierGroups, onDelete = props.onDelete, onEdit = props.onEdit, onQuantityChange = props.onQuantityChange, price = props.price, specialInstructions = props.specialInstructions, disabled = props.disabled, warningMessage = props.warningMessage, _b = props.image, image = _b === void 0 ? {} : _b, messages = props.messages;
|
|
1625
1625
|
var src = image.src, alt = image.alt;
|
|
1626
1626
|
var classes = useDishCheckoutCardStyles(props);
|
|
1627
1627
|
var appContext = useOrderingAppContext()[0];
|
|
@@ -1677,8 +1677,8 @@ var DishCheckoutCard = function (props) {
|
|
|
1677
1677
|
specialInstructions,
|
|
1678
1678
|
"\"")),
|
|
1679
1679
|
React__default.createElement(Box, { display: "flex", gridGap: 1, height: "100%", alignItems: "center" },
|
|
1680
|
-
React__default.createElement(Button, { disabled: disabled, className: classes.editButton, variant: "text", onClick: onEdit },
|
|
1681
|
-
React__default.createElement(IconButton, { disabled: disabled, onClick: onDelete, classes: { root: classes.deleteButton } },
|
|
1680
|
+
React__default.createElement(Button, { "aria-label": messages.ariaEdit, disabled: disabled, className: classes.editButton, variant: "text", onClick: onEdit }, messages.edit),
|
|
1681
|
+
React__default.createElement(IconButton, { "aria-label": messages.ariaDelete, disabled: disabled, onClick: onDelete, classes: { root: classes.deleteButton } },
|
|
1682
1682
|
React__default.createElement(Icon, { icon: SvgTrash, size: "large" })))),
|
|
1683
1683
|
React__default.createElement(Box, { display: "flex", gridGap: 16, alignItems: "center" },
|
|
1684
1684
|
React__default.createElement(FormControl, { variant: "outlined", hiddenLabel: true },
|
package/build/index.js
CHANGED
|
@@ -1658,7 +1658,7 @@ var OrderingAppContextProvider = function (props) {
|
|
|
1658
1658
|
|
|
1659
1659
|
var DishCheckoutCard = function (props) {
|
|
1660
1660
|
var _a;
|
|
1661
|
-
var id = props.id, name = props.name, quantity = props.quantity, modifierGroups = props.modifierGroups, onDelete = props.onDelete, onEdit = props.onEdit, onQuantityChange = props.onQuantityChange, price = props.price, specialInstructions = props.specialInstructions, disabled = props.disabled, warningMessage = props.warningMessage, _b = props.image, image = _b === void 0 ? {} : _b;
|
|
1661
|
+
var id = props.id, name = props.name, quantity = props.quantity, modifierGroups = props.modifierGroups, onDelete = props.onDelete, onEdit = props.onEdit, onQuantityChange = props.onQuantityChange, price = props.price, specialInstructions = props.specialInstructions, disabled = props.disabled, warningMessage = props.warningMessage, _b = props.image, image = _b === void 0 ? {} : _b, messages = props.messages;
|
|
1662
1662
|
var src = image.src, alt = image.alt;
|
|
1663
1663
|
var classes = useDishCheckoutCardStyles(props);
|
|
1664
1664
|
var appContext = useOrderingAppContext()[0];
|
|
@@ -1714,8 +1714,8 @@ var DishCheckoutCard = function (props) {
|
|
|
1714
1714
|
specialInstructions,
|
|
1715
1715
|
"\"")),
|
|
1716
1716
|
React__default['default'].createElement(core.Box, { display: "flex", gridGap: 1, height: "100%", alignItems: "center" },
|
|
1717
|
-
React__default['default'].createElement(Button, { disabled: disabled, className: classes.editButton, variant: "text", onClick: onEdit },
|
|
1718
|
-
React__default['default'].createElement(IconButton, { disabled: disabled, onClick: onDelete, classes: { root: classes.deleteButton } },
|
|
1717
|
+
React__default['default'].createElement(Button, { "aria-label": messages.ariaEdit, disabled: disabled, className: classes.editButton, variant: "text", onClick: onEdit }, messages.edit),
|
|
1718
|
+
React__default['default'].createElement(IconButton, { "aria-label": messages.ariaDelete, disabled: disabled, onClick: onDelete, classes: { root: classes.deleteButton } },
|
|
1719
1719
|
React__default['default'].createElement(Icon, { icon: SvgTrash, size: "large" })))),
|
|
1720
1720
|
React__default['default'].createElement(core.Box, { display: "flex", gridGap: 16, alignItems: "center" },
|
|
1721
1721
|
React__default['default'].createElement(core.FormControl, { variant: "outlined", hiddenLabel: true },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@popmenu/ordering-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.122.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Popmenu Design System Team",
|
|
6
6
|
"description": "React components specifically for the popmenu Online Ordering web app.",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"acorn-jsx": "^5.3.2"
|
|
33
33
|
},
|
|
34
34
|
"sideEffects": false,
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "e31f20645c1abd4ce3ab06c30fcb4d49fd23f99f"
|
|
36
36
|
}
|