Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-md/icon

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-md/icon - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

# [3.1.0](https://github.com/mlaursen/react-md/compare/v3.0.1...v3.1.0) (2021-09-10)
### Other Internal Changes
* ran `yarn format` to include new files ([48d3d7f](https://github.com/mlaursen/react-md/commit/48d3d7fddb0435edf7dec9d0ba38cf3f0f251709))
# [3.0.0](https://github.com/mlaursen/react-md/compare/v2.9.1...v3.0.0) (2021-08-13)

@@ -8,0 +20,0 @@

6

lib/FontIcon.js

@@ -51,3 +51,3 @@ "use strict";

var utils_1 = require("@react-md/utils");
var block = utils_1.bem("rmd-icon");
var block = (0, utils_1.bem)("rmd-icon");
/**

@@ -62,5 +62,5 @@ * The `FontIcon` component is used for rendering a font-icon library's icon.

*/
exports.FontIcon = react_1.forwardRef(function FontIcon(_a, ref) {
exports.FontIcon = (0, react_1.forwardRef)(function FontIcon(_a, ref) {
var className = _a.className, children = _a.children, _b = _a["aria-hidden"], ariaHidden = _b === void 0 ? true : _b, _c = _a.dense, dense = _c === void 0 ? false : _c, _d = _a.iconClassName, iconClassName = _d === void 0 ? "material-icons" : _d, _e = _a.forceSize, forceSize = _e === void 0 ? false : _e, _f = _a.forceFontSize, forceFontSize = _f === void 0 ? false : _f, props = __rest(_a, ["className", "children", "aria-hidden", "dense", "iconClassName", "forceSize", "forceFontSize"]);
return (react_1.default.createElement("i", __assign({}, props, { "aria-hidden": ariaHidden, ref: ref, className: classnames_1.default(block({
return (react_1.default.createElement("i", __assign({}, props, { "aria-hidden": ariaHidden, ref: ref, className: (0, classnames_1.default)(block({
font: true,

@@ -67,0 +67,0 @@ dense: dense,

@@ -40,3 +40,3 @@ "use strict";

};
var context = react_1.createContext(DEFAULT_ICONS);
var context = (0, react_1.createContext)(DEFAULT_ICONS);
var Provider = context.Provider;

@@ -56,3 +56,3 @@ /**

function useIcon(name, override) {
var icons = react_1.useContext(context);
var icons = (0, react_1.useContext)(context);
if (typeof override !== "undefined") {

@@ -73,3 +73,3 @@ return override;

var children = _a.children, _b = _a.back, back = _b === void 0 ? DEFAULT_ICONS.back : _b, _c = _a.checkbox, checkbox = _c === void 0 ? DEFAULT_ICONS.checkbox : _c, _d = _a.download, download = _d === void 0 ? DEFAULT_ICONS.download : _d, _e = _a.dropdown, dropdown = _e === void 0 ? DEFAULT_ICONS.dropdown : _e, _f = _a.expander, expander = _f === void 0 ? DEFAULT_ICONS.expander : _f, _g = _a.error, error = _g === void 0 ? DEFAULT_ICONS.error : _g, _h = _a.forward, forward = _h === void 0 ? DEFAULT_ICONS.forward : _h, _j = _a.menu, menu = _j === void 0 ? DEFAULT_ICONS.menu : _j, _k = _a.notification, notification = _k === void 0 ? DEFAULT_ICONS.notification : _k, _l = _a.password, password = _l === void 0 ? DEFAULT_ICONS.password : _l, _m = _a.radio, radio = _m === void 0 ? DEFAULT_ICONS.radio : _m, _o = _a.selected, selected = _o === void 0 ? DEFAULT_ICONS.selected : _o, _p = _a.sort, sort = _p === void 0 ? DEFAULT_ICONS.sort : _p;
var value = react_1.useMemo(function () { return ({
var value = (0, react_1.useMemo)(function () { return ({
back: back,

@@ -76,0 +76,0 @@ checkbox: checkbox,

@@ -51,3 +51,3 @@ "use strict";

var utils_1 = require("@react-md/utils");
var block = utils_1.bem("rmd-icon-rotator");
var block = (0, utils_1.bem)("rmd-icon-rotator");
/**

@@ -57,9 +57,9 @@ * The `IconRotator` is a simple component that is used to rotate an icon from a

*/
exports.IconRotator = react_1.forwardRef(function IconRotator(_a, ref) {
exports.IconRotator = (0, react_1.forwardRef)(function IconRotator(_a, ref) {
var style = _a.style, propClassName = _a.className, _b = _a.animate, animate = _b === void 0 ? true : _b, rotated = _a.rotated, children = _a.children, _c = _a.forceIconWrap, forceIconWrap = _c === void 0 ? false : _c, props = __rest(_a, ["style", "className", "animate", "rotated", "children", "forceIconWrap"]);
var className = classnames_1.default(block({ animate: animate, rotated: rotated }), propClassName);
if (!forceIconWrap && react_1.isValidElement(children)) {
var className = (0, classnames_1.default)(block({ animate: animate, rotated: rotated }), propClassName);
if (!forceIconWrap && (0, react_1.isValidElement)(children)) {
var child = react_1.Children.only(children);
return react_1.cloneElement(child, {
className: classnames_1.default(className, child.props.className),
return (0, react_1.cloneElement)(child, {
className: (0, classnames_1.default)(className, child.props.className),
});

@@ -66,0 +66,0 @@ }

@@ -51,3 +51,3 @@ "use strict";

var utils_1 = require("@react-md/utils");
var block = utils_1.bem("rmd-icon");
var block = (0, utils_1.bem)("rmd-icon");
/**

@@ -57,3 +57,3 @@ * The `SVGIcon` component is used to render inline SVG icons or SVG icons in a

*/
exports.SVGIcon = react_1.forwardRef(function SVGIcon(_a, ref) {
exports.SVGIcon = (0, react_1.forwardRef)(function SVGIcon(_a, ref) {
var _b = _a["aria-hidden"], ariaHidden = _b === void 0 ? true : _b, _c = _a.focusable, focusable = _c === void 0 ? "false" : _c, _d = _a.xmlns, xmlns = _d === void 0 ? "http://www.w3.org/2000/svg" : _d, _e = _a.viewBox, viewBox = _e === void 0 ? "0 0 24 24" : _e, _f = _a.dense, dense = _f === void 0 ? false : _f, className = _a.className, use = _a.use, propChildren = _a.children, props = __rest(_a, ["aria-hidden", "focusable", "xmlns", "viewBox", "dense", "className", "use", "children"]);

@@ -64,3 +64,3 @@ var children = propChildren;

}
return (react_1.default.createElement("svg", __assign({}, props, { "aria-hidden": ariaHidden, ref: ref, className: classnames_1.default(block({ svg: true, dense: dense }), className), focusable: focusable, xmlns: xmlns, viewBox: viewBox }), children));
return (react_1.default.createElement("svg", __assign({}, props, { "aria-hidden": ariaHidden, ref: ref, className: (0, classnames_1.default)(block({ svg: true, dense: dense }), className), focusable: focusable, xmlns: xmlns, viewBox: viewBox }), children));
});

@@ -67,0 +67,0 @@ /* istanbul ignore next */

@@ -35,3 +35,3 @@ "use strict";

var isAfter = flexReverse ? !iconAfter : iconAfter;
var baseClassName = classnames_1.default((_b = {},
var baseClassName = (0, classnames_1.default)((_b = {},
_b[beforeClassName] = !stacked && !isAfter,

@@ -44,10 +44,10 @@ _b[afterClassName] = !stacked && isAfter,

var content = children;
if (!forceIconWrap && react_1.isValidElement(propIcon)) {
if (!forceIconWrap && (0, react_1.isValidElement)(propIcon)) {
var icon = react_1.Children.only(propIcon);
iconEl = react_1.cloneElement(icon, {
className: classnames_1.default(baseClassName, icon.props.className),
iconEl = (0, react_1.cloneElement)(icon, {
className: (0, classnames_1.default)(baseClassName, icon.props.className),
});
}
else if (propIcon) {
iconEl = (react_1.default.createElement("span", { className: classnames_1.default("rmd-text-icon-spacing", baseClassName) }, propIcon));
iconEl = (react_1.default.createElement("span", { className: (0, classnames_1.default)("rmd-text-icon-spacing", baseClassName) }, propIcon));
}

@@ -54,0 +54,0 @@ if (iconEl) {

{
"name": "@react-md/icon",
"version": "3.0.0",
"version": "3.1.0",
"description": "This package is for including icons within react-md. There is included support for both font icons and SVG icons. There is also a helper component for applying spacing between icons and text.",

@@ -33,5 +33,5 @@ "main": "./lib/index.js",

"dependencies": {
"@react-md/theme": "^3.0.0",
"@react-md/typography": "^3.0.0",
"@react-md/utils": "^3.0.0",
"@react-md/theme": "^3.1.0",
"@react-md/typography": "^3.1.0",
"@react-md/utils": "^3.1.0",
"classnames": "^2.3.1"

@@ -52,3 +52,3 @@ },

},
"gitHead": "a9995e084480006a77f9123b95ce7275998fb406"
"gitHead": "5891a3255f12fb34d2cc82d81d10f85f712a21e8"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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