pipesol-button 1.0.2 → 1.0.9

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/package.json CHANGED
@@ -1,50 +1,61 @@
1
- {
2
- "name": "pipesol-button",
3
- "version": "1.0.2",
4
- "main": "dist/index.js",
5
- "module": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "files": [
8
- "dist"
9
- ],
10
- "exports": {
11
- ".": {
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.js"
14
- }
15
- },
16
- "scripts": {
17
- "build": "tsc",
18
- "prepare": "npm run build",
19
- "start": "next start",
20
- "lint": "next lint",
21
- "release-beta": "npm run build && npm publish --tag beta",
22
- "release": "npm run build && npm publish"
23
- },
24
- "peerDependencies": {
25
- "@emotion/react": "^11.14.0",
26
- "@emotion/styled": "^11.14.1",
27
- "@mui/icons-material": "^6.4.4 || ^7.3.0",
28
- "@mui/material": "^6.4.4 || ^7.3.0",
29
- "react": "^18.0.0 || ^19.0.0",
30
- "react-dom": "^18.0.0 || ^19.0.0"
31
- },
32
- "devDependencies": {
33
- "@emotion/css": "^11.13.5",
34
- "@emotion/react": "^11.14.0",
35
- "@emotion/server": "^11.11.0",
36
- "@emotion/styled": "^11.14.1",
37
- "@eslint/eslintrc": "^3",
38
- "@mui/icons-material": "^7.3.0",
39
- "@mui/material": "^7.3.0",
40
- "@types/node": "^20",
41
- "@types/react": "^19.0.8",
42
- "@types/react-dom": "^19",
43
- "@types/react-input-mask": "^3.0.6",
44
- "eslint": "^9",
45
- "eslint-config-next": "15.1.6",
46
- "framer-motion": "^12.9.4",
47
- "next": "^15.2.3",
48
- "typescript": "^5"
49
- }
50
- }
1
+ {
2
+ "name": "pipesol-button",
3
+ "version": "1.0.9",
4
+
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/pipeline-solucoes/cmp-button"
8
+ },
9
+ "homepage": "https://github.com/pipeline-solucoes/cmp-button#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/pipeline-solucoes/cmp-button/issues"
12
+ },
13
+
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "main": "dist/index.js",
18
+ "module": "dist/index.js",
19
+ "types": "dist/index.d.ts",
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "exports": {
24
+ ".": {
25
+ "import": "./dist/index.js",
26
+ "require": "./dist/index.js"
27
+ }
28
+ },
29
+ "scripts": {
30
+ "build": "tsc",
31
+ "prepare": "npm run build",
32
+ "start": "next start",
33
+ "lint": "next lint"
34
+ },
35
+ "peerDependencies": {
36
+ "@emotion/react": "^11.14.0",
37
+ "@emotion/styled": "^11.14.1",
38
+ "@mui/icons-material": "^6.4.4 || ^7.3.0",
39
+ "@mui/material": "^6.4.4 || ^7.3.0",
40
+ "react": "^18.0.0 || ^19.0.0",
41
+ "react-dom": "^18.0.0 || ^19.0.0"
42
+ },
43
+ "devDependencies": {
44
+ "@emotion/css": "^11.13.5",
45
+ "@emotion/react": "^11.14.0",
46
+ "@emotion/server": "^11.11.0",
47
+ "@emotion/styled": "^11.14.1",
48
+ "@eslint/eslintrc": "^3",
49
+ "@mui/icons-material": "^7.3.0",
50
+ "@mui/material": "^7.3.0",
51
+ "@types/node": "^20",
52
+ "@types/react": "^19.0.8",
53
+ "@types/react-dom": "^19",
54
+ "@types/react-input-mask": "^3.0.6",
55
+ "eslint": "^9",
56
+ "eslint-config-next": "15.1.6",
57
+ "framer-motion": "^12.9.4",
58
+ "next": "^15.2.3",
59
+ "typescript": "^5"
60
+ }
61
+ }
@@ -1,18 +0,0 @@
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>, {}>;
@@ -1,56 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"ButtonStyled.js","sourceRoot":"","sources":["../../src/components/ButtonStyled.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,QAAQ,EAAE;IAC5D,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAC1B,CAAC;QACC,kBAAkB;QAClB,OAAO;QACP,aAAa;QACb,cAAc;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,YAAY,EAAE,uBAAuB;IACrC,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,YAAY,EAAE,aAAa,WAAW,IAAI,KAAK,EAAE;QACjD,KAAK,EAAE,WAAW,IAAI,KAAK;KAC5B;CACF,CAAC,CAAC,CAAC;AAGJ,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,QAAQ,EAAE;IACrD,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAC1B,CAAC;QACC,kBAAkB;QAClB,OAAO;QACP,aAAa;QACb,cAAc;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"}
@@ -1,19 +0,0 @@
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;
@@ -1,64 +0,0 @@
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
@@ -1 +0,0 @@
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,SAAS;IACjB,cAAc,EAAE,MAAM;IACtB,aAAa,EAAE,MAAM;IACrB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,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,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,aAAa,CAAC;IAC1E,MAAM,YAAY,GAAW,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,KAAK,CAAC;IAE7C,MAAM,WAAW,GAAG;QAClB,UAAU,EAAE;YACV,KAAK,EAAE,GAAG;YACV,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAE;SAC/C;QACD,UAAU,EAAE;YACV,KAAK,EAAE,IAAI;SACZ;KACF,CAAC;IAEF,OAAO,CACL,KAAC,kBAAkB,kBACjB,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,eAAe,EACjC,sBAAsB,EAAE,oBAAoB,EAC5C,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,UAAU,EACvB,aAAa,EAAE,YAAY,EAC3B,YAAY,EAAE,WAAW,EACzB,sBAAsB,EAAE,oBAAoB,EAC5C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,YAAY,gBACR,UAAU,EACtB,MAAM,EAAE,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EACrD,GAAG,EAAE,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,IAC3D,WAAW,cAEd,QAAQ,IACU,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- interface NavigationHamburguerButtonProps {
3
- url: string;
4
- aria_label: string;
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;
@@ -1,33 +0,0 @@
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
@@ -1 +0,0 @@
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,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zC,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,gBACzC,UAAU,EACvB,OAAO,EAAE,WAAW,YACjB,QAAQ,GACmB,CACjC,CAAC;IACJ,CAAC;SACI,IAAI,eAAe,KAAK,MAAM,EAAC,CAAC;QACnC,OAAO,CACL,KAAC,sBAAsB,IAAC,KAAK,EAAE,KAAK,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,gBACzC,UAAU,EACvB,OAAO,EAAE,WAAW,YACjB,QAAQ,GACY,CAC1B,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
@@ -1,37 +0,0 @@
1
- import React from "react";
2
- /**
3
- * Interface das props do PrimaryButton
4
- */
5
- export interface PrimaryButtonProps {
6
- /** Largura do botão */
7
- width?: string;
8
- /** Altura do botão */
9
- height?: string;
10
- /** Padding interno */
11
- padding?: string;
12
- /** Margin externa */
13
- margin?: string;
14
- /** Desabilita o botão */
15
- disabled?: boolean;
16
- /** Ícone opcional à esquerda */
17
- icon?: React.ReactNode;
18
- /** Texto do botão */
19
- text: string;
20
- /** Função chamada no clique */
21
- onClick?: () => void;
22
- }
23
- /**
24
- * Botão estilizado baseado no tema customizado
25
- *
26
- * @example
27
- * ```tsx
28
- * <PrimaryButton
29
- * text="Clique Aqui"
30
- * onClick={() => alert("Clicado!")}
31
- * width="200px"
32
- * icon={<SomeIcon />}
33
- * />
34
- * ```
35
- */
36
- declare const PrimaryButton: React.FC<PrimaryButtonProps>;
37
- export default PrimaryButton;
@@ -1,48 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { styled } from "@mui/material/styles";
3
- import Button from "@mui/material/Button";
4
- import { useTheme } from "@mui/material/styles";
5
- import { Typography } from "@mui/material";
6
- const StyledButton = styled(Button, {
7
- shouldForwardProp: (prop) => !["width", "height", "padding", "margin"].includes(prop),
8
- })(({ theme, width, height, padding, margin }) => ({
9
- background: theme.palette.custom.primaryButton.background,
10
- color: theme.palette.custom.primaryButton.color,
11
- borderRadius: theme.palette.custom.primaryButton.borderRadius,
12
- boxShadow: theme.palette.custom.primaryButton.boxShadow || "none",
13
- width: width || "auto",
14
- height: height || "auto",
15
- padding: padding || "8px 16px",
16
- margin: margin || "0",
17
- textTransform: "none",
18
- fontWeight: 600,
19
- "&:hover": {
20
- background: theme.palette.custom.primaryButton.backgroundHover,
21
- color: theme.palette.custom.primaryButton.colorHover,
22
- },
23
- "&.Mui-disabled": {
24
- background: theme.palette.grey[300],
25
- color: theme.palette.text.disabled,
26
- boxShadow: "none",
27
- },
28
- }));
29
- /**
30
- * Botão estilizado baseado no tema customizado
31
- *
32
- * @example
33
- * ```tsx
34
- * <PrimaryButton
35
- * text="Clique Aqui"
36
- * onClick={() => alert("Clicado!")}
37
- * width="200px"
38
- * icon={<SomeIcon />}
39
- * />
40
- * ```
41
- */
42
- const PrimaryButton = ({ width, height, padding, margin, disabled, icon, text, onClick, }) => {
43
- const theme = useTheme();
44
- return (_jsx(StyledButton, { width: width, height: height, padding: padding, margin: margin, disabled: disabled, startIcon: icon, onClick: onClick, children: _jsx(Typography, { variant: "subtitle1", component: "span", children: text }) }));
45
- };
46
- PrimaryButton.displayName = "PrimaryButton";
47
- export default PrimaryButton;
48
- //# sourceMappingURL=PrimaryButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PrimaryButton.js","sourceRoot":"","sources":["../../src/components/PrimaryButton.tsx"],"names":[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