@tensor_1/react 2.14.2 → 2.15.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/combobox-model.d.ts +9 -0
- package/dist/combobox-model.js +10 -0
- package/dist/components/AsyncOperationStatus.d.ts +16 -0
- package/dist/components/AsyncOperationStatus.js +24 -0
- package/dist/components/Breadcrumbs.d.ts +18 -0
- package/dist/components/Breadcrumbs.js +14 -0
- package/dist/components/Card.d.ts +11 -2
- package/dist/components/Card.js +16 -1
- package/dist/components/CollapsibleSection.d.ts +11 -0
- package/dist/components/CollapsibleSection.js +17 -0
- package/dist/components/Combobox.d.ts +19 -0
- package/dist/components/Combobox.js +120 -0
- package/dist/components/DetailPage.d.ts +33 -0
- package/dist/components/DetailPage.js +19 -0
- package/dist/components/Dialogs.d.ts +35 -0
- package/dist/components/Dialogs.js +55 -0
- package/dist/components/Modal.d.ts +3 -1
- package/dist/components/Modal.js +6 -4
- package/dist/components/RelatedLinks.d.ts +16 -0
- package/dist/components/RelatedLinks.js +14 -0
- package/dist/components/RelativeTime.d.ts +23 -0
- package/dist/components/RelativeTime.js +40 -0
- package/dist/components/Sidebar.d.ts +7 -2
- package/dist/components/Sidebar.js +27 -9
- package/dist/components/States.d.ts +23 -4
- package/dist/components/States.js +28 -6
- package/dist/components/TableControls.d.ts +77 -0
- package/dist/components/TableControls.js +61 -0
- package/dist/components/ToggleRow.d.ts +14 -0
- package/dist/components/ToggleRow.js +16 -0
- package/dist/index.cjs +1277 -786
- package/dist/index.d.cts +280 -8
- package/dist/index.d.ts +14 -2
- package/dist/index.js +34 -2
- package/dist/relative-time-clock.d.ts +4 -0
- package/dist/relative-time-clock.js +33 -0
- package/dist/relative-time-model.d.ts +9 -0
- package/dist/relative-time-model.js +16 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { RefObject, ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, CSSProperties,
|
|
2
|
+
import { RefObject, ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, HTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, CSSProperties, AnchorHTMLAttributes, DetailsHTMLAttributes, TdHTMLAttributes, TableHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
4
|
declare function cx(...args: (string | false | null | undefined | 0)[]): string;
|
|
5
5
|
|
|
@@ -268,6 +268,28 @@ interface InputGroupProps {
|
|
|
268
268
|
}
|
|
269
269
|
declare function InputGroup({ children, leadingIcon, trailingIcon, className }: InputGroupProps): react.JSX.Element;
|
|
270
270
|
|
|
271
|
+
interface ComboboxOption {
|
|
272
|
+
value: string;
|
|
273
|
+
label: string;
|
|
274
|
+
keywords?: readonly string[];
|
|
275
|
+
disabled?: boolean;
|
|
276
|
+
}
|
|
277
|
+
declare function filterComboboxOptions(options: readonly ComboboxOption[], query: string): ComboboxOption[];
|
|
278
|
+
|
|
279
|
+
interface ComboboxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
280
|
+
options: readonly ComboboxOption[];
|
|
281
|
+
value?: string;
|
|
282
|
+
defaultValue?: string;
|
|
283
|
+
onValueChange?: (value: string, option: ComboboxOption) => void;
|
|
284
|
+
label: string;
|
|
285
|
+
placeholder?: string;
|
|
286
|
+
emptyLabel: string;
|
|
287
|
+
name?: string;
|
|
288
|
+
disabled?: boolean;
|
|
289
|
+
}
|
|
290
|
+
/** Searchable single-select combobox with keyboard navigation and no framework dependencies. */
|
|
291
|
+
declare function Combobox({ options, value, defaultValue, onValueChange, label, placeholder, emptyLabel, name, disabled, className, ...props }: ComboboxProps): react.JSX.Element;
|
|
292
|
+
|
|
271
293
|
interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
272
294
|
invalid?: boolean;
|
|
273
295
|
}
|
|
@@ -319,8 +341,41 @@ interface ModalProps {
|
|
|
319
341
|
footer?: ReactNode;
|
|
320
342
|
className?: string;
|
|
321
343
|
style?: CSSProperties;
|
|
344
|
+
closeLabel?: string;
|
|
345
|
+
role?: 'dialog' | 'alertdialog';
|
|
322
346
|
}
|
|
323
|
-
declare function Modal({ open, onClose, title, children, footer, className, style }: ModalProps): react.JSX.Element;
|
|
347
|
+
declare function Modal({ open, onClose, title, children, footer, className, style, closeLabel, role }: ModalProps): react.JSX.Element;
|
|
348
|
+
|
|
349
|
+
interface ConfirmDialogProps {
|
|
350
|
+
open: boolean;
|
|
351
|
+
title: ReactNode;
|
|
352
|
+
description?: ReactNode;
|
|
353
|
+
confirmLabel: ReactNode;
|
|
354
|
+
cancelLabel: ReactNode;
|
|
355
|
+
closeLabel: string;
|
|
356
|
+
onConfirm: () => void | Promise<void>;
|
|
357
|
+
onCancel: () => void;
|
|
358
|
+
pending?: boolean;
|
|
359
|
+
destructive?: boolean;
|
|
360
|
+
}
|
|
361
|
+
/** Generic confirmation shell. Audit, authorization and compensation policy remain application-owned. */
|
|
362
|
+
declare function ConfirmDialog({ open, title, description, confirmLabel, cancelLabel, closeLabel, onConfirm, onCancel, pending, destructive }: ConfirmDialogProps): react.JSX.Element;
|
|
363
|
+
interface PromptDialogProps {
|
|
364
|
+
open: boolean;
|
|
365
|
+
title: ReactNode;
|
|
366
|
+
description?: ReactNode;
|
|
367
|
+
inputLabel: string;
|
|
368
|
+
defaultValue?: string;
|
|
369
|
+
placeholder?: string;
|
|
370
|
+
submitLabel: ReactNode;
|
|
371
|
+
cancelLabel: ReactNode;
|
|
372
|
+
closeLabel: string;
|
|
373
|
+
onSubmit: (value: string) => void | Promise<void>;
|
|
374
|
+
onCancel: () => void;
|
|
375
|
+
validate?: (value: string) => ReactNode | undefined;
|
|
376
|
+
pending?: boolean;
|
|
377
|
+
}
|
|
378
|
+
declare function PromptDialog({ open, title, description, inputLabel, defaultValue, placeholder, submitLabel, cancelLabel, closeLabel, onSubmit, onCancel, validate, pending }: PromptDialogProps): react.JSX.Element;
|
|
324
379
|
|
|
325
380
|
interface DrawerProps {
|
|
326
381
|
open: boolean;
|
|
@@ -353,6 +408,29 @@ interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
|
353
408
|
children?: ReactNode;
|
|
354
409
|
}
|
|
355
410
|
declare function Card({ title, subtitle, headerAction, footer, children, className, ...props }: CardProps): react.JSX.Element;
|
|
411
|
+
interface CardLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'title'> {
|
|
412
|
+
title?: ReactNode;
|
|
413
|
+
subtitle?: ReactNode;
|
|
414
|
+
headerAction?: ReactNode;
|
|
415
|
+
footer?: ReactNode;
|
|
416
|
+
children?: ReactNode;
|
|
417
|
+
}
|
|
418
|
+
/** A whole-card anchor with visible hover and keyboard focus affordances. */
|
|
419
|
+
declare function CardLink({ title, subtitle, headerAction, footer, children, className, ...props }: CardLinkProps): react.JSX.Element;
|
|
420
|
+
|
|
421
|
+
interface BreadcrumbItem {
|
|
422
|
+
id?: string;
|
|
423
|
+
label: ReactNode;
|
|
424
|
+
href?: string;
|
|
425
|
+
current?: boolean;
|
|
426
|
+
}
|
|
427
|
+
interface BreadcrumbsProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
|
|
428
|
+
items: readonly BreadcrumbItem[];
|
|
429
|
+
label: string;
|
|
430
|
+
separator?: ReactNode;
|
|
431
|
+
}
|
|
432
|
+
/** Framework-neutral breadcrumb navigation. Route adapters can replace anchors at the application seam. */
|
|
433
|
+
declare function Breadcrumbs({ items, label, separator, className, ...props }: BreadcrumbsProps): react.JSX.Element;
|
|
356
434
|
|
|
357
435
|
interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
358
436
|
eyebrow?: ReactNode;
|
|
@@ -380,6 +458,64 @@ interface DetailLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
380
458
|
*/
|
|
381
459
|
declare function DetailLayout({ side, children, className, ...props }: DetailLayoutProps): react.JSX.Element;
|
|
382
460
|
|
|
461
|
+
interface DetailPageTab {
|
|
462
|
+
id: string;
|
|
463
|
+
label: ReactNode;
|
|
464
|
+
href: string;
|
|
465
|
+
active?: boolean;
|
|
466
|
+
}
|
|
467
|
+
interface DetailPageMetric {
|
|
468
|
+
id: string;
|
|
469
|
+
label: ReactNode;
|
|
470
|
+
value: ReactNode;
|
|
471
|
+
}
|
|
472
|
+
interface DetailPageProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
473
|
+
back?: {
|
|
474
|
+
href: string;
|
|
475
|
+
label: ReactNode;
|
|
476
|
+
};
|
|
477
|
+
eyebrow?: ReactNode;
|
|
478
|
+
title: ReactNode;
|
|
479
|
+
subtitle?: ReactNode;
|
|
480
|
+
actions?: ReactNode;
|
|
481
|
+
tabs?: readonly DetailPageTab[];
|
|
482
|
+
metrics?: readonly DetailPageMetric[];
|
|
483
|
+
side?: ReactNode;
|
|
484
|
+
children?: ReactNode;
|
|
485
|
+
tabsLabel?: string;
|
|
486
|
+
}
|
|
487
|
+
/** Framework-neutral record-detail scaffold; routing and data policy stay with the application. */
|
|
488
|
+
declare function DetailPage({ back, eyebrow, title, subtitle, actions, tabs, metrics, side, children, tabsLabel, className, ...props }: DetailPageProps): react.JSX.Element;
|
|
489
|
+
|
|
490
|
+
interface RelatedLinkItem {
|
|
491
|
+
id: string;
|
|
492
|
+
label: ReactNode;
|
|
493
|
+
href: string;
|
|
494
|
+
meta?: ReactNode;
|
|
495
|
+
}
|
|
496
|
+
interface RelatedLinksProps extends Omit<HTMLAttributes<HTMLElement>, 'title' | 'children'> {
|
|
497
|
+
title?: ReactNode;
|
|
498
|
+
items: readonly RelatedLinkItem[];
|
|
499
|
+
}
|
|
500
|
+
declare function RelatedLinks({ title, items, className, ...props }: RelatedLinksProps): react.JSX.Element;
|
|
501
|
+
|
|
502
|
+
interface ToggleRowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
503
|
+
label: ReactNode;
|
|
504
|
+
description?: ReactNode;
|
|
505
|
+
checked: boolean;
|
|
506
|
+
onCheckedChange: (checked: boolean) => void;
|
|
507
|
+
disabled?: boolean;
|
|
508
|
+
accessibleLabel: string;
|
|
509
|
+
}
|
|
510
|
+
declare function ToggleRow({ label, description, checked, onCheckedChange, disabled, accessibleLabel, className, ...props }: ToggleRowProps): react.JSX.Element;
|
|
511
|
+
|
|
512
|
+
interface CollapsibleSectionProps extends Omit<DetailsHTMLAttributes<HTMLDetailsElement>, 'title'> {
|
|
513
|
+
title: ReactNode;
|
|
514
|
+
summary?: ReactNode;
|
|
515
|
+
children?: ReactNode;
|
|
516
|
+
}
|
|
517
|
+
declare function CollapsibleSection({ title, summary, children, className, ...props }: CollapsibleSectionProps): react.JSX.Element;
|
|
518
|
+
|
|
383
519
|
interface ListProps extends HTMLAttributes<HTMLDivElement> {
|
|
384
520
|
children?: ReactNode;
|
|
385
521
|
}
|
|
@@ -478,12 +614,15 @@ declare function AppShell({ nav, collapsed, focus, onExitFocus, mainBleed, sideb
|
|
|
478
614
|
|
|
479
615
|
interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
480
616
|
collapsed?: boolean;
|
|
617
|
+
nav?: 'full' | 'rail';
|
|
481
618
|
onToggle?: () => void;
|
|
482
619
|
brand?: ReactNode;
|
|
483
620
|
toggleIcon?: ReactNode;
|
|
484
621
|
children?: ReactNode;
|
|
622
|
+
expandLabel?: string;
|
|
623
|
+
collapseLabel?: string;
|
|
485
624
|
}
|
|
486
|
-
declare function Sidebar({ collapsed, onToggle, brand, toggleIcon, children, className, ...props }: SidebarProps): react.JSX.Element;
|
|
625
|
+
declare function Sidebar({ collapsed, nav, onToggle, brand, toggleIcon, children, expandLabel, collapseLabel, className, ...props }: SidebarProps): react.JSX.Element;
|
|
487
626
|
interface SidebarSectionProps {
|
|
488
627
|
label?: string;
|
|
489
628
|
children?: ReactNode;
|
|
@@ -502,8 +641,10 @@ interface NavGroupProps {
|
|
|
502
641
|
label: ReactNode;
|
|
503
642
|
children?: ReactNode;
|
|
504
643
|
defaultExpanded?: boolean;
|
|
644
|
+
expanded?: boolean;
|
|
645
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
505
646
|
}
|
|
506
|
-
declare function NavGroup({ icon, label, children, defaultExpanded }: NavGroupProps): react.JSX.Element;
|
|
647
|
+
declare function NavGroup({ icon, label, children, defaultExpanded, expanded: controlledExpanded, onExpandedChange }: NavGroupProps): react.JSX.Element;
|
|
507
648
|
interface SubNavItemProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
508
649
|
active?: boolean;
|
|
509
650
|
as?: 'a' | 'button';
|
|
@@ -768,6 +909,7 @@ interface TooltipProps extends HTMLAttributes<HTMLSpanElement> {
|
|
|
768
909
|
*/
|
|
769
910
|
declare function Tooltip({ label, placement, className, children, ...props }: TooltipProps): react.JSX.Element;
|
|
770
911
|
|
|
912
|
+
type StateVariant = 'section' | 'inline' | 'drawer' | 'page' | 'full-page';
|
|
771
913
|
interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
772
914
|
icon?: ReactNode;
|
|
773
915
|
title?: ReactNode;
|
|
@@ -775,9 +917,11 @@ interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>
|
|
|
775
917
|
children?: ReactNode;
|
|
776
918
|
/** Primary action (e.g. a Button) shown under the body. */
|
|
777
919
|
action?: ReactNode;
|
|
920
|
+
/** Layout context changes spacing without changing semantics. */
|
|
921
|
+
variant?: StateVariant;
|
|
778
922
|
}
|
|
779
923
|
/** Centered empty state over `.uix-empty`. */
|
|
780
|
-
declare function EmptyState({ icon, title, children, action, className, ...props }: EmptyStateProps): react.JSX.Element;
|
|
924
|
+
declare function EmptyState({ icon, title, children, action, variant, className, ...props }: EmptyStateProps): react.JSX.Element;
|
|
781
925
|
interface ErrorStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
782
926
|
icon?: ReactNode;
|
|
783
927
|
title?: ReactNode;
|
|
@@ -785,9 +929,23 @@ interface ErrorStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>
|
|
|
785
929
|
detail?: ReactNode;
|
|
786
930
|
/** Recovery action (e.g. a Retry Button). */
|
|
787
931
|
action?: ReactNode;
|
|
932
|
+
variant?: StateVariant;
|
|
788
933
|
}
|
|
789
934
|
/** Error state over `.uix-empty` with a danger-toned icon; `role="alert"`. */
|
|
790
|
-
declare function ErrorState({ icon, title, detail, action, className, ...props }: ErrorStateProps): react.JSX.Element;
|
|
935
|
+
declare function ErrorState({ icon, title, detail, action, variant, className, ...props }: ErrorStateProps): react.JSX.Element;
|
|
936
|
+
interface AccessStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
937
|
+
icon?: ReactNode;
|
|
938
|
+
title?: ReactNode;
|
|
939
|
+
detail?: ReactNode;
|
|
940
|
+
action?: ReactNode;
|
|
941
|
+
variant?: StateVariant;
|
|
942
|
+
}
|
|
943
|
+
/** Permission-denied state. Copy and recovery controls stay application-owned. */
|
|
944
|
+
declare function ForbiddenState({ icon, title, detail, action, variant, className, ...props }: AccessStateProps): react.JSX.Element;
|
|
945
|
+
/** Not-found state. Copy and navigation remain application-owned. */
|
|
946
|
+
declare function NotFoundState({ icon, title, detail, action, variant, className, ...props }: AccessStateProps): react.JSX.Element;
|
|
947
|
+
/** Empty-result state for an active search or filter, kept distinct for analytics and recovery copy. */
|
|
948
|
+
declare function FilteredEmptyState(props: EmptyStateProps): react.JSX.Element;
|
|
791
949
|
interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
792
950
|
variant?: 'block' | 'text' | 'circle';
|
|
793
951
|
width?: number | string;
|
|
@@ -798,9 +956,50 @@ declare function Skeleton({ variant, width, height, className, style, ...props }
|
|
|
798
956
|
interface LoadingStateProps extends HTMLAttributes<HTMLDivElement> {
|
|
799
957
|
/** Number of skeleton rows to render. */
|
|
800
958
|
rows?: number;
|
|
959
|
+
density?: 'compact' | 'comfortable';
|
|
960
|
+
label?: string;
|
|
801
961
|
}
|
|
802
962
|
/** A stack of skeleton rows for list/section loading. `role="status"`. */
|
|
803
|
-
declare function LoadingState({ rows, className, ...props }: LoadingStateProps): react.JSX.Element;
|
|
963
|
+
declare function LoadingState({ rows, density, label, className, ...props }: LoadingStateProps): react.JSX.Element;
|
|
964
|
+
|
|
965
|
+
interface RelativeTimeFormatContext {
|
|
966
|
+
date: Date;
|
|
967
|
+
now: Date;
|
|
968
|
+
locale?: string | readonly string[];
|
|
969
|
+
timeZone?: string;
|
|
970
|
+
}
|
|
971
|
+
interface RelativeTimeProps extends Omit<HTMLAttributes<HTMLTimeElement>, 'children' | 'dateTime'> {
|
|
972
|
+
value: Date | number | string;
|
|
973
|
+
now?: Date | number;
|
|
974
|
+
locale?: string | readonly string[];
|
|
975
|
+
timeZone?: string;
|
|
976
|
+
numeric?: Intl.RelativeTimeFormatNumeric;
|
|
977
|
+
invalidLabel?: ReactNode;
|
|
978
|
+
refreshInterval?: number | false;
|
|
979
|
+
formatter?: (context: RelativeTimeFormatContext) => ReactNode;
|
|
980
|
+
}
|
|
981
|
+
/** Locale-aware relative time with deterministic `now` support for SSR and tests. */
|
|
982
|
+
declare function RelativeTime({ value, now, locale, timeZone, numeric, invalidLabel, refreshInterval, formatter, title, ...props }: RelativeTimeProps): react.JSX.Element;
|
|
983
|
+
|
|
984
|
+
type RelativeTimeUnit = 'second' | 'minute' | 'hour' | 'day';
|
|
985
|
+
interface RelativeTimeValue {
|
|
986
|
+
value: number;
|
|
987
|
+
unit: RelativeTimeUnit;
|
|
988
|
+
}
|
|
989
|
+
declare function parseDateValue(value: Date | number | string): Date | null;
|
|
990
|
+
declare function relativeTimeValue(date: Date, now: Date): RelativeTimeValue;
|
|
991
|
+
|
|
992
|
+
type AsyncOperationState = 'queued' | 'running' | 'complete' | 'failed';
|
|
993
|
+
interface AsyncOperationStatusProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
994
|
+
state: AsyncOperationState;
|
|
995
|
+
title: ReactNode;
|
|
996
|
+
statusLabel: ReactNode;
|
|
997
|
+
description?: ReactNode;
|
|
998
|
+
progress?: number;
|
|
999
|
+
progressLabel?: string;
|
|
1000
|
+
action?: ReactNode;
|
|
1001
|
+
}
|
|
1002
|
+
declare function AsyncOperationStatus({ state, title, statusLabel, description, progress, progressLabel, action, className, ...props }: AsyncOperationStatusProps): react.JSX.Element;
|
|
804
1003
|
|
|
805
1004
|
interface LabelProps extends HTMLAttributes<HTMLSpanElement> {
|
|
806
1005
|
/** Any CSS color or a `--uix-chart-*` var; sets `--label-color`. */
|
|
@@ -894,6 +1093,79 @@ interface SegmentedOptionProps extends Omit<ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
894
1093
|
*/
|
|
895
1094
|
declare function SegmentedOption({ value, children, className, onClick, ...props }: SegmentedOptionProps): react.JSX.Element;
|
|
896
1095
|
|
|
1096
|
+
interface ViewMenuColumn {
|
|
1097
|
+
id: string;
|
|
1098
|
+
label: ReactNode;
|
|
1099
|
+
visible: boolean;
|
|
1100
|
+
disabled?: boolean;
|
|
1101
|
+
}
|
|
1102
|
+
interface ViewMenuProps {
|
|
1103
|
+
density: string;
|
|
1104
|
+
densityLabel: ReactNode;
|
|
1105
|
+
densityOptions: readonly {
|
|
1106
|
+
value: string;
|
|
1107
|
+
label: ReactNode;
|
|
1108
|
+
}[];
|
|
1109
|
+
onDensityChange: (value: string) => void;
|
|
1110
|
+
zebra?: {
|
|
1111
|
+
checked: boolean;
|
|
1112
|
+
label: ReactNode;
|
|
1113
|
+
onChange: (checked: boolean) => void;
|
|
1114
|
+
};
|
|
1115
|
+
freeze?: {
|
|
1116
|
+
checked: boolean;
|
|
1117
|
+
label: ReactNode;
|
|
1118
|
+
onChange: (checked: boolean) => void;
|
|
1119
|
+
};
|
|
1120
|
+
columns?: readonly ViewMenuColumn[];
|
|
1121
|
+
columnsLabel?: ReactNode;
|
|
1122
|
+
onColumnVisibilityChange?: (id: string, visible: boolean) => void;
|
|
1123
|
+
}
|
|
1124
|
+
/** Controlled table presentation menu; wrap it with Popover when trigger behavior is needed. */
|
|
1125
|
+
declare function ViewMenu({ density, densityLabel, densityOptions, onDensityChange, zebra, freeze, columns, columnsLabel, onColumnVisibilityChange }: ViewMenuProps): react.JSX.Element;
|
|
1126
|
+
interface FilterOption {
|
|
1127
|
+
value: string;
|
|
1128
|
+
label: string;
|
|
1129
|
+
}
|
|
1130
|
+
interface FilterPopoverProps {
|
|
1131
|
+
label: ReactNode;
|
|
1132
|
+
type?: 'text' | 'number' | 'date' | 'select' | 'enum' | 'boolean';
|
|
1133
|
+
value: string;
|
|
1134
|
+
onValueChange: (value: string) => void;
|
|
1135
|
+
options?: readonly FilterOption[];
|
|
1136
|
+
applyLabel: ReactNode;
|
|
1137
|
+
clearLabel: ReactNode;
|
|
1138
|
+
onApply: () => void;
|
|
1139
|
+
onClear: () => void;
|
|
1140
|
+
placeholder?: string;
|
|
1141
|
+
}
|
|
1142
|
+
/** Controlled filter editor content; applications own query serialization and the popover trigger. */
|
|
1143
|
+
declare function FilterPopover({ label, type, value, onValueChange, options, applyLabel, clearLabel, onApply, onClear, placeholder }: FilterPopoverProps): react.JSX.Element;
|
|
1144
|
+
interface SavedViewItem {
|
|
1145
|
+
id: string;
|
|
1146
|
+
label: ReactNode;
|
|
1147
|
+
active?: boolean;
|
|
1148
|
+
pinned?: boolean;
|
|
1149
|
+
}
|
|
1150
|
+
interface SavedViewMenuBaseProps {
|
|
1151
|
+
items: readonly SavedViewItem[];
|
|
1152
|
+
onSelect: (id: string) => void;
|
|
1153
|
+
emptyLabel?: ReactNode;
|
|
1154
|
+
actions?: (item: SavedViewItem) => ReactNode;
|
|
1155
|
+
footer?: ReactNode;
|
|
1156
|
+
}
|
|
1157
|
+
type SavedViewMenuProps = SavedViewMenuBaseProps & ({
|
|
1158
|
+
onPinChange: (id: string, pinned: boolean) => void;
|
|
1159
|
+
pinLabel: string;
|
|
1160
|
+
unpinLabel: string;
|
|
1161
|
+
} | {
|
|
1162
|
+
onPinChange?: undefined;
|
|
1163
|
+
pinLabel?: never;
|
|
1164
|
+
unpinLabel?: never;
|
|
1165
|
+
});
|
|
1166
|
+
/** Generic saved-view selector. Persistence, ownership and authorization remain application concerns. */
|
|
1167
|
+
declare function SavedViewMenu({ items, onSelect, onPinChange, pinLabel, unpinLabel, emptyLabel, actions, footer }: SavedViewMenuProps): react.JSX.Element;
|
|
1168
|
+
|
|
897
1169
|
interface TimelineProps extends HTMLAttributes<HTMLDivElement> {
|
|
898
1170
|
children?: ReactNode;
|
|
899
1171
|
}
|
|
@@ -1732,4 +2004,4 @@ declare function hsvToHex(value: HsvColor): string;
|
|
|
1732
2004
|
declare function contrastRatio(background: string, foreground: string): number | undefined;
|
|
1733
2005
|
declare function meetsContrast(background: string, foreground: string, minimum?: number): boolean;
|
|
1734
2006
|
|
|
1735
|
-
export { Alert, type AlertProps, type AlertTone, type Align, AppShell, type AppShellProps, type AppliedBrandProfileSnapshot, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type BoundedRelationshipGraph, type BrandProfile, BrandProfileEditor, type BrandProfileEditorProps, type BrandProfileLogo, type BrandProfileTypography, BrandProfiles, BuilderCanvas, type BuilderCanvasItem, type BuilderCanvasProps, type BuilderPaletteItem, BulkBar, type BulkBarProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type CalendarDay, Card, type CardProps, CellStrong, CellSub, Checkbox, type CheckboxProps, ColorPicker, type ColorPickerProps, type ColumnFilter, CommandGroup, type CommandGroupProps, CommandItem, type CommandItemProps, CommandPalette, type CommandPaletteProps, Comment, type CommentProps, Comments, type CommentsProps, Composer, ComposerBar, type ComposerBarProps, type ComposerProps, ContentList, ContentListItem, type ContentListItemProps, type ContentListProps, DateRangePicker, type DateRangePickerProps, type DateRangeValue, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, DetailLayout, type DetailLayoutProps, type DiffEntry, type DiffKind, type DiffResolution, type DiffSummary, DiffViewer, type DiffViewerProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, EventRow, type EventRowProps, ExpandToggle, type ExpandToggleProps, FeaturedRundown, FeaturedRundownItem, type FeaturedRundownItemProps, type FeaturedRundownProps, FeaturedStage, type FeaturedStageProps, Field, type FieldProps, type FilterKind, type FilterOp, type FlatNode, Highlighted, type HighlightedProps, type HsvColor, Inbox, InboxDetail, type InboxDetailProps, InboxItem, type InboxItemProps, InboxList, type InboxListProps, type InboxProps, Input, InputGroup, type InputGroupProps, type InputProps, type JsonPrimitive, type JsonValue, Kanban, KanbanCard, type KanbanCardProps, KanbanColumn, type KanbanColumnProps, type KanbanProps, Label, type LabelProps, LicensePositionBar, type LicensePositionBarProps, List, ListItem, type ListItemProps, type ListProps, LoadingState, type LoadingStateProps, Mark, type MarkProps, type MatchBulkResult, MatchReview, type MatchReviewAction, type MatchReviewCandidate, type MatchReviewField, type MatchReviewProps, Meter, type MeterProps, type MeterTone, MetricInput, type MetricInputProps, Modal, type ModalProps, type NavFavouriteItem, NavFavourites, type NavFavouritesLabels, type NavFavouritesProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, NewsLead, type NewsLeadProps, Note, type NoteProps, type NoteTone, NoticeQueue, type NoticeQueueProps, PageHeader, type PageHeaderProps, PageIntro, type PageIntroProps, Pagination, type PaginationProps, Peek, type PeekProps, type PillTone, type PillTreatment, type Placement, Popover, type PopoverProps, type PositionOptions, type PositionResult, type PositionedRelationshipNode, type Primitive, Progress, type ProgressProps, Prose, type ProseProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type Rect, RelationshipGraph, type RelationshipGraphEdge, type RelationshipGraphLegendItem, type RelationshipGraphNode, type RelationshipGraphProps, ResourceGrid, type ResourceGridProps, type RgbColor, type Row, RowAction, type RowActionProps, RowActions, type RowActionsProps, type RuleAction, type RuleActionDefinition, RuleBuilder, type RuleBuilderProps, type RuleCondition, type RuleDefinition, type RuleFieldDefinition, type RuleGroup, type RuleOperatorDefinition, type RuleValidationIssue, type RuleValueEditorProps, SchedulingCalendar, type SchedulingCalendarEntry, type SchedulingCalendarOverlay, type SchedulingCalendarProps, type SchedulingCalendarView, type SchedulingEntryState, type SchedulingOverlayKind, SectionHead, type SectionHeadProps, type Segment, Segmented, SegmentedOption, type SegmentedOptionProps, type SegmentedProps, Select, type SelectAllState, type SelectProps, type ShellNav, type Side, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, type Size, Skeleton, type SkeletonProps, type SortDir, type SortDirection, type SortKey, Spinner, type SpinnerProps, StarButton, type StarButtonProps, Stat, StatLine, type StatLineItem, type StatLineProps, type StatProps, type StatTrend, StatusPill, type StatusPillProps, StatusRow, type StatusRowProps, SubNavItem, type SubNavItemProps, Switch, type SwitchProps, Tab, type TabProps, Table, type TableDensity, type TableProps, TableWrap, type TableWrapProps, Tabs, type TabsProps, Td, type TdProps, Textarea, type TextareaProps, Th, type ThProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineProps, Toast, type ToastProps, type ToastTone, Toaster, type ToasterProps, Tooltip, type TooltipProps, Tr, type TrProps, Tree, type TreeLike, type TreeNavAction, type TreeNodeData, type TreeNodeProps, type TreeProps, type UseAnchoredPositionOptions, type UseTableOptions, type UseTableResult, type UseVirtualRowsOptions, type UseVirtualRowsResult, UserChip, type UserChipProps, type ViewState, type VirtualWindow, type ZonedDateSpan, addCalendarDays, addCalendarMonths, appendRuleNode, applyBrandProfile, applyFilters, boundRelationshipGraph, buildMonthGrid, buildThreeWayDiff, clampMetricValue, clampWidth, computePosition, contrastRatio, cx, enumerateDateSpan, findRuleNodeDepth, flattenTree, hexToRgb, highlightSegments, hsvToHex, hsvToRgb, isDateInRange, isDateUnavailable, isRuleGroup, layoutRelationshipGraph, mapRuleGroup, matchFilter, meetsContrast, mergePinned, moveRuleNode, multiSort, nextSortDir, normalizeHex, parseMetricValue, parseView, relationshipNeighbors, removeRuleNode, reorder, restoreBrandProfile, rgbToHex, rgbToHsv, ruleDepth, searchRows, selectAllState, selectRangeDate, serializeView, shouldVirtualize, startOfMonth, stepMetricValue, summarizeDiff, summarizeRule, toDateKey, toggleId, togglePage, toggleSort, traverseRelationshipNode, treeNav, useAnchoredPosition, useDialog, useTable, useVirtualRows, validateRuleDefinition, virtualWindow, zonedDateKey, zonedDateSpan };
|
|
2007
|
+
export { type AccessStateProps, Alert, type AlertProps, type AlertTone, type Align, AppShell, type AppShellProps, type AppliedBrandProfileSnapshot, type AsyncOperationState, AsyncOperationStatus, type AsyncOperationStatusProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type BoundedRelationshipGraph, type BrandProfile, BrandProfileEditor, type BrandProfileEditorProps, type BrandProfileLogo, type BrandProfileTypography, BrandProfiles, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, BuilderCanvas, type BuilderCanvasItem, type BuilderCanvasProps, type BuilderPaletteItem, BulkBar, type BulkBarProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type CalendarDay, Card, CardLink, type CardLinkProps, type CardProps, CellStrong, CellSub, Checkbox, type CheckboxProps, CollapsibleSection, type CollapsibleSectionProps, ColorPicker, type ColorPickerProps, type ColumnFilter, Combobox, type ComboboxOption, type ComboboxProps, CommandGroup, type CommandGroupProps, CommandItem, type CommandItemProps, CommandPalette, type CommandPaletteProps, Comment, type CommentProps, Comments, type CommentsProps, Composer, ComposerBar, type ComposerBarProps, type ComposerProps, ConfirmDialog, type ConfirmDialogProps, ContentList, ContentListItem, type ContentListItemProps, type ContentListProps, DateRangePicker, type DateRangePickerProps, type DateRangeValue, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, DetailLayout, type DetailLayoutProps, DetailPage, type DetailPageMetric, type DetailPageProps, type DetailPageTab, type DiffEntry, type DiffKind, type DiffResolution, type DiffSummary, DiffViewer, type DiffViewerProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, EventRow, type EventRowProps, ExpandToggle, type ExpandToggleProps, FeaturedRundown, FeaturedRundownItem, type FeaturedRundownItemProps, type FeaturedRundownProps, FeaturedStage, type FeaturedStageProps, Field, type FieldProps, type FilterKind, type FilterOp, type FilterOption, FilterPopover, type FilterPopoverProps, FilteredEmptyState, type FlatNode, ForbiddenState, Highlighted, type HighlightedProps, type HsvColor, Inbox, InboxDetail, type InboxDetailProps, InboxItem, type InboxItemProps, InboxList, type InboxListProps, type InboxProps, Input, InputGroup, type InputGroupProps, type InputProps, type JsonPrimitive, type JsonValue, Kanban, KanbanCard, type KanbanCardProps, KanbanColumn, type KanbanColumnProps, type KanbanProps, Label, type LabelProps, LicensePositionBar, type LicensePositionBarProps, List, ListItem, type ListItemProps, type ListProps, LoadingState, type LoadingStateProps, Mark, type MarkProps, type MatchBulkResult, MatchReview, type MatchReviewAction, type MatchReviewCandidate, type MatchReviewField, type MatchReviewProps, Meter, type MeterProps, type MeterTone, MetricInput, type MetricInputProps, Modal, type ModalProps, type NavFavouriteItem, NavFavourites, type NavFavouritesLabels, type NavFavouritesProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, NewsLead, type NewsLeadProps, NotFoundState, Note, type NoteProps, type NoteTone, NoticeQueue, type NoticeQueueProps, PageHeader, type PageHeaderProps, PageIntro, type PageIntroProps, Pagination, type PaginationProps, Peek, type PeekProps, type PillTone, type PillTreatment, type Placement, Popover, type PopoverProps, type PositionOptions, type PositionResult, type PositionedRelationshipNode, type Primitive, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, Prose, type ProseProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type Rect, type RelatedLinkItem, RelatedLinks, type RelatedLinksProps, RelationshipGraph, type RelationshipGraphEdge, type RelationshipGraphLegendItem, type RelationshipGraphNode, type RelationshipGraphProps, RelativeTime, type RelativeTimeFormatContext, type RelativeTimeProps, type RelativeTimeUnit, type RelativeTimeValue, ResourceGrid, type ResourceGridProps, type RgbColor, type Row, RowAction, type RowActionProps, RowActions, type RowActionsProps, type RuleAction, type RuleActionDefinition, RuleBuilder, type RuleBuilderProps, type RuleCondition, type RuleDefinition, type RuleFieldDefinition, type RuleGroup, type RuleOperatorDefinition, type RuleValidationIssue, type RuleValueEditorProps, type SavedViewItem, SavedViewMenu, type SavedViewMenuProps, SchedulingCalendar, type SchedulingCalendarEntry, type SchedulingCalendarOverlay, type SchedulingCalendarProps, type SchedulingCalendarView, type SchedulingEntryState, type SchedulingOverlayKind, SectionHead, type SectionHeadProps, type Segment, Segmented, SegmentedOption, type SegmentedOptionProps, type SegmentedProps, Select, type SelectAllState, type SelectProps, type ShellNav, type Side, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, type Size, Skeleton, type SkeletonProps, type SortDir, type SortDirection, type SortKey, Spinner, type SpinnerProps, StarButton, type StarButtonProps, Stat, StatLine, type StatLineItem, type StatLineProps, type StatProps, type StatTrend, type StateVariant, StatusPill, type StatusPillProps, StatusRow, type StatusRowProps, SubNavItem, type SubNavItemProps, Switch, type SwitchProps, Tab, type TabProps, Table, type TableDensity, type TableProps, TableWrap, type TableWrapProps, Tabs, type TabsProps, Td, type TdProps, Textarea, type TextareaProps, Th, type ThProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineProps, Toast, type ToastProps, type ToastTone, Toaster, type ToasterProps, ToggleRow, type ToggleRowProps, Tooltip, type TooltipProps, Tr, type TrProps, Tree, type TreeLike, type TreeNavAction, type TreeNodeData, type TreeNodeProps, type TreeProps, type UseAnchoredPositionOptions, type UseTableOptions, type UseTableResult, type UseVirtualRowsOptions, type UseVirtualRowsResult, UserChip, type UserChipProps, ViewMenu, type ViewMenuColumn, type ViewMenuProps, type ViewState, type VirtualWindow, type ZonedDateSpan, addCalendarDays, addCalendarMonths, appendRuleNode, applyBrandProfile, applyFilters, boundRelationshipGraph, buildMonthGrid, buildThreeWayDiff, clampMetricValue, clampWidth, computePosition, contrastRatio, cx, enumerateDateSpan, filterComboboxOptions, findRuleNodeDepth, flattenTree, hexToRgb, highlightSegments, hsvToHex, hsvToRgb, isDateInRange, isDateUnavailable, isRuleGroup, layoutRelationshipGraph, mapRuleGroup, matchFilter, meetsContrast, mergePinned, moveRuleNode, multiSort, nextSortDir, normalizeHex, parseDateValue, parseMetricValue, parseView, relationshipNeighbors, relativeTimeValue, removeRuleNode, reorder, restoreBrandProfile, rgbToHex, rgbToHsv, ruleDepth, searchRows, selectAllState, selectRangeDate, serializeView, shouldVirtualize, startOfMonth, stepMetricValue, summarizeDiff, summarizeRule, toDateKey, toggleId, togglePage, toggleSort, traverseRelationshipNode, treeNav, useAnchoredPosition, useDialog, useTable, useVirtualRows, validateRuleDefinition, virtualWindow, zonedDateKey, zonedDateSpan };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export { UseAnchoredPositionOptions, useAnchoredPosition } from './hooks/useAnch
|
|
|
6
6
|
export { Align, Placement, PositionOptions, PositionResult, Rect, Side, Size, computePosition } from './overlay-position.js';
|
|
7
7
|
export { Button, ButtonGroup, ButtonGroupProps, ButtonProps } from './components/Button.js';
|
|
8
8
|
export { Input, InputGroup, InputGroupProps, InputProps } from './components/Input.js';
|
|
9
|
+
export { Combobox, ComboboxProps } from './components/Combobox.js';
|
|
10
|
+
export { ComboboxOption, filterComboboxOptions } from './combobox-model.js';
|
|
9
11
|
export { Textarea, TextareaProps } from './components/Textarea.js';
|
|
10
12
|
export { Select, SelectProps } from './components/Select.js';
|
|
11
13
|
export { Checkbox, CheckboxProps } from './components/Checkbox.js';
|
|
@@ -13,11 +15,17 @@ export { Radio, RadioGroup, RadioGroupProps, RadioProps } from './components/Rad
|
|
|
13
15
|
export { Switch, SwitchProps } from './components/Switch.js';
|
|
14
16
|
export { Field, FieldProps } from './components/Field.js';
|
|
15
17
|
export { Modal, ModalProps } from './components/Modal.js';
|
|
18
|
+
export { ConfirmDialog, ConfirmDialogProps, PromptDialog, PromptDialogProps } from './components/Dialogs.js';
|
|
16
19
|
export { Drawer, DrawerProps } from './components/Drawer.js';
|
|
17
20
|
export { Peek, PeekProps } from './components/Peek.js';
|
|
18
|
-
export { Card, CardProps } from './components/Card.js';
|
|
21
|
+
export { Card, CardLink, CardLinkProps, CardProps } from './components/Card.js';
|
|
22
|
+
export { BreadcrumbItem, Breadcrumbs, BreadcrumbsProps } from './components/Breadcrumbs.js';
|
|
19
23
|
export { PageHeader, PageHeaderProps } from './components/PageHeader.js';
|
|
20
24
|
export { DetailLayout, DetailLayoutProps } from './components/DetailLayout.js';
|
|
25
|
+
export { DetailPage, DetailPageMetric, DetailPageProps, DetailPageTab } from './components/DetailPage.js';
|
|
26
|
+
export { RelatedLinkItem, RelatedLinks, RelatedLinksProps } from './components/RelatedLinks.js';
|
|
27
|
+
export { ToggleRow, ToggleRowProps } from './components/ToggleRow.js';
|
|
28
|
+
export { CollapsibleSection, CollapsibleSectionProps } from './components/CollapsibleSection.js';
|
|
21
29
|
export { List, ListItem, ListItemProps, ListProps } from './components/List.js';
|
|
22
30
|
export { DescriptionItem, DescriptionItemProps, DescriptionList, DescriptionListItem, DescriptionListProps } from './components/DescriptionList.js';
|
|
23
31
|
export { Tab, TabProps, Tabs, TabsProps } from './components/Tabs.js';
|
|
@@ -36,12 +44,16 @@ export { Progress, ProgressProps } from './components/Progress.js';
|
|
|
36
44
|
export { Meter, MeterProps, MeterTone } from './components/Meter.js';
|
|
37
45
|
export { Stat, StatProps, StatTrend } from './components/Stat.js';
|
|
38
46
|
export { Tooltip, TooltipProps } from './components/Tooltip.js';
|
|
39
|
-
export { EmptyState, EmptyStateProps, ErrorState, ErrorStateProps, LoadingState, LoadingStateProps, Skeleton, SkeletonProps } from './components/States.js';
|
|
47
|
+
export { AccessStateProps, EmptyState, EmptyStateProps, ErrorState, ErrorStateProps, FilteredEmptyState, ForbiddenState, LoadingState, LoadingStateProps, NotFoundState, Skeleton, SkeletonProps, StateVariant } from './components/States.js';
|
|
48
|
+
export { RelativeTime, RelativeTimeFormatContext, RelativeTimeProps } from './components/RelativeTime.js';
|
|
49
|
+
export { RelativeTimeUnit, RelativeTimeValue, parseDateValue, relativeTimeValue } from './relative-time-model.js';
|
|
50
|
+
export { AsyncOperationState, AsyncOperationStatus, AsyncOperationStatusProps } from './components/AsyncOperationStatus.js';
|
|
40
51
|
export { Label, LabelProps } from './components/Label.js';
|
|
41
52
|
export { Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, UserChip, UserChipProps } from './components/Avatar.js';
|
|
42
53
|
export { Comment, CommentProps, Comments, CommentsProps } from './components/Comments.js';
|
|
43
54
|
export { Composer, ComposerBar, ComposerBarProps, ComposerProps } from './components/Composer.js';
|
|
44
55
|
export { Segmented, SegmentedOption, SegmentedOptionProps, SegmentedProps } from './components/Segmented.js';
|
|
56
|
+
export { FilterOption, FilterPopover, FilterPopoverProps, SavedViewItem, SavedViewMenu, SavedViewMenuProps, ViewMenu, ViewMenuColumn, ViewMenuProps } from './components/TableControls.js';
|
|
45
57
|
export { Timeline, TimelineItem, TimelineItemProps, TimelineProps } from './components/Timeline.js';
|
|
46
58
|
export { Note, NoteProps, NoteTone, Prose, ProseProps } from './components/Prose.js';
|
|
47
59
|
export { Popover, PopoverProps } from './components/Popover.js';
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,8 @@ import { useAnchoredPosition } from "./hooks/useAnchoredPosition.js";
|
|
|
6
6
|
import { computePosition } from "./overlay-position.js";
|
|
7
7
|
import { Button, ButtonGroup } from "./components/Button.js";
|
|
8
8
|
import { Input, InputGroup } from "./components/Input.js";
|
|
9
|
+
import { Combobox } from "./components/Combobox.js";
|
|
10
|
+
import { filterComboboxOptions } from "./combobox-model.js";
|
|
9
11
|
import { Textarea } from "./components/Textarea.js";
|
|
10
12
|
import { Select } from "./components/Select.js";
|
|
11
13
|
import { Checkbox } from "./components/Checkbox.js";
|
|
@@ -13,11 +15,17 @@ import { Radio, RadioGroup } from "./components/Radio.js";
|
|
|
13
15
|
import { Switch } from "./components/Switch.js";
|
|
14
16
|
import { Field } from "./components/Field.js";
|
|
15
17
|
import { Modal } from "./components/Modal.js";
|
|
18
|
+
import { ConfirmDialog, PromptDialog } from "./components/Dialogs.js";
|
|
16
19
|
import { Drawer } from "./components/Drawer.js";
|
|
17
20
|
import { Peek } from "./components/Peek.js";
|
|
18
|
-
import { Card } from "./components/Card.js";
|
|
21
|
+
import { Card, CardLink } from "./components/Card.js";
|
|
22
|
+
import { Breadcrumbs } from "./components/Breadcrumbs.js";
|
|
19
23
|
import { PageHeader } from "./components/PageHeader.js";
|
|
20
24
|
import { DetailLayout } from "./components/DetailLayout.js";
|
|
25
|
+
import { DetailPage } from "./components/DetailPage.js";
|
|
26
|
+
import { RelatedLinks } from "./components/RelatedLinks.js";
|
|
27
|
+
import { ToggleRow } from "./components/ToggleRow.js";
|
|
28
|
+
import { CollapsibleSection } from "./components/CollapsibleSection.js";
|
|
21
29
|
import { List, ListItem } from "./components/List.js";
|
|
22
30
|
import { DescriptionList, DescriptionItem } from "./components/DescriptionList.js";
|
|
23
31
|
import { Tabs, Tab } from "./components/Tabs.js";
|
|
@@ -50,12 +58,16 @@ import { Progress } from "./components/Progress.js";
|
|
|
50
58
|
import { Meter } from "./components/Meter.js";
|
|
51
59
|
import { Stat } from "./components/Stat.js";
|
|
52
60
|
import { Tooltip } from "./components/Tooltip.js";
|
|
53
|
-
import { EmptyState, ErrorState, Skeleton, LoadingState } from "./components/States.js";
|
|
61
|
+
import { EmptyState, ErrorState, ForbiddenState, NotFoundState, FilteredEmptyState, Skeleton, LoadingState } from "./components/States.js";
|
|
62
|
+
import { RelativeTime } from "./components/RelativeTime.js";
|
|
63
|
+
import { parseDateValue, relativeTimeValue } from "./relative-time-model.js";
|
|
64
|
+
import { AsyncOperationStatus } from "./components/AsyncOperationStatus.js";
|
|
54
65
|
import { Label } from "./components/Label.js";
|
|
55
66
|
import { Avatar, AvatarGroup, UserChip } from "./components/Avatar.js";
|
|
56
67
|
import { Comments, Comment } from "./components/Comments.js";
|
|
57
68
|
import { Composer, ComposerBar } from "./components/Composer.js";
|
|
58
69
|
import { Segmented, SegmentedOption } from "./components/Segmented.js";
|
|
70
|
+
import { ViewMenu, FilterPopover, SavedViewMenu } from "./components/TableControls.js";
|
|
59
71
|
import { Timeline, TimelineItem } from "./components/Timeline.js";
|
|
60
72
|
import { Prose, Note } from "./components/Prose.js";
|
|
61
73
|
import { Popover } from "./components/Popover.js";
|
|
@@ -121,19 +133,24 @@ import { contrastRatio, hexToRgb, hsvToHex, hsvToRgb, meetsContrast, normalizeHe
|
|
|
121
133
|
export {
|
|
122
134
|
Alert,
|
|
123
135
|
AppShell,
|
|
136
|
+
AsyncOperationStatus,
|
|
124
137
|
Avatar,
|
|
125
138
|
AvatarGroup,
|
|
126
139
|
BrandProfileEditor,
|
|
127
140
|
BrandProfiles,
|
|
141
|
+
Breadcrumbs,
|
|
128
142
|
BuilderCanvas,
|
|
129
143
|
BulkBar,
|
|
130
144
|
Button,
|
|
131
145
|
ButtonGroup,
|
|
132
146
|
Card,
|
|
147
|
+
CardLink,
|
|
133
148
|
CellStrong,
|
|
134
149
|
CellSub,
|
|
135
150
|
Checkbox,
|
|
151
|
+
CollapsibleSection,
|
|
136
152
|
ColorPicker,
|
|
153
|
+
Combobox,
|
|
137
154
|
CommandGroup,
|
|
138
155
|
CommandItem,
|
|
139
156
|
CommandPalette,
|
|
@@ -141,12 +158,14 @@ export {
|
|
|
141
158
|
Comments,
|
|
142
159
|
Composer,
|
|
143
160
|
ComposerBar,
|
|
161
|
+
ConfirmDialog,
|
|
144
162
|
ContentList,
|
|
145
163
|
ContentListItem,
|
|
146
164
|
DateRangePicker,
|
|
147
165
|
DescriptionItem,
|
|
148
166
|
DescriptionList,
|
|
149
167
|
DetailLayout,
|
|
168
|
+
DetailPage,
|
|
150
169
|
DiffViewer,
|
|
151
170
|
Drawer,
|
|
152
171
|
EmptyState,
|
|
@@ -157,6 +176,9 @@ export {
|
|
|
157
176
|
FeaturedRundownItem,
|
|
158
177
|
FeaturedStage,
|
|
159
178
|
Field,
|
|
179
|
+
FilterPopover,
|
|
180
|
+
FilteredEmptyState,
|
|
181
|
+
ForbiddenState,
|
|
160
182
|
Highlighted,
|
|
161
183
|
Inbox,
|
|
162
184
|
InboxDetail,
|
|
@@ -181,6 +203,7 @@ export {
|
|
|
181
203
|
NavGroup,
|
|
182
204
|
NavItem,
|
|
183
205
|
NewsLead,
|
|
206
|
+
NotFoundState,
|
|
184
207
|
Note,
|
|
185
208
|
NoticeQueue,
|
|
186
209
|
PageHeader,
|
|
@@ -189,14 +212,18 @@ export {
|
|
|
189
212
|
Peek,
|
|
190
213
|
Popover,
|
|
191
214
|
Progress,
|
|
215
|
+
PromptDialog,
|
|
192
216
|
Prose,
|
|
193
217
|
Radio,
|
|
194
218
|
RadioGroup,
|
|
219
|
+
RelatedLinks,
|
|
195
220
|
RelationshipGraph,
|
|
221
|
+
RelativeTime,
|
|
196
222
|
ResourceGrid,
|
|
197
223
|
RowAction,
|
|
198
224
|
RowActions,
|
|
199
225
|
RuleBuilder,
|
|
226
|
+
SavedViewMenu,
|
|
200
227
|
SchedulingCalendar,
|
|
201
228
|
SectionHead,
|
|
202
229
|
Segmented,
|
|
@@ -224,10 +251,12 @@ export {
|
|
|
224
251
|
TimelineItem,
|
|
225
252
|
Toast,
|
|
226
253
|
Toaster,
|
|
254
|
+
ToggleRow,
|
|
227
255
|
Tooltip,
|
|
228
256
|
Tr,
|
|
229
257
|
Tree,
|
|
230
258
|
UserChip,
|
|
259
|
+
ViewMenu,
|
|
231
260
|
addCalendarDays,
|
|
232
261
|
addCalendarMonths,
|
|
233
262
|
appendRuleNode,
|
|
@@ -240,6 +269,7 @@ export {
|
|
|
240
269
|
contrastRatio,
|
|
241
270
|
cx,
|
|
242
271
|
enumerateDateSpan,
|
|
272
|
+
filterComboboxOptions,
|
|
243
273
|
findRuleNodeDepth,
|
|
244
274
|
flattenTree,
|
|
245
275
|
hexToRgb,
|
|
@@ -253,8 +283,10 @@ export {
|
|
|
253
283
|
meetsContrast,
|
|
254
284
|
moveRuleNode,
|
|
255
285
|
normalizeHex,
|
|
286
|
+
parseDateValue,
|
|
256
287
|
parseMetricValue,
|
|
257
288
|
relationshipNeighbors,
|
|
289
|
+
relativeTimeValue,
|
|
258
290
|
removeRuleNode,
|
|
259
291
|
restoreBrandProfile,
|
|
260
292
|
rgbToHex,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const clocks = /* @__PURE__ */ new Map();
|
|
2
|
+
const getClock = (interval) => {
|
|
3
|
+
let clock = clocks.get(interval);
|
|
4
|
+
if (!clock) {
|
|
5
|
+
clock = { now: Date.now(), listeners: /* @__PURE__ */ new Set() };
|
|
6
|
+
clocks.set(interval, clock);
|
|
7
|
+
}
|
|
8
|
+
return clock;
|
|
9
|
+
};
|
|
10
|
+
const readRelativeClock = (interval) => getClock(interval).now;
|
|
11
|
+
function subscribeRelativeClock(interval, listener) {
|
|
12
|
+
if (interval <= 0 || typeof window === "undefined") return () => {
|
|
13
|
+
};
|
|
14
|
+
const clock = getClock(interval);
|
|
15
|
+
clock.listeners.add(listener);
|
|
16
|
+
if (!clock.timer) {
|
|
17
|
+
clock.timer = window.setInterval(() => {
|
|
18
|
+
clock.now = Date.now();
|
|
19
|
+
clock.listeners.forEach((notify) => notify());
|
|
20
|
+
}, interval);
|
|
21
|
+
}
|
|
22
|
+
return () => {
|
|
23
|
+
clock.listeners.delete(listener);
|
|
24
|
+
if (clock.listeners.size === 0 && clock.timer) {
|
|
25
|
+
window.clearInterval(clock.timer);
|
|
26
|
+
clock.timer = void 0;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
readRelativeClock,
|
|
32
|
+
subscribeRelativeClock
|
|
33
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type RelativeTimeUnit = 'second' | 'minute' | 'hour' | 'day';
|
|
2
|
+
interface RelativeTimeValue {
|
|
3
|
+
value: number;
|
|
4
|
+
unit: RelativeTimeUnit;
|
|
5
|
+
}
|
|
6
|
+
declare function parseDateValue(value: Date | number | string): Date | null;
|
|
7
|
+
declare function relativeTimeValue(date: Date, now: Date): RelativeTimeValue;
|
|
8
|
+
|
|
9
|
+
export { type RelativeTimeUnit, type RelativeTimeValue, parseDateValue, relativeTimeValue };
|