@soul-refiner/design-system 0.2.95 → 0.2.97

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.
@@ -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,12 +1,14 @@
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 },
8
- React.createElement(Shadow, null,
9
- React.createElement("img", { src: image, alt: "" })),
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" }) })),
10
+ React.createElement("img", { src: image, alt: "" }),
11
+ React.createElement(Shadow, null),
10
12
  React.createElement(Figcaption, null,
11
13
  React.createElement(H, { as: "span", "$bold": true, "$color": "white", "$fontSize": 24, "$lineHeight": 36 }, title),
12
14
  React.createElement(P, { as: "span", "$color": "white", "$fontSize": 14, "$lineHeight": 20 }, subtitle),
@@ -20,6 +22,9 @@ const Wrapper = styled.div `
20
22
  cursor: pointer;
21
23
 
22
24
  img {
25
+ position: absolute;
26
+ top: 0px;
27
+ left: 0px;
23
28
  width: 100%;
24
29
  height: 100%;
25
30
  border-radius: 16px;
@@ -46,6 +51,10 @@ const Person = styled.figure `
46
51
  justify-content: flex-end;
47
52
  flex-direction: column;
48
53
 
54
+ &:hover > div {
55
+ display: initial;
56
+ }
57
+
49
58
  ${({ $sx }) => ($sx ? $sx : '')};
50
59
  `;
51
60
  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.95",
3
+ "version": "0.2.97",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "publishConfig": {