@pipelinesolucoes/button 1.2.0-beta.11 → 1.2.0-beta.12

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.
@@ -8,6 +8,7 @@ interface NavigationButtonProps extends CommonStyleProps {
8
8
  text: string;
9
9
  aria_label: string;
10
10
  url: string;
11
+ abrirHTTPNovaAba?: boolean;
11
12
  }
12
13
  /**
13
14
  * Botão de navegação reutilizável baseado em um link (`<a>`), estilizado com Material UI.
@@ -40,6 +41,7 @@ interface NavigationButtonProps extends CommonStyleProps {
40
41
  * @param {string} [padding="8px 24px"] Espaçamento interno.
41
42
  * @param {string} [text] Texto do botão.
42
43
  * @param {TypographyVariant} [variant="body1"] Variante da tipografia usada no texto.
44
+ * @param {boolean} [abrirHTTPNovaAba="true"] Abrir link http em uma nova aba.
43
45
  *
44
46
  * @example
45
47
  * ```tsx
@@ -32,6 +32,7 @@ import { ButtonNavigationStyled } from './StyledButton';
32
32
  * @param {string} [padding="8px 24px"] Espaçamento interno.
33
33
  * @param {string} [text] Texto do botão.
34
34
  * @param {TypographyVariant} [variant="body1"] Variante da tipografia usada no texto.
35
+ * @param {boolean} [abrirHTTPNovaAba="true"] Abrir link http em uma nova aba.
35
36
  *
36
37
  * @example
37
38
  * ```tsx
@@ -45,8 +46,8 @@ import { ButtonNavigationStyled } from './StyledButton';
45
46
  * </NavigationButton>
46
47
  * ```
47
48
  */
48
- const NavigationButton = ({ url, text, kind = 'none', aria_label, background, backgroundHover, color, colorHover, borderRadius, border, boxShadow, width, margin, padding, variant, }) => {
49
- if (url.includes('http')) {
49
+ const NavigationButton = ({ url, text, kind = 'none', aria_label, background, backgroundHover, color, colorHover, borderRadius, border, boxShadow, width, margin, padding, variant, abrirHTTPNovaAba = true }) => {
50
+ if (url.includes('http') && abrirHTTPNovaAba) {
50
51
  return (_jsx(ButtonNavigationStyled, { kind: kind, href: url, width: width, background: background, backgroundHover: backgroundHover, color: color, colorHover: colorHover, borderRadius: borderRadius, border: border, padding: padding, margin: margin, "aria-label": aria_label, target: "_blank", rel: "noopener noreferrer", boxShadow: boxShadow, variantButton: variant, children: text }));
51
52
  }
52
53
  return (_jsx(ButtonNavigationStyled, { kind: kind, href: url, width: width, background: background, backgroundHover: backgroundHover, color: color, colorHover: colorHover, borderRadius: borderRadius, border: border, padding: padding, margin: margin, "aria-label": aria_label, boxShadow: boxShadow, variantButton: variant, children: text }));
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationButton.js","sourceRoot":"","sources":["../../src/components/NavigationButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAMb,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAUxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,gBAAgB,GAAoC,CAAC,EACzD,GAAG,EACH,IAAI,EACJ,IAAI,GAAG,MAAM,EACb,UAAU,EACV,UAAU,EACV,eAAe,EACf,KAAK,EACL,UAAU,EACV,YAAY,EACZ,MAAM,EACN,SAAS,EACT,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,GACR,EAAE,EAAE;IAEH,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,CACL,KAAC,sBAAsB,IACrB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,gBACF,UAAU,EACtB,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,OAAO,YAErB,IAAI,GACkB,CAC1B,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,sBAAsB,IACrB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,gBACF,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,OAAO,YAErB,IAAI,GACkB,CAC1B,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAClD,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"NavigationButton.js","sourceRoot":"","sources":["../../src/components/NavigationButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAMb,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAWxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,gBAAgB,GAAoC,CAAC,EACzD,GAAG,EACH,IAAI,EACJ,IAAI,GAAG,MAAM,EACb,UAAU,EACV,UAAU,EACV,eAAe,EACf,KAAK,EACL,UAAU,EACV,YAAY,EACZ,MAAM,EACN,SAAS,EACT,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,gBAAgB,GAAG,IAAI,EACxB,EAAE,EAAE;IAEH,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,gBAAgB,EAAE,CAAC;QAC7C,OAAO,CACL,KAAC,sBAAsB,IACrB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,Y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