@popmenu/ordering-ui 0.151.1 → 0.153.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/cjs/components/Button/Button.d.ts +1 -1
- package/build/cjs/components/DialogSection/DialogSection.d.ts +2 -2
- package/build/cjs/components/DialogTitle/DialogTitle.d.ts +2 -2
- package/build/cjs/components/DishCheckoutCard/DishCheckoutCard.d.ts +1 -2
- package/build/cjs/components/DishModifierCard/DishModifierCard.d.ts +1 -2
- package/build/cjs/components/DishModifierCard/ModifierControls.d.ts +1 -2
- package/build/cjs/components/DishModifierCard/ModifierForm.d.ts +2 -3
- package/build/cjs/components/ExpandableModifierGroup/ExpandableModifierGroup.d.ts +5 -0
- package/build/cjs/components/ExpandableModifierGroup/ExpandableModifierGroup.styles.d.ts +1 -0
- package/build/cjs/components/ExpandableModifierGroup/ExpandableModifierGroupProps.d.ts +11 -0
- package/build/cjs/components/ExpandableModifierGroup/index.d.ts +2 -0
- package/build/cjs/components/ItemTagGroup/ItemTagGroup.d.ts +2 -2
- package/build/cjs/components/LocationCard/LocationCard.d.ts +1 -2
- package/build/cjs/components/MenuBanner/MenuBanner.d.ts +1 -2
- package/build/cjs/components/MenuBanner/MenuBannerIcons.d.ts +3 -4
- package/build/cjs/components/MenuItemCard/MenuItemCardImg.d.ts +1 -2
- package/build/cjs/components/MenuItemCard/MenuItemCardInfo.d.ts +1 -1
- package/build/cjs/components/MenuItemCard/MenuItemCardPrice.d.ts +1 -2
- package/build/cjs/components/MenuItemCard/MenuItemCardReactions.d.ts +1 -2
- package/build/cjs/components/MenuItemCard/MenuItemCardTags.d.ts +1 -2
- package/build/cjs/components/MenuItemModifiersList/MenuItemModifiersList.d.ts +1 -2
- package/build/cjs/components/MenuItemModifiersList/ModifierGroup.d.ts +1 -2
- package/build/cjs/components/MenuTab/MenuTab.d.ts +1 -2
- package/build/cjs/components/MenuTabGroup/MenuTabGroup.d.ts +1 -2
- package/build/cjs/components/NestedModsV2DishModifierCard/DishModifierCard.styles.d.ts +5 -0
- package/build/cjs/components/NestedModsV2DishModifierCard/DishModifierCardProps.d.ts +79 -0
- package/build/cjs/components/NestedModsV2DishModifierCard/ModifierControls.d.ts +2 -0
- package/build/cjs/components/NestedModsV2DishModifierCard/NestedModsV2DishModifierCard.d.ts +5 -0
- package/build/cjs/components/NestedModsV2DishModifierCard/index.d.ts +2 -0
- package/build/cjs/components/OrderingAppContext/OrderingAppContext.d.ts +1 -1
- package/build/cjs/components/PageSection/PageSection.d.ts +1 -1
- package/build/cjs/components/ReactionCounter/ReactionCounter.d.ts +1 -2
- package/build/cjs/components/ReactionCounterGroup/ReactionCounterGroup.d.ts +2 -2
- package/build/cjs/components/SelectableChip/SelectableChip.d.ts +1 -2
- package/build/cjs/components/SelectableChipGroup/SelectableChipGroup.d.ts +1 -1
- package/build/cjs/components/SelectedMenuFiltersList/SelectedMenuFiltersList.d.ts +1 -2
- package/build/cjs/components/StatusTag/StatusTag.d.ts +1 -2
- package/build/cjs/components/index.d.ts +4 -0
- package/build/cjs/index.js +455 -28
- package/build/cjs/index.js.map +1 -1
- package/build/esm/components/Button/Button.d.ts +1 -1
- package/build/esm/components/DialogSection/DialogSection.d.ts +2 -2
- package/build/esm/components/DialogTitle/DialogTitle.d.ts +2 -2
- package/build/esm/components/DishCheckoutCard/DishCheckoutCard.d.ts +1 -2
- package/build/esm/components/DishModifierCard/DishModifierCard.d.ts +1 -2
- package/build/esm/components/DishModifierCard/ModifierControls.d.ts +1 -2
- package/build/esm/components/DishModifierCard/ModifierForm.d.ts +2 -3
- package/build/esm/components/ExpandableModifierGroup/ExpandableModifierGroup.d.ts +5 -0
- package/build/esm/components/ExpandableModifierGroup/ExpandableModifierGroup.js +23 -0
- package/build/esm/components/ExpandableModifierGroup/ExpandableModifierGroup.js.map +1 -0
- package/build/esm/components/ExpandableModifierGroup/ExpandableModifierGroup.styles.d.ts +1 -0
- package/build/esm/components/ExpandableModifierGroup/ExpandableModifierGroup.styles.js +57 -0
- package/build/esm/components/ExpandableModifierGroup/ExpandableModifierGroup.styles.js.map +1 -0
- package/build/esm/components/ExpandableModifierGroup/ExpandableModifierGroupProps.d.ts +11 -0
- package/build/esm/components/ExpandableModifierGroup/index.d.ts +2 -0
- package/build/esm/components/ItemTagGroup/ItemTagGroup.d.ts +2 -2
- package/build/esm/components/LocationCard/LocationCard.d.ts +1 -2
- package/build/esm/components/MenuBanner/MenuBanner.d.ts +1 -2
- package/build/esm/components/MenuBanner/MenuBannerIcons.d.ts +3 -4
- package/build/esm/components/MenuItemCard/MenuItemCardImg.d.ts +1 -2
- package/build/esm/components/MenuItemCard/MenuItemCardInfo.d.ts +1 -1
- package/build/esm/components/MenuItemCard/MenuItemCardPrice.d.ts +1 -2
- package/build/esm/components/MenuItemCard/MenuItemCardReactions.d.ts +1 -2
- package/build/esm/components/MenuItemCard/MenuItemCardTags.d.ts +1 -2
- package/build/esm/components/MenuItemModifiersList/MenuItemModifiersList.d.ts +1 -2
- package/build/esm/components/MenuItemModifiersList/ModifierGroup.d.ts +1 -2
- package/build/esm/components/MenuTab/MenuTab.d.ts +1 -2
- package/build/esm/components/MenuTabGroup/MenuTabGroup.d.ts +1 -2
- package/build/esm/components/NestedModsV2DishModifierCard/DishModifierCard.styles.d.ts +5 -0
- package/build/esm/components/NestedModsV2DishModifierCard/DishModifierCard.styles.js +165 -0
- package/build/esm/components/NestedModsV2DishModifierCard/DishModifierCard.styles.js.map +1 -0
- package/build/esm/components/NestedModsV2DishModifierCard/DishModifierCardProps.d.ts +79 -0
- package/build/esm/components/NestedModsV2DishModifierCard/ModifierControls.d.ts +2 -0
- package/build/esm/components/NestedModsV2DishModifierCard/ModifierControls.js +171 -0
- package/build/esm/components/NestedModsV2DishModifierCard/ModifierControls.js.map +1 -0
- package/build/esm/components/NestedModsV2DishModifierCard/NestedModsV2DishModifierCard.d.ts +5 -0
- package/build/esm/components/NestedModsV2DishModifierCard/NestedModsV2DishModifierCard.js +47 -0
- package/build/esm/components/NestedModsV2DishModifierCard/NestedModsV2DishModifierCard.js.map +1 -0
- package/build/esm/components/NestedModsV2DishModifierCard/index.d.ts +2 -0
- package/build/esm/components/OrderingAppContext/OrderingAppContext.d.ts +1 -1
- package/build/esm/components/PageSection/PageSection.d.ts +1 -1
- package/build/esm/components/ReactionCounter/ReactionCounter.d.ts +1 -2
- package/build/esm/components/ReactionCounterGroup/ReactionCounterGroup.d.ts +2 -2
- package/build/esm/components/SelectableChip/SelectableChip.d.ts +1 -2
- package/build/esm/components/SelectableChipGroup/SelectableChipGroup.d.ts +1 -1
- package/build/esm/components/SelectedMenuFiltersList/SelectedMenuFiltersList.d.ts +1 -2
- package/build/esm/components/StatusTag/StatusTag.d.ts +1 -2
- package/build/esm/components/index.d.ts +4 -0
- package/build/esm/index.js +2 -0
- package/build/esm/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonProps } from './ButtonProps';
|
|
3
|
-
export declare const Button: React.ForwardRefExoticComponent<
|
|
3
|
+
export declare const Button: React.ForwardRefExoticComponent<Pick<ButtonProps, "className" | "style" | "classes" | "innerRef" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "form" | "key" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "disableElevation" | "fullWidth" | "startIcon" | "endIcon" | "variation" | "disableFocusRipple" | "href" | "size" | "variant" | "action" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BoxProps } from '@material-ui/core';
|
|
2
|
-
import
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
3
|
interface DialogSectionProps extends BoxProps {
|
|
4
4
|
edgeToEdge?: boolean;
|
|
5
5
|
borderBottom?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare const DialogSection: (props: PropsWithChildren<DialogSectionProps>) =>
|
|
7
|
+
export declare const DialogSection: (props: PropsWithChildren<DialogSectionProps>) => JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
interface DialogTitleProps {
|
|
3
3
|
title: string;
|
|
4
4
|
titleId: string;
|
|
5
5
|
Icon?: ReactNode;
|
|
6
6
|
onClose?: () => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const DialogTitle: (props: DialogTitleProps) =>
|
|
8
|
+
export declare const DialogTitle: (props: DialogTitleProps) => JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { DishCheckoutCardProps } from './DishCheckoutCardProps';
|
|
3
|
-
export declare const DishCheckoutCard: ({ id, borderBottom, name, quantity, modifierGroups, onDelete, onEdit, onQuantityChange, price, specialInstructions, disabled, warningMessage, warningMessageLevel, image, messages, maxQuantity, minQuantity, }: DishCheckoutCardProps) =>
|
|
2
|
+
export declare const DishCheckoutCard: ({ id, borderBottom, name, quantity, modifierGroups, onDelete, onEdit, onQuantityChange, price, specialInstructions, disabled, warningMessage, warningMessageLevel, image, messages, maxQuantity, minQuantity, }: DishCheckoutCardProps) => JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ModifierOptionsControlProps } from './DishModifierCardProps';
|
|
3
|
-
export declare const ModifierControls: (props: ModifierOptionsControlProps) =>
|
|
2
|
+
export declare const ModifierControls: (props: ModifierOptionsControlProps) => JSX.Element | null;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { CheckboxModifierFormProps, RadioModifierFormProps } from './DishModifierCardProps';
|
|
3
|
-
export declare const CheckboxGroup: (props: CheckboxModifierFormProps) =>
|
|
4
|
-
export declare const RadioGroup: (props: RadioModifierFormProps) =>
|
|
2
|
+
export declare const CheckboxGroup: (props: CheckboxModifierFormProps) => JSX.Element;
|
|
3
|
+
export declare const RadioGroup: (props: RadioModifierFormProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useExpandableModifierGroupStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ExpandableModifierGroupProps {
|
|
3
|
+
/** The name of the modifier group, displayed as an uppercase header */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Content to render inside the expanded body */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/** Whether the group starts expanded. Defaults to true */
|
|
8
|
+
defaultExpanded?: boolean;
|
|
9
|
+
/** Summary of currently selected options, shown below the header when collapsed */
|
|
10
|
+
selectedSummary?: string;
|
|
11
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const ItemTagGroup: (props: PropsWithChildren<HTMLAttributes<HTMLElement>>) =>
|
|
1
|
+
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
+
export declare const ItemTagGroup: (props: PropsWithChildren<HTMLAttributes<HTMLElement>>) => JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { MenuItemCardProps } from './MenuItemCardProps';
|
|
3
|
-
export declare const MenuItemCardImg: (props: Pick<MenuItemCardProps, "image">) =>
|
|
2
|
+
export declare const MenuItemCardImg: (props: Pick<MenuItemCardProps, "image">) => JSX.Element | null;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { MenuItemCardProps } from './MenuItemCardProps';
|
|
3
|
-
export declare const MenuItemCardPrice: (props: Pick<MenuItemCardProps, "price" | "available">) =>
|
|
2
|
+
export declare const MenuItemCardPrice: (props: Pick<MenuItemCardProps, "price" | "available">) => JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { MenuItemCardProps } from './MenuItemCardProps';
|
|
3
|
-
export declare const MenuItemCardReactions: (props: Pick<MenuItemCardProps, "likeCount" | "reviewCount">) =>
|
|
2
|
+
export declare const MenuItemCardReactions: (props: Pick<MenuItemCardProps, "likeCount" | "reviewCount">) => JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { MenuItemCardProps } from './MenuItemCardProps';
|
|
3
|
-
export declare const MenuItemCardTags: (props: Pick<MenuItemCardProps, "itemTags">) =>
|
|
2
|
+
export declare const MenuItemCardTags: (props: Pick<MenuItemCardProps, "itemTags">) => JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ModifierGroupsType } from '../DishCheckoutCard/DishCheckoutCardProps';
|
|
3
2
|
export declare const MenuItemModifiersList: ({ modifierGroups, specialInstructions, }: {
|
|
4
3
|
modifierGroups: ModifierGroupsType[];
|
|
5
4
|
specialInstructions: string | null;
|
|
6
|
-
}) =>
|
|
5
|
+
}) => JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ModifierGroupsType } from '../DishCheckoutCard/DishCheckoutCardProps';
|
|
3
|
-
export declare const ModifierGroup: (group: ModifierGroupsType, isNested: boolean) =>
|
|
2
|
+
export declare const ModifierGroup: (group: ModifierGroupsType, isNested: boolean) => JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const useDishModifierCardStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<string>;
|
|
2
|
+
export declare const useRadioModifierFormStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<string>;
|
|
3
|
+
export declare const useCheckboxModifierFormStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<string>;
|
|
4
|
+
export declare const useLabelStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<string>;
|
|
5
|
+
export declare const useOptionsStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<string>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export type ModifierValue = {
|
|
2
|
+
groupId: number;
|
|
3
|
+
modifierId: number;
|
|
4
|
+
parentModifierId?: number | null;
|
|
5
|
+
price: number;
|
|
6
|
+
quantity: number;
|
|
7
|
+
isRadio?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type Modifier = {
|
|
10
|
+
id: number;
|
|
11
|
+
hasModifiers: boolean;
|
|
12
|
+
name: string;
|
|
13
|
+
outOfStock: boolean;
|
|
14
|
+
price: number;
|
|
15
|
+
formattedPrice: string;
|
|
16
|
+
hidePrice?: boolean;
|
|
17
|
+
quantity: number;
|
|
18
|
+
parentModifierGroupId: number;
|
|
19
|
+
parentModifierGroupItemId?: number | null;
|
|
20
|
+
};
|
|
21
|
+
export type OnChangeValueType = ModifierValue;
|
|
22
|
+
export type ModifierControlsOptions = {
|
|
23
|
+
/** Applies selected modifier visual treatment used by nested mods V2 */
|
|
24
|
+
enableSelectedModifierStyles?: boolean;
|
|
25
|
+
/** Changes the action label to UPDATE when a modifier is selected */
|
|
26
|
+
showUpdateButton?: boolean;
|
|
27
|
+
/** Optional selected modifier summary text shown below selected modifier names */
|
|
28
|
+
selectedNestedSummaryByModifierId?: Record<number, string>;
|
|
29
|
+
/**
|
|
30
|
+
* Suppresses the inline OPTIONS / UPDATE action on every modifier row,
|
|
31
|
+
* regardless of selection state, AND prevents the built-in auto-trigger
|
|
32
|
+
* of `handleOptionsClick` when a modifier with `hasModifiers: true` is
|
|
33
|
+
* selected.
|
|
34
|
+
*/
|
|
35
|
+
hideNestedOptionsButton?: boolean;
|
|
36
|
+
};
|
|
37
|
+
export type NestedModsV2DishModifierCardProps = {
|
|
38
|
+
/** Aggregate price of the modifier and its nested children modifiers */
|
|
39
|
+
aggregatePrice: Record<number, string>;
|
|
40
|
+
/** Modifier options */
|
|
41
|
+
modifiers: Array<Modifier>;
|
|
42
|
+
/** The values of the modifier form */
|
|
43
|
+
value: Array<ModifierValue>;
|
|
44
|
+
/** Handles the change event */
|
|
45
|
+
onChange: (value: OnChangeValueType) => void;
|
|
46
|
+
/** Name of the modifier */
|
|
47
|
+
name: string;
|
|
48
|
+
/** Denotes the max amount of selections have been reached */
|
|
49
|
+
disableNewSelections?: boolean;
|
|
50
|
+
/** Denotes if modifier has an error */
|
|
51
|
+
error: boolean;
|
|
52
|
+
/** Denotes if modifier is required */
|
|
53
|
+
isRequired: boolean;
|
|
54
|
+
/** Denotes if modifier is out of stock */
|
|
55
|
+
isOutOfStock: boolean;
|
|
56
|
+
/** Selection type for modifier group */
|
|
57
|
+
type: 'singleSelect' | 'multipleSelect' | 'multipleQuantitySelect';
|
|
58
|
+
/** Renders the text of the dish modifiers */
|
|
59
|
+
messages: {
|
|
60
|
+
optionalText: string;
|
|
61
|
+
outOfStockText: string;
|
|
62
|
+
requiredText: string;
|
|
63
|
+
helperText: string;
|
|
64
|
+
};
|
|
65
|
+
/** Handles the dialog change for nested modifiers */
|
|
66
|
+
handleOptionsClick: (id: number) => void;
|
|
67
|
+
/** Used by parent modifier quantity tracking: parent modifier quantity denotes requiredSelectionCount and currentSelectionCount is the total quantity of the child modifier */
|
|
68
|
+
selectionQuantity: Record<number, {
|
|
69
|
+
requiredSelectionCount: number;
|
|
70
|
+
currentSelectionCount: number;
|
|
71
|
+
}>;
|
|
72
|
+
/** Optional feature-gated options for nested modifier controls */
|
|
73
|
+
modifierControlsOptions?: ModifierControlsOptions;
|
|
74
|
+
/** Removes the card border and border-radius, for use inside a container that provides its own card styling */
|
|
75
|
+
disableCardStyle?: boolean;
|
|
76
|
+
/** Hides the group name heading, useful when the name is already shown by a parent container */
|
|
77
|
+
hideName?: boolean;
|
|
78
|
+
};
|
|
79
|
+
export type ModifierOptionsControlProps = Pick<NestedModsV2DishModifierCardProps, 'value' | 'modifiers' | 'isOutOfStock' | 'isRequired' | 'onChange' | 'disableNewSelections' | 'type' | 'messages' | 'handleOptionsClick' | 'aggregatePrice' | 'selectionQuantity' | 'name' | 'modifierControlsOptions'>;
|
|
@@ -14,5 +14,5 @@ export declare const useOrderingAppContext: () => OrderingAppContextType;
|
|
|
14
14
|
type OrderingAppContextProviderProps = PropsWithChildren<{
|
|
15
15
|
defaultContext: OrderingAppContextValue;
|
|
16
16
|
}>;
|
|
17
|
-
export declare const OrderingAppContextProvider: (props: OrderingAppContextProviderProps) =>
|
|
17
|
+
export declare const OrderingAppContextProvider: (props: OrderingAppContextProviderProps) => JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
2
|
type ReactionCounterGroupProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
|
|
3
|
-
export declare const ReactionCounterGroup: (props: ReactionCounterGroupProps) =>
|
|
3
|
+
export declare const ReactionCounterGroup: (props: ReactionCounterGroupProps) => JSX.Element;
|
|
4
4
|
export {};
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
type SelectableChipGroupProps = {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
} & React.HTMLAttributes<HTMLElement>;
|
|
5
|
-
export declare const SelectableChipGroup: (props: SelectableChipGroupProps) =>
|
|
5
|
+
export declare const SelectableChipGroup: (props: SelectableChipGroupProps) => JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { SelectedMenuFiltersListProps } from './SelectedMenuFiltersListProps';
|
|
3
|
-
export declare const SelectedMenuFiltersList: (props: SelectedMenuFiltersListProps) =>
|
|
2
|
+
export declare const SelectedMenuFiltersList: (props: SelectedMenuFiltersListProps) => JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { StatusTagProps } from './StatusTagProps';
|
|
3
2
|
export declare const StatusTag: {
|
|
4
|
-
({ color, label, size, variant }: StatusTagProps):
|
|
3
|
+
({ color, label, size, variant }: StatusTagProps): JSX.Element;
|
|
5
4
|
displayName: string;
|
|
6
5
|
};
|
|
@@ -48,3 +48,7 @@ export { Checkbox } from './Checkbox';
|
|
|
48
48
|
export { Radio } from './Radio';
|
|
49
49
|
export { MenuBanner } from './MenuBanner';
|
|
50
50
|
export type { MenuBannerProps } from './MenuBanner';
|
|
51
|
+
export { ExpandableModifierGroup } from './ExpandableModifierGroup';
|
|
52
|
+
export type { ExpandableModifierGroupProps } from './ExpandableModifierGroup';
|
|
53
|
+
export { NestedModsV2DishModifierCard } from './NestedModsV2DishModifierCard';
|
|
54
|
+
export type { NestedModsV2DishModifierCardProps } from './NestedModsV2DishModifierCard';
|