@micromag/element-checkbox 0.3.824 → 0.4.4

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.
@@ -1 +1 @@
1
- .micromag-element-checkbox-container{position:relative}.micromag-element-checkbox-container .micromag-element-checkbox-label{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;margin-bottom:0}.micromag-element-checkbox-container .micromag-element-checkbox-input{margin-right:5px}
1
+ .container{position:relative}.container .label{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;margin-bottom:0}.container .input{margin-right:5px}
package/es/index.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { TextElement } from '@micromag/core';
3
+
4
+ interface CheckboxProps {
5
+ option?: TextElement | null;
6
+ value?: boolean | null;
7
+ onChange?: ((...args: unknown[]) => void) | null;
8
+ focusable?: boolean;
9
+ checkboxStyle?: Record<string, unknown> | null;
10
+ className?: string | null;
11
+ }
12
+ declare function Checkbox({ option, value, onChange, focusable, checkboxStyle, className, }: CheckboxProps): react_jsx_runtime.JSX.Element;
13
+
14
+ export { Checkbox as default };
package/es/index.js CHANGED
@@ -1,36 +1,23 @@
1
1
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import classNames from 'classnames';
4
- import PropTypes from 'prop-types';
5
4
  import React from 'react';
6
- import { PropTypes as PropTypes$1 } from '@micromag/core';
7
5
 
8
- var styles = {"container":"micromag-element-checkbox-container","label":"micromag-element-checkbox-label","input":"micromag-element-checkbox-input"};
6
+ var styles = {"container":"container","label":"label","input":"input"};
9
7
 
10
- var propTypes = {
11
- option: PropTypes$1.textElement,
12
- value: PropTypes.bool,
13
- onChange: PropTypes.func,
14
- focusable: PropTypes.bool,
15
- checkboxStyle: PropTypes.object,
16
- // eslint-disable-line
17
- className: PropTypes.string
18
- };
19
- var defaultProps = {
20
- option: null,
21
- value: null,
22
- onChange: null,
23
- focusable: true,
24
- checkboxStyle: null,
25
- className: null
26
- };
27
- var Checkbox = function Checkbox(_ref) {
28
- var option = _ref.option,
29
- value = _ref.value,
30
- _onChange = _ref.onChange,
31
- focusable = _ref.focusable,
32
- checkboxStyle = _ref.checkboxStyle,
33
- className = _ref.className;
8
+ function Checkbox(_ref) {
9
+ var _ref$option = _ref.option,
10
+ option = _ref$option === void 0 ? null : _ref$option,
11
+ _ref$value = _ref.value,
12
+ value = _ref$value === void 0 ? null : _ref$value,
13
+ _ref$onChange = _ref.onChange,
14
+ _onChange = _ref$onChange === void 0 ? null : _ref$onChange,
15
+ _ref$focusable = _ref.focusable,
16
+ focusable = _ref$focusable === void 0 ? true : _ref$focusable,
17
+ _ref$checkboxStyle = _ref.checkboxStyle,
18
+ checkboxStyle = _ref$checkboxStyle === void 0 ? null : _ref$checkboxStyle,
19
+ _ref$className = _ref.className,
20
+ className = _ref$className === void 0 ? null : _ref$className;
34
21
  var _ref2 = option || {},
35
22
  _ref2$body = _ref2.body,
36
23
  body = _ref2$body === void 0 ? null : _ref2$body;
@@ -54,8 +41,6 @@ var Checkbox = function Checkbox(_ref) {
54
41
  }
55
42
  }
56
43
  }), body));
57
- };
58
- Checkbox.propTypes = propTypes;
59
- Checkbox.defaultProps = defaultProps;
44
+ }
60
45
 
61
46
  export { Checkbox as default };
package/es/styles.css ADDED
@@ -0,0 +1 @@
1
+ .container{position:relative}.container .label{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;margin-bottom:0}.container .input{margin-right:5px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-checkbox",
3
- "version": "0.3.824",
3
+ "version": "0.4.4",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -34,6 +34,7 @@
34
34
  "module": "es/index.js",
35
35
  "exports": {
36
36
  ".": {
37
+ "types": "./es/index.d.ts",
37
38
  "import": "./es/index.js"
38
39
  },
39
40
  "./assets/css/styles": "./assets/css/styles.css",
@@ -47,28 +48,28 @@
47
48
  "scripts": {
48
49
  "clean": "rm -rf es && rm -rf lib && rm -rf assets",
49
50
  "prepublishOnly": "npm run build",
50
- "build": "../../scripts/prepare-package.sh"
51
+ "build": "../../scripts/prepare-package.sh --types"
51
52
  },
52
53
  "devDependencies": {
53
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
54
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
54
+ "react": "^19.2.0",
55
+ "react-dom": "^18.3.0 || ^19.0.0"
55
56
  },
56
57
  "peerDependencies": {
57
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
58
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
58
+ "react": "^19.2.0",
59
+ "react-dom": "^18.3.0 || ^19.0.0"
59
60
  },
60
61
  "dependencies": {
61
62
  "@babel/runtime": "^7.13.10",
62
- "@micromag/core": "^0.3.824",
63
+ "@micromag/core": "^0.4.4",
63
64
  "classnames": "^2.2.6",
64
- "lodash": "^4.17.21",
65
- "prop-types": "^15.7.2",
66
- "react-intl": "^6.6.4",
65
+ "lodash": "^4.17.23",
66
+ "react-intl": "^8.1.3",
67
67
  "uuid": "^9.0.0"
68
68
  },
69
69
  "publishConfig": {
70
70
  "access": "public",
71
71
  "registry": "https://registry.npmjs.org/"
72
72
  },
73
- "gitHead": "e266e480cdc5741c73160840affee2eac7e7c9de"
73
+ "gitHead": "04b8519c3a3ddace5a21497e22faa11865d57f6d",
74
+ "types": "es/index.d.ts"
74
75
  }