@commonsku/styles 1.16.5 → 1.16.7
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/index.d.ts +78 -11
- package/dist/index.es.js +238 -291
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +245 -289
- package/dist/index.js.map +1 -1
- package/dist/styles/Artwork.d.ts +3 -3
- package/dist/styles/Artwork.d.ts.map +1 -1
- package/dist/styles/CollapsibleV2.d.ts +1 -0
- package/dist/styles/CollapsibleV2.d.ts.map +1 -1
- package/dist/styles/Csku.d.ts +11 -0
- package/dist/styles/Csku.d.ts.map +1 -1
- package/dist/styles/Img.d.ts +11 -13
- package/dist/styles/Img.d.ts.map +1 -1
- package/dist/styles/Input.d.ts +2 -0
- package/dist/styles/Input.d.ts.map +1 -1
- package/dist/styles/InputStepper.d.ts +19 -0
- package/dist/styles/InputStepper.d.ts.map +1 -1
- package/dist/styles/Popup.d.ts +4 -0
- package/dist/styles/Popup.d.ts.map +1 -1
- package/dist/styles/Tabs.d.ts +7 -6
- package/dist/styles/Tabs.d.ts.map +1 -1
- package/dist/styles/hooks/useClickOutside.d.ts.map +1 -1
- package/dist/styles/icons/CollaborateIcon.d.ts +6 -0
- package/dist/styles/icons/CollaborateIcon.d.ts.map +1 -0
- package/dist/styles/icons/CommunityIcon.d.ts +6 -0
- package/dist/styles/icons/CommunityIcon.d.ts.map +1 -0
- package/dist/styles/icons/ConnectedIcon.d.ts +6 -0
- package/dist/styles/icons/ConnectedIcon.d.ts.map +1 -0
- package/dist/styles/icons/ConnectedPlusIcon.d.ts +6 -0
- package/dist/styles/icons/ConnectedPlusIcon.d.ts.map +1 -0
- package/dist/styles/icons/EPOIcon.d.ts +6 -0
- package/dist/styles/icons/EPOIcon.d.ts.map +1 -0
- package/dist/styles/icons/InventoryIcon.d.ts +6 -0
- package/dist/styles/icons/InventoryIcon.d.ts.map +1 -0
- package/dist/styles/icons/OrderStatusIcon.d.ts +6 -0
- package/dist/styles/icons/OrderStatusIcon.d.ts.map +1 -0
- package/dist/styles/icons/index.d.ts +7 -0
- package/dist/styles/icons/index.d.ts.map +1 -1
- package/dist/styles/index.d.ts +2 -1
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/styled.d.ts +13 -0
- package/dist/utils/styled.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -372,7 +372,19 @@ var getUnit = function (measurement) {
|
|
|
372
372
|
var stripUnit = function (measurement) {
|
|
373
373
|
return (typeof measurement === "number") ? measurement : parseFloat(measurement);
|
|
374
374
|
};
|
|
375
|
-
var parseMeasurement = function (measurement) { return stripUnit(measurement) + getUnit(measurement); };
|
|
375
|
+
var parseMeasurement = function (measurement) { return stripUnit(measurement) + getUnit(measurement); };
|
|
376
|
+
var wait = function (time) {
|
|
377
|
+
var timeoutId;
|
|
378
|
+
var promise = new Promise(function (resolve) {
|
|
379
|
+
timeoutId = setTimeout(resolve, time);
|
|
380
|
+
});
|
|
381
|
+
return {
|
|
382
|
+
promise: promise,
|
|
383
|
+
cancel: function () {
|
|
384
|
+
clearTimeout(timeoutId);
|
|
385
|
+
},
|
|
386
|
+
};
|
|
387
|
+
};
|
|
376
388
|
|
|
377
389
|
var SharedStyles = styled.css(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n box-sizing: border-box;\n ", "\n"], ["\n box-sizing: border-box;\n ", "\n"])), function (p) { return _.map(_.pick(p, _.keys(SHARED_STYLE_MAPS)), function (v, k) {
|
|
378
390
|
return _.isUndefined(v) ? '' : SHARED_STYLE_MAPS[k](v);
|
|
@@ -2319,6 +2331,70 @@ function HandleIcon(_a) {
|
|
|
2319
2331
|
React__default.createElement("path", { d: "M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z", fill: color }));
|
|
2320
2332
|
}
|
|
2321
2333
|
|
|
2334
|
+
function CommunityIcon(_a) {
|
|
2335
|
+
var _b = _a.size, size = _b === void 0 ? "medium" : _b, _c = _a.altText, altText = _c === void 0 ? "Community" : _c, props = __rest(_a, ["size", "altText"]);
|
|
2336
|
+
return React__default.createElement(SVG, __assign({ size: size, "aria-labelledby": "CommunityIcon" }, props),
|
|
2337
|
+
React__default.createElement("title", { id: "CommunityIcon" }, altText),
|
|
2338
|
+
React__default.createElement("path", { d: "M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z", fill: "#5BBDEC" }),
|
|
2339
|
+
React__default.createElement("path", { d: "M13.6999 18.6333V17.9C13.6999 16.9333 12.9333 16.1666 11.9999 16.1666H11.9666C11.0333 16.1666 10.2999 16.9333 10.2999 17.8666V18.6333H6.49994C6.23328 18.6333 6.03328 18.4333 6.03328 18.1666V14.0333H5.26661C4.13328 14.0333 3.23328 13.1333 3.23328 12C3.23328 10.8666 4.16661 9.96664 5.26661 9.96664H6.03328V5.8333C6.03328 5.56664 6.23328 5.36664 6.49994 5.36664H10.2999V6.1333C10.2999 7.06664 11.0666 7.8333 11.9999 7.8333C12.9333 7.8333 13.6999 7.06664 13.6999 6.1333V5.36664H17.4999C17.7666 5.36664 17.9666 5.56664 17.9666 5.8333V9.96664H18.7333C19.8666 9.96664 20.7666 10.8666 20.7666 12C20.7666 13.1333 19.8666 14.0333 18.7333 14.0333H17.9666V18.1666C17.9666 18.4333 17.7666 18.6333 17.4999 18.6333H13.6999Z", fill: "white" }),
|
|
2340
|
+
React__default.createElement("path", { d: "M6.49998 5.53335H10.1333V6.13335C10.1333 7.16668 10.9667 8.00001 12 8.00001C13.0333 8.00001 13.8666 7.16668 13.8666 6.13335V5.53335H17.5C17.6667 5.53335 17.8 5.66668 17.8 5.83335V10.1333H18.7333C19.7667 10.1333 20.6 10.9667 20.6 12C20.6 13.0333 19.7667 13.8667 18.7333 13.8667H17.8V18.1667C17.8 18.3333 17.6667 18.4667 17.5 18.4667H13.8666V17.9C13.8666 16.8667 13.0333 16 12 16H11.9667C10.9333 16 10.1333 16.8333 10.1333 17.8667V18.4667H6.49998C6.33332 18.4667 6.19998 18.3333 6.19998 18.1667V13.8667H5.26665C4.23332 13.8667 3.39998 13.0333 3.39998 12C3.39998 10.9667 4.23332 10.1333 5.26665 10.1333H6.19998V5.83335C6.19998 5.66668 6.33332 5.53335 6.49998 5.53335ZM6.49998 5.20001C6.16665 5.20001 5.86665 5.46668 5.86665 5.83335V9.80001H5.26665C4.03332 9.80001 3.06665 10.8 3.06665 12C3.06665 13.2333 4.06665 14.2 5.26665 14.2H5.86665V18.1667C5.86665 18.5 6.13332 18.8 6.49998 18.8H10.1333H10.4667V18.4667V17.8667C10.4667 17.0333 11.1333 16.3333 11.9667 16.3333H12C12.8333 16.3333 13.5333 17.0667 13.5333 17.9V18.4667V18.8H13.8666H17.5C17.8333 18.8 18.1333 18.5333 18.1333 18.1667V14.2H18.7333C19.9667 14.2 20.9333 13.2 20.9333 12C20.9333 10.7667 19.9333 9.80001 18.7333 9.80001H18.1333V5.83335C18.1333 5.50001 17.8667 5.20001 17.5 5.20001H13.8666H13.5333V5.53335V6.13335C13.5333 6.96668 12.8333 7.66668 12 7.66668C11.1667 7.66668 10.4667 6.96668 10.4667 6.13335V5.53335V5.20001H10.1333H6.49998Z", fill: "#5BBDEC" }),
|
|
2341
|
+
React__default.createElement("path", { d: "M12 12.2C12.7916 12.2 13.4333 11.5583 13.4333 10.7666C13.4333 9.97504 12.7916 9.33331 12 9.33331C11.2084 9.33331 10.5667 9.97504 10.5667 10.7666C10.5667 11.5583 11.2084 12.2 12 12.2Z", fill: "#5BBDEC" }),
|
|
2342
|
+
React__default.createElement("path", { d: "M14.5333 14.6667H9.46667C9.46667 13.2667 10.6 12.1334 12 12.1334C13.4 12.1334 14.5333 13.2667 14.5333 14.6667Z", fill: "#5BBDEC" }));
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
function ConnectedIcon(_a) {
|
|
2346
|
+
var _b = _a.size, size = _b === void 0 ? "medium" : _b, _c = _a.altText, altText = _c === void 0 ? "Connected" : _c, props = __rest(_a, ["size", "altText"]);
|
|
2347
|
+
return React__default.createElement(SVG, __assign({ size: size, "aria-labelledby": "ConnectedIcon" }, props),
|
|
2348
|
+
React__default.createElement("title", { id: "ConnectedIcon" }, altText),
|
|
2349
|
+
React__default.createElement("path", { d: "M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z", fill: "#0F6EA6" }),
|
|
2350
|
+
React__default.createElement("path", { d: "M9.06661 16.1334V15.7C9.06661 14.9667 8.46661 14.3334 7.73328 14.3334C6.96661 14.3334 6.33328 14.9667 6.33328 15.7334V16.1334H3.73328V8.30002C3.73328 8.26669 3.76661 8.20002 3.83328 8.20002H6.66661V7.43336C6.66661 6.86669 7.13328 6.40002 7.66661 6.40002C8.23328 6.40002 8.73328 6.90002 8.73328 7.46669V8.20002H11.5999C11.6333 8.20002 11.6666 8.23336 11.6666 8.26669V10.8H11.2666C10.8999 10.8 10.5333 10.9667 10.2666 11.2334C9.99994 11.5 9.86661 11.8334 9.86661 12.2C9.86661 12.9334 10.4999 13.5334 11.2333 13.5334H11.6666V16.0667C11.6666 16.1 11.6333 16.1334 11.5999 16.1334H9.06661Z", fill: "white" }),
|
|
2351
|
+
React__default.createElement("path", { d: "M7.69998 6.23334V6.56667C8.16665 6.56667 8.56665 6.96667 8.56665 7.46667V8.03334V8.36667H8.89998H11.5V10.6333H11.2667C10.8333 10.6333 10.4333 10.8 10.1333 11.1C9.83332 11.4 9.69998 11.7667 9.69998 12.2C9.69998 13.0333 10.4 13.7 11.2333 13.7H11.5V15.9667H9.23332V15.7C9.23332 14.8667 8.56665 14.2 7.73332 14.1667H7.69998C6.86665 14.1667 6.16665 14.8667 6.16665 15.7333V15.9667H3.89998V8.36667H6.49998H6.83332V8.03334V7.43334C6.83332 6.96667 7.19998 6.56667 7.66665 6.56667V6.23334M7.69998 6.23334C7.69998 6.23334 7.66665 6.23334 7.69998 6.23334C7.03332 6.23334 6.49998 6.76667 6.49998 7.43334V8.03334H3.83332C3.69998 8.03334 3.56665 8.13334 3.56665 8.3V16.3H6.49998V15.7333C6.49998 15.0667 7.03332 14.5 7.69998 14.5C7.69998 14.5 7.69998 14.5 7.73332 14.5C8.39998 14.5 8.89998 15.0333 8.89998 15.7V16.3H11.6C11.7333 16.3 11.8333 16.2 11.8333 16.0667V13.3667H11.2333C10.5667 13.3667 10.0333 12.8333 10.0333 12.2C10.0333 11.5333 10.6 10.9667 11.2667 10.9667H11.8333V8.26667C11.8333 8.13334 11.7333 8.03334 11.6 8.03334H8.89998V7.46667C8.89998 6.8 8.36665 6.23334 7.69998 6.23334Z", fill: "#0F6EA6" }),
|
|
2352
|
+
React__default.createElement("path", { d: "M17.3333 16.1333V15.7C17.3333 14.9333 16.7333 14.3333 15.9666 14.3333C15.2 14.3333 14.6 14.9333 14.6 15.7V16.1333H12V13.3667V13.2H11.2333C10.6666 13.2 10.2 12.7333 10.2 12.1667C10.2 11.6 10.6666 11.1333 11.2333 11.1333H12V8.23335L14.6 8.20001V8.60001C14.6 9.36668 15.2 10 15.9666 10C16.7333 10 17.3333 9.36668 17.3333 8.63335V8.20001H19.9L19.9333 10.9667V11.1333H20.7C21.2666 11.1333 21.7333 11.6 21.7333 12.1667C21.7333 12.7333 21.2666 13.2 20.7 13.2H19.9333V16.1L19.9 16.1333H17.3333Z", fill: "white" }),
|
|
2353
|
+
React__default.createElement("path", { d: "M19.7667 8.36666V10.9667V11.3H20.1H20.7C21.1667 11.3 21.5667 11.7 21.5667 12.1667C21.5667 12.6333 21.1667 13.0333 20.7 13.0333H20.1H19.7667V13.3667V15.9667H17.5V15.7C17.5 14.8667 16.8 14.1667 15.9667 14.1667C15.1333 14.1667 14.4333 14.8667 14.4333 15.7V15.9667H12.1667V13.3667V13.0333H11.8333H11.2333C10.7667 13.0333 10.3667 12.6333 10.3667 12.1667C10.3667 11.7 10.7667 11.3 11.2333 11.3H11.8333H12.1667V10.9667V8.36666H14.4333V8.59999C14.4333 9.46666 15.1333 10.1667 15.9667 10.1667H16C16.8333 10.1667 17.5 9.46666 17.5 8.63332V8.36666H19.7667ZM19.9 8.03333H17.1667V8.63332C17.1667 9.29999 16.6333 9.83333 16 9.83333H15.9667C15.3 9.83333 14.7667 9.26666 14.7667 8.59999V8.03333H12C11.9 8.03333 11.8 8.09999 11.8 8.23333V10.9667H11.2C10.5333 10.9667 10 11.5 10 12.1667C10 12.8333 10.5333 13.3667 11.2 13.3667H11.8V16.1C11.8 16.2 11.8667 16.3 12 16.3H14.7333V15.7C14.7333 15.0333 15.2667 14.5 15.9333 14.5C16.6 14.5 17.1333 15.0333 17.1333 15.7V16.3H19.8667C19.9667 16.3 20.0667 16.2333 20.0667 16.1V13.3667H20.6667C21.3333 13.3667 21.8667 12.8333 21.8667 12.1667C21.8667 11.5 21.3333 10.9667 20.6667 10.9667H20.0667V8.23333C20.1 8.13333 20 8.03333 19.9 8.03333Z", fill: "#0F6EA6" }));
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
function ConnectedPlusIcon(_a) {
|
|
2357
|
+
var _b = _a.size, size = _b === void 0 ? "medium" : _b, _c = _a.altText, altText = _c === void 0 ? "ConnectedPlus" : _c, props = __rest(_a, ["size", "altText"]);
|
|
2358
|
+
return React__default.createElement(SVG, __assign({ size: size, "aria-labelledby": "ConnectedPlusIcon" }, props),
|
|
2359
|
+
React__default.createElement("title", { id: "ConnectedPlusIcon" }, altText),
|
|
2360
|
+
React__default.createElement("path", { d: "M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z", fill: "#003C5E" }),
|
|
2361
|
+
React__default.createElement("path", { d: "M9.70007 12.2334V11.9C9.70007 11.2667 9.20007 10.7334 8.53341 10.7334C7.86674 10.7334 7.33341 11.2667 7.33341 11.9334V12.2334H5.20007V5.70002C5.20007 5.66669 5.23341 5.66669 5.23341 5.66669H7.63341V5.00002C7.63341 4.53335 8.00007 4.16669 8.46674 4.16669C8.93341 4.16669 9.33341 4.56669 9.33341 5.03335V5.66669H11.7667C11.8001 5.66669 11.8001 5.66669 11.8001 5.70002V7.80002H11.5001C11.1667 7.80002 10.8667 7.93335 10.6334 8.16669C10.4001 8.40002 10.3001 8.70002 10.3001 9.00002C10.3001 9.63335 10.8334 10.1667 11.4667 10.1667H11.8001V12.2667C11.8001 12.3 11.8001 12.3 11.7667 12.3H9.70007V12.2334Z", fill: "white" }),
|
|
2362
|
+
React__default.createElement("path", { d: "M8.53331 4.30001C8.89998 4.30001 9.19998 4.63334 9.19998 5.00001V5.46667V5.80001H9.53331H11.6666V7.60001H11.5333C11.1666 7.60001 10.8 7.76667 10.5666 8.00001C10.3 8.26667 10.1666 8.60001 10.2 8.96667C10.2 9.70001 10.8 10.2667 11.5333 10.2667H11.6666V12.0667H9.86664V11.9C9.86664 11.1667 9.26664 10.5667 8.56664 10.5667H8.53331C7.79998 10.5667 7.19998 11.1667 7.19998 11.9333V12.0667H5.39998V5.80001H7.53331H7.86664V5.46667V4.96667C7.86664 4.60001 8.16664 4.30001 8.53331 4.30001ZM8.53331 3.96667C7.96664 3.96667 7.53331 4.43334 7.53331 4.96667V5.46667H5.29998C5.16664 5.46667 5.09998 5.56667 5.09998 5.66667V12.4H7.56664V11.9333C7.56664 11.3667 8.03331 10.9 8.56664 10.9C8.56664 10.9 8.56664 10.9 8.59998 10.9C9.13331 10.9 9.59998 11.3667 9.59998 11.9V12.4H11.8666C11.9666 12.4 12.0666 12.3 12.0666 12.2V9.93334H11.5666C11.0333 9.93334 10.5666 9.50001 10.5666 8.93334C10.5666 8.36667 11.0333 7.90001 11.6 7.90001H12V5.66667C12 5.56667 11.9 5.46667 11.8 5.46667H9.53331V5.00001C9.53331 4.43334 9.09998 3.96667 8.53331 3.96667Z", fill: "#003C5E" }),
|
|
2363
|
+
React__default.createElement("path", { d: "M16.6333 12.2333V11.9C16.6333 11.2666 16.1 10.7333 15.4666 10.7333C14.8333 10.7333 14.3 11.2666 14.3 11.9V12.2333H12.1666V9.76663H11.5C11.0333 9.76663 10.6666 9.39997 10.6666 8.9333C10.6666 8.46663 11.0333 8.09997 11.5 8.09997H12.1666V5.6333H14.3V5.96663C14.3 6.6333 14.8333 7.16663 15.4666 7.16663C16.1333 7.16663 16.6333 6.6333 16.6333 5.99997V5.66663H18.7666V8.1333H19.4333C19.9 8.1333 20.2666 8.49997 20.2666 8.96663C20.2666 9.4333 19.9 9.79997 19.4333 9.79997H18.7666V12.2666H16.6333V12.2333Z", fill: "white" }),
|
|
2364
|
+
React__default.createElement("path", { d: "M18.6 5.80002V7.93335V8.26668H18.9333H19.4333C19.8 8.26668 20.1 8.56668 20.1 8.93335C20.1 9.30002 19.8 9.60002 19.4333 9.60002H18.9333H18.6V9.93335V12.0667H16.8V11.9C16.8 11.1667 16.2 10.5667 15.4667 10.5667C14.7333 10.5667 14.1333 11.1667 14.1333 11.9V12.0667H12.3333V9.93335V9.60002H12H11.5C11.1333 9.60002 10.8333 9.30002 10.8333 8.93335C10.8333 8.56668 11.1333 8.26668 11.5 8.26668H12H12.3333V7.93335V5.80002H14.1333V5.96668C14.1333 6.73335 14.7333 7.33335 15.4667 7.33335H15.5C16.2333 7.33335 16.8 6.73335 16.8 6.00002V5.83335H18.6M18.8 5.46668H16.5V5.96668C16.5 6.53335 16.0667 6.96668 15.5 6.96668C15.5 6.96668 15.5 6.96668 15.4667 6.96668C14.9 6.96668 14.4667 6.50002 14.4667 5.93335V5.43335H12.1667C12.0667 5.43335 12 5.50002 12 5.60002V7.90002H11.5C10.9333 7.90002 10.5 8.36668 10.5 8.90002C10.5 9.46668 10.9667 9.90002 11.5 9.90002H12V12.2C12 12.3 12.0667 12.3667 12.1667 12.3667H14.4667V11.8667C14.4667 11.3 14.9333 10.8667 15.4667 10.8667C16.0333 10.8667 16.4667 11.3333 16.4667 11.8667V12.3667H18.7667C18.8667 12.3667 18.9333 12.3 18.9333 12.2V9.90002H19.4333C20 9.90002 20.4333 9.43335 20.4333 8.90002C20.4333 8.33335 19.9667 7.90002 19.4333 7.90002H18.9333V5.60002C18.9333 5.53335 18.8667 5.46668 18.8 5.46668Z", fill: "#003C5E" }),
|
|
2365
|
+
React__default.createElement("path", { d: "M5.23328 19.2V16.7333H4.56661C4.09994 16.7333 3.73328 16.3666 3.73328 15.9C3.73328 15.4333 4.09994 15.0666 4.56661 15.0666H5.23328V12.6H7.69994V11.9333C7.69994 11.4666 8.06661 11.1 8.53328 11.1C8.73328 11.1 8.89994 11.1666 9.06661 11.2666C9.23328 11.3666 9.36661 11.6333 9.36661 11.8V12.6H11.8333V14.7333H11.4999C10.8666 14.7333 10.3333 15.2666 10.3333 15.9C10.3333 16.5333 10.8666 17.0666 11.4999 17.0666H11.8333V19.2H5.23328Z", fill: "white" }),
|
|
2366
|
+
React__default.createElement("path", { d: "M8.53332 11.2334C8.69998 11.2334 8.83332 11.2667 8.99998 11.3667C9.09998 11.4334 9.23332 11.6334 9.23332 11.7667V12.4V12.7334H9.56665H11.6667V14.5334H11.5C10.7667 14.5334 10.1667 15.1334 10.1667 15.8667C10.1667 16.6 10.7667 17.2 11.5 17.2H11.6667V19H5.39998V16.8667V16.5334H5.06665H4.56665C4.19998 16.5334 3.89998 16.2334 3.89998 15.8667C3.89998 15.5 4.19998 15.2 4.56665 15.2H5.06665H5.39998V14.8667V12.7334H7.53332H7.86665V12.4V11.9C7.86665 11.7334 7.93332 11.5667 8.06665 11.4334C8.16665 11.3 8.36665 11.2334 8.53332 11.2334ZM8.53332 10.9C7.96665 10.9 7.53332 11.3667 7.53332 11.9V12.4H5.06665V14.8667H4.56665C3.99998 14.8667 3.56665 15.3334 3.56665 15.8667C3.56665 16.4334 4.03332 16.8667 4.56665 16.8667H5.06665V19.3334H12V16.8667H11.5C10.9333 16.8667 10.5 16.4 10.5 15.8667C10.5 15.3 10.9667 14.8667 11.5 14.8667H12V12.4H9.53332V11.7667C9.53332 11.5334 9.36665 11.2 9.16665 11.0667C8.96665 10.9667 8.73332 10.9 8.53332 10.9Z", fill: "#003C5E" }),
|
|
2367
|
+
React__default.createElement("path", { d: "M16.9666 15.5H15.8V14.3333C15.8 14.1333 15.6666 14 15.4666 14C15.2666 14 15.1333 14.1333 15.1333 14.3333V15.5H13.9666C13.7666 15.5 13.6333 15.6333 13.6333 15.8333C13.6333 16.0333 13.7666 16.1667 13.9666 16.1667H15.1333V17.3333C15.1333 17.5333 15.2666 17.6667 15.4666 17.6667C15.6666 17.6667 15.8 17.5333 15.8 17.3333V16.1667H16.9666C17.1666 16.1667 17.3 16.0333 17.3 15.8333C17.3 15.6333 17.1666 15.5 16.9666 15.5Z", fill: "white" }));
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2370
|
+
function CollaborateIcon(_a) {
|
|
2371
|
+
var _b = _a.color, color = _b === void 0 ? teal.main : _b, _c = _a.size, size = _c === void 0 ? "medium" : _c, _d = _a.altText, altText = _d === void 0 ? "Collaborate" : _d, props = __rest(_a, ["color", "size", "altText"]);
|
|
2372
|
+
return React__default.createElement(SVG, __assign({ size: size, "aria-labelledby": "CollaborateIcon" }, props),
|
|
2373
|
+
React__default.createElement("title", { id: "CollaborateIcon" }, altText),
|
|
2374
|
+
React__default.createElement("path", { d: "M9 21C9 21.55 9.45 22 10 22H14C14.55 22 15 21.55 15 21V20H9V21ZM12 2C8.14 2 5 5.14 5 9C5 11.38 6.19 13.47 8 14.74V17C8 17.55 8.45 18 9 18H15C15.55 18 16 17.55 16 17V14.74C17.81 13.47 19 11.38 19 9C19 5.14 15.86 2 12 2ZM14.85 13.1L14 13.7V16H10V13.7L9.15 13.1C7.8 12.16 7 10.63 7 9C7 6.24 9.24 4 12 4C14.76 4 17 6.24 17 9C17 10.63 16.2 12.16 14.85 13.1Z", fill: color }));
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
function InventoryIcon(_a) {
|
|
2378
|
+
var _b = _a.color, color = _b === void 0 ? teal.main : _b, _c = _a.size, size = _c === void 0 ? "medium" : _c, _d = _a.altText, altText = _d === void 0 ? "Inventory" : _d, props = __rest(_a, ["color", "size", "altText"]);
|
|
2379
|
+
return React__default.createElement(SVG, __assign({ size: size, "aria-labelledby": "InventoryIcon" }, props),
|
|
2380
|
+
React__default.createElement("title", { id: "InventoryIcon" }, altText),
|
|
2381
|
+
React__default.createElement("path", { d: "M20.54 5.23L19.15 3.55C18.88 3.21 18.47 3 18 3H6C5.53 3 5.12 3.21 4.84 3.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V6.5C21 6.02 20.83 5.57 20.54 5.23ZM6.24 5H17.76L18.57 5.97H5.44L6.24 5ZM5 19V8H19V19H5ZM13.45 10H10.55V13H8L12 17L16 13H13.45V10Z", fill: color }));
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
function OrderStatusIcon(_a) {
|
|
2385
|
+
var _b = _a.color, color = _b === void 0 ? teal.main : _b, _c = _a.size, size = _c === void 0 ? "medium" : _c, _d = _a.altText, altText = _d === void 0 ? "OrderStatus" : _d, props = __rest(_a, ["color", "size", "altText"]);
|
|
2386
|
+
return React__default.createElement(SVG, __assign({ size: size, "aria-labelledby": "OrderStatusIcon" }, props),
|
|
2387
|
+
React__default.createElement("title", { id: "OrderStatusIcon" }, altText),
|
|
2388
|
+
React__default.createElement("path", { d: "M20 8H17V4H3C1.9 4 1 4.9 1 6V17H3C3 18.66 4.34 20 6 20C7.66 20 9 18.66 9 17H15C15 18.66 16.34 20 18 20C19.66 20 21 18.66 21 17H23V12L20 8ZM19.5 9.5L21.46 12H17V9.5H19.5ZM6 18C5.45 18 5 17.55 5 17C5 16.45 5.45 16 6 16C6.55 16 7 16.45 7 17C7 17.55 6.55 18 6 18ZM8.22 15C7.67 14.39 6.89 14 6 14C5.11 14 4.33 14.39 3.78 15H3V6H15V15H8.22ZM18 18C17.45 18 17 17.55 17 17C17 16.45 17.45 16 18 16C18.55 16 19 16.45 19 17C19 17.55 18.55 18 18 18Z", fill: color }));
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2391
|
+
function EPOIcon(_a) {
|
|
2392
|
+
var _b = _a.color, color = _b === void 0 ? teal.main : _b, _c = _a.size, size = _c === void 0 ? "medium" : _c, _d = _a.altText, altText = _d === void 0 ? "EPO" : _d, props = __rest(_a, ["color", "size", "altText"]);
|
|
2393
|
+
return React__default.createElement(SVG, __assign({ size: size, "aria-labelledby": "EPOIcon" }, props),
|
|
2394
|
+
React__default.createElement("title", { id: "EPOIcon" }, altText),
|
|
2395
|
+
React__default.createElement("path", { d: "M7 16H14V18H7V16ZM7 12H17V14H7V12ZM7 8H17V10H7V8ZM19 4H14.82C14.4 2.84 13.3 2 12 2C10.7 2 9.6 2.84 9.18 4H5C4.86 4 4.73 4.01 4.6 4.04C4.21 4.12 3.86 4.32 3.59 4.59C3.41 4.77 3.26 4.99 3.16 5.23C3.06 5.46 3 5.72 3 6V20C3 20.27 3.06 20.54 3.16 20.78C3.26 21.02 3.41 21.23 3.59 21.42C3.86 21.69 4.21 21.89 4.6 21.97C4.73 21.99 4.86 22 5 22H19C20.1 22 21 21.1 21 20V6C21 4.9 20.1 4 19 4ZM12 3.75C12.41 3.75 12.75 4.09 12.75 4.5C12.75 4.91 12.41 5.25 12 5.25C11.59 5.25 11.25 4.91 11.25 4.5C11.25 4.09 11.59 3.75 12 3.75ZM19 20H5V6H19V20Z", fill: color }));
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2322
2398
|
var avatarSizes = {
|
|
2323
2399
|
tiny: {
|
|
2324
2400
|
size: '24px',
|
|
@@ -2841,6 +2917,75 @@ var ButtonIcon = React__default.forwardRef(function (props, ref) {
|
|
|
2841
2917
|
});
|
|
2842
2918
|
var templateObject_1$d, templateObject_2$8;
|
|
2843
2919
|
|
|
2920
|
+
var LOADING_IMG_SRC = '/images/gears.gif';
|
|
2921
|
+
var NOT_FOUND_IMG_SRC = '/images/404.png';
|
|
2922
|
+
var DEFAULT_MAX_ATTEMPTS = 3;
|
|
2923
|
+
var DEFAULT_ATTEMPT_INTERVAL = 1000;
|
|
2924
|
+
// fetch image src, and return intervals.length times on error. wait intervals[n] ms on nth retry
|
|
2925
|
+
var fetchImage = function (src, intervals, onRetry) {
|
|
2926
|
+
var image = new Image();
|
|
2927
|
+
var cancel = function () {
|
|
2928
|
+
image.src = '';
|
|
2929
|
+
};
|
|
2930
|
+
var promise = new Promise(function (resolve, reject) {
|
|
2931
|
+
image.src = src;
|
|
2932
|
+
image.onload = resolve;
|
|
2933
|
+
image.onerror = reject;
|
|
2934
|
+
}).catch(function (error) {
|
|
2935
|
+
if (_.isEmpty(intervals)) {
|
|
2936
|
+
throw error;
|
|
2937
|
+
}
|
|
2938
|
+
else if (image.src === '') {
|
|
2939
|
+
return error;
|
|
2940
|
+
}
|
|
2941
|
+
else {
|
|
2942
|
+
onRetry && onRetry(error);
|
|
2943
|
+
var w = wait(intervals[0]);
|
|
2944
|
+
cancel = w.cancel;
|
|
2945
|
+
return w.promise.then(function () {
|
|
2946
|
+
var result = fetchImage(src, _.tail(intervals), onRetry);
|
|
2947
|
+
cancel = result.cancel;
|
|
2948
|
+
return result.promise;
|
|
2949
|
+
});
|
|
2950
|
+
}
|
|
2951
|
+
});
|
|
2952
|
+
return {
|
|
2953
|
+
promise: promise,
|
|
2954
|
+
cancel: function () {
|
|
2955
|
+
// use this to cancel next fetch
|
|
2956
|
+
cancel();
|
|
2957
|
+
}
|
|
2958
|
+
};
|
|
2959
|
+
};
|
|
2960
|
+
var Img = React__default.forwardRef(function (_a, ref) {
|
|
2961
|
+
var src = _a.src, _b = _a.alt, alt = _b === void 0 ? "" : _b, _c = _a.max_attempts, max_attempts = _c === void 0 ? DEFAULT_MAX_ATTEMPTS : _c, _d = _a.attempt_interval, attempt_interval = _d === void 0 ? DEFAULT_ATTEMPT_INTERVAL : _d, _e = _a.onRetry, onRetry = _e === void 0 ? null : _e, _f = _a.onFailed, onFailed = _f === void 0 ? null : _f, props = __rest(_a, ["src", "alt", "max_attempts", "attempt_interval", "onRetry", "onFailed"]);
|
|
2962
|
+
var _g = React.useState(true), loading = _g[0], setLoading = _g[1];
|
|
2963
|
+
var _h = React.useState(null), error = _h[0], setError = _h[1];
|
|
2964
|
+
var effectRef = React.useRef({});
|
|
2965
|
+
_.assign(effectRef.current, { onRetry: onRetry, onFailed: onFailed });
|
|
2966
|
+
React.useEffect(function () {
|
|
2967
|
+
var _a = effectRef.current, onRetry = _a.onRetry, onFailed = _a.onFailed, cancel = _a.cancel;
|
|
2968
|
+
// cancel previous fetch before start new fetch
|
|
2969
|
+
cancel && cancel();
|
|
2970
|
+
var result = fetchImage(src !== null && src !== void 0 ? src : "", _.map(_.range(max_attempts), function (i) {
|
|
2971
|
+
return attempt_interval * (i + 1) * (i + 1);
|
|
2972
|
+
}), onRetry);
|
|
2973
|
+
effectRef.current.cancel = result.cancel;
|
|
2974
|
+
result.promise
|
|
2975
|
+
.then(function () {
|
|
2976
|
+
setError(null);
|
|
2977
|
+
})
|
|
2978
|
+
.catch(function (e) {
|
|
2979
|
+
onFailed && onFailed(e);
|
|
2980
|
+
setError(e);
|
|
2981
|
+
})
|
|
2982
|
+
.finally(function () {
|
|
2983
|
+
setLoading(false);
|
|
2984
|
+
});
|
|
2985
|
+
}, [src, attempt_interval, max_attempts]);
|
|
2986
|
+
return React__default.createElement("img", __assign({ ref: ref, alt: alt, src: loading ? LOADING_IMG_SRC : (error ? NOT_FOUND_IMG_SRC : src) }, props));
|
|
2987
|
+
});
|
|
2988
|
+
|
|
2844
2989
|
var Label = styled__default.label(templateObject_1$e || (templateObject_1$e = __makeTemplateObject(["\n &&& {\n font-family: 'skufont-medium', sans-serif;\n color: ", ";\n font-size: 1rem;\n font-weight: 400;\n width: 100%;\n ", "\n }\n"], ["\n &&& {\n font-family: 'skufont-medium', sans-serif;\n color: ", ";\n font-size: 1rem;\n font-weight: 400;\n width: 100%;\n ", "\n }\n"])), function (props) { return props.error ? getThemeColor(props, 'special3') : getThemeColor(props, 'textlabel'); }, SharedStyles);
|
|
2845
2990
|
var templateObject_1$e;
|
|
2846
2991
|
|
|
@@ -2938,10 +3083,10 @@ var LabeledInput = React__default.forwardRef(function (_a, ref) {
|
|
|
2938
3083
|
React__default.createElement(Input, __assign({ ref: ref, name: name, required: required }, props))));
|
|
2939
3084
|
});
|
|
2940
3085
|
var LabeledIconInput = React__default.forwardRef(function (_a, ref) {
|
|
2941
|
-
var label = _a.label, name = _a.name, value = _a.value, defaultValue = _a.defaultValue, placeholder = _a.placeholder, required = _a.required, _b = _a.labelOnTop, labelOnTop = _b === void 0 ? false : _b, Icon = _a.Icon, noMargin = _a.noMargin, error = _a.error, disabled = _a.disabled, onFocus = _a.onFocus, onChange = _a.onChange, onBlur = _a.onBlur, _c = _a.iconPosition, iconPosition = _c === void 0 ? 'left' : _c, _d = _a.iconLabelStyles, iconLabelStyles =
|
|
3086
|
+
var label = _a.label, name = _a.name, value = _a.value, defaultValue = _a.defaultValue, placeholder = _a.placeholder, required = _a.required, _b = _a.labelOnTop, labelOnTop = _b === void 0 ? false : _b, Icon = _a.Icon, noMargin = _a.noMargin, error = _a.error, disabled = _a.disabled, onFocus = _a.onFocus, onChange = _a.onChange, onBlur = _a.onBlur, _c = _a.iconPosition, iconPosition = _c === void 0 ? 'left' : _c, _d = _a.iconColor, iconColor = _d === void 0 ? '#fff' : _d, _e = _a.iconLabelStyles, iconLabelStyles = _e === void 0 ? {} : _e, _f = _a.containerStyle, containerStyle = _f === void 0 ? {} : _f, props = __rest(_a, ["label", "name", "value", "defaultValue", "placeholder", "required", "labelOnTop", "Icon", "noMargin", "error", "disabled", "onFocus", "onChange", "onBlur", "iconPosition", "iconColor", "iconLabelStyles", "containerStyle"]);
|
|
2942
3087
|
var containerRef = React.useRef(null);
|
|
2943
|
-
var
|
|
2944
|
-
var
|
|
3088
|
+
var _g = React.useState(false), isActive = _g[0], setIsActive = _g[1];
|
|
3089
|
+
var _h = React.useState(false), isHovering = _h[0], setIsHovering = _h[1];
|
|
2945
3090
|
var activeBorderColor = getThemeColor(props, 'input.active.border', colors.input.active.border);
|
|
2946
3091
|
var activeTextColor = colors.input.active.text;
|
|
2947
3092
|
var errorBorderColor = getThemeColor(props, 'input.error.border', colors.input.error.border);
|
|
@@ -2966,8 +3111,8 @@ var LabeledIconInput = React__default.forwardRef(function (_a, ref) {
|
|
|
2966
3111
|
};
|
|
2967
3112
|
var NewIcon = React__default.useMemo(function () {
|
|
2968
3113
|
var iconProps = {
|
|
2969
|
-
fill:
|
|
2970
|
-
color:
|
|
3114
|
+
fill: iconColor,
|
|
3115
|
+
color: iconColor,
|
|
2971
3116
|
};
|
|
2972
3117
|
if (error) {
|
|
2973
3118
|
iconProps['fill'] = errorBorderColor;
|
|
@@ -2986,7 +3131,7 @@ var LabeledIconInput = React__default.forwardRef(function (_a, ref) {
|
|
|
2986
3131
|
iconProps['color'] = colors.input.icon.active.fill;
|
|
2987
3132
|
}
|
|
2988
3133
|
return React__default.cloneElement(Icon, iconProps);
|
|
2989
|
-
}, [Icon, error, disabled, errorBorderColor, isActive, isHovering]);
|
|
3134
|
+
}, [Icon, error, disabled, errorBorderColor, isActive, isHovering, iconColor]);
|
|
2990
3135
|
var onClickOutside = function (e) {
|
|
2991
3136
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
2992
3137
|
setIsActive(false);
|
|
@@ -2998,7 +3143,7 @@ var LabeledIconInput = React__default.forwardRef(function (_a, ref) {
|
|
|
2998
3143
|
document$1.removeEventListener('click', onClickOutside);
|
|
2999
3144
|
};
|
|
3000
3145
|
}, []);
|
|
3001
|
-
return (React__default.createElement("div",
|
|
3146
|
+
return (React__default.createElement("div", { style: containerStyle },
|
|
3002
3147
|
label ? React__default.createElement(Label, { htmlFor: name, style: __assign(__assign({}, (!labelOnTop ? {} : { display: 'block' })), { fontFamily: "'skufont-medium', sans-serif", lineHeight: '24px', fontSize: '16px', color: getThemeColor(props, 'neutrals.100') }) },
|
|
3003
3148
|
label,
|
|
3004
3149
|
" ",
|
|
@@ -3427,7 +3572,10 @@ var templateObject_1$m, templateObject_2$d, templateObject_3$6, templateObject_4
|
|
|
3427
3572
|
|
|
3428
3573
|
var useClickOutside = function (props) {
|
|
3429
3574
|
var ref = props.ref, _a = props.eventType, eventType = _a === void 0 ? 'mousedown' : _a, onClick = props.onClick, onCleanup = props.onCleanup;
|
|
3575
|
+
var effectRef = React.useRef({});
|
|
3576
|
+
_.assign(effectRef.current, { eventType: eventType, onCleanup: onCleanup, ref: ref, onClick: onClick });
|
|
3430
3577
|
React.useEffect(function () {
|
|
3578
|
+
var _a = effectRef.current, eventType = _a.eventType, onCleanup = _a.onCleanup, ref = _a.ref, onClick = _a.onClick;
|
|
3431
3579
|
function handleClickOutside(e) {
|
|
3432
3580
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
3433
3581
|
onClick && onClick(e);
|
|
@@ -3689,7 +3837,7 @@ var PopupContainer = function (_a) {
|
|
|
3689
3837
|
return ReactDOM.createPortal(children, ref.current);
|
|
3690
3838
|
};
|
|
3691
3839
|
var Popup = React__default.forwardRef(function (_a, forwardedRef) {
|
|
3692
|
-
var header = _a.header, _b = _a.noHeader, noHeader = _b === void 0 ? false : _b, title = _a.title, controls = _a.controls, children = _a.children, onClose = _a.onClose, _c = _a.noCloseButton, noCloseButton = _c === void 0 ? false : _c, _d = _a.closeOnEsc, closeOnEsc = _d === void 0 ? true : _d, _e = _a.closeOnClickOutside, closeOnClickOutside = _e === void 0 ? false : _e, overlayZIndex = _a.overlayZIndex, props = __rest(_a, ["header", "noHeader", "title", "controls", "children", "onClose", "noCloseButton", "closeOnEsc", "closeOnClickOutside", "overlayZIndex"]);
|
|
3840
|
+
var header = _a.header, _b = _a.noHeader, noHeader = _b === void 0 ? false : _b, title = _a.title, controls = _a.controls, children = _a.children, onClose = _a.onClose, _c = _a.noCloseButton, noCloseButton = _c === void 0 ? false : _c, _d = _a.closeOnEsc, closeOnEsc = _d === void 0 ? true : _d, _e = _a.closeOnClickOutside, closeOnClickOutside = _e === void 0 ? false : _e, overlayZIndex = _a.overlayZIndex, popupClassName = _a.popupClassName, contentClassName = _a.contentClassName, props = __rest(_a, ["header", "noHeader", "title", "controls", "children", "onClose", "noCloseButton", "closeOnEsc", "closeOnClickOutside", "overlayZIndex", "popupClassName", "contentClassName"]);
|
|
3693
3841
|
var ref = useFallbackRef(forwardedRef);
|
|
3694
3842
|
useClickOutside({
|
|
3695
3843
|
ref: ref,
|
|
@@ -3717,14 +3865,14 @@ var Popup = React__default.forwardRef(function (_a, forwardedRef) {
|
|
|
3717
3865
|
}, [closeOnClickOutside, closeOnEsc, onClose]);
|
|
3718
3866
|
return React__default.createElement(PopupContainer, null,
|
|
3719
3867
|
React__default.createElement(Overlay, { zIndex: overlayZIndex },
|
|
3720
|
-
React__default.createElement(PopupWindow, __assign({ className: "popup" }, props, { ref: ref }),
|
|
3868
|
+
React__default.createElement(PopupWindow, __assign({ className: "popup" + (popupClassName ? " ".concat(popupClassName) : '') }, props, { ref: ref }),
|
|
3721
3869
|
noHeader ? null :
|
|
3722
3870
|
header ? header : (React__default.createElement(PopupHeader, { className: "popup-header", xsStyle: "flex-wrap: wrap-reverse;", smStyle: "flex-wrap: wrap;" },
|
|
3723
3871
|
React__default.createElement(Col, { style: { textAlign: 'left', alignSelf: 'center' } },
|
|
3724
3872
|
React__default.createElement("span", { className: "title" }, title)),
|
|
3725
3873
|
React__default.createElement(Col, { style: { textAlign: 'right', alignSelf: 'center' } }, noCloseButton ? null :
|
|
3726
3874
|
controls || React__default.createElement(Button, { onClick: onClose }, "Close")))),
|
|
3727
|
-
React__default.createElement("div", { className: "popup-content" }, children))));
|
|
3875
|
+
React__default.createElement("div", { className: "popup-content" + (contentClassName ? " ".concat(contentClassName) : '') }, children))));
|
|
3728
3876
|
});
|
|
3729
3877
|
var ShowPopup = function (_a) {
|
|
3730
3878
|
var _b = _a.autoOpen, autoOpen = _b === void 0 ? false : _b, PopupComponent = _a.popup, render = _a.render, _c = _a.closeOnEsc, closeOnEsc = _c === void 0 ? true : _c, _d = _a.closeOnClickOutside, closeOnClickOutside = _d === void 0 ? false : _d, props = __rest(_a, ["autoOpen", "popup", "render", "closeOnEsc", "closeOnClickOutside"]);
|
|
@@ -4002,10 +4150,10 @@ var Tabs = /** @class */ (function (_super) {
|
|
|
4002
4150
|
};
|
|
4003
4151
|
Tabs.prototype.render = function () {
|
|
4004
4152
|
var _this = this;
|
|
4005
|
-
var _a = this.props, tabs = _a.tabs, size = _a.size, padded = _a.padded, props = __rest(_a, ["tabs", "size", "padded"]);
|
|
4153
|
+
var _a = this.props, tabs = _a.tabs, size = _a.size, padded = _a.padded, variant = _a.variant, props = __rest(_a, ["tabs", "size", "padded", "variant"]);
|
|
4006
4154
|
var selectedTab = this.getTab(tabs, this.state.selectedTabIndex);
|
|
4007
4155
|
return React__default.createElement("div", __assign({}, props),
|
|
4008
|
-
React__default.createElement(TabBar, { padded: padded === true }, tabs.map(function (tab, index) { return React__default.createElement(Tab, { key: index, size: size, className: index === _this.state.selectedTabIndex ? 'selected' : '', selected: index === _this.state.selectedTabIndex, onClick: function (e) {
|
|
4156
|
+
React__default.createElement(TabBar, { padded: padded === true }, tabs.map(function (tab, index) { return React__default.createElement(Tab, { key: index, size: tab.size || size, variant: tab.variant || variant, className: index === _this.state.selectedTabIndex ? 'selected' : '', selected: index === _this.state.selectedTabIndex, onClick: function (e) {
|
|
4009
4157
|
_this.setState({ selectedTabIndex: index });
|
|
4010
4158
|
var callback = tabs[index].onClick;
|
|
4011
4159
|
if (callback) {
|
|
@@ -4167,227 +4315,6 @@ var Product = function (props) {
|
|
|
4167
4315
|
};
|
|
4168
4316
|
var templateObject_1$u, templateObject_2$j, templateObject_3$b, templateObject_4$8;
|
|
4169
4317
|
|
|
4170
|
-
function _defineProperty(obj, key, value) {
|
|
4171
|
-
if (key in obj) {
|
|
4172
|
-
Object.defineProperty(obj, key, {
|
|
4173
|
-
value: value,
|
|
4174
|
-
enumerable: true,
|
|
4175
|
-
configurable: true,
|
|
4176
|
-
writable: true
|
|
4177
|
-
});
|
|
4178
|
-
} else {
|
|
4179
|
-
obj[key] = value;
|
|
4180
|
-
}
|
|
4181
|
-
return obj;
|
|
4182
|
-
}
|
|
4183
|
-
|
|
4184
|
-
function ownKeys(object, enumerableOnly) {
|
|
4185
|
-
var keys = Object.keys(object);
|
|
4186
|
-
if (Object.getOwnPropertySymbols) {
|
|
4187
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
4188
|
-
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
4189
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
4190
|
-
})), keys.push.apply(keys, symbols);
|
|
4191
|
-
}
|
|
4192
|
-
return keys;
|
|
4193
|
-
}
|
|
4194
|
-
function _objectSpread2(target) {
|
|
4195
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
4196
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
4197
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
4198
|
-
_defineProperty(target, key, source[key]);
|
|
4199
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
4200
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4201
|
-
});
|
|
4202
|
-
}
|
|
4203
|
-
return target;
|
|
4204
|
-
}
|
|
4205
|
-
|
|
4206
|
-
function _classCallCheck(instance, Constructor) {
|
|
4207
|
-
if (!(instance instanceof Constructor)) {
|
|
4208
|
-
throw new TypeError("Cannot call a class as a function");
|
|
4209
|
-
}
|
|
4210
|
-
}
|
|
4211
|
-
|
|
4212
|
-
function _defineProperties(target, props) {
|
|
4213
|
-
for (var i = 0; i < props.length; i++) {
|
|
4214
|
-
var descriptor = props[i];
|
|
4215
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
4216
|
-
descriptor.configurable = true;
|
|
4217
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
4218
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
4219
|
-
}
|
|
4220
|
-
}
|
|
4221
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
4222
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
4223
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
4224
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
4225
|
-
writable: false
|
|
4226
|
-
});
|
|
4227
|
-
return Constructor;
|
|
4228
|
-
}
|
|
4229
|
-
|
|
4230
|
-
function _assertThisInitialized(self) {
|
|
4231
|
-
if (self === void 0) {
|
|
4232
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4233
|
-
}
|
|
4234
|
-
return self;
|
|
4235
|
-
}
|
|
4236
|
-
|
|
4237
|
-
function _setPrototypeOf(o, p) {
|
|
4238
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
4239
|
-
o.__proto__ = p;
|
|
4240
|
-
return o;
|
|
4241
|
-
};
|
|
4242
|
-
return _setPrototypeOf(o, p);
|
|
4243
|
-
}
|
|
4244
|
-
|
|
4245
|
-
function _inherits(subClass, superClass) {
|
|
4246
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
4247
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
4248
|
-
}
|
|
4249
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
4250
|
-
constructor: {
|
|
4251
|
-
value: subClass,
|
|
4252
|
-
writable: true,
|
|
4253
|
-
configurable: true
|
|
4254
|
-
}
|
|
4255
|
-
});
|
|
4256
|
-
Object.defineProperty(subClass, "prototype", {
|
|
4257
|
-
writable: false
|
|
4258
|
-
});
|
|
4259
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
4260
|
-
}
|
|
4261
|
-
|
|
4262
|
-
function _getPrototypeOf(o) {
|
|
4263
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
4264
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
4265
|
-
};
|
|
4266
|
-
return _getPrototypeOf(o);
|
|
4267
|
-
}
|
|
4268
|
-
|
|
4269
|
-
function _isNativeReflectConstruct() {
|
|
4270
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
4271
|
-
if (Reflect.construct.sham) return false;
|
|
4272
|
-
if (typeof Proxy === "function") return true;
|
|
4273
|
-
try {
|
|
4274
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
4275
|
-
return true;
|
|
4276
|
-
} catch (e) {
|
|
4277
|
-
return false;
|
|
4278
|
-
}
|
|
4279
|
-
}
|
|
4280
|
-
|
|
4281
|
-
function _typeof(obj) {
|
|
4282
|
-
"@babel/helpers - typeof";
|
|
4283
|
-
|
|
4284
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
4285
|
-
return typeof obj;
|
|
4286
|
-
} : function (obj) {
|
|
4287
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
4288
|
-
}, _typeof(obj);
|
|
4289
|
-
}
|
|
4290
|
-
|
|
4291
|
-
function _possibleConstructorReturn(self, call) {
|
|
4292
|
-
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
4293
|
-
return call;
|
|
4294
|
-
} else if (call !== void 0) {
|
|
4295
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
4296
|
-
}
|
|
4297
|
-
return _assertThisInitialized(self);
|
|
4298
|
-
}
|
|
4299
|
-
|
|
4300
|
-
function _createSuper(Derived) {
|
|
4301
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
4302
|
-
return function _createSuperInternal() {
|
|
4303
|
-
var Super = _getPrototypeOf(Derived),
|
|
4304
|
-
result;
|
|
4305
|
-
if (hasNativeReflectConstruct) {
|
|
4306
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
|
4307
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
4308
|
-
} else {
|
|
4309
|
-
result = Super.apply(this, arguments);
|
|
4310
|
-
}
|
|
4311
|
-
return _possibleConstructorReturn(this, result);
|
|
4312
|
-
};
|
|
4313
|
-
}
|
|
4314
|
-
|
|
4315
|
-
var LOADING_IMG_SRC = '/images/gears.gif';
|
|
4316
|
-
var NOT_FOUND_IMG_SRC = '/images/404.png';
|
|
4317
|
-
var DEFAULT_MAX_ATTEMPTS = 3;
|
|
4318
|
-
var DEFAULT_ATTEMPT_INTERVAL = 10000;
|
|
4319
|
-
var Img = /*#__PURE__*/function (_Component) {
|
|
4320
|
-
_inherits(Img, _Component);
|
|
4321
|
-
var _super = _createSuper(Img);
|
|
4322
|
-
function Img(props) {
|
|
4323
|
-
var _this;
|
|
4324
|
-
_classCallCheck(this, Img);
|
|
4325
|
-
_this = _super.call(this, props);
|
|
4326
|
-
_this.state = {
|
|
4327
|
-
src: _this.props.src,
|
|
4328
|
-
attempts: 0
|
|
4329
|
-
};
|
|
4330
|
-
_this.onError = _this.onError.bind(_assertThisInitialized(_this));
|
|
4331
|
-
return _this;
|
|
4332
|
-
}
|
|
4333
|
-
_createClass(Img, [{
|
|
4334
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
4335
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
4336
|
-
if (nextProps.src !== this.props.src) {
|
|
4337
|
-
this.setState({
|
|
4338
|
-
src: nextProps.src,
|
|
4339
|
-
attempts: 0
|
|
4340
|
-
});
|
|
4341
|
-
}
|
|
4342
|
-
}
|
|
4343
|
-
}, {
|
|
4344
|
-
key: "componentWillUnmount",
|
|
4345
|
-
value: function componentWillUnmount() {
|
|
4346
|
-
if (this.retryId) {
|
|
4347
|
-
clearTimeout(this.retryId);
|
|
4348
|
-
}
|
|
4349
|
-
}
|
|
4350
|
-
}, {
|
|
4351
|
-
key: "onError",
|
|
4352
|
-
value: function onError() {
|
|
4353
|
-
var _this2 = this;
|
|
4354
|
-
if (NOT_FOUND_IMG_SRC === this.state.src) {
|
|
4355
|
-
return;
|
|
4356
|
-
}
|
|
4357
|
-
var max_attempts = this.props.max_attempts || DEFAULT_MAX_ATTEMPTS;
|
|
4358
|
-
var attempt_interval = this.props.attempt_interval || DEFAULT_ATTEMPT_INTERVAL;
|
|
4359
|
-
if (this.state.attempts >= max_attempts) {
|
|
4360
|
-
this.setState({
|
|
4361
|
-
src: NOT_FOUND_IMG_SRC
|
|
4362
|
-
});
|
|
4363
|
-
return;
|
|
4364
|
-
}
|
|
4365
|
-
this.setState({
|
|
4366
|
-
src: LOADING_IMG_SRC,
|
|
4367
|
-
attempts: this.state.attempts + 1
|
|
4368
|
-
});
|
|
4369
|
-
this.retryId = setTimeout(function () {
|
|
4370
|
-
_this2.setState({
|
|
4371
|
-
src: _this2.props.src
|
|
4372
|
-
});
|
|
4373
|
-
}, attempt_interval * (this.state.attempts + 1) * (this.state.attempts + 1));
|
|
4374
|
-
}
|
|
4375
|
-
}, {
|
|
4376
|
-
key: "render",
|
|
4377
|
-
value: function render() {
|
|
4378
|
-
var props = _objectSpread2(_objectSpread2({
|
|
4379
|
-
onError: this.onError
|
|
4380
|
-
}, this.props), {}, {
|
|
4381
|
-
src: this.state.src
|
|
4382
|
-
});
|
|
4383
|
-
return /*#__PURE__*/React__default.createElement("img", Object.assign({
|
|
4384
|
-
alt: ""
|
|
4385
|
-
}, props));
|
|
4386
|
-
}
|
|
4387
|
-
}]);
|
|
4388
|
-
return Img;
|
|
4389
|
-
}(React.Component);
|
|
4390
|
-
|
|
4391
4318
|
var ArtworkName = styled__default.div(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n font-size: .9rem;\n font-weight: bold;\n"], ["\n font-size: .9rem;\n font-weight: bold;\n"])));
|
|
4392
4319
|
var UpdateDate = styled__default.div(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n font-size: ", ";\n color: ", ";\n"], ["\n font-size: ", ";\n color: ", ";\n"])), function (props) { return getThemeFontSize(props, 'tiny'); }, function (props) { return getThemeColor(props, 'textbody', colors.textbody); });
|
|
4393
4320
|
var ArtworkControls = styled__default.div(templateObject_3$c || (templateObject_3$c = __makeTemplateObject(["\n text-align: right;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n padding: 10px;\n width: 100%;\n box-sizing: border-box;\n opacity: 0;\n transition: .3s all;\n"], ["\n text-align: right;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n padding: 10px;\n width: 100%;\n box-sizing: border-box;\n opacity: 0;\n transition: .3s all;\n"])));
|
|
@@ -4403,12 +4330,12 @@ function extension(filename) {
|
|
|
4403
4330
|
return filename.substring(filename.lastIndexOf('.') + 1, filename.length);
|
|
4404
4331
|
}
|
|
4405
4332
|
var Artwork = function (_a) {
|
|
4406
|
-
var _b = _a.inputProps, inputProps = _b === void 0 ? {} : _b, props = __rest(_a, ["inputProps"]);
|
|
4333
|
+
var _b = _a.inputProps, inputProps = _b === void 0 ? {} : _b, onError = _a.onError, props = __rest(_a, ["inputProps", "onError"]);
|
|
4407
4334
|
/* TODO: 20 is arbitrary; ideally a component should know its width, and that should be used to compute the max length */
|
|
4408
4335
|
return React__default.createElement(ArtworkWrapper, { cssHeight: props.cssHeight ? props.cssHeight : props.picture ? 17 : 0, onClick: !props.picture && props.onClick ? props.onClick : undefined },
|
|
4409
4336
|
props.picture ?
|
|
4410
4337
|
React__default.createElement(ArtworkPicture, { onClick: function (e) { return props.onClick ? props.onClick(e) : null; }, cssHeight: props.cssHeight ? props.cssHeight : 17 },
|
|
4411
|
-
React__default.createElement(Img, { src: props.picture, style: { objectFit: "contain", width: "100%", height: "100%" }, onError:
|
|
4338
|
+
React__default.createElement(Img, { src: props.picture, style: { objectFit: "contain", width: "100%", height: "100%" }, onError: onError }))
|
|
4412
4339
|
:
|
|
4413
4340
|
React__default.createElement(IconDoc, { ext: extension(props.name), style: { width: "3vw" } }),
|
|
4414
4341
|
!props.edit ?
|
|
@@ -5211,6 +5138,14 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
5211
5138
|
return target;
|
|
5212
5139
|
}
|
|
5213
5140
|
|
|
5141
|
+
function _setPrototypeOf(o, p) {
|
|
5142
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
5143
|
+
o.__proto__ = p;
|
|
5144
|
+
return o;
|
|
5145
|
+
};
|
|
5146
|
+
return _setPrototypeOf(o, p);
|
|
5147
|
+
}
|
|
5148
|
+
|
|
5214
5149
|
function _inheritsLoose(subClass, superClass) {
|
|
5215
5150
|
subClass.prototype = Object.create(superClass.prototype);
|
|
5216
5151
|
subClass.prototype.constructor = subClass;
|
|
@@ -6081,6 +6016,15 @@ var InputStepperOuterContainer = styled__default.div(templateObject_1$M || (temp
|
|
|
6081
6016
|
var InputStepperInnerContainer = styled__default.div(templateObject_2$y || (templateObject_2$y = __makeTemplateObject(["\n &&&{\n display: flex;\n width: 100%;\n flex-direction: row;\n justify-content: space-between;\n border-radius: 5px;\n background-color: white;\n ", "\n ", "\n }\n"], ["\n &&&{\n display: flex;\n width: 100%;\n flex-direction: row;\n justify-content: space-between;\n border-radius: 5px;\n background-color: white;\n ", "\n ", "\n }\n"])), SharedStyles, SizerCss);
|
|
6082
6017
|
var InputStepperLabel = styled__default.label(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\n &&&{\n font-size: ", ";\n font-family: ", ";\n line-height: ", ";\n margin-bottom: 8px;\n color: ", "\n ", "\n ", "\n }\n"], ["\n &&&{\n font-size: ", ";\n font-family: ", ";\n line-height: ", ";\n margin-bottom: 8px;\n color: ", "\n ", "\n ", "\n }\n"])), fontStyles.label.fontSize, fontStyles.label.fontFamily, fontStyles.label.lineHeight, neutrals.bodyText, SharedStyles, SizerCss);
|
|
6083
6018
|
var CurrentNumber = styled__default.div(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n &&&{\n display:flex;\n justify-content: center;\n align-items: center;\n height:38px;\n width:100%;\n border-top: 1px solid ", ";\n border-bottom: 1px solid ", ";\n color: ", ";\n text-align:center;\n vertical-align:middle;\n }\n"], ["\n &&&{\n display:flex;\n justify-content: center;\n align-items: center;\n height:38px;\n width:100%;\n border-top: 1px solid ", ";\n border-bottom: 1px solid ", ";\n color: ", ";\n text-align:center;\n vertical-align:middle;\n }\n"])), neutrals['60'], neutrals['60'], neutrals.bodyText);
|
|
6019
|
+
function InputStepperStyled(props) {
|
|
6020
|
+
var containerWidth = props.containerWidth, inputDisabled = props.inputDisabled, label = props.label, labelStyle = props.labelStyle, containerStyle = props.containerStyle, style = props.style, onIncrement = props.onIncrement, onDecrement = props.onDecrement, _a = props.decrementButtonProps, decrementButtonProps = _a === void 0 ? {} : _a, _b = props.incrementButtonProps, incrementButtonProps = _b === void 0 ? {} : _b, rest = __rest(props, ["containerWidth", "inputDisabled", "label", "labelStyle", "containerStyle", "style", "onIncrement", "onDecrement", "decrementButtonProps", "incrementButtonProps"]);
|
|
6021
|
+
return (React__default.createElement(InputStepperOuterContainer, { width: containerWidth, style: containerStyle },
|
|
6022
|
+
label && React__default.createElement(InputStepperLabel, { style: labelStyle }, label),
|
|
6023
|
+
React__default.createElement(InputStepperInnerContainer, { style: style },
|
|
6024
|
+
React__default.createElement(IconButton, __assign({ Icon: SubtractIcon, style: { borderRadius: "5px 0 0 5px" }, onClick: onDecrement }, decrementButtonProps)),
|
|
6025
|
+
React__default.createElement(Input, __assign({}, rest, { style: { width: '100%', margin: 0, borderRadius: 0, textAlign: "center" } })),
|
|
6026
|
+
React__default.createElement(IconButton, __assign({ Icon: AddIcon, style: { borderRadius: "0 5px 5px 0" }, onClick: onIncrement }, incrementButtonProps)))));
|
|
6027
|
+
}
|
|
6084
6028
|
var canIncrement = function (value, max) {
|
|
6085
6029
|
return (max !== undefined && value < max) || max === undefined;
|
|
6086
6030
|
};
|
|
@@ -6088,21 +6032,21 @@ var canDecrement = function (value, min) {
|
|
|
6088
6032
|
return (min !== undefined && value > min) || min === undefined;
|
|
6089
6033
|
};
|
|
6090
6034
|
function InputStepper(props) {
|
|
6091
|
-
var _a = props.min, min = _a === void 0 ? 0 : _a, max = props.max, width = props.width, label = props.label, _b = props.labelStyle, labelStyle = _b === void 0 ? {} : _b, _c = props.style, style = _c === void 0 ? {} : _c, _d = props.disabled, disabled = _d === void 0 ? false : _d, _e = props.inputDisabled, inputDisabled = _e === void 0 ? false : _e, localeOptions = props.localeOptions, initialValue = props.initialValue, rest = __rest(props, ["min", "max", "width", "label", "labelStyle", "style", "disabled", "inputDisabled", "localeOptions", "initialValue"]);
|
|
6092
|
-
var
|
|
6035
|
+
var _a = props.min, min = _a === void 0 ? 0 : _a, max = props.max, width = props.width, label = props.label, _b = props.labelStyle, labelStyle = _b === void 0 ? {} : _b, _c = props.style, style = _c === void 0 ? {} : _c, _d = props.disabled, disabled = _d === void 0 ? false : _d, _e = props.inputDisabled, inputDisabled = _e === void 0 ? false : _e, localeOptions = props.localeOptions, initialValue = props.initialValue, _f = props.delayChangeTimeout, delayChangeTimeout = _f === void 0 ? 1000 : _f, _g = props.holdIncrement, holdIncrement = _g === void 0 ? true : _g, _h = props.holdDecrement, holdDecrement = _h === void 0 ? true : _h, rest = __rest(props, ["min", "max", "width", "label", "labelStyle", "style", "disabled", "inputDisabled", "localeOptions", "initialValue", "delayChangeTimeout", "holdIncrement", "holdDecrement"]);
|
|
6036
|
+
var _j = useNumberInput({
|
|
6093
6037
|
defaultValue: initialValue,
|
|
6094
6038
|
onChange: rest.onChange,
|
|
6095
6039
|
onFocus: rest.onFocus,
|
|
6096
6040
|
onBlur: rest.onBlur,
|
|
6097
6041
|
inputMode: rest.inputMode,
|
|
6098
6042
|
localeOptions: localeOptions,
|
|
6099
|
-
}), ref =
|
|
6100
|
-
var
|
|
6043
|
+
}), ref = _j.ref, value = _j.value, inputMode = _j.inputMode, onChange = _j.onChange, onBlur = _j.onBlur, onFocus = _j.onFocus, updateValue = _j.updateValue;
|
|
6044
|
+
var _k = useLongPress(function () {
|
|
6101
6045
|
handleIncrement();
|
|
6102
|
-
}), onIncrementMouseDown =
|
|
6103
|
-
var
|
|
6046
|
+
}), onIncrementMouseDown = _k.onMouseDown, onIncrementMouseLeave = _k.onMouseLeave, onIncrementMouseUp = _k.onMouseUp, onIncrementTouchEnd = _k.onTouchEnd, onIncrementTouchStart = _k.onTouchStart;
|
|
6047
|
+
var _l = useLongPress(function () {
|
|
6104
6048
|
handleDecrement();
|
|
6105
|
-
}), onDecrementMouseDown =
|
|
6049
|
+
}), onDecrementMouseDown = _l.onMouseDown, onDecrementMouseLeave = _l.onMouseLeave, onDecrementMouseUp = _l.onMouseUp, onDecrementTouchEnd = _l.onTouchEnd, onDecrementTouchStart = _l.onTouchStart;
|
|
6106
6050
|
var valueNumber = typeof value === 'string' ? parseFloat(value) : value;
|
|
6107
6051
|
var decrementButtonVariant = disabled || !canDecrement(valueNumber, min)
|
|
6108
6052
|
? "disabled" : "primary";
|
|
@@ -6135,23 +6079,23 @@ function InputStepper(props) {
|
|
|
6135
6079
|
else if (!canDecrement(parseInt(val), min) && min !== undefined) {
|
|
6136
6080
|
updateValue(min);
|
|
6137
6081
|
}
|
|
6138
|
-
}, [ref, min, max, updateValue]),
|
|
6082
|
+
}, [ref, min, max, updateValue]), delayChangeTimeout);
|
|
6139
6083
|
return (React__default.createElement(InputStepperOuterContainer, { width: width },
|
|
6140
6084
|
React__default.createElement(InputStepperLabel, { style: labelStyle }, label),
|
|
6141
6085
|
React__default.createElement(InputStepperInnerContainer, { style: style },
|
|
6142
6086
|
React__default.createElement(IconButton, { Icon: SubtractIcon, variant: decrementButtonVariant, onClick: handleDecrement, style: { borderRadius: "5px 0 0 5px" }, onMouseDown: function (e) {
|
|
6143
|
-
if (e.button !== 0) {
|
|
6087
|
+
if (e.button !== 0 || !holdDecrement) {
|
|
6144
6088
|
return;
|
|
6145
6089
|
}
|
|
6146
6090
|
onDecrementMouseDown();
|
|
6147
|
-
}, onMouseOut: onDecrementMouseLeave, onMouseUp: onDecrementMouseUp, onTouchEnd: onDecrementTouchEnd, onTouchStart: onDecrementTouchStart }),
|
|
6091
|
+
}, onMouseOut: holdDecrement ? onDecrementMouseLeave : undefined, onMouseUp: holdDecrement ? onDecrementMouseUp : undefined, onTouchEnd: holdDecrement ? onDecrementTouchEnd : undefined, onTouchStart: holdDecrement ? onDecrementTouchStart : undefined }),
|
|
6148
6092
|
React__default.createElement(Input, __assign({}, rest, { style: { width: '100%', margin: 0, borderRadius: 0, textAlign: "center" }, value: value, inputMode: inputMode, onChange: onChange, onBlur: onBlur, onFocus: onFocus, disabled: inputDisabled, ref: ref, onKeyUp: delayChange })),
|
|
6149
6093
|
React__default.createElement(IconButton, { Icon: AddIcon, variant: incrementButtonVariant, onClick: handleIncrement, style: { borderRadius: "0 5px 5px 0" }, onMouseDown: function (e) {
|
|
6150
|
-
if (e.button !== 0) {
|
|
6094
|
+
if (e.button !== 0 || !holdIncrement) {
|
|
6151
6095
|
return;
|
|
6152
6096
|
}
|
|
6153
6097
|
onIncrementMouseDown();
|
|
6154
|
-
}, onMouseOut: onIncrementMouseLeave, onMouseUp: onIncrementMouseUp, onTouchEnd: onIncrementTouchEnd, onTouchStart: onIncrementTouchStart }))));
|
|
6098
|
+
}, onMouseOut: holdIncrement ? onIncrementMouseLeave : undefined, onMouseUp: holdIncrement ? onIncrementMouseUp : undefined, onTouchEnd: holdIncrement ? onIncrementTouchEnd : undefined, onTouchStart: holdIncrement ? onIncrementTouchStart : undefined }))));
|
|
6155
6099
|
}
|
|
6156
6100
|
var templateObject_1$M, templateObject_2$y, templateObject_3$m, templateObject_4$f;
|
|
6157
6101
|
|
|
@@ -6279,6 +6223,19 @@ function sortDirection(col) {
|
|
|
6279
6223
|
var VirtualTableStyles = styled__default.div(templateObject_1$N || (templateObject_1$N = __makeTemplateObject(["\npadding: 1rem;\n\n.table-list-rows {\n ", "\n}\n\n.table {\n display: inline-flex;\n flex-direction: column;\n ", "\n width: 100% !important;\n min-width: 100% !important;\n ", "\n\n .thead {\n padding-right: 15px;\n ", "\n\n .tr {\n overflow-x: hidden;\n min-width: 100%;\n }\n }\n\n .tbody {\n flex: 1 1 auto;\n height: 80vh;\n }\n\n .tr-group {\n display: flex;\n flex-direction: column;\n\n .tr, .tr-sub {\n width: 99%;\n }\n }\n\n .tr {\n display: flex;\n\n ", "\n }\n\n .tr.header {\n position: sticky;\n }\n\n .th,\n .td {\n margin: 0;\n padding: 0.5rem;\n ", "\n }\n}"], ["\npadding: 1rem;\n\n.table-list-rows {\n ", "\n}\n\n.table {\n display: inline-flex;\n flex-direction: column;\n ", "\n width: 100% !important;\n min-width: 100% !important;\n ", "\n\n .thead {\n padding-right: 15px;\n ", "\n\n .tr {\n overflow-x: hidden;\n min-width: 100%;\n }\n }\n\n .tbody {\n flex: 1 1 auto;\n height: 80vh;\n }\n\n .tr-group {\n display: flex;\n flex-direction: column;\n\n .tr, .tr-sub {\n width: 99%;\n }\n }\n\n .tr {\n display: flex;\n\n ", "\n }\n\n .tr.header {\n position: sticky;\n }\n\n .th,\n .td {\n margin: 0;\n padding: 0.5rem;\n ", "\n }\n}"])), function (p) { return p.rowClickable ? "\n .tr {\n cursor: pointer;\n }\n " : ''; }, function (p) { return p.bordered ? "\n border-spacing: 0;\n border: 1px solid black;\n " : ''; }, function (p) { return p.tableHeight ? "height: ".concat(p.tableHeight).concat(typeof p.tableHeight === 'number' ? 'px' : '', ";") : ''; }, function (p) { return p.bordered ? 'border-bottom: 1px solid #000;' : ''; }, function (p) { return p.bordered ? "\n :last-child {\n .td {\n border-bottom: 0;\n }\n }\n " : ''; }, function (p) { return p.bordered ? "\n border-bottom: 1px solid black;\n border-right: 1px solid black;\n :last-child {\n border-right: 0;\n }\n " : ''; });
|
|
6280
6224
|
var templateObject_1$N;
|
|
6281
6225
|
|
|
6226
|
+
var psuedoSelectors = {
|
|
6227
|
+
__after: '&:after',
|
|
6228
|
+
__before: '&:before',
|
|
6229
|
+
__firstLetter: '&:first-letter',
|
|
6230
|
+
__firstLine: '&:first-line',
|
|
6231
|
+
__active: '&:active',
|
|
6232
|
+
__firstChild: '&:first-child',
|
|
6233
|
+
__focus: '&:focus',
|
|
6234
|
+
__hover: '&:hover',
|
|
6235
|
+
__lang: '&:lang',
|
|
6236
|
+
__link: '&:link',
|
|
6237
|
+
__visited: '&:visited',
|
|
6238
|
+
};
|
|
6282
6239
|
var isSizeObj = function (val) { return typeof val === 'object' && (val['xs'] || val['sm'] || val['md'] || val['lg'] || val['xl']); };
|
|
6283
6240
|
var parseResponsiveValue = function (value, transform) {
|
|
6284
6241
|
if (typeof value === 'number' || typeof value === 'string' || typeof value === 'boolean') {
|
|
@@ -6299,7 +6256,7 @@ var parseResponsiveValue = function (value, transform) {
|
|
|
6299
6256
|
}
|
|
6300
6257
|
else if (typeof value === 'object') {
|
|
6301
6258
|
if (!isSizeObj(value)) {
|
|
6302
|
-
return value;
|
|
6259
|
+
return transform(value) || value;
|
|
6303
6260
|
}
|
|
6304
6261
|
return Object.keys(value)
|
|
6305
6262
|
.filter(function (k) { return sizes.includes(k); })
|
|
@@ -6321,47 +6278,29 @@ var createMeasurementStyle = function (v, keys) {
|
|
|
6321
6278
|
return (__assign(__assign({}, acc), (_a = {}, _a[k] = value, _a)));
|
|
6322
6279
|
}, {});
|
|
6323
6280
|
};
|
|
6324
|
-
var styleKeys = [
|
|
6281
|
+
var styleKeys = __spreadArray([
|
|
6325
6282
|
'pr', 'pl', 'pt', 'pb', 'px', 'py',
|
|
6326
6283
|
'mr', 'ml', 'mt', 'mb', 'mx', 'my',
|
|
6327
6284
|
'width', 'height',
|
|
6328
6285
|
'color', 'bg', 'background', 'backgroundColor',
|
|
6329
6286
|
'colSpan',
|
|
6330
|
-
'style', 'sx'
|
|
6331
|
-
];
|
|
6332
|
-
var
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
pt: function (v) { return createMeasurementStyle(v, ['paddingTop']); },
|
|
6342
|
-
pb: function (v) { return createMeasurementStyle(v, ['paddingBottom']); },
|
|
6343
|
-
px: function (v) { return createMeasurementStyle(v, ['paddingLeft', 'paddingRight']); },
|
|
6344
|
-
py: function (v) { return createMeasurementStyle(v, ['paddingTop', 'paddingBottom']); },
|
|
6345
|
-
width: function (v) { return createMeasurementStyle(v, ['width']); },
|
|
6346
|
-
height: function (v) { return createMeasurementStyle(v, ['height']); },
|
|
6347
|
-
color: function (v) { return ({ color: v }); },
|
|
6348
|
-
bg: function (v) { return ({ background: v }); },
|
|
6349
|
-
background: function (v) { return ({ background: v }); },
|
|
6350
|
-
backgroundColor: function (v) { return ({ backgroundColor: v }); },
|
|
6351
|
-
hidden: function (v) { return (v ? { display: 'none' } : {}); },
|
|
6352
|
-
block: function (v) { return (v ? { display: 'block' } : {}); },
|
|
6353
|
-
inline_block: function (v) { return (v ? { display: 'inline-block' } : {}); },
|
|
6354
|
-
flex: function (v) { return (v ? { display: 'flex' } : {}); },
|
|
6355
|
-
inline_flex: function (v) { return (v ? { display: 'inline-flex' } : {}); },
|
|
6356
|
-
grid: function (v) { return (v ? { display: 'grid' } : {}); },
|
|
6357
|
-
float: function (v) { return (v === 'clearfix'
|
|
6287
|
+
'style', 'sx'
|
|
6288
|
+
], Object.keys(psuedoSelectors), true);
|
|
6289
|
+
var psuedoStylesTransformMap = Object.keys(psuedoSelectors)
|
|
6290
|
+
.reduce(function (acc, k) {
|
|
6291
|
+
var _a;
|
|
6292
|
+
return (__assign(__assign({}, acc), (_a = {}, _a[k] = function (v) {
|
|
6293
|
+
var _a;
|
|
6294
|
+
return (_a = {}, _a[psuedoSelectors[k]] = v, _a);
|
|
6295
|
+
}, _a)));
|
|
6296
|
+
}, {});
|
|
6297
|
+
var stylesTransformMap = __assign({ mr: function (v) { return createMeasurementStyle(v, ['marginRight']); }, ml: function (v) { return createMeasurementStyle(v, ['marginLeft']); }, mt: function (v) { return createMeasurementStyle(v, ['marginTop']); }, mb: function (v) { return createMeasurementStyle(v, ['marginBottom']); }, mx: function (v) { return createMeasurementStyle(v, ['marginLeft', 'marginRight']); }, my: function (v) { return createMeasurementStyle(v, ['marginTop', 'marginBottom']); }, pr: function (v) { return createMeasurementStyle(v, ['paddingRight']); }, pl: function (v) { return createMeasurementStyle(v, ['paddingLeft']); }, pt: function (v) { return createMeasurementStyle(v, ['paddingTop']); }, pb: function (v) { return createMeasurementStyle(v, ['paddingBottom']); }, px: function (v) { return createMeasurementStyle(v, ['paddingLeft', 'paddingRight']); }, py: function (v) { return createMeasurementStyle(v, ['paddingTop', 'paddingBottom']); }, width: function (v) { return createMeasurementStyle(v, ['width']); }, height: function (v) { return createMeasurementStyle(v, ['height']); }, color: function (v) { return ({ color: v }); }, bg: function (v) { return ({ background: v }); }, background: function (v) { return ({ background: v }); }, backgroundColor: function (v) { return ({ backgroundColor: v }); }, hidden: function (v) { return (v ? { display: 'none' } : {}); }, block: function (v) { return (v ? { display: 'block' } : {}); }, inline_block: function (v) { return (v ? { display: 'inline-block' } : {}); }, flex: function (v) { return (v ? { display: 'flex' } : {}); }, inline_flex: function (v) { return (v ? { display: 'inline-flex' } : {}); }, grid: function (v) { return (v ? { display: 'grid' } : {}); }, float: function (v) { return (v === 'clearfix'
|
|
6358
6298
|
? { '&::after': {
|
|
6359
6299
|
content: '',
|
|
6360
6300
|
display: 'table',
|
|
6361
6301
|
clear: 'both',
|
|
6362
6302
|
} }
|
|
6363
|
-
: { float: v }); },
|
|
6364
|
-
colSpan: function (v) {
|
|
6303
|
+
: { float: v }); }, colSpan: function (v) {
|
|
6365
6304
|
if (v === 'auto' || v === true) {
|
|
6366
6305
|
return { gridColumn: 'auto' };
|
|
6367
6306
|
}
|
|
@@ -6370,10 +6309,7 @@ var stylesTransformMap = {
|
|
|
6370
6309
|
}
|
|
6371
6310
|
var colSpan = stripUnit(v);
|
|
6372
6311
|
return { gridColumn: "span ".concat(colSpan, " / span ").concat(colSpan) };
|
|
6373
|
-
},
|
|
6374
|
-
style: function (v) { return v; },
|
|
6375
|
-
sx: function (v) { return v; },
|
|
6376
|
-
};
|
|
6312
|
+
}, style: function (v) { return v; }, sx: function (v) { return v; } }, psuedoStylesTransformMap);
|
|
6377
6313
|
var parseCskuStyles = function (p) {
|
|
6378
6314
|
var sizeStylesObj = {};
|
|
6379
6315
|
var stylesObj = {};
|
|
@@ -6434,7 +6370,7 @@ var GridItem = styled__default.div(function (p) {
|
|
|
6434
6370
|
});
|
|
6435
6371
|
|
|
6436
6372
|
var BaseCollapsible = function (props) {
|
|
6437
|
-
var children = props.children, style = props.style, label = props.label, controls = props.controls, _a = props.isOpen, isOpen = _a === void 0 ? false : _a, handleToggle = props.handleToggle;
|
|
6373
|
+
var children = props.children, style = props.style, label = props.label, controls = props.controls, header = props.header, _a = props.isOpen, isOpen = _a === void 0 ? false : _a, handleToggle = props.handleToggle;
|
|
6438
6374
|
var _b = React.useState(isOpen ? undefined : 0), height = _b[0], setHeight = _b[1];
|
|
6439
6375
|
var ref = React.useRef(null);
|
|
6440
6376
|
React.useEffect(function () {
|
|
@@ -6459,10 +6395,7 @@ var BaseCollapsible = function (props) {
|
|
|
6459
6395
|
React__default.createElement(Row, { style: __assign({ alignItems: 'center', padding: 10, paddingTop: 12, paddingBottom: 8, background: isOpen ? colors.white : colors.teal[20], borderRadius: isOpen ? 25 : 2000, flex: 'none', order: 1, flexGrow: 0 }, (isOpen
|
|
6460
6396
|
? { border: "3px solid ".concat(colors.teal.main) }
|
|
6461
6397
|
: {})) },
|
|
6462
|
-
React__default.createElement(
|
|
6463
|
-
React__default.createElement(CollapsibleLabel, { isOpen: isOpen }, label)),
|
|
6464
|
-
React__default.createElement(Col, { xs: true, sm: 5.9, style: { cursor: 'pointer', }, smStyle: "text-align: right;", xsStyle: "text-align: center;", onClick: handleToggle },
|
|
6465
|
-
React__default.createElement(CollapsibleControls, { isOpen: isOpen }, controls)),
|
|
6398
|
+
React__default.createElement(CollapsibleHeader, { isOpen: isOpen, handleToggle: handleToggle, controls: controls }, header || label),
|
|
6466
6399
|
React__default.createElement(Col, { xs: true, style: {
|
|
6467
6400
|
overflow: 'hidden',
|
|
6468
6401
|
transition: 'height 0.2s ease-in-out',
|
|
@@ -6482,6 +6415,20 @@ var Collapsible$1 = function (props) {
|
|
|
6482
6415
|
};
|
|
6483
6416
|
return (React__default.createElement(BaseCollapsible, __assign({ isOpen: isOpen, handleToggle: handleToggle }, rest), children));
|
|
6484
6417
|
};
|
|
6418
|
+
var CollapsibleHeader = function (props) {
|
|
6419
|
+
var children = props.children, controls = props.controls, isOpen = props.isOpen, handleToggle = props.handleToggle;
|
|
6420
|
+
if (children === undefined || children === null) {
|
|
6421
|
+
return null;
|
|
6422
|
+
}
|
|
6423
|
+
if (typeof children === 'string' || typeof children === 'number' || typeof children === 'boolean') {
|
|
6424
|
+
return React__default.createElement(React__default.Fragment, null,
|
|
6425
|
+
React__default.createElement(Col, { xs: true, sm: 5.9, style: { cursor: 'pointer', }, onClick: handleToggle },
|
|
6426
|
+
React__default.createElement(CollapsibleLabel, { isOpen: isOpen }, children)),
|
|
6427
|
+
React__default.createElement(Col, { xs: true, sm: 5.9, style: { cursor: 'pointer', }, smStyle: "text-align: right;", xsStyle: "text-align: center;", onClick: handleToggle },
|
|
6428
|
+
React__default.createElement(CollapsibleControls, { isOpen: isOpen }, controls)));
|
|
6429
|
+
}
|
|
6430
|
+
return React__default.cloneElement(children, { isOpen: isOpen, handleToggle: handleToggle });
|
|
6431
|
+
};
|
|
6485
6432
|
var CollapsibleLabel = function (props) {
|
|
6486
6433
|
var children = props.children, isOpen = props.isOpen;
|
|
6487
6434
|
if (children === undefined || children === null) {
|
|
@@ -7202,6 +7149,7 @@ exports.ClientApprovedIcon = ClientApprovedIcon;
|
|
|
7202
7149
|
exports.ClipboardIcon = ClipboardIcon;
|
|
7203
7150
|
exports.ClockIcon = ClockIcon;
|
|
7204
7151
|
exports.Col = Col;
|
|
7152
|
+
exports.CollaborateIcon = CollaborateIcon;
|
|
7205
7153
|
exports.CollapseStyled = CollapseStyled;
|
|
7206
7154
|
exports.CollapseWrapper = CollapseWrapper;
|
|
7207
7155
|
exports.Collapsible = Collapsible;
|
|
@@ -7215,8 +7163,11 @@ exports.Collapsibles = Collapsibles;
|
|
|
7215
7163
|
exports.Column = Column;
|
|
7216
7164
|
exports.ColumnSelectIcon = ColumnSelectIcon;
|
|
7217
7165
|
exports.CommentIcon = CommentIcon;
|
|
7166
|
+
exports.CommunityIcon = CommunityIcon;
|
|
7218
7167
|
exports.CompletedCheckmarkIcon = CompletedCheckmarkIcon;
|
|
7219
7168
|
exports.ConfirmPopup = ConfirmPopup;
|
|
7169
|
+
exports.ConnectedIcon = ConnectedIcon;
|
|
7170
|
+
exports.ConnectedPlusIcon = ConnectedPlusIcon;
|
|
7220
7171
|
exports.CouponIcon = CouponIcon;
|
|
7221
7172
|
exports.CreatableSelect = SKUCreatableSelect;
|
|
7222
7173
|
exports.CreditCardIcon = CreditCardIcon;
|
|
@@ -7240,6 +7191,7 @@ exports.Dropdown = Dropdown;
|
|
|
7240
7191
|
exports.DropdownItem = DropdownItem;
|
|
7241
7192
|
exports.Dropzoned = Dropzoned;
|
|
7242
7193
|
exports.DropzonedPreviews = DropzonedPreviews;
|
|
7194
|
+
exports.EPOIcon = EPOIcon;
|
|
7243
7195
|
exports.EditIcon = EditIcon;
|
|
7244
7196
|
exports.EllipsisIcon = EllipsisIcon;
|
|
7245
7197
|
exports.EpsIcon = EpsIcon;
|
|
@@ -7271,12 +7223,15 @@ exports.HeadlessTable = HeadlessTable;
|
|
|
7271
7223
|
exports.HistoryIcon = HistoryIcon;
|
|
7272
7224
|
exports.IconButton = IconButton;
|
|
7273
7225
|
exports.IconDoc = IconDoc;
|
|
7226
|
+
exports.Img = Img;
|
|
7274
7227
|
exports.InfoIcon = InfoIcon;
|
|
7275
7228
|
exports.Input = Input;
|
|
7276
7229
|
exports.InputIconLabel = InputIconLabel;
|
|
7277
7230
|
exports.InputIconLabelContainer = InputIconLabelContainer;
|
|
7278
7231
|
exports.InputStepper = InputStepper;
|
|
7232
|
+
exports.InputStepperStyled = InputStepperStyled;
|
|
7279
7233
|
exports.IntegrationsIcon = IntegrationsIcon;
|
|
7234
|
+
exports.InventoryIcon = InventoryIcon;
|
|
7280
7235
|
exports.Label = Label;
|
|
7281
7236
|
exports.LabeledAsyncSelect = LabeledAsyncSelect;
|
|
7282
7237
|
exports.LabeledCheckbox = LabeledCheckbox;
|
|
@@ -7311,6 +7266,7 @@ exports.NoteIcon = NoteIcon;
|
|
|
7311
7266
|
exports.Number = Number$1;
|
|
7312
7267
|
exports.NumberInput = NumberInput;
|
|
7313
7268
|
exports.OpportunityCircleIcon = OpportunityCircleIcon;
|
|
7269
|
+
exports.OrderStatusIcon = OrderStatusIcon;
|
|
7314
7270
|
exports.Overlay = Overlay;
|
|
7315
7271
|
exports.Padding = Padding;
|
|
7316
7272
|
exports.Page = Page;
|