@jfrader/ui 0.3.0 → 0.5.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/README.md +2 -0
- package/dist/{accordion-Bd-j04hW.js → accordion-xCI_u0BV.js} +2 -2
- package/dist/accordion.js +1 -1
- package/dist/{alert-BBqaKI4k.js → alert-DS_einpy.js} +1 -1
- package/dist/alert.js +1 -1
- package/dist/announcement-bar-B58xempt.js +382 -0
- package/dist/announcement-bar.js +2 -0
- package/dist/avatar-group-DOQQuV51.js +138 -0
- package/dist/avatar-group.js +2 -0
- package/dist/bottom-sheet-DPJBFkie.js +673 -0
- package/dist/bottom-sheet.js +2 -0
- package/dist/{breadcrumbs-DVAOxfvL.js → breadcrumbs-Cfw_hgt2.js} +1 -1
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-P2e7_44z.js → button-C92uYFJW.js} +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar-B3Svu0X2.js +447 -0
- package/dist/calendar.js +1 -1
- package/dist/carousel-IvPqN-oM.js +472 -0
- package/dist/carousel.js +2 -0
- package/dist/{checkbox-COYG6L7d.js → checkbox-cFquiSdy.js} +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/chip-group-DTQd_M-G.js +289 -0
- package/dist/chip-group.js +2 -0
- package/dist/code-block/shiki.js +147 -0
- package/dist/code-block-ahnRi-g8.js +292 -0
- package/dist/code-block.js +2 -0
- package/dist/collection-registry-k6JcD3Jr.js +44 -0
- package/dist/combobox-Bhzvu9ma.js +334 -0
- package/dist/combobox.js +1 -1
- package/dist/command-palette-BQ5LleGb.js +384 -0
- package/dist/command-palette.js +1 -1
- package/dist/copy-button-ByiA6D3R.js +252 -0
- package/dist/copy-button.js +2 -0
- package/dist/countdown-Dp_TD1VP.js +293 -0
- package/dist/countdown.js +2 -0
- package/dist/date-picker-5zKSSuFF.js +255 -0
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-B5uFWsm-.js +562 -0
- package/dist/date-range-picker.js +2 -0
- package/dist/{dialog-xaydbXl2.js → dialog-ciiv9H2b.js} +19 -19
- package/dist/dialog.js +1 -1
- package/dist/drawer-DsASTiP-.js +553 -0
- package/dist/drawer.js +2 -0
- package/dist/empty-state-CDgrjPPf.js +142 -0
- package/dist/empty-state.js +2 -0
- package/dist/expandable-card-C-qJcZ14.js +340 -0
- package/dist/expandable-card.js +2 -0
- package/dist/field-anatomy-COVdNpf5.js +84 -0
- package/dist/file-dropzone-pR4v7owg.js +457 -0
- package/dist/file-dropzone.js +2 -0
- package/dist/filter-toolbar-D5KEKTSe.js +312 -0
- package/dist/filter-toolbar.js +2 -0
- package/dist/hold-to-confirm-DjB2EVjM.js +294 -0
- package/dist/hold-to-confirm.js +2 -0
- package/dist/hover-card-B-nrCIy2.js +347 -0
- package/dist/hover-card.js +2 -0
- package/dist/image-compare-ciuhPtQZ.js +415 -0
- package/dist/image-compare.js +2 -0
- package/dist/index.js +79 -38
- package/dist/inline-edit-C0eeml65.js +535 -0
- package/dist/inline-edit.js +2 -0
- package/dist/input-control-DmMuAuPS.js +34 -0
- package/dist/json-viewer-BcySQfjZ.js +798 -0
- package/dist/json-viewer.js +2 -0
- package/dist/listbox-style-WX-RASp1.js +59 -0
- package/dist/{media-D_eA_I-e.js → media-8yrN85VT.js} +2 -2
- package/dist/mention-input-BcQKX2EJ.js +599 -0
- package/dist/mention-input.js +2 -0
- package/dist/menu-xwOOUtWP.js +275 -0
- package/dist/menu.js +1 -1
- package/dist/metric-card-Bh9K4fZs.js +118 -0
- package/dist/metric-card.js +2 -0
- package/dist/multi-select-Pce_IYnz.js +590 -0
- package/dist/multi-select.js +2 -0
- package/dist/{navigation-DhnKriOp.js → navigation-sP5fiuQS.js} +4 -4
- package/dist/navigation.js +1 -1
- package/dist/overlay-layer-SeUyyEPD.js +64 -0
- package/dist/overlay-portal-C4JZFq2M.js +15 -0
- package/dist/{pagination-DYdwsxwe.js → pagination-DmXZ8E85.js} +1 -1
- package/dist/pagination.js +1 -1
- package/dist/password-field-03pWRkuY.js +250 -0
- package/dist/password-field.js +2 -0
- package/dist/popover-QHcEvf9c.js +119 -0
- package/dist/popover.js +1 -1
- package/dist/{progress-BpJswTG4.js → progress-CbOWBUdA.js} +4 -4
- package/dist/progress.js +1 -1
- package/dist/radio-cards-D2QZENI_.js +455 -0
- package/dist/radio-cards.js +2 -0
- package/dist/{radio-group-Ce0_IWQr.js → radio-group-E6mMRgo7.js} +4 -4
- package/dist/radio-group.js +1 -1
- package/dist/resizable-panels-BhjUVXZZ.js +519 -0
- package/dist/resizable-panels.js +2 -0
- package/dist/scroll-area-CcZyiSOQ.js +371 -0
- package/dist/scroll-area.js +2 -0
- package/dist/search-field-IxF0IJXm.js +274 -0
- package/dist/search-field.js +2 -0
- package/dist/segmented-control-yO1K1nbi.js +326 -0
- package/dist/segmented-control.js +2 -0
- package/dist/select-n_H52W1Z.js +292 -0
- package/dist/select.js +1 -1
- package/dist/signature-pad-q2SAsrdD.js +640 -0
- package/dist/signature-pad.js +2 -0
- package/dist/{skeleton-OoFlOEXO.js → skeleton-XQQDkCHd.js} +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/slider-t0B5cecO.js +477 -0
- package/dist/slider.js +2 -0
- package/dist/sortable-data-table-tirqlLY2.js +365 -0
- package/dist/sortable-data-table.js +2 -0
- package/dist/{spinner-C2YDoiMn.js → spinner-DtxvDPdM.js} +1 -1
- package/dist/spinner.js +1 -1
- package/dist/split-button-Cb3EHs64.js +268 -0
- package/dist/split-button.js +2 -0
- package/dist/stepper-CruHbXxX.js +480 -0
- package/dist/stepper.js +2 -0
- package/dist/swipe-actions-DiZC57-3.js +418 -0
- package/dist/swipe-actions.js +2 -0
- package/dist/{switch-Dr-qjmT4.js → switch-qwv8jQnR.js} +1 -1
- package/dist/switch.js +1 -1
- package/dist/{tabs-CK_g1RKa.js → tabs-CAVJndX1.js} +2 -2
- package/dist/tabs.js +1 -1
- package/dist/tag-input-DSRCyrX2.js +418 -0
- package/dist/tag-input.js +2 -0
- package/dist/{text-field-D60ok14S.js → text-field-C8TWG-tY.js} +6 -5
- package/dist/text-field.js +1 -1
- package/dist/{textarea-DyfjtP0A.js → textarea-BrW0XcG_.js} +6 -5
- package/dist/textarea.js +1 -1
- package/dist/theme-root-BbTBuLMQ.js +46 -0
- package/dist/theme-root.js +1 -1
- package/dist/theme-scope-t7nAKc2c.js +27 -0
- package/dist/time-picker-Db8D49cP.js +305 -0
- package/dist/time-picker.js +2 -0
- package/dist/timeline-k3nURuCP.js +618 -0
- package/dist/timeline.js +2 -0
- package/dist/toast-BHxI32ZA.js +352 -0
- package/dist/toast-stack-DqrAzdg5.js +183 -0
- package/dist/toast-stack.js +2 -0
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-CI0e7hFm.js → toggle-group-fcjzpifI.js} +4 -4
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-CkeiW9C1.js +113 -0
- package/dist/tooltip.js +1 -1
- package/dist/tree-view-C2liIxqy.js +360 -0
- package/dist/tree-view.js +2 -0
- package/dist/types/components/announcement-bar/announcement-bar.d.ts +75 -0
- package/dist/types/components/announcement-bar/index.d.ts +2 -0
- package/dist/types/components/avatar-group/avatar-group.d.ts +43 -0
- package/dist/types/components/avatar-group/index.d.ts +2 -0
- package/dist/types/components/bottom-sheet/bottom-sheet.d.ts +60 -0
- package/dist/types/components/bottom-sheet/index.d.ts +2 -0
- package/dist/types/components/calendar/calendar.d.ts +25 -1
- package/dist/types/components/calendar/index.d.ts +1 -1
- package/dist/types/components/carousel/carousel.d.ts +73 -0
- package/dist/types/components/carousel/index.d.ts +2 -0
- package/dist/types/components/chip-group/chip-group.d.ts +54 -0
- package/dist/types/components/chip-group/index.d.ts +1 -0
- package/dist/types/components/code-block/code-block.d.ts +58 -0
- package/dist/types/components/code-block/index.d.ts +1 -0
- package/dist/types/components/code-block/shiki.d.ts +3 -0
- package/dist/types/components/combobox/combobox.d.ts +1 -1
- package/dist/types/components/command-palette/command-palette.d.ts +1 -1
- package/dist/types/components/copy-button/copy-button.d.ts +49 -0
- package/dist/types/components/copy-button/index.d.ts +2 -0
- package/dist/types/components/countdown/countdown.d.ts +37 -0
- package/dist/types/components/countdown/index.d.ts +1 -0
- package/dist/types/components/date-picker/date-picker.d.ts +1 -1
- package/dist/types/components/date-range-picker/date-range-picker.d.ts +103 -0
- package/dist/types/components/date-range-picker/index.d.ts +2 -0
- package/dist/types/components/drawer/drawer.d.ts +59 -0
- package/dist/types/components/drawer/index.d.ts +2 -0
- package/dist/types/components/empty-state/empty-state.d.ts +36 -0
- package/dist/types/components/empty-state/index.d.ts +2 -0
- package/dist/types/components/expandable-card/expandable-card.d.ts +28 -0
- package/dist/types/components/expandable-card/index.d.ts +2 -0
- package/dist/types/components/field/field-anatomy.d.ts +4 -2
- package/dist/types/components/file-dropzone/file-dropzone.d.ts +93 -0
- package/dist/types/components/file-dropzone/index.d.ts +2 -0
- package/dist/types/components/filter-toolbar/filter-toolbar.d.ts +70 -0
- package/dist/types/components/filter-toolbar/index.d.ts +1 -0
- package/dist/types/components/hold-to-confirm/hold-to-confirm.d.ts +32 -0
- package/dist/types/components/hold-to-confirm/index.d.ts +2 -0
- package/dist/types/components/hover-card/hover-card.d.ts +97 -0
- package/dist/types/components/hover-card/index.d.ts +2 -0
- package/dist/types/components/image-compare/image-compare.d.ts +54 -0
- package/dist/types/components/image-compare/index.d.ts +1 -0
- package/dist/types/components/inline-edit/index.d.ts +2 -0
- package/dist/types/components/inline-edit/inline-edit.d.ts +93 -0
- package/dist/types/components/json-viewer/index.d.ts +2 -0
- package/dist/types/components/json-viewer/json-viewer.d.ts +82 -0
- package/dist/types/components/mention-input/index.d.ts +2 -0
- package/dist/types/components/mention-input/mention-input.d.ts +87 -0
- package/dist/types/components/menu/menu.d.ts +23 -5
- package/dist/types/components/metric-card/index.d.ts +1 -0
- package/dist/types/components/metric-card/metric-card.d.ts +37 -0
- package/dist/types/components/multi-select/index.d.ts +2 -0
- package/dist/types/components/multi-select/multi-select.d.ts +73 -0
- package/dist/types/components/password-field/index.d.ts +2 -0
- package/dist/types/components/password-field/password-field.d.ts +34 -0
- package/dist/types/components/popover/popover.d.ts +1 -1
- package/dist/types/components/radio-cards/index.d.ts +1 -0
- package/dist/types/components/radio-cards/radio-cards.d.ts +42 -0
- package/dist/types/components/resizable-panels/index.d.ts +2 -0
- package/dist/types/components/resizable-panels/resizable-panels.d.ts +42 -0
- package/dist/types/components/scroll-area/index.d.ts +2 -0
- package/dist/types/components/scroll-area/scroll-area.d.ts +34 -0
- package/dist/types/components/search-field/index.d.ts +1 -0
- package/dist/types/components/search-field/search-field.d.ts +31 -0
- package/dist/types/components/segmented-control/index.d.ts +2 -0
- package/dist/types/components/segmented-control/segmented-control.d.ts +32 -0
- package/dist/types/components/select/select.d.ts +1 -1
- package/dist/types/components/signature-pad/index.d.ts +2 -0
- package/dist/types/components/signature-pad/signature-pad.d.ts +104 -0
- package/dist/types/components/slider/index.d.ts +1 -0
- package/dist/types/components/slider/slider.d.ts +70 -0
- package/dist/types/components/sortable-data-table/index.d.ts +1 -0
- package/dist/types/components/sortable-data-table/sortable-data-table.d.ts +76 -0
- package/dist/types/components/split-button/index.d.ts +2 -0
- package/dist/types/components/split-button/split-button.d.ts +55 -0
- package/dist/types/components/stepper/index.d.ts +2 -0
- package/dist/types/components/stepper/stepper.d.ts +85 -0
- package/dist/types/components/swipe-actions/index.d.ts +2 -0
- package/dist/types/components/swipe-actions/swipe-actions.d.ts +44 -0
- package/dist/types/components/tag-input/index.d.ts +2 -0
- package/dist/types/components/tag-input/tag-input.d.ts +66 -0
- package/dist/types/components/theme-root/theme-root.d.ts +9 -3
- package/dist/types/components/time-picker/index.d.ts +2 -0
- package/dist/types/components/time-picker/time-picker.d.ts +48 -0
- package/dist/types/components/timeline/index.d.ts +2 -0
- package/dist/types/components/timeline/timeline.d.ts +66 -0
- package/dist/types/components/toast/toast.d.ts +37 -2
- package/dist/types/components/toast-stack/index.d.ts +2 -0
- package/dist/types/components/toast-stack/toast-stack.d.ts +28 -0
- package/dist/types/components/tooltip/tooltip.d.ts +1 -1
- package/dist/types/components/tree-view/index.d.ts +1 -0
- package/dist/types/components/tree-view/tree-view.d.ts +47 -0
- package/dist/types/components/usage-meter/index.d.ts +2 -0
- package/dist/types/components/usage-meter/usage-meter.d.ts +83 -0
- package/dist/types/index.d.ts +40 -0
- package/dist/types/overlay/overlay-layer.d.ts +33 -0
- package/dist/types/overlay/overlay-portal.d.ts +7 -0
- package/dist/types/overlay/use-overlay-floating.d.ts +11 -1
- package/dist/types/styling/media.d.ts +1 -0
- package/dist/types/styling/theme-scope.d.ts +19 -0
- package/dist/types/styling/theme.d.ts +12 -0
- package/dist/types/utils/use-controlled-state.d.ts +2 -1
- package/dist/usage-meter-qyQ3rYVv.js +463 -0
- package/dist/usage-meter.js +2 -0
- package/dist/use-controlled-state-DpeVQZNR.js +20 -0
- package/dist/use-latest-callback-cj1OOQL6.js +11 -0
- package/dist/use-overlay-floating-DvJifLpF.js +31 -0
- package/package.json +175 -3
- package/dist/calendar-C9Yad_-w.js +0 -394
- package/dist/collection-registry-BTYi6zGh.js +0 -98
- package/dist/combobox-DrmjBbo7.js +0 -327
- package/dist/command-palette-V_2pEay7.js +0 -379
- package/dist/date-picker-ClUYBIBh.js +0 -250
- package/dist/field-anatomy-D2ToMeRa.js +0 -109
- package/dist/menu-DU60SMdt.js +0 -216
- package/dist/popover-BtN_0ejj.js +0 -113
- package/dist/select-BCS0-LVW.js +0 -286
- package/dist/theme-root-BiXXvQvr.js +0 -42
- package/dist/toast-iqelR-r0.js +0 -282
- package/dist/tooltip-CB-HC1js.js +0 -108
- package/dist/use-controlled-state-CVXDa-qM.js +0 -21
- package/dist/use-overlay-floating-efeqppiw.js +0 -19
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type CSSProperties, type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
export type SortDirection = 'asc' | 'desc';
|
|
5
|
+
export interface SortState {
|
|
6
|
+
columnId: string;
|
|
7
|
+
direction: SortDirection;
|
|
8
|
+
}
|
|
9
|
+
export interface DataColumn<T> {
|
|
10
|
+
id: string;
|
|
11
|
+
header: ReactNode;
|
|
12
|
+
accessor?: (row: T) => string | number | Date | null | undefined;
|
|
13
|
+
cell?: (row: T) => ReactNode;
|
|
14
|
+
sortable?: boolean;
|
|
15
|
+
sortLabel?: string;
|
|
16
|
+
compare?: (a: T, b: T) => number;
|
|
17
|
+
numeric?: boolean;
|
|
18
|
+
width?: CSSProperties['width'];
|
|
19
|
+
}
|
|
20
|
+
export interface DataTableMessages {
|
|
21
|
+
empty: string;
|
|
22
|
+
missing: string;
|
|
23
|
+
clear: string;
|
|
24
|
+
scrollLabel: string;
|
|
25
|
+
sortButton: (header: string, direction: SortDirection | null) => string;
|
|
26
|
+
sortStatus: (header: string, direction: SortDirection) => string;
|
|
27
|
+
selectRow: (rowLabel: string) => string;
|
|
28
|
+
selectAll: string;
|
|
29
|
+
selectionStatus: (visibleSelected: number, totalSelected: number, visibleRows: number, formatted: {
|
|
30
|
+
visibleSelected: string;
|
|
31
|
+
totalSelected: string;
|
|
32
|
+
visibleRows: string;
|
|
33
|
+
}) => string;
|
|
34
|
+
}
|
|
35
|
+
export interface DataTablePartProps {
|
|
36
|
+
className?: string;
|
|
37
|
+
css?: Interpolation<Theme>;
|
|
38
|
+
}
|
|
39
|
+
export type DataTableSlotProps = Partial<Record<'scroller' | 'table' | 'caption' | 'headerCell' | 'sortButton' | 'row' | 'cell' | 'footer' | 'status', DataTablePartProps>>;
|
|
40
|
+
export type SortableDataTableProps<T> = Omit<ComponentPropsWithRef<'div'>, 'children' | 'defaultValue' | 'onChange'> & SxProps & {
|
|
41
|
+
rows: readonly T[];
|
|
42
|
+
columns: readonly DataColumn<T>[];
|
|
43
|
+
getRowId: (row: T) => string;
|
|
44
|
+
caption: ReactNode;
|
|
45
|
+
captionHidden?: boolean;
|
|
46
|
+
defaultValue?: SortState | null;
|
|
47
|
+
onValueChange?: (sort: SortState | null) => void;
|
|
48
|
+
selectedKeys?: readonly string[];
|
|
49
|
+
defaultSelectedKeys?: readonly string[];
|
|
50
|
+
onSelectionChange?: (keys: readonly string[]) => void;
|
|
51
|
+
locale?: Intl.LocalesArgument;
|
|
52
|
+
dateFormatOptions?: Intl.DateTimeFormatOptions;
|
|
53
|
+
timeZone?: string;
|
|
54
|
+
messages?: Partial<DataTableMessages>;
|
|
55
|
+
empty?: ReactNode;
|
|
56
|
+
loading?: boolean;
|
|
57
|
+
size?: 'sm' | 'md';
|
|
58
|
+
tableRef?: Ref<HTMLTableElement>;
|
|
59
|
+
slotProps?: DataTableSlotProps;
|
|
60
|
+
} & ({
|
|
61
|
+
sortMode: 'manual';
|
|
62
|
+
value: SortState | null;
|
|
63
|
+
} | {
|
|
64
|
+
sortMode?: 'client';
|
|
65
|
+
value?: SortState | null;
|
|
66
|
+
}) & ({
|
|
67
|
+
selectable: true;
|
|
68
|
+
getRowLabel: (row: T) => string;
|
|
69
|
+
} | {
|
|
70
|
+
selectable?: false;
|
|
71
|
+
getRowLabel?: (row: T) => string;
|
|
72
|
+
});
|
|
73
|
+
export declare function SortableDataTable<T>({ ref, rows, columns, getRowId, caption, captionHidden, value, defaultValue, onValueChange, sortMode, selectable, getRowLabel, selectedKeys, defaultSelectedKeys, onSelectionChange, locale, dateFormatOptions, timeZone, messages: messageOverrides, empty, loading, size, tableRef, slotProps, className, sx, ...rest }: SortableDataTableProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
74
|
+
export declare namespace SortableDataTable {
|
|
75
|
+
var displayName: string;
|
|
76
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type Placement } from '@floating-ui/react';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
import { type ButtonProps, type ButtonSize, type ButtonTone, type ButtonVariant } from '../button';
|
|
5
|
+
import { type MenuContentProps, type MenuItemProps, type MenuSeparatorProps } from '../menu/menu';
|
|
6
|
+
export type SplitButtonItemTone = 'neutral' | 'danger';
|
|
7
|
+
export interface SplitButtonProps extends Omit<ComponentPropsWithRef<'div'>, 'role'>, SxProps {
|
|
8
|
+
/** Appearance of the Action; the Trigger uses the matching subdued fill. */
|
|
9
|
+
variant?: ButtonVariant;
|
|
10
|
+
tone?: ButtonTone;
|
|
11
|
+
size?: ButtonSize;
|
|
12
|
+
/** Disables Action, Trigger and items, and asks once for an open menu to close. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
open?: boolean;
|
|
15
|
+
defaultOpen?: boolean;
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
/** Menu placement relative to the Trigger; `start`/`end` follow the group's direction. */
|
|
18
|
+
placement?: Placement;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export interface SplitButtonActionProps extends Omit<ButtonProps, 'render'> {
|
|
22
|
+
/**
|
|
23
|
+
* Labels the Action may show. They share one grid cell so the Action keeps the width of the
|
|
24
|
+
* longest one while its label changes; a label swap fades in.
|
|
25
|
+
*/
|
|
26
|
+
reserveLabels?: readonly string[];
|
|
27
|
+
}
|
|
28
|
+
type SplitButtonTriggerBaseProps = Omit<ButtonProps, 'render' | 'variant' | 'tone' | 'size' | 'loading' | 'startIcon' | 'endIcon' | 'aria-haspopup' | 'aria-expanded' | 'aria-controls'>;
|
|
29
|
+
/** The Trigger has no visible text: it needs a localized `aria-label` or `aria-labelledby`. */
|
|
30
|
+
export type SplitButtonTriggerProps = SplitButtonTriggerBaseProps & ({
|
|
31
|
+
'aria-label': string;
|
|
32
|
+
} | {
|
|
33
|
+
'aria-labelledby': string;
|
|
34
|
+
});
|
|
35
|
+
export interface SplitButtonContentProps extends Omit<MenuContentProps, 'role'> {
|
|
36
|
+
}
|
|
37
|
+
export interface SplitButtonItemProps extends MenuItemProps {
|
|
38
|
+
tone?: SplitButtonItemTone;
|
|
39
|
+
}
|
|
40
|
+
export interface SplitButtonSeparatorProps extends MenuSeparatorProps {
|
|
41
|
+
}
|
|
42
|
+
declare function SplitButtonRoot({ ref, variant, tone, size, disabled, open: openProp, defaultOpen, onOpenChange, placement, className, sx, children, ...rest }: SplitButtonProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function SplitButtonAction({ ref, variant, tone, size, disabled, reserveLabels, children, className, sx, ...rest }: SplitButtonActionProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
44
|
+
declare function SplitButtonTrigger({ ref, disabled, children, className, sx, ...rest }: SplitButtonTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
45
|
+
declare function SplitButtonContent({ dir, 'aria-labelledby': ariaLabelledBy, ...props }: SplitButtonContentProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
46
|
+
declare function SplitButtonItem({ tone, disabled, ...props }: SplitButtonItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
47
|
+
declare function SplitButtonSeparator(props: SplitButtonSeparatorProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare const SplitButton: typeof SplitButtonRoot & {
|
|
49
|
+
Action: typeof SplitButtonAction;
|
|
50
|
+
Trigger: typeof SplitButtonTrigger;
|
|
51
|
+
Content: typeof SplitButtonContent;
|
|
52
|
+
Item: typeof SplitButtonItem;
|
|
53
|
+
Separator: typeof SplitButtonSeparator;
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Stepper } from './stepper';
|
|
2
|
+
export type { StepperBaseProps, StepperDetails, StepperHeadSlotProps, StepperInteractiveProps, StepperOrientation, StepperPartProps, StepperProps, StepperSize, StepperSlotProps, StepperStaticProps, StepperStatus, StepperStep, } from './stepper';
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
export type StepperOrientation = 'horizontal' | 'vertical';
|
|
5
|
+
export type StepperSize = 'sm' | 'md';
|
|
6
|
+
export type StepperDetails = 'all' | 'current';
|
|
7
|
+
export type StepperStatus = 'complete' | 'current' | 'upcoming' | 'error';
|
|
8
|
+
export interface StepperStep {
|
|
9
|
+
/** Stable unique identity. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Visible label; the default accessible name starts with it. */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Secondary text. `0` renders; `false`/`null`/`undefined` render nothing. */
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
/** Error text; when renderable the step's status is `error` and the text is always shown. */
|
|
16
|
+
error?: ReactNode;
|
|
17
|
+
/** A disabled completed step cannot be selected or focused. */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Decorative marker content replacing the numeral/check/error glyph. */
|
|
20
|
+
icon?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export interface StepperPartProps {
|
|
23
|
+
className?: string;
|
|
24
|
+
css?: Interpolation<Theme>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Native button props for interactive step heads; static heads only use `className`/`css`.
|
|
28
|
+
* Step names come from `getStepLabel`, so the slot takes no `aria-label`/`aria-labelledby`.
|
|
29
|
+
*/
|
|
30
|
+
export type StepperHeadSlotProps = Omit<ComponentPropsWithRef<'button'>, 'children' | 'ref' | 'type' | 'disabled' | 'tabIndex' | 'aria-current' | 'aria-disabled' | 'aria-label' | 'aria-labelledby'> & StepperPartProps;
|
|
31
|
+
export interface StepperSlotProps {
|
|
32
|
+
root?: StepperPartProps;
|
|
33
|
+
list?: StepperPartProps;
|
|
34
|
+
item?: StepperPartProps;
|
|
35
|
+
head?: StepperHeadSlotProps;
|
|
36
|
+
marker?: StepperPartProps;
|
|
37
|
+
label?: StepperPartProps;
|
|
38
|
+
description?: StepperPartProps;
|
|
39
|
+
connector?: StepperPartProps;
|
|
40
|
+
caption?: StepperPartProps;
|
|
41
|
+
}
|
|
42
|
+
export interface StepperBaseProps extends SxProps {
|
|
43
|
+
steps: readonly StepperStep[];
|
|
44
|
+
/** Controlled current index, `0..steps.length` (`steps.length` = all complete). */
|
|
45
|
+
value?: number;
|
|
46
|
+
/** Uncontrolled initial current index. */
|
|
47
|
+
defaultValue?: number;
|
|
48
|
+
/** Requested index after a completed step is activated (interactive mode). */
|
|
49
|
+
onValueChange?: (index: number) => void;
|
|
50
|
+
orientation?: StepperOrientation;
|
|
51
|
+
/** Which descriptions show; errors always show. */
|
|
52
|
+
details?: StepperDetails;
|
|
53
|
+
/** Markers only, with the current step in a caption. Error steps keep their label and text. */
|
|
54
|
+
compact?: boolean;
|
|
55
|
+
/** Horizontal steppers fold to compact below a 30rem container width. */
|
|
56
|
+
responsive?: boolean;
|
|
57
|
+
/** Marker and text scale; interactive targets stay at least 32px. */
|
|
58
|
+
size?: StepperSize;
|
|
59
|
+
/** Accessible name of the group/navigation when no `aria-label`/`aria-labelledby` is given. */
|
|
60
|
+
label?: string;
|
|
61
|
+
/** Caption shown once every step is complete. */
|
|
62
|
+
completeLabel?: ReactNode;
|
|
63
|
+
/** Locale for the default numerals and counts. */
|
|
64
|
+
locale?: Intl.LocalesArgument;
|
|
65
|
+
/** Full accessible name of a step; translate the wording here. */
|
|
66
|
+
getStepLabel?: (step: StepperStep, index: number, count: number, status: StepperStatus) => string;
|
|
67
|
+
/** Live summary of an accepted change; `step` is null when every step is complete. */
|
|
68
|
+
getChangeLabel?: (step: StepperStep | null, index: number, count: number) => string;
|
|
69
|
+
/** Announces accepted value changes in a polite live region. */
|
|
70
|
+
announceChanges?: boolean;
|
|
71
|
+
slotProps?: StepperSlotProps;
|
|
72
|
+
}
|
|
73
|
+
export type StepperStaticProps = StepperBaseProps & {
|
|
74
|
+
/** Static indicator: a labelled group without controls. */
|
|
75
|
+
interactive?: false;
|
|
76
|
+
} & Omit<ComponentPropsWithRef<'div'>, keyof StepperBaseProps | 'children'>;
|
|
77
|
+
export type StepperInteractiveProps = StepperBaseProps & {
|
|
78
|
+
/** Navigation: completed steps are buttons that request `onValueChange`. */
|
|
79
|
+
interactive: true;
|
|
80
|
+
} & Omit<ComponentPropsWithRef<'nav'>, keyof StepperBaseProps | 'children'>;
|
|
81
|
+
export type StepperProps = StepperStaticProps | StepperInteractiveProps;
|
|
82
|
+
export declare function Stepper(props: StepperProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
83
|
+
export declare namespace Stepper {
|
|
84
|
+
var displayName: string;
|
|
85
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
export type SwipeActionsSide = 'leading' | 'trailing';
|
|
5
|
+
export type SwipeActionsValue = {
|
|
6
|
+
id: string;
|
|
7
|
+
side: SwipeActionsSide;
|
|
8
|
+
} | null;
|
|
9
|
+
export interface SwipeAction {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
tone?: 'neutral' | 'accent' | 'danger';
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
onSelect: () => void;
|
|
16
|
+
/** Caller intent that this command keeps its row. Every command closes the rail and the row
|
|
17
|
+
* never deletes data itself, so this is metadata for the caller's `onSelect`. */
|
|
18
|
+
keepRow?: boolean;
|
|
19
|
+
}
|
|
20
|
+
type Slot = {
|
|
21
|
+
className?: string;
|
|
22
|
+
css?: Interpolation<Theme>;
|
|
23
|
+
};
|
|
24
|
+
export interface SwipeActionsProps extends Omit<ComponentPropsWithRef<'ul'>, 'value' | 'defaultValue'>, SxProps {
|
|
25
|
+
value?: SwipeActionsValue;
|
|
26
|
+
defaultValue?: SwipeActionsValue;
|
|
27
|
+
onValueChange?: (value: SwipeActionsValue) => void;
|
|
28
|
+
}
|
|
29
|
+
export interface SwipeActionsRowProps extends ComponentPropsWithRef<'li'>, SxProps {
|
|
30
|
+
id: string;
|
|
31
|
+
label: string;
|
|
32
|
+
actionsLabel: string;
|
|
33
|
+
leading?: readonly SwipeAction[];
|
|
34
|
+
trailing?: readonly SwipeAction[];
|
|
35
|
+
fullSwipe?: boolean;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
slotProps?: Partial<Record<'content' | 'body' | 'action' | 'actionIcon' | 'actionLabel' | 'trigger' | 'menu' | 'menuItem', Slot>>;
|
|
38
|
+
}
|
|
39
|
+
declare function SwipeActionsRoot({ ref, className, sx, value: valueProp, defaultValue, onValueChange, children, onKeyDown, ...props }: SwipeActionsProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
40
|
+
declare function SwipeActionsRow({ id, label, actionsLabel, leading, trailing, fullSwipe, disabled, ref, className, sx, children, slotProps, onPointerDown, onPointerMove, onPointerUp, onPointerCancel, onLostPointerCapture, onClickCapture, ...props }: SwipeActionsRowProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare const SwipeActions: typeof SwipeActionsRoot & {
|
|
42
|
+
Row: typeof SwipeActionsRow;
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import type { SxProps } from '../../styling/sx';
|
|
3
|
+
import { type FieldPartProps, type FieldSlotProps } from '../field/field-anatomy';
|
|
4
|
+
export type TagInputSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export type TagInputSeparator = 'Enter' | ',';
|
|
6
|
+
export interface TagInputMessages {
|
|
7
|
+
/** Accessible name of the token list. */
|
|
8
|
+
listLabel: string;
|
|
9
|
+
/** Accessible name of a token's remove button. */
|
|
10
|
+
remove: (token: string) => string;
|
|
11
|
+
added: (token: string) => string;
|
|
12
|
+
removed: (token: string) => string;
|
|
13
|
+
picked: (token: string) => string;
|
|
14
|
+
/** Receives the committed token the draft matched. */
|
|
15
|
+
duplicate: (token: string) => string;
|
|
16
|
+
/** Receives `maxTokens`. */
|
|
17
|
+
limit: (count: number) => string;
|
|
18
|
+
/** Validation message while `required` and no token is committed. */
|
|
19
|
+
required: string;
|
|
20
|
+
}
|
|
21
|
+
export interface TagInputPartProps extends FieldPartProps {
|
|
22
|
+
}
|
|
23
|
+
export interface TagInputSlotProps extends FieldSlotProps<TagInputPartProps> {
|
|
24
|
+
list?: TagInputPartProps;
|
|
25
|
+
token?: TagInputPartProps;
|
|
26
|
+
remove?: TagInputPartProps;
|
|
27
|
+
input?: TagInputPartProps;
|
|
28
|
+
status?: TagInputPartProps;
|
|
29
|
+
}
|
|
30
|
+
export interface TagInputProps extends Omit<ComponentPropsWithRef<'input'>, 'size' | 'value' | 'defaultValue' | 'type' | 'children'>, SxProps {
|
|
31
|
+
/**
|
|
32
|
+
* Committed tokens in order. Entries must be unique, nonempty and already normalized; the
|
|
33
|
+
* component renders them as given and never rewrites a provided list.
|
|
34
|
+
*/
|
|
35
|
+
value?: readonly string[];
|
|
36
|
+
defaultValue?: readonly string[];
|
|
37
|
+
onValueChange?: (value: string[]) => void;
|
|
38
|
+
/** Draft text in the input, independent from the committed tokens. */
|
|
39
|
+
inputValue?: string;
|
|
40
|
+
defaultInputValue?: string;
|
|
41
|
+
onInputChange?: (value: string) => void;
|
|
42
|
+
label?: ReactNode;
|
|
43
|
+
description?: ReactNode;
|
|
44
|
+
error?: ReactNode;
|
|
45
|
+
size?: TagInputSize;
|
|
46
|
+
/** Keys that commit the draft. Without `','`, commas are ordinary token text. */
|
|
47
|
+
separators?: readonly TagInputSeparator[];
|
|
48
|
+
/** Commit the draft when focus leaves the whole field. */
|
|
49
|
+
commitOnBlur?: boolean;
|
|
50
|
+
/** Turns the draft into a token before comparison. Defaults to trimming whitespace. */
|
|
51
|
+
normalize?: (draft: string) => string;
|
|
52
|
+
/** Returns a rejection message, or `null` to accept the token. */
|
|
53
|
+
validateToken?: (token: string) => string | null;
|
|
54
|
+
/** Additions stop at this count; an initial or controlled list longer than it is kept. */
|
|
55
|
+
maxTokens?: number;
|
|
56
|
+
/** Locale for duplicate comparison and default number formatting. */
|
|
57
|
+
locale?: Intl.LocalesArgument;
|
|
58
|
+
messages?: Partial<TagInputMessages>;
|
|
59
|
+
/** Replaces the remove glyph; rendered decoratively inside each remove button. */
|
|
60
|
+
removeIcon?: ReactNode;
|
|
61
|
+
slotProps?: TagInputSlotProps;
|
|
62
|
+
}
|
|
63
|
+
export declare function TagInput({ ref, value, defaultValue, onValueChange, inputValue, defaultInputValue, onInputChange, label, description, error, size, separators, commitOnBlur, normalize, validateToken, maxTokens, locale, messages: messagesProp, removeIcon, slotProps, className, sx, dir, name, form, disabled, readOnly, required, onChange, onKeyDown, onBlur, onCompositionStart, onCompositionEnd, id: idProp, 'aria-labelledby': ariaLabelledByProp, 'aria-describedby': ariaDescribedByProp, 'aria-invalid': ariaInvalidProp, ...rest }: TagInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
64
|
+
export declare namespace TagInput {
|
|
65
|
+
var displayName: string;
|
|
66
|
+
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
2
|
import { type SxProps } from '../../styling/sx';
|
|
3
|
-
|
|
3
|
+
import { type ThemeName } from '../../styling/theme-scope';
|
|
4
|
+
export type { ThemeName };
|
|
4
5
|
export interface ThemeRootProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
5
6
|
theme?: ThemeName;
|
|
7
|
+
/**
|
|
8
|
+
* Where overlays inside this root portal to. Omitted: the enclosing ThemeRoot's container, else
|
|
9
|
+
* the default (`body`). `null`: overlays wait until the host element is set.
|
|
10
|
+
*/
|
|
11
|
+
portalContainer?: HTMLElement | null;
|
|
6
12
|
children?: ReactNode;
|
|
7
13
|
}
|
|
8
|
-
export declare function ThemeRoot({ ref, theme, className, sx, ...rest }: ThemeRootProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function ThemeRoot({ ref, theme, portalContainer, className, sx, ...rest }: ThemeRootProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
15
|
export declare namespace ThemeRoot {
|
|
10
16
|
var displayName: string;
|
|
11
17
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
export type TimePickerSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export type TimePickerMinuteStep = 1 | 5 | 10 | 15 | 30;
|
|
6
|
+
export type TimePickerHourCycle = 'h12' | 'h23';
|
|
7
|
+
type Slot<Tag extends 'div' | 'span' | 'label' | 'button'> = Omit<ComponentPropsWithRef<Tag>, 'children'> & {
|
|
8
|
+
css?: Interpolation<Theme>;
|
|
9
|
+
};
|
|
10
|
+
export interface TimePickerSlotProps {
|
|
11
|
+
root?: Slot<'div'>;
|
|
12
|
+
label?: Slot<'label'>;
|
|
13
|
+
control?: Slot<'button'>;
|
|
14
|
+
content?: Slot<'div'>;
|
|
15
|
+
option?: Slot<'div'>;
|
|
16
|
+
description?: Slot<'span'>;
|
|
17
|
+
error?: Slot<'span'>;
|
|
18
|
+
icon?: Slot<'span'>;
|
|
19
|
+
}
|
|
20
|
+
export interface TimePickerProps extends Omit<ComponentPropsWithRef<'button'>, 'value' | 'defaultValue' | 'onChange' | 'size' | 'children'>, SxProps {
|
|
21
|
+
value?: string;
|
|
22
|
+
defaultValue?: string;
|
|
23
|
+
onValueChange?: (time: string) => void;
|
|
24
|
+
open?: boolean;
|
|
25
|
+
defaultOpen?: boolean;
|
|
26
|
+
onOpenChange?: (open: boolean) => void;
|
|
27
|
+
minuteStep?: TimePickerMinuteStep;
|
|
28
|
+
min?: string;
|
|
29
|
+
max?: string;
|
|
30
|
+
/** Supply a locale for deterministic server rendering. */
|
|
31
|
+
locale?: string;
|
|
32
|
+
hourCycle?: TimePickerHourCycle;
|
|
33
|
+
label?: ReactNode;
|
|
34
|
+
description?: ReactNode;
|
|
35
|
+
error?: ReactNode;
|
|
36
|
+
placeholder?: ReactNode;
|
|
37
|
+
size?: TimePickerSize;
|
|
38
|
+
readOnly?: boolean;
|
|
39
|
+
/** Semantic only: the hidden form field does not enforce native required validation. */
|
|
40
|
+
required?: boolean;
|
|
41
|
+
icon?: ReactNode;
|
|
42
|
+
slotProps?: TimePickerSlotProps;
|
|
43
|
+
}
|
|
44
|
+
export declare function TimePicker({ ref, value: valueProp, defaultValue, onValueChange, open: openProp, defaultOpen, onOpenChange, minuteStep, min, max, locale, hourCycle, label, description, error, placeholder, size, disabled, readOnly, required, name, icon, slotProps, className, sx, dir, id: idProp, onClick, onKeyDown, onBlur, ...rest }: TimePickerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare namespace TimePicker {
|
|
46
|
+
var displayName: string;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
export type TimelineTone = 'neutral' | 'success' | 'danger';
|
|
5
|
+
export type TimelineSize = 'sm' | 'md';
|
|
6
|
+
export type TimelineHeadingLevel = 2 | 3 | 4 | 5 | 6;
|
|
7
|
+
export interface TimelineEvent {
|
|
8
|
+
/** Unique, stable identity across updates. */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Epoch ms, a Date, or an ISO date-time with `Z` or an explicit offset. */
|
|
11
|
+
at: string | number | Date;
|
|
12
|
+
/** Who acted; shown as text next to the title. */
|
|
13
|
+
actor?: string;
|
|
14
|
+
/** Literal outcome ("Deploy failed"), so tone is never the only cue. */
|
|
15
|
+
title: ReactNode;
|
|
16
|
+
meta?: ReactNode;
|
|
17
|
+
/** Content (including 0; not false, null or '') makes the title a disclosure button for this panel. */
|
|
18
|
+
detail?: ReactNode;
|
|
19
|
+
/** Actor portrait URL; takes precedence over `icon`. */
|
|
20
|
+
avatar?: string;
|
|
21
|
+
icon?: ReactNode;
|
|
22
|
+
tone?: TimelineTone;
|
|
23
|
+
}
|
|
24
|
+
export interface TimelineLabels {
|
|
25
|
+
/** Region name when neither `aria-label` nor `aria-labelledby` is given. */
|
|
26
|
+
region: string;
|
|
27
|
+
empty: string;
|
|
28
|
+
/** Heading of the trailing group for events whose date cannot be read. */
|
|
29
|
+
invalidTime: string;
|
|
30
|
+
/** Announced when events with new ids arrive. */
|
|
31
|
+
newEvents: (count: number) => string;
|
|
32
|
+
/** Event count shown beside each day heading. */
|
|
33
|
+
dayCount: (count: number) => string;
|
|
34
|
+
}
|
|
35
|
+
export interface TimelinePartProps {
|
|
36
|
+
className?: string;
|
|
37
|
+
css?: Interpolation<Theme>;
|
|
38
|
+
}
|
|
39
|
+
export type TimelineSlotProps = Partial<Record<'scroller' | 'group' | 'heading' | 'list' | 'item' | 'marker' | 'trigger' | 'time' | 'detail' | 'status', TimelinePartProps>>;
|
|
40
|
+
export interface TimelineProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange' | 'children'>, SxProps {
|
|
41
|
+
/** Caller-owned events in any order; the component sorts a copy. */
|
|
42
|
+
events: readonly TimelineEvent[];
|
|
43
|
+
/** Reference instant in epoch ms. Pass the same value on server and client. */
|
|
44
|
+
now: number;
|
|
45
|
+
/** Ids of events whose detail is open (controlled). */
|
|
46
|
+
value?: readonly string[];
|
|
47
|
+
defaultValue?: readonly string[];
|
|
48
|
+
/** Requested open ids after a disclosure interaction. */
|
|
49
|
+
onValueChange?: (ids: string[]) => void;
|
|
50
|
+
/** Formatting locale; pass one explicitly for matching server and client output. */
|
|
51
|
+
locale?: Intl.LocalesArgument;
|
|
52
|
+
/** IANA zone used for day grouping and every displayed date. */
|
|
53
|
+
timeZone?: string;
|
|
54
|
+
headingLevel?: TimelineHeadingLevel;
|
|
55
|
+
/** Bounds the timeline in its own scroller; without it the timeline grows in page flow. */
|
|
56
|
+
maxHeight?: CSSProperties['maxHeight'];
|
|
57
|
+
/** Scroll to an event newer than any shown before. Never moves focus. */
|
|
58
|
+
scrollToNew?: boolean;
|
|
59
|
+
size?: TimelineSize;
|
|
60
|
+
labels?: Partial<TimelineLabels>;
|
|
61
|
+
slotProps?: TimelineSlotProps;
|
|
62
|
+
}
|
|
63
|
+
export declare function Timeline({ ref, events, now, value, defaultValue, onValueChange, locale, timeZone, headingLevel, maxHeight, scrollToNew, size, labels: labelProps, slotProps, className, sx, onKeyDown, onFocus, onBlur, 'aria-label': ariaLabelProp, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...rest }: TimelineProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
64
|
+
export declare namespace Timeline {
|
|
65
|
+
var displayName: string;
|
|
66
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef, type MouseEvent, type ReactNode } from 'react';
|
|
1
|
+
import { type ComponentPropsWithRef, type MouseEvent, type ReactNode, type CSSProperties } from 'react';
|
|
2
2
|
import { type SxProps } from '../../styling/sx';
|
|
3
|
-
export type ToastTone = 'neutral' | 'success' | 'danger';
|
|
3
|
+
export type ToastTone = 'neutral' | 'success' | 'danger' | 'info' | 'warning';
|
|
4
4
|
export interface ToastAction {
|
|
5
5
|
label: string;
|
|
6
6
|
/** Runs on click; the toast then dismisses unless the handler calls `event.preventDefault()`. */
|
|
@@ -13,6 +13,8 @@ export interface ToastOptions {
|
|
|
13
13
|
/** Milliseconds before auto-dismiss; `null` persists until dismissed. Defaults to the provider's. */
|
|
14
14
|
duration?: number | null;
|
|
15
15
|
action?: ToastAction;
|
|
16
|
+
/** Decorative spinner; an omitted duration persists while loading. */
|
|
17
|
+
loading?: boolean;
|
|
16
18
|
}
|
|
17
19
|
export interface ToastProviderProps {
|
|
18
20
|
children?: ReactNode;
|
|
@@ -28,10 +30,43 @@ export interface ToastViewportProps extends ComponentPropsWithRef<'div'>, SxProp
|
|
|
28
30
|
export interface ToastApi {
|
|
29
31
|
toast: (options: ToastOptions) => string;
|
|
30
32
|
dismiss: (id: string) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Patches an open toast in place; only a changed duration restarts the countdown.
|
|
35
|
+
* Unknown or closing ids are ignored.
|
|
36
|
+
*/
|
|
37
|
+
update: (id: string, patch: Partial<ToastOptions>) => void;
|
|
31
38
|
}
|
|
39
|
+
type ToastState = 'open' | 'closing';
|
|
40
|
+
interface ToastRecord {
|
|
41
|
+
id: string;
|
|
42
|
+
options: ToastOptions;
|
|
43
|
+
state: ToastState;
|
|
44
|
+
}
|
|
45
|
+
interface ToastQueueContextValue {
|
|
46
|
+
toasts: ToastRecord[];
|
|
47
|
+
dismiss: (id: string) => void;
|
|
48
|
+
remove: (id: string) => void;
|
|
49
|
+
registerRoot: (id: string, root: HTMLDivElement | null) => void;
|
|
50
|
+
dismissLabel: string;
|
|
51
|
+
registerRenderer: () => () => void;
|
|
52
|
+
}
|
|
53
|
+
export declare const TOAST_VIEWPORT_INLINE_SIZE = "min(380px, calc(100vw - 32px))";
|
|
54
|
+
export declare function useToastQueueContext(part: string): ToastQueueContextValue;
|
|
32
55
|
export declare function useToast(): ToastApi;
|
|
33
56
|
declare function ToastProvider({ children, max, duration, dismissLabel, }: ToastProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
34
57
|
declare function ToastViewport({ ref, className, sx, ...props }: ToastViewportProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare function ToastPortal({ children, contained }: {
|
|
59
|
+
children: ReactNode;
|
|
60
|
+
contained?: boolean;
|
|
61
|
+
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
62
|
+
export declare function ToastItem({ record, exposed, paused, style, className, escapeDismiss, }: {
|
|
63
|
+
record: ToastRecord;
|
|
64
|
+
exposed?: boolean;
|
|
65
|
+
paused?: boolean;
|
|
66
|
+
style?: CSSProperties;
|
|
67
|
+
className?: string;
|
|
68
|
+
escapeDismiss?: boolean;
|
|
69
|
+
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
35
70
|
declare function ToastRoot(props: ToastProviderProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
36
71
|
export declare const Toast: typeof ToastRoot & {
|
|
37
72
|
Provider: typeof ToastProvider;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
export type ToastStackVariant = 'stacked' | 'list';
|
|
5
|
+
export type ToastStackPosition = 'bottom-start' | 'bottom-center' | 'bottom-end';
|
|
6
|
+
type PartStyle = {
|
|
7
|
+
className?: string;
|
|
8
|
+
css?: Interpolation<Theme>;
|
|
9
|
+
};
|
|
10
|
+
export interface ToastStackProps extends Omit<ComponentPropsWithRef<'div'>, 'children'>, SxProps {
|
|
11
|
+
variant?: ToastStackVariant;
|
|
12
|
+
position?: ToastStackPosition;
|
|
13
|
+
contained?: boolean;
|
|
14
|
+
maxVisible?: number;
|
|
15
|
+
label?: string;
|
|
16
|
+
hotkey?: boolean;
|
|
17
|
+
expandLabel?: string;
|
|
18
|
+
collapseLabel?: string;
|
|
19
|
+
slotProps?: {
|
|
20
|
+
list?: PartStyle;
|
|
21
|
+
toggle?: PartStyle;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare function ToastStack(props: ToastStackProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare namespace ToastStack {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -16,7 +16,7 @@ export interface TooltipTriggerProps extends ComponentPropsWithRef<'button'>, Sx
|
|
|
16
16
|
}
|
|
17
17
|
export interface TooltipContentProps extends ComponentPropsWithRef<'div'>, SxProps {
|
|
18
18
|
}
|
|
19
|
-
declare function TooltipRoot(
|
|
19
|
+
declare function TooltipRoot(props: TooltipProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
20
20
|
declare function TooltipTrigger({ ref, 'aria-describedby': ariaDescribedByProp, className, sx, ...rest }: TooltipTriggerProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
21
21
|
declare function TooltipContent({ ref, style, className, sx, ...rest }: TooltipContentProps): import("@emotion/react/jsx-runtime").JSX.Element | null;
|
|
22
22
|
export declare const Tooltip: typeof TooltipRoot & {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TreeView, type TreeNode, type TreeViewMessages, type TreeViewPartProps, type TreeViewProps, type TreeViewSlotProps, } from './tree-view';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type Interpolation, type Theme } from '../../styling/css';
|
|
3
|
+
import { type SxProps } from '../../styling/sx';
|
|
4
|
+
export interface TreeNode {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
children?: readonly TreeNode[];
|
|
8
|
+
hasChildren?: boolean;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface TreeViewMessages {
|
|
13
|
+
loading: (label: string) => string;
|
|
14
|
+
error: (label: string) => string;
|
|
15
|
+
empty: string;
|
|
16
|
+
}
|
|
17
|
+
export interface TreeViewPartProps {
|
|
18
|
+
className?: string;
|
|
19
|
+
css?: Interpolation<Theme>;
|
|
20
|
+
}
|
|
21
|
+
export type TreeViewSlotProps = Partial<Record<'tree' | 'row' | 'label' | 'icon' | 'disclosure' | 'group' | 'status', TreeViewPartProps>>;
|
|
22
|
+
export interface TreeViewProps extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'defaultValue' | 'onChange'>, SxProps {
|
|
23
|
+
nodes: readonly TreeNode[];
|
|
24
|
+
value?: string | null;
|
|
25
|
+
defaultValue?: string | null;
|
|
26
|
+
onValueChange?: (id: string | null) => void;
|
|
27
|
+
open?: readonly string[];
|
|
28
|
+
defaultOpen?: readonly string[];
|
|
29
|
+
onOpenChange?: (ids: readonly string[]) => void;
|
|
30
|
+
loadChildren?: (node: TreeNode, options: {
|
|
31
|
+
signal: AbortSignal;
|
|
32
|
+
}) => Promise<readonly TreeNode[]>;
|
|
33
|
+
onLoadError?: (error: unknown, node: TreeNode) => void;
|
|
34
|
+
label?: string;
|
|
35
|
+
messages?: Partial<TreeViewMessages>;
|
|
36
|
+
empty?: ReactNode;
|
|
37
|
+
treeRef?: Ref<HTMLUListElement>;
|
|
38
|
+
locale?: Intl.LocalesArgument;
|
|
39
|
+
slotProps?: TreeViewSlotProps;
|
|
40
|
+
}
|
|
41
|
+
/** Single-select APG tree with real roving focus. Right opens/enters and Left closes/parents,
|
|
42
|
+
* including RTL. Up/Down clamp; Home/End jump; Enter/Space select; typeahead resets after 500ms.
|
|
43
|
+
* Lazy results are cached per instance; remount with a new key to replace the dataset cache. */
|
|
44
|
+
export declare function TreeView({ nodes, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, loadChildren, onLoadError, label, messages: messageProps, empty, treeRef, locale, slotProps, ref, className, sx, onKeyDown, onClick, onBlur, 'aria-label': ariaLabel, 'aria-labelledby': labelledBy, 'aria-describedby': describedBy, ...rest }: TreeViewProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare namespace TreeView {
|
|
46
|
+
var displayName: string;
|
|
47
|
+
}
|