@soul-refiner/design-system 0.2.94 → 0.2.96

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.
@@ -30,7 +30,7 @@ export const Button = ({ as = 'button', children, disabled, fluid = false, href,
30
30
  },
31
31
  };
32
32
  })?.[0];
33
- const dropdownIcon = showChevron ? (isDropdownOpen === true ? (React.createElement(ChevronUp, { size: size === 'large' ? LG_ICON_SIZE : SM_ICON_SIZE })) : isDropdownOpen === false ? (React.createElement(ChevronDown, { size: size === 'large' ? LG_ICON_SIZE : SM_ICON_SIZE })) : undefined) : undefined;
33
+ const dropdownIcon = showChevron ? (isDropdownOpen === true ? (React.createElement(ChevronUp, { sx: "margin-left:auto;", size: size === 'large' ? LG_ICON_SIZE : SM_ICON_SIZE })) : isDropdownOpen === false ? (React.createElement(ChevronDown, { sx: "margin-left:auto;", size: size === 'large' ? LG_ICON_SIZE : SM_ICON_SIZE })) : undefined) : undefined;
34
34
  const padding = !!children
35
35
  ? size === 'large'
36
36
  ? LG_PADDING
@@ -125,7 +125,7 @@ const Container = styled.div `
125
125
  cursor: pointer;
126
126
  box-shadow: var(--elevation-2);
127
127
  border-radius: 8px;
128
- overflow: scroll;
128
+ overflow: auto;
129
129
 
130
130
  & > div:first-of-type {
131
131
  border-radius: 8px 8px 0px 0px;
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
+ import { DropdownOptionProps } from '../../';
2
3
  export interface PersonCardProps {
3
4
  actions?: React.ReactElement | React.ReactElement[];
5
+ dotsActions?: (Omit<DropdownOptionProps, 'selected'> | 'break')[];
4
6
  href: string;
5
7
  image: string;
6
- subtitle: string;
8
+ subtitle: string | React.ReactElement;
7
9
  sx?: string;
8
10
  title: string;
9
11
  }
10
- export declare const PersonCard: ({ actions, href, image, subtitle, sx, title, }: PersonCardProps) => React.JSX.Element;
12
+ export declare const PersonCard: ({ actions, dotsActions, href, image, subtitle, sx, title, }: PersonCardProps) => React.JSX.Element;
@@ -1,10 +1,12 @@
1
1
  'use client';
2
2
  import React from 'react';
3
3
  import styled from 'styled-components';
4
- import { Box, H, P } from '../../';
5
- export const PersonCard = ({ actions, href, image, subtitle, sx, title, }) => {
6
- return (React.createElement(Wrapper, { "$image": image, as: href ? 'a' : 'div' },
4
+ import { Box, Button, Dropdown, H, P } from '../../';
5
+ import { EllipsisHorizontal } from '../../../icons';
6
+ export const PersonCard = ({ actions, dotsActions, href, image, subtitle, sx, title, }) => {
7
+ return (React.createElement(Wrapper, { "$image": image, as: href ? 'a' : 'div', href: href },
7
8
  React.createElement(Person, { "$sx": sx },
9
+ dotsActions && !!dotsActions.length && (React.createElement(Dropdown, { containerSx: "", hasArrow: true, maintainState: false, onClick: (e) => e.preventDefault(), options: dotsActions, sx: "position: absolute; top: 8px; right: 8px; z-index: 24; display: none;", trigger: React.createElement(Button, { className: "icon", icon: React.createElement(EllipsisHorizontal, null), onClick: (event) => event.stopPropagation(), showChevron: false, size: "small", type: "outlined" }) })),
8
10
  React.createElement(Shadow, null,
9
11
  React.createElement("img", { src: image, alt: "" })),
10
12
  React.createElement(Figcaption, null,
@@ -46,6 +48,10 @@ const Person = styled.figure `
46
48
  justify-content: flex-end;
47
49
  flex-direction: column;
48
50
 
51
+ &:hover > div {
52
+ display: initial;
53
+ }
54
+
49
55
  ${({ $sx }) => ($sx ? $sx : '')};
50
56
  `;
51
57
  const Figcaption = styled.figcaption `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soul-refiner/design-system",
3
- "version": "0.2.94",
3
+ "version": "0.2.96",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "publishConfig": {