first commit
This commit is contained in:
29
node_modules/lucide-react/dist/esm/shared/src/utils.js
generated
vendored
Normal file
29
node_modules/lucide-react/dist/esm/shared/src/utils.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @license lucide-react v0.555.0 - ISC
|
||||
*
|
||||
* This source code is licensed under the ISC license.
|
||||
* See the LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
||||
const toCamelCase = (string) => string.replace(
|
||||
/^([A-Z])|[\s-_]+(\w)/g,
|
||||
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
||||
);
|
||||
const toPascalCase = (string) => {
|
||||
const camelCase = toCamelCase(string);
|
||||
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
||||
};
|
||||
const mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
||||
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
||||
}).join(" ").trim();
|
||||
const hasA11yProp = (props) => {
|
||||
for (const prop in props) {
|
||||
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export { hasA11yProp, mergeClasses, toCamelCase, toKebabCase, toPascalCase };
|
||||
//# sourceMappingURL=utils.js.map
|
||||
1
node_modules/lucide-react/dist/esm/shared/src/utils.js.map
generated
vendored
Normal file
1
node_modules/lucide-react/dist/esm/shared/src/utils.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user