@s-ui/react-atom-checkbox
Advanced tools
Comparing version 2.11.0 to 2.12.0
@@ -0,3 +1,6 @@ | ||
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
import React, { useRef } from 'react'; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
import { useRef } from 'react'; | ||
import cx from 'classnames'; | ||
@@ -54,14 +57,15 @@ var BASE_CLASS = 'sui-AtomCheckbox'; | ||
updateNativeIndeterminate(); | ||
return /*#__PURE__*/React.createElement("label", { | ||
className: className | ||
}, !isNative && checked && /*#__PURE__*/React.createElement(CheckedIcon, null), !isNative && isIntermediate && /*#__PURE__*/React.createElement(IntermediateIcon, null), /*#__PURE__*/React.createElement("input", Object.assign({ | ||
ref: inputRef, | ||
type: "checkbox", | ||
id: id, | ||
name: name || id, | ||
disabled: disabled, | ||
checked: checked, | ||
intermediate: isIntermediate ? 'intermediate' : '', | ||
onChange: handleChange | ||
}, props))); | ||
return /*#__PURE__*/_jsxs("label", { | ||
className: className, | ||
children: [!isNative && checked && /*#__PURE__*/_jsx(CheckedIcon, {}), !isNative && isIntermediate && /*#__PURE__*/_jsx(IntermediateIcon, {}), /*#__PURE__*/_jsx("input", _extends({ | ||
ref: inputRef, | ||
type: "checkbox", | ||
id: id, | ||
name: name || id, | ||
disabled: disabled, | ||
checked: checked, | ||
intermediate: isIntermediate ? 'intermediate' : '', | ||
onChange: handleChange | ||
}, props))] | ||
}); | ||
}; | ||
@@ -68,0 +72,0 @@ |
{ | ||
"name": "@s-ui/react-atom-checkbox", | ||
"version": "2.11.0", | ||
"version": "2.12.0", | ||
"description": "", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"build": "npx rimraf ./lib && npx mkdirp ./lib && npm run build:js && npm run build:styles", | ||
"prepare": "npx rimraf ./lib && npx mkdirp ./lib && npm run build:js && npm run build:styles", | ||
"build:js": "../../../node_modules/.bin/babel --presets sui ./src --out-dir ./lib", | ||
@@ -9,0 +9,0 @@ "build:styles": "../../../node_modules/.bin/cpx './src/**/*.scss' ./lib" |
20237
64