@cypress-design/react-checkbox 0.4.0 → 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 +21 -0
- package/Checkbox.tsx +18 -18
- package/CheckboxReact.cy.tsx +19 -1
- package/dist/{index.es.js → index.es.mjs} +21 -19
- package/dist/index.es.mjs.map +1 -0
- package/dist/index.umd.js +20 -18
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
- package/dist/index.es.js.map +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -135,6 +135,7 @@ var IconCheckmarkSmall = function (props) {
|
|
|
135
135
|
}
|
|
136
136
|
return React__namespace.createElement('svg', compileReactIconProperties(__assign(__assign({}, props), { size: size, body: body, compiledClasses: compiledClasses })));
|
|
137
137
|
};
|
|
138
|
+
|
|
138
139
|
/* <windicss-keep class=""> */
|
|
139
140
|
|
|
140
141
|
var uid = function () {
|
|
@@ -149,26 +150,27 @@ var Checkbox = function (_a) {
|
|
|
149
150
|
}
|
|
150
151
|
return (React__namespace.createElement("div", __assign$1({ className: clsx__default["default"](className, 'relative flex items-center') }, rest),
|
|
151
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 }),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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)))));
|
|
169
171
|
};
|
|
170
172
|
|
|
171
173
|
module.exports = Checkbox;
|
|
172
|
-
/* <windicss-keep class="relative flex items-center absolute inset-0 w-0 h-0 opacity-0 block border-1 rounded h-16px w-16px text-white border-gray-200 bg-gray-100 border-indigo-500 bg-indigo-400 border-jade-500 bg-jade-400 border-red-500 bg-red-400 bg-white text-gray-500 text-gray-800 ml-2 text-16px leading-normal font-light select-none"> */
|
|
173
174
|
|
|
175
|
+
/* <windicss-keep class="relative flex items-center absolute inset-0 w-0 h-0 opacity-0 block border-1 rounded h-16px w-16px text-white border-gray-200 bg-gray-100 border-indigo-500 bg-indigo-400 border-jade-500 bg-jade-400 border-red-500 bg-red-400 bg-white text-gray-500 text-gray-800 ml-2 text-16px leading-normal font-light select-none"> */
|
|
174
176
|
//# sourceMappingURL=index.umd.js.map
|