@dhis2-ui/switch 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.
|
@@ -15,8 +15,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
const styles = ["svg.jsx-
|
|
19
|
-
styles.__hash = "
|
|
18
|
+
const styles = ["svg.jsx-1697384868{display:block;pointer-events:none;height:18px;width:35px;}", "svg.jsx-1697384868:dir(rtl){-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1);}", "svg.dense.jsx-1697384868{height:14px;width:27px;}", "svg.jsx-1697384868 .background.jsx-1697384868,svg.jsx-1697384868 .border.jsx-1697384868{fill:".concat(_uiConstants.colors.grey600, ";}"), "svg.jsx-1697384868 .checkmark.jsx-1697384868,svg.jsx-1697384868 .cross.jsx-1697384868,svg.jsx-1697384868 .handle.jsx-1697384868{fill:".concat(_uiConstants.colors.white, ";}"), "svg.jsx-1697384868 .checkmark.jsx-1697384868:dir(rtl){display:none;}", "svg.checked.jsx-1697384868 .handle-unchecked.jsx-1697384868,svg.jsx-1697384868:not(.checked) .handle-checked.jsx-1697384868{fill:none;}", "svg.checked.jsx-1697384868 .background.jsx-1697384868{fill:".concat(_uiConstants.colors.teal400, ";}"), "svg.valid.jsx-1697384868 .background.jsx-1697384868{fill:".concat(_uiConstants.colors.blue600, ";}"), "svg.warning.jsx-1697384868 .background.jsx-1697384868{fill:".concat(_uiConstants.colors.yellow700, ";}"), "svg.error.jsx-1697384868 .background.jsx-1697384868{fill:".concat(_uiConstants.colors.red500, ";}"), "svg.checked.jsx-1697384868 .border.jsx-1697384868{fill:".concat(_uiConstants.colors.teal700, ";}"), "svg.disabled.jsx-1697384868 .background.jsx-1697384868{fill:".concat(_uiConstants.colors.grey300, ";}"), "svg.disabled.jsx-1697384868 .border.jsx-1697384868{fill:".concat(_uiConstants.colors.grey400, ";}"), "svg.valid.jsx-1697384868 .border.jsx-1697384868{fill:".concat(_uiConstants.colors.blue600, ";}"), "svg.valid.checked.jsx-1697384868 .border.jsx-1697384868,svg.valid.indeterminate.jsx-1697384868 .border.jsx-1697384868{fill:".concat(_uiConstants.colors.blue700, ";}"), "svg.warning.jsx-1697384868 .border.jsx-1697384868{fill:".concat(_uiConstants.colors.yellow700, ";}"), "svg.warning.checked.jsx-1697384868 .border.jsx-1697384868{fill:".concat(_uiConstants.colors.yellow800, ";}"), "svg.error.jsx-1697384868 .border.jsx-1697384868{fill:".concat(_uiConstants.colors.red500, ";}"), "svg.error.checked.jsx-1697384868 .border.jsx-1697384868{fill:".concat(_uiConstants.colors.red700, ";}")];
|
|
19
|
+
styles.__hash = "1697384868";
|
|
20
20
|
|
|
21
21
|
function SwitchRegular(_ref) {
|
|
22
22
|
let {
|
|
@@ -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.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.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
|
|
|
@@ -209,4 +209,17 @@ exports.ImageLabelDense = ImageLabelDense;
|
|
|
209
209
|
ImageLabelDense.args = { ...ImageLabel.args,
|
|
210
210
|
...DefaultDense.args
|
|
211
211
|
};
|
|
212
|
-
ImageLabelDense.storyName = 'Image label - Dense';
|
|
212
|
+
ImageLabelDense.storyName = 'Image label - Dense';
|
|
213
|
+
|
|
214
|
+
const RTL = args => /*#__PURE__*/_react.default.createElement("div", {
|
|
215
|
+
dir: "rtl"
|
|
216
|
+
}, /*#__PURE__*/_react.default.createElement(Template, args), /*#__PURE__*/_react.default.createElement(Template, {
|
|
217
|
+
checked: true,
|
|
218
|
+
value: "checked"
|
|
219
|
+
}), /*#__PURE__*/_react.default.createElement(Template, {
|
|
220
|
+
error: true,
|
|
221
|
+
checked: true,
|
|
222
|
+
value: "error"
|
|
223
|
+
}));
|
|
224
|
+
|
|
225
|
+
exports.RTL = RTL;
|
|
@@ -2,8 +2,8 @@ import _JSXStyle from "styled-jsx/style";
|
|
|
2
2
|
import { colors } from '@dhis2/ui-constants';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
const styles = ["svg.jsx-
|
|
6
|
-
styles.__hash = "
|
|
5
|
+
const styles = ["svg.jsx-1697384868{display:block;pointer-events:none;height:18px;width:35px;}", "svg.jsx-1697384868:dir(rtl){-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1);}", "svg.dense.jsx-1697384868{height:14px;width:27px;}", "svg.jsx-1697384868 .background.jsx-1697384868,svg.jsx-1697384868 .border.jsx-1697384868{fill:".concat(colors.grey600, ";}"), "svg.jsx-1697384868 .checkmark.jsx-1697384868,svg.jsx-1697384868 .cross.jsx-1697384868,svg.jsx-1697384868 .handle.jsx-1697384868{fill:".concat(colors.white, ";}"), "svg.jsx-1697384868 .checkmark.jsx-1697384868:dir(rtl){display:none;}", "svg.checked.jsx-1697384868 .handle-unchecked.jsx-1697384868,svg.jsx-1697384868:not(.checked) .handle-checked.jsx-1697384868{fill:none;}", "svg.checked.jsx-1697384868 .background.jsx-1697384868{fill:".concat(colors.teal400, ";}"), "svg.valid.jsx-1697384868 .background.jsx-1697384868{fill:".concat(colors.blue600, ";}"), "svg.warning.jsx-1697384868 .background.jsx-1697384868{fill:".concat(colors.yellow700, ";}"), "svg.error.jsx-1697384868 .background.jsx-1697384868{fill:".concat(colors.red500, ";}"), "svg.checked.jsx-1697384868 .border.jsx-1697384868{fill:".concat(colors.teal700, ";}"), "svg.disabled.jsx-1697384868 .background.jsx-1697384868{fill:".concat(colors.grey300, ";}"), "svg.disabled.jsx-1697384868 .border.jsx-1697384868{fill:".concat(colors.grey400, ";}"), "svg.valid.jsx-1697384868 .border.jsx-1697384868{fill:".concat(colors.blue600, ";}"), "svg.valid.checked.jsx-1697384868 .border.jsx-1697384868,svg.valid.indeterminate.jsx-1697384868 .border.jsx-1697384868{fill:".concat(colors.blue700, ";}"), "svg.warning.jsx-1697384868 .border.jsx-1697384868{fill:".concat(colors.yellow700, ";}"), "svg.warning.checked.jsx-1697384868 .border.jsx-1697384868{fill:".concat(colors.yellow800, ";}"), "svg.error.jsx-1697384868 .border.jsx-1697384868{fill:".concat(colors.red500, ";}"), "svg.error.checked.jsx-1697384868 .border.jsx-1697384868{fill:".concat(colors.red700, ";}")];
|
|
6
|
+
styles.__hash = "1697384868";
|
|
7
7
|
export function SwitchRegular(_ref) {
|
|
8
8
|
let {
|
|
9
9
|
className
|
|
@@ -176,4 +176,14 @@ export const ImageLabelDense = Template.bind({});
|
|
|
176
176
|
ImageLabelDense.args = { ...ImageLabel.args,
|
|
177
177
|
...DefaultDense.args
|
|
178
178
|
};
|
|
179
|
-
ImageLabelDense.storyName = 'Image label - Dense';
|
|
179
|
+
ImageLabelDense.storyName = 'Image label - Dense';
|
|
180
|
+
export const RTL = args => /*#__PURE__*/React.createElement("div", {
|
|
181
|
+
dir: "rtl"
|
|
182
|
+
}, /*#__PURE__*/React.createElement(Template, args), /*#__PURE__*/React.createElement(Template, {
|
|
183
|
+
checked: true,
|
|
184
|
+
value: "checked"
|
|
185
|
+
}), /*#__PURE__*/React.createElement(Template, {
|
|
186
|
+
error: true,
|
|
187
|
+
checked: true,
|
|
188
|
+
value: "error"
|
|
189
|
+
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/switch",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0-alpha.1",
|
|
4
4
|
"description": "UI Switch",
|
|
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
|
},
|