@arcblock/ux 2.4.2 → 2.4.3

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.
Files changed (125) hide show
  1. package/lib/ActivityIndicator/index.js +4 -6
  2. package/lib/Alert/index.js +3 -4
  3. package/lib/AnimationWaiter/index.js +3 -4
  4. package/lib/Badge/index.js +3 -3
  5. package/lib/Blocklet/blocklet.js +4 -6
  6. package/lib/Blocklet/utils.js +2 -5
  7. package/lib/BlockletNFT/index.js +4 -6
  8. package/lib/Center/index.js +3 -4
  9. package/lib/ClickToCopy/index.js +3 -3
  10. package/lib/CodeBlock/index.js +3 -4
  11. package/lib/ContactForm/index.js +3 -3
  12. package/lib/CookieConsent/index.js +3 -4
  13. package/lib/CountDown/index.js +3 -4
  14. package/lib/Datatable/CustomToolbar.js +5 -9
  15. package/lib/Datatable/TableSearch.js +3 -4
  16. package/lib/Datatable/index.js +5 -7
  17. package/lib/Dialog/dialog.js +5 -9
  18. package/lib/Earth/index.js +4 -6
  19. package/lib/Empty/index.js +3 -3
  20. package/lib/ErrorBoundary/fallback.js +4 -7
  21. package/lib/Footer/index.js +3 -4
  22. package/lib/Header/auto-hidden.js +3 -3
  23. package/lib/Header/header.js +4 -8
  24. package/lib/Header/responsive-header.js +5 -7
  25. package/lib/Icon/image.js +3 -4
  26. package/lib/Icon/index.js +3 -4
  27. package/lib/Img/index.js +3 -3
  28. package/lib/InfoRow/index.js +3 -5
  29. package/lib/Layout/dashboard/index.js +5 -9
  30. package/lib/Layout/dashboard/sidebar.js +3 -5
  31. package/lib/Layout/dashboard-legacy/header.js +3 -3
  32. package/lib/Layout/dashboard-legacy/index.js +3 -3
  33. package/lib/Layout/dashboard-legacy/sidebar.js +5 -7
  34. package/lib/Layout/index.js +4 -6
  35. package/lib/Locale/selector.js +4 -7
  36. package/lib/Logo/index.js +2 -3
  37. package/lib/Metric/index.js +3 -4
  38. package/lib/NFTDisplay/aspect-ratio-container.js +2 -4
  39. package/lib/NFTDisplay/broken.js +3 -3
  40. package/lib/NFTDisplay/index.js +3 -4
  41. package/lib/NFTDisplay/loading.js +2 -4
  42. package/lib/NFTDisplay/svg-embedder/inline-svg.js +4 -6
  43. package/lib/NavMenu/style.js +4 -7
  44. package/lib/PricingTable/PricingPlan.js +3 -3
  45. package/lib/PricingTable/index.js +3 -4
  46. package/lib/Result/common.js +4 -4
  47. package/lib/Result/result.js +3 -5
  48. package/lib/Screenshot/index.js +3 -4
  49. package/lib/SplitButton/index.js +4 -4
  50. package/lib/Switch/index.js +3 -3
  51. package/lib/Tabs/index.js +3 -3
  52. package/lib/Tag/index.js +4 -6
  53. package/lib/TextCollapse/index.js +2 -2
  54. package/lib/Theme/index.js +16 -0
  55. package/lib/Theme/theme-provider.js +3 -8
  56. package/lib/Theme/theme.js +4 -2
  57. package/lib/Video/index.js +3 -4
  58. package/lib/Wallet/Action.js +3 -4
  59. package/lib/Wallet/Download.js +3 -4
  60. package/lib/Wallet/Open.js +3 -3
  61. package/lib/WechatPrompt/index.js +3 -3
  62. package/lib/withTheme/index.js +18 -40
  63. package/package.json +4 -4
  64. package/src/ActivityIndicator/index.js +3 -3
  65. package/src/Alert/index.js +2 -2
  66. package/src/AnimationWaiter/index.js +3 -2
  67. package/src/Badge/index.js +1 -2
  68. package/src/Blocklet/blocklet.js +2 -3
  69. package/src/Blocklet/utils.js +2 -2
  70. package/src/BlockletNFT/index.js +2 -3
  71. package/src/Center/index.js +3 -2
  72. package/src/ClickToCopy/index.js +2 -1
  73. package/src/CodeBlock/index.js +2 -2
  74. package/src/ContactForm/index.js +2 -3
  75. package/src/CookieConsent/index.js +3 -2
  76. package/src/CountDown/index.js +2 -2
  77. package/src/Datatable/CustomToolbar.js +3 -4
  78. package/src/Datatable/TableSearch.js +2 -2
  79. package/src/Datatable/index.js +4 -4
  80. package/src/Dialog/dialog.js +3 -3
  81. package/src/Earth/index.js +3 -3
  82. package/src/Empty/index.js +3 -2
  83. package/src/ErrorBoundary/fallback.js +2 -3
  84. package/src/Footer/index.js +2 -2
  85. package/src/Header/auto-hidden.js +2 -1
  86. package/src/Header/header.js +2 -3
  87. package/src/Header/responsive-header.js +1 -2
  88. package/src/Icon/image.js +2 -2
  89. package/src/Icon/index.js +2 -2
  90. package/src/Img/index.js +1 -1
  91. package/src/InfoRow/index.js +3 -2
  92. package/src/Layout/dashboard/index.js +2 -3
  93. package/src/Layout/dashboard/sidebar.js +3 -3
  94. package/src/Layout/dashboard-legacy/header.js +1 -1
  95. package/src/Layout/dashboard-legacy/index.js +2 -2
  96. package/src/Layout/dashboard-legacy/sidebar.js +2 -4
  97. package/src/Layout/index.js +3 -3
  98. package/src/Locale/selector.js +2 -4
  99. package/src/Logo/index.js +3 -2
  100. package/src/Metric/index.js +2 -2
  101. package/src/NFTDisplay/aspect-ratio-container.js +3 -2
  102. package/src/NFTDisplay/broken.js +2 -1
  103. package/src/NFTDisplay/index.js +3 -2
  104. package/src/NFTDisplay/loading.js +2 -2
  105. package/src/NFTDisplay/svg-embedder/inline-svg.js +3 -2
  106. package/src/NavMenu/style.js +2 -2
  107. package/src/PricingTable/PricingPlan.js +2 -2
  108. package/src/PricingTable/index.js +2 -2
  109. package/src/Result/common.js +1 -1
  110. package/src/Result/result.js +3 -2
  111. package/src/Screenshot/index.js +2 -2
  112. package/src/SplitButton/index.js +2 -1
  113. package/src/Switch/index.js +1 -1
  114. package/src/Tabs/index.js +1 -1
  115. package/src/Tag/index.js +1 -3
  116. package/src/TextCollapse/index.js +2 -2
  117. package/src/Theme/index.js +1 -0
  118. package/src/Theme/theme-provider.js +4 -7
  119. package/src/Theme/theme.js +5 -3
  120. package/src/Video/index.js +2 -3
  121. package/src/Wallet/Action.js +2 -3
  122. package/src/Wallet/Download.js +2 -3
  123. package/src/Wallet/Open.js +2 -1
  124. package/src/WechatPrompt/index.js +2 -3
  125. package/src/withTheme/index.js +41 -54
@@ -7,10 +7,10 @@ exports.default = Metric;
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _styled = _interopRequireDefault(require("@emotion/styled"));
11
-
12
10
  var _image = _interopRequireDefault(require("../Icon/image"));
13
11
 
12
+ var _Theme = require("../Theme");
13
+
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
 
16
16
  var _templateObject;
@@ -74,5 +74,4 @@ Metric.defaultProps = {
74
74
  LinkComponent: null,
75
75
  prefix: '/images'
76
76
  };
77
-
78
- const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-left: 1px solid ", ";\n padding: 10px 0 10px 16px;\n @media (max-width: ", "px) {\n padding: 0 0 0 8px;\n }\n\n display: flex;\n justify-items: center;\n align-items: flex-start;\n\n a {\n display: flex;\n justify-items: center;\n align-items: flex-start;\n }\n\n .metric__image {\n margin-right: 8px;\n }\n\n .metric__number {\n margin-bottom: 8px;\n font-size: ", "px;\n font-weight: 600;\n line-height: 36px;\n color: ", ";\n\n small {\n font-size: 12px;\n line-height: 12px;\n }\n\n @media (max-width: ", "px) {\n font-size: ", "px;\n line-height: ", "px;\n margin-bottom: 2px;\n }\n }\n\n .metric__number--animated {\n animation-name: blink-opacity;\n animation-duration: 250ms;\n animation-timing-function: linear;\n animation-iteration-count: 1;\n background-color: transparent !important;\n }\n\n .metric__name {\n font-size: 14px;\n text-transform: capitalize;\n line-height: 1.2;\n font-weight: 500;\n color: ", ";\n @media (max-width: ", "px) {\n font-size: 10px;\n line-height: 1;\n }\n }\n\n @keyframes blink-opacity {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.3;\n }\n 100% {\n opacity: 1;\n }\n }\n"])), props => props.theme.typography.color.main, props => props.theme.breakpoints.values.sm, props => props.size === 'small' ? 32 : 36, props => props.theme.typography.color.main, props => props.theme.breakpoints.values.sm, props => props.size === 'small' ? 24 : 28, props => props.size === 'small' ? 24 : 28, props => props.theme.typography.color.main, props => props.theme.breakpoints.values.sm);
77
+ const Container = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-left: 1px solid ", ";\n padding: 10px 0 10px 16px;\n @media (max-width: ", "px) {\n padding: 0 0 0 8px;\n }\n\n display: flex;\n justify-items: center;\n align-items: flex-start;\n\n a {\n display: flex;\n justify-items: center;\n align-items: flex-start;\n }\n\n .metric__image {\n margin-right: 8px;\n }\n\n .metric__number {\n margin-bottom: 8px;\n font-size: ", "px;\n font-weight: 600;\n line-height: 36px;\n color: ", ";\n\n small {\n font-size: 12px;\n line-height: 12px;\n }\n\n @media (max-width: ", "px) {\n font-size: ", "px;\n line-height: ", "px;\n margin-bottom: 2px;\n }\n }\n\n .metric__number--animated {\n animation-name: blink-opacity;\n animation-duration: 250ms;\n animation-timing-function: linear;\n animation-iteration-count: 1;\n background-color: transparent !important;\n }\n\n .metric__name {\n font-size: 14px;\n text-transform: capitalize;\n line-height: 1.2;\n font-weight: 500;\n color: ", ";\n @media (max-width: ", "px) {\n font-size: 10px;\n line-height: 1;\n }\n }\n\n @keyframes blink-opacity {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.3;\n }\n 100% {\n opacity: 1;\n }\n }\n"])), props => props.theme.typography.color.main, props => props.theme.breakpoints.values.sm, props => props.size === 'small' ? 32 : 36, props => props.theme.typography.color.main, props => props.theme.breakpoints.values.sm, props => props.size === 'small' ? 24 : 28, props => props.size === 'small' ? 24 : 28, props => props.theme.typography.color.main, props => props.theme.breakpoints.values.sm);
@@ -7,7 +7,7 @@ exports.default = void 0;
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _styled = _interopRequireDefault(require("@emotion/styled"));
10
+ var _Theme = require("../Theme");
11
11
 
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
 
@@ -50,13 +50,11 @@ AspectRatioContainer.propTypes = {
50
50
  aspect: _propTypes.default.number.isRequired,
51
51
  children: _propTypes.default.node.isRequired
52
52
  };
53
-
54
- const Root = _styled.default.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n position: relative;\n width: 100%;\n height: 0;\n padding-bottom: ", "%;\n\n .aspect-ratio-container__inner {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n"])), _ref2 => {
53
+ const Root = (0, _Theme.styled)('span')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n position: relative;\n width: 100%;\n height: 0;\n padding-bottom: ", "%;\n\n .aspect-ratio-container__inner {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n }\n"])), _ref2 => {
55
54
  let {
56
55
  aspect
57
56
  } = _ref2;
58
57
  return 1 / aspect * 100;
59
58
  });
60
-
61
59
  var _default = AspectRatioContainer;
62
60
  exports.default = _default;
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = Broken;
7
7
 
8
- var _styled = _interopRequireDefault(require("@emotion/styled"));
9
-
10
8
  var _BrokenImage = _interopRequireDefault(require("@mui/icons-material/BrokenImage"));
11
9
 
10
+ var _Theme = require("../Theme");
11
+
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
 
14
14
  var _templateObject;
@@ -23,4 +23,4 @@ function Broken() {
23
23
  });
24
24
  }
25
25
 
26
- const Root = (0, _styled.default)(_BrokenImage.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n && {\n width: 100%;\n max-width: 200px;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n fill: #ddd;\n }\n"])));
26
+ const Root = (0, _Theme.styled)(_BrokenImage.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n && {\n width: 100%;\n max-width: 200px;\n height: auto;\n max-width: 100%;\n max-height: 100%;\n fill: #ddd;\n }\n"])));
@@ -10,8 +10,6 @@ var _react = require("react");
10
10
 
11
11
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
12
 
13
- var _styled = _interopRequireDefault(require("@emotion/styled"));
14
-
15
13
  var _clsx = _interopRequireDefault(require("clsx"));
16
14
 
17
15
  var _buffer = require("buffer");
@@ -34,6 +32,8 @@ var _loading = _interopRequireDefault(require("./loading"));
34
32
 
35
33
  var _broken = _interopRequireDefault(require("./broken"));
36
34
 
35
+ var _Theme = require("../Theme");
36
+
37
37
  var _jsxRuntime = require("react/jsx-runtime");
38
38
 
39
39
  var _templateObject;
@@ -296,8 +296,7 @@ NFTDisplay.defaultProps = {
296
296
  minimumLoadingTime: 0,
297
297
  onCompleted: () => {}
298
298
  };
299
-
300
- const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n /* \u9ED8\u8BA4\u5C3A\u5BF8 */\n width: 150px;\n height: 150px;\n overflow: hidden;\n\n &,\n img {\n max-width: 100%;\n max-height: 100%;\n }\n\n img {\n width: 100%;\n height: 100%;\n }\n\n &.nft-display--inset {\n width: 100%;\n height: 100%;\n }\n"])));
299
+ const Root = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n /* \u9ED8\u8BA4\u5C3A\u5BF8 */\n width: 150px;\n height: 150px;\n overflow: hidden;\n\n &,\n img {\n max-width: 100%;\n max-height: 100%;\n }\n\n img {\n width: 100%;\n height: 100%;\n }\n\n &.nft-display--inset {\n width: 100%;\n height: 100%;\n }\n"])));
301
300
 
302
301
  function withAspectRatio(Component) {
303
302
  // eslint-disable-next-line func-names, react/prop-types
@@ -5,14 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = Loading;
7
7
 
8
- var _styled = _interopRequireDefault(require("@emotion/styled"));
8
+ var _Theme = require("../Theme");
9
9
 
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
 
12
12
  var _templateObject;
13
13
 
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
14
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
17
15
 
18
16
  function Loading() {
@@ -22,4 +20,4 @@ function Loading() {
22
20
  });
23
21
  }
24
22
 
25
- const Root = _styled.default.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n width: 100%;\n height: 100%;\n color: #ccc;\n background-color: #eee;\n"])));
23
+ const Root = (0, _Theme.styled)('span')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n width: 100%;\n height: 100%;\n color: #ccc;\n background-color: #eee;\n"])));
@@ -7,10 +7,10 @@ exports.default = void 0;
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _styled = _interopRequireDefault(require("@emotion/styled"));
11
-
12
10
  var _emotion = _interopRequireDefault(require("react-shadow/emotion"));
13
11
 
12
+ var _Theme = require("../../Theme");
13
+
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
 
16
16
  var _templateObject, _templateObject2;
@@ -52,9 +52,7 @@ function InlineSvg(_ref) {
52
52
  InlineSvg.propTypes = {
53
53
  svg: _propTypes.default.string.isRequired
54
54
  };
55
- const Root = (0, _styled.default)(_emotion.default.span)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n width: 100%;\n height: 100%;\n"])));
56
-
57
- const Inner = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &,\n & > svg {\n height: 100%;\n width: 100%;\n min-width: 100%;\n max-width: 100%;\n }\n"])));
58
-
55
+ const Root = (0, _Theme.styled)(_emotion.default.span)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n width: 100%;\n height: 100%;\n"])));
56
+ const Inner = (0, _Theme.styled)('div')(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &,\n & > svg {\n height: 100%;\n width: 100%;\n min-width: 100%;\n max-width: 100%;\n }\n"])));
59
57
  var _default = InlineSvg;
60
58
  exports.default = _default;
@@ -5,19 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.InlineStyle = exports.HorizontalStyle = void 0;
7
7
 
8
- var _styled = _interopRequireDefault(require("@emotion/styled"));
8
+ var _Theme = require("../Theme");
9
9
 
10
10
  var _templateObject, _templateObject2, _templateObject3;
11
11
 
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
14
12
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
15
13
 
16
- const NavMenuBase = _styled.default.nav(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n font-size: 16px;\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .navmenu-item,\n .navmenu-sub {\n display: flex;\n align-items: center;\n }\n a {\n color: inherit;\n }\n /* active/hover */\n .navmenu-item,\n .navmenu-sub {\n color: ", ";\n }\n .navmenu-item--active,\n .navmenu-item:hover,\n .navmenu-sub--opened {\n color: ", ";\n }\n\n .navmenu-item {\n position: relative;\n cursor: pointer;\n transition: color 0.2s ease-in-out;\n a {\n text-decoration: none;\n white-space: nowrap;\n }\n a::before {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: transparent;\n content: '';\n }\n }\n\n .navmenu-sub {\n position: relative;\n cursor: pointer;\n }\n /* icon & expand icon */\n .navmenu-item-icon,\n .navmenu-sub-icon,\n .navmenu-sub-expand-icon {\n display: flex;\n line-height: 1;\n }\n .navmenu-item-icon,\n .navmenu-sub-icon {\n margin-right: 4px;\n }\n .navmenu-item-icon > *,\n .navmenu-sub-icon > * {\n width: auto;\n height: 22px;\n max-height: 22px;\n font-size: 1.5em;\n }\n .navmenu-sub-expand-icon {\n margin-left: 8px;\n > * {\n width: 0.8em;\n height: 0.8em;\n transition: transform 0.2s ease-in-out;\n }\n }\n"])), props => props.$bgColor, props => props.$textColor, props => props.$activeTextColor);
17
-
18
- const HorizontalStyle = (0, _styled.default)(NavMenuBase)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 8px 16px;\n .navmenu-root {\n display: flex;\n align-items: center;\n }\n /* \u9876\u7EA7\u83DC\u5355\u95F4\u9694 */\n .navmenu-root > .navmenu-item,\n .navmenu-root > .navmenu-sub {\n margin-left: 24px;\n }\n .navmenu-root > .navmenu-item:first-child,\n .navmenu-root > .navmenu-sub:first-child {\n margin-left: 0;\n }\n\n /* \u5B50\u7EA7\u5217\u8868 */\n .navmenu-sub-container {\n display: none;\n position: absolute;\n top: 100%;\n }\n .navmenu-sub-list {\n padding: 16px;\n border-radius: 4px;\n background: #fff;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n .navmenu-item + .navmenu-item {\n margin-top: 8px;\n }\n }\n /* \u4E8C\u7EA7 sub menu */\n .navmenu-root > .navmenu-sub {\n > .navmenu-sub-container {\n left: 50%;\n transform: translateX(-50%);\n padding-top: 16px;\n }\n &.navmenu-sub--opened > .navmenu-sub-container {\n display: block;\n }\n }\n"])));
14
+ const NavMenuBase = (0, _Theme.styled)('nav')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n font-size: 16px;\n ul {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n .navmenu-item,\n .navmenu-sub {\n display: flex;\n align-items: center;\n }\n a {\n color: inherit;\n }\n /* active/hover */\n .navmenu-item,\n .navmenu-sub {\n color: ", ";\n }\n .navmenu-item--active,\n .navmenu-item:hover,\n .navmenu-sub--opened {\n color: ", ";\n }\n\n .navmenu-item {\n position: relative;\n cursor: pointer;\n transition: color 0.2s ease-in-out;\n a {\n text-decoration: none;\n white-space: nowrap;\n }\n a::before {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: transparent;\n content: '';\n }\n }\n\n .navmenu-sub {\n position: relative;\n cursor: pointer;\n }\n /* icon & expand icon */\n .navmenu-item-icon,\n .navmenu-sub-icon,\n .navmenu-sub-expand-icon {\n display: flex;\n line-height: 1;\n }\n .navmenu-item-icon,\n .navmenu-sub-icon {\n margin-right: 4px;\n }\n .navmenu-item-icon > *,\n .navmenu-sub-icon > * {\n width: auto;\n height: 22px;\n max-height: 22px;\n font-size: 1.5em;\n }\n .navmenu-sub-expand-icon {\n margin-left: 8px;\n > * {\n width: 0.8em;\n height: 0.8em;\n transition: transform 0.2s ease-in-out;\n }\n }\n"])), props => props.$bgColor, props => props.$textColor, props => props.$activeTextColor);
15
+ const HorizontalStyle = (0, _Theme.styled)(NavMenuBase)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 8px 16px;\n .navmenu-root {\n display: flex;\n align-items: center;\n }\n /* \u9876\u7EA7\u83DC\u5355\u95F4\u9694 */\n .navmenu-root > .navmenu-item,\n .navmenu-root > .navmenu-sub {\n margin-left: 24px;\n }\n .navmenu-root > .navmenu-item:first-child,\n .navmenu-root > .navmenu-sub:first-child {\n margin-left: 0;\n }\n\n /* \u5B50\u7EA7\u5217\u8868 */\n .navmenu-sub-container {\n display: none;\n position: absolute;\n top: 100%;\n }\n .navmenu-sub-list {\n padding: 16px;\n border-radius: 4px;\n background: #fff;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n .navmenu-item + .navmenu-item {\n margin-top: 8px;\n }\n }\n /* \u4E8C\u7EA7 sub menu */\n .navmenu-root > .navmenu-sub {\n > .navmenu-sub-container {\n left: 50%;\n transform: translateX(-50%);\n padding-top: 16px;\n }\n &.navmenu-sub--opened > .navmenu-sub-container {\n display: block;\n }\n }\n"])));
19
16
  /* inline mode */
20
17
 
21
18
  exports.HorizontalStyle = HorizontalStyle;
22
- const InlineStyle = (0, _styled.default)(NavMenuBase)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 16px;\n .navmenu-root {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n }\n .navmenu-item,\n .navmenu-sub {\n padding: 0 16px;\n }\n & .navmenu-sub {\n flex-wrap: wrap;\n }\n /* \u9876\u7EA7 */\n .navmenu-root > .navmenu-item,\n .navmenu-root > .navmenu-sub {\n line-height: 48px;\n border-bottom: 1px solid #eee;\n }\n /* icon */\n .navmenu-item-icon,\n .navmenu-sub-icon {\n width: 42px;\n margin: 0;\n }\n .navmenu-sub-expand-icon {\n margin-left: auto;\n }\n /* \u5B50\u7EA7\u5217\u8868 */\n .navmenu-sub-container {\n display: none;\n flex: 1 0 100%;\n margin: 0 -16px;\n padding-bottom: 8px;\n .navmenu-item,\n .navmenu-sub {\n line-height: 32px;\n }\n }\n .navmenu-sub-list {\n padding-left: 16px;\n .navmenu-item,\n .navmenu-sub {\n padding-left: 42px;\n font-size: 13px;\n }\n }\n /* \u4E8C\u7EA7 menu */\n .navmenu-sub--opened > .navmenu-sub-container {\n display: block;\n }\n"])));
19
+ const InlineStyle = (0, _Theme.styled)(NavMenuBase)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n font-size: 16px;\n .navmenu-root {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n }\n .navmenu-item,\n .navmenu-sub {\n padding: 0 16px;\n }\n & .navmenu-sub {\n flex-wrap: wrap;\n }\n /* \u9876\u7EA7 */\n .navmenu-root > .navmenu-item,\n .navmenu-root > .navmenu-sub {\n line-height: 48px;\n border-bottom: 1px solid #eee;\n }\n /* icon */\n .navmenu-item-icon,\n .navmenu-sub-icon {\n width: 42px;\n margin: 0;\n }\n .navmenu-sub-expand-icon {\n margin-left: auto;\n }\n /* \u5B50\u7EA7\u5217\u8868 */\n .navmenu-sub-container {\n display: none;\n flex: 1 0 100%;\n margin: 0 -16px;\n padding-bottom: 8px;\n .navmenu-item,\n .navmenu-sub {\n line-height: 32px;\n }\n }\n .navmenu-sub-list {\n padding-left: 16px;\n .navmenu-item,\n .navmenu-sub {\n padding-left: 42px;\n font-size: 13px;\n }\n }\n /* \u4E8C\u7EA7 menu */\n .navmenu-sub--opened > .navmenu-sub-container {\n display: block;\n }\n"])));
23
20
  exports.InlineStyle = InlineStyle;
@@ -7,8 +7,6 @@ exports.default = void 0;
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _styled = _interopRequireDefault(require("@emotion/styled"));
11
-
12
10
  var _Card = _interopRequireDefault(require("@mui/material/Card"));
13
11
 
14
12
  var _Button = _interopRequireDefault(require("@mui/material/Button"));
@@ -17,6 +15,8 @@ var _CardContent = _interopRequireDefault(require("@mui/material/CardContent"));
17
15
 
18
16
  var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
19
17
 
18
+ var _Theme = require("../Theme");
19
+
20
20
  var _jsxRuntime = require("react/jsx-runtime");
21
21
 
22
22
  var _templateObject;
@@ -78,4 +78,4 @@ exports.default = _default;
78
78
  PricingPlan.propTypes = {
79
79
  plan: _propTypes.default.object.isRequired
80
80
  };
81
- const PlanCard = (0, _styled.default)(_Card.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 500px;\n display: flex;\n flex-direction: column;\n @media (max-width: 320px) {\n margin-top: 20px;\n }\n\n && {\n ", "\n }\n\n .card-header {\n height: 80px;\n background-color: #f1fbfb;\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n .title {\n font-size: 18px;\n font-weight: 600;\n text-align: center;\n color: #404040;\n margin: 0;\n }\n }\n\n .card-content {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n flex-grow: 1;\n }\n\n .plan-content {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n\n .plan-pricing {\n display: flex;\n justify-content: center;\n align-items: baseline;\n margin-bottom: 12px;\n color: #4e6af6;\n text-align: center;\n }\n\n .price-number {\n font-size: 30px;\n font-weight: 600;\n color: #4e6af6;\n }\n\n .plan-services strong {\n color: #4e6af6;\n font-weight: 500;\n }\n }\n\n .plan-actions {\n width: 100%;\n }\n"])), props => props.$shadow ? '' : 'box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.1)');
81
+ const PlanCard = (0, _Theme.styled)(_Card.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 500px;\n display: flex;\n flex-direction: column;\n @media (max-width: 320px) {\n margin-top: 20px;\n }\n\n && {\n ", "\n }\n\n .card-header {\n height: 80px;\n background-color: #f1fbfb;\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n .title {\n font-size: 18px;\n font-weight: 600;\n text-align: center;\n color: #404040;\n margin: 0;\n }\n }\n\n .card-content {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n align-items: center;\n flex-grow: 1;\n }\n\n .plan-content {\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n\n .plan-pricing {\n display: flex;\n justify-content: center;\n align-items: baseline;\n margin-bottom: 12px;\n color: #4e6af6;\n text-align: center;\n }\n\n .price-number {\n font-size: 30px;\n font-weight: 600;\n color: #4e6af6;\n }\n\n .plan-services strong {\n color: #4e6af6;\n font-weight: 500;\n }\n }\n\n .plan-actions {\n width: 100%;\n }\n"])), props => props.$shadow ? '' : 'box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.1)');
@@ -7,12 +7,12 @@ exports.default = void 0;
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _styled = _interopRequireDefault(require("@emotion/styled"));
11
-
12
10
  var _Grid = _interopRequireDefault(require("@mui/material/Grid"));
13
11
 
14
12
  var _PricingPlan = _interopRequireDefault(require("./PricingPlan"));
15
13
 
14
+ var _Theme = require("../Theme");
15
+
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
 
18
18
  var _templateObject;
@@ -58,5 +58,4 @@ exports.default = _default;
58
58
  PricingTable.propTypes = {
59
59
  plans: _propTypes.default.array.isRequired
60
60
  };
61
-
62
- const Div = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 100px 0;\n text-align: center;\n background-color: ", ";\n @media (max-width: 320px) {\n padding: 50px 0;\n }\n .plan-item {\n @media (max-width: 320px) {\n margin-bottom: 30px;\n }\n }\n"])), props => props.variant === 'even' ? '#fbfbfb' : '#ffffff');
61
+ const Div = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 100px 0;\n text-align: center;\n background-color: ", ";\n @media (max-width: 320px) {\n padding: 50px 0;\n }\n .plan-item {\n @media (max-width: 320px) {\n margin-bottom: 30px;\n }\n }\n"])), props => props.variant === 'even' ? '#fbfbfb' : '#ffffff');
@@ -11,8 +11,6 @@ exports.InternalServerError = InternalServerError;
11
11
  exports.Maintenance = Maintenance;
12
12
  exports.PageNotFound = PageNotFound;
13
13
 
14
- var _styles = require("@mui/material/styles");
15
-
16
14
  var _Info = _interopRequireDefault(require("@mui/icons-material/Info"));
17
15
 
18
16
  var _CancelRounded = _interopRequireDefault(require("@mui/icons-material/CancelRounded"));
@@ -23,6 +21,8 @@ var _translations = _interopRequireDefault(require("./translations"));
23
21
 
24
22
  var _context = require("../Locale/context");
25
23
 
24
+ var _Theme = require("../Theme");
25
+
26
26
  var _jsxRuntime = require("react/jsx-runtime");
27
27
 
28
28
  const _excluded = ["locale"],
@@ -161,7 +161,7 @@ function Info(props) {
161
161
  Info.status = 'info';
162
162
 
163
163
  function StyledErrorIcon(props) {
164
- const theme = (0, _styles.useTheme)();
164
+ const theme = (0, _Theme.useTheme)();
165
165
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CancelRounded.default, _objectSpread({
166
166
  style: {
167
167
  color: theme.palette.error.main,
@@ -171,7 +171,7 @@ function StyledErrorIcon(props) {
171
171
  }
172
172
 
173
173
  function StyledInfoIcon(props) {
174
- const theme = (0, _styles.useTheme)();
174
+ const theme = (0, _Theme.useTheme)();
175
175
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Info.default, _objectSpread({
176
176
  style: {
177
177
  color: theme.palette.info.main,
@@ -7,10 +7,10 @@ exports.default = void 0;
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _styled = _interopRequireDefault(require("@emotion/styled"));
11
-
12
10
  var _Box = _interopRequireDefault(require("@mui/material/Box"));
13
11
 
12
+ var _Theme = require("../Theme");
13
+
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
 
16
16
  var _templateObject;
@@ -75,8 +75,6 @@ Result.defaultProps = {
75
75
  actions: null,
76
76
  extra: undefined
77
77
  };
78
-
79
- const Root = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n padding: 16px;\n\n background-color: #f7f8fb;\n"])));
80
-
78
+ const Root = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n padding: 16px;\n\n background-color: #f7f8fb;\n"])));
81
79
  var _default = Result;
82
80
  exports.default = _default;
@@ -9,10 +9,10 @@ var _react = require("react");
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
- var _styled = _interopRequireDefault(require("@emotion/styled"));
13
-
14
12
  var _Util = require("../Util");
15
13
 
14
+ var _Theme = require("../Theme");
15
+
16
16
  require("./devices.css");
17
17
 
18
18
  var _jsxRuntime = require("react/jsx-runtime");
@@ -188,8 +188,7 @@ function Screenshot(props) {
188
188
  }));
189
189
  }
190
190
 
191
- const Div = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n @media (max-width: ", "px) {\n transform-origin: 0 0;\n transform: scale(", ");\n }\n .device-content {\n overflow: hidden;\n }\n .device-content video,\n .device-content img {\n border-radius: ", "px;\n background-color: #fff;\n background-position: center center;\n background-size: cover;\n object-fit: cover;\n width: 100.1%;\n height: 100.1%;\n }\n"])), props => types[props.type].width, props => types[props.type].scale, props => props.contentRadius);
192
-
191
+ const Div = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n @media (max-width: ", "px) {\n transform-origin: 0 0;\n transform: scale(", ");\n }\n .device-content {\n overflow: hidden;\n }\n .device-content video,\n .device-content img {\n border-radius: ", "px;\n background-color: #fff;\n background-position: center center;\n background-size: cover;\n object-fit: cover;\n width: 100.1%;\n height: 100.1%;\n }\n"])), props => types[props.type].width, props => types[props.type].scale, props => props.contentRadius);
193
192
  Screenshot.propTypes = {
194
193
  type: _propTypes.default.oneOf(Object.keys(types)),
195
194
  children: _propTypes.default.any.isRequired,
@@ -9,8 +9,6 @@ var _react = require("react");
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
- var _styled = _interopRequireDefault(require("@emotion/styled"));
13
-
14
12
  var _ExpandMore = _interopRequireDefault(require("@mui/icons-material/ExpandMore"));
15
13
 
16
14
  var _Popper = _interopRequireDefault(require("@mui/material/Popper"));
@@ -27,6 +25,8 @@ var _ButtonGroup = _interopRequireDefault(require("@mui/material/ButtonGroup"));
27
25
 
28
26
  var _Button = _interopRequireDefault(require("@mui/material/Button"));
29
27
 
28
+ var _Theme = require("../Theme");
29
+
30
30
  var _jsxRuntime = require("react/jsx-runtime");
31
31
 
32
32
  var _templateObject, _templateObject2;
@@ -144,5 +144,5 @@ SplitButton.defaultProps = {
144
144
  menuButtonProps: {}
145
145
  };
146
146
  SplitButton.Item = _MenuItem.default;
147
- const StyledButtonGroup = (0, _styled.default)(_ButtonGroup.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n > .MuiButtonBase-root:last-child {\n min-width: 2em;\n padding-left: 0;\n padding-right: 0;\n }\n"])));
148
- const StyledPopper = (0, _styled.default)(_Popper.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .MuiList-root {\n padding: 4px 0;\n }\n .MuiListItem-root {\n padding-top: 4px;\n padding-bottom: 4px;\n }\n"])));
147
+ const StyledButtonGroup = (0, _Theme.styled)(_ButtonGroup.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n > .MuiButtonBase-root:last-child {\n min-width: 2em;\n padding-left: 0;\n padding-right: 0;\n }\n"])));
148
+ const StyledPopper = (0, _Theme.styled)(_Popper.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .MuiList-root {\n padding: 4px 0;\n }\n .MuiListItem-root {\n padding-top: 4px;\n padding-bottom: 4px;\n }\n"])));
@@ -7,12 +7,12 @@ exports.default = void 0;
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _styles = require("@mui/material/styles");
11
-
12
10
  var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormControlLabel"));
13
11
 
14
12
  var _Switch = _interopRequireDefault(require("@mui/material/Switch"));
15
13
 
14
+ var _Theme = require("../Theme");
15
+
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
 
18
18
  const _excluded = ["labelProps"];
@@ -30,7 +30,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
30
30
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
31
31
 
32
32
  // 参考: https://mui.com/material-ui/react-switch/#customization
33
- const IOSSwitch = (0, _styles.styled)(props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, _objectSpread({
33
+ const IOSSwitch = (0, _Theme.styled)(props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Switch.default, _objectSpread({
34
34
  focusVisibleClassName: ".Mui-focusVisible",
35
35
  disableRipple: true
36
36
  }, props)))(_ref => {
package/lib/Tabs/index.js CHANGED
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = Tabs;
7
7
 
8
- var _styles = require("@mui/material/styles");
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
9
 
12
10
  var _Tabs = _interopRequireDefault(require("@mui/material/Tabs"));
13
11
 
14
12
  var _Tab = _interopRequireDefault(require("@mui/material/Tab"));
15
13
 
14
+ var _Theme = require("../Theme");
15
+
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
 
18
18
  const _excluded = ["tabs", "current", "onChange"];
@@ -34,7 +34,7 @@ const classes = {
34
34
  tabs: "".concat(PREFIX, "-tabs"),
35
35
  tab: "".concat(PREFIX, "-tab")
36
36
  };
37
- const StyledMuiTabs = (0, _styles.styled)(_Tabs.default)(_ref => {
37
+ const StyledMuiTabs = (0, _Theme.styled)(_Tabs.default)(_ref => {
38
38
  let {
39
39
  theme
40
40
  } = _ref;
package/lib/Tag/index.js CHANGED
@@ -9,16 +9,14 @@ var _react = require("react");
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
- var _styled = _interopRequireDefault(require("@emotion/styled"));
13
-
14
12
  var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
15
13
 
16
- var _styles = require("@mui/material/styles");
17
-
18
14
  var _Util = require("../Util");
19
15
 
20
16
  var _Colors = _interopRequireDefault(require("../Colors"));
21
17
 
18
+ var _Theme = require("../Theme");
19
+
22
20
  var _jsxRuntime = require("react/jsx-runtime");
23
21
 
24
22
  var _templateObject;
@@ -77,7 +75,7 @@ function Tag(props) {
77
75
 
78
76
  const {
79
77
  palette
80
- } = (0, _styles.useTheme)();
78
+ } = (0, _Theme.useTheme)();
81
79
  const styles = Object.assign({}, types[type] || types.primary, style);
82
80
 
83
81
  if (palette[type]) {
@@ -116,4 +114,4 @@ var _default = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => /*#__PURE__*/
116
114
  })));
117
115
 
118
116
  exports.default = _default;
119
- const Span = (0, _styled.default)(_Typography.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n && {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 10px;\n height: 20px;\n line-height: 20px;\n font-size: 12px;\n font-weight: 500;\n border-radius: 4px;\n }\n"])));
117
+ const Span = (0, _Theme.styled)(_Typography.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n && {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 10px;\n height: 20px;\n line-height: 20px;\n font-size: 12px;\n font-weight: 500;\n border-radius: 4px;\n }\n"])));
@@ -9,7 +9,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
10
  var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
11
11
 
12
- var _styled = _interopRequireDefault(require("@emotion/styled"));
12
+ var _Theme = require("../Theme");
13
13
 
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
 
@@ -92,4 +92,4 @@ TextCollapse.defaultProps = {
92
92
  scaleFactor: 0.45,
93
93
  fontType: 'normal'
94
94
  };
95
- const Container = (0, _styled.default)(_Typography.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n justify-content: start;\n cursor: pointer;\n white-space: nowrap;\n overflow: hidden;\n\n .start-part,\n .end-part {\n display: inline-block;\n vertical-align: bottom;\n white-space: nowrap;\n overflow: hidden;\n }\n .start-part {\n max-width: calc(100% - ", ");\n min-width: ", ";\n text-overflow: ellipsis;\n }\n .end-part {\n max-width: calc(100% - ", ");\n direction: rtl;\n }\n"])), props => props.endwidth, props => props.startwidth, props => props.startwidth);
95
+ const Container = (0, _Theme.styled)(_Typography.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n justify-content: start;\n cursor: pointer;\n white-space: nowrap;\n overflow: hidden;\n\n .start-part,\n .end-part {\n display: inline-block;\n vertical-align: bottom;\n white-space: nowrap;\n overflow: hidden;\n }\n .start-part {\n max-width: calc(100% - ", ");\n min-width: ", ";\n text-overflow: ellipsis;\n }\n .end-part {\n max-width: calc(100% - ", ");\n direction: rtl;\n }\n"])), props => props.endwidth, props => props.startwidth, props => props.startwidth);
@@ -4,6 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  var _exportNames = {
7
+ styled: true,
8
+ useTheme: true,
7
9
  ThemeProvider: true
8
10
  };
9
11
  Object.defineProperty(exports, "ThemeProvider", {
@@ -12,6 +14,18 @@ Object.defineProperty(exports, "ThemeProvider", {
12
14
  return _themeProvider.default;
13
15
  }
14
16
  });
17
+ Object.defineProperty(exports, "styled", {
18
+ enumerable: true,
19
+ get: function get() {
20
+ return _styles.styled;
21
+ }
22
+ });
23
+ Object.defineProperty(exports, "useTheme", {
24
+ enumerable: true,
25
+ get: function get() {
26
+ return _styles.useTheme;
27
+ }
28
+ });
15
29
 
16
30
  var _theme = require("./theme");
17
31
 
@@ -27,6 +41,8 @@ Object.keys(_theme).forEach(function (key) {
27
41
  });
28
42
  });
29
43
 
44
+ var _styles = require("@mui/material/styles");
45
+
30
46
  var _themeProvider = _interopRequireDefault(require("./theme-provider"));
31
47
 
32
48
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -7,8 +7,6 @@ exports.default = ThemeProvider;
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _react = require("@emotion/react");
11
-
12
10
  var _styles = require("@mui/material/styles");
13
11
 
14
12
  var _StyledEngineProvider = _interopRequireDefault(require("@mui/material/StyledEngineProvider"));
@@ -21,7 +19,7 @@ var _jsxRuntime = require("react/jsx-runtime");
21
19
 
22
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
21
 
24
- const defaultTheme = (0, _theme.create)();
22
+ const defaultTheme = (0, _theme.createTheme)();
25
23
  /**
26
24
  * 默认的 theme provider, 可以为 webapp/blocklet 快捷的配置好 mui theme provider
27
25
  */
@@ -37,12 +35,9 @@ function ThemeProvider(_ref) {
37
35
  // injectFirst 会影响 makeStyles 自定义样式和 mui styles 覆盖问题
38
36
  (0, _jsxRuntime.jsx)(_StyledEngineProvider.default, {
39
37
  injectFirst: injectFirst,
40
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ThemeProvider, {
38
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.ThemeProvider, {
41
39
  theme: theme,
42
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.ThemeProvider, {
43
- theme: theme,
44
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CssBaseline.default, {}), children]
45
- })
40
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CssBaseline.default, {}), children]
46
41
  })
47
42
  })
48
43
  );
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.create = void 0;
6
+ exports.createTheme = exports.create = void 0;
7
7
 
8
8
  var _styles = require("@mui/material/styles");
9
9
 
@@ -154,4 +154,6 @@ const create = function create() {
154
154
  return enhanced;
155
155
  };
156
156
 
157
- exports.create = create;
157
+ exports.create = create;
158
+ const createTheme = create;
159
+ exports.createTheme = createTheme;
@@ -11,12 +11,12 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _reactPlayer = _interopRequireDefault(require("react-player"));
13
13
 
14
- var _styled = _interopRequireDefault(require("@emotion/styled"));
15
-
16
14
  var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
17
15
 
18
16
  var _Util = require("../Util");
19
17
 
18
+ var _Theme = require("../Theme");
19
+
20
20
  var _jsxRuntime = require("react/jsx-runtime");
21
21
 
22
22
  var _templateObject;
@@ -102,5 +102,4 @@ Video.defaultProps = {
102
102
  height: 400,
103
103
  style: {}
104
104
  };
105
-
106
- const Placeholder = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: #222222;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n\n .loading-indicator {\n position: absolute;\n top: 45%;\n left: 47%;\n z-index: 2;\n }\n"])));
105
+ const Placeholder = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: #222222;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n\n .loading-indicator {\n position: absolute;\n top: 45%;\n left: 47%;\n z-index: 2;\n }\n"])));
@@ -7,8 +7,6 @@ exports.default = WalletAction;
7
7
 
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _styled = _interopRequireDefault(require("@emotion/styled"));
11
-
12
10
  var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
13
11
 
14
12
  var _abtwallet = _interopRequireDefault(require("./images/abtwallet.png"));
@@ -19,6 +17,8 @@ var _Colors = _interopRequireDefault(require("../Colors"));
19
17
 
20
18
  var _Button = _interopRequireDefault(require("../Button"));
21
19
 
20
+ var _Theme = require("../Theme");
21
+
22
22
  var _jsxRuntime = require("react/jsx-runtime");
23
23
 
24
24
  var _templateObject;
@@ -112,5 +112,4 @@ const sizes = {
112
112
  xlarge: 18
113
113
  }
114
114
  };
115
-
116
- const Content = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n\n &:hover {\n opacity: 0.9;\n }\n\n .wallet-action__logo {\n width: auto;\n height: auto;\n max-width: ", "px;\n margin-left: 5px;\n }\n\n .wallet-action__text {\n padding: 8px;\n display: flex;\n height: 100%;\n flex-direction: column;\n justify-content: space-between;\n align-items: flex-start;\n }\n\n .wallet-action__action {\n font-size: ", "px;\n text-transform: capitalize;\n margin-bottom: 1px;\n color: ", ";\n letter-spacing: 1px;\n }\n\n .wallet-action__title {\n font-size: ", "px;\n text-transform: capitalize;\n color: ", ";\n letter-spacing: 1px;\n }\n"])), props => sizes.logo[props.size], props => sizes.font[props.size], props => props.color || _Colors.default.primary.main, props => sizes.font[props.size] * 1.5, props => props.color || _Colors.default.primary.main);
115
+ const Content = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n\n &:hover {\n opacity: 0.9;\n }\n\n .wallet-action__logo {\n width: auto;\n height: auto;\n max-width: ", "px;\n margin-left: 5px;\n }\n\n .wallet-action__text {\n padding: 8px;\n display: flex;\n height: 100%;\n flex-direction: column;\n justify-content: space-between;\n align-items: flex-start;\n }\n\n .wallet-action__action {\n font-size: ", "px;\n text-transform: capitalize;\n margin-bottom: 1px;\n color: ", ";\n letter-spacing: 1px;\n }\n\n .wallet-action__title {\n font-size: ", "px;\n text-transform: capitalize;\n color: ", ";\n letter-spacing: 1px;\n }\n"])), props => sizes.logo[props.size], props => sizes.font[props.size], props => props.color || _Colors.default.primary.main, props => sizes.font[props.size] * 1.5, props => props.color || _Colors.default.primary.main);
@@ -9,8 +9,6 @@ var _react = _interopRequireDefault(require("react"));
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
- var _styled = _interopRequireDefault(require("@emotion/styled"));
13
-
14
12
  var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
15
13
 
16
14
  var _useBrowser = _interopRequireDefault(require("@arcblock/react-hooks/lib/useBrowser"));
@@ -19,6 +17,8 @@ var _Button = _interopRequireDefault(require("../Button"));
19
17
 
20
18
  var _Util = require("../Util");
21
19
 
20
+ var _Theme = require("../Theme");
21
+
22
22
  var _jsxRuntime = require("react/jsx-runtime");
23
23
 
24
24
  var _templateObject;
@@ -336,5 +336,4 @@ WalletDownload.defaultProps = {
336
336
  style: {},
337
337
  locale: 'zh'
338
338
  };
339
-
340
- const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: ", ";\n align-items: center;\n\n .download-title {\n margin-right: ", ";\n margin-bottom: ", ";\n }\n\n .download-store-list {\n display: flex;\n flex-direction: ", ";\n justify-content: space-between;\n align-items: center;\n\n .download-link {\n padding: 0;\n margin: 0;\n\n margin-right: ", ";\n margin-bottom: ", ";\n\n &:last-of-type {\n margin-right: 0;\n margin-bottom: 0;\n }\n }\n }\n"])), props => props.layout === 'vertical' ? 'column' : 'row', props => props.layout === 'vertical' ? '0' : '16px', props => props.layout === 'vertical' ? '16px' : '0', props => props.storeLayout === 'vertical' ? 'column' : 'row', props => props.storeLayout === 'vertical' ? '0' : '16px', props => props.storeLayout === 'vertical' ? '16px' : '0');
339
+ const Container = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: ", ";\n align-items: center;\n\n .download-title {\n margin-right: ", ";\n margin-bottom: ", ";\n }\n\n .download-store-list {\n display: flex;\n flex-direction: ", ";\n justify-content: space-between;\n align-items: center;\n\n .download-link {\n padding: 0;\n margin: 0;\n\n margin-right: ", ";\n margin-bottom: ", ";\n\n &:last-of-type {\n margin-right: 0;\n margin-bottom: 0;\n }\n }\n }\n"])), props => props.layout === 'vertical' ? 'column' : 'row', props => props.layout === 'vertical' ? '0' : '16px', props => props.layout === 'vertical' ? '16px' : '0', props => props.storeLayout === 'vertical' ? 'column' : 'row', props => props.storeLayout === 'vertical' ? '0' : '16px', props => props.storeLayout === 'vertical' ? '16px' : '0');