@vygruppen/spor-react 0.0.2 → 0.2.0

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 74906cfe0f36c6f4
1
+ @vygruppen/spor-react:build: cache hit, replaying output 299fc835ace8ced1
2
2
  @vygruppen/spor-react:build:
3
- @vygruppen/spor-react:build: > @vygruppen/spor-react@0.0.2 build
3
+ @vygruppen/spor-react:build: > @vygruppen/spor-react@0.2.0 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 41ms
12
- @vygruppen/spor-react:build: CJS dist/index.js 4.01 KB
11
+ @vygruppen/spor-react:build: CJS ⚡️ Build success in 31ms
12
+ @vygruppen/spor-react:build: CJS dist/index.js 6.19 KB
13
13
  @vygruppen/spor-react:build: DTS Build start
14
- @vygruppen/spor-react:build: DTS ⚡️ Build success in 3592ms
15
- @vygruppen/spor-react:build: DTS dist/index.d.ts 1.90 KB
14
+ @vygruppen/spor-react:build: DTS ⚡️ Build success in 3575ms
15
+ @vygruppen/spor-react:build: DTS dist/index.d.ts 2.01 KB
package/CHANGELOG.md CHANGED
@@ -1,6 +1,66 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7dfe259: Add typography package
8
+ - 2eac310: Add layout package
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies [2eac310]
13
+ - @vygruppen/spor-layout-react@0.0.2
14
+
15
+ ## 0.1.2
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies [fb429ab]
20
+ - Updated dependencies [65feebf]
21
+ - Updated dependencies [ee71c70]
22
+ - Updated dependencies [24b0a72]
23
+ - Updated dependencies [91e50b0]
24
+ - Updated dependencies [8d088e0]
25
+ - @vygruppen/spor-input-react@0.1.0
26
+ - @vygruppen/spor-theme-react@0.0.4
27
+
28
+ ## 0.1.1
29
+
30
+ ### Patch Changes
31
+
32
+ - 099d492: Add repository and home page metadata to all packages
33
+ - Updated dependencies [6f145b6]
34
+ - Updated dependencies [099d492]
35
+ - Updated dependencies [146bdda]
36
+ - @vygruppen/spor-theme-react@0.0.3
37
+ - @vygruppen/spor-button-react@0.0.3
38
+ - @vygruppen/spor-i18n-react@0.0.3
39
+ - @vygruppen/spor-input-react@0.0.3
40
+ - @vygruppen/spor-logo-react@0.0.3
41
+
42
+ ## 0.1.0
43
+
44
+ ### Minor Changes
45
+
46
+ - a8d2de3: Add peer dependencies to `@vygruppen/spor-react`
47
+
48
+ In order to optimize for flexibility, the `spor-react` package loses a few direct dependencies, and adds them as peer dependencies.
49
+
50
+ This is a **breaking change**. To upgrade, please run:
51
+
52
+ ```bash
53
+ $ npm install @chakra-ui/react @emotion/styled @emotion/react framer-motion
54
+ ```
55
+
56
+ or:
57
+
58
+ ```bash
59
+ $ yarn add @chakra-ui/react @emotion/styled @emotion/react framer-motion
60
+ ```
61
+
3
62
  ## 0.0.2
63
+
4
64
  ### Patch Changes
5
65
 
6
66
  - 8e5444a: Fix a bug where the published packages specified the source files, instead of the built dist files
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
@@ -4,8 +4,10 @@ export * from '@vygruppen/spor-button-react';
4
4
  import { Language } from '@vygruppen/spor-i18n-react';
5
5
  export * from '@vygruppen/spor-i18n-react';
6
6
  export * from '@vygruppen/spor-input-react';
7
+ export * from '@vygruppen/spor-layout-react';
7
8
  export * from '@vygruppen/spor-logo-react';
8
9
  export * from '@vygruppen/spor-theme-react';
10
+ export * from '@vygruppen/spor-typography-react';
9
11
 
10
12
  declare type SporProviderProps = ChakraProviderProps & {
11
13
  language: Language;
@@ -22,7 +24,7 @@ declare type SporProviderProps = ChakraProviderProps & {
22
24
  * 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
25
  *
24
26
  * ```tsx
25
- * * import { SporProvider, Language } from "@spor-react";
27
+ * * import { SporProvider, Language } from "@vygruppen/spor-react";
26
28
  * const root = React.createRoot(document.getElementById("root"))
27
29
  * root.render(
28
30
  * <SporProvider language={Language.NorwegianBokmal}>
@@ -34,7 +36,7 @@ declare type SporProviderProps = ChakraProviderProps & {
34
36
  * 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
37
  *
36
38
  * ```tsx
37
- * import { extendTheme, SporProvider } from "@spor-react";
39
+ * import { extendTheme, SporProvider } from "@vygruppen/spor-react";
38
40
  * const theme = extendTheme({
39
41
  * colors: { myApp: { primary: "tomato" } }
40
42
  * });
package/dist/index.js CHANGED
@@ -31,6 +31,12 @@ var __objRest = (source, exclude) => {
31
31
  }
32
32
  return target;
33
33
  };
34
+ var __esm = (fn, res) => function __init() {
35
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
36
+ };
37
+ var __commonJS = (cb, mod) => function __require() {
38
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
39
+ };
34
40
  var __export = (target, all) => {
35
41
  for (var name in all)
36
42
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -52,20 +58,66 @@ var __toCommonJS = /* @__PURE__ */ ((cache) => {
52
58
  };
53
59
  })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
54
60
 
61
+ // ../../node_modules/tsup/assets/cjs_shims.js
62
+ var init_cjs_shims = __esm({
63
+ "../../node_modules/tsup/assets/cjs_shims.js"() {
64
+ }
65
+ });
66
+
67
+ // ../spor-typography-react/dist/index.js
68
+ var require_dist = __commonJS({
69
+ "../spor-typography-react/dist/index.js"(exports, module2) {
70
+ init_cjs_shims();
71
+ var __defProp2 = Object.defineProperty;
72
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
73
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
74
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
75
+ var __markAsModule2 = (target) => __defProp2(target, "__esModule", { value: true });
76
+ var __export2 = (target, all) => {
77
+ for (var name in all)
78
+ __defProp2(target, name, { get: all[name], enumerable: true });
79
+ };
80
+ var __reExport2 = (target, module22, copyDefault, desc) => {
81
+ if (module22 && typeof module22 === "object" || typeof module22 === "function") {
82
+ for (let key of __getOwnPropNames2(module22))
83
+ if (!__hasOwnProp2.call(target, key) && (copyDefault || key !== "default"))
84
+ __defProp2(target, key, { get: () => module22[key], enumerable: !(desc = __getOwnPropDesc2(module22, key)) || desc.enumerable });
85
+ }
86
+ return target;
87
+ };
88
+ var __toCommonJS2 = /* @__PURE__ */ ((cache) => {
89
+ return (module22, temp) => {
90
+ return cache && cache.get(module22) || (temp = __reExport2(__markAsModule2({}), module22, 1), cache && cache.set(module22, temp), temp);
91
+ };
92
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
93
+ var src_exports2 = {};
94
+ __export2(src_exports2, {
95
+ Heading: () => import_react5.Heading,
96
+ Text: () => import_react5.Text
97
+ });
98
+ var import_react5 = require("@chakra-ui/react");
99
+ module2.exports = __toCommonJS2(src_exports2);
100
+ }
101
+ });
102
+
55
103
  // src/index.tsx
56
104
  var src_exports = {};
57
105
  __export(src_exports, {
58
106
  SporProvider: () => SporProvider,
59
107
  extendTheme: () => import_react4.extendTheme
60
108
  });
109
+ init_cjs_shims();
61
110
  var import_react4 = require("@chakra-ui/react");
62
111
  __reExport(src_exports, require("@vygruppen/spor-button-react"));
63
112
  __reExport(src_exports, require("@vygruppen/spor-i18n-react"));
64
113
  __reExport(src_exports, require("@vygruppen/spor-input-react"));
114
+ __reExport(src_exports, require("@vygruppen/spor-layout-react"));
65
115
  __reExport(src_exports, require("@vygruppen/spor-logo-react"));
66
116
  __reExport(src_exports, require("@vygruppen/spor-theme-react"));
117
+ __reExport(src_exports, __toESM(require_dist()));
67
118
 
68
119
  // src/SporProvider.tsx
120
+ init_cjs_shims();
69
121
  var import_react = require("@chakra-ui/react");
70
122
  var import_react2 = require("@emotion/react");
71
123
  var import_spor_i18n_react = require("@vygruppen/spor-i18n-react");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vygruppen/spor-react",
3
- "version": "0.0.2",
3
+ "version": "0.2.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",
@@ -8,24 +8,35 @@
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": "*",
21
+ "@vygruppen/spor-layout-react": "*",
18
22
  "@vygruppen/spor-logo-react": "*",
19
23
  "@vygruppen/spor-theme-react": "*",
20
- "@vygruppen/spor-i18n-react": "*",
21
- "framer-motion": "^4.1.17"
24
+ "@vygruppen/spor-i18n-react": "*"
22
25
  },
23
26
  "devDependencies": {
27
+ "@chakra-ui/react": "^1.7.3",
28
+ "@emotion/react": "^11.7.1",
29
+ "@emotion/styled": "^11.6.0",
30
+ "framer-motion": "^5.0.0",
24
31
  "react": "^17.0.2",
25
32
  "react-dom": "^17.0.2",
26
33
  "tsup": "^5.11.11"
27
34
  },
28
35
  "peerDependencies": {
36
+ "@chakra-ui/react": "^1.7.3",
37
+ "@emotion/react": "^11.7.1",
38
+ "@emotion/styled": "^11.6.0",
39
+ "framer-motion": "^4.1.0 || ^5.0.0",
29
40
  "react": ">= 17.0.0",
30
41
  "react-dom": ">= 17.0.0"
31
42
  }
@@ -23,7 +23,7 @@ type SporProviderProps = ChakraProviderProps & {
23
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.
24
24
  *
25
25
  * ```tsx
26
- * * import { SporProvider, Language } from "@spor-react";
26
+ * * import { SporProvider, Language } from "@vygruppen/spor-react";
27
27
  * const root = React.createRoot(document.getElementById("root"))
28
28
  * root.render(
29
29
  * <SporProvider language={Language.NorwegianBokmal}>
@@ -35,7 +35,7 @@ type SporProviderProps = ChakraProviderProps & {
35
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.
36
36
  *
37
37
  * ```tsx
38
- * import { extendTheme, SporProvider } from "@spor-react";
38
+ * import { extendTheme, SporProvider } from "@vygruppen/spor-react";
39
39
  * const theme = extendTheme({
40
40
  * colors: { myApp: { primary: "tomato" } }
41
41
  * });
package/src/index.tsx CHANGED
@@ -2,6 +2,8 @@ export { extendTheme } from "@chakra-ui/react";
2
2
  export * from "@vygruppen/spor-button-react";
3
3
  export * from "@vygruppen/spor-i18n-react";
4
4
  export * from "@vygruppen/spor-input-react";
5
+ export * from "@vygruppen/spor-layout-react";
5
6
  export * from "@vygruppen/spor-logo-react";
6
7
  export * from "@vygruppen/spor-theme-react";
8
+ export * from "@vygruppen/spor-typography-react";
7
9
  export * from "./SporProvider";