@hubbiparts/uikit 0.2.1 → 0.3.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/dist/components/ui/app-shell.d.ts +34 -0
- package/dist/components/ui/backoffice-charts.d.ts +29 -0
- package/dist/components/ui/data-table.d.ts +37 -0
- package/dist/components/ui/date-range-picker.d.ts +20 -0
- package/dist/components/ui/detail-sheet.d.ts +18 -0
- package/dist/components/ui/filter-bar.d.ts +19 -0
- package/dist/components/ui/index.d.ts +10 -1
- package/dist/components/ui/page-header.d.ts +17 -0
- package/dist/components/ui/stat-card.d.ts +19 -0
- package/dist/components/ui/status-badge.d.ts +12 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2084 -1319
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/skills/hubbiparts-uikit/SKILL.md +17 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SidebarTrigger } from './sidebar';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface AppShellNavItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
href: string;
|
|
7
|
+
icon?: React.ComponentType<{
|
|
8
|
+
className?: string;
|
|
9
|
+
}>;
|
|
10
|
+
badge?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface AppShellNavSection {
|
|
13
|
+
label: string;
|
|
14
|
+
items: readonly AppShellNavItem[];
|
|
15
|
+
}
|
|
16
|
+
export interface AppShellBreadcrumb {
|
|
17
|
+
label: string;
|
|
18
|
+
href?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface AppShellProps extends React.ComponentProps<'div'> {
|
|
21
|
+
navSections: readonly AppShellNavSection[];
|
|
22
|
+
activeNavId?: string;
|
|
23
|
+
onNavigate?: (item: AppShellNavItem) => void;
|
|
24
|
+
logo?: React.ReactNode;
|
|
25
|
+
sidebarFooter?: React.ReactNode;
|
|
26
|
+
topbar?: React.ReactNode;
|
|
27
|
+
breadcrumbs?: readonly AppShellBreadcrumb[];
|
|
28
|
+
defaultSidebarOpen?: boolean;
|
|
29
|
+
sidebarOpen?: boolean;
|
|
30
|
+
onSidebarOpenChange?: (open: boolean) => void;
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
}
|
|
33
|
+
declare const AppShell: React.ForwardRefExoticComponent<Omit<AppShellProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
export { AppShell, SidebarTrigger as AppShellSidebarTrigger };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type BackofficeChartValue = string | number;
|
|
3
|
+
export type BackofficeChartPoint = Record<string, BackofficeChartValue>;
|
|
4
|
+
export interface BackofficeChartSeries {
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
color?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface BackofficeChartProps {
|
|
10
|
+
title: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
data: readonly BackofficeChartPoint[];
|
|
13
|
+
series: readonly BackofficeChartSeries[];
|
|
14
|
+
xKey?: string;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
emptyState?: React.ReactNode;
|
|
17
|
+
height?: number;
|
|
18
|
+
className?: string;
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface BackofficeDonutChartProps extends Omit<BackofficeChartProps, 'xKey'> {
|
|
22
|
+
nameKey: string;
|
|
23
|
+
valueKey: string;
|
|
24
|
+
}
|
|
25
|
+
declare const BackofficeLineChart: ({ data, series, xKey, ...props }: BackofficeChartProps) => React.JSX.Element;
|
|
26
|
+
declare const BackofficeAreaChart: ({ data, series, xKey, ...props }: BackofficeChartProps) => React.JSX.Element;
|
|
27
|
+
declare const BackofficeBarChart: ({ data, series, xKey, ...props }: BackofficeChartProps) => React.JSX.Element;
|
|
28
|
+
declare const BackofficeDonutChart: ({ data, series, nameKey, valueKey, ...props }: BackofficeDonutChartProps) => React.JSX.Element;
|
|
29
|
+
export { BackofficeLineChart, BackofficeAreaChart, BackofficeBarChart, BackofficeDonutChart };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type DataTableSortDirection = 'asc' | 'desc';
|
|
3
|
+
export interface DataTableSorting {
|
|
4
|
+
id: string;
|
|
5
|
+
direction: DataTableSortDirection;
|
|
6
|
+
}
|
|
7
|
+
export interface DataTableColumn<T> {
|
|
8
|
+
id: string;
|
|
9
|
+
header: React.ReactNode;
|
|
10
|
+
accessorKey?: keyof T;
|
|
11
|
+
cell?: (row: T) => React.ReactNode;
|
|
12
|
+
sortable?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface DataTableProps<T> {
|
|
16
|
+
columns: readonly DataTableColumn<T>[];
|
|
17
|
+
rows: readonly T[];
|
|
18
|
+
rowId: (row: T, index: number) => string;
|
|
19
|
+
total: number;
|
|
20
|
+
page: number;
|
|
21
|
+
pageSize: number;
|
|
22
|
+
sorting?: DataTableSorting | null;
|
|
23
|
+
onPageChange: (page: number) => void;
|
|
24
|
+
onSortChange: (sorting: DataTableSorting | null) => void;
|
|
25
|
+
selectedRowIds?: ReadonlySet<string>;
|
|
26
|
+
onRowSelectionChange?: (rowIds: Set<string>) => void;
|
|
27
|
+
loading?: boolean;
|
|
28
|
+
error?: React.ReactNode;
|
|
29
|
+
emptyState?: React.ReactNode;
|
|
30
|
+
density?: 'compact' | 'default';
|
|
31
|
+
stickyHeader?: boolean;
|
|
32
|
+
caption?: string;
|
|
33
|
+
ariaLabel?: string;
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
declare const DataTable: <T>({ columns, rows, rowId, total, page, pageSize, sorting, onPageChange, onSortChange, selectedRowIds, onRowSelectionChange, loading, error, emptyState, density, stickyHeader, caption, ariaLabel, className, }: DataTableProps<T>) => React.JSX.Element;
|
|
37
|
+
export { DataTable };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
import { DateRange } from 'react-day-picker';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export type DateRangePreset = 'today' | '7d' | '30d' | 'month';
|
|
5
|
+
export interface DateRangePickerProps {
|
|
6
|
+
value?: DateRange;
|
|
7
|
+
onChange: (value: DateRange | undefined) => void;
|
|
8
|
+
presets?: readonly DateRangePreset[];
|
|
9
|
+
minDate?: Date;
|
|
10
|
+
maxDate?: Date;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
clearable?: boolean;
|
|
14
|
+
locale?: Locale;
|
|
15
|
+
className?: string;
|
|
16
|
+
'aria-label'?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const getPresetRange: (preset: DateRangePreset, now?: Date) => DateRange;
|
|
19
|
+
declare const DateRangePicker: ({ value, onChange, presets, minDate, maxDate, disabled, placeholder, clearable, locale, className, "aria-label": ariaLabel, }: DateRangePickerProps) => React.JSX.Element;
|
|
20
|
+
export { DateRangePicker, getPresetRange };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type DetailSheetSide = 'left' | 'right';
|
|
3
|
+
export type DetailSheetWidth = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface DetailSheetProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
side?: DetailSheetSide;
|
|
10
|
+
width?: DetailSheetWidth;
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
error?: React.ReactNode;
|
|
13
|
+
actions?: React.ReactNode;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const DetailSheet: ({ open, onOpenChange, title, description, side, width, loading, error, actions, children, className, }: DetailSheetProps) => React.JSX.Element;
|
|
18
|
+
export { DetailSheet };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface FilterBarChip {
|
|
3
|
+
id: string;
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
onRemove?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface FilterBarProps extends React.ComponentProps<'form'> {
|
|
8
|
+
searchValue?: string;
|
|
9
|
+
onSearchChange?: (value: string) => void;
|
|
10
|
+
searchPlaceholder?: string;
|
|
11
|
+
searchLabel?: string;
|
|
12
|
+
filters?: React.ReactNode;
|
|
13
|
+
activeFilters?: readonly FilterBarChip[];
|
|
14
|
+
onClear?: () => void;
|
|
15
|
+
clearLabel?: string;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const FilterBar: React.ForwardRefExoticComponent<Omit<FilterBarProps, "ref"> & React.RefAttributes<HTMLFormElement>>;
|
|
19
|
+
export { FilterBar };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const publicComponentSlugs: readonly ["accordion", "alert", "alert-dialog", "aspect-ratio", "attachment", "avatar", "badge", "breadcrumb", "bubble", "button", "button-group", "calendar", "card", "carousel", "chart", "checkbox", "collapsible", "combobox", "command", "context-menu", "dialog", "direction", "drawer", "dropdown-menu", "empty", "field", "hover-card", "input", "input-group", "input-otp", "item", "kbd", "label", "marker", "menubar", "message", "message-scroller", "native-select", "navigation-menu", "pagination", "popover", "progress", "questionnaire", "radio-group", "resizable", "scroll-area", "select", "separator", "sheet", "sidebar", "skeleton", "slider", "sonner", "spinner", "switch", "table", "tabs", "textarea", "toggle", "toggle-group", "tooltip"];
|
|
1
|
+
export declare const publicComponentSlugs: readonly ["accordion", "alert", "alert-dialog", "aspect-ratio", "attachment", "avatar", "badge", "breadcrumb", "bubble", "button", "button-group", "calendar", "card", "carousel", "chart", "checkbox", "collapsible", "combobox", "command", "context-menu", "dialog", "direction", "drawer", "dropdown-menu", "empty", "field", "hover-card", "input", "input-group", "input-otp", "item", "kbd", "label", "marker", "menubar", "message", "message-scroller", "native-select", "navigation-menu", "pagination", "popover", "progress", "questionnaire", "radio-group", "resizable", "scroll-area", "select", "separator", "sheet", "sidebar", "skeleton", "slider", "sonner", "spinner", "switch", "table", "tabs", "textarea", "toggle", "toggle-group", "tooltip", "app-shell", "backoffice-charts", "data-table", "date-range-picker", "detail-sheet", "filter-bar", "page-header", "stat-card", "status-badge"];
|
|
2
2
|
export * from './accordion';
|
|
3
3
|
export * from './alert';
|
|
4
4
|
export * from './alert-dialog';
|
|
@@ -60,3 +60,12 @@ export * from './textarea';
|
|
|
60
60
|
export * from './toggle';
|
|
61
61
|
export * from './toggle-group';
|
|
62
62
|
export * from './tooltip';
|
|
63
|
+
export * from './app-shell';
|
|
64
|
+
export * from './backoffice-charts';
|
|
65
|
+
export * from './data-table';
|
|
66
|
+
export * from './date-range-picker';
|
|
67
|
+
export * from './detail-sheet';
|
|
68
|
+
export * from './filter-bar';
|
|
69
|
+
export * from './page-header';
|
|
70
|
+
export * from './stat-card';
|
|
71
|
+
export * from './status-badge';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface PageHeaderBreadcrumb {
|
|
3
|
+
label: string;
|
|
4
|
+
href?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PageHeaderProps extends React.ComponentProps<'header'> {
|
|
7
|
+
eyebrow?: React.ReactNode;
|
|
8
|
+
title: string;
|
|
9
|
+
description?: React.ReactNode;
|
|
10
|
+
breadcrumbs?: readonly PageHeaderBreadcrumb[];
|
|
11
|
+
actions?: React.ReactNode;
|
|
12
|
+
secondaryActions?: React.ReactNode;
|
|
13
|
+
backHref?: string;
|
|
14
|
+
status?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare const PageHeader: React.ForwardRefExoticComponent<Omit<PageHeaderProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
17
|
+
export { PageHeader };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Card } from './card';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type StatCardIntent = 'neutral' | 'positive' | 'warning' | 'negative';
|
|
4
|
+
export type StatCardDeltaDirection = 'up' | 'down' | 'flat';
|
|
5
|
+
export interface StatCardProps extends React.ComponentProps<typeof Card> {
|
|
6
|
+
label: React.ReactNode;
|
|
7
|
+
value: React.ReactNode;
|
|
8
|
+
unit?: React.ReactNode;
|
|
9
|
+
delta?: React.ReactNode;
|
|
10
|
+
deltaDirection?: StatCardDeltaDirection;
|
|
11
|
+
comparison?: React.ReactNode;
|
|
12
|
+
trend?: React.ReactNode;
|
|
13
|
+
icon?: React.ReactNode;
|
|
14
|
+
href?: string;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
intent?: StatCardIntent;
|
|
17
|
+
}
|
|
18
|
+
declare const StatCard: React.ForwardRefExoticComponent<Omit<StatCardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export { StatCard };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Badge } from './badge';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type StatusBadgeTone = 'neutral' | 'info' | 'success' | 'warning' | 'error';
|
|
4
|
+
export type StatusBadgeSize = 'sm' | 'md';
|
|
5
|
+
export interface StatusBadgeProps extends React.ComponentProps<typeof Badge> {
|
|
6
|
+
tone?: StatusBadgeTone;
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
showDot?: boolean;
|
|
9
|
+
size?: StatusBadgeSize;
|
|
10
|
+
}
|
|
11
|
+
declare const StatusBadge: React.ForwardRefExoticComponent<Omit<StatusBadgeProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export { StatusBadge };
|