@trii/components 2.0.3
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/cjs/index.js +14323 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/components/ContactInfoPopup/ContactInfoPopup.d.ts +13 -0
- package/dist/cjs/types/components/ContactInfoPopup/components/ContactMethod/ContactMethod.d.ts +10 -0
- package/dist/cjs/types/components/ContactInfoPopup/components/ContactMethod/index.d.ts +1 -0
- package/dist/cjs/types/components/ContactInfoPopup/components/Header/Header.d.ts +10 -0
- package/dist/cjs/types/components/ContactInfoPopup/components/Header/index.d.ts +1 -0
- package/dist/cjs/types/components/ContactInfoPopup/components/Properties/Properties.d.ts +7 -0
- package/dist/cjs/types/components/ContactInfoPopup/components/Properties/index.d.ts +1 -0
- package/dist/cjs/types/components/ContactInfoPopup/components/index.d.ts +3 -0
- package/dist/cjs/types/components/ContactInfoPopup/index.d.ts +1 -0
- package/dist/cjs/types/components/TextBox/TestBox.d.ts +8 -0
- package/dist/cjs/types/components/TextBox/index.d.ts +1 -0
- package/dist/cjs/types/components/index.d.ts +2 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/esm/index.js +14302 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/components/ContactInfoPopup/ContactInfoPopup.d.ts +13 -0
- package/dist/esm/types/components/ContactInfoPopup/components/ContactMethod/ContactMethod.d.ts +10 -0
- package/dist/esm/types/components/ContactInfoPopup/components/ContactMethod/index.d.ts +1 -0
- package/dist/esm/types/components/ContactInfoPopup/components/Header/Header.d.ts +10 -0
- package/dist/esm/types/components/ContactInfoPopup/components/Header/index.d.ts +1 -0
- package/dist/esm/types/components/ContactInfoPopup/components/Properties/Properties.d.ts +7 -0
- package/dist/esm/types/components/ContactInfoPopup/components/Properties/index.d.ts +1 -0
- package/dist/esm/types/components/ContactInfoPopup/components/index.d.ts +3 -0
- package/dist/esm/types/components/ContactInfoPopup/index.d.ts +1 -0
- package/dist/esm/types/components/TextBox/TestBox.d.ts +8 -0
- package/dist/esm/types/components/TextBox/index.d.ts +1 -0
- package/dist/esm/types/components/index.d.ts +2 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/index.d.ts +24 -0
- package/package.json +99 -0
- package/readme +71 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IContact } from '@trii/types/dist/Contacts';
|
|
3
|
+
export interface ContactInfoPopupProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
anchorEl: HTMLElement | null;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
t?: (key: string) => string;
|
|
8
|
+
contactData?: IContact;
|
|
9
|
+
avatarImgUrl?: string;
|
|
10
|
+
handleNavigateToContacts?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const ContactInfoPopup: ({ open, anchorEl, onClose, contactData, avatarImgUrl, handleNavigateToContacts, t, }: ContactInfoPopupProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default ContactInfoPopup;
|
package/dist/esm/types/components/ContactInfoPopup/components/ContactMethod/ContactMethod.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IContactAddress } from '@trii/types/dist/Contacts';
|
|
3
|
+
interface ContactProps {
|
|
4
|
+
contactList: IContactAddress[];
|
|
5
|
+
title?: string;
|
|
6
|
+
showTitle?: boolean;
|
|
7
|
+
icon: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const ContactMethod: ({ icon, contactList, title, showTitle, }: ContactProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default ContactMethod;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ContactMethod';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type HeaderProps = {
|
|
3
|
+
imgUrl: string | undefined;
|
|
4
|
+
name: string | undefined;
|
|
5
|
+
contactId: string | undefined;
|
|
6
|
+
t: (key: string) => string;
|
|
7
|
+
handleNavigateToContacts: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const Header: ({ handleNavigateToContacts, imgUrl, name, contactId, t, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default Header;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Header';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Properties';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ContactInfoPopup';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TestBox';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { IContact } from '@trii/types/dist/Contacts';
|
|
4
|
+
|
|
5
|
+
interface TestBoxProps {
|
|
6
|
+
/**
|
|
7
|
+
* Color of the box background
|
|
8
|
+
*/
|
|
9
|
+
bgColor?: 'red' | 'blue' | 'green';
|
|
10
|
+
}
|
|
11
|
+
declare const TestBox: ({ bgColor }: TestBoxProps) => react_jsx_runtime.JSX.Element;
|
|
12
|
+
|
|
13
|
+
interface ContactInfoPopupProps {
|
|
14
|
+
open: boolean;
|
|
15
|
+
anchorEl: HTMLElement | null;
|
|
16
|
+
onClose: () => void;
|
|
17
|
+
t?: (key: string) => string;
|
|
18
|
+
contactData?: IContact;
|
|
19
|
+
avatarImgUrl?: string;
|
|
20
|
+
handleNavigateToContacts?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
21
|
+
}
|
|
22
|
+
declare const ContactInfoPopup: ({ open, anchorEl, onClose, contactData, avatarImgUrl, handleNavigateToContacts, t, }: ContactInfoPopupProps) => react_jsx_runtime.JSX.Element;
|
|
23
|
+
|
|
24
|
+
export { ContactInfoPopup, TestBox };
|
package/package.json
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trii/components",
|
|
3
|
+
"version": "2.0.3",
|
|
4
|
+
"description": "Trii components package",
|
|
5
|
+
"main": "dist/cjs/index.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"dev": "rollup -c --watch",
|
|
13
|
+
"build": "rollup -c",
|
|
14
|
+
"test": "jest --watchAll --verbose",
|
|
15
|
+
"storybook": "storybook dev -p 6006",
|
|
16
|
+
"build-storybook": "storybook build"
|
|
17
|
+
},
|
|
18
|
+
"author": "Ezequiel",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"babel": {
|
|
21
|
+
"sourceType": "unambiguous",
|
|
22
|
+
"presets": [
|
|
23
|
+
[
|
|
24
|
+
"@babel/preset-env",
|
|
25
|
+
{
|
|
26
|
+
"targets": {
|
|
27
|
+
"chrome": 100,
|
|
28
|
+
"safari": 15,
|
|
29
|
+
"firefox": 91
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
"@babel/preset-react",
|
|
35
|
+
{
|
|
36
|
+
"runtime": "automatic"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"@babel/preset-typescript"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"postcss": {
|
|
43
|
+
"plugins": {
|
|
44
|
+
"postcss-import": {}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@babel/core": "^7.23.0",
|
|
49
|
+
"@babel/preset-env": "^7.22.20",
|
|
50
|
+
"@babel/preset-react": "^7.22.15",
|
|
51
|
+
"@babel/preset-typescript": "^7.23.0",
|
|
52
|
+
"@emotion/react": "^11.11.4",
|
|
53
|
+
"@emotion/styled": "^11.11.5",
|
|
54
|
+
"@fontsource/material-icons": "^5.0.18",
|
|
55
|
+
"@fontsource/roboto": "^5.0.13",
|
|
56
|
+
"@mui/icons-material": "^5.15.15",
|
|
57
|
+
"@mui/material": "^5.15.15",
|
|
58
|
+
"@rollup/plugin-commonjs": "^25.0.4",
|
|
59
|
+
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
60
|
+
"@rollup/plugin-typescript": "^11.1.4",
|
|
61
|
+
"@storybook/addon-essentials": "^8.5.3",
|
|
62
|
+
"@storybook/addon-interactions": "^8.5.3",
|
|
63
|
+
"@storybook/addon-links": "^8.5.3",
|
|
64
|
+
"@storybook/addon-onboarding": "^8.5.3",
|
|
65
|
+
"@storybook/addon-themes": "^8.5.3",
|
|
66
|
+
"@storybook/addon-webpack5-compiler-babel": "^3.0.5",
|
|
67
|
+
"@storybook/addon-webpack5-compiler-swc": "^2.0.0",
|
|
68
|
+
"@storybook/blocks": "^8.5.3",
|
|
69
|
+
"@storybook/react": "^8.5.3",
|
|
70
|
+
"@storybook/react-webpack5": "^8.5.3",
|
|
71
|
+
"@storybook/test": "^8.5.3",
|
|
72
|
+
"@testing-library/jest-dom": "^6.1.3",
|
|
73
|
+
"@testing-library/react": "^14.0.0",
|
|
74
|
+
"@types/jest": "^29.5.5",
|
|
75
|
+
"@types/react": "^18.2.23",
|
|
76
|
+
"babel-jest": "^29.7.0",
|
|
77
|
+
"jest": "^29.7.0",
|
|
78
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
79
|
+
"postcss": "^8.4.31",
|
|
80
|
+
"postcss-import": "^15.1.0",
|
|
81
|
+
"react": "^18.2.0",
|
|
82
|
+
"react-dom": "^18.2.0",
|
|
83
|
+
"rollup": "^3.29.4",
|
|
84
|
+
"rollup-plugin-dts": "^6.0.2",
|
|
85
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
86
|
+
"storybook": "^8.5.3",
|
|
87
|
+
"tslib": "^2.6.2",
|
|
88
|
+
"typescript": "^5.2.2"
|
|
89
|
+
},
|
|
90
|
+
"peerDependencies": {
|
|
91
|
+
"@emotion/react": "^11.11.4",
|
|
92
|
+
"react": ">=17.0.2 <19.0.0",
|
|
93
|
+
"react-dom": ">=17.0.2 <19.0.0"
|
|
94
|
+
},
|
|
95
|
+
"dependencies": {
|
|
96
|
+
"@trii/types": "^2.10.398",
|
|
97
|
+
"moment": "^2.30.1"
|
|
98
|
+
}
|
|
99
|
+
}
|
package/readme
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Trii Components
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
|
|
5
|
+
This project contains reusable components for the Trii application.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- Node.js (v14 or higher)
|
|
10
|
+
- npm (v6 or higher) or yarn (v1.22 or higher)
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
1. Clone the repository:
|
|
15
|
+
```sh
|
|
16
|
+
git clone https://github.com/yourusername/trii-components.git
|
|
17
|
+
```
|
|
18
|
+
2. Navigate to the project directory:
|
|
19
|
+
```sh
|
|
20
|
+
cd trii-components
|
|
21
|
+
```
|
|
22
|
+
3. Install dependencies:
|
|
23
|
+
```sh
|
|
24
|
+
npm install
|
|
25
|
+
```
|
|
26
|
+
or
|
|
27
|
+
```sh
|
|
28
|
+
yarn install
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Running the Project
|
|
32
|
+
|
|
33
|
+
To start the development server, run:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
npm run storybook
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
or
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
yarn storybook
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Building the Project
|
|
46
|
+
|
|
47
|
+
To build the project, run:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
npm run build
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
or
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
yarn build
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Upload build to NPM
|
|
60
|
+
|
|
61
|
+
To upload the build to NPM, run:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
npm publish
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
or
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
yarn publish
|
|
71
|
+
```
|