Socket
Socket
Sign inDemoInstall

@chakra-ui/icon

Package Overview
Dependencies
Maintainers
4
Versions
435
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/icon - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

dist/declarations/src/create-icon.d.ts.map

13

CHANGELOG.md
# Change Log
## 1.2.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.2.0

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

90

dist/chakra-ui-icon.cjs.dev.js

@@ -47,3 +47,19 @@ 'use strict';

const fallbackIcon = {
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 = ["as", "viewBox", "color", "focusable", "children", "className", "__css"];
var fallbackIcon = {
path: /*#__PURE__*/React__namespace.createElement("g", {

@@ -69,17 +85,17 @@ stroke: "currentColor",

};
const Icon = /*#__PURE__*/system.forwardRef((props, ref) => {
const {
as: element,
viewBox,
color = "currentColor",
focusable = false,
children,
className,
__css,
...rest
} = props;
var Icon = /*#__PURE__*/system.forwardRef(function (props, ref) {
var element = props.as,
viewBox = props.viewBox,
_props$color = props.color,
color = _props$color === void 0 ? "currentColor" : _props$color,
_props$focusable = props.focusable,
focusable = _props$focusable === void 0 ? false : _props$focusable,
children = props.children,
className = props.className,
__css = props.__css,
rest = _objectWithoutPropertiesLoose(props, _excluded);
const _className = utils.cx("chakra-icon", className);
var _className = utils.cx("chakra-icon", className);
const styles = {
var styles = _extends({
w: "1em",

@@ -90,8 +106,8 @@ h: "1em",

flexShrink: 0,
color,
...__css
};
const shared = {
ref,
focusable,
color: color
}, __css);
var shared = {
ref: ref,
focusable: focusable,
className: _className,

@@ -101,3 +117,3 @@ __css: styles

const _viewBox = viewBox ?? fallbackIcon.viewBox;
var _viewBox = viewBox != null ? viewBox : fallbackIcon.viewBox;
/**

@@ -115,3 +131,3 @@ * If you're using an icon library like `react-icons`.

const _path = children ?? fallbackIcon.path;
var _path = children != null ? children : fallbackIcon.path;

@@ -131,16 +147,18 @@ return /*#__PURE__*/React__namespace.createElement(system.chakra.svg, _extends({

function createIcon(options) {
const {
viewBox = "0 0 24 24",
d: pathDefinition,
path,
displayName,
defaultProps = {}
} = options;
const Comp = /*#__PURE__*/system.forwardRef((props, ref) => /*#__PURE__*/React__namespace.createElement(Icon, _extends({
ref: ref,
viewBox: viewBox
}, defaultProps, props), path ?? /*#__PURE__*/React__namespace.createElement("path", {
fill: "currentColor",
d: pathDefinition
})));
var _options$viewBox = options.viewBox,
viewBox = _options$viewBox === void 0 ? "0 0 24 24" : _options$viewBox,
pathDefinition = options.d,
path = options.path,
displayName = options.displayName,
_options$defaultProps = options.defaultProps,
defaultProps = _options$defaultProps === void 0 ? {} : _options$defaultProps;
var Comp = /*#__PURE__*/system.forwardRef(function (props, ref) {
return /*#__PURE__*/React__namespace.createElement(Icon, _extends({
ref: ref,
viewBox: viewBox
}, defaultProps, props), path != null ? path : /*#__PURE__*/React__namespace.createElement("path", {
fill: "currentColor",
d: pathDefinition
}));
});

@@ -147,0 +165,0 @@ if (utils.__DEV__) {

@@ -47,3 +47,19 @@ 'use strict';

const fallbackIcon = {
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 = ["as", "viewBox", "color", "focusable", "children", "className", "__css"];
var fallbackIcon = {
path: /*#__PURE__*/React__namespace.createElement("g", {

@@ -69,17 +85,17 @@ stroke: "currentColor",

};
const Icon = /*#__PURE__*/system.forwardRef((props, ref) => {
const {
as: element,
viewBox,
color = "currentColor",
focusable = false,
children,
className,
__css,
...rest
} = props;
var Icon = /*#__PURE__*/system.forwardRef(function (props, ref) {
var element = props.as,
viewBox = props.viewBox,
_props$color = props.color,
color = _props$color === void 0 ? "currentColor" : _props$color,
_props$focusable = props.focusable,
focusable = _props$focusable === void 0 ? false : _props$focusable,
children = props.children,
className = props.className,
__css = props.__css,
rest = _objectWithoutPropertiesLoose(props, _excluded);
const _className = utils.cx("chakra-icon", className);
var _className = utils.cx("chakra-icon", className);
const styles = {
var styles = _extends({
w: "1em",

@@ -90,8 +106,8 @@ h: "1em",

flexShrink: 0,
color,
...__css
};
const shared = {
ref,
focusable,
color: color
}, __css);
var shared = {
ref: ref,
focusable: focusable,
className: _className,

@@ -101,3 +117,3 @@ __css: styles

const _viewBox = viewBox ?? fallbackIcon.viewBox;
var _viewBox = viewBox != null ? viewBox : fallbackIcon.viewBox;
/**

@@ -115,3 +131,3 @@ * If you're using an icon library like `react-icons`.

const _path = children ?? fallbackIcon.path;
var _path = children != null ? children : fallbackIcon.path;

@@ -131,16 +147,18 @@ return /*#__PURE__*/React__namespace.createElement(system.chakra.svg, _extends({

function createIcon(options) {
const {
viewBox = "0 0 24 24",
d: pathDefinition,
path,
displayName,
defaultProps = {}
} = options;
const Comp = /*#__PURE__*/system.forwardRef((props, ref) => /*#__PURE__*/React__namespace.createElement(Icon, _extends({
ref: ref,
viewBox: viewBox
}, defaultProps, props), path ?? /*#__PURE__*/React__namespace.createElement("path", {
fill: "currentColor",
d: pathDefinition
})));
var _options$viewBox = options.viewBox,
viewBox = _options$viewBox === void 0 ? "0 0 24 24" : _options$viewBox,
pathDefinition = options.d,
path = options.path,
displayName = options.displayName,
_options$defaultProps = options.defaultProps,
defaultProps = _options$defaultProps === void 0 ? {} : _options$defaultProps;
var Comp = /*#__PURE__*/system.forwardRef(function (props, ref) {
return /*#__PURE__*/React__namespace.createElement(Icon, _extends({
ref: ref,
viewBox: viewBox
}, defaultProps, props), path != null ? path : /*#__PURE__*/React__namespace.createElement("path", {
fill: "currentColor",
d: pathDefinition
}));
});

@@ -147,0 +165,0 @@ if (utils.__DEV__) {

@@ -23,3 +23,19 @@ import { forwardRef, chakra } from '@chakra-ui/system';

const fallbackIcon = {
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 = ["as", "viewBox", "color", "focusable", "children", "className", "__css"];
var fallbackIcon = {
path: /*#__PURE__*/React.createElement("g", {

@@ -45,17 +61,17 @@ stroke: "currentColor",

};
const Icon = /*#__PURE__*/forwardRef((props, ref) => {
const {
as: element,
viewBox,
color = "currentColor",
focusable = false,
children,
className,
__css,
...rest
} = props;
var Icon = /*#__PURE__*/forwardRef(function (props, ref) {
var element = props.as,
viewBox = props.viewBox,
_props$color = props.color,
color = _props$color === void 0 ? "currentColor" : _props$color,
_props$focusable = props.focusable,
focusable = _props$focusable === void 0 ? false : _props$focusable,
children = props.children,
className = props.className,
__css = props.__css,
rest = _objectWithoutPropertiesLoose(props, _excluded);
const _className = cx("chakra-icon", className);
var _className = cx("chakra-icon", className);
const styles = {
var styles = _extends({
w: "1em",

@@ -66,8 +82,8 @@ h: "1em",

flexShrink: 0,
color,
...__css
};
const shared = {
ref,
focusable,
color: color
}, __css);
var shared = {
ref: ref,
focusable: focusable,
className: _className,

@@ -77,3 +93,3 @@ __css: styles

const _viewBox = viewBox ?? fallbackIcon.viewBox;
var _viewBox = viewBox != null ? viewBox : fallbackIcon.viewBox;
/**

@@ -91,3 +107,3 @@ * If you're using an icon library like `react-icons`.

const _path = children ?? fallbackIcon.path;
var _path = children != null ? children : fallbackIcon.path;

@@ -107,16 +123,18 @@ return /*#__PURE__*/React.createElement(chakra.svg, _extends({

function createIcon(options) {
const {
viewBox = "0 0 24 24",
d: pathDefinition,
path,
displayName,
defaultProps = {}
} = options;
const Comp = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement(Icon, _extends({
ref: ref,
viewBox: viewBox
}, defaultProps, props), path ?? /*#__PURE__*/React.createElement("path", {
fill: "currentColor",
d: pathDefinition
})));
var _options$viewBox = options.viewBox,
viewBox = _options$viewBox === void 0 ? "0 0 24 24" : _options$viewBox,
pathDefinition = options.d,
path = options.path,
displayName = options.displayName,
_options$defaultProps = options.defaultProps,
defaultProps = _options$defaultProps === void 0 ? {} : _options$defaultProps;
var Comp = /*#__PURE__*/forwardRef(function (props, ref) {
return /*#__PURE__*/React.createElement(Icon, _extends({
ref: ref,
viewBox: viewBox
}, defaultProps, props), path != null ? path : /*#__PURE__*/React.createElement("path", {
fill: "currentColor",
d: pathDefinition
}));
});

@@ -123,0 +141,0 @@ if (__DEV__) {

1

dist/declarations/src/create-icon.d.ts

@@ -29,1 +29,2 @@ import * as React from "react";

export {};
//# sourceMappingURL=create-icon.d.ts.map

@@ -7,1 +7,2 @@ import { ChakraProps } from "@chakra-ui/system";

export default Icon;
//# sourceMappingURL=icon.d.ts.map
export * from "./icon";
export { default } from "./icon";
export * from "./create-icon";
//# sourceMappingURL=index.d.ts.map
{
"name": "@chakra-ui/icon",
"version": "1.2.0",
"version": "1.2.1",
"description": "A base React component for icons",

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

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

@@ -35,6 +36,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"

@@ -41,0 +42,0 @@ },

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc