Socket
Socket
Sign inDemoInstall

@chakra-ui/utils

Package Overview
Dependencies
Maintainers
4
Versions
278
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.0.0-next.6 to 1.0.0-next.7

dist/cjs/merge-props.js

17

CHANGELOG.md

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

# [1.0.0-next.7](https://github.com/chakra-ui/chakra-ui/compare/@chakra-ui/utils@1.0.0-next.6...@chakra-ui/utils@1.0.0-next.7) (2020-07-26)
### Bug Fixes
- prevent issue where right click triggers active css state
([4ea9b88](https://github.com/chakra-ui/chakra-ui/commit/4ea9b8872599168f7a6ecb078b62f3473a25b4d8))
### Features
- add popover transition and merge props util
([112ff7b](https://github.com/chakra-ui/chakra-ui/commit/112ff7b53d7618f9a1442efa2fb427491a5fc51c))
# Change Log
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.0.0-next.6](https://github.com/chakra-ui/chakra-ui/compare/@chakra-ui/utils@1.0.0-next.5...@chakra-ui/utils@1.0.0-next.6) (2020-07-15)

@@ -8,0 +25,0 @@

@@ -14,2 +14,3 @@ "use strict";

exports.closest = closest;
exports.isRightClick = void 0;

@@ -21,2 +22,8 @@ var _tabbable = require("./tabbable");

var isRightClick = function isRightClick(event) {
return event.button != 0;
};
exports.isRightClick = isRightClick;
function getAllFocusable(container) {

@@ -23,0 +30,0 @@ var allFocusable = Array.from(container.querySelectorAll(selector));

24

dist/cjs/function.js

@@ -7,6 +7,4 @@ "use strict";

exports.once = once;
exports.noop = void 0;
exports.error = exports.warn = exports.noop = void 0;
var _assertion = require("./assertion");
var _memoizeOne = _interopRequireDefault(require("memoize-one"));

@@ -16,2 +14,4 @@

var _assertion = require("./assertion");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -59,2 +59,20 @@

exports.noop = noop;
var warn = once(function (options) {
var condition = options.condition,
message = options.message;
if (condition && _assertion.__DEV__) {
console.warn(message);
}
});
exports.warn = warn;
var error = once(function (options) {
var condition = options.condition,
message = options.message;
if (condition && _assertion.__DEV__) {
console.error(message);
}
});
exports.error = error;
//# sourceMappingURL=function.js.map

12

dist/cjs/index.js

@@ -89,15 +89,15 @@ "use strict";

var _logger = require("./logger");
var _responsive = require("./responsive");
Object.keys(_logger).forEach(function (key) {
Object.keys(_responsive).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
exports[key] = _logger[key];
exports[key] = _responsive[key];
});
var _responsive = require("./responsive");
var _mergeProps = require("./merge-props");
Object.keys(_responsive).forEach(function (key) {
Object.keys(_mergeProps).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
exports[key] = _responsive[key];
exports[key] = _mergeProps[key];
});
//# sourceMappingURL=index.js.map

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

var _logger = require("./logger");
var _function = require("./function");

@@ -115,3 +115,3 @@ var minSafeInteger = Number.MIN_SAFE_INTEGER || -9007199254740991;

if (value == null) return value;
(0, _logger.warn)({
(0, _function.warn)({
condition: max < min,

@@ -118,0 +118,0 @@ message: "[Chakra UI] clamp: max cannot be less than min"

@@ -101,5 +101,5 @@ "use strict";

for (var item in result) {
if (typeof result[item] === "undefined") {
delete result[item];
for (var key in result) {
if (result[key] == null) {
delete result[key];
}

@@ -106,0 +106,0 @@ }

import { isFocusable, isTabbable, isHTMLElement } from "./tabbable";
var selectors = ["input", "select", "textarea", "a[href]", "area[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", "[contenteditable]:not([contenteditable=false])"];
var selector = selectors.join();
export var isRightClick = event => event.button != 0;
export function getAllFocusable(container) {

@@ -5,0 +6,0 @@ var allFocusable = Array.from(container.querySelectorAll(selector));

@@ -1,3 +0,3 @@

import { isFunction } from "./assertion";
import memoizeOne from "memoize-one";
import { isFunction, __DEV__ } from "./assertion";
export function runIfFn(valueOrFn) {

@@ -39,2 +39,22 @@ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {

export var noop = () => {};
export var warn = once(options => {
var {
condition,
message
} = options;
if (condition && __DEV__) {
console.warn(message);
}
});
export var error = once(options => {
var {
condition,
message
} = options;
if (condition && __DEV__) {
console.error(message);
}
});
//# sourceMappingURL=function.js.map

@@ -13,4 +13,4 @@ export * from "./function";

export * from "css-box-model";
export * from "./logger";
export * from "./responsive";
export * from "./merge-props";
//# sourceMappingURL=index.js.map
import { isNotNumber } from "./assertion";
import { warn } from "./logger";
import { warn } from "./function";
export var minSafeInteger = Number.MIN_SAFE_INTEGER || -9007199254740991;

@@ -4,0 +4,0 @@ export var maxSafeInteger = Number.MAX_SAFE_INTEGER || 9007199254740991;

@@ -73,5 +73,5 @@ function _extends() { _extends = Object.assign || 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); }

for (var item in result) {
if (typeof result[item] === "undefined") {
delete result[item];
for (var key in result) {
if (result[key] == null) {
delete result[key];
}

@@ -78,0 +78,0 @@ }

@@ -43,2 +43,1 @@ export declare function getFirstItem<T>(array: T[]): T | undefined;

export declare function getNextItemFromSearch<T>(items: T[], searchString: string, itemToString: (item: T) => string, currentItem: T): T | undefined;
//# sourceMappingURL=array.d.ts.map

@@ -18,2 +18,1 @@ import { ChangeEvent } from "react";

export declare const __DEV__: boolean;
//# sourceMappingURL=assertion.d.ts.map

@@ -0,1 +1,3 @@

/// <reference types="react" />
export declare const isRightClick: <E extends MouseEvent | import("react").MouseEvent<Element, MouseEvent>>(event: E) => boolean;
export declare function getAllFocusable<T extends Element>(container: T): T[];

@@ -11,2 +13,1 @@ export declare function getFirstFocusable<T extends Element>(container: T): T | null;

export declare function closest<T extends Element>(element: T, selectors: string): Element | null;
//# sourceMappingURL=dom-query.d.ts.map

@@ -18,2 +18,1 @@ import { Booleanish } from "./types";

export declare const cx: (...classNames: any[]) => string;
//# sourceMappingURL=dom.d.ts.map

@@ -0,3 +1,3 @@

import memoizeOne from "memoize-one";
import { FunctionArguments } from "./types";
import memoizeOne from "memoize-one";
export declare function runIfFn<T, U>(valueOrFn: T | ((...args: U[]) => T), ...args: U[]): T;

@@ -8,2 +8,3 @@ export declare function callAllHandlers<T extends (event: any) => void>(...fns: (T | undefined)[]): (event: FunctionArguments<T>[0]) => void;

export declare const noop: () => void;
//# sourceMappingURL=function.d.ts.map
export declare const warn: (this: any, ...args: any[]) => any;
export declare const error: (this: any, ...args: any[]) => any;

@@ -13,4 +13,3 @@ export * from "./function";

export * from "css-box-model";
export * from "./logger";
export * from "./responsive";
//# sourceMappingURL=index.d.ts.map
export * from "./merge-props";

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

export {};
//# sourceMappingURL=keydown.d.ts.map

@@ -50,2 +50,1 @@ export declare const minSafeInteger: number;

export declare function clampValue(value: number, min: number, max: number): number;
//# sourceMappingURL=number.d.ts.map

@@ -26,2 +26,1 @@ import { Dict } from "./types";

export declare const objectKeys: <T extends Record<string, any>>(obj: T) => (keyof T)[];
//# sourceMappingURL=object.d.ts.map

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

export {};
//# sourceMappingURL=react-helpers.d.ts.map

@@ -7,2 +7,1 @@ import { Dict } from "./types";

export declare function isResponsiveObjectLike(obj: Dict, bps?: readonly string[]): boolean;
//# sourceMappingURL=responsive.d.ts.map

@@ -17,2 +17,1 @@ export declare const hasDisplayNone: (element: Element) => boolean;

export {};
//# sourceMappingURL=tabbable.d.ts.map

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

export declare type StringOrNumber = string | number;
//# sourceMappingURL=types.d.ts.map
{
"name": "@chakra-ui/utils",
"version": "1.0.0-next.6",
"version": "1.0.0-next.7",
"description": "Common utilties and types for Chakra UI",

@@ -40,2 +40,3 @@ "author": "Segun Adebayo <sage@adebayosegun.com>",

"dependencies": {
"@types/lodash.merge": "4.6.6",
"css-box-model": "1.2.1",

@@ -45,9 +46,6 @@ "lodash.merge": "4.6.2",

},
"devDependencies": {
"@types/lodash.merge": "4.6.6"
},
"peerDependencies": {
"react": "16.x"
},
"gitHead": "72eeca4ba3fc6e7d8845b0d283a03cb6ec384a50"
"gitHead": "3dcabd8c7e21b32ae1b61485588f70370c4e626f"
}

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

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