@sproutsocial/seeds-react-box 1.1.0 → 1.1.2
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +18 -0
- package/dist/esm/index.js +4 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/jest.config.js +9 -0
- package/package.json +12 -5
- package/src/Box.stories.tsx +154 -0
- package/src/__tests__/Box.test.tsx +10 -0
- package/src/styles.tsx +1 -1
- package/tsconfig.json +3 -9
- package/tsup.config.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -8,14 +8,14 @@ CLI Target: es2022
|
|
|
8
8
|
CLI Cleaning output folder
|
|
9
9
|
CJS Build start
|
|
10
10
|
ESM Build start
|
|
11
|
-
CJS dist/index.js 2.
|
|
12
|
-
CJS dist/index.js.map 1.
|
|
13
|
-
CJS ⚡️ Build success in
|
|
14
|
-
ESM dist/esm/index.js
|
|
15
|
-
ESM dist/esm/index.js.map 1.
|
|
16
|
-
ESM ⚡️ Build success in
|
|
11
|
+
CJS dist/index.js 2.68 KB
|
|
12
|
+
CJS dist/index.js.map 1.77 KB
|
|
13
|
+
CJS ⚡️ Build success in 112ms
|
|
14
|
+
ESM dist/esm/index.js 878.00 B
|
|
15
|
+
ESM dist/esm/index.js.map 1.77 KB
|
|
16
|
+
ESM ⚡️ Build success in 115ms
|
|
17
17
|
DTS Build start
|
|
18
|
-
DTS ⚡️ Build success in
|
|
18
|
+
DTS ⚡️ Build success in 32753ms
|
|
19
19
|
DTS dist/index.d.ts 800.00 B
|
|
20
20
|
DTS dist/index.d.mts 800.00 B
|
|
21
|
-
Done in
|
|
21
|
+
Done in 37.60s.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @sproutsocial/seeds-react-box
|
|
2
2
|
|
|
3
|
+
## 1.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9fd8bac: Update dependencies to use semantic package version instead of wildcards
|
|
8
|
+
- Updated dependencies [9fd8bac]
|
|
9
|
+
- @sproutsocial/seeds-react-system-props@3.0.2
|
|
10
|
+
- @sproutsocial/seeds-react-theme@2.2.1
|
|
11
|
+
|
|
12
|
+
## 1.1.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 57648a5: All packages now depend on the latest seed component builds
|
|
17
|
+
- Updated dependencies [57648a5]
|
|
18
|
+
- @sproutsocial/seeds-react-system-props@3.0.1
|
|
19
|
+
- @sproutsocial/seeds-react-theme@2.0.1
|
|
20
|
+
|
|
3
21
|
## 1.1.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/dist/esm/index.js
CHANGED
|
@@ -25,9 +25,10 @@ var Container = styled.div`
|
|
|
25
25
|
var styles_default = Container;
|
|
26
26
|
|
|
27
27
|
// src/Box.tsx
|
|
28
|
+
import { jsx } from "react/jsx-runtime";
|
|
28
29
|
var Box = React.forwardRef(
|
|
29
30
|
({ color, ...props }, ref) => {
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
31
32
|
styles_default,
|
|
32
33
|
{
|
|
33
34
|
...props,
|
|
@@ -41,9 +42,9 @@ Box.displayName = "Box";
|
|
|
41
42
|
var Box_default = Box;
|
|
42
43
|
|
|
43
44
|
// src/index.ts
|
|
44
|
-
var
|
|
45
|
+
var index_default = Box_default;
|
|
45
46
|
export {
|
|
46
47
|
Box_default as Box,
|
|
47
|
-
|
|
48
|
+
index_default as default
|
|
48
49
|
};
|
|
49
50
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Box.tsx","../../src/styles.tsx","../../src/index.ts"],"sourcesContent":["import * as React from \"react\";\nimport Container from \"./styles\";\nimport type { TypeBoxProps } from \"./BoxTypes\";\n\nconst Box = React.forwardRef<HTMLDivElement, TypeBoxProps>(\n ({ color, ...props }, ref) => {\n return (\n <Container\n {...props}\n ref={ref}\n // TODO: fix this type since `color` should be valid here. TS can't resolve the correct type.\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n color={color}\n />\n );\n }\n);\n\nBox.displayName = \"Box\";\n\nexport default Box;\n","import styled from \"styled-components\";\nimport {\n COMMON,\n BORDER,\n LAYOUT,\n POSITION,\n FLEXBOX,\n GRID,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport { TypeContainerProps } from \"./BoxTypes\";\n\nconst Container = styled.div<TypeContainerProps>`\n box-sizing: border-box;\n font-family: ${({ theme }) => theme.fontFamily};\n\n ${COMMON}\n ${BORDER}\n ${LAYOUT}\n ${POSITION}\n ${FLEXBOX}\n ${GRID}\n`;\n\nexport default Container;\n","import Box from \"./Box\";\n\nexport default Box;\nexport { Box };\nexport * from \"./BoxTypes\";\n"],"mappings":";AAAA,YAAY,WAAW;;;ACAvB,OAAO,YAAY;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,IAAM,YAAY,OAAO;AAAA;AAAA,iBAER,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU;AAAA;AAAA,IAE5C,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,IAAI;AAAA;AAGR,IAAO,iBAAQ;;;
|
|
1
|
+
{"version":3,"sources":["../../src/Box.tsx","../../src/styles.tsx","../../src/index.ts"],"sourcesContent":["import * as React from \"react\";\nimport Container from \"./styles\";\nimport type { TypeBoxProps } from \"./BoxTypes\";\n\nconst Box = React.forwardRef<HTMLDivElement, TypeBoxProps>(\n ({ color, ...props }, ref) => {\n return (\n <Container\n {...props}\n ref={ref}\n // TODO: fix this type since `color` should be valid here. TS can't resolve the correct type.\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n color={color}\n />\n );\n }\n);\n\nBox.displayName = \"Box\";\n\nexport default Box;\n","import styled from \"styled-components\";\nimport {\n COMMON,\n BORDER,\n LAYOUT,\n POSITION,\n FLEXBOX,\n GRID,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeContainerProps } from \"./BoxTypes\";\n\nconst Container = styled.div<TypeContainerProps>`\n box-sizing: border-box;\n font-family: ${({ theme }) => theme.fontFamily};\n\n ${COMMON}\n ${BORDER}\n ${LAYOUT}\n ${POSITION}\n ${FLEXBOX}\n ${GRID}\n`;\n\nexport default Container;\n","import Box from \"./Box\";\n\nexport default Box;\nexport { Box };\nexport * from \"./BoxTypes\";\n"],"mappings":";AAAA,YAAY,WAAW;;;ACAvB,OAAO,YAAY;AACnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,IAAM,YAAY,OAAO;AAAA;AAAA,iBAER,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU;AAAA;AAAA,IAE5C,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,IAAI;AAAA;AAGR,IAAO,iBAAQ;;;ADhBT;AAHN,IAAM,MAAY;AAAA,EAChB,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ;AAC5B,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QAIA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAI,cAAc;AAElB,IAAO,cAAQ;;;AEnBf,IAAO,gBAAQ;","names":[]}
|
package/dist/index.js
CHANGED
|
@@ -28,12 +28,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
Box: () => Box_default,
|
|
34
|
-
default: () =>
|
|
34
|
+
default: () => index_default
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
37
37
|
|
|
38
38
|
// src/Box.tsx
|
|
39
39
|
var React = __toESM(require("react"));
|
|
@@ -55,9 +55,10 @@ var Container = import_styled_components.default.div`
|
|
|
55
55
|
var styles_default = Container;
|
|
56
56
|
|
|
57
57
|
// src/Box.tsx
|
|
58
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
58
59
|
var Box = React.forwardRef(
|
|
59
60
|
({ color, ...props }, ref) => {
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
61
62
|
styles_default,
|
|
62
63
|
{
|
|
63
64
|
...props,
|
|
@@ -71,7 +72,7 @@ Box.displayName = "Box";
|
|
|
71
72
|
var Box_default = Box;
|
|
72
73
|
|
|
73
74
|
// src/index.ts
|
|
74
|
-
var
|
|
75
|
+
var index_default = Box_default;
|
|
75
76
|
// Annotate the CommonJS export names for ESM import in node:
|
|
76
77
|
0 && (module.exports = {
|
|
77
78
|
Box
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/Box.tsx","../src/styles.tsx"],"sourcesContent":["import Box from \"./Box\";\n\nexport default Box;\nexport { Box };\nexport * from \"./BoxTypes\";\n","import * as React from \"react\";\nimport Container from \"./styles\";\nimport type { TypeBoxProps } from \"./BoxTypes\";\n\nconst Box = React.forwardRef<HTMLDivElement, TypeBoxProps>(\n ({ color, ...props }, ref) => {\n return (\n <Container\n {...props}\n ref={ref}\n // TODO: fix this type since `color` should be valid here. TS can't resolve the correct type.\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n color={color}\n />\n );\n }\n);\n\nBox.displayName = \"Box\";\n\nexport default Box;\n","import styled from \"styled-components\";\nimport {\n COMMON,\n BORDER,\n LAYOUT,\n POSITION,\n FLEXBOX,\n GRID,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport { TypeContainerProps } from \"./BoxTypes\";\n\nconst Container = styled.div<TypeContainerProps>`\n box-sizing: border-box;\n font-family: ${({ theme }) => theme.fontFamily};\n\n ${COMMON}\n ${BORDER}\n ${LAYOUT}\n ${POSITION}\n ${FLEXBOX}\n ${GRID}\n`;\n\nexport default Container;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;;;ACAvB,+BAAmB;AACnB,sCAOO;AAGP,IAAM,YAAY,yBAAAA,QAAO;AAAA;AAAA,iBAER,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU;AAAA;AAAA,IAE5C,sCAAM;AAAA,IACN,sCAAM;AAAA,IACN,sCAAM;AAAA,IACN,wCAAQ;AAAA,IACR,uCAAO;AAAA,IACP,oCAAI;AAAA;AAGR,IAAO,iBAAQ;;;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/Box.tsx","../src/styles.tsx"],"sourcesContent":["import Box from \"./Box\";\n\nexport default Box;\nexport { Box };\nexport * from \"./BoxTypes\";\n","import * as React from \"react\";\nimport Container from \"./styles\";\nimport type { TypeBoxProps } from \"./BoxTypes\";\n\nconst Box = React.forwardRef<HTMLDivElement, TypeBoxProps>(\n ({ color, ...props }, ref) => {\n return (\n <Container\n {...props}\n ref={ref}\n // TODO: fix this type since `color` should be valid here. TS can't resolve the correct type.\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n color={color}\n />\n );\n }\n);\n\nBox.displayName = \"Box\";\n\nexport default Box;\n","import styled from \"styled-components\";\nimport {\n COMMON,\n BORDER,\n LAYOUT,\n POSITION,\n FLEXBOX,\n GRID,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeContainerProps } from \"./BoxTypes\";\n\nconst Container = styled.div<TypeContainerProps>`\n box-sizing: border-box;\n font-family: ${({ theme }) => theme.fontFamily};\n\n ${COMMON}\n ${BORDER}\n ${LAYOUT}\n ${POSITION}\n ${FLEXBOX}\n ${GRID}\n`;\n\nexport default Container;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;;;ACAvB,+BAAmB;AACnB,sCAOO;AAGP,IAAM,YAAY,yBAAAA,QAAO;AAAA;AAAA,iBAER,CAAC,EAAE,MAAM,MAAM,MAAM,UAAU;AAAA;AAAA,IAE5C,sCAAM;AAAA,IACN,sCAAM;AAAA,IACN,sCAAM;AAAA,IACN,wCAAQ;AAAA,IACR,uCAAO;AAAA,IACP,oCAAI;AAAA;AAGR,IAAO,iBAAQ;;;ADhBT;AAHN,IAAM,MAAY;AAAA,EAChB,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ;AAC5B,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QAIA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAI,cAAc;AAElB,IAAO,cAAQ;;;ADnBf,IAAO,gBAAQ;","names":["styled"]}
|
package/jest.config.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sproutsocial/seeds-react-box",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Seeds React Box",
|
|
5
5
|
"author": "Sprout Social, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,14 +9,17 @@
|
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "tsup --dts",
|
|
12
|
+
"build:debug": "tsup --dts --metafile",
|
|
12
13
|
"dev": "tsup --watch --dts",
|
|
13
14
|
"clean": "rm -rf .turbo dist",
|
|
14
15
|
"clean:modules": "rm -rf node_modules",
|
|
15
|
-
"typecheck": "tsc --noEmit"
|
|
16
|
+
"typecheck": "tsc --noEmit",
|
|
17
|
+
"test": "jest",
|
|
18
|
+
"test:watch": "jest --watch --coverage=false"
|
|
16
19
|
},
|
|
17
20
|
"dependencies": {
|
|
18
|
-
"@sproutsocial/seeds-react-theme": "^
|
|
19
|
-
"@sproutsocial/seeds-react-system-props": "^
|
|
21
|
+
"@sproutsocial/seeds-react-theme": "^2.2.0",
|
|
22
|
+
"@sproutsocial/seeds-react-system-props": "^3.0.1"
|
|
20
23
|
},
|
|
21
24
|
"devDependencies": {
|
|
22
25
|
"@types/react": "^18.0.0",
|
|
@@ -24,7 +27,11 @@
|
|
|
24
27
|
"@sproutsocial/eslint-config-seeds": "*",
|
|
25
28
|
"react": "^18.0.0",
|
|
26
29
|
"styled-components": "^5.2.3",
|
|
27
|
-
"
|
|
30
|
+
"tsup": "^8.0.2",
|
|
31
|
+
"typescript": "^5.6.2",
|
|
32
|
+
"@sproutsocial/seeds-tsconfig": "*",
|
|
33
|
+
"@sproutsocial/seeds-testing": "*",
|
|
34
|
+
"@sproutsocial/seeds-react-testing-library": "*"
|
|
28
35
|
},
|
|
29
36
|
"peerDependencies": {
|
|
30
37
|
"styled-components": "^5.2.3"
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { css } from "styled-components";
|
|
4
|
+
import Box from "./Box";
|
|
5
|
+
import { theme } from "@sproutsocial/seeds-react-theme";
|
|
6
|
+
import { useMeasure } from "@sproutsocial/seeds-react-hooks";
|
|
7
|
+
|
|
8
|
+
const meta = {
|
|
9
|
+
title: "Components/Box",
|
|
10
|
+
component: Box,
|
|
11
|
+
} satisfies Meta<typeof Box>;
|
|
12
|
+
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
15
|
+
|
|
16
|
+
export const Example: Story = {
|
|
17
|
+
name: "Example",
|
|
18
|
+
args: {
|
|
19
|
+
children: "This is a box.",
|
|
20
|
+
flexGrow: "1",
|
|
21
|
+
height: "200px",
|
|
22
|
+
bg: "neutral.100",
|
|
23
|
+
display: "flex",
|
|
24
|
+
alignItems: "center",
|
|
25
|
+
justifyContent: "center",
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const Responsive: Story = {
|
|
30
|
+
name: "Responsive example",
|
|
31
|
+
args: {
|
|
32
|
+
height: "200px",
|
|
33
|
+
display: "flex",
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
justifyContent: "center",
|
|
36
|
+
},
|
|
37
|
+
render: (args) => {
|
|
38
|
+
const ref = React.useRef<HTMLDivElement>(null);
|
|
39
|
+
const { width } = useMeasure(ref);
|
|
40
|
+
return (
|
|
41
|
+
<>
|
|
42
|
+
<Box {...args} flexGrow="1">
|
|
43
|
+
This is a box.
|
|
44
|
+
</Box>
|
|
45
|
+
<Box
|
|
46
|
+
{...args}
|
|
47
|
+
mb={400}
|
|
48
|
+
bg={[
|
|
49
|
+
"neutral.100",
|
|
50
|
+
"blue.200",
|
|
51
|
+
"green.200",
|
|
52
|
+
"yellow.200",
|
|
53
|
+
"orange.200",
|
|
54
|
+
]}
|
|
55
|
+
>
|
|
56
|
+
{width + "px"}
|
|
57
|
+
</Box>
|
|
58
|
+
{theme.breakpoints.map((width) => (
|
|
59
|
+
<Box
|
|
60
|
+
bg="neutral.200"
|
|
61
|
+
p={400}
|
|
62
|
+
width={width}
|
|
63
|
+
mb={400}
|
|
64
|
+
display="flex"
|
|
65
|
+
justifyContent="center"
|
|
66
|
+
position="relative"
|
|
67
|
+
css={css`
|
|
68
|
+
&:before {
|
|
69
|
+
content: "";
|
|
70
|
+
}
|
|
71
|
+
`}
|
|
72
|
+
>
|
|
73
|
+
{width}
|
|
74
|
+
</Box>
|
|
75
|
+
))}
|
|
76
|
+
</>
|
|
77
|
+
);
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const FlexboxGap: Story = {
|
|
82
|
+
name: "Flexbox gap example",
|
|
83
|
+
args: {
|
|
84
|
+
display: "flex",
|
|
85
|
+
flexWrap: "wrap",
|
|
86
|
+
gap: 200,
|
|
87
|
+
rowGap: 200,
|
|
88
|
+
columnGap: 200,
|
|
89
|
+
},
|
|
90
|
+
render: (args) => (
|
|
91
|
+
<Box {...args}>
|
|
92
|
+
{new Array(25).fill(null).map((_, i) => (
|
|
93
|
+
<Box
|
|
94
|
+
key={i}
|
|
95
|
+
display="flex"
|
|
96
|
+
alignItems="center"
|
|
97
|
+
justifyContent="center"
|
|
98
|
+
height="200px"
|
|
99
|
+
width="200px"
|
|
100
|
+
bg="green.400"
|
|
101
|
+
>
|
|
102
|
+
{i + 1}
|
|
103
|
+
</Box>
|
|
104
|
+
))}
|
|
105
|
+
</Box>
|
|
106
|
+
),
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export const Grid: Story = {
|
|
110
|
+
name: "Grid example",
|
|
111
|
+
argTypes: {
|
|
112
|
+
gridArea: { control: "text" },
|
|
113
|
+
gridAutoColumns: { control: "text" },
|
|
114
|
+
gridAutoFlow: { control: "text" },
|
|
115
|
+
gridAutoRows: { control: "text" },
|
|
116
|
+
gridColumn: { control: "text" },
|
|
117
|
+
gridColumnGap: { control: "text" },
|
|
118
|
+
gridRow: { control: "text" },
|
|
119
|
+
gridRowGap: { control: "text" },
|
|
120
|
+
gridTemplateAreas: { control: "text" },
|
|
121
|
+
gridTemplateRows: { control: "text" },
|
|
122
|
+
},
|
|
123
|
+
args: {
|
|
124
|
+
display: "grid",
|
|
125
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))",
|
|
126
|
+
gap: 400,
|
|
127
|
+
gridArea: undefined,
|
|
128
|
+
gridAutoColumns: undefined,
|
|
129
|
+
gridAutoFlow: undefined,
|
|
130
|
+
gridAutoRows: undefined,
|
|
131
|
+
gridColumn: undefined,
|
|
132
|
+
gridColumnGap: undefined,
|
|
133
|
+
gridRow: undefined,
|
|
134
|
+
gridRowGap: undefined,
|
|
135
|
+
gridTemplateAreas: undefined,
|
|
136
|
+
gridTemplateRows: undefined,
|
|
137
|
+
},
|
|
138
|
+
render: (args) => (
|
|
139
|
+
<Box {...args}>
|
|
140
|
+
{new Array(25).fill(null).map((_, i) => (
|
|
141
|
+
<Box
|
|
142
|
+
key={i}
|
|
143
|
+
display="flex"
|
|
144
|
+
alignItems="center"
|
|
145
|
+
justifyContent="center"
|
|
146
|
+
height="200px"
|
|
147
|
+
bg="green.400"
|
|
148
|
+
>
|
|
149
|
+
{i + 1}
|
|
150
|
+
</Box>
|
|
151
|
+
))}
|
|
152
|
+
</Box>
|
|
153
|
+
),
|
|
154
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { render, screen } from "@sproutsocial/seeds-react-testing-library";
|
|
2
|
+
import Box from "../Box";
|
|
3
|
+
|
|
4
|
+
describe("Box", () => {
|
|
5
|
+
it("should render properly", () => {
|
|
6
|
+
render(<Box>Test...</Box>);
|
|
7
|
+
|
|
8
|
+
expect(screen.getByText("Test...")).toBeInTheDocument();
|
|
9
|
+
});
|
|
10
|
+
});
|
package/src/styles.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
FLEXBOX,
|
|
8
8
|
GRID,
|
|
9
9
|
} from "@sproutsocial/seeds-react-system-props";
|
|
10
|
-
import { TypeContainerProps } from "./BoxTypes";
|
|
10
|
+
import type { TypeContainerProps } from "./BoxTypes";
|
|
11
11
|
|
|
12
12
|
const Container = styled.div<TypeContainerProps>`
|
|
13
13
|
box-sizing: border-box;
|
package/tsconfig.json
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "@sproutsocial/seeds-tsconfig/
|
|
2
|
+
"extends": "@sproutsocial/seeds-tsconfig/bundler/dom/library-monorepo",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"baseUrl": ".",
|
|
7
|
-
"paths": {
|
|
8
|
-
"@src": ["src"],
|
|
9
|
-
"@src*": ["src*"]
|
|
10
|
-
},
|
|
11
|
-
"jsx": "react"
|
|
4
|
+
"jsx": "react-jsx",
|
|
5
|
+
"module": "esnext"
|
|
12
6
|
},
|
|
13
7
|
"include": ["src/**/*"],
|
|
14
8
|
"exclude": ["node_modules", "dist"]
|