greenole-design-system 1.1.80 → 1.1.82

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,6 +1,7 @@
1
1
  export declare const HiddenInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, never>> & string;
2
2
  export declare const Box: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
3
3
  $checked: boolean;
4
+ $indeterminate?: boolean;
4
5
  $color: string;
5
6
  $disabled?: boolean;
6
7
  }>> & string;
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
2
2
  export type CheckboxProps = {
3
3
  checked?: boolean;
4
4
  defaultChecked?: boolean;
5
+ indeterminate?: boolean;
5
6
  onChange?: (checked: boolean) => void;
6
7
  color?: string;
7
8
  disabled?: boolean;
@@ -10,4 +11,5 @@ export type CheckboxProps = {
10
11
  name?: string;
11
12
  value?: string;
12
13
  label?: ReactNode;
14
+ ariaLabel?: string;
13
15
  };
@@ -1,6 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- export type ToastVariant = 'success' | 'error' | 'warning' | 'info';
3
- export type ToastPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
2
+ import { THookTypes } from '../../utils/i18n/types';
3
+ export type ToastVariant = "success" | "error" | "warning" | "info";
4
+ export type ToastPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
4
5
  export interface ToastProps {
5
6
  id?: string;
6
7
  variant?: ToastVariant;
@@ -12,4 +13,5 @@ export interface ToastProps {
12
13
  closable?: boolean;
13
14
  className?: string;
14
15
  onClose?: () => void;
16
+ t?: THookTypes;
15
17
  }
@@ -4,6 +4,7 @@ declare const meta: Meta<typeof Accordion>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Accordion>;
6
6
  export declare const Default: Story;
7
+ export declare const Controlled: Story;
7
8
  export declare const CustomColors: Story;
8
9
  export declare const noPaddingContent: Story;
9
10
  export declare const TitleWithNode: Story;
@@ -1,13 +1,17 @@
1
1
  import { ReactNode } from 'react';
2
+ import { THookTypes } from '../../utils/i18n/types';
2
3
  export interface AccordionProps {
3
4
  title: ReactNode;
4
5
  subtitle?: string;
5
6
  subtitleIcon?: ReactNode;
6
7
  defaultOpen?: boolean;
8
+ isOpenProp?: boolean;
9
+ onToggle?: () => void;
7
10
  bgColor?: string;
8
11
  textColor?: string;
9
12
  borderColor?: string;
10
13
  noPaddingContent?: boolean;
11
14
  contentMaxHeight?: number | string;
12
15
  children: ReactNode;
16
+ t?: THookTypes;
13
17
  }
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { THookTypes } from '../../utils/i18n/types';
2
3
  export interface BreadcrumbItem {
3
4
  label: string;
4
5
  href?: string;
@@ -14,4 +15,5 @@ export interface BreadcrumbProps {
14
15
  homeIcon?: ReactNode;
15
16
  isMobile?: boolean;
16
17
  onHomeClick?: () => void;
18
+ t?: THookTypes;
17
19
  }
@@ -1,11 +1,9 @@
1
1
  import { default as React } from 'react';
2
2
  import { InputProps } from '../../base-components/Input/Input.types';
3
- import { THookTypes } from '../../utils/i18n/types';
4
3
  import { CalendarProps } from './Calendar.types';
5
4
  interface ExtendedCalendarProps extends CalendarProps {
6
5
  inputProps?: InputProps;
7
6
  autoClose?: boolean;
8
- t?: THookTypes;
9
7
  clearable?: boolean;
10
8
  placeholder?: string;
11
9
  dropdownLimit?: boolean;
@@ -1,4 +1,5 @@
1
1
  import { Dayjs } from 'dayjs';
2
+ import { THookTypes } from '../../utils/i18n/types';
2
3
  export type DateRange = {
3
4
  start: Dayjs | null;
4
5
  end: Dayjs | null;
@@ -16,4 +17,5 @@ export interface CalendarProps {
16
17
  showPresets?: boolean;
17
18
  isMobile?: boolean;
18
19
  rangeSinglePanel?: boolean;
20
+ t?: THookTypes;
19
21
  }
@@ -1,8 +1,9 @@
1
1
  import { Dayjs } from 'dayjs';
2
2
  import { default as React } from 'react';
3
3
  import { DateRange } from './Calendar.types';
4
+ import { THookTypes } from '../../utils/i18n/types';
4
5
  interface Props {
5
- mode: 'single' | 'range';
6
+ mode: "single" | "range";
6
7
  selectedDate?: Dayjs | null;
7
8
  selectedRange?: DateRange;
8
9
  onChange: (date: Dayjs | null, range?: DateRange) => void;
@@ -13,6 +14,7 @@ interface Props {
13
14
  rangeSinglePanel?: boolean;
14
15
  /** Ativa espaçamento/tamanhos mais confortáveis */
15
16
  isMobile?: boolean;
17
+ t?: THookTypes;
16
18
  }
17
19
  export declare const DateRangePicker: React.FC<Props>;
18
20
  export {};
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+ import { DisclaimerProps } from './Disclaimer.types';
3
+ export declare const Disclaimer: React.FC<DisclaimerProps>;
4
+ export default Disclaimer;
@@ -0,0 +1,11 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { default as Disclaimer } from './Disclaimer';
3
+ declare const meta: Meta<typeof Disclaimer>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Disclaimer>;
6
+ export declare const Playground: Story;
7
+ export declare const WithIcon: Story;
8
+ export declare const Closable: Story;
9
+ export declare const WithRichContent: Story;
10
+ export declare const ClosableWithFallbackAlert: Story;
11
+ export declare const IconGallery: Story;
@@ -0,0 +1,4 @@
1
+ export declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ export declare const IconWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const Content: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ export declare const CloseButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ export interface DisclaimerProps {
3
+ children: ReactNode;
4
+ icon?: ReactNode;
5
+ closable?: boolean;
6
+ onClose?: () => void;
7
+ className?: string;
8
+ }
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { THookTypes } from '../../utils/i18n/types';
2
3
  import { LinearStepperStep } from '../Timeline/Timeline.types';
3
4
  export interface DrawerProps {
4
5
  show: boolean;
@@ -10,7 +11,7 @@ export interface DrawerProps {
10
11
  showOverlay?: boolean;
11
12
  cancelButtonText?: string;
12
13
  confirmButtonText?: string;
13
- direction?: 'left' | 'right';
14
+ direction?: "left" | "right";
14
15
  cancelButton?: ReactNode;
15
16
  confirmButton?: ReactNode;
16
17
  steps?: LinearStepperStep[];
@@ -20,4 +21,5 @@ export interface DrawerProps {
20
21
  onCancel?: () => void;
21
22
  onConfirm?: () => void;
22
23
  onClose?: () => void;
24
+ t?: THookTypes;
23
25
  }
@@ -5,6 +5,7 @@ export default meta;
5
5
  type Story = StoryObj<typeof Filter>;
6
6
  export declare const Default: Story;
7
7
  export declare const WithCheckboxes: Story;
8
+ export declare const WithDisabledItems: Story;
8
9
  export declare const MixedFilters: Story;
9
10
  export declare const WithInitialValues: Story;
10
11
  export declare const CompleteExample: Story;
@@ -11,6 +11,8 @@ export interface FilterItem {
11
11
  value: string | string[];
12
12
  options: FilterItemOption[];
13
13
  multiple?: boolean;
14
+ disabled?: boolean;
15
+ onClear?: (output: FilterOutput) => void;
14
16
  }
15
17
  export interface FilterSelectedValues {
16
18
  [key: string]: string | string[];
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- export type ModalType = 'success' | 'error' | 'warning';
2
+ import { THookTypes } from '../../utils/i18n/types';
3
+ export type ModalType = "success" | "error" | "warning";
3
4
  export type ModalTypeIcon = {
4
5
  [key in ModalType]?: React.ReactNode;
5
6
  };
@@ -17,4 +18,5 @@ export interface ModalProps {
17
18
  onCancel?: () => void;
18
19
  onConfirm?: () => void;
19
20
  onClose?: () => void;
21
+ t?: THookTypes;
20
22
  }
@@ -1,14 +1,14 @@
1
1
  export declare const SearchWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
2
- $expanded: boolean;
2
+ $visible: boolean;
3
3
  $disabled?: boolean;
4
4
  $alignment?: "left" | "right";
5
+ $isMobile?: boolean;
6
+ $expandedWidth?: string;
5
7
  }>> & string;
6
8
  export declare const SearchIconButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
7
9
  $disabled?: boolean;
8
10
  $visible?: boolean;
9
11
  $iconColor?: string;
10
- }>> & string;
11
- export declare const SearchInputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
12
- $expanded: boolean;
13
- $direction?: "left" | "right";
12
+ $alignment?: "left" | "right";
13
+ $isMobile?: boolean;
14
14
  }>> & string;
@@ -1,11 +1,13 @@
1
- export type SearchMode = 'collapsed' | 'expanded';
2
- export type SearchAnimationDirection = 'left' | 'right' | 'auto';
3
- export type SearchAlignment = 'left' | 'right';
1
+ import { THookTypes } from '../../utils/i18n/types';
2
+ export type SearchMode = "collapsed" | "expanded";
3
+ export type SearchAnimationDirection = "left" | "right" | "auto";
4
+ export type SearchAlignment = "left" | "right";
4
5
  export interface SearchProps {
5
6
  mode?: SearchMode;
6
7
  alignment?: SearchAlignment;
7
8
  iconColor?: string;
8
9
  placeholder?: string;
10
+ t?: THookTypes;
9
11
  defaultValue?: string;
10
12
  value?: string;
11
13
  disabled?: boolean;
@@ -15,4 +17,6 @@ export interface SearchProps {
15
17
  onSubmit?: (value: string) => void;
16
18
  className?: string;
17
19
  animationDirection?: SearchAnimationDirection;
20
+ isMobile?: boolean;
21
+ expandedWidth?: string;
18
22
  }
@@ -1,4 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { TableProps } from './Table.types';
3
- declare const Table: <T extends Record<string, any>>({ columns, data, currentPage, totalItems, headerExtra, filterContent, actions, isMobile, itemsPerPage, loading, striped, showSearch, showManageColumns, tableKey, fetchData, queryResult, onPageChange, onItemsPerPageChange, onSearchChange, title, filterConfig, onFilterChange, rowActions, rowActionsLabel, t: tProp, }: Readonly<TableProps<T>>) => React.JSX.Element;
3
+ declare const Table: <T extends Record<string, any>>({ columns, data, currentPage, totalItems, headerExtra, filterContent, actions, isMobile, itemsPerPage, loading, striped, showSearch, showManageColumns, tableKey, fetchData, queryResult, onPageChange, onItemsPerPageChange, onSearchChange, title, filterConfig, onFilterChange, rowActions, rowActionsLabel, enableRowSelection, rowIdKey, onSelectionChange, t: tProp, }: Readonly<TableProps<T>>) => React.JSX.Element;
4
4
  export default Table;
@@ -20,3 +20,4 @@ export declare const WithFilter: Story;
20
20
  export declare const WithFilterAndActions: Story;
21
21
  export declare const WithFilterAndFetchData: Story;
22
22
  export declare const WithRowActions: Story;
23
+ export declare const WithRowSelection: Story;
@@ -47,6 +47,9 @@ interface BaseTableProps<T = any> {
47
47
  filterContent?: ReactNode;
48
48
  actions?: ReactNode;
49
49
  t?: THookTypes;
50
+ enableRowSelection?: boolean;
51
+ rowIdKey?: keyof T | string;
52
+ onSelectionChange?: (selectedRowIds: string[]) => void;
50
53
  filterConfig?: {
51
54
  items: FilterItem[];
52
55
  initialValues?: FilterSelectedValues;