mitre-form-component 0.0.13 → 0.0.15
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.cjs +206 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -4
- package/dist/index.d.ts +15 -4
- package/dist/index.js +207 -27
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -34,6 +34,9 @@ __export(index_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
36
|
|
|
37
|
+
// src/components/Form/index.tsx
|
|
38
|
+
var import_react2 = __toESM(require("react"), 1);
|
|
39
|
+
|
|
37
40
|
// src/components/styles/utils.ts
|
|
38
41
|
function flex(direction = "row", alignItems, justifyContent) {
|
|
39
42
|
return `
|
|
@@ -144,36 +147,213 @@ var Text = import_styled_components.default.p`
|
|
|
144
147
|
margin-top: 10px;
|
|
145
148
|
`;
|
|
146
149
|
|
|
150
|
+
// src/components/styles/global.ts
|
|
151
|
+
var import_styled_components2 = require("styled-components");
|
|
152
|
+
var import_react = require("react");
|
|
153
|
+
var GlobalStyles = import_styled_components2.createGlobalStyle`
|
|
154
|
+
:root {
|
|
155
|
+
--red: #e52e4d;
|
|
156
|
+
--white: #FFF;
|
|
157
|
+
--black: #2F2F2F;
|
|
158
|
+
--black-2:#1E1E1E;
|
|
159
|
+
--alphaBlack: #000000;
|
|
160
|
+
--black-2:#1E1E1E;
|
|
161
|
+
--black-3:#353535;
|
|
162
|
+
|
|
163
|
+
--yellow-400:#FFD789;
|
|
164
|
+
--yellow-500: #F6C76B;
|
|
165
|
+
--gray-40:#F0F0F0;
|
|
166
|
+
--gray-45:#767676;
|
|
167
|
+
--gray-50: #686A69;
|
|
168
|
+
--gray-60: #8F8F8F;
|
|
169
|
+
--gray-100: #B6B6B6;
|
|
170
|
+
--gray-150: #B9B9B9;
|
|
171
|
+
--gray-200: #D2D2D2;
|
|
172
|
+
--gray-300: #EBEBEB;
|
|
173
|
+
--gray-400: #ECECEC;
|
|
174
|
+
--gray-500: #F4F4F4;
|
|
175
|
+
--gray-550:#6F6F6F;
|
|
176
|
+
--gray-600:#686868;
|
|
177
|
+
--gray-700: #535353;
|
|
178
|
+
--gray-800:#9D9D9D;
|
|
179
|
+
--shadow-500: 0px 4px 8px rgba(91, 91, 91, 0.2);
|
|
180
|
+
--green:#57C06E;
|
|
181
|
+
--green-2:#2DCE68;
|
|
182
|
+
--blue:#007BFF;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
* {
|
|
186
|
+
margin: 0;
|
|
187
|
+
padding: 0;
|
|
188
|
+
box-sizing: border-box;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
html {
|
|
192
|
+
scroll-behavior: smooth;
|
|
193
|
+
|
|
194
|
+
@media (max-width: 1080px) {
|
|
195
|
+
font-size: 93.75%;
|
|
196
|
+
}
|
|
197
|
+
@media (max-width: 720px) {
|
|
198
|
+
font-size: 87.5%;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
body {
|
|
203
|
+
background: var(--white);
|
|
204
|
+
-webkit-font-smoothing: antialiased;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
body, input, textarea, select, button {
|
|
208
|
+
font-family: "Montserrat", sans-serif;
|
|
209
|
+
font-weight: 400;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
h1, h2, h3, h4, h5, h6, strong {
|
|
213
|
+
font-weight: 600;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
button {
|
|
217
|
+
cursor: pointer;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
[disabled] {
|
|
221
|
+
opacity: 0.6;
|
|
222
|
+
cursor: not-allowed;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.hidden {
|
|
226
|
+
overflow: hidden;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
::-webkit-scrollbar {
|
|
230
|
+
-webkit-appearance: none;
|
|
231
|
+
background: var(--gray-500);
|
|
232
|
+
width: 6px;
|
|
233
|
+
height: 10px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
::-webkit-scrollbar-thumb {
|
|
237
|
+
background-color: var(--gray-50);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.aligncenter {
|
|
241
|
+
text-align: center;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.width-190px {
|
|
245
|
+
width:190px;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.hidden-content {
|
|
249
|
+
display:none !important;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.global-margin-bottom {
|
|
253
|
+
margin-bottom:20px;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.background-light-gray {
|
|
257
|
+
background:#F4F4F4;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.full-width-and-height {
|
|
261
|
+
height:100%;
|
|
262
|
+
width:100%;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.flex-direction-column {
|
|
266
|
+
flex-direction:column;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.bold {
|
|
270
|
+
font-weight:700;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.margin-center-x {
|
|
274
|
+
margin:0 auto;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.border-none {
|
|
278
|
+
border:none;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.text-center {
|
|
282
|
+
text-align:center;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.relative {
|
|
286
|
+
position:relative;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* accessibility */
|
|
290
|
+
body ._access-menu p._text-center{
|
|
291
|
+
font-family: "Montserrat", sans-serif;
|
|
292
|
+
font-style: italic;
|
|
293
|
+
font-size: 1.2rem!important;
|
|
294
|
+
margin-top: 6px;
|
|
295
|
+
margin-bottom: 3px;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
`;
|
|
299
|
+
var FontLoader = () => {
|
|
300
|
+
(0, import_react.useEffect)(() => {
|
|
301
|
+
const link = document.createElement("link");
|
|
302
|
+
link.href = "https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap";
|
|
303
|
+
link.rel = "stylesheet";
|
|
304
|
+
document.head.appendChild(link);
|
|
305
|
+
}, []);
|
|
306
|
+
return null;
|
|
307
|
+
};
|
|
308
|
+
var global_default = FontLoader;
|
|
309
|
+
|
|
147
310
|
// src/components/Form/index.tsx
|
|
148
311
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
149
|
-
var MitreFormComponent = (
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"
|
|
172
|
-
|
|
173
|
-
|
|
312
|
+
var MitreFormComponent = import_react2.default.forwardRef(({
|
|
313
|
+
productId,
|
|
314
|
+
apiUrl,
|
|
315
|
+
apiToken,
|
|
316
|
+
utm_source,
|
|
317
|
+
utm_medium,
|
|
318
|
+
utm_campaign,
|
|
319
|
+
utm_term,
|
|
320
|
+
showHeader = true,
|
|
321
|
+
colorPrimary = "#F6C76B",
|
|
322
|
+
textColor = "#2F2F2F",
|
|
323
|
+
backgroundColor = "#cecece",
|
|
324
|
+
innerPadding = "1rem"
|
|
325
|
+
}, ref) => {
|
|
326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
327
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(global_default, {}),
|
|
328
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalStyles, {}),
|
|
329
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(FormContainer, { ref, children: [
|
|
330
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(HeaderContainer, { children: [
|
|
331
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Title, { children: "Atendimento por mensagem" }),
|
|
332
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: "Informe seus dados e retornaremos a mensagem." })
|
|
333
|
+
] }),
|
|
334
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h6", { children: "* Campos de preenchimento obrigat\xF3rio." }),
|
|
335
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonContainer, {}),
|
|
336
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
|
|
337
|
+
"A Mitre Realty respeita a sua privacidade e utiliza os seus dados pessoais para contat\xE1-lo por e-mail ou telefone aqui registrados. Para saber mais, acesse a nossa",
|
|
338
|
+
" ",
|
|
339
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
340
|
+
"a",
|
|
341
|
+
{
|
|
342
|
+
href: "https://www.mitrerealty.com.br/politica-de-privacidade",
|
|
343
|
+
target: "_blank",
|
|
344
|
+
rel: "noopener noreferrer",
|
|
345
|
+
children: "Pol\xEDtica de Privacidade"
|
|
346
|
+
}
|
|
347
|
+
),
|
|
348
|
+
". Ao clicar em ",
|
|
349
|
+
'"',
|
|
350
|
+
"enviar",
|
|
351
|
+
'"',
|
|
352
|
+
", voc\xEA concorda em permitir que a Mitre Realty, armazene e processe os dados pessoais fornecidos por voc\xEA para finalidade informada"
|
|
353
|
+
] })
|
|
174
354
|
] })
|
|
175
355
|
] });
|
|
176
|
-
};
|
|
356
|
+
});
|
|
177
357
|
MitreFormComponent.displayName = "MitreFormComponent";
|
|
178
358
|
var Form_default = MitreFormComponent;
|
|
179
359
|
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/components/styles/utils.ts","../src/components/Form/styles.ts","../src/components/Form/index.tsx"],"sourcesContent":["import MitreFormComponent from \"./components/Form\";\n\nexport default MitreFormComponent;\n//export type { MitreFormComponentProps } from \"./components/Form\";\n","type directionType = \"column\" | \"row\";\ntype alignItemsType = \"center\" | \"flex-start\";\n\ntype jutifyContentType = \"center\" | \"space-between\";\n\nexport function flex(\n direction: directionType = \"row\",\n alignItems?: alignItemsType,\n justifyContent?: jutifyContentType\n) {\n return `\n align-items:${alignItems || null};\n display:flex;\n flex-direction:${direction};\n justify-content:${justifyContent || null};\n `;\n}\n\nexport const alignX = `\n left:50%;\n transform:translateX(-50%);\n`;\n\nexport const alignXAndY = `\n left:50%;\n top:50%;\n transform:translate(-50%, -50%);\n`;\n\nexport const darkEffect = `\n &:hover {\n cursor:pointer;\n filter:brightness(98%);\n }\n\n &:active {\n filter:brightness(95%);\n }\n`;\n\nexport const opacityEffect = `\n &:hover {\n cursor:pointer;\n opacity:.9;\n }\n\n &:active {\n opacity:.7;\n }\n`;\n\nexport const modalZIndex = 9999;\n\nexport const breakpoints = {\n tablet: \"1024px\",\n};\n","import { flex, opacityEffect } from \"../styles/utils\";\nimport styled from \"styled-components\";\n\nexport const FormContainer = styled.div`\n ${flex(\"column\")}\n align-items: stretch;\n justify-content: flex-start;\n overflow-x: hidden;\n overflow-y: auto;\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n\n box-sizing: border-box;\n height: 100%;\n`;\n\nexport const HeaderContainer = styled.div`\n margin-bottom: 1rem;\n`;\n\nexport const ButtonContainer = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: 0.75rem;\n`;\n\nexport const Form = styled.form`\n label {\n font-weight: 700;\n }\n\n input {\n background: white;\n margin-bottom: 0.75rem;\n }\n\n p {\n font-family: \"Montserrat\", sans-serif;\n font-style: italic;\n font-weight: 200;\n font-size: 0.8rem;\n text-align: start;\n }\n\n a {\n font-family: \"Montserrat\", sans-serif;\n font-style: italic;\n font-weight: 200;\n font-size: 0.8rem;\n }\n\n h6 {\n text-align: start;\n margin-left: 10px;\n }\n\n & > div {\n margin-bottom: 10px;,\n }\n\n button {\n ${opacityEffect}\n color: var(--black);\n font-weight: 600;\n border: none;\n border-radius: 8px;\n width: 60%;\n margin-top: 10px;\n margin-bottom: 10px;\n }\n`;\n\nexport const Title = styled.h2`\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 24px;\n letter-spacing: 0em;\n`;\n\nexport const Text = styled.p`\n font-size: 1rem;\n font-weight: 400;\n line-height: 23px;\n letter-spacing: 0em;\n margin-top: 10px;\n`;\n","import React, { useState } from \"react\";\n\nimport { \n FormContainer, \n HeaderContainer, \n ButtonContainer, \n Form, \n Title, \n Text \n} from \"./styles\";\n\nconst MitreFormComponent = ( ) => {\n \n return (\n <FormContainer >\n <HeaderContainer>\n <Title >Atendimento por mensagem</Title>\n\n <Text >Informe seus dados e retornaremos a mensagem.</Text>\n </HeaderContainer>\n\n \n\n <h6>* Campos de preenchimento obrigatório.</h6>\n\n <ButtonContainer>\n </ButtonContainer>\n\n <p>A Mitre Realty respeita a sua privacidade e utiliza os seus dados pessoais para contatá-lo por e-mail ou telefone aqui registrados. Para saber mais, acesse a nossa{ ' '}\n <a\n href=\"https://www.mitrerealty.com.br/politica-de-privacidade\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Política de Privacidade\n </a>. Ao clicar em {'\"'}enviar{'\"'}, você concorda em permitir que a Mitre Realty, armazene e processe os dados pessoais fornecidos por você para finalidade informada</p>\n\n </FormContainer>\n );\n};\n\nMitreFormComponent.displayName = \"MitreFormComponent\";\nexport default MitreFormComponent;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;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AA,MAAqK;AAAA,MACxK;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,QAAO;AAAA,UACP,KAAI;AAAA,UACL;AAAA;AAAA,MAED;AAAA,MAAI;AAAA,MAAgB;AAAA,MAAI;AAAA,MAAO;AAAA,MAAI;AAAA,OAAmI;AAAA,KAE1K;AAEJ;AAEA,mBAAmB,cAAc;AACjC,IAAO,eAAQ;;;AHxCf,IAAO,gBAAQ;","names":["styled"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/components/Form/index.tsx","../src/components/styles/utils.ts","../src/components/Form/styles.ts","../src/components/styles/global.ts"],"sourcesContent":["import MitreFormComponent from \"./components/Form\";\n\nexport default MitreFormComponent;\n//export type { MitreFormComponentProps } from \"./components/Form\";\n","import React, { useState } from \"react\";\n\nimport { \n FormContainer, \n HeaderContainer, \n ButtonContainer, \n Form, \n Title, \n Text \n} from \"./styles\";\nimport FontLoader, { GlobalStyles } from \"../styles/global\";\n\nexport interface MitreFormComponentProps {\n productId: string;\n apiUrl: string;\n apiToken: string;\n utm_source: string;\n utm_medium: string;\n utm_campaign: string;\n utm_term: string;\n showHeader?: boolean;\n colorPrimary?: string;\n textColor?: string;\n backgroundColor?: string;\n innerPadding?: string;\n}\n\nconst MitreFormComponent = React.forwardRef<HTMLDivElement, MitreFormComponentProps>(({\n productId,\n apiUrl,\n apiToken,\n utm_source,\n utm_medium,\n utm_campaign,\n utm_term,\n showHeader = true,\n colorPrimary = \"#F6C76B\",\n textColor = \"#2F2F2F\",\n backgroundColor = \"#cecece\",\n innerPadding = \"1rem\",\n}, ref) => {\n return (\n <>\n <FontLoader />\n <GlobalStyles />\n <FormContainer ref={ref} >\n <HeaderContainer>\n <Title >Atendimento por mensagem</Title>\n\n <Text >Informe seus dados e retornaremos a mensagem.</Text>\n </HeaderContainer>\n\n \n\n <h6>* Campos de preenchimento obrigatório.</h6>\n\n <ButtonContainer>\n </ButtonContainer>\n\n <p>A Mitre Realty respeita a sua privacidade e utiliza os seus dados pessoais para contatá-lo por e-mail ou telefone aqui registrados. Para saber mais, acesse a nossa{ ' '}\n <a\n href=\"https://www.mitrerealty.com.br/politica-de-privacidade\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Política de Privacidade\n </a>. Ao clicar em {'\"'}enviar{'\"'}, você concorda em permitir que a Mitre Realty, armazene e processe os dados pessoais fornecidos por você para finalidade informada</p>\n\n </FormContainer>\n </>\n );\n});\n\nMitreFormComponent.displayName = \"MitreFormComponent\";\nexport default MitreFormComponent;\n","type directionType = \"column\" | \"row\";\ntype alignItemsType = \"center\" | \"flex-start\";\n\ntype jutifyContentType = \"center\" | \"space-between\";\n\nexport function flex(\n direction: directionType = \"row\",\n alignItems?: alignItemsType,\n justifyContent?: jutifyContentType\n) {\n return `\n align-items:${alignItems || null};\n display:flex;\n flex-direction:${direction};\n justify-content:${justifyContent || null};\n `;\n}\n\nexport const alignX = `\n left:50%;\n transform:translateX(-50%);\n`;\n\nexport const alignXAndY = `\n left:50%;\n top:50%;\n transform:translate(-50%, -50%);\n`;\n\nexport const darkEffect = `\n &:hover {\n cursor:pointer;\n filter:brightness(98%);\n }\n\n &:active {\n filter:brightness(95%);\n }\n`;\n\nexport const opacityEffect = `\n &:hover {\n cursor:pointer;\n opacity:.9;\n }\n\n &:active {\n opacity:.7;\n }\n`;\n\nexport const modalZIndex = 9999;\n\nexport const breakpoints = {\n tablet: \"1024px\",\n};\n","import { flex, opacityEffect } from \"../styles/utils\";\nimport styled from \"styled-components\";\n\nexport const FormContainer = styled.div`\n ${flex(\"column\")}\n align-items: stretch;\n justify-content: flex-start;\n overflow-x: hidden;\n overflow-y: auto;\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n\n box-sizing: border-box;\n height: 100%;\n`;\n\nexport const HeaderContainer = styled.div`\n margin-bottom: 1rem;\n`;\n\nexport const ButtonContainer = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: 0.75rem;\n`;\n\nexport const Form = styled.form`\n label {\n font-weight: 700;\n }\n\n input {\n background: white;\n margin-bottom: 0.75rem;\n }\n\n p {\n font-family: \"Montserrat\", sans-serif;\n font-style: italic;\n font-weight: 200;\n font-size: 0.8rem;\n text-align: start;\n }\n\n a {\n font-family: \"Montserrat\", sans-serif;\n font-style: italic;\n font-weight: 200;\n font-size: 0.8rem;\n }\n\n h6 {\n text-align: start;\n margin-left: 10px;\n }\n\n & > div {\n margin-bottom: 10px;,\n }\n\n button {\n ${opacityEffect}\n color: var(--black);\n font-weight: 600;\n border: none;\n border-radius: 8px;\n width: 60%;\n margin-top: 10px;\n margin-bottom: 10px;\n }\n`;\n\nexport const Title = styled.h2`\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 24px;\n letter-spacing: 0em;\n`;\n\nexport const Text = styled.p`\n font-size: 1rem;\n font-weight: 400;\n line-height: 23px;\n letter-spacing: 0em;\n margin-top: 10px;\n`;\n","import { createGlobalStyle } from \"styled-components\";\nimport React, { useEffect } from \"react\";\n\nexport const GlobalStyles = createGlobalStyle`\n :root {\n --red: #e52e4d;\n --white: #FFF;\n --black: #2F2F2F;\n --black-2:#1E1E1E;\n --alphaBlack: #000000;\n --black-2:#1E1E1E;\n --black-3:#353535;\n\n --yellow-400:#FFD789;\n --yellow-500: #F6C76B;\n --gray-40:#F0F0F0;\n --gray-45:#767676;\n --gray-50: #686A69;\n --gray-60: #8F8F8F;\n --gray-100: #B6B6B6;\n --gray-150: #B9B9B9;\n --gray-200: #D2D2D2;\n --gray-300: #EBEBEB;\n --gray-400: #ECECEC;\n --gray-500: #F4F4F4;\n --gray-550:#6F6F6F;\n --gray-600:#686868;\n --gray-700: #535353;\n --gray-800:#9D9D9D;\n --shadow-500: 0px 4px 8px rgba(91, 91, 91, 0.2);\n --green:#57C06E;\n --green-2:#2DCE68;\n --blue:#007BFF;\n }\n\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n\n html {\n scroll-behavior: smooth;\n\n @media (max-width: 1080px) {\n font-size: 93.75%;\n }\n @media (max-width: 720px) {\n font-size: 87.5%;\n }\n }\n\n body {\n background: var(--white);\n -webkit-font-smoothing: antialiased;\n }\n\n body, input, textarea, select, button {\n font-family: \"Montserrat\", sans-serif;\n font-weight: 400;\n } \n\n h1, h2, h3, h4, h5, h6, strong {\n font-weight: 600;\n }\n\n button {\n cursor: pointer;\n }\n\n [disabled] {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n .hidden {\n overflow: hidden;\n }\n\n ::-webkit-scrollbar {\n -webkit-appearance: none;\n background: var(--gray-500);\n width: 6px;\n height: 10px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: var(--gray-50);\n }\n\n .aligncenter {\n text-align: center;\n }\n\n .width-190px {\n width:190px;\n }\n\n .hidden-content {\n display:none !important;\n }\n\n .global-margin-bottom {\n margin-bottom:20px;\n }\n\n .background-light-gray {\n background:#F4F4F4;\n }\n\n .full-width-and-height {\n height:100%;\n width:100%;\n }\n\n .flex-direction-column {\n flex-direction:column;\n }\n\n .bold {\n font-weight:700;\n }\n\n .margin-center-x {\n margin:0 auto;\n }\n\n .border-none {\n border:none;\n }\n\n .text-center {\n text-align:center;\n }\n\n .relative {\n position:relative;\n }\n\n /* accessibility */\n body ._access-menu p._text-center{\n font-family: \"Montserrat\", sans-serif;\n font-style: italic;\n font-size: 1.2rem!important;\n margin-top: 6px;\n margin-bottom: 3px;\n } \n\n`;\n\nconst FontLoader: React.FC = () => {\n useEffect(() => {\n const link = document.createElement(\"link\");\n link.href =\n \"https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap\";\n link.rel = \"stylesheet\";\n document.head.appendChild(link);\n }, []);\n\n return null;\n};\n\nexport default FontLoader;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA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,KACb;AAAA,mDAAC,mBACC;AAAA,oDAAC,SAAO,sCAAwB;AAAA,QAEhC,4CAAC,QAAM,2DAA6C;AAAA,SACtD;AAAA,MAIE,4CAAC,QAAG,uDAAsC;AAAA,MAE1C,4CAAC,mBACD;AAAA,MAEA,6CAAC,OAAE;AAAA;AAAA,QAAqK;AAAA,QACxK;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,QAAO;AAAA,YACP,KAAI;AAAA,YACL;AAAA;AAAA,QAED;AAAA,QAAI;AAAA,QAAgB;AAAA,QAAI;AAAA,QAAO;AAAA,QAAI;AAAA,SAAmI;AAAA,OAE1K;AAAA,KACF;AAEJ,CAAC;AAED,mBAAmB,cAAc;AACjC,IAAO,eAAQ;;;ADxEf,IAAO,gBAAQ;","names":["import_react","styled","import_styled_components","React"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
interface MitreFormComponentProps {
|
|
4
|
+
productId: string;
|
|
5
|
+
apiUrl: string;
|
|
6
|
+
apiToken: string;
|
|
7
|
+
utm_source: string;
|
|
8
|
+
utm_medium: string;
|
|
9
|
+
utm_campaign: string;
|
|
10
|
+
utm_term: string;
|
|
11
|
+
showHeader?: boolean;
|
|
12
|
+
colorPrimary?: string;
|
|
13
|
+
textColor?: string;
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
innerPadding?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const MitreFormComponent: React.ForwardRefExoticComponent<MitreFormComponentProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
18
|
|
|
8
19
|
export { MitreFormComponent as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
interface MitreFormComponentProps {
|
|
4
|
+
productId: string;
|
|
5
|
+
apiUrl: string;
|
|
6
|
+
apiToken: string;
|
|
7
|
+
utm_source: string;
|
|
8
|
+
utm_medium: string;
|
|
9
|
+
utm_campaign: string;
|
|
10
|
+
utm_term: string;
|
|
11
|
+
showHeader?: boolean;
|
|
12
|
+
colorPrimary?: string;
|
|
13
|
+
textColor?: string;
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
innerPadding?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const MitreFormComponent: React.ForwardRefExoticComponent<MitreFormComponentProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
18
|
|
|
8
19
|
export { MitreFormComponent as default };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/components/Form/index.tsx
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
|
|
1
4
|
// src/components/styles/utils.ts
|
|
2
5
|
function flex(direction = "row", alignItems, justifyContent) {
|
|
3
6
|
return `
|
|
@@ -108,36 +111,213 @@ var Text = styled.p`
|
|
|
108
111
|
margin-top: 10px;
|
|
109
112
|
`;
|
|
110
113
|
|
|
114
|
+
// src/components/styles/global.ts
|
|
115
|
+
import { createGlobalStyle } from "styled-components";
|
|
116
|
+
import { useEffect } from "react";
|
|
117
|
+
var GlobalStyles = createGlobalStyle`
|
|
118
|
+
:root {
|
|
119
|
+
--red: #e52e4d;
|
|
120
|
+
--white: #FFF;
|
|
121
|
+
--black: #2F2F2F;
|
|
122
|
+
--black-2:#1E1E1E;
|
|
123
|
+
--alphaBlack: #000000;
|
|
124
|
+
--black-2:#1E1E1E;
|
|
125
|
+
--black-3:#353535;
|
|
126
|
+
|
|
127
|
+
--yellow-400:#FFD789;
|
|
128
|
+
--yellow-500: #F6C76B;
|
|
129
|
+
--gray-40:#F0F0F0;
|
|
130
|
+
--gray-45:#767676;
|
|
131
|
+
--gray-50: #686A69;
|
|
132
|
+
--gray-60: #8F8F8F;
|
|
133
|
+
--gray-100: #B6B6B6;
|
|
134
|
+
--gray-150: #B9B9B9;
|
|
135
|
+
--gray-200: #D2D2D2;
|
|
136
|
+
--gray-300: #EBEBEB;
|
|
137
|
+
--gray-400: #ECECEC;
|
|
138
|
+
--gray-500: #F4F4F4;
|
|
139
|
+
--gray-550:#6F6F6F;
|
|
140
|
+
--gray-600:#686868;
|
|
141
|
+
--gray-700: #535353;
|
|
142
|
+
--gray-800:#9D9D9D;
|
|
143
|
+
--shadow-500: 0px 4px 8px rgba(91, 91, 91, 0.2);
|
|
144
|
+
--green:#57C06E;
|
|
145
|
+
--green-2:#2DCE68;
|
|
146
|
+
--blue:#007BFF;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
* {
|
|
150
|
+
margin: 0;
|
|
151
|
+
padding: 0;
|
|
152
|
+
box-sizing: border-box;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
html {
|
|
156
|
+
scroll-behavior: smooth;
|
|
157
|
+
|
|
158
|
+
@media (max-width: 1080px) {
|
|
159
|
+
font-size: 93.75%;
|
|
160
|
+
}
|
|
161
|
+
@media (max-width: 720px) {
|
|
162
|
+
font-size: 87.5%;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
body {
|
|
167
|
+
background: var(--white);
|
|
168
|
+
-webkit-font-smoothing: antialiased;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
body, input, textarea, select, button {
|
|
172
|
+
font-family: "Montserrat", sans-serif;
|
|
173
|
+
font-weight: 400;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
h1, h2, h3, h4, h5, h6, strong {
|
|
177
|
+
font-weight: 600;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
button {
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
[disabled] {
|
|
185
|
+
opacity: 0.6;
|
|
186
|
+
cursor: not-allowed;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.hidden {
|
|
190
|
+
overflow: hidden;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
::-webkit-scrollbar {
|
|
194
|
+
-webkit-appearance: none;
|
|
195
|
+
background: var(--gray-500);
|
|
196
|
+
width: 6px;
|
|
197
|
+
height: 10px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
::-webkit-scrollbar-thumb {
|
|
201
|
+
background-color: var(--gray-50);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.aligncenter {
|
|
205
|
+
text-align: center;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.width-190px {
|
|
209
|
+
width:190px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.hidden-content {
|
|
213
|
+
display:none !important;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.global-margin-bottom {
|
|
217
|
+
margin-bottom:20px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.background-light-gray {
|
|
221
|
+
background:#F4F4F4;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.full-width-and-height {
|
|
225
|
+
height:100%;
|
|
226
|
+
width:100%;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.flex-direction-column {
|
|
230
|
+
flex-direction:column;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.bold {
|
|
234
|
+
font-weight:700;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.margin-center-x {
|
|
238
|
+
margin:0 auto;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.border-none {
|
|
242
|
+
border:none;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.text-center {
|
|
246
|
+
text-align:center;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.relative {
|
|
250
|
+
position:relative;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* accessibility */
|
|
254
|
+
body ._access-menu p._text-center{
|
|
255
|
+
font-family: "Montserrat", sans-serif;
|
|
256
|
+
font-style: italic;
|
|
257
|
+
font-size: 1.2rem!important;
|
|
258
|
+
margin-top: 6px;
|
|
259
|
+
margin-bottom: 3px;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
`;
|
|
263
|
+
var FontLoader = () => {
|
|
264
|
+
useEffect(() => {
|
|
265
|
+
const link = document.createElement("link");
|
|
266
|
+
link.href = "https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap";
|
|
267
|
+
link.rel = "stylesheet";
|
|
268
|
+
document.head.appendChild(link);
|
|
269
|
+
}, []);
|
|
270
|
+
return null;
|
|
271
|
+
};
|
|
272
|
+
var global_default = FontLoader;
|
|
273
|
+
|
|
111
274
|
// src/components/Form/index.tsx
|
|
112
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
113
|
-
var MitreFormComponent = (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
"
|
|
136
|
-
|
|
137
|
-
|
|
275
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
276
|
+
var MitreFormComponent = React2.forwardRef(({
|
|
277
|
+
productId,
|
|
278
|
+
apiUrl,
|
|
279
|
+
apiToken,
|
|
280
|
+
utm_source,
|
|
281
|
+
utm_medium,
|
|
282
|
+
utm_campaign,
|
|
283
|
+
utm_term,
|
|
284
|
+
showHeader = true,
|
|
285
|
+
colorPrimary = "#F6C76B",
|
|
286
|
+
textColor = "#2F2F2F",
|
|
287
|
+
backgroundColor = "#cecece",
|
|
288
|
+
innerPadding = "1rem"
|
|
289
|
+
}, ref) => {
|
|
290
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
291
|
+
/* @__PURE__ */ jsx(global_default, {}),
|
|
292
|
+
/* @__PURE__ */ jsx(GlobalStyles, {}),
|
|
293
|
+
/* @__PURE__ */ jsxs(FormContainer, { ref, children: [
|
|
294
|
+
/* @__PURE__ */ jsxs(HeaderContainer, { children: [
|
|
295
|
+
/* @__PURE__ */ jsx(Title, { children: "Atendimento por mensagem" }),
|
|
296
|
+
/* @__PURE__ */ jsx(Text, { children: "Informe seus dados e retornaremos a mensagem." })
|
|
297
|
+
] }),
|
|
298
|
+
/* @__PURE__ */ jsx("h6", { children: "* Campos de preenchimento obrigat\xF3rio." }),
|
|
299
|
+
/* @__PURE__ */ jsx(ButtonContainer, {}),
|
|
300
|
+
/* @__PURE__ */ jsxs("p", { children: [
|
|
301
|
+
"A Mitre Realty respeita a sua privacidade e utiliza os seus dados pessoais para contat\xE1-lo por e-mail ou telefone aqui registrados. Para saber mais, acesse a nossa",
|
|
302
|
+
" ",
|
|
303
|
+
/* @__PURE__ */ jsx(
|
|
304
|
+
"a",
|
|
305
|
+
{
|
|
306
|
+
href: "https://www.mitrerealty.com.br/politica-de-privacidade",
|
|
307
|
+
target: "_blank",
|
|
308
|
+
rel: "noopener noreferrer",
|
|
309
|
+
children: "Pol\xEDtica de Privacidade"
|
|
310
|
+
}
|
|
311
|
+
),
|
|
312
|
+
". Ao clicar em ",
|
|
313
|
+
'"',
|
|
314
|
+
"enviar",
|
|
315
|
+
'"',
|
|
316
|
+
", voc\xEA concorda em permitir que a Mitre Realty, armazene e processe os dados pessoais fornecidos por voc\xEA para finalidade informada"
|
|
317
|
+
] })
|
|
138
318
|
] })
|
|
139
319
|
] });
|
|
140
|
-
};
|
|
320
|
+
});
|
|
141
321
|
MitreFormComponent.displayName = "MitreFormComponent";
|
|
142
322
|
var Form_default = MitreFormComponent;
|
|
143
323
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/styles/utils.ts","../src/components/Form/styles.ts","../src/components/Form/index.tsx","../src/index.ts"],"sourcesContent":["type directionType = \"column\" | \"row\";\ntype alignItemsType = \"center\" | \"flex-start\";\n\ntype jutifyContentType = \"center\" | \"space-between\";\n\nexport function flex(\n direction: directionType = \"row\",\n alignItems?: alignItemsType,\n justifyContent?: jutifyContentType\n) {\n return `\n align-items:${alignItems || null};\n display:flex;\n flex-direction:${direction};\n justify-content:${justifyContent || null};\n `;\n}\n\nexport const alignX = `\n left:50%;\n transform:translateX(-50%);\n`;\n\nexport const alignXAndY = `\n left:50%;\n top:50%;\n transform:translate(-50%, -50%);\n`;\n\nexport const darkEffect = `\n &:hover {\n cursor:pointer;\n filter:brightness(98%);\n }\n\n &:active {\n filter:brightness(95%);\n }\n`;\n\nexport const opacityEffect = `\n &:hover {\n cursor:pointer;\n opacity:.9;\n }\n\n &:active {\n opacity:.7;\n }\n`;\n\nexport const modalZIndex = 9999;\n\nexport const breakpoints = {\n tablet: \"1024px\",\n};\n","import { flex, opacityEffect } from \"../styles/utils\";\nimport styled from \"styled-components\";\n\nexport const FormContainer = styled.div`\n ${flex(\"column\")}\n align-items: stretch;\n justify-content: flex-start;\n overflow-x: hidden;\n overflow-y: auto;\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n\n box-sizing: border-box;\n height: 100%;\n`;\n\nexport const HeaderContainer = styled.div`\n margin-bottom: 1rem;\n`;\n\nexport const ButtonContainer = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: 0.75rem;\n`;\n\nexport const Form = styled.form`\n label {\n font-weight: 700;\n }\n\n input {\n background: white;\n margin-bottom: 0.75rem;\n }\n\n p {\n font-family: \"Montserrat\", sans-serif;\n font-style: italic;\n font-weight: 200;\n font-size: 0.8rem;\n text-align: start;\n }\n\n a {\n font-family: \"Montserrat\", sans-serif;\n font-style: italic;\n font-weight: 200;\n font-size: 0.8rem;\n }\n\n h6 {\n text-align: start;\n margin-left: 10px;\n }\n\n & > div {\n margin-bottom: 10px;,\n }\n\n button {\n ${opacityEffect}\n color: var(--black);\n font-weight: 600;\n border: none;\n border-radius: 8px;\n width: 60%;\n margin-top: 10px;\n margin-bottom: 10px;\n }\n`;\n\nexport const Title = styled.h2`\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 24px;\n letter-spacing: 0em;\n`;\n\nexport const Text = styled.p`\n font-size: 1rem;\n font-weight: 400;\n line-height: 23px;\n letter-spacing: 0em;\n margin-top: 10px;\n`;\n","import React, { useState } from \"react\";\n\nimport { \n FormContainer, \n HeaderContainer, \n ButtonContainer, \n Form, \n Title, \n Text \n} from \"./styles\";\n\nconst MitreFormComponent = ( ) => {\n \n return (\n <FormContainer >\n <HeaderContainer>\n <Title >Atendimento por mensagem</Title>\n\n <Text >Informe seus dados e retornaremos a mensagem.</Text>\n </HeaderContainer>\n\n \n\n <h6>* Campos de preenchimento obrigatório.</h6>\n\n <ButtonContainer>\n </ButtonContainer>\n\n <p>A Mitre Realty respeita a sua privacidade e utiliza os seus dados pessoais para contatá-lo por e-mail ou telefone aqui registrados. Para saber mais, acesse a nossa{ ' '}\n <a\n href=\"https://www.mitrerealty.com.br/politica-de-privacidade\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Política de Privacidade\n </a>. Ao clicar em {'\"'}enviar{'\"'}, você concorda em permitir que a Mitre Realty, armazene e processe os dados pessoais fornecidos por você para finalidade informada</p>\n\n </FormContainer>\n );\n};\n\nMitreFormComponent.displayName = \"MitreFormComponent\";\nexport default MitreFormComponent;\n","import MitreFormComponent from \"./components/Form\";\n\nexport default MitreFormComponent;\n//export type { MitreFormComponentProps } from \"./components/Form\";\n"],"mappings":";AAKO,SAAS,KACd,YAA2B,OAC3B,YACA,gBACA;AACA,SAAO;AAAA,kBACS,cAAc,IAAI;AAAA;AAAA,qBAEf,SAAS;AAAA,sBACR,kBAAkB,IAAI;AAAA;AAE5C;AAwBO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AAAA,KAE1K;AAEJ;AAEA,mBAAmB,cAAc;AACjC,IAAO,eAAQ;;;ACxCf,IAAO,gBAAQ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/components/Form/index.tsx","../src/components/styles/utils.ts","../src/components/Form/styles.ts","../src/components/styles/global.ts","../src/index.ts"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport { \n FormContainer, \n HeaderContainer, \n ButtonContainer, \n Form, \n Title, \n Text \n} from \"./styles\";\nimport FontLoader, { GlobalStyles } from \"../styles/global\";\n\nexport interface MitreFormComponentProps {\n productId: string;\n apiUrl: string;\n apiToken: string;\n utm_source: string;\n utm_medium: string;\n utm_campaign: string;\n utm_term: string;\n showHeader?: boolean;\n colorPrimary?: string;\n textColor?: string;\n backgroundColor?: string;\n innerPadding?: string;\n}\n\nconst MitreFormComponent = React.forwardRef<HTMLDivElement, MitreFormComponentProps>(({\n productId,\n apiUrl,\n apiToken,\n utm_source,\n utm_medium,\n utm_campaign,\n utm_term,\n showHeader = true,\n colorPrimary = \"#F6C76B\",\n textColor = \"#2F2F2F\",\n backgroundColor = \"#cecece\",\n innerPadding = \"1rem\",\n}, ref) => {\n return (\n <>\n <FontLoader />\n <GlobalStyles />\n <FormContainer ref={ref} >\n <HeaderContainer>\n <Title >Atendimento por mensagem</Title>\n\n <Text >Informe seus dados e retornaremos a mensagem.</Text>\n </HeaderContainer>\n\n \n\n <h6>* Campos de preenchimento obrigatório.</h6>\n\n <ButtonContainer>\n </ButtonContainer>\n\n <p>A Mitre Realty respeita a sua privacidade e utiliza os seus dados pessoais para contatá-lo por e-mail ou telefone aqui registrados. Para saber mais, acesse a nossa{ ' '}\n <a\n href=\"https://www.mitrerealty.com.br/politica-de-privacidade\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n Política de Privacidade\n </a>. Ao clicar em {'\"'}enviar{'\"'}, você concorda em permitir que a Mitre Realty, armazene e processe os dados pessoais fornecidos por você para finalidade informada</p>\n\n </FormContainer>\n </>\n );\n});\n\nMitreFormComponent.displayName = \"MitreFormComponent\";\nexport default MitreFormComponent;\n","type directionType = \"column\" | \"row\";\ntype alignItemsType = \"center\" | \"flex-start\";\n\ntype jutifyContentType = \"center\" | \"space-between\";\n\nexport function flex(\n direction: directionType = \"row\",\n alignItems?: alignItemsType,\n justifyContent?: jutifyContentType\n) {\n return `\n align-items:${alignItems || null};\n display:flex;\n flex-direction:${direction};\n justify-content:${justifyContent || null};\n `;\n}\n\nexport const alignX = `\n left:50%;\n transform:translateX(-50%);\n`;\n\nexport const alignXAndY = `\n left:50%;\n top:50%;\n transform:translate(-50%, -50%);\n`;\n\nexport const darkEffect = `\n &:hover {\n cursor:pointer;\n filter:brightness(98%);\n }\n\n &:active {\n filter:brightness(95%);\n }\n`;\n\nexport const opacityEffect = `\n &:hover {\n cursor:pointer;\n opacity:.9;\n }\n\n &:active {\n opacity:.7;\n }\n`;\n\nexport const modalZIndex = 9999;\n\nexport const breakpoints = {\n tablet: \"1024px\",\n};\n","import { flex, opacityEffect } from \"../styles/utils\";\nimport styled from \"styled-components\";\n\nexport const FormContainer = styled.div`\n ${flex(\"column\")}\n align-items: stretch;\n justify-content: flex-start;\n overflow-x: hidden;\n overflow-y: auto;\n\n /* Hide scrollbars for WebKit browsers */\n ::-webkit-scrollbar {\n display: none;\n }\n\n /* Hide scrollbars for Firefox */\n scrollbar-width: none;\n\n box-sizing: border-box;\n height: 100%;\n`;\n\nexport const HeaderContainer = styled.div`\n margin-bottom: 1rem;\n`;\n\nexport const ButtonContainer = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: 0.75rem;\n`;\n\nexport const Form = styled.form`\n label {\n font-weight: 700;\n }\n\n input {\n background: white;\n margin-bottom: 0.75rem;\n }\n\n p {\n font-family: \"Montserrat\", sans-serif;\n font-style: italic;\n font-weight: 200;\n font-size: 0.8rem;\n text-align: start;\n }\n\n a {\n font-family: \"Montserrat\", sans-serif;\n font-style: italic;\n font-weight: 200;\n font-size: 0.8rem;\n }\n\n h6 {\n text-align: start;\n margin-left: 10px;\n }\n\n & > div {\n margin-bottom: 10px;,\n }\n\n button {\n ${opacityEffect}\n color: var(--black);\n font-weight: 600;\n border: none;\n border-radius: 8px;\n width: 60%;\n margin-top: 10px;\n margin-bottom: 10px;\n }\n`;\n\nexport const Title = styled.h2`\n font-size: 1.25rem;\n font-weight: 700;\n line-height: 24px;\n letter-spacing: 0em;\n`;\n\nexport const Text = styled.p`\n font-size: 1rem;\n font-weight: 400;\n line-height: 23px;\n letter-spacing: 0em;\n margin-top: 10px;\n`;\n","import { createGlobalStyle } from \"styled-components\";\nimport React, { useEffect } from \"react\";\n\nexport const GlobalStyles = createGlobalStyle`\n :root {\n --red: #e52e4d;\n --white: #FFF;\n --black: #2F2F2F;\n --black-2:#1E1E1E;\n --alphaBlack: #000000;\n --black-2:#1E1E1E;\n --black-3:#353535;\n\n --yellow-400:#FFD789;\n --yellow-500: #F6C76B;\n --gray-40:#F0F0F0;\n --gray-45:#767676;\n --gray-50: #686A69;\n --gray-60: #8F8F8F;\n --gray-100: #B6B6B6;\n --gray-150: #B9B9B9;\n --gray-200: #D2D2D2;\n --gray-300: #EBEBEB;\n --gray-400: #ECECEC;\n --gray-500: #F4F4F4;\n --gray-550:#6F6F6F;\n --gray-600:#686868;\n --gray-700: #535353;\n --gray-800:#9D9D9D;\n --shadow-500: 0px 4px 8px rgba(91, 91, 91, 0.2);\n --green:#57C06E;\n --green-2:#2DCE68;\n --blue:#007BFF;\n }\n\n * {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n\n html {\n scroll-behavior: smooth;\n\n @media (max-width: 1080px) {\n font-size: 93.75%;\n }\n @media (max-width: 720px) {\n font-size: 87.5%;\n }\n }\n\n body {\n background: var(--white);\n -webkit-font-smoothing: antialiased;\n }\n\n body, input, textarea, select, button {\n font-family: \"Montserrat\", sans-serif;\n font-weight: 400;\n } \n\n h1, h2, h3, h4, h5, h6, strong {\n font-weight: 600;\n }\n\n button {\n cursor: pointer;\n }\n\n [disabled] {\n opacity: 0.6;\n cursor: not-allowed;\n }\n\n .hidden {\n overflow: hidden;\n }\n\n ::-webkit-scrollbar {\n -webkit-appearance: none;\n background: var(--gray-500);\n width: 6px;\n height: 10px;\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: var(--gray-50);\n }\n\n .aligncenter {\n text-align: center;\n }\n\n .width-190px {\n width:190px;\n }\n\n .hidden-content {\n display:none !important;\n }\n\n .global-margin-bottom {\n margin-bottom:20px;\n }\n\n .background-light-gray {\n background:#F4F4F4;\n }\n\n .full-width-and-height {\n height:100%;\n width:100%;\n }\n\n .flex-direction-column {\n flex-direction:column;\n }\n\n .bold {\n font-weight:700;\n }\n\n .margin-center-x {\n margin:0 auto;\n }\n\n .border-none {\n border:none;\n }\n\n .text-center {\n text-align:center;\n }\n\n .relative {\n position:relative;\n }\n\n /* accessibility */\n body ._access-menu p._text-center{\n font-family: \"Montserrat\", sans-serif;\n font-style: italic;\n font-size: 1.2rem!important;\n margin-top: 6px;\n margin-bottom: 3px;\n } \n\n`;\n\nconst FontLoader: React.FC = () => {\n useEffect(() => {\n const link = document.createElement(\"link\");\n link.href =\n \"https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap\";\n link.rel = \"stylesheet\";\n document.head.appendChild(link);\n }, []);\n\n return null;\n};\n\nexport default FontLoader;\n","import MitreFormComponent from \"./components/Form\";\n\nexport default MitreFormComponent;\n//export type { MitreFormComponentProps } from \"./components/Form\";\n"],"mappings":";AAAA,OAAOA,YAAyB;;;ACKzB,SAAS,KACd,YAA2B,OAC3B,YACA,gBACA;AACA,SAAO;AAAA,kBACS,cAAc,IAAI;AAAA;AAAA,qBAEf,SAAS;AAAA,sBACR,kBAAkB,IAAI;AAAA;AAE5C;AAwBO,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACvC7B,OAAO,YAAY;AAEZ,IAAM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