frst-components 0.22.81 → 0.22.83
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 +21 -14
- package/dist/public/customIcons/ExcludeVoteIcon.d.ts +1 -2
- package/dist/public/customIcons/ExcludeVoteIcon.d.ts.map +1 -1
- package/dist/src/components/hypothesisComponent/hypothesisComponent.style.d.ts +1 -0
- package/dist/src/components/hypothesisComponent/hypothesisComponent.style.d.ts.map +1 -1
- package/dist/src/components/hypothesisComponent/index.d.ts.map +1 -1
- package/dist/src/components/input-comment/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/public/customIcons/ExcludeVoteIcon.tsx +2 -12
package/dist/index.js
CHANGED
|
@@ -2983,8 +2983,8 @@ const VoteIcon = ({ style, width = '16', height = '17', stroke = '#444444' }) =>
|
|
|
2983
2983
|
return (jsxRuntime.jsxs("svg", { style: style, width: width, height: height, viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsxs("g", { clipPath: "url(#clip0_2067_11382)", children: [jsxRuntime.jsx("path", { d: "M7.9987 14.9192C11.6806 14.9192 14.6654 11.9345 14.6654 8.25257C14.6654 4.57068 11.6806 1.58591 7.9987 1.58591C4.3168 1.58591 1.33203 4.57068 1.33203 8.25257C1.33203 11.9345 4.3168 14.9192 7.9987 14.9192Z", stroke: stroke, strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M11 8.25256L8 5.25256L5 8.25256", stroke: stroke, strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M8 11.2526V5.25256", stroke: stroke, strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" })] }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_2067_11382", children: jsxRuntime.jsx("rect", { width: "16", height: "16", fill: "white", transform: "translate(0 0.252563)" }) }) })] }));
|
|
2984
2984
|
};
|
|
2985
2985
|
|
|
2986
|
-
const ExcludeVoteIcon = ({ style, width = '16', height = '17', stroke = '#444444'
|
|
2987
|
-
return (jsxRuntime.jsxs("svg", {
|
|
2986
|
+
const ExcludeVoteIcon = ({ style, width = '16', height = '17', stroke = '#444444' }) => {
|
|
2987
|
+
return (jsxRuntime.jsxs("svg", { style: style, width: width, height: height, viewBox: "0 0 16 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxRuntime.jsx("path", { d: "M8.00065 14.9381C11.6825 14.9381 14.6673 11.9533 14.6673 8.2714C14.6673 4.5895 11.6825 1.60474 8.00065 1.60474C4.31875 1.60474 1.33398 4.5895 1.33398 8.2714C1.33398 11.9533 4.31875 14.9381 8.00065 14.9381Z", stroke: stroke, "stroke-width": "1.2", "stroke-linecap": "round", "stroke-linejoin": "round" }), jsxRuntime.jsx("path", { d: "M10.6673 5.60474L5.33398 10.9381", stroke: stroke, "stroke-width": "1.2", "stroke-linecap": "round", "stroke-linejoin": "round" }), jsxRuntime.jsx("path", { d: "M5.33398 5.60474L10.6673 10.9381", stroke: stroke, "stroke-width": "1.2", "stroke-linecap": "round", "stroke-linejoin": "round" })] }));
|
|
2988
2988
|
};
|
|
2989
2989
|
|
|
2990
2990
|
const fadeInRight = styled.keyframes `
|
|
@@ -3082,6 +3082,7 @@ display: flex;
|
|
|
3082
3082
|
align-items: center;
|
|
3083
3083
|
justify-content: space-between;
|
|
3084
3084
|
width:100%;
|
|
3085
|
+
color: #222222;
|
|
3085
3086
|
`;
|
|
3086
3087
|
const Container$l = styled__default["default"].div `
|
|
3087
3088
|
width: 100%;
|
|
@@ -3148,10 +3149,11 @@ styled__default["default"].div `
|
|
|
3148
3149
|
const VoteButtonContainer = styled__default["default"].span `
|
|
3149
3150
|
display: flex;
|
|
3150
3151
|
align-items: center;
|
|
3151
|
-
justify-content:
|
|
3152
|
-
width:
|
|
3152
|
+
justify-content: center;
|
|
3153
|
+
width: 150px;
|
|
3153
3154
|
background: #F9CD5E;
|
|
3154
3155
|
|
|
3156
|
+
|
|
3155
3157
|
${({ type }) => type === 'prioritize' && styled.css `
|
|
3156
3158
|
background: #DC9100;
|
|
3157
3159
|
`}
|
|
@@ -3162,6 +3164,10 @@ const VoteButtonContainer = styled__default["default"].span `
|
|
|
3162
3164
|
${({ type }) => type === 'suggested' && styled.css `
|
|
3163
3165
|
background: #A5C3F2;
|
|
3164
3166
|
`}
|
|
3167
|
+
|
|
3168
|
+
${({ modeDelete }) => modeDelete && styled.css `
|
|
3169
|
+
background: inherit;
|
|
3170
|
+
`}
|
|
3165
3171
|
border-radius:0 8px 8px 0;
|
|
3166
3172
|
padding: 0 16px 0 16px;
|
|
3167
3173
|
height: 100%;
|
|
@@ -3271,7 +3277,7 @@ const HypothesisComponent = ({ description, type, id, title, votes = [], onVote,
|
|
|
3271
3277
|
const vote = await onVote(hyphoteseId);
|
|
3272
3278
|
if (vote?.status === 201) {
|
|
3273
3279
|
let updateVotes = hypothesisVotes;
|
|
3274
|
-
if (!updateVotes
|
|
3280
|
+
if (!updateVotes?.some((vot) => vot?.id === vote?.data?.id)) {
|
|
3275
3281
|
updateVotes.push(vote.data);
|
|
3276
3282
|
setHypothesisVotes(updateVotes);
|
|
3277
3283
|
}
|
|
@@ -3291,20 +3297,21 @@ const HypothesisComponent = ({ description, type, id, title, votes = [], onVote,
|
|
|
3291
3297
|
setHasVote(false);
|
|
3292
3298
|
}
|
|
3293
3299
|
};
|
|
3294
|
-
return (jsxRuntime.jsx(MainContainer, { children: jsxRuntime.jsxs(Container$l, { type: type, id: id, children: [jsxRuntime.jsxs(SplitContainer, { children: [jsxRuntime.jsx(Title$6, { children: title }), jsxRuntime.jsx(Separator, { children: "|" }), jsxRuntime.jsx(Description$3, { children: description })] }), !canVote && canViewVote && hypothesisVotes.length > 0 && (jsxRuntime.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntime.jsx(SplitContainer, { children: jsxRuntime.jsx(VoteMainContainer, { children: jsxRuntime.jsx(VoteButtonContainer, { ref: viewVotesRef, style: { cursor: canViewListVotes ? 'pointer' : 'default' }, type: type, onClick: canViewListVotes ? toggleVotes : null, children: jsxRuntime.jsxs(VoteCount, { children: [jsxRuntime.jsxs(VoteContent, { children: [hypothesisVotes?.slice(0,
|
|
3300
|
+
return (jsxRuntime.jsx(MainContainer, { children: jsxRuntime.jsxs(Container$l, { type: type, id: id, children: [jsxRuntime.jsxs(SplitContainer, { children: [jsxRuntime.jsx(Title$6, { children: title }), jsxRuntime.jsx(Separator, { children: "|" }), jsxRuntime.jsx(Description$3, { children: description })] }), !canVote && canViewVote && hypothesisVotes.length > 0 && (jsxRuntime.jsxs("div", { style: { position: 'relative' }, children: [jsxRuntime.jsx(SplitContainer, { children: jsxRuntime.jsx(VoteMainContainer, { children: jsxRuntime.jsx(VoteButtonContainer, { ref: viewVotesRef, style: { cursor: canViewListVotes ? 'pointer' : 'default' }, type: type, onClick: canViewListVotes ? toggleVotes : null, children: jsxRuntime.jsxs(VoteCount, { children: [jsxRuntime.jsxs(VoteContent, { children: [hypothesisVotes?.slice(0, 2)?.map((vote, index) => {
|
|
3295
3301
|
return (jsxRuntime.jsx(ImageContent$1, { style: { zIndex: 14 - index }, children: jsxRuntime.jsx("img", { src: vote?.user?.avatar || 'https://cdn-images.frstfalconi.cloud/path582.svg' }) }, vote?.id));
|
|
3296
|
-
}), hypothesisVotes
|
|
3302
|
+
}), hypothesisVotes?.length > 2 && (jsxRuntime.jsx(ImageContent$1, { style: { background: '#444444' }, children: jsxRuntime.jsxs("p", { style: {
|
|
3297
3303
|
fontSize: hypothesisVotes?.length > 9 ? 10 : hypothesisVotes?.length > 99 ? 8 : 14
|
|
3298
|
-
}, children: ["+", hypothesisVotes?.length -
|
|
3304
|
+
}, children: ["+", hypothesisVotes?.length - 2] }) }))] }), hypothesisVotes?.length, " ", hypothesisVotes?.length > 1 ? votesPluralText : votesSingularText] }) }) }) }), jsxRuntime.jsx(VoteList, { hypothesisVotes: votes, showVotes: showVotesList, viewProfile: handleViewProfile })] })), canVote && (jsxRuntime.jsx(SplitContainer, { children: jsxRuntime.jsx(VoteMainContainer, { children: jsxRuntime.jsx(VoteButtonContainer, { type: type, modeDelete: isHover, onMouseEnter: () => seIsHover(true), onMouseLeave: () => seIsHover(false), children: hasVote ? (isHover ? (jsxRuntime.jsxs("div", { style: {
|
|
3299
3305
|
display: 'flex',
|
|
3300
3306
|
alignItems: 'center',
|
|
3301
|
-
gap: '4px'
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3307
|
+
gap: '4px',
|
|
3308
|
+
justifyContent: 'center'
|
|
3309
|
+
}, onClick: () => handleDeleteVote(hypothesisVotes.find((vote) => vote.user_uuid === userLoggedId).id), children: [jsxRuntime.jsx(ExcludeVoteIcon, { width: "24", height: "24" }), jsxRuntime.jsx(VoteButton, { children: deleteVoteText })] })) : (jsxRuntime.jsxs(VoteCount, { children: [jsxRuntime.jsxs(VoteContent, { children: [hypothesisVotes?.slice(0, 2)?.map((vote, index) => {
|
|
3310
|
+
return (jsxRuntime.jsx(ImageContent$1, { style: { zIndex: 14 - index }, children: jsxRuntime.jsx("img", { src: vote?.user?.avatar || 'https://cdn-images.frstfalconi.cloud/path582.svg' }) }, vote?.id));
|
|
3311
|
+
}), hypothesisVotes.length > 2 && (jsxRuntime.jsx(ImageContent$1, { style: { background: '#444444' }, children: jsxRuntime.jsxs("p", { children: ["+", hypothesisVotes?.length - 2] }) }))] }), jsxRuntime.jsxs("p", { children: [hypothesisVotes?.length, " ", hypothesisVotes?.length > 1 ? votesPluralText : votesSingularText] })] }))) : (jsxRuntime.jsxs("div", { style: {
|
|
3305
3312
|
display: 'flex',
|
|
3306
3313
|
alignItems: 'center',
|
|
3307
|
-
justifyContent: '
|
|
3314
|
+
justifyContent: 'center',
|
|
3308
3315
|
paddingLeft: '4px',
|
|
3309
3316
|
height: '100%'
|
|
3310
3317
|
}, onClick: () => handleVote(id), children: [jsxRuntime.jsx(VoteIcon, { width: "24", height: "24", style: { marginLeft: '4px', marginRight: '4px' } }), jsxRuntime.jsx(VoteButton, { children: voteText })] })) }) }) }))] }) }));
|
|
@@ -4258,7 +4265,7 @@ function InputComment$1({ placeholder, onChange, limit, users, showCharacterCoun
|
|
|
4258
4265
|
}, "data-text": "enter", suppressContentEditableWarning: true, children: jsxRuntime.jsx("p", { children: jsxRuntime.jsx("br", {}) }) }), jsxRuntime.jsx(InputPlaceholder, { style: { display: 'none' }, contentEditable: true, ref: divPlaceholder, children: placeholder }), showMention && users && users.length > 0 && (jsxRuntime.jsx(Mentions, { users: users, top: mentionTopPosition, onSelect: (user) => {
|
|
4259
4266
|
setShowMention(false);
|
|
4260
4267
|
handleMentionUser(user);
|
|
4261
|
-
} }))] }), jsxRuntime.jsx(HelperContainer, { children: !isPlaceholder
|
|
4268
|
+
} }))] }), jsxRuntime.jsx(HelperContainer, { children: !isPlaceholder && showCharacterCounter && (jsxRuntime.jsxs(HelperText$2, { isInputLimit: styleLimitExceeded, children: [textLength, "/", limit] })) }), styleLimitExceeded && (jsxRuntime.jsxs(LimitCharsContainer, { children: [jsxRuntime.jsx(TagAlert, {}), jsxRuntime.jsx(LimitCharsExceededMessage, { children: limitMessageExceeded })] }))] }) }));
|
|
4262
4269
|
}
|
|
4263
4270
|
|
|
4264
4271
|
const HeaderWrapper$1 = styled__default["default"].div `
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
export declare const ExcludeVoteIcon: ({ style, width, height, stroke
|
|
2
|
+
export declare const ExcludeVoteIcon: ({ style, width, height, stroke }: {
|
|
3
3
|
style?: CSSProperties | undefined;
|
|
4
4
|
width?: string;
|
|
5
5
|
height?: string;
|
|
6
6
|
stroke?: string;
|
|
7
|
-
onMouseOver?: () => void;
|
|
8
7
|
}) => JSX.Element;
|
|
9
8
|
//# sourceMappingURL=ExcludeVoteIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExcludeVoteIcon.d.ts","sourceRoot":"","sources":["../../../public/customIcons/ExcludeVoteIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAErC,eAAO,MAAM,eAAe;
|
|
1
|
+
{"version":3,"file":"ExcludeVoteIcon.d.ts","sourceRoot":"","sources":["../../../public/customIcons/ExcludeVoteIcon.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAErC,eAAO,MAAM,eAAe;YAMlB,aAAa,GAAG,SAAS;YACzB,MAAM;aACL,MAAM;aACN,MAAM;iBA2BhB,CAAA"}
|
|
@@ -16,6 +16,7 @@ export declare const VoteAvatarsContainer: import("styled-components").StyledCom
|
|
|
16
16
|
export declare const VoteAvatar: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
17
|
export declare const VoteButtonContainer: import("styled-components").StyledComponent<"span", any, {
|
|
18
18
|
type?: string;
|
|
19
|
+
modeDelete?: boolean;
|
|
19
20
|
}, never>;
|
|
20
21
|
export declare const VoteCount: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
21
22
|
export declare const VoteButton: import("styled-components").StyledComponent<"p", any, {}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hypothesisComponent.style.d.ts","sourceRoot":"","sources":["../../../../src/components/hypothesisComponent/hypothesisComponent.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"hypothesisComponent.style.d.ts","sourceRoot":"","sources":["../../../../src/components/hypothesisComponent/hypothesisComponent.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,oEAMzB,CAAA;AACD,eAAO,MAAM,SAAS;UAAsB,MAAM;SAsBjD,CAAC;AAEF,eAAO,MAAM,KAAK,qEAGjB,CAAC;AAEF,eAAO,MAAM,KAAK,qEAEjB,CAAC;AAEF,eAAO,MAAM,SAAS,oEAGrB,CAAC;AAEF,eAAO,MAAM,WAAW,qEAIvB,CAAC;AACF,eAAO,MAAM,cAAc;aAAyB,MAAM;SAKzD,CAAA;AACD,eAAO,MAAM,iBAAiB;aAAyB,MAAM;SAO5D,CAAA;AACD,eAAO,MAAM,oBAAoB,oEAKhC,CAAA;AAED,eAAO,MAAM,UAAU,oEAEtB,CAAA;AAED,eAAO,MAAM,mBAAmB;WAAwB,MAAM;iBAAe,OAAO;SA4BnF,CAAA;AACD,eAAO,MAAM,SAAS,qEAOrB,CAAA;AACD,eAAO,MAAM,UAAU,kEActB,CAAA;AACD,eAAO,MAAM,WAAW,oEASvB,CAAA;AACD,eAAO,MAAM,YAAY,oEAexB,CAAA;AAED,eAAO,MAAM,iBAAiB;gBAA4B,OAAO;SAiBhE,CAAA;AAED,eAAO,MAAM,YAAY;eAA2B,OAAO;SAO1D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hypothesisComponent/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAI9B,eAAO,MAAM,mBAAmB;iBAkBjB,MAAM;UACb,MAAM;QACR,MAAM;WACH,MAAM;WACN,IAAI,EAAE;kBACC,MAAM;2BACG,MAAM,KAAK,GAAG;0BACf,MAAM,KAAK,GAAG;iCACP,MAAM,KAAK,GAAG;cACjC,OAAO;uBACE,OAAO;kBACZ,OAAO;wBACD,MAAM;sBACR,MAAM;eACb,MAAM;qBACA,MAAM;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hypothesisComponent/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAI9B,eAAO,MAAM,mBAAmB;iBAkBjB,MAAM;UACb,MAAM;QACR,MAAM;WACH,MAAM;WACN,IAAI,EAAE;kBACC,MAAM;2BACG,MAAM,KAAK,GAAG;0BACf,MAAM,KAAK,GAAG;iCACP,MAAM,KAAK,GAAG;cACjC,OAAO;uBACE,OAAO;kBACZ,OAAO;wBACD,MAAM;sBACR,MAAM;eACb,MAAM;qBACA,MAAM;iBA0KxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/input-comment/index.tsx"],"names":[],"mappings":";AACA,OAAO,yBAAyB,CAAA;AAGhC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAOvC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,WAAW,EACX,QAAQ,EACR,KAAK,EACL,KAAK,EACL,oBAAoB,EACpB,MAAM,EACN,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,kBAAkB,EAClB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACZ,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/input-comment/index.tsx"],"names":[],"mappings":";AACA,OAAO,yBAAyB,CAAA;AAGhC,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAOvC,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,WAAW,EACX,QAAQ,EACR,KAAK,EACL,KAAK,EACL,oBAAoB,EACpB,MAAM,EACN,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,kBAAkB,EAClB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACZ,EAAE,aAAa,eA8Ef"}
|
package/package.json
CHANGED
|
@@ -5,25 +5,15 @@ export const ExcludeVoteIcon = ({
|
|
|
5
5
|
style,
|
|
6
6
|
width = '16',
|
|
7
7
|
height = '17',
|
|
8
|
-
stroke = '#444444'
|
|
9
|
-
onMouseOver
|
|
8
|
+
stroke = '#444444'
|
|
10
9
|
}: {
|
|
11
10
|
style?: CSSProperties | undefined
|
|
12
11
|
width?: string
|
|
13
12
|
height?: string
|
|
14
13
|
stroke?: string
|
|
15
|
-
onMouseOver?: () => void
|
|
16
14
|
}) => {
|
|
17
15
|
return (
|
|
18
|
-
<svg
|
|
19
|
-
onMouseOver={onMouseOver}
|
|
20
|
-
style={style}
|
|
21
|
-
width={width}
|
|
22
|
-
height={height}
|
|
23
|
-
viewBox="0 0 16 17"
|
|
24
|
-
fill="none"
|
|
25
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
26
|
-
>
|
|
16
|
+
<svg style={style} width={width} height={height} viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
27
17
|
<path
|
|
28
18
|
d="M8.00065 14.9381C11.6825 14.9381 14.6673 11.9533 14.6673 8.2714C14.6673 4.5895 11.6825 1.60474 8.00065 1.60474C4.31875 1.60474 1.33398 4.5895 1.33398 8.2714C1.33398 11.9533 4.31875 14.9381 8.00065 14.9381Z"
|
|
29
19
|
stroke={stroke}
|