@dhis2-ui/center 8.2.0 → 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.
@@ -19,20 +19,23 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
- const Center = /*#__PURE__*/(0, _react.forwardRef)(({
23
- className,
24
- dataTest,
25
- children,
26
- position
27
- }, ref) => /*#__PURE__*/_react.default.createElement("div", {
28
- "data-test": dataTest,
29
- ref: ref,
30
- className: "jsx-498096601" + " " + ((0, _classnames.default)('center', className, position) || "")
31
- }, /*#__PURE__*/_react.default.createElement("div", {
32
- className: "jsx-498096601" + " " + "center-inner-content"
33
- }, children), /*#__PURE__*/_react.default.createElement(_style.default, {
34
- id: "498096601"
35
- }, [".center.jsx-498096601{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:space-around;-webkit-justify-content:space-around;-ms-flex-pack:space-around;justify-content:space-around;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;pointer-events:none;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".center.top.jsx-498096601{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}", ".center.bottom.jsx-498096601{-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;align-items:flex-end;}", ".center-inner-content.jsx-498096601{pointer-events:all;}"])));
22
+ const Center = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
23
+ let {
24
+ className,
25
+ dataTest,
26
+ children,
27
+ position
28
+ } = _ref;
29
+ return /*#__PURE__*/_react.default.createElement("div", {
30
+ "data-test": dataTest,
31
+ ref: ref,
32
+ className: "jsx-498096601" + " " + ((0, _classnames.default)('center', className, position) || "")
33
+ }, /*#__PURE__*/_react.default.createElement("div", {
34
+ className: "jsx-498096601" + " " + "center-inner-content"
35
+ }, children), /*#__PURE__*/_react.default.createElement(_style.default, {
36
+ id: "498096601"
37
+ }, [".center.jsx-498096601{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:space-around;-webkit-justify-content:space-around;-ms-flex-pack:space-around;justify-content:space-around;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;pointer-events:none;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".center.top.jsx-498096601{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}", ".center.bottom.jsx-498096601{-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;align-items:flex-end;}", ".center-inner-content.jsx-498096601{pointer-events:all;}"]));
38
+ });
36
39
  exports.Center = Center;
37
40
  Center.displayName = 'Center';
38
41
  Center.defaultProps = {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Bottom = exports.Top = exports.Default = exports.default = void 0;
6
+ exports.default = exports.Top = exports.Default = exports.Bottom = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -11,14 +11,7 @@ var _center = require("./center.js");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
14
- const description = `
15
- Centers children horizontally, and by default, vertically.
16
- Use the \`top\` or \`bottom\` props to change vertical alignment.
17
-
18
- \`\`\`js
19
- import { CenteredContent } from '@dhis2/ui'
20
- \`\`\`
21
- `;
14
+ const description = "\nCenters children horizontally, and by default, vertically.\nUse the `top` or `bottom` props to change vertical alignment.\n\n```js\nimport { CenteredContent } from '@dhis2/ui'\n```\n";
22
15
 
23
16
  const Wrapper = story => /*#__PURE__*/_react.default.createElement("div", {
24
17
  style: {
@@ -27,7 +20,7 @@ const Wrapper = story => /*#__PURE__*/_react.default.createElement("div", {
27
20
  }, story());
28
21
 
29
22
  var _default = {
30
- title: 'Layout/Center',
23
+ title: 'Center',
31
24
  component: _center.Center,
32
25
  decorators: [Wrapper],
33
26
  parameters: {
@@ -2,20 +2,23 @@ import _JSXStyle from "styled-jsx/style";
2
2
  import cx from 'classnames';
3
3
  import PropTypes from 'prop-types';
4
4
  import React, { forwardRef } from 'react';
5
- export const Center = /*#__PURE__*/forwardRef(({
6
- className,
7
- dataTest,
8
- children,
9
- position
10
- }, ref) => /*#__PURE__*/React.createElement("div", {
11
- "data-test": dataTest,
12
- ref: ref,
13
- className: "jsx-498096601" + " " + (cx('center', className, position) || "")
14
- }, /*#__PURE__*/React.createElement("div", {
15
- className: "jsx-498096601" + " " + "center-inner-content"
16
- }, children), /*#__PURE__*/React.createElement(_JSXStyle, {
17
- id: "498096601"
18
- }, [".center.jsx-498096601{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:space-around;-webkit-justify-content:space-around;-ms-flex-pack:space-around;justify-content:space-around;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;pointer-events:none;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".center.top.jsx-498096601{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}", ".center.bottom.jsx-498096601{-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;align-items:flex-end;}", ".center-inner-content.jsx-498096601{pointer-events:all;}"])));
5
+ export const Center = /*#__PURE__*/forwardRef((_ref, ref) => {
6
+ let {
7
+ className,
8
+ dataTest,
9
+ children,
10
+ position
11
+ } = _ref;
12
+ return /*#__PURE__*/React.createElement("div", {
13
+ "data-test": dataTest,
14
+ ref: ref,
15
+ className: "jsx-498096601" + " " + (cx('center', className, position) || "")
16
+ }, /*#__PURE__*/React.createElement("div", {
17
+ className: "jsx-498096601" + " " + "center-inner-content"
18
+ }, children), /*#__PURE__*/React.createElement(_JSXStyle, {
19
+ id: "498096601"
20
+ }, [".center.jsx-498096601{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:space-around;-webkit-justify-content:space-around;-ms-flex-pack:space-around;justify-content:space-around;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;pointer-events:none;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".center.top.jsx-498096601{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}", ".center.bottom.jsx-498096601{-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;align-items:flex-end;}", ".center-inner-content.jsx-498096601{pointer-events:all;}"]));
21
+ });
19
22
  Center.displayName = 'Center';
20
23
  Center.defaultProps = {
21
24
  dataTest: 'dhis2-uicore-centeredcontent',
@@ -1,13 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Center } from './center.js';
3
- const description = `
4
- Centers children horizontally, and by default, vertically.
5
- Use the \`top\` or \`bottom\` props to change vertical alignment.
6
-
7
- \`\`\`js
8
- import { CenteredContent } from '@dhis2/ui'
9
- \`\`\`
10
- `;
3
+ const description = "\nCenters children horizontally, and by default, vertically.\nUse the `top` or `bottom` props to change vertical alignment.\n\n```js\nimport { CenteredContent } from '@dhis2/ui'\n```\n";
11
4
 
12
5
  const Wrapper = story => /*#__PURE__*/React.createElement("div", {
13
6
  style: {
@@ -16,7 +9,7 @@ const Wrapper = story => /*#__PURE__*/React.createElement("div", {
16
9
  }, story());
17
10
 
18
11
  export default {
19
- title: 'Layout/Center',
12
+ title: 'Center',
20
13
  component: Center,
21
14
  decorators: [Wrapper],
22
15
  parameters: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/center",
3
- "version": "8.2.0",
3
+ "version": "8.2.1",
4
4
  "description": "UI Center",
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.2.0",
35
+ "@dhis2/ui-constants": "8.2.1",
36
36
  "classnames": "^2.3.1",
37
37
  "prop-types": "^15.7.2"
38
38
  },