@soul-refiner/design-system 0.2.34 → 0.2.35

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.
@@ -7,39 +7,40 @@ export interface HeadingProps extends CommonProps {
7
7
  as?: React.ElementType;
8
8
  $fontSize?: 16 | 18 | 20 | 24 | 28 | 32 | 36 | 40 | 48;
9
9
  $lineHeight?: 64 | 60 | 54 | 48 | 36 | 28 | 26;
10
+ $sx?: string;
10
11
  }
11
12
  export declare const H: {
12
- (args: HeadingProps): React.JSX.Element;
13
+ ({ sx, ...args }: HeadingProps): React.JSX.Element;
13
14
  One: {
14
- ({ ...rest }: CommonProps): React.JSX.Element;
15
+ ({ sx, ...rest }: CommonProps): React.JSX.Element;
15
16
  displayName: string;
16
17
  };
17
18
  Two: {
18
- ({ ...rest }: CommonProps): React.JSX.Element;
19
+ ({ sx, ...rest }: CommonProps): React.JSX.Element;
19
20
  displayName: string;
20
21
  };
21
22
  Three: {
22
- ({ ...rest }: CommonProps): React.JSX.Element;
23
+ ({ sx, ...rest }: CommonProps): React.JSX.Element;
23
24
  displayName: string;
24
25
  };
25
26
  Four: {
26
- ({ ...rest }: CommonProps): React.JSX.Element;
27
+ ({ sx, ...rest }: CommonProps): React.JSX.Element;
27
28
  displayName: string;
28
29
  };
29
30
  Five: {
30
- ({ ...rest }: CommonProps): React.JSX.Element;
31
+ ({ sx, ...rest }: CommonProps): React.JSX.Element;
31
32
  displayName: string;
32
33
  };
33
34
  Six: {
34
- ({ ...rest }: CommonProps): React.JSX.Element;
35
+ ({ sx, ...rest }: CommonProps): React.JSX.Element;
35
36
  displayName: string;
36
37
  };
37
38
  Seven: {
38
- ({ ...rest }: CommonProps): React.JSX.Element;
39
+ ({ sx, ...rest }: CommonProps): React.JSX.Element;
39
40
  displayName: string;
40
41
  };
41
42
  Eight: {
42
- ({ ...rest }: CommonProps): React.JSX.Element;
43
+ ({ sx, ...rest }: CommonProps): React.JSX.Element;
43
44
  displayName: string;
44
45
  };
45
46
  };
@@ -6,29 +6,30 @@ const StyledH = styled(Typography) `
6
6
  font-size: ${({ $fontSize }) => $fontSize + 'px'};
7
7
  line-height: ${({ $lineHeight }) => $lineHeight + 'px'};
8
8
  text-align: ${({ $textAlign }) => $textAlign || 'left'};
9
+ ${({ $sx }) => ($sx ? $sx : '')}
9
10
  `;
10
- export const H = (args) => React.createElement(StyledH, { ...args });
11
- const One = ({ ...rest }) => (React.createElement(StyledH, { as: 'h1', "$fontSize": 48, "$lineHeight": 64, ...rest }));
11
+ export const H = ({ sx, ...args }) => (React.createElement(StyledH, { "$sx": sx, ...args }));
12
+ const One = ({ sx, ...rest }) => (React.createElement(StyledH, { as: 'h1', "$fontSize": 48, "$lineHeight": 64, "$sx": sx, ...rest }));
12
13
  One.displayName = 'H.One';
13
14
  H.One = One;
14
- const Two = ({ ...rest }) => (React.createElement(StyledH, { as: 'h2', "$fontSize": 40, "$lineHeight": 60, ...rest }));
15
+ const Two = ({ sx, ...rest }) => (React.createElement(StyledH, { as: 'h2', "$fontSize": 40, "$lineHeight": 60, "$sx": sx, ...rest }));
15
16
  Two.displayName = 'H.Two';
16
17
  H.Two = Two;
17
- const Three = ({ ...rest }) => (React.createElement(StyledH, { as: 'h3', "$fontSize": 36, "$lineHeight": 54, ...rest }));
18
+ const Three = ({ sx, ...rest }) => (React.createElement(StyledH, { as: 'h3', "$fontSize": 36, "$lineHeight": 54, "$sx": sx, ...rest }));
18
19
  Three.displayName = 'H.Three';
19
20
  H.Three = Three;
20
- const Four = ({ ...rest }) => (React.createElement(StyledH, { as: 'h4', "$fontSize": 32, "$lineHeight": 48, ...rest }));
21
+ const Four = ({ sx, ...rest }) => (React.createElement(StyledH, { as: 'h4', "$fontSize": 32, "$lineHeight": 48, "$sx": sx, ...rest }));
21
22
  Four.displayName = 'H.Four';
22
23
  H.Four = Four;
23
- const Five = ({ ...rest }) => (React.createElement(StyledH, { as: 'h5', "$fontSize": 28, "$lineHeight": 36, ...rest }));
24
+ const Five = ({ sx, ...rest }) => (React.createElement(StyledH, { as: 'h5', "$fontSize": 28, "$lineHeight": 36, "$sx": sx, ...rest }));
24
25
  Five.displayName = 'H.Five';
25
26
  H.Five = Five;
26
- const Six = ({ ...rest }) => (React.createElement(StyledH, { as: 'h6', "$fontSize": 24, "$lineHeight": 36, ...rest }));
27
+ const Six = ({ sx, ...rest }) => (React.createElement(StyledH, { as: 'h6', "$fontSize": 24, "$lineHeight": 36, "$sx": sx, ...rest }));
27
28
  Six.displayName = 'H.Six';
28
29
  H.Six = Six;
29
- const Seven = ({ ...rest }) => (React.createElement(StyledH, { as: 'h6', "$fontSize": 20, "$lineHeight": 28, ...rest }));
30
+ const Seven = ({ sx, ...rest }) => (React.createElement(StyledH, { as: 'h6', "$fontSize": 20, "$lineHeight": 28, "$sx": sx, ...rest }));
30
31
  Seven.displayName = 'H.Seven';
31
32
  H.Seven = Seven;
32
- const Eight = ({ ...rest }) => (React.createElement(StyledH, { as: 'h6', "$fontSize": 18, "$lineHeight": 26, ...rest }));
33
+ const Eight = ({ sx, ...rest }) => (React.createElement(StyledH, { as: 'h6', "$fontSize": 18, "$lineHeight": 26, "$sx": sx, ...rest }));
33
34
  Eight.displayName = 'H.Eight';
34
35
  H.Eight = Eight;
@@ -8,6 +8,7 @@ export interface PostProps extends React.PropsWithChildren {
8
8
  content: string;
9
9
  createdDate: string;
10
10
  hasComments?: boolean;
11
+ id?: string;
11
12
  images?: string[];
12
13
  onComment: (comment: string) => void;
13
14
  }
@@ -18,7 +18,7 @@ export const Post = ({ actions, author, authorActive, authorHref, authorImage, c
18
18
  setComment('');
19
19
  };
20
20
  const subtitle = abbrTimeBeforeDate(new Date(createdDate));
21
- return (React.createElement(Wrapper, null,
21
+ return (React.createElement(Wrapper, { id: id },
22
22
  React.createElement(Header, null,
23
23
  React.createElement(Avatar, { href: authorHref, image: authorImage, size: 64, status: authorActive ? 'online' : undefined, subtitle: React.createElement(P, { as: "span", sx: "vertical-align: top;", "$fontSize": 14, "$lineHeight": 20 }, subtitle), title: React.createElement(H, { as: "span", "$bold": true, "$fontSize": 18, "$lineHeight": 26 }, author), textPosition: "right" })),
24
24
  React.createElement(P, { "$sx": "padding: 24px;" }, content),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soul-refiner/design-system",
3
- "version": "0.2.34",
3
+ "version": "0.2.35",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "publishConfig": {