@linzjs/lui 24.20.1 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/assets/svg-content.d.ts +7 -7
- package/dist/components/Drawer/Drawer.d.ts +45 -45
- package/dist/components/Drawer/DrawerContext.d.ts +6 -7
- package/dist/components/Drawer/DrawerGlobal.d.ts +12 -12
- package/dist/components/Drawer/DrawerGlobalContext.d.ts +14 -14
- package/dist/components/Drawer/utils.d.ts +7 -7
- package/dist/components/LuiAccordicard/LuiAccordicard.d.ts +9 -9
- package/dist/components/LuiAccordicardStatic/LuiAccordicardStatic.d.ts +9 -9
- package/dist/components/LuiAccordion/LuiAccordion.d.ts +12 -12
- package/dist/components/LuiBadge/LuiBadge.d.ts +12 -12
- package/dist/components/LuiBanner/LuiBanner.d.ts +10 -10
- package/dist/components/LuiBannerV2/LuiBannerV2.d.ts +22 -22
- package/dist/components/LuiBearingInput/LuiBearingInput.d.ts +16 -16
- package/dist/components/LuiButton/LuiButton.d.ts +44 -44
- package/dist/components/LuiColourPicker/ColorBucket.d.ts +6 -6
- package/dist/components/LuiColourPicker/ColorInput.d.ts +9 -9
- package/dist/components/LuiColourPicker/ColorPalette.d.ts +14 -14
- package/dist/components/LuiColourPicker/ColourPaletteConstants.d.ts +8 -8
- package/dist/components/LuiCommonInputProps.d.ts +5 -5
- package/dist/components/LuiCounter/LuiCounter.d.ts +8 -8
- package/dist/components/LuiError/LuiError.d.ts +8 -8
- package/dist/components/LuiErrorPage/LuiErrorIllustration.d.ts +5 -5
- package/dist/components/LuiErrorPage/LuiErrorPage.d.ts +9 -9
- package/dist/components/LuiErrorPanel/LuiErrorPanel.d.ts +23 -23
- package/dist/components/LuiExpandableBanner/LuiExpandableBanner.d.ts +19 -19
- package/dist/components/LuiFilterContainer/LuiFilterContainer.d.ts +14 -14
- package/dist/components/LuiFilterMenu/LuiFilterMenu.d.ts +16 -16
- package/dist/components/LuiFooter/LuiAppFooterSml.d.ts +13 -13
- package/dist/components/LuiFooter/LuiFooter.d.ts +12 -12
- package/dist/components/LuiFormElements/ClearableLuiTextInput/ClearableLuiTextInput.d.ts +14 -14
- package/dist/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.d.ts +16 -16
- package/dist/components/LuiFormElements/LuiComboSelect/LuiComboSelect.d.ts +27 -27
- package/dist/components/LuiFormElements/LuiDateInput/DateInput.d.ts +5 -5
- package/dist/components/LuiFormElements/LuiDateInput/DateInputHelper.d.ts +6 -6
- package/dist/components/LuiFormElements/LuiDateInput/FireDateChange.d.ts +1 -1
- package/dist/components/LuiFormElements/LuiDateInput/LuiDateInput.d.ts +5 -5
- package/dist/components/LuiFormElements/LuiFileInputBox/LuiFileInputBox.d.ts +36 -36
- package/dist/components/LuiFormElements/LuiMoneyInput/LuiMoneyInput.d.ts +28 -28
- package/dist/components/LuiFormElements/LuiRadioInput/LuiRadioInput.d.ts +15 -15
- package/dist/components/LuiFormElements/LuiSelectInput/LuiSelectInput.d.ts +20 -20
- package/dist/components/LuiFormElements/LuiTextAreaInput/LuiAutoExpandTextAreaInput.d.ts +3 -3
- package/dist/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.d.ts +12 -12
- package/dist/components/LuiFormElements/LuiTextInput/LuiTextInput.d.ts +23 -23
- package/dist/components/LuiForms/LuiFormSection/LuiFormSectionHeader.d.ts +7 -7
- package/dist/components/LuiForms/LuiFormSection/LuiHelpInfo/LuiHelpInfo.d.ts +6 -6
- package/dist/components/LuiHeader/LuiHeader.d.ts +72 -72
- package/dist/components/LuiHeaderMenu/LuiHeaderMenus.d.ts +51 -51
- package/dist/components/LuiHeaderMenuV2/LuiHeaderMenusV2.d.ts +87 -102
- package/dist/components/LuiHeaderV2/LuiHeaderV2.d.ts +103 -109
- package/dist/components/LuiIcon/LuiIcon.d.ts +35 -35
- package/dist/components/LuiListBox/LuiListBox.d.ts +59 -59
- package/dist/components/LuiListBox/LuiListBoxGroup.d.ts +10 -10
- package/dist/components/LuiListBox/LuiListBoxItem.d.ts +10 -10
- package/dist/components/LuiListBox/Renderers/CheckboxItemRenderer.d.ts +4 -4
- package/dist/components/LuiListBox/Renderers/RadioItemRenderer.d.ts +4 -4
- package/dist/components/LuiListBox/useLuiListBox.d.ts +3 -3
- package/dist/components/LuiLoadingSpinner/LuiLoadingSpinner.d.ts +16 -16
- package/dist/components/LuiLoadingSpinner/LuiLottieLight.d.ts +14 -14
- package/dist/components/LuiMenu/LuiMenu.d.ts +12 -12
- package/dist/components/LuiMenuTrigger/LuiMenuTrigger.d.ts +5 -5
- package/dist/components/LuiModal/LuiAlertModalV2.d.ts +7 -7
- package/dist/components/LuiModal/LuiModal.d.ts +40 -40
- package/dist/components/LuiModal/LuiModalContext.d.ts +6 -0
- package/dist/components/LuiModal/LuiModalV2.d.ts +36 -36
- package/dist/components/LuiMultiSwitch/LuiMultiSwitch.d.ts +23 -23
- package/dist/components/LuiMultiSwitch/LuiMultiSwitch.examples.d.ts +4 -4
- package/dist/components/LuiPagination/LuiPagination.d.ts +23 -23
- package/dist/components/LuiProgressBar/LuiProgressBar.d.ts +9 -9
- package/dist/components/LuiResizableLayout/LuiResizableLayout.d.ts +25 -25
- package/dist/components/LuiSearchBox/LuiSearchBox.d.ts +41 -41
- package/dist/components/LuiSearchInput/LuiPassiveSearchInput.d.ts +28 -28
- package/dist/components/LuiSearchInput/LuiSearchInput.d.ts +38 -38
- package/dist/components/LuiSearchInput/ResultsDisplay.d.ts +23 -23
- package/dist/components/LuiSelectMenu/LuiSelectDataMenu.d.ts +15 -15
- package/dist/components/LuiSelectMenu/LuiSelectMenu.d.ts +25 -25
- package/dist/components/LuiShadow/LuiShadow.d.ts +6 -6
- package/dist/components/LuiSideMenu/LuiSideMenu.d.ts +5 -5
- package/dist/components/LuiSideMenu/LuiSideMenuItem.d.ts +11 -11
- package/dist/components/LuiSidePanel/LuiSidePanel.d.ts +9 -9
- package/dist/components/LuiSidePanel/LuiSidePanelHelper.d.ts +7 -7
- package/dist/components/LuiSideToolbar/LuiSideToolbar.d.ts +11 -11
- package/dist/components/LuiSideToolbar/ToolbarButton.d.ts +21 -21
- package/dist/components/LuiSideToolbar/ToolbarIcon.d.ts +13 -13
- package/dist/components/LuiSideToolbar/ToolbarItem.d.ts +17 -17
- package/dist/components/LuiSplitButton/LuiSplitButton.d.ts +30 -30
- package/dist/components/LuiStaticMessage/LuiStaticMessage.d.ts +10 -10
- package/dist/components/LuiSwitchButton/LuiSwitchButton.d.ts +8 -8
- package/dist/components/LuiTabs/LuiTab/LuiTab.d.ts +13 -13
- package/dist/components/LuiTabs/LuiTabs.d.ts +10 -10
- package/dist/components/LuiTabs/LuiTabsGroup/LuiTabsGroup.d.ts +5 -5
- package/dist/components/LuiTabs/LuiTabsPanel/LuiTabsPanel.d.ts +8 -8
- package/dist/components/LuiTabs/LuiTabsPanelSwitch/LuiTabsPanelSwitch.d.ts +8 -8
- package/dist/components/LuiToastMessage/LuiToastMessage.d.ts +20 -20
- package/dist/components/LuiTooltip/LuiTooltip.d.ts +16 -16
- package/dist/components/LuiUpdateSplashModal/LuiUpdatesSplashModal.d.ts +27 -27
- package/dist/components/Splitter/Control/Control.d.ts +9 -9
- package/dist/components/Splitter/Control/ControlIcon.d.ts +7 -7
- package/dist/components/Splitter/Separator/Separator.d.ts +11 -11
- package/dist/components/Splitter/Splitter.d.ts +44 -44
- package/dist/components/Splitter/Stories/RangeAsPx.d.ts +9 -9
- package/dist/components/Splitter/Stories/Section.d.ts +5 -3
- package/dist/components/Splitter/helpers/clampSeparator.d.ts +10 -10
- package/dist/components/Splitter/helpers/dataBoundary.d.ts +18 -18
- package/dist/components/Splitter/helpers/getGridTemplate.d.ts +14 -14
- package/dist/components/Splitter/helpers/getKeyDownDeltaMove.d.ts +6 -7
- package/dist/components/Splitter/helpers/getSeparatorAttributes.d.ts +27 -27
- package/dist/components/Splitter/helpers/getSeparatorPosition.d.ts +7 -7
- package/dist/components/Splitter/helpers/transition.d.ts +5 -5
- package/dist/components/Splitter/helpers/useForkRef.d.ts +3 -4
- package/dist/components/Splitter/helpers/useMoveSeparator.d.ts +11 -11
- package/dist/components/Splitter/helpers/useShowSeparator.d.ts +7 -7
- package/dist/components/Splitter/helpers/useValueSeparator.d.ts +15 -15
- package/dist/components/Splitter/helpers/useValueSeparatorEffects.d.ts +5 -5
- package/dist/components/Splitter/useSplitterRef.d.ts +5 -5
- package/dist/components/Toast/Helpers/ToastSection.d.ts +9 -9
- package/dist/components/Toast/Helpers/ToastTypes.d.ts +35 -35
- package/dist/components/Toast/Helpers/getToastProviderEl.d.ts +15 -15
- package/dist/components/Toast/Helpers/toastUsage.d.ts +2 -2
- package/dist/components/Toast/Helpers/useToastState.d.ts +20 -21
- package/dist/components/Toast/ToastBanner.d.ts +6 -6
- package/dist/components/Toast/ToastProvider.d.ts +10 -10
- package/dist/components/Toast/Upgrade/LuiToastMessageCompatibleInterface.d.ts +5 -5
- package/dist/components/Toast/Upgrade/ToastVersion.d.ts +2 -3
- package/dist/components/Toast/Upgrade/index.d.ts +39 -39
- package/dist/components/Toast/Upgrade/observeOlderToasts.d.ts +6 -6
- package/dist/components/Toast/Upgrade/useShowLUIMessageCompatibleInterface.d.ts +5 -5
- package/dist/components/Toast/index.d.ts +2 -2
- package/dist/components/Toast/useToast.d.ts +43 -43
- package/dist/components/common/Hooks.d.ts +32 -32
- package/dist/components/common/ResponsiveUtils.d.ts +7 -7
- package/dist/components/common/StorybookSupport.d.ts +6 -6
- package/dist/components/common/UseMediaQuery.d.ts +9 -9
- package/dist/contexts/LuiFilterCharactersProvider.d.ts +12 -12
- package/dist/contexts/LuiMessagingContextProvider.d.ts +14 -14
- package/dist/fonts.d.ts +10 -10
- package/dist/functions/LinzFreeTextFilter.d.ts +14 -14
- package/dist/functions/LinzFreeTextValidator.d.ts +2 -2
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/useClickedOutsideElement.d.ts +14 -14
- package/dist/hooks/useDeprecatedWarning.d.ts +1 -1
- package/dist/index.d.ts +92 -92
- package/dist/index.js +10914 -9556
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +10914 -9556
- package/dist/lui.esm.js.map +1 -1
- package/package.json +73 -61
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface ILuiModal {
|
|
3
|
-
key?: string;
|
|
4
|
-
shouldCloseOnOverlayClick?: boolean;
|
|
5
|
-
shouldCloseOnEsc?: boolean | 'use-keyup';
|
|
6
|
-
onClose?: () => void;
|
|
7
|
-
className?: string;
|
|
8
|
-
maxWidth?: boolean;
|
|
9
|
-
headingText?: string;
|
|
10
|
-
helpLink?: string | (() => void);
|
|
11
|
-
lowContrast?: boolean;
|
|
12
|
-
preventAutoFocus?: boolean;
|
|
13
|
-
appendToElement?: () => HTMLElement;
|
|
14
|
-
headerStyle?: 'light' | 'default';
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated this is replaced by `LuiModalV2`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
18
|
-
*/
|
|
19
|
-
export declare const LuiModal: React.FC<React.PropsWithChildren<ILuiModal>>;
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated this is replaced by `LuiAlertModalV2`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
22
|
-
*/
|
|
23
|
-
export declare const LuiAlertModal: React.FC<React.PropsWithChildren<{
|
|
24
|
-
level: 'success' | 'info' | 'warning' | 'error';
|
|
25
|
-
} & ILuiModal>>;
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated this is replaced by `LuiModalV2.Buttons`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
28
|
-
*/
|
|
29
|
-
export declare const LuiAlertModalButtons: React.FC<React.PropsWithChildren<unknown>>;
|
|
30
|
-
interface IModalHeader {
|
|
31
|
-
headingText?: string;
|
|
32
|
-
helpLink?: string | (() => void);
|
|
33
|
-
onClose?: () => void;
|
|
34
|
-
style?: 'light' | 'default';
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated this is deprecated alongside `LuiModal`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
38
|
-
*/
|
|
39
|
-
export declare const LuiModalHeader: React.FC<React.PropsWithChildren<IModalHeader>>;
|
|
40
|
-
export {};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ILuiModal {
|
|
3
|
+
key?: string;
|
|
4
|
+
shouldCloseOnOverlayClick?: boolean;
|
|
5
|
+
shouldCloseOnEsc?: boolean | 'use-keyup';
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
maxWidth?: boolean;
|
|
9
|
+
headingText?: string;
|
|
10
|
+
helpLink?: string | (() => void);
|
|
11
|
+
lowContrast?: boolean;
|
|
12
|
+
preventAutoFocus?: boolean;
|
|
13
|
+
appendToElement?: () => HTMLElement;
|
|
14
|
+
headerStyle?: 'light' | 'default';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated this is replaced by `LuiModalV2`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
18
|
+
*/
|
|
19
|
+
export declare const LuiModal: React.FC<React.PropsWithChildren<ILuiModal>>;
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated this is replaced by `LuiAlertModalV2`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
22
|
+
*/
|
|
23
|
+
export declare const LuiAlertModal: React.FC<React.PropsWithChildren<{
|
|
24
|
+
level: 'success' | 'info' | 'warning' | 'error';
|
|
25
|
+
} & ILuiModal>>;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated this is replaced by `LuiModalV2.Buttons`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
28
|
+
*/
|
|
29
|
+
export declare const LuiAlertModalButtons: React.FC<React.PropsWithChildren<unknown>>;
|
|
30
|
+
interface IModalHeader {
|
|
31
|
+
headingText?: string;
|
|
32
|
+
helpLink?: string | (() => void);
|
|
33
|
+
onClose?: () => void;
|
|
34
|
+
style?: 'light' | 'default';
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated this is deprecated alongside `LuiModal`. [Migration notes](https://github.com/linz/Lui/pull/1127).
|
|
38
|
+
*/
|
|
39
|
+
export declare const LuiModalHeader: React.FC<React.PropsWithChildren<IModalHeader>>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
export declare function useShowLUIModal(): Dispatch<SetStateAction<((onClose: () => void) => JSX.Element) | undefined>>;
|
|
3
|
+
export declare const LuiModalContextProvider: (props: {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}) => React.JSX.Element;
|
|
6
|
+
export declare const LuiModalRenderer: () => React.JSX.Element;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { LuiIconProps } from '../LuiIcon/LuiIcon';
|
|
3
|
-
export type LuiModalV2Props = {
|
|
4
|
-
key?: string;
|
|
5
|
-
/** Default `true` */
|
|
6
|
-
shouldCloseOnOverlayClick?: boolean;
|
|
7
|
-
/** Default `true` */
|
|
8
|
-
shouldCloseOnEsc?: boolean | 'use-keyup';
|
|
9
|
-
onClose?: () => void | Promise<void>;
|
|
10
|
-
showCloseButton?: boolean;
|
|
11
|
-
className?: string;
|
|
12
|
-
/** If set to true, the modal will take the full screen width. Default `false` */
|
|
13
|
-
maxWidth?: boolean;
|
|
14
|
-
headingText?: string;
|
|
15
|
-
headingIcon?: LuiIconProps;
|
|
16
|
-
helpLink?: string | (() => void | Promise<void>);
|
|
17
|
-
isLoading?: boolean;
|
|
18
|
-
/** Sets the overlay to white. This is only to be used for situations when the user is working in a component and there is benefit to hiding the surrounding page. An example is editing types of instruments in the Dealings flow in LOL. */
|
|
19
|
-
lowContrast?: boolean;
|
|
20
|
-
/** By default, the modal autofocuses the first `input` or `button` inside it. Set this prop to `true` to disable that behaviour. Default `false`. This is kept from LuiModal "V1" for backwards compatibility. */
|
|
21
|
-
preventAutoFocus?: boolean;
|
|
22
|
-
/** By default, the modal portal will be appended to the document's body, but we might need to append it to another element. This is passed the React Modal `parentSelector` prop. */
|
|
23
|
-
appendToElement?: () => HTMLElement;
|
|
24
|
-
/** Sets the tab index of the modal container */
|
|
25
|
-
tabIndex?: number | null;
|
|
26
|
-
};
|
|
27
|
-
/** Implements the [updated modal design system](https://www.figma.com/design/E7g3n5ziI7bR8MisISayia/FigLUI?node-id=9924-54717&t=q2r6Gct1cKGP9Q5B-0), keeping the same api as `LuiModal` as much as possible. */
|
|
28
|
-
export declare const LuiModalV2: {
|
|
29
|
-
(props: PropsWithChildren<LuiModalV2Props>): React.JSX.Element;
|
|
30
|
-
Buttons: React.FC<React.PropsWithChildren<{
|
|
31
|
-
className?: string
|
|
32
|
-
}>>;
|
|
33
|
-
HeaderTitle: React.FC<React.PropsWithChildren<{
|
|
34
|
-
className?: string
|
|
35
|
-
}>>;
|
|
36
|
-
};
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { LuiIconProps } from '../LuiIcon/LuiIcon';
|
|
3
|
+
export type LuiModalV2Props = {
|
|
4
|
+
key?: string;
|
|
5
|
+
/** Default `true` */
|
|
6
|
+
shouldCloseOnOverlayClick?: boolean;
|
|
7
|
+
/** Default `true` */
|
|
8
|
+
shouldCloseOnEsc?: boolean | 'use-keyup';
|
|
9
|
+
onClose?: () => void | Promise<void>;
|
|
10
|
+
showCloseButton?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
/** If set to true, the modal will take the full screen width. Default `false` */
|
|
13
|
+
maxWidth?: boolean;
|
|
14
|
+
headingText?: string;
|
|
15
|
+
headingIcon?: LuiIconProps;
|
|
16
|
+
helpLink?: string | (() => void | Promise<void>);
|
|
17
|
+
isLoading?: boolean;
|
|
18
|
+
/** Sets the overlay to white. This is only to be used for situations when the user is working in a component and there is benefit to hiding the surrounding page. An example is editing types of instruments in the Dealings flow in LOL. */
|
|
19
|
+
lowContrast?: boolean;
|
|
20
|
+
/** By default, the modal autofocuses the first `input` or `button` inside it. Set this prop to `true` to disable that behaviour. Default `false`. This is kept from LuiModal "V1" for backwards compatibility. */
|
|
21
|
+
preventAutoFocus?: boolean;
|
|
22
|
+
/** By default, the modal portal will be appended to the document's body, but we might need to append it to another element. This is passed the React Modal `parentSelector` prop. */
|
|
23
|
+
appendToElement?: () => HTMLElement;
|
|
24
|
+
/** Sets the tab index of the modal container */
|
|
25
|
+
tabIndex?: number | null;
|
|
26
|
+
};
|
|
27
|
+
/** Implements the [updated modal design system](https://www.figma.com/design/E7g3n5ziI7bR8MisISayia/FigLUI?node-id=9924-54717&t=q2r6Gct1cKGP9Q5B-0), keeping the same api as `LuiModal` as much as possible. */
|
|
28
|
+
export declare const LuiModalV2: {
|
|
29
|
+
(props: PropsWithChildren<LuiModalV2Props>): React.JSX.Element;
|
|
30
|
+
Buttons: React.FC<React.PropsWithChildren<{
|
|
31
|
+
className?: string;
|
|
32
|
+
}>>;
|
|
33
|
+
HeaderTitle: React.FC<React.PropsWithChildren<{
|
|
34
|
+
className?: string;
|
|
35
|
+
}>>;
|
|
36
|
+
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import React, { ReactElement } from 'react';
|
|
2
|
-
export interface LuiMultiSwitchOption<ValueType> {
|
|
3
|
-
text: ReactElement | string;
|
|
4
|
-
value: ValueType;
|
|
5
|
-
shortcutKey?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const LuiMultiSwitchYesNo: LuiMultiSwitchOption<boolean>[];
|
|
10
|
-
export interface LuiMultiSwitchProps<ValueType> {
|
|
11
|
-
'data-testid'?: string;
|
|
12
|
-
className?: string;
|
|
13
|
-
defaultValue?: ValueType | null;
|
|
14
|
-
value?: ValueType | null;
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
autoFocus?: boolean;
|
|
17
|
-
options: LuiMultiSwitchOption<ValueType>[];
|
|
18
|
-
onChange: (value: ValueType) => Promise<boolean> | any;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Uncontrolled grouped button style component where component has single focus and associated keyboard events.
|
|
22
|
-
*/
|
|
23
|
-
export declare const LuiMultiSwitch: <ValueType>({ className, defaultValue, value, onChange, disabled, autoFocus, options, ...props }: LuiMultiSwitchProps<ValueType>) => React.JSX.Element;
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
export interface LuiMultiSwitchOption<ValueType> {
|
|
3
|
+
text: ReactElement | string;
|
|
4
|
+
value: ValueType;
|
|
5
|
+
shortcutKey?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const LuiMultiSwitchYesNo: LuiMultiSwitchOption<boolean>[];
|
|
10
|
+
export interface LuiMultiSwitchProps<ValueType> {
|
|
11
|
+
'data-testid'?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
defaultValue?: ValueType | null;
|
|
14
|
+
value?: ValueType | null;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
autoFocus?: boolean;
|
|
17
|
+
options: LuiMultiSwitchOption<ValueType>[];
|
|
18
|
+
onChange: (value: ValueType) => Promise<boolean> | any;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Uncontrolled grouped button style component where component has single focus and associated keyboard events.
|
|
22
|
+
*/
|
|
23
|
+
export declare const LuiMultiSwitch: <ValueType>({ className, defaultValue, value, onChange, disabled, autoFocus, options, ...props }: LuiMultiSwitchProps<ValueType>) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const Controlled: () => React.JSX.Element;
|
|
3
|
-
export declare const Uncontrolled: () => React.JSX.Element;
|
|
4
|
-
export declare const CustomValues: () => React.JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const Controlled: () => React.JSX.Element;
|
|
3
|
+
export declare const Uncontrolled: () => React.JSX.Element;
|
|
4
|
+
export declare const CustomValues: () => React.JSX.Element;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import './LuiPagination.scss';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
type PaginationProps = {
|
|
4
|
-
totalPages: number;
|
|
5
|
-
currentPage: number;
|
|
6
|
-
onPageChange: (page: number) => void;
|
|
7
|
-
isMobileLayout?: boolean | null;
|
|
8
|
-
animate?: boolean;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* @description Pagination component for navigating through a list of items with multiple pages.
|
|
12
|
-
* @param currentPage - The currently selected page.
|
|
13
|
-
* @param totalPages - The total number of pages.
|
|
14
|
-
* @param onPageChange - Callback function that is triggered when a new page is selected.
|
|
15
|
-
* It uses the selected page number as an argument.
|
|
16
|
-
* @param isMobileLayout - Optional prop to override the responsive layout.
|
|
17
|
-
* By default, the responsive layout will be used, which shows the full component
|
|
18
|
-
* when the components container is >= 500px, and a mobile layout when < 500px.
|
|
19
|
-
* @param animate - Optional prop to enable or disable the animation when navigating through pages.
|
|
20
|
-
* A panning animation is shown for number values between two ellipsis buttons.
|
|
21
|
-
*/
|
|
22
|
-
export declare const LuiPagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
export {};
|
|
1
|
+
import './LuiPagination.scss';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type PaginationProps = {
|
|
4
|
+
totalPages: number;
|
|
5
|
+
currentPage: number;
|
|
6
|
+
onPageChange: (page: number) => void;
|
|
7
|
+
isMobileLayout?: boolean | null;
|
|
8
|
+
animate?: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @description Pagination component for navigating through a list of items with multiple pages.
|
|
12
|
+
* @param currentPage - The currently selected page.
|
|
13
|
+
* @param totalPages - The total number of pages.
|
|
14
|
+
* @param onPageChange - Callback function that is triggered when a new page is selected.
|
|
15
|
+
* It uses the selected page number as an argument.
|
|
16
|
+
* @param isMobileLayout - Optional prop to override the responsive layout.
|
|
17
|
+
* By default, the responsive layout will be used, which shows the full component
|
|
18
|
+
* when the components container is >= 500px, and a mobile layout when < 500px.
|
|
19
|
+
* @param animate - Optional prop to enable or disable the animation when navigating through pages.
|
|
20
|
+
* A panning animation is shown for number values between two ellipsis buttons.
|
|
21
|
+
*/
|
|
22
|
+
export declare const LuiPagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import './LuiProgressBar.scss';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export type ProgressBarProps = {
|
|
4
|
-
value?: number;
|
|
5
|
-
max?: number;
|
|
6
|
-
error?: boolean;
|
|
7
|
-
barHeight?: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const LuiProgressBar: ({ value, max, error, barHeight, }: ProgressBarProps) => React.JSX.Element;
|
|
1
|
+
import './LuiProgressBar.scss';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export type ProgressBarProps = {
|
|
4
|
+
value?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
error?: boolean;
|
|
7
|
+
barHeight?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const LuiProgressBar: ({ value, max, error, barHeight, }: ProgressBarProps) => React.JSX.Element;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import React, { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { MinSizes } from 'split-grid';
|
|
3
|
-
import '../../scss/Components/LuiResizableLayout/LuiResizableLayout.scss';
|
|
4
|
-
export declare enum SplitPanelState {
|
|
5
|
-
OPEN = 0,
|
|
6
|
-
CLOSED_LEFT = 1,
|
|
7
|
-
CLOSED_RIGHT = 2
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated replaced by Splitter
|
|
11
|
-
*/
|
|
12
|
-
export declare const LuiResizableLayout: React.FC<{
|
|
13
|
-
givenLeftRef?: RefObject<HTMLDivElement>;
|
|
14
|
-
givenRightRef?: RefObject<HTMLDivElement>;
|
|
15
|
-
leftContentComponent?: ReactNode;
|
|
16
|
-
rightContentComponent?: ReactNode;
|
|
17
|
-
givenGridTemplateColumns?: string;
|
|
18
|
-
givenColumnMinSizes?: MinSizes;
|
|
19
|
-
givenColumnSnapOffset?: number;
|
|
20
|
-
callbackOnSplitStateChange?: (currentSplitState: SplitPanelState, leftWidth: number, rightWidth: number) => void;
|
|
21
|
-
callbackOnDraging?: (newColumnPosition: string) => void;
|
|
22
|
-
splitStateChecker?: (leftWidth: number, rightWidth: number) => SplitPanelState;
|
|
23
|
-
callbackOnClickLeftArrowButton?: (leftWidth: number, rightWidth: number) => void;
|
|
24
|
-
callbackOnClickRightArrowButton?: (leftWidth: number, rightWidth: number) => void;
|
|
25
|
-
}>;
|
|
1
|
+
import React, { ReactNode, RefObject } from 'react';
|
|
2
|
+
import { MinSizes } from 'split-grid';
|
|
3
|
+
import '../../scss/Components/LuiResizableLayout/LuiResizableLayout.scss';
|
|
4
|
+
export declare enum SplitPanelState {
|
|
5
|
+
OPEN = 0,
|
|
6
|
+
CLOSED_LEFT = 1,
|
|
7
|
+
CLOSED_RIGHT = 2
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated replaced by Splitter
|
|
11
|
+
*/
|
|
12
|
+
export declare const LuiResizableLayout: React.FC<{
|
|
13
|
+
givenLeftRef?: RefObject<HTMLDivElement>;
|
|
14
|
+
givenRightRef?: RefObject<HTMLDivElement>;
|
|
15
|
+
leftContentComponent?: ReactNode;
|
|
16
|
+
rightContentComponent?: ReactNode;
|
|
17
|
+
givenGridTemplateColumns?: string;
|
|
18
|
+
givenColumnMinSizes?: MinSizes;
|
|
19
|
+
givenColumnSnapOffset?: number;
|
|
20
|
+
callbackOnSplitStateChange?: (currentSplitState: SplitPanelState, leftWidth: number, rightWidth: number) => void;
|
|
21
|
+
callbackOnDraging?: (newColumnPosition: string) => void;
|
|
22
|
+
splitStateChecker?: (leftWidth: number, rightWidth: number) => SplitPanelState;
|
|
23
|
+
callbackOnClickLeftArrowButton?: (leftWidth: number, rightWidth: number) => void;
|
|
24
|
+
callbackOnClickRightArrowButton?: (leftWidth: number, rightWidth: number) => void;
|
|
25
|
+
}>;
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import React, { ReactElement } from 'react';
|
|
2
|
-
import { LuiButtonProps } from '../LuiButton/LuiButton';
|
|
3
|
-
import { ISearchGroupedResult, ISearchResult } from '../LuiSearchInput/ResultsDisplay';
|
|
4
|
-
import { InputValidationResult } from '../LuiSearchInput/LuiPassiveSearchInput';
|
|
5
|
-
export interface ISearchMenuOption {
|
|
6
|
-
name?: string;
|
|
7
|
-
groupTitle?: string | ReactElement;
|
|
8
|
-
groupDivider?: boolean;
|
|
9
|
-
value: string;
|
|
10
|
-
title: string;
|
|
11
|
-
placeholderText: string;
|
|
12
|
-
disclaimer?: string;
|
|
13
|
-
getOption: (input: any) => Promise<ISearchResult[] | ISearchGroupedResult[]>;
|
|
14
|
-
onSelectOption: (selectedOption: any) => void;
|
|
15
|
-
renderItem?: (item: any) => ReactElement;
|
|
16
|
-
icon?: ReactElement;
|
|
17
|
-
nestedIcon?: ReactElement;
|
|
18
|
-
columnBreak?: boolean;
|
|
19
|
-
onSearch?: (searchString: string) => void;
|
|
20
|
-
validateInput?: (input: string) => InputValidationResult | undefined;
|
|
21
|
-
customizedInput?: React.ReactElement;
|
|
22
|
-
hideDisclaimerOnFail?: boolean;
|
|
23
|
-
hideNoOptionsMessage?: boolean;
|
|
24
|
-
}
|
|
25
|
-
export interface ILuiSearchBoxProps {
|
|
26
|
-
searchBoxOptions: ISearchMenuOption[];
|
|
27
|
-
initOptionValue?: string;
|
|
28
|
-
onMenuSelect?: (e: Event) => void;
|
|
29
|
-
autoFocus?: boolean;
|
|
30
|
-
externalSearch?: boolean;
|
|
31
|
-
searchString?: string;
|
|
32
|
-
onClickInput?: () => void;
|
|
33
|
-
onClearInput?: () => void;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* LuiSearchBox is a search input with select menu.
|
|
37
|
-
* The options of the menu and input can be passed in as an array.
|
|
38
|
-
* See examples in SearchBox in storybook.
|
|
39
|
-
*/
|
|
40
|
-
export declare const LuiSearchBox: ({ searchBoxOptions, initOptionValue, onMenuSelect, autoFocus, externalSearch, searchString, onClickInput, onClearInput, }: ILuiSearchBoxProps) => React.JSX.Element;
|
|
41
|
-
export declare const LuiSearchBoxButton: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<LuiButtonProps>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import { LuiButtonProps } from '../LuiButton/LuiButton';
|
|
3
|
+
import { ISearchGroupedResult, ISearchResult } from '../LuiSearchInput/ResultsDisplay';
|
|
4
|
+
import { InputValidationResult } from '../LuiSearchInput/LuiPassiveSearchInput';
|
|
5
|
+
export interface ISearchMenuOption {
|
|
6
|
+
name?: string;
|
|
7
|
+
groupTitle?: string | ReactElement;
|
|
8
|
+
groupDivider?: boolean;
|
|
9
|
+
value: string;
|
|
10
|
+
title: string;
|
|
11
|
+
placeholderText: string;
|
|
12
|
+
disclaimer?: string;
|
|
13
|
+
getOption: (input: any) => Promise<ISearchResult[] | ISearchGroupedResult[]>;
|
|
14
|
+
onSelectOption: (selectedOption: any) => void;
|
|
15
|
+
renderItem?: (item: any) => ReactElement;
|
|
16
|
+
icon?: ReactElement;
|
|
17
|
+
nestedIcon?: ReactElement;
|
|
18
|
+
columnBreak?: boolean;
|
|
19
|
+
onSearch?: (searchString: string) => void;
|
|
20
|
+
validateInput?: (input: string) => InputValidationResult | undefined;
|
|
21
|
+
customizedInput?: React.ReactElement;
|
|
22
|
+
hideDisclaimerOnFail?: boolean;
|
|
23
|
+
hideNoOptionsMessage?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface ILuiSearchBoxProps {
|
|
26
|
+
searchBoxOptions: ISearchMenuOption[];
|
|
27
|
+
initOptionValue?: string;
|
|
28
|
+
onMenuSelect?: (e: Event) => void;
|
|
29
|
+
autoFocus?: boolean;
|
|
30
|
+
externalSearch?: boolean;
|
|
31
|
+
searchString?: string;
|
|
32
|
+
onClickInput?: () => void;
|
|
33
|
+
onClearInput?: () => void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* LuiSearchBox is a search input with select menu.
|
|
37
|
+
* The options of the menu and input can be passed in as an array.
|
|
38
|
+
* See examples in SearchBox in storybook.
|
|
39
|
+
*/
|
|
40
|
+
export declare const LuiSearchBox: ({ searchBoxOptions, initOptionValue, onMenuSelect, autoFocus, externalSearch, searchString, onClickInput, onClearInput, }: ILuiSearchBoxProps) => React.JSX.Element;
|
|
41
|
+
export declare const LuiSearchBoxButton: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<LuiButtonProps>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import 'react-loading-skeleton/dist/skeleton.css';
|
|
3
|
-
export interface InputValidationResult {
|
|
4
|
-
stopProgress: boolean;
|
|
5
|
-
userMessage?: React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
export interface IPassiveSearchInputProps {
|
|
8
|
-
minCharactersForSearch: number;
|
|
9
|
-
placeholderText: string;
|
|
10
|
-
onSearch: (searchString: string) => void;
|
|
11
|
-
disclaimer?: string;
|
|
12
|
-
initialValue?: string;
|
|
13
|
-
inputTransformer?: (input: string) => string;
|
|
14
|
-
focusUpdate?: boolean;
|
|
15
|
-
onClearCallback?: () => void;
|
|
16
|
-
onClickInput?: () => void;
|
|
17
|
-
validateInput?: (input: string) => InputValidationResult | undefined;
|
|
18
|
-
}
|
|
19
|
-
export declare const ControlledPassiveSearchInputComponent: (props: IPassiveSearchInputProps & {
|
|
20
|
-
typedValue: string;
|
|
21
|
-
setTypedValue: (value: string) => void;
|
|
22
|
-
}) => React.JSX.Element;
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated This was created for client to easily customize the passive input component.
|
|
25
|
-
* But that is hard to keep input memory to be consistent with other input components.
|
|
26
|
-
* Has extracted the controlled version and let LuiSearchInput to align the input value.
|
|
27
|
-
*/
|
|
28
|
-
export declare const LuiPassiveSearchInput: (props: React.PropsWithChildren<IPassiveSearchInputProps>) => React.JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'react-loading-skeleton/dist/skeleton.css';
|
|
3
|
+
export interface InputValidationResult {
|
|
4
|
+
stopProgress: boolean;
|
|
5
|
+
userMessage?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface IPassiveSearchInputProps {
|
|
8
|
+
minCharactersForSearch: number;
|
|
9
|
+
placeholderText: string;
|
|
10
|
+
onSearch: (searchString: string) => void;
|
|
11
|
+
disclaimer?: string;
|
|
12
|
+
initialValue?: string;
|
|
13
|
+
inputTransformer?: (input: string) => string;
|
|
14
|
+
focusUpdate?: boolean;
|
|
15
|
+
onClearCallback?: () => void;
|
|
16
|
+
onClickInput?: () => void;
|
|
17
|
+
validateInput?: (input: string) => InputValidationResult | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare const ControlledPassiveSearchInputComponent: (props: IPassiveSearchInputProps & {
|
|
20
|
+
typedValue: string;
|
|
21
|
+
setTypedValue: (value: string) => void;
|
|
22
|
+
}) => React.JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated This was created for client to easily customize the passive input component.
|
|
25
|
+
* But that is hard to keep input memory to be consistent with other input components.
|
|
26
|
+
* Has extracted the controlled version and let LuiSearchInput to align the input value.
|
|
27
|
+
*/
|
|
28
|
+
export declare const LuiPassiveSearchInput: (props: React.PropsWithChildren<IPassiveSearchInputProps>) => React.JSX.Element;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import React, { ReactElement } from 'react';
|
|
2
|
-
import 'react-loading-skeleton/dist/skeleton.css';
|
|
3
|
-
import { ISearchGroupedResult, ISearchResult } from './ResultsDisplay';
|
|
4
|
-
import { InputValidationResult } from './LuiPassiveSearchInput';
|
|
5
|
-
export interface ISearchInputProps<SearchResult extends ISearchResult = ISearchResult> {
|
|
6
|
-
minCharactersForSearch: number;
|
|
7
|
-
placeholderText: string;
|
|
8
|
-
onSelectOption: (selectedOption: SearchResult) => void;
|
|
9
|
-
getOptions: (inputValue: string) => Promise<SearchResult[] | ISearchGroupedResult<SearchResult>[]>;
|
|
10
|
-
renderItem: (item: SearchResult) => ReactElement;
|
|
11
|
-
disclaimer?: string;
|
|
12
|
-
initialValue?: string;
|
|
13
|
-
inputTransformer?: (input: string) => string;
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated This property will no longer be used to display a name in the message when no result found
|
|
16
|
-
*/
|
|
17
|
-
name?: string;
|
|
18
|
-
focusUpdate?: boolean;
|
|
19
|
-
onClearCallback?: () => void;
|
|
20
|
-
onClickInput?: () => void;
|
|
21
|
-
externalSearch?: boolean;
|
|
22
|
-
onSearch?: (searchString: string) => void;
|
|
23
|
-
validateInput?: (input: string) => InputValidationResult | undefined;
|
|
24
|
-
hideDisclaimerOnFail?: boolean;
|
|
25
|
-
hideNoOptionsMessage?: boolean;
|
|
26
|
-
noOptionsMessage?: string;
|
|
27
|
-
hideSearchIcon?: boolean;
|
|
28
|
-
filterElement?: ReactElement;
|
|
29
|
-
trimBeforeMinCharCheck?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* When true, clicking the clear (X) icon will NOT clear the internal input
|
|
32
|
-
* value or results – it will only call onClearCallback().
|
|
33
|
-
* Useful when parent wants to treat clear as "navigation" and control
|
|
34
|
-
* when the text actually disappears (e.g. unsaved changes flows).
|
|
35
|
-
*/
|
|
36
|
-
isClearable?: boolean;
|
|
37
|
-
}
|
|
38
|
-
export declare const LuiSearchInput: <SearchResult extends ISearchResult = ISearchResult>(props: React.PropsWithChildren<ISearchInputProps<SearchResult>>) => React.JSX.Element;
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import 'react-loading-skeleton/dist/skeleton.css';
|
|
3
|
+
import { ISearchGroupedResult, ISearchResult } from './ResultsDisplay';
|
|
4
|
+
import { InputValidationResult } from './LuiPassiveSearchInput';
|
|
5
|
+
export interface ISearchInputProps<SearchResult extends ISearchResult = ISearchResult> {
|
|
6
|
+
minCharactersForSearch: number;
|
|
7
|
+
placeholderText: string;
|
|
8
|
+
onSelectOption: (selectedOption: SearchResult) => void;
|
|
9
|
+
getOptions: (inputValue: string) => Promise<SearchResult[] | ISearchGroupedResult<SearchResult>[]>;
|
|
10
|
+
renderItem: (item: SearchResult) => ReactElement;
|
|
11
|
+
disclaimer?: string;
|
|
12
|
+
initialValue?: string;
|
|
13
|
+
inputTransformer?: (input: string) => string;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated This property will no longer be used to display a name in the message when no result found
|
|
16
|
+
*/
|
|
17
|
+
name?: string;
|
|
18
|
+
focusUpdate?: boolean;
|
|
19
|
+
onClearCallback?: () => void;
|
|
20
|
+
onClickInput?: () => void;
|
|
21
|
+
externalSearch?: boolean;
|
|
22
|
+
onSearch?: (searchString: string) => void;
|
|
23
|
+
validateInput?: (input: string) => InputValidationResult | undefined;
|
|
24
|
+
hideDisclaimerOnFail?: boolean;
|
|
25
|
+
hideNoOptionsMessage?: boolean;
|
|
26
|
+
noOptionsMessage?: string;
|
|
27
|
+
hideSearchIcon?: boolean;
|
|
28
|
+
filterElement?: ReactElement;
|
|
29
|
+
trimBeforeMinCharCheck?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* When true, clicking the clear (X) icon will NOT clear the internal input
|
|
32
|
+
* value or results – it will only call onClearCallback().
|
|
33
|
+
* Useful when parent wants to treat clear as "navigation" and control
|
|
34
|
+
* when the text actually disappears (e.g. unsaved changes flows).
|
|
35
|
+
*/
|
|
36
|
+
isClearable?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export declare const LuiSearchInput: <SearchResult extends ISearchResult = ISearchResult>(props: React.PropsWithChildren<ISearchInputProps<SearchResult>>) => React.JSX.Element;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import React, { ReactElement, RefObject } from 'react';
|
|
2
|
-
export interface ISearchResult {
|
|
3
|
-
id: string;
|
|
4
|
-
description: string;
|
|
5
|
-
}
|
|
6
|
-
export interface ISearchGroupedResult<SearchResult extends ISearchResult = ISearchResult> {
|
|
7
|
-
id: string;
|
|
8
|
-
description: string;
|
|
9
|
-
label: React.ReactNode;
|
|
10
|
-
items: SearchResult[];
|
|
11
|
-
}
|
|
12
|
-
export interface IResultsProps<SearchResult extends ISearchResult = ISearchResult> {
|
|
13
|
-
selectedId: string;
|
|
14
|
-
isLoading: boolean;
|
|
15
|
-
onClick: (id: string) => void;
|
|
16
|
-
setSelectedId: (id: string) => void;
|
|
17
|
-
renderItem: (item: SearchResult) => ReactElement;
|
|
18
|
-
results: SearchResult[] | ISearchGroupedResult<SearchResult>[];
|
|
19
|
-
selectedRef: RefObject<HTMLDivElement | null>;
|
|
20
|
-
}
|
|
21
|
-
export declare function isGroupedResult<SearchResult extends ISearchResult = ISearchResult>(result: SearchResult[] | ISearchGroupedResult<SearchResult>[]): result is ISearchGroupedResult<SearchResult>[];
|
|
22
|
-
declare const ResultsDisplay: <SearchResults extends ISearchResult = ISearchResult>({ isLoading, onClick, children, selectedId, selectedRef, setSelectedId, results, renderItem, }: React.PropsWithChildren<IResultsProps<SearchResults>>) => ReactElement;
|
|
23
|
-
export default ResultsDisplay;
|
|
1
|
+
import React, { ReactElement, RefObject } from 'react';
|
|
2
|
+
export interface ISearchResult {
|
|
3
|
+
id: string;
|
|
4
|
+
description: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ISearchGroupedResult<SearchResult extends ISearchResult = ISearchResult> {
|
|
7
|
+
id: string;
|
|
8
|
+
description: string;
|
|
9
|
+
label: React.ReactNode;
|
|
10
|
+
items: SearchResult[];
|
|
11
|
+
}
|
|
12
|
+
export interface IResultsProps<SearchResult extends ISearchResult = ISearchResult> {
|
|
13
|
+
selectedId: string;
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
onClick: (id: string) => void;
|
|
16
|
+
setSelectedId: (id: string) => void;
|
|
17
|
+
renderItem: (item: SearchResult) => ReactElement;
|
|
18
|
+
results: SearchResult[] | ISearchGroupedResult<SearchResult>[];
|
|
19
|
+
selectedRef: RefObject<HTMLDivElement | null>;
|
|
20
|
+
}
|
|
21
|
+
export declare function isGroupedResult<SearchResult extends ISearchResult = ISearchResult>(result: SearchResult[] | ISearchGroupedResult<SearchResult>[]): result is ISearchGroupedResult<SearchResult>[];
|
|
22
|
+
declare const ResultsDisplay: <SearchResults extends ISearchResult = ISearchResult>({ isLoading, onClick, children, selectedId, selectedRef, setSelectedId, results, renderItem, }: React.PropsWithChildren<IResultsProps<SearchResults>>) => ReactElement;
|
|
23
|
+
export default ResultsDisplay;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { MenuHeaderProps } from '@szhsin/react-menu';
|
|
2
|
-
import React, { ReactElement } from 'react';
|
|
3
|
-
export type MenuItemType = {
|
|
4
|
-
[key: string]: any;
|
|
5
|
-
};
|
|
6
|
-
export type MenuItemGroupType = {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
|
-
export interface ILuiSelectMenuProps {
|
|
10
|
-
items: (MenuItemType | MenuItemGroupType)[];
|
|
11
|
-
menuButton: ReactElement;
|
|
12
|
-
}
|
|
13
|
-
export declare const LuiSelectDataMenu: ({ ...props }: ILuiSelectMenuProps) => React.JSX.Element;
|
|
14
|
-
export declare const LuiSelectMenuDivider: () => React.JSX.Element;
|
|
15
|
-
export declare const LuiSelectMenuHeader: (props: MenuHeaderProps) => React.JSX.Element;
|
|
1
|
+
import { MenuHeaderProps } from '@szhsin/react-menu';
|
|
2
|
+
import React, { ReactElement } from 'react';
|
|
3
|
+
export type MenuItemType = {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
export type MenuItemGroupType = {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
export interface ILuiSelectMenuProps {
|
|
10
|
+
items: (MenuItemType | MenuItemGroupType)[];
|
|
11
|
+
menuButton: ReactElement;
|
|
12
|
+
}
|
|
13
|
+
export declare const LuiSelectDataMenu: ({ ...props }: ILuiSelectMenuProps) => React.JSX.Element;
|
|
14
|
+
export declare const LuiSelectMenuDivider: () => React.JSX.Element;
|
|
15
|
+
export declare const LuiSelectMenuHeader: (props: MenuHeaderProps) => React.JSX.Element;
|