@linzjs/lui 17.28.2 → 17.29.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [17.29.0](https://github.com/linz/lui/compare/v17.28.2...v17.29.0) (2023-02-01)
2
+
3
+
4
+ ### Features
5
+
6
+ * **LuiFloatingWindow:** new component extracted from Search LuiFloatingWindow ([#832](https://github.com/linz/lui/issues/832)) ([c186e94](https://github.com/linz/lui/commit/c186e949318b6cf34b1746f894ee869ee8db55ed))
7
+
1
8
  ## [17.28.2](https://github.com/linz/lui/compare/v17.28.1...v17.28.2) (2023-01-30)
2
9
 
3
10
 
@@ -0,0 +1,15 @@
1
+ import React, { ReactElement } from 'react';
2
+ export { FloatingWindowContextProvider as LuiFloatingWindowContextProvider, useFloatingWindow as useLuiFloatingWindow, } from '@linzjs/floating-windows';
3
+ export interface ILuiFloatingWindowProps {
4
+ callbackOnPopinFloatingWindow?: () => void;
5
+ callbackOnPopoutFloatingWindow?: () => void;
6
+ callbackOnCloseFloatingWindow?: () => void;
7
+ dockUndockFloatingWindow?: () => void;
8
+ startHeight?: number;
9
+ startWidth?: number;
10
+ rightSideHeader?: ReactElement | string;
11
+ leftSideHeader?: ReactElement | string;
12
+ startDisplayed?: boolean;
13
+ }
14
+ export declare const LUI_WINDOW_NAME = "luiFloatingWindow";
15
+ export declare const LuiFloatingWindow: React.FC<ILuiFloatingWindowProps>;
@@ -0,0 +1,11 @@
1
+ import React, { ReactElement } from 'react';
2
+ import '../../scss/Components/LuiFloatingWindow/LuiFloatingWindow.scss';
3
+ export declare const LuiFloatingWindowHeader: React.FC<{
4
+ rightSideHeader?: ReactElement | string;
5
+ leftSideHeader?: ReactElement | string;
6
+ isPoppedOut: boolean;
7
+ onDock?: () => void;
8
+ onPopout?: () => void;
9
+ onPopin?: () => void;
10
+ onClose?: () => void;
11
+ }>;
@@ -9,6 +9,9 @@ interface HeaderProps {
9
9
  transparent?: boolean;
10
10
  sticky?: boolean;
11
11
  }
12
+ /**
13
+ * @deprecated: this is replaced by LuiHeaderV2
14
+ */
12
15
  declare const LuiHeader: React.FC<React.PropsWithChildren<HeaderProps>>;
13
16
  interface ILuiIcon {
14
17
  /**
@@ -39,6 +42,8 @@ interface ILuiHeaderMenuItem extends ILuiIcon {
39
42
  'data-testid'?: string;
40
43
  }
41
44
  /**
45
+ * @deprecated: this is replaced by LuiHeaderMenuItemV2
46
+ *
42
47
  * The \`LuiHeaderMenuItem\` is the base component for all menu items that are to be shown in the header.
43
48
  * Note that it depends on it being rendered inside a LuiHeader for its styles to apply properly.
44
49
  * To configure the item for responsiveness, ensure to set any of the hideOn* properties.
@@ -56,6 +61,9 @@ interface ILuiCloseableHeaderMenuItem extends Omit<ILuiHeaderMenuItem, 'onClick'
56
61
  open: boolean;
57
62
  setOpen: (value: boolean) => void;
58
63
  }
64
+ /**
65
+ * @deprecated replaced by LuiCloseableHeaderMenuItemV2
66
+ */
59
67
  declare const LuiCloseableHeaderMenuItem: React.FC<React.PropsWithChildren<ILuiCloseableHeaderMenuItem>>;
60
68
  interface ILuiMenuCloseButton extends ILuiIcon {
61
69
  'data-testid'?: string;
@@ -0,0 +1,16 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { HeaderSize, ILuiCloseableHeaderMenuItem, ILuiHeaderMenuItem } from './LuiHeader';
3
+ interface HeaderPropsV2 {
4
+ headingText?: string;
5
+ size?: HeaderSize;
6
+ homeLink?: string | (() => void);
7
+ transparent?: boolean;
8
+ sticky?: boolean;
9
+ appMenu?: ReactNode;
10
+ }
11
+ declare const LuiHeaderV2: React.FC<React.PropsWithChildren<HeaderPropsV2>>;
12
+ declare const LuiHeaderMenuItemV2: React.ForwardRefExoticComponent<ILuiHeaderMenuItem & {
13
+ children?: React.ReactNode;
14
+ } & React.RefAttributes<HTMLDivElement>>;
15
+ declare const LuiCloseableHeaderMenuItemV2: React.FC<React.PropsWithChildren<ILuiCloseableHeaderMenuItem>>;
16
+ export { LuiHeaderV2, LuiHeaderMenuItemV2, LuiCloseableHeaderMenuItemV2 };
@@ -18,13 +18,25 @@ interface ILuiDrawerMenuOption {
18
18
  */
19
19
  onClick?: () => void;
20
20
  }
21
+ /**
22
+ * @deprecated replaced by LuiDrawerMenuOptionsV2
23
+ */
21
24
  declare const LuiDrawerMenuOptions: React.FC<React.PropsWithChildren<ILuiIcon>>;
25
+ /**
26
+ * @deprecated replaced by LuiDrawerMenuOptionV2
27
+ */
22
28
  declare const LuiDrawerMenuOption: React.FC<React.PropsWithChildren<ILuiDrawerMenuOption>>;
23
29
  declare type ILuiDrawerMenu = Omit<ILuiHeaderMenuItem, 'onClick'> & {
24
30
  hasStickyHeader?: boolean;
25
31
  };
32
+ /**
33
+ * @deprecated replaced by LuiDrawerMenuV2
34
+ */
26
35
  declare const LuiDrawerMenu: React.FC<React.PropsWithChildren<ILuiDrawerMenu>>;
27
36
  declare type ILuiDropdownMenu = Omit<ILuiHeaderMenuItem, 'onClick'>;
37
+ /**
38
+ * @deprecated replaced by LuiDropdownMenuV2
39
+ */
28
40
  declare const LuiDropdownMenu: React.FC<React.PropsWithChildren<ILuiDropdownMenu>>;
29
41
  interface ILuiDrawerMenuSection {
30
42
  /**
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { ILuiHeaderMenuItem, ILuiIcon } from '../LuiHeader/LuiHeader';
3
+ import { ILuiDrawerMenu, ILuiDrawerMenuOption, ILuiDrawerMenuSection } from './LuiHeaderMenus';
4
+ import { Size } from '../common/ResponsiveUtils';
5
+ declare const LuiDrawerMenuOptionsV2: React.FC<React.PropsWithChildren<ILuiIcon>>;
6
+ /**
7
+ * display badge on the left
8
+ */
9
+ declare const LuiDrawerMenuOptionV2: React.FC<React.PropsWithChildren<ILuiDrawerMenuOption>>;
10
+ declare const LuiDrawerMenuV2: React.FC<React.PropsWithChildren<ILuiDrawerMenu>>;
11
+ declare type ILuiDropdownMenuV2 = Omit<ILuiHeaderMenuItem, 'onClick'> & {
12
+ /**
13
+ * The anchor origin of dropdown, default to left
14
+ */
15
+ anchorOrigin?: {
16
+ horizontal?: 'left' | 'right';
17
+ };
18
+ /**
19
+ * the width of dropdown, default to 'md'
20
+ */
21
+ size?: Size | 'xxl';
22
+ };
23
+ declare const LuiDropdownMenuV2: React.FC<React.PropsWithChildren<ILuiDropdownMenuV2>>;
24
+ declare const LuiDrawerMenuSectionV2: (props: ILuiDrawerMenuSection) => JSX.Element;
25
+ declare const LuiDrawerMenuDividerV2: () => JSX.Element;
26
+ export { LuiDrawerMenuV2, LuiDrawerMenuOptionsV2, LuiDrawerMenuOptionV2, ILuiDropdownMenuV2, LuiDropdownMenuV2, LuiDrawerMenuSectionV2, LuiDrawerMenuDividerV2, };
@@ -0,0 +1,9 @@
1
+ import { Size } from './ResponsiveUtils';
2
+ export declare type Breakpoint = Exclude<Size | 'xxl', 'xs'>;
3
+ export declare const breakpoints: Record<Breakpoint, number>;
4
+ export declare const breakpointQuery: {
5
+ up: (bp: Breakpoint) => string;
6
+ down: (bp: Breakpoint) => string;
7
+ between: (bp1: Breakpoint, bp2: Breakpoint) => string;
8
+ };
9
+ export declare const useMediaQuery: (query: string) => boolean;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { LuiBanner, LuiBannerContent } from './components/LuiBanner/LuiBanner';
2
2
  export { LuiStaticMessage } from './components/LuiStaticMessage/LuiStaticMessage';
3
3
  export { LuiButton } from './components/LuiButton/LuiButton';
4
+ export { LuiFloatingWindow, ILuiFloatingWindowProps, LUI_WINDOW_NAME, LuiFloatingWindowContextProvider, useLuiFloatingWindow, } from './components/LuiFloatingWindow/LuiFloatingWindow';
4
5
  export * from './components/LuiToastMessage/LuiToastMessage';
5
6
  export * from './contexts/LuiMessagingContextProvider';
6
7
  export { LuiButtonGroup } from './components/LuiButton/LuiButton';
@@ -35,7 +36,9 @@ export { LuiFooter } from './components/LuiFooter/LuiFooter';
35
36
  export { LuiComboSelect, LuiComboSelectProps, LuiComboSelectOption, } from './components/LuiForms/LuiComboSelect/LuiComboSelect';
36
37
  export { LuiFormSectionHeader, IFormSectionHeaderProps, } from './components/LuiForms/LuiFormSection/LuiFormSectionHeader';
37
38
  export * from './components/LuiHeader/LuiHeader';
39
+ export * from './components/LuiHeader/LuiHeaderV2';
38
40
  export * from './components/LuiHeaderMenu/LuiHeaderMenus';
41
+ export * from './components/LuiHeaderMenu/LuiHeaderMenusV2';
39
42
  export { LuiUpdatesSplashModal } from './components/LuiUpdateSplashModal/LuiUpdatesSplashModal';
40
43
  export { LuiModal, LuiAlertModal, LuiAlertModalButtons, } from './components/LuiModal/LuiModal';
41
44
  export { ISearchInputProps, ISearchGroupedResult, ISearchResult, LuiSearchInput, } from './components/LuiSearchInput/LuiSearchInput';
@@ -66,3 +69,4 @@ export { RadioItemRenderer } from './components/LuiListBox/Renderers/RadioItemRe
66
69
  export { CheckboxItemRenderer } from './components/LuiListBox/Renderers/CheckboxItemRenderer';
67
70
  export { LuiSideMenu, ILuiSideMenuProps, } from './components/LuiSideMenu/LuiSideMenu';
68
71
  export { LuiSideMenuItem, ILuiSideMenuItemProps, LuiMenuItemClickHandler, } from './components/LuiSideMenu/LuiSideMenuItem';
72
+ export { Breakpoint, breakpoints, breakpointQuery, useMediaQuery, } from './components/common/UseMediaQuery';