@vygruppen/spor-react 0.0.1 → 0.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.
@@ -1,6 +1,6 @@
1
- @vygruppen/spor-react:build: cache hit, replaying output 08c08e23f4839a0f
1
+ @vygruppen/spor-react:build: cache hit, replaying output e64598162fc0fbb3
2
2
  @vygruppen/spor-react:build:
3
- @vygruppen/spor-react:build: > @vygruppen/spor-react@0.0.1 build
3
+ @vygruppen/spor-react:build: > @vygruppen/spor-react@0.1.2 build
4
4
  @vygruppen/spor-react:build: > tsup src/index.tsx --dts
5
5
  @vygruppen/spor-react:build:
6
6
  @vygruppen/spor-react:build: CLI Building entry: src/index.tsx
@@ -8,8 +8,8 @@
8
8
  @vygruppen/spor-react:build: CLI tsup v5.11.11
9
9
  @vygruppen/spor-react:build: CLI Target: node12
10
10
  @vygruppen/spor-react:build: CJS Build start
11
- @vygruppen/spor-react:build: CJS ⚡️ Build success in 28ms
12
- @vygruppen/spor-react:build: CJS dist/index.js 3.92 KB
11
+ @vygruppen/spor-react:build: CJS ⚡️ Build success in 30ms
12
+ @vygruppen/spor-react:build: CJS dist/index.js 4.01 KB
13
13
  @vygruppen/spor-react:build: DTS Build start
14
- @vygruppen/spor-react:build: DTS ⚡️ Build success in 4588ms
15
- @vygruppen/spor-react:build: DTS dist/index.d.ts 1.90 KB
14
+ @vygruppen/spor-react:build: DTS ⚡️ Build success in 3085ms
15
+ @vygruppen/spor-react:build: DTS dist/index.d.ts 1.92 KB
package/CHANGELOG.md ADDED
@@ -0,0 +1,60 @@
1
+ # @vygruppen/spor-react
2
+
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [fb429ab]
8
+ - Updated dependencies [65feebf]
9
+ - Updated dependencies [ee71c70]
10
+ - Updated dependencies [24b0a72]
11
+ - Updated dependencies [91e50b0]
12
+ - Updated dependencies [8d088e0]
13
+ - @vygruppen/spor-input-react@0.1.0
14
+ - @vygruppen/spor-theme-react@0.0.4
15
+
16
+ ## 0.1.1
17
+
18
+ ### Patch Changes
19
+
20
+ - 099d492: Add repository and home page metadata to all packages
21
+ - Updated dependencies [6f145b6]
22
+ - Updated dependencies [099d492]
23
+ - Updated dependencies [146bdda]
24
+ - @vygruppen/spor-theme-react@0.0.3
25
+ - @vygruppen/spor-button-react@0.0.3
26
+ - @vygruppen/spor-i18n-react@0.0.3
27
+ - @vygruppen/spor-input-react@0.0.3
28
+ - @vygruppen/spor-logo-react@0.0.3
29
+
30
+ ## 0.1.0
31
+
32
+ ### Minor Changes
33
+
34
+ - a8d2de3: Add peer dependencies to `@vygruppen/spor-react`
35
+
36
+ In order to optimize for flexibility, the `spor-react` package loses a few direct dependencies, and adds them as peer dependencies.
37
+
38
+ This is a **breaking change**. To upgrade, please run:
39
+
40
+ ```bash
41
+ $ npm install @chakra-ui/react @emotion/styled @emotion/react framer-motion
42
+ ```
43
+
44
+ or:
45
+
46
+ ```bash
47
+ $ yarn add @chakra-ui/react @emotion/styled @emotion/react framer-motion
48
+ ```
49
+
50
+ ## 0.0.2
51
+
52
+ ### Patch Changes
53
+
54
+ - 8e5444a: Fix a bug where the published packages specified the source files, instead of the built dist files
55
+ - Updated dependencies [8e5444a]
56
+ - @vygruppen/spor-button-react@0.0.2
57
+ - @vygruppen/spor-i18n-react@0.0.2
58
+ - @vygruppen/spor-input-react@0.0.2
59
+ - @vygruppen/spor-logo-react@0.0.2
60
+ - @vygruppen/spor-theme-react@0.0.2
package/README.md CHANGED
@@ -5,9 +5,23 @@ This package includes everything you need to build your React component library.
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- $ npm install @vygruppen/spor-react
8
+ $ npm install @vygruppen/spor-react @chakra-ui/react @emotion/styled @emotion/react framer-motion
9
9
  ```
10
10
 
11
+ or
12
+
13
+ ```bash
14
+ $ yarn add @vygruppen/spor-react @chakra-ui/react @emotion/styled @emotion/react framer-motion
15
+ ```
16
+
17
+ <details>
18
+ <summary>That's a lot of dependencies! Why?</summary>
19
+ The reason there's a lot of dependencies, is that you'll most likely use both Chakra UI and framer-motion to implement your application, and you shouldn't be required to install these dependencies twice.
20
+
21
+ You'll also be able to update them independently of this library, in case there's a new feature or non-breaking feature out there that you need.
22
+
23
+ </details>
24
+
11
25
  ## Usage
12
26
 
13
27
  Import the components and functions you need as named imports:
package/dist/index.d.ts CHANGED
@@ -22,7 +22,7 @@ declare type SporProviderProps = ChakraProviderProps & {
22
22
  * You do, however, need to specify the current language of your application. This is specified to provide any built-in microcopy and labels for any Spor components.
23
23
  *
24
24
  * ```tsx
25
- * * import { SporProvider, Language } from "@spor-react";
25
+ * * import { SporProvider, Language } from "@vygruppen/spor-react";
26
26
  * const root = React.createRoot(document.getElementById("root"))
27
27
  * root.render(
28
28
  * <SporProvider language={Language.NorwegianBokmal}>
@@ -34,7 +34,7 @@ declare type SporProviderProps = ChakraProviderProps & {
34
34
  * You can pass specific overrides to the theme if you need to. Adding application specific design tokens, for example could be a useful thing to do.
35
35
  *
36
36
  * ```tsx
37
- * import { extendTheme, SporProvider } from "@spor-react";
37
+ * import { extendTheme, SporProvider } from "@vygruppen/spor-react";
38
38
  * const theme = extendTheme({
39
39
  * colors: { myApp: { primary: "tomato" } }
40
40
  * });
package/dist/index.js CHANGED
@@ -69,10 +69,11 @@ __reExport(src_exports, require("@vygruppen/spor-theme-react"));
69
69
  var import_react = require("@chakra-ui/react");
70
70
  var import_react2 = require("@emotion/react");
71
71
  var import_spor_i18n_react = require("@vygruppen/spor-i18n-react");
72
+ var import_spor_theme_react = require("@vygruppen/spor-theme-react");
72
73
  var import_react3 = __toESM(require("react"));
73
74
  var SporProvider = (_a) => {
74
75
  var _b = _a, {
75
- theme = src_exports.theme,
76
+ theme = import_spor_theme_react.theme,
76
77
  language,
77
78
  children
78
79
  } = _b, props = __objRest(_b, [
@@ -85,7 +86,7 @@ var SporProvider = (_a) => {
85
86
  }, /* @__PURE__ */ import_react3.default.createElement(import_react.ChakraProvider, __spreadValues({
86
87
  theme
87
88
  }, props), /* @__PURE__ */ import_react3.default.createElement(import_react2.Global, {
88
- styles: src_exports.fontFaces
89
+ styles: import_spor_theme_react.fontFaces
89
90
  }), children));
90
91
  };
91
92
  module.exports = __toCommonJS(src_exports);
package/package.json CHANGED
@@ -1,31 +1,41 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "0.0.1",
4
- "main": "./src/index.tsx",
5
- "types": "./src/index.tsx",
3
+ "version": "0.1.2",
4
+ "main": "./dist/index.js",
5
+ "types": "./dist/index.d.ts",
6
6
  "license": "MIT",
7
7
  "scripts": {
8
8
  "build": "tsup src/index.tsx --dts",
9
9
  "dev": "tsup src/index.tsx --watch"
10
10
  },
11
+ "homepage": "https://github.com/nsbno/spor/tree/main/packages/spor-react",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/nsbno/spor.git",
15
+ "directory": "packages/spor-react"
16
+ },
11
17
  "dependencies": {
12
- "@chakra-ui/react": "^1.7.3",
13
- "@emotion/react": "^11.7.1",
14
- "@emotion/styled": "^11.6.0",
15
18
  "@leile/lobo-t": "^1.0.5",
16
19
  "@vygruppen/spor-button-react": "*",
17
20
  "@vygruppen/spor-input-react": "*",
18
21
  "@vygruppen/spor-logo-react": "*",
19
22
  "@vygruppen/spor-theme-react": "*",
20
- "@vygruppen/spor-i18n-react": "*",
21
- "framer-motion": "^4.1.17"
23
+ "@vygruppen/spor-i18n-react": "*"
22
24
  },
23
25
  "devDependencies": {
26
+ "@chakra-ui/react": "^1.7.3",
27
+ "@emotion/react": "^11.7.1",
28
+ "@emotion/styled": "^11.6.0",
29
+ "framer-motion": "^5.0.0",
24
30
  "react": "^17.0.2",
25
31
  "react-dom": "^17.0.2",
26
32
  "tsup": "^5.11.11"
27
33
  },
28
34
  "peerDependencies": {
35
+ "@chakra-ui/react": "^1.7.3",
36
+ "@emotion/react": "^11.7.1",
37
+ "@emotion/styled": "^11.6.0",
38
+ "framer-motion": "^4.1.0 || ^5.0.0",
29
39
  "react": ">= 17.0.0",
30
40
  "react-dom": ">= 17.0.0"
31
41
  }
@@ -1,7 +1,10 @@
1
1
  import { ChakraProvider, ChakraProviderProps } from "@chakra-ui/react";
2
2
  import { Global } from "@emotion/react";
3
3
  import { Language, LanguageProvider } from "@vygruppen/spor-i18n-react";
4
- import { fontFaces, theme as defaultSporTheme } from "@vygruppen/spor-react";
4
+ import {
5
+ fontFaces,
6
+ theme as defaultSporTheme,
7
+ } from "@vygruppen/spor-theme-react";
5
8
  import React from "react";
6
9
 
7
10
  type SporProviderProps = ChakraProviderProps & {
@@ -20,7 +23,7 @@ type SporProviderProps = ChakraProviderProps & {
20
23
  * You do, however, need to specify the current language of your application. This is specified to provide any built-in microcopy and labels for any Spor components.
21
24
  *
22
25
  * ```tsx
23
- * * import { SporProvider, Language } from "@spor-react";
26
+ * * import { SporProvider, Language } from "@vygruppen/spor-react";
24
27
  * const root = React.createRoot(document.getElementById("root"))
25
28
  * root.render(
26
29
  * <SporProvider language={Language.NorwegianBokmal}>
@@ -32,7 +35,7 @@ type SporProviderProps = ChakraProviderProps & {
32
35
  * You can pass specific overrides to the theme if you need to. Adding application specific design tokens, for example could be a useful thing to do.
33
36
  *
34
37
  * ```tsx
35
- * import { extendTheme, SporProvider } from "@spor-react";
38
+ * import { extendTheme, SporProvider } from "@vygruppen/spor-react";
36
39
  * const theme = extendTheme({
37
40
  * colors: { myApp: { primary: "tomato" } }
38
41
  * });