frst-components 0.20.20 → 0.20.21
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/index.js +20 -13
- package/dist/src/components/IJ/learningCycleCard/components/menu/index.d.ts.map +1 -1
- package/dist/src/components/IJ/learningCycleCard/components/menu/menuStyle.d.ts.map +1 -1
- package/dist/src/components/LXP/avatarChannel/avatarChannelStyles.d.ts +4 -2
- package/dist/src/components/LXP/avatarChannel/avatarChannelStyles.d.ts.map +1 -1
- package/dist/src/components/LXP/avatarChannel/index.d.ts +1 -1
- package/dist/src/components/LXP/avatarChannel/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6332,23 +6332,26 @@ const ContainerGeral$1 = styled__default["default"].div `
|
|
|
6332
6332
|
height: 8.5rem;
|
|
6333
6333
|
align-content: flex-end;
|
|
6334
6334
|
&:hover .popOver {
|
|
6335
|
-
display: block;
|
|
6335
|
+
display: ${(p) => p.isEdit && 'block'};
|
|
6336
6336
|
}
|
|
6337
6337
|
&:hover .hide {
|
|
6338
|
-
visibility: visible;
|
|
6338
|
+
visibility: ${(p) => p.isEdit && 'visible'};
|
|
6339
6339
|
}
|
|
6340
6340
|
`;
|
|
6341
6341
|
const AvatarChannel$2 = styled__default["default"].div `
|
|
6342
6342
|
width: ${(props) => props.size || '80px'};
|
|
6343
6343
|
height: ${(props) => props.size || '80px'};
|
|
6344
6344
|
border-radius: 50%;
|
|
6345
|
+
display: flex;
|
|
6346
|
+
align-items: center;
|
|
6347
|
+
justify-content: center;
|
|
6345
6348
|
position: relative;
|
|
6346
|
-
background: ${(props) => props.image ? `url(${props.image})` : '#6a3f86'};
|
|
6349
|
+
background: ${(props) => (props.image ? `url(${props.image})` : '#6a3f86')};
|
|
6347
6350
|
background-repeat: no-repeat;
|
|
6348
6351
|
background-size: cover;
|
|
6349
|
-
background-position: center center;
|
|
6352
|
+
background-position: center center;
|
|
6350
6353
|
margin-top: 62px;
|
|
6351
|
-
cursor: pointer;
|
|
6354
|
+
cursor: ${(p) => (p.isEdit ? 'pointer' : 'text')};
|
|
6352
6355
|
${(props) => props.variant === 'sideRight' &&
|
|
6353
6356
|
styled.css `
|
|
6354
6357
|
margin-left: 8.5rem;
|
|
@@ -6364,7 +6367,6 @@ const AvatarChannel$2 = styled__default["default"].div `
|
|
|
6364
6367
|
`}
|
|
6365
6368
|
`;
|
|
6366
6369
|
const Channel$2 = styled__default["default"].span `
|
|
6367
|
-
position: absolute;
|
|
6368
6370
|
display: flex;
|
|
6369
6371
|
align-items: center;
|
|
6370
6372
|
text-align: center;
|
|
@@ -6376,14 +6378,15 @@ const Channel$2 = styled__default["default"].span `
|
|
|
6376
6378
|
font-family: 'Work Sans';
|
|
6377
6379
|
font-weight: 700;
|
|
6378
6380
|
line-height: 130%;
|
|
6381
|
+
text-transform: uppercase;
|
|
6379
6382
|
`;
|
|
6380
6383
|
const AvatarCircle = styled__default["default"].div `
|
|
6381
6384
|
display: flex;
|
|
6382
6385
|
width: 100%;
|
|
6383
6386
|
height: 100%;
|
|
6384
|
-
position: absolute;
|
|
6387
|
+
position: absolute;
|
|
6385
6388
|
justify-content: center;
|
|
6386
|
-
align-items: center;
|
|
6389
|
+
align-items: center;
|
|
6387
6390
|
visibility: hidden;
|
|
6388
6391
|
`;
|
|
6389
6392
|
const AvatarCam = styled__default["default"].div `
|
|
@@ -6393,9 +6396,9 @@ const AvatarCam = styled__default["default"].div `
|
|
|
6393
6396
|
margin: 0;
|
|
6394
6397
|
background-color: ${({ theme }) => theme.colors.shadeWhite};
|
|
6395
6398
|
box-shadow: 0px 18px 40px -15px #d3d3d3;
|
|
6396
|
-
display: flex;
|
|
6399
|
+
display: flex;
|
|
6397
6400
|
justify-content: center;
|
|
6398
|
-
align-items: center;
|
|
6401
|
+
align-items: center;
|
|
6399
6402
|
z-index: 999;
|
|
6400
6403
|
`;
|
|
6401
6404
|
const ContainerPopOver = styled__default["default"].div `
|
|
@@ -6563,7 +6566,7 @@ function PopOverLXP({ variant, children }) {
|
|
|
6563
6566
|
: null }));
|
|
6564
6567
|
}
|
|
6565
6568
|
|
|
6566
|
-
function AvatarChannel$1({ size, channel, className, disabled, color, handleValueAvatar, variantPopOver, sourceImage }) {
|
|
6569
|
+
function AvatarChannel$1({ size, channel, className, disabled, color, handleValueAvatar, variantPopOver, sourceImage, isEdit = false }) {
|
|
6567
6570
|
const onChange = () => {
|
|
6568
6571
|
document.getElementById('fileSelector').click();
|
|
6569
6572
|
};
|
|
@@ -6576,9 +6579,13 @@ function AvatarChannel$1({ size, channel, className, disabled, color, handleValu
|
|
|
6576
6579
|
handleValueAvatar(file);
|
|
6577
6580
|
return file;
|
|
6578
6581
|
};
|
|
6582
|
+
const nameChannel = channel
|
|
6583
|
+
.split(' ')
|
|
6584
|
+
.filter((name, i) => i == 0 || i == channel.split(' ').length - 1)
|
|
6585
|
+
.map((name, i) => name[0])
|
|
6586
|
+
.join('');
|
|
6579
6587
|
const [image, setImage] = React.useState(sourceImage);
|
|
6580
|
-
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsx(ContainerGeral$1, { className: "geral", variant: variantPopOver, children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ContainerPopOver, { className: "popOver", variant: variantPopOver, children: jsxRuntime.jsx(PopOverLXP, { children: 'Alterar avatar', variant: variantPopOver, element: undefined }) }), jsxRuntime.jsx("div", { style: { display: 'none' }, children: jsxRuntime.jsx("input", { type: "file", id: "fileSelector", accept: ".jpg, .jpeg, .png", onChange: (e) => handleFileSelected(e.target.files[0]) }) }), jsxRuntime.jsxs(AvatarChannel$2, { size: size, onClick: onChange, className: className, disabled: disabled, variant: variantPopOver, color: color ? color : '#6a3f86', image: image, children: [!image &&
|
|
6581
|
-
jsxRuntime.jsx(Channel$2, { children: channel }), jsxRuntime.jsx(AvatarCircle, { className: "hide", children: jsxRuntime.jsx(AvatarCam, { children: jsxRuntime.jsx(Cam, {}) }) })] })] }) }) }));
|
|
6588
|
+
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsx(ContainerGeral$1, { className: "geral", isEdit: isEdit, variant: variantPopOver, children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ContainerPopOver, { className: "popOver", variant: variantPopOver, children: jsxRuntime.jsx(PopOverLXP, { children: 'Alterar avatar', variant: variantPopOver, element: undefined }) }), jsxRuntime.jsx("div", { style: { display: 'none' }, children: isEdit && (jsxRuntime.jsx("input", { type: "file", id: "fileSelector", accept: ".jpg, .jpeg, .png", onChange: (e) => handleFileSelected(e.target.files[0]) })) }), jsxRuntime.jsxs(AvatarChannel$2, { size: size, onClick: onChange, className: className, disabled: disabled, variant: variantPopOver, color: color ? color : '#6a3f86', image: image, isEdit: isEdit, children: [!image && jsxRuntime.jsx(Channel$2, { size: size, children: nameChannel }), isEdit && (jsxRuntime.jsx(AvatarCircle, { className: "hide", children: jsxRuntime.jsx(AvatarCam, { children: jsxRuntime.jsx(Cam, {}) }) }))] })] }) }) }));
|
|
6582
6589
|
}
|
|
6583
6590
|
|
|
6584
6591
|
const ContainerGeral = styled__default["default"].div `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/IJ/learningCycleCard/components/menu/index.tsx"],"names":[],"mappings":";AAUA,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE;;;CAAA,eAiFnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menuStyle.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"menuStyle.d.ts","sourceRoot":"","sources":["../../../../../../src/components/IJ/learningCycleCard/components/menu/menuStyle.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,oEAuBxB,CAAA"}
|
|
@@ -3,15 +3,17 @@ interface AvatarI {
|
|
|
3
3
|
src?: any;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
color?: string;
|
|
6
|
-
image
|
|
6
|
+
image?: any;
|
|
7
7
|
variant?: string;
|
|
8
|
+
isEdit?: boolean;
|
|
8
9
|
}
|
|
9
10
|
interface PropsPopOver {
|
|
10
11
|
variant: string;
|
|
12
|
+
isEdit?: boolean;
|
|
11
13
|
}
|
|
12
14
|
export declare const ContainerGeral: import("styled-components").StyledComponent<"div", any, PropsPopOver, never>;
|
|
13
15
|
export declare const AvatarChannel: import("styled-components").StyledComponent<"div", any, AvatarI, never>;
|
|
14
|
-
export declare const Channel: import("styled-components").StyledComponent<"span", any,
|
|
16
|
+
export declare const Channel: import("styled-components").StyledComponent<"span", any, AvatarI, never>;
|
|
15
17
|
export declare const AvatarCircle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
18
|
export declare const AvatarCam: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
19
|
export declare const ContainerPopOver: import("styled-components").StyledComponent<"div", any, PropsPopOver, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatarChannelStyles.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/avatarChannel/avatarChannelStyles.ts"],"names":[],"mappings":"AAEA,UAAU,OAAO;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,GAAG,CAAA;
|
|
1
|
+
{"version":3,"file":"avatarChannelStyles.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/avatarChannel/avatarChannelStyles.ts"],"names":[],"mappings":"AAEA,UAAU,OAAO;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,GAAG,CAAA;IACT,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,eAAO,MAAM,cAAc,8EAU1B,CAAA;AACD,eAAO,MAAM,aAAa,yEA6BzB,CAAA;AAED,eAAO,MAAM,OAAO,0EAanB,CAAA;AACD,eAAO,MAAM,YAAY,oEAQxB,CAAA;AACD,eAAO,MAAM,SAAS,oEAWrB,CAAA;AACD,eAAO,MAAM,gBAAgB,8EA2B5B,CAAA;AAED,eAAO,MAAM,sBAAsB,oEAElC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import '../../../shared/global.css';
|
|
3
3
|
import { IAvatar } from './avatarChannel';
|
|
4
|
-
export default function AvatarChannel({ size, channel, className, disabled, color, handleValueAvatar, variantPopOver, sourceImage }: IAvatar): JSX.Element;
|
|
4
|
+
export default function AvatarChannel({ size, channel, className, disabled, color, handleValueAvatar, variantPopOver, sourceImage, isEdit }: IAvatar): JSX.Element;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/avatarChannel/index.tsx"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAInC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAKzC,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,EACJ,OAAO,EACP,SAAS,EACT,QAAQ,EACR,KAAK,EACL,iBAAiB,EACjB,cAAc,EACd,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/avatarChannel/index.tsx"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAInC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAKzC,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,EACJ,OAAO,EACP,SAAS,EACT,QAAQ,EACR,KAAK,EACL,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,MAAc,EACf,EAAE,OAAO,eAgET"}
|