@sproutsocial/seeds-react-box 1.0.2 → 1.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,17 +1,21 @@
1
- $ tsup
2
- CLI Building entry: src/index.ts
3
- CLI Using tsconfig: tsconfig.json
4
- CLI tsup v8.0.2
5
- CLI Using tsup config: /home/runner/work/seeds/seeds/seeds-react/seeds-react-box/tsup.config.ts
6
- CLI Target: es2022
7
- CLI Cleaning output folder
8
- CJS Build start
9
- ESM Build start
10
- CJS dist/index.js 2.58 KB
11
- CJS ⚡️ Build success in 96ms
12
- ESM dist/esm/index.js 816.00 B
13
- ESM ⚡️ Build success in 92ms
14
- DTS Build start
15
- DTS ⚡️ Build success in 11499ms
16
- DTS dist/index.d.ts 800.00 B
17
- DTS dist/index.d.mts 800.00 B
1
+ yarn run v1.22.22
2
+ $ tsup --dts
3
+ CLI Building entry: src/index.ts
4
+ CLI Using tsconfig: tsconfig.json
5
+ CLI tsup v8.0.2
6
+ CLI Using tsup config: /home/runner/work/seeds/seeds/seeds-react/seeds-react-box/tsup.config.ts
7
+ CLI Target: es2022
8
+ CLI Cleaning output folder
9
+ CJS Build start
10
+ ESM Build start
11
+ ESM dist/esm/index.js 874.00 B
12
+ ESM dist/esm/index.js.map 1.77 KB
13
+ ESM ⚡️ Build success in 19ms
14
+ CJS dist/index.js 2.67 KB
15
+ CJS dist/index.js.map 1.77 KB
16
+ CJS ⚡️ Build success in 23ms
17
+ DTS Build start
18
+ DTS ⚡️ Build success in 6265ms
19
+ DTS dist/index.d.ts 800.00 B
20
+ DTS dist/index.d.mts 800.00 B
21
+ Done in 7.86s.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,32 @@
1
1
  # @sproutsocial/seeds-react-box
2
2
 
3
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 57648a5: All packages now depend on the latest seed component builds
8
+ - Updated dependencies [57648a5]
9
+ - @sproutsocial/seeds-react-system-props@3.0.1
10
+ - @sproutsocial/seeds-react-theme@2.0.1
11
+
12
+ ## 1.1.0
13
+
14
+ ### Minor Changes
15
+
16
+ - e5df935: Add React 18 support
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [e5df935]
21
+ - @sproutsocial/seeds-react-system-props@2.3.0
22
+ - @sproutsocial/seeds-react-theme@1.4.0
23
+
3
24
  ## 1.0.2
4
25
 
5
26
  ### Patch Changes
6
27
 
7
28
  - c7b905b: - Update `module` field to point to correct ES Module entry point
8
- - Fix package build so ESM exports are imported properly by web pack
29
+ - Fix package build so ESM exports are imported properly by web pack
9
30
 
10
31
  ## 1.0.1
11
32
 
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__ */ React.createElement(
31
+ return /* @__PURE__ */ jsx(
31
32
  styles_default,
32
33
  {
33
34
  ...props,
@@ -46,3 +47,4 @@ export {
46
47
  Box_default as Box,
47
48
  src_default as default
48
49
  };
50
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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 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,cAAQ;","names":[]}
package/dist/index.js CHANGED
@@ -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__ */ React.createElement(
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
62
  styles_default,
62
63
  {
63
64
  ...props,
@@ -76,3 +77,4 @@ var src_default = Box_default;
76
77
  0 && (module.exports = {
77
78
  Box
78
79
  });
80
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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 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,cAAQ;","names":["styled"]}
package/jest.config.js ADDED
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @type {import('jest').Config}
3
+ */
4
+
5
+ const baseConfig = require("@sproutsocial/seeds-testing");
6
+
7
+ const config = {
8
+ ...baseConfig,
9
+ displayName: "seeds-react-box",
10
+ setupFilesAfterEnv: ["@sproutsocial/seeds-testing/setupAfterEnv"],
11
+ };
12
+
13
+ module.exports = config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/seeds-react-box",
3
- "version": "1.0.2",
3
+ "version": "1.1.1",
4
4
  "description": "Seeds React Box",
5
5
  "author": "Sprout Social, Inc.",
6
6
  "license": "MIT",
@@ -8,19 +8,29 @@
8
8
  "module": "dist/esm/index.js",
9
9
  "types": "dist/index.d.ts",
10
10
  "scripts": {
11
- "build": "tsup"
11
+ "build": "tsup --dts",
12
+ "dev": "tsup --watch --dts",
13
+ "clean": "rm -rf .turbo dist",
14
+ "clean:modules": "rm -rf node_modules",
15
+ "typecheck": "tsc --noEmit",
16
+ "test": "jest",
17
+ "test:watch": "jest --watch --coverage=false"
12
18
  },
13
19
  "dependencies": {
14
- "@sproutsocial/seeds-react-theme": "^1.0.0",
15
- "@sproutsocial/seeds-react-system-props": "^2.2.0"
20
+ "@sproutsocial/seeds-react-theme": "^*",
21
+ "@sproutsocial/seeds-react-system-props": "^*"
16
22
  },
17
23
  "devDependencies": {
18
- "@types/react": "^17.0.0",
24
+ "@types/react": "^18.0.0",
19
25
  "@types/styled-components": "^5.1.26",
20
26
  "@sproutsocial/eslint-config-seeds": "*",
21
- "react": "^17.0.2",
27
+ "react": "^18.0.0",
22
28
  "styled-components": "^5.2.3",
23
- "typescript": "^5.1.6"
29
+ "tsup": "^8.0.2",
30
+ "typescript": "^5.6.2",
31
+ "@sproutsocial/seeds-tsconfig": "*",
32
+ "@sproutsocial/seeds-testing": "*",
33
+ "@sproutsocial/seeds-react-testing-library": "*"
24
34
  },
25
35
  "peerDependencies": {
26
36
  "styled-components": "^5.2.3"
@@ -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/react-library.json",
2
+ "extends": "@sproutsocial/seeds-tsconfig/bundler/dom/library-monorepo",
3
3
  "compilerOptions": {
4
- "noImplicitAny": false,
5
- "noUncheckedIndexedAccess": false,
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"]
package/tsup.config.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { defineConfig } from "tsup";
2
2
 
3
- export default defineConfig({
3
+ export default defineConfig((options) => ({
4
4
  entry: ["src/index.ts"],
5
5
  format: ["cjs", "esm"],
6
6
  clean: true,
7
7
  legacyOutput: true,
8
- dts: true,
8
+ dts: options.dts,
9
9
  external: ["react"],
10
- });
10
+ sourcemap: true,
11
+ }));