@dhis2-ui/box 8.1.10 → 8.2.1

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/build/cjs/box.js CHANGED
@@ -13,25 +13,28 @@ var _react = _interopRequireDefault(require("react"));
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- const Box = ({
17
- overflow,
18
- height,
19
- minHeight,
20
- maxHeight,
21
- width,
22
- minWidth,
23
- maxWidth,
24
- marginTop,
25
- children,
26
- dataTest,
27
- className
28
- }) => /*#__PURE__*/_react.default.createElement("div", {
29
- "data-test": dataTest,
30
- className: _style.default.dynamic([["3369228338", [marginTop ? `margin-top: ${marginTop};` : '', height ? `height: ${height};` : '', minHeight ? `min-height: ${minHeight};` : '', maxHeight ? `max-height: ${maxHeight};` : '', width ? `width: ${width};` : '', minWidth ? `min-width: ${minWidth};` : '', maxWidth ? `max-width: ${maxWidth};` : '', overflow ? `overflow: ${overflow};` : '']]]) + " " + (className || "")
31
- }, children, /*#__PURE__*/_react.default.createElement(_style.default, {
32
- id: "3369228338",
33
- dynamic: [marginTop ? `margin-top: ${marginTop};` : '', height ? `height: ${height};` : '', minHeight ? `min-height: ${minHeight};` : '', maxHeight ? `max-height: ${maxHeight};` : '', width ? `width: ${width};` : '', minWidth ? `min-width: ${minWidth};` : '', maxWidth ? `max-width: ${maxWidth};` : '', overflow ? `overflow: ${overflow};` : '']
34
- }, [`div.__jsx-style-dynamic-selector{${marginTop ? `margin-top: ${marginTop};` : ''} ${height ? `height: ${height};` : ''} ${minHeight ? `min-height: ${minHeight};` : ''} ${maxHeight ? `max-height: ${maxHeight};` : ''} ${width ? `width: ${width};` : ''} ${minWidth ? `min-width: ${minWidth};` : ''} ${maxWidth ? `max-width: ${maxWidth};` : ''} ${overflow ? `overflow: ${overflow};` : ''};}`]));
16
+ const Box = _ref => {
17
+ let {
18
+ overflow,
19
+ height,
20
+ minHeight,
21
+ maxHeight,
22
+ width,
23
+ minWidth,
24
+ maxWidth,
25
+ marginTop,
26
+ children,
27
+ dataTest,
28
+ className
29
+ } = _ref;
30
+ return /*#__PURE__*/_react.default.createElement("div", {
31
+ "data-test": dataTest,
32
+ className: _style.default.dynamic([["3369228338", [marginTop ? "margin-top: ".concat(marginTop, ";") : '', height ? "height: ".concat(height, ";") : '', minHeight ? "min-height: ".concat(minHeight, ";") : '', maxHeight ? "max-height: ".concat(maxHeight, ";") : '', width ? "width: ".concat(width, ";") : '', minWidth ? "min-width: ".concat(minWidth, ";") : '', maxWidth ? "max-width: ".concat(maxWidth, ";") : '', overflow ? "overflow: ".concat(overflow, ";") : '']]]) + " " + (className || "")
33
+ }, children, /*#__PURE__*/_react.default.createElement(_style.default, {
34
+ id: "3369228338",
35
+ dynamic: [marginTop ? "margin-top: ".concat(marginTop, ";") : '', height ? "height: ".concat(height, ";") : '', minHeight ? "min-height: ".concat(minHeight, ";") : '', maxHeight ? "max-height: ".concat(maxHeight, ";") : '', width ? "width: ".concat(width, ";") : '', minWidth ? "min-width: ".concat(minWidth, ";") : '', maxWidth ? "max-width: ".concat(maxWidth, ";") : '', overflow ? "overflow: ".concat(overflow, ";") : '']
36
+ }, ["div.__jsx-style-dynamic-selector{".concat(marginTop ? "margin-top: ".concat(marginTop, ";") : '', " ").concat(height ? "height: ".concat(height, ";") : '', " ").concat(minHeight ? "min-height: ".concat(minHeight, ";") : '', " ").concat(maxHeight ? "max-height: ".concat(maxHeight, ";") : '', " ").concat(width ? "width: ".concat(width, ";") : '', " ").concat(minWidth ? "min-width: ".concat(minWidth, ";") : '', " ").concat(maxWidth ? "max-width: ".concat(maxWidth, ";") : '', " ").concat(overflow ? "overflow: ".concat(overflow, ";") : '', ";}")]));
37
+ };
35
38
 
36
39
  exports.Box = Box;
37
40
  Box.defaultProps = {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Overflow = exports.MaxWidth = exports.MinWidth = exports.Width = exports.MinHeight = exports.MaxHeight = exports.Height = exports.Default = exports.default = void 0;
6
+ exports.default = exports.Width = exports.Overflow = exports.MinWidth = exports.MinHeight = exports.MaxWidth = exports.MaxHeight = exports.Height = exports.Default = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -11,15 +11,9 @@ var _box = require("./box.js");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
14
- const description = `
15
- A box for creating some layout on the page.
16
-
17
- \`\`\`js
18
- import { Box } from '@dhis2/ui'
19
- \`\`\`
20
- `;
14
+ const description = "\nA box for creating some layout on the page.\n\n```js\nimport { Box } from '@dhis2/ui'\n```\n";
21
15
  var _default = {
22
- title: 'Layout/Box',
16
+ title: 'Box',
23
17
  component: _box.Box,
24
18
  parameters: {
25
19
  docs: {
package/build/es/box.js CHANGED
@@ -1,25 +1,28 @@
1
1
  import _JSXStyle from "styled-jsx/style";
2
2
  import PropTypes from 'prop-types';
3
3
  import React from 'react';
4
- export const Box = ({
5
- overflow,
6
- height,
7
- minHeight,
8
- maxHeight,
9
- width,
10
- minWidth,
11
- maxWidth,
12
- marginTop,
13
- children,
14
- dataTest,
15
- className
16
- }) => /*#__PURE__*/React.createElement("div", {
17
- "data-test": dataTest,
18
- className: _JSXStyle.dynamic([["3369228338", [marginTop ? `margin-top: ${marginTop};` : '', height ? `height: ${height};` : '', minHeight ? `min-height: ${minHeight};` : '', maxHeight ? `max-height: ${maxHeight};` : '', width ? `width: ${width};` : '', minWidth ? `min-width: ${minWidth};` : '', maxWidth ? `max-width: ${maxWidth};` : '', overflow ? `overflow: ${overflow};` : '']]]) + " " + (className || "")
19
- }, children, /*#__PURE__*/React.createElement(_JSXStyle, {
20
- id: "3369228338",
21
- dynamic: [marginTop ? `margin-top: ${marginTop};` : '', height ? `height: ${height};` : '', minHeight ? `min-height: ${minHeight};` : '', maxHeight ? `max-height: ${maxHeight};` : '', width ? `width: ${width};` : '', minWidth ? `min-width: ${minWidth};` : '', maxWidth ? `max-width: ${maxWidth};` : '', overflow ? `overflow: ${overflow};` : '']
22
- }, [`div.__jsx-style-dynamic-selector{${marginTop ? `margin-top: ${marginTop};` : ''} ${height ? `height: ${height};` : ''} ${minHeight ? `min-height: ${minHeight};` : ''} ${maxHeight ? `max-height: ${maxHeight};` : ''} ${width ? `width: ${width};` : ''} ${minWidth ? `min-width: ${minWidth};` : ''} ${maxWidth ? `max-width: ${maxWidth};` : ''} ${overflow ? `overflow: ${overflow};` : ''};}`]));
4
+ export const Box = _ref => {
5
+ let {
6
+ overflow,
7
+ height,
8
+ minHeight,
9
+ maxHeight,
10
+ width,
11
+ minWidth,
12
+ maxWidth,
13
+ marginTop,
14
+ children,
15
+ dataTest,
16
+ className
17
+ } = _ref;
18
+ return /*#__PURE__*/React.createElement("div", {
19
+ "data-test": dataTest,
20
+ className: _JSXStyle.dynamic([["3369228338", [marginTop ? "margin-top: ".concat(marginTop, ";") : '', height ? "height: ".concat(height, ";") : '', minHeight ? "min-height: ".concat(minHeight, ";") : '', maxHeight ? "max-height: ".concat(maxHeight, ";") : '', width ? "width: ".concat(width, ";") : '', minWidth ? "min-width: ".concat(minWidth, ";") : '', maxWidth ? "max-width: ".concat(maxWidth, ";") : '', overflow ? "overflow: ".concat(overflow, ";") : '']]]) + " " + (className || "")
21
+ }, children, /*#__PURE__*/React.createElement(_JSXStyle, {
22
+ id: "3369228338",
23
+ dynamic: [marginTop ? "margin-top: ".concat(marginTop, ";") : '', height ? "height: ".concat(height, ";") : '', minHeight ? "min-height: ".concat(minHeight, ";") : '', maxHeight ? "max-height: ".concat(maxHeight, ";") : '', width ? "width: ".concat(width, ";") : '', minWidth ? "min-width: ".concat(minWidth, ";") : '', maxWidth ? "max-width: ".concat(maxWidth, ";") : '', overflow ? "overflow: ".concat(overflow, ";") : '']
24
+ }, ["div.__jsx-style-dynamic-selector{".concat(marginTop ? "margin-top: ".concat(marginTop, ";") : '', " ").concat(height ? "height: ".concat(height, ";") : '', " ").concat(minHeight ? "min-height: ".concat(minHeight, ";") : '', " ").concat(maxHeight ? "max-height: ".concat(maxHeight, ";") : '', " ").concat(width ? "width: ".concat(width, ";") : '', " ").concat(minWidth ? "min-width: ".concat(minWidth, ";") : '', " ").concat(maxWidth ? "max-width: ".concat(maxWidth, ";") : '', " ").concat(overflow ? "overflow: ".concat(overflow, ";") : '', ";}")]));
25
+ };
23
26
  Box.defaultProps = {
24
27
  dataTest: 'dhis2-uicore-box'
25
28
  };
@@ -1,14 +1,8 @@
1
1
  import React from 'react';
2
2
  import { Box } from './box.js';
3
- const description = `
4
- A box for creating some layout on the page.
5
-
6
- \`\`\`js
7
- import { Box } from '@dhis2/ui'
8
- \`\`\`
9
- `;
3
+ const description = "\nA box for creating some layout on the page.\n\n```js\nimport { Box } from '@dhis2/ui'\n```\n";
10
4
  export default {
11
- title: 'Layout/Box',
5
+ title: 'Box',
12
6
  component: Box,
13
7
  parameters: {
14
8
  docs: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/box",
3
- "version": "8.1.10",
3
+ "version": "8.2.1",
4
4
  "description": "UI Box",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@dhis2/prop-types": "^3.0.0-beta.1",
35
- "@dhis2/ui-constants": "8.1.10",
35
+ "@dhis2/ui-constants": "8.2.1",
36
36
  "classnames": "^2.3.1",
37
37
  "prop-types": "^15.7.2"
38
38
  },