@vuu-ui/vuu-ui-controls 4.0.0-alpha.9 → 4.0.0-beta.2
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/package.json +16 -14
- package/src/context-panel-provider/ContextPanelProvider.js +40 -28
- package/src/drag-drop/Draggable.css.js +2 -2
- package/src/expando-input/ExpandoInput.css.js +1 -1
- package/src/icon-button/Icon.js +0 -1
- package/src/icon-button/IconButton.js +1 -1
- package/src/icon-button/ToggleIconButton.css.js +1 -1
- package/src/index.js +1 -1
- package/src/instrument-picker/useTablePicker.js +2 -3
- package/src/item-picker/ItemPicker.css.js +1 -1
- package/src/item-picker/ItemPicker.js +53 -79
- package/src/price-ticker/PriceTicker.css.js +4 -4
- package/src/split-pane/SplitPane.css.js +82 -0
- package/src/split-pane/SplitPane.js +60 -0
- package/src/split-pane/Splitter.js +82 -0
- package/src/split-pane/index.js +1 -0
- package/src/split-pane/useSplitPane.js +101 -0
- package/src/tabstrip/Tab.css.js +3 -3
- package/src/tabstrip/Tabstrip.css.js +2 -2
- package/src/tabstrip/Tabstrip.js +1 -1
- package/src/time-input/MaskedInput.js +176 -156
- package/src/time-input/TimeInput.css.js +41 -18
- package/src/time-input/TimeInput.js +25 -14
- package/src/time-input/useTimeInput.js +57 -47
- package/src/toolbar/Toolbar.css.js +1 -1
- package/src/vuu-date-picker/VuuDatePicker.js +46 -52
- package/src/vuu-time-picker/VuuTimePicker.js +6 -5
- package/types/context-panel-provider/ContextPanelProvider.d.ts +7 -4
- package/types/drag-drop/DragDropProvider.d.ts +1 -1
- package/types/hover-overlay/HoverOverlay.d.ts +1 -1
- package/types/icon-button/Icon.d.ts +2 -2
- package/types/icon-button/IconButton.d.ts +1 -1
- package/types/icon-button/ToggleIconButton.d.ts +1 -1
- package/types/index.d.ts +4 -3
- package/types/instrument-picker/SearchCell.d.ts +1 -1
- package/types/instrument-picker/TablePicker.d.ts +1 -1
- package/types/instrument-picker/useTablePicker.d.ts +1 -1
- package/types/item-picker/ItemPicker.d.ts +5 -26
- package/types/item-picker/useItemPicker.d.ts +3 -4
- package/types/modal-provider/ModalProvider.d.ts +1 -1
- package/types/price-ticker/PriceTicker.d.ts +1 -1
- package/types/prompt/Prompt.d.ts +1 -1
- package/types/sortable-list/SortableList.d.ts +2 -2
- package/types/split-button/useSplitButton.d.ts +12 -12
- package/types/split-pane/SplitPane.d.ts +44 -0
- package/types/split-pane/Splitter.d.ts +10 -0
- package/types/split-pane/index.d.ts +2 -0
- package/types/split-pane/useSplitPane.d.ts +18 -0
- package/types/table-search/SearchCell.d.ts +1 -1
- package/types/table-search/TableSearch.d.ts +1 -1
- package/types/tabstrip/TabMenu.d.ts +1 -1
- package/types/tabstrip/Tabstrip.d.ts +2 -3
- package/types/time-input/MaskedInput.d.ts +60 -10
- package/types/time-input/TimeInput.d.ts +4 -3
- package/types/time-input/useTimeInput.d.ts +24 -5
- package/types/toolbar/Toolbar.d.ts +1 -2
- package/types/vuu-date-picker/VuuDatePicker.d.ts +19 -3
- package/types/vuu-time-picker/VuuTimePicker.d.ts +8 -6
- package/types/vuu-typeahead-input/VuuTypeaheadInput.d.ts +1 -1
- package/types/src/calendar/Calendar.d.ts +0 -13
- package/types/src/calendar/index.d.ts +0 -4
- package/types/src/calendar/internal/CalendarCarousel.d.ts +0 -3
- package/types/src/calendar/internal/CalendarContext.d.ts +0 -8
- package/types/src/calendar/internal/CalendarDay.d.ts +0 -14
- package/types/src/calendar/internal/CalendarMonth.d.ts +0 -10
- package/types/src/calendar/internal/CalendarNavigation.d.ts +0 -16
- package/types/src/calendar/internal/CalendarWeekHeader.d.ts +0 -3
- package/types/src/calendar/internal/useFocusManagement.d.ts +0 -9
- package/types/src/calendar/internal/utils.d.ts +0 -15
- package/types/src/calendar/useCalendar.d.ts +0 -54
- package/types/src/calendar/useCalendarDay.d.ts +0 -22
- package/types/src/calendar/useSelection.d.ts +0 -78
- package/types/src/column-picker/ColumnPicker.d.ts +0 -7
- package/types/src/column-picker/ColumnSearch.d.ts +0 -12
- package/types/src/column-picker/index.d.ts +0 -2
- package/types/src/column-picker/moving-window.d.ts +0 -14
- package/types/src/common-hooks/index.d.ts +0 -3
- package/types/src/common-hooks/selectionTypes.d.ts +0 -70
- package/types/src/common-hooks/use-resize-observer.d.ts +0 -16
- package/types/src/common-hooks/useControlled.d.ts +0 -24
- package/types/src/context-panel-provider/ContextPanelProvider.d.ts +0 -17
- package/types/src/cycle-state-button/CycleStateButton.d.ts +0 -11
- package/types/src/cycle-state-button/index.d.ts +0 -1
- package/types/src/date-input/DateInput.d.ts +0 -60
- package/types/src/date-input/index.d.ts +0 -1
- package/types/src/date-picker/DatePicker.d.ts +0 -66
- package/types/src/date-picker/DatePickerContext.d.ts +0 -19
- package/types/src/date-picker/DatePickerPanel.d.ts +0 -10
- package/types/src/date-picker/index.d.ts +0 -1
- package/types/src/drag-drop/DragDropProvider.d.ts +0 -38
- package/types/src/drag-drop/DragDropState.d.ts +0 -15
- package/types/src/drag-drop/Draggable.d.ts +0 -13
- package/types/src/drag-drop/DropIndicator.d.ts +0 -5
- package/types/src/drag-drop/dragDropTypes.d.ts +0 -100
- package/types/src/drag-drop/drop-target-utils.d.ts +0 -82
- package/types/src/drag-drop/index.d.ts +0 -6
- package/types/src/drag-drop/useAutoScroll.d.ts +0 -11
- package/types/src/drag-drop/useDragDisplacers.d.ts +0 -17
- package/types/src/drag-drop/useDragDrop.d.ts +0 -2
- package/types/src/drag-drop/useDragDropCopy.d.ts +0 -6
- package/types/src/drag-drop/useDragDropIndicator.d.ts +0 -2
- package/types/src/drag-drop/useDragDropNaturalMovement.d.ts +0 -2
- package/types/src/drag-drop/useDropIndicator.d.ts +0 -8
- package/types/src/drag-drop/useGlobalDragDrop.d.ts +0 -11
- package/types/src/drag-drop/useTransition.d.ts +0 -3
- package/types/src/editable/index.d.ts +0 -1
- package/types/src/editable/useEditableText.d.ts +0 -21
- package/types/src/editable-label/EditableLabel.d.ts +0 -19
- package/types/src/editable-label/index.d.ts +0 -1
- package/types/src/expando-input/ExpandoInput.d.ts +0 -6
- package/types/src/expando-input/index.d.ts +0 -1
- package/types/src/highlighter/Highlighter.d.ts +0 -6
- package/types/src/highlighter/index.d.ts +0 -1
- package/types/src/hover-overlay/HoverOverlay.d.ts +0 -8
- package/types/src/icon-button/Icon.d.ts +0 -6
- package/types/src/icon-button/IconButton.d.ts +0 -6
- package/types/src/icon-button/ToggleIconButton.d.ts +0 -5
- package/types/src/icon-button/index.d.ts +0 -3
- package/types/src/index.d.ts +0 -33
- package/types/src/instrument-picker/SearchCell.d.ts +0 -2
- package/types/src/instrument-picker/TablePicker.d.ts +0 -11
- package/types/src/instrument-picker/index.d.ts +0 -1
- package/types/src/instrument-picker/moving-window.d.ts +0 -14
- package/types/src/instrument-picker/useDataSource.d.ts +0 -6
- package/types/src/instrument-picker/useTablePicker.d.ts +0 -47
- package/types/src/item-picker/ItemPicker.d.ts +0 -14
- package/types/src/item-picker/useItemPicker.d.ts +0 -35
- package/types/src/measured-container/MeasuredContainer.d.ts +0 -16
- package/types/src/measured-container/index.d.ts +0 -2
- package/types/src/measured-container/useMeasuredContainer.d.ts +0 -23
- package/types/src/modal-provider/ModalProvider.d.ts +0 -13
- package/types/src/overflow-container/OverflowContainer.d.ts +0 -15
- package/types/src/overflow-container/index.d.ts +0 -2
- package/types/src/overflow-container/overflow-utils.d.ts +0 -48
- package/types/src/overflow-container/useOverflowContainer.d.ts +0 -19
- package/types/src/price-ticker/PriceTicker.d.ts +0 -7
- package/types/src/price-ticker/index.d.ts +0 -1
- package/types/src/prompt/Prompt.d.ts +0 -53
- package/types/src/sortable-list/SortableList.d.ts +0 -8
- package/types/src/split-button/SplitButton.d.ts +0 -11
- package/types/src/split-button/SplitStateButton.d.ts +0 -5
- package/types/src/split-button/index.d.ts +0 -2
- package/types/src/split-button/useSplitButton.d.ts +0 -311
- package/types/src/table-search/SearchCell.d.ts +0 -2
- package/types/src/table-search/TableSearch.d.ts +0 -9
- package/types/src/table-search/index.d.ts +0 -1
- package/types/src/table-search/moving-window.d.ts +0 -14
- package/types/src/table-search/useTableSearch.d.ts +0 -15
- package/types/src/tabs-next/TabBar.d.ts +0 -12
- package/types/src/tabs-next/TabListNext.d.ts +0 -12
- package/types/src/tabs-next/TabNext.d.ts +0 -12
- package/types/src/tabs-next/TabNextAction.d.ts +0 -5
- package/types/src/tabs-next/TabNextContext.d.ts +0 -12
- package/types/src/tabs-next/TabNextPanel.d.ts +0 -8
- package/types/src/tabs-next/TabNextTrigger.d.ts +0 -5
- package/types/src/tabs-next/TabOverflowList.d.ts +0 -11
- package/types/src/tabs-next/TabsNext.d.ts +0 -17
- package/types/src/tabs-next/TabsNextContext.d.ts +0 -21
- package/types/src/tabs-next/hooks/useCollection.d.ts +0 -18
- package/types/src/tabs-next/hooks/useFocusOutside.d.ts +0 -2
- package/types/src/tabs-next/hooks/useOverflow.d.ts +0 -11
- package/types/src/tabs-next/index.d.ts +0 -7
- package/types/src/tabstrip/Tab.d.ts +0 -27
- package/types/src/tabstrip/TabMenu.d.ts +0 -23
- package/types/src/tabstrip/TabMenuOptions.d.ts +0 -10
- package/types/src/tabstrip/TabsTypes.d.ts +0 -127
- package/types/src/tabstrip/Tabstrip.d.ts +0 -3
- package/types/src/tabstrip/index.d.ts +0 -5
- package/types/src/tabstrip/tabstrip-dom-utils.d.ts +0 -2
- package/types/src/tabstrip/useAnimatedSelectionThumb.d.ts +0 -7
- package/types/src/tabstrip/useKeyboardNavigation.d.ts +0 -29
- package/types/src/tabstrip/useSelection.d.ts +0 -13
- package/types/src/tabstrip/useTabstrip.d.ts +0 -55
- package/types/src/time-input/MaskedInput.d.ts +0 -49
- package/types/src/time-input/TimeInput.d.ts +0 -5
- package/types/src/time-input/useTimeInput.d.ts +0 -21
- package/types/src/toolbar/Toolbar.d.ts +0 -20
- package/types/src/toolbar/index.d.ts +0 -1
- package/types/src/toolbar/toolbar-dom-utils.d.ts +0 -3
- package/types/src/toolbar/useKeyboardNavigation.d.ts +0 -32
- package/types/src/toolbar/useSelection.d.ts +0 -22
- package/types/src/toolbar/useToolbar.d.ts +0 -28
- package/types/src/utils/deprecated-types.d.ts +0 -2
- package/types/src/utils/escapeRegExp.d.ts +0 -1
- package/types/src/utils/forwardCallbackProps.d.ts +0 -3
- package/types/src/utils/index.d.ts +0 -5
- package/types/src/utils/isOverflowElement.d.ts +0 -1
- package/types/src/utils/isPlainObject.d.ts +0 -1
- package/types/src/vuu-date-picker/VuuDatePicker.d.ts +0 -7
- package/types/src/vuu-date-picker/index.d.ts +0 -1
- package/types/src/vuu-input/VuuInput.d.ts +0 -18
- package/types/src/vuu-input/index.d.ts +0 -1
- package/types/src/vuu-time-picker/TimeRangePicker.d.ts +0 -0
- package/types/src/vuu-time-picker/VuuTimePicker.d.ts +0 -7
- package/types/src/vuu-typeahead-input/VuuTypeaheadInput.d.ts +0 -6
- package/types/src/vuu-typeahead-input/index.d.ts +0 -1
- package/types/src/vuu-typeahead-input/useVuuTypeaheadInput.d.ts +0 -49
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type SplitPaneDirection = "row" | "column";
|
|
2
|
+
/**
|
|
3
|
+
* Sizes (in px) of the two panes, measured along the main axis.
|
|
4
|
+
*/
|
|
5
|
+
export type SplitPaneSizes = [number, number];
|
|
6
|
+
export type SplitterMovedHandler = (sizes: SplitPaneSizes) => void;
|
|
7
|
+
export interface SplitPaneHookProps {
|
|
8
|
+
direction: SplitPaneDirection;
|
|
9
|
+
onSplitterMoved?: SplitterMovedHandler;
|
|
10
|
+
paneCount: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const useSplitPane: ({ direction, onSplitterMoved, paneCount, }: SplitPaneHookProps) => {
|
|
13
|
+
beginResize: () => boolean;
|
|
14
|
+
endResize: () => void;
|
|
15
|
+
resize: (distance: number) => void;
|
|
16
|
+
rootRef: import("react").RefObject<HTMLDivElement | null>;
|
|
17
|
+
splitterPosition: number | undefined;
|
|
18
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TableCellRendererProps } from "@vuu-ui/vuu-table-types";
|
|
2
|
-
export declare const SearchCell: ({ column, dataRow, searchPattern, }: TableCellRendererProps) => import("react").JSX.Element;
|
|
2
|
+
export declare const SearchCell: ({ column, dataRow, searchPattern, }: TableCellRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,4 +6,4 @@ export interface TableSearchProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
placeHolder?: string;
|
|
7
7
|
searchColumns: string[];
|
|
8
8
|
}
|
|
9
|
-
export declare const TableSearch: ({ TableProps: { dataSource: dataSourceProp, ...TableProps }, autoFocus, className, placeHolder, searchColumns, ...htmlAttributes }: TableSearchProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const TableSearch: ({ TableProps: { dataSource: dataSourceProp, ...TableProps }, autoFocus, className, placeHolder, searchColumns, ...htmlAttributes }: TableSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -20,4 +20,4 @@ export interface TabMenuProps {
|
|
|
20
20
|
*/
|
|
21
21
|
controlledComponentTitle?: string;
|
|
22
22
|
}
|
|
23
|
-
export declare const TabMenu: ({ allowClose, allowRename, controlledComponentId, controlledComponentTitle, location, onMenuAction, onMenuClose, index, }: TabMenuProps) => import("react").JSX.Element;
|
|
23
|
+
export declare const TabMenu: ({ allowClose, allowRename, controlledComponentId, controlledComponentTitle, location, onMenuAction, onMenuClose, index, }: TabMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export declare const Tabstrip: ({ activeTabIndex: activeTabIndexProp, allowAddTab, allowCloseTab, allowDragDrop, allowRenameTab, animateSelectionThumb, children, className: classNameProp, id: idProp, keyBoardActivation, location, onActiveChange, onAddTab, onCloseTab, onExitEditMode, onMoveTab, orientation, showTabMenuButton, style: styleProp, tabClassName, variant, ...htmlAttributes }: TabstripProps) => React.JSX.Element;
|
|
1
|
+
import { TabstripProps } from "./TabsTypes";
|
|
2
|
+
export declare const Tabstrip: ({ activeTabIndex: activeTabIndexProp, allowAddTab, allowCloseTab, allowDragDrop, allowRenameTab, animateSelectionThumb, children, className: classNameProp, id: idProp, keyBoardActivation, location, onActiveChange, onAddTab, onCloseTab, onExitEditMode, onMoveTab, orientation, showTabMenuButton, style: styleProp, tabClassName, variant, ...htmlAttributes }: TabstripProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,32 @@
|
|
|
1
|
-
import { EventEmitter, TimeString, TimeUnit } from "@vuu-ui/vuu-utils";
|
|
1
|
+
import { EventEmitter, TimeString, TimeStringMillis, TimeUnit } from "@vuu-ui/vuu-utils";
|
|
2
2
|
import { ChangeEventHandler } from "react";
|
|
3
3
|
export type Digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
|
|
4
|
+
export type TimeValue = TimeString | TimeStringMillis;
|
|
5
|
+
export declare const invalidClassName = "vuuTimeInput-invalid";
|
|
6
|
+
export interface MaskedInputOptions {
|
|
7
|
+
/**
|
|
8
|
+
* When true, value includes milliseconds, hh:mm:ss.SSS
|
|
9
|
+
*/
|
|
10
|
+
milliseconds?: boolean;
|
|
11
|
+
}
|
|
4
12
|
export type MaskedInputEvents = {
|
|
5
13
|
change: ChangeEventHandler<HTMLInputElement>;
|
|
6
14
|
};
|
|
7
15
|
export declare class MaskedInput extends EventEmitter<MaskedInputEvents> {
|
|
8
16
|
#private;
|
|
9
|
-
constructor(defaultValue:
|
|
10
|
-
|
|
17
|
+
constructor(defaultValue: TimeValue | undefined, inputEl?: HTMLInputElement | null, { milliseconds }?: MaskedInputOptions);
|
|
18
|
+
get milliseconds(): boolean;
|
|
19
|
+
private get zeroValue();
|
|
20
|
+
/**
|
|
21
|
+
* Length of the formatted value, hh:mm:ss or hh:mm:ss.SSS
|
|
22
|
+
*/
|
|
23
|
+
get length(): 8 | 12;
|
|
24
|
+
private normalise;
|
|
25
|
+
/**
|
|
26
|
+
* Attach (or re-attach) the input element. Re-attaching the same element
|
|
27
|
+
* is a no-op, attaching a different element detaches the previous one.
|
|
28
|
+
*/
|
|
29
|
+
set input(el: HTMLInputElement | null);
|
|
11
30
|
/**
|
|
12
31
|
* The change event is fired programatically. This will only be handled
|
|
13
32
|
* by a native event handler ( not a React handler). We handle this event
|
|
@@ -21,25 +40,56 @@ export declare class MaskedInput extends EventEmitter<MaskedInputEvents> {
|
|
|
21
40
|
set selectionStart(value: number);
|
|
22
41
|
get selectionEnd(): number;
|
|
23
42
|
set selectionEnd(value: number);
|
|
43
|
+
private nextUnit;
|
|
44
|
+
private previousUnit;
|
|
45
|
+
private get firstUnit();
|
|
46
|
+
private get lastUnit();
|
|
24
47
|
private setValue;
|
|
25
|
-
private setUnitValue;
|
|
26
48
|
private getUnitValue;
|
|
27
|
-
|
|
49
|
+
private setUnitValue;
|
|
50
|
+
private setInvalid;
|
|
51
|
+
get value(): TimeValue;
|
|
28
52
|
/**
|
|
29
|
-
* Setting the value this way invokes 'controlled' mode
|
|
53
|
+
* Setting the value this way invokes 'controlled' mode. Value
|
|
54
|
+
* will be normalised to the configured precision.
|
|
30
55
|
*/
|
|
31
|
-
set value(value:
|
|
56
|
+
set value(value: TimeValue);
|
|
32
57
|
clear(unit: TimeUnit): void;
|
|
33
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Select a unit. If digitIndex > 0, only the digits of the unit
|
|
60
|
+
* not yet entered are selected.
|
|
61
|
+
*/
|
|
62
|
+
select(unit: TimeUnit, digitIndex?: number): void;
|
|
34
63
|
removeSelection(): void;
|
|
35
64
|
restoreSelection(): void;
|
|
36
|
-
|
|
65
|
+
selectFirst(): void;
|
|
66
|
+
selectLast(): void;
|
|
37
67
|
moveFocus(direction: "left" | "right"): void;
|
|
38
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Replace the entire value, e.g. from a paste. Values with or without
|
|
70
|
+
* milliseconds are accepted and converted to the configured precision.
|
|
71
|
+
* Invalid values are ignored. Returns true if value was accepted.
|
|
72
|
+
*/
|
|
73
|
+
pasteValue(value: string): boolean;
|
|
39
74
|
private getUnitAtCursorPos;
|
|
75
|
+
private get activeUnit();
|
|
40
76
|
incrementValue(): void;
|
|
41
77
|
decrementValue(): void;
|
|
78
|
+
/**
|
|
79
|
+
* If a full unit is selected, it is cleared and selection moves to the
|
|
80
|
+
* previous unit. If we are midway through entering a unit, the unit is
|
|
81
|
+
* cleared and remains selected.
|
|
82
|
+
*/
|
|
42
83
|
backspace(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Typing the first digit of a unit sets the unit to that digit followed
|
|
86
|
+
* by zeros, e.g '1' => '10' and selection moves to the next digit. If
|
|
87
|
+
* the digit cannot be the first digit of a valid unit, e.g '3' for hours,
|
|
88
|
+
* the unit is zero padded, e.g '03', and selection advances to the next unit.
|
|
89
|
+
* Typing the last digit completes the unit and selection advances to the
|
|
90
|
+
* next unit. A digit which would produce an invalid value is rejected and
|
|
91
|
+
* the input is marked as invalid.
|
|
92
|
+
*/
|
|
43
93
|
update(key: Digit): void;
|
|
44
94
|
private getSelection;
|
|
45
95
|
click(): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
|
-
import { TimeInputHookProps } from "./useTimeInput";
|
|
3
|
-
|
|
4
|
-
}
|
|
2
|
+
import { TimeInputHookProps, TimeInputMillisecondsProps, TimeInputSecondsProps } from "./useTimeInput";
|
|
3
|
+
type TimeInputHtmlAttributes = Omit<HTMLAttributes<HTMLInputElement>, "defaultValue" | "onChange" | "value"> & Partial<Pick<HTMLInputElement, "placeholder">>;
|
|
4
|
+
export type { TimeInputMillisecondsProps, TimeInputSecondsProps };
|
|
5
|
+
export type TimeInputProps = TimeInputHookProps & TimeInputHtmlAttributes;
|
|
5
6
|
export declare const TimeInput: import("react").ForwardRefExoticComponent<TimeInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,16 +1,34 @@
|
|
|
1
|
-
import { type CommitHandler, DateStringISO, type TimeString } from "@vuu-ui/vuu-utils";
|
|
1
|
+
import { type CommitHandler, DateStringISO, type TimeString, type TimeStringMillis } from "@vuu-ui/vuu-utils";
|
|
2
2
|
import { ChangeEventHandler, ClipboardEventHandler, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, RefCallback } from "react";
|
|
3
|
-
|
|
3
|
+
interface TimeInputCommonProps {
|
|
4
4
|
date?: Date | DateStringISO;
|
|
5
|
-
defaultValue?: TimeString;
|
|
6
5
|
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
6
|
+
}
|
|
7
|
+
export interface TimeInputSecondsProps extends TimeInputCommonProps {
|
|
8
|
+
defaultValue?: TimeString;
|
|
9
|
+
/**
|
|
10
|
+
* When true, time is entered and displayed with millisecond
|
|
11
|
+
* precision, hh:mm:ss.SSS
|
|
12
|
+
*/
|
|
13
|
+
milliseconds?: false;
|
|
7
14
|
onCommit: CommitHandler<HTMLInputElement, TimeString>;
|
|
8
15
|
value?: TimeString;
|
|
9
16
|
}
|
|
10
|
-
export
|
|
17
|
+
export interface TimeInputMillisecondsProps extends TimeInputCommonProps {
|
|
18
|
+
defaultValue?: TimeStringMillis;
|
|
19
|
+
/**
|
|
20
|
+
* When true, time is entered and displayed with millisecond
|
|
21
|
+
* precision, hh:mm:ss.SSS
|
|
22
|
+
*/
|
|
23
|
+
milliseconds: true;
|
|
24
|
+
onCommit: CommitHandler<HTMLInputElement, TimeStringMillis>;
|
|
25
|
+
value?: TimeStringMillis;
|
|
26
|
+
}
|
|
27
|
+
export type TimeInputHookProps = TimeInputSecondsProps | TimeInputMillisecondsProps;
|
|
28
|
+
export declare const useTimeInput: ({ defaultValue, milliseconds, onChange, onCommit: onCommitProp, value, }: TimeInputHookProps) => {
|
|
11
29
|
inputRef: RefCallback<HTMLInputElement>;
|
|
12
30
|
eventHandlers: {
|
|
13
|
-
onBlur: (
|
|
31
|
+
onBlur: () => void;
|
|
14
32
|
onDoubleClick: () => void;
|
|
15
33
|
onFocus: FocusEventHandler<HTMLInputElement>;
|
|
16
34
|
onKeyDown: KeyboardEventHandler<HTMLInputElement>;
|
|
@@ -19,3 +37,4 @@ export declare const useTimeInput: ({ defaultValue, onChange, onCommit, value, }
|
|
|
19
37
|
onPaste: ClipboardEventHandler<HTMLInputElement>;
|
|
20
38
|
};
|
|
21
39
|
};
|
|
40
|
+
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { OverflowContainerProps } from "../overflow-container";
|
|
3
2
|
import { SelectionStrategy, SpecialKeyMultipleSelection } from "../common-hooks";
|
|
4
3
|
export type ActiveItemChangeHandler = (itemIndex: number[]) => void;
|
|
@@ -17,4 +16,4 @@ export interface ToolbarProps extends OverflowContainerProps {
|
|
|
17
16
|
selectionStrategy?: SelectionStrategy | SpecialKeyMultipleSelection;
|
|
18
17
|
showSeparators?: boolean;
|
|
19
18
|
}
|
|
20
|
-
export declare const Toolbar: ({ activeItemIndex: activeItemIndexProp, alignItems, defaultActiveItemIndex, children, className, id: idProp, onActiveChange, onNavigateOutOfBounds, orientation, selectionStrategy, showSeparators, ...props }: ToolbarProps) =>
|
|
19
|
+
export declare const Toolbar: ({ activeItemIndex: activeItemIndexProp, alignItems, defaultActiveItemIndex, children, className, id: idProp, onActiveChange, onNavigateOutOfBounds, orientation, selectionStrategy, showSeparators, ...props }: ToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
import { CommitHandler } from "@vuu-ui/vuu-utils";
|
|
1
|
+
import { type CommitHandler, EpochTimestamp, type TimeZoneSpec } from "@vuu-ui/vuu-utils";
|
|
2
2
|
import { SingleSelectionValueType } from "../calendar";
|
|
3
3
|
import { DatePickerProps } from "../date-picker";
|
|
4
|
-
export
|
|
4
|
+
export interface VuuDatePickerProps extends Omit<DatePickerProps<SingleSelectionValueType>, "defaultSelectedDate" | "onChange"> {
|
|
5
|
+
/**
|
|
6
|
+
* Invoked when user selects a date from the calendar, or enters a valid date and
|
|
7
|
+
* presses Enter. Value is epoch millis at the start of the selected day, in timeZone.
|
|
8
|
+
*/
|
|
5
9
|
onCommit?: CommitHandler<HTMLElement, number>;
|
|
6
10
|
preserveFocusOnSelect?: boolean;
|
|
7
|
-
|
|
11
|
+
/**
|
|
12
|
+
* The time zone used to convert between epoch values and calendar dates.
|
|
13
|
+
* Defaults to the application default time zone (see setDefaultTimeZone).
|
|
14
|
+
*/
|
|
15
|
+
timeZone?: TimeZoneSpec;
|
|
16
|
+
/**
|
|
17
|
+
* An epoch value (millis as number, or millis/nanos as EpochTimestamp). An
|
|
18
|
+
* alternative to selectedDate, when the date is derived from a timestamp. The
|
|
19
|
+
* calendar date is determined in timeZone.
|
|
20
|
+
*/
|
|
21
|
+
value?: EpochTimestamp | number;
|
|
22
|
+
}
|
|
23
|
+
export declare const VuuDatePicker: ({ className, onSelectionChange, onCommit, preserveFocusOnSelect, selectedDate: selectedDateProp, timeZone, value, ...props }: VuuDatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { CommitHandler, TimeString } from "@vuu-ui/vuu-utils";
|
|
2
1
|
import { HTMLAttributes } from "react";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
2
|
+
import { TimeInputMillisecondsProps, TimeInputSecondsProps } from "../time-input/TimeInput";
|
|
3
|
+
type VuuTimePickerHtmlAttributes = Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "value">;
|
|
4
|
+
type TimePickerInputProps = "defaultValue" | "milliseconds" | "onChange" | "onCommit" | "value";
|
|
5
|
+
export type VuuTimePickerSecondsProps = Pick<TimeInputSecondsProps, TimePickerInputProps> & VuuTimePickerHtmlAttributes;
|
|
6
|
+
export type VuuTimePickerMillisecondsProps = Pick<TimeInputMillisecondsProps, TimePickerInputProps> & VuuTimePickerHtmlAttributes;
|
|
7
|
+
export type VuuTimePickerProps = VuuTimePickerSecondsProps | VuuTimePickerMillisecondsProps;
|
|
8
|
+
export declare const VuuTimePicker: ({ className, defaultValue, milliseconds, onChange, onCommit, value, ...htmlAttributes }: VuuTimePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -3,4 +3,4 @@ import { VuuTypeaheadInputHookProps } from "./useVuuTypeaheadInput";
|
|
|
3
3
|
export interface VuuTypeaheadInputProps extends VuuTypeaheadInputHookProps, Pick<ComboBoxProps, "selectOnTab"> {
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const VuuTypeaheadInput: ({ allowFreeInput, className, column, freeTextWarning, highlightFirstSuggestion, inputProps: inputPropsProp, minCharacterCountToTriggerSuggestions, onCommit, selectOnTab, table, }: VuuTypeaheadInputProps) => import("react").JSX.Element;
|
|
6
|
+
export declare const VuuTypeaheadInput: ({ allowFreeInput, className, column, freeTextWarning, highlightFirstSuggestion, inputProps: inputPropsProp, minCharacterCountToTriggerSuggestions, onCommit, selectOnTab, table, }: VuuTypeaheadInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type CalendarCarouselProps } from "./internal/CalendarCarousel";
|
|
2
|
-
import { type CalendarNavigationProps } from "./internal/CalendarNavigation";
|
|
3
|
-
import { type useCalendarProps } from "./useCalendar";
|
|
4
|
-
export type CalendarProps = useCalendarProps & {
|
|
5
|
-
className?: string;
|
|
6
|
-
id?: string;
|
|
7
|
-
renderDayContents?: CalendarCarouselProps["renderDayContents"];
|
|
8
|
-
hideYearDropdown?: CalendarNavigationProps["hideYearDropdown"];
|
|
9
|
-
borderedDropdown?: CalendarNavigationProps["borderedDropdown"];
|
|
10
|
-
TooltipProps?: CalendarCarouselProps["TooltipProps"];
|
|
11
|
-
hideOutOfRangeDates?: CalendarCarouselProps["hideOutOfRangeDates"];
|
|
12
|
-
};
|
|
13
|
-
export declare const Calendar: import("react").ForwardRefExoticComponent<CalendarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type CalendarMonthProps } from "./CalendarMonth";
|
|
2
|
-
export type CalendarCarouselProps = Omit<CalendarMonthProps, "date">;
|
|
3
|
-
export declare const CalendarCarousel: import("react").ForwardRefExoticComponent<Omit<CalendarCarouselProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { useCalendar } from "../useCalendar";
|
|
2
|
-
interface CalendarState {
|
|
3
|
-
state: ReturnType<typeof useCalendar>["state"];
|
|
4
|
-
helpers: ReturnType<typeof useCalendar>["helpers"];
|
|
5
|
-
}
|
|
6
|
-
declare const CalendarContext: import("react").Context<CalendarState | null>;
|
|
7
|
-
declare function useCalendarContext(): CalendarState;
|
|
8
|
-
export { CalendarContext, useCalendarContext };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { DateValue } from "@internationalized/date";
|
|
2
|
-
import { type TooltipProps } from "@salt-ds/core";
|
|
3
|
-
import { type ComponentPropsWithRef, type ReactElement } from "react";
|
|
4
|
-
import { type DayStatus } from "../useCalendarDay";
|
|
5
|
-
export type DateFormatter = (day: Date) => string | undefined;
|
|
6
|
-
export interface CalendarDayProps extends Omit<ComponentPropsWithRef<"button">, "children"> {
|
|
7
|
-
day: DateValue;
|
|
8
|
-
formatDate?: DateFormatter;
|
|
9
|
-
renderDayContents?: (date: DateValue, status: DayStatus) => ReactElement;
|
|
10
|
-
status?: DayStatus;
|
|
11
|
-
month: DateValue;
|
|
12
|
-
TooltipProps?: Partial<TooltipProps>;
|
|
13
|
-
}
|
|
14
|
-
export declare const CalendarDay: import("react").ForwardRefExoticComponent<Omit<CalendarDayProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { DateValue } from "@internationalized/date";
|
|
2
|
-
import { type ComponentPropsWithRef } from "react";
|
|
3
|
-
import { type CalendarDayProps } from "./CalendarDay";
|
|
4
|
-
export interface CalendarMonthProps extends ComponentPropsWithRef<"div"> {
|
|
5
|
-
date: DateValue;
|
|
6
|
-
hideOutOfRangeDates?: boolean;
|
|
7
|
-
renderDayContents?: CalendarDayProps["renderDayContents"];
|
|
8
|
-
TooltipProps?: CalendarDayProps["TooltipProps"];
|
|
9
|
-
}
|
|
10
|
-
export declare const CalendarMonth: import("react").ForwardRefExoticComponent<Omit<CalendarMonthProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type ButtonProps, type DropdownProps } from "@salt-ds/core";
|
|
2
|
-
import { type ComponentPropsWithRef } from "react";
|
|
3
|
-
import { type DateValue } from "@internationalized/date";
|
|
4
|
-
type dateDropdownProps = DropdownProps<DateValue>;
|
|
5
|
-
export interface CalendarNavigationProps extends ComponentPropsWithRef<"div"> {
|
|
6
|
-
MonthDropdownProps?: dateDropdownProps;
|
|
7
|
-
YearDropdownProps?: dateDropdownProps;
|
|
8
|
-
onMonthSelect?: dateDropdownProps["onChange"];
|
|
9
|
-
onYearSelect?: dateDropdownProps["onChange"];
|
|
10
|
-
borderedDropdown?: dateDropdownProps["bordered"];
|
|
11
|
-
onNavigateNext?: ButtonProps["onClick"];
|
|
12
|
-
onNavigatePrevious?: ButtonProps["onClick"];
|
|
13
|
-
hideYearDropdown?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const CalendarNavigation: import("react").ForwardRefExoticComponent<Omit<CalendarNavigationProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef } from "react";
|
|
2
|
-
export type CalendarWeekHeaderProps = ComponentPropsWithRef<"div">;
|
|
3
|
-
export declare const CalendarWeekHeader: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type DateValue } from "@internationalized/date";
|
|
2
|
-
import type { FocusEventHandler, KeyboardEventHandler, MouseEventHandler } from "react";
|
|
3
|
-
export declare function useFocusManagement({ date }: {
|
|
4
|
-
date: DateValue;
|
|
5
|
-
}): {
|
|
6
|
-
handleClick: MouseEventHandler<HTMLButtonElement>;
|
|
7
|
-
handleKeyDown: KeyboardEventHandler<HTMLButtonElement>;
|
|
8
|
-
handleFocus: FocusEventHandler<HTMLButtonElement>;
|
|
9
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DateFormatter, type DateValue } from "@internationalized/date";
|
|
2
|
-
export declare function getCurrentLocale(): string;
|
|
3
|
-
export declare function getDateFormatter(options?: Intl.DateTimeFormatOptions): DateFormatter;
|
|
4
|
-
export declare function formatDate(date: DateValue, options?: Intl.DateTimeFormatOptions): string;
|
|
5
|
-
export declare function getCalender(): import("@internationalized/date").Calendar;
|
|
6
|
-
type WeekdayFormat = Intl.DateTimeFormatOptions["weekday"];
|
|
7
|
-
export declare function daysForLocale(weekday?: WeekdayFormat): string[];
|
|
8
|
-
export declare function monthsForLocale(currentYear: DateValue): (import("@internationalized/date").CalendarDate | import("@internationalized/date").CalendarDateTime | import("@internationalized/date").ZonedDateTime)[];
|
|
9
|
-
export declare function generateVisibleDays(currentMonth: DateValue): {
|
|
10
|
-
date: DateValue;
|
|
11
|
-
dateOfMonth: number;
|
|
12
|
-
isCurrentMonth: boolean;
|
|
13
|
-
}[];
|
|
14
|
-
export declare function monthDiff(a: DateValue, b: DateValue): number;
|
|
15
|
-
export {};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { type DateValue } from "@internationalized/date";
|
|
2
|
-
import { type SyntheticEvent } from "react";
|
|
3
|
-
import { type UseMultiSelectionCalendarProps, type UseOffsetSelectionCalendarProps, type UseRangeSelectionCalendarProps, type UseSingleSelectionCalendarProps } from "./useSelection";
|
|
4
|
-
interface BaseUseCalendarProps {
|
|
5
|
-
defaultVisibleMonth?: DateValue;
|
|
6
|
-
onVisibleMonthChange?: (event: SyntheticEvent, visibleMonth: DateValue) => void;
|
|
7
|
-
isDayUnselectable?: (date: DateValue) => string | false | undefined;
|
|
8
|
-
isDayHighlighted?: (date: DateValue) => string | false | undefined;
|
|
9
|
-
isDayDisabled?: (date: DateValue) => boolean;
|
|
10
|
-
visibleMonth?: DateValue;
|
|
11
|
-
hideOutOfRangeDates?: boolean;
|
|
12
|
-
hideYearDropdown?: boolean;
|
|
13
|
-
minDate?: DateValue;
|
|
14
|
-
maxDate?: DateValue;
|
|
15
|
-
}
|
|
16
|
-
export type useCalendarProps = (Omit<UseSingleSelectionCalendarProps, "isDaySelectable"> | Omit<UseMultiSelectionCalendarProps, "isDaySelectable"> | Omit<UseRangeSelectionCalendarProps, "isDaySelectable"> | Omit<UseOffsetSelectionCalendarProps, "isDaySelectable">) & BaseUseCalendarProps;
|
|
17
|
-
export declare function useCalendar(props: useCalendarProps): {
|
|
18
|
-
state: {
|
|
19
|
-
selectedDate: DateValue[] | {
|
|
20
|
-
startDate?: DateValue;
|
|
21
|
-
endDate?: DateValue;
|
|
22
|
-
} | import("./useSelection").RangeSelectionValueType | DateValue | null | undefined;
|
|
23
|
-
hoveredDate: import("@internationalized/date").CalendarDate | import("@internationalized/date").CalendarDateTime | import("@internationalized/date").ZonedDateTime | null | undefined;
|
|
24
|
-
visibleMonth: DateValue;
|
|
25
|
-
focusedDate: DateValue;
|
|
26
|
-
minDate: DateValue | undefined;
|
|
27
|
-
maxDate: DateValue | undefined;
|
|
28
|
-
selectionVariant: "default" | "multiselect" | "offset" | "range";
|
|
29
|
-
hideOutOfRangeDates: boolean | undefined;
|
|
30
|
-
calendarFocused: boolean;
|
|
31
|
-
};
|
|
32
|
-
helpers: {
|
|
33
|
-
setSelectedDate: (event: SyntheticEvent<HTMLButtonElement>, newSelectedDate: DateValue) => void;
|
|
34
|
-
isSelected: (date: DateValue) => boolean;
|
|
35
|
-
setHoveredDate: (event: SyntheticEvent, date: DateValue | null) => void;
|
|
36
|
-
isHovered: (date: DateValue) => boolean;
|
|
37
|
-
isSelectedSpan: (date: DateValue) => boolean;
|
|
38
|
-
isHoveredSpan: (date: DateValue) => boolean;
|
|
39
|
-
isSelectedStart: (date: DateValue) => boolean;
|
|
40
|
-
isSelectedEnd: (date: DateValue) => boolean;
|
|
41
|
-
isHoveredOffset: (date: DateValue) => boolean;
|
|
42
|
-
setVisibleMonth: (event: SyntheticEvent, newVisibleMonth: DateValue) => void;
|
|
43
|
-
setFocusedDate: (event: SyntheticEvent, date: DateValue) => void;
|
|
44
|
-
setCalendarFocused: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
45
|
-
isDayUnselectable: (date: DateValue) => string | false | undefined;
|
|
46
|
-
isDayHighlighted: (date: DateValue) => string | false | undefined;
|
|
47
|
-
isDayDisabled: (date: DateValue) => boolean;
|
|
48
|
-
isDayVisible: (date: DateValue) => boolean;
|
|
49
|
-
isOutsideAllowedDates: (date: DateValue) => boolean;
|
|
50
|
-
isOutsideAllowedMonths: (date: DateValue) => boolean;
|
|
51
|
-
isOutsideAllowedYears: (date: DateValue) => boolean;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type DateValue } from "@internationalized/date";
|
|
2
|
-
import { type ComponentPropsWithoutRef, type RefObject } from "react";
|
|
3
|
-
export interface DayStatus {
|
|
4
|
-
outOfRange?: boolean;
|
|
5
|
-
selected?: boolean;
|
|
6
|
-
today?: boolean;
|
|
7
|
-
unselectable?: string | false;
|
|
8
|
-
highlighted?: string | false;
|
|
9
|
-
focused?: boolean;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
hidden?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface useCalendarDayProps {
|
|
14
|
-
date: DateValue;
|
|
15
|
-
month: DateValue;
|
|
16
|
-
}
|
|
17
|
-
export declare function useCalendarDay({ date, month }: useCalendarDayProps, ref: RefObject<HTMLElement | null>): {
|
|
18
|
-
status: DayStatus;
|
|
19
|
-
dayProps: ComponentPropsWithoutRef<"button">;
|
|
20
|
-
unselectableReason: string | false | undefined;
|
|
21
|
-
highlightedReason: string | false | undefined;
|
|
22
|
-
};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { CalendarDate, type DateValue } from "@internationalized/date";
|
|
2
|
-
import type { KeyboardEventHandler, MouseEventHandler, SyntheticEvent } from "react";
|
|
3
|
-
interface BaseUseSelectionCalendarProps<SelectionVariantType> {
|
|
4
|
-
hoveredDate?: DateValue | null;
|
|
5
|
-
selectedDate?: SelectionVariantType | null;
|
|
6
|
-
defaultSelectedDate?: SelectionVariantType;
|
|
7
|
-
onSelectedDateChange?: (event: SyntheticEvent, selectedDate: SelectionVariantType) => void;
|
|
8
|
-
isDaySelectable: (date?: DateValue) => boolean;
|
|
9
|
-
onHoveredDateChange?: (event: SyntheticEvent, hoveredDate: DateValue | null) => void;
|
|
10
|
-
}
|
|
11
|
-
export type SingleSelectionValueType = DateValue;
|
|
12
|
-
type MultiSelectionValueType = DateValue[];
|
|
13
|
-
export type RangeSelectionValueType = {
|
|
14
|
-
startDate?: DateValue;
|
|
15
|
-
endDate?: DateValue;
|
|
16
|
-
};
|
|
17
|
-
type OffsetSelectionValueType = {
|
|
18
|
-
startDate?: DateValue;
|
|
19
|
-
endDate?: DateValue;
|
|
20
|
-
};
|
|
21
|
-
type AllSelectionValueType = SingleSelectionValueType | MultiSelectionValueType | RangeSelectionValueType | OffsetSelectionValueType | null;
|
|
22
|
-
export interface UseOffsetSelectionCalendarProps extends Omit<BaseUseSelectionCalendarProps<OffsetSelectionValueType>, "startDateOffset" | "endDateOffset"> {
|
|
23
|
-
selectionVariant: "offset";
|
|
24
|
-
startDateOffset?: (date: DateValue) => DateValue;
|
|
25
|
-
endDateOffset?: (date: DateValue) => DateValue;
|
|
26
|
-
}
|
|
27
|
-
export interface UseRangeSelectionCalendarProps extends BaseUseSelectionCalendarProps<RangeSelectionValueType> {
|
|
28
|
-
selectionVariant: "range";
|
|
29
|
-
}
|
|
30
|
-
export interface UseMultiSelectionCalendarProps extends BaseUseSelectionCalendarProps<MultiSelectionValueType> {
|
|
31
|
-
selectionVariant: "multiselect";
|
|
32
|
-
}
|
|
33
|
-
export interface UseSingleSelectionCalendarProps extends BaseUseSelectionCalendarProps<SingleSelectionValueType> {
|
|
34
|
-
selectionVariant: "default";
|
|
35
|
-
}
|
|
36
|
-
export type useSelectionCalendarProps = UseSingleSelectionCalendarProps | UseMultiSelectionCalendarProps | UseRangeSelectionCalendarProps | UseOffsetSelectionCalendarProps;
|
|
37
|
-
export declare function isRangeOrOffsetSelectionValue(selectionValue?: AllSelectionValueType): selectionValue is RangeSelectionValueType | OffsetSelectionValueType;
|
|
38
|
-
export declare function isRangeOrOffsetSelectionWithStartDate(selectionValue?: AllSelectionValueType): selectionValue is RangeSelectionValueType | OffsetSelectionValueType;
|
|
39
|
-
export declare function useSelectionCalendar(props: useSelectionCalendarProps): {
|
|
40
|
-
state: {
|
|
41
|
-
selectedDate: MultiSelectionValueType | OffsetSelectionValueType | RangeSelectionValueType | DateValue | null | undefined;
|
|
42
|
-
hoveredDate: CalendarDate | import("@internationalized/date").CalendarDateTime | import("@internationalized/date").ZonedDateTime | null | undefined;
|
|
43
|
-
};
|
|
44
|
-
helpers: {
|
|
45
|
-
setSelectedDate: (event: SyntheticEvent<HTMLButtonElement>, newSelectedDate: DateValue) => void;
|
|
46
|
-
isSelected: (date: DateValue) => boolean;
|
|
47
|
-
setHoveredDate: (event: SyntheticEvent, date: DateValue | null) => void;
|
|
48
|
-
isHovered: (date: DateValue) => boolean;
|
|
49
|
-
isSelectedSpan: (date: DateValue) => boolean;
|
|
50
|
-
isHoveredSpan: (date: DateValue) => boolean;
|
|
51
|
-
isSelectedStart: (date: DateValue) => boolean;
|
|
52
|
-
isSelectedEnd: (date: DateValue) => boolean;
|
|
53
|
-
isHoveredOffset: (date: DateValue) => boolean;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
export declare function useSelectionDay({ date }: {
|
|
57
|
-
date: DateValue;
|
|
58
|
-
}): {
|
|
59
|
-
handleClick: MouseEventHandler<HTMLButtonElement>;
|
|
60
|
-
handleKeyDown: KeyboardEventHandler<HTMLButtonElement>;
|
|
61
|
-
handleMouseOver: MouseEventHandler<HTMLButtonElement>;
|
|
62
|
-
handleMouseLeave: MouseEventHandler<HTMLButtonElement>;
|
|
63
|
-
status: {
|
|
64
|
-
selected: boolean;
|
|
65
|
-
selectedSpan: boolean;
|
|
66
|
-
hoveredSpan: boolean;
|
|
67
|
-
selectedStart: boolean;
|
|
68
|
-
selectedEnd: boolean;
|
|
69
|
-
hovered: boolean;
|
|
70
|
-
hoveredOffset: boolean;
|
|
71
|
-
};
|
|
72
|
-
dayProps: {
|
|
73
|
-
className: string;
|
|
74
|
-
"aria-pressed": string | undefined;
|
|
75
|
-
"aria-disabled": string | undefined;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { IconButtonProps } from "../icon-button";
|
|
2
|
-
import { ColumnSearchProps } from "./ColumnSearch";
|
|
3
|
-
export interface ColumnPickerProps extends Omit<IconButtonProps, "icon">, Pick<ColumnSearchProps, "columns" | "onSelectionChange" | "selected"> {
|
|
4
|
-
icon?: string;
|
|
5
|
-
iconSize?: number;
|
|
6
|
-
}
|
|
7
|
-
export declare const ColumnPicker: import("react").ForwardRefExoticComponent<ColumnPickerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ListBoxProps } from "@salt-ds/core";
|
|
2
|
-
import { HTMLAttributes } from "react";
|
|
3
|
-
export interface ColumnSearchProps extends HTMLAttributes<HTMLDivElement>, Pick<ListBoxProps, "onSelectionChange" | "selected"> {
|
|
4
|
-
columns: string[];
|
|
5
|
-
onReorderColumns: (columns: string[]) => void;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated
|
|
9
|
-
*
|
|
10
|
-
* use ColumnList instead
|
|
11
|
-
*/
|
|
12
|
-
export declare const ColumnSearch: import("react").ForwardRefExoticComponent<ColumnSearchProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { DataSourceRow } from "@vuu-ui/vuu-data-types";
|
|
2
|
-
import type { VuuRange } from "@vuu-ui/vuu-protocol-types";
|
|
3
|
-
export declare class MovingWindow {
|
|
4
|
-
data: DataSourceRow[];
|
|
5
|
-
rowCount: number;
|
|
6
|
-
private range;
|
|
7
|
-
constructor({ from, to }: VuuRange);
|
|
8
|
-
setRowCount: (rowCount: number) => void;
|
|
9
|
-
add(data: DataSourceRow): void;
|
|
10
|
-
getAtIndex(index: number): DataSourceRow | undefined;
|
|
11
|
-
isWithinRange(index: number): boolean;
|
|
12
|
-
setRange({ from, to }: VuuRange): void;
|
|
13
|
-
getSelectedRows(): DataSourceRow[];
|
|
14
|
-
}
|