@prosistemas/sca-web-kit 3.4.6 → 3.4.8

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.
@@ -1,9 +1,10 @@
1
1
  import { IconProps, IconWeight } from '@phosphor-icons/react';
2
- import { HTMLAttributeAnchorTarget } from 'react';
2
+ import { CSSProperties, HTMLAttributeAnchorTarget } from 'react';
3
3
  interface InfoHeaderProps {
4
4
  className?: string;
5
5
  tagLabel?: string;
6
6
  tagLabelClassName?: string;
7
+ tagLabelStyle?: CSSProperties;
7
8
  tagLabelHref?: string;
8
9
  tagLabelTarget?: HTMLAttributeAnchorTarget;
9
10
  tagLabelLeadingIcon?: React.ComponentType<IconProps>;
@@ -18,9 +19,11 @@ interface InfoHeaderProps {
18
19
  tagLabelTrailingIconClassName?: string;
19
20
  title: string;
20
21
  titleClassName?: string;
22
+ titleStyle?: CSSProperties;
21
23
  titleH1?: boolean;
22
24
  subtitle?: string;
23
25
  subtitleClassName?: string;
26
+ subtitleStyle?: CSSProperties;
24
27
  buttonLabel?: string;
25
28
  buttonClassName?: string;
26
29
  buttonHref?: string;
@@ -29,5 +32,5 @@ interface InfoHeaderProps {
29
32
  gap?: string;
30
33
  dark?: boolean;
31
34
  }
32
- export default function InfoHeader({ className, tagLabel, tagLabelClassName, tagLabelHref, tagLabelTarget, tagLabelLeadingIcon, tagLabelLeadingIconSize, tagLabelLeadingIconColor, tagLabelLeadingIconWeight, tagLabelLeadingIconClassName, tagLabelTrailingIcon, tagLabelTrailingIconSize, tagLabelTrailingIconColor, tagLabelTrailingIconWeight, tagLabelTrailingIconClassName, title, titleClassName, titleH1, subtitle, subtitleClassName, buttonLabel, buttonClassName, buttonHref, buttonInternalHref, buttonTarget, dark, }: InfoHeaderProps): import("react/jsx-runtime").JSX.Element;
35
+ export default function InfoHeader({ className, tagLabel, tagLabelClassName, tagLabelStyle, tagLabelHref, tagLabelTarget, tagLabelLeadingIcon, tagLabelLeadingIconSize, tagLabelLeadingIconColor, tagLabelLeadingIconWeight, tagLabelLeadingIconClassName, tagLabelTrailingIcon, tagLabelTrailingIconSize, tagLabelTrailingIconColor, tagLabelTrailingIconWeight, tagLabelTrailingIconClassName, title, titleClassName, titleStyle, titleH1, subtitle, subtitleClassName, subtitleStyle, buttonLabel, buttonClassName, buttonHref, buttonInternalHref, buttonTarget, dark, }: InfoHeaderProps): import("react/jsx-runtime").JSX.Element;
33
36
  export {};
@@ -4,9 +4,9 @@ import TagLabel from '../../ui/tag-label/tag-label';
4
4
  import Title from '../../ui/title/title';
5
5
  import Subtitle from '../../ui/subtitle/subtitle';
6
6
  import Button from '../../ui/button/button';
7
- export default function InfoHeader({ className, tagLabel, tagLabelClassName, tagLabelHref, tagLabelTarget, tagLabelLeadingIcon, tagLabelLeadingIconSize, tagLabelLeadingIconColor, tagLabelLeadingIconWeight, tagLabelLeadingIconClassName, tagLabelTrailingIcon, tagLabelTrailingIconSize, tagLabelTrailingIconColor, tagLabelTrailingIconWeight, tagLabelTrailingIconClassName, title, titleClassName, titleH1 = false, subtitle, subtitleClassName, buttonLabel, buttonClassName, buttonHref, buttonInternalHref, buttonTarget, dark, }) {
7
+ export default function InfoHeader({ className, tagLabel, tagLabelClassName, tagLabelStyle, tagLabelHref, tagLabelTarget, tagLabelLeadingIcon, tagLabelLeadingIconSize, tagLabelLeadingIconColor, tagLabelLeadingIconWeight, tagLabelLeadingIconClassName, tagLabelTrailingIcon, tagLabelTrailingIconSize, tagLabelTrailingIconColor, tagLabelTrailingIconWeight, tagLabelTrailingIconClassName, title, titleClassName, titleStyle, titleH1 = false, subtitle, subtitleClassName, subtitleStyle, buttonLabel, buttonClassName, buttonHref, buttonInternalHref, buttonTarget, dark, }) {
8
8
  return (_jsxs("div", { className: `${styles['info-header']} ${className}`, children: [tagLabel &&
9
- _jsx(TagLabel, { className: `${tagLabelClassName} ${styles['tag-label']}`, label: tagLabel, dark: dark, href: tagLabelHref, target: tagLabelTarget, leadingIcon: tagLabelLeadingIcon, leadingIconSize: tagLabelLeadingIconSize, leadingIconColor: tagLabelLeadingIconColor, leadingIconWeight: tagLabelLeadingIconWeight, leadingIconClassName: tagLabelLeadingIconClassName, trailingIcon: tagLabelTrailingIcon, trailingIconSize: tagLabelTrailingIconSize, trailingIconColor: tagLabelTrailingIconColor, trailingIconWeight: tagLabelTrailingIconWeight, trailingIconClassName: tagLabelTrailingIconClassName }), _jsx(Title, { className: `${titleClassName} ${styles['title']}`, h1: titleH1, text: title, dark: dark }), subtitle &&
10
- _jsx(Subtitle, { className: `${subtitleClassName} ${styles['subtitle']}`, text: subtitle, dark: dark }), buttonLabel &&
9
+ _jsx(TagLabel, { className: `${tagLabelClassName} ${styles['tag-label']}`, style: tagLabelStyle, label: tagLabel, dark: dark, href: tagLabelHref, target: tagLabelTarget, leadingIcon: tagLabelLeadingIcon, leadingIconSize: tagLabelLeadingIconSize, leadingIconColor: tagLabelLeadingIconColor, leadingIconWeight: tagLabelLeadingIconWeight, leadingIconClassName: tagLabelLeadingIconClassName, trailingIcon: tagLabelTrailingIcon, trailingIconSize: tagLabelTrailingIconSize, trailingIconColor: tagLabelTrailingIconColor, trailingIconWeight: tagLabelTrailingIconWeight, trailingIconClassName: tagLabelTrailingIconClassName }), _jsx(Title, { className: `${titleClassName} ${styles['title']}`, style: titleStyle, h1: titleH1, text: title, dark: dark }), subtitle &&
10
+ _jsx(Subtitle, { className: `${subtitleClassName} ${styles['subtitle']}`, style: subtitleStyle, text: subtitle, dark: dark }), buttonLabel &&
11
11
  _jsx(Button, { className: `${buttonClassName} ${styles['button']}`, label: buttonLabel, href: buttonHref, internalHref: buttonInternalHref, target: buttonTarget })] }));
12
12
  }
@@ -1,7 +1,9 @@
1
+ import { CSSProperties } from 'react';
1
2
  import { IconProps, IconWeight } from '@phosphor-icons/react';
2
3
  interface ButtonProps {
3
4
  label?: string;
4
5
  className?: string;
6
+ style?: CSSProperties;
5
7
  loading?: boolean;
6
8
  loadingSize?: number;
7
9
  loadingColor?: string;
@@ -30,5 +32,5 @@ interface ButtonProps {
30
32
  ariaLabel?: string;
31
33
  disabled?: boolean;
32
34
  }
33
- export default function Button({ label, className, loading, loadingSize, loadingColor, loadingClassName, icon: Icon, iconSize, iconColor, iconWeight, iconClassName, leadingIcon: LeadingIcon, leadingIconSize, leadingIconColor, leadingIconWeight, leadingIconClassName, trailingIcon: TrailingIcon, trailingIconSize, trailingIconColor, trailingIconWeight, trailingIconClassName, href, internalHref, target, type, round, onClick, ariaLabel, disabled, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
35
+ export default function Button({ label, className, style, loading, loadingSize, loadingColor, loadingClassName, icon: Icon, iconSize, iconColor, iconWeight, iconClassName, leadingIcon: LeadingIcon, leadingIconSize, leadingIconColor, leadingIconWeight, leadingIconClassName, trailingIcon: TrailingIcon, trailingIconSize, trailingIconColor, trailingIconWeight, trailingIconClassName, href, internalHref, target, type, round, onClick, ariaLabel, disabled, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
34
36
  export {};
@@ -3,7 +3,7 @@ import styles from './button.module.scss';
3
3
  import { inter } from '../../../fonts';
4
4
  import Link from 'next/link';
5
5
  import { PulseLoader } from 'react-spinners';
6
- export default function Button({ label, className,
6
+ export default function Button({ label, className, style,
7
7
  // Carregando (overwrite no ícone/label central caso true)
8
8
  loading = false, loadingSize = 5, loadingColor = 'white', loadingClassName,
9
9
  // Ícone central
@@ -14,7 +14,7 @@ leadingIcon: LeadingIcon, leadingIconSize, leadingIconColor, leadingIconWeight,
14
14
  trailingIcon: TrailingIcon, trailingIconSize, trailingIconColor, trailingIconWeight, trailingIconClassName,
15
15
  // Etc
16
16
  href, internalHref, target, type, round = false, onClick, ariaLabel, disabled = false, }) {
17
- const button = (_jsxs("button", { onClick: onClick, type: type, disabled: disabled, "aria-label": ariaLabel, className: `${styles['button']} ${disabled && styles['disabled']} ${className}`, style: {
17
+ const button = (_jsxs("button", { onClick: onClick, type: type, disabled: disabled, "aria-label": ariaLabel, className: `${styles['button']} ${disabled && styles['disabled']} ${className}`, style: style ? style : {
18
18
  borderRadius: round ? '50%' : '8px',
19
19
  padding: round ? '8px' : '16px 42px',
20
20
  cursor: disabled ? 'not-allowed' : 'pointer',
@@ -11,7 +11,7 @@ export default function Input({ id, label, placeholder, className, inputClassNam
11
11
  ${inputClassName}
12
12
  ${error && styles['input-error']}
13
13
  `, placeholder: placeholder, autoFocus: autoFocus, required: required, disabled: disabled, defaultValue: defaultValue, type: inputType, onChange: onChange, maxLength: maxLength }), type === 'password' &&
14
- _jsxs("button", { className: styles['reveal-password'], onClick: () => {
14
+ _jsxs("button", { type: 'button', className: styles['reveal-password'], onClick: () => {
15
15
  if (inputType === 'text')
16
16
  setInputType('password');
17
17
  else
@@ -1,5 +1,7 @@
1
- export default function Subtitle({ text, className, dark, }: {
1
+ import { CSSProperties } from 'react';
2
+ export default function Subtitle({ text, style, className, dark, }: {
2
3
  text: string;
4
+ style?: CSSProperties;
3
5
  className?: string;
4
6
  dark?: boolean;
5
7
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import styles from './subtitle.module.scss';
3
- export default function Subtitle({ text, className, dark = false, }) {
4
- return (_jsx("p", { className: `
3
+ export default function Subtitle({ text, style, className, dark = false, }) {
4
+ return (_jsx("p", { style: style, className: `
5
5
  ${styles['subtitle']}
6
6
  ${dark && styles['dark']}
7
7
  ${className}
@@ -1,8 +1,9 @@
1
1
  import { IconProps, IconWeight } from '@phosphor-icons/react';
2
- import { HTMLAttributeAnchorTarget } from 'react';
2
+ import { CSSProperties, HTMLAttributeAnchorTarget } from 'react';
3
3
  interface TagLabelProps {
4
4
  label: string;
5
5
  className?: string;
6
+ style?: CSSProperties;
6
7
  dark?: boolean;
7
8
  href?: string;
8
9
  target?: HTMLAttributeAnchorTarget;
@@ -17,5 +18,5 @@ interface TagLabelProps {
17
18
  trailingIconWeight?: IconWeight;
18
19
  trailingIconClassName?: string;
19
20
  }
20
- export default function TagLabel({ label, className, dark, href, target, leadingIcon: LeadingIcon, leadingIconSize, leadingIconColor, leadingIconWeight, leadingIconClassName, trailingIcon: TrailingIcon, trailingIconSize, trailingIconColor, trailingIconWeight, trailingIconClassName, }: TagLabelProps): import("react/jsx-runtime").JSX.Element;
21
+ export default function TagLabel({ label, className, style, dark, href, target, leadingIcon: LeadingIcon, leadingIconSize, leadingIconColor, leadingIconWeight, leadingIconClassName, trailingIcon: TrailingIcon, trailingIconSize, trailingIconColor, trailingIconWeight, trailingIconClassName, }: TagLabelProps): import("react/jsx-runtime").JSX.Element;
21
22
  export {};
@@ -2,14 +2,14 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import styles from './tag-label.module.scss';
3
3
  import { montserrat } from '../../../fonts';
4
4
  import Link from 'next/link';
5
- export default function TagLabel({ label, className, dark, href, target, leadingIcon: LeadingIcon, leadingIconSize, leadingIconColor, leadingIconWeight, leadingIconClassName, trailingIcon: TrailingIcon, trailingIconSize, trailingIconColor, trailingIconWeight, trailingIconClassName, }) {
5
+ export default function TagLabel({ label, className, style, dark, href, target, leadingIcon: LeadingIcon, leadingIconSize, leadingIconColor, leadingIconWeight, leadingIconClassName, trailingIcon: TrailingIcon, trailingIconSize, trailingIconColor, trailingIconWeight, trailingIconClassName, }) {
6
6
  const content = (_jsxs(_Fragment, { children: [LeadingIcon && (
7
7
  // Ícone da esquerda
8
8
  _jsx(LeadingIcon, { size: leadingIconSize, color: leadingIconColor, weight: leadingIconWeight, className: leadingIconClassName })), label, TrailingIcon && (
9
9
  // Ícone da direita
10
10
  _jsx(TrailingIcon, { size: trailingIconSize, color: trailingIconColor, weight: trailingIconWeight, className: trailingIconClassName }))] }));
11
11
  if (href)
12
- return (_jsx(Link, { href: href, target: target, className: `
12
+ return (_jsx(Link, { href: href, target: target, style: style, className: `
13
13
  ${styles['tag-label']}
14
14
  ${styles['link']}
15
15
  ${montserrat.className}
@@ -21,5 +21,5 @@ export default function TagLabel({ label, className, dark, href, target, leading
21
21
  ${montserrat.className}
22
22
  ${className}
23
23
  ${dark && styles['dark']}
24
- `, children: content }));
24
+ `, style: style, children: content }));
25
25
  }
@@ -1,5 +1,7 @@
1
- export default function Title({ text, className, dark, h1, id, }: {
1
+ import { CSSProperties } from 'react';
2
+ export default function Title({ text, style, className, dark, h1, id, }: {
2
3
  text: string;
4
+ style?: CSSProperties;
3
5
  className?: string;
4
6
  fontSize?: string;
5
7
  fontWeight?: string;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import styles from './title.module.scss';
3
3
  import { montserrat } from '../../../fonts';
4
- export default function Title({ text, className, dark = false, h1 = false, id, }) {
4
+ export default function Title({ text, style, className, dark = false, h1 = false, id, }) {
5
5
  const Tag = h1 ? 'h1' : 'h2';
6
- return (_jsx(Tag, { id: id, className: `
6
+ return (_jsx(Tag, { id: id, style: style, className: `
7
7
  ${styles['title']}
8
8
  ${montserrat.className}
9
9
  ${dark && styles['dark']}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosistemas/sca-web-kit",
3
- "version": "3.4.6",
3
+ "version": "3.4.8",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [