@cypress-design/react-checkbox 0.4.2 → 0.4.3
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/CHANGELOG.md +6 -0
- package/Checkbox.tsx +18 -18
- package/CheckboxReact.cy.tsx +19 -1
- package/dist/index.es.mjs +18 -17
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +18 -17
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -150,23 +150,24 @@ var Checkbox = function (_a) {
|
|
|
150
150
|
}
|
|
151
151
|
return (React__namespace.createElement("div", __assign$1({ className: clsx__default["default"](className, 'relative flex items-center') }, rest),
|
|
152
152
|
React__namespace.createElement("input", { id: id, className: "absolute inset-0 w-0 h-0 opacity-0", "aria-describedby": id + "-description", name: name || id, type: "checkbox", onChange: onChangeInput, disabled: disabled, checked: localChecked }),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
153
|
+
React__namespace.createElement("label", { className: "flex items-center", htmlFor: id },
|
|
154
|
+
localChecked && (React__namespace.createElement(IconCheckmarkSmall, { strokeColor: "white", className: "absolute" })),
|
|
155
|
+
React__namespace.createElement("span", { className: clsx__default["default"]([
|
|
156
|
+
"block border-1 rounded h-16px w-16px flex items-center text-white",
|
|
157
|
+
disabled
|
|
158
|
+
? 'border-gray-200 bg-gray-100'
|
|
159
|
+
: localChecked
|
|
160
|
+
? {
|
|
161
|
+
'border-indigo-500 bg-indigo-400': color === 'indigo',
|
|
162
|
+
'border-jade-500 bg-jade-400': color === 'jade',
|
|
163
|
+
'border-red-500 bg-red-400': color === 'red'
|
|
164
|
+
}
|
|
165
|
+
: 'border-gray-200 bg-white',
|
|
166
|
+
]) }),
|
|
167
|
+
label && (React__namespace.createElement("span", { className: clsx__default["default"]([
|
|
168
|
+
disabled ? 'text-gray-500' : 'text-gray-800',
|
|
169
|
+
'block ml-2 text-16px leading-normal font-light select-none',
|
|
170
|
+
]) }, label)))));
|
|
170
171
|
};
|
|
171
172
|
|
|
172
173
|
module.exports = Checkbox;
|