@yosgo/swap-ui 1.0.126 → 1.0.129

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 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://raw.githubusercontent.com/yosgo-open-source/swap-ui/master/src/SWAPLogo/SWAP_LOGO_01.svg" 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/)
1
+ <img src="https://raw.githubusercontent.com/yosgo-open-source/swap-ui/master/src/SWAPLogo/SWAP_LOGO_01.svg" 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/)
@@ -18,5 +18,6 @@ export interface MyAutoCompleteProps extends OmitAutocompleteProps {
18
18
  horizontal?: string | number;
19
19
  vertical?: string | number;
20
20
  };
21
+ addNewOptionsText?: string;
21
22
  }
22
23
  export {};
@@ -1,4 +1,6 @@
1
1
  /// <reference types="react" />
2
+ import { MyTooltipProps } from "../Tooltip/Tooltip.types";
3
+ declare type OmitTooltipProps = Omit<MyTooltipProps, "children">;
2
4
  export interface ModalProps {
3
5
  footer?: React.ReactNode;
4
6
  multiline?: boolean;
@@ -32,6 +34,7 @@ export interface ModalProps {
32
34
  style?: React.CSSProperties;
33
35
  variant?: "primary" | "secondary" | "text" | "tertiary" | "black" | "danger";
34
36
  loading?: boolean;
37
+ tooltip?: OmitTooltipProps;
35
38
  };
36
39
  primaryButton?: {
37
40
  title?: string | React.ReactNode;
@@ -40,6 +43,7 @@ export interface ModalProps {
40
43
  style?: React.CSSProperties;
41
44
  variant?: "primary" | "secondary" | "text" | "tertiary" | "black" | "danger";
42
45
  loading?: boolean;
46
+ tooltip?: OmitTooltipProps;
43
47
  };
44
48
  disUnderLine?: boolean;
45
49
  disCloseIcon?: boolean;
@@ -47,3 +51,4 @@ export interface ModalProps {
47
51
  checkIconColor?: "primary" | "secondary" | "tertiary" | "primary50" | "primary100" | "primary200" | "primary300" | "primary400" | "primary500" | "primary600" | "primary700" | "primary800" | "primary900" | "primaryA11y" | "secondary50" | "secondary100" | "secondary200" | "secondary300" | "secondary400" | "secondary500" | "secondary600" | "secondary700" | "secondary800" | "secondary900" | "secondaryA11y" | "danger50" | "danger100" | "danger200" | "danger300" | "danger400" | "danger500" | "danger600" | "danger700" | "danger800" | "danger900" | "dangerA11y" | "success50" | "success100" | "success200" | "success300" | "success400" | "success500" | "success600" | "success700" | "success800" | "success900" | "successA11y" | "white" | "black100" | "black200" | "black300" | "black400" | "black500" | "black600" | "black700" | "black800" | "black900" | "black1000";
48
52
  iconColor?: "primary" | "secondary" | "tertiary" | "primary50" | "primary100" | "primary200" | "primary300" | "primary400" | "primary500" | "primary600" | "primary700" | "primary800" | "primary900" | "primaryA11y" | "secondary50" | "secondary100" | "secondary200" | "secondary300" | "secondary400" | "secondary500" | "secondary600" | "secondary700" | "secondary800" | "secondary900" | "secondaryA11y" | "danger50" | "danger100" | "danger200" | "danger300" | "danger400" | "danger500" | "danger600" | "danger700" | "danger800" | "danger900" | "dangerA11y" | "success50" | "success100" | "success200" | "success300" | "success400" | "success500" | "success600" | "success700" | "success800" | "success900" | "successA11y" | "white" | "black100" | "black200" | "black300" | "black400" | "black500" | "black600" | "black700" | "black800" | "black900" | "black1000";
49
53
  }
54
+ export {};