@dhis2-ui/css 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.
@@ -16,6 +16,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
16
16
  const CssReset = () => /*#__PURE__*/_react.default.createElement(_style.default, {
17
17
  id: "3745978156",
18
18
  dynamic: [_uiConstants.theme.fonts, _uiConstants.theme.fonts]
19
- }, ["html{line-height:1.15;-webkit-text-size-adjust:100%;box-sizing:border-box;}", `*,*:before,*:after{font-family:${_uiConstants.theme.fonts};box-sizing:inherit;}`, `body{margin:0;font-family:${_uiConstants.theme.fonts};}`, "main{display:block;}", "h1{font-size:2em;margin:0.67em 0;}", "hr{box-sizing:content-box;height:0;overflow:visible;}", "pre{font-family:monospace,monospace;font-size:1em;}", "a{background-color:transparent;}", "abbr[title]{border-bottom:none;-webkit-text-decoration:underline;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}", "b,strong{font-weight:bolder;}", "code,kbd,samp{font-family:monospace,monospace;font-size:1em;}", "small{font-size:80%;}", "sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}", "sub{bottom:-0.25em;}", "sup{top:-0.5em;}", "img{border-style:none;}", "button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}", "button,input{overflow:visible;}", "button,select{text-transform:none;}", "button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;}", "button::-moz-focus-inner,[type='button']::-moz-focus-inner,[type='reset']::-moz-focus-inner,[type='submit']::-moz-focus-inner{border-style:none;padding:0;}", "button:-moz-focusring,[type='button']:-moz-focusring,[type='reset']:-moz-focusring,[type='submit']:-moz-focusring{outline:1px dotted ButtonText;}", "fieldset{padding:0.35em 0.75em 0.625em;}", "legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}", "progress{vertical-align:baseline;}", "textarea{overflow:auto;}", "[type='checkbox'],[type='radio']{box-sizing:border-box;padding:0;}", "[type='number']::-webkit-inner-spin-button,[type='number']::-webkit-outer-spin-button{height:auto;}", "[type='search']{-webkit-appearance:textfield;outline-offset:-2px;}", "[type='search']::-webkit-search-decoration{-webkit-appearance:none;}", "::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}", "details{display:block;}", "summary{display:list-item;}", "template{display:none;}", "[hidden]{display:none;}"]);
19
+ }, ["html{line-height:1.15;-webkit-text-size-adjust:100%;box-sizing:border-box;}", "*,*:before,*:after{font-family:".concat(_uiConstants.theme.fonts, ";box-sizing:inherit;}"), "body{margin:0;font-family:".concat(_uiConstants.theme.fonts, ";}"), "main{display:block;}", "h1{font-size:2em;margin:0.67em 0;}", "hr{box-sizing:content-box;height:0;overflow:visible;}", "pre{font-family:monospace,monospace;font-size:1em;}", "a{background-color:transparent;}", "abbr[title]{border-bottom:none;-webkit-text-decoration:underline;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}", "b,strong{font-weight:bolder;}", "code,kbd,samp{font-family:monospace,monospace;font-size:1em;}", "small{font-size:80%;}", "sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}", "sub{bottom:-0.25em;}", "sup{top:-0.5em;}", "img{border-style:none;}", "button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}", "button,input{overflow:visible;}", "button,select{text-transform:none;}", "button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;}", "button::-moz-focus-inner,[type='button']::-moz-focus-inner,[type='reset']::-moz-focus-inner,[type='submit']::-moz-focus-inner{border-style:none;padding:0;}", "button:-moz-focusring,[type='button']:-moz-focusring,[type='reset']:-moz-focusring,[type='submit']:-moz-focusring{outline:1px dotted ButtonText;}", "fieldset{padding:0.35em 0.75em 0.625em;}", "legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}", "progress{vertical-align:baseline;}", "textarea{overflow:auto;}", "[type='checkbox'],[type='radio']{box-sizing:border-box;padding:0;}", "[type='number']::-webkit-inner-spin-button,[type='number']::-webkit-outer-spin-button{height:auto;}", "[type='search']{-webkit-appearance:textfield;outline-offset:-2px;}", "[type='search']::-webkit-search-decoration{-webkit-appearance:none;}", "::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}", "details{display:block;}", "summary{display:list-item;}", "template{display:none;}", "[hidden]{display:none;}"]);
20
20
 
21
21
  exports.CssReset = CssReset;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Default = exports.default = void 0;
6
+ exports.default = exports.Default = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -11,23 +11,17 @@ var _index = require("./index.js");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
14
- const description = `
15
- A tool for adding a global normalization stylesheet into the DOM that applies DHIS2 styles.
14
+ const description = "\nA tool for adding a global normalization stylesheet into the DOM that applies DHIS2 styles.\n\n- https://github.com/necolas/normalize.css\n- https://www.paulirish.com/2012/box-sizing-border-box-ftw/\n\n```js\nimport { CssReset } from '@dhis2/ui'\n```\n";
16
15
 
17
- - https://github.com/necolas/normalize.css
18
- - https://www.paulirish.com/2012/box-sizing-border-box-ftw/
19
-
20
- \`\`\`js
21
- import { CssReset } from '@dhis2/ui'
22
- \`\`\`
23
- `;
24
-
25
- const App = ({
26
- children
27
- }) => /*#__PURE__*/_react.default.createElement("div", null, children);
16
+ const App = _ref => {
17
+ let {
18
+ children
19
+ } = _ref;
20
+ return /*#__PURE__*/_react.default.createElement("div", null, children);
21
+ };
28
22
 
29
23
  var _default = {
30
- title: 'Helpers/CSS Reset',
24
+ title: 'CSS Reset',
31
25
  component: _index.CssReset,
32
26
  parameters: {
33
27
  docs: {
@@ -19,20 +19,25 @@ 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 toPrefixedThemeSection = themeSectionKey => Object.entries(theme[themeSectionKey]).reduce((prefixed, [key, value]) => {
23
- prefixed[`${themeSectionKey}-${key}`] = value;
22
+ const toPrefixedThemeSection = themeSectionKey => Object.entries(theme[themeSectionKey]).reduce((prefixed, _ref) => {
23
+ let [key, value] = _ref;
24
+ prefixed["".concat(themeSectionKey, "-").concat(key)] = value;
24
25
  return prefixed;
25
26
  }, {});
26
27
 
27
- const toCustomPropertyString = themeSection => Object.entries(themeSection).map(([key, value]) => `--${key}: ${value};`).join('\n');
28
+ const toCustomPropertyString = themeSection => Object.entries(themeSection).map(_ref2 => {
29
+ let [key, value] = _ref2;
30
+ return "--".concat(key, ": ").concat(value, ";");
31
+ }).join('\n');
28
32
 
29
- const CssVariables = ({
30
- colors,
31
- theme,
32
- layers,
33
- spacers,
34
- elevations
35
- }) => {
33
+ const CssVariables = _ref3 => {
34
+ let {
35
+ colors,
36
+ theme,
37
+ layers,
38
+ spacers,
39
+ elevations
40
+ } = _ref3;
36
41
  const allowedProps = {
37
42
  colors,
38
43
  theme,
@@ -48,7 +53,7 @@ const CssVariables = ({
48
53
  return /*#__PURE__*/_react.default.createElement(_style.default, {
49
54
  id: "3443925957",
50
55
  dynamic: [variables]
51
- }, [`html{${variables};}`]);
56
+ }, ["html{".concat(variables, ";}")]);
52
57
  };
53
58
 
54
59
  exports.CssVariables = CssVariables;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.NoVariables = exports.AllVariables = exports.default = void 0;
6
+ exports.default = exports.NoVariables = exports.AllVariables = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -11,20 +11,17 @@ var _index = require("./index.js");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
14
- const description = `
15
- A utility for adding DHIS2 theme variables to global CSS variables.
14
+ const description = "\nA utility for adding DHIS2 theme variables to global CSS variables.\n\n```js\nimport { CssVariables } from '@dhis2/ui'\n```\n";
16
15
 
17
- \`\`\`js
18
- import { CssVariables } from '@dhis2/ui'
19
- \`\`\`
20
- `;
21
-
22
- const App = ({
23
- children
24
- }) => /*#__PURE__*/_react.default.createElement("div", null, children);
16
+ const App = _ref => {
17
+ let {
18
+ children
19
+ } = _ref;
20
+ return /*#__PURE__*/_react.default.createElement("div", null, children);
21
+ };
25
22
 
26
23
  var _default = {
27
- title: 'Helpers/CSS Variables',
24
+ title: 'CSS Variables',
28
25
  component: _index.CssVariables,
29
26
  parameters: {
30
27
  docs: {
@@ -5,6 +5,6 @@ import React from 'react';
5
5
  const CssReset = () => /*#__PURE__*/React.createElement(_JSXStyle, {
6
6
  id: "3745978156",
7
7
  dynamic: [theme.fonts, theme.fonts]
8
- }, ["html{line-height:1.15;-webkit-text-size-adjust:100%;box-sizing:border-box;}", `*,*:before,*:after{font-family:${theme.fonts};box-sizing:inherit;}`, `body{margin:0;font-family:${theme.fonts};}`, "main{display:block;}", "h1{font-size:2em;margin:0.67em 0;}", "hr{box-sizing:content-box;height:0;overflow:visible;}", "pre{font-family:monospace,monospace;font-size:1em;}", "a{background-color:transparent;}", "abbr[title]{border-bottom:none;-webkit-text-decoration:underline;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}", "b,strong{font-weight:bolder;}", "code,kbd,samp{font-family:monospace,monospace;font-size:1em;}", "small{font-size:80%;}", "sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}", "sub{bottom:-0.25em;}", "sup{top:-0.5em;}", "img{border-style:none;}", "button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}", "button,input{overflow:visible;}", "button,select{text-transform:none;}", "button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;}", "button::-moz-focus-inner,[type='button']::-moz-focus-inner,[type='reset']::-moz-focus-inner,[type='submit']::-moz-focus-inner{border-style:none;padding:0;}", "button:-moz-focusring,[type='button']:-moz-focusring,[type='reset']:-moz-focusring,[type='submit']:-moz-focusring{outline:1px dotted ButtonText;}", "fieldset{padding:0.35em 0.75em 0.625em;}", "legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}", "progress{vertical-align:baseline;}", "textarea{overflow:auto;}", "[type='checkbox'],[type='radio']{box-sizing:border-box;padding:0;}", "[type='number']::-webkit-inner-spin-button,[type='number']::-webkit-outer-spin-button{height:auto;}", "[type='search']{-webkit-appearance:textfield;outline-offset:-2px;}", "[type='search']::-webkit-search-decoration{-webkit-appearance:none;}", "::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}", "details{display:block;}", "summary{display:list-item;}", "template{display:none;}", "[hidden]{display:none;}"]);
8
+ }, ["html{line-height:1.15;-webkit-text-size-adjust:100%;box-sizing:border-box;}", "*,*:before,*:after{font-family:".concat(theme.fonts, ";box-sizing:inherit;}"), "body{margin:0;font-family:".concat(theme.fonts, ";}"), "main{display:block;}", "h1{font-size:2em;margin:0.67em 0;}", "hr{box-sizing:content-box;height:0;overflow:visible;}", "pre{font-family:monospace,monospace;font-size:1em;}", "a{background-color:transparent;}", "abbr[title]{border-bottom:none;-webkit-text-decoration:underline;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}", "b,strong{font-weight:bolder;}", "code,kbd,samp{font-family:monospace,monospace;font-size:1em;}", "small{font-size:80%;}", "sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}", "sub{bottom:-0.25em;}", "sup{top:-0.5em;}", "img{border-style:none;}", "button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}", "button,input{overflow:visible;}", "button,select{text-transform:none;}", "button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button;}", "button::-moz-focus-inner,[type='button']::-moz-focus-inner,[type='reset']::-moz-focus-inner,[type='submit']::-moz-focus-inner{border-style:none;padding:0;}", "button:-moz-focusring,[type='button']:-moz-focusring,[type='reset']:-moz-focusring,[type='submit']:-moz-focusring{outline:1px dotted ButtonText;}", "fieldset{padding:0.35em 0.75em 0.625em;}", "legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}", "progress{vertical-align:baseline;}", "textarea{overflow:auto;}", "[type='checkbox'],[type='radio']{box-sizing:border-box;padding:0;}", "[type='number']::-webkit-inner-spin-button,[type='number']::-webkit-outer-spin-button{height:auto;}", "[type='search']{-webkit-appearance:textfield;outline-offset:-2px;}", "[type='search']::-webkit-search-decoration{-webkit-appearance:none;}", "::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}", "details{display:block;}", "summary{display:list-item;}", "template{display:none;}", "[hidden]{display:none;}"]);
9
9
 
10
10
  export { CssReset };
@@ -1,22 +1,16 @@
1
1
  import React from 'react';
2
2
  import { CssReset } from './index.js';
3
- const description = `
4
- A tool for adding a global normalization stylesheet into the DOM that applies DHIS2 styles.
3
+ const description = "\nA tool for adding a global normalization stylesheet into the DOM that applies DHIS2 styles.\n\n- https://github.com/necolas/normalize.css\n- https://www.paulirish.com/2012/box-sizing-border-box-ftw/\n\n```js\nimport { CssReset } from '@dhis2/ui'\n```\n";
5
4
 
6
- - https://github.com/necolas/normalize.css
7
- - https://www.paulirish.com/2012/box-sizing-border-box-ftw/
8
-
9
- \`\`\`js
10
- import { CssReset } from '@dhis2/ui'
11
- \`\`\`
12
- `;
13
-
14
- const App = ({
15
- children
16
- }) => /*#__PURE__*/React.createElement("div", null, children);
5
+ const App = _ref => {
6
+ let {
7
+ children
8
+ } = _ref;
9
+ return /*#__PURE__*/React.createElement("div", null, children);
10
+ };
17
11
 
18
12
  export default {
19
- title: 'Helpers/CSS Reset',
13
+ title: 'CSS Reset',
20
14
  component: CssReset,
21
15
  parameters: {
22
16
  docs: {
@@ -3,20 +3,25 @@ import * as theme from '@dhis2/ui-constants';
3
3
  import PropTypes from 'prop-types';
4
4
  import React from 'react';
5
5
 
6
- const toPrefixedThemeSection = themeSectionKey => Object.entries(theme[themeSectionKey]).reduce((prefixed, [key, value]) => {
7
- prefixed[`${themeSectionKey}-${key}`] = value;
6
+ const toPrefixedThemeSection = themeSectionKey => Object.entries(theme[themeSectionKey]).reduce((prefixed, _ref) => {
7
+ let [key, value] = _ref;
8
+ prefixed["".concat(themeSectionKey, "-").concat(key)] = value;
8
9
  return prefixed;
9
10
  }, {});
10
11
 
11
- const toCustomPropertyString = themeSection => Object.entries(themeSection).map(([key, value]) => `--${key}: ${value};`).join('\n');
12
+ const toCustomPropertyString = themeSection => Object.entries(themeSection).map(_ref2 => {
13
+ let [key, value] = _ref2;
14
+ return "--".concat(key, ": ").concat(value, ";");
15
+ }).join('\n');
12
16
 
13
- const CssVariables = ({
14
- colors,
15
- theme,
16
- layers,
17
- spacers,
18
- elevations
19
- }) => {
17
+ const CssVariables = _ref3 => {
18
+ let {
19
+ colors,
20
+ theme,
21
+ layers,
22
+ spacers,
23
+ elevations
24
+ } = _ref3;
20
25
  const allowedProps = {
21
26
  colors,
22
27
  theme,
@@ -32,7 +37,7 @@ const CssVariables = ({
32
37
  return /*#__PURE__*/React.createElement(_JSXStyle, {
33
38
  id: "3443925957",
34
39
  dynamic: [variables]
35
- }, [`html{${variables};}`]);
40
+ }, ["html{".concat(variables, ";}")]);
36
41
  };
37
42
 
38
43
  CssVariables.defaultProps = {
@@ -1,19 +1,16 @@
1
1
  import React from 'react';
2
2
  import { CssVariables } from './index.js';
3
- const description = `
4
- A utility for adding DHIS2 theme variables to global CSS variables.
3
+ const description = "\nA utility for adding DHIS2 theme variables to global CSS variables.\n\n```js\nimport { CssVariables } from '@dhis2/ui'\n```\n";
5
4
 
6
- \`\`\`js
7
- import { CssVariables } from '@dhis2/ui'
8
- \`\`\`
9
- `;
10
-
11
- const App = ({
12
- children
13
- }) => /*#__PURE__*/React.createElement("div", null, children);
5
+ const App = _ref => {
6
+ let {
7
+ children
8
+ } = _ref;
9
+ return /*#__PURE__*/React.createElement("div", null, children);
10
+ };
14
11
 
15
12
  export default {
16
- title: 'Helpers/CSS Variables',
13
+ title: 'CSS Variables',
17
14
  component: CssVariables,
18
15
  parameters: {
19
16
  docs: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/css",
3
- "version": "8.1.10",
3
+ "version": "8.2.1",
4
4
  "description": "UI CSS",
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
  },