@linzjs/lui 24.20.1 → 26.1.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.
Files changed (148) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/assets/svg-content.d.ts +7 -7
  3. package/dist/components/Drawer/Drawer.d.ts +45 -45
  4. package/dist/components/Drawer/DrawerContext.d.ts +6 -7
  5. package/dist/components/Drawer/DrawerGlobal.d.ts +12 -12
  6. package/dist/components/Drawer/DrawerGlobalContext.d.ts +14 -14
  7. package/dist/components/Drawer/utils.d.ts +7 -7
  8. package/dist/components/LuiAccordicard/LuiAccordicard.d.ts +9 -9
  9. package/dist/components/LuiAccordicardStatic/LuiAccordicardStatic.d.ts +9 -9
  10. package/dist/components/LuiAccordion/LuiAccordion.d.ts +12 -12
  11. package/dist/components/LuiBadge/LuiBadge.d.ts +12 -12
  12. package/dist/components/LuiBanner/LuiBanner.d.ts +10 -10
  13. package/dist/components/LuiBannerV2/LuiBannerV2.d.ts +22 -22
  14. package/dist/components/LuiBearingInput/LuiBearingInput.d.ts +16 -16
  15. package/dist/components/LuiButton/LuiButton.d.ts +44 -44
  16. package/dist/components/LuiColourPicker/ColorBucket.d.ts +6 -6
  17. package/dist/components/LuiColourPicker/ColorInput.d.ts +9 -9
  18. package/dist/components/LuiColourPicker/ColorPalette.d.ts +14 -14
  19. package/dist/components/LuiColourPicker/ColourPaletteConstants.d.ts +8 -8
  20. package/dist/components/LuiCommonInputProps.d.ts +5 -5
  21. package/dist/components/LuiCounter/LuiCounter.d.ts +8 -8
  22. package/dist/components/LuiError/LuiError.d.ts +8 -8
  23. package/dist/components/LuiErrorPage/LuiErrorIllustration.d.ts +5 -5
  24. package/dist/components/LuiErrorPage/LuiErrorPage.d.ts +9 -9
  25. package/dist/components/LuiErrorPanel/LuiErrorPanel.d.ts +23 -23
  26. package/dist/components/LuiExpandableBanner/LuiExpandableBanner.d.ts +19 -19
  27. package/dist/components/LuiFilterContainer/LuiFilterContainer.d.ts +14 -14
  28. package/dist/components/LuiFilterMenu/LuiFilterMenu.d.ts +16 -16
  29. package/dist/components/LuiFooter/LuiAppFooterSml.d.ts +13 -13
  30. package/dist/components/LuiFooter/LuiFooter.d.ts +12 -12
  31. package/dist/components/LuiFormElements/ClearableLuiTextInput/ClearableLuiTextInput.d.ts +14 -14
  32. package/dist/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.d.ts +16 -16
  33. package/dist/components/LuiFormElements/LuiComboSelect/LuiComboSelect.d.ts +27 -27
  34. package/dist/components/LuiFormElements/LuiDateInput/DateInput.d.ts +5 -5
  35. package/dist/components/LuiFormElements/LuiDateInput/DateInputHelper.d.ts +6 -6
  36. package/dist/components/LuiFormElements/LuiDateInput/FireDateChange.d.ts +1 -1
  37. package/dist/components/LuiFormElements/LuiDateInput/LuiDateInput.d.ts +5 -5
  38. package/dist/components/LuiFormElements/LuiFileInputBox/LuiFileInputBox.d.ts +36 -36
  39. package/dist/components/LuiFormElements/LuiMoneyInput/LuiMoneyInput.d.ts +28 -28
  40. package/dist/components/LuiFormElements/LuiRadioInput/LuiRadioInput.d.ts +15 -15
  41. package/dist/components/LuiFormElements/LuiSelectInput/LuiSelectInput.d.ts +20 -20
  42. package/dist/components/LuiFormElements/LuiTextAreaInput/LuiAutoExpandTextAreaInput.d.ts +3 -3
  43. package/dist/components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput.d.ts +12 -12
  44. package/dist/components/LuiFormElements/LuiTextInput/LuiTextInput.d.ts +23 -23
  45. package/dist/components/LuiForms/LuiFormSection/LuiFormSectionHeader.d.ts +7 -7
  46. package/dist/components/LuiForms/LuiFormSection/LuiHelpInfo/LuiHelpInfo.d.ts +6 -6
  47. package/dist/components/LuiHeader/LuiHeader.d.ts +72 -72
  48. package/dist/components/LuiHeaderMenu/LuiHeaderMenus.d.ts +51 -51
  49. package/dist/components/LuiHeaderMenuV2/LuiHeaderMenusV2.d.ts +87 -102
  50. package/dist/components/LuiHeaderV2/LuiHeaderV2.d.ts +103 -109
  51. package/dist/components/LuiIcon/LuiIcon.d.ts +35 -35
  52. package/dist/components/LuiListBox/LuiListBox.d.ts +59 -59
  53. package/dist/components/LuiListBox/LuiListBoxGroup.d.ts +10 -10
  54. package/dist/components/LuiListBox/LuiListBoxItem.d.ts +10 -10
  55. package/dist/components/LuiListBox/Renderers/CheckboxItemRenderer.d.ts +4 -4
  56. package/dist/components/LuiListBox/Renderers/RadioItemRenderer.d.ts +4 -4
  57. package/dist/components/LuiListBox/useLuiListBox.d.ts +3 -3
  58. package/dist/components/LuiLoadingSpinner/LuiLoadingSpinner.d.ts +16 -16
  59. package/dist/components/LuiLoadingSpinner/LuiLottieLight.d.ts +14 -14
  60. package/dist/components/LuiMenu/LuiMenu.d.ts +12 -12
  61. package/dist/components/LuiMenuTrigger/LuiMenuTrigger.d.ts +5 -5
  62. package/dist/components/LuiModal/LuiAlertModalV2.d.ts +7 -7
  63. package/dist/components/LuiModal/LuiModal.d.ts +40 -40
  64. package/dist/components/LuiModal/LuiModalContext.d.ts +6 -0
  65. package/dist/components/LuiModal/LuiModalV2.d.ts +36 -36
  66. package/dist/components/LuiMultiSwitch/LuiMultiSwitch.d.ts +23 -23
  67. package/dist/components/LuiMultiSwitch/LuiMultiSwitch.examples.d.ts +4 -4
  68. package/dist/components/LuiPagination/LuiPagination.d.ts +23 -23
  69. package/dist/components/LuiProgressBar/LuiProgressBar.d.ts +9 -9
  70. package/dist/components/LuiResizableLayout/LuiResizableLayout.d.ts +25 -25
  71. package/dist/components/LuiSearchBox/LuiSearchBox.d.ts +41 -41
  72. package/dist/components/LuiSearchInput/LuiPassiveSearchInput.d.ts +28 -28
  73. package/dist/components/LuiSearchInput/LuiSearchInput.d.ts +38 -38
  74. package/dist/components/LuiSearchInput/ResultsDisplay.d.ts +23 -23
  75. package/dist/components/LuiSelectMenu/LuiSelectDataMenu.d.ts +15 -15
  76. package/dist/components/LuiSelectMenu/LuiSelectMenu.d.ts +25 -25
  77. package/dist/components/LuiShadow/LuiShadow.d.ts +6 -6
  78. package/dist/components/LuiSideMenu/LuiSideMenu.d.ts +5 -5
  79. package/dist/components/LuiSideMenu/LuiSideMenuItem.d.ts +11 -11
  80. package/dist/components/LuiSidePanel/LuiSidePanel.d.ts +9 -9
  81. package/dist/components/LuiSidePanel/LuiSidePanelHelper.d.ts +7 -7
  82. package/dist/components/LuiSideToolbar/LuiSideToolbar.d.ts +11 -11
  83. package/dist/components/LuiSideToolbar/ToolbarButton.d.ts +21 -21
  84. package/dist/components/LuiSideToolbar/ToolbarIcon.d.ts +13 -13
  85. package/dist/components/LuiSideToolbar/ToolbarItem.d.ts +17 -17
  86. package/dist/components/LuiSplitButton/LuiSplitButton.d.ts +30 -30
  87. package/dist/components/LuiStaticMessage/LuiStaticMessage.d.ts +10 -10
  88. package/dist/components/LuiSwitchButton/LuiSwitchButton.d.ts +8 -8
  89. package/dist/components/LuiTabs/LuiTab/LuiTab.d.ts +13 -13
  90. package/dist/components/LuiTabs/LuiTabs.d.ts +10 -10
  91. package/dist/components/LuiTabs/LuiTabsGroup/LuiTabsGroup.d.ts +5 -5
  92. package/dist/components/LuiTabs/LuiTabsPanel/LuiTabsPanel.d.ts +8 -8
  93. package/dist/components/LuiTabs/LuiTabsPanelSwitch/LuiTabsPanelSwitch.d.ts +8 -8
  94. package/dist/components/LuiToastMessage/LuiToastMessage.d.ts +20 -20
  95. package/dist/components/LuiTooltip/LuiTooltip.d.ts +16 -16
  96. package/dist/components/LuiUpdateSplashModal/LuiUpdatesSplashModal.d.ts +27 -27
  97. package/dist/components/Splitter/Control/Control.d.ts +9 -9
  98. package/dist/components/Splitter/Control/ControlIcon.d.ts +7 -7
  99. package/dist/components/Splitter/Separator/Separator.d.ts +11 -11
  100. package/dist/components/Splitter/Splitter.d.ts +44 -44
  101. package/dist/components/Splitter/Stories/RangeAsPx.d.ts +9 -9
  102. package/dist/components/Splitter/Stories/Section.d.ts +5 -3
  103. package/dist/components/Splitter/helpers/clampSeparator.d.ts +10 -10
  104. package/dist/components/Splitter/helpers/dataBoundary.d.ts +18 -18
  105. package/dist/components/Splitter/helpers/getGridTemplate.d.ts +14 -14
  106. package/dist/components/Splitter/helpers/getKeyDownDeltaMove.d.ts +6 -7
  107. package/dist/components/Splitter/helpers/getSeparatorAttributes.d.ts +27 -27
  108. package/dist/components/Splitter/helpers/getSeparatorPosition.d.ts +7 -7
  109. package/dist/components/Splitter/helpers/transition.d.ts +5 -5
  110. package/dist/components/Splitter/helpers/useForkRef.d.ts +3 -4
  111. package/dist/components/Splitter/helpers/useMoveSeparator.d.ts +11 -11
  112. package/dist/components/Splitter/helpers/useShowSeparator.d.ts +7 -7
  113. package/dist/components/Splitter/helpers/useValueSeparator.d.ts +15 -15
  114. package/dist/components/Splitter/helpers/useValueSeparatorEffects.d.ts +5 -5
  115. package/dist/components/Splitter/useSplitterRef.d.ts +5 -5
  116. package/dist/components/Toast/Helpers/ToastSection.d.ts +9 -9
  117. package/dist/components/Toast/Helpers/ToastTypes.d.ts +35 -35
  118. package/dist/components/Toast/Helpers/getToastProviderEl.d.ts +15 -15
  119. package/dist/components/Toast/Helpers/toastUsage.d.ts +2 -2
  120. package/dist/components/Toast/Helpers/useToastState.d.ts +20 -21
  121. package/dist/components/Toast/ToastBanner.d.ts +6 -6
  122. package/dist/components/Toast/ToastProvider.d.ts +10 -10
  123. package/dist/components/Toast/Upgrade/LuiToastMessageCompatibleInterface.d.ts +5 -5
  124. package/dist/components/Toast/Upgrade/ToastVersion.d.ts +2 -3
  125. package/dist/components/Toast/Upgrade/index.d.ts +39 -39
  126. package/dist/components/Toast/Upgrade/observeOlderToasts.d.ts +6 -6
  127. package/dist/components/Toast/Upgrade/useShowLUIMessageCompatibleInterface.d.ts +5 -5
  128. package/dist/components/Toast/index.d.ts +2 -2
  129. package/dist/components/Toast/useToast.d.ts +43 -43
  130. package/dist/components/common/Hooks.d.ts +32 -32
  131. package/dist/components/common/ResponsiveUtils.d.ts +7 -7
  132. package/dist/components/common/StorybookSupport.d.ts +6 -6
  133. package/dist/components/common/UseMediaQuery.d.ts +9 -9
  134. package/dist/contexts/LuiFilterCharactersProvider.d.ts +12 -12
  135. package/dist/contexts/LuiMessagingContextProvider.d.ts +14 -14
  136. package/dist/fonts.d.ts +10 -10
  137. package/dist/functions/LinzFreeTextFilter.d.ts +14 -14
  138. package/dist/functions/LinzFreeTextValidator.d.ts +2 -2
  139. package/dist/hooks/index.d.ts +1 -1
  140. package/dist/hooks/useClickedOutsideElement.d.ts +14 -14
  141. package/dist/hooks/useDeprecatedWarning.d.ts +1 -1
  142. package/dist/index.d.ts +92 -92
  143. package/dist/index.js +10917 -9559
  144. package/dist/index.js.map +1 -1
  145. package/dist/lui.esm.js +10917 -9559
  146. package/dist/lui.esm.js.map +1 -1
  147. package/dist/scss/Components/LuiSwitchButton/LuiSwitchButton.scss +1 -0
  148. package/package.json +73 -61
@@ -1,15 +1,15 @@
1
- import { ChangeEventHandler, InputHTMLAttributes, JSX } from 'react';
2
- export interface LuiRadioProps {
3
- onChange: ChangeEventHandler<HTMLInputElement>;
4
- selectedValue: string;
5
- options: string[];
6
- legend?: JSX.Element | string;
7
- error?: string;
8
- warning?: string;
9
- warningOnIndividual?: string;
10
- isOptionDisabled?: (index: number) => boolean;
11
- optionHasWarning?: (index: number) => boolean;
12
- inputProps?: InputHTMLAttributes<HTMLInputElement>;
13
- renderLabelFor?: (value: string) => JSX.Element;
14
- }
15
- export declare const LuiRadioInput: (props: LuiRadioProps) => JSX.Element;
1
+ import { ChangeEventHandler, InputHTMLAttributes, JSX } from 'react';
2
+ export interface LuiRadioProps {
3
+ onChange: ChangeEventHandler<HTMLInputElement>;
4
+ selectedValue: string;
5
+ options: string[];
6
+ legend?: JSX.Element | string;
7
+ error?: string;
8
+ warning?: string;
9
+ warningOnIndividual?: string;
10
+ isOptionDisabled?: (index: number) => boolean;
11
+ optionHasWarning?: (index: number) => boolean;
12
+ inputProps?: InputHTMLAttributes<HTMLInputElement>;
13
+ renderLabelFor?: (value: string) => JSX.Element;
14
+ }
15
+ export declare const LuiRadioInput: (props: LuiRadioProps) => JSX.Element;
@@ -1,20 +1,20 @@
1
- import { ChangeEventHandler, DetailedHTMLProps, JSX, SelectHTMLAttributes } from 'react';
2
- export type SelectOptions = {
3
- label: string;
4
- value: string;
5
- disabled?: boolean;
6
- };
7
- export interface SelectProps {
8
- error?: string;
9
- warning?: string;
10
- onChange?: ChangeEventHandler<HTMLSelectElement>;
11
- options: SelectOptions[];
12
- value: string;
13
- mandatory?: boolean;
14
- hideLabel?: boolean;
15
- selectProps?: DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
16
- label: JSX.Element | string;
17
- placeholderText?: string;
18
- className?: string;
19
- }
20
- export declare const LuiSelectInput: (props: SelectProps) => JSX.Element;
1
+ import { ChangeEventHandler, DetailedHTMLProps, JSX, SelectHTMLAttributes } from 'react';
2
+ export type SelectOptions = {
3
+ label: string;
4
+ value: string;
5
+ disabled?: boolean;
6
+ };
7
+ export interface SelectProps {
8
+ error?: string;
9
+ warning?: string;
10
+ onChange?: ChangeEventHandler<HTMLSelectElement>;
11
+ options: SelectOptions[];
12
+ value: string;
13
+ mandatory?: boolean;
14
+ hideLabel?: boolean;
15
+ selectProps?: DetailedHTMLProps<SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
16
+ label: JSX.Element | string;
17
+ placeholderText?: string;
18
+ className?: string;
19
+ }
20
+ export declare const LuiSelectInput: (props: SelectProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
- import React from 'react';
2
- import { type LuiTextAreaInputProps } from './LuiTextAreaInput';
3
- export declare const LuiAutoExpandTextAreaInput: (props: LuiTextAreaInputProps) => React.JSX.Element;
1
+ import React from 'react';
2
+ import { type LuiTextAreaInputProps } from './LuiTextAreaInput';
3
+ export declare const LuiAutoExpandTextAreaInput: (props: LuiTextAreaInputProps) => React.JSX.Element;
@@ -1,12 +1,12 @@
1
- import React, { ChangeEventHandler, InputHTMLAttributes, JSX } from 'react';
2
- export interface LuiTextAreaInputProps {
3
- label: JSX.Element | string;
4
- mandatory?: boolean;
5
- inputProps?: InputHTMLAttributes<HTMLTextAreaElement>;
6
- onChange?: ChangeEventHandler<HTMLTextAreaElement>;
7
- value: string;
8
- error?: string | boolean;
9
- warning?: string;
10
- rows?: number;
11
- }
12
- export declare const LuiTextAreaInput: React.ForwardRefExoticComponent<LuiTextAreaInputProps & React.RefAttributes<HTMLTextAreaElement>>;
1
+ import React, { ChangeEventHandler, InputHTMLAttributes, JSX } from 'react';
2
+ export interface LuiTextAreaInputProps {
3
+ label: JSX.Element | string;
4
+ mandatory?: boolean;
5
+ inputProps?: InputHTMLAttributes<HTMLTextAreaElement>;
6
+ onChange?: ChangeEventHandler<HTMLTextAreaElement>;
7
+ value: string;
8
+ error?: string | boolean;
9
+ warning?: string;
10
+ rows?: number;
11
+ }
12
+ export declare const LuiTextAreaInput: React.ForwardRefExoticComponent<LuiTextAreaInputProps & React.RefAttributes<HTMLTextAreaElement>>;
@@ -1,23 +1,23 @@
1
- import React, { ChangeEventHandler, JSX } from 'react';
2
- export interface LuiTextInputProps {
3
- onChange?: ChangeEventHandler<HTMLInputElement>;
4
- inputProps?: Omit<JSX.IntrinsicElements['input'], 'ref'>;
5
- error?: string;
6
- warning?: string;
7
- hideLabel?: boolean;
8
- label: JSX.Element | string;
9
- /**
10
- * A red star will be shown next to the label, no validation will be performed based on this prop.
11
- */
12
- mandatory?: boolean;
13
- /**
14
- * A padlock will be displayed on right side of input
15
- */
16
- showPadlockIcon?: boolean;
17
- className?: string;
18
- value?: string;
19
- icon?: JSX.Element;
20
- size?: 'sm';
21
- }
22
- export declare function useGenerateOrDefaultId(idFromProps?: string): string;
23
- export declare const LuiTextInput: React.ForwardRefExoticComponent<LuiTextInputProps & React.RefAttributes<HTMLInputElement>>;
1
+ import React, { ChangeEventHandler, JSX } from 'react';
2
+ export interface LuiTextInputProps {
3
+ onChange?: ChangeEventHandler<HTMLInputElement>;
4
+ inputProps?: Omit<JSX.IntrinsicElements['input'], 'ref'>;
5
+ error?: string;
6
+ warning?: string;
7
+ hideLabel?: boolean;
8
+ label: JSX.Element | string;
9
+ /**
10
+ * A red star will be shown next to the label, no validation will be performed based on this prop.
11
+ */
12
+ mandatory?: boolean;
13
+ /**
14
+ * A padlock will be displayed on right side of input
15
+ */
16
+ showPadlockIcon?: boolean;
17
+ className?: string;
18
+ value?: string;
19
+ icon?: JSX.Element;
20
+ size?: 'sm';
21
+ }
22
+ export declare function useGenerateOrDefaultId(idFromProps?: string): string;
23
+ export declare const LuiTextInput: React.ForwardRefExoticComponent<LuiTextInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,7 +1,7 @@
1
- import React, { PropsWithChildren, ReactNode } from 'react';
2
- export interface IFormSectionHeaderProps {
3
- header: string;
4
- details?: string | ReactNode;
5
- link?: string;
6
- }
7
- export declare const LuiFormSectionHeader: (props: PropsWithChildren<IFormSectionHeaderProps>) => React.JSX.Element;
1
+ import React, { PropsWithChildren, ReactNode } from 'react';
2
+ export interface IFormSectionHeaderProps {
3
+ header: string;
4
+ details?: string | ReactNode;
5
+ link?: string;
6
+ }
7
+ export declare const LuiFormSectionHeader: (props: PropsWithChildren<IFormSectionHeaderProps>) => React.JSX.Element;
@@ -1,6 +1,6 @@
1
- import React, { ReactNode } from 'react';
2
- interface IHelpInfoProps {
3
- info: string | ReactNode;
4
- }
5
- export declare const HelpInfo: React.FC<React.PropsWithChildren<IHelpInfoProps>>;
6
- export {};
1
+ import React, { ReactNode } from 'react';
2
+ interface IHelpInfoProps {
3
+ info: string | ReactNode;
4
+ }
5
+ export declare const HelpInfo: React.FC<React.PropsWithChildren<IHelpInfoProps>>;
6
+ export {};
@@ -1,72 +1,72 @@
1
- import React, { ReactElement } from 'react';
2
- import { Range } from '../common/ResponsiveUtils';
3
- type HeaderSize = 'normal' | 'small';
4
- interface HeaderProps {
5
- headingText?: string;
6
- size?: HeaderSize;
7
- /** The URL or path that the LINZ logo will link to. If unset, the logo will not be a link. */
8
- homeLink?: string | (() => void);
9
- transparent?: boolean;
10
- sticky?: boolean;
11
- }
12
- /**
13
- * @deprecated: this is replaced by LuiHeaderV2
14
- */
15
- declare const LuiHeader: React.FC<React.PropsWithChildren<HeaderProps>>;
16
- interface ILuiIcon {
17
- /**
18
- * The material-ui icon name (see https://material.io/resources/icons/?search=account_c&style=round)
19
- */
20
- icon?: string;
21
- /**
22
- * Hides the menu item on screens specified
23
- */
24
- hide?: Range;
25
- }
26
- interface ILuiHeaderMenuItem extends ILuiIcon {
27
- /**
28
- * The label that will show up beside (right) the icon, if not specified then it won't show up
29
- */
30
- label?: string | ReactElement;
31
- /**
32
- * The string that will show up as a notification badge which will show up at the upper right corner of the icon.
33
- */
34
- badge?: string;
35
- /**
36
- * The callback handler to be registered which will be called when menu item is clicked.
37
- */
38
- onClick?: () => void;
39
- /**
40
- * The test id used to reference the html element which is bound to the onClick function.
41
- */
42
- 'data-testid'?: string;
43
- }
44
- /**
45
- * @deprecated: this is replaced by LuiHeaderMenuItemV2
46
- *
47
- * The \`LuiHeaderMenuItem\` is the base component for all menu items that are to be shown in the header.
48
- * Note that it depends on it being rendered inside a LuiHeader for its styles to apply properly.
49
- * To configure the item for responsiveness, ensure to set any of the hideOn* properties.
50
- */
51
- declare const LuiHeaderMenuItem: React.ForwardRefExoticComponent<ILuiHeaderMenuItem & {
52
- children?: React.ReactNode;
53
- } & React.RefAttributes<HTMLDivElement>>;
54
- interface ILuiCloseableHeaderMenuContext {
55
- isOpen: () => boolean;
56
- open: () => void;
57
- close: () => void;
58
- }
59
- declare const LuiCloseableHeaderMenuContext: React.Context<ILuiCloseableHeaderMenuContext>;
60
- interface ILuiCloseableHeaderMenuItem extends Omit<ILuiHeaderMenuItem, 'onClick'> {
61
- open: boolean;
62
- setOpen: (value: boolean) => void;
63
- }
64
- /**
65
- * @deprecated replaced by LuiCloseableHeaderMenuItemV2
66
- */
67
- declare const LuiCloseableHeaderMenuItem: React.FC<React.PropsWithChildren<ILuiCloseableHeaderMenuItem>>;
68
- interface ILuiMenuCloseButton extends ILuiIcon {
69
- 'data-testid'?: string;
70
- }
71
- declare const LuiMenuCloseButton: React.FC<React.PropsWithChildren<ILuiMenuCloseButton>>;
72
- export { HeaderSize, HeaderProps, LuiHeader, ILuiIcon, ILuiHeaderMenuItem, LuiHeaderMenuItem, ILuiMenuCloseButton, LuiMenuCloseButton, ILuiCloseableHeaderMenuItem, LuiCloseableHeaderMenuItem, LuiCloseableHeaderMenuContext, };
1
+ import React, { ReactElement } from 'react';
2
+ import { Range } from '../common/ResponsiveUtils';
3
+ type HeaderSize = 'normal' | 'small';
4
+ interface HeaderProps {
5
+ headingText?: string;
6
+ size?: HeaderSize;
7
+ /** The URL or path that the LINZ logo will link to. If unset, the logo will not be a link. */
8
+ homeLink?: string | (() => void);
9
+ transparent?: boolean;
10
+ sticky?: boolean;
11
+ }
12
+ /**
13
+ * @deprecated: this is replaced by LuiHeaderV2
14
+ */
15
+ declare const LuiHeader: React.FC<React.PropsWithChildren<HeaderProps>>;
16
+ interface ILuiIcon {
17
+ /**
18
+ * The material-ui icon name (see https://material.io/resources/icons/?search=account_c&style=round)
19
+ */
20
+ icon?: string;
21
+ /**
22
+ * Hides the menu item on screens specified
23
+ */
24
+ hide?: Range;
25
+ }
26
+ interface ILuiHeaderMenuItem extends ILuiIcon {
27
+ /**
28
+ * The label that will show up beside (right) the icon, if not specified then it won't show up
29
+ */
30
+ label?: string | ReactElement;
31
+ /**
32
+ * The string that will show up as a notification badge which will show up at the upper right corner of the icon.
33
+ */
34
+ badge?: string;
35
+ /**
36
+ * The callback handler to be registered which will be called when menu item is clicked.
37
+ */
38
+ onClick?: () => void;
39
+ /**
40
+ * The test id used to reference the html element which is bound to the onClick function.
41
+ */
42
+ 'data-testid'?: string;
43
+ }
44
+ /**
45
+ * @deprecated: this is replaced by LuiHeaderMenuItemV2
46
+ *
47
+ * The \`LuiHeaderMenuItem\` is the base component for all menu items that are to be shown in the header.
48
+ * Note that it depends on it being rendered inside a LuiHeader for its styles to apply properly.
49
+ * To configure the item for responsiveness, ensure to set any of the hideOn* properties.
50
+ */
51
+ declare const LuiHeaderMenuItem: React.ForwardRefExoticComponent<ILuiHeaderMenuItem & {
52
+ children?: React.ReactNode | undefined;
53
+ } & React.RefAttributes<HTMLDivElement>>;
54
+ interface ILuiCloseableHeaderMenuContext {
55
+ isOpen: () => boolean;
56
+ open: () => void;
57
+ close: () => void;
58
+ }
59
+ declare const LuiCloseableHeaderMenuContext: React.Context<ILuiCloseableHeaderMenuContext>;
60
+ interface ILuiCloseableHeaderMenuItem extends Omit<ILuiHeaderMenuItem, 'onClick'> {
61
+ open: boolean;
62
+ setOpen: (value: boolean) => void;
63
+ }
64
+ /**
65
+ * @deprecated replaced by LuiCloseableHeaderMenuItemV2
66
+ */
67
+ declare const LuiCloseableHeaderMenuItem: React.FC<React.PropsWithChildren<ILuiCloseableHeaderMenuItem>>;
68
+ interface ILuiMenuCloseButton extends ILuiIcon {
69
+ 'data-testid'?: string;
70
+ }
71
+ declare const LuiMenuCloseButton: React.FC<React.PropsWithChildren<ILuiMenuCloseButton>>;
72
+ export { HeaderSize, HeaderProps, LuiHeader, ILuiIcon, ILuiHeaderMenuItem, LuiHeaderMenuItem, ILuiMenuCloseButton, LuiMenuCloseButton, ILuiCloseableHeaderMenuItem, LuiCloseableHeaderMenuItem, LuiCloseableHeaderMenuContext, };
@@ -1,51 +1,51 @@
1
- import React, { ReactElement, ReactNode } from 'react';
2
- import { ILuiHeaderMenuItem, ILuiIcon } from '../LuiHeader/LuiHeader';
3
- interface ILuiDrawerMenuOption {
4
- /**
5
- * The material-ui icon name (see https://material.io/resources/icons/?search=account_c&style=round)
6
- */
7
- icon?: string | ReactElement;
8
- /**
9
- * The label shown beside the icon which is aligned at the left of the drawer
10
- */
11
- label: string;
12
- /**
13
- * The badge which is shown which is aligned at the right of the drawer
14
- */
15
- badge?: ReactElement;
16
- /**
17
- * The function to be bound together with closing the drawer on click
18
- */
19
- onClick?: () => void;
20
- }
21
- /**
22
- * @deprecated replaced by LuiDrawerMenuOptionsV2
23
- */
24
- declare const LuiDrawerMenuOptions: React.FC<React.PropsWithChildren<ILuiIcon>>;
25
- /**
26
- * @deprecated replaced by LuiDrawerMenuOptionV2
27
- */
28
- declare const LuiDrawerMenuOption: React.FC<React.PropsWithChildren<ILuiDrawerMenuOption>>;
29
- type ILuiDrawerMenu = Omit<ILuiHeaderMenuItem, 'onClick'> & {
30
- hasStickyHeader?: boolean;
31
- };
32
- /**
33
- * @deprecated replaced by LuiDrawerMenuV2
34
- */
35
- declare const LuiDrawerMenu: React.FC<React.PropsWithChildren<ILuiDrawerMenu>>;
36
- type ILuiDropdownMenu = Omit<ILuiHeaderMenuItem, 'onClick'>;
37
- /**
38
- * @deprecated replaced by LuiDropdownMenuV2
39
- */
40
- declare const LuiDropdownMenu: React.FC<React.PropsWithChildren<ILuiDropdownMenu>>;
41
- interface ILuiDrawerMenuSection {
42
- /**
43
- * Optional tile, displays a header if set
44
- */
45
- title?: string;
46
- collapsible?: boolean;
47
- children: ReactNode;
48
- }
49
- declare const LuiDrawerMenuSection: (props: ILuiDrawerMenuSection) => React.JSX.Element;
50
- declare const LuiDrawerMenuDivider: () => React.JSX.Element;
51
- export { ILuiDrawerMenu, LuiDrawerMenu, LuiDrawerMenuOptions, ILuiDrawerMenuOption, LuiDrawerMenuOption, ILuiDropdownMenu, LuiDropdownMenu, ILuiDrawerMenuSection, LuiDrawerMenuSection, LuiDrawerMenuDivider, };
1
+ import React, { ReactElement, ReactNode } from 'react';
2
+ import { ILuiHeaderMenuItem, ILuiIcon } from '../LuiHeader/LuiHeader';
3
+ interface ILuiDrawerMenuOption {
4
+ /**
5
+ * The material-ui icon name (see https://material.io/resources/icons/?search=account_c&style=round)
6
+ */
7
+ icon?: string | ReactElement;
8
+ /**
9
+ * The label shown beside the icon which is aligned at the left of the drawer
10
+ */
11
+ label: string;
12
+ /**
13
+ * The badge which is shown which is aligned at the right of the drawer
14
+ */
15
+ badge?: ReactElement;
16
+ /**
17
+ * The function to be bound together with closing the drawer on click
18
+ */
19
+ onClick?: () => void;
20
+ }
21
+ /**
22
+ * @deprecated replaced by LuiDrawerMenuOptionsV2
23
+ */
24
+ declare const LuiDrawerMenuOptions: React.FC<React.PropsWithChildren<ILuiIcon>>;
25
+ /**
26
+ * @deprecated replaced by LuiDrawerMenuOptionV2
27
+ */
28
+ declare const LuiDrawerMenuOption: React.FC<React.PropsWithChildren<ILuiDrawerMenuOption>>;
29
+ type ILuiDrawerMenu = Omit<ILuiHeaderMenuItem, 'onClick'> & {
30
+ hasStickyHeader?: boolean;
31
+ };
32
+ /**
33
+ * @deprecated replaced by LuiDrawerMenuV2
34
+ */
35
+ declare const LuiDrawerMenu: React.FC<React.PropsWithChildren<ILuiDrawerMenu>>;
36
+ type ILuiDropdownMenu = Omit<ILuiHeaderMenuItem, 'onClick'>;
37
+ /**
38
+ * @deprecated replaced by LuiDropdownMenuV2
39
+ */
40
+ declare const LuiDropdownMenu: React.FC<React.PropsWithChildren<ILuiDropdownMenu>>;
41
+ interface ILuiDrawerMenuSection {
42
+ /**
43
+ * Optional tile, displays a header if set
44
+ */
45
+ title?: string;
46
+ collapsible?: boolean;
47
+ children: ReactNode;
48
+ }
49
+ declare const LuiDrawerMenuSection: (props: ILuiDrawerMenuSection) => React.JSX.Element;
50
+ declare const LuiDrawerMenuDivider: () => React.JSX.Element;
51
+ export { ILuiDrawerMenu, LuiDrawerMenu, LuiDrawerMenuOptions, ILuiDrawerMenuOption, LuiDrawerMenuOption, ILuiDropdownMenu, LuiDropdownMenu, ILuiDrawerMenuSection, LuiDrawerMenuSection, LuiDrawerMenuDivider, };
@@ -1,102 +1,87 @@
1
- import React, { ReactElement, ReactNode } from 'react';
2
- import { LuiHeaderMenuItemV2Props } from '../LuiHeaderV2/LuiHeaderV2';
3
- import { Size } from '../common/ResponsiveUtils';
4
- import { IconSize } from '../LuiIcon/LuiIcon';
5
- interface LuiDrawerMenuOptionV2Props {
6
- /**
7
- * The LUI icon name or icon element
8
- */
9
- icon?: string | ReactElement;
10
- /**
11
- * icon color, only applied when using LuiIcon
12
- */
13
- iconColor?: string;
14
- /**
15
- * The size of icon, only applied when using LuiIcon, default to 'md'
16
- */
17
- iconSize?: IconSize;
18
- /**
19
- * The label shown beside the icon which is aligned at the left of the drawer
20
- */
21
- label: string | ReactElement;
22
- /**
23
- * The badge which is shown which is aligned at the right of the drawer
24
- */
25
- badge?: ReactElement;
26
- /**
27
- * The function to be bound together with closing the drawer on click
28
- */
29
- onClick?: () => void;
30
- /**
31
- * whether close drawer menu on clicking, default to true
32
- * true - close menu on clicking
33
- * false - remains open on clicking
34
- */
35
- closeMenuOnClick?: boolean;
36
- /**
37
- * Open link in a new tab
38
- */
39
- url?: string;
40
- }
41
- declare const LuiDrawerMenuOptionsV2: ({ children }: {
42
- children: ReactNode;
43
- }) => React.JSX.Element;
44
- declare const LuiDrawerMenuOptionV2: ({ icon, iconColor, label, badge, iconSize, closeMenuOnClick, onClick, url, }: LuiDrawerMenuOptionV2Props) => React.JSX.Element;
45
- type LuiDrawerMenuV2Props = Omit<LuiHeaderMenuItemV2Props, 'onClick' | 'isSelected'> & {
46
- hasStickyHeader?: boolean;
47
- size?: Exclude<Size, 'xs'>;
48
- type?: 'drawer' | 'dropdown';
49
- };
50
- /**
51
- * Drawer menu support both sliding and dropdown
52
- */
53
- declare const LuiDrawerMenuV2: ({ children, hasStickyHeader, size, type, ...menuPropsCopy }: Omit<LuiHeaderMenuItemV2Props, "onClick" | "isSelected"> & {
54
- hasStickyHeader?: boolean | undefined;
55
- size?: "sm" | "md" | "lg" | "xl" | undefined;
56
- type?: "drawer" | "dropdown" | undefined;
57
- } & {
58
- children: ReactNode;
59
- }) => React.JSX.Element;
60
- type LuiDropdownMenuV2Props = Omit<LuiHeaderMenuItemV2Props, 'onClick' | 'isSelected'> & {
61
- /**
62
- * The anchor origin of dropdown, default to left
63
- */
64
- anchorOrigin?: {
65
- horizontal?: 'left' | 'right';
66
- };
67
- /**
68
- * the width of dropdown, default to 'md'
69
- */
70
- size?: Size | 'xxl';
71
- };
72
- /**
73
- * LuiDropdownMenuV2 dropdown content element
74
- */
75
- export declare const LuiDropdownMenuV2DropContent: ({ children, }: {
76
- children: ReactNode;
77
- }) => React.JSX.Element;
78
- declare const LuiDropdownMenuV2: (props: Omit<LuiHeaderMenuItemV2Props, "onClick" | "isSelected"> & {
79
- /**
80
- * The anchor origin of dropdown, default to left
81
- */
82
- anchorOrigin?: {
83
- horizontal?: "left" | "right" | undefined;
84
- } | undefined;
85
- /**
86
- * the width of dropdown, default to 'md'
87
- */
88
- size?: Size | "xxl" | undefined;
89
- } & {
90
- children: ReactNode;
91
- }) => React.JSX.Element;
92
- type LuiDrawerMenuSectionV2Props = {
93
- /**
94
- * Optional tile, displays a header if set
95
- */
96
- title?: string;
97
- collapsible?: boolean;
98
- children: ReactNode;
99
- };
100
- declare const LuiDrawerMenuSectionV2: (props: LuiDrawerMenuSectionV2Props) => React.JSX.Element;
101
- declare const LuiDrawerMenuDividerV2: () => React.JSX.Element;
102
- export { LuiDrawerMenuV2Props, LuiDrawerMenuV2, LuiDrawerMenuOptionV2Props, LuiDrawerMenuOptionV2, LuiDrawerMenuOptionsV2, LuiDrawerMenuSectionV2Props, LuiDrawerMenuSectionV2, LuiDropdownMenuV2Props, LuiDropdownMenuV2, LuiDrawerMenuDividerV2, };
1
+ import React, { ReactElement, ReactNode } from 'react';
2
+ import { LuiHeaderMenuItemV2Props } from '../LuiHeaderV2/LuiHeaderV2';
3
+ import { Size } from '../common/ResponsiveUtils';
4
+ import { IconSize } from '../LuiIcon/LuiIcon';
5
+ interface LuiDrawerMenuOptionV2Props {
6
+ /**
7
+ * The LUI icon name or icon element
8
+ */
9
+ icon?: string | ReactElement;
10
+ /**
11
+ * icon color, only applied when using LuiIcon
12
+ */
13
+ iconColor?: string;
14
+ /**
15
+ * The size of icon, only applied when using LuiIcon, default to 'md'
16
+ */
17
+ iconSize?: IconSize;
18
+ /**
19
+ * The label shown beside the icon which is aligned at the left of the drawer
20
+ */
21
+ label: string | ReactElement;
22
+ /**
23
+ * The badge which is shown which is aligned at the right of the drawer
24
+ */
25
+ badge?: ReactElement;
26
+ /**
27
+ * The function to be bound together with closing the drawer on click
28
+ */
29
+ onClick?: () => void;
30
+ /**
31
+ * whether close drawer menu on clicking, default to true
32
+ * true - close menu on clicking
33
+ * false - remains open on clicking
34
+ */
35
+ closeMenuOnClick?: boolean;
36
+ /**
37
+ * Open link in a new tab
38
+ */
39
+ url?: string;
40
+ }
41
+ declare const LuiDrawerMenuOptionsV2: ({ children }: {
42
+ children: ReactNode;
43
+ }) => React.JSX.Element;
44
+ declare const LuiDrawerMenuOptionV2: ({ icon, iconColor, label, badge, iconSize, closeMenuOnClick, onClick, url, }: LuiDrawerMenuOptionV2Props) => React.JSX.Element;
45
+ type LuiDrawerMenuV2Props = Omit<LuiHeaderMenuItemV2Props, 'onClick' | 'isSelected'> & {
46
+ hasStickyHeader?: boolean;
47
+ size?: Exclude<Size, 'xs'>;
48
+ type?: 'drawer' | 'dropdown';
49
+ };
50
+ /**
51
+ * Drawer menu support both sliding and dropdown
52
+ */
53
+ declare const LuiDrawerMenuV2: ({ children, hasStickyHeader, size, type, ...menuPropsCopy }: LuiDrawerMenuV2Props & {
54
+ children: ReactNode;
55
+ }) => React.JSX.Element;
56
+ type LuiDropdownMenuV2Props = Omit<LuiHeaderMenuItemV2Props, 'onClick' | 'isSelected'> & {
57
+ /**
58
+ * The anchor origin of dropdown, default to left
59
+ */
60
+ anchorOrigin?: {
61
+ horizontal?: 'left' | 'right';
62
+ };
63
+ /**
64
+ * the width of dropdown, default to 'md'
65
+ */
66
+ size?: Size | 'xxl';
67
+ };
68
+ /**
69
+ * LuiDropdownMenuV2 dropdown content element
70
+ */
71
+ export declare const LuiDropdownMenuV2DropContent: ({ children, }: {
72
+ children: ReactNode;
73
+ }) => React.JSX.Element;
74
+ declare const LuiDropdownMenuV2: (props: LuiDropdownMenuV2Props & {
75
+ children: ReactNode;
76
+ }) => React.JSX.Element;
77
+ type LuiDrawerMenuSectionV2Props = {
78
+ /**
79
+ * Optional tile, displays a header if set
80
+ */
81
+ title?: string;
82
+ collapsible?: boolean;
83
+ children: ReactNode;
84
+ };
85
+ declare const LuiDrawerMenuSectionV2: (props: LuiDrawerMenuSectionV2Props) => React.JSX.Element;
86
+ declare const LuiDrawerMenuDividerV2: () => React.JSX.Element;
87
+ export { LuiDrawerMenuV2Props, LuiDrawerMenuV2, LuiDrawerMenuOptionV2Props, LuiDrawerMenuOptionV2, LuiDrawerMenuOptionsV2, LuiDrawerMenuSectionV2Props, LuiDrawerMenuSectionV2, LuiDropdownMenuV2Props, LuiDropdownMenuV2, LuiDrawerMenuDividerV2, };