Socket
Socket
Sign inDemoInstall

@chakra-ui/utils

Package Overview
Dependencies
6
Maintainers
4
Versions
257
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-rc.7 to 1.0.0-rc.8

26

CHANGELOG.md

@@ -6,26 +6,30 @@ # Change Log

# 1.0.0-rc.7 (2020-10-25)
# 1.0.0-rc.8 (2020-10-29)
**Note:** Version bump only for package @chakra-ui/utils
### Bug Fixes
* **toast:** allow custom render in update ([eb8bff9](https://github.com/chakra-ui/chakra-ui/commit/eb8bff911e6ec9de0165ab1e8f5ca10d5e022459)), closes [#2362](https://github.com/chakra-ui/chakra-ui/issues/2362)
# 1.0.0-rc.6 (2020-10-25)
**Note:** Version bump only for package @chakra-ui/utils
# 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-rc.7 (2020-10-25)
**Note:** Version bump only for package @chakra-ui/utils
# 1.0.0-rc.5 (2020-09-27)
# 1.0.0-rc.6 (2020-10-25)
**Note:** Version bump only for package @chakra-ui/utils
# 1.0.0-rc.5 (2020-09-27)
**Note:** Version bump only for package @chakra-ui/utils
# 1.0.0-rc.4 (2020-09-25)

@@ -35,6 +39,2 @@

# 1.0.0-rc.3 (2020-08-30)

@@ -44,6 +44,2 @@

# Change Log

@@ -50,0 +46,0 @@

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

exports.normalizeEventKey = normalizeEventKey;
exports.cx = exports.getOwnerDocument = exports.ariaAttr = exports.dataAttr = exports.isBrowser = exports.getWindow = void 0;
exports.getActiveElement = getActiveElement;
exports.contains = contains;
exports.cx = exports.getDocument = exports.ariaAttr = exports.dataAttr = exports.isBrowser = exports.getWindow = void 0;
var win;

@@ -72,7 +74,7 @@ /**

var getOwnerDocument = function getOwnerDocument(node) {
return (node == null ? void 0 : node.ownerDocument) || document;
var getDocument = function getDocument(node) {
return (node == null ? void 0 : node.ownerDocument) || isBrowser ? document : null;
};
exports.getOwnerDocument = getOwnerDocument;
exports.getDocument = getDocument;

@@ -88,2 +90,11 @@ var cx = function cx() {

exports.cx = cx;
function getActiveElement(node) {
var doc = getDocument(node);
return doc == null ? void 0 : doc.activeElement;
}
function contains(parent, child) {
return parent === child || parent.contains(child);
}
//# sourceMappingURL=dom.js.map

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

function isTabbable(element) {
if (!element) return false;
return isHTMLElement(element) && isFocusable(element) && !hasNegativeTabIndex(element);

@@ -88,0 +89,0 @@ }

@@ -52,3 +52,3 @@ var win;

export var ariaAttr = condition => condition ? true : undefined;
export var getOwnerDocument = node => (node == null ? void 0 : node.ownerDocument) || document;
export var getDocument = node => (node == null ? void 0 : node.ownerDocument) || isBrowser ? document : null;
export var cx = function cx() {

@@ -61,2 +61,9 @@ for (var _len = arguments.length, classNames = new Array(_len), _key = 0; _key < _len; _key++) {

};
export function getActiveElement(node) {
var doc = getDocument(node);
return doc == null ? void 0 : doc.activeElement;
}
export function contains(parent, child) {
return parent === child || parent.contains(child);
}
//# sourceMappingURL=dom.js.map

@@ -48,2 +48,3 @@ // Really great work done by Diego Haz on this one

export function isTabbable(element) {
if (!element) return false;
return isHTMLElement(element) && isFocusable(element) && !hasNegativeTabIndex(element);

@@ -50,0 +51,0 @@ }

/// <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[];
export declare function getFirstFocusable<T extends Element>(container: T): T | null;
export declare function getAllTabbable<T extends Element>(container: T, fallbackToFocusable?: boolean): T[];
export declare function getFirstTabbableIn<T extends Element>(container: T, fallbackToFocusable?: boolean): T | null;
export declare function getLastTabbableIn<T extends Element>(container: T, fallbackToFocusable?: boolean): T | null;
export declare function getNextTabbable<T extends Element>(container: T, fallbackToFocusable?: boolean): T | null;
export declare function getPreviousTabbable<T extends Element>(container: T, fallbackToFocusable?: boolean): T | null;
export declare function focusNextTabbable<T extends Element>(container: T, fallbackToFocusable?: boolean): void;
export declare function focusPreviousTabbable<T extends Element>(container: T, fallbackToFocusable?: boolean): void;
export declare function closest<T extends Element>(element: T, selectors: string): Element | null;
export declare function getAllFocusable<T extends HTMLElement>(container: T): T[];
export declare function getFirstFocusable<T extends HTMLElement>(container: T): T | null;
export declare function getAllTabbable<T extends HTMLElement>(container: T, fallbackToFocusable?: boolean): T[];
export declare function getFirstTabbableIn<T extends HTMLElement>(container: T, fallbackToFocusable?: boolean): T | null;
export declare function getLastTabbableIn<T extends HTMLElement>(container: T, fallbackToFocusable?: boolean): T | null;
export declare function getNextTabbable<T extends HTMLElement>(container: T, fallbackToFocusable?: boolean): T | null;
export declare function getPreviousTabbable<T extends HTMLElement>(container: T, fallbackToFocusable?: boolean): T | null;
export declare function focusNextTabbable<T extends HTMLElement>(container: T, fallbackToFocusable?: boolean): void;
export declare function focusPreviousTabbable<T extends HTMLElement>(container: T, fallbackToFocusable?: boolean): void;
export declare function closest<T extends HTMLElement>(element: T, selectors: string): Element | null;

@@ -16,3 +16,5 @@ import * as React from "react";

export declare const ariaAttr: (condition: boolean | undefined) => true | undefined;
export declare const getOwnerDocument: (node?: HTMLElement | undefined) => Document;
export declare const getDocument: (node?: HTMLElement | null | undefined) => Document | null;
export declare const cx: (...classNames: any[]) => string;
export declare function getActiveElement(node?: HTMLElement): HTMLElement;
export declare function contains(parent: HTMLElement, child: HTMLElement): boolean;

@@ -1,11 +0,11 @@

export declare const hasDisplayNone: (element: Element) => boolean;
export declare const hasTabIndex: (element: Element) => boolean;
export declare const hasDisplayNone: (element: HTMLElement) => boolean;
export declare const hasTabIndex: (element: HTMLElement) => boolean;
export declare const hasNegativeTabIndex: (element: HTMLElement) => boolean;
export declare function isDisabled(element: HTMLElement): boolean;
export declare function hasFocusWithin(element: Element): boolean;
export declare function hasFocusWithin(element: HTMLElement): boolean;
export declare function isHTMLElement(element: any): element is HTMLElement;
export declare function isHidden(element: HTMLElement): boolean;
export declare function isContentEditable(element: HTMLElement): boolean;
export declare function isFocusable(element: Element): boolean;
export declare function isTabbable(element: Element): boolean;
export declare function isFocusable(element: HTMLElement): boolean;
export declare function isTabbable(element?: HTMLElement | null): boolean;
declare const isActiveElement: (element: FocusableElement) => boolean;

@@ -12,0 +12,0 @@ export interface FocusableElement {

{
"name": "@chakra-ui/utils",
"version": "1.0.0-rc.7",
"version": "1.0.0-rc.8",
"description": "Common utilties and types for Chakra UI",

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

},
"gitHead": "6da531af61ae3780c764590cbee62297fb206e46"
"gitHead": "de4cffb1638e8d10cd74515b0289d70eb94931be"
}

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc