@amityco/ui-kit-open-source 3.6.0 → 3.7.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.
- package/README.md +136 -0
- package/dist/esm/index.css +6 -1
- package/dist/esm/index.js +1034 -750
- package/dist/index.css +6 -1
- package/dist/index.d.mts +181 -3
- package/dist/index.d.ts +181 -3
- package/dist/index.js +1071 -779
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +27 -9
- package/readme.md +136 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amityco/ui-kit-open-source",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=16",
|
|
6
6
|
"pnpm": ">=8"
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
14
|
"import": "./dist/esm/index.js",
|
|
15
15
|
"default": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./dist/index.css": {
|
|
18
|
+
"import": "./dist/esm/index.css",
|
|
19
|
+
"default": "./dist/index.css"
|
|
16
20
|
}
|
|
17
21
|
},
|
|
18
22
|
"files": [
|
|
@@ -29,17 +33,18 @@
|
|
|
29
33
|
"test:watch": "jest --watch",
|
|
30
34
|
"storybook": "storybook dev -p 6006",
|
|
31
35
|
"storybook:build": "storybook build --output-dir ./storybook-build",
|
|
32
|
-
"lint": "eslint .",
|
|
33
|
-
"
|
|
36
|
+
"lint": "eslint . && stylelint \"**/*.css\"",
|
|
37
|
+
"stylelint": "stylelint",
|
|
38
|
+
"lint:fix": "eslint . --fix && stylelint \"**/*.css\" --fix",
|
|
34
39
|
"tsc": "tsc"
|
|
35
40
|
},
|
|
36
41
|
"peerDependencies": {
|
|
37
|
-
"@amityco/ts-sdk": "
|
|
42
|
+
"@amityco/ts-sdk": "^6.27.0",
|
|
38
43
|
"react": ">=17.0.2",
|
|
39
44
|
"react-dom": ">=17.0.2"
|
|
40
45
|
},
|
|
41
46
|
"devDependencies": {
|
|
42
|
-
"@amityco/ts-sdk": "^6.
|
|
47
|
+
"@amityco/ts-sdk": "^6.27.0",
|
|
43
48
|
"@storybook/addon-a11y": "^7.6.7",
|
|
44
49
|
"@storybook/addon-actions": "^7.6.7",
|
|
45
50
|
"@storybook/addon-backgrounds": "^7.6.7",
|
|
@@ -65,7 +70,8 @@
|
|
|
65
70
|
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
|
66
71
|
"@typescript-eslint/parser": "^6.18.0",
|
|
67
72
|
"@vitejs/plugin-react": "^4.2.1",
|
|
68
|
-
"autoprefixer": "^10.4.
|
|
73
|
+
"autoprefixer": "^10.4.19",
|
|
74
|
+
"browserslist": "^4.23.0",
|
|
69
75
|
"esbuild-plugin-replace": "^1.4.0",
|
|
70
76
|
"eslint": "^8.56.0",
|
|
71
77
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -75,7 +81,7 @@
|
|
|
75
81
|
"husky": "^8.0.3",
|
|
76
82
|
"jest": "^29.7.0",
|
|
77
83
|
"lint-staged": "^13.3.0",
|
|
78
|
-
"postcss": "^8.4.
|
|
84
|
+
"postcss": "^8.4.38",
|
|
79
85
|
"prettier": "2.4.0",
|
|
80
86
|
"react": "^18.2.0",
|
|
81
87
|
"react-dom": "^18.2.0",
|
|
@@ -83,6 +89,9 @@
|
|
|
83
89
|
"standard-version": "^9.5.0",
|
|
84
90
|
"storybook": "^7.6.7",
|
|
85
91
|
"styled-components": "^6.1.6",
|
|
92
|
+
"stylelint": "^16.6.1",
|
|
93
|
+
"stylelint-config-standard": "^36.0.0",
|
|
94
|
+
"stylelint-no-unsupported-browser-features": "^8.0.1",
|
|
86
95
|
"svg-url-loader": "^7.1.1",
|
|
87
96
|
"ts-jest": "^29.1.1",
|
|
88
97
|
"tsup": "^7.3.0",
|
|
@@ -97,8 +106,10 @@
|
|
|
97
106
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
98
107
|
"@hookform/error-message": "^2.0.1",
|
|
99
108
|
"@hookform/resolvers": "^3.3.4",
|
|
109
|
+
"@radix-ui/react-tabs": "^1.0.4",
|
|
100
110
|
"@tanstack/react-query": "^5.28.14",
|
|
101
111
|
"clsx": "^2.1.0",
|
|
112
|
+
"dayjs": "^1.11.11",
|
|
102
113
|
"extract-colors": "^4.0.2",
|
|
103
114
|
"filesize": "^9.0.11",
|
|
104
115
|
"framer-motion": "^11.1.7",
|
|
@@ -107,12 +118,17 @@
|
|
|
107
118
|
"linkifyjs": "^4.1.3",
|
|
108
119
|
"lodash": "^4.17.21",
|
|
109
120
|
"millify": "^6.1.0",
|
|
121
|
+
"modern-normalize": "^2.0.0",
|
|
110
122
|
"polished": "^4.3.1",
|
|
123
|
+
"react-aria": "^3.33.1",
|
|
124
|
+
"react-aria-components": "^1.2.1",
|
|
111
125
|
"react-hook-form": "^7.49.2",
|
|
112
126
|
"react-infinite-scroll-component": "^6.1.0",
|
|
127
|
+
"react-insta-stories": "^2.6.2",
|
|
113
128
|
"react-intl": "^6.5.5",
|
|
114
129
|
"react-loading-skeleton": "^3.3.1",
|
|
115
130
|
"react-mentions": "^4.4.10",
|
|
131
|
+
"react-modal-sheet": "^2.2.0",
|
|
116
132
|
"react-sizeme": "^3.0.2",
|
|
117
133
|
"react-textarea-autosize": "^8.5.3",
|
|
118
134
|
"react-timeago": "^7.2.0",
|
|
@@ -121,11 +137,13 @@
|
|
|
121
137
|
"react-use": "^17.4.2",
|
|
122
138
|
"stylis": "^4.3.1",
|
|
123
139
|
"uuid": "^8.3.2",
|
|
140
|
+
"vaul": "^0.9.1",
|
|
124
141
|
"zod": "^3.22.4"
|
|
125
142
|
},
|
|
126
143
|
"lint-staged": {
|
|
127
|
-
"*.{js,jsx}": "eslint --cache --fix",
|
|
128
|
-
"*.{json,md}": "prettier --write"
|
|
144
|
+
"*.{js,jsx,ts,tsx}": "eslint --cache --fix",
|
|
145
|
+
"*.{json,md,css}": "prettier --write",
|
|
146
|
+
"*.{css}": "stylelint --fix"
|
|
129
147
|
},
|
|
130
148
|
"postcss": {
|
|
131
149
|
"plugins": {
|
package/readme.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Amity UI-Kit for Web (Open-Source)
|
|
2
|
+
|
|
3
|
+
## Prerequisites
|
|
4
|
+
|
|
5
|
+
Before getting started, ensure that you have the following prerequisites installed on your system:
|
|
6
|
+
|
|
7
|
+
- [Node.js](https://nodejs.org/) LTS version (currently version 20)
|
|
8
|
+
- [pnpm](https://pnpm.io/) version 8
|
|
9
|
+
|
|
10
|
+
## How to install PNPM (Optional)
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
corepack enable pnpm
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Ref: https://pnpm.io/installation#using-corepack
|
|
17
|
+
|
|
18
|
+
## Running Storybook (Optional)
|
|
19
|
+
|
|
20
|
+
To run Storybook and view the UI components in isolation, follow these steps:
|
|
21
|
+
|
|
22
|
+
1. Clone the Amity UI-Kit repository:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
git clone https://github.com/AmityCo/Amity-Social-Cloud-UIKit-Web-OpenSource.git
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
2. Navigate to the cloned repository's directory:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
cd Amity-Social-Cloud-UIKit-Web-OpenSource
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
3. Install the dependencies using pnpm:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
pnpm install
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
4. Create a `.env` file at the root of the project with the following content:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
STORYBOOK_API_REGION=<API_REGION>
|
|
44
|
+
STORYBOOK_API_KEY=<API_KEY>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Replace `<API_REGION>` and `<API_KEY>` with your actual credentials.
|
|
48
|
+
|
|
49
|
+
5. Run Storybook:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
pnpm run storybook
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
6. Open your browser and navigate to `http://localhost:6006` to view the Storybook interface.
|
|
56
|
+
|
|
57
|
+
## Installation
|
|
58
|
+
|
|
59
|
+
To install the Amity UI-Kit together with another project, follow these steps:
|
|
60
|
+
|
|
61
|
+
1. Clone the repository using the following command:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
git clone https://github.com/AmityCo/Amity-Social-Cloud-UIKit-Web-OpenSource.git
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
2. Navigate to the cloned repository's directory:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
cd ./Amity-Social-Cloud-UIKit-Web-OpenSource
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
3. Install the dependencies using pnpm:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
pnpm install
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
4. Build the project:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
pnpm run build
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
5. Pack the project
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
pnpm pack
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
6. Navigate to your application's directory:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
cd <path-to-your-app>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
7. Install the Amity UI-Kit to your application using one of the following package managers:
|
|
98
|
+
- NPM:
|
|
99
|
+
```
|
|
100
|
+
npm i file:<path-to-amity-ui-kit-repository>/<path-to-tgz-file> --save
|
|
101
|
+
```
|
|
102
|
+
- Yarn (Classic):
|
|
103
|
+
```
|
|
104
|
+
yarn add file:<path-to-amity-ui-kit-repository>/<path-to-tgz-file>
|
|
105
|
+
```
|
|
106
|
+
- PNPM:
|
|
107
|
+
```
|
|
108
|
+
pnpm i file:<path-to-amity-ui-kit-repository>/<path-to-tgz-file>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Documentation
|
|
112
|
+
|
|
113
|
+
For detailed information and guidance on using the Amity UI-Kit, please refer to our comprehensive online documentation available at [https://docs.amity.co](https://docs.amity.co).
|
|
114
|
+
|
|
115
|
+
If you require further assistance or have any questions, please don't hesitate to contact our dedicated UI-Kit support team at **developers@amity.co**. We are here to help you make the most of the Amity UI-Kit.
|
|
116
|
+
|
|
117
|
+
## Contributing
|
|
118
|
+
|
|
119
|
+
We welcome contributions from the community to help improve and enhance the Amity UI-Kit. If you are interested in contributing to this project, please review our [contributing guide](https://github.com/AmityCo/Amity-Social-Cloud-UIKit-Web-OpenSource/blob/develop/contributing.md) for guidelines and best practices.
|
|
120
|
+
|
|
121
|
+
Thank you for choosing the Amity UI-Kit for your web development needs!
|
|
122
|
+
|
|
123
|
+
### FAQ
|
|
124
|
+
|
|
125
|
+
Q: I tried to run `pnpm build` and it throws a types error.
|
|
126
|
+
A: Try to structure your project to be like this:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
- your_app
|
|
130
|
+
- src
|
|
131
|
+
- Amity-Social-Cloud-UIKit-Web-OpenSource
|
|
132
|
+
- src
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Q: The modifications I made to the code do not appear to be applied.
|
|
136
|
+
A: Please attempt to execute `npm cache clean` or `npm cache clean --force` to resolve this issue.
|