@trii/components 2.0.3 → 2.0.6
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 +21 -15
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/ContactInfoPopup/ContactInfoPopup.d.ts +2 -0
- package/dist/esm/index.js +21 -15
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/ContactInfoPopup/ContactInfoPopup.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/package.json +99 -99
- package/readme +71 -71
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IContact } from '@trii/types/dist/Contacts';
|
|
3
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
4
|
export interface ContactInfoPopupProps {
|
|
4
5
|
open: boolean;
|
|
5
6
|
anchorEl: HTMLElement | null;
|
|
@@ -8,6 +9,7 @@ export interface ContactInfoPopupProps {
|
|
|
8
9
|
contactData?: IContact;
|
|
9
10
|
avatarImgUrl?: string;
|
|
10
11
|
handleNavigateToContacts?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
12
|
+
sx?: SxProps<Theme>;
|
|
11
13
|
}
|
|
12
14
|
declare const ContactInfoPopup: ({ open, anchorEl, onClose, contactData, avatarImgUrl, handleNavigateToContacts, t, }: ContactInfoPopupProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export default ContactInfoPopup;
|
package/dist/esm/index.js
CHANGED
|
@@ -8276,13 +8276,16 @@ var WhatsApp = createSvgIcon( /*#__PURE__*/jsxRuntimeExports.jsx("path", {
|
|
|
8276
8276
|
d: "M16.75 13.96c.25.13.41.2.46.3.06.11.04.61-.21 1.18-.2.56-1.24 1.1-1.7 1.12-.46.02-.47.36-2.96-.73-2.49-1.09-3.99-3.75-4.11-3.92-.12-.17-.96-1.38-.92-2.61.05-1.22.69-1.8.95-2.04.24-.26.51-.29.68-.26h.47c.15 0 .36-.06.55.45l.69 1.87c.06.13.1.28.01.44l-.27.41-.39.42c-.12.12-.26.25-.12.5.12.26.62 1.09 1.32 1.78.91.88 1.71 1.17 1.95 1.3.24.14.39.12.54-.04l.81-.94c.19-.25.35-.19.58-.11l1.67.88M12 2a10 10 0 0 1 10 10 10 10 0 0 1-10 10c-1.97 0-3.8-.57-5.35-1.55L2 22l1.55-4.65A9.969 9.969 0 0 1 2 12 10 10 0 0 1 12 2m0 2a8 8 0 0 0-8 8c0 1.72.54 3.31 1.46 4.61L4.5 19.5l2.89-.96A7.95 7.95 0 0 0 12 20a8 8 0 0 0 8-8 8 8 0 0 0-8-8z"
|
|
8277
8277
|
}), 'WhatsApp');
|
|
8278
8278
|
|
|
8279
|
-
const ButtonsContainer = styled$3(Box)({
|
|
8279
|
+
const ButtonsContainer = styled$3(Box)(({ theme }) => ({
|
|
8280
8280
|
position: 'absolute',
|
|
8281
8281
|
top: 8,
|
|
8282
8282
|
right: 8,
|
|
8283
8283
|
display: 'flex',
|
|
8284
8284
|
gap: 4,
|
|
8285
|
-
|
|
8285
|
+
zIndex: 1,
|
|
8286
|
+
//@ts-ignore
|
|
8287
|
+
backgroundColor: theme.palette.background.panel,
|
|
8288
|
+
}));
|
|
8286
8289
|
const SmallIconButton = styled$3(IconButton)({
|
|
8287
8290
|
padding: 4,
|
|
8288
8291
|
});
|
|
@@ -8334,9 +8337,10 @@ const StyledBox = styled$3(Box)({
|
|
|
8334
8337
|
padding: 1,
|
|
8335
8338
|
minHeight: '50px',
|
|
8336
8339
|
position: 'relative',
|
|
8340
|
+
maxWidth: 'inherit'
|
|
8337
8341
|
});
|
|
8338
8342
|
const IconBox = styled$3(Box)(({ theme }) => ({
|
|
8339
|
-
marginTop: '-
|
|
8343
|
+
marginTop: '-20px',
|
|
8340
8344
|
padding: 0,
|
|
8341
8345
|
color: theme.palette.primary.main,
|
|
8342
8346
|
}));
|
|
@@ -8353,15 +8357,15 @@ const InfoContainer = styled$3(Box)({
|
|
|
8353
8357
|
const AddressContainer = styled$3(Box)({
|
|
8354
8358
|
display: 'flex',
|
|
8355
8359
|
flexDirection: 'column',
|
|
8356
|
-
height: '
|
|
8360
|
+
height: '50px',
|
|
8357
8361
|
});
|
|
8358
8362
|
const NoteText = styled$3(Typography)({
|
|
8359
8363
|
whiteSpace: 'nowrap',
|
|
8360
8364
|
textOverflow: 'ellipsis',
|
|
8361
8365
|
overflow: 'hidden',
|
|
8362
|
-
maxWidth: '
|
|
8366
|
+
maxWidth: '90%',
|
|
8363
8367
|
position: 'absolute',
|
|
8364
|
-
bottom:
|
|
8368
|
+
bottom: 16,
|
|
8365
8369
|
left: 40,
|
|
8366
8370
|
});
|
|
8367
8371
|
const ContactMethod = ({ icon, contactList, title, showTitle = true, }) => {
|
|
@@ -8370,8 +8374,8 @@ const ContactMethod = ({ icon, contactList, title, showTitle = true, }) => {
|
|
|
8370
8374
|
textOverflow: 'ellipsis',
|
|
8371
8375
|
overflow: 'hidden',
|
|
8372
8376
|
cursor: 'default',
|
|
8373
|
-
maxWidth: '
|
|
8374
|
-
}, children: contact.address }) }), contact.profileName && (jsxRuntimeExports.jsx(Typography, { variant: "body2", fontSize: 10, color: "text.disabled", sx: { marginLeft: '5px' }, children: contact.profileName }))] }), contact.note && (jsxRuntimeExports.jsx(NoteText, { variant: "body2", fontSize: 12, color: "text.secondary", children: contact.note }))] }) }, contact.id));
|
|
8377
|
+
maxWidth: '00%',
|
|
8378
|
+
}, children: contact.address }) }), contact.profileName && (jsxRuntimeExports.jsx(Typography, { variant: "body2", fontSize: 10, color: "text.disabled", sx: { marginLeft: '5px', marginTop: '10px' }, children: contact.profileName }))] }), contact.note && (jsxRuntimeExports.jsx(NoteText, { variant: "body2", fontSize: 12, color: "text.secondary", children: contact.note }))] }) }, contact.id));
|
|
8375
8379
|
return (jsxRuntimeExports.jsxs(Container$1, { children: [showTitle && (jsxRuntimeExports.jsx(TitleBox, { children: jsxRuntimeExports.jsx(Typography, { variant: "subtitle1", fontWeight: "bold", gutterBottom: true, mt: 2, children: title }) })), contactList?.map(renderContactInfo)] }));
|
|
8376
8380
|
};
|
|
8377
8381
|
|
|
@@ -14220,18 +14224,19 @@ const Properties = ({ properties, title }) => {
|
|
|
14220
14224
|
return (jsxRuntimeExports.jsxs(Container, { children: [jsxRuntimeExports.jsx(SectionTitle$1, { fontWeight: "bold", gutterBottom: true, mt: 2, variant: "subtitle1", children: title }), properties?.map((property, i) => property.value.length > 0 && (jsxRuntimeExports.jsxs(PropertyItem, { children: [jsxRuntimeExports.jsx(PropertyIcon, {}), jsxRuntimeExports.jsxs(PropertyText, { children: [getPropertyTitle(property.nameKey), ":", ' ', formatPropertyValue(property.value, property.type)] })] }, i)))] }));
|
|
14221
14225
|
};
|
|
14222
14226
|
|
|
14223
|
-
const PopupContainer = styled$3(Box)({
|
|
14224
|
-
|
|
14227
|
+
const PopupContainer = styled$3(Box)(({ theme }) => ({
|
|
14228
|
+
//@ts-ignore
|
|
14229
|
+
backgroundColor: theme.palette.background.panel,
|
|
14225
14230
|
boxShadow: '0px 4px 10px rgba(0, 0, 0, 0.1)',
|
|
14226
14231
|
borderRadius: '8px',
|
|
14227
14232
|
width: 300,
|
|
14228
|
-
maxHeight: '
|
|
14233
|
+
maxHeight: 'calc(100vh - 500px)',
|
|
14229
14234
|
overflowY: 'auto',
|
|
14230
14235
|
transition: 'opacity 0.3s ease, transform 0.3s ease',
|
|
14231
14236
|
padding: '8px',
|
|
14232
14237
|
zIndex: 1300,
|
|
14233
14238
|
'&::-webkit-scrollbar': {
|
|
14234
|
-
width:
|
|
14239
|
+
width: 5,
|
|
14235
14240
|
},
|
|
14236
14241
|
'&::-webkit-scrollbar-track': {
|
|
14237
14242
|
background: '#E0E0E0',
|
|
@@ -14245,7 +14250,7 @@ const PopupContainer = styled$3(Box)({
|
|
|
14245
14250
|
'&::-webkit-scrollbar-thumb:hover': {
|
|
14246
14251
|
background: '#616161',
|
|
14247
14252
|
},
|
|
14248
|
-
});
|
|
14253
|
+
}));
|
|
14249
14254
|
const SectionTitle = styled$3(Typography)({
|
|
14250
14255
|
fontWeight: 'bold',
|
|
14251
14256
|
marginBottom: '8px',
|
|
@@ -14255,10 +14260,11 @@ const SectionTitle = styled$3(Typography)({
|
|
|
14255
14260
|
const TagContainer = styled$3(Box)({
|
|
14256
14261
|
marginBottom: 16,
|
|
14257
14262
|
});
|
|
14258
|
-
const StyledChip = styled$3(Chip)({
|
|
14263
|
+
const StyledChip = styled$3(Chip)(({ theme }) => ({
|
|
14259
14264
|
marginRight: 8,
|
|
14260
14265
|
marginBottom: 8,
|
|
14261
|
-
}
|
|
14266
|
+
backgroundColor: `${theme.palette.primary.main}b3`
|
|
14267
|
+
}));
|
|
14262
14268
|
const ContactInfoPopup = ({ open, anchorEl, onClose, contactData, avatarImgUrl, handleNavigateToContacts = () => { }, t = (key) => ({
|
|
14263
14269
|
labels: 'Etiquetas',
|
|
14264
14270
|
phone: 'Teléfono',
|