@chakra-ui/shared-utils
Advanced tools
Comparing version 0.0.0-dev-20220818145526 to 0.0.0-dev-20220818153935
@@ -23,4 +23,6 @@ "use strict"; | ||
__export(src_exports, { | ||
ariaAttr: () => ariaAttr, | ||
callAllHandlers: () => callAllHandlers, | ||
cx: () => cx, | ||
dataAttr: () => dataAttr, | ||
isObject: () => isObject, | ||
@@ -57,6 +59,10 @@ runIfFn: () => runIfFn, | ||
var isFunction = (value) => typeof value === "function"; | ||
var dataAttr = (condition) => condition ? "" : void 0; | ||
var ariaAttr = (condition) => condition ? true : void 0; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
ariaAttr, | ||
callAllHandlers, | ||
cx, | ||
dataAttr, | ||
isObject, | ||
@@ -63,0 +69,0 @@ runIfFn, |
@@ -1,3 +0,1 @@ | ||
declare type FunctionArguments<T extends Function> = T extends (...args: infer R) => any ? R : never; | ||
declare const cx: (...classNames: any[]) => string; | ||
@@ -11,4 +9,8 @@ declare function isObject(value: any): value is Record<string, any>; | ||
declare function runIfFn<T, U>(valueOrFn: T | ((...fnArgs: U[]) => T), ...args: U[]): T; | ||
declare type FunctionArguments<T extends Function> = T extends (...args: infer R) => any ? R : never; | ||
declare function callAllHandlers<T extends (event: any) => void>(...fns: (T | undefined)[]): (event: FunctionArguments<T>[0]) => void; | ||
declare type Booleanish = boolean | "true" | "false"; | ||
declare const dataAttr: (condition: boolean | undefined) => Booleanish; | ||
declare const ariaAttr: (condition: boolean | undefined) => true | undefined; | ||
export { callAllHandlers, cx, isObject, runIfFn, warn }; | ||
export { ariaAttr, callAllHandlers, cx, dataAttr, isObject, runIfFn, warn }; |
@@ -28,5 +28,9 @@ // src/index.ts | ||
var isFunction = (value) => typeof value === "function"; | ||
var dataAttr = (condition) => condition ? "" : void 0; | ||
var ariaAttr = (condition) => condition ? true : void 0; | ||
export { | ||
ariaAttr, | ||
callAllHandlers, | ||
cx, | ||
dataAttr, | ||
isObject, | ||
@@ -33,0 +37,0 @@ runIfFn, |
{ | ||
"name": "@chakra-ui/shared-utils", | ||
"version": "0.0.0-dev-20220818145526", | ||
"version": "0.0.0-dev-20220818153935", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
6542
120