@refy-design/mobile 0.0.0-stage → 1.1.0
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/LICENSE +21 -0
- package/README.md +61 -2
- package/dist/index.js +10298 -0
- package/dist/types/_contracts/accordion.d.ts +34 -0
- package/dist/types/_contracts/account.d.ts +113 -0
- package/dist/types/_contracts/activity-item.d.ts +23 -0
- package/dist/types/_contracts/aspect-ratio.d.ts +5 -0
- package/dist/types/_contracts/avatar-group.d.ts +20 -0
- package/dist/types/_contracts/avatar.d.ts +23 -0
- package/dist/types/_contracts/badge.d.ts +9 -0
- package/dist/types/_contracts/boards.d.ts +42 -0
- package/dist/types/_contracts/brand-logo.d.ts +12 -0
- package/dist/types/_contracts/bubble.d.ts +5 -0
- package/dist/types/_contracts/button-group.d.ts +12 -0
- package/dist/types/_contracts/button.d.ts +27 -0
- package/dist/types/_contracts/calendar.d.ts +33 -0
- package/dist/types/_contracts/callout.d.ts +19 -0
- package/dist/types/_contracts/capture.d.ts +29 -0
- package/dist/types/_contracts/card.d.ts +26 -0
- package/dist/types/_contracts/charts.d.ts +79 -0
- package/dist/types/_contracts/checkbox.d.ts +17 -0
- package/dist/types/_contracts/chip.d.ts +23 -0
- package/dist/types/_contracts/choice-card.d.ts +34 -0
- package/dist/types/_contracts/combobox.d.ts +57 -0
- package/dist/types/_contracts/connector-card.d.ts +26 -0
- package/dist/types/_contracts/content.d.ts +83 -0
- package/dist/types/_contracts/divider.d.ts +12 -0
- package/dist/types/_contracts/empty-state.d.ts +13 -0
- package/dist/types/_contracts/fab.d.ts +13 -0
- package/dist/types/_contracts/form-fields.d.ts +41 -0
- package/dist/types/_contracts/guided.d.ts +67 -0
- package/dist/types/_contracts/icon-button.d.ts +9 -0
- package/dist/types/_contracts/index.d.ts +62 -0
- package/dist/types/_contracts/input.d.ts +15 -0
- package/dist/types/_contracts/item.d.ts +11 -0
- package/dist/types/_contracts/modal.d.ts +18 -0
- package/dist/types/_contracts/nav-card.d.ts +12 -0
- package/dist/types/_contracts/oauth-button.d.ts +8 -0
- package/dist/types/_contracts/organisms.d.ts +133 -0
- package/dist/types/_contracts/otp.d.ts +23 -0
- package/dist/types/_contracts/overlay.d.ts +118 -0
- package/dist/types/_contracts/page-header.d.ts +14 -0
- package/dist/types/_contracts/pagination.d.ts +10 -0
- package/dist/types/_contracts/person-cell.d.ts +9 -0
- package/dist/types/_contracts/progress-bar.d.ts +19 -0
- package/dist/types/_contracts/radio-group.d.ts +15 -0
- package/dist/types/_contracts/score-gauge.d.ts +15 -0
- package/dist/types/_contracts/scroll-area.d.ts +3 -0
- package/dist/types/_contracts/section-header.d.ts +13 -0
- package/dist/types/_contracts/segmented.d.ts +22 -0
- package/dist/types/_contracts/select.d.ts +7 -0
- package/dist/types/_contracts/setting-row.d.ts +27 -0
- package/dist/types/_contracts/skeleton.d.ts +9 -0
- package/dist/types/_contracts/slider.d.ts +45 -0
- package/dist/types/_contracts/stat.d.ts +37 -0
- package/dist/types/_contracts/status-dot.d.ts +11 -0
- package/dist/types/_contracts/sticky.d.ts +14 -0
- package/dist/types/_contracts/switch.d.ts +10 -0
- package/dist/types/_contracts/table.d.ts +33 -0
- package/dist/types/_contracts/tabs.d.ts +23 -0
- package/dist/types/_contracts/textarea.d.ts +7 -0
- package/dist/types/_contracts/toast.d.ts +28 -0
- package/dist/types/_contracts/toggle-group.d.ts +19 -0
- package/dist/types/_contracts/usage-meter.d.ts +19 -0
- package/dist/types/_contracts/wizard-stepper.d.ts +21 -0
- package/dist/types/_contracts/workflow.d.ts +103 -0
- package/dist/types/_tokens/index.d.ts +422 -0
- package/dist/types/chart/Charts.d.ts +77 -0
- package/dist/types/chart/D3Chart.d.ts +11 -0
- package/dist/types/chart/SceneChart.d.ts +19 -0
- package/dist/types/chart/d3/cartesian.d.ts +4 -0
- package/dist/types/chart/d3/hierarchy.d.ts +3 -0
- package/dist/types/chart/d3/radial.d.ts +3 -0
- package/dist/types/chart/d3/relations.d.ts +3 -0
- package/dist/types/chart/d3/shared.d.ts +21 -0
- package/dist/types/chart/d3/styles.d.ts +10 -0
- package/dist/types/chart/d3/svg.d.ts +6 -0
- package/dist/types/chart/d3/types.d.ts +228 -0
- package/dist/types/chart/scales.d.ts +17 -0
- package/dist/types/chart/scene.d.ts +32 -0
- package/dist/types/chart/types.d.ts +92 -0
- package/dist/types/components/Accordion.d.ts +10 -0
- package/dist/types/components/ActivityItem.d.ts +7 -0
- package/dist/types/components/AlertDialog.d.ts +8 -0
- package/dist/types/components/ApprovalWorkbench.d.ts +11 -0
- package/dist/types/components/AspectRatio.d.ts +6 -0
- package/dist/types/components/Avatar.d.ts +9 -0
- package/dist/types/components/AvatarGroup.d.ts +9 -0
- package/dist/types/components/Badge.d.ts +7 -0
- package/dist/types/components/BillingCard.d.ts +6 -0
- package/dist/types/components/BrandLogo.d.ts +7 -0
- package/dist/types/components/Bubble.d.ts +6 -0
- package/dist/types/components/Button.d.ts +13 -0
- package/dist/types/components/ButtonGroup.d.ts +6 -0
- package/dist/types/components/Calendar.d.ts +17 -0
- package/dist/types/components/Callout.d.ts +7 -0
- package/dist/types/components/Card.d.ts +10 -0
- package/dist/types/components/Carousel.d.ts +11 -0
- package/dist/types/components/Checkbox.d.ts +10 -0
- package/dist/types/components/Chip.d.ts +9 -0
- package/dist/types/components/ChoiceCard.d.ts +14 -0
- package/dist/types/components/CodeBlock.d.ts +22 -0
- package/dist/types/components/Collapsible.d.ts +6 -0
- package/dist/types/components/Combobox.d.ts +32 -0
- package/dist/types/components/ConnectorCard.d.ts +6 -0
- package/dist/types/components/ContextMenu.d.ts +10 -0
- package/dist/types/components/Coverflow.d.ts +12 -0
- package/dist/types/components/DangerZone.d.ts +10 -0
- package/dist/types/components/DatePicker.d.ts +7 -0
- package/dist/types/components/Divider.d.ts +7 -0
- package/dist/types/components/Drawer.d.ts +23 -0
- package/dist/types/components/EmptyState.d.ts +6 -0
- package/dist/types/components/EventTimeline.d.ts +15 -0
- package/dist/types/components/Fab.d.ts +8 -0
- package/dist/types/components/FabMenu.d.ts +11 -0
- package/dist/types/components/Field.d.ts +24 -0
- package/dist/types/components/FileUpload.d.ts +37 -0
- package/dist/types/components/GeoAreaPicker.d.ts +17 -0
- package/dist/types/components/GoogleButton.d.ts +5 -0
- package/dist/types/components/GuidedTour.d.ts +15 -0
- package/dist/types/components/HelpField.d.ts +11 -0
- package/dist/types/components/HelpMenu.d.ts +7 -0
- package/dist/types/components/IconButton.d.ts +10 -0
- package/dist/types/components/Input.d.ts +9 -0
- package/dist/types/components/IntentComposer.d.ts +14 -0
- package/dist/types/components/Item.d.ts +6 -0
- package/dist/types/components/KanbanBoard.d.ts +15 -0
- package/dist/types/components/KanbanCard.d.ts +8 -0
- package/dist/types/components/Marker.d.ts +4 -0
- package/dist/types/components/Matrix2x2.d.ts +15 -0
- package/dist/types/components/Menu.d.ts +15 -0
- package/dist/types/components/Message.d.ts +14 -0
- package/dist/types/components/Modal.d.ts +9 -0
- package/dist/types/components/Multiselect.d.ts +18 -0
- package/dist/types/components/NavCard.d.ts +8 -0
- package/dist/types/components/NotificationBell.d.ts +11 -0
- package/dist/types/components/OAuthButton.d.ts +8 -0
- package/dist/types/components/Otp.d.ts +10 -0
- package/dist/types/components/PageHeader.d.ts +6 -0
- package/dist/types/components/Pagination.d.ts +8 -0
- package/dist/types/components/PersonCell.d.ts +6 -0
- package/dist/types/components/PhoneInput.d.ts +13 -0
- package/dist/types/components/PlanCard.d.ts +6 -0
- package/dist/types/components/Popover.d.ts +12 -0
- package/dist/types/components/PostalCodeInput.d.ts +12 -0
- package/dist/types/components/ProgressBar.d.ts +7 -0
- package/dist/types/components/PropertyActionGroup.d.ts +11 -0
- package/dist/types/components/PropertyCard.d.ts +15 -0
- package/dist/types/components/PropertyMedia.d.ts +15 -0
- package/dist/types/components/Questionnaire.d.ts +8 -0
- package/dist/types/components/RadioGroup.d.ts +7 -0
- package/dist/types/components/Range.d.ts +10 -0
- package/dist/types/components/ScoreGauge.d.ts +8 -0
- package/dist/types/components/ScrollArea.d.ts +9 -0
- package/dist/types/components/SectionHeader.d.ts +6 -0
- package/dist/types/components/Segmented.d.ts +10 -0
- package/dist/types/components/Select.d.ts +16 -0
- package/dist/types/components/SettingRow.d.ts +14 -0
- package/dist/types/components/SettingsSubnav.d.ts +12 -0
- package/dist/types/components/Skeleton.d.ts +6 -0
- package/dist/types/components/Slider.d.ts +9 -0
- package/dist/types/components/Snackbar.d.ts +6 -0
- package/dist/types/components/Spinner.d.ts +7 -0
- package/dist/types/components/SplitButton.d.ts +8 -0
- package/dist/types/components/Stat.d.ts +13 -0
- package/dist/types/components/StatusDot.d.ts +7 -0
- package/dist/types/components/Sticky.d.ts +15 -0
- package/dist/types/components/SwipeDeck.d.ts +18 -0
- package/dist/types/components/Switch.d.ts +10 -0
- package/dist/types/components/Table.d.ts +28 -0
- package/dist/types/components/Tabs.d.ts +7 -0
- package/dist/types/components/Textarea.d.ts +11 -0
- package/dist/types/components/Timeline.d.ts +18 -0
- package/dist/types/components/Toast.d.ts +20 -0
- package/dist/types/components/ToggleGroup.d.ts +7 -0
- package/dist/types/components/Tooltip.d.ts +9 -0
- package/dist/types/components/Trace.d.ts +11 -0
- package/dist/types/components/Track.d.ts +53 -0
- package/dist/types/components/UsageMeter.d.ts +12 -0
- package/dist/types/components/UserMenu.d.ts +11 -0
- package/dist/types/components/VisitSchedulePicker.d.ts +12 -0
- package/dist/types/components/VoiceRecorder.d.ts +13 -0
- package/dist/types/components/WizardStepper.d.ts +7 -0
- package/dist/types/components/WorkspaceSwitcher.d.ts +11 -0
- package/dist/types/components/providerIcons.d.ts +9 -0
- package/dist/types/hooks.d.ts +4 -0
- package/dist/types/icon.d.ts +14 -0
- package/dist/types/index.d.ts +114 -0
- package/dist/types/messages/en.d.ts +523 -0
- package/dist/types/overlay.d.ts +69 -0
- package/dist/types/primitives.d.ts +41 -0
- package/dist/types/theme.d.ts +37 -0
- package/package.json +108 -4
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface AccordionItem {
|
|
3
|
+
id: string;
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
content: ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Props for the Accordion component. */
|
|
9
|
+
export interface AccordionCoreProps {
|
|
10
|
+
items: AccordionItem[];
|
|
11
|
+
/** single = só um aberto por vez; multiple = vários. */
|
|
12
|
+
type?: "single" | "multiple";
|
|
13
|
+
/** IDs abertos (controlado). */
|
|
14
|
+
value?: string[];
|
|
15
|
+
defaultValue?: string[];
|
|
16
|
+
onChange?: (open: string[]) => void;
|
|
17
|
+
/** plain remove a caixa externa, preservando os divisores entre itens. */
|
|
18
|
+
variant?: "default" | "plain" | "joined";
|
|
19
|
+
/** Escala compacta para composições densas. */
|
|
20
|
+
size?: "default" | "sm";
|
|
21
|
+
/** Seta também à esquerda do título. */
|
|
22
|
+
leadingIndicator?: boolean;
|
|
23
|
+
/** Com `leadingIndicator`, recua o conteúdo até o texto do título. */
|
|
24
|
+
indentContent?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** Props for the Collapsible component. */
|
|
27
|
+
export interface CollapsibleCoreProps {
|
|
28
|
+
title: string;
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
open?: boolean;
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { MenuEntry } from "./overlay";
|
|
3
|
+
export interface UserMenuUser {
|
|
4
|
+
name: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
initials: string;
|
|
7
|
+
seed?: string;
|
|
8
|
+
src?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Props for the UserMenu component. */
|
|
11
|
+
export interface UserMenuCoreProps {
|
|
12
|
+
user: UserMenuUser;
|
|
13
|
+
entries?: MenuEntry[];
|
|
14
|
+
onSelect?: (id: string) => void;
|
|
15
|
+
compact?: boolean;
|
|
16
|
+
side?: "top" | "bottom";
|
|
17
|
+
align?: "start" | "end";
|
|
18
|
+
}
|
|
19
|
+
/** Props for the HelpMenu component. */
|
|
20
|
+
export interface HelpMenuCoreProps {
|
|
21
|
+
entries?: MenuEntry[];
|
|
22
|
+
onSelect?: (id: string) => void;
|
|
23
|
+
label?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface NotificationItem {
|
|
26
|
+
id: string;
|
|
27
|
+
title: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
time?: string;
|
|
30
|
+
unread?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/** Props for the notification bell menu. */
|
|
33
|
+
export interface NotificationBellCoreProps {
|
|
34
|
+
items: NotificationItem[];
|
|
35
|
+
onItemClick?: (item: NotificationItem) => void;
|
|
36
|
+
onMarkAllRead?: () => void;
|
|
37
|
+
title?: string;
|
|
38
|
+
emptyMessage?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface Workspace {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
role?: string;
|
|
44
|
+
initials: string;
|
|
45
|
+
}
|
|
46
|
+
/** Props for the workspace switcher. */
|
|
47
|
+
export interface WorkspaceSwitcherCoreProps {
|
|
48
|
+
workspaces: Workspace[];
|
|
49
|
+
value?: string;
|
|
50
|
+
defaultValue?: string;
|
|
51
|
+
onChange?: (workspace: Workspace) => void;
|
|
52
|
+
compact?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface SettingsSubnavItem {
|
|
55
|
+
href: string;
|
|
56
|
+
label: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
icon?: ReactNode;
|
|
59
|
+
}
|
|
60
|
+
export interface SettingsSubnavGroup {
|
|
61
|
+
title?: string;
|
|
62
|
+
items: SettingsSubnavItem[];
|
|
63
|
+
}
|
|
64
|
+
/** Props for the SettingsSubnav secondary menu. */
|
|
65
|
+
export interface SettingsSubnavCoreProps {
|
|
66
|
+
items?: SettingsSubnavItem[];
|
|
67
|
+
groups?: SettingsSubnavGroup[];
|
|
68
|
+
activeHref?: string;
|
|
69
|
+
label?: string;
|
|
70
|
+
onNavigate?: (item: SettingsSubnavItem) => void;
|
|
71
|
+
}
|
|
72
|
+
export interface KanbanCardItem {
|
|
73
|
+
id: string;
|
|
74
|
+
title: ReactNode;
|
|
75
|
+
description?: ReactNode;
|
|
76
|
+
meta?: ReactNode;
|
|
77
|
+
leading?: ReactNode;
|
|
78
|
+
footer?: ReactNode;
|
|
79
|
+
}
|
|
80
|
+
/** Props for the KanbanCard component. */
|
|
81
|
+
export interface KanbanCardCoreProps {
|
|
82
|
+
item: KanbanCardItem;
|
|
83
|
+
onOpen?: () => void;
|
|
84
|
+
dragHandle?: ReactNode;
|
|
85
|
+
actions?: ReactNode;
|
|
86
|
+
}
|
|
87
|
+
export type PropertyAction = "reject" | "save" | "visit";
|
|
88
|
+
export type PropertyActionGroupState = "idle" | "processing" | "completed" | "unavailable";
|
|
89
|
+
/** Props for the PropertyActionGroup component. */
|
|
90
|
+
export interface PropertyActionGroupCoreProps {
|
|
91
|
+
state?: PropertyActionGroupState;
|
|
92
|
+
activeAction?: PropertyAction;
|
|
93
|
+
onAction?: (action: PropertyAction) => void;
|
|
94
|
+
orientation?: "auto" | "horizontal" | "vertical";
|
|
95
|
+
disabledActions?: PropertyAction[];
|
|
96
|
+
statusMessage?: ReactNode;
|
|
97
|
+
labels?: Partial<Record<PropertyAction, string>>;
|
|
98
|
+
}
|
|
99
|
+
export interface PropertyMediaItem {
|
|
100
|
+
src: string;
|
|
101
|
+
alt: string;
|
|
102
|
+
}
|
|
103
|
+
/** Props for the PropertyMedia gallery. */
|
|
104
|
+
export interface PropertyMediaCoreProps {
|
|
105
|
+
items: PropertyMediaItem[];
|
|
106
|
+
index?: number;
|
|
107
|
+
defaultIndex?: number;
|
|
108
|
+
onIndexChange?: (index: number) => void;
|
|
109
|
+
fit?: "cover" | "contain";
|
|
110
|
+
loading?: boolean;
|
|
111
|
+
errorMessage?: string;
|
|
112
|
+
onRetry?: () => void;
|
|
113
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { BadgeTone } from "./badge";
|
|
3
|
+
export interface ActivityActorCore {
|
|
4
|
+
name: string;
|
|
5
|
+
initials?: string;
|
|
6
|
+
seed?: string;
|
|
7
|
+
src?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Props for the ActivityItem feed entry. */
|
|
10
|
+
export interface ActivityItemCoreProps {
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
actor?: ActivityActorCore;
|
|
13
|
+
timestamp?: ReactNode;
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
badge?: {
|
|
16
|
+
label: ReactNode;
|
|
17
|
+
tone?: BadgeTone;
|
|
18
|
+
};
|
|
19
|
+
status?: ReactNode;
|
|
20
|
+
metadata?: ReactNode;
|
|
21
|
+
action?: ReactNode;
|
|
22
|
+
density?: "default" | "compact";
|
|
23
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AvatarSize } from "./avatar";
|
|
2
|
+
/** Uma pessoa (ou workspace) dentro do AvatarGroup. */
|
|
3
|
+
export interface AvatarGroupItem {
|
|
4
|
+
/** Nome completo: vira nome acessível e origem das iniciais. */
|
|
5
|
+
name: string;
|
|
6
|
+
src?: string;
|
|
7
|
+
initials?: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Props for the AvatarGroup component. */
|
|
11
|
+
export interface AvatarGroupCoreProps {
|
|
12
|
+
items: AvatarGroupItem[];
|
|
13
|
+
/** Máximo de avatares visíveis; o excedente vira "+N". Padrão 4. */
|
|
14
|
+
max?: number;
|
|
15
|
+
size?: AvatarSize;
|
|
16
|
+
/** Se presente, cada avatar vira botão. */
|
|
17
|
+
onItemClick?: (item: AvatarGroupItem, index: number) => void;
|
|
18
|
+
/** Se presente, o "+N" vira botão. */
|
|
19
|
+
onOverflowClick?: () => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
2
|
+
export type AvatarShape = "circle" | "square";
|
|
3
|
+
/** Props for the Avatar component. */
|
|
4
|
+
export interface AvatarCoreProps {
|
|
5
|
+
/** Iniciais (1–2 letras) quando não há imagem. */
|
|
6
|
+
initials?: string;
|
|
7
|
+
/** URL da foto; se presente, sobrepõe as iniciais. */
|
|
8
|
+
src?: string;
|
|
9
|
+
alt?: string;
|
|
10
|
+
size?: AvatarSize;
|
|
11
|
+
/**
|
|
12
|
+
* Forma: `circle` (pessoa, default) ou `square` (workspace/projeto/logo,
|
|
13
|
+
* cantos arredondados proporcionais ao tamanho).
|
|
14
|
+
*/
|
|
15
|
+
shape?: AvatarShape;
|
|
16
|
+
/** Cor de fundo (para iniciais). Default = cor da marca ativa. */
|
|
17
|
+
color?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Semente p/ gradiente determinístico de marca (ex.: nome do workspace).
|
|
20
|
+
* A mesma string sempre gera o mesmo gradiente. Ignorada com `src`/`color`.
|
|
21
|
+
*/
|
|
22
|
+
seed?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type BadgeTone = "success" | "info" | "warn" | "danger" | "neutral";
|
|
3
|
+
/** Props for the Badge status label. */
|
|
4
|
+
export interface BadgeCoreProps {
|
|
5
|
+
tone?: BadgeTone;
|
|
6
|
+
/** Ponto colorido à esquerda (status). */
|
|
7
|
+
dot?: boolean;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { KanbanCardItem } from "./account";
|
|
3
|
+
import type { MenuEntry } from "./overlay";
|
|
4
|
+
import type { PropertyAction } from "./account";
|
|
5
|
+
import type { PropertyCardCoreProps } from "./organisms";
|
|
6
|
+
export interface KanbanColumnItem {
|
|
7
|
+
id: string;
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
items: KanbanCardItem[];
|
|
11
|
+
wipLimit?: number;
|
|
12
|
+
color?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Props for the KanbanBoard component. */
|
|
15
|
+
export interface KanbanBoardCoreProps {
|
|
16
|
+
columns: KanbanColumnItem[];
|
|
17
|
+
onColumnsChange?: (columns: KanbanColumnItem[]) => void;
|
|
18
|
+
onCardClick?: (card: KanbanCardItem, column: KanbanColumnItem) => void;
|
|
19
|
+
wipLimit?: number;
|
|
20
|
+
allowedTransitions?: Record<string, readonly string[]>;
|
|
21
|
+
toolbar?: ReactNode;
|
|
22
|
+
filter?: (card: KanbanCardItem, column: KanbanColumnItem) => boolean;
|
|
23
|
+
onAddCard?: (column: KanbanColumnItem) => void;
|
|
24
|
+
columnActions?: (column: KanbanColumnItem) => MenuEntry[];
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
instructions?: "visible" | "hidden";
|
|
27
|
+
}
|
|
28
|
+
export interface SwipeDeckItemCore extends PropertyCardCoreProps {
|
|
29
|
+
id: string;
|
|
30
|
+
}
|
|
31
|
+
/** Props for the SwipeDeck component, sem a lista (o item nativo usa o PropertyCard nativo). */
|
|
32
|
+
export interface SwipeDeckCoreProps {
|
|
33
|
+
index?: number;
|
|
34
|
+
defaultIndex?: number;
|
|
35
|
+
onIndexChange?: (index: number) => void;
|
|
36
|
+
onReset?: () => void;
|
|
37
|
+
gestureEnabled?: boolean;
|
|
38
|
+
motion?: "auto" | "reduced";
|
|
39
|
+
title?: ReactNode;
|
|
40
|
+
instructions?: "visible" | "hidden";
|
|
41
|
+
}
|
|
42
|
+
export type { PropertyAction };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type BrandLogoBrand = "refy";
|
|
3
|
+
export type BrandLogoSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
|
+
export interface BrandLogoCoreProps {
|
|
5
|
+
brand?: BrandLogoBrand;
|
|
6
|
+
size?: BrandLogoSize;
|
|
7
|
+
tone?: "default" | "inverse";
|
|
8
|
+
animated?: boolean;
|
|
9
|
+
markOnly?: boolean;
|
|
10
|
+
/** Marca fornecida pelo consumidor. Não inclui assets de terceiros no Refy. */
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Props for the ButtonGroup component. */
|
|
2
|
+
export interface ButtonGroupCoreProps {
|
|
3
|
+
/** Eixo visual do conjunto de ações. */
|
|
4
|
+
orientation?: "horizontal" | "vertical";
|
|
5
|
+
/** Nome acessível do grupo. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Índice ativo inicial. */
|
|
8
|
+
defaultActiveIndex?: number;
|
|
9
|
+
/** Índice ativo controlado. */
|
|
10
|
+
activeIndex?: number;
|
|
11
|
+
onActiveIndexChange?: (index: number) => void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type ButtonVariant = "primary" | "secondary" | "ghost" | "danger";
|
|
3
|
+
export type ButtonSize = "sm" | "md" | "lg";
|
|
4
|
+
export type ButtonStatus = "idle" | "loading" | "success" | "error";
|
|
5
|
+
export type ButtonProgressEffect = "spinner" | "fill-horizontal" | "fill-vertical" | "shrink-horizontal" | "shrink-vertical" | "rotate-angle-bottom" | "rotate-angle-top" | "rotate-angle-left" | "rotate-angle-right" | "rotate-side-down" | "rotate-side-up" | "rotate-side-left" | "rotate-side-right" | "rotate-back" | "flip-open" | "slide-down" | "move-up" | "top-line" | "lateral-lines";
|
|
6
|
+
/** Props for the base Refy button. */
|
|
7
|
+
export interface ButtonCoreProps {
|
|
8
|
+
/** Hierarquia visual. Primário usa texto definido pelo token on-primary. */
|
|
9
|
+
variant?: ButtonVariant;
|
|
10
|
+
/** Prévia visual de gesto vinculado; não dispara clique nem muda disabled. */
|
|
11
|
+
interactionState?: "hover" | "pressed";
|
|
12
|
+
size?: ButtonSize;
|
|
13
|
+
/** Ícone à esquerda do label (16px recomendado). */
|
|
14
|
+
leadingIcon?: ReactNode;
|
|
15
|
+
/** Ícone à direita do label. */
|
|
16
|
+
trailingIcon?: ReactNode;
|
|
17
|
+
/** Mostra spinner e bloqueia cliques. */
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
/** Estado explícito para apresentar conclusão ou erro; `loading` continua compatível. */
|
|
20
|
+
status?: ButtonStatus;
|
|
21
|
+
/** Loading: spinner, preenchimento ou linha. Opções antigas de giro/encolhimento usam linha sem esconder o rótulo. */
|
|
22
|
+
progressEffect?: ButtonProgressEffect;
|
|
23
|
+
/** Label acessível/visível durante processamento. */
|
|
24
|
+
loadingLabel?: ReactNode;
|
|
25
|
+
/** Ocupa 100% da largura do container. */
|
|
26
|
+
block?: boolean;
|
|
27
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type CalendarMode = "single" | "range";
|
|
2
|
+
/** Intervalo de datas (modo `range`). */
|
|
3
|
+
export interface DateRange {
|
|
4
|
+
start: Date | null;
|
|
5
|
+
end: Date | null;
|
|
6
|
+
}
|
|
7
|
+
/** Props for the Calendar date picker. */
|
|
8
|
+
export interface CalendarCoreProps {
|
|
9
|
+
mode?: CalendarMode;
|
|
10
|
+
value?: Date | null | DateRange;
|
|
11
|
+
defaultValue?: Date | null | DateRange;
|
|
12
|
+
onChange?: (value: Date | DateRange) => void;
|
|
13
|
+
numberOfMonths?: 1 | 2;
|
|
14
|
+
fixedWeeks?: boolean;
|
|
15
|
+
month?: Date;
|
|
16
|
+
defaultMonth?: Date;
|
|
17
|
+
onMonthChange?: (month: Date) => void;
|
|
18
|
+
min?: Date;
|
|
19
|
+
max?: Date;
|
|
20
|
+
weekStartsOn?: 0 | 1;
|
|
21
|
+
locale?: string;
|
|
22
|
+
monthLabelStyle?: "long" | "compact";
|
|
23
|
+
}
|
|
24
|
+
/** Props for the DatePicker field. */
|
|
25
|
+
export interface DatePickerCoreProps {
|
|
26
|
+
label: string;
|
|
27
|
+
value?: Date | null;
|
|
28
|
+
defaultValue?: Date | null;
|
|
29
|
+
onChange?: (date: Date | null) => void;
|
|
30
|
+
min?: Date;
|
|
31
|
+
max?: Date;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type CalloutTone = "info" | "note" | "success" | "warn" | "danger" | "upsell";
|
|
3
|
+
/** Props for the Callout component. */
|
|
4
|
+
export interface CalloutCoreProps {
|
|
5
|
+
/** Tom semântico do aviso (padrão: "info"). */
|
|
6
|
+
tone?: CalloutTone;
|
|
7
|
+
/** Ícone à esquerda. */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
title: ReactNode;
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
/** Ação opcional à direita. */
|
|
12
|
+
action?: ReactNode;
|
|
13
|
+
/** Mostra o botão de fechar; o aviso sai com transição e desmonta. */
|
|
14
|
+
dismissible?: boolean;
|
|
15
|
+
/** Chamado depois que o aviso sai. */
|
|
16
|
+
onDismiss?: () => void;
|
|
17
|
+
/** Nome acessível do botão de fechar (padrão: "Dispensar aviso"). */
|
|
18
|
+
dismissLabel?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type FileUploadState = "idle" | "uploading" | "success" | "error";
|
|
2
|
+
/** Props for the FileUpload component, sem a lista de arquivos (File na web, objeto do seletor no nativo). */
|
|
3
|
+
export interface FileUploadCoreProps {
|
|
4
|
+
accept?: string;
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
maxSize?: number;
|
|
7
|
+
state?: FileUploadState;
|
|
8
|
+
progress?: number;
|
|
9
|
+
errorMessage?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
hint?: string;
|
|
13
|
+
}
|
|
14
|
+
export type VoiceRecorderState = "idle" | "listening" | "paused" | "error" | "fallback";
|
|
15
|
+
/** Props for the VoiceRecorder component. A captura do áudio é do app. */
|
|
16
|
+
export interface VoiceRecorderCoreProps {
|
|
17
|
+
state?: VoiceRecorderState;
|
|
18
|
+
duration?: number;
|
|
19
|
+
level?: number;
|
|
20
|
+
transcript?: string;
|
|
21
|
+
errorMessage?: string;
|
|
22
|
+
onStart?: () => void;
|
|
23
|
+
onPause?: () => void;
|
|
24
|
+
onResume?: () => void;
|
|
25
|
+
onCancel?: () => void;
|
|
26
|
+
onFinish?: () => void;
|
|
27
|
+
onRetry?: () => void;
|
|
28
|
+
onUseFallback?: () => void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type CardTone = "default" | "inverted";
|
|
3
|
+
/** Props for the Card surface component. */
|
|
4
|
+
export interface CardCoreProps {
|
|
5
|
+
/** Elevação da sombra (0–4). 0 = plano; 4 = overlay. */
|
|
6
|
+
elevation?: 0 | 1 | 2 | 3 | 4;
|
|
7
|
+
padding?: "none" | "sm" | "md";
|
|
8
|
+
/**
|
|
9
|
+
* Tom da superfície. `inverted` = superfície escura (tinta) com gradiente
|
|
10
|
+
* radial da marca e tokens de texto invertidos no escopo do card — base dos
|
|
11
|
+
* heróis de billing/uso (plan-summary, usage-hero).
|
|
12
|
+
*/
|
|
13
|
+
tone?: CardTone;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/** Props for the optional Card header. */
|
|
17
|
+
export interface CardHeaderCoreProps {
|
|
18
|
+
title: ReactNode;
|
|
19
|
+
count?: ReactNode;
|
|
20
|
+
action?: ReactNode;
|
|
21
|
+
/** Mídia e descrição opcionais, com métricas configuráveis pelo tema. */
|
|
22
|
+
icon?: ReactNode;
|
|
23
|
+
description?: ReactNode;
|
|
24
|
+
/** Hierarquia compacta para cabeçalhos secundários; md preserva o padrão. */
|
|
25
|
+
size?: "sm" | "md";
|
|
26
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type ChartTone = "primary" | "info" | "warn" | "critical";
|
|
3
|
+
export interface LineSeries {
|
|
4
|
+
name: string;
|
|
5
|
+
data: number[];
|
|
6
|
+
tone?: ChartTone;
|
|
7
|
+
}
|
|
8
|
+
/** Props for the LineChart component. */
|
|
9
|
+
export interface LineChartCoreProps {
|
|
10
|
+
title: string;
|
|
11
|
+
showTitle?: boolean;
|
|
12
|
+
data?: number[];
|
|
13
|
+
series?: LineSeries[];
|
|
14
|
+
xLabels?: string[];
|
|
15
|
+
pointLabels?: string[];
|
|
16
|
+
yTitle?: string;
|
|
17
|
+
xTitle?: string;
|
|
18
|
+
formatY?: (value: number) => string;
|
|
19
|
+
max?: number;
|
|
20
|
+
area?: boolean;
|
|
21
|
+
showLegend?: boolean;
|
|
22
|
+
stacked?: boolean;
|
|
23
|
+
curve?: "smooth" | "linear" | "step";
|
|
24
|
+
label: string;
|
|
25
|
+
}
|
|
26
|
+
/** Props for the AreaChart component. */
|
|
27
|
+
export type AreaChartCoreProps = Omit<LineChartCoreProps, "area">;
|
|
28
|
+
export interface BarChartItem {
|
|
29
|
+
label: string;
|
|
30
|
+
value: number;
|
|
31
|
+
tone?: ChartTone;
|
|
32
|
+
}
|
|
33
|
+
/** Props for the BarChart component. */
|
|
34
|
+
export interface BarChartCoreProps {
|
|
35
|
+
title: string;
|
|
36
|
+
showTitle?: boolean;
|
|
37
|
+
items: BarChartItem[];
|
|
38
|
+
formatValue?: (value: number) => string;
|
|
39
|
+
valueTitle?: string;
|
|
40
|
+
label: string;
|
|
41
|
+
}
|
|
42
|
+
export interface DonutSegment {
|
|
43
|
+
value: number;
|
|
44
|
+
tone?: ChartTone | "muted";
|
|
45
|
+
label?: string;
|
|
46
|
+
}
|
|
47
|
+
/** Props for the DonutChart component. */
|
|
48
|
+
export interface DonutChartCoreProps {
|
|
49
|
+
value?: number;
|
|
50
|
+
segments?: DonutSegment[];
|
|
51
|
+
centerLabel?: string;
|
|
52
|
+
caption?: string;
|
|
53
|
+
showLegend?: boolean;
|
|
54
|
+
formatValue?: (value: number) => string;
|
|
55
|
+
size?: number;
|
|
56
|
+
label: string;
|
|
57
|
+
}
|
|
58
|
+
/** Props for the Sparkline component. */
|
|
59
|
+
export interface SparklineCoreProps {
|
|
60
|
+
data: number[];
|
|
61
|
+
tone?: "good" | "bad";
|
|
62
|
+
width?: number;
|
|
63
|
+
height?: number;
|
|
64
|
+
label: string;
|
|
65
|
+
}
|
|
66
|
+
export interface ChartLegendItem {
|
|
67
|
+
id: string;
|
|
68
|
+
label: string;
|
|
69
|
+
color: string;
|
|
70
|
+
}
|
|
71
|
+
/** Props for the ChartLegend component. */
|
|
72
|
+
export interface ChartLegendCoreProps {
|
|
73
|
+
label: string;
|
|
74
|
+
items: ChartLegendItem[];
|
|
75
|
+
hidden?: string[];
|
|
76
|
+
onToggle?: (id: string) => void;
|
|
77
|
+
marker?: "square" | "circle" | "line";
|
|
78
|
+
render?: (item: ChartLegendItem) => ReactNode;
|
|
79
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** Props for the accessible Checkbox control. */
|
|
3
|
+
export interface CheckboxCoreProps {
|
|
4
|
+
/** Rótulo à direita da caixa. */
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
/** Texto de apoio abaixo do rótulo. */
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
/** Etiqueta inline após o rótulo (ex.: um Badge). */
|
|
9
|
+
tag?: ReactNode;
|
|
10
|
+
/** Meta mono à direita da linha. */
|
|
11
|
+
meta?: ReactNode;
|
|
12
|
+
/** Linha com borda selecionável. */
|
|
13
|
+
boxed?: boolean;
|
|
14
|
+
checked?: boolean;
|
|
15
|
+
defaultChecked?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type ChipTone = "neutral" | "critical" | "warning" | "success" | "info";
|
|
3
|
+
export type ChipSelectionMode = "toggle" | "radio";
|
|
4
|
+
/** Props for the selectable Chip control. */
|
|
5
|
+
export interface ChipCoreProps {
|
|
6
|
+
/** Seleção compacta embutida em campos; filtro preserva o padrão. */
|
|
7
|
+
variant?: "filter" | "selection";
|
|
8
|
+
/** Estado selecionado (filtro ativo). */
|
|
9
|
+
selected?: boolean;
|
|
10
|
+
/** Contador à direita (ex.: número de itens no filtro). */
|
|
11
|
+
count?: number;
|
|
12
|
+
/** Ponto semântico opcional para filtros de severidade/status. */
|
|
13
|
+
tone?: ChipTone;
|
|
14
|
+
/** Toggle usa `aria-pressed`; radio usa `role=radio` + `aria-checked`. */
|
|
15
|
+
selectionMode?: ChipSelectionMode;
|
|
16
|
+
/** Revela o check animado quando selecionado. */
|
|
17
|
+
showCheck?: boolean;
|
|
18
|
+
/** Ícone de fechar — dispara onRemove. */
|
|
19
|
+
removable?: boolean;
|
|
20
|
+
onRemove?: () => void;
|
|
21
|
+
leadingIcon?: ReactNode;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type ChoiceCardMode = "single" | "multiple";
|
|
3
|
+
/** Props for the ChoiceCardGroup container. */
|
|
4
|
+
export interface ChoiceCardGroupCoreProps {
|
|
5
|
+
/** `single` = semântica de radio (default); `multiple` = checkboxes. */
|
|
6
|
+
mode?: ChoiceCardMode;
|
|
7
|
+
/** Valor controlado: string (single) ou string[] (multiple). */
|
|
8
|
+
value?: string | string[];
|
|
9
|
+
/** Valor inicial não-controlado. */
|
|
10
|
+
defaultValue?: string | string[];
|
|
11
|
+
/** Callback: recebe string (single) ou string[] (multiple). */
|
|
12
|
+
onChange?: (value: string | string[]) => void;
|
|
13
|
+
/** Rótulo acessível do grupo (obrigatório sem label visível externo). */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** Colunas do grid (default 3; 1 = lista empilhada). */
|
|
16
|
+
columns?: number;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
/** Props for a selectable ChoiceCard. */
|
|
20
|
+
export interface ChoiceCardCoreProps {
|
|
21
|
+
/** Valor único dentro do grupo. */
|
|
22
|
+
value: string;
|
|
23
|
+
/** Título da opção. */
|
|
24
|
+
title: ReactNode;
|
|
25
|
+
/** Descrição curta abaixo do título. */
|
|
26
|
+
description?: ReactNode;
|
|
27
|
+
/** Ícone pequeno inline antes do título (slot). */
|
|
28
|
+
icon?: ReactNode;
|
|
29
|
+
/** Preview grande acima do texto (slot — ex.: amostra de tema). */
|
|
30
|
+
preview?: ReactNode;
|
|
31
|
+
/** Meta/preço (mono) abaixo ou à direita do texto. */
|
|
32
|
+
meta?: ReactNode;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** Avatar de uma opção "pessoa ou equipe". */
|
|
3
|
+
export interface ComboboxOptionAvatar {
|
|
4
|
+
name: string;
|
|
5
|
+
src?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
/** Uma opção sugerida pelo Combobox. */
|
|
9
|
+
export interface ComboboxOption {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
lead?: string;
|
|
13
|
+
meta?: string;
|
|
14
|
+
avatar?: ComboboxOptionAvatar;
|
|
15
|
+
description?: string;
|
|
16
|
+
group?: string;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Props for the Combobox field. */
|
|
20
|
+
export interface ComboboxCoreProps {
|
|
21
|
+
options: ComboboxOption[];
|
|
22
|
+
value?: string | null;
|
|
23
|
+
defaultValue?: string | null;
|
|
24
|
+
onChange?: (option: ComboboxOption | null) => void;
|
|
25
|
+
inputValue?: string;
|
|
26
|
+
onInputValueChange?: (text: string) => void;
|
|
27
|
+
label?: string;
|
|
28
|
+
filter?: boolean | ((option: ComboboxOption, query: string) => boolean);
|
|
29
|
+
icon?: ReactNode;
|
|
30
|
+
emptyMessage?: string;
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
clearable?: boolean;
|
|
33
|
+
error?: string;
|
|
34
|
+
hint?: string;
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface MultiselectOption {
|
|
39
|
+
value: string;
|
|
40
|
+
label: string;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
}
|
|
43
|
+
/** Props for the Multiselect field. */
|
|
44
|
+
export interface MultiselectCoreProps {
|
|
45
|
+
options: MultiselectOption[];
|
|
46
|
+
value?: string[];
|
|
47
|
+
defaultValue?: string[];
|
|
48
|
+
onChange?: (values: string[]) => void;
|
|
49
|
+
label?: string;
|
|
50
|
+
maxVisibleChips?: number;
|
|
51
|
+
listPlacement?: "inline" | "overlay";
|
|
52
|
+
emptyMessage?: string;
|
|
53
|
+
error?: string;
|
|
54
|
+
hint?: string;
|
|
55
|
+
placeholder?: string;
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
}
|