frst-components 0.20.19 → 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 +44 -24
- 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/dist/src/components/LXP/bannerLxp/index.d.ts +1 -0
- package/dist/src/components/LXP/bannerLxp/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 `
|
|
@@ -6818,6 +6825,7 @@ function BannerLxp(props) {
|
|
|
6818
6825
|
const [titleText, setTitleText] = React.useState('');
|
|
6819
6826
|
const [colorTitle, setColorTitle] = React.useState('');
|
|
6820
6827
|
const [backgroundColor, setBackgroundColor] = React.useState('');
|
|
6828
|
+
// const [oldBgColor, setOldBgColor] = useState("");
|
|
6821
6829
|
const [backgroundImage, setBackgroundImage] = React.useState('');
|
|
6822
6830
|
const [fixImage, setFixImage] = React.useState(false);
|
|
6823
6831
|
const [selectedFile, setSelectedFile] = React.useState({});
|
|
@@ -6832,12 +6840,13 @@ function BannerLxp(props) {
|
|
|
6832
6840
|
props.onSaveInfo([titleText, disableText, colorTitle, backgroundColor, fixImage]);
|
|
6833
6841
|
};
|
|
6834
6842
|
const onCancell = () => {
|
|
6835
|
-
setBackgroundColor(props.bgColor ?? '');
|
|
6836
|
-
setBackgroundImage(props.bgSrc ?? '');
|
|
6837
|
-
setTitleText(props.title ?? '');
|
|
6843
|
+
props.bgColor && setBackgroundColor(props.bgColor ?? '');
|
|
6844
|
+
props.bgSrc && setBackgroundImage(props.bgSrc ?? '');
|
|
6845
|
+
props.title && setTitleText(props.title ?? '');
|
|
6838
6846
|
setColorTitle(props.titleColor ?? '');
|
|
6839
|
-
setDisableText(props.isDisabledTitle
|
|
6847
|
+
setDisableText(props.isDisabledTitle);
|
|
6840
6848
|
setOpenConfig(false);
|
|
6849
|
+
props?.onCancell && props?.onCancell();
|
|
6841
6850
|
};
|
|
6842
6851
|
const handleOpenTitleColorPicker = (event) => {
|
|
6843
6852
|
setDisplayTitleColorPicker(!displayTitleColorPicker);
|
|
@@ -6862,21 +6871,32 @@ function BannerLxp(props) {
|
|
|
6862
6871
|
setSelectedFile(e.target.result);
|
|
6863
6872
|
};
|
|
6864
6873
|
reader.readAsDataURL(file);
|
|
6865
|
-
props.handleChangeBanner(file);
|
|
6866
|
-
setBackgroundImage(props.bgSrc);
|
|
6867
|
-
setColorTitle(props?.titleColor);
|
|
6868
6874
|
setBackgroundColor('');
|
|
6875
|
+
props.handleChangeBanner(file);
|
|
6869
6876
|
return file;
|
|
6870
6877
|
};
|
|
6871
6878
|
React.useEffect(() => {
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
//
|
|
6875
|
-
|
|
6879
|
+
props?.isDisabledTitle && setDisableText(props?.isDisabledTitle);
|
|
6880
|
+
props?.bgColor && setBackgroundColor(props?.bgColor);
|
|
6881
|
+
// props?.bgColor && setOldBgColor(props?.bgColor);
|
|
6882
|
+
props?.bgSrc && setBackgroundImage(props?.bgSrc);
|
|
6883
|
+
props.isDisabledTitle && setDisableText(props.isDisabledTitle);
|
|
6884
|
+
}, [props]);
|
|
6876
6885
|
React.useEffect(() => {
|
|
6877
6886
|
if (props?.bgSrc)
|
|
6878
6887
|
setBackgroundImage(props?.bgSrc);
|
|
6879
6888
|
}, [props?.bgSrc]);
|
|
6889
|
+
React.useMemo(() => {
|
|
6890
|
+
if (props?.title) {
|
|
6891
|
+
setTitleText(props?.title);
|
|
6892
|
+
}
|
|
6893
|
+
if (props?.titleColor) {
|
|
6894
|
+
setColorTitle(props?.titleColor);
|
|
6895
|
+
}
|
|
6896
|
+
if (props.isDisabledTitle) {
|
|
6897
|
+
setDisableText(props.isDisabledTitle);
|
|
6898
|
+
}
|
|
6899
|
+
}, [props?.title, props?.titleColor, props.isDisabledTitle]);
|
|
6880
6900
|
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [props?.isLoading ? (jsxRuntime.jsx(LoadingBanner, {})) : (jsxRuntime.jsxs(BannerContainer, { backgroundBanner: props?.bgColor || `url(${props?.bgSrc})`, style: {
|
|
6881
6901
|
...props.style,
|
|
6882
6902
|
objectFit: 'fill'
|
|
@@ -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"}
|
|
@@ -22,6 +22,7 @@ interface BannerLxpParams {
|
|
|
22
22
|
* @prop {object} onSaveInfo: função de callback que retorna todos as informações do banner no final das alterações. (nesta ordem[Title, isTitledisabled, colorTitle, backgroundColor, fixImage])
|
|
23
23
|
*/
|
|
24
24
|
onSaveInfo?: ([]: Iterable<any>) => void;
|
|
25
|
+
onCancell?: () => void;
|
|
25
26
|
}
|
|
26
27
|
export default function BannerLxp(props: BannerLxpParams): JSX.Element;
|
|
27
28
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/bannerLxp/index.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/bannerLxp/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA+C,MAAM,OAAO,CAAA;AAInE,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B;;OAEG;IAEH;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,IAAI,CAAA;IACnC;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,EAAE,eAAA,KAAK,IAAI,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,eAAe,eA2PvD"}
|