@micromag/element-layout 0.3.832 → 0.4.6

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-layout-container.micromag-element-layout-fullscreen{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-element-layout-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.micromag-element-layout-container .micromag-element-layout-horizontal{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}
1
+ .micromag-element-layout-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.micromag-element-layout-container .micromag-element-layout-horizontal{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.micromag-element-layout-container.micromag-element-layout-fullscreen{height:100%;left:0;position:absolute;top:0;width:100%}
package/es/index.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React from 'react';
3
+ export { Spacer } from '@micromag/element-stack';
4
+
5
+ interface LayoutProps {
6
+ width?: number | null;
7
+ height?: number | null;
8
+ horizontalAlign?: 'left' | 'center' | 'right';
9
+ verticalAlign?: 'top' | 'middle' | 'bottom';
10
+ distribution?: 'between' | 'around' | null;
11
+ fullscreen?: boolean;
12
+ className?: string | null;
13
+ children?: React.ReactNode | null;
14
+ style?: Record<string, unknown> | null;
15
+ }
16
+ declare function Layout({ width, height, horizontalAlign, verticalAlign, distribution, fullscreen, className, children, style, }: LayoutProps): react_jsx_runtime.JSX.Element;
17
+
18
+ export { Layout as default };
package/es/index.js CHANGED
@@ -1,45 +1,31 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
3
- import React from 'react';
4
- import PropTypes from 'prop-types';
5
3
  import classNames from 'classnames';
4
+ import React from 'react';
6
5
  import { StackProvider } from '@micromag/element-stack';
7
6
  export { Spacer } from '@micromag/element-stack';
8
7
 
9
8
  var styles = {"container":"micromag-element-layout-container","fullscreen":"micromag-element-layout-fullscreen"};
10
9
 
11
- var propTypes = {
12
- width: PropTypes.number,
13
- height: PropTypes.number,
14
- horizontalAlign: PropTypes.oneOf(['left', 'center', 'right']),
15
- verticalAlign: PropTypes.oneOf(['top', 'middle', 'bottom']),
16
- distribution: PropTypes.oneOf(['between', 'around', null]),
17
- fullscreen: PropTypes.bool,
18
- className: PropTypes.string,
19
- children: PropTypes.node,
20
- style: PropTypes.object // eslint-disable-line
21
- };
22
- var defaultProps = {
23
- width: null,
24
- height: null,
25
- horizontalAlign: 'left',
26
- verticalAlign: 'top',
27
- distribution: null,
28
- fullscreen: false,
29
- className: null,
30
- children: null,
31
- style: null
32
- };
33
- var Layout = function Layout(_ref) {
34
- var width = _ref.width,
35
- height = _ref.height,
36
- horizontalAlign = _ref.horizontalAlign,
37
- verticalAlign = _ref.verticalAlign,
38
- distribution = _ref.distribution,
39
- fullscreen = _ref.fullscreen,
40
- className = _ref.className,
41
- children = _ref.children,
42
- style = _ref.style;
10
+ function Layout(_ref) {
11
+ var _ref$width = _ref.width,
12
+ width = _ref$width === void 0 ? null : _ref$width,
13
+ _ref$height = _ref.height,
14
+ height = _ref$height === void 0 ? null : _ref$height,
15
+ _ref$horizontalAlign = _ref.horizontalAlign,
16
+ horizontalAlign = _ref$horizontalAlign === void 0 ? 'left' : _ref$horizontalAlign,
17
+ _ref$verticalAlign = _ref.verticalAlign,
18
+ verticalAlign = _ref$verticalAlign === void 0 ? 'top' : _ref$verticalAlign,
19
+ _ref$distribution = _ref.distribution,
20
+ distribution = _ref$distribution === void 0 ? null : _ref$distribution,
21
+ _ref$fullscreen = _ref.fullscreen,
22
+ fullscreen = _ref$fullscreen === void 0 ? false : _ref$fullscreen,
23
+ _ref$className = _ref.className,
24
+ className = _ref$className === void 0 ? null : _ref$className,
25
+ _ref$children = _ref.children,
26
+ children = _ref$children === void 0 ? null : _ref$children,
27
+ _ref$style = _ref.style,
28
+ style = _ref$style === void 0 ? null : _ref$style;
43
29
  var justifyContent = null;
44
30
  if (distribution !== null) {
45
31
  justifyContent = "space-".concat(distribution);
@@ -66,8 +52,6 @@ var Layout = function Layout(_ref) {
66
52
  className: classNames([styles.container, _defineProperty(_defineProperty({}, styles.fullscreen, fullscreen), className, className !== null)]),
67
53
  style: finalStyle
68
54
  }, children));
69
- };
70
- Layout.propTypes = propTypes;
71
- Layout.defaultProps = defaultProps;
55
+ }
72
56
 
73
57
  export { Layout as default };
package/es/styles.css ADDED
@@ -0,0 +1 @@
1
+ .micromag-element-layout-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.micromag-element-layout-container .micromag-element-layout-horizontal{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.micromag-element-layout-container.micromag-element-layout-fullscreen{height:100%;left:0;position:absolute;top:0;width:100%}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-layout",
3
- "version": "0.3.832",
3
+ "version": "0.4.6",
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,29 +48,29 @@
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
- "@babel/runtime": "^7.13.10",
62
- "@micromag/core": "^0.3.832",
63
- "@micromag/element-stack": "^0.3.832",
62
+ "@babel/runtime": "^7.28.6",
63
+ "@micromag/core": "^0.4.6",
64
+ "@micromag/element-stack": "^0.4.6",
64
65
  "classnames": "^2.2.6",
65
- "lodash": "^4.17.21",
66
- "prop-types": "^15.7.2",
67
- "react-intl": "^6.6.4",
66
+ "lodash": "^4.17.23",
67
+ "react-intl": "^8.1.3",
68
68
  "uuid": "^9.0.0"
69
69
  },
70
70
  "publishConfig": {
71
71
  "access": "public",
72
72
  "registry": "https://registry.npmjs.org/"
73
73
  },
74
- "gitHead": "4969d64e304334cfd47321e624e5914e0694c55f"
74
+ "gitHead": "cf8440c2851b864167a1f545aa56551d55473263",
75
+ "types": "es/index.d.ts"
75
76
  }