@plenustech/design-system 0.2.0 → 0.2.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/dist/design-system.css +1 -1
- package/dist/plenus-design-system.cjs +2 -1
- package/dist/plenus-design-system.cjs.map +1 -1
- package/dist/plenus-design-system.es.js +3184 -3094
- package/dist/plenus-design-system.es.js.map +1 -1
- package/dist/types/components/data-display/Table/Table.d.ts +2 -2
- package/dist/types/components/forms/Checkbox/Checkbox.d.ts +3 -2
- package/dist/types/components/forms/ComboBox/ComboBox.d.ts +15 -4
- package/dist/types/components/forms/ComboBox/index.d.ts +1 -1
- package/dist/types/components/icons/icons.d.ts +2 -0
- package/dist/types/components/icons/index.d.ts +1 -1
- package/dist/types/components/navigation/Pagination/Pagination.d.ts +3 -1
- package/dist/types/components/overlays/Dialog/Dialog.d.ts +4 -1
- package/dist/types/components/overlays/Dialog/index.d.ts +1 -1
- package/dist/types/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -58,12 +58,12 @@ export interface TableColumnProps {
|
|
|
58
58
|
width?: string;
|
|
59
59
|
}
|
|
60
60
|
declare function TableColumn({ align, children, help, hideBelow, id, numeric, sortable, width }: TableColumnProps): import("react").JSX.Element;
|
|
61
|
-
export interface TableBodyProps<T> {
|
|
61
|
+
export interface TableBodyProps<T extends TableRowItem> {
|
|
62
62
|
children: (item: T) => ReactNode;
|
|
63
63
|
empty?: ReactNode;
|
|
64
64
|
items: readonly T[];
|
|
65
65
|
}
|
|
66
|
-
declare function TableBody<T>({ children, empty, items }: TableBodyProps<T>): import("react").JSX.Element;
|
|
66
|
+
declare function TableBody<T extends TableRowItem>({ children, empty, items }: TableBodyProps<T>): import("react").JSX.Element;
|
|
67
67
|
export interface TableRowProps {
|
|
68
68
|
children: ReactNode;
|
|
69
69
|
disabled?: boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef } from 'react';
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
2
|
export interface CheckboxProps extends Omit<ComponentPropsWithRef<'input'>, 'type' | 'size'> {
|
|
3
3
|
error?: string;
|
|
4
4
|
hint?: string;
|
|
5
5
|
indeterminate?: boolean;
|
|
6
|
-
label
|
|
6
|
+
/** Sem rotulo visivel, o nome vem de `aria-label` ou `aria-labelledby`. */
|
|
7
|
+
label?: ReactNode;
|
|
7
8
|
}
|
|
8
9
|
export declare function Checkbox({ 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, className, error, hint, id: providedId, indeterminate, label, ref, ...props }: CheckboxProps): import("react").JSX.Element;
|
|
@@ -6,8 +6,7 @@ export interface ComboBoxOption {
|
|
|
6
6
|
value: string;
|
|
7
7
|
}
|
|
8
8
|
/** As propriedades nativas vao ao campo de texto, que e o controle; o `className` soma ao do sistema. */
|
|
9
|
-
|
|
10
|
-
defaultValue?: string;
|
|
9
|
+
interface ComboBoxBaseProps extends Omit<ComponentPropsWithRef<'input'>, 'defaultValue' | 'name' | 'onChange' | 'size' | 'type' | 'value'> {
|
|
11
10
|
emptyMessage?: string;
|
|
12
11
|
error?: string;
|
|
13
12
|
hint?: string;
|
|
@@ -19,9 +18,21 @@ export interface ComboBoxProps extends Omit<ComponentPropsWithRef<'input'>, 'def
|
|
|
19
18
|
name?: string;
|
|
20
19
|
loading?: boolean;
|
|
21
20
|
onSearch?: (term: string) => void;
|
|
22
|
-
onValueChange?: (value: string) => void;
|
|
23
21
|
options: readonly ComboBoxOption[];
|
|
24
22
|
size?: ComboBoxSize;
|
|
23
|
+
}
|
|
24
|
+
export interface ComboBoxSingleProps extends ComboBoxBaseProps {
|
|
25
|
+
defaultValue?: string;
|
|
26
|
+
onValueChange?: (value: string) => void;
|
|
27
|
+
selectionMode?: 'single';
|
|
25
28
|
value?: string;
|
|
26
29
|
}
|
|
27
|
-
export
|
|
30
|
+
export interface ComboBoxMultipleProps extends ComboBoxBaseProps {
|
|
31
|
+
defaultValue?: readonly string[];
|
|
32
|
+
onValueChange?: (values: readonly string[]) => void;
|
|
33
|
+
selectionMode: 'multiple';
|
|
34
|
+
value?: readonly string[];
|
|
35
|
+
}
|
|
36
|
+
export type ComboBoxProps = ComboBoxSingleProps | ComboBoxMultipleProps;
|
|
37
|
+
export declare function ComboBox(allProps: ComboBoxProps): import("react").JSX.Element;
|
|
38
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { ComboBox } from './ComboBox.js';
|
|
2
|
-
export type {
|
|
2
|
+
export type { ComboBoxMultipleProps, ComboBoxOption, ComboBoxProps, ComboBoxSingleProps, ComboBoxSize, } from './ComboBox.js';
|
|
@@ -3,6 +3,7 @@ export declare function IconArrowDown(props: IconProps): import("react").JSX.Ele
|
|
|
3
3
|
export declare function IconArrowUp(props: IconProps): import("react").JSX.Element;
|
|
4
4
|
export declare function IconCalendar(props: IconProps): import("react").JSX.Element;
|
|
5
5
|
export declare function IconChevronDown(props: IconProps): import("react").JSX.Element;
|
|
6
|
+
export declare function IconChevronExpand(props: IconProps): import("react").JSX.Element;
|
|
6
7
|
export declare function IconChevronLeft(props: IconProps): import("react").JSX.Element;
|
|
7
8
|
export declare function IconChevronRight(props: IconProps): import("react").JSX.Element;
|
|
8
9
|
export declare function IconChevronUp(props: IconProps): import("react").JSX.Element;
|
|
@@ -10,3 +11,4 @@ export declare function IconClock(props: IconProps): import("react").JSX.Element
|
|
|
10
11
|
export declare function IconClose(props: IconProps): import("react").JSX.Element;
|
|
11
12
|
export declare function IconMinusCircle(props: IconProps): import("react").JSX.Element;
|
|
12
13
|
export declare function IconPlusCircle(props: IconProps): import("react").JSX.Element;
|
|
14
|
+
export declare function IconQuestionCircle(props: IconProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { IconProps } from './Icon.js';
|
|
2
|
-
export { IconArrowDown, IconArrowUp, IconCalendar, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClock, IconClose, IconMinusCircle, IconPlusCircle, } from './icons.js';
|
|
2
|
+
export { IconArrowDown, IconArrowUp, IconCalendar, IconChevronDown, IconChevronExpand, IconChevronLeft, IconChevronRight, IconChevronUp, IconClock, IconClose, IconMinusCircle, IconPlusCircle, IconQuestionCircle, } from './icons.js';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ComponentPropsWithRef } from 'react';
|
|
2
2
|
export interface PaginationProps extends ComponentPropsWithRef<'nav'> {
|
|
3
|
+
/** Suspende a troca de pagina, como enquanto a pagina pedida carrega. Os botoes continuam focaveis. */
|
|
4
|
+
disabled?: boolean;
|
|
3
5
|
label?: string;
|
|
4
6
|
onPageChange: (page: number) => void;
|
|
5
7
|
page: number;
|
|
@@ -7,7 +9,7 @@ export interface PaginationProps extends ComponentPropsWithRef<'nav'> {
|
|
|
7
9
|
/** Quantidade de paginas mostradas de cada lado da atual. */
|
|
8
10
|
siblings?: number;
|
|
9
11
|
}
|
|
10
|
-
export declare function Pagination({ className, label, onPageChange, page, pageCount, siblings, ...props }: PaginationProps): import("react").JSX.Element | null;
|
|
12
|
+
export declare function Pagination({ className, disabled, label, onPageChange, page, pageCount, siblings, ...props }: PaginationProps): import("react").JSX.Element | null;
|
|
11
13
|
/**
|
|
12
14
|
* Primeira e ultima pagina sempre visiveis; null representa a reticencia. A faixa tem sempre as mesmas vagas: perto
|
|
13
15
|
* da ponta a janela encosta nela em vez de encolher, e reticencia nunca esconde uma pagina so.
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
2
|
export type DialogSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export type DialogRole = 'dialog' | 'alertdialog';
|
|
3
4
|
/** As propriedades nativas vao ao elemento do dialogo; o `className` soma ao do sistema. */
|
|
4
|
-
export interface DialogProps extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'title'> {
|
|
5
|
+
export interface DialogProps extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'role' | 'title'> {
|
|
5
6
|
children?: ReactNode;
|
|
6
7
|
description?: string;
|
|
7
8
|
dismissable?: boolean;
|
|
8
9
|
footer?: ReactNode;
|
|
9
10
|
onClose: () => void;
|
|
10
11
|
open: boolean;
|
|
12
|
+
/** `alertdialog` para a confirmacao que interrompe e exige resposta, como a de uma acao destrutiva. */
|
|
13
|
+
role?: DialogRole;
|
|
11
14
|
size?: DialogSize;
|
|
12
15
|
title: string;
|
|
13
16
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Dialog } from './Dialog.js';
|
|
2
|
-
export type { DialogProps, DialogSize } from './Dialog.js';
|
|
2
|
+
export type { DialogProps, DialogRole, DialogSize } from './Dialog.js';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { IconArrowDown, IconArrowUp, IconCalendar, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClock, IconClose, IconMinusCircle, IconPlusCircle, } from './components/icons/index.js';
|
|
1
|
+
export { IconArrowDown, IconArrowUp, IconCalendar, IconChevronDown, IconChevronExpand, IconChevronLeft, IconChevronRight, IconChevronUp, IconClock, IconClose, IconMinusCircle, IconPlusCircle, IconQuestionCircle, } from './components/icons/index.js';
|
|
2
2
|
export type { IconProps } from './components/icons/index.js';
|
|
3
3
|
export { Button } from './components/actions/Button/index.js';
|
|
4
4
|
export type { ButtonProps, ButtonSize, ButtonVariant } from './components/actions/Button/index.js';
|
|
@@ -41,13 +41,13 @@ export type { AccordionProps, AccordionItem, AccordionIconPosition } from './com
|
|
|
41
41
|
export { Select } from './components/forms/Select/index.js';
|
|
42
42
|
export type { SelectProps, SelectOption, SelectSize } from './components/forms/Select/index.js';
|
|
43
43
|
export { ComboBox } from './components/forms/ComboBox/index.js';
|
|
44
|
-
export type {
|
|
44
|
+
export type { ComboBoxMultipleProps, ComboBoxOption, ComboBoxProps, ComboBoxSingleProps, ComboBoxSize, } from './components/forms/ComboBox/index.js';
|
|
45
45
|
export { Menu } from './components/overlays/Menu/index.js';
|
|
46
46
|
export type { MenuProps, MenuItem } from './components/overlays/Menu/index.js';
|
|
47
47
|
export { Tooltip } from './components/overlays/Tooltip/index.js';
|
|
48
48
|
export type { TooltipProps, TooltipPlacement } from './components/overlays/Tooltip/index.js';
|
|
49
49
|
export { Dialog } from './components/overlays/Dialog/index.js';
|
|
50
|
-
export type { DialogProps, DialogSize } from './components/overlays/Dialog/index.js';
|
|
50
|
+
export type { DialogProps, DialogRole, DialogSize } from './components/overlays/Dialog/index.js';
|
|
51
51
|
export { Badge } from './components/data-display/Badge/index.js';
|
|
52
52
|
export type { BadgeProps, BadgeTone } from './components/data-display/Badge/index.js';
|
|
53
53
|
export { Avatar } from './components/data-display/Avatar/index.js';
|