@yosgo/swap-ui 1.0.131 → 1.0.132

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/build/index.js CHANGED
@@ -182,46 +182,42 @@ var templateObject_1;
182
182
 
183
183
  var SWAPSpace = function (_a) {
184
184
  var size = _a.size;
185
- return (React__default.createElement("div", null,
186
- React__default.createElement(SWAPSpaceWrap, { size: size })));
187
- };
188
- var SWAPSpaceWrap = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n height: ", "px;\n"], ["\n height: ",
189
- "px;\n"])), function (_a) {
190
- var size = _a.size;
191
- if (size === "xxs") {
192
- return 4;
193
- }
194
- else if (size === "xs") {
195
- return 8;
196
- }
197
- else if (size === "s") {
198
- return 12;
199
- }
200
- else if (size === "m") {
201
- return 16;
202
- }
203
- else if (size === "l") {
204
- return 24;
205
- }
206
- else if (size === "xl") {
207
- return 32;
208
- }
209
- else if (size === "2xl") {
210
- return 40;
211
- }
212
- else if (size === "3xl") {
213
- return 48;
214
- }
215
- else if (size === "4xl") {
216
- return 56;
217
- }
218
- else if (typeof size === "number") {
219
- return size;
220
- }
221
- else
222
- return 16;
223
- });
224
- var templateObject_1$1;
185
+ var height = function () {
186
+ if (size === "xxs") {
187
+ return 4;
188
+ }
189
+ else if (size === "xs") {
190
+ return 8;
191
+ }
192
+ else if (size === "s") {
193
+ return 12;
194
+ }
195
+ else if (size === "m") {
196
+ return 16;
197
+ }
198
+ else if (size === "l") {
199
+ return 24;
200
+ }
201
+ else if (size === "xl") {
202
+ return 32;
203
+ }
204
+ else if (size === "2xl") {
205
+ return 40;
206
+ }
207
+ else if (size === "3xl") {
208
+ return 48;
209
+ }
210
+ else if (size === "4xl") {
211
+ return 56;
212
+ }
213
+ else if (typeof size === "number") {
214
+ return size;
215
+ }
216
+ else
217
+ return 16;
218
+ };
219
+ return React__default.createElement("div", { style: { height: height() + "px" } });
220
+ };
225
221
 
226
222
  var SWAPAppBar = function (_a) {
227
223
  var logo = _a.logo, primaryButton = _a.primaryButton, secondaryButton = _a.secondaryButton, navigations = _a.navigations;
@@ -277,8 +273,8 @@ var SWAPAppBar = function (_a) {
277
273
  primaryButton.title.length > 0 ? (React__default.createElement(core.MenuItem, { disabled: primaryButton.disabled, onClick: function () { return primaryButton.onClick(); } }, primaryButton.title)) : null))))),
278
274
  React__default.createElement(SWAPSpace, { size: "s" })))))));
279
275
  };
280
- var SWAPAppBarWrap = styled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n .mobile_hide {\n @media screen and (max-width: 960px) {\n display: none;\n }\n }\n .mobile_show {\n display: none;\n @media screen and (max-width: 960px) {\n display: block;\n }\n }\n"], ["\n .mobile_hide {\n @media screen and (max-width: 960px) {\n display: none;\n }\n }\n .mobile_show {\n display: none;\n @media screen and (max-width: 960px) {\n display: block;\n }\n }\n"])));
281
- var templateObject_1$2;
276
+ var SWAPAppBarWrap = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n .mobile_hide {\n @media screen and (max-width: 960px) {\n display: none;\n }\n }\n .mobile_show {\n display: none;\n @media screen and (max-width: 960px) {\n display: block;\n }\n }\n"], ["\n .mobile_hide {\n @media screen and (max-width: 960px) {\n display: none;\n }\n }\n .mobile_show {\n display: none;\n @media screen and (max-width: 960px) {\n display: block;\n }\n }\n"])));
277
+ var templateObject_1$1;
282
278
 
283
279
  var ElementId = function (title) { return "swap_banner_" + title; };
284
280
  var SWAPBanner = function (_a) {
@@ -320,8 +316,8 @@ var SWAPBanner = function (_a) {
320
316
  React__default.createElement(core.Button, { variant: "text", onClick: function () { return secondaryButton.onClick(); }, disabled: secondaryButton.disabled }, secondaryButton.title))) : null)) : null,
321
317
  React__default.createElement(SWAPSpace, { size: "l" })))))));
322
318
  };
323
- var SWAPBannerWrap = styled.div(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n .swap_banner {\n position: relative;\n overflow: hidden;\n .banner_anchor {\n position: absolute;\n top: -36px;\n left: 0;\n width: 0;\n height: 0;\n }\n .bar {\n height: 12px;\n &.s_bar {\n background: #3f51b5;\n }\n &.w_bar {\n background: #ffb11b;\n }\n &.c_bar {\n background: rgb(220, 0, 78);\n }\n }\n }\n"], ["\n .swap_banner {\n position: relative;\n overflow: hidden;\n .banner_anchor {\n position: absolute;\n top: -36px;\n left: 0;\n width: 0;\n height: 0;\n }\n .bar {\n height: 12px;\n &.s_bar {\n background: #3f51b5;\n }\n &.w_bar {\n background: #ffb11b;\n }\n &.c_bar {\n background: rgb(220, 0, 78);\n }\n }\n }\n"])));
324
- var templateObject_1$3;
319
+ var SWAPBannerWrap = styled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n .swap_banner {\n position: relative;\n overflow: hidden;\n .banner_anchor {\n position: absolute;\n top: -36px;\n left: 0;\n width: 0;\n height: 0;\n }\n .bar {\n height: 12px;\n &.s_bar {\n background: #3f51b5;\n }\n &.w_bar {\n background: #ffb11b;\n }\n &.c_bar {\n background: rgb(220, 0, 78);\n }\n }\n }\n"], ["\n .swap_banner {\n position: relative;\n overflow: hidden;\n .banner_anchor {\n position: absolute;\n top: -36px;\n left: 0;\n width: 0;\n height: 0;\n }\n .bar {\n height: 12px;\n &.s_bar {\n background: #3f51b5;\n }\n &.w_bar {\n background: #ffb11b;\n }\n &.c_bar {\n background: rgb(220, 0, 78);\n }\n }\n }\n"])));
320
+ var templateObject_1$2;
325
321
 
326
322
  function unwrapExports (x) {
327
323
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -620,8 +616,8 @@ var SWAPCopyField = function (_a) {
620
616
  React__default.createElement("small", null, copyButtonText)))))),
621
617
  } }))));
622
618
  };
623
- var SWAPCopyFieldWrap = styled.div(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n .cpy_btn_element {\n width: auto;\n min-width: 72px;\n text-align: right;\n }\n"], ["\n .cpy_btn_element {\n width: auto;\n min-width: 72px;\n text-align: right;\n }\n"])));
624
- var templateObject_1$4;
619
+ var SWAPCopyFieldWrap = styled.div(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n .cpy_btn_element {\n width: auto;\n min-width: 72px;\n text-align: right;\n }\n"], ["\n .cpy_btn_element {\n width: auto;\n min-width: 72px;\n text-align: right;\n }\n"])));
620
+ var templateObject_1$3;
625
621
 
626
622
  var SWAPDialog = function (_a) {
627
623
  var open = _a.open, title = _a.title, helpText = _a.helpText, children = _a.children, primaryButton = _a.primaryButton, secondaryButton = _a.secondaryButton, status = _a.status;
@@ -659,8 +655,8 @@ var SWAPDialog = function (_a) {
659
655
  React__default.createElement(core.Grid, { item: true }, primaryButton && primaryButton.title ? (React__default.createElement(core.Button, { size: "large", onClick: function () { return primaryButton.onClick(); }, disabled: primaryButton.disabled }, primaryButton.title)) : null)),
660
656
  React__default.createElement(SWAPSpace, { size: "s" }))))))))));
661
657
  };
662
- var SWAPDialogWrap = styled.div(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n box-sizing: border-box;\n position: relative;\n .bar {\n position: absolute;\n height: 12px;\n top: 0;\n left: 0;\n width: 100%;\n &.s_bar {\n background: #3f51b5;\n }\n &.w_bar {\n background: #ffb11b;\n }\n &.c_bar {\n background: rgb(220, 0, 78);\n }\n }\n .dialog_inner {\n margin-top: 12px;\n }\n"], ["\n box-sizing: border-box;\n position: relative;\n .bar {\n position: absolute;\n height: 12px;\n top: 0;\n left: 0;\n width: 100%;\n &.s_bar {\n background: #3f51b5;\n }\n &.w_bar {\n background: #ffb11b;\n }\n &.c_bar {\n background: rgb(220, 0, 78);\n }\n }\n .dialog_inner {\n margin-top: 12px;\n }\n"])));
663
- var templateObject_1$5;
658
+ var SWAPDialogWrap = styled.div(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n box-sizing: border-box;\n position: relative;\n .bar {\n position: absolute;\n height: 12px;\n top: 0;\n left: 0;\n width: 100%;\n &.s_bar {\n background: #3f51b5;\n }\n &.w_bar {\n background: #ffb11b;\n }\n &.c_bar {\n background: rgb(220, 0, 78);\n }\n }\n .dialog_inner {\n margin-top: 12px;\n }\n"], ["\n box-sizing: border-box;\n position: relative;\n .bar {\n position: absolute;\n height: 12px;\n top: 0;\n left: 0;\n width: 100%;\n &.s_bar {\n background: #3f51b5;\n }\n &.w_bar {\n background: #ffb11b;\n }\n &.c_bar {\n background: rgb(220, 0, 78);\n }\n }\n .dialog_inner {\n margin-top: 12px;\n }\n"])));
659
+ var templateObject_1$4;
664
660
 
665
661
  var ModalOpenEffect = function (props) {
666
662
  return (React__default.createElement(React__default.Fragment, null, props.sm ? (React__default.createElement(core.Slide, { in: props.in, direction: "up", mountOnEnter: true, unmountOnExit: true, timeout: { enter: 300, exit: 300 } },
@@ -785,8 +781,8 @@ var SWAPModal = function (_a) {
785
781
  React__default.createElement(core.Button, { variant: "text", size: sm ? "medium" : "large", onClick: function () { return handleStepButton("next"); } }, steps[stepIndex].nextStepText || "下一步"))))),
786
782
  React__default.createElement(SWAPSpace, { size: "m" })))))))));
787
783
  };
788
- var SWAPModalWrap = styled.div(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n outline: 0px;\n position: absolute;\n height: 100vh;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n .modal_inner {\n border-radius: 9px;\n overflow: hidden;\n position: relative;\n width: 48vw;\n z-index: 2;\n .modal_inner_header {\n position: absolute;\n width: 100%;\n left: 0;\n top: 0;\n background: white;\n z-index: 1;\n }\n .modal_inner_body {\n position: relative;\n overflow-y: auto;\n z-index: 1;\n }\n .modal_inner_bottom {\n position: absolute;\n width: 100%;\n left: 0;\n bottom: 0;\n background: white;\n z-index: 1;\n }\n }\n @media screen and (max-width: 960px) {\n align-items: flex-end;\n .modal_inner {\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n width: 100vw;\n }\n }\n"], ["\n outline: 0px;\n position: absolute;\n height: 100vh;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n .modal_inner {\n border-radius: 9px;\n overflow: hidden;\n position: relative;\n width: 48vw;\n z-index: 2;\n .modal_inner_header {\n position: absolute;\n width: 100%;\n left: 0;\n top: 0;\n background: white;\n z-index: 1;\n }\n .modal_inner_body {\n position: relative;\n overflow-y: auto;\n z-index: 1;\n }\n .modal_inner_bottom {\n position: absolute;\n width: 100%;\n left: 0;\n bottom: 0;\n background: white;\n z-index: 1;\n }\n }\n @media screen and (max-width: 960px) {\n align-items: flex-end;\n .modal_inner {\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n width: 100vw;\n }\n }\n"])));
789
- var templateObject_1$6;
784
+ var SWAPModalWrap = styled.div(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n outline: 0px;\n position: absolute;\n height: 100vh;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n .modal_inner {\n border-radius: 9px;\n overflow: hidden;\n position: relative;\n width: 48vw;\n z-index: 2;\n .modal_inner_header {\n position: absolute;\n width: 100%;\n left: 0;\n top: 0;\n background: white;\n z-index: 1;\n }\n .modal_inner_body {\n position: relative;\n overflow-y: auto;\n z-index: 1;\n }\n .modal_inner_bottom {\n position: absolute;\n width: 100%;\n left: 0;\n bottom: 0;\n background: white;\n z-index: 1;\n }\n }\n @media screen and (max-width: 960px) {\n align-items: flex-end;\n .modal_inner {\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n width: 100vw;\n }\n }\n"], ["\n outline: 0px;\n position: absolute;\n height: 100vh;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n .modal_inner {\n border-radius: 9px;\n overflow: hidden;\n position: relative;\n width: 48vw;\n z-index: 2;\n .modal_inner_header {\n position: absolute;\n width: 100%;\n left: 0;\n top: 0;\n background: white;\n z-index: 1;\n }\n .modal_inner_body {\n position: relative;\n overflow-y: auto;\n z-index: 1;\n }\n .modal_inner_bottom {\n position: absolute;\n width: 100%;\n left: 0;\n bottom: 0;\n background: white;\n z-index: 1;\n }\n }\n @media screen and (max-width: 960px) {\n align-items: flex-end;\n .modal_inner {\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n width: 100vw;\n }\n }\n"])));
785
+ var templateObject_1$5;
790
786
 
791
787
  function objectToGetParams(object) {
792
788
  var params = Object.entries(object)
@@ -1371,8 +1367,8 @@ var SWAPShare = function (_a) {
1371
1367
  },
1372
1368
  ].map(function (item, index) { return (React__default.createElement("div", { key: "share_btn_" + index }, item.el)); })));
1373
1369
  };
1374
- var SWAPShareWrap = styled.div(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n height: 40px;\n position: relative;\n .swap_share_icon {\n cursor: pointer;\n }\n"], ["\n height: 40px;\n position: relative;\n .swap_share_icon {\n cursor: pointer;\n }\n"])));
1375
- var templateObject_1$7;
1370
+ var SWAPShareWrap = styled.div(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n height: 40px;\n position: relative;\n .swap_share_icon {\n cursor: pointer;\n }\n"], ["\n height: 40px;\n position: relative;\n .swap_share_icon {\n cursor: pointer;\n }\n"])));
1371
+ var templateObject_1$6;
1376
1372
 
1377
1373
  var SWAPTaxField = function (_a) {
1378
1374
  var onChange = _a.onChange, taxDescription = _a.taxDescription;
@@ -1538,7 +1534,7 @@ var SWAPTaxField = function (_a) {
1538
1534
  }
1539
1535
  })()))) })) }))))));
1540
1536
  };
1541
- var SWAPTaxFieldWrap = styled.div(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\n .option_item::-webkit-scrollbar {\n width: 0 !important;\n height: 0 !important;\n }\n"], ["\n .option_item::-webkit-scrollbar {\n width: 0 !important;\n height: 0 !important;\n }\n"])));
1537
+ var SWAPTaxFieldWrap = styled.div(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n .option_item::-webkit-scrollbar {\n width: 0 !important;\n height: 0 !important;\n }\n"], ["\n .option_item::-webkit-scrollbar {\n width: 0 !important;\n height: 0 !important;\n }\n"])));
1542
1538
  var typeOptions = [
1543
1539
  ["文字", "1"],
1544
1540
  ["設計", "2"],
@@ -1828,7 +1824,7 @@ var SWAPTaxDescription = function (incomeCode, expenseCode) {
1828
1824
  return "";
1829
1825
  }
1830
1826
  };
1831
- var templateObject_1$8;
1827
+ var templateObject_1$7;
1832
1828
  /**
1833
1829
  * 邏輯設定
1834
1830
  * 1. 所得類別為 9A, 9B 時,費用類別為必填
@@ -2165,8 +2161,8 @@ var Styles = function (_a) {
2165
2161
  " ",
2166
2162
  copySuccess ? "已複製!" : null))));
2167
2163
  };
2168
- var StylesWrap = styled.div(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject([""], [""])));
2169
- var templateObject_1$9;
2164
+ var StylesWrap = styled.div(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject([""], [""])));
2165
+ var templateObject_1$8;
2170
2166
 
2171
2167
  var Typography = function (_a) {
2172
2168
  var variant = _a.variant, children = _a.children, mode = _a.mode, color = _a.color, style = _a.style;