@linzjs/lui 17.0.0 → 17.1.2
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 +16 -0
- package/dist/assets/icons/left_col.svg +1 -0
- package/dist/assets/icons/pop_back.svg +1 -0
- package/dist/assets/svg-content.tsx +12 -0
- package/dist/components/LuiSearchInput/LuiSearchInput.d.ts +24 -0
- package/dist/components/LuiSearchInput/ResultsDisplay.d.ts +13 -0
- package/dist/components/LuiSelectMenu/LuiSelectDataMenu.d.ts +15 -0
- package/dist/components/LuiSelectMenu/LuiSelectMenu.d.ts +20 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +369 -7
- package/dist/index.js.map +1 -1
- package/dist/lui.css +270 -1
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +365 -9
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/ContextMenu/context-menu.scss +118 -3
- package/dist/scss/Components/LuiSearchInput/LuiSearchInput.scss +165 -0
- package/dist/scss/base.scss +1 -0
- package/package.json +10 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [17.1.2](https://github.com/linz/lui/compare/v17.1.1...v17.1.2) (2022-05-23)
|
|
2
|
+
|
|
3
|
+
## [17.1.1](https://github.com/linz/lui/compare/v17.1.0...v17.1.1) (2022-05-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* LuiIcon export – added pop_back and left_col ([#671](https://github.com/linz/lui/issues/671)) ([e7d749c](https://github.com/linz/lui/commit/e7d749c018e8551f95ff365eff6a769f24b6ae2b))
|
|
9
|
+
|
|
10
|
+
# [17.1.0](https://github.com/linz/lui/compare/v17.0.0...v17.1.0) (2022-05-15)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **LuiSearchInput:** SEARCH-2785 Search box component ([#668](https://github.com/linz/lui/issues/668)) ([aaf9640](https://github.com/linz/lui/commit/aaf9640dba3e8c994cd0ff0a2e43975bb24a9b35))
|
|
16
|
+
|
|
1
17
|
# [17.0.0](https://github.com/linz/lui/compare/v16.5.1...v17.0.0) (2022-05-12)
|
|
2
18
|
|
|
3
19
|
## [16.5.1](https://github.com/linz/lui/compare/v16.5.0...v16.5.1) (2022-05-10)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.8 12c0 .5-.4 1-1 1h-6v1.8c0 .4-.5.7-.9.3l-2.8-2.8c-.2-.2-.2-.5 0-.7l2.8-2.8c.3-.3.9-.1.9.3V11h6c.5 0 1 .4 1 1ZM21 5v14c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2Zm-2 7c0-1.1-.9-2-2-2h-4V6c0-.6-.4-1-1-1H6c-.6 0-1 .4-1 1v12c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4h4c1.1 0 2-.9 2-2Z" fill="#2A292C"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 5h12c.55 0 1 .45 1 1v12c0 .55-.45 1-1 1h-5c-.55 0-1 .45-1 1s.45 1 1 1h6a2 2 0 0 0 2-2V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v6c0 .55.45 1 1 1s1-.45 1-1V6c0-.55.45-1 1-1Zm4 15c0-.55-.45-1-1-1H6.41l9.13-9.13a.996.996 0 1 0-1.41-1.41L5 17.59V15c0-.55-.45-1-1-1s-1 .45-1 1v6h6c.55 0 1-.45 1-1Z" fill="#000"/></svg>
|
|
@@ -371,6 +371,12 @@ iconMap['ic_layers'] = (
|
|
|
371
371
|
</svg>
|
|
372
372
|
);
|
|
373
373
|
|
|
374
|
+
iconMap['ic_left_col'] = (
|
|
375
|
+
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
376
|
+
<path d="M17.8 12c0 .5-.4 1-1 1h-6v1.8c0 .4-.5.7-.9.3l-2.8-2.8c-.2-.2-.2-.5 0-.7l2.8-2.8c.3-.3.9-.1.9.3V11h6c.5 0 1 .4 1 1ZM21 5v14c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2Zm-2 7c0-1.1-.9-2-2-2h-4V6c0-.6-.4-1-1-1H6c-.6 0-1 .4-1 1v12c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4h4c1.1 0 2-.9 2-2Z" />
|
|
377
|
+
</svg>
|
|
378
|
+
);
|
|
379
|
+
|
|
374
380
|
iconMap['ic_line_arc'] = (
|
|
375
381
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
376
382
|
<path d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.16 0-7.74 2.42-9.44 5.93-.32.67.04 1.47.75 1.71.59.2 1.23-.08 1.5-.64 1.3-2.66 4.03-4.5 7.19-4.5 1.95 0 3.73.72 5.12 1.88l-1.91 1.91c-.63.63-.19 1.71.7 1.71H21c.55 0 1-.45 1-1V9.41c0-.89-1.08-1.34-1.71-.71l-1.89 1.9Z" />
|
|
@@ -544,6 +550,12 @@ iconMap['ic_polygon_selection'] = (
|
|
|
544
550
|
</svg>
|
|
545
551
|
);
|
|
546
552
|
|
|
553
|
+
iconMap['ic_pop_back'] = (
|
|
554
|
+
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
555
|
+
<path d="M6 5h12c.55 0 1 .45 1 1v12c0 .55-.45 1-1 1h-5c-.55 0-1 .45-1 1s.45 1 1 1h6a2 2 0 0 0 2-2V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v6c0 .55.45 1 1 1s1-.45 1-1V6c0-.55.45-1 1-1Zm4 15c0-.55-.45-1-1-1H6.41l9.13-9.13a.996.996 0 1 0-1.41-1.41L5 17.59V15c0-.55-.45-1-1-1s-1 .45-1 1v6h6c.55 0 1-.45 1-1Z" />
|
|
556
|
+
</svg>
|
|
557
|
+
);
|
|
558
|
+
|
|
547
559
|
iconMap['ic_pre_validation'] = (
|
|
548
560
|
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
549
561
|
<path d="M13.05 9.79 10 7.5v9l3.05-2.29L16 12l-2.95-2.21Zm0 0L10 7.5v9l3.05-2.29L16 12l-2.95-2.21Zm0 0L10 7.5v9l3.05-2.29L16 12l-2.95-2.21ZM11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69A7.941 7.941 0 0 1 11 4.07ZM5.69 7.1 4.26 5.68A9.949 9.949 0 0 0 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9ZM4.07 13H2.05c.2 2.01 1 3.84 2.21 5.32l1.43-1.43A7.868 7.868 0 0 1 4.07 13Zm1.61 6.74A9.981 9.981 0 0 0 11 21.95v-2.02a7.941 7.941 0 0 1-3.9-1.62l-1.42 1.43ZM22 12c0 5.16-3.92 9.42-8.95 9.95v-2.02C16.97 19.41 20 16.05 20 12s-3.03-7.41-6.95-7.93V2.05C18.08 2.58 22 6.84 22 12Z" />
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { ReactElement } from 'react';
|
|
2
|
+
import 'react-loading-skeleton/dist/skeleton.css';
|
|
3
|
+
export interface ISearchResult {
|
|
4
|
+
id: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ISearchGroupedResult {
|
|
8
|
+
id: string;
|
|
9
|
+
description: string;
|
|
10
|
+
label: string;
|
|
11
|
+
items: ISearchResult[];
|
|
12
|
+
}
|
|
13
|
+
export interface ISearchInputProps {
|
|
14
|
+
minCharactersForSearch: number;
|
|
15
|
+
placeholderText: string;
|
|
16
|
+
onSelectOption: (selectedOption: ISearchResult) => void;
|
|
17
|
+
getOptions: (inputValue: string) => Promise<ISearchResult[] | ISearchGroupedResult[]>;
|
|
18
|
+
renderItem: (item: ISearchResult) => ReactElement;
|
|
19
|
+
disclaimer?: string;
|
|
20
|
+
initialValue?: string;
|
|
21
|
+
inputTransformer?: (input: string) => string;
|
|
22
|
+
}
|
|
23
|
+
export declare function isGroupedResult(result: ISearchResult[] | ISearchGroupedResult[]): result is ISearchGroupedResult[];
|
|
24
|
+
export declare const LuiSearchInput: React.FC<ISearchInputProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactElement, RefObject } from 'react';
|
|
2
|
+
import { ISearchGroupedResult, ISearchResult } from './LuiSearchInput';
|
|
3
|
+
export interface IResultsProps {
|
|
4
|
+
selectedId: string;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
onClick: (id: string) => void;
|
|
7
|
+
setSelectedId: (id: string) => void;
|
|
8
|
+
renderItem: (item: ISearchResult) => ReactElement;
|
|
9
|
+
results: ISearchResult[] | ISearchGroupedResult[];
|
|
10
|
+
selectedRef: RefObject<HTMLDivElement>;
|
|
11
|
+
}
|
|
12
|
+
declare const ResultsDisplay: React.FC<IResultsProps>;
|
|
13
|
+
export default ResultsDisplay;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MenuHeaderProps } from '@szhsin/react-menu';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
export declare type MenuItemType = {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
export declare 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) => JSX.Element;
|
|
14
|
+
export declare const LuiSelectMenuDivider: () => JSX.Element;
|
|
15
|
+
export declare const LuiSelectMenuHeader: (props: MenuHeaderProps) => JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MenuItemProps, MenuProps, SubMenuProps } from '@szhsin/react-menu';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface ILuiSelectMenuItemProps extends MenuItemProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
iconName?: string;
|
|
6
|
+
level?: 'primary' | 'error';
|
|
7
|
+
iconAlt?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
showHeader?: boolean;
|
|
10
|
+
noPadding?: boolean;
|
|
11
|
+
'data-testid'?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const LuiSelectMenu: ({ ...props }: MenuProps) => JSX.Element;
|
|
14
|
+
export declare const LuiSelectMenuItem: ({ iconName, iconAlt, level, noPadding, ...rest }: ILuiSelectMenuItemProps) => JSX.Element;
|
|
15
|
+
export interface ILuiSelectSubMenuItemProps extends SubMenuProps {
|
|
16
|
+
iconName?: string;
|
|
17
|
+
iconAlt?: string;
|
|
18
|
+
label: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const LuiSelectSubMenuItem: ({ label, iconName, iconAlt, ...rest }: ILuiSelectSubMenuItemProps) => JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export * from './contexts/LuiMessagingContextProvider';
|
|
|
6
6
|
export { LuiButtonGroup } from './components/LuiButton/LuiButton';
|
|
7
7
|
export { LuiExpandableBanner } from './components/LuiExpandableBanner/LuiExpandableBanner';
|
|
8
8
|
export { LuiMenu, LuiControlledMenu } from './components/LuiMenu/LuiMenu';
|
|
9
|
+
export { LuiSelectMenu, LuiSelectMenuItem, LuiSelectSubMenuItem, } from './components/LuiSelectMenu/LuiSelectMenu';
|
|
10
|
+
export { LuiSelectDataMenu } from './components/LuiSelectMenu/LuiSelectDataMenu';
|
|
9
11
|
export { LuiFilterMenu } from './components/LuiFilterMenu/LuiFilterMenu';
|
|
10
12
|
export { LuiTabs, LuiTabsContext } from './components/LuiTabs/LuiTabs';
|
|
11
13
|
export { LuiTab } from './components/LuiTabs/LuiTab/LuiTab';
|
|
@@ -35,6 +37,7 @@ export * from './components/LuiHeader/LuiHeader';
|
|
|
35
37
|
export * from './components/LuiHeaderMenu/LuiHeaderMenus';
|
|
36
38
|
export { LuiUpdatesSplashModal } from './components/LuiUpdateSplashModal/LuiUpdatesSplashModal';
|
|
37
39
|
export { LuiModal, LuiAlertModal, LuiAlertModalButtons, } from './components/LuiModal/LuiModal';
|
|
40
|
+
export { ISearchInputProps, ISearchGroupedResult, ISearchResult, LuiSearchInput, } from './components/LuiSearchInput/LuiSearchInput';
|
|
38
41
|
export { LuiErrorPage } from './components/LuiErrorPage/LuiErrorPage';
|
|
39
42
|
export * from './components/LuiLoadingSpinner/LuiLoadingSpinner';
|
|
40
43
|
export { LOLFirmSwitcherMenu } from './components/lol/LOLFirmSwitcher';
|