@popmenu/ordering-ui 0.126.0 → 0.126.1
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/esm/_virtual/index.js +4 -0
- package/build/esm/_virtual/index.js.map +1 -0
- package/build/esm/assets/leaf-icon.svg.js +20 -0
- package/build/esm/assets/leaf-icon.svg.js.map +1 -0
- package/build/{components → esm/components}/Button/Button.d.ts +3 -3
- package/build/esm/components/Button/Button.js +23 -0
- package/build/esm/components/Button/Button.js.map +1 -0
- package/build/{components → esm/components}/Button/ButtonProps.d.ts +5 -5
- package/build/{components → esm/components}/Button/index.d.ts +2 -2
- package/build/esm/components/Checkbox/Checkbox.d.ts +2 -0
- package/build/esm/components/Checkbox/Checkbox.js +16 -0
- package/build/esm/components/Checkbox/Checkbox.js.map +1 -0
- package/build/{components → esm/components}/Checkbox/index.d.ts +1 -1
- package/build/{components → esm/components}/DialogSection/DialogSection.d.ts +8 -8
- package/build/esm/components/DialogSection/DialogSection.js +11 -0
- package/build/esm/components/DialogSection/DialogSection.js.map +1 -0
- package/build/{components → esm/components}/DialogSection/index.d.ts +1 -1
- package/build/{components → esm/components}/DialogTitle/DialogTitle.d.ts +9 -9
- package/build/esm/components/DialogTitle/DialogTitle.js +22 -0
- package/build/esm/components/DialogTitle/DialogTitle.js.map +1 -0
- package/build/{components → esm/components}/DialogTitle/index.d.ts +1 -1
- package/build/{components → esm/components}/DishCheckoutCard/DishCheckoutCard.d.ts +3 -3
- package/build/esm/components/DishCheckoutCard/DishCheckoutCard.js +94 -0
- package/build/esm/components/DishCheckoutCard/DishCheckoutCard.js.map +1 -0
- package/build/{components → esm/components}/DishCheckoutCard/DishCheckoutCard.styles.d.ts +2 -2
- package/build/esm/components/DishCheckoutCard/DishCheckoutCard.styles.js +85 -0
- package/build/esm/components/DishCheckoutCard/DishCheckoutCard.styles.js.map +1 -0
- package/build/{components → esm/components}/DishCheckoutCard/DishCheckoutCardProps.d.ts +44 -44
- package/build/{components → esm/components}/DishCheckoutCard/index.d.ts +2 -2
- package/build/{components → esm/components}/DishDetailsReview/DishDetailsReview.d.ts +3 -3
- package/build/esm/components/DishDetailsReview/DishDetailsReview.js +18 -0
- package/build/esm/components/DishDetailsReview/DishDetailsReview.js.map +1 -0
- package/build/{components → esm/components}/DishDetailsReview/DishDetailsReviewProps.d.ts +12 -12
- package/build/{components → esm/components}/DishDetailsReview/index.d.ts +2 -2
- package/build/{components → esm/components}/DishModifierCard/DishModifierCard.d.ts +6 -6
- package/build/esm/components/DishModifierCard/DishModifierCard.js +48 -0
- package/build/esm/components/DishModifierCard/DishModifierCard.js.map +1 -0
- package/build/{components → esm/components}/DishModifierCard/DishModifierCard.styles.d.ts +5 -5
- package/build/esm/components/DishModifierCard/DishModifierCard.styles.js +95 -0
- package/build/esm/components/DishModifierCard/DishModifierCard.styles.js.map +1 -0
- package/build/{components → esm/components}/DishModifierCard/DishModifierCardProps.d.ts +71 -71
- package/build/{components → esm/components}/DishModifierCard/ModifierControls.d.ts +3 -3
- package/build/esm/components/DishModifierCard/ModifierControls.js +135 -0
- package/build/esm/components/DishModifierCard/ModifierControls.js.map +1 -0
- package/build/{components → esm/components}/DishModifierCard/ModifierForm.d.ts +4 -4
- package/build/{components → esm/components}/DishModifierCard/index.d.ts +2 -2
- package/build/{components → esm/components}/ItemTag/ItemTag.d.ts +3 -3
- package/build/esm/components/ItemTag/ItemTag.js +15 -0
- package/build/esm/components/ItemTag/ItemTag.js.map +1 -0
- package/build/{components → esm/components}/ItemTag/ItemTagProps.d.ts +5 -5
- package/build/{components → esm/components}/ItemTag/index.d.ts +2 -2
- package/build/{components → esm/components}/ItemTag/itemTag.styles.d.ts +1 -1
- package/build/esm/components/ItemTag/itemTag.styles.js +20 -0
- package/build/esm/components/ItemTag/itemTag.styles.js.map +1 -0
- package/build/{components → esm/components}/ItemTagGroup/ItemTagGroup.d.ts +2 -2
- package/build/esm/components/ItemTagGroup/ItemTagGroup.js +10 -0
- package/build/esm/components/ItemTagGroup/ItemTagGroup.js.map +1 -0
- package/build/{components → esm/components}/ItemTagGroup/index.d.ts +1 -1
- package/build/{components → esm/components}/LocationCard/LocationCard.d.ts +3 -3
- package/build/esm/components/LocationCard/LocationCard.js +35 -0
- package/build/esm/components/LocationCard/LocationCard.js.map +1 -0
- package/build/{components → esm/components}/LocationCard/LocationCard.styles.d.ts +2 -2
- package/build/esm/components/LocationCard/LocationCard.styles.js +64 -0
- package/build/esm/components/LocationCard/LocationCard.styles.js.map +1 -0
- package/build/{components → esm/components}/LocationCard/LocationCardProps.d.ts +28 -28
- package/build/{components → esm/components}/LocationCard/index.d.ts +2 -2
- package/build/{components → esm/components}/MenuBanner/MenuBanner.d.ts +3 -3
- package/build/esm/components/MenuBanner/MenuBanner.js +34 -0
- package/build/esm/components/MenuBanner/MenuBanner.js.map +1 -0
- package/build/{components → esm/components}/MenuBanner/MenuBanner.styles.d.ts +2 -2
- package/build/esm/components/MenuBanner/MenuBanner.styles.js +49 -0
- package/build/esm/components/MenuBanner/MenuBanner.styles.js.map +1 -0
- package/build/{components → esm/components}/MenuBanner/MenuBannerIcons.d.ts +6 -6
- package/build/esm/components/MenuBanner/MenuBannerIcons.js +15 -0
- package/build/esm/components/MenuBanner/MenuBannerIcons.js.map +1 -0
- package/build/{components → esm/components}/MenuBanner/MenuBannerProps.d.ts +15 -15
- package/build/{components → esm/components}/MenuBanner/index.d.ts +2 -2
- package/build/{components → esm/components}/MenuDropdown/MenuDropdown.d.ts +3 -3
- package/build/esm/components/MenuDropdown/MenuDropdown.js +37 -0
- package/build/esm/components/MenuDropdown/MenuDropdown.js.map +1 -0
- package/build/{components → esm/components}/MenuDropdown/MenuDropdown.styles.d.ts +2 -2
- package/build/esm/components/MenuDropdown/MenuDropdown.styles.js +40 -0
- package/build/esm/components/MenuDropdown/MenuDropdown.styles.js.map +1 -0
- package/build/{components → esm/components}/MenuDropdown/MenuDropdownProps.d.ts +15 -15
- package/build/{components → esm/components}/MenuDropdown/index.d.ts +2 -2
- package/build/{components → esm/components}/MenuFilter/MenuFilter.d.ts +3 -3
- package/build/esm/components/MenuFilter/MenuFilter.js +46 -0
- package/build/esm/components/MenuFilter/MenuFilter.js.map +1 -0
- package/build/{components → esm/components}/MenuFilter/MenuFilter.styles.d.ts +1 -1
- package/build/esm/components/MenuFilter/MenuFilter.styles.js +11 -0
- package/build/esm/components/MenuFilter/MenuFilter.styles.js.map +1 -0
- package/build/{components → esm/components}/MenuFilter/MenuFilterProps.d.ts +23 -23
- package/build/{components → esm/components}/MenuFilter/index.d.ts +2 -2
- package/build/{components → esm/components}/MenuItem/MenuItem.d.ts +3 -3
- package/build/esm/components/MenuItem/MenuItem.js +40 -0
- package/build/esm/components/MenuItem/MenuItem.js.map +1 -0
- package/build/{components → esm/components}/MenuItem/MenuItem.styles.d.ts +1 -1
- package/build/esm/components/MenuItem/MenuItem.styles.js +67 -0
- package/build/esm/components/MenuItem/MenuItem.styles.js.map +1 -0
- package/build/{components → esm/components}/MenuItem/MenuItemImg.d.ts +3 -3
- package/build/esm/components/MenuItem/MenuItemImg.js +22 -0
- package/build/esm/components/MenuItem/MenuItemImg.js.map +1 -0
- package/build/{components → esm/components}/MenuItem/MenuItemInfo.d.ts +4 -4
- package/build/esm/components/MenuItem/MenuItemInfo.js +9 -0
- package/build/esm/components/MenuItem/MenuItemInfo.js.map +1 -0
- package/build/{components → esm/components}/MenuItem/MenuItemPrice.d.ts +3 -3
- package/build/esm/components/MenuItem/MenuItemPrice.js +28 -0
- package/build/esm/components/MenuItem/MenuItemPrice.js.map +1 -0
- package/build/{components → esm/components}/MenuItem/MenuItemProps.d.ts +41 -41
- package/build/{components → esm/components}/MenuItem/MenuItemReactions.d.ts +3 -3
- package/build/esm/components/MenuItem/MenuItemReactions.js +16 -0
- package/build/esm/components/MenuItem/MenuItemReactions.js.map +1 -0
- package/build/{components → esm/components}/MenuItem/MenuItemTags.d.ts +3 -3
- package/build/esm/components/MenuItem/MenuItemTags.js +11 -0
- package/build/esm/components/MenuItem/MenuItemTags.js.map +1 -0
- package/build/{components → esm/components}/MenuItem/index.d.ts +2 -2
- package/build/{components → esm/components}/MenuItemGroup/MenuItemGroup.d.ts +5 -5
- package/build/esm/components/MenuItemGroup/MenuItemGroup.js +15 -0
- package/build/esm/components/MenuItemGroup/MenuItemGroup.js.map +1 -0
- package/build/{components → esm/components}/MenuItemGroup/MenuItemGroupStyles.d.ts +1 -1
- package/build/esm/components/MenuItemGroup/MenuItemGroupStyles.js +21 -0
- package/build/esm/components/MenuItemGroup/MenuItemGroupStyles.js.map +1 -0
- package/build/{components → esm/components}/MenuItemGroup/index.d.ts +1 -1
- package/build/{components → esm/components}/MenuSection/MenuSection.d.ts +3 -3
- package/build/esm/components/MenuSection/MenuSection.js +18 -0
- package/build/esm/components/MenuSection/MenuSection.js.map +1 -0
- package/build/{components → esm/components}/MenuSection/MenuSectionProps.d.ts +9 -9
- package/build/{components → esm/components}/MenuSection/MenuSectionStyles.d.ts +1 -1
- package/build/esm/components/MenuSection/MenuSectionStyles.js +12 -0
- package/build/esm/components/MenuSection/MenuSectionStyles.js.map +1 -0
- package/build/{components → esm/components}/MenuSection/index.d.ts +2 -2
- package/build/{components → esm/components}/MenuSectionGroup/MenuSectionGroup.d.ts +5 -5
- package/build/esm/components/MenuSectionGroup/MenuSectionGroup.js +12 -0
- package/build/esm/components/MenuSectionGroup/MenuSectionGroup.js.map +1 -0
- package/build/{components → esm/components}/MenuSectionGroup/index.d.ts +1 -1
- package/build/{components → esm/components}/OrderingAppContext/OrderingAppContext.d.ts +18 -18
- package/build/esm/components/OrderingAppContext/OrderingAppContext.js +17 -0
- package/build/esm/components/OrderingAppContext/OrderingAppContext.js.map +1 -0
- package/build/{components → esm/components}/OrderingAppContext/index.d.ts +1 -1
- package/build/{components → esm/components}/PageSection/PageSection.d.ts +4 -4
- package/build/esm/components/PageSection/PageSection.js +7 -0
- package/build/esm/components/PageSection/PageSection.js.map +1 -0
- package/build/{components → esm/components}/PageSection/index.d.ts +1 -1
- package/build/{components → esm/components}/QuantityPicker/QuantityPicker.d.ts +3 -3
- package/build/esm/components/QuantityPicker/QuantityPicker.js +38 -0
- package/build/esm/components/QuantityPicker/QuantityPicker.js.map +1 -0
- package/build/{components → esm/components}/QuantityPicker/QuantityPicker.styles.d.ts +5 -5
- package/build/esm/components/QuantityPicker/QuantityPicker.styles.js +46 -0
- package/build/esm/components/QuantityPicker/QuantityPicker.styles.js.map +1 -0
- package/build/{components → esm/components}/QuantityPicker/QuantityPickerProps.d.ts +21 -21
- package/build/{components → esm/components}/QuantityPicker/index.d.ts +2 -2
- package/build/esm/components/Radio/Radio.d.ts +2 -0
- package/build/esm/components/Radio/Radio.js +16 -0
- package/build/esm/components/Radio/Radio.js.map +1 -0
- package/build/{components → esm/components}/Radio/index.d.ts +1 -1
- package/build/{components → esm/components}/ReactionCounter/ReactionCounter.d.ts +3 -3
- package/build/esm/components/ReactionCounter/ReactionCounter.js +12 -0
- package/build/esm/components/ReactionCounter/ReactionCounter.js.map +1 -0
- package/build/{components → esm/components}/ReactionCounter/ReactionCounterProps.d.ts +6 -6
- package/build/{components → esm/components}/ReactionCounter/index.d.ts +2 -2
- package/build/{components → esm/components}/ReactionCounterGroup/ReactionCounterGroup.d.ts +4 -4
- package/build/esm/components/ReactionCounterGroup/ReactionCounterGroup.js +10 -0
- package/build/esm/components/ReactionCounterGroup/ReactionCounterGroup.js.map +1 -0
- package/build/{components → esm/components}/ReactionCounterGroup/index.d.ts +1 -1
- package/build/{components → esm/components}/SelectableChip/SelectableChip.d.ts +3 -3
- package/build/esm/components/SelectableChip/SelectableChip.js +15 -0
- package/build/esm/components/SelectableChip/SelectableChip.js.map +1 -0
- package/build/{components → esm/components}/SelectableChip/SelectableChip.styles.d.ts +2 -2
- package/build/esm/components/SelectableChip/SelectableChip.styles.js +34 -0
- package/build/esm/components/SelectableChip/SelectableChip.styles.js.map +1 -0
- package/build/{components → esm/components}/SelectableChip/SelectableChipProps.d.ts +2 -2
- package/build/{components → esm/components}/SelectableChip/index.d.ts +2 -2
- package/build/{components → esm/components}/SelectableChipGroup/SelectableChipGroup.d.ts +3 -3
- package/build/esm/components/SelectableChipGroup/SelectableChipGroup.js +15 -0
- package/build/esm/components/SelectableChipGroup/SelectableChipGroup.js.map +1 -0
- package/build/{components → esm/components}/SelectableChipGroup/SelectableChipGroup.styles.d.ts +1 -1
- package/build/esm/components/SelectableChipGroup/SelectableChipGroup.styles.js +21 -0
- package/build/esm/components/SelectableChipGroup/SelectableChipGroup.styles.js.map +1 -0
- package/build/{components → esm/components}/SelectableChipGroup/SelectableChipGroupProps.d.ts +5 -5
- package/build/{components → esm/components}/SelectableChipGroup/index.d.ts +2 -2
- package/build/{components → esm/components}/SelectedMenuFiltersList/SelectedMenuFiltersList.d.ts +3 -3
- package/build/esm/components/SelectedMenuFiltersList/SelectedMenuFiltersList.js +33 -0
- package/build/esm/components/SelectedMenuFiltersList/SelectedMenuFiltersList.js.map +1 -0
- package/build/{components → esm/components}/SelectedMenuFiltersList/SelectedMenuFiltersListProps.d.ts +6 -6
- package/build/{components → esm/components}/SelectedMenuFiltersList/index.d.ts +2 -2
- package/build/{components → esm/components}/StatusTag/StatusTag.d.ts +10 -10
- package/build/esm/components/StatusTag/StatusTag.js +19 -0
- package/build/esm/components/StatusTag/StatusTag.js.map +1 -0
- package/build/{components → esm/components}/StatusTag/StatusTag.styles.d.ts +2 -2
- package/build/esm/components/StatusTag/StatusTag.styles.js +40 -0
- package/build/esm/components/StatusTag/StatusTag.styles.js.map +1 -0
- package/build/{components → esm/components}/StatusTag/StatusTagProps.d.ts +10 -10
- package/build/{components → esm/components}/StatusTag/index.d.ts +2 -2
- package/build/esm/components/Switch/Switch.d.ts +2 -0
- package/build/esm/components/Switch/Switch.js +24 -0
- package/build/esm/components/Switch/Switch.js.map +1 -0
- package/build/{components → esm/components}/Switch/index.d.ts +1 -1
- package/build/{components → esm/components}/index.d.ts +29 -29
- package/build/{index.d.ts → esm/index.d.ts} +2 -2
- package/build/esm/index.js +31 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/node_modules/classnames/index.js +81 -0
- package/build/esm/node_modules/classnames/index.js.map +1 -0
- package/build/{theme → esm/theme}/index.d.ts +1 -1
- package/build/{theme → esm/theme}/overrides.d.ts +2 -2
- package/build/esm/theme/overrides.js +75 -0
- package/build/esm/theme/overrides.js.map +1 -0
- package/build/{theme → esm/theme}/palette.d.ts +26 -26
- package/build/esm/theme/palette.js +29 -0
- package/build/esm/theme/palette.js.map +1 -0
- package/build/{theme → esm/theme}/props.d.ts +2 -2
- package/build/esm/theme/props.js +11 -0
- package/build/esm/theme/props.js.map +1 -0
- package/build/{theme → esm/theme}/theme.d.ts +2 -2
- package/build/esm/theme/theme.js +14 -0
- package/build/esm/theme/theme.js.map +1 -0
- package/build/{theme → esm/theme}/typography.d.ts +2 -2
- package/build/esm/theme/typography.js +60 -0
- package/build/esm/theme/typography.js.map +1 -0
- package/build/index.js +1369 -2577
- package/build/index.js.map +1 -1
- package/package.json +7 -8
- package/build/components/Checkbox/Checkbox.d.ts +0 -2
- package/build/components/Radio/Radio.d.ts +0 -2
- package/build/components/Switch/Switch.d.ts +0 -2
- package/build/index.es.js +0 -2713
- package/build/index.es.js.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import { Box } from '@material-ui/core';
|
|
4
|
+
import { useStyles } from './MenuItemGroupStyles.js';
|
|
5
|
+
import classNames from '../../node_modules/classnames/index.js';
|
|
6
|
+
|
|
7
|
+
var MenuItemGroup = forwardRef(function (props, ref) {
|
|
8
|
+
var classes = useStyles();
|
|
9
|
+
props.children; var className = props.className, restProps = __rest(props, ["children", "className"]);
|
|
10
|
+
return (React__default.createElement(Box, __assign({ className: classNames(classes.main, className) }, { ref: ref }, { "data-component-type": "menu-item-group" }, restProps), props.children));
|
|
11
|
+
});
|
|
12
|
+
MenuItemGroup.displayName = 'MenuItemGroup';
|
|
13
|
+
|
|
14
|
+
export { MenuItemGroup };
|
|
15
|
+
//# sourceMappingURL=MenuItemGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuItemGroup.js","sources":["../../../../src/components/MenuItemGroup/MenuItemGroup.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\nimport { Box } from '@material-ui/core'\nimport { useStyles } from './MenuItemGroupStyles'\nimport classNames from 'classnames'\nexport const MenuItemGroup = forwardRef((props: { children: React.ReactNode; className?: string }, ref) => {\n const classes = useStyles()\n const { children, className, ...restProps } = props\n return (\n <Box\n className={classNames(classes.main, className)}\n {...{ ref }}\n data-component-type=\"menu-item-group\"\n {...restProps}\n >\n {props.children}\n </Box>\n )\n})\n\nMenuItemGroup.displayName = 'MenuItemGroup'\n"],"names":["React"],"mappings":";;;;;;IAIa,aAAa,GAAG,UAAU,CAAC,UAAC,KAAwD,EAAE,GAAG,EAAA;AACpG,IAAA,IAAM,OAAO,GAAG,SAAS,EAAE;AACnB,IAAsC,KAAK,CAAnC,QAAA,CAAA,KAAE,SAAS,GAAmB,KAAK,CAAxB,SAAA,CAAA,CAAK,SAAS,GAAK,MAAA,CAAA,KAAK,EAA7C,CAAA,UAAA,EAAA,WAAA,CAAqC;AAC3C,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,GAAG,EAAA,QAAA,CAAA,EACF,SAAS,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,EAC1C,EAAA,EAAE,GAAG,EAAA,GAAA,EAAE,EAAA,EAAA,qBAAA,EACS,iBAAiB,EAAA,EACjC,SAAS,CAAA,EAEZ,KAAK,CAAC,QAAQ,CACX;AAEV,CAAC;AAED,aAAa,CAAC,WAAW,GAAG,eAAe;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"main">;
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"main">;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { makeStyles } from '@material-ui/core';
|
|
2
|
+
|
|
3
|
+
var useStyles = makeStyles(function (_a) {
|
|
4
|
+
var _b;
|
|
5
|
+
var breakpoints = _a.breakpoints;
|
|
6
|
+
return ({
|
|
7
|
+
main: (_b = {},
|
|
8
|
+
_b[breakpoints.down('md')] = {
|
|
9
|
+
gridTemplateColumns: '1fr',
|
|
10
|
+
},
|
|
11
|
+
_b[breakpoints.up('lg')] = {
|
|
12
|
+
gridTemplateColumns: 'repeat(2, minmax(280px, 1fr))',
|
|
13
|
+
},
|
|
14
|
+
_b.display = 'grid',
|
|
15
|
+
_b.gridGap = 32,
|
|
16
|
+
_b),
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export { useStyles };
|
|
21
|
+
//# sourceMappingURL=MenuItemGroupStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuItemGroupStyles.js","sources":["../../../../src/components/MenuItemGroup/MenuItemGroupStyles.ts"],"sourcesContent":["import { makeStyles } from '@material-ui/core'\n\nexport const useStyles = makeStyles(({ breakpoints }) => ({\n main: {\n [breakpoints.down('md')]: {\n gridTemplateColumns: '1fr',\n },\n [breakpoints.up('lg')]: {\n gridTemplateColumns: 'repeat(2, minmax(280px, 1fr))',\n },\n display: 'grid',\n gridGap: 32,\n },\n}))\n"],"names":[],"mappings":";;AAEa,IAAA,SAAS,GAAG,UAAU,CAAC,UAAC,EAAe,EAAA;;AAAb,IAAA,IAAA,WAAW,GAAA,EAAA,CAAA,WAAA;AAAO,IAAA,QAAC;QACxD,IAAI,GAAA,EAAA,GAAA,EAAA;AACF,YAAA,EAAA,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAG,GAAA;AACxB,gBAAA,mBAAmB,EAAE,KAAK;AAC3B,aAAA;AACD,YAAA,EAAA,CAAC,WAAW,CAAC,EAAE,CAAC,IAAI,CAAC,CAAG,GAAA;AACtB,gBAAA,mBAAmB,EAAE,+BAA+B;AACrD,aAAA;AACD,YAAA,EAAA,CAAA,OAAO,GAAE,MAAM;AACf,YAAA,EAAA,CAAA,OAAO,GAAE,EAAE;AACZ,YAAA,EAAA,CAAA;KACF;AAXwD,CAWvD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MenuItemGroup } from './MenuItemGroup';
|
|
1
|
+
export { MenuItemGroup } from './MenuItemGroup';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MenuSectionProps } from './MenuSectionProps';
|
|
3
|
-
export declare const MenuSection: React.ForwardRefExoticComponent<MenuSectionProps & React.RefAttributes<unknown>>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MenuSectionProps } from './MenuSectionProps';
|
|
3
|
+
export declare const MenuSection: React.ForwardRefExoticComponent<MenuSectionProps & React.RefAttributes<unknown>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import { Box, Typography } from '@material-ui/core';
|
|
4
|
+
import { useStyles } from './MenuSectionStyles.js';
|
|
5
|
+
import { Skeleton } from '@material-ui/lab';
|
|
6
|
+
|
|
7
|
+
var MenuSection = forwardRef(function (props, ref) {
|
|
8
|
+
var name = props.name, children = props.children, loading = props.loading, restProps = __rest(props, ["name", "children", "loading"]);
|
|
9
|
+
var classes = useStyles();
|
|
10
|
+
return (React__default.createElement(Box, __assign({}, restProps, { ref: ref, component: 'section' }, { "data-component-type": "menu-section", style: { scrollMarginTop: '70px' } }),
|
|
11
|
+
React__default.createElement(Box, { marginTop: 1, marginBottom: 4 },
|
|
12
|
+
React__default.createElement(Typography, { component: "h1", className: classes.title }, loading ? React__default.createElement(Skeleton, null) : name)),
|
|
13
|
+
children));
|
|
14
|
+
});
|
|
15
|
+
MenuSection.displayName = 'MenuSection';
|
|
16
|
+
|
|
17
|
+
export { MenuSection };
|
|
18
|
+
//# sourceMappingURL=MenuSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuSection.js","sources":["../../../../src/components/MenuSection/MenuSection.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\nimport { Box, Typography } from '@material-ui/core'\nimport { MenuSectionProps } from './MenuSectionProps'\nimport { useStyles } from './MenuSectionStyles'\nimport { Skeleton } from '@material-ui/lab'\n\nexport const MenuSection = forwardRef((props: MenuSectionProps, ref) => {\n const { name, children, loading, ...restProps } = props\n const classes = useStyles()\n return (\n <Box\n {...restProps}\n {...{ ref, component: 'section' }}\n data-component-type=\"menu-section\"\n style={{ scrollMarginTop: '70px' }}\n >\n <Box marginTop={1} marginBottom={4}>\n <Typography component=\"h1\" className={classes.title}>\n {loading ? <Skeleton /> : name}\n </Typography>\n </Box>\n {children}\n </Box>\n )\n})\n\nMenuSection.displayName = 'MenuSection'\n"],"names":["React"],"mappings":";;;;;;IAMa,WAAW,GAAG,UAAU,CAAC,UAAC,KAAuB,EAAE,GAAG,EAAA;IACzD,IAAA,IAAI,GAAsC,KAAK,CAAA,IAA3C,EAAE,QAAQ,GAA4B,KAAK,CAAjC,QAAA,EAAE,OAAO,GAAmB,KAAK,QAAxB,EAAK,SAAS,UAAK,KAAK,EAAjD,CAAyC,MAAA,EAAA,UAAA,EAAA,SAAA,CAAA,CAAF;AAC7C,IAAA,IAAM,OAAO,GAAG,SAAS,EAAE;IAC3B,QACEA,6BAAC,GAAG,EAAA,QAAA,CAAA,EAAA,EACE,SAAS,EACT,EAAE,GAAG,EAAA,GAAA,EAAE,SAAS,EAAE,SAAS,EAAE,EACb,EAAA,qBAAA,EAAA,cAAc,EAClC,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,EAAA,CAAA;QAElCA,cAAC,CAAA,aAAA,CAAA,GAAG,IAAC,SAAS,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAA;YAChCA,cAAC,CAAA,aAAA,CAAA,UAAU,EAAC,EAAA,SAAS,EAAC,IAAI,EAAC,SAAS,EAAE,OAAO,CAAC,KAAK,EAAA,EAChD,OAAO,GAAGA,cAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,IAAA,CAAG,GAAG,IAAI,CACnB,CACT;QACL,QAAQ,CACL;AAEV,CAAC;AAED,WAAW,CAAC,WAAW,GAAG,aAAa;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BoxProps } from '@material-ui/core';
|
|
3
|
-
export interface MenuSectionProps extends BoxProps {
|
|
4
|
-
/** when true, will render a skeleton in place of the section title */
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
/** the name of a section, will render as the section's title */
|
|
7
|
-
name: string;
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@material-ui/core';
|
|
3
|
+
export interface MenuSectionProps extends BoxProps {
|
|
4
|
+
/** when true, will render a skeleton in place of the section title */
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
/** the name of a section, will render as the section's title */
|
|
7
|
+
name: string;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"title">;
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"title">;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { makeStyles } from '@material-ui/core';
|
|
2
|
+
|
|
3
|
+
var useStyles = makeStyles(function () { return ({
|
|
4
|
+
title: {
|
|
5
|
+
fontWeight: 400,
|
|
6
|
+
fontSize: 20,
|
|
7
|
+
lineHeight: '30px',
|
|
8
|
+
},
|
|
9
|
+
}); });
|
|
10
|
+
|
|
11
|
+
export { useStyles };
|
|
12
|
+
//# sourceMappingURL=MenuSectionStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuSectionStyles.js","sources":["../../../../src/components/MenuSection/MenuSectionStyles.ts"],"sourcesContent":["import { makeStyles } from '@material-ui/core'\n\nexport const useStyles = makeStyles(() => ({\n title: {\n fontWeight: 400,\n fontSize: 20,\n lineHeight: '30px',\n },\n}))\n"],"names":[],"mappings":";;IAEa,SAAS,GAAG,UAAU,CAAC,YAAA,EAAM,QAAC;AACzC,IAAA,KAAK,EAAE;AACL,QAAA,UAAU,EAAE,GAAG;AACf,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,UAAU,EAAE,MAAM;AACnB,KAAA;CACF,EAAC,EAAA;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { MenuSection } from './MenuSection';
|
|
2
|
-
export { MenuSectionProps } from './MenuSectionProps';
|
|
1
|
+
export { MenuSection } from './MenuSection';
|
|
2
|
+
export { MenuSectionProps } from './MenuSectionProps';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const MenuSectionGroup: React.ForwardRefExoticComponent<{
|
|
3
|
-
id: string;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
} & React.RefAttributes<unknown>>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const MenuSectionGroup: React.ForwardRefExoticComponent<{
|
|
3
|
+
id: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
} & React.RefAttributes<unknown>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __rest, __assign } from 'tslib';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import { Box } from '@material-ui/core';
|
|
4
|
+
|
|
5
|
+
var MenuSectionGroup = forwardRef(function (props, ref) {
|
|
6
|
+
var children = props.children, restProps = __rest(props, ["children"]);
|
|
7
|
+
return (React__default.createElement(Box, __assign({ display: "flex", flexDirection: "column", gridGap: 40, marginBottom: 4 }, restProps, { ref: ref }, { "data-component-type": "menu-section-group" }), children));
|
|
8
|
+
});
|
|
9
|
+
MenuSectionGroup.displayName = 'MenuSectionGroup';
|
|
10
|
+
|
|
11
|
+
export { MenuSectionGroup };
|
|
12
|
+
//# sourceMappingURL=MenuSectionGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MenuSectionGroup.js","sources":["../../../../src/components/MenuSectionGroup/MenuSectionGroup.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\nimport { Box } from '@material-ui/core'\n\nexport const MenuSectionGroup = forwardRef((props: { id: string; children: React.ReactNode }, ref) => {\n const { children, ...restProps } = props\n return (\n <Box\n display=\"flex\"\n flexDirection=\"column\"\n gridGap={40}\n marginBottom={4}\n {...restProps}\n {...{ ref }}\n data-component-type=\"menu-section-group\"\n >\n {children}\n </Box>\n )\n})\n\nMenuSectionGroup.displayName = 'MenuSectionGroup'\n"],"names":["React"],"mappings":";;;;IAGa,gBAAgB,GAAG,UAAU,CAAC,UAAC,KAAgD,EAAE,GAAG,EAAA;IACvF,IAAA,QAAQ,GAAmB,KAAK,CAAxB,QAAA,EAAK,SAAS,GAAA,MAAA,CAAK,KAAK,EAAlC,CAA0B,UAAA,CAAA,CAAF;AAC9B,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,GAAG,EAAA,QAAA,CAAA,EACF,OAAO,EAAC,MAAM,EACd,aAAa,EAAC,QAAQ,EACtB,OAAO,EAAE,EAAE,EACX,YAAY,EAAE,CAAC,EAAA,EACX,SAAS,EACT,EAAE,GAAG,EAAA,GAAA,EAAE,EAAA,EAAA,qBAAA,EACS,oBAAoB,EAAA,CAAA,EAEvC,QAAQ,CACL;AAEV,CAAC;AAED,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { MenuSectionGroup } from './MenuSectionGroup';
|
|
1
|
+
export { MenuSectionGroup } from './MenuSectionGroup';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
declare type OrderingAppContextValue = {
|
|
3
|
-
currencySymbol?: string;
|
|
4
|
-
basePath: string;
|
|
5
|
-
restaurantId: number;
|
|
6
|
-
isCatering: boolean;
|
|
7
|
-
isOrderingEvent: boolean;
|
|
8
|
-
isStandard: boolean;
|
|
9
|
-
orderingEventSlug?: string;
|
|
10
|
-
};
|
|
11
|
-
declare type OrderingAppContextType = [OrderingAppContextValue, React.Dispatch<React.SetStateAction<OrderingAppContextValue>>];
|
|
12
|
-
export declare const OrderingAppContext: React.Context<OrderingAppContextType | null>;
|
|
13
|
-
export declare const useOrderingAppContext: () => OrderingAppContextType;
|
|
14
|
-
declare type OrderingAppContextProviderProps = PropsWithChildren<{
|
|
15
|
-
defaultContext: OrderingAppContextValue;
|
|
16
|
-
}>;
|
|
17
|
-
export declare const OrderingAppContextProvider: (props: OrderingAppContextProviderProps) => JSX.Element;
|
|
18
|
-
export {};
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
declare type OrderingAppContextValue = {
|
|
3
|
+
currencySymbol?: string;
|
|
4
|
+
basePath: string;
|
|
5
|
+
restaurantId: number;
|
|
6
|
+
isCatering: boolean;
|
|
7
|
+
isOrderingEvent: boolean;
|
|
8
|
+
isStandard: boolean;
|
|
9
|
+
orderingEventSlug?: string;
|
|
10
|
+
};
|
|
11
|
+
declare type OrderingAppContextType = [OrderingAppContextValue, React.Dispatch<React.SetStateAction<OrderingAppContextValue>>];
|
|
12
|
+
export declare const OrderingAppContext: React.Context<OrderingAppContextType | null>;
|
|
13
|
+
export declare const useOrderingAppContext: () => OrderingAppContextType;
|
|
14
|
+
declare type OrderingAppContextProviderProps = PropsWithChildren<{
|
|
15
|
+
defaultContext: OrderingAppContextValue;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const OrderingAppContextProvider: (props: OrderingAppContextProviderProps) => JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React__default, { createContext, useContext, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
var OrderingAppContext = createContext(null);
|
|
4
|
+
var useOrderingAppContext = function () {
|
|
5
|
+
var context = useContext(OrderingAppContext);
|
|
6
|
+
if (!context) {
|
|
7
|
+
throw new Error('useOrderingAppContext has to be used within <OrderingAppContext.Provider>');
|
|
8
|
+
}
|
|
9
|
+
return context;
|
|
10
|
+
};
|
|
11
|
+
var OrderingAppContextProvider = function (props) {
|
|
12
|
+
var context = useState(props.defaultContext);
|
|
13
|
+
return React__default.createElement(OrderingAppContext.Provider, { value: context }, props.children);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { OrderingAppContext, OrderingAppContextProvider, useOrderingAppContext };
|
|
17
|
+
//# sourceMappingURL=OrderingAppContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrderingAppContext.js","sources":["../../../../src/components/OrderingAppContext/OrderingAppContext.tsx"],"sourcesContent":["import React, { createContext, PropsWithChildren, useContext, useState } from 'react'\n\ntype OrderingAppContextValue = {\n currencySymbol?: string\n basePath: string\n restaurantId: number\n isCatering: boolean\n isOrderingEvent: boolean\n isStandard: boolean\n orderingEventSlug?: string\n}\n\ntype OrderingAppContextType = [OrderingAppContextValue, React.Dispatch<React.SetStateAction<OrderingAppContextValue>>]\n\nexport const OrderingAppContext = createContext<OrderingAppContextType | null>(null)\n\nexport const useOrderingAppContext = () => {\n const context = useContext(OrderingAppContext)\n\n if (!context) {\n throw new Error('useOrderingAppContext has to be used within <OrderingAppContext.Provider>')\n }\n\n return context\n}\n\ntype OrderingAppContextProviderProps = PropsWithChildren<{ defaultContext: OrderingAppContextValue }>\nexport const OrderingAppContextProvider = (props: OrderingAppContextProviderProps) => {\n const context = useState<OrderingAppContextValue>(props.defaultContext)\n\n return <OrderingAppContext.Provider value={context}>{props.children}</OrderingAppContext.Provider>\n}\n"],"names":["React"],"mappings":";;IAca,kBAAkB,GAAG,aAAa,CAAgC,IAAI;AAEtE,IAAA,qBAAqB,GAAG,YAAA;AACnC,IAAA,IAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAE9C,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC;AAC7F;AAED,IAAA,OAAO,OAAO;AAChB;AAGO,IAAM,0BAA0B,GAAG,UAAC,KAAsC,EAAA;IAC/E,IAAM,OAAO,GAAG,QAAQ,CAA0B,KAAK,CAAC,cAAc,CAAC;AAEvE,IAAA,OAAOA,cAAC,CAAA,aAAA,CAAA,kBAAkB,CAAC,QAAQ,EAAC,EAAA,KAAK,EAAE,OAAO,EAAG,EAAA,KAAK,CAAC,QAAQ,CAA+B;AACpG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { OrderingAppContext, useOrderingAppContext, OrderingAppContextProvider } from './OrderingAppContext';
|
|
1
|
+
export { OrderingAppContext, useOrderingAppContext, OrderingAppContextProvider } from './OrderingAppContext';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const PageSection: (props: {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}) => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const PageSection: (props: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { Box } from '@material-ui/core';
|
|
3
|
+
|
|
4
|
+
var PageSection = function (props) { return (React__default.createElement(Box, { p: 4, borderBottom: "1px solid #E0E0E0" }, props.children)); };
|
|
5
|
+
|
|
6
|
+
export { PageSection };
|
|
7
|
+
//# sourceMappingURL=PageSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageSection.js","sources":["../../../../src/components/PageSection/PageSection.tsx"],"sourcesContent":["import React from 'react'\nimport { Box } from '@material-ui/core'\n\nexport const PageSection = (props: { children: React.ReactNode }) => (\n <Box p={4} borderBottom=\"1px solid #E0E0E0\">\n {props.children}\n </Box>\n)\n"],"names":["React"],"mappings":";;;AAGa,IAAA,WAAW,GAAG,UAAC,KAAoC,EAAA,EAAK,QACnEA,cAAC,CAAA,aAAA,CAAA,GAAG,EAAC,EAAA,CAAC,EAAE,CAAC,EAAE,YAAY,EAAC,mBAAmB,EACxC,EAAA,KAAK,CAAC,QAAQ,CACX,EAH6D;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PageSection } from './PageSection';
|
|
1
|
+
export { PageSection } from './PageSection';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { QuantityPickerProps } from './QuantityPickerProps';
|
|
3
|
-
export declare const QuantityPicker: (props: QuantityPickerProps) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { QuantityPickerProps } from './QuantityPickerProps';
|
|
3
|
+
export declare const QuantityPicker: (props: QuantityPickerProps) => JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { TextField } from '@material-ui/core';
|
|
3
|
+
import { MinusCircle, PlusCircle } from '@popmenu/web-icons';
|
|
4
|
+
import { IconButton, Icon } from '@popmenu/common-ui';
|
|
5
|
+
import { useQuantityPickerStyles, useQuantityInputStyles, useStartAdornmentStyles, useEndAdornmentStyles } from './QuantityPicker.styles.js';
|
|
6
|
+
|
|
7
|
+
var QuantityPicker = function (props) {
|
|
8
|
+
var value = props.value, onChange = props.onChange, disabled = props.disabled, disableIncrement = props.disableIncrement, preventManualChange = props.preventManualChange, variation = props.variation, name = props.name;
|
|
9
|
+
var fieldClasses = useQuantityPickerStyles();
|
|
10
|
+
var inputClasses = useQuantityInputStyles(props);
|
|
11
|
+
var startAdornmentClasses = useStartAdornmentStyles(props);
|
|
12
|
+
var endAdornmentClasses = useEndAdornmentStyles(props);
|
|
13
|
+
var onIncrement = function (event) {
|
|
14
|
+
onChange(event, { quantity: value + 1, reason: 'increment' });
|
|
15
|
+
};
|
|
16
|
+
var onDecrement = function (event) {
|
|
17
|
+
onChange(event, { quantity: value - 1, reason: 'decrement' });
|
|
18
|
+
};
|
|
19
|
+
var handleChange = function (event) {
|
|
20
|
+
if (preventManualChange) {
|
|
21
|
+
event.preventDefault();
|
|
22
|
+
}
|
|
23
|
+
if (!preventManualChange) {
|
|
24
|
+
onChange(event, { quantity: parseInt(event.target.value), reason: 'change' });
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
return (React__default.createElement(TextField, { classes: fieldClasses, type: "number", variant: variation === 'itemCount' ? 'filled' : 'standard', value: value, disabled: disabled, onChange: handleChange, InputProps: {
|
|
28
|
+
classes: inputClasses,
|
|
29
|
+
disableUnderline: true,
|
|
30
|
+
endAdornment: (React__default.createElement(IconButton, { "aria-label": "increase quantity " + name, className: endAdornmentClasses.root, color: "default", onClick: onIncrement, disabled: disabled || disableIncrement },
|
|
31
|
+
React__default.createElement(Icon, { icon: PlusCircle }))),
|
|
32
|
+
startAdornment: (React__default.createElement(IconButton, { "aria-label": "decrease quantity " + name, className: startAdornmentClasses.root, color: "default", onClick: onDecrement, disabled: disabled || value <= 0 },
|
|
33
|
+
React__default.createElement(Icon, { icon: MinusCircle }))),
|
|
34
|
+
} }));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { QuantityPicker };
|
|
38
|
+
//# sourceMappingURL=QuantityPicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuantityPicker.js","sources":["../../../../src/components/QuantityPicker/QuantityPicker.tsx"],"sourcesContent":["import React, { ChangeEvent, MouseEventHandler } from 'react'\nimport { TextField } from '@material-ui/core'\nimport { PlusCircle, MinusCircle } from '@popmenu/web-icons'\nimport { Icon, IconButton } from '@popmenu/common-ui'\n\nimport { QuantityPickerProps } from './QuantityPickerProps'\nimport {\n useQuantityPickerStyles,\n useQuantityInputStyles,\n useStartAdornmentStyles,\n useEndAdornmentStyles,\n} from './QuantityPicker.styles'\n\nexport const QuantityPicker = (props: QuantityPickerProps): JSX.Element => {\n const { value, onChange, disabled, disableIncrement, preventManualChange, variation, name } = props\n const fieldClasses = useQuantityPickerStyles()\n const inputClasses = useQuantityInputStyles(props)\n const startAdornmentClasses = useStartAdornmentStyles(props)\n const endAdornmentClasses = useEndAdornmentStyles(props)\n\n const onIncrement: MouseEventHandler<HTMLButtonElement> = (event) => {\n onChange(event, { quantity: value + 1, reason: 'increment' })\n }\n\n const onDecrement: MouseEventHandler<HTMLButtonElement> = (event) => {\n onChange(event, { quantity: value - 1, reason: 'decrement' })\n }\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n if (preventManualChange) {\n event.preventDefault()\n }\n if (!preventManualChange) {\n onChange(event, { quantity: parseInt(event.target.value), reason: 'change' })\n }\n }\n\n return (\n <TextField\n classes={fieldClasses}\n type=\"number\"\n variant={variation === 'itemCount' ? 'filled' : 'standard'}\n value={value}\n disabled={disabled}\n onChange={handleChange}\n InputProps={{\n classes: inputClasses,\n disableUnderline: true,\n endAdornment: (\n <IconButton\n aria-label={`increase quantity ${name}`}\n className={endAdornmentClasses.root}\n color=\"default\"\n onClick={onIncrement}\n disabled={disabled || disableIncrement}\n >\n <Icon icon={PlusCircle} />\n </IconButton>\n ),\n startAdornment: (\n <IconButton\n aria-label={`decrease quantity ${name}`}\n className={startAdornmentClasses.root}\n color=\"default\"\n onClick={onDecrement}\n disabled={disabled || value <= 0}\n >\n <Icon icon={MinusCircle} />\n </IconButton>\n ),\n }}\n />\n )\n}\n"],"names":["React"],"mappings":";;;;;;AAaO,IAAM,cAAc,GAAG,UAAC,KAA0B,EAAA;AAC/C,IAAA,IAAA,KAAK,GAAiF,KAAK,CAAA,KAAtF,EAAE,QAAQ,GAAuE,KAAK,CAAA,QAA5E,EAAE,QAAQ,GAA6D,KAAK,CAAA,QAAlE,EAAE,gBAAgB,GAA2C,KAAK,CAAA,gBAAhD,EAAE,mBAAmB,GAAsB,KAAK,oBAA3B,EAAE,SAAS,GAAW,KAAK,UAAhB,EAAE,IAAI,GAAK,KAAK,KAAV;AACzF,IAAA,IAAM,YAAY,GAAG,uBAAuB,EAAE;AAC9C,IAAA,IAAM,YAAY,GAAG,sBAAsB,CAAC,KAAK,CAAC;AAClD,IAAA,IAAM,qBAAqB,GAAG,uBAAuB,CAAC,KAAK,CAAC;AAC5D,IAAA,IAAM,mBAAmB,GAAG,qBAAqB,CAAC,KAAK,CAAC;IAExD,IAAM,WAAW,GAAyC,UAAC,KAAK,EAAA;AAC9D,QAAA,QAAQ,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAC/D,KAAC;IAED,IAAM,WAAW,GAAyC,UAAC,KAAK,EAAA;AAC9D,QAAA,QAAQ,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,KAAK,GAAG,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAC/D,KAAC;IAED,IAAM,YAAY,GAAG,UAAC,KAAoC,EAAA;AACxD,QAAA,IAAI,mBAAmB,EAAE;YACvB,KAAK,CAAC,cAAc,EAAE;AACvB;QACD,IAAI,CAAC,mBAAmB,EAAE;YACxB,QAAQ,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAC9E;AACH,KAAC;AAED,IAAA,QACEA,cAAC,CAAA,aAAA,CAAA,SAAS,EACR,EAAA,OAAO,EAAE,YAAY,EACrB,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,SAAS,KAAK,WAAW,GAAG,QAAQ,GAAG,UAAU,EAC1D,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,YAAY,EACtB,UAAU,EAAE;AACV,YAAA,OAAO,EAAE,YAAY;AACrB,YAAA,gBAAgB,EAAE,IAAI;YACtB,YAAY,GACVA,cAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAA,YAAA,EACG,oBAAqB,GAAA,IAAM,EACvC,SAAS,EAAE,mBAAmB,CAAC,IAAI,EACnC,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,QAAQ,IAAI,gBAAgB,EAAA;AAEtC,gBAAAA,cAAA,CAAA,aAAA,CAAC,IAAI,EAAC,EAAA,IAAI,EAAE,UAAU,EAAA,CAAI,CACf,CACd;AACD,YAAA,cAAc,GACZA,cAAC,CAAA,aAAA,CAAA,UAAU,EACG,EAAA,YAAA,EAAA,oBAAA,GAAqB,IAAM,EACvC,SAAS,EAAE,qBAAqB,CAAC,IAAI,EACrC,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,QAAQ,IAAI,KAAK,IAAI,CAAC,EAAA;AAEhC,gBAAAA,cAAA,CAAA,aAAA,CAAC,IAAI,EAAC,EAAA,IAAI,EAAE,WAAW,EAAA,CAAI,CAChB,CACd;AACF,SAAA,EAAA,CACD;AAEN;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { QuantityPickerProps } from './QuantityPickerProps';
|
|
2
|
-
export declare const useQuantityPickerStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"root">;
|
|
3
|
-
export declare const useQuantityInputStyles: (props: QuantityPickerProps) => import("@material-ui/styles").ClassNameMap<string>;
|
|
4
|
-
export declare const useStartAdornmentStyles: (props: QuantityPickerProps) => import("@material-ui/styles").ClassNameMap<string>;
|
|
5
|
-
export declare const useEndAdornmentStyles: (props: QuantityPickerProps) => import("@material-ui/styles").ClassNameMap<string>;
|
|
1
|
+
import { QuantityPickerProps } from './QuantityPickerProps';
|
|
2
|
+
export declare const useQuantityPickerStyles: (props?: any) => import("@material-ui/styles").ClassNameMap<"root">;
|
|
3
|
+
export declare const useQuantityInputStyles: (props: QuantityPickerProps) => import("@material-ui/styles").ClassNameMap<string>;
|
|
4
|
+
export declare const useStartAdornmentStyles: (props: QuantityPickerProps) => import("@material-ui/styles").ClassNameMap<string>;
|
|
5
|
+
export declare const useEndAdornmentStyles: (props: QuantityPickerProps) => import("@material-ui/styles").ClassNameMap<string>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { makeStyles } from '@material-ui/core/styles';
|
|
2
|
+
|
|
3
|
+
var useQuantityPickerStyles = makeStyles(function (theme) { return ({
|
|
4
|
+
root: {
|
|
5
|
+
height: theme.spacing(7),
|
|
6
|
+
backgroundColor: 'none',
|
|
7
|
+
},
|
|
8
|
+
}); });
|
|
9
|
+
var useQuantityInputStyles = makeStyles(function (theme) { return ({
|
|
10
|
+
root: {
|
|
11
|
+
height: '100%',
|
|
12
|
+
width: 'min-content',
|
|
13
|
+
borderRadius: theme.spacing(12.5),
|
|
14
|
+
background: function (props) { return (props.variation === 'modifierCount' ? 'unset' : theme.palette.grey[100]); },
|
|
15
|
+
},
|
|
16
|
+
input: {
|
|
17
|
+
'&::-webkit-clear-button, &::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {
|
|
18
|
+
display: 'none',
|
|
19
|
+
},
|
|
20
|
+
'-moz-appearance': 'textfield',
|
|
21
|
+
fontWeight: 600,
|
|
22
|
+
padding: 0,
|
|
23
|
+
textAlign: 'center',
|
|
24
|
+
zIndex: function (props) { return (props.value === 0 && props.variation === 'modifierCount' ? -1 : 1); },
|
|
25
|
+
backgroundColor: function (props) { return (props.variation === 'modifierCount' ? theme.palette.grey[100] : 'unset'); },
|
|
26
|
+
alignSelf: function (props) { return (props.variation === 'modifierCount' ? 'stretch' : 'unset'); },
|
|
27
|
+
height: function (props) { return (props.variation === 'modifierCount' ? 'auto' : 'unset'); },
|
|
28
|
+
minWidth: function (props) { return (props.variation === 'modifierCount' ? theme.spacing(5) : theme.spacing(2.75)); },
|
|
29
|
+
borderRadius: function (props) { return (props.variation === 'modifierCount' ? theme.spacing(1) : 'unset'); },
|
|
30
|
+
margin: function (props) { return (props.variation === 'modifierCount' ? theme.spacing(0.5, 0) : 0); },
|
|
31
|
+
},
|
|
32
|
+
}); });
|
|
33
|
+
var useStartAdornmentStyles = makeStyles(function (theme) { return ({
|
|
34
|
+
root: {
|
|
35
|
+
color: theme.palette.text.primary,
|
|
36
|
+
zIndex: function (props) { return (props.value === 0 && props.variation === 'modifierCount' ? -1 : 1); },
|
|
37
|
+
},
|
|
38
|
+
}); });
|
|
39
|
+
var useEndAdornmentStyles = makeStyles(function (theme) { return ({
|
|
40
|
+
root: {
|
|
41
|
+
color: theme.palette.text.primary,
|
|
42
|
+
},
|
|
43
|
+
}); });
|
|
44
|
+
|
|
45
|
+
export { useEndAdornmentStyles, useQuantityInputStyles, useQuantityPickerStyles, useStartAdornmentStyles };
|
|
46
|
+
//# sourceMappingURL=QuantityPicker.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuantityPicker.styles.js","sources":["../../../../src/components/QuantityPicker/QuantityPicker.styles.ts"],"sourcesContent":["import { makeStyles, Theme } from '@material-ui/core/styles'\nimport { QuantityPickerProps } from './QuantityPickerProps'\n\nexport const useQuantityPickerStyles = makeStyles((theme) => ({\n root: {\n height: theme.spacing(7),\n backgroundColor: 'none',\n },\n}))\n\nexport const useQuantityInputStyles = makeStyles<Theme, QuantityPickerProps>((theme) => ({\n root: {\n height: '100%',\n width: 'min-content',\n borderRadius: theme.spacing(12.5),\n background: (props) => (props.variation === 'modifierCount' ? 'unset' : theme.palette.grey[100]),\n },\n input: {\n '&::-webkit-clear-button, &::-webkit-outer-spin-button, &::-webkit-inner-spin-button': {\n display: 'none',\n },\n '-moz-appearance': 'textfield',\n fontWeight: 600,\n padding: 0,\n textAlign: 'center',\n zIndex: (props) => (props.value === 0 && props.variation === 'modifierCount' ? -1 : 1),\n backgroundColor: (props) => (props.variation === 'modifierCount' ? theme.palette.grey[100] : 'unset'),\n alignSelf: (props) => (props.variation === 'modifierCount' ? 'stretch' : 'unset'),\n height: (props) => (props.variation === 'modifierCount' ? 'auto' : 'unset'),\n minWidth: (props) => (props.variation === 'modifierCount' ? theme.spacing(5) : theme.spacing(2.75)),\n borderRadius: (props) => (props.variation === 'modifierCount' ? theme.spacing(1) : 'unset'),\n margin: (props) => (props.variation === 'modifierCount' ? theme.spacing(0.5, 0) : 0),\n },\n}))\n\nexport const useStartAdornmentStyles = makeStyles<Theme, QuantityPickerProps>((theme) => ({\n root: {\n color: theme.palette.text.primary,\n zIndex: (props) => (props.value === 0 && props.variation === 'modifierCount' ? -1 : 1),\n },\n}))\n\nexport const useEndAdornmentStyles = makeStyles<Theme, QuantityPickerProps>((theme) => ({\n root: {\n color: theme.palette.text.primary,\n },\n}))\n"],"names":[],"mappings":";;AAGa,IAAA,uBAAuB,GAAG,UAAU,CAAC,UAAC,KAAK,EAAK,EAAA,QAAC;AAC5D,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AACxB,QAAA,eAAe,EAAE,MAAM;AACxB,KAAA;CACF,EAAC,EAAA;AAEW,IAAA,sBAAsB,GAAG,UAAU,CAA6B,UAAC,KAAK,EAAK,EAAA,QAAC;AACvF,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,MAAM;AACd,QAAA,KAAK,EAAE,aAAa;AACpB,QAAA,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;AACjC,QAAA,UAAU,EAAE,UAAC,KAAK,EAAA,EAAK,QAAC,KAAK,CAAC,SAAS,KAAK,eAAe,GAAG,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAC,EAAA;AACjG,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,qFAAqF,EAAE;AACrF,YAAA,OAAO,EAAE,MAAM;AAChB,SAAA;AACD,QAAA,iBAAiB,EAAE,WAAW;AAC9B,QAAA,UAAU,EAAE,GAAG;AACf,QAAA,OAAO,EAAE,CAAC;AACV,QAAA,SAAS,EAAE,QAAQ;AACnB,QAAA,MAAM,EAAE,UAAC,KAAK,EAAA,EAAK,QAAC,KAAK,CAAC,KAAK,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,KAAK,eAAe,GAAG,EAAE,GAAG,CAAC,EAAC,EAAA;AACtF,QAAA,eAAe,EAAE,UAAC,KAAK,EAAA,EAAK,QAAC,KAAK,CAAC,SAAS,KAAK,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,EAAC,EAAA;QACrG,SAAS,EAAE,UAAC,KAAK,EAAA,EAAK,QAAC,KAAK,CAAC,SAAS,KAAK,eAAe,GAAG,SAAS,GAAG,OAAO,EAAC,EAAA;QACjF,MAAM,EAAE,UAAC,KAAK,EAAA,EAAK,QAAC,KAAK,CAAC,SAAS,KAAK,eAAe,GAAG,MAAM,GAAG,OAAO,EAAC,EAAA;AAC3E,QAAA,QAAQ,EAAE,UAAC,KAAK,EAAA,EAAK,QAAC,KAAK,CAAC,SAAS,KAAK,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAC;QACnG,YAAY,EAAE,UAAC,KAAK,EAAK,EAAA,QAAC,KAAK,CAAC,SAAS,KAAK,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,EAAC,EAAA;AAC3F,QAAA,MAAM,EAAE,UAAC,KAAK,EAAA,EAAK,QAAC,KAAK,CAAC,SAAS,KAAK,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,EAAC,EAAA;AACrF,KAAA;CACF,EAAC,EAAA;AAEW,IAAA,uBAAuB,GAAG,UAAU,CAA6B,UAAC,KAAK,EAAK,EAAA,QAAC;AACxF,IAAA,IAAI,EAAE;AACJ,QAAA,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;AACjC,QAAA,MAAM,EAAE,UAAC,KAAK,EAAA,EAAK,QAAC,KAAK,CAAC,KAAK,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,KAAK,eAAe,GAAG,EAAE,GAAG,CAAC,EAAC,EAAA;AACvF,KAAA;CACF,EAAC,EAAA;AAEW,IAAA,qBAAqB,GAAG,UAAU,CAA6B,UAAC,KAAK,EAAK,EAAA,QAAC;AACtF,IAAA,IAAI,EAAE;AACJ,QAAA,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;AAClC,KAAA;CACF,EAAC,EAAA;;;;"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import React, { ChangeEvent } from 'react';
|
|
2
|
-
export declare type QuantityChangeEvent = {
|
|
3
|
-
quantity: number;
|
|
4
|
-
reason: string;
|
|
5
|
-
};
|
|
6
|
-
export interface QuantityPickerProps {
|
|
7
|
-
/** Callback for when the quantity is increased or decreased for the parent form */
|
|
8
|
-
onChange: (event: ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>, change: QuantityChangeEvent) => void;
|
|
9
|
-
/** the quantity represented by the picker */
|
|
10
|
-
value: number;
|
|
11
|
-
/** determines if picker is active */
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
/** limits the quantity picker from increasing the value */
|
|
14
|
-
disableIncrement?: boolean;
|
|
15
|
-
/** prevents a uer from typing a new value, forcing them to use the increment/decrement buttons */
|
|
16
|
-
preventManualChange?: boolean;
|
|
17
|
-
/** indicates how the quantity picker will be used and changes styles accordingly */
|
|
18
|
-
variation: 'itemCount' | 'modifierCount';
|
|
19
|
-
/** name of the modifier the quantity picker is assigned to */
|
|
20
|
-
name: string;
|
|
21
|
-
}
|
|
1
|
+
import React, { ChangeEvent } from 'react';
|
|
2
|
+
export declare type QuantityChangeEvent = {
|
|
3
|
+
quantity: number;
|
|
4
|
+
reason: string;
|
|
5
|
+
};
|
|
6
|
+
export interface QuantityPickerProps {
|
|
7
|
+
/** Callback for when the quantity is increased or decreased for the parent form */
|
|
8
|
+
onChange: (event: ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLButtonElement, MouseEvent>, change: QuantityChangeEvent) => void;
|
|
9
|
+
/** the quantity represented by the picker */
|
|
10
|
+
value: number;
|
|
11
|
+
/** determines if picker is active */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** limits the quantity picker from increasing the value */
|
|
14
|
+
disableIncrement?: boolean;
|
|
15
|
+
/** prevents a uer from typing a new value, forcing them to use the increment/decrement buttons */
|
|
16
|
+
preventManualChange?: boolean;
|
|
17
|
+
/** indicates how the quantity picker will be used and changes styles accordingly */
|
|
18
|
+
variation: 'itemCount' | 'modifierCount';
|
|
19
|
+
/** name of the modifier the quantity picker is assigned to */
|
|
20
|
+
name: string;
|
|
21
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { QuantityPicker as default } from './QuantityPicker';
|
|
2
|
-
export { QuantityPickerProps, QuantityChangeEvent } from './QuantityPickerProps';
|
|
1
|
+
export { QuantityPicker as default } from './QuantityPicker';
|
|
2
|
+
export { QuantityPickerProps, QuantityChangeEvent } from './QuantityPickerProps';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Radio: import("react").ComponentType<Pick<import("@material-ui/core").RadioProps, "className" | "style" | "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" | "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" | "ref" | "form" | "key" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "disableFocusRipple" | "size" | "action" | "buttonRef" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "onFocusVisible" | "TouchRippleProps" | "checked" | "readOnly" | "required" | "icon" | "edge" | "inputProps" | "inputRef" | "checkedIcon"> & import("@material-ui/core").StyledComponentProps<"root" | "checked">>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { withStyles, Radio as Radio$1 } from '@material-ui/core';
|
|
2
|
+
|
|
3
|
+
var Radio = withStyles(function (_a) {
|
|
4
|
+
var palette = _a.palette;
|
|
5
|
+
return ({
|
|
6
|
+
checked: {},
|
|
7
|
+
root: {
|
|
8
|
+
'&$checked': {
|
|
9
|
+
color: palette.info.main,
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
})(Radio$1);
|
|
14
|
+
|
|
15
|
+
export { Radio };
|
|
16
|
+
//# sourceMappingURL=Radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.js","sources":["../../../../src/components/Radio/Radio.tsx"],"sourcesContent":["import { Radio as MuiRadio, withStyles } from '@material-ui/core'\n\nexport const Radio = withStyles(({ palette }) => ({\n checked: {},\n root: {\n '&$checked': {\n color: palette.info.main,\n },\n },\n}))(MuiRadio)\n"],"names":["MuiRadio"],"mappings":";;AAEa,IAAA,KAAK,GAAG,UAAU,CAAC,UAAC,EAAW,EAAA;AAAT,IAAA,IAAA,OAAO,GAAA,EAAA,CAAA,OAAA;AAAO,IAAA,QAAC;AAChD,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,IAAI,EAAE;AACJ,YAAA,WAAW,EAAE;AACX,gBAAA,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI;AACzB,aAAA;AACF,SAAA;KACF;AAPgD,CAO/C,CAAC,CAACA,OAAQ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Radio } from './Radio';
|
|
1
|
+
export { Radio } from './Radio';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ReactionCounterProps } from './ReactionCounterProps';
|
|
3
|
-
export declare const ReactionCounter: (props: ReactionCounterProps) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ReactionCounterProps } from './ReactionCounterProps';
|
|
3
|
+
export declare const ReactionCounter: (props: ReactionCounterProps) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { Box, Icon, Typography } from '@popmenu/common-ui';
|
|
3
|
+
|
|
4
|
+
var ReactionCounter = function (props) {
|
|
5
|
+
var count = props.count, icon = props.icon, label = props.label;
|
|
6
|
+
return (React__default.createElement(Box, { display: "flex", alignItems: "center", gridGap: 6, color: "grey.900" },
|
|
7
|
+
React__default.createElement(Icon, { icon: icon, size: "large", color: "inherit", "aria-label": label }),
|
|
8
|
+
React__default.createElement(Typography, { variant: "body2", color: "grey.900" }, count)));
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { ReactionCounter };
|
|
12
|
+
//# sourceMappingURL=ReactionCounter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactionCounter.js","sources":["../../../../src/components/ReactionCounter/ReactionCounter.tsx"],"sourcesContent":["import React from 'react'\nimport { Box, Icon, Typography } from '@popmenu/common-ui'\nimport { ReactionCounterProps } from './ReactionCounterProps'\n\nexport const ReactionCounter = (props: ReactionCounterProps) => {\n const { count, icon, label } = props\n\n return (\n <Box display=\"flex\" alignItems=\"center\" gridGap={6} color=\"grey.900\">\n <Icon icon={icon} size=\"large\" color=\"inherit\" aria-label={label} />\n <Typography variant=\"body2\" color=\"grey.900\">\n {count}\n </Typography>\n </Box>\n )\n}\n"],"names":["React"],"mappings":";;;AAIO,IAAM,eAAe,GAAG,UAAC,KAA2B,EAAA;AACjD,IAAA,IAAA,KAAK,GAAkB,KAAK,CAAA,KAAvB,EAAE,IAAI,GAAY,KAAK,CAAA,IAAjB,EAAE,KAAK,GAAK,KAAK,MAAV;AAE1B,IAAA,QACEA,cAAC,CAAA,aAAA,CAAA,GAAG,IAAC,OAAO,EAAC,MAAM,EAAC,UAAU,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAC,UAAU,EAAA;AAClE,QAAAA,cAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS,EAAA,YAAA,EAAa,KAAK,EAAI,CAAA;AACpE,QAAAA,cAAA,CAAA,aAAA,CAAC,UAAU,EAAA,EAAC,OAAO,EAAC,OAAO,EAAC,KAAK,EAAC,UAAU,EACzC,EAAA,KAAK,CACK,CACT;AAEV;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface ReactionCounterProps {
|
|
3
|
-
count: number;
|
|
4
|
-
icon: string | React.FC<React.SVGProps<SVGSVGElement>>;
|
|
5
|
-
label: string;
|
|
6
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ReactionCounterProps {
|
|
3
|
+
count: number;
|
|
4
|
+
icon: string | React.FC<React.SVGProps<SVGSVGElement>>;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ReactionCounter as default } from './ReactionCounter';
|
|
2
|
-
export { ReactionCounterProps } from './ReactionCounterProps';
|
|
1
|
+
export { ReactionCounter as default } from './ReactionCounter';
|
|
2
|
+
export { ReactionCounterProps } from './ReactionCounterProps';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
-
declare type ReactionCounterGroupProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
|
|
3
|
-
export declare const ReactionCounterGroup: (props: ReactionCounterGroupProps) => JSX.Element;
|
|
4
|
-
export {};
|
|
1
|
+
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
+
declare type ReactionCounterGroupProps = PropsWithChildren<HTMLAttributes<HTMLElement>>;
|
|
3
|
+
export declare const ReactionCounterGroup: (props: ReactionCounterGroupProps) => JSX.Element;
|
|
4
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { Box } from '@popmenu/common-ui';
|
|
3
|
+
|
|
4
|
+
var ReactionCounterGroup = function (props) {
|
|
5
|
+
var children = props.children;
|
|
6
|
+
return (React__default.createElement(Box, { display: "flex", gridGap: 16 }, children));
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export { ReactionCounterGroup };
|
|
10
|
+
//# sourceMappingURL=ReactionCounterGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactionCounterGroup.js","sources":["../../../../src/components/ReactionCounterGroup/ReactionCounterGroup.tsx"],"sourcesContent":["import React, { HTMLAttributes, PropsWithChildren } from 'react'\nimport { Box } from '@popmenu/common-ui'\n\ntype ReactionCounterGroupProps = PropsWithChildren<HTMLAttributes<HTMLElement>>\n\nexport const ReactionCounterGroup = (props: ReactionCounterGroupProps) => {\n const { children } = props\n\n return (\n <Box display=\"flex\" gridGap={16}>\n {children}\n </Box>\n )\n}\n"],"names":["React"],"mappings":";;;AAKO,IAAM,oBAAoB,GAAG,UAAC,KAAgC,EAAA;AAC3D,IAAA,IAAA,QAAQ,GAAK,KAAK,CAAA,QAAV;AAEhB,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,GAAG,EAAA,EAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,EAAE,EAAA,EAC5B,QAAQ,CACL;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ReactionCounterGroup as default } from './ReactionCounterGroup';
|
|
1
|
+
export { ReactionCounterGroup as default } from './ReactionCounterGroup';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SelectableChipProps } from './SelectableChipProps';
|
|
3
|
-
export declare const SelectableChip: (props: SelectableChipProps) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectableChipProps } from './SelectableChipProps';
|
|
3
|
+
export declare const SelectableChip: (props: SelectableChipProps) => JSX.Element;
|