@micromag/element-keypad 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.
- package/assets/css/styles.css +1 -1
- package/es/index.d.ts +15 -0
- package/es/index.js +15 -29
- package/es/styles.css +1 -0
- package/package.json +12 -11
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.inner{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.slot{position:relative}
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
interface KeypadProps {
|
|
5
|
+
align?: 'left' | 'right' | 'middle' | null;
|
|
6
|
+
columns?: number;
|
|
7
|
+
spacing?: number;
|
|
8
|
+
className?: string | null;
|
|
9
|
+
itemClassName?: string | null;
|
|
10
|
+
innerClassName?: string | null;
|
|
11
|
+
items?: React.ReactNode | null;
|
|
12
|
+
}
|
|
13
|
+
declare function Keypad({ items, align, columns, spacing, className, itemClassName, innerClassName, }: KeypadProps): react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { Keypad as default };
|
package/es/index.js
CHANGED
|
@@ -1,38 +1,26 @@
|
|
|
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
5
|
import { getStyleFromAlignment } from '@micromag/core/utils';
|
|
7
6
|
|
|
8
|
-
var styles = {"inner":"
|
|
7
|
+
var styles = {"inner":"inner"};
|
|
9
8
|
|
|
10
|
-
var propTypes = {
|
|
11
|
-
align: PropTypes.oneOf(['left', 'right', 'middle']),
|
|
12
|
-
columns: PropTypes.number,
|
|
13
|
-
spacing: PropTypes.number,
|
|
14
|
-
className: PropTypes.string,
|
|
15
|
-
itemClassName: PropTypes.string,
|
|
16
|
-
innerClassName: PropTypes.string,
|
|
17
|
-
items: PropTypes.node
|
|
18
|
-
};
|
|
19
|
-
var defaultProps = {
|
|
20
|
-
align: null,
|
|
21
|
-
columns: 1,
|
|
22
|
-
spacing: 10,
|
|
23
|
-
className: null,
|
|
24
|
-
itemClassName: null,
|
|
25
|
-
innerClassName: null,
|
|
26
|
-
items: null
|
|
27
|
-
};
|
|
28
9
|
function Keypad(_ref) {
|
|
29
|
-
var items = _ref.items,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
10
|
+
var _ref$items = _ref.items,
|
|
11
|
+
items = _ref$items === void 0 ? null : _ref$items,
|
|
12
|
+
_ref$align = _ref.align,
|
|
13
|
+
align = _ref$align === void 0 ? null : _ref$align,
|
|
14
|
+
_ref$columns = _ref.columns,
|
|
15
|
+
columns = _ref$columns === void 0 ? 1 : _ref$columns,
|
|
16
|
+
_ref$spacing = _ref.spacing,
|
|
17
|
+
spacing = _ref$spacing === void 0 ? 10 : _ref$spacing,
|
|
18
|
+
_ref$className = _ref.className,
|
|
19
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
20
|
+
_ref$itemClassName = _ref.itemClassName,
|
|
21
|
+
itemClassName = _ref$itemClassName === void 0 ? null : _ref$itemClassName,
|
|
22
|
+
_ref$innerClassName = _ref.innerClassName,
|
|
23
|
+
innerClassName = _ref$innerClassName === void 0 ? null : _ref$innerClassName;
|
|
36
24
|
var itemWidth = "".concat(100 / columns, "%");
|
|
37
25
|
return /*#__PURE__*/React.createElement("div", {
|
|
38
26
|
className: classNames([styles.container, _defineProperty({}, className, className !== null)])
|
|
@@ -54,7 +42,5 @@ function Keypad(_ref) {
|
|
|
54
42
|
}, item);
|
|
55
43
|
}) : null));
|
|
56
44
|
}
|
|
57
|
-
Keypad.propTypes = propTypes;
|
|
58
|
-
Keypad.defaultProps = defaultProps;
|
|
59
45
|
|
|
60
46
|
export { Keypad as default };
|
package/es/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.inner{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;width:100%}.slot{position:relative}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-keypad",
|
|
3
|
-
"version": "0.
|
|
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": "^
|
|
54
|
-
"react-dom": "^
|
|
54
|
+
"react": "^19.2.0",
|
|
55
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
55
56
|
},
|
|
56
57
|
"peerDependencies": {
|
|
57
|
-
"react": "^
|
|
58
|
-
"react-dom": "^
|
|
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.
|
|
63
|
+
"@micromag/core": "^0.4.4",
|
|
63
64
|
"classnames": "^2.2.6",
|
|
64
|
-
"lodash": "^4.17.
|
|
65
|
-
"
|
|
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": "
|
|
73
|
+
"gitHead": "04b8519c3a3ddace5a21497e22faa11865d57f6d",
|
|
74
|
+
"types": "es/index.d.ts"
|
|
74
75
|
}
|