@7shifts/sous-chef 3.1.0 → 3.1.1

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.
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { AlignItems, FlexWrap, JustifyContent, Space, SpaceConfig } from './types';
3
+ import { PositionStyles } from '../../foundation/types';
3
4
  declare type Props = {
4
5
  children: React.ReactNode;
5
6
  space?: Space | SpaceConfig;
@@ -13,7 +14,7 @@ declare type Props = {
13
14
  flexWrap?: FlexWrap;
14
15
  testId?: string;
15
16
  extraClass?: string;
16
- };
17
+ } & PositionStyles;
17
18
  /**
18
19
  * Flex is a internal component used by Stack and Inline. DON'T use this component outside of Sous Chef
19
20
  */
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { PositionStyles } from '../../foundation/types';
2
3
  import type { AlignItems, FlexWrap, JustifyContent, Space, SpaceConfig } from '../Flex/types';
3
4
  declare type Props = {
4
5
  children: React.ReactNode;
@@ -13,7 +14,7 @@ declare type Props = {
13
14
  inlineFlex?: boolean;
14
15
  flexWrap?: FlexWrap;
15
16
  testId?: string;
16
- };
17
+ } & PositionStyles;
17
18
  /**
18
19
  * Layout component to easily line elements up in a row.
19
20
  */
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { PositionStyles } from '../../foundation/types';
2
3
  import type { JustifyContent, Space, AlignItems, SpaceConfig } from '../Flex/types';
3
4
  declare type Props = {
4
5
  children: React.ReactNode;
@@ -12,7 +13,7 @@ declare type Props = {
12
13
  justifyContent?: JustifyContent;
13
14
  flexItems?: boolean;
14
15
  testId?: string;
15
- };
16
+ } & PositionStyles;
16
17
  /**
17
18
  * Layout component to easily stack elements up in a column.
18
19
  */
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { PositionStyles } from '../../foundation/types';
2
3
  import { TextType, Emphasis, Alignment } from './types';
3
4
  declare type Props = {
4
5
  children: React.ReactNode;
@@ -7,9 +8,14 @@ declare type Props = {
7
8
  alignment?: Alignment;
8
9
  color?: string;
9
10
  testId?: string;
10
- };
11
- declare const Text: ({ children, as, emphasis, alignment, color, testId }: Props) => React.ReactElement<{
11
+ } & PositionStyles;
12
+ declare const Text: ({ children, as, emphasis, alignment, color, testId, ...positionProps }: Props) => React.ReactElement<{
12
13
  style: {
14
+ margin?: string | number | (string & {}) | undefined;
15
+ marginTop?: string | number | (string & {}) | undefined;
16
+ marginRight?: string | number | (string & {}) | undefined;
17
+ marginBottom?: string | number | (string & {}) | undefined;
18
+ marginLeft?: string | number | (string & {}) | undefined;
13
19
  color: string | undefined;
14
20
  };
15
21
  className: string;
@@ -0,0 +1,77 @@
1
+ export declare const POSITION_ARG_TYPES: {
2
+ margin: {
3
+ name: string;
4
+ description: string;
5
+ control: {
6
+ type: string;
7
+ };
8
+ table: {
9
+ category: string;
10
+ };
11
+ };
12
+ marginTop: {
13
+ name: string;
14
+ description: string;
15
+ control: {
16
+ type: string;
17
+ };
18
+ table: {
19
+ category: string;
20
+ };
21
+ };
22
+ marginRight: {
23
+ name: string;
24
+ description: string;
25
+ control: {
26
+ type: string;
27
+ };
28
+ table: {
29
+ category: string;
30
+ };
31
+ };
32
+ marginBottom: {
33
+ name: string;
34
+ description: string;
35
+ control: {
36
+ type: string;
37
+ };
38
+ table: {
39
+ category: string;
40
+ };
41
+ };
42
+ marginLeft: {
43
+ name: string;
44
+ description: string;
45
+ control: {
46
+ type: string;
47
+ };
48
+ table: {
49
+ category: string;
50
+ };
51
+ };
52
+ m: {
53
+ table: {
54
+ disable: boolean;
55
+ };
56
+ };
57
+ mt: {
58
+ table: {
59
+ disable: boolean;
60
+ };
61
+ };
62
+ mr: {
63
+ table: {
64
+ disable: boolean;
65
+ };
66
+ };
67
+ mb: {
68
+ table: {
69
+ disable: boolean;
70
+ };
71
+ };
72
+ ml: {
73
+ table: {
74
+ disable: boolean;
75
+ };
76
+ };
77
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7shifts/sous-chef",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "7shifts component library",
5
5
  "author": "7shifts",
6
6
  "license": "MIT",
@@ -51,6 +51,7 @@
51
51
  "@svgr/cli": "^6.2.0",
52
52
  "@testing-library/jest-dom": "^5.12.0",
53
53
  "@testing-library/react": "^11.2.7",
54
+ "@testing-library/react-hooks": "^8.0.1",
54
55
  "@testing-library/user-event": "^13.2.1",
55
56
  "@types/jest": "^25.1.4",
56
57
  "@types/lodash-es": "^4.17.5",