Skip to content

Commit 704ab7b

Browse files
authored
Deprecate and remove awesome styled grid from main bundle (#677)
1 parent 6e97a26 commit 704ab7b

File tree

4 files changed

+91
-29
lines changed

4 files changed

+91
-29
lines changed

package-lock.json

Lines changed: 45 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nordcloud/gnui",
33
"description": "Nordcloud Design System - a collection of reusable React components used in Nordcloud's SaaS products",
4-
"version": "9.2.0",
4+
"version": "10.0.0",
55
"license": "MIT",
66
"repository": {
77
"type": "git",
@@ -35,8 +35,7 @@
3535
"lint:css:quiet": "npm run lint:css -- --quiet",
3636
"lint:lockfile": "lockfile-lint",
3737
"validate:all": "npm-run-all --parallel check:types check:format check:knip lint:quiet lint:css:quiet lint:lockfile test:all",
38-
"postinstall": "patch-package",
39-
"prepare": "husky install"
38+
"prepare": "patch-package && husky install"
4039
},
4140
"engines": {
4241
"node": "~18.12.0 || ~18.13.0",
@@ -64,7 +63,6 @@
6463
"date-fns": "^2.30.0",
6564
"lodash.clonedeep": "^4.5.0",
6665
"polished": "^4.2.2",
67-
"react-awesome-styled-grid": "^3.1.4",
6866
"react-content-loader": "^6.2.1",
6967
"react-day-picker": "^8.8.2",
7068
"react-helmet": "^6.1.0",
@@ -105,6 +103,7 @@
105103
"patch-package": "^6.5.1",
106104
"prettier": "^3.0.3",
107105
"react": "^18.2.0",
106+
"react-awesome-styled-grid": "^3.1.4",
108107
"react-copy-to-clipboard": "^5.1.0",
109108
"react-dom": "^18.2.0",
110109
"rollup": "^3.29.4",

src/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
export {
2-
Container,
3-
Row,
4-
Col,
5-
Hidden,
6-
Visible,
7-
} from "react-awesome-styled-grid";
81
export { DayPicker } from "react-day-picker";
92

103
export * from "./components";

src/stories/Grid.mdx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,49 @@ import * as GridStories from "./Grid.stories";
33

44
<Meta of={GridStories} />
55

6+
## Note
7+
8+
Below guide is deprecated, the grid library mentioned here is no longer maintained and has a bug that requires additional setup.
9+
10+
### Setup
11+
12+
#### Install grid library
13+
14+
```bash
15+
npm install react-awesome-styled-grid
16+
```
17+
18+
#### Implement required fix
19+
20+
```bash
21+
npm install -D patch-package
22+
```
23+
24+
Make necessary changes inside two files:
25+
26+
`/node_modules/react-awesome-styled-grid/lib/react-awesome-styled-grid.cjs.js`
27+
`/node_modules/react-awesome-styled-grid/lib/react-awesome-styled-grid.es.js`
28+
29+
```text
30+
- void 0 === i && (i = global);
31+
+ void 0 === i && (i = window);
32+
```
33+
34+
Apply patch:
35+
36+
```text
37+
npx patch-package react-awesome-styled-grid
38+
```
39+
40+
Update `package.json`:
41+
42+
```text
43+
"scripts": {
44+
...
45+
"postinstall": "patch-package"
46+
}
47+
```
48+
649
## Basic usage
750

851
<Canvas>

0 commit comments

Comments
 (0)