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

@chakra-ui/utils

Package Overview
Dependencies
Maintainers
3
Versions
283
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/utils - npm Package Compare versions

Comparing version 1.9.1 to 1.10.0

dist/declarations/src/flatten.d.ts

30

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

@@ -994,2 +994,31 @@ 'use strict';

function flatten(target, maxDepth) {
if (maxDepth === void 0) {
maxDepth = Infinity;
}
if (!isObject(target) && !Array.isArray(target) || !maxDepth) {
return target;
}
return Object.entries(target).reduce(function (result, _ref) {
var key = _ref[0],
value = _ref[1];
if (isObject(value) || isArray(value)) {
Object.entries(flatten(value, maxDepth - 1)).forEach(function (_ref2) {
var childKey = _ref2[0],
childValue = _ref2[1];
// e.g. gray.500
result[key + "." + childKey] = childValue;
});
} else {
// e.g. transparent
result[key] = value;
}
return result;
}, {});
}
/**

@@ -1719,2 +1748,3 @@ * Determines whether the children of a disclosure widget

exports.filterUndefined = filterUndefined;
exports.flatten = flatten;
exports.focus = focus;

@@ -1721,0 +1751,0 @@ exports.focusNextTabbable = focusNextTabbable;

@@ -994,2 +994,31 @@ 'use strict';

function flatten(target, maxDepth) {
if (maxDepth === void 0) {
maxDepth = Infinity;
}
if (!isObject(target) && !Array.isArray(target) || !maxDepth) {
return target;
}
return Object.entries(target).reduce(function (result, _ref) {
var key = _ref[0],
value = _ref[1];
if (isObject(value) || isArray(value)) {
Object.entries(flatten(value, maxDepth - 1)).forEach(function (_ref2) {
var childKey = _ref2[0],
childValue = _ref2[1];
// e.g. gray.500
result[key + "." + childKey] = childValue;
});
} else {
// e.g. transparent
result[key] = value;
}
return result;
}, {});
}
/**

@@ -1719,2 +1748,3 @@ * Determines whether the children of a disclosure widget

exports.filterUndefined = filterUndefined;
exports.flatten = flatten;
exports.focus = focus;

@@ -1721,0 +1751,0 @@ exports.focusNextTabbable = focusNextTabbable;

31

dist/chakra-ui-utils.esm.js

@@ -985,2 +985,31 @@ export * from 'css-box-model';

function flatten(target, maxDepth) {
if (maxDepth === void 0) {
maxDepth = Infinity;
}
if (!isObject(target) && !Array.isArray(target) || !maxDepth) {
return target;
}
return Object.entries(target).reduce(function (result, _ref) {
var key = _ref[0],
value = _ref[1];
if (isObject(value) || isArray(value)) {
Object.entries(flatten(value, maxDepth - 1)).forEach(function (_ref2) {
var childKey = _ref2[0],
childValue = _ref2[1];
// e.g. gray.500
result[key + "." + childKey] = childValue;
});
} else {
// e.g. transparent
result[key] = value;
}
return result;
}, {});
}
/**

@@ -1676,2 +1705,2 @@ * Determines whether the children of a disclosure widget

export { PanSession, __DEV__, __TEST__, addDomEvent, addItem, addPointerEvent, analyzeBreakpoints, ariaAttr, arrayToObjectNotation, breakpoints, callAll, callAllHandlers, canUseDOM, chunk, clampValue, closest, compose, contains, countDecimalPlaces, cx, dataAttr, detectBrowser, detectDeviceType, detectOS, detectTouch, determineLazyBehavior, distance, error, extractEventInfo, filterUndefined, focus, focusNextTabbable, focusPreviousTabbable, fromEntries, get, getActiveElement, getAllFocusable, getAllTabbable, getCSSVar, getEventWindow, getFirstFocusable, getFirstItem, getFirstTabbableIn, getLastItem, getLastTabbableIn, getNextIndex, getNextItem, getNextItemFromSearch, getNextTabbable, getOwnerDocument, getOwnerWindow, getPointerEventName, getPrevIndex, getPrevItem, getPreviousTabbable, getRelatedTarget, getViewportPointFromEvent, getWithDefault, hasDisplayNone, hasFocusWithin, hasNegativeTabIndex, hasTabIndex, isActiveElement, isArray, isBrowser, isContentEditable, isCssVar, isCustomBreakpoint, isDefined, isDisabled, isElement, isEmpty, isEmptyArray, isEmptyObject, isFocusable, isFunction, isHTMLElement, isHidden, isInputElement, isInputEvent, isMouseEvent, isMultiTouchEvent, isNotEmptyObject, isNotNumber, isNull, isNumber, isNumeric, isObject, isRefObject, isResponsiveObjectLike, isRightClick, isString, isTabbable, isTouchEvent, isUndefined, mapResponsive, maxSafeInteger, memoize, memoizedGet, minSafeInteger, noop, normalizeEventKey, objectFilter, objectKeys, objectToArrayNotation, omit, once, percentToValue, pick, pipe, px, removeIndex, removeItem, roundValueToStep, runIfFn, split, toPrecision, valueToPercent, walkObject, warn, wrapPointerEventHandler };
export { PanSession, __DEV__, __TEST__, addDomEvent, addItem, addPointerEvent, analyzeBreakpoints, ariaAttr, arrayToObjectNotation, breakpoints, callAll, callAllHandlers, canUseDOM, chunk, clampValue, closest, compose, contains, countDecimalPlaces, cx, dataAttr, detectBrowser, detectDeviceType, detectOS, detectTouch, determineLazyBehavior, distance, error, extractEventInfo, filterUndefined, flatten, focus, focusNextTabbable, focusPreviousTabbable, fromEntries, get, getActiveElement, getAllFocusable, getAllTabbable, getCSSVar, getEventWindow, getFirstFocusable, getFirstItem, getFirstTabbableIn, getLastItem, getLastTabbableIn, getNextIndex, getNextItem, getNextItemFromSearch, getNextTabbable, getOwnerDocument, getOwnerWindow, getPointerEventName, getPrevIndex, getPrevItem, getPreviousTabbable, getRelatedTarget, getViewportPointFromEvent, getWithDefault, hasDisplayNone, hasFocusWithin, hasNegativeTabIndex, hasTabIndex, isActiveElement, isArray, isBrowser, isContentEditable, isCssVar, isCustomBreakpoint, isDefined, isDisabled, isElement, isEmpty, isEmptyArray, isEmptyObject, isFocusable, isFunction, isHTMLElement, isHidden, isInputElement, isInputEvent, isMouseEvent, isMultiTouchEvent, isNotEmptyObject, isNotNumber, isNull, isNumber, isNumeric, isObject, isRefObject, isResponsiveObjectLike, isRightClick, isString, isTabbable, isTouchEvent, isUndefined, mapResponsive, maxSafeInteger, memoize, memoizedGet, minSafeInteger, noop, normalizeEventKey, objectFilter, objectKeys, objectToArrayNotation, omit, once, percentToValue, pick, pipe, px, removeIndex, removeItem, roundValueToStep, runIfFn, split, toPrecision, valueToPercent, walkObject, warn, wrapPointerEventHandler };

@@ -8,2 +8,3 @@ export * from "css-box-model";

export * from "./focus";
export * from "./flatten";
export * from "./function";

@@ -10,0 +11,0 @@ export * from "./lazy";

2

package.json
{
"name": "@chakra-ui/utils",
"version": "1.9.1",
"version": "1.10.0",
"description": "Common utilties and types for Chakra UI",

@@ -5,0 +5,0 @@ "author": "Segun Adebayo <sage@adebayosegun.com>",

@@ -8,2 +8,3 @@ export * from "css-box-model"

export * from "./focus"
export * from "./flatten"
export * from "./function"

@@ -10,0 +11,0 @@ export * from "./lazy"

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