@vuu-ui/vuu-ui-controls 4.0.1 → 5.0.0-alpha.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/package.json +12 -13
- package/src/context-panel-provider/ContextPanelProvider.js +28 -40
- package/src/drag-drop/useDragDrop.js +7 -1
- package/src/icon-button/Icon.js +1 -0
- package/src/icon-button/IconButton.js +1 -1
- package/src/index.js +0 -1
- package/src/instrument-picker/TablePicker.css.js +1 -0
- package/src/instrument-picker/useTablePicker.js +3 -2
- package/src/item-picker/ItemPicker.js +79 -53
- package/src/prompt/Prompt.css.js +1 -0
- package/src/table-search/SearchCell.css.js +4 -2
- package/src/table-search/SearchCell.js +3 -2
- package/src/table-search/TableSearch.css.js +4 -0
- package/src/table-search/TableSearch.js +3 -1
- package/src/table-search/useTableSearch.js +14 -6
- package/src/tabstrip/Tab.css.js +0 -1
- package/src/tabstrip/Tabstrip.js +1 -1
- package/types/context-panel-provider/ContextPanelProvider.d.ts +4 -7
- 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 +1 -2
- 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 +26 -5
- package/types/item-picker/useItemPicker.d.ts +3 -2
- package/types/price-ticker/PriceTicker.d.ts +1 -1
- package/types/prompt/Prompt.d.ts +3 -3
- package/types/sortable-list/SortableList.d.ts +2 -2
- package/types/split-button/useSplitButton.d.ts +12 -12
- package/types/split-pane/Splitter.d.ts +1 -1
- package/types/table-search/SearchCell.d.ts +1 -1
- package/types/table-search/TableSearch.d.ts +2 -1
- package/types/table-search/useTableSearch.d.ts +2 -2
- package/types/tabstrip/TabMenu.d.ts +1 -1
- package/types/tabstrip/Tabstrip.d.ts +3 -2
- package/types/toolbar/Toolbar.d.ts +2 -1
- package/types/vuu-date-picker/VuuDatePicker.d.ts +1 -1
- package/types/vuu-time-picker/VuuTimePicker.d.ts +1 -1
- package/types/vuu-typeahead-input/VuuTypeaheadInput.d.ts +1 -1
- package/src/modal-provider/ModalProvider.js +0 -147
- package/types/modal-provider/ModalProvider.d.ts +0 -13
- 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
|
@@ -1,13 +1,34 @@
|
|
|
1
|
-
import { ListBoxProps } from "@salt-ds/core";
|
|
2
|
-
import { ItemTypeName } from "@vuu-ui/vuu-utils";
|
|
3
|
-
import { HTMLAttributes } from "react";
|
|
4
|
-
import { ItemDescriptor, ItemPickerHookProps } from "./useItemPicker";
|
|
1
|
+
import { type ListBoxProps, type OptionProps } from "@salt-ds/core";
|
|
2
|
+
import { type ItemTypeName } from "@vuu-ui/vuu-utils";
|
|
3
|
+
import { type ComponentType, type HTMLAttributes, type MouseEventHandler } from "react";
|
|
4
|
+
import { type ItemDescriptor, type ItemPickerHookProps } from "./useItemPicker";
|
|
5
5
|
export declare const classBaseListItem = "vuuItemPickerListItem";
|
|
6
|
+
export type ItemPickerLayout = 'v-available-selected' | 'v-selected-available';
|
|
6
7
|
export interface ItemPickerProps extends ItemPickerHookProps, HTMLAttributes<HTMLDivElement>, Pick<ListBoxProps<ItemDescriptor>, "selected" | "onSelectionChange"> {
|
|
7
|
-
|
|
8
|
+
AvailableListItem?: ComponentType<AvailableListItemProps>;
|
|
9
|
+
SelectedListItem?: ComponentType<SelectedListItemProps>;
|
|
10
|
+
itemTypeName?: ItemTypeName;
|
|
11
|
+
/**
|
|
12
|
+
* Display order of SelectedItems List / AvailableItems List
|
|
13
|
+
*/
|
|
14
|
+
layout?: ItemPickerLayout;
|
|
15
|
+
searchForm?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface SelectedListItemProps extends OptionProps {
|
|
18
|
+
index: number;
|
|
19
|
+
item: ItemDescriptor;
|
|
20
|
+
onRemove: MouseEventHandler<HTMLButtonElement>;
|
|
21
|
+
searchPattern?: Lowercase<string>;
|
|
22
|
+
}
|
|
23
|
+
interface AvailableListItemProps extends OptionProps {
|
|
24
|
+
index: number;
|
|
25
|
+
item: ItemDescriptor;
|
|
26
|
+
onAdd: MouseEventHandler<HTMLButtonElement>;
|
|
27
|
+
searchPattern?: Lowercase<string>;
|
|
8
28
|
}
|
|
9
29
|
/** Generic controlled component that displays items in a 'picker' that are available to search, select, reorder or deselect.
|
|
10
30
|
* As input props, all available items, currently selected items, search text and callback functions for changes in selected items and search text
|
|
11
31
|
* must be supplied by the client.
|
|
12
32
|
*/
|
|
13
33
|
export declare const ItemPicker: import("react").ForwardRefExoticComponent<ItemPickerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FormEventHandler, MouseEventHandler } from "react";
|
|
1
|
+
import { type FormEventHandler, type MouseEventHandler } from "react";
|
|
2
|
+
export type SelectedItemsChangeHandler = (newSelectedItems: readonly ItemDescriptor[]) => void;
|
|
2
3
|
/** This is a public description of an Item that can be displayed in the ItemPicker component, defining all the
|
|
3
4
|
* mandatory and option attributes that can be defined by the client. */
|
|
4
5
|
export interface ItemDescriptor {
|
|
@@ -15,7 +16,7 @@ export interface ItemPickerHookProps {
|
|
|
15
16
|
allItems: ItemDescriptor[];
|
|
16
17
|
selectedItems: ItemDescriptor[];
|
|
17
18
|
maxSelections?: number;
|
|
18
|
-
onSelectedItemsChange:
|
|
19
|
+
onSelectedItemsChange: SelectedItemsChangeHandler;
|
|
19
20
|
}
|
|
20
21
|
export declare const getItemLabel: (item: ItemDescriptor) => string;
|
|
21
22
|
export declare const useItemPicker: ({ allItems, selectedItems, maxSelections, onSelectedItemsChange, }: ItemPickerHookProps) => {
|
|
@@ -4,4 +4,4 @@ export interface PriceTickerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
price?: number;
|
|
5
5
|
showArrow?: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare const PriceTicker: import("react").MemoExoticComponent<({ className, decimals, price, showArrow, ...htmlAttributes }: PriceTickerProps) => import("react
|
|
7
|
+
export declare const PriceTicker: import("react").MemoExoticComponent<({ className, decimals, price, showArrow, ...htmlAttributes }: PriceTickerProps) => import("react").JSX.Element>;
|
package/types/prompt/Prompt.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DialogHeaderProps, DialogProps } from "@salt-ds/core";
|
|
2
|
-
import { HTMLAttributes, ReactNode, RefObject } from "react";
|
|
1
|
+
import { type DialogHeaderProps, type DialogProps } from "@salt-ds/core";
|
|
2
|
+
import { type HTMLAttributes, type ReactNode, type RefObject } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* Allow fine grained configuration of Prompt buttons
|
|
5
5
|
* The ref is provided to facilitate programmatic focus.
|
|
@@ -50,4 +50,4 @@ export interface PromptProps extends Pick<DialogProps, "disableDismiss" | "onOpe
|
|
|
50
50
|
showConfirmButton?: boolean;
|
|
51
51
|
title: string;
|
|
52
52
|
}
|
|
53
|
-
export declare const Prompt: ({ children, className, cancelButtonLabel, cancelButtonProps, confirmButtonLabel, confirmButtonProps, customAction, disableDismiss, disableAccent, headerTag, icon, initialFocusedItem, onCancel, onClose, onConfirm, onOpenChange, open, showCancelButton, showCloseButton, showConfirmButton, status, title, ...htmlAttributes }: PromptProps) => import("react
|
|
53
|
+
export declare const Prompt: ({ children, className, cancelButtonLabel, cancelButtonProps, confirmButtonLabel, confirmButtonProps, customAction, disableDismiss, disableAccent, headerTag, icon, initialFocusedItem, onCancel, onClose, onConfirm, onOpenChange, open, showCancelButton, showCloseButton, showConfirmButton, status, title, ...htmlAttributes }: PromptProps) => import("react").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { ListBoxProps, OptionProps } from "@salt-ds/core";
|
|
|
2
2
|
export declare const SortableOption: ({ id, index, value, ...optionProps }: OptionProps & {
|
|
3
3
|
id: string;
|
|
4
4
|
index: number;
|
|
5
|
-
}) => import("react
|
|
5
|
+
}) => import("react").JSX.Element;
|
|
6
6
|
export declare const SortableList: ({ children, onReorderListItems, ...listBoxProps }: ListBoxProps & {
|
|
7
7
|
onReorderListItems?: (listItems: unknown[]) => void;
|
|
8
|
-
}) => import("react
|
|
8
|
+
}) => import("react").JSX.Element;
|
|
@@ -27,18 +27,18 @@ export declare const useSplitButton: ({ ButtonProps: ButtonPropsProp, PopupMenuP
|
|
|
27
27
|
onFocusCapture?: FocusEventHandler<HTMLButtonElement> | undefined;
|
|
28
28
|
onBlur?: FocusEventHandler<HTMLButtonElement> | undefined;
|
|
29
29
|
onBlurCapture?: FocusEventHandler<HTMLButtonElement> | undefined;
|
|
30
|
-
onChange?: import("react").
|
|
31
|
-
onChangeCapture?: import("react").
|
|
30
|
+
onChange?: import("react").ChangeEventHandler<HTMLButtonElement, Element> | undefined;
|
|
31
|
+
onChangeCapture?: import("react").ChangeEventHandler<HTMLButtonElement, Element> | undefined;
|
|
32
32
|
onBeforeInput?: import("react").InputEventHandler<HTMLButtonElement> | undefined;
|
|
33
|
-
onBeforeInputCapture?: import("react").
|
|
34
|
-
onInput?: import("react").
|
|
35
|
-
onInputCapture?: import("react").
|
|
36
|
-
onReset?: import("react").
|
|
37
|
-
onResetCapture?: import("react").
|
|
38
|
-
onSubmit?: import("react").
|
|
39
|
-
onSubmitCapture?: import("react").
|
|
40
|
-
onInvalid?: import("react").
|
|
41
|
-
onInvalidCapture?: import("react").
|
|
33
|
+
onBeforeInputCapture?: import("react").InputEventHandler<HTMLButtonElement> | undefined;
|
|
34
|
+
onInput?: import("react").InputEventHandler<HTMLButtonElement> | undefined;
|
|
35
|
+
onInputCapture?: import("react").InputEventHandler<HTMLButtonElement> | undefined;
|
|
36
|
+
onReset?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
|
|
37
|
+
onResetCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
|
|
38
|
+
onSubmit?: import("react").SubmitEventHandler<HTMLButtonElement> | undefined;
|
|
39
|
+
onSubmitCapture?: import("react").SubmitEventHandler<HTMLButtonElement> | undefined;
|
|
40
|
+
onInvalid?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
|
|
41
|
+
onInvalidCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
|
|
42
42
|
onLoad?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
|
|
43
43
|
onLoadCapture?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
|
|
44
44
|
onError?: import("react").ReactEventHandler<HTMLButtonElement> | undefined;
|
|
@@ -277,7 +277,7 @@ export declare const useSplitButton: ({ ButtonProps: ButtonPropsProp, PopupMenuP
|
|
|
277
277
|
results?: number | undefined;
|
|
278
278
|
security?: string | undefined;
|
|
279
279
|
unselectable?: "on" | "off" | undefined;
|
|
280
|
-
popover?: "" | "auto" | "manual" | undefined;
|
|
280
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined;
|
|
281
281
|
popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
|
|
282
282
|
popoverTarget?: string | undefined;
|
|
283
283
|
inert?: boolean | undefined;
|
|
@@ -7,4 +7,4 @@ export interface SplitterProps extends Omit<HTMLAttributes<HTMLDivElement>, "onR
|
|
|
7
7
|
onResizeEnd: () => void;
|
|
8
8
|
position?: number;
|
|
9
9
|
}
|
|
10
|
-
export declare const Splitter: ({ className, direction, onResize, onResizeEnd, onResizeStart, position, ...htmlAttributes }: SplitterProps) => import("react
|
|
10
|
+
export declare const Splitter: ({ className, direction, onResize, onResizeEnd, onResizeStart, position, ...htmlAttributes }: SplitterProps) => import("react").JSX.Element;
|
|
@@ -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
|
|
2
|
+
export declare const SearchCell: ({ column, dataRow, searchPattern, }: TableCellRendererProps) => import("react").JSX.Element;
|
|
@@ -3,7 +3,8 @@ import { HTMLAttributes } from "react";
|
|
|
3
3
|
export interface TableSearchProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
TableProps: TableProps;
|
|
5
5
|
autoFocus?: boolean;
|
|
6
|
+
baseFilter?: string;
|
|
6
7
|
placeHolder?: string;
|
|
7
8
|
searchColumns: string[];
|
|
8
9
|
}
|
|
9
|
-
export declare const TableSearch: ({ TableProps: { dataSource: dataSourceProp, ...TableProps }, autoFocus, className, placeHolder, searchColumns, ...htmlAttributes }: TableSearchProps) => import("react
|
|
10
|
+
export declare const TableSearch: ({ TableProps: { dataSource: dataSourceProp, ...TableProps }, autoFocus, baseFilter, className, placeHolder, searchColumns, ...htmlAttributes }: TableSearchProps) => import("react").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FormEventHandler } from "react";
|
|
2
2
|
import { TableSearchProps } from "./TableSearch";
|
|
3
3
|
import { DataSource } from "@vuu-ui/vuu-data-types";
|
|
4
|
-
export interface TableSearchHookProps extends Pick<TableSearchProps, "searchColumns"> {
|
|
4
|
+
export interface TableSearchHookProps extends Pick<TableSearchProps, "searchColumns" | "baseFilter"> {
|
|
5
5
|
dataSource: DataSource;
|
|
6
6
|
label?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const useTableSearch: ({ dataSource, searchColumns, }: TableSearchHookProps) => {
|
|
8
|
+
export declare const useTableSearch: ({ baseFilter, dataSource, searchColumns, }: TableSearchHookProps) => {
|
|
9
9
|
dataSource: DataSource;
|
|
10
10
|
onChange: FormEventHandler;
|
|
11
11
|
searchState: {
|
|
@@ -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
|
|
23
|
+
export declare const TabMenu: ({ allowClose, allowRename, controlledComponentId, controlledComponentTitle, location, onMenuAction, onMenuClose, index, }: TabMenuProps) => import("react").JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { TabstripProps } from "./TabsTypes";
|
|
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,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { OverflowContainerProps } from "../overflow-container";
|
|
2
3
|
import { SelectionStrategy, SpecialKeyMultipleSelection } from "../common-hooks";
|
|
3
4
|
export type ActiveItemChangeHandler = (itemIndex: number[]) => void;
|
|
@@ -16,4 +17,4 @@ export interface ToolbarProps extends OverflowContainerProps {
|
|
|
16
17
|
selectionStrategy?: SelectionStrategy | SpecialKeyMultipleSelection;
|
|
17
18
|
showSeparators?: boolean;
|
|
18
19
|
}
|
|
19
|
-
export declare const Toolbar: ({ activeItemIndex: activeItemIndexProp, alignItems, defaultActiveItemIndex, children, className, id: idProp, onActiveChange, onNavigateOutOfBounds, orientation, selectionStrategy, showSeparators, ...props }: ToolbarProps) =>
|
|
20
|
+
export declare const Toolbar: ({ activeItemIndex: activeItemIndexProp, alignItems, defaultActiveItemIndex, children, className, id: idProp, onActiveChange, onNavigateOutOfBounds, orientation, selectionStrategy, showSeparators, ...props }: ToolbarProps) => React.JSX.Element;
|
|
@@ -20,4 +20,4 @@ export interface VuuDatePickerProps extends Omit<DatePickerProps<SingleSelection
|
|
|
20
20
|
*/
|
|
21
21
|
value?: EpochTimestamp | number;
|
|
22
22
|
}
|
|
23
|
-
export declare const VuuDatePicker: ({ className, onSelectionChange, onCommit, preserveFocusOnSelect, selectedDate: selectedDateProp, timeZone, value, ...props }: VuuDatePickerProps) => import("react
|
|
23
|
+
export declare const VuuDatePicker: ({ className, onSelectionChange, onCommit, preserveFocusOnSelect, selectedDate: selectedDateProp, timeZone, value, ...props }: VuuDatePickerProps) => import("react").JSX.Element;
|
|
@@ -5,5 +5,5 @@ type TimePickerInputProps = "defaultValue" | "milliseconds" | "onChange" | "onCo
|
|
|
5
5
|
export type VuuTimePickerSecondsProps = Pick<TimeInputSecondsProps, TimePickerInputProps> & VuuTimePickerHtmlAttributes;
|
|
6
6
|
export type VuuTimePickerMillisecondsProps = Pick<TimeInputMillisecondsProps, TimePickerInputProps> & VuuTimePickerHtmlAttributes;
|
|
7
7
|
export type VuuTimePickerProps = VuuTimePickerSecondsProps | VuuTimePickerMillisecondsProps;
|
|
8
|
-
export declare const VuuTimePicker: ({ className, defaultValue, milliseconds, onChange, onCommit, value, ...htmlAttributes }: VuuTimePickerProps) => import("react
|
|
8
|
+
export declare const VuuTimePicker: ({ className, defaultValue, milliseconds, onChange, onCommit, value, ...htmlAttributes }: VuuTimePickerProps) => import("react").JSX.Element;
|
|
9
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
|
|
6
|
+
export declare const VuuTypeaheadInput: ({ allowFreeInput, className, column, freeTextWarning, highlightFirstSuggestion, inputProps: inputPropsProp, minCharacterCountToTriggerSuggestions, onCommit, selectOnTab, table, }: VuuTypeaheadInputProps) => import("react").JSX.Element;
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Dialog, DialogActions, DialogCloseButton, DialogContent, DialogHeader } from "@salt-ds/core";
|
|
3
|
-
import { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
4
|
-
import { Prompt } from "../prompt/Prompt.js";
|
|
5
|
-
const useDialogHost = ()=>{
|
|
6
|
-
const [dialogState, setDialogState] = useState();
|
|
7
|
-
const [promptState, setPromptState] = useState();
|
|
8
|
-
const closePrompt = useCallback(()=>{
|
|
9
|
-
setPromptState(void 0);
|
|
10
|
-
}, []);
|
|
11
|
-
const closeDialog = useCallback(()=>{
|
|
12
|
-
setDialogState(void 0);
|
|
13
|
-
}, []);
|
|
14
|
-
const handleOpenChange = useCallback((open)=>{
|
|
15
|
-
if (true !== open) closeDialog();
|
|
16
|
-
}, [
|
|
17
|
-
closeDialog
|
|
18
|
-
]);
|
|
19
|
-
const dialog = dialogState ? /*#__PURE__*/ jsxs(Dialog, {
|
|
20
|
-
open: true,
|
|
21
|
-
onOpenChange: handleOpenChange,
|
|
22
|
-
children: [
|
|
23
|
-
/*#__PURE__*/ jsx(DialogHeader, {
|
|
24
|
-
header: dialogState.title
|
|
25
|
-
}),
|
|
26
|
-
/*#__PURE__*/ jsx(DialogContent, {
|
|
27
|
-
children: dialogState.content
|
|
28
|
-
}),
|
|
29
|
-
true !== dialogState.hideCloseButton ? /*#__PURE__*/ jsx(DialogCloseButton, {
|
|
30
|
-
"data-embedded": true,
|
|
31
|
-
"data-icon": "close",
|
|
32
|
-
onClick: closeDialog
|
|
33
|
-
}) : null,
|
|
34
|
-
dialogState.actions ? /*#__PURE__*/ jsx(DialogActions, {
|
|
35
|
-
children: dialogState.actions
|
|
36
|
-
}) : null
|
|
37
|
-
]
|
|
38
|
-
}) : null;
|
|
39
|
-
const handleOpenChangePrompt = useCallback((open)=>{
|
|
40
|
-
if (true !== open) closePrompt();
|
|
41
|
-
promptState?.promptProps.onOpenChange?.(open);
|
|
42
|
-
}, [
|
|
43
|
-
closePrompt,
|
|
44
|
-
promptState
|
|
45
|
-
]);
|
|
46
|
-
const prompt = promptState ? /*#__PURE__*/ jsx(Prompt, {
|
|
47
|
-
...promptState.promptProps,
|
|
48
|
-
onClose: closePrompt,
|
|
49
|
-
onOpenChange: handleOpenChangePrompt,
|
|
50
|
-
open: true,
|
|
51
|
-
children: promptState.content
|
|
52
|
-
}) : null;
|
|
53
|
-
return {
|
|
54
|
-
dialog,
|
|
55
|
-
prompt,
|
|
56
|
-
setDialogState,
|
|
57
|
-
setPromptState
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
const defaultShowDialog = ()=>{
|
|
61
|
-
console.warn("No DialogProvider in place");
|
|
62
|
-
};
|
|
63
|
-
const defaultCloseDialog = ()=>{
|
|
64
|
-
console.warn("No DialogProvider in place");
|
|
65
|
-
};
|
|
66
|
-
const defaultShowPrompt = ()=>{
|
|
67
|
-
console.warn("No DialogProvider in place");
|
|
68
|
-
};
|
|
69
|
-
const defaultClosePrompt = ()=>{
|
|
70
|
-
console.warn("No DialogProvider in place");
|
|
71
|
-
};
|
|
72
|
-
class DialogContextObject {
|
|
73
|
-
showDialog = defaultShowDialog;
|
|
74
|
-
closeDialog = defaultCloseDialog;
|
|
75
|
-
showPrompt = defaultShowPrompt;
|
|
76
|
-
closePrompt = defaultClosePrompt;
|
|
77
|
-
setDispatchers = (showDialog, closeDialog, showPrompt, closePrompt)=>{
|
|
78
|
-
this.showDialog = showDialog;
|
|
79
|
-
this.closeDialog = closeDialog;
|
|
80
|
-
this.showPrompt = showPrompt;
|
|
81
|
-
this.closePrompt = closePrompt;
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
const DialogContext = /*#__PURE__*/ createContext(new DialogContextObject());
|
|
85
|
-
const DialogHost = ({ context })=>{
|
|
86
|
-
const { dialog, setDialogState, prompt, setPromptState } = useDialogHost();
|
|
87
|
-
const showDialog = useCallback((dialogContent, title, actionButtons, hideCloseButton)=>{
|
|
88
|
-
setDialogState({
|
|
89
|
-
actions: actionButtons,
|
|
90
|
-
content: dialogContent,
|
|
91
|
-
title,
|
|
92
|
-
hideCloseButton
|
|
93
|
-
});
|
|
94
|
-
}, [
|
|
95
|
-
setDialogState
|
|
96
|
-
]);
|
|
97
|
-
const closeDialog = useCallback(()=>{
|
|
98
|
-
setDialogState(void 0);
|
|
99
|
-
}, [
|
|
100
|
-
setDialogState
|
|
101
|
-
]);
|
|
102
|
-
const showPrompt = useCallback((content, promptProps)=>{
|
|
103
|
-
setPromptState({
|
|
104
|
-
content,
|
|
105
|
-
promptProps
|
|
106
|
-
});
|
|
107
|
-
}, [
|
|
108
|
-
setPromptState
|
|
109
|
-
]);
|
|
110
|
-
const closePrompt = useCallback(()=>{
|
|
111
|
-
setPromptState(void 0);
|
|
112
|
-
}, [
|
|
113
|
-
setPromptState
|
|
114
|
-
]);
|
|
115
|
-
useMemo(()=>{
|
|
116
|
-
context.setDispatchers(showDialog, closeDialog, showPrompt, closePrompt);
|
|
117
|
-
}, [
|
|
118
|
-
closeDialog,
|
|
119
|
-
closePrompt,
|
|
120
|
-
context,
|
|
121
|
-
showDialog,
|
|
122
|
-
showPrompt
|
|
123
|
-
]);
|
|
124
|
-
return dialog ?? prompt;
|
|
125
|
-
};
|
|
126
|
-
const ModalProvider = ({ children })=>{
|
|
127
|
-
const context = useContext(DialogContext);
|
|
128
|
-
return /*#__PURE__*/ jsxs(DialogContext.Provider, {
|
|
129
|
-
value: context,
|
|
130
|
-
children: [
|
|
131
|
-
/*#__PURE__*/ jsx(DialogHost, {
|
|
132
|
-
context: context
|
|
133
|
-
}),
|
|
134
|
-
children
|
|
135
|
-
]
|
|
136
|
-
});
|
|
137
|
-
};
|
|
138
|
-
const useModal = ()=>{
|
|
139
|
-
const { closeDialog, closePrompt, showDialog, showPrompt } = useContext(DialogContext);
|
|
140
|
-
return {
|
|
141
|
-
showDialog,
|
|
142
|
-
closeDialog,
|
|
143
|
-
showPrompt,
|
|
144
|
-
closePrompt
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
export { ModalProvider, useModal };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from "react";
|
|
2
|
-
import { PromptProps } from "../prompt/Prompt";
|
|
3
|
-
export type ShowDialog = (dialogContent: ReactElement, title: string, dialogActionButtons?: ReactElement[], hideCloseButton?: boolean) => void;
|
|
4
|
-
export type ShowPrompt = (promptContent: ReactElement, promptProps: PromptProps) => void;
|
|
5
|
-
export declare const ModalProvider: ({ children }: {
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const useModal: () => {
|
|
9
|
-
showDialog: ShowDialog;
|
|
10
|
-
closeDialog: () => void;
|
|
11
|
-
showPrompt: ShowPrompt;
|
|
12
|
-
closePrompt: () => void;
|
|
13
|
-
};
|
|
@@ -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
|
-
};
|