frst-components 0.22.80 → 0.22.81

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
@@ -3255,7 +3255,9 @@ const HypothesisComponent = ({ description, type, id, title, votes = [], onVote,
3255
3255
  };
3256
3256
  const viewVotesRef = React.useRef(null);
3257
3257
  const handleClickOutsideVote = (event) => {
3258
- if (viewVotesRef?.current && !viewVotesRef?.current?.contains(event?.target)) {
3258
+ if (viewVotesRef?.current &&
3259
+ !viewVotesRef?.current?.contains(event?.target) &&
3260
+ !event.target.closest('.VoteListItem')) {
3259
3261
  setShowVotesList(false);
3260
3262
  }
3261
3263
  };
@@ -3308,7 +3310,8 @@ const HypothesisComponent = ({ description, type, id, title, votes = [], onVote,
3308
3310
  }, onClick: () => handleVote(id), children: [jsxRuntime.jsx(VoteIcon, { width: "24", height: "24", style: { marginLeft: '4px', marginRight: '4px' } }), jsxRuntime.jsx(VoteButton, { children: voteText })] })) }) }) }))] }) }));
3309
3311
  };
3310
3312
  const VoteList = ({ hypothesisVotes, showVotes, viewProfile }) => {
3311
- return (jsxRuntime.jsx(VoteListContainer, { showVotes: showVotes, children: hypothesisVotes?.map((vote, index) => (jsxRuntime.jsxs(VoteListItem, { lastVote: hypothesisVotes?.length === index + 1, onClick: () => viewProfile(vote?.user?.uuid), children: [jsxRuntime.jsx(Avatar, { src: vote?.user?.avatar, size: '24px', alt: vote?.user?.name, style: { marginLeft: '6px', cursor: 'pointer' } }), jsxRuntime.jsx("p", { children: vote?.user?.name })] }, vote?.id))) }));
3313
+ const sortedVotes = [...hypothesisVotes].sort((a, b) => a.user.name.localeCompare(b.user.name));
3314
+ return (jsxRuntime.jsx(VoteListContainer, { showVotes: showVotes, children: sortedVotes?.map((vote, index) => (jsxRuntime.jsxs(VoteListItem, { className: "VoteListItem", lastVote: hypothesisVotes?.length === index + 1, onClick: () => viewProfile(vote?.user?.uuid), children: [jsxRuntime.jsx(Avatar, { src: vote?.user?.avatar, size: '24px', alt: vote?.user?.name, style: { marginLeft: '6px', cursor: 'pointer' } }), jsxRuntime.jsx("p", { children: vote?.user?.name })] }, vote?.id))) }));
3312
3315
  };
3313
3316
 
3314
3317
  const ButtonGroupWrapper = styled__default["default"].div `
@@ -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;iBAmKxB,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;iBAuKxB,CAAA"}
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.80",
4
+ "version": "0.22.81",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",