@cloudflare/component-checkbox
Advanced tools
Comparing version
@@ -22,5 +22,6 @@ import React from 'react'; | ||
size?: number; | ||
tabIndex?: number; | ||
}; | ||
declare type Props = Omit<React.ComponentProps<typeof Div>, keyof CheckboxProps | 'onChange'> & CheckboxProps; | ||
declare function Checkbox({ id, name, className, indeterminate, checked, value, onChange, disabled, testId, label, invalid, noLabel, spacing, unwrap, marginRight, size, ...labelProps }: Props): JSX.Element; | ||
declare function Checkbox({ id, name, className, indeterminate, checked, value, onChange, disabled, testId, label, invalid, noLabel, spacing, unwrap, marginRight, size, tabIndex, ...labelProps }: Props): JSX.Element; | ||
export default Checkbox; |
@@ -1,2 +0,2 @@ | ||
var _excluded = ["id", "name", "className", "indeterminate", "checked", "value", "onChange", "disabled", "testId", "label", "invalid", "noLabel", "spacing", "unwrap", "marginRight", "size"]; | ||
var _excluded = ["id", "name", "className", "indeterminate", "checked", "value", "onChange", "disabled", "testId", "label", "invalid", "noLabel", "spacing", "unwrap", "marginRight", "size", "tabIndex"]; | ||
@@ -24,4 +24,4 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var darkSvgs = { | ||
encodedCheck: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' %3E%3Cg %3E%3Cg fill='".concat(theme.colors.gray[6].replace('#', '%23'), "' %3E%3Cpath d='M0,0 L16,0 L16,16 L0,16 L0,0 Z M14,4.57911065 L12.4208893,3 L6.26344364,9.1582213 L3.57911065,6.47388831 L2,8.05222337 L6.26344364,12.315667 L14,4.57911065 Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")"), | ||
encodedIndeterminate: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' %3E%3Cg %3E%3Cg fill='".concat(theme.colors.gray[6].replace('#', '%23'), "' %3E%3Cpath d='M0,0 L16,0 L16,16 L0,16 L0,0 Z M2,7 L2,9 L14,9 L14,7 L2,7 Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")") | ||
encodedCheck: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' %3E%3Cg %3E%3Cg fill='".concat(theme.colors.gray[4].replace('#', '%23'), "' %3E%3Cpath d='M0,0 L16,0 L16,16 L0,16 L0,0 Z M14,4.57911065 L12.4208893,3 L6.26344364,9.1582213 L3.57911065,6.47388831 L2,8.05222337 L6.26344364,12.315667 L14,4.57911065 Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")"), | ||
encodedIndeterminate: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' %3E%3Cg %3E%3Cg fill='".concat(theme.colors.gray[4].replace('#', '%23'), "' %3E%3Cpath d='M0,0 L16,0 L16,16 L0,16 L0,0 Z M2,7 L2,9 L14,9 L14,7 L2,7 Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")") | ||
}; | ||
@@ -81,3 +81,4 @@ var CheckboxInput = createStyledComponent(_ref => { | ||
marginRight = 3, | ||
size = 16 | ||
size = 16, | ||
tabIndex | ||
} = _ref2, | ||
@@ -99,3 +100,4 @@ labelProps = _objectWithoutProperties(_ref2, _excluded); | ||
marginRight: marginRight, | ||
size: size | ||
size: size, | ||
tabIndex: tabIndex | ||
}); | ||
@@ -102,0 +104,0 @@ checkbox = unwrap ? checkbox : /*#__PURE__*/React.createElement("div", null, checkbox); |
@@ -16,3 +16,3 @@ "use strict"; | ||
var _excluded = ["id", "name", "className", "indeterminate", "checked", "value", "onChange", "disabled", "testId", "label", "invalid", "noLabel", "spacing", "unwrap", "marginRight", "size"]; | ||
var _excluded = ["id", "name", "className", "indeterminate", "checked", "value", "onChange", "disabled", "testId", "label", "invalid", "noLabel", "spacing", "unwrap", "marginRight", "size", "tabIndex"]; | ||
@@ -38,4 +38,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var darkSvgs = { | ||
encodedCheck: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' %3E%3Cg %3E%3Cg fill='".concat(_styleConst.theme.colors.gray[6].replace('#', '%23'), "' %3E%3Cpath d='M0,0 L16,0 L16,16 L0,16 L0,0 Z M14,4.57911065 L12.4208893,3 L6.26344364,9.1582213 L3.57911065,6.47388831 L2,8.05222337 L6.26344364,12.315667 L14,4.57911065 Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")"), | ||
encodedIndeterminate: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' %3E%3Cg %3E%3Cg fill='".concat(_styleConst.theme.colors.gray[6].replace('#', '%23'), "' %3E%3Cpath d='M0,0 L16,0 L16,16 L0,16 L0,0 Z M2,7 L2,9 L14,9 L14,7 L2,7 Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")") | ||
encodedCheck: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' %3E%3Cg %3E%3Cg fill='".concat(_styleConst.theme.colors.gray[4].replace('#', '%23'), "' %3E%3Cpath d='M0,0 L16,0 L16,16 L0,16 L0,0 Z M14,4.57911065 L12.4208893,3 L6.26344364,9.1582213 L3.57911065,6.47388831 L2,8.05222337 L6.26344364,12.315667 L14,4.57911065 Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")"), | ||
encodedIndeterminate: "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' %3E%3Cg %3E%3Cg fill='".concat(_styleConst.theme.colors.gray[4].replace('#', '%23'), "' %3E%3Cpath d='M0,0 L16,0 L16,16 L0,16 L0,0 Z M2,7 L2,9 L14,9 L14,7 L2,7 Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E\")") | ||
}; | ||
@@ -98,2 +98,3 @@ var CheckboxInput = (0, _styleContainer.createStyledComponent)(function (_ref) { | ||
size = _ref2$size === void 0 ? 16 : _ref2$size, | ||
tabIndex = _ref2.tabIndex, | ||
labelProps = _objectWithoutProperties(_ref2, _excluded); | ||
@@ -114,3 +115,4 @@ | ||
marginRight: marginRight, | ||
size: size | ||
size: size, | ||
tabIndex: tabIndex | ||
}); | ||
@@ -117,0 +119,0 @@ |
{ | ||
"name": "@cloudflare/component-checkbox", | ||
"description": "Cloudflare Checkbox Component", | ||
"version": "5.2.1", | ||
"version": "5.3.0", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "module": "es/index.js", |
Sorry, the diff of this file is too big to display
171054
0.13%401
1.26%