@yamada-ui/utils
Advanced tools
Comparing version 1.5.3 to 1.5.4-dev-20241017182129
@@ -6,3 +6,3 @@ import { StringLiteral, Dict } from './index.types.js'; | ||
type ColorFormat = "hex" | "hexa" | "hsl" | "hsla" | "rgb" | "rgba"; | ||
declare const SEMANTIC_COLOR_SCHEMES: readonly ["mono", "primary", "secondary", "info", "success", "warning", "danger", "link"]; | ||
declare const SEMANTIC_COLOR_SCHEMES: readonly ["primary", "secondary", "info", "success", "warning", "danger", "link"]; | ||
declare const COLOR_SCHEMES: readonly ["gray", "neutral", "red", "rose", "pink", "flashy", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia"]; | ||
@@ -9,0 +9,0 @@ type SemanticColorScheme = (typeof SEMANTIC_COLOR_SCHEMES)[number] | StringLiteral; |
@@ -107,3 +107,2 @@ "use strict"; | ||
var SEMANTIC_COLOR_SCHEMES = [ | ||
"mono", | ||
"primary", | ||
@@ -110,0 +109,0 @@ "secondary", |
@@ -13,3 +13,3 @@ export { filterEmpty } from './array.js'; | ||
export { AsyncFnReturn, AsyncState, AsyncStateRetry, FunctionReturningPromise, MaybeRenderProp, PromiseType, UseIsMountedProps, UseIsMountedReturn, assignRef, createContext, createId, cx, findChild, findChildren, getValidChildren, includesChildren, isRefObject, isSomeElement, isValidElement, mergeRefs, omitChildren, pickChildren, useAsync, useAsyncFunc, useAsyncRetry, useCallbackRef, useIsMounted, useMergeRefs, useSafeLayoutEffect, useUnmountEffect, useUpdateEffect } from './react.js'; | ||
export { antonym, escape, toCamelCase, toKebabCase, toTitleCase } from './string.js'; | ||
export { antonym, escape, toCamelCase, toKebabCase, toPascalCase, toTitleCase } from './string.js'; | ||
import 'react'; |
@@ -152,2 +152,3 @@ "use strict"; | ||
toNumber: () => toNumber, | ||
toPascalCase: () => toPascalCase, | ||
toPrecision: () => toPrecision, | ||
@@ -429,3 +430,2 @@ toTitleCase: () => toTitleCase, | ||
var SEMANTIC_COLOR_SCHEMES = [ | ||
"mono", | ||
"primary", | ||
@@ -1270,4 +1270,7 @@ "secondary", | ||
function toCamelCase(value) { | ||
return value.toLowerCase().replace(/[_-](.)/g, (_, val) => val.toUpperCase()).replace(/^(.)/, (_, val) => val.toUpperCase()); | ||
return value.toLowerCase().replace(/[_-](.)/g, (_, val) => val.toUpperCase()); | ||
} | ||
function toPascalCase(value) { | ||
return toCamelCase(value).replace(/^(.)/, (_, val) => val.toUpperCase()); | ||
} | ||
function toKebabCase(value) { | ||
@@ -1400,2 +1403,3 @@ return value.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""); | ||
toNumber, | ||
toPascalCase, | ||
toPrecision, | ||
@@ -1402,0 +1406,0 @@ toTitleCase, |
@@ -6,5 +6,6 @@ import { StringLiteral } from './index.types.js'; | ||
declare function toCamelCase(value: StringLiteral): string; | ||
declare function toPascalCase(value: StringLiteral): string; | ||
declare function toKebabCase(value: StringLiteral): string; | ||
declare function toTitleCase(value: StringLiteral): string; | ||
export { antonym, escape, toCamelCase, toKebabCase, toTitleCase }; | ||
export { antonym, escape, toCamelCase, toKebabCase, toPascalCase, toTitleCase }; |
@@ -27,2 +27,3 @@ "use strict"; | ||
toKebabCase: () => toKebabCase, | ||
toPascalCase: () => toPascalCase, | ||
toTitleCase: () => toTitleCase | ||
@@ -73,4 +74,7 @@ }); | ||
function toCamelCase(value) { | ||
return value.toLowerCase().replace(/[_-](.)/g, (_, val) => val.toUpperCase()).replace(/^(.)/, (_, val) => val.toUpperCase()); | ||
return value.toLowerCase().replace(/[_-](.)/g, (_, val) => val.toUpperCase()); | ||
} | ||
function toPascalCase(value) { | ||
return toCamelCase(value).replace(/^(.)/, (_, val) => val.toUpperCase()); | ||
} | ||
function toKebabCase(value) { | ||
@@ -88,4 +92,5 @@ return value.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase().replace(/^-/, ""); | ||
toKebabCase, | ||
toPascalCase, | ||
toTitleCase | ||
}); | ||
//# sourceMappingURL=string.js.map |
{ | ||
"name": "@yamada-ui/utils", | ||
"version": "1.5.3", | ||
"version": "1.5.4-dev-20241017182129", | ||
"description": "Yamada UI utils", | ||
@@ -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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
419583
5409
1