@salt-ds/lab 1.0.0-alpha.70 → 1.0.0-alpha.71
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/CHANGELOG.md +53 -0
- package/css/salt-lab.css +192 -302
- package/dist-cjs/app-header/AppHeader.css.js +1 -1
- package/dist-cjs/calendar/CalendarWeekHeader.css.js +1 -1
- package/dist-cjs/calendar/internal/CalendarDay.css.js +1 -1
- package/dist-cjs/calendar/internal/CalendarMonth.css.js +1 -1
- package/dist-cjs/cascading-menu/CascadingMenuItem.css.js +1 -1
- package/dist-cjs/color-chooser/ColorChooser.css.js +1 -1
- package/dist-cjs/color-chooser/ColorPicker.css.js +1 -1
- package/dist-cjs/color-chooser/HexInput.css.js +1 -1
- package/dist-cjs/color-chooser/RGBAInput.css.js +1 -1
- package/dist-cjs/color-chooser/Swatch.css.js +1 -1
- package/dist-cjs/combo-box/useCombobox.js.map +1 -1
- package/dist-cjs/common-hooks/selectionTypes.js.map +1 -1
- package/dist-cjs/common-hooks/useCollapsibleGroups.js.map +1 -1
- package/dist-cjs/common-hooks/useKeyboardNavigation.js.map +1 -1
- package/dist-cjs/common-hooks/useKeyboardNavigationPanel.js.map +1 -1
- package/dist-cjs/date-input/DateInput.css.js +1 -1
- package/dist-cjs/date-picker/DatePickerOverlay.css.js +1 -1
- package/dist-cjs/date-picker/DatePickerPanel.css.js +1 -1
- package/dist-cjs/form-field-legacy/FormFieldLegacy.css.js +1 -1
- package/dist-cjs/form-field-legacy/FormLabel.css.js +1 -1
- package/dist-cjs/index.js +0 -8
- package/dist-cjs/index.js.map +1 -1
- package/dist-cjs/input-legacy/InputLegacy.css.js +1 -1
- package/dist-cjs/list/List.css.js +1 -1
- package/dist-cjs/list/ListItem.css.js +1 -1
- package/dist-cjs/list/useList.js.map +1 -1
- package/dist-cjs/list-deprecated/List.css.js +1 -1
- package/dist-cjs/list-deprecated/ListItem.css.js +1 -1
- package/dist-cjs/list-next/ListItemNext.css.js +1 -1
- package/dist-cjs/list-next/ListNext.css.js +1 -1
- package/dist-cjs/logo/LogoSeparator.css.js +1 -1
- package/dist-cjs/number-input/NumberInput.css.js +1 -1
- package/dist-cjs/number-input/NumberInput.js +146 -79
- package/dist-cjs/number-input/NumberInput.js.map +1 -1
- package/dist-cjs/number-input/internal/useCaret.js +34 -0
- package/dist-cjs/number-input/internal/useCaret.js.map +1 -0
- package/dist-cjs/number-input/internal/utils.js +56 -14
- package/dist-cjs/number-input/internal/utils.js.map +1 -1
- package/dist-cjs/number-input/useNumberInput.js +34 -26
- package/dist-cjs/number-input/useNumberInput.js.map +1 -1
- package/dist-cjs/portal/Portal.js.map +1 -1
- package/dist-cjs/query-input/QueryInput.css.js +1 -1
- package/dist-cjs/responsive/OverflowReducer.js.map +1 -1
- package/dist-cjs/system-status/SystemStatus.css.js +1 -1
- package/dist-cjs/tabs/Tabstrip.css.js +1 -1
- package/dist-cjs/tabs/drag-drop/Draggable.css.js +1 -1
- package/dist-cjs/tabs-next/TabBar.css.js +1 -1
- package/dist-cjs/tabs-next/TabNext.css.js +1 -1
- package/dist-cjs/tabs-next/TabOverflowList.css.js +1 -1
- package/dist-cjs/tokenized-input/TokenizedInput.css.js +1 -1
- package/dist-cjs/tokenized-input-next/TokenizedInputNext.css.js +1 -1
- package/dist-cjs/toolbar/overflow-panel/OverflowPanel.css.js +1 -1
- package/dist-cjs/toolbar/overflow-panel/OverflowSeparator.css.js +1 -1
- package/dist-cjs/tree/useTree.js.map +1 -1
- package/dist-es/app-header/AppHeader.css.js +1 -1
- package/dist-es/calendar/CalendarWeekHeader.css.js +1 -1
- package/dist-es/calendar/internal/CalendarDay.css.js +1 -1
- package/dist-es/calendar/internal/CalendarMonth.css.js +1 -1
- package/dist-es/cascading-menu/CascadingMenuItem.css.js +1 -1
- package/dist-es/color-chooser/ColorChooser.css.js +1 -1
- package/dist-es/color-chooser/ColorPicker.css.js +1 -1
- package/dist-es/color-chooser/HexInput.css.js +1 -1
- package/dist-es/color-chooser/RGBAInput.css.js +1 -1
- package/dist-es/color-chooser/Swatch.css.js +1 -1
- package/dist-es/combo-box/useCombobox.js.map +1 -1
- package/dist-es/common-hooks/selectionTypes.js.map +1 -1
- package/dist-es/common-hooks/useCollapsibleGroups.js.map +1 -1
- package/dist-es/common-hooks/useKeyboardNavigation.js.map +1 -1
- package/dist-es/common-hooks/useKeyboardNavigationPanel.js.map +1 -1
- package/dist-es/date-input/DateInput.css.js +1 -1
- package/dist-es/date-picker/DatePickerOverlay.css.js +1 -1
- package/dist-es/date-picker/DatePickerPanel.css.js +1 -1
- package/dist-es/form-field-legacy/FormFieldLegacy.css.js +1 -1
- package/dist-es/form-field-legacy/FormLabel.css.js +1 -1
- package/dist-es/index.js +0 -4
- package/dist-es/index.js.map +1 -1
- package/dist-es/input-legacy/InputLegacy.css.js +1 -1
- package/dist-es/list/List.css.js +1 -1
- package/dist-es/list/ListItem.css.js +1 -1
- package/dist-es/list/useList.js.map +1 -1
- package/dist-es/list-deprecated/List.css.js +1 -1
- package/dist-es/list-deprecated/ListItem.css.js +1 -1
- package/dist-es/list-next/ListItemNext.css.js +1 -1
- package/dist-es/list-next/ListNext.css.js +1 -1
- package/dist-es/logo/LogoSeparator.css.js +1 -1
- package/dist-es/number-input/NumberInput.css.js +1 -1
- package/dist-es/number-input/NumberInput.js +149 -82
- package/dist-es/number-input/NumberInput.js.map +1 -1
- package/dist-es/number-input/internal/useCaret.js +32 -0
- package/dist-es/number-input/internal/useCaret.js.map +1 -0
- package/dist-es/number-input/internal/utils.js +52 -10
- package/dist-es/number-input/internal/utils.js.map +1 -1
- package/dist-es/number-input/useNumberInput.js +35 -27
- package/dist-es/number-input/useNumberInput.js.map +1 -1
- package/dist-es/portal/Portal.js.map +1 -1
- package/dist-es/query-input/QueryInput.css.js +1 -1
- package/dist-es/responsive/OverflowReducer.js.map +1 -1
- package/dist-es/system-status/SystemStatus.css.js +1 -1
- package/dist-es/tabs/Tabstrip.css.js +1 -1
- package/dist-es/tabs/drag-drop/Draggable.css.js +1 -1
- package/dist-es/tabs-next/TabBar.css.js +1 -1
- package/dist-es/tabs-next/TabNext.css.js +1 -1
- package/dist-es/tabs-next/TabOverflowList.css.js +1 -1
- package/dist-es/tokenized-input/TokenizedInput.css.js +1 -1
- package/dist-es/tokenized-input-next/TokenizedInputNext.css.js +1 -1
- package/dist-es/toolbar/overflow-panel/OverflowPanel.css.js +1 -1
- package/dist-es/toolbar/overflow-panel/OverflowSeparator.css.js +1 -1
- package/dist-es/tree/useTree.js.map +1 -1
- package/dist-types/app-header/AppHeader.d.ts +1 -1
- package/dist-types/button-bar/ButtonBar.d.ts +3 -3
- package/dist-types/calendar/Calendar.d.ts +1 -1
- package/dist-types/calendar/CalendarWeekHeader.d.ts +1 -1
- package/dist-types/calendar/useCalendar.d.ts +1 -1
- package/dist-types/calendar/useCalendarDay.d.ts +2 -1
- package/dist-types/calendar/useCalendarSelection.d.ts +5 -5
- package/dist-types/cascading-menu/internal/CascadingMenuAction.d.ts +2 -2
- package/dist-types/cascading-menu/internal/menuPositioning.d.ts +1 -1
- package/dist-types/cascading-menu/internal/stateUtils.d.ts +2 -2
- package/dist-types/cascading-menu/internal/useClickAway.d.ts +1 -1
- package/dist-types/cascading-menu/internal/useRefsManager.d.ts +1 -1
- package/dist-types/cascading-menu/internal/useStateReducer.d.ts +2 -2
- package/dist-types/cascading-menu/stateChangeTypes.d.ts +1 -1
- package/dist-types/color-chooser/Color.d.ts +1 -1
- package/dist-types/color-chooser/DictTabs.d.ts +1 -1
- package/dist-types/color-chooser/color-utils.d.ts +1 -1
- package/dist-types/combo-box/ComboBox.d.ts +3 -3
- package/dist-types/combo-box/useCombobox.d.ts +1 -1
- package/dist-types/combo-box-deprecated/ComboBoxDeprecated.d.ts +3 -3
- package/dist-types/combo-box-deprecated/filterHelpers.d.ts +1 -1
- package/dist-types/combo-box-deprecated/internal/DefaultComboBox.d.ts +1 -1
- package/dist-types/combo-box-deprecated/internal/MultiSelectComboBox.d.ts +1 -1
- package/dist-types/combo-box-deprecated/internal/useComboBox.d.ts +98 -97
- package/dist-types/combo-box-deprecated/internal/useMultiSelectComboBox.d.ts +214 -212
- package/dist-types/combo-box-deprecated/internal/usePopperStatus.d.ts +3 -3
- package/dist-types/common-hooks/collectionTypes.d.ts +3 -3
- package/dist-types/common-hooks/itemToString.d.ts +1 -1
- package/dist-types/common-hooks/navigationTypes.d.ts +4 -4
- package/dist-types/common-hooks/selectionTypes.d.ts +10 -10
- package/dist-types/common-hooks/useKeyboardNavigation.d.ts +1 -1
- package/dist-types/common-hooks/useSelection.d.ts +2 -2
- package/dist-types/common-hooks/utils/collection-item-utils.d.ts +2 -2
- package/dist-types/common-hooks/utils/filter-utils.d.ts +2 -2
- package/dist-types/contact-details/ContactAction.d.ts +1 -1
- package/dist-types/contact-details/ContactAvatar.d.ts +1 -1
- package/dist-types/contact-details/ContactDetails.d.ts +1 -1
- package/dist-types/date-input/DateInputRange.d.ts +2 -2
- package/dist-types/date-input/DateInputSingle.d.ts +1 -1
- package/dist-types/date-picker/DatePicker.d.ts +1 -1
- package/dist-types/date-picker/DatePickerActions.d.ts +1 -1
- package/dist-types/date-picker/DatePickerContext.d.ts +1 -1
- package/dist-types/date-picker/DatePickerOverlayProvider.d.ts +1 -1
- package/dist-types/date-picker/DatePickerRangeGridPanel.d.ts +1 -1
- package/dist-types/date-picker/DatePickerSingleGridPanel.d.ts +1 -1
- package/dist-types/date-picker/DatePickerSinglePanel.d.ts +1 -1
- package/dist-types/date-picker/useDatePicker.d.ts +1 -1
- package/dist-types/deck-layout/DeckLayout.d.ts +3 -3
- package/dist-types/dropdown/Dropdown.d.ts +3 -3
- package/dist-types/dropdown/DropdownBase.d.ts +1 -1
- package/dist-types/dropdown/dropdownTypes.d.ts +1 -1
- package/dist-types/dropdown/useClickAway.d.ts +1 -1
- package/dist-types/dropdown/useDropdown.d.ts +1 -1
- package/dist-types/focus-manager/internal/findAllTabbableElements.d.ts +1 -1
- package/dist-types/form-field-legacy/FormFieldLegacy.d.ts +5 -5
- package/dist-types/form-field-legacy/NecessityIndicator.d.ts +1 -1
- package/dist-types/form-field-legacy/StatusIndicator.d.ts +1 -1
- package/dist-types/formatted-input/FormattedInput.d.ts +1 -1
- package/dist-types/index.d.ts +0 -1
- package/dist-types/input-legacy/StaticInputAdornment.d.ts +1 -1
- package/dist-types/layer-layout/LayerLayout.d.ts +1 -1
- package/dist-types/list/List.d.ts +3 -3
- package/dist-types/list/ListItem.d.ts +1 -1
- package/dist-types/list/VirtualizedList.d.ts +3 -3
- package/dist-types/list/listTypes.d.ts +2 -2
- package/dist-types/list/useList.d.ts +1 -1
- package/dist-types/list/useVirtualization.d.ts +1 -1
- package/dist-types/list-deprecated/List.d.ts +2 -2
- package/dist-types/list-deprecated/ListBase.d.ts +2 -2
- package/dist-types/list-deprecated/ListItem.d.ts +1 -1
- package/dist-types/list-deprecated/ListItemContext.d.ts +1 -1
- package/dist-types/list-deprecated/ListProps.d.ts +5 -5
- package/dist-types/list-deprecated/itemToString.d.ts +1 -1
- package/dist-types/list-deprecated/useListItem.d.ts +2 -2
- package/dist-types/localization-provider/LocalizationProvider.d.ts +3 -3
- package/dist-types/logo/Logo.d.ts +1 -1
- package/dist-types/logo/LogoSeparator.d.ts +1 -1
- package/dist-types/number-input/NumberInput.d.ts +49 -27
- package/dist-types/number-input/internal/useCaret.d.ts +5 -0
- package/dist-types/number-input/internal/useInterval.d.ts +1 -1
- package/dist-types/number-input/internal/utils.d.ts +5 -5
- package/dist-types/number-input/useNumberInput.d.ts +11 -6
- package/dist-types/query-input/useQueryInput.d.ts +1 -1
- package/dist-types/responsive/OverflowReducer.d.ts +4 -4
- package/dist-types/responsive/overflowTypes.d.ts +20 -20
- package/dist-types/responsive/overflowUtils.d.ts +3 -3
- package/dist-types/responsive/useOverflowCollectionItems.d.ts +1 -1
- package/dist-types/responsive/useOverflowLayout.d.ts +1 -1
- package/dist-types/responsive/useResizeObserver.d.ts +2 -2
- package/dist-types/responsive/utils.d.ts +3 -3
- package/dist-types/tabs/Tab.d.ts +20 -19
- package/dist-types/tabs/Tabs.d.ts +1 -1
- package/dist-types/tabs/TabsTypes.d.ts +7 -7
- package/dist-types/tabs/drag-drop/Draggable.d.ts +2 -2
- package/dist-types/tabs/drag-drop/DropIndicator.d.ts +1 -1
- package/dist-types/tabs/drag-drop/drag-utils.d.ts +26 -22
- package/dist-types/tabs/drag-drop/dragDropTypes.d.ts +5 -5
- package/dist-types/tabs/drag-drop/useDragSpacers.d.ts +1 -1
- package/dist-types/tabs/useActivationIndicator.d.ts +1 -1
- package/dist-types/tabs/useEditableItem.d.ts +1 -1
- package/dist-types/tabs/useKeyboardNavigation.d.ts +1 -1
- package/dist-types/tabs/useSelection.d.ts +3 -3
- package/dist-types/tabs-next/hooks/useCollection.d.ts +1 -1
- package/dist-types/tokenized-input/TokenizedInput.d.ts +2 -2
- package/dist-types/tokenized-input/TokenizedInputBase.d.ts +5 -5
- package/dist-types/tokenized-input/internal/InputPill.d.ts +1 -1
- package/dist-types/tokenized-input/internal/isPlainObject.d.ts +1 -1
- package/dist-types/tokenized-input/useTokenizedInput.d.ts +1 -1
- package/dist-types/tokenized-input-next/TokenizedInputNext.d.ts +2 -2
- package/dist-types/tokenized-input-next/internal/InputPill.d.ts +1 -1
- package/dist-types/toolbar/ToolbarButton.d.ts +3 -3
- package/dist-types/toolbar/ToolbarProps.d.ts +1 -1
- package/dist-types/toolbar/TooltrayProps.d.ts +2 -2
- package/dist-types/toolbar/internal/ToolbarButtonRefsContext.d.ts +1 -1
- package/dist-types/toolbar/internal/renderTrayTools.d.ts +1 -1
- package/dist-types/tree/useTree.d.ts +1 -1
- package/dist-types/utils/forwardCallbackProps.d.ts +1 -1
- package/dist-types/utils/isEmail.d.ts +1 -1
- package/dist-types/utils/useClickOutside.d.ts +1 -1
- package/dist-types/utils/useSlideSelection.d.ts +1 -1
- package/dist-types/window/ElectronWindow.d.ts +1 -1
- package/dist-types/window/WindowContext.d.ts +4 -4
- package/package.json +2 -2
- package/dist-cjs/carousel/Carousel.css.js +0 -6
- package/dist-cjs/carousel/Carousel.css.js.map +0 -1
- package/dist-cjs/carousel/Carousel.js +0 -62
- package/dist-cjs/carousel/Carousel.js.map +0 -1
- package/dist-cjs/carousel/CarouselContext.js +0 -62
- package/dist-cjs/carousel/CarouselContext.js.map +0 -1
- package/dist-cjs/carousel/CarouselControls.css.js +0 -6
- package/dist-cjs/carousel/CarouselControls.css.js.map +0 -1
- package/dist-cjs/carousel/CarouselControls.js +0 -122
- package/dist-cjs/carousel/CarouselControls.js.map +0 -1
- package/dist-cjs/carousel/CarouselReducer.js +0 -77
- package/dist-cjs/carousel/CarouselReducer.js.map +0 -1
- package/dist-cjs/carousel/CarouselSlide.css.js +0 -6
- package/dist-cjs/carousel/CarouselSlide.css.js.map +0 -1
- package/dist-cjs/carousel/CarouselSlide.js +0 -110
- package/dist-cjs/carousel/CarouselSlide.js.map +0 -1
- package/dist-cjs/carousel/CarouselSlider.css.js +0 -6
- package/dist-cjs/carousel/CarouselSlider.css.js.map +0 -1
- package/dist-cjs/carousel/CarouselSlider.js +0 -93
- package/dist-cjs/carousel/CarouselSlider.js.map +0 -1
- package/dist-es/carousel/Carousel.css.js +0 -4
- package/dist-es/carousel/Carousel.css.js.map +0 -1
- package/dist-es/carousel/Carousel.js +0 -60
- package/dist-es/carousel/Carousel.js.map +0 -1
- package/dist-es/carousel/CarouselContext.js +0 -58
- package/dist-es/carousel/CarouselContext.js.map +0 -1
- package/dist-es/carousel/CarouselControls.css.js +0 -4
- package/dist-es/carousel/CarouselControls.css.js.map +0 -1
- package/dist-es/carousel/CarouselControls.js +0 -120
- package/dist-es/carousel/CarouselControls.js.map +0 -1
- package/dist-es/carousel/CarouselReducer.js +0 -75
- package/dist-es/carousel/CarouselReducer.js.map +0 -1
- package/dist-es/carousel/CarouselSlide.css.js +0 -4
- package/dist-es/carousel/CarouselSlide.css.js.map +0 -1
- package/dist-es/carousel/CarouselSlide.js +0 -108
- package/dist-es/carousel/CarouselSlide.js.map +0 -1
- package/dist-es/carousel/CarouselSlider.css.js +0 -4
- package/dist-es/carousel/CarouselSlider.css.js.map +0 -1
- package/dist-es/carousel/CarouselSlider.js +0 -91
- package/dist-es/carousel/CarouselSlider.js.map +0 -1
- package/dist-types/carousel/Carousel.d.ts +0 -23
- package/dist-types/carousel/CarouselContext.d.ts +0 -11
- package/dist-types/carousel/CarouselControls.d.ts +0 -26
- package/dist-types/carousel/CarouselReducer.d.ts +0 -30
- package/dist-types/carousel/CarouselSlide.d.ts +0 -32
- package/dist-types/carousel/CarouselSlider.d.ts +0 -13
- package/dist-types/carousel/index.d.ts +0 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type KeyboardEvent, type SyntheticEvent } from "react";
|
|
2
2
|
export declare const isToggleList: (event: KeyboardEvent) => boolean;
|
|
3
3
|
export declare const usePopperStatus: (props: {
|
|
4
|
-
initialOpen?: boolean
|
|
5
|
-
isMultiSelect?: boolean
|
|
6
|
-
onClose?: (
|
|
4
|
+
initialOpen?: boolean;
|
|
5
|
+
isMultiSelect?: boolean;
|
|
6
|
+
onClose?: (event: SyntheticEvent) => void;
|
|
7
7
|
}) => {
|
|
8
8
|
isOpen: boolean;
|
|
9
9
|
notifyPopper: (event: SyntheticEvent) => void;
|
|
@@ -23,7 +23,7 @@ export interface CollectionItem<T> extends CollectionItemBase<T> {
|
|
|
23
23
|
export interface SourceGroup<T> {
|
|
24
24
|
childNodes: T[];
|
|
25
25
|
}
|
|
26
|
-
export
|
|
26
|
+
export type CollectionOptions<T> = {
|
|
27
27
|
collapsibleHeaders?: boolean;
|
|
28
28
|
defaultExpanded?: boolean;
|
|
29
29
|
filterPattern?: string;
|
|
@@ -33,14 +33,14 @@ export declare type CollectionOptions<T> = {
|
|
|
33
33
|
itemToString?: (item: T) => string;
|
|
34
34
|
revealSelected?: boolean | T | T[];
|
|
35
35
|
};
|
|
36
|
-
export
|
|
36
|
+
export type CollectionHookProps<T> = {
|
|
37
37
|
children?: ReactNode;
|
|
38
38
|
id: string;
|
|
39
39
|
label?: string;
|
|
40
40
|
source?: ReadonlyArray<T>;
|
|
41
41
|
options?: CollectionOptions<T>;
|
|
42
42
|
};
|
|
43
|
-
export
|
|
43
|
+
export type CollectionHookResult<T> = {
|
|
44
44
|
/** set expanded to false for target */
|
|
45
45
|
collapseGroupItem: (item: CollectionItem<T>) => void;
|
|
46
46
|
/** data items from the collection to be rendered */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ItemToStringFunction = (item: any) => string;
|
|
2
2
|
export declare function itemToString(item: unknown): string;
|
|
@@ -10,7 +10,7 @@ export interface NavigationProps<Item = unknown> {
|
|
|
10
10
|
highlightedIndex?: number;
|
|
11
11
|
indexPositions: CollectionItem<Item>[];
|
|
12
12
|
onHighlight?: (idx: number) => void;
|
|
13
|
-
onKeyboardNavigation?: (evt: KeyboardEvent
|
|
13
|
+
onKeyboardNavigation?: (evt: KeyboardEvent<HTMLElement>, idx: number) => void;
|
|
14
14
|
restoreLastFocus?: boolean;
|
|
15
15
|
}
|
|
16
16
|
export interface NavigationHookProps<Item, Selection extends SelectionStrategy> extends NavigationProps<Item> {
|
|
@@ -19,9 +19,9 @@ export interface NavigationHookProps<Item, Selection extends SelectionStrategy>
|
|
|
19
19
|
selected?: Selection extends SingleSelectionStrategy ? CollectionItem<Item> | null : CollectionItem<Item>[];
|
|
20
20
|
}
|
|
21
21
|
export interface KeyboardHookListProps {
|
|
22
|
-
onBlur: (evt: FocusEvent) => void;
|
|
23
|
-
onFocus: (evt: FocusEvent) => void;
|
|
24
|
-
onKeyDown: (evt: KeyboardEvent) => void;
|
|
22
|
+
onBlur: (evt: FocusEvent<HTMLElement>) => void;
|
|
23
|
+
onFocus: (evt: FocusEvent<HTMLElement>) => void;
|
|
24
|
+
onKeyDown: (evt: KeyboardEvent<HTMLElement>) => void;
|
|
25
25
|
onMouseDownCapture: () => void;
|
|
26
26
|
onMouseMove: () => void;
|
|
27
27
|
onMouseLeave: () => void;
|
|
@@ -4,12 +4,12 @@ export declare const SINGLE = "default";
|
|
|
4
4
|
export declare const MULTIPLE = "multiple";
|
|
5
5
|
export declare const EXTENDED = "extended";
|
|
6
6
|
export declare const DESELECTABLE = "deselectable";
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
7
|
+
export type SingleSelectionStrategy = "default" | "deselectable";
|
|
8
|
+
export type MultiSelectionStrategy = "multiple" | "extended" | "extended-multi-range";
|
|
9
|
+
export type SelectionStrategy = SingleSelectionStrategy | MultiSelectionStrategy;
|
|
10
|
+
export type selectedType<Item, Selection extends SelectionStrategy> = Selection extends MultiSelectionStrategy ? Item[] : Item | null;
|
|
11
|
+
export type SelectHandler<Item = string> = (event: SyntheticEvent, selectedItem: Item) => void;
|
|
12
|
+
export type SelectionChangeHandler<Item = string, Selection extends SelectionStrategy = "default"> = (event: SyntheticEvent, selected: Selection extends SingleSelectionStrategy ? Item | null : Item[]) => void;
|
|
13
13
|
export declare const hasSelection: <Item = unknown>(selected: Item | Item[] | null) => boolean;
|
|
14
14
|
export declare const getFirstSelectedItem: <Item = unknown>(selected: Item | Item[] | null) => Item | null;
|
|
15
15
|
export interface SelectionProps<Item, Selection extends SelectionStrategy = "default"> {
|
|
@@ -20,10 +20,10 @@ export interface SelectionProps<Item, Selection extends SelectionStrategy = "def
|
|
|
20
20
|
selectionStrategy?: Selection;
|
|
21
21
|
}
|
|
22
22
|
export interface ListHandlers {
|
|
23
|
-
onClick?: (event: MouseEvent) => void;
|
|
24
|
-
onKeyDown?: (event: KeyboardEvent) => void;
|
|
25
|
-
onKeyboardNavigation?: (event: KeyboardEvent
|
|
26
|
-
onMouseMove?: (event: MouseEvent) => void;
|
|
23
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
24
|
+
onKeyDown?: (event: KeyboardEvent<HTMLElement>) => void;
|
|
25
|
+
onKeyboardNavigation?: (event: KeyboardEvent<HTMLElement>, currentIndex: number) => void;
|
|
26
|
+
onMouseMove?: (event: MouseEvent<HTMLElement>) => void;
|
|
27
27
|
}
|
|
28
28
|
export interface SelectionHookProps<Item, Selection extends SelectionStrategy = "default"> extends SelectionProps<CollectionItem<Item>, Selection> {
|
|
29
29
|
disableSelection?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { NavigationHookProps, NavigationHookResult } from "./navigationTypes";
|
|
2
2
|
import { type SelectionStrategy } from "./selectionTypes";
|
|
3
3
|
export declare const LIST_FOCUS_VISIBLE = -2;
|
|
4
|
-
export declare const useKeyboardNavigation: <Item,
|
|
4
|
+
export declare const useKeyboardNavigation: <Item, Selection extends SelectionStrategy>({ containerRef, defaultHighlightedIndex, disableHighlightOnFocus, highlightedIndex: highlightedIndexProp, indexPositions, onHighlight, onKeyboardNavigation, restoreLastFocus, selected, }: NavigationHookProps<Item, Selection>) => NavigationHookResult;
|
|
@@ -3,6 +3,6 @@ export declare const CHECKBOX = "checkbox";
|
|
|
3
3
|
export declare const GROUP_SELECTION_NONE = "none";
|
|
4
4
|
export declare const GROUP_SELECTION_SINGLE = "single";
|
|
5
5
|
export declare const GROUP_SELECTION_CASCADE = "cascade";
|
|
6
|
-
export
|
|
6
|
+
export type GroupSelectionMode = "none" | "single" | "cascade";
|
|
7
7
|
export declare const groupSelectionEnabled: (groupSelection: GroupSelectionMode) => boolean;
|
|
8
|
-
export declare const useSelection: <Item,
|
|
8
|
+
export declare const useSelection: <Item, Selection extends SelectionStrategy = "default">({ defaultSelected, disableSelection, highlightedIdx, indexPositions, label, onSelect, onSelectionChange, selected: selectedProp, selectionStrategy, selectionKeys, tabToSelect, }: SelectionHookProps<Item, Selection>) => SelectionHookResult<Item, Selection>;
|
|
@@ -13,8 +13,8 @@ export declare const getChildLabel: (element: ReactElement<{
|
|
|
13
13
|
}>) => string | undefined;
|
|
14
14
|
export declare const childIsGroup: (child: ReactElement) => boolean;
|
|
15
15
|
export declare const getChildNodes: (element: ReactElement) => CollectionItem<ReactElement>[] | undefined;
|
|
16
|
-
|
|
17
|
-
export declare const sourceItems: <T>(source?:
|
|
16
|
+
type CollectionItemWithoutId<T> = Omit<CollectionItem<T>, "id">;
|
|
17
|
+
export declare const sourceItems: <T>(source?: ReadonlyArray<T>, options?: CollectionOptions<T>) => CollectionItemWithoutId<T>[] | undefined;
|
|
18
18
|
export declare const childItems: (children: ReactNode) => CollectionItem<ReactElement>[] | undefined;
|
|
19
19
|
export declare const isParentPath: (parentPath: string, childPath: string) => boolean;
|
|
20
20
|
export declare function replaceCollectionItem<Item>(nodes: CollectionItem<Item>[], id: string, props: Partial<CollectionItem<Item>>): CollectionItem<Item>[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type GetFilterRegex = (inputValue: string) => RegExp;
|
|
2
|
+
export type FilterPredicate = (item: string) => boolean;
|
|
3
3
|
export declare const getDefaultFilterRegex: GetFilterRegex;
|
|
4
4
|
export declare const getDefaultFilter: (inputValue?: string, getFilterRegex?: GetFilterRegex) => (itemValue?: string) => boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ButtonProps, type TooltipProps } from "@salt-ds/core";
|
|
2
2
|
import type { IconProps } from "@salt-ds/icons";
|
|
3
3
|
import { type ComponentType } from "react";
|
|
4
|
-
export
|
|
4
|
+
export type ContactActionProps = ButtonProps & {
|
|
5
5
|
accessibleText?: string;
|
|
6
6
|
tooltipProps?: TooltipProps;
|
|
7
7
|
} & ({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type AvatarProps } from "@salt-ds/core";
|
|
2
|
-
export
|
|
2
|
+
export type ContactAvatarProps = AvatarProps;
|
|
3
3
|
export declare const ContactAvatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes } from "react";
|
|
2
|
-
export
|
|
2
|
+
export type ContactDetailsVariant = "default" | "compact" | "mini";
|
|
3
3
|
export interface ContactDetailsProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
variant?: ContactDetailsVariant;
|
|
5
5
|
stackAtBreakpoint?: number;
|
|
@@ -5,14 +5,14 @@ import type { DateRangeSelection } from "../calendar";
|
|
|
5
5
|
/**
|
|
6
6
|
* DateInputRange raw value or null if no date is defined.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type DateInputRangeValue = {
|
|
9
9
|
startDate?: string | null;
|
|
10
10
|
endDate?: string | null;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* Details of parsing the date range
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type DateInputRangeDetails = {
|
|
16
16
|
/** Details of parsing the start date and applying any validation */
|
|
17
17
|
startDate?: DateDetail;
|
|
18
18
|
/** Details of parsing the end date and applying any validation */
|
|
@@ -4,7 +4,7 @@ import type { SingleDateSelection } from "../calendar";
|
|
|
4
4
|
/**
|
|
5
5
|
* Details of parsing the date
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type DateInputSingleDetails = DateDetail;
|
|
8
8
|
/**
|
|
9
9
|
* Props for the DateInputSingle component.
|
|
10
10
|
* @template TDate - The type of the date object.
|
|
@@ -50,6 +50,6 @@ export interface DatePickerRangeProps<TDate extends DateFrameworkType> extends D
|
|
|
50
50
|
* Props for the DatePicker component.
|
|
51
51
|
* @template TDate - The type of the date object.
|
|
52
52
|
*/
|
|
53
|
-
export
|
|
53
|
+
export type DatePickerProps<TDate extends DateFrameworkType> = DatePickerSingleProps<TDate> | DatePickerRangeProps<TDate>;
|
|
54
54
|
export declare const DatePickerMain: import("react").ForwardRefExoticComponent<DatePickerProps<any> & import("react").RefAttributes<HTMLDivElement>>;
|
|
55
55
|
export declare const DatePicker: import("react").ForwardRefExoticComponent<DatePickerProps<unknown> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -33,7 +33,7 @@ export interface DatePickerActionsBaseProps extends ComponentPropsWithoutRef<"di
|
|
|
33
33
|
* Props for the DatePicker actions component.
|
|
34
34
|
* @template SelectionVariant - The selection variant, either "single" or "range".
|
|
35
35
|
*/
|
|
36
|
-
export
|
|
36
|
+
export type DatePickerActionsProps<TDate extends DateFrameworkType, SelectionVariant extends "single" | "range"> = SelectionVariant extends "single" ? DatePickerActionsBaseProps & {
|
|
37
37
|
/**
|
|
38
38
|
* The selection variant, set to "single".
|
|
39
39
|
*/
|
|
@@ -157,7 +157,7 @@ export interface RangeDatePickerState<TDate extends DateFrameworkType> extends D
|
|
|
157
157
|
/**
|
|
158
158
|
* Type representing the state of a date picker, either single or range.
|
|
159
159
|
*/
|
|
160
|
-
export
|
|
160
|
+
export type DatePickerState<TDate extends DateFrameworkType> = SingleDatePickerState<TDate> | RangeDatePickerState<TDate>;
|
|
161
161
|
/**
|
|
162
162
|
* Context for single date selection.
|
|
163
163
|
*/
|
|
@@ -2,7 +2,7 @@ import { type ElementProps, type FloatingContext, type OpenChangeReason as Float
|
|
|
2
2
|
import { useFloatingUI } from "@salt-ds/core";
|
|
3
3
|
import { type ReactNode } from "react";
|
|
4
4
|
/** Reason for overlay state change, can be a custom reason */
|
|
5
|
-
export
|
|
5
|
+
export type DatePickerOpenChangeReason = FloatingUIOpenChangeReason | "apply" | "cancel" | string;
|
|
6
6
|
/**
|
|
7
7
|
* Interface representing the state for a DatePicker overlay.
|
|
8
8
|
*/
|
|
@@ -7,7 +7,7 @@ import type { DatePickerPanelBaseProps } from "./DatePickerSingleGridPanel";
|
|
|
7
7
|
* Props for the DatePickerRangeGridPanel component.
|
|
8
8
|
* @template TDate - The type of the date object.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export type DatePickerRangeGridPanelProps<TDate extends DateFrameworkType> = DatePickerPanelBaseProps<TDate> & DateRangeSelection<TDate> & {
|
|
11
11
|
onSelectionChange?: (event: SyntheticEvent, selectedDate?: DateRangeSelection<TDate> | null) => void;
|
|
12
12
|
CalendarProps?: Partial<Omit<CalendarRangeProps<TDate>, "selectionVariant" | "selectedDate" | "defaultSelectedDate" | "onHoveredDateChange" | "onSelectionChange" | "onVisibleMonthChange">>;
|
|
13
13
|
};
|
|
@@ -55,7 +55,7 @@ export interface DatePickerPanelBaseProps<TDate extends DateFrameworkType> exten
|
|
|
55
55
|
*/
|
|
56
56
|
CalendarGridProps?: Partial<CalendarGridProps<TDate>>;
|
|
57
57
|
}
|
|
58
|
-
export
|
|
58
|
+
export type DatePickerSingleGridPanelProps<TDate extends DateFrameworkType> = DatePickerPanelBaseProps<TDate> & SingleDateSelection<TDate> & {
|
|
59
59
|
onSelectionChange?: (event: SyntheticEvent, selectedDate?: TDate | null) => void;
|
|
60
60
|
CalendarProps?: Partial<Omit<CalendarSingleProps<TDate>, "selectionVariant" | "selectedDate" | "defaultSelectedDate" | "onSelectionChange" | "onVisibleMonthChange">>;
|
|
61
61
|
};
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
* This component will be deleted when we move DatePickerSingleGridPanel from labs to core.
|
|
4
4
|
*/
|
|
5
5
|
export declare const DatePickerSinglePanel: import("react").ForwardRefExoticComponent<import("./DatePickerSingleGridPanel").DatePickerPanelBaseProps<unknown> & {
|
|
6
|
-
onSelectionChange?: ((event: import("react").SyntheticEvent
|
|
6
|
+
onSelectionChange?: ((event: import("react").SyntheticEvent, selectedDate?: unknown) => void) | undefined;
|
|
7
7
|
CalendarProps?: Partial<Omit<import("..").CalendarSingleProps<unknown>, "onSelectionChange" | "selectionVariant" | "selectedDate" | "defaultSelectedDate" | "onVisibleMonthChange">> | undefined;
|
|
8
8
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -112,7 +112,7 @@ export interface UseDatePickerRangeProps<TDate extends DateFrameworkType> extend
|
|
|
112
112
|
* @template TDate - The type of the date object.
|
|
113
113
|
* @template SelectionVariant - The selection variant, either "single" or "range".
|
|
114
114
|
*/
|
|
115
|
-
export
|
|
115
|
+
export type UseDatePickerProps<TDate extends DateFrameworkType, SelectionVariant> = SelectionVariant extends "single" ? UseDatePickerSingleProps<TDate> : SelectionVariant extends "range" ? UseDatePickerRangeProps<TDate> : never;
|
|
116
116
|
/**
|
|
117
117
|
* Custom hook for managing date picker state.
|
|
118
118
|
* @template TDate - The type of the date object.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type HTMLAttributes } from "react";
|
|
2
2
|
import { type DeckItemProps } from "../deck-item";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
3
|
+
export type LayoutAnimation = "slide" | "fade";
|
|
4
|
+
export type LayoutAnimationDirection = "horizontal" | "vertical";
|
|
5
|
+
export type LayoutAnimationTransition = "increase" | "decrease";
|
|
6
6
|
export interface DeckLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
7
7
|
/**
|
|
8
8
|
* The initial item to render.
|
|
@@ -5,6 +5,6 @@ import type { DropdownBaseProps } from "./dropdownTypes";
|
|
|
5
5
|
export interface DropdownProps<Item = string, Selection extends SelectionStrategy = "default"> extends DropdownBaseProps, Pick<ListProps<Item, Selection>, "ListItem" | "itemToString" | "source" | "width">, SelectionProps<Item, Selection> {
|
|
6
6
|
ListProps?: Omit<ListProps<Item, Selection>, "ListItem" | "itemToString" | "source">;
|
|
7
7
|
}
|
|
8
|
-
export declare const Dropdown: <Item,
|
|
9
|
-
ref?: ForwardedRef<HTMLDivElement
|
|
10
|
-
}) => ReactElement<DropdownProps<Item,
|
|
8
|
+
export declare const Dropdown: <Item, Selection extends SelectionStrategy = "default">(props: DropdownProps<Item, Selection> & {
|
|
9
|
+
ref?: ForwardedRef<HTMLDivElement>;
|
|
10
|
+
}) => ReactElement<DropdownProps<Item, Selection>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes, KeyboardEvent, ReactElement, RefObject } from "react";
|
|
2
2
|
import type { PortalProps } from "../portal";
|
|
3
|
-
export
|
|
3
|
+
export type DropdownPlacement = "bottom-start" | "bottom-end" | "top-start" | "top-end";
|
|
4
4
|
export interface DropdownBaseProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect">, Pick<PortalProps, "disablePortal" | "container"> {
|
|
5
5
|
defaultIsOpen?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
@@ -8,4 +8,4 @@ export interface DropdownListHookResult<Item, Selection extends SelectionStrateg
|
|
|
8
8
|
onOpenChange: any;
|
|
9
9
|
triggerLabel?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare const useDropdown: <Item,
|
|
11
|
+
export declare const useDropdown: <Item, Selection extends SelectionStrategy = "default">({ collectionHook, defaultHighlightedIndex: defaultHighlightedIndexProp, defaultIsOpen, defaultSelected, highlightedIndex: highlightedIndexProp, isOpen: isOpenProp, itemToString, onHighlight, onOpenChange, onSelectionChange, onSelect, selected, selectionStrategy, }: DropdownListHookProps<Item, Selection>) => DropdownListHookResult<Item, Selection>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type HTMLElementOrNull = HTMLElement | null;
|
|
2
2
|
/**
|
|
3
3
|
* Finds all the elements in the given root node that can be focused by a 'tab' keypress.
|
|
4
4
|
* In addition, the trap-start and trap-end sentinel nodes are excluded, and all contained shadow roots are walked recursively
|
|
@@ -4,9 +4,9 @@ import { type FormHelperTextProps } from "./FormHelperText";
|
|
|
4
4
|
import { type FormLabelProps } from "./FormLabel";
|
|
5
5
|
import type { NecessityIndicatorOptions } from "./NecessityIndicator";
|
|
6
6
|
import type { StatusIndicatorProps } from "./StatusIndicator";
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
7
|
+
export type FormFieldLabelPlacement = "top" | "left";
|
|
8
|
+
export type FormFieldHelperTextPlacement = "bottom" | "tooltip";
|
|
9
|
+
export type FormFieldValidationStatus = "error" | "warning";
|
|
10
10
|
export interface A11yValueProps extends Pick<NecessityIndicatorOptions, "required"> {
|
|
11
11
|
/**
|
|
12
12
|
* If `true`, the FormField will be disabled.
|
|
@@ -99,8 +99,8 @@ export interface useA11yValueValue {
|
|
|
99
99
|
readOnly: A11yValueProps["readOnly"];
|
|
100
100
|
}
|
|
101
101
|
export declare const useFormFieldLegacy: ({ onBlur, onFocus, }: {
|
|
102
|
-
onBlur?: FocusEventHandler<HTMLDivElement
|
|
103
|
-
onFocus?: FocusEventHandler<HTMLDivElement
|
|
102
|
+
onBlur?: FocusEventHandler<HTMLDivElement>;
|
|
103
|
+
onFocus?: FocusEventHandler<HTMLDivElement>;
|
|
104
104
|
}) => [{
|
|
105
105
|
focused: boolean;
|
|
106
106
|
}, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type TooltipProps } from "@salt-ds/core";
|
|
2
2
|
import type { IconProps } from "@salt-ds/icons";
|
|
3
3
|
import type { ElementType } from "react";
|
|
4
|
-
export
|
|
4
|
+
export type StatusIndicatorStatus = "error" | "info" | "warning" | "success";
|
|
5
5
|
export interface StatusIndicatorProps extends IconProps {
|
|
6
6
|
hasTooltip?: boolean;
|
|
7
7
|
IconProps?: Partial<IconProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type InputLegacyProps as InputProps } from "../input-legacy";
|
|
2
|
-
export
|
|
2
|
+
export type MaskFunction = (value: string | undefined) => boolean;
|
|
3
3
|
export interface RifmOptions {
|
|
4
4
|
format?: (str: string) => string;
|
|
5
5
|
replace?: (str: string) => string;
|
package/dist-types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type HTMLAttributes } from "react";
|
|
2
|
-
export
|
|
2
|
+
export type StaticInputAdornmentProps = HTMLAttributes<HTMLDivElement>;
|
|
3
3
|
export declare const StaticInputAdornment: import("react").ForwardRefExoticComponent<StaticInputAdornmentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Breakpoints, type ScrimProps } from "@salt-ds/core";
|
|
2
2
|
import { type HTMLAttributes } from "react";
|
|
3
3
|
export declare const LAYER_POSITIONS: readonly ["center", "left", "top", "right", "bottom"];
|
|
4
|
-
export
|
|
4
|
+
export type LayerPositions = (typeof LAYER_POSITIONS)[number];
|
|
5
5
|
export interface LayerLayoutProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
/**
|
|
7
7
|
* Disable the scrim.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ForwardedRef, type ReactElement } from "react";
|
|
2
2
|
import { type ScrollingAPI, type SelectionStrategy } from "../common-hooks";
|
|
3
3
|
import type { ListProps } from "./listTypes";
|
|
4
|
-
export declare const List: <Item = string,
|
|
5
|
-
ref?: ForwardedRef<ScrollingAPI<Item
|
|
6
|
-
}) => ReactElement<ListProps<Item,
|
|
4
|
+
export declare const List: <Item = string, Selection extends SelectionStrategy = "default">(props: ListProps<Item, Selection> & {
|
|
5
|
+
ref?: ForwardedRef<ScrollingAPI<Item>>;
|
|
6
|
+
}) => ReactElement<ListProps<Item, Selection>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type HTMLAttributes } from "react";
|
|
2
2
|
import type { ListItemType } from "./listTypes";
|
|
3
3
|
export declare const ListItemProxy: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
-
export declare const ListItem: ListItemType
|
|
4
|
+
export declare const ListItem: ListItemType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ForwardedRef, type ReactElement } from "react";
|
|
2
2
|
import { type SelectionStrategy } from "../common-hooks";
|
|
3
3
|
import type { ListProps } from "./listTypes";
|
|
4
|
-
export declare const VirtualizedList: <Item = string,
|
|
5
|
-
ref?: ForwardedRef<HTMLDivElement
|
|
6
|
-
}) => ReactElement<ListProps<Item,
|
|
4
|
+
export declare const VirtualizedList: <Item = string, Selection extends SelectionStrategy = "default">(props: ListProps<Item, Selection> & {
|
|
5
|
+
ref?: ForwardedRef<HTMLDivElement>;
|
|
6
|
+
}) => ReactElement<ListProps<Item, Selection>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FocusEventHandler, ForwardedRef, HTMLAttributes, KeyboardEvent, KeyboardEventHandler, MouseEventHandler, PropsWithChildren, ReactNode, Ref, RefObject } from "react";
|
|
2
2
|
import type { CollectionHookResult, CollectionItem, ListHandlers, NavigationHookResult, ScrollingAPI, SelectHandler, SelectionChangeHandler, SelectionHookResult, SelectionProps, SelectionStrategy, ViewportTrackingResult } from "../common-hooks";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ComponentType<T = unknown> = (props: PropsWithChildren<T>) => JSX.Element;
|
|
4
|
+
export type ListItemType<T = unknown> = ComponentType<ListItemProps<T> & {
|
|
5
5
|
ref?: Ref<HTMLDivElement>;
|
|
6
6
|
}>;
|
|
7
7
|
export interface ListItemProps<T = unknown> extends HTMLAttributes<HTMLDivElement> {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type SelectionStrategy } from "../common-hooks";
|
|
2
2
|
import type { ListHookProps, ListHookResult } from "./listTypes";
|
|
3
|
-
export declare const useList: <Item,
|
|
3
|
+
export declare const useList: <Item, Selection extends SelectionStrategy = "default">({ collapsibleHeaders, collectionHook: dataHook, containerRef, contentRef, defaultHighlightedIndex, defaultSelected, disabled, disableAriaActiveDescendant, disableHighlightOnFocus, disableTypeToSelect, highlightedIndex: highlightedIndexProp, label, listHandlers: listHandlersProp, onSelect, onSelectionChange, onHighlight, onKeyboardNavigation, onKeyDown, restoreLastFocus, selected, selectionStrategy, selectionKeys, stickyHeaders, tabToSelect, }: ListHookProps<Item, Selection>) => ListHookResult<Item, Selection>;
|
|
@@ -4,7 +4,7 @@ import type { CollectionItem } from "../common-hooks";
|
|
|
4
4
|
* [ item key, total height before the item, next row index, CollectionItem<Item>]
|
|
5
5
|
* e.g. first item: [0, 0, 1, data[0]]
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type Row<Item> = [number, number, number, CollectionItem<Item>];
|
|
8
8
|
interface VirtualizationHookProps<Item> {
|
|
9
9
|
viewportRef: RefObject<HTMLElement>;
|
|
10
10
|
data: CollectionItem<Item>[];
|
|
@@ -2,5 +2,5 @@ import { type ForwardedRef, type ReactElement } from "react";
|
|
|
2
2
|
import { type ListScrollHandles } from "./ListBase";
|
|
3
3
|
import type { ListProps, ListSelectionVariant } from "./ListProps";
|
|
4
4
|
export declare const List: <Item = string, Variant extends ListSelectionVariant = "default">(props: ListProps<Item, Variant> & {
|
|
5
|
-
ref?: ForwardedRef<ListScrollHandles<Item
|
|
6
|
-
}) => ReactElement<ListProps<Item, Variant
|
|
5
|
+
ref?: ForwardedRef<ListScrollHandles<Item>>;
|
|
6
|
+
}) => ReactElement<ListProps<Item, Variant>>;
|
|
@@ -22,5 +22,5 @@ export interface ListScrollHandles<Item> {
|
|
|
22
22
|
scrollTo: (scrollOffset: number) => void;
|
|
23
23
|
}
|
|
24
24
|
export declare const ListBase: <Item>(p: ListBaseProps<Item> & {
|
|
25
|
-
ref?: ForwardedRef<ListScrollHandles<Item
|
|
26
|
-
}) => ReactElement<ListBaseProps<Item
|
|
25
|
+
ref?: ForwardedRef<ListScrollHandles<Item>>;
|
|
26
|
+
}) => ReactElement<ListBaseProps<Item>>;
|
|
@@ -4,7 +4,7 @@ export interface ListItemProps<Item = string> extends Omit<ListItemBaseProps, "f
|
|
|
4
4
|
item?: Item;
|
|
5
5
|
itemToString?: (item: Item) => string;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
type GenericListItem = <Item = string>(p: ListItemProps<Item> & {
|
|
8
8
|
ref?: ForwardedRef<HTMLDivElement>;
|
|
9
9
|
}) => ReactElement<ListItemProps<Item>>;
|
|
10
10
|
declare const _ListItem: GenericListItem;
|
|
@@ -6,6 +6,6 @@ export interface ListItemContextProps<Item> {
|
|
|
6
6
|
itemToString: (item: Item) => string;
|
|
7
7
|
itemTextHighlightPattern?: RegExp | string;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type ListItemContextType<Item> = Context<ListItemContextProps<Item>>;
|
|
10
10
|
export declare const ListItemContext: Context<ListItemContextProps<unknown> | undefined>;
|
|
11
11
|
export declare const useListItemContext: <Item>() => ListItemContextProps<Item>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { HTMLAttributes, Ref, SyntheticEvent } from "react";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
2
|
+
export type ListSingleSelectionVariant = "default" | "deselectable";
|
|
3
|
+
export type ListMultiSelectionVariant = "multiple" | "extended";
|
|
4
|
+
export type ListSelectionVariant = ListSingleSelectionVariant | ListMultiSelectionVariant;
|
|
5
|
+
export type ListChangeHandler<Item = string, Variant extends ListSelectionVariant = "default"> = (event: SyntheticEvent, item: null | (Variant extends ListMultiSelectionVariant ? Array<Item> : Item)) => void;
|
|
6
|
+
export type ListSelectHandler<Item = string> = (event: SyntheticEvent, item: Item | null) => void;
|
|
7
7
|
export interface ListBaseProps<Item = string> extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "onSelect"> {
|
|
8
8
|
/**
|
|
9
9
|
* The component used for item instead of the default.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ItemToStringFunction = (item: any) => string;
|
|
2
2
|
export declare function itemToString(item: any): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ListChildComponentProps } from "react-window";
|
|
2
2
|
import type { ListItemProps } from "./ListItem";
|
|
3
3
|
import type { ListItemBaseProps } from "./ListItemBase";
|
|
4
|
-
|
|
4
|
+
type UseItemHookReturnType<Item> = {
|
|
5
5
|
/**
|
|
6
6
|
* Item data
|
|
7
7
|
*/
|
|
@@ -27,6 +27,6 @@ export interface IndexedListItemProps<Item> extends ListItemProps<Item> {
|
|
|
27
27
|
itemHeight?: number | string;
|
|
28
28
|
}
|
|
29
29
|
export declare function useListItem<Item>(props: IndexedListItemProps<Item>): UseItemHookReturnType<Item>;
|
|
30
|
-
|
|
30
|
+
type VirtualizedListItemProps = Pick<ListChildComponentProps, "index" | "style" | "data">;
|
|
31
31
|
export declare const useVirtualizedListItem: (props: VirtualizedListItemProps) => UseItemHookReturnType<any>;
|
|
32
32
|
export {};
|
|
@@ -41,11 +41,11 @@ export interface LocalizationProviderProps<TDate extends DateFrameworkType, TLoc
|
|
|
41
41
|
*/
|
|
42
42
|
maxDate?: TDate;
|
|
43
43
|
}
|
|
44
|
-
export
|
|
44
|
+
export type LocalizationProviderContext<TDate extends DateFrameworkType> = {
|
|
45
45
|
[K in keyof LocalizationProviderValue<TDate>]: LocalizationProviderValue<TDate>[K] | null;
|
|
46
46
|
};
|
|
47
47
|
export declare const LocalizationProviderContext: import("react").Context<LocalizationProviderValue<any> | null>;
|
|
48
|
-
export declare const LocalizationProvider: <TDate extends
|
|
48
|
+
export declare const LocalizationProvider: <TDate extends DateFrameworkType, TLocale>(props: LocalizationProviderProps<TDate, TLocale>) => import("react/jsx-runtime").JSX.Element;
|
|
49
49
|
/**
|
|
50
50
|
* Custom hook to access the localization context.
|
|
51
51
|
*
|
|
@@ -59,4 +59,4 @@ export declare const LocalizationProvider: <TDate extends unknown, TLocale>(prop
|
|
|
59
59
|
*
|
|
60
60
|
* @throws Will throw an error if the hook is used outside of a `LocalizationProviderContext.Provider`.
|
|
61
61
|
*/
|
|
62
|
-
export declare const useLocalization: <TDate extends
|
|
62
|
+
export declare const useLocalization: <TDate extends DateFrameworkType>() => LocalizationProviderValue<TDate>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
-
export
|
|
2
|
+
export type LogoProps = ComponentPropsWithoutRef<"span">;
|
|
3
3
|
export declare const Logo: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
-
export
|
|
2
|
+
export type LogoSeparatorProps = ComponentPropsWithoutRef<"span">;
|
|
3
3
|
export declare const LogoSeparator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|