frst-components 0.22.82 → 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 CHANGED
@@ -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,8 +3149,8 @@ styled__default["default"].div `
3148
3149
  const VoteButtonContainer = styled__default["default"].span `
3149
3150
  display: flex;
3150
3151
  align-items: center;
3151
- justify-content: flex-end;
3152
- width: 100%;
3152
+ justify-content: center;
3153
+ width: 150px;
3153
3154
  background: #F9CD5E;
3154
3155
 
3155
3156
 
@@ -3276,7 +3277,7 @@ const HypothesisComponent = ({ description, type, id, title, votes = [], onVote,
3276
3277
  const vote = await onVote(hyphoteseId);
3277
3278
  if (vote?.status === 201) {
3278
3279
  let updateVotes = hypothesisVotes;
3279
- if (!updateVotes.some((vot) => vot?.id === vote?.data?.id)) {
3280
+ if (!updateVotes?.some((vot) => vot?.id === vote?.data?.id)) {
3280
3281
  updateVotes.push(vote.data);
3281
3282
  setHypothesisVotes(updateVotes);
3282
3283
  }
@@ -3296,22 +3297,21 @@ const HypothesisComponent = ({ description, type, id, title, votes = [], onVote,
3296
3297
  setHasVote(false);
3297
3298
  }
3298
3299
  };
3299
- 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, 3)?.map((vote, index) => {
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) => {
3300
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));
3301
- }), hypothesisVotes?.length > 3 && (jsxRuntime.jsx(ImageContent$1, { style: { background: '#444444' }, children: jsxRuntime.jsxs("p", { style: {
3302
+ }), hypothesisVotes?.length > 2 && (jsxRuntime.jsx(ImageContent$1, { style: { background: '#444444' }, children: jsxRuntime.jsxs("p", { style: {
3302
3303
  fontSize: hypothesisVotes?.length > 9 ? 10 : hypothesisVotes?.length > 99 ? 8 : 14
3303
- }, children: ["+", hypothesisVotes?.length - 3] }) }))] }), 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: {
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: {
3304
3305
  display: 'flex',
3305
3306
  alignItems: 'center',
3306
3307
  gap: '4px',
3307
- width: 'auto',
3308
- justifyContent: 'end'
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, 3)?.map((vote, index) => {
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
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 > 3 && (jsxRuntime.jsx(ImageContent$1, { style: { background: '#444444' }, children: jsxRuntime.jsxs("p", { children: ["+", hypothesisVotes?.length - 3] }) }))] }), jsxRuntime.jsxs("p", { children: [hypothesisVotes?.length, " ", hypothesisVotes?.length > 1 ? votesPluralText : votesSingularText] })] }))) : (jsxRuntime.jsxs("div", { style: {
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: {
3312
3312
  display: 'flex',
3313
3313
  alignItems: 'center',
3314
- justifyContent: 'space-around',
3314
+ justifyContent: 'center',
3315
3315
  paddingLeft: '4px',
3316
3316
  height: '100%'
3317
3317
  }, onClick: () => handleVote(id), children: [jsxRuntime.jsx(VoteIcon, { width: "24", height: "24", style: { marginLeft: '4px', marginRight: '4px' } }), jsxRuntime.jsx(VoteButton, { children: voteText })] })) }) }) }))] }) }));
@@ -4265,7 +4265,7 @@ function InputComment$1({ placeholder, onChange, limit, users, showCharacterCoun
4265
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) => {
4266
4266
  setShowMention(false);
4267
4267
  handleMentionUser(user);
4268
- } }))] }), jsxRuntime.jsx(HelperContainer, { children: !isPlaceholder ? (jsxRuntime.jsxs(HelperText$2, { isInputLimit: styleLimitExceeded, children: [textLength, "/", limit] })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {})) }), styleLimitExceeded && (jsxRuntime.jsxs(LimitCharsContainer, { children: [jsxRuntime.jsx(TagAlert, {}), jsxRuntime.jsx(LimitCharsExceededMessage, { children: limitMessageExceeded })] }))] }) }));
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 })] }))] }) }));
4269
4269
  }
4270
4270
 
4271
4271
  const HeaderWrapper$1 = styled__default["default"].div `
@@ -1 +1 @@
1
- {"version":3,"file":"hypothesisComponent.style.d.ts","sourceRoot":"","sources":["../../../../src/components/hypothesisComponent/hypothesisComponent.style.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,oEAKzB,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
+ {"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;iBA2KxB,CAAA"}
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,eA2Ef"}
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "frst-components",
3
3
  "homepage": "http://FRST-Falconi.github.io/storybook.frstfalconi.com",
4
- "version": "0.22.82",
4
+ "version": "0.22.83",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",