@zohodesk/components 1.0.0-temp-114 → 1.0.0-temp-115
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/es/Switch/Switch.js
CHANGED
|
@@ -55,8 +55,7 @@ export default class Switch extends React.Component {
|
|
|
55
55
|
"data-title": disabled ? disableTitle : title,
|
|
56
56
|
"aria-checked": checked,
|
|
57
57
|
role: "switch",
|
|
58
|
-
tabIndex: isReadOnly || disabled ? '-1' : '0'
|
|
59
|
-
onClick: !disabled || !isReadOnly ? this.onChange : null
|
|
58
|
+
tabIndex: isReadOnly || disabled ? '-1' : '0'
|
|
60
59
|
}, SwitchProps), /*#__PURE__*/React.createElement(Box, {
|
|
61
60
|
className: `${style[size]} ${customSwitchSize}`
|
|
62
61
|
}, /*#__PURE__*/React.createElement("input", {
|
|
@@ -67,8 +66,8 @@ export default class Switch extends React.Component {
|
|
|
67
66
|
value: value,
|
|
68
67
|
checked: checked,
|
|
69
68
|
disabled: disabled,
|
|
70
|
-
readOnly: isReadOnly
|
|
71
|
-
|
|
69
|
+
readOnly: isReadOnly,
|
|
70
|
+
onClick: !disabled || !isReadOnly ? this.onChange : null
|
|
72
71
|
}), /*#__PURE__*/React.createElement("label", {
|
|
73
72
|
htmlFor: id,
|
|
74
73
|
"data-id": dataId,
|
|
@@ -78,9 +77,8 @@ export default class Switch extends React.Component {
|
|
|
78
77
|
palette: labelPalette,
|
|
79
78
|
id: id,
|
|
80
79
|
size: labelSize,
|
|
81
|
-
type: "subtitle"
|
|
82
|
-
|
|
83
|
-
,
|
|
80
|
+
type: "subtitle",
|
|
81
|
+
onClick: !disabled || !isReadOnly ? this.onChange : null,
|
|
84
82
|
customClass: customLabel
|
|
85
83
|
}, LabelProps)));
|
|
86
84
|
}
|
package/lib/Switch/Switch.js
CHANGED
|
@@ -82,8 +82,7 @@ var Switch = /*#__PURE__*/function (_React$Component) {
|
|
|
82
82
|
"data-title": disabled ? disableTitle : title,
|
|
83
83
|
"aria-checked": checked,
|
|
84
84
|
role: "switch",
|
|
85
|
-
tabIndex: isReadOnly || disabled ? '-1' : '0'
|
|
86
|
-
onClick: !disabled || !isReadOnly ? this.onChange : null
|
|
85
|
+
tabIndex: isReadOnly || disabled ? '-1' : '0'
|
|
87
86
|
}, SwitchProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
88
87
|
className: "".concat(_SwitchModule["default"][size], " ").concat(customSwitchSize)
|
|
89
88
|
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
@@ -94,8 +93,8 @@ var Switch = /*#__PURE__*/function (_React$Component) {
|
|
|
94
93
|
value: value,
|
|
95
94
|
checked: checked,
|
|
96
95
|
disabled: disabled,
|
|
97
|
-
readOnly: isReadOnly
|
|
98
|
-
|
|
96
|
+
readOnly: isReadOnly,
|
|
97
|
+
onClick: !disabled || !isReadOnly ? this.onChange : null
|
|
99
98
|
}), /*#__PURE__*/_react["default"].createElement("label", {
|
|
100
99
|
htmlFor: id,
|
|
101
100
|
"data-id": dataId,
|
|
@@ -105,9 +104,8 @@ var Switch = /*#__PURE__*/function (_React$Component) {
|
|
|
105
104
|
palette: labelPalette,
|
|
106
105
|
id: id,
|
|
107
106
|
size: labelSize,
|
|
108
|
-
type: "subtitle"
|
|
109
|
-
|
|
110
|
-
,
|
|
107
|
+
type: "subtitle",
|
|
108
|
+
onClick: !disabled || !isReadOnly ? this.onChange : null,
|
|
111
109
|
customClass: customLabel
|
|
112
110
|
}, LabelProps)));
|
|
113
111
|
}
|