@micromag/element-keypad 0.4.49 → 0.4.50

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 (2) hide show
  1. package/es/index.js +22 -20
  2. package/package.json +3 -3
package/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import classNames from 'classnames';
3
- import React from 'react';
4
3
  import { getStyleFromAlignment } from '@micromag/core/utils';
4
+ import { jsx } from 'react/jsx-runtime';
5
5
 
6
6
  var styles = {"inner":"micromag-element-keypad-inner"};
7
7
 
@@ -21,25 +21,27 @@ function Keypad(_ref) {
21
21
  _ref$innerClassName = _ref.innerClassName,
22
22
  innerClassName = _ref$innerClassName === void 0 ? null : _ref$innerClassName;
23
23
  var itemWidth = "".concat(100 / columns, "%");
24
- return /*#__PURE__*/React.createElement("div", {
25
- className: classNames([styles.container, className])
26
- }, /*#__PURE__*/React.createElement("div", {
27
- className: classNames([styles.inner, innerClassName]),
28
- style: _objectSpread({}, getStyleFromAlignment({
29
- horizontal: align
30
- }))
31
- }, items !== null ? items.map(function (item) {
32
- var _ref2 = item || {},
33
- key = _ref2.key;
34
- return /*#__PURE__*/React.createElement("div", {
35
- key: key,
36
- className: classNames([styles.item, itemClassName]),
37
- style: {
38
- width: itemWidth,
39
- padding: spacing / 2
40
- }
41
- }, item);
42
- }) : null));
24
+ return /*#__PURE__*/jsx("div", {
25
+ className: classNames([styles.container, className]),
26
+ children: /*#__PURE__*/jsx("div", {
27
+ className: classNames([styles.inner, innerClassName]),
28
+ style: _objectSpread({}, getStyleFromAlignment({
29
+ horizontal: align
30
+ })),
31
+ children: items !== null ? items.map(function (item) {
32
+ var _ref2 = item || {},
33
+ key = _ref2.key;
34
+ return /*#__PURE__*/jsx("div", {
35
+ className: classNames([styles.item, itemClassName]),
36
+ style: {
37
+ width: itemWidth,
38
+ padding: spacing / 2
39
+ },
40
+ children: item
41
+ }, key);
42
+ }) : null
43
+ })
44
+ });
43
45
  }
44
46
 
45
47
  export { Keypad as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-keypad",
3
- "version": "0.4.49",
3
+ "version": "0.4.50",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@babel/runtime": "^7.28.6",
63
- "@micromag/core": "^0.4.49",
63
+ "@micromag/core": "^0.4.50",
64
64
  "classnames": "^2.2.6",
65
65
  "lodash": "^4.17.23",
66
66
  "react-intl": "^8.1.3 || ^10.0.0",
@@ -70,6 +70,6 @@
70
70
  "access": "public",
71
71
  "registry": "https://registry.npmjs.org/"
72
72
  },
73
- "gitHead": "0a225ff29387217cccb0fcc5a731e23c74bd202e",
73
+ "gitHead": "940d5ca98f8f448b79eaa3e2fa685c3ee95185b8",
74
74
  "types": "es/index.d.ts"
75
75
  }