pipesol-button 1.0.0-beta.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/README.md +31 -0
- package/dist/app/layout.d.ts +6 -0
- package/dist/app/layout.js +19 -0
- package/dist/app/layout.js.map +1 -0
- package/dist/app/page.d.ts +1 -0
- package/dist/app/page.js +6 -0
- package/dist/app/page.js.map +1 -0
- package/dist/components/ButtonStyled.d.ts +18 -0
- package/dist/components/ButtonStyled.js +56 -0
- package/dist/components/ButtonStyled.js.map +1 -0
- package/dist/components/NavigationButton.d.ts +19 -0
- package/dist/components/NavigationButton.js +55 -0
- package/dist/components/NavigationButton.js.map +1 -0
- package/dist/components/NavigationButtonMotion.d.ts +19 -0
- package/dist/components/NavigationButtonMotion.js +64 -0
- package/dist/components/NavigationButtonMotion.js.map +1 -0
- package/dist/components/NavigationHamburguerButton.d.ts +17 -0
- package/dist/components/NavigationHamburguerButton.js +33 -0
- package/dist/components/NavigationHamburguerButton.js.map +1 -0
- package/dist/components/ScrollToTopButton.d.ts +10 -0
- package/dist/components/ScrollToTopButton.js +44 -0
- package/dist/components/ScrollToTopButton.js.map +1 -0
- package/dist/components/WhatsAppButton.d.ts +6 -0
- package/dist/components/WhatsAppButton.js +24 -0
- package/dist/components/WhatsAppButton.js.map +1 -0
- package/dist/components/WhatsAppIcon.d.ts +6 -0
- package/dist/components/WhatsAppIcon.js +18 -0
- package/dist/components/WhatsAppIcon.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/pages/_app.d.ts +2 -0
- package/dist/pages/_app.js +20 -0
- package/dist/pages/_app.js.map +1 -0
- package/dist/pages/_document.d.ts +9 -0
- package/dist/pages/_document.js +33 -0
- package/dist/pages/_document.js.map +1 -0
- package/dist/theme.d.ts +35 -0
- package/dist/theme.js +142 -0
- package/dist/theme.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/DataCard.d.ts +6 -0
- package/dist/types/DataCard.js +2 -0
- package/dist/types/DataCard.js.map +1 -0
- package/dist/types/ShadowConfig.d.ts +6 -0
- package/dist/types/ShadowConfig.js +2 -0
- package/dist/types/ShadowConfig.js.map +1 -0
- package/package.json +50 -0
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Sobre
|
|
2
|
+
|
|
3
|
+
Este projeto é uma biblioteca React preparada para publicação no npm.
|
|
4
|
+
Essa biblioteca contem componentes de barra de notificacao.
|
|
5
|
+
Abaixo está o passo a passo para publicar ou atualizar a lib.
|
|
6
|
+
|
|
7
|
+
# Pré-requisitos
|
|
8
|
+
|
|
9
|
+
1. Conta no NPM
|
|
10
|
+
- Crie uma conta em: https://www.npmjs.com/signup
|
|
11
|
+
|
|
12
|
+
2. Node.js instalado
|
|
13
|
+
- Recomenda-se uma versão LTS. Verifique com: node -v
|
|
14
|
+
- Login no NPM pelo terminal: npm login
|
|
15
|
+
npm: pipeline-solucoes
|
|
16
|
+
senha:pipesollinecoes
|
|
17
|
+
key: pipeline@12345#
|
|
18
|
+
|
|
19
|
+
# Como Publicar a biblioteca:
|
|
20
|
+
|
|
21
|
+
1. Instalar dependências: npm install
|
|
22
|
+
|
|
23
|
+
2. No package.json, altere o campo version de acordo com a semântica de versionamento.
|
|
24
|
+
1.0.1 – correção de bug
|
|
25
|
+
1.1.0 – nova funcionalidade compatível
|
|
26
|
+
2.0.0 – mudanças incompatíveis
|
|
27
|
+
|
|
28
|
+
- para publicar versão beta: "1.0.0-beta.x"
|
|
29
|
+
|
|
30
|
+
3. Comando para versao beta: npm run release-beta
|
|
31
|
+
Comando para versao oficial: npm run release
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Geist, Geist_Mono } from "next/font/google";
|
|
3
|
+
import "./globals.css";
|
|
4
|
+
const geistSans = Geist({
|
|
5
|
+
variable: "--font-geist-sans",
|
|
6
|
+
subsets: ["latin"],
|
|
7
|
+
});
|
|
8
|
+
const geistMono = Geist_Mono({
|
|
9
|
+
variable: "--font-geist-mono",
|
|
10
|
+
subsets: ["latin"],
|
|
11
|
+
});
|
|
12
|
+
export const metadata = {
|
|
13
|
+
title: "Create Next App",
|
|
14
|
+
description: "Generated by create next app",
|
|
15
|
+
};
|
|
16
|
+
export default function RootLayout({ children, }) {
|
|
17
|
+
return (_jsx("html", { lang: "en", children: _jsx("body", { className: `${geistSans.variable} ${geistMono.variable}`, children: children }) }));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/app/layout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,eAAe,CAAC;AAEvB,MAAM,SAAS,GAAG,KAAK,CAAC;IACtB,QAAQ,EAAE,mBAAmB;IAC7B,OAAO,EAAE,CAAC,OAAO,CAAC;CACnB,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG,UAAU,CAAC;IAC3B,QAAQ,EAAE,mBAAmB;IAC7B,OAAO,EAAE,CAAC,OAAO,CAAC;CACnB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,8BAA8B;CAC5C,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,GAGR;IACA,OAAO,CACL,eAAM,IAAI,EAAC,IAAI,YACb,eAAM,SAAS,EAAE,GAAG,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,QAAQ,EAAE,YAC3D,QAAQ,GACJ,GACF,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Home(): import("react/jsx-runtime").JSX.Element;
|
package/dist/app/page.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../src/app/page.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,MAAM,CAAC,OAAO,UAAU,IAAI;IAC1B,OAAO,CACL,gCAAY,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const ButtonHoverBorderBottomStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
2
|
+
background_color?: string;
|
|
3
|
+
color: string;
|
|
4
|
+
color_hover?: string;
|
|
5
|
+
type_padding: "none" | "default";
|
|
6
|
+
border_radius?: string;
|
|
7
|
+
border_color?: string;
|
|
8
|
+
width: string;
|
|
9
|
+
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
10
|
+
export declare const ButtonHoverColorStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
11
|
+
background_color?: string;
|
|
12
|
+
color: string;
|
|
13
|
+
color_hover?: string;
|
|
14
|
+
type_padding: "none" | "default";
|
|
15
|
+
border_radius?: string;
|
|
16
|
+
border_color?: string;
|
|
17
|
+
width: string;
|
|
18
|
+
}, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { styled } from '@mui/material/styles';
|
|
2
|
+
export const ButtonHoverBorderBottomStyled = styled('button', {
|
|
3
|
+
shouldForwardProp: (prop) => ![
|
|
4
|
+
'background_color',
|
|
5
|
+
'color',
|
|
6
|
+
'color_hover',
|
|
7
|
+
'type_padding',
|
|
8
|
+
'border_radius',
|
|
9
|
+
'border_color',
|
|
10
|
+
'width',
|
|
11
|
+
].includes(prop),
|
|
12
|
+
})(({ background_color, color, color_hover, type_padding, border_radius, border_color, width }) => ({
|
|
13
|
+
width: width,
|
|
14
|
+
cursor: 'pointer',
|
|
15
|
+
textDecoration: 'none',
|
|
16
|
+
textTransform: 'none',
|
|
17
|
+
borderBottom: '2px solid transparent',
|
|
18
|
+
margin: '0px',
|
|
19
|
+
boxShadow: 'none',
|
|
20
|
+
backgroundColor: background_color || 'transparent',
|
|
21
|
+
color: color,
|
|
22
|
+
borderRadius: border_radius || '0px',
|
|
23
|
+
border: border_color ? `1px solid ${border_color}` : 'none',
|
|
24
|
+
padding: type_padding === 'default' ? '8px 24px' : '0px',
|
|
25
|
+
'&:hover': {
|
|
26
|
+
borderBottom: `2px solid ${color_hover || color}`,
|
|
27
|
+
color: color_hover || color,
|
|
28
|
+
},
|
|
29
|
+
}));
|
|
30
|
+
export const ButtonHoverColorStyled = styled('button', {
|
|
31
|
+
shouldForwardProp: (prop) => ![
|
|
32
|
+
'background_color',
|
|
33
|
+
'color',
|
|
34
|
+
'color_hover',
|
|
35
|
+
'type_padding',
|
|
36
|
+
'border_radius',
|
|
37
|
+
'border_color',
|
|
38
|
+
'width',
|
|
39
|
+
].includes(prop),
|
|
40
|
+
})(({ background_color, color, color_hover, type_padding, border_radius, border_color, width }) => ({
|
|
41
|
+
width: width,
|
|
42
|
+
cursor: 'pointer',
|
|
43
|
+
textDecoration: 'none',
|
|
44
|
+
textTransform: 'none',
|
|
45
|
+
margin: '0px',
|
|
46
|
+
boxShadow: 'none',
|
|
47
|
+
backgroundColor: background_color || 'transparent',
|
|
48
|
+
color: color,
|
|
49
|
+
borderRadius: border_radius || '0px',
|
|
50
|
+
border: border_color ? `1px solid ${border_color}` : 'none',
|
|
51
|
+
padding: type_padding === 'default' ? '8px 24px' : '0px',
|
|
52
|
+
'&:hover': {
|
|
53
|
+
color: color_hover || color,
|
|
54
|
+
},
|
|
55
|
+
}));
|
|
56
|
+
//# sourceMappingURL=ButtonStyled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"But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QACd,eAAe;QACf,cAAc;QACd,OAAO;KACR,CAAC,QAAQ,CAAC,IAAc,CAAC;CAC7B,CAAC,CAQC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAClG,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,SAAS;IACjB,cAAc,EAAE,MAAM;IACtB,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,MAAM;IACjB,eAAe,EAAE,gBAAgB,IAAI,aAAa;IAClD,KAAK,EAAE,KAAK;IACZ,YAAY,EAAE,aAAa,IAAI,KAAK;IACpC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,aAAa,YAAY,EAAE,CAAC,CAAC,CAAC,MAAM;IAC3D,OAAO,EAAE,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK;IAExD,SAAS,EAAE;QACT,KAAK,EAAE,WAAW,IAAI,KAAK;KAC5B;CACF,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface NavigationButtonProps {
|
|
3
|
+
url: string;
|
|
4
|
+
aria_label: string;
|
|
5
|
+
background_color?: string;
|
|
6
|
+
background_color_hover?: string;
|
|
7
|
+
color: string;
|
|
8
|
+
color_hover?: string;
|
|
9
|
+
border_color?: string;
|
|
10
|
+
border_radius?: string;
|
|
11
|
+
boxshadow?: string;
|
|
12
|
+
text_decoration: 'none' | 'underline';
|
|
13
|
+
layout: 'button' | 'link';
|
|
14
|
+
width: string;
|
|
15
|
+
margin?: string;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const NavigationButton: React.FC<NavigationButtonProps>;
|
|
19
|
+
export default NavigationButton;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
const ButtonStyled = styled('a', {
|
|
5
|
+
shouldForwardProp: (prop) => ![
|
|
6
|
+
'background_color',
|
|
7
|
+
'background_color_hover',
|
|
8
|
+
'color',
|
|
9
|
+
'color_hover',
|
|
10
|
+
'padding',
|
|
11
|
+
'border_radius',
|
|
12
|
+
'border_color',
|
|
13
|
+
'border_color_underline',
|
|
14
|
+
'color_hover',
|
|
15
|
+
'width',
|
|
16
|
+
'margin',
|
|
17
|
+
'boxshadow',
|
|
18
|
+
].includes(prop),
|
|
19
|
+
})(({ background_color, background_color_hover, color, color_hover, padding, border_radius, border_color, border_color_underline, width, margin, boxshadow }) => ({
|
|
20
|
+
width: width,
|
|
21
|
+
cursor: 'pointer',
|
|
22
|
+
textDecoration: 'none',
|
|
23
|
+
textTransform: 'none',
|
|
24
|
+
textAlign: 'center',
|
|
25
|
+
boxShadow: boxshadow,
|
|
26
|
+
backgroundColor: background_color,
|
|
27
|
+
color: color,
|
|
28
|
+
border: `1px solid ${border_color}`,
|
|
29
|
+
borderRadius: border_radius,
|
|
30
|
+
padding: padding,
|
|
31
|
+
margin: margin,
|
|
32
|
+
'&:hover': {
|
|
33
|
+
backgroundColor: background_color_hover,
|
|
34
|
+
borderBottom: `1px solid ${border_color_underline}`,
|
|
35
|
+
color: color_hover,
|
|
36
|
+
},
|
|
37
|
+
}));
|
|
38
|
+
const NavigationButton = ({ url, aria_label, background_color, background_color_hover, color, color_hover, border_radius, border_color, text_decoration = 'none', boxshadow = 'none', layout, width, margin, children }) => {
|
|
39
|
+
const backgroundColor = background_color !== null && background_color !== void 0 ? background_color : 'transparent';
|
|
40
|
+
const backgroundColorHover = background_color_hover !== null && background_color_hover !== void 0 ? background_color_hover : backgroundColor;
|
|
41
|
+
const colorHover = color_hover !== null && color_hover !== void 0 ? color_hover : color;
|
|
42
|
+
const borderRadius = border_radius !== null && border_radius !== void 0 ? border_radius : '0px';
|
|
43
|
+
const padding = layout == 'button' ? '8px 24px' : '0px';
|
|
44
|
+
const borderColor = text_decoration == 'underline' ? 'transparent' : (border_color !== null && border_color !== void 0 ? border_color : 'transparent');
|
|
45
|
+
const borderColorUnderline = (text_decoration == 'underline') ? color : (border_color !== null && border_color !== void 0 ? border_color : 'transparent');
|
|
46
|
+
const marginButton = margin !== null && margin !== void 0 ? margin : '0px';
|
|
47
|
+
if (url.indexOf('http') != -1) {
|
|
48
|
+
return (_jsx(ButtonStyled, { href: url, width: width, background_color: backgroundColor, background_color_hover: backgroundColorHover, color: color, color_hover: colorHover, border_radius: borderRadius, border_color: borderColor, border_color_underline: borderColorUnderline, padding: padding, margin: marginButton, "aria-label": aria_label, target: "_blank", boxshadow: boxshadow, rel: "noopener noreferrer", children: children }));
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return (_jsx(ButtonStyled, { href: url, width: width, background_color: backgroundColor, background_color_hover: backgroundColorHover, color: color, color_hover: colorHover, border_radius: borderRadius, border_color: borderColor, border_color_underline: borderColorUnderline, padding: padding, margin: marginButton, "aria-label": aria_label, boxshadow: boxshadow, children: children }));
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
export default NavigationButton;
|
|
55
|
+
//# sourceMappingURL=NavigationButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationButton.js","sourceRoot":"","sources":["../../src/components/NavigationButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,EAAE;IAC/B,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAC1B,CAAC;QACC,kBAAkB;QAClB,wBAAwB;QACxB,OAAO;QACP,aAAa;QACb,SAAS;QACT,eAAe;QACf,cAAc;QACd,wBAAwB;QACxB,aAAa;QACb,OAAO;QACP,QAA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EAAE,WAAW,EACzB,sBAAsB,EAAE,oBAAoB,EAC5C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,YAAY,gBACP,UAAU,EACvB,SAAS,EAAE,SAAS,YAEnB,QAAQ,GACI,CAChB,CAAC;IACJ,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface NavigationButtonProps {
|
|
3
|
+
url: string;
|
|
4
|
+
aria_label: string;
|
|
5
|
+
background_color?: string;
|
|
6
|
+
background_color_hover?: string;
|
|
7
|
+
color: string;
|
|
8
|
+
color_hover?: string;
|
|
9
|
+
border_color?: string;
|
|
10
|
+
border_radius?: string;
|
|
11
|
+
text_decoration: 'none' | 'underline';
|
|
12
|
+
layout: 'button' | 'link';
|
|
13
|
+
width: string;
|
|
14
|
+
height?: string;
|
|
15
|
+
margin?: string;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const NavigationButtonMotion: React.FC<NavigationButtonProps>;
|
|
19
|
+
export default NavigationButtonMotion;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { motion } from 'framer-motion';
|
|
5
|
+
const MotionButtonStyled = motion.create(styled('a', {
|
|
6
|
+
shouldForwardProp: (prop) => ![
|
|
7
|
+
'background_color',
|
|
8
|
+
'background_color_hover',
|
|
9
|
+
'color',
|
|
10
|
+
'color_hover',
|
|
11
|
+
'padding',
|
|
12
|
+
'border_radius',
|
|
13
|
+
'border_color',
|
|
14
|
+
'border_color_underline',
|
|
15
|
+
'width',
|
|
16
|
+
'height',
|
|
17
|
+
'margin',
|
|
18
|
+
].includes(prop),
|
|
19
|
+
})(({ background_color, background_color_hover, color, color_hover, padding, border_radius, border_color, border_color_underline, width, height, margin, }) => ({
|
|
20
|
+
width: width,
|
|
21
|
+
height: height,
|
|
22
|
+
cursor: 'pointer',
|
|
23
|
+
textDecoration: 'none',
|
|
24
|
+
textTransform: 'none',
|
|
25
|
+
textAlign: 'center',
|
|
26
|
+
boxShadow: 'none',
|
|
27
|
+
backgroundColor: background_color,
|
|
28
|
+
color: color,
|
|
29
|
+
border: `1px solid ${border_color}`,
|
|
30
|
+
borderRadius: border_radius,
|
|
31
|
+
padding: padding,
|
|
32
|
+
margin: margin,
|
|
33
|
+
display: 'flex',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
justifyContent: 'center',
|
|
36
|
+
transition: 'all 0.2s ease-in-out',
|
|
37
|
+
'&:hover': {
|
|
38
|
+
backgroundColor: background_color_hover,
|
|
39
|
+
borderBottom: `1px solid ${border_color_underline}`,
|
|
40
|
+
color: color_hover,
|
|
41
|
+
},
|
|
42
|
+
})));
|
|
43
|
+
const NavigationButtonMotion = ({ url, aria_label, background_color, background_color_hover, color, color_hover, border_radius, border_color, text_decoration = 'none', layout, width, height = 'auto', margin, children, }) => {
|
|
44
|
+
const backgroundColor = background_color !== null && background_color !== void 0 ? background_color : 'transparent';
|
|
45
|
+
const backgroundColorHover = background_color_hover !== null && background_color_hover !== void 0 ? background_color_hover : backgroundColor;
|
|
46
|
+
const colorHover = color_hover !== null && color_hover !== void 0 ? color_hover : color;
|
|
47
|
+
const borderRadius = border_radius !== null && border_radius !== void 0 ? border_radius : '0px';
|
|
48
|
+
const padding = layout === 'button' ? '8px 24px' : '0px';
|
|
49
|
+
const borderColor = text_decoration === 'underline' ? 'transparent' : border_color !== null && border_color !== void 0 ? border_color : 'transparent';
|
|
50
|
+
const borderColorUnderline = text_decoration === 'underline' ? color : border_color !== null && border_color !== void 0 ? border_color : 'transparent';
|
|
51
|
+
const marginButton = margin !== null && margin !== void 0 ? margin : '0px';
|
|
52
|
+
const motionProps = {
|
|
53
|
+
whileFocus: {
|
|
54
|
+
scale: 1.1,
|
|
55
|
+
transition: { type: 'spring', stiffness: 300 },
|
|
56
|
+
},
|
|
57
|
+
whileHover: {
|
|
58
|
+
scale: 1.05,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
return (_jsx(MotionButtonStyled, Object.assign({ href: url, width: width, height: height, background_color: backgroundColor, background_color_hover: backgroundColorHover, color: color, color_hover: colorHover, border_radius: borderRadius, border_color: borderColor, border_color_underline: borderColorUnderline, padding: padding, margin: marginButton, "aria-label": aria_label, target: url.startsWith('http') ? '_blank' : undefined, rel: url.startsWith('http') ? 'noopener noreferrer' : undefined }, motionProps, { children: children })));
|
|
62
|
+
};
|
|
63
|
+
export default NavigationButtonMotion;
|
|
64
|
+
//# sourceMappingURL=NavigationButtonMotion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationButtonMotion.js","sourceRoot":"","sources":["../../src/components/NavigationButtonMotion.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CACtC,MAAM,CAAC,GAAG,EAAE;IACV,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAC1B,CAAC;QACC,kBAAkB;QAClB,wBAAwB;QACxB,OAAO;QACP,aAAa;QACb,SAAS;QACT,eAAe;QACf,cAAc;QACd,wBAAwB;QACxB,OAAO;QACP,QAAQ;QACR,QAAQ;KACT,CAAC,QAAQ,CAAC,IAAc,CAAC;CAC7B,CAAC,CAYC,CAAC,EACF,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,EACL,WAAW,EACX,OAAO,EACP,aAAa,EACb,YAAY,EACZ,sBAAsB,EACtB,KAAK,EACL,MAAM,EACN,MAAM,GACP,EAAE,EAAE,CAAC,CAAC;IACL,KAAK,EAAE,KAAK;IACZ,MAAM,EAAE,MAAM;IACd,MAAM,EAAE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;
|
|
5
|
+
background_color?: string;
|
|
6
|
+
color: string;
|
|
7
|
+
color_hover?: string;
|
|
8
|
+
border_color?: string;
|
|
9
|
+
border_radius?: string;
|
|
10
|
+
text_decoration: 'none' | 'underline';
|
|
11
|
+
layout: 'button' | 'link';
|
|
12
|
+
width: string;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
afterNavigation: () => void;
|
|
15
|
+
}
|
|
16
|
+
declare const NavigationHamburguerButton: React.FC<NavigationHamburguerButtonProps>;
|
|
17
|
+
export default NavigationHamburguerButton;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ButtonHoverBorderBottomStyled, ButtonHoverColorStyled } from './ButtonStyled';
|
|
4
|
+
const NavigationHamburguerButton = ({ url, aria_label, background_color, color, color_hover, border_radius, border_color, text_decoration, layout, width, children, afterNavigation }) => {
|
|
5
|
+
const handleClick = (e) => {
|
|
6
|
+
e.preventDefault();
|
|
7
|
+
if (url.indexOf('#') !== -1) {
|
|
8
|
+
if (window.location.pathname === '/' || window.location.pathname === '/index.html') {
|
|
9
|
+
const targetElement = document.querySelector(url);
|
|
10
|
+
if (targetElement) {
|
|
11
|
+
targetElement.scrollIntoView({ behavior: 'smooth' });
|
|
12
|
+
window.history.pushState(null, '', url);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
window.location.href = url;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
else if (url.indexOf('http') == -1)
|
|
20
|
+
window.open(url, '_blank', 'noopener noreferrer');
|
|
21
|
+
else
|
|
22
|
+
window.location.href = url;
|
|
23
|
+
afterNavigation(); // Chama a função após a navegação
|
|
24
|
+
};
|
|
25
|
+
if (text_decoration === 'underline') {
|
|
26
|
+
return (_jsx(ButtonHoverBorderBottomStyled, { width: width, background_color: background_color, color: color, color_hover: color_hover, border_radius: border_radius, border_color: border_color, type_padding: layout === 'button' ? 'default' : 'none', "aria-label": aria_label, onClick: handleClick, children: children }));
|
|
27
|
+
}
|
|
28
|
+
else if (text_decoration === 'none') {
|
|
29
|
+
return (_jsx(ButtonHoverColorStyled, { width: width, background_color: background_color, color: color, color_hover: color_hover, border_radius: border_radius, border_color: border_color, type_padding: layout === 'button' ? 'default' : 'none', "aria-label": aria_label, onClick: handleClick, children: children }));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
export default NavigationHamburguerButton;
|
|
33
|
+
//# sourceMappingURL=NavigationHamburguerButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationHamburguerButton.js","sourceRoot":"","sources":["../../src/components/NavigationHamburguerButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,6BAA6B,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAiBvF,MAAM,0BAA0B,GAA8C,CAAC,EAC7E,GAAG,EAAE,UAAU,EAAE,gBAAgB,EACjC,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAChE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,EAAE,EAAE;IAE9C,MAAM,WAAW,GAAG,CAAC,CAAsC,EAAE,EAAE;QAE3D,CAAC,CAAC,cAAc,EAAE,CAAC;QAEnB,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAC5B,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK,aAAa,EAAE,CAAC;gBACnF,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;gBAClD,IAAI,aAAa,EAAE,CAAC;oBAClB,aAAa,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;oBACrD,MAA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H,CAAC,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ScrollToTopButtonProps {
|
|
3
|
+
show: boolean;
|
|
4
|
+
border_radius: string;
|
|
5
|
+
background_color: string;
|
|
6
|
+
background_color_hover: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const ScrollToTopButton: React.FC<ScrollToTopButtonProps>;
|
|
10
|
+
export default ScrollToTopButton;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import IconButton from '@mui/material/IconButton';
|
|
5
|
+
import { styled } from '@mui/material/styles';
|
|
6
|
+
const ButtonStyled = styled(IconButton, {
|
|
7
|
+
shouldForwardProp: (prop) => !['$show', '$background_color', '$border_radius', '$background_color_hover'].includes(prop),
|
|
8
|
+
})(({ $show, $background_color, $border_radius, $background_color_hover }) => ({
|
|
9
|
+
display: $show === 'true' ? 'flex' : 'none',
|
|
10
|
+
position: 'fixed',
|
|
11
|
+
bottom: '165px',
|
|
12
|
+
right: '20px',
|
|
13
|
+
cursor: 'pointer',
|
|
14
|
+
zIndex: 1000,
|
|
15
|
+
width: 'auto',
|
|
16
|
+
height: 'auto',
|
|
17
|
+
border: `1px solid ${$background_color || '#00000000'}`,
|
|
18
|
+
backgroundColor: $background_color || '#00000000',
|
|
19
|
+
borderRadius: $border_radius,
|
|
20
|
+
'&:hover': {
|
|
21
|
+
backgroundColor: $background_color_hover || $background_color,
|
|
22
|
+
},
|
|
23
|
+
}));
|
|
24
|
+
const ScrollToTopButton = ({ show, border_radius, background_color, background_color_hover, children }) => {
|
|
25
|
+
const [showButton, setshowButton] = useState(show);
|
|
26
|
+
const handleScroll = () => {
|
|
27
|
+
setshowButton(window.scrollY > 0);
|
|
28
|
+
};
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
window.addEventListener('scroll', handleScroll);
|
|
31
|
+
return () => {
|
|
32
|
+
window.removeEventListener('scroll', handleScroll);
|
|
33
|
+
};
|
|
34
|
+
}, []);
|
|
35
|
+
const scrollToTop = () => {
|
|
36
|
+
window.scrollTo({
|
|
37
|
+
top: 0,
|
|
38
|
+
behavior: 'smooth',
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
return (_jsx(ButtonStyled, { "$background_color": background_color, "$border_radius": border_radius, "$background_color_hover": background_color_hover, onClick: scrollToTop, "aria-label": "ir para o topo", "$show": showButton.toString(), children: children }));
|
|
42
|
+
};
|
|
43
|
+
export default ScrollToTopButton;
|
|
44
|
+
//# sourceMappingURL=ScrollToTopButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScrollToTopButton.js","sourceRoot":"","sources":["../../src/components/ScrollToTopButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,YAAY,GAAG,MAAM,CAAC,UAAU,EAAE;IACtC,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,yBAAyB,CAAC,CAAC,QAAQ,CAAC,IAAc,CAAC;CACnI,CAAC,CAKC,CAAC,EAAE,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,uBAAuB,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7E,OAAO,EAAE,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;IAC3C,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,MAAM;IACb,MAAM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
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { WhatsApp } from '@mui/icons-material';
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
import Fab from '@mui/material/Fab';
|
|
6
|
+
const StyledFab = styled(Fab)({
|
|
7
|
+
position: 'fixed',
|
|
8
|
+
bottom: '20px',
|
|
9
|
+
right: '20px',
|
|
10
|
+
zIndex: 1000,
|
|
11
|
+
backgroundColor: '#25D366',
|
|
12
|
+
color: 'white',
|
|
13
|
+
'&:hover': {
|
|
14
|
+
backgroundColor: '#1EBE5D',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
const WhatsAppButton = ({ whatsapp }) => {
|
|
18
|
+
const handleClick = () => {
|
|
19
|
+
window.open(`https://wa.me/${whatsapp}`, '_blank');
|
|
20
|
+
};
|
|
21
|
+
return (_jsx(StyledFab, { "aria-label": "button whatsapp", onClick: handleClick, children: _jsx(WhatsApp, {}) }));
|
|
22
|
+
};
|
|
23
|
+
export default WhatsAppButton;
|
|
24
|
+
//# sourceMappingURL=WhatsAppButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WhatsAppButton.js","sourceRoot":"","sources":["../../src/components/WhatsAppButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,GAAG,MAAM,mBAAmB,CAAC;AAEpC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC5B,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,IAAI;IACZ,eAAe,EAAE,SAAS;IAC1B,KAAK,EAAE,OAAO;IAEd,SAAS,EAAE;QACT,eAAe,EAAE,SAAS;KAC3B;CACF,CAAC,CAAC;AAMH,MAAM,cAAc,GAAkC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAErE,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,MAAM,CAAC,IAAI,CAAC,iBAAiB,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,SAAS,kBAAY,iBAAiB,EAAC,OAAO,EAAE,WAAW,YAC1D,KAAC,QAAQ,KAAG,GACF,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Box, IconButton, styled } from '@mui/material';
|
|
4
|
+
import { WhatsApp } from '@mui/icons-material';
|
|
5
|
+
const StyledBox = styled(Box, {
|
|
6
|
+
shouldForwardProp: (prop) => !['background_color'].includes(prop),
|
|
7
|
+
})(({ background_color }) => ({
|
|
8
|
+
backgroundColor: background_color,
|
|
9
|
+
padding: '4px',
|
|
10
|
+
borderRadius: '50%',
|
|
11
|
+
display: 'inline-block',
|
|
12
|
+
border: '2px solid transparent',
|
|
13
|
+
}));
|
|
14
|
+
const WhatsAppIcon = ({ whatsapp }) => {
|
|
15
|
+
return (_jsx(StyledBox, { background_color: '#25D366', children: _jsx(IconButton, { "aria-label": 'icone whatsapp', onClick: () => window.open(`https://wa.me/${whatsapp}`, '_blank', 'noopener noreferrer'), children: _jsx(WhatsApp, { sx: { color: 'white', fontSize: 24 } }) }) }));
|
|
16
|
+
};
|
|
17
|
+
export default WhatsAppIcon;
|
|
18
|
+
//# sourceMappingURL=WhatsAppIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WhatsAppIcon.js","sourceRoot":"","sources":["../../src/components/WhatsAppIcon.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,EAAE;IAC5B,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,IAAc,CAAC;CAC5E,CAAC,CAA+B,CAAC,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAAC;IAC1D,eAAe,EAAE,gBAAgB;IACjC,OAAO,EAAE,KAAK;IACd,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE,uBAAuB;CAChC,CAAC,CAAC,CAAC;AAOJ,MAAM,YAAY,GAAgC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAEjE,OAAO,CACL,KAAC,SAAS,IAAC,gBAAgB,EAAC,SAAS,YACnC,KAAC,UAAU,kBAAY,gBAAgB,EACrC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,QAAQ,EAAE,EAAE,QAAQ,EAAE,qBAAqB,CAAC,YACxF,KAAC,QAAQ,IAAC,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAc,GACjD,GACH,CACb,CAAC;AAEJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as NavigationButton } from './components/NavigationButton';
|
|
2
|
+
export { default as NavigationHamburguerButton } from './components/NavigationHamburguerButton';
|
|
3
|
+
export { default as ScrollToTopButton } from './components/ScrollToTopButton';
|
|
4
|
+
export { default as WhatsAppButton } from './components/WhatsAppButton';
|
|
5
|
+
export { default as WhatsAppIcon } from './components/WhatsAppIcon';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as NavigationButton } from './components/NavigationButton';
|
|
2
|
+
export { default as NavigationHamburguerButton } from './components/NavigationHamburguerButton';
|
|
3
|
+
export { default as ScrollToTopButton } from './components/ScrollToTopButton';
|
|
4
|
+
export { default as WhatsAppButton } from './components/WhatsAppButton';
|
|
5
|
+
export { default as WhatsAppIcon } from './components/WhatsAppIcon';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAC,MAAM,yCAAyC,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAC,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAC,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAC,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles';
|
|
4
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
5
|
+
import { CacheProvider } from '@emotion/react';
|
|
6
|
+
import createCache from '@emotion/cache';
|
|
7
|
+
import { theme } from '@/theme';
|
|
8
|
+
// Crie uma instância de cache para o Emotion
|
|
9
|
+
const cache = createCache({ key: 'css', prepend: true });
|
|
10
|
+
export default function MyApp({ Component, pageProps }) {
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
// Remove o CSS injetado pelo servidor, se existir
|
|
13
|
+
const jssStyles = document.querySelector('#jss-server-side');
|
|
14
|
+
if (jssStyles && jssStyles.parentElement) {
|
|
15
|
+
jssStyles.parentElement.removeChild(jssStyles);
|
|
16
|
+
}
|
|
17
|
+
}, []);
|
|
18
|
+
return (_jsx(CacheProvider, { value: cache, children: _jsxs(MuiThemeProvider, { theme: theme, children: [_jsx(CssBaseline, {}), _jsx(Component, Object.assign({}, pageProps))] }) }));
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=_app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_app.js","sourceRoot":"","sources":["../../src/pages/_app.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,WAAW,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,6CAA6C;AAC7C,MAAM,KAAK,GAAG,WAAW,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;AAEzD,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,SAAS,EAAE,SAAS,EAAY;IAC9D,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,kDAAkD;QAClD,MAAM,SAAS,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;QAC7D,IAAI,SAAS,IAAI,SAAS,CAAC,aAAa,EAAE,CAAC;YACzC,SAAS,CAAC,aAAa,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACjD,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,YACzB,MAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,aAC5B,KAAC,WAAW,KAAe,EAC3B,KAAC,SAAS,oBAAK,SAAS,EAAe,IACtB,GACL,CACjB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Document, { DocumentContext } from "next/document";
|
|
2
|
+
export default class MyDocument extends Document {
|
|
3
|
+
static getInitialProps(ctx: DocumentContext): Promise<{
|
|
4
|
+
styles: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
html: string;
|
|
6
|
+
head?: Array<import("react").JSX.Element | null>;
|
|
7
|
+
}>;
|
|
8
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Document, { Html, Head, Main, NextScript } from "next/document";
|
|
3
|
+
import createCache from "@emotion/cache";
|
|
4
|
+
import createEmotionServer from "@emotion/server/create-instance";
|
|
5
|
+
import { CacheProvider } from "@emotion/react";
|
|
6
|
+
// Função para criar o cache do Emotion
|
|
7
|
+
const createEmotionCache = () => {
|
|
8
|
+
return createCache({ key: "css", prepend: true });
|
|
9
|
+
};
|
|
10
|
+
export default class MyDocument extends Document {
|
|
11
|
+
static async getInitialProps(ctx) {
|
|
12
|
+
const cache = createEmotionCache();
|
|
13
|
+
const { extractCriticalToChunks } = createEmotionServer(cache);
|
|
14
|
+
const originalRenderPage = ctx.renderPage;
|
|
15
|
+
try {
|
|
16
|
+
ctx.renderPage = () => originalRenderPage({
|
|
17
|
+
enhanceApp: (App) => (props) => (_jsx(CacheProvider, { value: cache, children: _jsx(App, Object.assign({}, props)) })),
|
|
18
|
+
});
|
|
19
|
+
const initialProps = await Document.getInitialProps(ctx);
|
|
20
|
+
// Extrai os estilos críticos para renderização no lado do servidor
|
|
21
|
+
const emotionStyles = extractCriticalToChunks(initialProps.html);
|
|
22
|
+
const emotionStyleTags = emotionStyles.styles.map((style) => (_jsx("style", { "data-emotion": `${style.key} ${style.ids.join(" ")}`, dangerouslySetInnerHTML: { __html: style.css } }, style.key)));
|
|
23
|
+
return Object.assign(Object.assign({}, initialProps), { styles: (_jsxs(_Fragment, { children: [initialProps.styles, emotionStyleTags] })) });
|
|
24
|
+
}
|
|
25
|
+
finally {
|
|
26
|
+
// Nada a liberar como no caso do styled-components
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return (_jsxs(Html, { lang: "pt", children: [_jsx(Head, {}), _jsxs("body", { children: [_jsx(Main, {}), _jsx(NextScript, {})] })] }));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=_document.js.map
|