@dhis2-ui/radio 9.3.0 → 9.4.0-alpha.2
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/radio.js
CHANGED
|
@@ -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([["
|
|
97
|
+
className: _style.default.dynamic([["2849316266", [_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([["
|
|
113
|
+
className: _style.default.dynamic([["2849316266", [_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([["
|
|
115
|
+
className: _style.default.dynamic([["2849316266", [_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: "
|
|
123
|
+
id: "2849316266",
|
|
124
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;
|
|
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;inset-inline-start: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-inline-end:".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-inline-end: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
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.WarningDense = exports.Warning = exports.ValidDense = exports.Valid = exports.NoLabel = exports.ImageLabelDense = exports.ImageLabel = exports.FocusedUncheckedDense = exports.FocusedUnchecked = exports.FocusedCheckedDense = exports.FocusedChecked = exports.ErrorDense = exports.Error = exports.DisabledDense = exports.Disabled = exports.DefaultDense = exports.Default = exports.CheckedDense = exports.Checked = void 0;
|
|
6
|
+
exports.default = exports.WarningDense = exports.Warning = exports.ValidDense = exports.Valid = exports.RTL = exports.NoLabel = exports.ImageLabelDense = exports.ImageLabel = exports.FocusedUncheckedDense = exports.FocusedUnchecked = exports.FocusedCheckedDense = exports.FocusedChecked = exports.ErrorDense = exports.Error = exports.DisabledDense = exports.Disabled = exports.DefaultDense = exports.Default = exports.CheckedDense = exports.Checked = void 0;
|
|
7
7
|
|
|
8
8
|
var _uiConstants = require("@dhis2/ui-constants");
|
|
9
9
|
|
|
@@ -215,4 +215,10 @@ exports.NoLabel = NoLabel;
|
|
|
215
215
|
NoLabel.args = {
|
|
216
216
|
label: null,
|
|
217
217
|
className: 'some-name'
|
|
218
|
-
};
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
const RTL = args => /*#__PURE__*/_react.default.createElement("div", {
|
|
221
|
+
dir: "rtl"
|
|
222
|
+
}, /*#__PURE__*/_react.default.createElement(Template, args));
|
|
223
|
+
|
|
224
|
+
exports.RTL = RTL;
|
package/build/es/radio.js
CHANGED
|
@@ -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([["
|
|
80
|
+
className: _JSXStyle.dynamic([["2849316266", [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([["
|
|
96
|
+
className: _JSXStyle.dynamic([["2849316266", [colors.grey900, theme.disabled, label ? spacers.dp4 : 0, theme.focus]]])
|
|
97
97
|
}), /*#__PURE__*/React.createElement("div", {
|
|
98
|
-
className: _JSXStyle.dynamic([["
|
|
98
|
+
className: _JSXStyle.dynamic([["2849316266", [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: "
|
|
106
|
+
id: "2849316266",
|
|
107
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;
|
|
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;inset-inline-start: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-inline-end:".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-inline-end: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
|
}
|
|
@@ -181,4 +181,7 @@ export const NoLabel = Template.bind({});
|
|
|
181
181
|
NoLabel.args = {
|
|
182
182
|
label: null,
|
|
183
183
|
className: 'some-name'
|
|
184
|
-
};
|
|
184
|
+
};
|
|
185
|
+
export const RTL = args => /*#__PURE__*/React.createElement("div", {
|
|
186
|
+
dir: "rtl"
|
|
187
|
+
}, /*#__PURE__*/React.createElement(Template, args));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/radio",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.0-alpha.2",
|
|
4
4
|
"description": "UI Radio",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@dhis2/prop-types": "^3.1.2",
|
|
36
|
-
"@dhis2/ui-constants": "9.
|
|
36
|
+
"@dhis2/ui-constants": "9.4.0-alpha.2",
|
|
37
37
|
"classnames": "^2.3.1",
|
|
38
38
|
"prop-types": "^15.7.2"
|
|
39
39
|
},
|