@dhis2-ui/radio 8.6.4 → 8.7.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,8 +16,8 @@ var _react = _interopRequireDefault(require("react"));
16
16
 
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
18
 
19
- const styles = ["svg.jsx-1631270792{display:block;pointer-events:none;}", "svg.jsx-1631270792{fill:".concat(_uiConstants.theme.default, ";}"), "circle.background.jsx-1631270792{fill:".concat(_uiConstants.colors.white, ";}"), "svg.checked.jsx-1631270792{fill:".concat(_uiConstants.colors.teal400, ";}"), "svg.disabled.jsx-1631270792{fill:".concat(_uiConstants.colors.grey400, ";}"), "svg.error.jsx-1631270792{fill:".concat(_uiConstants.theme.error, ";}"), "svg.valid.jsx-1631270792{fill:".concat(_uiConstants.theme.valid, ";}"), "svg.warning.jsx-1631270792{fill:".concat(_uiConstants.theme.warning, ";}"), "svg.jsx-1631270792:not(.checked) .inner.jsx-1631270792,svg.jsx-1631270792:not(.checked) .outer.checked.jsx-1631270792{fill:none;}"];
20
- styles.__hash = "1631270792";
19
+ const styles = ["svg.jsx-1120332023{display:block;pointer-events:none;}", "svg.jsx-1120332023{fill:".concat(_uiConstants.colors.grey800, ";}"), "circle.background.jsx-1120332023{fill:".concat(_uiConstants.colors.white, ";}"), "svg.checked.jsx-1120332023{fill:".concat(_uiConstants.colors.teal700, ";}"), "svg.disabled.jsx-1120332023{fill:".concat(_uiConstants.colors.grey400, ";}"), "svg.error.jsx-1120332023{fill:".concat(_uiConstants.theme.error, ";}"), "svg.valid.jsx-1120332023{fill:".concat(_uiConstants.theme.valid, ";}"), "svg.warning.jsx-1120332023{fill:".concat(_uiConstants.theme.warning, ";}"), "svg.jsx-1120332023:not(.checked) .inner.jsx-1120332023,svg.jsx-1120332023:not(.checked) .outer.checked.jsx-1120332023{fill:none;}"];
20
+ styles.__hash = "1120332023";
21
21
 
22
22
  function RadioRegular(_ref) {
23
23
  let {
@@ -32,9 +32,12 @@ function RadioRegular(_ref) {
32
32
  cy: "9",
33
33
  r: "9",
34
34
  className: "jsx-1260643562 " + "jsx-".concat(styles.__hash) + " " + "background"
35
+ }), /*#__PURE__*/_react.default.createElement("path", {
36
+ d: "M9,0 C13.9705627,0 18,4.02943725 18,9 C18,13.9705627 13.9705627,18 9,18 C4.02943725,18 0,13.9705627 0,9 C0,4.02943725 4.02943725,0 9,0 Z M9,1 C4.581722,1 1,4.581722 1,9 C1,13.418278 4.581722,17 9,17 C13.418278,17 17,13.418278 17,9 C17,4.581722 13.418278,1 9,1 Z",
37
+ className: "jsx-1260643562 " + "jsx-".concat(styles.__hash) + " " + "outer unchecked"
35
38
  }), /*#__PURE__*/_react.default.createElement("path", {
36
39
  d: "M9,18 C13.9705627,18 18,13.9705627 18,9 C18,4.02943725 13.9705627,0 9,0 C4.02943725,0 0,4.02943725 0,9 C0,13.9705627 4.02943725,18 9,18 Z M9,16 C5.13400675,16 2,12.8659932 2,9 C2,5.13400675 5.13400675,2 9,2 C12.8659932,2 16,5.13400675 16,9 C16,12.8659932 12.8659932,16 9,16 Z",
37
- className: "jsx-1260643562 " + "jsx-".concat(styles.__hash) + " " + "outer"
40
+ className: "jsx-1260643562 " + "jsx-".concat(styles.__hash) + " " + "outer checked"
38
41
  }), /*#__PURE__*/_react.default.createElement("circle", {
39
42
  cx: "9",
40
43
  cy: "9",
@@ -94,7 +94,7 @@ class Radio extends _react.Component {
94
94
  });
95
95
  return /*#__PURE__*/_react.default.createElement("label", {
96
96
  "data-test": dataTest,
97
- className: _style.default.dynamic([["2846929804", [_uiConstants.colors.grey900, _uiConstants.theme.disabled, label ? '5px' : 0, _uiConstants.theme.focus]]]) + " " + ((0, _classnames.default)(className, {
97
+ className: _style.default.dynamic([["4282914657", [_uiConstants.colors.grey900, _uiConstants.theme.disabled, label ? _uiConstants.spacers.dp4 : 0, _uiConstants.theme.focus]]]) + " " + ((0, _classnames.default)(className, {
98
98
  disabled,
99
99
  dense
100
100
  }) || "")
@@ -110,9 +110,9 @@ class Radio extends _react.Component {
110
110
  onFocus: this.handleFocus,
111
111
  onKeyDown: this.handleKeyDown,
112
112
  onBlur: this.handleBlur,
113
- className: _style.default.dynamic([["2846929804", [_uiConstants.colors.grey900, _uiConstants.theme.disabled, label ? '5px' : 0, _uiConstants.theme.focus]]])
113
+ className: _style.default.dynamic([["4282914657", [_uiConstants.colors.grey900, _uiConstants.theme.disabled, label ? _uiConstants.spacers.dp4 : 0, _uiConstants.theme.focus]]])
114
114
  }), /*#__PURE__*/_react.default.createElement("div", {
115
- className: _style.default.dynamic([["2846929804", [_uiConstants.colors.grey900, _uiConstants.theme.disabled, label ? '5px' : 0, _uiConstants.theme.focus]]]) + " " + ((0, _classnames.default)('icon', {
115
+ className: _style.default.dynamic([["4282914657", [_uiConstants.colors.grey900, _uiConstants.theme.disabled, label ? _uiConstants.spacers.dp4 : 0, _uiConstants.theme.focus]]]) + " " + ((0, _classnames.default)('icon', {
116
116
  dense
117
117
  }) || "")
118
118
  }, dense ? /*#__PURE__*/_react.default.createElement(_radioIcons.RadioDense, {
@@ -120,9 +120,9 @@ class Radio extends _react.Component {
120
120
  }) : /*#__PURE__*/_react.default.createElement(_radioIcons.RadioRegular, {
121
121
  className: classes
122
122
  })), label, /*#__PURE__*/_react.default.createElement(_style.default, {
123
- id: "2846929804",
124
- dynamic: [_uiConstants.colors.grey900, _uiConstants.theme.disabled, label ? '5px' : 0, _uiConstants.theme.focus]
125
- }, ["label.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;color:".concat(_uiConstants.colors.grey900, ";font-size:16px;line-height:20px;}"), "label.dense.__jsx-style-dynamic-selector{font-size:14px;line-height:16px;}", "label.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;color:".concat(_uiConstants.theme.disabled, ";}"), "input.__jsx-style-dynamic-selector{opacity:0;position:absolute;height:18px;width:18px;left:3px;}", "label.dense.__jsx-style-dynamic-selector input.__jsx-style-dynamic-selector{height:14px;width:14px;}", ".icon.__jsx-style-dynamic-selector{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-right:".concat(label ? '5px' : 0, ";border:2px solid transparent;padding:1px;border-radius:50%;}"), "label.dense.__jsx-style-dynamic-selector .icon.__jsx-style-dynamic-selector{margin-right:3px;}", "input.__jsx-style-dynamic-selector:focus+.icon.__jsx-style-dynamic-selector{outline:3px solid ".concat(_uiConstants.theme.focus, ";outline-offset:-3px;}")]));
123
+ id: "4282914657",
124
+ dynamic: [_uiConstants.colors.grey900, _uiConstants.theme.disabled, label ? _uiConstants.spacers.dp4 : 0, _uiConstants.theme.focus]
125
+ }, ["label.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;color:".concat(_uiConstants.colors.grey900, ";font-size:14px;line-height:19px;}"), "label.dense.__jsx-style-dynamic-selector{font-size:14px;line-height:16px;}", "label.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;color:".concat(_uiConstants.theme.disabled, ";}"), "input.__jsx-style-dynamic-selector{opacity:0;position:absolute;height:18px;width:18px;left:3px;}", "label.dense.__jsx-style-dynamic-selector input.__jsx-style-dynamic-selector{height:14px;width:14px;}", ".icon.__jsx-style-dynamic-selector{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-right:".concat(label ? _uiConstants.spacers.dp4 : 0, ";border:2px solid transparent;padding:1px;border-radius:50%;}"), "label.dense.__jsx-style-dynamic-selector .icon.__jsx-style-dynamic-selector{margin-right:3px;}", "input.__jsx-style-dynamic-selector:focus+.icon.__jsx-style-dynamic-selector{outline:3px solid ".concat(_uiConstants.theme.focus, ";outline-offset:-3px;}")]));
126
126
  }
127
127
 
128
128
  }
@@ -2,8 +2,8 @@ import _JSXStyle from "styled-jsx/style";
2
2
  import { colors, theme } from '@dhis2/ui-constants';
3
3
  import PropTypes from 'prop-types';
4
4
  import React from 'react';
5
- const styles = ["svg.jsx-1631270792{display:block;pointer-events:none;}", "svg.jsx-1631270792{fill:".concat(theme.default, ";}"), "circle.background.jsx-1631270792{fill:".concat(colors.white, ";}"), "svg.checked.jsx-1631270792{fill:".concat(colors.teal400, ";}"), "svg.disabled.jsx-1631270792{fill:".concat(colors.grey400, ";}"), "svg.error.jsx-1631270792{fill:".concat(theme.error, ";}"), "svg.valid.jsx-1631270792{fill:".concat(theme.valid, ";}"), "svg.warning.jsx-1631270792{fill:".concat(theme.warning, ";}"), "svg.jsx-1631270792:not(.checked) .inner.jsx-1631270792,svg.jsx-1631270792:not(.checked) .outer.checked.jsx-1631270792{fill:none;}"];
6
- styles.__hash = "1631270792";
5
+ const styles = ["svg.jsx-1120332023{display:block;pointer-events:none;}", "svg.jsx-1120332023{fill:".concat(colors.grey800, ";}"), "circle.background.jsx-1120332023{fill:".concat(colors.white, ";}"), "svg.checked.jsx-1120332023{fill:".concat(colors.teal700, ";}"), "svg.disabled.jsx-1120332023{fill:".concat(colors.grey400, ";}"), "svg.error.jsx-1120332023{fill:".concat(theme.error, ";}"), "svg.valid.jsx-1120332023{fill:".concat(theme.valid, ";}"), "svg.warning.jsx-1120332023{fill:".concat(theme.warning, ";}"), "svg.jsx-1120332023:not(.checked) .inner.jsx-1120332023,svg.jsx-1120332023:not(.checked) .outer.checked.jsx-1120332023{fill:none;}"];
6
+ styles.__hash = "1120332023";
7
7
  export function RadioRegular(_ref) {
8
8
  let {
9
9
  className
@@ -17,9 +17,12 @@ export function RadioRegular(_ref) {
17
17
  cy: "9",
18
18
  r: "9",
19
19
  className: "jsx-1260643562 " + "jsx-".concat(styles.__hash) + " " + "background"
20
+ }), /*#__PURE__*/React.createElement("path", {
21
+ d: "M9,0 C13.9705627,0 18,4.02943725 18,9 C18,13.9705627 13.9705627,18 9,18 C4.02943725,18 0,13.9705627 0,9 C0,4.02943725 4.02943725,0 9,0 Z M9,1 C4.581722,1 1,4.581722 1,9 C1,13.418278 4.581722,17 9,17 C13.418278,17 17,13.418278 17,9 C17,4.581722 13.418278,1 9,1 Z",
22
+ className: "jsx-1260643562 " + "jsx-".concat(styles.__hash) + " " + "outer unchecked"
20
23
  }), /*#__PURE__*/React.createElement("path", {
21
24
  d: "M9,18 C13.9705627,18 18,13.9705627 18,9 C18,4.02943725 13.9705627,0 9,0 C4.02943725,0 0,4.02943725 0,9 C0,13.9705627 4.02943725,18 9,18 Z M9,16 C5.13400675,16 2,12.8659932 2,9 C2,5.13400675 5.13400675,2 9,2 C12.8659932,2 16,5.13400675 16,9 C16,12.8659932 12.8659932,16 9,16 Z",
22
- className: "jsx-1260643562 " + "jsx-".concat(styles.__hash) + " " + "outer"
25
+ className: "jsx-1260643562 " + "jsx-".concat(styles.__hash) + " " + "outer checked"
23
26
  }), /*#__PURE__*/React.createElement("circle", {
24
27
  cx: "9",
25
28
  cy: "9",
package/build/es/radio.js CHANGED
@@ -2,7 +2,7 @@ import _JSXStyle from "styled-jsx/style";
2
2
 
3
3
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
4
 
5
- import { colors, theme, sharedPropTypes } from '@dhis2/ui-constants';
5
+ import { colors, spacers, theme, sharedPropTypes } from '@dhis2/ui-constants';
6
6
  import cx from 'classnames';
7
7
  import PropTypes from 'prop-types';
8
8
  import React, { Component, createRef } from 'react';
@@ -77,7 +77,7 @@ class Radio extends Component {
77
77
  });
78
78
  return /*#__PURE__*/React.createElement("label", {
79
79
  "data-test": dataTest,
80
- className: _JSXStyle.dynamic([["2846929804", [colors.grey900, theme.disabled, label ? '5px' : 0, theme.focus]]]) + " " + (cx(className, {
80
+ className: _JSXStyle.dynamic([["4282914657", [colors.grey900, theme.disabled, label ? spacers.dp4 : 0, theme.focus]]]) + " " + (cx(className, {
81
81
  disabled,
82
82
  dense
83
83
  }) || "")
@@ -93,9 +93,9 @@ class Radio extends Component {
93
93
  onFocus: this.handleFocus,
94
94
  onKeyDown: this.handleKeyDown,
95
95
  onBlur: this.handleBlur,
96
- className: _JSXStyle.dynamic([["2846929804", [colors.grey900, theme.disabled, label ? '5px' : 0, theme.focus]]])
96
+ className: _JSXStyle.dynamic([["4282914657", [colors.grey900, theme.disabled, label ? spacers.dp4 : 0, theme.focus]]])
97
97
  }), /*#__PURE__*/React.createElement("div", {
98
- className: _JSXStyle.dynamic([["2846929804", [colors.grey900, theme.disabled, label ? '5px' : 0, theme.focus]]]) + " " + (cx('icon', {
98
+ className: _JSXStyle.dynamic([["4282914657", [colors.grey900, theme.disabled, label ? spacers.dp4 : 0, theme.focus]]]) + " " + (cx('icon', {
99
99
  dense
100
100
  }) || "")
101
101
  }, dense ? /*#__PURE__*/React.createElement(RadioDense, {
@@ -103,9 +103,9 @@ class Radio extends Component {
103
103
  }) : /*#__PURE__*/React.createElement(RadioRegular, {
104
104
  className: classes
105
105
  })), label, /*#__PURE__*/React.createElement(_JSXStyle, {
106
- id: "2846929804",
107
- dynamic: [colors.grey900, theme.disabled, label ? '5px' : 0, theme.focus]
108
- }, ["label.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;color:".concat(colors.grey900, ";font-size:16px;line-height:20px;}"), "label.dense.__jsx-style-dynamic-selector{font-size:14px;line-height:16px;}", "label.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;color:".concat(theme.disabled, ";}"), "input.__jsx-style-dynamic-selector{opacity:0;position:absolute;height:18px;width:18px;left:3px;}", "label.dense.__jsx-style-dynamic-selector input.__jsx-style-dynamic-selector{height:14px;width:14px;}", ".icon.__jsx-style-dynamic-selector{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-right:".concat(label ? '5px' : 0, ";border:2px solid transparent;padding:1px;border-radius:50%;}"), "label.dense.__jsx-style-dynamic-selector .icon.__jsx-style-dynamic-selector{margin-right:3px;}", "input.__jsx-style-dynamic-selector:focus+.icon.__jsx-style-dynamic-selector{outline:3px solid ".concat(theme.focus, ";outline-offset:-3px;}")]));
106
+ id: "4282914657",
107
+ dynamic: [colors.grey900, theme.disabled, label ? spacers.dp4 : 0, theme.focus]
108
+ }, ["label.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;color:".concat(colors.grey900, ";font-size:14px;line-height:19px;}"), "label.dense.__jsx-style-dynamic-selector{font-size:14px;line-height:16px;}", "label.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;color:".concat(theme.disabled, ";}"), "input.__jsx-style-dynamic-selector{opacity:0;position:absolute;height:18px;width:18px;left:3px;}", "label.dense.__jsx-style-dynamic-selector input.__jsx-style-dynamic-selector{height:14px;width:14px;}", ".icon.__jsx-style-dynamic-selector{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-right:".concat(label ? spacers.dp4 : 0, ";border:2px solid transparent;padding:1px;border-radius:50%;}"), "label.dense.__jsx-style-dynamic-selector .icon.__jsx-style-dynamic-selector{margin-right:3px;}", "input.__jsx-style-dynamic-selector:focus+.icon.__jsx-style-dynamic-selector{outline:3px solid ".concat(theme.focus, ";outline-offset:-3px;}")]));
109
109
  }
110
110
 
111
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/radio",
3
- "version": "8.6.4",
3
+ "version": "8.7.1",
4
4
  "description": "UI Radio",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@dhis2/prop-types": "^3.1.2",
35
- "@dhis2/ui-constants": "8.6.4",
35
+ "@dhis2/ui-constants": "8.7.1",
36
36
  "classnames": "^2.3.1",
37
37
  "prop-types": "^15.7.2"
38
38
  },