@micromag/element-checkbox 0.4.49 → 0.4.51

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,6 +1,6 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import classNames from 'classnames';
3
- import React from 'react';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
5
5
  var styles = {"container":"micromag-element-checkbox-container","label":"micromag-element-checkbox-label","input":"micromag-element-checkbox-input"};
6
6
 
@@ -20,26 +20,28 @@ function Checkbox(_ref) {
20
20
  var _ref2 = option || {},
21
21
  _ref2$body = _ref2.body,
22
22
  body = _ref2$body === void 0 ? null : _ref2$body;
23
- return /*#__PURE__*/React.createElement("div", {
23
+ return /*#__PURE__*/jsx("div", {
24
24
  className: classNames([styles.container, className]),
25
- style: _objectSpread({}, checkboxStyle)
26
- }, /*#__PURE__*/React.createElement("label", {
27
- className: classNames([styles.label, {
28
- active: body === value
29
- }])
30
- }, /*#__PURE__*/React.createElement("input", {
31
- className: styles.input,
32
- type: "checkbox",
33
- autoComplete: "off",
34
- value: value === true,
35
- checked: value === true,
36
- tabIndex: focusable ? '0' : '-1',
37
- onChange: function onChange() {
38
- if (_onChange !== null) {
39
- _onChange(!value);
40
- }
41
- }
42
- }), body));
25
+ style: _objectSpread({}, checkboxStyle),
26
+ children: /*#__PURE__*/jsxs("label", {
27
+ className: classNames([styles.label, {
28
+ active: body === value
29
+ }]),
30
+ children: [/*#__PURE__*/jsx("input", {
31
+ className: styles.input,
32
+ type: "checkbox",
33
+ autoComplete: "off",
34
+ value: value === true,
35
+ checked: value === true,
36
+ tabIndex: focusable ? '0' : '-1',
37
+ onChange: function onChange() {
38
+ if (_onChange !== null) {
39
+ _onChange(!value);
40
+ }
41
+ }
42
+ }), body]
43
+ })
44
+ });
43
45
  }
44
46
 
45
47
  export { Checkbox as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-checkbox",
3
- "version": "0.4.49",
3
+ "version": "0.4.51",
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.51",
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": "985a2370829c9ac8901ea97bf20bfc98ab158439",
74
74
  "types": "es/index.d.ts"
75
75
  }