@nextui-org/shared-utils
Advanced tools
Comparing version 0.0.0-dev-v2-20230708193349 to 0.0.0-dev-v2-20230709015431
export { Dict, __DEV__, __TEST__, dataAttr, isArray, isEmpty, isEmptyArray, isEmptyObject, isFunction, isNumeric, isObject } from './assertion.js'; | ||
export { clsx } from './clsx.js'; | ||
export { MergeObject, arrayToObject, cleanObject, cleanObjectKeys, compact, copyObject, getKeyValue, getProp, omitObject, renameProp } from './object.js'; | ||
export { safeText } from './text.js'; | ||
export { safeAriaLabel, safeText } from './text.js'; | ||
export { getMargin } from './dimensions.js'; | ||
@@ -6,0 +6,0 @@ export { callAll, callAllHandlers, capitalize, extractProperty, getUniqueID, removeEvents } from './functions.js'; |
@@ -51,2 +51,3 @@ "use strict"; | ||
renameProp: () => renameProp, | ||
safeAriaLabel: () => safeAriaLabel, | ||
safeText: () => safeText, | ||
@@ -212,2 +213,12 @@ warn: () => warn | ||
}; | ||
var safeAriaLabel = (...texts) => { | ||
let ariaLabel = " "; | ||
for (const text of texts) { | ||
if (typeof text === "string" && text.length > 0) { | ||
ariaLabel = text; | ||
break; | ||
} | ||
} | ||
return ariaLabel; | ||
}; | ||
@@ -310,4 +321,5 @@ // src/dimensions.ts | ||
renameProp, | ||
safeAriaLabel, | ||
safeText, | ||
warn | ||
}); |
declare const safeText: (text: string) => string; | ||
declare const safeAriaLabel: (...texts: any[]) => string; | ||
export { safeText }; | ||
export { safeAriaLabel, safeText }; |
@@ -23,2 +23,3 @@ "use strict"; | ||
__export(text_exports, { | ||
safeAriaLabel: () => safeAriaLabel, | ||
safeText: () => safeText | ||
@@ -32,5 +33,16 @@ }); | ||
}; | ||
var safeAriaLabel = (...texts) => { | ||
let ariaLabel = " "; | ||
for (const text of texts) { | ||
if (typeof text === "string" && text.length > 0) { | ||
ariaLabel = text; | ||
break; | ||
} | ||
} | ||
return ariaLabel; | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
safeAriaLabel, | ||
safeText | ||
}); |
{ | ||
"name": "@nextui-org/shared-utils", | ||
"version": "0.0.0-dev-v2-20230708193349", | ||
"version": "0.0.0-dev-v2-20230709015431", | ||
"description": "A set of NextUI utilities", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
39654
1376