@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.
@@ -177,46 +177,42 @@ var templateObject_1;
177
177
 
178
178
  var SWAPSpace = function (_a) {
179
179
  var size = _a.size;
180
- return (React__default.createElement("div", null,
181
- React__default.createElement(SWAPSpaceWrap, { size: size })));
182
- };
183
- var SWAPSpaceWrap = styled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n height: ", "px;\n"], ["\n height: ",
184
- "px;\n"])), function (_a) {
185
- var size = _a.size;
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
- var templateObject_1$1;
180
+ var height = function () {
181
+ if (size === "xxs") {
182
+ return 4;
183
+ }
184
+ else if (size === "xs") {
185
+ return 8;
186
+ }
187
+ else if (size === "s") {
188
+ return 12;
189
+ }
190
+ else if (size === "m") {
191
+ return 16;
192
+ }
193
+ else if (size === "l") {
194
+ return 24;
195
+ }
196
+ else if (size === "xl") {
197
+ return 32;
198
+ }
199
+ else if (size === "2xl") {
200
+ return 40;
201
+ }
202
+ else if (size === "3xl") {
203
+ return 48;
204
+ }
205
+ else if (size === "4xl") {
206
+ return 56;
207
+ }
208
+ else if (typeof size === "number") {
209
+ return size;
210
+ }
211
+ else
212
+ return 16;
213
+ };
214
+ return React__default.createElement("div", { style: { height: height() + "px" } });
215
+ };
220
216
 
221
217
  var SWAPAppBar = function (_a) {
222
218
  var logo = _a.logo, primaryButton = _a.primaryButton, secondaryButton = _a.secondaryButton, navigations = _a.navigations;
@@ -272,8 +268,8 @@ var SWAPAppBar = function (_a) {
272
268
  primaryButton.title.length > 0 ? (React__default.createElement(MenuItem$1, { disabled: primaryButton.disabled, onClick: function () { return primaryButton.onClick(); } }, primaryButton.title)) : null))))),
273
269
  React__default.createElement(SWAPSpace, { size: "s" })))))));
274
270
  };
275
- 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"])));
276
- var templateObject_1$2;
271
+ 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"])));
272
+ var templateObject_1$1;
277
273
 
278
274
  var ElementId = function (title) { return "swap_banner_" + title; };
279
275
  var SWAPBanner = function (_a) {
@@ -315,8 +311,8 @@ var SWAPBanner = function (_a) {
315
311
  React__default.createElement(Button$1, { variant: "text", onClick: function () { return secondaryButton.onClick(); }, disabled: secondaryButton.disabled }, secondaryButton.title))) : null)) : null,
316
312
  React__default.createElement(SWAPSpace, { size: "l" })))))));
317
313
  };
318
- 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"])));
319
- var templateObject_1$3;
314
+ 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"])));
315
+ var templateObject_1$2;
320
316
 
321
317
  function unwrapExports (x) {
322
318
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -615,8 +611,8 @@ var SWAPCopyField = function (_a) {
615
611
  React__default.createElement("small", null, copyButtonText)))))),
616
612
  } }))));
617
613
  };
618
- 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"])));
619
- var templateObject_1$4;
614
+ 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"])));
615
+ var templateObject_1$3;
620
616
 
621
617
  var SWAPDialog = function (_a) {
622
618
  var open = _a.open, title = _a.title, helpText = _a.helpText, children = _a.children, primaryButton = _a.primaryButton, secondaryButton = _a.secondaryButton, status = _a.status;
@@ -654,8 +650,8 @@ var SWAPDialog = function (_a) {
654
650
  React__default.createElement(Grid, { item: true }, primaryButton && primaryButton.title ? (React__default.createElement(Button$1, { size: "large", onClick: function () { return primaryButton.onClick(); }, disabled: primaryButton.disabled }, primaryButton.title)) : null)),
655
651
  React__default.createElement(SWAPSpace, { size: "s" }))))))))));
656
652
  };
657
- 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"])));
658
- var templateObject_1$5;
653
+ 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"])));
654
+ var templateObject_1$4;
659
655
 
660
656
  var ModalOpenEffect = function (props) {
661
657
  return (React__default.createElement(React__default.Fragment, null, props.sm ? (React__default.createElement(Slide, { in: props.in, direction: "up", mountOnEnter: true, unmountOnExit: true, timeout: { enter: 300, exit: 300 } },
@@ -780,8 +776,8 @@ var SWAPModal = function (_a) {
780
776
  React__default.createElement(Button$1, { variant: "text", size: sm ? "medium" : "large", onClick: function () { return handleStepButton("next"); } }, steps[stepIndex].nextStepText || "下一步"))))),
781
777
  React__default.createElement(SWAPSpace, { size: "m" })))))))));
782
778
  };
783
- 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"])));
784
- var templateObject_1$6;
779
+ 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"])));
780
+ var templateObject_1$5;
785
781
 
786
782
  function objectToGetParams(object) {
787
783
  var params = Object.entries(object)
@@ -1366,8 +1362,8 @@ var SWAPShare = function (_a) {
1366
1362
  },
1367
1363
  ].map(function (item, index) { return (React__default.createElement("div", { key: "share_btn_" + index }, item.el)); })));
1368
1364
  };
1369
- 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"])));
1370
- var templateObject_1$7;
1365
+ 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"])));
1366
+ var templateObject_1$6;
1371
1367
 
1372
1368
  var SWAPTaxField = function (_a) {
1373
1369
  var onChange = _a.onChange, taxDescription = _a.taxDescription;
@@ -1533,7 +1529,7 @@ var SWAPTaxField = function (_a) {
1533
1529
  }
1534
1530
  })()))) })) }))))));
1535
1531
  };
1536
- 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"])));
1532
+ 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"])));
1537
1533
  var typeOptions = [
1538
1534
  ["文字", "1"],
1539
1535
  ["設計", "2"],
@@ -1823,7 +1819,7 @@ var SWAPTaxDescription = function (incomeCode, expenseCode) {
1823
1819
  return "";
1824
1820
  }
1825
1821
  };
1826
- var templateObject_1$8;
1822
+ var templateObject_1$7;
1827
1823
  /**
1828
1824
  * 邏輯設定
1829
1825
  * 1. 所得類別為 9A, 9B 時,費用類別為必填
@@ -2160,8 +2156,8 @@ var Styles = function (_a) {
2160
2156
  " ",
2161
2157
  copySuccess ? "已複製!" : null))));
2162
2158
  };
2163
- var StylesWrap = styled.div(templateObject_1$9 || (templateObject_1$9 = __makeTemplateObject([""], [""])));
2164
- var templateObject_1$9;
2159
+ var StylesWrap = styled.div(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject([""], [""])));
2160
+ var templateObject_1$8;
2165
2161
 
2166
2162
  var Typography = function (_a) {
2167
2163
  var variant = _a.variant, children = _a.children, mode = _a.mode, color = _a.color, style = _a.style;