ordering-ui-external 2.4.6 → 2.5.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/_bundles/{0.ordering-ui.038c4b4d536032472bc7.js → 0.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{1.ordering-ui.038c4b4d536032472bc7.js → 1.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{2.ordering-ui.038c4b4d536032472bc7.js → 2.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{4.ordering-ui.038c4b4d536032472bc7.js → 4.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{5.ordering-ui.038c4b4d536032472bc7.js → 5.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{6.ordering-ui.038c4b4d536032472bc7.js → 6.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{7.ordering-ui.038c4b4d536032472bc7.js → 7.ordering-ui.5488030edb520175432d.js} +2 -2
- package/_bundles/{8.ordering-ui.038c4b4d536032472bc7.js → 8.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/{9.ordering-ui.038c4b4d536032472bc7.js → 9.ordering-ui.5488030edb520175432d.js} +1 -1
- package/_bundles/ordering-ui.5488030edb520175432d.js +2 -0
- package/_modules/components/OrdersOption/styles.js +1 -1
- package/_modules/components/StripeMethodForm/index.js +26 -11
- package/_modules/components/VerticalOrdersLayout/SingleOrderCard/index.js +15 -8
- package/_modules/components/VerticalOrdersLayout/styles.js +2 -2
- package/_modules/contexts/ThemeContext/index.js +1 -0
- package/_modules/themes/five/src/components/AddressList/index.js +8 -7
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +28 -22
- package/_modules/themes/five/src/components/BusinessBasicInformation/styles.js +22 -21
- package/_modules/themes/five/src/components/BusinessController/index.js +5 -3
- package/_modules/themes/five/src/components/BusinessInformation/index.js +16 -10
- package/_modules/themes/five/src/components/BusinessItemAccordion/index.js +5 -8
- package/_modules/themes/five/src/components/BusinessListingSearch/index.js +93 -74
- package/_modules/themes/five/src/components/BusinessListingSearch/styles.js +10 -4
- package/_modules/themes/five/src/components/BusinessProductsCategories/index.js +7 -2
- package/_modules/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsList/index.js +1 -1
- package/_modules/themes/five/src/components/BusinessProductsListing/index.js +38 -13
- package/_modules/themes/five/src/components/BusinessProductsListing/styles.js +20 -9
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +35 -23
- package/_modules/themes/five/src/components/Cart/index.js +7 -3
- package/_modules/themes/five/src/components/Checkout/index.js +12 -11
- package/_modules/themes/five/src/components/Checkout/styles.js +8 -4
- package/_modules/themes/five/src/components/CitiesControl/index.js +1 -1
- package/_modules/themes/five/src/components/GiftCard/GiftCardUI/index.js +1 -0
- package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +4 -3
- package/_modules/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +14 -8
- package/_modules/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +1 -1
- package/_modules/themes/five/src/components/Header/index.js +29 -21
- package/_modules/themes/five/src/components/Header/styles.js +44 -40
- package/_modules/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
- package/_modules/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +36 -5
- package/_modules/themes/five/src/components/MultiCheckout/index.js +35 -6
- package/_modules/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +6 -4
- package/_modules/themes/five/src/components/MyOrders/index.js +16 -10
- package/_modules/themes/five/src/components/MyOrders/styles.js +15 -12
- package/_modules/themes/five/src/components/OrderDetails/OrderEta.js +4 -3
- package/_modules/themes/five/src/components/OrderDetails/OrderHistory.js +2 -2
- package/_modules/themes/five/src/components/OrderDetails/index.js +2 -2
- package/_modules/themes/five/src/components/OrderItAgain/styles.js +1 -1
- package/_modules/themes/five/src/components/OrderProgress/index.js +15 -4
- package/_modules/themes/five/src/components/OrderTypeSelectorContent/index.js +16 -4
- package/_modules/themes/five/src/components/PageBanner/styles.js +1 -1
- package/_modules/themes/five/src/components/PaymentOptions/index.js +8 -5
- package/_modules/themes/five/src/components/ProductForm/index.js +27 -7
- package/_modules/themes/five/src/components/ProductForm/styles.js +40 -31
- package/_modules/themes/five/src/components/ProductItemAccordion/index.js +6 -6
- package/_modules/themes/five/src/components/RenderProductsLayout/index.js +3 -3
- package/_modules/themes/five/src/components/ReviewProduct/index.js +9 -4
- package/_modules/themes/five/src/components/ServiceForm/index.js +22 -3
- package/_modules/themes/five/src/components/ServiceForm/styles.js +9 -3
- package/_modules/themes/five/src/components/SidebarMenu/index.js +19 -10
- package/_modules/themes/five/src/components/SignUpForm/index.js +56 -29
- package/_modules/themes/five/src/components/SingleOrderCard/index.js +1 -1
- package/_modules/themes/five/src/components/SingleOrderCard/styles.js +26 -24
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/index.js +9 -5
- package/_modules/themes/five/src/components/SingleProductCard/layouts/original/styles.js +2 -2
- package/_modules/themes/five/src/components/StripeElementsForm/index.js +3 -1
- package/_modules/themes/five/src/components/UpsellingPage/index.js +2 -1
- package/_modules/themes/five/src/components/UserFormDetails/index.js +58 -18
- package/_modules/themes/five/src/components/UserFormDetails/styles.js +7 -3
- package/_modules/themes/five/src/components/UserPopover/index.js +41 -25
- package/_modules/themes/five/src/components/UserProfileForm/index.js +19 -11
- package/_modules/themes/five/src/styles/Buttons/index.js +68 -58
- package/_modules/themes/five/src/styles/Inputs/index.js +40 -16
- package/_modules/utils/index.js +8 -2
- package/index.html +1 -1
- package/package.json +3 -2
- package/src/components/OrdersOption/styles.js +1 -0
- package/src/components/StripeMethodForm/index.js +22 -10
- package/src/components/VerticalOrdersLayout/SingleOrderCard/index.js +35 -17
- package/src/components/VerticalOrdersLayout/styles.js +9 -0
- package/src/contexts/ThemeContext/index.js +1 -0
- package/src/themes/five/src/components/AddressList/index.js +6 -6
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +24 -22
- package/src/themes/five/src/components/BusinessBasicInformation/styles.js +24 -3
- package/src/themes/five/src/components/BusinessController/index.js +4 -2
- package/src/themes/five/src/components/BusinessInformation/index.js +24 -12
- package/src/themes/five/src/components/BusinessItemAccordion/index.js +5 -6
- package/src/themes/five/src/components/BusinessListingSearch/index.js +127 -101
- package/src/themes/five/src/components/BusinessListingSearch/styles.js +15 -0
- package/src/themes/five/src/components/BusinessProductsCategories/index.js +7 -2
- package/src/themes/five/src/components/BusinessProductsCategories/styles.js +1 -1
- package/src/themes/five/src/components/BusinessProductsList/index.js +1 -1
- package/src/themes/five/src/components/BusinessProductsListing/index.js +34 -9
- package/src/themes/five/src/components/BusinessProductsListing/styles.js +26 -0
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +9 -2
- package/src/themes/five/src/components/Cart/index.js +3 -4
- package/src/themes/five/src/components/Checkout/index.js +18 -4
- package/src/themes/five/src/components/Checkout/styles.js +22 -0
- package/src/themes/five/src/components/CitiesControl/index.js +1 -1
- package/src/themes/five/src/components/GiftCard/GiftCardUI/index.js +1 -0
- package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/index.js +41 -31
- package/src/themes/five/src/components/GiftCard/PurchaseGiftCard/styles.js +15 -4
- package/src/themes/five/src/components/GiftCard/RedeemGiftCard/index.js +2 -2
- package/src/themes/five/src/components/Header/index.js +17 -5
- package/src/themes/five/src/components/Header/styles.js +9 -6
- package/src/themes/five/src/components/HomeHero/layouts/OriginalHomeHero/index.js +1 -1
- package/src/themes/five/src/components/MultiCartsPaymethodsAndWallets/index.js +83 -51
- package/src/themes/five/src/components/MultiCheckout/index.js +21 -6
- package/src/themes/five/src/components/MultiOrdersDetails/SingleOrderCard.js +8 -5
- package/src/themes/five/src/components/MyOrders/index.js +13 -9
- package/src/themes/five/src/components/MyOrders/styles.js +3 -1
- package/src/themes/five/src/components/OrderDetails/OrderEta.js +6 -3
- package/src/themes/five/src/components/OrderDetails/OrderHistory.js +8 -2
- package/src/themes/five/src/components/OrderDetails/index.js +2 -2
- package/src/themes/five/src/components/OrderItAgain/styles.js +1 -1
- package/src/themes/five/src/components/OrderProgress/index.js +16 -5
- package/src/themes/five/src/components/OrderTypeSelectorContent/index.js +7 -4
- package/src/themes/five/src/components/PageBanner/styles.js +1 -4
- package/src/themes/five/src/components/PaymentOptions/index.js +7 -4
- package/src/themes/five/src/components/ProductForm/index.js +23 -5
- package/src/themes/five/src/components/ProductForm/styles.js +36 -1
- package/src/themes/five/src/components/ProductItemAccordion/index.js +37 -29
- package/src/themes/five/src/components/RenderProductsLayout/index.js +3 -3
- package/src/themes/five/src/components/ReviewProduct/index.js +14 -6
- package/src/themes/five/src/components/ServiceForm/index.js +22 -4
- package/src/themes/five/src/components/ServiceForm/styles.js +16 -0
- package/src/themes/five/src/components/SidebarMenu/index.js +162 -144
- package/src/themes/five/src/components/SignUpForm/index.js +4 -3
- package/src/themes/five/src/components/SingleOrderCard/index.js +1 -1
- package/src/themes/five/src/components/SingleOrderCard/styles.js +9 -1
- package/src/themes/five/src/components/SingleProductCard/layouts/original/index.js +13 -3
- package/src/themes/five/src/components/SingleProductCard/layouts/original/styles.js +2 -2
- package/src/themes/five/src/components/StripeElementsForm/index.js +3 -1
- package/src/themes/five/src/components/UpsellingPage/index.js +1 -1
- package/src/themes/five/src/components/UserFormDetails/index.js +58 -14
- package/src/themes/five/src/components/UserFormDetails/styles.js +16 -0
- package/src/themes/five/src/components/UserPopover/index.js +26 -15
- package/src/themes/five/src/components/UserProfileForm/index.js +18 -9
- package/src/themes/five/src/styles/Buttons/index.js +11 -0
- package/src/themes/five/src/styles/Inputs/index.js +34 -0
- package/src/utils/index.js +5 -0
- package/template/app.js +5 -3
- package/template/theme.json +335 -24
- package/_bundles/ordering-ui.038c4b4d536032472bc7.js +0 -2
- /package/_bundles/{7.ordering-ui.038c4b4d536032472bc7.js.LICENSE.txt → 7.ordering-ui.5488030edb520175432d.js.LICENSE.txt} +0 -0
- /package/_bundles/{ordering-ui.038c4b4d536032472bc7.js.LICENSE.txt → ordering-ui.5488030edb520175432d.js.LICENSE.txt} +0 -0
|
@@ -7,11 +7,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = exports.Button = void 0;
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
var _polished = require("polished");
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26;
|
|
11
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
14
|
-
var Button = _styledComponents.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: #CCC;\n color: #FFF;\n border: 1px solid #CCC;\n border-radius: 7.6px;\n line-height: 30px;\n padding-left: 15px;\n padding-right: 15px;\n font-size: 16px;\n cursor: pointer;\n outline: none;\n overflow: hidden;\n text-overflow: ellipsis;\n &:active {\n background: ", ";\n }\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), function () {
|
|
14
|
+
var Button = _styledComponents.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: #CCC;\n color: #FFF;\n border: 1px solid #CCC;\n border-radius: 7.6px;\n line-height: 30px;\n padding-left: 15px;\n padding-right: 15px;\n font-size: 16px;\n cursor: pointer;\n outline: none;\n overflow: hidden;\n text-overflow: ellipsis;\n &:active {\n background: ", ";\n }\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), function () {
|
|
15
15
|
return (0, _polished.darken)(0.07, '#CCC');
|
|
16
16
|
}, function (_ref) {
|
|
17
17
|
var bgtransparent = _ref.bgtransparent;
|
|
@@ -28,18 +28,28 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
28
28
|
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-right: 15%;\n padding-left: 0;\n "])));
|
|
29
29
|
});
|
|
30
30
|
}, function (_ref3) {
|
|
31
|
-
var
|
|
32
|
-
|
|
31
|
+
var _theme$general, _theme$general$compon, _theme$general$compon2, _theme$general2, _theme$general2$compo, _theme$general2$compo2;
|
|
32
|
+
var theme = _ref3.theme;
|
|
33
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$general = theme.general) === null || _theme$general === void 0 ? void 0 : (_theme$general$compon = _theme$general.components) === null || _theme$general$compon === void 0 ? void 0 : (_theme$general$compon2 = _theme$general$compon.buttons) === null || _theme$general$compon2 === void 0 ? void 0 : _theme$general$compon2.borderRadius) && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n border-radius: ", ";\n "])), theme === null || theme === void 0 ? void 0 : (_theme$general2 = theme.general) === null || _theme$general2 === void 0 ? void 0 : (_theme$general2$compo = _theme$general2.components) === null || _theme$general2$compo === void 0 ? void 0 : (_theme$general2$compo2 = _theme$general2$compo.buttons) === null || _theme$general2$compo2 === void 0 ? void 0 : _theme$general2$compo2.borderRadius);
|
|
33
34
|
}, function (_ref4) {
|
|
34
|
-
var
|
|
35
|
-
|
|
35
|
+
var _theme$general3, _theme$general3$compo, _theme$general3$compo2, _theme$general3$compo3, _theme$general4, _theme$general4$compo, _theme$general4$compo2, _theme$general4$compo3, _theme$general4$compo4, _theme$general5, _theme$general5$compo, _theme$general5$compo2, _theme$general5$compo3, _theme$general5$compo4, _theme$general6, _theme$general6$compo, _theme$general6$compo2, _theme$general6$compo3, _theme$general6$compo4, _theme$general7, _theme$general7$compo, _theme$general7$compo2, _theme$general7$compo3, _theme$general7$compo4, _theme$general8, _theme$general8$compo, _theme$general8$compo2, _theme$general8$compo3, _theme$general8$compo4;
|
|
36
|
+
var theme = _ref4.theme;
|
|
37
|
+
return Object.values((theme === null || theme === void 0 ? void 0 : (_theme$general3 = theme.general) === null || _theme$general3 === void 0 ? void 0 : (_theme$general3$compo = _theme$general3.components) === null || _theme$general3$compo === void 0 ? void 0 : (_theme$general3$compo2 = _theme$general3$compo.buttons) === null || _theme$general3$compo2 === void 0 ? void 0 : (_theme$general3$compo3 = _theme$general3$compo2.shadow) === null || _theme$general3$compo3 === void 0 ? void 0 : _theme$general3$compo3.components) || {}).some(function (val) {
|
|
38
|
+
return !!val;
|
|
39
|
+
}) && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n box-shadow: \n ", "\n ", "\n ", "\n ", "\n ", ";\n "])), (theme === null || theme === void 0 ? void 0 : (_theme$general4 = theme.general) === null || _theme$general4 === void 0 ? void 0 : (_theme$general4$compo = _theme$general4.components) === null || _theme$general4$compo === void 0 ? void 0 : (_theme$general4$compo2 = _theme$general4$compo.buttons) === null || _theme$general4$compo2 === void 0 ? void 0 : (_theme$general4$compo3 = _theme$general4$compo2.shadow) === null || _theme$general4$compo3 === void 0 ? void 0 : (_theme$general4$compo4 = _theme$general4$compo3.components) === null || _theme$general4$compo4 === void 0 ? void 0 : _theme$general4$compo4.x) || '0px', (theme === null || theme === void 0 ? void 0 : (_theme$general5 = theme.general) === null || _theme$general5 === void 0 ? void 0 : (_theme$general5$compo = _theme$general5.components) === null || _theme$general5$compo === void 0 ? void 0 : (_theme$general5$compo2 = _theme$general5$compo.buttons) === null || _theme$general5$compo2 === void 0 ? void 0 : (_theme$general5$compo3 = _theme$general5$compo2.shadow) === null || _theme$general5$compo3 === void 0 ? void 0 : (_theme$general5$compo4 = _theme$general5$compo3.components) === null || _theme$general5$compo4 === void 0 ? void 0 : _theme$general5$compo4.y) || '0px', (theme === null || theme === void 0 ? void 0 : (_theme$general6 = theme.general) === null || _theme$general6 === void 0 ? void 0 : (_theme$general6$compo = _theme$general6.components) === null || _theme$general6$compo === void 0 ? void 0 : (_theme$general6$compo2 = _theme$general6$compo.buttons) === null || _theme$general6$compo2 === void 0 ? void 0 : (_theme$general6$compo3 = _theme$general6$compo2.shadow) === null || _theme$general6$compo3 === void 0 ? void 0 : (_theme$general6$compo4 = _theme$general6$compo3.components) === null || _theme$general6$compo4 === void 0 ? void 0 : _theme$general6$compo4.blur) || '0px', (theme === null || theme === void 0 ? void 0 : (_theme$general7 = theme.general) === null || _theme$general7 === void 0 ? void 0 : (_theme$general7$compo = _theme$general7.components) === null || _theme$general7$compo === void 0 ? void 0 : (_theme$general7$compo2 = _theme$general7$compo.buttons) === null || _theme$general7$compo2 === void 0 ? void 0 : (_theme$general7$compo3 = _theme$general7$compo2.shadow) === null || _theme$general7$compo3 === void 0 ? void 0 : (_theme$general7$compo4 = _theme$general7$compo3.components) === null || _theme$general7$compo4 === void 0 ? void 0 : _theme$general7$compo4.spread) || '0px', (theme === null || theme === void 0 ? void 0 : (_theme$general8 = theme.general) === null || _theme$general8 === void 0 ? void 0 : (_theme$general8$compo = _theme$general8.components) === null || _theme$general8$compo === void 0 ? void 0 : (_theme$general8$compo2 = _theme$general8$compo.buttons) === null || _theme$general8$compo2 === void 0 ? void 0 : (_theme$general8$compo3 = _theme$general8$compo2.shadow) === null || _theme$general8$compo3 === void 0 ? void 0 : (_theme$general8$compo4 = _theme$general8$compo3.components) === null || _theme$general8$compo4 === void 0 ? void 0 : _theme$general8$compo4.color) || '#000');
|
|
36
40
|
}, function (_ref5) {
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
return circle && outline && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background: #FFF;\n color: #CCC;\n border-color: #CCC;\n padding: 0;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n border-radius: 50%;\n &:active {\n color: #FFF;\n background: ", ";\n }\n "])), (0, _polished.darken)(0.07, '#CCC'));
|
|
41
|
+
var outline = _ref5.outline;
|
|
42
|
+
return outline && (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background: #FFF;\n color: #CCC;\n border-color: #CCC;\n &:active {\n color: #FFF;\n background: ", ";\n }\n &:hover {\n background: ", ";\n color: #FFF;\n }\n "])), (0, _polished.darken)(0.07, '#CCC'), (0, _polished.darken)(0.07, '#CCC'));
|
|
40
43
|
}, function (_ref6) {
|
|
41
|
-
var
|
|
42
|
-
return
|
|
44
|
+
var circle = _ref6.circle;
|
|
45
|
+
return circle && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n background: #CCC;\n color: #FFF;\n border-color: #CCC;\n padding: 0;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n border-radius: 50%;\n &:active {\n color: #FFF;\n background: ", ";\n }\n "])), (0, _polished.darken)(0.07, '#CCC'));
|
|
46
|
+
}, function (_ref7) {
|
|
47
|
+
var circle = _ref7.circle,
|
|
48
|
+
outline = _ref7.outline;
|
|
49
|
+
return circle && outline && (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background: #FFF;\n color: #CCC;\n border-color: #CCC;\n padding: 0;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n border-radius: 50%;\n &:active {\n color: #FFF;\n background: ", ";\n }\n "])), (0, _polished.darken)(0.07, '#CCC'));
|
|
50
|
+
}, function (_ref8) {
|
|
51
|
+
var color = _ref8.color;
|
|
52
|
+
return color === 'primary' && (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border-color: ", ";\n &:active {\n background: ", ";\n }\n &:hover {\n background: ", ";\n color: #FFF;\n }\n ", "\n ", "\n ", "\n "])), function (props) {
|
|
43
53
|
return props.theme.colors.primary;
|
|
44
54
|
}, function (props) {
|
|
45
55
|
return props.theme.colors.primaryContrast;
|
|
@@ -49,9 +59,9 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
49
59
|
return (0, _polished.darken)(0.07, props.theme.colors.primary);
|
|
50
60
|
}, function (props) {
|
|
51
61
|
return (0, _polished.darken)(0.07, props.theme.colors.primary);
|
|
52
|
-
}, function (
|
|
53
|
-
var outline =
|
|
54
|
-
return outline && (0, _styledComponents.css)(
|
|
62
|
+
}, function (_ref9) {
|
|
63
|
+
var outline = _ref9.outline;
|
|
64
|
+
return outline && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n background: #FFF;\n color: ", ";\n border-color: ", ";\n &:active {\n color: ", ";\n background: ", ";\n }\n &:hover {\n background: ", ";\n color: #FFF;\n }\n "])), function (props) {
|
|
55
65
|
return props.theme.colors.primary;
|
|
56
66
|
}, function (props) {
|
|
57
67
|
return props.theme.colors.primary;
|
|
@@ -62,9 +72,9 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
62
72
|
}, function (props) {
|
|
63
73
|
return (0, _polished.darken)(0.07, props.theme.colors.primary);
|
|
64
74
|
});
|
|
65
|
-
}, function (
|
|
66
|
-
var circle =
|
|
67
|
-
return circle && (0, _styledComponents.css)(
|
|
75
|
+
}, function (_ref10) {
|
|
76
|
+
var circle = _ref10.circle;
|
|
77
|
+
return circle && (0, _styledComponents.css)(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border-color: ", ";\n padding: 0;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n border-radius: 50%;\n &:active {\n border-color: ", ";\n background: ", ";\n }\n "])), function (props) {
|
|
68
78
|
return props.theme.colors.primary;
|
|
69
79
|
}, function (props) {
|
|
70
80
|
return props.theme.colors.primaryContrast;
|
|
@@ -75,10 +85,10 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
75
85
|
}, function (props) {
|
|
76
86
|
return (0, _polished.darken)(0.07, props.theme.colors.primary);
|
|
77
87
|
});
|
|
78
|
-
}, function (
|
|
79
|
-
var circle =
|
|
80
|
-
outline =
|
|
81
|
-
return circle && outline && (0, _styledComponents.css)(
|
|
88
|
+
}, function (_ref11) {
|
|
89
|
+
var circle = _ref11.circle,
|
|
90
|
+
outline = _ref11.outline;
|
|
91
|
+
return circle && outline && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n background: #FFF;\n color: ", ";\n border-color: ", ";\n padding: 0;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n border-radius: 50%;\n &:active {\n border-color: ", ";\n background: ", ";\n }\n "])), function (props) {
|
|
82
92
|
return props.theme.colors.primary;
|
|
83
93
|
}, function (props) {
|
|
84
94
|
return props.theme.colors.primary;
|
|
@@ -88,9 +98,9 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
88
98
|
return props.theme.colors.primary;
|
|
89
99
|
});
|
|
90
100
|
});
|
|
91
|
-
}, function (
|
|
92
|
-
var color =
|
|
93
|
-
return color === 'primaryContrast' && (0, _styledComponents.css)(
|
|
101
|
+
}, function (_ref12) {
|
|
102
|
+
var color = _ref12.color;
|
|
103
|
+
return color === 'primaryContrast' && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border-color: ", ";\n &:hover {\n background: ", ";\n }\n &:active {\n background: ", ";\n }\n ", "\n "])), function (props) {
|
|
94
104
|
return props.theme.colors.primaryContrast;
|
|
95
105
|
}, function (props) {
|
|
96
106
|
return props.theme.colors.primary;
|
|
@@ -100,13 +110,13 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
100
110
|
return (0, _polished.darken)(0.04, props.theme.colors.primaryContrast);
|
|
101
111
|
}, function (props) {
|
|
102
112
|
return (0, _polished.darken)(0.1, props.theme.colors.primaryContrast);
|
|
103
|
-
}, function (
|
|
104
|
-
var naked =
|
|
105
|
-
return naked && (0, _styledComponents.css)(
|
|
113
|
+
}, function (_ref13) {
|
|
114
|
+
var naked = _ref13.naked;
|
|
115
|
+
return naked && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n background: transparent;\n border-color: transparent;\n &:active {\n background: transparent;\n }\n &:hover {\n background: transparent;\n }\n "])));
|
|
106
116
|
});
|
|
107
|
-
}, function (
|
|
108
|
-
var color =
|
|
109
|
-
return color === 'secundary' && (0, _styledComponents.css)(
|
|
117
|
+
}, function (_ref14) {
|
|
118
|
+
var color = _ref14.color;
|
|
119
|
+
return color === 'secundary' && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border-color: ", ";\n &:active {\n background: ", ";\n }\n ", "\n ", "\n ", "\n "])), function (props) {
|
|
110
120
|
return props.theme.colors.secundary;
|
|
111
121
|
}, function (props) {
|
|
112
122
|
return props.theme.colors.secundaryContrast;
|
|
@@ -114,9 +124,9 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
114
124
|
return props.theme.colors.secundary;
|
|
115
125
|
}, function (props) {
|
|
116
126
|
return (0, _polished.darken)(0.07, props.theme.colors.secundary);
|
|
117
|
-
}, function (
|
|
118
|
-
var outline =
|
|
119
|
-
return outline && (0, _styledComponents.css)(
|
|
127
|
+
}, function (_ref15) {
|
|
128
|
+
var outline = _ref15.outline;
|
|
129
|
+
return outline && (0, _styledComponents.css)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n background: #FFF;\n color: ", ";\n border-color: ", ";\n &:active {\n color: ", ";\n background: ", ";\n }\n &:hover {\n background: ", ";\n color: #FFF;\n }\n "])), function (props) {
|
|
120
130
|
return props.theme.colors.secundary;
|
|
121
131
|
}, function (props) {
|
|
122
132
|
return props.theme.colors.secundary;
|
|
@@ -127,9 +137,9 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
127
137
|
}, function (props) {
|
|
128
138
|
return (0, _polished.darken)(0.07, props.theme.colors.secundary);
|
|
129
139
|
});
|
|
130
|
-
}, function (
|
|
131
|
-
var circle =
|
|
132
|
-
return circle && (0, _styledComponents.css)(
|
|
140
|
+
}, function (_ref16) {
|
|
141
|
+
var circle = _ref16.circle;
|
|
142
|
+
return circle && (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border-color: ", ";\n padding: 0;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n border-radius: 50%;\n &:active {\n color: ", ";\n border-color: ", ";\n background: ", ";\n }\n "])), function (props) {
|
|
133
143
|
return props.theme.colors.secundary;
|
|
134
144
|
}, function (props) {
|
|
135
145
|
return props.theme.colors.secundaryContrast;
|
|
@@ -142,10 +152,10 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
142
152
|
}, function (props) {
|
|
143
153
|
return (0, _polished.darken)(0.07, props.theme.colors.secundary);
|
|
144
154
|
});
|
|
145
|
-
}, function (
|
|
146
|
-
var circle =
|
|
147
|
-
outline =
|
|
148
|
-
return circle && outline && (0, _styledComponents.css)(
|
|
155
|
+
}, function (_ref17) {
|
|
156
|
+
var circle = _ref17.circle,
|
|
157
|
+
outline = _ref17.outline;
|
|
158
|
+
return circle && outline && (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n background: #FFF;\n color: ", ";\n border-color: ", ";\n padding: 0;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n border-radius: 50%;\n &:active {\n border-color: ", ";\n background: ", ";\n color: ", ";\n }\n "])), function (props) {
|
|
149
159
|
return props.theme.colors.secundary;
|
|
150
160
|
}, function (props) {
|
|
151
161
|
return props.theme.colors.secundary;
|
|
@@ -157,9 +167,9 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
157
167
|
return props.theme.colors.secundaryContrast;
|
|
158
168
|
});
|
|
159
169
|
});
|
|
160
|
-
}, function (
|
|
161
|
-
var color =
|
|
162
|
-
return color === 'gray' && (0, _styledComponents.css)(
|
|
170
|
+
}, function (_ref18) {
|
|
171
|
+
var color = _ref18.color;
|
|
172
|
+
return color === 'gray' && (0, _styledComponents.css)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border-color: ", ";\n &:active {\n background: ", ";\n }\n &:hover {\n background: ", ";\n }\n "])), function (props) {
|
|
163
173
|
return props.theme.colors.grayDividerColor;
|
|
164
174
|
}, function (props) {
|
|
165
175
|
return props.theme.colors.darkGray;
|
|
@@ -170,9 +180,9 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
170
180
|
}, function (props) {
|
|
171
181
|
return (0, _polished.darken)(0.07, props.theme.colors.grayDividerColor);
|
|
172
182
|
});
|
|
173
|
-
}, function (
|
|
174
|
-
var color =
|
|
175
|
-
return color === 'lightGray' && (0, _styledComponents.css)(
|
|
183
|
+
}, function (_ref19) {
|
|
184
|
+
var color = _ref19.color;
|
|
185
|
+
return color === 'lightGray' && (0, _styledComponents.css)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border-color: ", ";\n &:active {\n background: ", ";\n }\n &:hover {\n background: ", ";\n }\n "])), function (props) {
|
|
176
186
|
return props.theme.colors.gray200;
|
|
177
187
|
}, function (props) {
|
|
178
188
|
return props.theme.colors.secondaryDark;
|
|
@@ -183,9 +193,9 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
183
193
|
}, function (props) {
|
|
184
194
|
return (0, _polished.darken)(0.07, props.theme.colors.gray200);
|
|
185
195
|
});
|
|
186
|
-
}, function (
|
|
187
|
-
var color =
|
|
188
|
-
return color === 'red' && (0, _styledComponents.css)(
|
|
196
|
+
}, function (_ref20) {
|
|
197
|
+
var color = _ref20.color;
|
|
198
|
+
return color === 'red' && (0, _styledComponents.css)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n background: ", ";;\n color: ", ";\n border-color: ", ";\n &:active {\n background: ", ";\n }\n &:hover {\n background: ", ";\n }\n ", "\n "])), function (props) {
|
|
189
199
|
return props.theme.colors.danger500;
|
|
190
200
|
}, function (props) {
|
|
191
201
|
return props.theme.colors.backgroundPage;
|
|
@@ -195,9 +205,9 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
195
205
|
return (0, _polished.darken)(0.05, props.theme.colors.danger500);
|
|
196
206
|
}, function (props) {
|
|
197
207
|
return (0, _polished.darken)(0.07, props.theme.colors.danger500);
|
|
198
|
-
}, function (
|
|
199
|
-
var outline =
|
|
200
|
-
return outline && (0, _styledComponents.css)(
|
|
208
|
+
}, function (_ref21) {
|
|
209
|
+
var outline = _ref21.outline;
|
|
210
|
+
return outline && (0, _styledComponents.css)(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border-color: ", ";\n &:active {\n color: ", ";\n background: ", ";\n }\n &:hover {\n background: ", ";\n color: ", ";\n }\n "])), function (props) {
|
|
201
211
|
return props.theme.colors.backgroundPage;
|
|
202
212
|
}, function (props) {
|
|
203
213
|
return props.theme.colors.danger500;
|
|
@@ -213,9 +223,9 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
213
223
|
return props.theme.colors.backgroundPage;
|
|
214
224
|
});
|
|
215
225
|
});
|
|
216
|
-
}, function (
|
|
217
|
-
var color =
|
|
218
|
-
return color === 'black' && (0, _styledComponents.css)(
|
|
226
|
+
}, function (_ref22) {
|
|
227
|
+
var color = _ref22.color;
|
|
228
|
+
return color === 'black' && (0, _styledComponents.css)(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n background: ", ";;\n color: ", ";\n border-color: ", ";\n &:active {\n background: ", ";\n }\n &:hover {\n background: ", ";\n }\n ", "\n "])), function (props) {
|
|
219
229
|
return props.theme.colors.black;
|
|
220
230
|
}, function (props) {
|
|
221
231
|
return props.theme.colors.backgroundPage;
|
|
@@ -225,9 +235,9 @@ var Button = _styledComponents.default.button(_templateObject || (_templateObjec
|
|
|
225
235
|
return (0, _polished.darken)(0.05, props.theme.colors.black);
|
|
226
236
|
}, function (props) {
|
|
227
237
|
return (0, _polished.darken)(0.07, props.theme.colors.black);
|
|
228
|
-
}, function (
|
|
229
|
-
var outline =
|
|
230
|
-
return outline && (0, _styledComponents.css)(
|
|
238
|
+
}, function (_ref23) {
|
|
239
|
+
var outline = _ref23.outline;
|
|
240
|
+
return outline && (0, _styledComponents.css)(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border-color: ", ";\n &:active {\n color: ", ";\n background: ", ";\n }\n &:hover {\n background: ", ";\n color: ", ";\n }\n "])), function (props) {
|
|
231
241
|
return props.theme.colors.backgroundPage;
|
|
232
242
|
}, function (props) {
|
|
233
243
|
return props.theme.colors.black;
|
|
@@ -8,11 +8,11 @@ exports.TextArea = exports.InputSecundary = exports.InputPrimary = exports.Input
|
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
var _polished = require("polished");
|
|
10
10
|
var _Buttons = require("../Buttons");
|
|
11
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
|
|
11
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23;
|
|
12
12
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
13
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
|
-
var Input = _styledComponents.default.input(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: #FFF;\n color: #010300;\n border: 1px solid #DBDCDB;\n border-radius: 7.6px;\n font-size: 16px;\n padding: 7px 15px;\n outline: none;\n &:focus {\n border-color: ", ";\n }\n ", "\n &::placeholder,\n &::-webkit-input-placeholder {\n color: #DBDCDB;\n }\n &:-ms-input-placeholder {\n color: #DBDCDB;\n }\n ", "\n ", "\n"])), function () {
|
|
15
|
+
var Input = _styledComponents.default.input(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: #FFF;\n color: #010300;\n border: 1px solid #DBDCDB;\n border-radius: 7.6px;\n font-size: 16px;\n padding: 7px 15px;\n outline: none;\n &:focus {\n border-color: ", ";\n }\n ", "\n &::placeholder,\n &::-webkit-input-placeholder {\n color: #DBDCDB;\n }\n &:-ms-input-placeholder {\n color: #DBDCDB;\n }\n ", "\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function () {
|
|
16
16
|
return (0, _polished.darken)(0.07, '#CCC');
|
|
17
17
|
}, function (_ref) {
|
|
18
18
|
var w = _ref.w;
|
|
@@ -26,34 +26,58 @@ var Input = _styledComponents.default.input(_templateObject || (_templateObject
|
|
|
26
26
|
var _props$theme$colors;
|
|
27
27
|
return (_props$theme$colors = props.theme.colors) === null || _props$theme$colors === void 0 ? void 0 : _props$theme$colors.danger500;
|
|
28
28
|
});
|
|
29
|
+
}, function (_ref4) {
|
|
30
|
+
var _theme$general, _theme$general$compon, _theme$general$compon2, _theme$general2, _theme$general2$compo, _theme$general2$compo2;
|
|
31
|
+
var theme = _ref4.theme;
|
|
32
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$general = theme.general) === null || _theme$general === void 0 ? void 0 : (_theme$general$compon = _theme$general.components) === null || _theme$general$compon === void 0 ? void 0 : (_theme$general$compon2 = _theme$general$compon.inputs) === null || _theme$general$compon2 === void 0 ? void 0 : _theme$general$compon2.borderRadius) && (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-radius: ", ";\n "])), theme === null || theme === void 0 ? void 0 : (_theme$general2 = theme.general) === null || _theme$general2 === void 0 ? void 0 : (_theme$general2$compo = _theme$general2.components) === null || _theme$general2$compo === void 0 ? void 0 : (_theme$general2$compo2 = _theme$general2$compo.inputs) === null || _theme$general2$compo2 === void 0 ? void 0 : _theme$general2$compo2.borderRadius);
|
|
33
|
+
}, function (_ref5) {
|
|
34
|
+
var _theme$general3, _theme$general3$compo, _theme$general3$compo2, _theme$general4, _theme$general4$compo, _theme$general4$compo2;
|
|
35
|
+
var theme = _ref5.theme;
|
|
36
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$general3 = theme.general) === null || _theme$general3 === void 0 ? void 0 : (_theme$general3$compo = _theme$general3.components) === null || _theme$general3$compo === void 0 ? void 0 : (_theme$general3$compo2 = _theme$general3$compo.inputs) === null || _theme$general3$compo2 === void 0 ? void 0 : _theme$general3$compo2.color) && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme === null || theme === void 0 ? void 0 : (_theme$general4 = theme.general) === null || _theme$general4 === void 0 ? void 0 : (_theme$general4$compo = _theme$general4.components) === null || _theme$general4$compo === void 0 ? void 0 : (_theme$general4$compo2 = _theme$general4$compo.inputs) === null || _theme$general4$compo2 === void 0 ? void 0 : _theme$general4$compo2.color);
|
|
37
|
+
}, function (_ref6) {
|
|
38
|
+
var _theme$general5, _theme$general5$compo, _theme$general5$compo2, _theme$general6, _theme$general6$compo, _theme$general6$compo2, _theme$general7, _theme$general7$compo, _theme$general7$compo2;
|
|
39
|
+
var theme = _ref6.theme;
|
|
40
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$general5 = theme.general) === null || _theme$general5 === void 0 ? void 0 : (_theme$general5$compo = _theme$general5.components) === null || _theme$general5$compo === void 0 ? void 0 : (_theme$general5$compo2 = _theme$general5$compo.inputs) === null || _theme$general5$compo2 === void 0 ? void 0 : _theme$general5$compo2.borderColor) && (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n &::placeholder,\n &::-webkit-input-placeholder,\n &:-ms-input-placeholder {\n color: ", ";\n }\n "])), theme === null || theme === void 0 ? void 0 : (_theme$general6 = theme.general) === null || _theme$general6 === void 0 ? void 0 : (_theme$general6$compo = _theme$general6.components) === null || _theme$general6$compo === void 0 ? void 0 : (_theme$general6$compo2 = _theme$general6$compo.inputs) === null || _theme$general6$compo2 === void 0 ? void 0 : _theme$general6$compo2.borderColor, theme === null || theme === void 0 ? void 0 : (_theme$general7 = theme.general) === null || _theme$general7 === void 0 ? void 0 : (_theme$general7$compo = _theme$general7.components) === null || _theme$general7$compo === void 0 ? void 0 : (_theme$general7$compo2 = _theme$general7$compo.inputs) === null || _theme$general7$compo2 === void 0 ? void 0 : _theme$general7$compo2.borderColor);
|
|
29
41
|
});
|
|
30
42
|
exports.Input = Input;
|
|
31
|
-
var InputGroup = _styledComponents.default.div(
|
|
43
|
+
var InputGroup = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n & > ", ":not(:first-child) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n border-left: 0;\n padding-left: 0;\n }\n & > ", ":not(:last-child) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-right: 0;\n padding-right: 0;\n }\n"])), Input, Input);
|
|
32
44
|
exports.InputGroup = InputGroup;
|
|
33
|
-
var InputGroupLeft = _styledComponents.default.div(
|
|
45
|
+
var InputGroupLeft = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n line-height: 34px;\n padding-left: 7px;\n padding-right: 7px;\n font-size: 16px;\n border-width: 1px;\n height: 34px;\n border-style: solid;\n ", "\n & ", " {\n margin-left: -7px;\n ", "\n }\n"])), function (props) {
|
|
34
46
|
var _props$theme;
|
|
35
|
-
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(
|
|
47
|
+
return (_props$theme = props.theme) !== null && _props$theme !== void 0 && _props$theme.rtl ? (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n border-left-width: 0;\n border-radius: 34px 34px 0 0;\n "]))) : (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n border-radius: 34px 0 0 34px;\n border-right-width: 0;\n "])));
|
|
36
48
|
}, _Buttons.Button, function (props) {
|
|
37
49
|
var _props$theme2;
|
|
38
|
-
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(
|
|
50
|
+
return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.rtl) && (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-right: -7px;\n margin-left: 0;\n "])));
|
|
39
51
|
});
|
|
40
52
|
exports.InputGroupLeft = InputGroupLeft;
|
|
41
|
-
var TextArea = _styledComponents.default.textarea(
|
|
53
|
+
var TextArea = _styledComponents.default.textarea(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n background: #FFF;\n color: #010300;\n border: 1px solid #DBDCDB;\n border-radius: 7.6px;\n font-size: 16px;\n padding: 7px 15px;\n outline: none;\n resize: none;\n &:focus {\n border-color: ", ";\n }\n ", "\n &::placeholder,\n &::-webkit-input-placeholder {\n color: #DBDCDB;\n }\n &:-ms-input-placeholder {\n color: #DBDCDB;\n }\n\n ", "\n\n ", "\n\n ", "\n"])), function () {
|
|
42
54
|
return (0, _polished.darken)(0.07, '#CCC');
|
|
43
|
-
}, function (
|
|
44
|
-
var w =
|
|
45
|
-
return w && (0, _styledComponents.css)(
|
|
55
|
+
}, function (_ref7) {
|
|
56
|
+
var w = _ref7.w;
|
|
57
|
+
return w && (0, _styledComponents.css)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n width: 20%;\n "])));
|
|
58
|
+
}, function (_ref8) {
|
|
59
|
+
var _theme$general8, _theme$general8$compo, _theme$general8$compo2, _theme$general9, _theme$general9$compo, _theme$general9$compo2;
|
|
60
|
+
var theme = _ref8.theme;
|
|
61
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$general8 = theme.general) === null || _theme$general8 === void 0 ? void 0 : (_theme$general8$compo = _theme$general8.components) === null || _theme$general8$compo === void 0 ? void 0 : (_theme$general8$compo2 = _theme$general8$compo.inputs) === null || _theme$general8$compo2 === void 0 ? void 0 : _theme$general8$compo2.borderRadius) && (0, _styledComponents.css)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n border-radius: ", ";\n "])), theme === null || theme === void 0 ? void 0 : (_theme$general9 = theme.general) === null || _theme$general9 === void 0 ? void 0 : (_theme$general9$compo = _theme$general9.components) === null || _theme$general9$compo === void 0 ? void 0 : (_theme$general9$compo2 = _theme$general9$compo.inputs) === null || _theme$general9$compo2 === void 0 ? void 0 : _theme$general9$compo2.borderRadius);
|
|
62
|
+
}, function (_ref9) {
|
|
63
|
+
var _theme$general10, _theme$general10$comp, _theme$general10$comp2, _theme$general11, _theme$general11$comp, _theme$general11$comp2;
|
|
64
|
+
var theme = _ref9.theme;
|
|
65
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$general10 = theme.general) === null || _theme$general10 === void 0 ? void 0 : (_theme$general10$comp = _theme$general10.components) === null || _theme$general10$comp === void 0 ? void 0 : (_theme$general10$comp2 = _theme$general10$comp.inputs) === null || _theme$general10$comp2 === void 0 ? void 0 : _theme$general10$comp2.color) && (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme === null || theme === void 0 ? void 0 : (_theme$general11 = theme.general) === null || _theme$general11 === void 0 ? void 0 : (_theme$general11$comp = _theme$general11.components) === null || _theme$general11$comp === void 0 ? void 0 : (_theme$general11$comp2 = _theme$general11$comp.inputs) === null || _theme$general11$comp2 === void 0 ? void 0 : _theme$general11$comp2.color);
|
|
66
|
+
}, function (_ref10) {
|
|
67
|
+
var _theme$general12, _theme$general12$comp, _theme$general12$comp2, _theme$general13, _theme$general13$comp, _theme$general13$comp2, _theme$general14, _theme$general14$comp, _theme$general14$comp2;
|
|
68
|
+
var theme = _ref10.theme;
|
|
69
|
+
return (theme === null || theme === void 0 ? void 0 : (_theme$general12 = theme.general) === null || _theme$general12 === void 0 ? void 0 : (_theme$general12$comp = _theme$general12.components) === null || _theme$general12$comp === void 0 ? void 0 : (_theme$general12$comp2 = _theme$general12$comp.inputs) === null || _theme$general12$comp2 === void 0 ? void 0 : _theme$general12$comp2.borderColor) && (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n &::placeholder,\n &::-webkit-input-placeholder,\n &:-ms-input-placeholder {\n color: ", ";\n }\n "])), theme === null || theme === void 0 ? void 0 : (_theme$general13 = theme.general) === null || _theme$general13 === void 0 ? void 0 : (_theme$general13$comp = _theme$general13.components) === null || _theme$general13$comp === void 0 ? void 0 : (_theme$general13$comp2 = _theme$general13$comp.inputs) === null || _theme$general13$comp2 === void 0 ? void 0 : _theme$general13$comp2.borderColor, theme === null || theme === void 0 ? void 0 : (_theme$general14 = theme.general) === null || _theme$general14 === void 0 ? void 0 : (_theme$general14$comp = _theme$general14.components) === null || _theme$general14$comp === void 0 ? void 0 : (_theme$general14$comp2 = _theme$general14$comp.inputs) === null || _theme$general14$comp2 === void 0 ? void 0 : _theme$general14$comp2.borderColor);
|
|
46
70
|
});
|
|
47
71
|
exports.TextArea = TextArea;
|
|
48
|
-
var InputGroupRight = (0, _styledComponents.default)(InputGroupLeft)(
|
|
72
|
+
var InputGroupRight = (0, _styledComponents.default)(InputGroupLeft)(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n border-radius: 0 34px 34px 0;\n line-height: 34px;\n border-right-width: 1px;\n border-left-width: 0;\n ", "\n & ", " {\n margin-left: 0;\n margin-right: -7px;\n ", "\n }\n \n"])), function (props) {
|
|
49
73
|
var _props$theme3;
|
|
50
|
-
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(
|
|
74
|
+
return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.rtl) && (0, _styledComponents.css)(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n border-left-width: 1px;\n border-right-width: 0;\n border-radius: 0 0 34px 34px;\n "])));
|
|
51
75
|
}, _Buttons.Button, function (props) {
|
|
52
76
|
var _props$theme4;
|
|
53
|
-
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(
|
|
77
|
+
return ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.rtl) && (0, _styledComponents.css)(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n margin-left: -7px;\n margin-right: 0;\n "])));
|
|
54
78
|
});
|
|
55
79
|
exports.InputGroupRight = InputGroupRight;
|
|
56
|
-
var InputPrimary = (0, _styledComponents.default)(Input)(
|
|
80
|
+
var InputPrimary = (0, _styledComponents.default)(Input)(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n background: #FFF;\n color: ", ";\n border-color: ", ";\n &:focus {\n border-color: ", ";\n }\n"])), function (props) {
|
|
57
81
|
return props.theme.colors.primary;
|
|
58
82
|
}, function (props) {
|
|
59
83
|
return props.theme.colors.primary;
|
|
@@ -61,7 +85,7 @@ var InputPrimary = (0, _styledComponents.default)(Input)(_templateObject15 || (_
|
|
|
61
85
|
return (0, _polished.darken)(0.1, props.theme.colors.primary);
|
|
62
86
|
});
|
|
63
87
|
exports.InputPrimary = InputPrimary;
|
|
64
|
-
var InputSecundary = (0, _styledComponents.default)(Input)(
|
|
88
|
+
var InputSecundary = (0, _styledComponents.default)(Input)(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n background: #FFF;\n color: ", ";\n border-color: ", ";\n &:focus {\n border-color: ", ";\n }\n"])), function (props) {
|
|
65
89
|
return props.theme.colors.secundary;
|
|
66
90
|
}, function (props) {
|
|
67
91
|
return props.theme.colors.secundary;
|
|
@@ -69,7 +93,7 @@ var InputSecundary = (0, _styledComponents.default)(Input)(_templateObject16 ||
|
|
|
69
93
|
return (0, _polished.darken)(0.1, props.theme.colors.secundary);
|
|
70
94
|
});
|
|
71
95
|
exports.InputSecundary = InputSecundary;
|
|
72
|
-
var InputGroupPrimary = (0, _styledComponents.default)(InputGroup)(
|
|
96
|
+
var InputGroupPrimary = (0, _styledComponents.default)(InputGroup)(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n & > ", " {\n color: ", ";\n border-color: ", ";\n }\n"])), InputGroupLeft, function (props) {
|
|
73
97
|
return props.theme.colors.primary;
|
|
74
98
|
}, function (props) {
|
|
75
99
|
return props.theme.colors.primary;
|
package/_modules/utils/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.verifyDecimals = exports.sortInputFields = exports.shape = exports.scrollTo = exports.reviewCommentList = exports.priceList = exports.lightenDarkenColor = exports.getTraduction = exports.getTimes = exports.getStarWidth = exports.getOrderStatus = exports.getIconCard = exports.getHourMin = exports.getGoogleMapImage = exports.getDistance = exports.getCateringValues = exports.formatUrlVideo = exports.formatSeconds = exports.flatArray = exports.fieldsToSort = exports.convertToRadian = exports.convertHoursToMinutes = exports.checkSiteUrl = exports.capitalize = exports.calendarLanguages = exports.bytesConverter = void 0;
|
|
6
|
+
exports.verifyDecimals = exports.sortInputFields = exports.shape = exports.scrollTo = exports.reviewCommentList = exports.priceList = exports.orderTypeList = exports.lightenDarkenColor = exports.getTraduction = exports.getTimes = exports.getStarWidth = exports.getOrderStatus = exports.getIconCard = exports.getHourMin = exports.getGoogleMapImage = exports.getDistance = exports.getCateringValues = exports.formatUrlVideo = exports.formatSeconds = exports.flatArray = exports.fieldsToSort = exports.convertToRadian = exports.convertHoursToMinutes = exports.checkSiteUrl = exports.capitalize = exports.calendarLanguages = exports.bytesConverter = void 0;
|
|
7
7
|
var _orderingComponentsExternal = require("ordering-components-external");
|
|
8
8
|
var _styledComponents = require("styled-components");
|
|
9
9
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
@@ -406,12 +406,18 @@ var priceList = [{
|
|
|
406
406
|
content: '$$$$$'
|
|
407
407
|
}];
|
|
408
408
|
|
|
409
|
+
/**
|
|
410
|
+
* List of order type
|
|
411
|
+
*/
|
|
412
|
+
exports.priceList = priceList;
|
|
413
|
+
var orderTypeList = ['delivery', 'pickup', 'eatin', 'curbside', 'drivethru', 'seatdelivery'];
|
|
414
|
+
|
|
409
415
|
/**
|
|
410
416
|
* function to manage review comment list
|
|
411
417
|
* @param {number} param0 type of reviews to return
|
|
412
418
|
* @returns object with reviews dictionary
|
|
413
419
|
*/
|
|
414
|
-
exports.
|
|
420
|
+
exports.orderTypeList = orderTypeList;
|
|
415
421
|
var reviewCommentList = function reviewCommentList(type) {
|
|
416
422
|
var _useLanguage5 = (0, _orderingComponentsExternal.useLanguage)(),
|
|
417
423
|
_useLanguage6 = _slicedToArray(_useLanguage5, 2),
|
package/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="apple-touch-icon" href="/favicon.png">
|
|
9
9
|
<link rel="android-touch-icon" href="/favicon.png">
|
|
10
10
|
<link rel="windows-touch-icon" href="/favicon.png">
|
|
11
|
-
<link rel="icon" href="/favicon.png" type="image/png" sizes="16x16">
|
|
11
|
+
<link rel="icon" href="/favicon.png" type="image/png" sizes="16x16" id='favicon'>
|
|
12
12
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
|
13
13
|
<style type="text/css" id="styles"></style>
|
|
14
14
|
<style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-external",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "Ordering UI Components",
|
|
5
5
|
"main": "./_modules/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -86,7 +86,8 @@
|
|
|
86
86
|
"libphonenumber-js": "^1.9.4",
|
|
87
87
|
"lodash": "^4.17.19",
|
|
88
88
|
"moment": "^2.29.4",
|
|
89
|
-
"
|
|
89
|
+
"nanoid": "^4.0.0",
|
|
90
|
+
"ordering-components-external": "2.6.0",
|
|
90
91
|
"polished": "^3.6.6",
|
|
91
92
|
"react-bootstrap-icons": "^1.7.2",
|
|
92
93
|
"react-calendar": "^3.3.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
2
|
import { PaymentRequestButtonElement, useStripe } from '@stripe/react-stripe-js'
|
|
3
|
-
import { CardForm as CardFormController, useLanguage } from 'ordering-components-external'
|
|
3
|
+
import { CardForm as CardFormController, useConfig, useLanguage } from 'ordering-components-external'
|
|
4
4
|
import Skeleton from 'react-loading-skeleton'
|
|
5
5
|
import { Container } from './styles'
|
|
6
6
|
export const StripeMethodFormUI = (props) => {
|
|
@@ -8,22 +8,33 @@ export const StripeMethodFormUI = (props) => {
|
|
|
8
8
|
cart,
|
|
9
9
|
handleSource,
|
|
10
10
|
handleCancel,
|
|
11
|
-
paymethod
|
|
11
|
+
paymethod,
|
|
12
|
+
cartGroup
|
|
12
13
|
} = props
|
|
13
14
|
|
|
14
15
|
const [, t] = useLanguage()
|
|
15
16
|
const stripe = useStripe()
|
|
17
|
+
const [{ configs }] = useConfig()
|
|
16
18
|
const [paymentRequest, setPaymentRequest] = useState(null)
|
|
17
19
|
const [methodUnavailable, setMethodUnavailable] = useState(false)
|
|
18
20
|
|
|
21
|
+
const googlePayMethods = ['google_pay', 'global_google_pay']
|
|
22
|
+
|
|
19
23
|
useEffect(() => {
|
|
20
24
|
if (stripe) {
|
|
25
|
+
let cartNames = ''
|
|
26
|
+
if (cartGroup) {
|
|
27
|
+
// eslint-disable-next-line no-unused-expressions
|
|
28
|
+
cartGroup?.carts.map((cart, i) => (
|
|
29
|
+
cartNames = `${cart?.business?.name} ${i !== cartNames?.carts?.length && ', '}`
|
|
30
|
+
))
|
|
31
|
+
}
|
|
21
32
|
const pr = stripe.paymentRequest({
|
|
22
33
|
country: 'US',
|
|
23
|
-
currency: 'usd',
|
|
34
|
+
currency: configs?.stripe_currency?.value?.toLowerCase?.() || 'usd',
|
|
24
35
|
total: {
|
|
25
|
-
label: cart?.business?.name,
|
|
26
|
-
amount: Math.floor((cart?.balance || cart?.total) * 100)
|
|
36
|
+
label: cartNames || cart?.business?.name,
|
|
37
|
+
amount: Math.floor((cartGroup?.balance || cartGroup?.total || cart?.balance || cart?.total) * 100)
|
|
27
38
|
},
|
|
28
39
|
requestPayerName: true,
|
|
29
40
|
requestPayerEmail: true
|
|
@@ -36,9 +47,7 @@ export const StripeMethodFormUI = (props) => {
|
|
|
36
47
|
}
|
|
37
48
|
})
|
|
38
49
|
pr.on('paymentmethod', async (e) => {
|
|
39
|
-
|
|
40
|
-
handleCancel()
|
|
41
|
-
handleSource({
|
|
50
|
+
const data = {
|
|
42
51
|
...e?.paymentMethod?.card,
|
|
43
52
|
id: e.paymentMethod.id,
|
|
44
53
|
type: e.paymentMethod.type,
|
|
@@ -47,7 +56,10 @@ export const StripeMethodFormUI = (props) => {
|
|
|
47
56
|
brand: e.paymentMethod.card.brand,
|
|
48
57
|
last4: e.paymentMethod.card.last4
|
|
49
58
|
}
|
|
50
|
-
}
|
|
59
|
+
}
|
|
60
|
+
e.complete('success')
|
|
61
|
+
handleCancel()
|
|
62
|
+
handleSource(cartGroup ? JSON.stringify(data) : data)
|
|
51
63
|
})
|
|
52
64
|
}
|
|
53
65
|
}, [stripe])
|
|
@@ -55,7 +67,7 @@ export const StripeMethodFormUI = (props) => {
|
|
|
55
67
|
return (
|
|
56
68
|
<Container>
|
|
57
69
|
{methodUnavailable ? (
|
|
58
|
-
<h2>{paymethod
|
|
70
|
+
<h2>{googlePayMethods.includes(paymethod) ? t('GOOGLE_PAY_UNAVAILABLE', 'Google pay unavailable') : t('APPLE_PAY_UNAVAILABLE', 'Apple pay unavailable')}</h2>
|
|
59
71
|
) : (
|
|
60
72
|
<>
|
|
61
73
|
{paymentRequest ? (
|