@nextelco/common-ui 1.7.171 → 1.7.174
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/dist/084688f4083437c38a98.ttf +0 -0
- package/dist/28937b70005aac17035d.ttf +0 -0
- package/dist/5f9e53103764bd328f6c.ttf +0 -0
- package/dist/bundle.js +1 -1
- package/dist/bundle.js.LICENSE.txt +28 -0
- package/dist/types/components/atoms/Acronym/Acronym.d.ts +4 -1
- package/dist/types/components/atoms/Button/variants/ActionButton.d.ts +5 -5
- package/dist/types/components/atoms/Button/variants/FilterButton.d.ts +2 -1
- package/dist/types/components/atoms/Button/variants/IconButton.d.ts +4 -1
- package/dist/types/components/atoms/Button/variants/MainButton.d.ts +15 -0
- package/dist/types/components/atoms/Button/variants/TabButton.d.ts +2 -1
- package/dist/types/components/atoms/IconText/IconText.d.ts +11 -0
- package/dist/types/components/atoms/Input/Input.d.ts +12 -0
- package/dist/types/components/atoms/MultiTagPickerTag/MultiTagPickerTag.d.ts +10 -0
- package/dist/types/components/atoms/SearchSelect/SearchSelect.d.ts +15 -0
- package/dist/types/components/atoms/Stack/Stack.d.ts +1 -1
- package/dist/types/components/atoms/Switch/CustomSwitch.d.ts +2 -0
- package/dist/types/components/atoms/Tooltip/Tooltip.d.ts +1 -1
- package/dist/types/components/layout/Footer/Footer.d.ts +1 -5
- package/dist/types/components/layout/Header/Header.d.ts +12 -13
- package/dist/types/components/molecules/ConfirmModal/ConfirmModal.d.ts +11 -0
- package/dist/types/components/molecules/Modal/Modal.d.ts +10 -0
- package/dist/types/components/molecules/MultiTagPicker/MultiTagPicker.d.ts +23 -0
- package/dist/types/components/molecules/Search/Search.d.ts +7 -0
- package/dist/types/components/molecules/Sidebar/Sidebar.d.ts +11 -0
- package/dist/types/components/organisms/LazyLoader/LazyLoader.d.ts +15 -0
- package/dist/types/components/organisms/Profile/Profile.d.ts +3 -2
- package/dist/types/components/organisms/Selector/Selector.d.ts +19 -0
- package/dist/types/constants/Colors.d.ts +28 -0
- package/dist/types/constants/FontWeight.d.ts +8 -0
- package/dist/types/contexts/apiContext.d.ts +1 -0
- package/dist/types/contexts/authContext.d.ts +19 -15
- package/dist/types/contexts/socketContext.d.ts +14 -0
- package/dist/types/exports/assets.d.ts +0 -0
- package/dist/types/exports/atoms.d.ts +15 -0
- package/dist/types/exports/constants.d.ts +0 -0
- package/dist/types/exports/contexts.d.ts +3 -0
- package/dist/types/exports/hooks.d.ts +2 -0
- package/dist/types/exports/layout.d.ts +4 -0
- package/dist/types/exports/molecules.d.ts +4 -0
- package/dist/types/exports/organisms.d.ts +3 -0
- package/dist/types/exports/pages.d.ts +3 -0
- package/dist/types/exports/styles.d.ts +2 -0
- package/dist/types/exports/types.d.ts +7 -0
- package/dist/types/exports/utils.d.ts +1 -0
- package/dist/types/hooks/useApi.d.ts +3 -1
- package/dist/types/index.d.ts +10 -32
- package/dist/types/pages/Error/ErrorPage.d.ts +1 -0
- package/dist/types/styles/themes/ButtonThemes.d.ts +6 -0
- package/dist/types/styles/utils/utils.d.ts +1 -0
- package/dist/types/types/Fetcher.d.ts +4 -0
- package/dist/types/types/SelectableElement.d.ts +6 -0
- package/dist/types/types/SidebarMenu.d.ts +10 -0
- package/dist/types/types/themes/AcronymThemes.d.ts +3 -0
- package/dist/types/types/themes/ButtonThemes.d.ts +18 -0
- package/dist/types/types/themes/CustomSwitchThemes.d.ts +3 -0
- package/dist/types/types/themes/IconTextThemes.d.ts +5 -0
- package/dist/types/utils/stringUtils.d.ts +3 -0
- package/package.json +1 -1
- package/dist/types/components/atoms/Acronym/Acronym.stories.d.ts +0 -8
- package/dist/types/components/atoms/BreadCrumb/BreadCrumb.stories.d.ts +0 -10
- package/dist/types/components/atoms/Button/Button.d.ts +0 -18
- package/dist/types/components/atoms/Button/Button.stories.d.ts +0 -48
- package/dist/types/components/atoms/Button/variants/ActionButton.stories.d.ts +0 -8
- package/dist/types/components/atoms/Button/variants/FilterButton.stories.d.ts +0 -7
- package/dist/types/components/atoms/Button/variants/IconButton.stories.d.ts +0 -7
- package/dist/types/components/atoms/Button/variants/NavButton.d.ts +0 -9
- package/dist/types/components/atoms/Button/variants/NavButton.stories.d.ts +0 -7
- package/dist/types/components/atoms/Button/variants/TabButton.stories.d.ts +0 -7
- package/dist/types/components/atoms/Card/Card1.d.ts +0 -15
- package/dist/types/components/atoms/Card/Card1.stories.d.ts +0 -6
- package/dist/types/components/atoms/Card/Card2.d.ts +0 -16
- package/dist/types/components/atoms/Card/Card2.stories.d.ts +0 -6
- package/dist/types/components/atoms/Card/Card3.d.ts +0 -17
- package/dist/types/components/atoms/Card/Card3.stories.d.ts +0 -6
- package/dist/types/components/atoms/Card/Card4.d.ts +0 -17
- package/dist/types/components/atoms/Card/Card4.stories.d.ts +0 -6
- package/dist/types/components/atoms/Card/Card5.d.ts +0 -16
- package/dist/types/components/atoms/Card/Card5.stories.d.ts +0 -6
- package/dist/types/components/atoms/Card/Card6.d.ts +0 -20
- package/dist/types/components/atoms/Card/Card6.stories.d.ts +0 -6
- package/dist/types/components/atoms/Field/Field.stories.d.ts +0 -9
- package/dist/types/components/atoms/Label/Label.stories.d.ts +0 -19
- package/dist/types/components/atoms/Select/Select.stories.d.ts +0 -14
- package/dist/types/components/atoms/Stack/Stack.stories.d.ts +0 -21
- package/dist/types/components/atoms/Switch/CustomSwitch.stories.d.ts +0 -7
- package/dist/types/components/atoms/Tooltip/Tooltip.stories.d.ts +0 -6
- package/dist/types/components/layout/Error/Error.stories.d.ts +0 -10
- package/dist/types/components/layout/Footer/Footer.stories.d.ts +0 -6
- package/dist/types/components/layout/Header/Header.stories.d.ts +0 -8
- package/dist/types/components/layout/Spinner/Spinner.stories.d.ts +0 -6
- package/dist/types/components/moleculas/FormItem/FormItem.d.ts +0 -12
- package/dist/types/components/moleculas/FormItem/FormItem.stories.d.ts +0 -7
- package/dist/types/components/moleculas/Modal/Modal.d.ts +0 -8
- package/dist/types/components/moleculas/Modal/Modal.stories.d.ts +0 -6
- package/dist/types/components/moleculas/Operators/Operators.d.ts +0 -15
- package/dist/types/components/moleculas/Operators/Operators.stories.d.ts +0 -8
- package/dist/types/components/organisms/LazyLoading/LazyLoading.d.ts +0 -15
- package/dist/types/components/organisms/Profile/Profile.stories.d.ts +0 -8
- package/dist/types/pages/Error/ErrorPage.stories.d.ts +0 -7
- package/dist/types/pages/Loading/Loading.stories.d.ts +0 -8
- package/dist/types/pages/NotFound/NotFound.stories.d.ts +0 -6
- package/dist/types/types/ButtonTheme.d.ts +0 -5
|
@@ -1,9 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* React Tooltip
|
|
3
|
+
* {@link https://github.com/ReactTooltip/react-tooltip}
|
|
4
|
+
* @copyright ReactTooltip Team
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/*!
|
|
9
|
+
Copyright (c) 2018 Jed Watson.
|
|
10
|
+
Licensed under the MIT License (MIT), see
|
|
11
|
+
http://jedwatson.github.io/classnames
|
|
12
|
+
*/
|
|
13
|
+
|
|
1
14
|
/*!
|
|
2
15
|
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
|
3
16
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
4
17
|
* Copyright 2024 Fonticons, Inc.
|
|
5
18
|
*/
|
|
6
19
|
|
|
20
|
+
/*! *****************************************************************************
|
|
21
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
22
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
23
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
24
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
|
|
26
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
27
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
28
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
29
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
30
|
+
|
|
31
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
32
|
+
and limitations under the License.
|
|
33
|
+
***************************************************************************** */
|
|
34
|
+
|
|
7
35
|
/*! js-cookie v3.0.5 | MIT */
|
|
8
36
|
|
|
9
37
|
/**
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { AcronymTheme } from '../../../types/themes/AcronymThemes';
|
|
2
3
|
import './Acronym.scss';
|
|
3
4
|
type Props = {
|
|
4
5
|
name: string;
|
|
6
|
+
acronymOnly?: boolean;
|
|
7
|
+
theme: AcronymTheme;
|
|
5
8
|
};
|
|
6
|
-
declare const Acronym: ({ name }: Props) => React.JSX.Element;
|
|
9
|
+
declare const Acronym: ({ name, acronymOnly, theme }: Props) => React.JSX.Element;
|
|
7
10
|
export default Acronym;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { ButtonTheme } from '../../../../types/ButtonTheme';
|
|
3
|
+
import { ActionButtonTheme } from '../../../../types/themes/ButtonThemes';
|
|
5
4
|
import './ActionButton.scss';
|
|
6
5
|
type Props = PropsWithChildren<{
|
|
7
|
-
icon
|
|
6
|
+
icon?: React.ReactNode;
|
|
8
7
|
title: string;
|
|
9
|
-
theme:
|
|
8
|
+
theme: ActionButtonTheme;
|
|
10
9
|
onClick: () => void;
|
|
10
|
+
disabled?: boolean;
|
|
11
11
|
}>;
|
|
12
|
-
declare const ActionButton: ({ icon, title, theme, onClick }: Props) => React.JSX.Element;
|
|
12
|
+
declare const ActionButton: ({ icon, title, theme, onClick, disabled, }: Props) => React.JSX.Element;
|
|
13
13
|
export default ActionButton;
|
|
@@ -5,6 +5,7 @@ type Props = PropsWithChildren<{
|
|
|
5
5
|
title: string;
|
|
6
6
|
selected: boolean;
|
|
7
7
|
onClick: () => void;
|
|
8
|
+
disabled?: boolean;
|
|
8
9
|
}>;
|
|
9
|
-
declare const FilterButton: ({ title, selected, onClick }: Props) => React.JSX.Element;
|
|
10
|
+
declare const FilterButton: ({ title, selected, onClick, disabled, }: Props) => React.JSX.Element;
|
|
10
11
|
export default FilterButton;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
4
|
+
import { IconButtonTheme } from '../../../../types/themes/ButtonThemes';
|
|
4
5
|
import './IconButton.scss';
|
|
5
6
|
type Props = PropsWithChildren<{
|
|
6
7
|
icon: IconProp;
|
|
7
8
|
onClick: () => void;
|
|
9
|
+
theme: IconButtonTheme;
|
|
10
|
+
disabled?: boolean;
|
|
8
11
|
}>;
|
|
9
|
-
declare const IconButton: ({ icon, onClick }: Props) => React.JSX.Element;
|
|
12
|
+
declare const IconButton: ({ icon, onClick, theme, disabled }: Props) => React.JSX.Element;
|
|
10
13
|
export default IconButton;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
4
|
+
import { MainButtonTheme } from '../../../../types/themes/ButtonThemes';
|
|
5
|
+
import './MainButton.scss';
|
|
6
|
+
type Props = PropsWithChildren<{
|
|
7
|
+
icon: IconProp;
|
|
8
|
+
title: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
theme: MainButtonTheme;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
declare const MainButton: ({ icon, title, description, theme, onClick, disabled, }: Props) => React.JSX.Element;
|
|
15
|
+
export default MainButton;
|
|
@@ -7,6 +7,7 @@ type Props = PropsWithChildren<{
|
|
|
7
7
|
title: string;
|
|
8
8
|
selected: boolean;
|
|
9
9
|
onClick: () => void;
|
|
10
|
+
disabled?: boolean;
|
|
10
11
|
}>;
|
|
11
|
-
declare const TabButton: ({ icon, title, selected, onClick }: Props) => React.JSX.Element;
|
|
12
|
+
declare const TabButton: ({ icon, title, selected, onClick, disabled }: Props) => React.JSX.Element;
|
|
12
13
|
export default TabButton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
import './IconText.scss';
|
|
4
|
+
import { IconTextTheme } from '../../../types/themes/IconTextThemes';
|
|
5
|
+
interface IconTextProps {
|
|
6
|
+
icon: IconProp;
|
|
7
|
+
text: string;
|
|
8
|
+
theme: IconTextTheme;
|
|
9
|
+
}
|
|
10
|
+
declare const IconText: React.FC<IconTextProps>;
|
|
11
|
+
export default IconText;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ChangeEvent } from 'react';
|
|
2
|
+
import './Input.scss';
|
|
3
|
+
type Props = {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
onBlur?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
type?: 'number' | 'text';
|
|
8
|
+
value?: string | number | null;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const Input: ({ placeholder, onChange, onBlur, type, value, disabled, }: Props) => React.JSX.Element;
|
|
12
|
+
export default Input;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './MultiTagPickerTag.scss';
|
|
3
|
+
interface TagProps {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
selected: boolean;
|
|
7
|
+
handleTagChange: (changedTo: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const Select: React.FC<TagProps>;
|
|
10
|
+
export default Select;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './SearchSelect.scss';
|
|
3
|
+
interface Option {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
type Props = {
|
|
8
|
+
placeholder: string;
|
|
9
|
+
options: Option[];
|
|
10
|
+
option: string;
|
|
11
|
+
onChange: (value: string) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare function SearchSelect({ placeholder, options, option, disabled, onChange, }: Props): React.JSX.Element;
|
|
15
|
+
export default SearchSelect;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { CustomSwitchTheme } from '../../../types/themes/CustomSwitchThemes';
|
|
2
3
|
import './CustomSwitch.scss';
|
|
3
4
|
type CustomSwitchProps = {
|
|
4
5
|
label: string;
|
|
5
6
|
activated: boolean;
|
|
6
7
|
onChange: () => void;
|
|
8
|
+
theme: CustomSwitchTheme;
|
|
7
9
|
};
|
|
8
10
|
declare const CustomSwitch: React.FC<CustomSwitchProps>;
|
|
9
11
|
export default CustomSwitch;
|
|
@@ -3,9 +3,9 @@ import 'react-tooltip/dist/react-tooltip.css';
|
|
|
3
3
|
import './Tooltip.scss';
|
|
4
4
|
interface TooltipWrapperProps {
|
|
5
5
|
id?: string;
|
|
6
|
-
tip: string;
|
|
7
6
|
interactive?: boolean;
|
|
8
7
|
disabled?: boolean;
|
|
8
|
+
tip: ReactNode;
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
}
|
|
11
11
|
declare const TooltipWrapper: React.FC<TooltipWrapperProps>;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
3
2
|
import './Footer.scss';
|
|
4
|
-
|
|
5
|
-
footerImg: string;
|
|
6
|
-
}>;
|
|
7
|
-
declare const Footer: ({ footerImg }: Props) => React.JSX.Element;
|
|
3
|
+
declare const Footer: () => React.JSX.Element;
|
|
8
4
|
export default Footer;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
3
|
-
import { LoggedUser } from '../../../types/LoggedUser';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
4
2
|
import './Header.scss';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
4
|
+
type Props = {
|
|
5
|
+
title: string;
|
|
6
|
+
subTitle?: string;
|
|
7
|
+
icon?: IconProp;
|
|
8
|
+
sideBar: boolean;
|
|
9
|
+
handleSideBar: () => void;
|
|
10
|
+
profile: ReactNode;
|
|
11
|
+
handleHome: () => void;
|
|
12
|
+
};
|
|
13
|
+
declare const Header: ({ title, subTitle, icon, sideBar, handleSideBar, profile, handleHome, }: Props) => React.JSX.Element;
|
|
15
14
|
export default Header;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import './ConfirmModal.scss';
|
|
3
|
+
interface ConfirmModal {
|
|
4
|
+
title: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
handleCancel: () => void;
|
|
7
|
+
handleConfirm: () => void;
|
|
8
|
+
working: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function ConfirmModal({ title, children, handleCancel, handleConfirm, working, }: ConfirmModal): React.JSX.Element;
|
|
11
|
+
export default ConfirmModal;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Modal.scss';
|
|
3
|
+
declare const Modal: React.ForwardRefExoticComponent<{
|
|
4
|
+
title: string;
|
|
5
|
+
modalOnly?: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
} & {
|
|
8
|
+
children?: React.ReactNode | undefined;
|
|
9
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default Modal;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './MultiTagPicker.scss';
|
|
3
|
+
export interface Option {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface MultiTagPickerProps {
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
noOptionsLabel?: string;
|
|
10
|
+
searchInput: string;
|
|
11
|
+
editable: boolean;
|
|
12
|
+
loading: boolean;
|
|
13
|
+
optionsSelected: Option[];
|
|
14
|
+
options: Option[];
|
|
15
|
+
hasMoreItems: boolean;
|
|
16
|
+
handleInputKeyDown?: () => void;
|
|
17
|
+
handleInputChange?: (input: string) => void;
|
|
18
|
+
handleRemoveItem: (itemId: string) => void;
|
|
19
|
+
handleAddItem: (item: Option) => void;
|
|
20
|
+
loadMore?: () => void;
|
|
21
|
+
}
|
|
22
|
+
declare const MultiTagPicker: React.FC<MultiTagPickerProps>;
|
|
23
|
+
export default MultiTagPicker;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import './Sidebar.scss';
|
|
3
|
+
interface SidebarProps {
|
|
4
|
+
title: string;
|
|
5
|
+
isHome: boolean;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const Sidebar: React.FC<SidebarProps>;
|
|
11
|
+
export default Sidebar;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
interface LazyLoaderProps<T> {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
params?: Record<string, unknown>;
|
|
5
|
+
children: (items: T[], loading: boolean, error: ReactNode | null) => ReactNode;
|
|
6
|
+
scrollableTarget?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
height?: number | string;
|
|
9
|
+
scrollThreshold?: number | string;
|
|
10
|
+
limit?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const LazyLoader: <T extends {
|
|
13
|
+
id: string | number;
|
|
14
|
+
}>({ endpoint, params, children, scrollableTarget, className, height, scrollThreshold, limit, }: LazyLoaderProps<T>) => React.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { LoggedUser } from '../../../types/LoggedUser';
|
|
3
3
|
import './Profile.scss';
|
|
4
4
|
type Props = {
|
|
5
5
|
user: LoggedUser;
|
|
6
6
|
handleLogout: () => void;
|
|
7
|
+
notifications?: ReactNode;
|
|
7
8
|
};
|
|
8
|
-
declare const Profile: ({ user, handleLogout }: Props) => React.JSX.Element;
|
|
9
|
+
declare const Profile: ({ user, handleLogout, notifications }: Props) => React.JSX.Element;
|
|
9
10
|
export default Profile;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
3
|
+
import { Fetcher } from '../../../types/Fetcher';
|
|
4
|
+
import './Selector.scss';
|
|
5
|
+
import { SelectableElement } from '../../../types/SelectableElement';
|
|
6
|
+
type SelectorProps<T extends SelectableElement> = {
|
|
7
|
+
title: string;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
onConfirm: (selected: T[]) => void;
|
|
10
|
+
onDisabled?: (disabled: T) => ReactNode;
|
|
11
|
+
initiallySelected: T[];
|
|
12
|
+
blocked?: string[];
|
|
13
|
+
single?: boolean;
|
|
14
|
+
icon: IconProp;
|
|
15
|
+
fetcher: Fetcher;
|
|
16
|
+
working?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const Selector: <T extends SelectableElement>({ title, icon, onClose, onConfirm, initiallySelected, blocked, fetcher, single, working, onDisabled, }: SelectorProps<T>) => React.JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare enum Color {
|
|
2
|
+
BRIGHT_BLUE = "#006fff",
|
|
3
|
+
BRIGHT_GREEN = "#17daa4",
|
|
4
|
+
DARK_BLUE = "#010060",
|
|
5
|
+
LIGHT_GRAY_01 = "#dddddd",
|
|
6
|
+
ALMOST_WHITE = "#f8f8f8",
|
|
7
|
+
ALMOST_BLACK = "#1f1f1f",
|
|
8
|
+
MEDIUM_BLUE = "#87a9ff",
|
|
9
|
+
MEDIUM_GREEN = "#b0ebdb",
|
|
10
|
+
MEDIUM_DARK_BLUE = "#7d7dab",
|
|
11
|
+
MEDIUM_GRAY_01 = "#c2c2c2",
|
|
12
|
+
LIGHT_GRAY_02 = "#ededed",
|
|
13
|
+
LIGHT_BLUE = "#cedcff",
|
|
14
|
+
DARK_GRAY = "#6c6c6c",
|
|
15
|
+
WARM_YELLOW = "#ebc25a",
|
|
16
|
+
WARM_ORANGE = "#eb745a",
|
|
17
|
+
LIGHT_YELLOW = "#ffedbf",
|
|
18
|
+
BRIGHT_PURPLE = "#801de2",
|
|
19
|
+
REJECTED = "#de4321",
|
|
20
|
+
APPROVED = "#1dc88a",
|
|
21
|
+
STAND_BY = "#ffcc4a",
|
|
22
|
+
BG_LIGHT_YELLOW = "#ffedbf",
|
|
23
|
+
DARK_YELLOW = "#856404",
|
|
24
|
+
BG_LIGHT_RED = "#ffbdae",
|
|
25
|
+
DARK_RED = "#842029",
|
|
26
|
+
BG_SUCCESS = "#8ef8d2",
|
|
27
|
+
DARK_green = "#0f5132"
|
|
28
|
+
}
|
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Keycloak from 'keycloak-js';
|
|
3
|
+
export interface LoggedUser {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
email: string;
|
|
7
|
+
roles: string[];
|
|
8
|
+
}
|
|
4
9
|
interface AuthContextProps {
|
|
5
|
-
keycloak:
|
|
10
|
+
keycloak: Keycloak | null;
|
|
6
11
|
user: LoggedUser | null;
|
|
7
12
|
authenticated: boolean;
|
|
8
13
|
loading: boolean;
|
|
9
14
|
login: () => void;
|
|
10
15
|
logout: () => void;
|
|
16
|
+
hasRole: (role: string) => boolean;
|
|
11
17
|
}
|
|
12
|
-
interface
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
export interface AuthProviderProps {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
keycloakConfig: {
|
|
21
|
+
url: string;
|
|
22
|
+
realm: string;
|
|
23
|
+
clientId: string;
|
|
24
|
+
};
|
|
25
|
+
allowedRoles: string[];
|
|
19
26
|
}
|
|
20
|
-
export declare const AuthProvider: React.FC<
|
|
21
|
-
children: ReactNode;
|
|
22
|
-
config: AuthProviderConfig;
|
|
23
|
-
}>;
|
|
27
|
+
export declare const AuthProvider: React.FC<AuthProviderProps>;
|
|
24
28
|
export declare const useAuth: () => AuthContextProps;
|
|
25
29
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { Socket } from 'socket.io-client';
|
|
3
|
+
interface SocketProviderProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
config: {
|
|
6
|
+
serverUrl: string;
|
|
7
|
+
path?: string;
|
|
8
|
+
transports?: string[];
|
|
9
|
+
query?: Record<string, string>;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare const SocketProvider: React.FC<SocketProviderProps>;
|
|
13
|
+
export declare const useSocket: () => Socket | null;
|
|
14
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { default as CustomSwitch } from '../components/atoms/Switch/CustomSwitch';
|
|
2
|
+
export { default as BreadCrumb } from '../components/atoms/BreadCrumb/BreadCrumb';
|
|
3
|
+
export { default as IconText } from '../components/atoms/IconText/IconText';
|
|
4
|
+
export { default as Acronym } from '../components/atoms/Acronym/Acronym';
|
|
5
|
+
export { default as Label } from '../components/atoms/Label/Label';
|
|
6
|
+
export { default as Field } from '../components/atoms/Field/Field';
|
|
7
|
+
export { default as Select } from '../components/atoms/Select/Select';
|
|
8
|
+
export { default as ActionButton } from '../components/atoms/Button/variants/ActionButton';
|
|
9
|
+
export { default as FilterButton } from '../components/atoms/Button/variants/FilterButton';
|
|
10
|
+
export { default as IconButton } from '../components/atoms/Button/variants/IconButton';
|
|
11
|
+
export { default as TabButton } from '../components/atoms/Button/variants/TabButton';
|
|
12
|
+
export { default as MainButton } from '../components/atoms/Button/variants/MainButton';
|
|
13
|
+
export { default as Stack } from '../components/atoms/Stack/Stack';
|
|
14
|
+
export { default as Tooltip } from '../components/atoms/Tooltip/Tooltip';
|
|
15
|
+
export { default as Input } from '../components/atoms/Input/Input';
|
|
File without changes
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as Header } from '../components/layout/Header/Header';
|
|
2
|
+
export { default as Footer } from '../components/layout/Footer/Footer';
|
|
3
|
+
export { default as Error } from '../components/layout/Error/Error';
|
|
4
|
+
export { default as Spinner } from '../components/layout/Spinner/Spinner';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as Modal } from '../components/molecules/Modal/Modal';
|
|
2
|
+
export { default as Sidebar } from '../components/molecules/Sidebar/Sidebar';
|
|
3
|
+
export { default as MultiTagPicker, Option, } from '../components/molecules/MultiTagPicker/MultiTagPicker';
|
|
4
|
+
export { default as ConfirmModal } from '../components/molecules/ConfirmModal/ConfirmModal';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { LoggedUser } from '../types/LoggedUser';
|
|
2
|
+
export { Menu, Submenu } from '../types/SidebarMenu';
|
|
3
|
+
export { Fetcher } from '../types/Fetcher';
|
|
4
|
+
export { IconTextTheme } from '../types/themes/IconTextThemes';
|
|
5
|
+
export { ActionButtonTheme, IconButtonTheme, MainButtonTheme, } from '../types/themes/ButtonThemes';
|
|
6
|
+
export { AcronymTheme } from '../types/themes/AcronymThemes';
|
|
7
|
+
export { CustomSwitchTheme } from '../types/themes/CustomSwitchThemes';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getAcronym, getFirstAndLastName, partialMatchWithUsername, } from '../utils/stringUtils';
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type AllowedMethods = 'get' | 'post' | 'put' | 'delete' | 'patch';
|
|
3
|
-
interface RequestOptions {
|
|
3
|
+
export interface RequestOptions {
|
|
4
4
|
method: AllowedMethods;
|
|
5
5
|
url: string;
|
|
6
6
|
body?: object | FormData;
|
|
7
7
|
params?: object;
|
|
8
8
|
responseType?: 'blob';
|
|
9
|
+
timeout?: number;
|
|
10
|
+
signal?: AbortSignal;
|
|
9
11
|
}
|
|
10
12
|
export declare const useApi: () => {
|
|
11
13
|
request: (options: RequestOptions) => Promise<any | null>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,32 +1,10 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export { default as Card6 } from './components/atoms/Card/Card6';
|
|
12
|
-
export { default as Select } from './components/atoms/Select/Select';
|
|
13
|
-
export { default as ActionButton } from './components/atoms/Button/variants/ActionButton';
|
|
14
|
-
export { default as FilterButton } from './components/atoms/Button/variants/FilterButton';
|
|
15
|
-
export { default as IconButton } from './components/atoms/Button/variants/IconButton';
|
|
16
|
-
export { default as NavButton } from './components/atoms/Button/variants/NavButton';
|
|
17
|
-
export { default as TabButton } from './components/atoms/Button/variants/TabButton';
|
|
18
|
-
export { default as Stack } from './components/atoms/Stack/Stack';
|
|
19
|
-
export { default as Modal } from './components/moleculas/Modal/Modal';
|
|
20
|
-
export { default as FormItem } from './components/moleculas/FormItem/FormItem';
|
|
21
|
-
export { default as Profile } from './components/organisms/Profile/Profile';
|
|
22
|
-
export { default as Header } from './components/layout/Header/Header';
|
|
23
|
-
export { default as Footer } from './components/layout/Footer/Footer';
|
|
24
|
-
export { default as Error } from './components/layout/Error/Error';
|
|
25
|
-
export { default as Spinner } from './components/layout/Spinner/Spinner';
|
|
26
|
-
export { default as LoadingPage } from './pages/Loading/Loading';
|
|
27
|
-
export { default as ErrorPage } from './pages/Error/ErrorPage';
|
|
28
|
-
export { useAuth, AuthProvider } from './contexts/authContext';
|
|
29
|
-
export { ApiProvider } from './contexts/apiContext';
|
|
30
|
-
export { useApi } from './hooks/useApi';
|
|
31
|
-
export { LoggedUser } from './types/LoggedUser';
|
|
32
|
-
export { ButtonTheme } from './types/ButtonTheme';
|
|
1
|
+
export * from './exports/atoms';
|
|
2
|
+
export * from './exports/molecules';
|
|
3
|
+
export * from './exports/organisms';
|
|
4
|
+
export * from './exports/layout';
|
|
5
|
+
export * from './exports/pages';
|
|
6
|
+
export * from './exports/contexts';
|
|
7
|
+
export * from './exports/hooks';
|
|
8
|
+
export * from './exports/types';
|
|
9
|
+
export * from './exports/styles';
|
|
10
|
+
export * from './exports/utils';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IconTextTheme } from '../../exports/types';
|
|
2
|
+
import { ActionButtonTheme, IconButtonTheme } from '../../types/themes/ButtonThemes';
|
|
3
|
+
export declare const ActionButtonThemeStyled: ActionButtonTheme;
|
|
4
|
+
export declare const IconButtonThemeStyled: IconButtonTheme;
|
|
5
|
+
export declare const IconTextDarkThemeStyled: IconTextTheme;
|
|
6
|
+
export declare const IconTextLightThemeStyled: IconTextTheme;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCSSVariable: (variable: string) => string;
|