@arcblock/ux 2.4.15 → 2.4.16

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.
@@ -39,7 +39,7 @@ var _jsxRuntime = require("react/jsx-runtime");
39
39
 
40
40
  var _templateObject;
41
41
 
42
- const _excluded = ["showText", "popperProps", "popperType", "icon"];
42
+ const _excluded = ["showText", "popperProps", "popperType", "icon", "size"];
43
43
 
44
44
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
45
45
 
@@ -62,7 +62,8 @@ function LocaleSelector(props) {
62
62
  showText,
63
63
  popperProps,
64
64
  popperType,
65
- icon: Icon
65
+ icon: Icon,
66
+ size
66
67
  } = props,
67
68
  rest = _objectWithoutProperties(props, _excluded);
68
69
 
@@ -111,12 +112,12 @@ function LocaleSelector(props) {
111
112
 
112
113
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Globe.default, {
113
114
  style: {
114
- width: 26,
115
- height: 24.76,
115
+ width: 'auto',
116
+ height: size,
116
117
  color: theme.palette.text.secondary
117
118
  }
118
119
  });
119
- }, [Icon, theme === null || theme === void 0 ? void 0 : (_theme$palette2 = theme.palette) === null || _theme$palette2 === void 0 ? void 0 : (_theme$palette2$text = _theme$palette2.text) === null || _theme$palette2$text === void 0 ? void 0 : _theme$palette2$text.secondary]);
120
+ }, [Icon, theme === null || theme === void 0 ? void 0 : (_theme$palette2 = theme.palette) === null || _theme$palette2 === void 0 ? void 0 : (_theme$palette2$text = _theme$palette2.text) === null || _theme$palette2$text === void 0 ? void 0 : _theme$palette2$text.secondary, size]);
120
121
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Div, _objectSpread(_objectSpread(_objectSpread({
121
122
  component: "div",
122
123
  dark: dark,
@@ -183,4 +184,4 @@ LocaleSelector.defaultProps = {
183
184
  };
184
185
  var _default = LocaleSelector;
185
186
  exports.default = _default;
186
- const Div = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n\n .trigger {\n display: flex;\n flex-direction: column;\n justify-content: center;\n font-size: 14px;\n\n .trigger-image {\n width: ", "px;\n height: ", "px;\n }\n\n .trigger-text {\n margin-left: 5px;\n font-size: 14px;\n color: ", ";\n }\n }\n\n .locales {\n background: ", ";\n }\n\n .locale-item {\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: 2px;\n text-align: center;\n color: ", ";\n cursor: pointer;\n display: flex;\n padding: 16px;\n align-items: center;\n .check-icon {\n visibility: hidden;\n margin-right: 4px;\n }\n .check-icon-visible {\n visibility: visible;\n }\n }\n"])), props => props.size, props => props.size, props => (0, _Util.getColor)(props), props => (0, _Util.getBackground)(props), props => (0, _Util.getColor)(props));
187
+ const Div = (0, _Theme.styled)('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-block;\n\n .trigger {\n display: flex;\n flex-direction: column;\n justify-content: center;\n font-size: 14px;\n\n .trigger-text {\n margin-left: 5px;\n font-size: 14px;\n color: ", ";\n }\n }\n\n .locales {\n background: ", ";\n }\n\n .locale-item {\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: 2px;\n text-align: center;\n color: ", ";\n cursor: pointer;\n display: flex;\n padding: 16px;\n align-items: center;\n .check-icon {\n visibility: hidden;\n margin-right: 4px;\n }\n .check-icon-visible {\n visibility: visible;\n }\n }\n"])), props => (0, _Util.getColor)(props), props => (0, _Util.getBackground)(props), props => (0, _Util.getColor)(props));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.4.15",
3
+ "version": "2.4.16",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -47,10 +47,10 @@
47
47
  "react": ">=18.1.0",
48
48
  "react-ga": "^2.7.0"
49
49
  },
50
- "gitHead": "c07a38a4575a4f41e116743b2450e468c19d55f3",
50
+ "gitHead": "adc624cfa03a01f24cb7d78bc35b6ed54664935e",
51
51
  "dependencies": {
52
- "@arcblock/icons": "^2.4.15",
53
- "@arcblock/react-hooks": "^2.4.15",
52
+ "@arcblock/icons": "^2.4.16",
53
+ "@arcblock/react-hooks": "^2.4.16",
54
54
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
55
55
  "@emotion/react": "^11.10.0",
56
56
  "@emotion/styled": "^11.10.0",
@@ -18,7 +18,7 @@ import { LocaleContext, languages } from './context';
18
18
  import { styled, useTheme } from '../Theme';
19
19
 
20
20
  function LocaleSelector(props) {
21
- const { showText, popperProps, popperType, icon: Icon, ...rest } = props;
21
+ const { showText, popperProps, popperType, icon: Icon, size, ...rest } = props;
22
22
  const { locale, changeLocale } = useContext(LocaleContext);
23
23
  const anchorEl = useRef(null);
24
24
  const [open, setOpen] = useState(false);
@@ -61,8 +61,8 @@ function LocaleSelector(props) {
61
61
  return <Icon />;
62
62
  }
63
63
 
64
- return <GlobeIcon style={{ width: 26, height: 24.76, color: theme.palette.text.secondary }} />;
65
- }, [Icon, theme?.palette?.text?.secondary]);
64
+ return <GlobeIcon style={{ width: 'auto', height: size, color: theme.palette.text.secondary }} />;
65
+ }, [Icon, theme?.palette?.text?.secondary, size]);
66
66
 
67
67
  return (
68
68
  <Div component="div" dark={dark} theme={theme} {...rest} {...handleEventProps}>
@@ -130,11 +130,6 @@ const Div = styled('div')`
130
130
  justify-content: center;
131
131
  font-size: 14px;
132
132
 
133
- .trigger-image {
134
- width: ${(props) => props.size}px;
135
- height: ${(props) => props.size}px;
136
- }
137
-
138
133
  .trigger-text {
139
134
  margin-left: 5px;
140
135
  font-size: 14px;