UNPKG

@open-tender/store

Version:

A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API

228 lines (227 loc) 7.37 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var styles_1 = tslib_1.__importDefault(require("../styles")); var utils_1 = require("../utils"); var itemOption = { itemOption: { classes: '', props: {}, style: { alignItems: 'stretch', flexGrow: 1, padding: utils_1.theme.spacing.padding.small } }, itemOption__container: { classes: '', props: {}, style: { alignItems: 'stretch', flexGrow: 1, padding: utils_1.theme.spacing.padding.small, position: 'relative' } }, itemOption__containerRequired: { classes: '', props: {}, style: { alignItems: 'stretch', backgroundColor: utils_1.theme.colors.error.secondary, borderColor: utils_1.theme.colors.error.primary, borderRadius: utils_1.theme.spacing.borderRadius.medium, borderStyle: 'solid', borderWidth: utils_1.theme.spacing.borderWidth.medium, flexGrow: 1, padding: utils_1.theme.spacing.padding.small, position: 'relative' } }, itemOption__decrease: { classes: '', props: {}, style: { alignItems: 'center', display: 'flex', height: 48, justifyContent: 'center', position: 'absolute', left: utils_1.theme.spacing.padding.small, marginLeft: 2, top: utils_1.theme.spacing.padding.small, width: 48, zIndex: 1 } }, itemOption__decreaseIcon: { classes: 'buttonPrimary', props: { text: 'Decrease Quantity' }, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.buttonPrimary), { height: 30, lineHeight: 0, padding: 0, width: 30 }) }, itemOption__increase: { classes: '', props: {}, style: { alignItems: 'center', display: 'flex', height: 48, justifyContent: 'center', position: 'absolute', right: utils_1.theme.spacing.padding.small, marginRight: 2, top: utils_1.theme.spacing.padding.small, width: 48, zIndex: 1 } }, itemOption__increaseIcon: { classes: 'buttonPrimary', props: { text: 'Decrease Quantity' }, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.buttonPrimary), { height: 30, lineHeight: 0, padding: 0, width: 30 }) }, itemOption__button: { classes: '', props: {}, style: { alignItems: 'stretch', // backgroundColor: theme.colors.card.primary, // borderRadius: theme.spacing.borderRadius.small, // boxShadow: theme.colors.boxShadow.primary, display: 'flex', flexDirection: 'column', flexGrow: 1, height: 260, overflow: 'hidden' // padding: theme.spacing.padding.small, } }, itemOption__quantityContainer: { classes: '', props: {}, style: { alignItems: 'center', flexDirection: 'row', flexGrow: 0, flexShrink: 0, height: 48, justifyContent: 'center' } }, itemOption__quantity: { classes: '', props: {}, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textHeading), { fontSize: utils_1.theme.fontSizes.medium, lineHeight: 1 }) }, itemOption__imageContainer: { classes: '', props: {}, style: { alignItems: 'center', flexGrow: 1, flexShrink: 1, justifyContent: 'center' } }, itemOption__imageWrapper: { classes: '', props: {}, style: { alignItems: 'stretch', borderRadius: 60, height: 120, justifyContent: 'center', overflow: 'hidden', width: 120 } }, itemOption__image: { classes: '', props: {}, style: { backgroundColor: utils_1.theme.colors.background.tertiary, backgroundPosition: 'center', backgroundSize: 'cover', flexGrow: 1 } }, itemOption__priceContainer: { classes: '', props: {}, style: { // backgroundColor: 'palegreen', alignItems: 'flex-end', flexDirection: 'row', flexGrow: 0, flexShrink: 0, gap: 15, justifyContent: 'center', paddingBottom: 3 } }, itemOption__price: { classes: '', props: {}, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textHeading), { fontSize: utils_1.theme.fontSizes.xxsmall, lineHeight: 1 }) }, itemOption__cals: { classes: '', props: {}, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textBody), { fontSize: utils_1.theme.fontSizes.xxsmall, lineHeight: 1 }) }, itemOption__nameContainer: { classes: '', props: {}, style: { alignItems: 'center', flexGrow: 0, flexShrink: 0, // height: 48, justifyContent: 'flex-end', paddingBottom: 10, paddingLeft: 5, paddingRight: 5 } }, itemOption__name: { classes: '', props: {}, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textHeading), { fontSize: utils_1.theme.fontSizes.medium, height: utils_1.theme.fontSizes.medium, lineHeight: 1, overflow: 'hidden' }) }, itemOption__groups: { classes: '', props: {}, style: { alignItems: 'stretch' // backgroundColor: theme.colors.background.tertiary, // borderRadius: theme.spacing.borderRadius.xsmall, // padding: theme.spacing.padding.small } }, itemOption__groupsOptions: { classes: '', props: {}, style: { alignItems: 'center', justifyContent: 'center', marginBottom: utils_1.theme.spacing.padding.small, textAlign: 'center' } }, itemOption__groupsOptionNames: { classes: '', props: {}, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textBody), { fontSize: utils_1.theme.fontSizes.small }) }, itemOption__groupsButton: { classes: '', props: {}, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.buttonPrimary), { borderRadius: utils_1.theme.spacing.borderRadius.xsmall, paddingBottom: 10, paddingLeft: 5, paddingRight: 5, paddingTop: 10 }) }, itemOption__groupsButtonRequired: { classes: '', props: {}, style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.buttonDelete), { borderColor: utils_1.theme.colors.error.primary, borderRadius: utils_1.theme.spacing.borderRadius.xsmall, paddingBottom: 10, paddingLeft: 5, paddingRight: 5, paddingTop: 10 }) } }; exports.default = itemOption;