@plenustech/design-system 0.1.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.
Files changed (151) hide show
  1. package/README.md +209 -0
  2. package/dist/design-system.css +1 -0
  3. package/dist/folha.d.ts +7 -0
  4. package/dist/plenus-design-system.cjs +2 -0
  5. package/dist/plenus-design-system.cjs.map +1 -0
  6. package/dist/plenus-design-system.es.js +5853 -0
  7. package/dist/plenus-design-system.es.js.map +1 -0
  8. package/dist/reset.css +79 -0
  9. package/dist/types/components/actions/Button/Button.d.ts +9 -0
  10. package/dist/types/components/actions/Button/index.d.ts +2 -0
  11. package/dist/types/components/charts/ChartArea/ChartArea.d.ts +35 -0
  12. package/dist/types/components/charts/ChartArea/index.d.ts +2 -0
  13. package/dist/types/components/charts/ChartBar/ChartBar.d.ts +31 -0
  14. package/dist/types/components/charts/ChartBar/index.d.ts +2 -0
  15. package/dist/types/components/charts/ChartCombo/ChartCombo.d.ts +44 -0
  16. package/dist/types/components/charts/ChartCombo/index.d.ts +2 -0
  17. package/dist/types/components/charts/ChartDonut/ChartDonut.d.ts +31 -0
  18. package/dist/types/components/charts/ChartDonut/index.d.ts +2 -0
  19. package/dist/types/components/charts/ChartLine/ChartLine.d.ts +34 -0
  20. package/dist/types/components/charts/ChartLine/index.d.ts +2 -0
  21. package/dist/types/components/charts/ChartPie/ChartPie.d.ts +27 -0
  22. package/dist/types/components/charts/ChartPie/index.d.ts +2 -0
  23. package/dist/types/components/charts/ChartRadial/ChartRadial.d.ts +32 -0
  24. package/dist/types/components/charts/ChartRadial/index.d.ts +2 -0
  25. package/dist/types/components/charts/ChartSankey/ChartSankey.d.ts +41 -0
  26. package/dist/types/components/charts/ChartSankey/index.d.ts +2 -0
  27. package/dist/types/components/charts/ChartScatter/ChartScatter.d.ts +37 -0
  28. package/dist/types/components/charts/ChartScatter/index.d.ts +2 -0
  29. package/dist/types/components/charts/ChartSunburst/ChartSunburst.d.ts +27 -0
  30. package/dist/types/components/charts/ChartSunburst/index.d.ts +2 -0
  31. package/dist/types/components/charts/ChartTooltip/ChartTooltip.d.ts +41 -0
  32. package/dist/types/components/charts/ChartTooltip/index.d.ts +2 -0
  33. package/dist/types/components/charts/ChartTreemap/ChartTreemap.d.ts +30 -0
  34. package/dist/types/components/charts/ChartTreemap/index.d.ts +2 -0
  35. package/dist/types/components/charts/ChartWaterfall/ChartWaterfall.d.ts +24 -0
  36. package/dist/types/components/charts/ChartWaterfall/index.d.ts +2 -0
  37. package/dist/types/components/charts/core/Axis.d.ts +18 -0
  38. package/dist/types/components/charts/core/BandCursor.d.ts +15 -0
  39. package/dist/types/components/charts/core/CartesianFrame.d.ts +41 -0
  40. package/dist/types/components/charts/core/ChartFrame.d.ts +31 -0
  41. package/dist/types/components/charts/core/ChartLegend.d.ts +24 -0
  42. package/dist/types/components/charts/core/Grid.d.ts +12 -0
  43. package/dist/types/components/charts/core/arcs.d.ts +27 -0
  44. package/dist/types/components/charts/core/cartesianLayout.d.ts +70 -0
  45. package/dist/types/components/charts/core/centerText.d.ts +14 -0
  46. package/dist/types/components/charts/core/index.d.ts +36 -0
  47. package/dist/types/components/charts/core/measureText.d.ts +25 -0
  48. package/dist/types/components/charts/core/shapes.d.ts +26 -0
  49. package/dist/types/components/charts/core/slices.d.ts +18 -0
  50. package/dist/types/components/charts/core/spacing.d.ts +39 -0
  51. package/dist/types/components/charts/core/useChartMetrics.d.ts +19 -0
  52. package/dist/types/components/charts/core/useHoveredBand.d.ts +9 -0
  53. package/dist/types/components/charts/core/useSeriesToggle.d.ts +16 -0
  54. package/dist/types/components/charts/core/useSliceRing.d.ts +31 -0
  55. package/dist/types/components/charts/core/useTweenedNumbers.d.ts +14 -0
  56. package/dist/types/components/charts/palette/index.d.ts +3 -0
  57. package/dist/types/components/charts/palette/palette.d.ts +17 -0
  58. package/dist/types/components/charts/palette/seriesColor.d.ts +24 -0
  59. package/dist/types/components/charts/scales/index.d.ts +2 -0
  60. package/dist/types/components/charts/scales/scales.d.ts +57 -0
  61. package/dist/types/components/data-display/Accordion/Accordion.d.ts +20 -0
  62. package/dist/types/components/data-display/Accordion/index.d.ts +2 -0
  63. package/dist/types/components/data-display/Avatar/Avatar.d.ts +8 -0
  64. package/dist/types/components/data-display/Avatar/index.d.ts +2 -0
  65. package/dist/types/components/data-display/Badge/Badge.d.ts +8 -0
  66. package/dist/types/components/data-display/Badge/index.d.ts +2 -0
  67. package/dist/types/components/data-display/Card/Card.d.ts +29 -0
  68. package/dist/types/components/data-display/Card/index.d.ts +2 -0
  69. package/dist/types/components/data-display/List/List.d.ts +40 -0
  70. package/dist/types/components/data-display/List/ListingOptions.d.ts +20 -0
  71. package/dist/types/components/data-display/List/index.d.ts +2 -0
  72. package/dist/types/components/data-display/List/useListing.d.ts +35 -0
  73. package/dist/types/components/data-display/List/useVirtualWindow.d.ts +25 -0
  74. package/dist/types/components/data-display/Table/Table.d.ts +78 -0
  75. package/dist/types/components/data-display/Table/index.d.ts +2 -0
  76. package/dist/types/components/feedback/Alert/Alert.d.ts +8 -0
  77. package/dist/types/components/feedback/Alert/index.d.ts +2 -0
  78. package/dist/types/components/feedback/Progress/Progress.d.ts +10 -0
  79. package/dist/types/components/feedback/Progress/index.d.ts +2 -0
  80. package/dist/types/components/feedback/Spinner/Spinner.d.ts +7 -0
  81. package/dist/types/components/feedback/Spinner/index.d.ts +2 -0
  82. package/dist/types/components/forms/Checkbox/Checkbox.d.ts +8 -0
  83. package/dist/types/components/forms/Checkbox/index.d.ts +2 -0
  84. package/dist/types/components/forms/ComboBox/ComboBox.d.ts +29 -0
  85. package/dist/types/components/forms/ComboBox/index.d.ts +2 -0
  86. package/dist/types/components/forms/DatePicker/Calendar.d.ts +9 -0
  87. package/dist/types/components/forms/DatePicker/DatePicker.d.ts +29 -0
  88. package/dist/types/components/forms/DatePicker/index.d.ts +2 -0
  89. package/dist/types/components/forms/DateTimePicker/DateTimePicker.d.ts +33 -0
  90. package/dist/types/components/forms/DateTimePicker/index.d.ts +2 -0
  91. package/dist/types/components/forms/Field/Field.d.ts +19 -0
  92. package/dist/types/components/forms/Field/index.d.ts +2 -0
  93. package/dist/types/components/forms/InputCurrency/InputCurrency.d.ts +9 -0
  94. package/dist/types/components/forms/InputCurrency/index.d.ts +2 -0
  95. package/dist/types/components/forms/InputNumber/InputNumber.d.ts +8 -0
  96. package/dist/types/components/forms/InputNumber/index.d.ts +2 -0
  97. package/dist/types/components/forms/InputPassword/InputPassword.d.ts +13 -0
  98. package/dist/types/components/forms/InputPassword/index.d.ts +2 -0
  99. package/dist/types/components/forms/InputText/InputText.d.ts +10 -0
  100. package/dist/types/components/forms/InputText/index.d.ts +2 -0
  101. package/dist/types/components/forms/Label/Label.d.ts +5 -0
  102. package/dist/types/components/forms/Label/index.d.ts +2 -0
  103. package/dist/types/components/forms/RadioGroup/Radio.d.ts +6 -0
  104. package/dist/types/components/forms/RadioGroup/RadioGroup.d.ts +25 -0
  105. package/dist/types/components/forms/RadioGroup/index.d.ts +4 -0
  106. package/dist/types/components/forms/Select/Select.d.ts +26 -0
  107. package/dist/types/components/forms/Select/index.d.ts +2 -0
  108. package/dist/types/components/forms/Switch/Switch.d.ts +7 -0
  109. package/dist/types/components/forms/Switch/index.d.ts +2 -0
  110. package/dist/types/components/forms/Textarea/Textarea.d.ts +10 -0
  111. package/dist/types/components/forms/Textarea/index.d.ts +2 -0
  112. package/dist/types/components/forms/TimePicker/TimePicker.d.ts +28 -0
  113. package/dist/types/components/forms/TimePicker/TimeSlots.d.ts +22 -0
  114. package/dist/types/components/forms/TimePicker/index.d.ts +2 -0
  115. package/dist/types/components/icons/Icon.d.ts +23 -0
  116. package/dist/types/components/icons/icons.d.ts +12 -0
  117. package/dist/types/components/icons/index.d.ts +2 -0
  118. package/dist/types/components/navigation/Breadcrumb/Breadcrumb.d.ts +17 -0
  119. package/dist/types/components/navigation/Breadcrumb/index.d.ts +2 -0
  120. package/dist/types/components/navigation/Pagination/Pagination.d.ts +11 -0
  121. package/dist/types/components/navigation/Pagination/index.d.ts +2 -0
  122. package/dist/types/components/navigation/Tabs/Tabs.d.ts +17 -0
  123. package/dist/types/components/navigation/Tabs/index.d.ts +2 -0
  124. package/dist/types/components/overlays/Dialog/Dialog.d.ts +13 -0
  125. package/dist/types/components/overlays/Dialog/index.d.ts +2 -0
  126. package/dist/types/components/overlays/Menu/Menu.d.ts +13 -0
  127. package/dist/types/components/overlays/Menu/index.d.ts +2 -0
  128. package/dist/types/components/overlays/Popover/Popover.d.ts +13 -0
  129. package/dist/types/components/overlays/Popover/index.d.ts +2 -0
  130. package/dist/types/components/overlays/Tooltip/Tooltip.d.ts +9 -0
  131. package/dist/types/components/overlays/Tooltip/index.d.ts +2 -0
  132. package/dist/types/hooks/useCalendar/calendar.d.ts +16 -0
  133. package/dist/types/hooks/useCalendar/index.d.ts +3 -0
  134. package/dist/types/hooks/useCalendar/useCalendar.d.ts +21 -0
  135. package/dist/types/hooks/useCharacterCount/index.d.ts +1 -0
  136. package/dist/types/hooks/useCharacterCount/useCharacterCount.d.ts +7 -0
  137. package/dist/types/hooks/useFormReset.d.ts +6 -0
  138. package/dist/types/hooks/useSelection/index.d.ts +3 -0
  139. package/dist/types/hooks/useSelection/selection.d.ts +25 -0
  140. package/dist/types/hooks/useSelection/useSelection.d.ts +26 -0
  141. package/dist/types/index.d.ts +97 -0
  142. package/dist/types/utils/formatters/formatarData.d.ts +10 -0
  143. package/dist/types/utils/formatters/formatarEntradaData.d.ts +5 -0
  144. package/dist/types/utils/formatters/formatarEntradaDecimal.d.ts +1 -0
  145. package/dist/types/utils/formatters/formatarEntradaMonetaria.d.ts +1 -0
  146. package/dist/types/utils/formatters/formatarNumero.d.ts +27 -0
  147. package/dist/types/utils/formatters/index.d.ts +7 -0
  148. package/dist/types/utils/mergeRefs.d.ts +7 -0
  149. package/dist/types/utils/textSearch/index.d.ts +1 -0
  150. package/dist/types/utils/textSearch/textSearch.d.ts +2 -0
  151. package/package.json +86 -0
@@ -0,0 +1,29 @@
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
+ export type CardHeadingLevel = 2 | 3 | 4 | 5 | 6;
3
+ export interface CardProps extends ComponentPropsWithRef<'section'> {
4
+ children: ReactNode;
5
+ }
6
+ export declare function Card({ children, className, ...props }: CardProps): import("react").JSX.Element;
7
+ export declare namespace Card {
8
+ var Header: typeof CardHeader;
9
+ var Body: typeof CardBody;
10
+ var Footer: typeof CardFooter;
11
+ }
12
+ export interface CardHeaderProps {
13
+ badge?: ReactNode;
14
+ description?: ReactNode;
15
+ headingLevel?: CardHeadingLevel;
16
+ title: string;
17
+ trailing?: ReactNode;
18
+ }
19
+ declare function CardHeader({ badge, description, headingLevel, title, trailing }: CardHeaderProps): import("react").JSX.Element;
20
+ export interface CardBodyProps {
21
+ children: ReactNode;
22
+ flush?: boolean;
23
+ }
24
+ declare function CardBody({ children, flush }: CardBodyProps): import("react").JSX.Element;
25
+ export interface CardFooterProps {
26
+ children: ReactNode;
27
+ }
28
+ declare function CardFooter({ children }: CardFooterProps): import("react").JSX.Element;
29
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Card } from './Card.js';
2
+ export type { CardBodyProps, CardFooterProps, CardHeaderProps, CardHeadingLevel, CardProps } from './Card.js';
@@ -0,0 +1,40 @@
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
+ import { type ListingItem, type ListingSelectionMode } from './useListing.js';
3
+ export type ListSelectionMode = ListingSelectionMode;
4
+ export type ListItem = ListingItem;
5
+ export interface ListProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue'> {
6
+ children: ReactNode;
7
+ defaultValue?: readonly ListItem[];
8
+ items: readonly ListItem[];
9
+ label?: string;
10
+ loading?: boolean;
11
+ loadingMessage?: string;
12
+ onSearch?: (term: string) => void;
13
+ onSelectionChange?: (items: readonly ListItem[]) => void;
14
+ selectionMode?: ListSelectionMode;
15
+ value?: readonly ListItem[];
16
+ }
17
+ export declare function List({ children, className, defaultValue, items, label, loading, loadingMessage, onSearch, onSelectionChange, selectionMode, value, ...props }: ListProps): import("react").JSX.Element;
18
+ export declare namespace List {
19
+ var Search: typeof ListSearch;
20
+ var SelectAll: typeof ListSelectAll;
21
+ var Options: typeof ListOptions;
22
+ var Empty: typeof ListEmpty;
23
+ }
24
+ export interface ListSearchProps {
25
+ placeholder?: string;
26
+ }
27
+ declare function ListSearch({ placeholder }: ListSearchProps): import("react").JSX.Element;
28
+ export interface ListOptionsProps {
29
+ height?: number;
30
+ }
31
+ declare function ListOptions({ height }: ListOptionsProps): import("react").JSX.Element;
32
+ export interface ListSelectAllProps {
33
+ label?: string;
34
+ }
35
+ declare function ListSelectAll({ label }: ListSelectAllProps): import("react").JSX.Element | null;
36
+ export interface ListEmptyProps {
37
+ children: ReactNode;
38
+ }
39
+ declare function ListEmpty({ children }: ListEmptyProps): import("react").JSX.Element | null;
40
+ export {};
@@ -0,0 +1,20 @@
1
+ import { type CSSProperties, type KeyboardEvent, type ReactNode, type RefObject } from 'react';
2
+ import type { Listing, ListingItem } from './useListing.js';
3
+ export interface ListingOptionsProps {
4
+ baseId: string;
5
+ className?: string;
6
+ elementRef?: RefObject<HTMLElement | null>;
7
+ empty?: ReactNode;
8
+ height?: number;
9
+ label?: string;
10
+ listing: Listing;
11
+ loading?: boolean;
12
+ loadingMessage?: string;
13
+ holdsFocus?: boolean;
14
+ onKeyDown?: (event: KeyboardEvent<HTMLElement>) => void;
15
+ onSelect?: (item: ListingItem) => void;
16
+ style?: CSSProperties;
17
+ tabIndex?: number;
18
+ }
19
+ export declare function optionId(baseId: string, index: number): string;
20
+ export declare function ListingOptions({ baseId, className, elementRef, empty, height, holdsFocus, label, listing, loading, loadingMessage, onKeyDown, onSelect, style, tabIndex, }: ListingOptionsProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { List } from './List.js';
2
+ export type { ListEmptyProps, ListItem, ListOptionsProps, ListProps, ListSearchProps, ListSelectAllProps, ListSelectionMode } from './List.js';
@@ -0,0 +1,35 @@
1
+ import { type KeyboardEvent } from 'react';
2
+ import { type SelectionStatus } from '../../../hooks/useSelection/index.js';
3
+ export type ListingSelectionMode = 'none' | 'single' | 'multiple';
4
+ export interface ListingItem {
5
+ disabled?: boolean;
6
+ label: string;
7
+ value: string;
8
+ }
9
+ export interface UseListingOptions {
10
+ defaultValue?: readonly ListingItem[];
11
+ items: readonly ListingItem[];
12
+ onSearch?: (term: string) => void;
13
+ onSelectionChange?: (items: readonly ListingItem[]) => void;
14
+ selectionMode?: ListingSelectionMode;
15
+ value?: readonly ListingItem[];
16
+ }
17
+ export interface Listing {
18
+ detached: readonly ListingItem[];
19
+ focus: (value?: string) => void;
20
+ focusFirst: () => void;
21
+ focusLast: () => void;
22
+ focusedKey?: string;
23
+ handleKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
24
+ isSelected: (value: string) => boolean;
25
+ filter: (term: string) => void;
26
+ typeahead: (character: string) => void;
27
+ select: (item: ListingItem, extend?: boolean) => void;
28
+ selected: readonly ListingItem[];
29
+ selectionMode: ListingSelectionMode;
30
+ status: SelectionStatus;
31
+ toggleAll: () => void;
32
+ term: string;
33
+ visible: readonly ListingItem[];
34
+ }
35
+ export declare function useListing({ defaultValue, items, onSearch, onSelectionChange, selectionMode, value, }: UseListingOptions): Listing;
@@ -0,0 +1,25 @@
1
+ export declare function useVirtualWindow(total: number, height?: number): {
2
+ active: false;
3
+ attachScroll: (node: HTMLElement | null) => void;
4
+ measureItem: (node: HTMLElement | null) => void;
5
+ onScroll: () => void;
6
+ padding: {
7
+ before: number;
8
+ after: number;
9
+ };
10
+ scrollToIndex: (index: number) => void;
11
+ start: number;
12
+ end: number;
13
+ } | {
14
+ active: true;
15
+ attachScroll: (node: HTMLElement | null) => void;
16
+ measureItem: (node: HTMLElement | null) => void;
17
+ onScroll: () => void;
18
+ padding: {
19
+ before: number;
20
+ after: number;
21
+ };
22
+ scrollToIndex: (index: number) => void;
23
+ start: number;
24
+ end: number;
25
+ };
@@ -0,0 +1,78 @@
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
+ export type TableSize = 'sm' | 'md';
3
+ export type TableAlign = 'start' | 'center' | 'end';
4
+ export type TableBreakpoint = 'sm' | 'md' | 'lg';
5
+ export type SortDirection = 'ascending' | 'descending';
6
+ export type TableSelectionMode = 'none' | 'single' | 'multiple';
7
+ export type TableSelectionControl = 'checkbox' | 'radio' | 'toggle';
8
+ export interface TableRowItem {
9
+ disabled?: boolean;
10
+ id: string;
11
+ }
12
+ export interface TableSort {
13
+ column: string;
14
+ direction: SortDirection;
15
+ }
16
+ export interface TableProps extends ComponentPropsWithRef<'div'> {
17
+ children: ReactNode;
18
+ defaultSort?: TableSort;
19
+ divider?: boolean;
20
+ label?: string;
21
+ loading?: boolean;
22
+ loadingMessage?: string;
23
+ highlightSelectedRow?: boolean;
24
+ onSelectionChange?: (ids: readonly string[]) => void;
25
+ onSortChange?: (sort: TableSort) => void;
26
+ rows?: readonly TableRowItem[];
27
+ selectedIds?: readonly string[];
28
+ selectionControl?: TableSelectionControl;
29
+ selectionMode?: TableSelectionMode;
30
+ size?: TableSize;
31
+ sort?: TableSort;
32
+ stickyHeader?: boolean;
33
+ striped?: boolean;
34
+ }
35
+ export declare function Table({ children, className, defaultSort, divider, highlightSelectedRow, label, loading, loadingMessage, onSelectionChange, onSortChange, rows, selectedIds, selectionControl, selectionMode, size, sort, stickyHeader, striped, ...props }: TableProps): import("react").JSX.Element;
36
+ export declare namespace Table {
37
+ var Header: typeof TableHeader;
38
+ var Column: typeof TableColumn;
39
+ var Body: typeof TableBody;
40
+ var Row: typeof TableRow;
41
+ var Cell: typeof TableCell;
42
+ }
43
+ export interface TableHeaderProps {
44
+ children: ReactNode;
45
+ }
46
+ declare function TableHeader({ children }: TableHeaderProps): import("react").JSX.Element;
47
+ export interface TableColumnProps {
48
+ align?: TableAlign;
49
+ children: ReactNode;
50
+ help?: string;
51
+ hideBelow?: TableBreakpoint;
52
+ id: string;
53
+ numeric?: boolean;
54
+ sortable?: boolean;
55
+ width?: string;
56
+ }
57
+ declare function TableColumn({ align, children, help, hideBelow, id, numeric, sortable, width }: TableColumnProps): import("react").JSX.Element;
58
+ export interface TableBodyProps<T> {
59
+ children: (item: T) => ReactNode;
60
+ empty?: ReactNode;
61
+ items: readonly T[];
62
+ }
63
+ declare function TableBody<T>({ children, empty, items }: TableBodyProps<T>): import("react").JSX.Element;
64
+ export interface TableRowProps {
65
+ children: ReactNode;
66
+ disabled?: boolean;
67
+ id: string;
68
+ label?: string;
69
+ }
70
+ declare function TableRow({ children, disabled, id, label }: TableRowProps): import("react").JSX.Element;
71
+ export interface TableCellProps {
72
+ align?: TableAlign;
73
+ children?: ReactNode;
74
+ hideBelow?: TableBreakpoint;
75
+ numeric?: boolean;
76
+ }
77
+ declare function TableCell({ align, children, hideBelow, numeric }: TableCellProps): import("react").JSX.Element;
78
+ export {};
@@ -0,0 +1,2 @@
1
+ export { Table } from './Table.js';
2
+ export type { SortDirection, TableAlign, TableBodyProps, TableBreakpoint, TableCellProps, TableColumnProps, TableHeaderProps, TableProps, TableRowItem, TableRowProps, TableSelectionControl, TableSelectionMode, TableSize, TableSort, } from './Table.js';
@@ -0,0 +1,8 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export type AlertTone = 'info' | 'success' | 'warning' | 'danger';
3
+ export interface AlertProps extends HTMLAttributes<HTMLDivElement> {
4
+ tone?: AlertTone;
5
+ title?: string;
6
+ children?: ReactNode;
7
+ }
8
+ export declare function Alert({ children, className, title, tone, ...props }: AlertProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Alert } from './Alert.js';
2
+ export type { AlertProps, AlertTone } from './Alert.js';
@@ -0,0 +1,10 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export type ProgressSize = 'sm' | 'md';
3
+ export interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
4
+ label: string;
5
+ max?: number;
6
+ showValue?: boolean;
7
+ size?: ProgressSize;
8
+ value?: number;
9
+ }
10
+ export declare function Progress({ className, label, max, showValue, size, value, ...props }: ProgressProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Progress } from './Progress.js';
2
+ export type { ProgressProps, ProgressSize } from './Progress.js';
@@ -0,0 +1,7 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export type SpinnerSize = 'sm' | 'md' | 'lg';
3
+ export interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
4
+ size?: SpinnerSize;
5
+ label?: string;
6
+ }
7
+ export declare function Spinner({ className, label, size, ...props }: SpinnerProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Spinner } from './Spinner.js';
2
+ export type { SpinnerProps, SpinnerSize } from './Spinner.js';
@@ -0,0 +1,8 @@
1
+ import { type ComponentPropsWithRef } from 'react';
2
+ export interface CheckboxProps extends Omit<ComponentPropsWithRef<'input'>, 'type' | 'size'> {
3
+ error?: string;
4
+ hint?: string;
5
+ indeterminate?: boolean;
6
+ label: string;
7
+ }
8
+ export declare function Checkbox({ 'aria-describedby': ariaDescribedBy, className, error, hint, id: providedId, indeterminate, label, ref, ...props }: CheckboxProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Checkbox } from './Checkbox.js';
2
+ export type { CheckboxProps } from './Checkbox.js';
@@ -0,0 +1,29 @@
1
+ export type ComboBoxSize = 'sm' | 'md';
2
+ export interface ComboBoxOption {
3
+ disabled?: boolean;
4
+ label: string;
5
+ value: string;
6
+ }
7
+ export interface ComboBoxProps {
8
+ defaultValue?: string;
9
+ disabled?: boolean;
10
+ emptyMessage?: string;
11
+ error?: string;
12
+ hint?: string;
13
+ id?: string;
14
+ label?: string;
15
+ /**
16
+ * Nome do campo no formulario. Com ele, um input oculto carrega o valor para
17
+ * o `FormData`: sem controle nativo por baixo, o envio ignorava o campo.
18
+ */
19
+ name?: string;
20
+ loading?: boolean;
21
+ onSearch?: (term: string) => void;
22
+ onValueChange?: (value: string) => void;
23
+ options: readonly ComboBoxOption[];
24
+ placeholder?: string;
25
+ required?: boolean;
26
+ size?: ComboBoxSize;
27
+ value?: string;
28
+ }
29
+ export declare function ComboBox({ defaultValue, name, disabled, emptyMessage, error, hint, id: providedId, label, loading, onSearch, onValueChange, options, placeholder, required, size, value, }: ComboBoxProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ComboBox } from './ComboBox.js';
2
+ export type { ComboBoxProps, ComboBoxOption, ComboBoxSize } from './ComboBox.js';
@@ -0,0 +1,9 @@
1
+ import { type CalendarDate } from '@internationalized/date';
2
+ import { type CalendarLimits } from '../../../hooks/useCalendar/index.js';
3
+ export interface CalendarProps extends CalendarLimits {
4
+ autoFocus?: boolean;
5
+ locale?: string;
6
+ onSelect: (date: CalendarDate) => void;
7
+ value?: CalendarDate;
8
+ }
9
+ export declare function Calendar({ autoFocus, locale, onSelect, value, ...limits }: CalendarProps): import("react").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { type CalendarDate } from '@internationalized/date';
2
+ export type DatePickerSize = 'sm' | 'md';
3
+ export interface DatePickerProps {
4
+ defaultValue?: CalendarDate;
5
+ disabled?: boolean;
6
+ error?: string;
7
+ hint?: string;
8
+ id?: string;
9
+ isDateUnavailable?: (date: CalendarDate) => boolean;
10
+ label?: string;
11
+ /**
12
+ * Nome do campo no formulario. Com ele, um input oculto carrega o valor para
13
+ * o `FormData`: sem controle nativo por baixo, o envio ignorava o campo.
14
+ */
15
+ name?: string;
16
+ locale?: string;
17
+ max?: CalendarDate;
18
+ min?: CalendarDate;
19
+ onValueChange?: (value?: CalendarDate) => void;
20
+ placeholder?: string;
21
+ required?: boolean;
22
+ size?: DatePickerSize;
23
+ /**
24
+ * `null` e "controlado e vazio": devolver a propriedade a `undefined` nao
25
+ * limpa o campo, porque ali ele volta a ser nao controlado.
26
+ */
27
+ value?: CalendarDate | null;
28
+ }
29
+ export declare function DatePicker({ defaultValue, name, disabled, error, hint, id: providedId, isDateUnavailable, label, locale, max, min, onValueChange, placeholder, required, size, value, }: DatePickerProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { DatePicker } from './DatePicker.js';
2
+ export type { DatePickerProps, DatePickerSize } from './DatePicker.js';
@@ -0,0 +1,33 @@
1
+ import { CalendarDate, CalendarDateTime } from '@internationalized/date';
2
+ export type DateTimePickerSize = 'sm' | 'md';
3
+ export interface DateTimePickerProps {
4
+ defaultValue?: CalendarDateTime;
5
+ disabled?: boolean;
6
+ error?: string;
7
+ hint?: string;
8
+ id?: string;
9
+ isDateUnavailable?: (date: CalendarDate) => boolean;
10
+ label?: string;
11
+ /**
12
+ * Nome do campo no formulario. Com ele, um input oculto carrega o valor para
13
+ * o `FormData`: sem controle nativo por baixo, o envio ignorava o campo.
14
+ */
15
+ name?: string;
16
+ locale?: string;
17
+ max?: CalendarDate;
18
+ min?: CalendarDate;
19
+ step?: number;
20
+ onValueChange?: (value?: CalendarDateTime) => void;
21
+ placeholder?: string;
22
+ required?: boolean;
23
+ size?: DateTimePickerSize;
24
+ /**
25
+ * `null` e "controlado e vazio": devolver a propriedade a `undefined` nao
26
+ * limpa o campo, porque ali ele volta a ser nao controlado.
27
+ */
28
+ value?: CalendarDateTime | null;
29
+ }
30
+ /** Aplica a mascara dia/mes/ano hora:minuto conforme o usuario digita. */
31
+ export declare function formatarEntradaDataHora(valor: string): string;
32
+ export declare function lerEntradaDataHora(valor: string): CalendarDateTime | undefined;
33
+ export declare function DateTimePicker({ defaultValue, name, disabled, error, hint, id: providedId, isDateUnavailable, label, locale, max, min, step, onValueChange, placeholder, required, size, value, }: DateTimePickerProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { DateTimePicker } from './DateTimePicker.js';
2
+ export type { DateTimePickerProps, DateTimePickerSize } from './DateTimePicker.js';
@@ -0,0 +1,19 @@
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
+ export interface FieldWiring {
3
+ id: string;
4
+ describedBy: string | undefined;
5
+ invalid: boolean;
6
+ }
7
+ export interface FieldProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
8
+ 'aria-describedby'?: string;
9
+ characterCount?: number;
10
+ children: (wiring: FieldWiring) => ReactNode;
11
+ error?: string;
12
+ hint?: string;
13
+ id?: string;
14
+ label?: string;
15
+ maxLength?: number;
16
+ required?: boolean;
17
+ showCharacterCount?: boolean;
18
+ }
19
+ export declare function Field({ 'aria-describedby': ariaDescribedBy, className, characterCount, children, error, hint, id: providedId, label, maxLength, required, showCharacterCount, ...props }: FieldProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Field } from './Field.js';
2
+ export type { FieldProps, FieldWiring } from './Field.js';
@@ -0,0 +1,9 @@
1
+ import { type InputTextProps } from '../InputText/index.js';
2
+ export interface InputCurrencyProps extends Omit<InputTextProps, 'defaultValue' | 'onChange' | 'showCharacterCount' | 'type' | 'value'> {
3
+ currency?: string;
4
+ defaultValue?: string | number;
5
+ decimalScale?: number;
6
+ onValueChange?: (value: string) => void;
7
+ value?: string | number;
8
+ }
9
+ export declare function InputCurrency({ currency, defaultValue, decimalScale, onBlur, onFocus, onValueChange, value, ...props }: InputCurrencyProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { InputCurrency } from './InputCurrency.js';
2
+ export type { InputCurrencyProps } from './InputCurrency.js';
@@ -0,0 +1,8 @@
1
+ import { type InputTextProps } from '../InputText/index.js';
2
+ export interface InputNumberProps extends Omit<InputTextProps, 'defaultValue' | 'onChange' | 'showCharacterCount' | 'type' | 'value'> {
3
+ decimalScale?: number;
4
+ defaultValue?: string | number;
5
+ onValueChange?: (value: string) => void;
6
+ value?: string | number;
7
+ }
8
+ export declare function InputNumber({ decimalScale, defaultValue, onKeyDown, onValueChange, value, ...props }: InputNumberProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { InputNumber } from './InputNumber.js';
2
+ export type { InputNumberProps } from './InputNumber.js';
@@ -0,0 +1,13 @@
1
+ import { type ComponentPropsWithRef } from 'react';
2
+ export interface InputPasswordProps extends Omit<ComponentPropsWithRef<'input'>, 'type' | 'size'> {
3
+ error?: string;
4
+ hint?: string;
5
+ label?: string;
6
+ allowCopy?: boolean;
7
+ onValidationChange?: (message?: string) => void;
8
+ showToggle?: boolean;
9
+ validate?: (value: string) => string | undefined;
10
+ validateOnBlur?: boolean;
11
+ size?: 'sm' | 'md';
12
+ }
13
+ export declare function InputPassword({ 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, allowCopy, className, defaultValue, disabled, error, hint, id: providedId, label, maxLength, onChange, onCopy, onCut, onBlur, onValidationChange, required, showToggle, size, validate, validateOnBlur, value, ref, ...props }: InputPasswordProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { InputPassword } from './InputPassword.js';
2
+ export type { InputPasswordProps } from './InputPassword.js';
@@ -0,0 +1,10 @@
1
+ import { type ComponentPropsWithRef } from 'react';
2
+ export type InputTextSize = 'sm' | 'md';
3
+ export interface InputTextProps extends Omit<ComponentPropsWithRef<'input'>, 'size'> {
4
+ error?: string;
5
+ hint?: string;
6
+ label?: string;
7
+ size?: InputTextSize;
8
+ showCharacterCount?: boolean;
9
+ }
10
+ export declare function InputText({ 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, className, error, hint, id: providedId, label, maxLength, required, size, showCharacterCount, defaultValue, onChange, value, ref, ...props }: InputTextProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { InputText } from './InputText.js';
2
+ export type { InputTextProps, InputTextSize } from './InputText.js';
@@ -0,0 +1,5 @@
1
+ import type { LabelHTMLAttributes } from 'react';
2
+ export interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
3
+ required?: boolean;
4
+ }
5
+ export declare function Label({ children, className, required, ...props }: LabelProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Label } from './Label.js';
2
+ export type { LabelProps } from './Label.js';
@@ -0,0 +1,6 @@
1
+ import { type ComponentPropsWithRef } from 'react';
2
+ export interface RadioProps extends Omit<ComponentPropsWithRef<'input'>, 'type' | 'size' | 'name' | 'checked' | 'defaultChecked' | 'value'> {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ export declare function Radio({ className, disabled, id: providedId, label, onChange, ref, value, ...props }: RadioProps): import("react").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
+ interface RadioGroupContexto {
3
+ defaultValue?: string;
4
+ disabled: boolean;
5
+ invalid: boolean;
6
+ name: string;
7
+ onValueChange?: (value: string) => void;
8
+ value?: string;
9
+ }
10
+ declare const RadioGroupContexto: import("react").Context<RadioGroupContexto | null>;
11
+ export declare function useRadioGroupContexto(): RadioGroupContexto;
12
+ export interface RadioGroupProps extends Omit<ComponentPropsWithRef<'fieldset'>, 'onChange'> {
13
+ children: ReactNode;
14
+ defaultValue?: string;
15
+ disabled?: boolean;
16
+ error?: string;
17
+ hint?: string;
18
+ label: string;
19
+ name?: string;
20
+ onValueChange?: (value: string) => void;
21
+ required?: boolean;
22
+ value?: string;
23
+ }
24
+ export declare function RadioGroup({ children, className, defaultValue, disabled, error, hint, label, name: providedName, onValueChange, required, value, ...props }: RadioGroupProps): import("react").JSX.Element;
25
+ export {};
@@ -0,0 +1,4 @@
1
+ export { RadioGroup } from './RadioGroup.js';
2
+ export type { RadioGroupProps } from './RadioGroup.js';
3
+ export { Radio } from './Radio.js';
4
+ export type { RadioProps } from './Radio.js';
@@ -0,0 +1,26 @@
1
+ export type SelectSize = 'sm' | 'md';
2
+ export interface SelectOption {
3
+ disabled?: boolean;
4
+ label: string;
5
+ value: string;
6
+ }
7
+ export interface SelectProps {
8
+ defaultValue?: string;
9
+ disabled?: boolean;
10
+ error?: string;
11
+ hint?: string;
12
+ id?: string;
13
+ label?: string;
14
+ /**
15
+ * Nome do campo no formulario. Com ele, um input oculto carrega o valor para
16
+ * o `FormData`: sem controle nativo por baixo, o envio ignorava o campo.
17
+ */
18
+ name?: string;
19
+ onValueChange?: (value: string) => void;
20
+ options: readonly SelectOption[];
21
+ placeholder?: string;
22
+ required?: boolean;
23
+ size?: SelectSize;
24
+ value?: string;
25
+ }
26
+ export declare function Select({ defaultValue, name, disabled, error, hint, id: providedId, label, onValueChange, options, placeholder, required, size, value, }: SelectProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Select } from './Select.js';
2
+ export type { SelectProps, SelectOption, SelectSize } from './Select.js';
@@ -0,0 +1,7 @@
1
+ import { type ComponentPropsWithRef } from 'react';
2
+ export interface SwitchProps extends Omit<ComponentPropsWithRef<'input'>, 'type' | 'size'> {
3
+ error?: string;
4
+ hint?: string;
5
+ label: string;
6
+ }
7
+ export declare function Switch({ 'aria-describedby': ariaDescribedBy, className, error, hint, id: providedId, label, ref, ...props }: SwitchProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Switch } from './Switch.js';
2
+ export type { SwitchProps } from './Switch.js';
@@ -0,0 +1,10 @@
1
+ import { type ComponentPropsWithRef } from 'react';
2
+ export type TextareaSize = 'sm' | 'md';
3
+ export interface TextareaProps extends Omit<ComponentPropsWithRef<'textarea'>, 'size'> {
4
+ error?: string;
5
+ hint?: string;
6
+ label?: string;
7
+ size?: TextareaSize;
8
+ showCharacterCount?: boolean;
9
+ }
10
+ export declare function Textarea({ 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, className, error, hint, id: providedId, label, maxLength, required, rows, size, showCharacterCount, defaultValue, onChange, value, ref, ...props }: TextareaProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Textarea } from './Textarea.js';
2
+ export type { TextareaProps, TextareaSize } from './Textarea.js';