@open-tender/store 0.3.66 → 0.3.67

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.
@@ -0,0 +1,2 @@
1
+ import { Layout } from '../types';
2
+ export declare const makeAsideWidth: (deviceWidth: number, layout: Layout) => number;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeAsideWidth = void 0;
4
+ var helpers_1 = require("./helpers");
5
+ var makeAsideWidth = function (deviceWidth, layout) {
6
+ var padding = (0, helpers_1.pixelsToInt)(layout.padding);
7
+ var asideWidth = (0, helpers_1.pixelsToInt)(layout.asideWidth);
8
+ var buttonWidth = (0, helpers_1.pixelsToInt)(layout.bigButton.width);
9
+ var remaining = deviceWidth - padding * 2 - asideWidth;
10
+ var count = Math.floor(remaining / buttonWidth);
11
+ return deviceWidth - count * buttonWidth - 2 * padding;
12
+ };
13
+ exports.makeAsideWidth = makeAsideWidth;
@@ -0,0 +1,2 @@
1
+ import { Layout } from '../types';
2
+ export declare const makeAsideWidth: (deviceWidth: number, layout: Layout) => number;
@@ -0,0 +1,9 @@
1
+ import { pixelsToInt } from './helpers';
2
+ export var makeAsideWidth = function (deviceWidth, layout) {
3
+ var padding = pixelsToInt(layout.padding);
4
+ var asideWidth = pixelsToInt(layout.asideWidth);
5
+ var buttonWidth = pixelsToInt(layout.bigButton.width);
6
+ var remaining = deviceWidth - padding * 2 - asideWidth;
7
+ var count = Math.floor(remaining / buttonWidth);
8
+ return deviceWidth - count * buttonWidth - 2 * padding;
9
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "0.3.66",
3
+ "version": "0.3.67",
4
4
  "description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",