@dhis2-ui/checkbox 9.2.0 → 9.3.0-alpha.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/checkbox/checkbox.js +5 -5
- package/build/cjs/checkbox/checkbox.stories.js +8 -2
- package/build/cjs/checkbox-field/checkbox-field.stories.js +8 -2
- package/build/es/checkbox/checkbox.js +5 -5
- package/build/es/checkbox/checkbox.stories.js +4 -1
- package/build/es/checkbox-field/checkbox-field.stories.js +4 -1
- package/package.json +4 -4
|
@@ -110,7 +110,7 @@ class Checkbox extends _react.Component {
|
|
|
110
110
|
});
|
|
111
111
|
return /*#__PURE__*/_react.default.createElement("label", {
|
|
112
112
|
"data-test": dataTest,
|
|
113
|
-
className: _style.default.dynamic([["
|
|
113
|
+
className: _style.default.dynamic([["1252368010", [_uiConstants.colors.grey900, _uiConstants.theme.disabled, _uiConstants.spacers.dp4, _uiConstants.theme.focus]]]) + " " + ((0, _classnames.default)(className, {
|
|
114
114
|
disabled,
|
|
115
115
|
dense
|
|
116
116
|
}) || "")
|
|
@@ -126,9 +126,9 @@ class Checkbox extends _react.Component {
|
|
|
126
126
|
onFocus: this.handleFocus,
|
|
127
127
|
onKeyDown: this.handleKeyDown,
|
|
128
128
|
onBlur: this.handleBlur,
|
|
129
|
-
className: _style.default.dynamic([["
|
|
129
|
+
className: _style.default.dynamic([["1252368010", [_uiConstants.colors.grey900, _uiConstants.theme.disabled, _uiConstants.spacers.dp4, _uiConstants.theme.focus]]])
|
|
130
130
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
131
|
-
className: _style.default.dynamic([["
|
|
131
|
+
className: _style.default.dynamic([["1252368010", [_uiConstants.colors.grey900, _uiConstants.theme.disabled, _uiConstants.spacers.dp4, _uiConstants.theme.focus]]]) + " " + ((0, _classnames.default)('icon', {
|
|
132
132
|
dense
|
|
133
133
|
}) || "")
|
|
134
134
|
}, dense ? /*#__PURE__*/_react.default.createElement(_checkboxIcon.CheckboxDense, {
|
|
@@ -136,9 +136,9 @@ class Checkbox extends _react.Component {
|
|
|
136
136
|
}) : /*#__PURE__*/_react.default.createElement(_checkboxIcon.CheckboxRegular, {
|
|
137
137
|
className: classes
|
|
138
138
|
})), label, /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
139
|
-
id: "
|
|
139
|
+
id: "1252368010",
|
|
140
140
|
dynamic: [_uiConstants.colors.grey900, _uiConstants.theme.disabled, _uiConstants.spacers.dp4, _uiConstants.theme.focus]
|
|
141
|
-
}, ["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;cursor:pointer;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;
|
|
141
|
+
}, ["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;cursor:pointer;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(_uiConstants.spacers.dp4, ";border:2px solid transparent;padding:1px;border-radius:5px;}"), "label.dense.__jsx-style-dynamic-selector .icon.__jsx-style-dynamic-selector{margin-inline-end:3px;border-radius:4px;}", "input.__jsx-style-dynamic-selector:focus+.icon.__jsx-style-dynamic-selector{outline:3px solid ".concat(_uiConstants.theme.focus, ";outline-offset:-3px;}")]));
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
}
|
|
@@ -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.IndeterminateDense = exports.Indeterminate = 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.IndeterminateDense = exports.Indeterminate = 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
|
|
|
@@ -262,4 +262,10 @@ exports.ImageLabelDense = ImageLabelDense;
|
|
|
262
262
|
ImageLabelDense.args = { ...ImageLabel.args,
|
|
263
263
|
dense: true
|
|
264
264
|
};
|
|
265
|
-
ImageLabelDense.storyName = 'Image label - Dense';
|
|
265
|
+
ImageLabelDense.storyName = 'Image label - Dense';
|
|
266
|
+
|
|
267
|
+
const RTL = args => /*#__PURE__*/_react.default.createElement("div", {
|
|
268
|
+
dir: "rtl"
|
|
269
|
+
}, /*#__PURE__*/_react.default.createElement(_index.Checkbox, args));
|
|
270
|
+
|
|
271
|
+
exports.RTL = RTL;
|
|
@@ -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.RequiredDense = exports.Required = exports.ImageLabelDense = exports.ImageLabel = exports.HelpText = 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.RequiredDense = exports.Required = exports.RTL = exports.ImageLabelDense = exports.ImageLabel = exports.HelpText = 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
|
|
|
@@ -206,4 +206,10 @@ exports.ImageLabelDense = ImageLabelDense;
|
|
|
206
206
|
ImageLabelDense.args = { ...DefaultDense.args,
|
|
207
207
|
...ImageLabel.args
|
|
208
208
|
};
|
|
209
|
-
ImageLabelDense.storyName = 'Image label - Dense';
|
|
209
|
+
ImageLabelDense.storyName = 'Image label - Dense';
|
|
210
|
+
|
|
211
|
+
const RTL = args => /*#__PURE__*/_react.default.createElement("div", {
|
|
212
|
+
dir: "rtl"
|
|
213
|
+
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_index.CheckboxField, args)));
|
|
214
|
+
|
|
215
|
+
exports.RTL = RTL;
|
|
@@ -92,7 +92,7 @@ class Checkbox extends Component {
|
|
|
92
92
|
});
|
|
93
93
|
return /*#__PURE__*/React.createElement("label", {
|
|
94
94
|
"data-test": dataTest,
|
|
95
|
-
className: _JSXStyle.dynamic([["
|
|
95
|
+
className: _JSXStyle.dynamic([["1252368010", [colors.grey900, theme.disabled, spacers.dp4, theme.focus]]]) + " " + (cx(className, {
|
|
96
96
|
disabled,
|
|
97
97
|
dense
|
|
98
98
|
}) || "")
|
|
@@ -108,9 +108,9 @@ class Checkbox extends Component {
|
|
|
108
108
|
onFocus: this.handleFocus,
|
|
109
109
|
onKeyDown: this.handleKeyDown,
|
|
110
110
|
onBlur: this.handleBlur,
|
|
111
|
-
className: _JSXStyle.dynamic([["
|
|
111
|
+
className: _JSXStyle.dynamic([["1252368010", [colors.grey900, theme.disabled, spacers.dp4, theme.focus]]])
|
|
112
112
|
}), /*#__PURE__*/React.createElement("div", {
|
|
113
|
-
className: _JSXStyle.dynamic([["
|
|
113
|
+
className: _JSXStyle.dynamic([["1252368010", [colors.grey900, theme.disabled, spacers.dp4, theme.focus]]]) + " " + (cx('icon', {
|
|
114
114
|
dense
|
|
115
115
|
}) || "")
|
|
116
116
|
}, dense ? /*#__PURE__*/React.createElement(CheckboxDense, {
|
|
@@ -118,9 +118,9 @@ class Checkbox extends Component {
|
|
|
118
118
|
}) : /*#__PURE__*/React.createElement(CheckboxRegular, {
|
|
119
119
|
className: classes
|
|
120
120
|
})), label, /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
121
|
-
id: "
|
|
121
|
+
id: "1252368010",
|
|
122
122
|
dynamic: [colors.grey900, theme.disabled, spacers.dp4, theme.focus]
|
|
123
|
-
}, ["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;cursor:pointer;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;
|
|
123
|
+
}, ["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;cursor:pointer;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(spacers.dp4, ";border:2px solid transparent;padding:1px;border-radius:5px;}"), "label.dense.__jsx-style-dynamic-selector .icon.__jsx-style-dynamic-selector{margin-inline-end:3px;border-radius:4px;}", "input.__jsx-style-dynamic-selector:focus+.icon.__jsx-style-dynamic-selector{outline:3px solid ".concat(theme.focus, ";outline-offset:-3px;}")]));
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
}
|
|
@@ -225,4 +225,7 @@ export const ImageLabelDense = Template.bind({});
|
|
|
225
225
|
ImageLabelDense.args = { ...ImageLabel.args,
|
|
226
226
|
dense: true
|
|
227
227
|
};
|
|
228
|
-
ImageLabelDense.storyName = 'Image label - Dense';
|
|
228
|
+
ImageLabelDense.storyName = 'Image label - Dense';
|
|
229
|
+
export const RTL = args => /*#__PURE__*/React.createElement("div", {
|
|
230
|
+
dir: "rtl"
|
|
231
|
+
}, /*#__PURE__*/React.createElement(Checkbox, args));
|
|
@@ -170,4 +170,7 @@ export const ImageLabelDense = Template.bind({});
|
|
|
170
170
|
ImageLabelDense.args = { ...DefaultDense.args,
|
|
171
171
|
...ImageLabel.args
|
|
172
172
|
};
|
|
173
|
-
ImageLabelDense.storyName = 'Image label - Dense';
|
|
173
|
+
ImageLabelDense.storyName = 'Image label - Dense';
|
|
174
|
+
export const RTL = args => /*#__PURE__*/React.createElement("div", {
|
|
175
|
+
dir: "rtl"
|
|
176
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CheckboxField, args)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/checkbox",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0-alpha.1",
|
|
4
4
|
"description": "UI Checkbox",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@dhis2/prop-types": "^3.1.2",
|
|
36
|
-
"@dhis2-ui/field": "9.
|
|
37
|
-
"@dhis2-ui/required": "9.
|
|
38
|
-
"@dhis2/ui-constants": "9.
|
|
36
|
+
"@dhis2-ui/field": "9.3.0-alpha.1",
|
|
37
|
+
"@dhis2-ui/required": "9.3.0-alpha.1",
|
|
38
|
+
"@dhis2/ui-constants": "9.3.0-alpha.1",
|
|
39
39
|
"classnames": "^2.3.1",
|
|
40
40
|
"prop-types": "^15.7.2"
|
|
41
41
|
},
|