infinity-forge 4.9.1 → 4.9.2
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/sites/components/default-pages/blog/components/styles.js +1 -1
- package/dist/sites/components/default-pages/blog/components/styles.js.map +1 -1
- package/dist/ui/utils/format/remove-digits.js +1 -1
- package/dist/ui/utils/format/remove-digits.js.map +1 -1
- package/dist/ui/utils/phone/index.d.ts +15 -0
- package/dist/ui/utils/phone/index.js +31 -0
- package/dist/ui/utils/phone/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -9,6 +9,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.Box = void 0;
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
exports.Box = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 20px;\n padding: 20px;\n\n background-color: #ffffff;\n border: 1px solid #00000029;\n border-radius: 10px;\n\n h3 {\n margin-bottom: 15px;\n }\n\n .link {\n display: flex;\n border-bottom: 1px solid #00000029;\n padding-bottom: 5px;\n margin-bottom: 8px;\n color: #000;\n }\n\n .input_control {\n margin-bottom: 0;\n }\n\n h4,\n p {\n text-align: center;\n margin: 0;\n }\n\n h4 {\n margin-bottom: 30px;\n }\n\n p + * {\n margin-top: 30px !important;\n }\n\n &.newsletter {\n display: flex;\n flex-direction: column;\n gap: 30px;\n\n h4 {\n margin-bottom: 0;\n }\n\n form {\n padding: 0;\n margin: 0 !important;\n height: fit-content;\n\n #form-error-focus {\n display: none;\n }\n }\n\n input,\n button {\n height: 2.76vw !important;\n min-height: 36px !important;\n border-radius: 5px;\n text-align: center;\n }\n\n input {\n border: 1px solid rgba(0, 0, 0, 0.3);\n margin-bottom: 10px;\n }\n\n input::placeholder {\n opacity: 0.6;\n }\n\n button {\n padding: 0;\n border: none;\n color: #fff;\n min-width: 100%;\n height: 2.76vw !important;\n background-color: #df0035;\n }\n\n .captcha {\n width: fit-content;\n margin: 0 auto 10px;\n }\n }\n\n &.sideBoxCategories {\n .categories-box {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n\n a {\n color: #000;\n border: 1px solid #df0035;\n padding: 0 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 5px;\n\n &:hover {\n background-color: #df0035;\n color: #fff;\n }\n }\n }\n }\n\n &.featuredBlogList {\n .detachs-box {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n }\n\n &.search {\n form div {\n position: relative;\n }\n\n .button-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .form-button {\n position: absolute;\n top: 50%;\n right: 6px;\n transform: translateY(-50%);\n padding: 2px !important;\n }\n\n .button-search {\n padding: 1px 6px !important;\n border-radius: 10px;\n }\n\n button {\n height: 34px !important;\n }\n\n svg {\n width: 20px !important;\n fill: #fff;\n }\n }\n\n @media only screen and (max-width: 1600px) {\n h4 {\n margin-bottom: 28px;\n }\n\n p + * {\n margin-top: 26px !important;\n }\n\n &.sideBoxCategories {\n .categories-box {\n a {\n padding: 0 13px;\n }\n }\n }\n\n &.featuredBlogList {\n .detachs-box {\n gap: 18px;\n }\n }\n }\n\n @media only screen and (max-width: 1400px) {\n p + * {\n margin-top: 22px !important;\n }\n\n &.sideBoxCategories {\n .categories-box {\n a {\n padding: 0 12px;\n }\n }\n }\n\n &.featuredBlogList {\n .detachs-box {\n gap: 15px;\n }\n }\n }\n\n @media only screen and (max-width: 1200px) {\n border-radius: 15px;\n\n p + * {\n margin-top: 20px !important;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n border-radius: 10px;\n\n &.newsletter {\n gap: 20px;\n }\n }\n\n @media only screen and (max-width: 768px) {\n padding: 15px;\n }\n"], ["\n border-radius: 20px;\n padding: 20px;\n\n background-color: #ffffff;\n border: 1px solid #00000029;\n border-radius: 10px;\n\n h3 {\n margin-bottom: 15px;\n }\n\n .link {\n display: flex;\n border-bottom: 1px solid #00000029;\n padding-bottom: 5px;\n margin-bottom: 8px;\n color: #000;\n }\n\n .input_control {\n margin-bottom: 0;\n }\n\n h4,\n p {\n text-align: center;\n margin: 0;\n }\n\n h4 {\n margin-bottom: 30px;\n }\n\n p + * {\n margin-top: 30px !important;\n }\n\n &.newsletter {\n display: flex;\n flex-direction: column;\n gap: 30px;\n\n h4 {\n margin-bottom: 0;\n }\n\n form {\n padding: 0;\n margin: 0 !important;\n height: fit-content;\n\n #form-error-focus {\n display: none;\n }\n }\n\n input,\n button {\n height: 2.76vw !important;\n min-height: 36px !important;\n border-radius: 5px;\n text-align: center;\n }\n\n input {\n border: 1px solid rgba(0, 0, 0, 0.3);\n margin-bottom: 10px;\n }\n\n input::placeholder {\n opacity: 0.6;\n }\n\n button {\n padding: 0;\n border: none;\n color: #fff;\n min-width: 100%;\n height: 2.76vw !important;\n background-color: #df0035;\n }\n\n .captcha {\n width: fit-content;\n margin: 0 auto 10px;\n }\n }\n\n &.sideBoxCategories {\n .categories-box {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n\n a {\n color: #000;\n border: 1px solid #df0035;\n padding: 0 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 5px;\n\n &:hover {\n background-color: #df0035;\n color: #fff;\n }\n }\n }\n }\n\n &.featuredBlogList {\n .detachs-box {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n }\n\n &.search {\n form div {\n position: relative;\n }\n\n .button-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .form-button {\n position: absolute;\n top: 50%;\n right: 6px;\n transform: translateY(-50%);\n padding: 2px !important;\n }\n\n .button-search {\n padding: 1px 6px !important;\n border-radius: 10px;\n }\n\n button {\n height: 34px !important;\n }\n\n svg {\n width: 20px !important;\n fill: #fff;\n }\n }\n\n @media only screen and (max-width: 1600px) {\n h4 {\n margin-bottom: 28px;\n }\n\n p + * {\n margin-top: 26px !important;\n }\n\n &.sideBoxCategories {\n .categories-box {\n a {\n padding: 0 13px;\n }\n }\n }\n\n &.featuredBlogList {\n .detachs-box {\n gap: 18px;\n }\n }\n }\n\n @media only screen and (max-width: 1400px) {\n p + * {\n margin-top: 22px !important;\n }\n\n &.sideBoxCategories {\n .categories-box {\n a {\n padding: 0 12px;\n }\n }\n }\n\n &.featuredBlogList {\n .detachs-box {\n gap: 15px;\n }\n }\n }\n\n @media only screen and (max-width: 1200px) {\n border-radius: 15px;\n\n p + * {\n margin-top: 20px !important;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n border-radius: 10px;\n\n &.newsletter {\n gap: 20px;\n }\n }\n\n @media only screen and (max-width: 768px) {\n padding: 15px;\n }\n"])));
|
|
12
|
+
exports.Box = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 20px;\n padding: 20px;\n\n background-color: #ffffff;\n border: 1px solid #00000029;\n border-radius: 10px;\n\n h3 {\n margin-bottom: 15px;\n }\n\n .link {\n display: flex;\n border-bottom: 1px solid #00000029;\n padding-bottom: 5px;\n margin-bottom: 8px;\n color: #000;\n }\n\n .input_control {\n margin-bottom: 0;\n }\n\n h4,\n p {\n text-align: center;\n margin: 0;\n }\n\n h4 {\n margin-bottom: 30px;\n }\n\n p + * {\n margin-top: 30px !important;\n }\n\n input {\n width: 100%;\n }\n\n &.newsletter {\n display: flex;\n flex-direction: column;\n gap: 30px;\n\n h4 {\n margin-bottom: 0;\n }\n\n form {\n padding: 0;\n margin: 0 !important;\n height: fit-content;\n\n #form-error-focus {\n display: none;\n }\n }\n\n input,\n button {\n height: 2.76vw !important;\n min-height: 36px !important;\n border-radius: 5px;\n text-align: center;\n }\n\n input {\n border: 1px solid rgba(0, 0, 0, 0.3);\n margin-bottom: 10px;\n }\n\n input::placeholder {\n opacity: 0.6;\n }\n\n button {\n gap: 0 !important;\n padding: 0;\n border: none;\n color: #fff;\n min-width: 100%;\n height: 2.76vw !important;\n background-color: #df0035;\n }\n\n .captcha {\n width: fit-content;\n margin: 0 auto 10px;\n }\n }\n\n &.sideBoxCategories {\n .categories-box {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n\n a {\n color: #000;\n border: 1px solid #df0035;\n padding: 0 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 5px;\n\n &:hover {\n background-color: #df0035;\n color: #fff;\n }\n }\n }\n }\n\n &.featuredBlogList {\n .detachs-box {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n }\n\n &.search {\n form div {\n position: relative;\n }\n\n .button-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .form-button {\n position: absolute;\n top: 50%;\n right: 6px;\n transform: translateY(-50%);\n padding: 2px !important;\n }\n\n .button-search {\n padding: 1px 6px !important;\n border-radius: 10px;\n }\n\n button {\n height: 34px !important;\n }\n\n svg {\n width: 20px !important;\n fill: #fff;\n }\n }\n\n @media only screen and (max-width: 1600px) {\n h4 {\n margin-bottom: 28px;\n }\n\n p + * {\n margin-top: 26px !important;\n }\n\n &.sideBoxCategories {\n .categories-box {\n a {\n padding: 0 13px;\n }\n }\n }\n\n &.featuredBlogList {\n .detachs-box {\n gap: 18px;\n }\n }\n }\n\n @media only screen and (max-width: 1400px) {\n p + * {\n margin-top: 22px !important;\n }\n\n &.sideBoxCategories {\n .categories-box {\n a {\n padding: 0 12px;\n }\n }\n }\n\n &.featuredBlogList {\n .detachs-box {\n gap: 15px;\n }\n }\n }\n\n @media only screen and (max-width: 1200px) {\n border-radius: 15px;\n\n p + * {\n margin-top: 20px !important;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n border-radius: 10px;\n\n &.newsletter {\n gap: 20px;\n }\n }\n\n @media only screen and (max-width: 768px) {\n padding: 15px;\n }\n"], ["\n border-radius: 20px;\n padding: 20px;\n\n background-color: #ffffff;\n border: 1px solid #00000029;\n border-radius: 10px;\n\n h3 {\n margin-bottom: 15px;\n }\n\n .link {\n display: flex;\n border-bottom: 1px solid #00000029;\n padding-bottom: 5px;\n margin-bottom: 8px;\n color: #000;\n }\n\n .input_control {\n margin-bottom: 0;\n }\n\n h4,\n p {\n text-align: center;\n margin: 0;\n }\n\n h4 {\n margin-bottom: 30px;\n }\n\n p + * {\n margin-top: 30px !important;\n }\n\n input {\n width: 100%;\n }\n\n &.newsletter {\n display: flex;\n flex-direction: column;\n gap: 30px;\n\n h4 {\n margin-bottom: 0;\n }\n\n form {\n padding: 0;\n margin: 0 !important;\n height: fit-content;\n\n #form-error-focus {\n display: none;\n }\n }\n\n input,\n button {\n height: 2.76vw !important;\n min-height: 36px !important;\n border-radius: 5px;\n text-align: center;\n }\n\n input {\n border: 1px solid rgba(0, 0, 0, 0.3);\n margin-bottom: 10px;\n }\n\n input::placeholder {\n opacity: 0.6;\n }\n\n button {\n gap: 0 !important;\n padding: 0;\n border: none;\n color: #fff;\n min-width: 100%;\n height: 2.76vw !important;\n background-color: #df0035;\n }\n\n .captcha {\n width: fit-content;\n margin: 0 auto 10px;\n }\n }\n\n &.sideBoxCategories {\n .categories-box {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n\n a {\n color: #000;\n border: 1px solid #df0035;\n padding: 0 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 5px;\n\n &:hover {\n background-color: #df0035;\n color: #fff;\n }\n }\n }\n }\n\n &.featuredBlogList {\n .detachs-box {\n display: flex;\n flex-direction: column;\n gap: 20px;\n }\n }\n\n &.search {\n form div {\n position: relative;\n }\n\n .button-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .form-button {\n position: absolute;\n top: 50%;\n right: 6px;\n transform: translateY(-50%);\n padding: 2px !important;\n }\n\n .button-search {\n padding: 1px 6px !important;\n border-radius: 10px;\n }\n\n button {\n height: 34px !important;\n }\n\n svg {\n width: 20px !important;\n fill: #fff;\n }\n }\n\n @media only screen and (max-width: 1600px) {\n h4 {\n margin-bottom: 28px;\n }\n\n p + * {\n margin-top: 26px !important;\n }\n\n &.sideBoxCategories {\n .categories-box {\n a {\n padding: 0 13px;\n }\n }\n }\n\n &.featuredBlogList {\n .detachs-box {\n gap: 18px;\n }\n }\n }\n\n @media only screen and (max-width: 1400px) {\n p + * {\n margin-top: 22px !important;\n }\n\n &.sideBoxCategories {\n .categories-box {\n a {\n padding: 0 12px;\n }\n }\n }\n\n &.featuredBlogList {\n .detachs-box {\n gap: 15px;\n }\n }\n }\n\n @media only screen and (max-width: 1200px) {\n border-radius: 15px;\n\n p + * {\n margin-top: 20px !important;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n border-radius: 10px;\n\n &.newsletter {\n gap: 20px;\n }\n }\n\n @media only screen and (max-width: 768px) {\n padding: 15px;\n }\n"])));
|
|
13
13
|
var templateObject_1;
|
|
14
14
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/sites/components/default-pages/blog/components/styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,GAAG,GAAG,2BAAM,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../src/sites/components/default-pages/blog/components/styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,GAAG,GAAG,2BAAM,CAAC,GAAG,2lHAAA,whHA8N5B,KAAA"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.removeDigits = void 0;
|
|
4
4
|
function removeDigits(word) {
|
|
5
5
|
var _a;
|
|
6
|
-
return (_a = String(word)) === null || _a === void 0 ? void 0 : _a.replace(/[^0-9]/g,
|
|
6
|
+
return (_a = String(word)) === null || _a === void 0 ? void 0 : _a.replace(/[^0-9]/g, '');
|
|
7
7
|
}
|
|
8
8
|
exports.removeDigits = removeDigits;
|
|
9
9
|
//# sourceMappingURL=remove-digits.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove-digits.js","sourceRoot":"","sources":["../../../../src/ui/utils/format/remove-digits.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,IAAY;;IACvC,OAAO,MAAA,MAAM,CAAC,IAAI,CAAC,0CAAE,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"remove-digits.js","sourceRoot":"","sources":["../../../../src/ui/utils/format/remove-digits.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,IAAY;;IACvC,OAAO,MAAA,MAAM,CAAC,IAAI,CAAC,0CAAE,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAA;AAC7C,CAAC;AAFD,oCAEC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type Phone = {
|
|
2
|
+
phoneNumber: string;
|
|
3
|
+
countryCode?: string;
|
|
4
|
+
};
|
|
5
|
+
declare function generateWhatsappUrl({ countryCode, message, phoneNumber, }: {
|
|
6
|
+
message?: string;
|
|
7
|
+
} & Phone): string;
|
|
8
|
+
declare function generatePhoneUrl({ countryCode, phoneNumber }: Phone): string;
|
|
9
|
+
declare const phone: {
|
|
10
|
+
generatePhoneUrl: typeof generatePhoneUrl;
|
|
11
|
+
whatsapp: {
|
|
12
|
+
generateWhatsappUrl: typeof generateWhatsappUrl;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export { phone, generatePhoneUrl, generateWhatsappUrl };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateWhatsappUrl = exports.generatePhoneUrl = exports.phone = void 0;
|
|
4
|
+
var ui_1 = require("../../../ui/index.js");
|
|
5
|
+
function formatPhoneNumber(_a) {
|
|
6
|
+
var phoneNumber = _a.phoneNumber, _b = _a.countryCode, countryCode = _b === void 0 ? '55' : _b;
|
|
7
|
+
if (!phoneNumber)
|
|
8
|
+
return 'Número não informado';
|
|
9
|
+
var formattedNumber = phoneNumber === null || phoneNumber === void 0 ? void 0 : phoneNumber.replaceAll(/\D/g, '');
|
|
10
|
+
if (!(0, ui_1.validatePhone)(formattedNumber))
|
|
11
|
+
return 'Numero inválido';
|
|
12
|
+
return "".concat(countryCode).concat(formattedNumber);
|
|
13
|
+
}
|
|
14
|
+
function generateWhatsappUrl(_a) {
|
|
15
|
+
var countryCode = _a.countryCode, message = _a.message, phoneNumber = _a.phoneNumber;
|
|
16
|
+
var phoneNumberFormatted = formatPhoneNumber({ phoneNumber: phoneNumber, countryCode: countryCode });
|
|
17
|
+
return "https://wa.me/".concat(phoneNumberFormatted, "?text=").concat(encodeURIComponent(message || ''));
|
|
18
|
+
}
|
|
19
|
+
exports.generateWhatsappUrl = generateWhatsappUrl;
|
|
20
|
+
function generatePhoneUrl(_a) {
|
|
21
|
+
var countryCode = _a.countryCode, phoneNumber = _a.phoneNumber;
|
|
22
|
+
var phoneNumberFormatted = formatPhoneNumber({ phoneNumber: phoneNumber, countryCode: countryCode });
|
|
23
|
+
return "tel:+".concat(phoneNumberFormatted);
|
|
24
|
+
}
|
|
25
|
+
exports.generatePhoneUrl = generatePhoneUrl;
|
|
26
|
+
var phone = {
|
|
27
|
+
generatePhoneUrl: generatePhoneUrl,
|
|
28
|
+
whatsapp: { generateWhatsappUrl: generateWhatsappUrl },
|
|
29
|
+
};
|
|
30
|
+
exports.phone = phone;
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/utils/phone/index.ts"],"names":[],"mappings":";;;AAAA,2BAAoC;AAIpC,SAAS,iBAAiB,CAAC,EAA0C;QAAxC,WAAW,iBAAA,EAAE,mBAAkB,EAAlB,WAAW,mBAAG,IAAI,KAAA;IAC1D,IAAI,CAAC,WAAW;QAAE,OAAO,sBAAsB,CAAA;IAE/C,IAAM,eAAe,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IAE1D,IAAI,CAAC,IAAA,kBAAa,EAAC,eAAe,CAAC;QAAE,OAAO,kBAAkB,CAAA;IAE9D,OAAO,UAAG,WAAW,SAAG,eAAe,CAAE,CAAA;AAC3C,CAAC;AAED,SAAS,mBAAmB,CAAC,EAMpB;QALP,WAAW,iBAAA,EACX,OAAO,aAAA,EACP,WAAW,iBAAA;IAIX,IAAM,oBAAoB,GAAG,iBAAiB,CAAC,EAAE,WAAW,aAAA,EAAE,WAAW,aAAA,EAAE,CAAC,CAAA;IAE5E,OAAO,wBAAiB,oBAAoB,mBAAS,kBAAkB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAE,CAAA;AAC1F,CAAC;AAaiC,kDAAmB;AAXrD,SAAS,gBAAgB,CAAC,EAAmC;QAAjC,WAAW,iBAAA,EAAE,WAAW,iBAAA;IAClD,IAAM,oBAAoB,GAAG,iBAAiB,CAAC,EAAE,WAAW,aAAA,EAAE,WAAW,aAAA,EAAE,CAAC,CAAA;IAE5E,OAAO,eAAQ,oBAAoB,CAAE,CAAA;AACvC,CAAC;AAOe,4CAAgB;AALhC,IAAM,KAAK,GAAG;IACZ,gBAAgB,kBAAA;IAChB,QAAQ,EAAE,EAAE,mBAAmB,qBAAA,EAAE;CAClC,CAAA;AAEQ,sBAAK"}
|