Socket
Socket
Sign inDemoInstall

@chakra-ui/control-box

Package Overview
Dependencies
Maintainers
4
Versions
390
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/control-box - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

dist/declarations/src/control-box.d.ts.map

13

CHANGELOG.md
# Change Log
## 1.1.1
### Patch Changes
- [#5075](https://github.com/chakra-ui/chakra-ui/pull/5075)
[`b28142946`](https://github.com/chakra-ui/chakra-ui/commit/b281429462a099b7fd7f9352e837cd28d1a2da0e)
Thanks [@cschroeter](https://github.com/cschroeter)! - Update babel config to
transpile soruces for older browsers. This fixes issues with CRA and
Storybook.
- Updated dependencies
[[`b28142946`](https://github.com/chakra-ui/chakra-ui/commit/b281429462a099b7fd7f9352e837cd28d1a2da0e)]:
- @chakra-ui/utils@1.9.1
## 1.1.0

@@ -4,0 +17,0 @@

95

dist/chakra-ui-control-box.cjs.dev.js

@@ -47,34 +47,54 @@ 'use strict';

const ControlBox = props => {
const {
type = "checkbox",
_hover,
_invalid,
_disabled,
_focus,
_checked,
_child = {
opacity: 0
},
_checkedAndChild = {
opacity: 1
},
_checkedAndDisabled,
_checkedAndFocus,
_checkedAndHover,
children,
...rest
} = props;
const checkedAndDisabled = `input[type=${type}]:checked:disabled + &`;
const checkedAndHover = `input[type=${type}]:checked:hover:not(:disabled) + &`;
const checkedAndFocus = `input[type=${type}]:checked:focus + &`;
const disabled = `input[type=${type}]:disabled + &`;
const focus = `input[type=${type}]:focus + &`;
const hover = `input[type=${type}]:hover:not(:disabled):not(:checked) + &`;
const checked = `input[type=${type}]:checked + &, input[type=${type}][aria-checked=mixed] + &`;
const invalid = `input[type=${type}][aria-invalid=true] + &`;
const child = `& > *`;
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
var _excluded = ["type", "_hover", "_invalid", "_disabled", "_focus", "_checked", "_child", "_checkedAndChild", "_checkedAndDisabled", "_checkedAndFocus", "_checkedAndHover", "children"];
var ControlBox = function ControlBox(props) {
var _extends2, _ref;
var _props$type = props.type,
type = _props$type === void 0 ? "checkbox" : _props$type,
_hover = props._hover,
_invalid = props._invalid,
_disabled = props._disabled,
_focus = props._focus,
_checked = props._checked,
_props$_child = props._child,
_child = _props$_child === void 0 ? {
opacity: 0
} : _props$_child,
_props$_checkedAndChi = props._checkedAndChild,
_checkedAndChild = _props$_checkedAndChi === void 0 ? {
opacity: 1
} : _props$_checkedAndChi,
_checkedAndDisabled = props._checkedAndDisabled,
_checkedAndFocus = props._checkedAndFocus,
_checkedAndHover = props._checkedAndHover,
children = props.children,
rest = _objectWithoutPropertiesLoose(props, _excluded);
var checkedAndDisabled = "input[type=" + type + "]:checked:disabled + &";
var checkedAndHover = "input[type=" + type + "]:checked:hover:not(:disabled) + &";
var checkedAndFocus = "input[type=" + type + "]:checked:focus + &";
var disabled = "input[type=" + type + "]:disabled + &";
var focus = "input[type=" + type + "]:focus + &";
var hover = "input[type=" + type + "]:hover:not(:disabled):not(:checked) + &";
var checked = "input[type=" + type + "]:checked + &, input[type=" + type + "][aria-checked=mixed] + &";
var invalid = "input[type=" + type + "][aria-invalid=true] + &";
var child = "& > *";
return /*#__PURE__*/React__namespace.createElement(system.chakra.div, _extends({}, rest, {
"aria-hidden": true,
__css: {
__css: (_ref = {
display: "inline-flex",

@@ -85,15 +105,4 @@ alignItems: "center",

transitionDuration: "fast",
flexShrink: 0,
[focus]: _focus,
[hover]: _hover,
[disabled]: _disabled,
[invalid]: _invalid,
[checkedAndDisabled]: _checkedAndDisabled,
[checkedAndFocus]: _checkedAndFocus,
[checkedAndHover]: _checkedAndHover,
[child]: _child,
[checked]: { ..._checked,
[child]: _checkedAndChild
}
}
flexShrink: 0
}, _ref[focus] = _focus, _ref[hover] = _hover, _ref[disabled] = _disabled, _ref[invalid] = _invalid, _ref[checkedAndDisabled] = _checkedAndDisabled, _ref[checkedAndFocus] = _checkedAndFocus, _ref[checkedAndHover] = _checkedAndHover, _ref[child] = _child, _ref[checked] = _extends({}, _checked, (_extends2 = {}, _extends2[child] = _checkedAndChild, _extends2)), _ref)
}), children);

@@ -100,0 +109,0 @@ };

@@ -47,34 +47,54 @@ 'use strict';

const ControlBox = props => {
const {
type = "checkbox",
_hover,
_invalid,
_disabled,
_focus,
_checked,
_child = {
opacity: 0
},
_checkedAndChild = {
opacity: 1
},
_checkedAndDisabled,
_checkedAndFocus,
_checkedAndHover,
children,
...rest
} = props;
const checkedAndDisabled = `input[type=${type}]:checked:disabled + &`;
const checkedAndHover = `input[type=${type}]:checked:hover:not(:disabled) + &`;
const checkedAndFocus = `input[type=${type}]:checked:focus + &`;
const disabled = `input[type=${type}]:disabled + &`;
const focus = `input[type=${type}]:focus + &`;
const hover = `input[type=${type}]:hover:not(:disabled):not(:checked) + &`;
const checked = `input[type=${type}]:checked + &, input[type=${type}][aria-checked=mixed] + &`;
const invalid = `input[type=${type}][aria-invalid=true] + &`;
const child = `& > *`;
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
var _excluded = ["type", "_hover", "_invalid", "_disabled", "_focus", "_checked", "_child", "_checkedAndChild", "_checkedAndDisabled", "_checkedAndFocus", "_checkedAndHover", "children"];
var ControlBox = function ControlBox(props) {
var _extends2, _ref;
var _props$type = props.type,
type = _props$type === void 0 ? "checkbox" : _props$type,
_hover = props._hover,
_invalid = props._invalid,
_disabled = props._disabled,
_focus = props._focus,
_checked = props._checked,
_props$_child = props._child,
_child = _props$_child === void 0 ? {
opacity: 0
} : _props$_child,
_props$_checkedAndChi = props._checkedAndChild,
_checkedAndChild = _props$_checkedAndChi === void 0 ? {
opacity: 1
} : _props$_checkedAndChi,
_checkedAndDisabled = props._checkedAndDisabled,
_checkedAndFocus = props._checkedAndFocus,
_checkedAndHover = props._checkedAndHover,
children = props.children,
rest = _objectWithoutPropertiesLoose(props, _excluded);
var checkedAndDisabled = "input[type=" + type + "]:checked:disabled + &";
var checkedAndHover = "input[type=" + type + "]:checked:hover:not(:disabled) + &";
var checkedAndFocus = "input[type=" + type + "]:checked:focus + &";
var disabled = "input[type=" + type + "]:disabled + &";
var focus = "input[type=" + type + "]:focus + &";
var hover = "input[type=" + type + "]:hover:not(:disabled):not(:checked) + &";
var checked = "input[type=" + type + "]:checked + &, input[type=" + type + "][aria-checked=mixed] + &";
var invalid = "input[type=" + type + "][aria-invalid=true] + &";
var child = "& > *";
return /*#__PURE__*/React__namespace.createElement(system.chakra.div, _extends({}, rest, {
"aria-hidden": true,
__css: {
__css: (_ref = {
display: "inline-flex",

@@ -85,15 +105,4 @@ alignItems: "center",

transitionDuration: "fast",
flexShrink: 0,
[focus]: _focus,
[hover]: _hover,
[disabled]: _disabled,
[invalid]: _invalid,
[checkedAndDisabled]: _checkedAndDisabled,
[checkedAndFocus]: _checkedAndFocus,
[checkedAndHover]: _checkedAndHover,
[child]: _child,
[checked]: { ..._checked,
[child]: _checkedAndChild
}
}
flexShrink: 0
}, _ref[focus] = _focus, _ref[hover] = _hover, _ref[disabled] = _disabled, _ref[invalid] = _invalid, _ref[checkedAndDisabled] = _checkedAndDisabled, _ref[checkedAndFocus] = _checkedAndFocus, _ref[checkedAndHover] = _checkedAndHover, _ref[child] = _child, _ref[checked] = _extends({}, _checked, (_extends2 = {}, _extends2[child] = _checkedAndChild, _extends2)), _ref)
}), children);

@@ -100,0 +109,0 @@ };

@@ -23,34 +23,54 @@ import { chakra } from '@chakra-ui/system';

const ControlBox = props => {
const {
type = "checkbox",
_hover,
_invalid,
_disabled,
_focus,
_checked,
_child = {
opacity: 0
},
_checkedAndChild = {
opacity: 1
},
_checkedAndDisabled,
_checkedAndFocus,
_checkedAndHover,
children,
...rest
} = props;
const checkedAndDisabled = `input[type=${type}]:checked:disabled + &`;
const checkedAndHover = `input[type=${type}]:checked:hover:not(:disabled) + &`;
const checkedAndFocus = `input[type=${type}]:checked:focus + &`;
const disabled = `input[type=${type}]:disabled + &`;
const focus = `input[type=${type}]:focus + &`;
const hover = `input[type=${type}]:hover:not(:disabled):not(:checked) + &`;
const checked = `input[type=${type}]:checked + &, input[type=${type}][aria-checked=mixed] + &`;
const invalid = `input[type=${type}][aria-invalid=true] + &`;
const child = `& > *`;
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
var _excluded = ["type", "_hover", "_invalid", "_disabled", "_focus", "_checked", "_child", "_checkedAndChild", "_checkedAndDisabled", "_checkedAndFocus", "_checkedAndHover", "children"];
var ControlBox = function ControlBox(props) {
var _extends2, _ref;
var _props$type = props.type,
type = _props$type === void 0 ? "checkbox" : _props$type,
_hover = props._hover,
_invalid = props._invalid,
_disabled = props._disabled,
_focus = props._focus,
_checked = props._checked,
_props$_child = props._child,
_child = _props$_child === void 0 ? {
opacity: 0
} : _props$_child,
_props$_checkedAndChi = props._checkedAndChild,
_checkedAndChild = _props$_checkedAndChi === void 0 ? {
opacity: 1
} : _props$_checkedAndChi,
_checkedAndDisabled = props._checkedAndDisabled,
_checkedAndFocus = props._checkedAndFocus,
_checkedAndHover = props._checkedAndHover,
children = props.children,
rest = _objectWithoutPropertiesLoose(props, _excluded);
var checkedAndDisabled = "input[type=" + type + "]:checked:disabled + &";
var checkedAndHover = "input[type=" + type + "]:checked:hover:not(:disabled) + &";
var checkedAndFocus = "input[type=" + type + "]:checked:focus + &";
var disabled = "input[type=" + type + "]:disabled + &";
var focus = "input[type=" + type + "]:focus + &";
var hover = "input[type=" + type + "]:hover:not(:disabled):not(:checked) + &";
var checked = "input[type=" + type + "]:checked + &, input[type=" + type + "][aria-checked=mixed] + &";
var invalid = "input[type=" + type + "][aria-invalid=true] + &";
var child = "& > *";
return /*#__PURE__*/React.createElement(chakra.div, _extends({}, rest, {
"aria-hidden": true,
__css: {
__css: (_ref = {
display: "inline-flex",

@@ -61,15 +81,4 @@ alignItems: "center",

transitionDuration: "fast",
flexShrink: 0,
[focus]: _focus,
[hover]: _hover,
[disabled]: _disabled,
[invalid]: _invalid,
[checkedAndDisabled]: _checkedAndDisabled,
[checkedAndFocus]: _checkedAndFocus,
[checkedAndHover]: _checkedAndHover,
[child]: _child,
[checked]: { ..._checked,
[child]: _checkedAndChild
}
}
flexShrink: 0
}, _ref[focus] = _focus, _ref[hover] = _hover, _ref[disabled] = _disabled, _ref[invalid] = _invalid, _ref[checkedAndDisabled] = _checkedAndDisabled, _ref[checkedAndFocus] = _checkedAndFocus, _ref[checkedAndHover] = _checkedAndHover, _ref[child] = _child, _ref[checked] = _extends({}, _checked, (_extends2 = {}, _extends2[child] = _checkedAndChild, _extends2)), _ref)
}), children);

@@ -76,0 +85,0 @@ };

@@ -23,1 +23,2 @@ import { SystemStyleObject, HTMLChakraProps } from "@chakra-ui/system";

export default ControlBox;
//# sourceMappingURL=control-box.d.ts.map
export * from "./control-box";
//# sourceMappingURL=index.d.ts.map
{
"name": "@chakra-ui/control-box",
"version": "1.1.0",
"version": "1.1.1",
"description": "Chakra UI ControlBox component",

@@ -19,3 +19,4 @@ "keywords": [

"files": [
"dist"
"dist",
"src"
],

@@ -34,6 +35,6 @@ "publishConfig": {

"dependencies": {
"@chakra-ui/utils": "1.9.0"
"@chakra-ui/utils": "1.9.1"
},
"devDependencies": {
"@chakra-ui/system": "1.8.0",
"@chakra-ui/system": "1.8.1",
"react": "^17.0.1"

@@ -40,0 +41,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc