@omniviewdev/base-ui 0.1.0 → 0.2.1
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/base-ui.css +1 -1
- package/dist/index.d.ts +412 -12
- package/dist/index.js +11202 -9348
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { ButtonHTMLAttributes } from 'react';
|
|
|
10
10
|
import { ChangeEventHandler } from 'react';
|
|
11
11
|
import { Checkbox as Checkbox_2 } from '@base-ui/react/checkbox';
|
|
12
12
|
import { CheckboxGroup as CheckboxGroup_2 } from '@base-ui/react/checkbox-group';
|
|
13
|
+
import { ClipboardEvent as ClipboardEvent_2 } from 'react';
|
|
13
14
|
import { ColumnDef as ColumnDef_2 } from '@tanstack/react-table';
|
|
14
15
|
import { ColumnOrderState } from '@tanstack/react-table';
|
|
15
16
|
import { ColumnPinningState } from '@tanstack/react-table';
|
|
@@ -39,13 +40,16 @@ import { FieldDescriptionProps } from '@base-ui/react';
|
|
|
39
40
|
import { FieldErrorProps } from '@base-ui/react';
|
|
40
41
|
import { FieldLabelProps } from '@base-ui/react';
|
|
41
42
|
import { FieldsetHTMLAttributes } from 'react';
|
|
43
|
+
import { FocusEvent as FocusEvent_2 } from 'react';
|
|
42
44
|
import { ForwardRefExoticComponent } from 'react';
|
|
43
45
|
import { HTMLAttributes } from 'react';
|
|
44
46
|
import { ImgHTMLAttributes } from 'react';
|
|
45
47
|
import { Input as Input_2 } from '@base-ui/react/input';
|
|
46
48
|
import { JSX } from 'react/jsx-runtime';
|
|
49
|
+
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
47
50
|
import { LabelHTMLAttributes } from 'react';
|
|
48
51
|
import { Menu as Menu_2 } from '@base-ui/react/menu';
|
|
52
|
+
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
49
53
|
import { NamedExoticComponent } from 'react';
|
|
50
54
|
import { NumberField } from '@base-ui/react/number-field';
|
|
51
55
|
import { PaginationState } from '@tanstack/react-table';
|
|
@@ -142,7 +146,7 @@ export declare interface AccordionProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
142
146
|
|
|
143
147
|
declare const AccordionRoot: ForwardRefExoticComponent<AccordionProps & RefAttributes<HTMLDivElement>>;
|
|
144
148
|
|
|
145
|
-
export declare type AccordionSize = 'sm' | 'md' | 'lg';
|
|
149
|
+
export declare type AccordionSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
146
150
|
|
|
147
151
|
export declare type AccordionVariant = 'default' | 'flush';
|
|
148
152
|
|
|
@@ -445,7 +449,7 @@ export declare type AvatarShape = 'circle' | 'rounded';
|
|
|
445
449
|
|
|
446
450
|
export declare const Badge: ForwardRefExoticComponent<BadgeProps & RefAttributes<HTMLSpanElement>>;
|
|
447
451
|
|
|
448
|
-
export declare type BadgeColor = 'neutral' | 'brand' | 'success' | 'warning' | 'danger';
|
|
452
|
+
export declare type BadgeColor = 'neutral' | 'brand' | 'success' | 'warning' | 'danger' | 'discovery' | 'secondary';
|
|
449
453
|
|
|
450
454
|
export declare type BadgeOverlap = 'rectangular' | 'circular';
|
|
451
455
|
|
|
@@ -467,7 +471,7 @@ export declare interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>
|
|
|
467
471
|
children: ReactNode;
|
|
468
472
|
}
|
|
469
473
|
|
|
470
|
-
export declare type BadgeSize = 'sm' | 'md' | 'lg';
|
|
474
|
+
export declare type BadgeSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
471
475
|
|
|
472
476
|
export declare type BadgeVariant = 'standard' | 'dot';
|
|
473
477
|
|
|
@@ -601,6 +605,28 @@ export declare interface BreadcrumbsProps extends HTMLAttributes<HTMLElement> {
|
|
|
601
605
|
|
|
602
606
|
declare const BreadcrumbsRoot: ForwardRefExoticComponent<BreadcrumbsProps & RefAttributes<HTMLElement>>;
|
|
603
607
|
|
|
608
|
+
/**
|
|
609
|
+
* Build an ordered array of `Section`s for the given mode/locale/options.
|
|
610
|
+
*
|
|
611
|
+
* Uses `Intl.DateTimeFormat(locale).formatToParts(<representative date>)` to establish
|
|
612
|
+
* the display order (e.g. `en-US` -> month/day/year, `en-GB` -> day/month/year).
|
|
613
|
+
*/
|
|
614
|
+
export declare function buildSections(options: BuildSectionsOptions): Section[];
|
|
615
|
+
|
|
616
|
+
export declare interface BuildSectionsOptions {
|
|
617
|
+
mode: 'date' | 'time' | 'datetime';
|
|
618
|
+
locale?: string;
|
|
619
|
+
hourCycle?: 12 | 24;
|
|
620
|
+
showSeconds?: boolean;
|
|
621
|
+
/** Optional current value used to seed section content. */
|
|
622
|
+
value?: Date | null;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export declare const BUILT_IN_THEME_MODES: readonly BuiltInThemeMode[];
|
|
626
|
+
|
|
627
|
+
/** The built-in modes that a custom theme can inherit from. */
|
|
628
|
+
export declare type BuiltInThemeMode = 'dark' | 'light' | 'high-contrast-dark' | 'high-contrast-light' | 'obsidian' | 'carbon' | 'void';
|
|
629
|
+
|
|
604
630
|
export declare const Button: ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & RefAttributes<HTMLElement>>;
|
|
605
631
|
|
|
606
632
|
export declare const ButtonGroup: ButtonGroupCompound;
|
|
@@ -632,6 +658,36 @@ export declare interface ButtonProps extends Button_2.Props, StyledComponentProp
|
|
|
632
658
|
endDecorator?: ReactNode;
|
|
633
659
|
}
|
|
634
660
|
|
|
661
|
+
export declare function Calendar(props: CalendarProps): JSX.Element;
|
|
662
|
+
|
|
663
|
+
declare type CalendarBaseProps = {
|
|
664
|
+
min?: Date;
|
|
665
|
+
max?: Date;
|
|
666
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
667
|
+
locale?: string;
|
|
668
|
+
weekStartsOn?: WeekStart;
|
|
669
|
+
autoFocus?: boolean;
|
|
670
|
+
className?: string;
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
export declare type CalendarProps = CalendarSingleProps | CalendarRangeProps;
|
|
674
|
+
|
|
675
|
+
declare type CalendarRangeProps = CalendarBaseProps & {
|
|
676
|
+
mode: 'range';
|
|
677
|
+
startDate: Date | null;
|
|
678
|
+
endDate: Date | null;
|
|
679
|
+
onRangeChange: (range: {
|
|
680
|
+
start: Date | null;
|
|
681
|
+
end: Date | null;
|
|
682
|
+
}) => void;
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
declare type CalendarSingleProps = CalendarBaseProps & {
|
|
686
|
+
mode?: 'single';
|
|
687
|
+
value: Date | null;
|
|
688
|
+
onChange: (value: Date) => void;
|
|
689
|
+
};
|
|
690
|
+
|
|
635
691
|
export declare const Caption: <C extends CaptionElement = "span">(props: TypographyBaseProps & TruncationProps & {
|
|
636
692
|
as?: C | undefined;
|
|
637
693
|
} & Omit<PropsWithoutRef<ComponentProps<C>>, "color" | "as" | "truncate" | keyof TypographyBaseProps> & {
|
|
@@ -937,6 +993,8 @@ export declare interface CollapsibleTriggerProps extends HTMLAttributes<HTMLButt
|
|
|
937
993
|
children: ReactNode;
|
|
938
994
|
}
|
|
939
995
|
|
|
996
|
+
declare type ColorTokenKey = 'color.accent.soft' | 'color.accent.strong' | 'color.ansi.black' | 'color.ansi.blue' | 'color.ansi.bright.black' | 'color.ansi.bright.blue' | 'color.ansi.bright.cyan' | 'color.ansi.bright.green' | 'color.ansi.bright.magenta' | 'color.ansi.bright.red' | 'color.ansi.bright.white' | 'color.ansi.bright.yellow' | 'color.ansi.cyan' | 'color.ansi.green' | 'color.ansi.magenta' | 'color.ansi.red' | 'color.ansi.white' | 'color.ansi.yellow' | 'color.bg.base' | 'color.bg.elevated' | 'color.bg.inset' | 'color.bg.surface' | 'color.bg.surface.overlay' | 'color.bg.surface.raised' | 'color.border.default' | 'color.border.focus' | 'color.border.muted' | 'color.border.strong' | 'color.brand.300' | 'color.brand.400' | 'color.brand.500' | 'color.danger' | 'color.danger.soft' | 'color.datepicker.cell.bg' | 'color.datepicker.cell.bg.hover' | 'color.datepicker.cell.bg.selected' | 'color.datepicker.cell.bg.today' | 'color.datepicker.cell.fg' | 'color.datepicker.cell.fg.disabled' | 'color.datepicker.cell.fg.other.month' | 'color.datepicker.cell.fg.selected' | 'color.datepicker.cell.fg.today' | 'color.datepicker.header.bg' | 'color.diff.insert.bg' | 'color.diff.remove.bg' | 'color.discovery' | 'color.discovery.soft' | 'color.drawer.handle' | 'color.drawer.handle.hover' | 'color.editor.bg' | 'color.editor.bracket.1' | 'color.editor.bracket.2' | 'color.editor.bracket.3' | 'color.editor.bracket.4' | 'color.editor.bracket.5' | 'color.editor.bracket.6' | 'color.editor.bracket.match.bg' | 'color.editor.bracket.match.border' | 'color.editor.cursor' | 'color.editor.fg' | 'color.editor.find.match.bg' | 'color.editor.find.match.border' | 'color.editor.find.range.bg' | 'color.editor.group.bg' | 'color.editor.group.border' | 'color.editor.group.drop.border' | 'color.editor.group.header.bg' | 'color.editor.indent.guide' | 'color.editor.indent.guide.active' | 'color.editor.line.highlight.bg' | 'color.editor.line.highlight.border' | 'color.editor.line.number' | 'color.editor.line.number.active' | 'color.editor.link' | 'color.editor.ruler' | 'color.editor.selection.bg' | 'color.editor.selection.inactive.bg' | 'color.editor.whitespace' | 'color.fg.default' | 'color.fg.disabled' | 'color.fg.inverse' | 'color.fg.muted' | 'color.fg.subtle' | 'color.gutter.added' | 'color.gutter.bg' | 'color.gutter.deleted' | 'color.gutter.modified' | 'color.info' | 'color.info.soft' | 'color.minimap.bg' | 'color.minimap.error' | 'color.minimap.find.match' | 'color.minimap.selection' | 'color.minimap.warning' | 'color.progress.fill' | 'color.progress.track' | 'color.scrollarea.thumb' | 'color.scrollarea.thumb.hover' | 'color.scrollarea.track' | 'color.secondary' | 'color.secondary.soft' | 'color.state.focus.ring' | 'color.state.hover' | 'color.state.pressed' | 'color.state.selected' | 'color.success' | 'color.success.soft' | 'color.tab.active.bg' | 'color.tab.active.border' | 'color.tab.active.fg' | 'color.tab.bg' | 'color.tab.border' | 'color.tab.fg' | 'color.tab.hover.bg' | 'color.tab.hover.fg' | 'color.tab.inactive.bg' | 'color.tab.inactive.fg' | 'color.tab.modified.border' | 'color.terminal.bg' | 'color.terminal.border' | 'color.terminal.cursor' | 'color.terminal.fg' | 'color.terminal.selection.bg' | 'color.terminal.selection.fg' | 'color.warning' | 'color.warning.soft';
|
|
997
|
+
|
|
940
998
|
export declare interface ColumnDef {
|
|
941
999
|
/** Unique column identifier, used for Cell matching and sort callbacks */
|
|
942
1000
|
id: string;
|
|
@@ -950,6 +1008,11 @@ export declare interface ColumnDef {
|
|
|
950
1008
|
sortable?: boolean;
|
|
951
1009
|
}
|
|
952
1010
|
|
|
1011
|
+
export declare interface ColumnItem {
|
|
1012
|
+
value: number | string;
|
|
1013
|
+
label: string;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
953
1016
|
export declare const Combobox: ComboboxCompound;
|
|
954
1017
|
|
|
955
1018
|
declare const ComboboxChip: ForwardRefExoticComponent<ComboboxChipProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -1194,9 +1257,9 @@ declare interface CommandListStoreSnapshot {
|
|
|
1194
1257
|
loading: boolean;
|
|
1195
1258
|
}
|
|
1196
1259
|
|
|
1197
|
-
export declare type ComponentColor = 'neutral' | 'brand' | 'success' | 'warning' | 'danger' | 'info';
|
|
1260
|
+
export declare type ComponentColor = 'neutral' | 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'discovery' | 'secondary';
|
|
1198
1261
|
|
|
1199
|
-
export declare type ComponentSize = 'sm' | 'md' | 'lg';
|
|
1262
|
+
export declare type ComponentSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
1200
1263
|
|
|
1201
1264
|
export declare type ComponentVariant = 'solid' | 'soft' | 'outline' | 'ghost';
|
|
1202
1265
|
|
|
@@ -1310,6 +1373,8 @@ declare const ContextMenuTrigger: ForwardRefExoticComponent<ContextMenuTriggerPr
|
|
|
1310
1373
|
export declare interface ContextMenuTriggerProps extends Omit<ComponentPropsWithoutRef<typeof ContextMenu_2.Trigger>, 'color'>, StyledComponentProps {
|
|
1311
1374
|
}
|
|
1312
1375
|
|
|
1376
|
+
export declare function createThemeRegistry(): ThemeRegistry;
|
|
1377
|
+
|
|
1313
1378
|
export declare const DataTable: DataTableCompound;
|
|
1314
1379
|
|
|
1315
1380
|
declare const DataTableBody: ForwardRefExoticComponent<DataTableBodyProps & RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -1419,6 +1484,112 @@ export declare interface DataTableVirtualBodyProps extends HTMLAttributes<HTMLTa
|
|
|
1419
1484
|
fixedRowHeight?: boolean;
|
|
1420
1485
|
}
|
|
1421
1486
|
|
|
1487
|
+
/**
|
|
1488
|
+
* `DateField` — a sectioned, guided input for date/time entry. Each section
|
|
1489
|
+
* (MM, DD, YYYY, HH, mm, ss, AM/PM) is individually editable and validated.
|
|
1490
|
+
*
|
|
1491
|
+
* The component is a thin wrapper over `useDateField`; consumers who need
|
|
1492
|
+
* custom layouts can reach for the hook directly.
|
|
1493
|
+
*/
|
|
1494
|
+
export declare const DateField: ForwardRefExoticComponent<DateFieldProps & RefAttributes<HTMLDivElement>>;
|
|
1495
|
+
|
|
1496
|
+
export declare interface DateFieldProps {
|
|
1497
|
+
value?: Date | null;
|
|
1498
|
+
onChange?: (value: Date | null) => void;
|
|
1499
|
+
mode?: 'date' | 'time' | 'datetime';
|
|
1500
|
+
locale?: string;
|
|
1501
|
+
hourCycle?: 12 | 24;
|
|
1502
|
+
showSeconds?: boolean;
|
|
1503
|
+
min?: Date;
|
|
1504
|
+
max?: Date;
|
|
1505
|
+
disabled?: boolean;
|
|
1506
|
+
readOnly?: boolean;
|
|
1507
|
+
className?: string;
|
|
1508
|
+
'aria-label'?: string;
|
|
1509
|
+
/**
|
|
1510
|
+
* When true, removes the input-shell styling (border, background, padding,
|
|
1511
|
+
* min-height, hover, focus-within ring) so the field can be embedded inside
|
|
1512
|
+
* an outer shell (e.g. a picker trigger) without doubling the border.
|
|
1513
|
+
*/
|
|
1514
|
+
bare?: boolean;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
declare type DateFormat = Intl.DateTimeFormatOptions | ((date: Date) => string);
|
|
1518
|
+
|
|
1519
|
+
export declare function DatePicker(props: DatePickerProps): JSX.Element;
|
|
1520
|
+
|
|
1521
|
+
export declare namespace DatePicker {
|
|
1522
|
+
var Calendar: Calendar;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
export declare interface DatePickerProps extends StyledComponentProps {
|
|
1526
|
+
value?: Date | null;
|
|
1527
|
+
defaultValue?: Date | null;
|
|
1528
|
+
onChange?: (value: Date | null) => void;
|
|
1529
|
+
min?: Date;
|
|
1530
|
+
max?: Date;
|
|
1531
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
1532
|
+
/** @deprecated Ignored for the trigger display; DateField uses Intl locale formatting. Kept for API stability. */
|
|
1533
|
+
format?: DateFormat;
|
|
1534
|
+
locale?: string;
|
|
1535
|
+
/** @deprecated DateField renders per-section placeholders. Kept for API stability. */
|
|
1536
|
+
placeholder?: string;
|
|
1537
|
+
disabled?: boolean;
|
|
1538
|
+
readOnly?: boolean;
|
|
1539
|
+
weekStartsOn?: WeekStart;
|
|
1540
|
+
className?: string;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
export declare interface DateRange {
|
|
1544
|
+
start: Date | null;
|
|
1545
|
+
end: Date | null;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
export declare function DateRangePicker(props: DateRangePickerProps): JSX.Element;
|
|
1549
|
+
|
|
1550
|
+
export declare interface DateRangePickerProps extends StyledComponentProps {
|
|
1551
|
+
value?: DateRange;
|
|
1552
|
+
defaultValue?: DateRange;
|
|
1553
|
+
onChange?: (value: DateRange) => void;
|
|
1554
|
+
min?: Date;
|
|
1555
|
+
max?: Date;
|
|
1556
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
1557
|
+
/** @deprecated Ignored for the trigger display; DateField uses Intl locale formatting. Kept for API stability. */
|
|
1558
|
+
format?: DateFormat;
|
|
1559
|
+
locale?: string;
|
|
1560
|
+
/** @deprecated DateField renders per-section placeholders. Kept for API stability. */
|
|
1561
|
+
placeholder?: string;
|
|
1562
|
+
disabled?: boolean;
|
|
1563
|
+
readOnly?: boolean;
|
|
1564
|
+
weekStartsOn?: WeekStart;
|
|
1565
|
+
className?: string;
|
|
1566
|
+
/** Separator rendered between the start and end DateFields. Default: " – " (en dash with spaces). */
|
|
1567
|
+
rangeSeparator?: string;
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
export declare function DateTimePicker(props: DateTimePickerProps): JSX.Element;
|
|
1571
|
+
|
|
1572
|
+
export declare interface DateTimePickerProps extends StyledComponentProps {
|
|
1573
|
+
value?: Date | null;
|
|
1574
|
+
defaultValue?: Date | null;
|
|
1575
|
+
onChange?: (value: Date | null) => void;
|
|
1576
|
+
min?: Date;
|
|
1577
|
+
max?: Date;
|
|
1578
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
1579
|
+
/** @deprecated Ignored for the trigger display; DateField uses Intl locale formatting. Kept for API stability. */
|
|
1580
|
+
format?: DateFormat;
|
|
1581
|
+
locale?: string;
|
|
1582
|
+
/** @deprecated DateField renders per-section placeholders. Kept for API stability. */
|
|
1583
|
+
placeholder?: string;
|
|
1584
|
+
disabled?: boolean;
|
|
1585
|
+
readOnly?: boolean;
|
|
1586
|
+
weekStartsOn?: WeekStart;
|
|
1587
|
+
showSeconds?: boolean;
|
|
1588
|
+
hourCycle?: 12 | 24;
|
|
1589
|
+
minuteStep?: number;
|
|
1590
|
+
className?: string;
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1422
1593
|
declare interface DebouncedFunction<TArgs extends unknown[], TReturn> {
|
|
1423
1594
|
(...args: TArgs): void;
|
|
1424
1595
|
cancel: () => void;
|
|
@@ -1470,7 +1641,7 @@ export declare type DescriptionListLayout = 'horizontal' | 'vertical' | 'grid';
|
|
|
1470
1641
|
export declare interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
|
|
1471
1642
|
layout?: DescriptionListLayout;
|
|
1472
1643
|
columns?: DescriptionListColumns;
|
|
1473
|
-
size?: 'sm' | 'md' | 'lg';
|
|
1644
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
1474
1645
|
}
|
|
1475
1646
|
|
|
1476
1647
|
declare const DescriptionListRoot: ForwardRefExoticComponent<DescriptionListProps & RefAttributes<HTMLDListElement>>;
|
|
@@ -2002,6 +2173,12 @@ export declare interface FormSectionProps extends FieldsetHTMLAttributes<HTMLFie
|
|
|
2002
2173
|
description?: string;
|
|
2003
2174
|
}
|
|
2004
2175
|
|
|
2176
|
+
/**
|
|
2177
|
+
* Number of days in `month` (1-12) for `year`.
|
|
2178
|
+
* If `year` is not supplied (NaN), assume non-leap behaviour for February (28).
|
|
2179
|
+
*/
|
|
2180
|
+
export declare function getDaysInMonth(year: number, month: number): number;
|
|
2181
|
+
|
|
2005
2182
|
export declare const Grid: GridCompound;
|
|
2006
2183
|
|
|
2007
2184
|
declare interface GridBaseProps extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -2081,7 +2258,6 @@ export declare const IconButton: ForwardRefExoticComponent<Omit<IconButtonProps,
|
|
|
2081
2258
|
|
|
2082
2259
|
export declare interface IconButtonProps extends Omit<ButtonProps, 'children'> {
|
|
2083
2260
|
children: ReactNode;
|
|
2084
|
-
dense?: boolean;
|
|
2085
2261
|
}
|
|
2086
2262
|
|
|
2087
2263
|
declare const Image_2: NamedExoticComponent<ImageProps & RefAttributes<HTMLImageElement>>;
|
|
@@ -2161,6 +2337,9 @@ declare const InputRoot: ForwardRefExoticComponent<Omit<InputRootProps, "ref"> &
|
|
|
2161
2337
|
export declare interface InputRootProps extends Field.Root.Props, StyledComponentProps {
|
|
2162
2338
|
}
|
|
2163
2339
|
|
|
2340
|
+
/** True if the `year` is a leap year (Gregorian calendar). */
|
|
2341
|
+
export declare function isLeapYear(year: number): boolean;
|
|
2342
|
+
|
|
2164
2343
|
export declare interface ItemState {
|
|
2165
2344
|
isSelected: boolean;
|
|
2166
2345
|
isActive: boolean;
|
|
@@ -2872,6 +3051,63 @@ export declare interface SearchInputProps extends Omit<InputControlProps, 'start
|
|
|
2872
3051
|
|
|
2873
3052
|
declare const SecondarySidebar: ForwardRefExoticComponent<AppShellSecondarySidebarProps & RefAttributes<HTMLElement>>;
|
|
2874
3053
|
|
|
3054
|
+
export declare interface Section {
|
|
3055
|
+
type: SectionType;
|
|
3056
|
+
/** Raw typed value or '' if empty */
|
|
3057
|
+
value: string;
|
|
3058
|
+
/** Placeholder shown when value is empty */
|
|
3059
|
+
placeholder: string;
|
|
3060
|
+
/** For digit sections: expected length (e.g. 2 for MM, 4 for YYYY). null for literal/meridiem. */
|
|
3061
|
+
maxLength: number | null;
|
|
3062
|
+
/** Inclusive min/max for validation (e.g. month = 1..12). null for literal/meridiem. */
|
|
3063
|
+
min: number | null;
|
|
3064
|
+
max: number | null;
|
|
3065
|
+
/**
|
|
3066
|
+
* Hour cycle (12 or 24). Set on hour sections only; undefined otherwise.
|
|
3067
|
+
* Validation reads this flag to decide whether meridiem is required, rather
|
|
3068
|
+
* than re-inferring from `max === 12`.
|
|
3069
|
+
*/
|
|
3070
|
+
hourCycle?: 12 | 24;
|
|
3071
|
+
}
|
|
3072
|
+
|
|
3073
|
+
export declare interface SectionDomProps {
|
|
3074
|
+
/** Tag whether this section is currently focused. */
|
|
3075
|
+
'data-focused': '' | undefined;
|
|
3076
|
+
/** True when the value is empty (placeholder shown). */
|
|
3077
|
+
'data-placeholder': '' | undefined;
|
|
3078
|
+
/** True when this is a literal (separator) span — not editable. */
|
|
3079
|
+
'data-literal': '' | undefined;
|
|
3080
|
+
/** 0-based section index, for testing + delegation. */
|
|
3081
|
+
'data-section-index': number;
|
|
3082
|
+
/** Section type, for testing + delegation. */
|
|
3083
|
+
'data-section-type': Section['type'];
|
|
3084
|
+
role?: string;
|
|
3085
|
+
'aria-label'?: string;
|
|
3086
|
+
'aria-readonly'?: boolean;
|
|
3087
|
+
'aria-hidden'?: boolean;
|
|
3088
|
+
contentEditable?: 'true' | 'false' | 'plaintext-only';
|
|
3089
|
+
suppressContentEditableWarning?: boolean;
|
|
3090
|
+
tabIndex?: number;
|
|
3091
|
+
spellCheck?: boolean;
|
|
3092
|
+
autoCorrect?: string;
|
|
3093
|
+
inputMode?: 'numeric' | 'text' | 'none';
|
|
3094
|
+
onClick?: (e: MouseEvent_2<HTMLElement>) => void;
|
|
3095
|
+
onFocus?: (e: FocusEvent_2<HTMLElement>) => void;
|
|
3096
|
+
onBlur?: (e: FocusEvent_2<HTMLElement>) => void;
|
|
3097
|
+
onKeyDown?: (e: KeyboardEvent_2<HTMLElement>) => void;
|
|
3098
|
+
onBeforeInput?: (e: React.SyntheticEvent<HTMLElement>) => void;
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
/**
|
|
3102
|
+
* Section model + pure helpers for the DateField primitive.
|
|
3103
|
+
*
|
|
3104
|
+
* Inspired by MUI X's `useField`, adapted for our constraints:
|
|
3105
|
+
* - Native `Date` (no adapter)
|
|
3106
|
+
* - `Intl.DateTimeFormatToParts` for format tokenization
|
|
3107
|
+
* - Simpler scope: skip localized digits, RTL reordering, adapters
|
|
3108
|
+
*/
|
|
3109
|
+
export declare type SectionType = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'meridiem' | 'literal';
|
|
3110
|
+
|
|
2875
3111
|
export declare const SegmentedControl: SegmentedControlCompound;
|
|
2876
3112
|
|
|
2877
3113
|
declare type SegmentedControlCompound = typeof SegmentedControlRoot & {
|
|
@@ -3101,7 +3337,7 @@ export declare interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
3101
3337
|
size?: SkeletonSize;
|
|
3102
3338
|
}
|
|
3103
3339
|
|
|
3104
|
-
declare type SkeletonSize = 'sm' | 'md' | 'lg';
|
|
3340
|
+
declare type SkeletonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3105
3341
|
|
|
3106
3342
|
export declare type SkeletonVariant = 'text' | 'circular' | 'rectangular' | 'rounded';
|
|
3107
3343
|
|
|
@@ -3198,7 +3434,7 @@ export declare interface SplitButtonActionProps extends Omit<React.ButtonHTMLAtt
|
|
|
3198
3434
|
disabled?: boolean;
|
|
3199
3435
|
}
|
|
3200
3436
|
|
|
3201
|
-
declare type SplitButtonColor = 'neutral' | 'brand' | 'success' | 'warning' | 'danger';
|
|
3437
|
+
declare type SplitButtonColor = 'neutral' | 'brand' | 'success' | 'warning' | 'danger' | 'info' | 'discovery' | 'secondary';
|
|
3202
3438
|
|
|
3203
3439
|
declare type SplitButtonCompound = typeof SplitButtonRoot & {
|
|
3204
3440
|
Action: typeof SplitButtonAction;
|
|
@@ -3360,7 +3596,7 @@ export declare interface StatusDotProps extends HTMLAttributes<HTMLSpanElement>
|
|
|
3360
3596
|
pulse?: boolean;
|
|
3361
3597
|
/** Controls the visual intensity of the pulse animation. */
|
|
3362
3598
|
pulseIntensity?: StatusDotPulseIntensity;
|
|
3363
|
-
size?: 'sm' | 'md' | 'lg';
|
|
3599
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3364
3600
|
}
|
|
3365
3601
|
|
|
3366
3602
|
export declare type StatusDotPulseIntensity = 'subtle' | 'default' | 'strong';
|
|
@@ -3472,6 +3708,8 @@ declare const SwitchThumb: ForwardRefExoticComponent<SwitchThumbProps & RefAttri
|
|
|
3472
3708
|
export declare interface SwitchThumbProps extends Omit<ComponentPropsWithoutRef<typeof Switch_2.Thumb>, 'color'>, StyledComponentProps {
|
|
3473
3709
|
}
|
|
3474
3710
|
|
|
3711
|
+
declare type SyntaxTokenKey = 'syntax.class' | 'syntax.comment' | 'syntax.decorator' | 'syntax.function' | 'syntax.interface' | 'syntax.keyword' | 'syntax.keyword.control' | 'syntax.keyword.operator' | 'syntax.method' | 'syntax.namespace' | 'syntax.number' | 'syntax.operator' | 'syntax.parameter' | 'syntax.property' | 'syntax.punctuation' | 'syntax.regexp' | 'syntax.string' | 'syntax.string.escape' | 'syntax.style.comment' | 'syntax.style.function' | 'syntax.style.keyword' | 'syntax.style.type' | 'syntax.type' | 'syntax.variable';
|
|
3712
|
+
|
|
3475
3713
|
export declare type TabDescriptor = {
|
|
3476
3714
|
id: TabId;
|
|
3477
3715
|
title: string;
|
|
@@ -3640,7 +3878,9 @@ export declare interface TabsRootProps extends Tabs_2.Root.Props, Omit<StyledCom
|
|
|
3640
3878
|
declare const TabsTab: ForwardRefExoticComponent<Omit<TabsTabProps, "ref"> & RefAttributes<HTMLButtonElement>>;
|
|
3641
3879
|
|
|
3642
3880
|
export declare type TabsTabProps = Tabs_2.Tab.Props & {
|
|
3643
|
-
/** Slot rendered
|
|
3881
|
+
/** Slot rendered before the tab label (e.g. icon) */
|
|
3882
|
+
startDecorator?: ReactNode;
|
|
3883
|
+
/** Slot rendered after the tab label (e.g. Badge, count) */
|
|
3644
3884
|
endDecorator?: ReactNode;
|
|
3645
3885
|
};
|
|
3646
3886
|
|
|
@@ -3671,6 +3911,8 @@ export declare interface TagInputProps extends Omit<HTMLAttributes<HTMLDivElemen
|
|
|
3671
3911
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
3672
3912
|
}
|
|
3673
3913
|
|
|
3914
|
+
declare type TerminalTokenKey = never;
|
|
3915
|
+
|
|
3674
3916
|
declare const Text_2: TextComponent;
|
|
3675
3917
|
export { Text_2 as Text }
|
|
3676
3918
|
|
|
@@ -3758,9 +4000,39 @@ export declare interface ThemeContextValue extends ThemeState {
|
|
|
3758
4000
|
setMotion: (motion: ThemeMotion) => void;
|
|
3759
4001
|
}
|
|
3760
4002
|
|
|
4003
|
+
export declare interface ThemeDefinition {
|
|
4004
|
+
/** Stable identifier, used for persistence and activation. */
|
|
4005
|
+
id: string;
|
|
4006
|
+
/** Human-readable display name. */
|
|
4007
|
+
name: string;
|
|
4008
|
+
/** The built-in mode this theme inherits from. */
|
|
4009
|
+
base: BuiltInThemeMode;
|
|
4010
|
+
/** Optional author metadata. */
|
|
4011
|
+
author?: string;
|
|
4012
|
+
/** Optional version string. */
|
|
4013
|
+
version?: string;
|
|
4014
|
+
/** UI chrome color overrides, keyed by dotted token path. */
|
|
4015
|
+
colors?: Partial<Record<ColorTokenKey, string>>;
|
|
4016
|
+
/** Syntax highlighting overrides. */
|
|
4017
|
+
syntax?: Partial<Record<SyntaxTokenKey, string>>;
|
|
4018
|
+
/** Terminal ANSI palette overrides. */
|
|
4019
|
+
terminal?: Partial<Record<TerminalTokenKey, string>>;
|
|
4020
|
+
}
|
|
4021
|
+
|
|
3761
4022
|
export declare type ThemeDensity = 'compact' | 'comfortable';
|
|
3762
4023
|
|
|
3763
|
-
export declare
|
|
4024
|
+
export declare interface ThemeInfo {
|
|
4025
|
+
id: string;
|
|
4026
|
+
name: string;
|
|
4027
|
+
base: BuiltInThemeMode;
|
|
4028
|
+
builtIn: boolean;
|
|
4029
|
+
}
|
|
4030
|
+
|
|
4031
|
+
/**
|
|
4032
|
+
* A theme identifier. Built-in mode ids autocomplete; any registered custom
|
|
4033
|
+
* theme id is also accepted.
|
|
4034
|
+
*/
|
|
4035
|
+
export declare type ThemeMode = BuiltInThemeMode | (string & {});
|
|
3764
4036
|
|
|
3765
4037
|
export declare type ThemeMotion = 'normal' | 'reduced';
|
|
3766
4038
|
|
|
@@ -3773,6 +4045,33 @@ export declare interface ThemeProviderProps extends PropsWithChildren {
|
|
|
3773
4045
|
persist?: boolean;
|
|
3774
4046
|
}
|
|
3775
4047
|
|
|
4048
|
+
export declare interface ThemeRegistry {
|
|
4049
|
+
register(theme: ThemeDefinition): void;
|
|
4050
|
+
unregister(id: string): void;
|
|
4051
|
+
get(id: string): ThemeDefinition | undefined;
|
|
4052
|
+
list(): ThemeInfo[];
|
|
4053
|
+
has(id: string): boolean;
|
|
4054
|
+
apply(id: string): void;
|
|
4055
|
+
active(): string | null;
|
|
4056
|
+
subscribe(listener: ThemeRegistryListener): () => void;
|
|
4057
|
+
}
|
|
4058
|
+
|
|
4059
|
+
/** Module-level singleton. */
|
|
4060
|
+
export declare const themeRegistry: ThemeRegistry;
|
|
4061
|
+
|
|
4062
|
+
export declare type ThemeRegistryEvent = {
|
|
4063
|
+
type: 'registered';
|
|
4064
|
+
id: string;
|
|
4065
|
+
} | {
|
|
4066
|
+
type: 'unregistered';
|
|
4067
|
+
id: string;
|
|
4068
|
+
} | {
|
|
4069
|
+
type: 'applied';
|
|
4070
|
+
id: string;
|
|
4071
|
+
};
|
|
4072
|
+
|
|
4073
|
+
export declare type ThemeRegistryListener = (event: ThemeRegistryEvent) => void;
|
|
4074
|
+
|
|
3776
4075
|
export declare interface ThemeState {
|
|
3777
4076
|
theme: ThemeMode;
|
|
3778
4077
|
density: ThemeDensity;
|
|
@@ -3785,6 +4084,21 @@ export declare interface ThemeSwitcherProps {
|
|
|
3785
4084
|
className?: string;
|
|
3786
4085
|
}
|
|
3787
4086
|
|
|
4087
|
+
export declare function TimeColumns({ value, onChange, hourCycle, showSeconds, minuteStep, disabled, readOnly, className, }: TimeColumnsProps): JSX.Element;
|
|
4088
|
+
|
|
4089
|
+
export declare interface TimeColumnsProps {
|
|
4090
|
+
value: Date;
|
|
4091
|
+
onChange: (next: Date) => void;
|
|
4092
|
+
hourCycle?: 12 | 24;
|
|
4093
|
+
showSeconds?: boolean;
|
|
4094
|
+
minuteStep?: number;
|
|
4095
|
+
disabled?: boolean;
|
|
4096
|
+
readOnly?: boolean;
|
|
4097
|
+
className?: string;
|
|
4098
|
+
/** Auto-scroll columns so selected item is visible on mount. Default true. */
|
|
4099
|
+
autoScroll?: boolean;
|
|
4100
|
+
}
|
|
4101
|
+
|
|
3788
4102
|
export declare const Timeline: TimelineCompound;
|
|
3789
4103
|
|
|
3790
4104
|
declare type TimelineCompound = typeof TimelineRoot & {
|
|
@@ -3823,6 +4137,21 @@ export declare interface TimelineProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
3823
4137
|
|
|
3824
4138
|
declare const TimelineRoot: ForwardRefExoticComponent<TimelineProps & RefAttributes<HTMLDivElement>>;
|
|
3825
4139
|
|
|
4140
|
+
export declare function TimePicker(props: TimePickerProps): JSX.Element;
|
|
4141
|
+
|
|
4142
|
+
export declare interface TimePickerProps extends StyledComponentProps {
|
|
4143
|
+
value?: Date | null;
|
|
4144
|
+
defaultValue?: Date | null;
|
|
4145
|
+
onChange?: (value: Date) => void;
|
|
4146
|
+
showSeconds?: boolean;
|
|
4147
|
+
hourCycle?: 12 | 24;
|
|
4148
|
+
minuteStep?: number;
|
|
4149
|
+
disabled?: boolean;
|
|
4150
|
+
readOnly?: boolean;
|
|
4151
|
+
className?: string;
|
|
4152
|
+
'aria-label'?: string;
|
|
4153
|
+
}
|
|
4154
|
+
|
|
3826
4155
|
declare interface ToastContextValue {
|
|
3827
4156
|
toast: (message: string, options?: ToastOptions) => string;
|
|
3828
4157
|
dismiss: (id: string) => void;
|
|
@@ -4272,6 +4601,50 @@ export declare interface UseDataTableOptions<TData> {
|
|
|
4272
4601
|
*/
|
|
4273
4602
|
export declare function useDataTablePersistence(table: Table_2<any>, key: string | undefined): void;
|
|
4274
4603
|
|
|
4604
|
+
/**
|
|
4605
|
+
* `useDateField` is the headless hook driving the sectioned input primitive.
|
|
4606
|
+
* It maintains section state derived from (locale, mode, value), handles
|
|
4607
|
+
* keyboard + paste, and calls `onChange` with a parsed Date when the sections
|
|
4608
|
+
* represent a complete valid datetime.
|
|
4609
|
+
*/
|
|
4610
|
+
export declare function useDateField(options: UseDateFieldOptions): UseDateFieldReturn;
|
|
4611
|
+
|
|
4612
|
+
export declare interface UseDateFieldOptions {
|
|
4613
|
+
value: Date | null;
|
|
4614
|
+
onChange?: (value: Date | null) => void;
|
|
4615
|
+
mode: 'date' | 'time' | 'datetime';
|
|
4616
|
+
locale?: string;
|
|
4617
|
+
hourCycle?: 12 | 24;
|
|
4618
|
+
showSeconds?: boolean;
|
|
4619
|
+
min?: Date;
|
|
4620
|
+
max?: Date;
|
|
4621
|
+
disabled?: boolean;
|
|
4622
|
+
readOnly?: boolean;
|
|
4623
|
+
}
|
|
4624
|
+
|
|
4625
|
+
export declare interface UseDateFieldReturn {
|
|
4626
|
+
/** Current sections (derived from options + user edits). */
|
|
4627
|
+
sections: Section[];
|
|
4628
|
+
/** 0-based index of the currently focused section, or null. */
|
|
4629
|
+
focusedIndex: number | null;
|
|
4630
|
+
/** Whether the current section state represents a complete valid date. */
|
|
4631
|
+
isValid: boolean;
|
|
4632
|
+
/** Spread these onto the root element. */
|
|
4633
|
+
rootProps: {
|
|
4634
|
+
role: 'group';
|
|
4635
|
+
'aria-disabled': boolean | undefined;
|
|
4636
|
+
onKeyDown: (e: KeyboardEvent_2<HTMLElement>) => void;
|
|
4637
|
+
onPaste: (e: ClipboardEvent_2<HTMLElement>) => void;
|
|
4638
|
+
onBlur: (e: FocusEvent_2<HTMLElement>) => void;
|
|
4639
|
+
};
|
|
4640
|
+
/** Returns per-section DOM props for the editable section span. */
|
|
4641
|
+
getSectionProps: (index: number) => SectionDomProps;
|
|
4642
|
+
/** Register a ref for a section's DOM element (callback ref). */
|
|
4643
|
+
registerSectionRef: (index: number) => (el: HTMLElement | null) => void;
|
|
4644
|
+
/** Programmatically focus a section by index. */
|
|
4645
|
+
focusSection: (index: number) => void;
|
|
4646
|
+
}
|
|
4647
|
+
|
|
4275
4648
|
/**
|
|
4276
4649
|
* Returns a debounced version of the callback that only fires after `delay` ms
|
|
4277
4650
|
* of no invocations. Includes `cancel()` and `flush()` methods.
|
|
@@ -4368,6 +4741,16 @@ export declare function useTabDragBroker(): TabDragBrokerValue | null;
|
|
|
4368
4741
|
|
|
4369
4742
|
export declare function useTheme(): ThemeContextValue;
|
|
4370
4743
|
|
|
4744
|
+
/**
|
|
4745
|
+
* React hook that returns the current list of registered themes (built-in +
|
|
4746
|
+
* custom) and re-renders the calling component whenever a theme is
|
|
4747
|
+
* registered or unregistered.
|
|
4748
|
+
*/
|
|
4749
|
+
export declare function useThemeList(): readonly ThemeInfo[];
|
|
4750
|
+
|
|
4751
|
+
/** Returns the module-level theme registry singleton. */
|
|
4752
|
+
export declare function useThemeRegistry(): ThemeRegistry;
|
|
4753
|
+
|
|
4371
4754
|
export declare function useToast(): ToastContextValue;
|
|
4372
4755
|
|
|
4373
4756
|
export declare function useTreeActions(): TreeActionsContextValue;
|
|
@@ -4389,4 +4772,21 @@ export declare function useTreeStoreContext(): TreeStore;
|
|
|
4389
4772
|
/** Validation function. Return a FieldErrors map (empty or all-undefined = valid). */
|
|
4390
4773
|
export declare type ValidateItem = (key: Key, values: Record<string, string>) => FieldErrors | Promise<FieldErrors>;
|
|
4391
4774
|
|
|
4775
|
+
/**
|
|
4776
|
+
* Validate + parse sections into a Date.
|
|
4777
|
+
* Returns `{ valid: false, date: null, incomplete: true }` when any required section is empty.
|
|
4778
|
+
*/
|
|
4779
|
+
export declare function validateSections(sections: Section[]): ValidateSectionsResult;
|
|
4780
|
+
|
|
4781
|
+
export declare interface ValidateSectionsResult {
|
|
4782
|
+
/** True when all non-literal sections are populated AND valid. */
|
|
4783
|
+
valid: boolean;
|
|
4784
|
+
/** Parsed Date on success, null on failure or incompleteness. */
|
|
4785
|
+
date: Date | null;
|
|
4786
|
+
/** True if ANY section is empty (different from "invalid"). */
|
|
4787
|
+
incomplete: boolean;
|
|
4788
|
+
}
|
|
4789
|
+
|
|
4790
|
+
declare type WeekStart = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
4791
|
+
|
|
4392
4792
|
export { }
|