@yosgo/swap-ui 1.0.128 → 1.0.131
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/LICENSE +21 -21
- package/README.md +61 -61
- package/build/index.esm.js +524 -63
- package/build/index.esm.js.map +1 -1
- package/build/index.js +524 -63
- package/build/index.js.map +1 -1
- package/package.json +91 -91
- package/build/DatePicker.tsx/DatePicker.d.ts +0 -4
- package/build/DatePicker.tsx/DatePicker.types.d.ts +0 -13
- package/build/SWAPPalette/SWAPPalette.d.ts +0 -4
- package/build/SWAPPalette/SWAPPalette.types.d.ts +0 -5
- package/build/SWAPPalette/Typography.d.ts +0 -4
- package/build/SWAPPalette/Typography.types.d.ts +0 -7
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 Harvey Delaney
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Harvey Delaney
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
<img src="https://
|
|
2
|
-
|
|
3
|
-
# 關於 SWAP-UI
|
|
4
|
-
|
|
5
|
-
基於 [@material-ui/core](https://material-ui.com/) 的前端框架來開發 SWAP 專屬的介面框架,這個框架的特性如下:
|
|
6
|
-
|
|
7
|
-
1. 標準化元件。封裝 SWAP 服務內常見的介面場景,減少開發時重新定義相同的佈局、函式...並讓介面保持一致
|
|
8
|
-
2. 易於使用。儘量不需要再寫額外的輔助函式或是過於多層的元件包裝就能使用,避免 Material-ui 多層包裝的缺點
|
|
9
|
-
|
|
10
|
-
想要參考 swap-ui 可以透過以下方式:
|
|
11
|
-
|
|
12
|
-
1. 直接訪問 swap 的網站 [www.swap.work](www.swap.work)
|
|
13
|
-
2. 瀏覽 <a href="https://yosgo-open-source.github.io/swap-ui/?path=/docs/swaplogo--%E8%AA%8D%E8%AD%98" target="_blank">Storybook</a>
|
|
14
|
-
|
|
15
|
-
即將新增
|
|
16
|
-
|
|
17
|
-
1. SWAPModal: 增加支援多步驟的 Modal 視窗
|
|
18
|
-
1. SWAPBanner: 顯示於頁面上的警示訊息
|
|
19
|
-
1. SWAPCopyField:可複製文字至剪貼簿的輸入框
|
|
20
|
-
1. SWAPIncomeAndExpenseTypeField:依據工作內容提供所得類型的建議
|
|
21
|
-
1. SWAPPage: 讓用戶在完整的頁面中完成某件事情
|
|
22
|
-
1. SWAPAnnotatedLayout: 用於帳戶設定頁面中,解釋各類型設定
|
|
23
|
-
|
|
24
|
-
# 安裝
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
# peerDependencies
|
|
28
|
-
$ yarn add react react-dom styled-components @material-ui/core @material-ui/icons
|
|
29
|
-
|
|
30
|
-
# install swap-ui
|
|
31
|
-
$ yarn add @yosgo/swap-ui
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
# 開發
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
# 產生一個元件範本
|
|
38
|
-
$ yarn generate NewComponentName
|
|
39
|
-
|
|
40
|
-
# 使用本機的 storybook 來瀏覽元件
|
|
41
|
-
$ yarn storybook
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
# 發佈
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
# 發佈套件到 NPM 上
|
|
48
|
-
$ npm publish
|
|
49
|
-
|
|
50
|
-
# 更新 gh-page 上的 Storybook
|
|
51
|
-
$ yarn deploy-storybook
|
|
52
|
-
|
|
53
|
-
# 確認發佈狀態
|
|
54
|
-
$ npm show @yosgo/swap-ui
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
# 參考資料
|
|
58
|
-
|
|
59
|
-
- [Creating a React Component Library using Rollup, Typescript, Sass and Storybook](https://blog.harveydelaney.com/creating-your-own-react-component-library/)
|
|
60
|
-
- [Material-ui and Typescript error when bundling #29](https://github.com/transitive-bullshit/react-modern-library-boilerplate/issues/29#issuecomment-635883117)
|
|
61
|
-
- [Shopify Polaris](https://5d559397bae39100201eedc1-jyzwfelqxv.chromatic.com/)
|
|
1
|
+
<img src="https://blog.swap.work/wp-content/uploads/2021/02/cropped-SWAP_web-logo-01-2.png" width="150" />
|
|
2
|
+
|
|
3
|
+
# 關於 SWAP-UI
|
|
4
|
+
|
|
5
|
+
基於 [@material-ui/core](https://material-ui.com/) 的前端框架來開發 SWAP 專屬的介面框架,這個框架的特性如下:
|
|
6
|
+
|
|
7
|
+
1. 標準化元件。封裝 SWAP 服務內常見的介面場景,減少開發時重新定義相同的佈局、函式...並讓介面保持一致
|
|
8
|
+
2. 易於使用。儘量不需要再寫額外的輔助函式或是過於多層的元件包裝就能使用,避免 Material-ui 多層包裝的缺點
|
|
9
|
+
|
|
10
|
+
想要參考 swap-ui 可以透過以下方式:
|
|
11
|
+
|
|
12
|
+
1. 直接訪問 swap 的網站 [www.swap.work](www.swap.work)
|
|
13
|
+
2. 瀏覽 <a href="https://yosgo-open-source.github.io/swap-ui/?path=/docs/swaplogo--%E8%AA%8D%E8%AD%98" target="_blank">Storybook</a>
|
|
14
|
+
|
|
15
|
+
即將新增
|
|
16
|
+
|
|
17
|
+
1. SWAPModal: 增加支援多步驟的 Modal 視窗
|
|
18
|
+
1. SWAPBanner: 顯示於頁面上的警示訊息
|
|
19
|
+
1. SWAPCopyField:可複製文字至剪貼簿的輸入框
|
|
20
|
+
1. SWAPIncomeAndExpenseTypeField:依據工作內容提供所得類型的建議
|
|
21
|
+
1. SWAPPage: 讓用戶在完整的頁面中完成某件事情
|
|
22
|
+
1. SWAPAnnotatedLayout: 用於帳戶設定頁面中,解釋各類型設定
|
|
23
|
+
|
|
24
|
+
# 安裝
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
# peerDependencies
|
|
28
|
+
$ yarn add react react-dom styled-components @material-ui/core @material-ui/icons
|
|
29
|
+
|
|
30
|
+
# install swap-ui
|
|
31
|
+
$ yarn add @yosgo/swap-ui
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
# 開發
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
# 產生一個元件範本
|
|
38
|
+
$ yarn generate NewComponentName
|
|
39
|
+
|
|
40
|
+
# 使用本機的 storybook 來瀏覽元件
|
|
41
|
+
$ yarn storybook
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
# 發佈
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
# 發佈套件到 NPM 上
|
|
48
|
+
$ npm publish
|
|
49
|
+
|
|
50
|
+
# 更新 gh-page 上的 Storybook
|
|
51
|
+
$ yarn deploy-storybook
|
|
52
|
+
|
|
53
|
+
# 確認發佈狀態
|
|
54
|
+
$ npm show @yosgo/swap-ui
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
# 參考資料
|
|
58
|
+
|
|
59
|
+
- [Creating a React Component Library using Rollup, Typescript, Sass and Storybook](https://blog.harveydelaney.com/creating-your-own-react-component-library/)
|
|
60
|
+
- [Material-ui and Typescript error when bundling #29](https://github.com/transitive-bullshit/react-modern-library-boilerplate/issues/29#issuecomment-635883117)
|
|
61
|
+
- [Shopify Polaris](https://5d559397bae39100201eedc1-jyzwfelqxv.chromatic.com/)
|