Socket
Socket
Sign inDemoInstall

@yamada-ui/utils

Package Overview
Dependencies
Maintainers
1
Versions
389
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yamada-ui/utils - npm Package Compare versions

Comparing version 0.1.5 to 0.2.0

dist/chunk-32BEUAHK.mjs

20

dist/color.d.ts
import { Dict } from './index.types.js';
declare const isGray: (colorScheme: string) => boolean;
declare const getColor: (color: string, fallback?: string) => (theme: Dict, colorMode: 'light' | 'dark' | undefined) => string;
declare const lightenColor: (color: string, amount: number) => (theme: Dict, colorMode: 'light' | 'dark' | undefined) => string;
declare const darkenColor: (color: string, amount: number) => (theme: Dict, colorMode: 'light' | 'dark' | undefined) => string;
declare const tintColor: (color: string, amount: number) => (theme: Dict, colorMode: 'light' | 'dark' | undefined) => string;
declare const shadeColor: (color: string, amount: number) => (theme: Dict, colorMode: 'light' | 'dark' | undefined) => string;
declare const transparentizeColor: (color: string, alpha: number) => (theme: Dict, colorMode: 'light' | 'dark' | undefined) => string;
declare const toneColor: (color: string, l: number) => (theme: Dict, colorMode: 'light' | 'dark' | undefined) => string;
declare const getColor: (color: string, fallback?: string) => (theme: Dict, colorMode?: 'light' | 'dark') => string;
declare const lightenColor: (color: string, amount: number) => (theme?: Dict, colorMode?: 'light' | 'dark') => string;
declare const darkenColor: (color: string, amount: number) => (theme?: Dict, colorMode?: 'light' | 'dark') => string;
declare const tintColor: (color: string, amount: number) => (theme?: Dict, colorMode?: 'light' | 'dark') => string;
declare const shadeColor: (color: string, amount: number) => (theme?: Dict, colorMode?: 'light' | 'dark') => string;
declare const transparentizeColor: (color: string, alpha: number) => (theme?: Dict, colorMode?: 'light' | 'dark') => string;
declare const toneColor: (color: string, l: number) => (theme?: Dict, colorMode?: 'light' | 'dark') => string;
declare const randomColor: ({ string, colors, }?: {

@@ -15,6 +15,6 @@ string?: string | undefined;

}) => string;
declare const isTone: (color: string) => (theme: Dict, colorMode: 'light' | 'dark' | undefined) => "light" | "dark";
declare const isLight: (color: string) => (theme: Dict, colorMode: 'light' | 'dark' | undefined) => boolean;
declare const isDark: (color: string) => (theme: Dict, colorMode: 'light' | 'dark' | undefined) => boolean;
declare const isTone: (color: string) => (theme?: Dict, colorMode?: 'light' | 'dark') => "light" | "dark";
declare const isLight: (color: string) => (theme?: Dict, colorMode?: 'light' | 'dark') => boolean;
declare const isDark: (color: string) => (theme?: Dict, colorMode?: 'light' | 'dark') => boolean;
export { darkenColor, getColor, isDark, isGray, isLight, isTone, lightenColor, randomColor, shadeColor, tintColor, toneColor, transparentizeColor };

@@ -87,23 +87,23 @@ "use strict";

var lightenColor = (color, amount) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
return (0, import_color2k.toHex)((0, import_color2k.lighten)(raw, amount / 100));
};
var darkenColor = (color, amount) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
return (0, import_color2k.toHex)((0, import_color2k.darken)(raw, amount / 100));
};
var tintColor = (color, amount) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
return (0, import_color2k.toHex)((0, import_color2k.mix)(raw, "#fff", amount));
};
var shadeColor = (color, amount) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
return (0, import_color2k.toHex)((0, import_color2k.mix)(raw, "#000", amount / 100));
};
var transparentizeColor = (color, alpha) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
return (0, import_color2k.transparentize)(raw, 1 - alpha);
};
var toneColor = (color, l) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
if (l < 0 || 900 < l)

@@ -165,3 +165,3 @@ return color;

var isTone = (color) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
const brightness = getBrightness(raw);

@@ -168,0 +168,0 @@ const isDark2 = brightness < 128;

@@ -597,23 +597,23 @@ "use strict";

var lightenColor = (color, amount) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
return (0, import_color2k.toHex)((0, import_color2k.lighten)(raw, amount / 100));
};
var darkenColor = (color, amount) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
return (0, import_color2k.toHex)((0, import_color2k.darken)(raw, amount / 100));
};
var tintColor = (color, amount) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
return (0, import_color2k.toHex)((0, import_color2k.mix)(raw, "#fff", amount));
};
var shadeColor = (color, amount) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
return (0, import_color2k.toHex)((0, import_color2k.mix)(raw, "#000", amount / 100));
};
var transparentizeColor = (color, alpha) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
return (0, import_color2k.transparentize)(raw, 1 - alpha);
};
var toneColor = (color, l) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
if (l < 0 || 900 < l)

@@ -675,3 +675,3 @@ return color;

var isTone = (color) => (theme, colorMode) => {
const raw = getColor(color)(theme, colorMode);
const raw = theme ? getColor(color)(theme, colorMode) : color;
const brightness = getBrightness(raw);

@@ -678,0 +678,0 @@ const isDark2 = brightness < 128;

{
"name": "@yamada-ui/utils",
"version": "0.1.5",
"version": "0.2.0",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc