@moving-walls/design-system 1.0.23 → 2.0.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/AdvancedTable/index.d.ts +3 -0
- package/dist/components/ui/AdvancedTable/types.d.ts +51 -0
- package/dist/components/ui/AdvancedTable/useAdvancedTable.d.ts +27 -0
- package/dist/components/ui/AgGridTable/types.d.ts +2 -0
- package/dist/components/ui/Calendar/index.d.ts +3 -0
- package/dist/components/ui/Calendar/types.d.ts +14 -0
- package/dist/components/ui/Calendar/useCalendar.d.ts +26 -0
- package/dist/components/ui/CollapsibleInfoPanel.d.ts +12 -0
- package/dist/components/ui/DateRangePicker.d.ts +6 -1
- package/dist/components/ui/DesktopOnly.d.ts +8 -0
- package/dist/components/ui/DragDrop/DragDropZone.d.ts +14 -0
- package/dist/components/ui/DragDrop/FilePreview.d.ts +7 -0
- package/dist/components/ui/DragDrop/SortableList.d.ts +8 -0
- package/dist/components/ui/DragDrop/index.d.ts +9 -0
- package/dist/components/ui/DragDrop/types.d.ts +12 -0
- package/dist/components/ui/DragDrop/useDragDrop.d.ts +16 -0
- package/dist/components/ui/FocusScope.d.ts +14 -0
- package/dist/components/ui/MobileDataCard.d.ts +18 -0
- package/dist/components/ui/MobileOnly.d.ts +8 -0
- package/dist/components/ui/MobilePagination.d.ts +10 -0
- package/dist/components/ui/MobileToolbar.d.ts +12 -0
- package/dist/components/ui/ResponsiveStack.d.ts +14 -0
- package/dist/components/ui/ScheduleGrid.d.ts +6 -1
- package/dist/components/ui/TimeRangePicker.d.ts +8 -1
- package/dist/components/ui/VisuallyHidden.d.ts +10 -0
- package/dist/components/ui/index.d.ts +22 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useMediaQuery.d.ts +6 -0
- package/dist/hooks/useResponsiveSheet.d.ts +19 -0
- package/dist/index.esm.js +794 -32
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +803 -30
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { useAdvancedTable } from './useAdvancedTable';
|
|
2
|
+
export type { UseAdvancedTableOptions } from './useAdvancedTable';
|
|
3
|
+
export type { AdvancedTableColumn, AdvancedTableSort, AdvancedTableFilter, AdvancedTableState, AdvancedTableColumnType, AdvancedTableSortDirection, AdvancedTableFilterOperator, AdvancedTableSelectionMode, AdvancedTableDensity, } from './types';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export type AdvancedTableColumnType = 'text' | 'number' | 'date' | 'boolean' | 'badge' | 'progress' | 'image' | 'link' | 'custom';
|
|
2
|
+
export type AdvancedTableSortDirection = 'asc' | 'desc' | null;
|
|
3
|
+
export type AdvancedTableFilterOperator = 'equals' | 'contains' | 'startsWith' | 'endsWith' | 'gt' | 'lt' | 'gte' | 'lte' | 'between' | 'in' | 'notIn';
|
|
4
|
+
export type AdvancedTableSelectionMode = 'none' | 'single' | 'multiple';
|
|
5
|
+
export type AdvancedTableDensity = 'compact' | 'normal' | 'comfortable';
|
|
6
|
+
export interface AdvancedTableColumn<T = unknown> {
|
|
7
|
+
id: string;
|
|
8
|
+
header: string | React.ReactNode;
|
|
9
|
+
accessorKey?: keyof T | string;
|
|
10
|
+
accessorFn?: (row: T) => unknown;
|
|
11
|
+
cell?: (value: unknown, row: T, column: AdvancedTableColumn<T>) => React.ReactNode;
|
|
12
|
+
sortable?: boolean;
|
|
13
|
+
filterable?: boolean;
|
|
14
|
+
searchable?: boolean;
|
|
15
|
+
type?: AdvancedTableColumnType;
|
|
16
|
+
width?: number | string;
|
|
17
|
+
minWidth?: number;
|
|
18
|
+
maxWidth?: number;
|
|
19
|
+
align?: 'left' | 'center' | 'right';
|
|
20
|
+
sticky?: 'left' | 'right';
|
|
21
|
+
resizable?: boolean;
|
|
22
|
+
hidden?: boolean;
|
|
23
|
+
pinned?: boolean;
|
|
24
|
+
freezable?: boolean;
|
|
25
|
+
aggregate?: 'sum' | 'avg' | 'count' | 'min' | 'max' | 'custom';
|
|
26
|
+
aggregateFn?: (values: unknown[]) => unknown;
|
|
27
|
+
footer?: React.ReactNode | ((values: unknown[]) => React.ReactNode);
|
|
28
|
+
meta?: Record<string, unknown>;
|
|
29
|
+
}
|
|
30
|
+
export interface AdvancedTableSort {
|
|
31
|
+
columnId: string;
|
|
32
|
+
direction: AdvancedTableSortDirection;
|
|
33
|
+
}
|
|
34
|
+
export interface AdvancedTableFilter {
|
|
35
|
+
columnId: string;
|
|
36
|
+
value: unknown;
|
|
37
|
+
operator?: AdvancedTableFilterOperator;
|
|
38
|
+
}
|
|
39
|
+
export interface AdvancedTableState {
|
|
40
|
+
sorting: AdvancedTableSort[];
|
|
41
|
+
filters: AdvancedTableFilter[];
|
|
42
|
+
globalFilter: string;
|
|
43
|
+
columnVisibility: Record<string, boolean>;
|
|
44
|
+
columnOrder: string[];
|
|
45
|
+
columnSizing: Record<string, number>;
|
|
46
|
+
density: AdvancedTableDensity;
|
|
47
|
+
frozenColumns: {
|
|
48
|
+
left: string[];
|
|
49
|
+
right: string[];
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AdvancedTableColumn, AdvancedTableSort, AdvancedTableFilter, AdvancedTableState, AdvancedTableDensity } from './types';
|
|
2
|
+
export interface UseAdvancedTableOptions<T> {
|
|
3
|
+
data: T[];
|
|
4
|
+
columns: AdvancedTableColumn<T>[];
|
|
5
|
+
initialState?: Partial<AdvancedTableState>;
|
|
6
|
+
getRowId?: (row: T, index: number) => string | number;
|
|
7
|
+
}
|
|
8
|
+
export declare function useAdvancedTable<T>({ data, columns, initialState, getRowId, }: UseAdvancedTableOptions<T>): {
|
|
9
|
+
processedData: T[];
|
|
10
|
+
visibleColumns: AdvancedTableColumn<T>[];
|
|
11
|
+
state: AdvancedTableState;
|
|
12
|
+
sorting: AdvancedTableSort[];
|
|
13
|
+
filters: AdvancedTableFilter[];
|
|
14
|
+
globalFilter: string;
|
|
15
|
+
density: AdvancedTableDensity;
|
|
16
|
+
selectedRows: Set<string | number>;
|
|
17
|
+
toggleSort: (columnId: string) => void;
|
|
18
|
+
addFilter: (filter: AdvancedTableFilter) => void;
|
|
19
|
+
removeFilter: (columnId: string) => void;
|
|
20
|
+
clearFilters: () => void;
|
|
21
|
+
setGlobalFilter: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
22
|
+
setDensity: import("react").Dispatch<import("react").SetStateAction<AdvancedTableDensity>>;
|
|
23
|
+
toggleColumnVisibility: (columnId: string) => void;
|
|
24
|
+
toggleRowSelection: (rowId: string | number) => void;
|
|
25
|
+
selectAllRows: () => void;
|
|
26
|
+
clearSelection: () => void;
|
|
27
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface CalendarEvent {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
date: Date;
|
|
5
|
+
color?: string;
|
|
6
|
+
allDay?: boolean;
|
|
7
|
+
startTime?: string;
|
|
8
|
+
endTime?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
category?: string;
|
|
11
|
+
attendees?: string[];
|
|
12
|
+
location?: string;
|
|
13
|
+
}
|
|
14
|
+
export type CalendarView = 'month' | 'week' | 'day';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CalendarEvent, CalendarView } from './types';
|
|
2
|
+
export interface UseCalendarOptions {
|
|
3
|
+
value?: Date;
|
|
4
|
+
events?: CalendarEvent[];
|
|
5
|
+
view?: CalendarView;
|
|
6
|
+
onViewChange?: (view: CalendarView) => void;
|
|
7
|
+
onChange?: (date: Date) => void;
|
|
8
|
+
hourFormat?: 12 | 24;
|
|
9
|
+
}
|
|
10
|
+
export declare function useCalendar({ value, events, view, onViewChange, onChange, hourFormat, }: UseCalendarOptions): {
|
|
11
|
+
currentDate: Date;
|
|
12
|
+
currentView: CalendarView;
|
|
13
|
+
today: Date;
|
|
14
|
+
year: number;
|
|
15
|
+
month: number;
|
|
16
|
+
handleViewChange: (newView: CalendarView) => void;
|
|
17
|
+
handleDateSelect: (date: Date) => void;
|
|
18
|
+
navigateMonth: (delta: number) => void;
|
|
19
|
+
navigateWeek: (delta: number) => void;
|
|
20
|
+
navigateDay: (delta: number) => void;
|
|
21
|
+
goToToday: () => void;
|
|
22
|
+
getEventsForDate: (date: Date) => CalendarEvent[];
|
|
23
|
+
getEventsForTimeSlot: (date: Date, timeSlot: string) => CalendarEvent[];
|
|
24
|
+
formatTime: (time: string) => string;
|
|
25
|
+
getWeekDates: (date: Date) => Date[];
|
|
26
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CollapsibleInfoPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
title: string;
|
|
3
|
+
icon?: React.ReactNode;
|
|
4
|
+
defaultOpen?: boolean;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A collapsible panel for secondary information on mobile.
|
|
9
|
+
* Wraps the design system Accordion for converting sidebar panels
|
|
10
|
+
* (tips, insights, help text) into expandable sections.
|
|
11
|
+
*/
|
|
12
|
+
export declare const CollapsibleInfoPanel: import("react").ForwardRefExoticComponent<CollapsibleInfoPanelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -6,6 +6,11 @@ interface DateRangePickerProps {
|
|
|
6
6
|
value?: DateRange;
|
|
7
7
|
onChange?: (range: DateRange) => void;
|
|
8
8
|
placeholder?: string;
|
|
9
|
+
/** Labels for i18n. Override to translate. */
|
|
10
|
+
labels?: {
|
|
11
|
+
selectStart?: string;
|
|
12
|
+
selectEnd?: string;
|
|
13
|
+
};
|
|
9
14
|
disabled?: boolean;
|
|
10
15
|
required?: boolean;
|
|
11
16
|
clearable?: boolean;
|
|
@@ -21,5 +26,5 @@ interface DateRangePickerProps {
|
|
|
21
26
|
}>;
|
|
22
27
|
align?: 'left' | 'right';
|
|
23
28
|
}
|
|
24
|
-
export declare function DateRangePicker({ value, onChange, placeholder, disabled, required, clearable, minDate, maxDate, numberOfMonths, className, format, presets, align }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function DateRangePicker({ value, onChange, placeholder, labels, disabled, required, clearable, minDate, maxDate, numberOfMonths, className, format, presets, align }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
25
30
|
export default DateRangePicker;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface DesktopOnlyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Renders children only on desktop (hidden below md breakpoint).
|
|
6
|
+
* Uses CSS-based visibility — both layouts are in the DOM.
|
|
7
|
+
*/
|
|
8
|
+
export declare const DesktopOnly: import("react").ForwardRefExoticComponent<DesktopOnlyProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface DragDropZoneProps {
|
|
3
|
+
onFileDrop: (files: File[]) => void;
|
|
4
|
+
accept?: string[];
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
maxSize?: number;
|
|
7
|
+
maxFiles?: number;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
showPreview?: boolean;
|
|
12
|
+
compact?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare function DragDropZone({ onFileDrop, accept, multiple, maxSize, maxFiles, disabled, className, children, showPreview, compact }: DragDropZoneProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DroppedFile } from './types';
|
|
2
|
+
export interface FilePreviewProps {
|
|
3
|
+
file: DroppedFile;
|
|
4
|
+
onRemove: () => void;
|
|
5
|
+
showActions?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function FilePreview({ file, onRemove, showActions }: FilePreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SortableItem } from './types';
|
|
2
|
+
export interface SortableListProps {
|
|
3
|
+
items: SortableItem[];
|
|
4
|
+
onReorder: (items: SortableItem[]) => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
itemClassName?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function SortableList({ items, onReorder, className, itemClassName }: SortableListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { useDragDrop } from './useDragDrop';
|
|
2
|
+
export { DragDropZone } from './DragDropZone';
|
|
3
|
+
export { FilePreview } from './FilePreview';
|
|
4
|
+
export type { FilePreviewProps } from './FilePreview';
|
|
5
|
+
export { SortableList } from './SortableList';
|
|
6
|
+
export type { SortableListProps } from './SortableList';
|
|
7
|
+
export type { DroppedFile, SortableItem } from './types';
|
|
8
|
+
export { DragDropZone as DragDrop } from './DragDropZone';
|
|
9
|
+
export type { DragDropZoneProps as DragDropProps } from './DragDropZone';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface DroppedFile {
|
|
2
|
+
id: string;
|
|
3
|
+
file: File;
|
|
4
|
+
status: 'pending' | 'uploading' | 'success' | 'error';
|
|
5
|
+
progress?: number;
|
|
6
|
+
error?: string;
|
|
7
|
+
preview?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SortableItem {
|
|
10
|
+
id: string;
|
|
11
|
+
content: React.ReactNode;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare function useDragDrop({ onDrop, accept, multiple, maxSize, onError }: {
|
|
2
|
+
onDrop: (files: File[]) => void;
|
|
3
|
+
accept?: string[];
|
|
4
|
+
multiple?: boolean;
|
|
5
|
+
maxSize?: number;
|
|
6
|
+
onError?: (error: string) => void;
|
|
7
|
+
}): {
|
|
8
|
+
isDragActive: boolean;
|
|
9
|
+
isDragReject: boolean;
|
|
10
|
+
dragProps: {
|
|
11
|
+
onDrop: (e: React.DragEvent) => void;
|
|
12
|
+
onDragEnter: (e: React.DragEvent) => void;
|
|
13
|
+
onDragLeave: (e: React.DragEvent) => void;
|
|
14
|
+
onDragOver: (e: React.DragEvent) => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface FocusScopeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
/** Whether to trap focus within this scope. */
|
|
3
|
+
trapped?: boolean;
|
|
4
|
+
/** Whether to auto-focus the first focusable element on mount. */
|
|
5
|
+
autoFocus?: boolean;
|
|
6
|
+
/** Called when Escape is pressed while focus is within the scope. */
|
|
7
|
+
onEscape?: () => void;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Traps keyboard focus within its children.
|
|
12
|
+
* Use in modals, dialogs, and sheets to prevent focus from escaping.
|
|
13
|
+
*/
|
|
14
|
+
export declare const FocusScope: import("react").ForwardRefExoticComponent<FocusScopeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface MobileDataCardField {
|
|
2
|
+
label: string;
|
|
3
|
+
value: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export interface MobileDataCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
6
|
+
title: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
statusBadge?: React.ReactNode;
|
|
9
|
+
fields: MobileDataCardField[];
|
|
10
|
+
actions?: React.ReactNode;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A mobile-optimized card for displaying a single data row.
|
|
15
|
+
* Replaces AG Grid table rows on mobile viewports.
|
|
16
|
+
* Minimum 44px touch target when clickable.
|
|
17
|
+
*/
|
|
18
|
+
export declare const MobileDataCard: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<MobileDataCardProps & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface MobileOnlyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Renders children only on mobile (hidden on md+ screens).
|
|
6
|
+
* Uses CSS-based visibility — both layouts are in the DOM.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MobileOnly: import("react").ForwardRefExoticComponent<MobileOnlyProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface MobilePaginationProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
page: number;
|
|
3
|
+
totalPages: number;
|
|
4
|
+
onPageChange: (page: number) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Prev/Next pagination for mobile card lists.
|
|
8
|
+
* Shows "Page X of Y" with disabled states at boundaries.
|
|
9
|
+
*/
|
|
10
|
+
export declare const MobilePagination: import("react").ForwardRefExoticComponent<MobilePaginationProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface MobileToolbarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
searchValue: string;
|
|
3
|
+
onSearchChange: (value: string) => void;
|
|
4
|
+
searchPlaceholder?: string;
|
|
5
|
+
onFilterClick?: () => void;
|
|
6
|
+
activeFilterCount?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A mobile-optimized toolbar with search input and optional filter button.
|
|
10
|
+
* Filter button shows an active count badge when filters are applied.
|
|
11
|
+
*/
|
|
12
|
+
export declare const MobileToolbar: import("react").ForwardRefExoticComponent<MobileToolbarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ResponsiveStackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
/** Breakpoint at which to switch from column to row. Defaults to 'md'. */
|
|
3
|
+
breakpoint?: 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
/** Gap between items (Tailwind gap-N value). */
|
|
5
|
+
gap?: number;
|
|
6
|
+
/** Whether to reverse the column direction on mobile. */
|
|
7
|
+
reverse?: boolean;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Stacks children vertically on mobile, horizontally on desktop.
|
|
12
|
+
* Replaces the common `flex flex-col md:flex-row` pattern.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ResponsiveStack: import("react").ForwardRefExoticComponent<ResponsiveStackProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -23,6 +23,11 @@ export interface ScheduleGridProps {
|
|
|
23
23
|
label: string;
|
|
24
24
|
}>;
|
|
25
25
|
showPresets?: boolean;
|
|
26
|
+
/** Labels for i18n. Override to translate. */
|
|
27
|
+
labels?: {
|
|
28
|
+
selectAll?: string;
|
|
29
|
+
deselectAll?: string;
|
|
30
|
+
};
|
|
26
31
|
}
|
|
27
|
-
export declare function ScheduleGrid({ value, onChange, flightStartDate, flightEndDate, className, presets, showPresets, }: ScheduleGridProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function ScheduleGrid({ value, onChange, flightStartDate, flightEndDate, className, presets, showPresets, labels, }: ScheduleGridProps): import("react/jsx-runtime").JSX.Element;
|
|
28
33
|
export default ScheduleGrid;
|
|
@@ -14,10 +14,17 @@ interface TimeRangePickerProps {
|
|
|
14
14
|
minTime?: string;
|
|
15
15
|
maxTime?: string;
|
|
16
16
|
className?: string;
|
|
17
|
+
/** Labels for i18n. Override to translate. */
|
|
18
|
+
labels?: {
|
|
19
|
+
fromTime?: string;
|
|
20
|
+
toTime?: string;
|
|
21
|
+
selectStart?: string;
|
|
22
|
+
selectEnd?: string;
|
|
23
|
+
};
|
|
17
24
|
presets?: Array<{
|
|
18
25
|
label: string;
|
|
19
26
|
range: TimeRange;
|
|
20
27
|
}>;
|
|
21
28
|
}
|
|
22
|
-
export declare function TimeRangePicker({ value, onChange, placeholder, disabled, required, clearable, format, minuteStep, minTime, maxTime, className, presets }: TimeRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function TimeRangePicker({ value, onChange, placeholder, disabled, required, clearable, format, minuteStep, minTime, maxTime, className, labels, presets }: TimeRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
23
30
|
export default TimeRangePicker;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface VisuallyHiddenProps extends React.HTMLAttributes<HTMLElement> {
|
|
2
|
+
/** The HTML element to render. Defaults to 'span'. */
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Renders content that is visually hidden but accessible to screen readers.
|
|
8
|
+
* Use this instead of ad-hoc `sr-only` classes for consistent accessibility.
|
|
9
|
+
*/
|
|
10
|
+
export declare const VisuallyHidden: import("react").ForwardRefExoticComponent<VisuallyHiddenProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -37,6 +37,7 @@ export { Skeleton } from './Skeleton';
|
|
|
37
37
|
export { Separator } from './Separator';
|
|
38
38
|
export { Table, TableHeader, TableBody, TableRow, TableHead, TableCell } from './Table';
|
|
39
39
|
export { AdvancedTable } from './AdvancedTable';
|
|
40
|
+
export { useAdvancedTable } from './AdvancedTable/useAdvancedTable';
|
|
40
41
|
export type { AdvancedTableColumn, AdvancedTableSort, AdvancedTableFilter, AdvancedTableSelection, AdvancedTablePagination, AdvancedTableRowAction, AdvancedTableBulkAction, AdvancedTableToolbarAction, AdvancedTableState } from './AdvancedTable';
|
|
41
42
|
export { EmptyState, NoDataEmptyState, NoResultsEmptyState } from './EmptyState';
|
|
42
43
|
export { Chip, Tag } from './Chip';
|
|
@@ -75,6 +76,8 @@ export { ToastProvider, useToast } from './Toast';
|
|
|
75
76
|
export type { Toast } from './Toast';
|
|
76
77
|
export { Command, CommandGroup, CommandItem, CommandSeparator } from './Command';
|
|
77
78
|
export { Calendar } from './Calendar';
|
|
79
|
+
export { useCalendar } from './Calendar/useCalendar';
|
|
80
|
+
export type { CalendarEvent, CalendarView } from './Calendar/types';
|
|
78
81
|
export { SnackbarProvider, useSnackbar, useSnackbarHelpers } from './Snackbar';
|
|
79
82
|
export { PanelGroup, Panel, PanelResizer, PanelHeader, SplitPanel, StackPanel, SidebarPanel } from './Panel';
|
|
80
83
|
export { Notification, NotificationList, NotificationBadge, NotificationBell } from './Notification';
|
|
@@ -84,10 +87,29 @@ export { Thumbnail, VideoThumbnail, ImageThumbnail, ThumbnailGallery } from './T
|
|
|
84
87
|
export { Image } from './Image';
|
|
85
88
|
export type { ImageProps } from './Image';
|
|
86
89
|
export { DragDrop, SortableList, useDragDrop } from './DragDrop';
|
|
90
|
+
export type { DroppedFile, SortableListProps } from './DragDrop';
|
|
87
91
|
export { Heading, Text, Label, Display } from './Typography';
|
|
88
92
|
export type { HeadingProps, TextProps, LabelProps, DisplayProps } from './Typography';
|
|
89
93
|
export { AgGridTable } from './AgGridTable';
|
|
90
94
|
export type { AgGridSortState, AgGridSortDirection, AgGridTableProps, AgGridTableServerSideConfig, ColDef } from './AgGridTable';
|
|
95
|
+
export { MobileDataCard } from './MobileDataCard';
|
|
96
|
+
export type { MobileDataCardProps, MobileDataCardField } from './MobileDataCard';
|
|
97
|
+
export { MobilePagination } from './MobilePagination';
|
|
98
|
+
export type { MobilePaginationProps } from './MobilePagination';
|
|
99
|
+
export { MobileToolbar } from './MobileToolbar';
|
|
100
|
+
export type { MobileToolbarProps } from './MobileToolbar';
|
|
101
|
+
export { MobileOnly } from './MobileOnly';
|
|
102
|
+
export type { MobileOnlyProps } from './MobileOnly';
|
|
103
|
+
export { DesktopOnly } from './DesktopOnly';
|
|
104
|
+
export type { DesktopOnlyProps } from './DesktopOnly';
|
|
105
|
+
export { ResponsiveStack } from './ResponsiveStack';
|
|
106
|
+
export type { ResponsiveStackProps } from './ResponsiveStack';
|
|
107
|
+
export { CollapsibleInfoPanel } from './CollapsibleInfoPanel';
|
|
108
|
+
export type { CollapsibleInfoPanelProps } from './CollapsibleInfoPanel';
|
|
109
|
+
export { VisuallyHidden } from './VisuallyHidden';
|
|
110
|
+
export type { VisuallyHiddenProps } from './VisuallyHidden';
|
|
111
|
+
export { FocusScope } from './FocusScope';
|
|
112
|
+
export type { FocusScopeProps } from './FocusScope';
|
|
91
113
|
export { PageHeader } from './PageHeader';
|
|
92
114
|
export type { PageHeaderProps } from './PageHeader';
|
|
93
115
|
export { AppHeader, SidebarToggleButton } from './AppHeader';
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { useIconSearch } from './useIconSearch';
|
|
2
2
|
export { useKeyboardShortcuts } from './useKeyboardShortcuts';
|
|
3
|
+
export { useMediaQuery, useIsMobile, useIsTablet, useIsDesktop, usePrefersDarkMode, usePrefersReducedMotion } from './useMediaQuery';
|
|
4
|
+
export { useResponsiveSheet } from './useResponsiveSheet';
|
|
5
|
+
export type { UseResponsiveSheetOptions } from './useResponsiveSheet';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function useMediaQuery(query: string): boolean;
|
|
2
|
+
export declare function useIsMobile(): boolean;
|
|
3
|
+
export declare function useIsTablet(): boolean;
|
|
4
|
+
export declare function useIsDesktop(): boolean;
|
|
5
|
+
export declare function usePrefersDarkMode(): boolean;
|
|
6
|
+
export declare function usePrefersReducedMotion(): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface UseResponsiveSheetOptions {
|
|
2
|
+
/** Desktop width class (e.g., 'w-[640px]', 'w-[400px]'). */
|
|
3
|
+
desktopWidth?: string;
|
|
4
|
+
/** Desktop max-width class. Defaults to same as desktopWidth with max-w prefix. */
|
|
5
|
+
desktopMaxWidth?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Returns responsive className for Sheet components.
|
|
9
|
+
* Mobile: fullscreen. Desktop: specified width.
|
|
10
|
+
*
|
|
11
|
+
* Usage:
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const { className } = useResponsiveSheet({ desktopWidth: 'md:w-[640px]' })
|
|
14
|
+
* <SheetContent className={className}>...</SheetContent>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function useResponsiveSheet(options?: UseResponsiveSheetOptions): {
|
|
18
|
+
className: string;
|
|
19
|
+
};
|