@open-tender/utils 0.1.111 → 0.1.112
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/dist/.DS_Store +0 -0
- package/dist/cjs/utils/theme.js +7 -1
- package/dist/esm/utils/theme.js +7 -1
- package/package.json +2 -2
package/dist/.DS_Store
CHANGED
|
Binary file
|
package/dist/cjs/utils/theme.js
CHANGED
|
@@ -155,6 +155,10 @@ const makeItem = (item) => {
|
|
|
155
155
|
const { mobile } = item;
|
|
156
156
|
return Object.assign(Object.assign({}, mobile), { padding: (0, exports.remsToPixels)(mobile.padding), imagePadding: (0, exports.remsToPixels)(mobile.imagePadding), maxWidth: (0, exports.remsToPixels)(mobile.maxWidth), imageMinHeight: (0, exports.remsToPixels)(mobile.imageMinHeight), imageMaxHeight: (0, exports.remsToPixels)(mobile.imageMaxHeight) });
|
|
157
157
|
};
|
|
158
|
+
const makeCategories = (categories) => {
|
|
159
|
+
const { mobile } = categories;
|
|
160
|
+
return Object.assign(Object.assign({}, mobile), { borderRadius: (0, exports.remsToPixels)(mobile.borderRadius), containerMaxWidth: (0, exports.remsToPixels)(mobile.containerMaxWidth), gap: (0, exports.remsToPixels)(mobile.gap), gapDouble: (0, exports.remsToPixels)(mobile.gapDouble), gapHalf: (0, exports.remsToPixels)(mobile.gapHalf), imageBorderRadius: (0, exports.remsToPixels)(mobile.imageBorderRadius), lineHeight: (0, exports.remsToPixels)(mobile.lineHeight), lineMargin: (0, exports.remsToPixels)(mobile.lineMargin), lineWidth: (0, exports.remsToPixels)(mobile.lineWidth), maxWidth: (0, exports.remsToPixels)(mobile.maxWidth), minWidth: (0, exports.remsToPixels)(mobile.minWidth), paddingBottom: (0, exports.remsToPixels)(mobile.paddingBottom), paddingHorizontal: (0, exports.remsToPixels)(mobile.paddingHorizontal), paddingTop: (0, exports.remsToPixels)(mobile.paddingTop), subtitleSize: (0, exports.remsToPixels)(mobile.subtitleSize), titleSize: (0, exports.remsToPixels)(mobile.titleSize) });
|
|
161
|
+
};
|
|
158
162
|
const makeMenuItems = (menuItems) => {
|
|
159
163
|
const { allergens, box, calories, container, content, image, price, tags, text, title } = menuItems;
|
|
160
164
|
return {
|
|
@@ -181,9 +185,11 @@ const decorateTheme = (theme) => {
|
|
|
181
185
|
const cards = makeCards(theme.cards);
|
|
182
186
|
const welcome = makeWelcome(theme.welcome);
|
|
183
187
|
const item = makeItem(theme.item);
|
|
188
|
+
const categories = makeCategories(theme.categories);
|
|
184
189
|
const menuItems = makeMenuItems(theme.menuItems);
|
|
185
190
|
return Object.assign(Object.assign({}, theme), { fonts: fonts, lineHeight, layout: layout, buttons: buttons, border, inputs: inputs, counts,
|
|
186
|
-
cards, welcome: welcome, item: item,
|
|
191
|
+
cards, welcome: welcome, item: item, categories,
|
|
192
|
+
menuItems });
|
|
187
193
|
};
|
|
188
194
|
exports.decorateTheme = decorateTheme;
|
|
189
195
|
const hexToRgbA = (hex, opacity) => {
|
package/dist/esm/utils/theme.js
CHANGED
|
@@ -146,6 +146,10 @@ const makeItem = (item) => {
|
|
|
146
146
|
const { mobile } = item;
|
|
147
147
|
return Object.assign(Object.assign({}, mobile), { padding: remsToPixels(mobile.padding), imagePadding: remsToPixels(mobile.imagePadding), maxWidth: remsToPixels(mobile.maxWidth), imageMinHeight: remsToPixels(mobile.imageMinHeight), imageMaxHeight: remsToPixels(mobile.imageMaxHeight) });
|
|
148
148
|
};
|
|
149
|
+
const makeCategories = (categories) => {
|
|
150
|
+
const { mobile } = categories;
|
|
151
|
+
return Object.assign(Object.assign({}, mobile), { borderRadius: remsToPixels(mobile.borderRadius), containerMaxWidth: remsToPixels(mobile.containerMaxWidth), gap: remsToPixels(mobile.gap), gapDouble: remsToPixels(mobile.gapDouble), gapHalf: remsToPixels(mobile.gapHalf), imageBorderRadius: remsToPixels(mobile.imageBorderRadius), lineHeight: remsToPixels(mobile.lineHeight), lineMargin: remsToPixels(mobile.lineMargin), lineWidth: remsToPixels(mobile.lineWidth), maxWidth: remsToPixels(mobile.maxWidth), minWidth: remsToPixels(mobile.minWidth), paddingBottom: remsToPixels(mobile.paddingBottom), paddingHorizontal: remsToPixels(mobile.paddingHorizontal), paddingTop: remsToPixels(mobile.paddingTop), subtitleSize: remsToPixels(mobile.subtitleSize), titleSize: remsToPixels(mobile.titleSize) });
|
|
152
|
+
};
|
|
149
153
|
const makeMenuItems = (menuItems) => {
|
|
150
154
|
const { allergens, box, calories, container, content, image, price, tags, text, title } = menuItems;
|
|
151
155
|
return {
|
|
@@ -172,9 +176,11 @@ export const decorateTheme = (theme) => {
|
|
|
172
176
|
const cards = makeCards(theme.cards);
|
|
173
177
|
const welcome = makeWelcome(theme.welcome);
|
|
174
178
|
const item = makeItem(theme.item);
|
|
179
|
+
const categories = makeCategories(theme.categories);
|
|
175
180
|
const menuItems = makeMenuItems(theme.menuItems);
|
|
176
181
|
return Object.assign(Object.assign({}, theme), { fonts: fonts, lineHeight, layout: layout, buttons: buttons, border, inputs: inputs, counts,
|
|
177
|
-
cards, welcome: welcome, item: item,
|
|
182
|
+
cards, welcome: welcome, item: item, categories,
|
|
183
|
+
menuItems });
|
|
178
184
|
};
|
|
179
185
|
export const hexToRgbA = (hex, opacity) => {
|
|
180
186
|
let c;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.112",
|
|
4
4
|
"description": "A library of utils for use with Open Tender applications that utilize our cloud-based Order API.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"typescript": "^4.8.2"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@open-tender/types": "^0.2.
|
|
57
|
+
"@open-tender/types": "^0.2.52",
|
|
58
58
|
"@reduxjs/toolkit": "^1.8.5",
|
|
59
59
|
"react": "^18.2.0"
|
|
60
60
|
},
|