@blocklet/launcher-ux 2.3.138 → 2.4.0

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.
@@ -3,8 +3,8 @@ import Button from '@arcblock/ux/lib/Button';
3
3
  import CircularProgress from '@mui/material/CircularProgress';
4
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  export default function WrappedButton({
6
- children,
7
- loading,
6
+ children = '',
7
+ loading = false,
8
8
  ...props
9
9
  }) {
10
10
  return /*#__PURE__*/_jsxs(Button, {
@@ -23,8 +23,4 @@ export default function WrappedButton({
23
23
  WrappedButton.propTypes = {
24
24
  children: PropTypes.any,
25
25
  loading: PropTypes.bool
26
- };
27
- WrappedButton.defaultProps = {
28
- children: '',
29
- loading: false
30
26
  };
@@ -4,9 +4,9 @@ import CheckIcon from '@mui/icons-material/Check';
4
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  export default function CheckBox({
6
6
  children,
7
- checked,
8
- checkIconSize,
9
- className,
7
+ checked = false,
8
+ checkIconSize = 30,
9
+ className = '',
10
10
  ...rest
11
11
  }) {
12
12
  return /*#__PURE__*/_jsxs(Content, {
@@ -27,11 +27,6 @@ CheckBox.propTypes = {
27
27
  checked: PropTypes.bool,
28
28
  className: PropTypes.string
29
29
  };
30
- CheckBox.defaultProps = {
31
- checked: false,
32
- checkIconSize: 30,
33
- className: ''
34
- };
35
30
  const Content = styled.div`
36
31
  position: relative;
37
32
  padding: 10px;
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
7
7
  * which may not be consistent with the actual business logic.
8
8
  */
9
9
  export default function SubmitHotKey({
10
- disabled,
10
+ disabled = false,
11
11
  children,
12
12
  onConfirm
13
13
  }) {
@@ -33,7 +33,4 @@ SubmitHotKey.propTypes = {
33
33
  disabled: PropTypes.bool,
34
34
  children: PropTypes.any.isRequired,
35
35
  onConfirm: PropTypes.func.isRequired
36
- };
37
- SubmitHotKey.defaultProps = {
38
- disabled: false
39
36
  };
@@ -46,10 +46,10 @@ export default function CheckoutOnDemand({
46
46
  session,
47
47
  t,
48
48
  locale,
49
- freeTrialProducts,
49
+ freeTrialProducts = [],
50
50
  minStakeAmount,
51
- isResume,
52
- blockletMeta
51
+ isResume = false,
52
+ blockletMeta = {}
53
53
  }) {
54
54
  return /*#__PURE__*/_jsx(Box, {
55
55
  sx: {
@@ -92,32 +92,26 @@ const propTypes = {
92
92
  isResume: PropTypes.bool,
93
93
  blockletMeta: PropTypes.object
94
94
  };
95
- CheckoutOnDemand.defaultProps = {
96
- freeTrialProducts: [],
97
- isResume: false,
98
- blockletMeta: {}
99
- };
100
95
  CheckoutOnDemand.propTypes = {
101
96
  ...propTypes,
102
97
  connectApi: PropTypes.func.isRequired,
103
98
  session: PropTypes.object.isRequired
104
99
  };
105
100
  Component.propTypes = propTypes;
106
- Component.defaultProps = CheckoutOnDemand.defaultProps;
107
101
  function Component({
108
102
  launchSessionId,
109
103
  handlePaid,
110
104
  components: tempComponents,
111
105
  blockletStoreURL,
112
106
  api,
113
- checkoutPath,
114
- checkoutSession,
107
+ checkoutPath = '',
108
+ checkoutSession = null,
115
109
  t,
116
110
  locale,
117
- freeTrialProducts,
111
+ freeTrialProducts = [],
118
112
  minStakeAmount,
119
- isResume,
120
- blockletMeta
113
+ isResume = false,
114
+ blockletMeta = {}
121
115
  }) {
122
116
  const {
123
117
  isMobile
@@ -296,8 +290,8 @@ function Component({
296
290
  });
297
291
  return /*#__PURE__*/_jsx(Stack, {
298
292
  direction: "column",
299
- gap: 2,
300
293
  sx: {
294
+ gap: 2,
301
295
  width: '100%',
302
296
  height: '100%'
303
297
  },
@@ -319,11 +313,15 @@ function Component({
319
313
  flex: '1'
320
314
  },
321
315
  children: [/*#__PURE__*/_jsxs(Stack, {
322
- gap: 1,
316
+ sx: {
317
+ gap: 1
318
+ },
323
319
  children: [/*#__PURE__*/_jsxs(Stack, {
324
320
  direction: "row",
325
- justifyContent: "space-between",
326
- alignItems: "center",
321
+ sx: {
322
+ justifyContent: 'space-between',
323
+ alignItems: 'center'
324
+ },
327
325
  children: [/*#__PURE__*/_jsxs(Box, {
328
326
  sx: {
329
327
  display: 'flex',
@@ -8,7 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  export default function ProgressMessage({
9
9
  steps,
10
10
  stepIndex,
11
- autoGrowth,
11
+ autoGrowth = 0,
12
12
  ...rest
13
13
  }) {
14
14
  const [value, setVal] = useState(0);
@@ -78,9 +78,6 @@ ProgressMessage.propTypes = {
78
78
  stepIndex: PropTypes.number.isRequired,
79
79
  autoGrowth: PropTypes.number
80
80
  };
81
- ProgressMessage.defaultProps = {
82
- autoGrowth: 0
83
- };
84
81
  const Container = styled.div`
85
82
  display: flex;
86
83
  width: 100%;
@@ -4,8 +4,8 @@ import CircularProgress from '@mui/material/CircularProgress';
4
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
5
  export default function SmallCircleProgress({
6
6
  value,
7
- size,
8
- style,
7
+ size = 10,
8
+ style = {},
9
9
  ...rest
10
10
  }) {
11
11
  return /*#__PURE__*/_jsxs(Content, {
@@ -40,10 +40,6 @@ SmallCircleProgress.propTypes = {
40
40
  size: PropTypes.number,
41
41
  style: PropTypes.object
42
42
  };
43
- SmallCircleProgress.defaultProps = {
44
- size: 10,
45
- style: {}
46
- };
47
43
  const Content = styled.span`
48
44
  display: inline-block;
49
45
  position: relative;
@@ -19,8 +19,8 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
19
19
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
20
20
  function WrappedButton(_ref) {
21
21
  let {
22
- children,
23
- loading
22
+ children = '',
23
+ loading = false
24
24
  } = _ref,
25
25
  props = _objectWithoutProperties(_ref, _excluded);
26
26
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Button.default, _objectSpread(_objectSpread({
@@ -39,8 +39,4 @@ function WrappedButton(_ref) {
39
39
  WrappedButton.propTypes = {
40
40
  children: _propTypes.default.any,
41
41
  loading: _propTypes.default.bool
42
- };
43
- WrappedButton.defaultProps = {
44
- children: '',
45
- loading: false
46
42
  };
@@ -22,9 +22,9 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
22
22
  function CheckBox(_ref) {
23
23
  let {
24
24
  children,
25
- checked,
26
- checkIconSize,
27
- className
25
+ checked = false,
26
+ checkIconSize = 30,
27
+ className = ''
28
28
  } = _ref,
29
29
  rest = _objectWithoutProperties(_ref, _excluded);
30
30
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Content, _objectSpread(_objectSpread({
@@ -45,9 +45,4 @@ CheckBox.propTypes = {
45
45
  checked: _propTypes.default.bool,
46
46
  className: _propTypes.default.string
47
47
  };
48
- CheckBox.defaultProps = {
49
- checked: false,
50
- checkIconSize: 30,
51
- className: ''
52
- };
53
48
  const Content = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n padding: 10px;\n border: 0 solid ", ";\n border-radius: 8px;\n transition: all ease 0.2s;\n cursor: pointer;\n\n .check-container {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n align-items: flex-end;\n width: ", "px;\n height: ", "px;\n border-radius: 0 0 7px 0;\n color: ", ";\n overflow: hidden;\n transition: all ease 0.3s;\n &:after {\n position: absolute;\n z-index: 0;\n left: ", "px;\n top: ", "px;\n display: block;\n width: 0;\n height: 0;\n border-top: transparent solid ", "px;\n border-left: transparent solid ", "px;\n border-bottom: ", " solid ", "px;\n border-right: ", " solid ", "px;\n transition: all ease 0.1s;\n content: '';\n }\n\n .check-icon {\n width: 60%;\n height: 60%;\n position: relative;\n z-index: 2;\n margin: 0 1px 1px 0;\n font-size: 16px;\n transform: scale(0);\n transition: all ease 0.2s;\n }\n }\n\n &.checked {\n background-color: #ecfbfd;\n border-color: #ecfbfd;\n\n .check-container {\n &:after {\n left: 0;\n top: 0;\n }\n\n .check-icon {\n transform: scale(1);\n }\n }\n }\n"])), props => props.theme.palette.grey['100'], props => props.checkIconSize, props => props.checkIconSize, props => props.theme.palette.common.white, props => props.checkIconSize, props => props.checkIconSize, props => props.checkIconSize / 2, props => props.checkIconSize / 2, props => props.theme.palette.primary.main, props => props.checkIconSize / 2, props => props.theme.palette.primary.main, props => props.checkIconSize / 2);
@@ -14,7 +14,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
14
14
  */
15
15
  function SubmitHotKey(_ref) {
16
16
  let {
17
- disabled,
17
+ disabled = false,
18
18
  children,
19
19
  onConfirm
20
20
  } = _ref;
@@ -40,7 +40,4 @@ SubmitHotKey.propTypes = {
40
40
  disabled: _propTypes.default.bool,
41
41
  children: _propTypes.default.any.isRequired,
42
42
  onConfirm: _propTypes.default.func.isRequired
43
- };
44
- SubmitHotKey.defaultProps = {
45
- disabled: false
46
43
  };
@@ -63,10 +63,10 @@ function CheckoutOnDemand(_ref2) {
63
63
  session,
64
64
  t,
65
65
  locale,
66
- freeTrialProducts,
66
+ freeTrialProducts = [],
67
67
  minStakeAmount,
68
- isResume,
69
- blockletMeta
68
+ isResume = false,
69
+ blockletMeta = {}
70
70
  } = _ref2;
71
71
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box.default, {
72
72
  sx: {
@@ -109,17 +109,11 @@ const propTypes = {
109
109
  isResume: _propTypes.default.bool,
110
110
  blockletMeta: _propTypes.default.object
111
111
  };
112
- CheckoutOnDemand.defaultProps = {
113
- freeTrialProducts: [],
114
- isResume: false,
115
- blockletMeta: {}
116
- };
117
112
  CheckoutOnDemand.propTypes = _objectSpread(_objectSpread({}, propTypes), {}, {
118
113
  connectApi: _propTypes.default.func.isRequired,
119
114
  session: _propTypes.default.object.isRequired
120
115
  });
121
116
  Component.propTypes = propTypes;
122
- Component.defaultProps = CheckoutOnDemand.defaultProps;
123
117
  function Component(_ref3) {
124
118
  var _state$currency;
125
119
  let {
@@ -128,14 +122,14 @@ function Component(_ref3) {
128
122
  components: tempComponents,
129
123
  blockletStoreURL,
130
124
  api,
131
- checkoutPath,
132
- checkoutSession,
125
+ checkoutPath = '',
126
+ checkoutSession = null,
133
127
  t,
134
128
  locale,
135
- freeTrialProducts,
129
+ freeTrialProducts = [],
136
130
  minStakeAmount,
137
- isResume,
138
- blockletMeta
131
+ isResume = false,
132
+ blockletMeta = {}
139
133
  } = _ref3;
140
134
  const {
141
135
  isMobile
@@ -317,8 +311,8 @@ function Component(_ref3) {
317
311
  });
318
312
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Stack, {
319
313
  direction: "column",
320
- gap: 2,
321
314
  sx: {
315
+ gap: 2,
322
316
  width: '100%',
323
317
  height: '100%'
324
318
  },
@@ -340,11 +334,15 @@ function Component(_ref3) {
340
334
  flex: '1'
341
335
  },
342
336
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
343
- gap: 1,
337
+ sx: {
338
+ gap: 1
339
+ },
344
340
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
345
341
  direction: "row",
346
- justifyContent: "space-between",
347
- alignItems: "center",
342
+ sx: {
343
+ justifyContent: 'space-between',
344
+ alignItems: 'center'
345
+ },
348
346
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box.default, {
349
347
  sx: {
350
348
  display: 'flex',
@@ -24,7 +24,7 @@ function ProgressMessage(_ref) {
24
24
  let {
25
25
  steps,
26
26
  stepIndex,
27
- autoGrowth
27
+ autoGrowth = 0
28
28
  } = _ref,
29
29
  rest = _objectWithoutProperties(_ref, _excluded);
30
30
  const [value, setVal] = (0, _react.useState)(0);
@@ -93,7 +93,4 @@ ProgressMessage.propTypes = {
93
93
  stepIndex: _propTypes.default.number.isRequired,
94
94
  autoGrowth: _propTypes.default.number
95
95
  };
96
- ProgressMessage.defaultProps = {
97
- autoGrowth: 0
98
- };
99
96
  const Container = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n .progress-message {\n position: relative;\n color: ", ";\n margin-left: 8px;\n font-size: 18px;\n min-height: 26px;\n line-height: 26px;\n font-weight: 700;\n transition: all ease 0.3s;\n }\n .progress-message-item {\n position: absolute;\n left: 0;\n top: 0;\n white-space: nowrap;\n transition: all ease 0.3s;\n z-index: 2;\n &.message-before {\n transform: translate(-10px, 0);\n opacity: 0;\n z-index: 0;\n pointer-events: none;\n }\n &.message-after {\n transform: translate(10px, 0);\n opacity: 0;\n z-index: 0;\n pointer-events: none;\n }\n }\n"])), props => props.theme.palette.primary.main);
@@ -22,8 +22,8 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
22
22
  function SmallCircleProgress(_ref) {
23
23
  let {
24
24
  value,
25
- size,
26
- style
25
+ size = 10,
26
+ style = {}
27
27
  } = _ref,
28
28
  rest = _objectWithoutProperties(_ref, _excluded);
29
29
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Content, _objectSpread(_objectSpread({
@@ -57,8 +57,4 @@ SmallCircleProgress.propTypes = {
57
57
  size: _propTypes.default.number,
58
58
  style: _propTypes.default.object
59
59
  };
60
- SmallCircleProgress.defaultProps = {
61
- size: 10,
62
- style: {}
63
- };
64
60
  const Content = _styled.default.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n position: relative;\n > * {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n }\n"])));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/launcher-ux",
3
- "version": "2.3.138",
3
+ "version": "2.4.0",
4
4
  "description": "Launcher UX lib",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -41,26 +41,26 @@
41
41
  },
42
42
  "peerDependencies": {
43
43
  "prop-types": "^15.8.1",
44
- "react": ">=18.1.0"
44
+ "react": ">=19.1.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@babel/cli": "^7.27.2",
48
- "@babel/core": "^7.27.4",
48
+ "@babel/core": "^7.27.7",
49
49
  "@babel/preset-env": "^7.27.2",
50
50
  "@babel/preset-react": "^7.27.1",
51
51
  "@storybook/react": "^7.6.20",
52
52
  "babel-plugin-inline-react-svg": "^2.0.2",
53
- "concurrently": "^9.1.2",
53
+ "concurrently": "^9.2.0",
54
54
  "glob": "^10.4.5"
55
55
  },
56
56
  "dependencies": {
57
- "@arcblock/ux": "^2.13.65",
58
- "@blocklet/launcher-util": "2.3.138",
59
- "@blocklet/payment-react": "^1.18.54",
60
- "@emotion/styled": "^11.14.0",
61
- "@mui/icons-material": "^5.17.1",
62
- "@mui/material": "^5.17.1",
63
- "ahooks": "^3.8.5",
57
+ "@arcblock/ux": "^3.0.8",
58
+ "@blocklet/launcher-util": "2.4.0",
59
+ "@blocklet/payment-react": "^1.19.0",
60
+ "@emotion/styled": "^11.14.1",
61
+ "@mui/icons-material": "^7.2.0",
62
+ "@mui/material": "^7.2.0",
63
+ "ahooks": "^3.9.0",
64
64
  "pretty-ms-i18n": "^1.0.3",
65
65
  "react-use": "^17.6.0"
66
66
  },
@@ -94,5 +94,5 @@
94
94
  "require": "./lib/use-mobile/index.js"
95
95
  }
96
96
  },
97
- "gitHead": "7e5774213062758a48023e30ddbe92cd4de1faa1"
97
+ "gitHead": "e66df918847edbe28af223d6f6bfb42b1d2a4699"
98
98
  }