@nextelco/common-ui 2.0.0 → 2.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/dist/bundle.js +1 -1
- package/dist/types/components/layout/Footer/Footer.d.ts +7 -1
- package/dist/types/components/molecules/PhotoAvatar/PhotoAvatar.d.ts +15 -0
- package/dist/types/components/molecules/UserAvatar/UserAvatar.d.ts +17 -0
- package/dist/types/exports/molecules.d.ts +2 -0
- package/package.json +18 -1
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './Footer.scss';
|
|
3
|
-
|
|
3
|
+
export interface FooterProps {
|
|
4
|
+
/** Nome do responsável pelo tratamento de dados (aviso RGPD). */
|
|
5
|
+
companyName?: string;
|
|
6
|
+
/** Email de contacto para exercer direitos RGPD. */
|
|
7
|
+
contactEmail?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Footer: React.FC<FooterProps>;
|
|
4
10
|
export default Footer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
oid?: string | null;
|
|
4
|
+
name?: string | null;
|
|
5
|
+
email?: string | null;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Avatar com a foto real do MS Graph (por oid). Fallback: iniciais (UserAvatar).
|
|
10
|
+
* O token do Graph é obtido via MSAL (`useMsal`) da app consumidora.
|
|
11
|
+
*
|
|
12
|
+
* Peers necessários: @azure/msal-react, @azure/msal-browser, @tanstack/react-query.
|
|
13
|
+
*/
|
|
14
|
+
export default function PhotoAvatar({ oid, name, email, className }: Props): React.JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface UserAvatarProps {
|
|
3
|
+
name?: string | null;
|
|
4
|
+
photo?: string | null;
|
|
5
|
+
email?: string | null;
|
|
6
|
+
company?: string | null;
|
|
7
|
+
jobTitle?: string | null;
|
|
8
|
+
department?: string | null;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Avatar de utilizador: mostra a foto (se disponível) ou as iniciais, com um
|
|
13
|
+
* cartão de detalhes em hover (via portal). Usa classes Tailwind — a app
|
|
14
|
+
* consumidora é responsável por gerar o CSS Tailwind.
|
|
15
|
+
*/
|
|
16
|
+
export default function UserAvatar({ name, photo, email, company, jobTitle, department, className, }: UserAvatarProps): React.JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -2,3 +2,5 @@ export { default as Modal } from '../components/molecules/Modal/Modal';
|
|
|
2
2
|
export { default as SidebarDrawer } from '../components/molecules/Sidebar/Sidebar';
|
|
3
3
|
export { default as MultiTagPicker, Option, } from '../components/molecules/MultiTagPicker/MultiTagPicker';
|
|
4
4
|
export { default as ConfirmModal } from '../components/molecules/ConfirmModal/ConfirmModal';
|
|
5
|
+
export { default as UserAvatar } from '../components/molecules/UserAvatar/UserAvatar';
|
|
6
|
+
export { default as PhotoAvatar } from '../components/molecules/PhotoAvatar/PhotoAvatar';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextelco/common-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/bundle.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -19,11 +19,27 @@
|
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"peerDependencies": {
|
|
22
|
+
"@azure/msal-browser": ">=3",
|
|
23
|
+
"@azure/msal-react": ">=2",
|
|
24
|
+
"@tanstack/react-query": ">=5",
|
|
22
25
|
"react": "^18.3.1",
|
|
23
26
|
"react-dom": "^18.3.1",
|
|
24
27
|
"react-router-dom": ">=6"
|
|
25
28
|
},
|
|
29
|
+
"peerDependenciesMeta": {
|
|
30
|
+
"@azure/msal-react": {
|
|
31
|
+
"optional": true
|
|
32
|
+
},
|
|
33
|
+
"@azure/msal-browser": {
|
|
34
|
+
"optional": true
|
|
35
|
+
},
|
|
36
|
+
"@tanstack/react-query": {
|
|
37
|
+
"optional": true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
26
40
|
"devDependencies": {
|
|
41
|
+
"@azure/msal-browser": "^5.17.3",
|
|
42
|
+
"@azure/msal-react": "^5.5.4",
|
|
27
43
|
"@chromatic-com/storybook": "^4.0.0",
|
|
28
44
|
"@storybook/addon-docs": "^9.0.0",
|
|
29
45
|
"@storybook/addon-interactions": "^8.6.14",
|
|
@@ -32,6 +48,7 @@
|
|
|
32
48
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.6",
|
|
33
49
|
"@storybook/addon-webpack5-compiler-swc": "^3.0.0",
|
|
34
50
|
"@storybook/react-webpack5": "^9.0.0",
|
|
51
|
+
"@tanstack/react-query": "^5.101.4",
|
|
35
52
|
"@types/js-cookie": "^3.0.6",
|
|
36
53
|
"@types/react": "^19.0.8",
|
|
37
54
|
"@types/react-dom": "^19.0.3",
|