/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
const require_index = require("../../fixtures/dist/index.cjs");
const require_index$1 = require("../../palette/dist/index.cjs");
//#region ../css-tokens/dist/index.js
/*! © 2026 Yahoo, Inc. UDS Motion Tokens v0.0.0-development */
const UDS_PREFIX = "uds";
const AVATAR_SIZE_PREFIX = `uds-avatar-size`;
const BACKGROUND_COLOR_PREFIX = `uds-background-color`;
const BORDER_RADIUS_PREFIX = `uds-border-radius`;
const BORDER_WIDTH_PREFIX = `uds-border-width`;
const DROP_SHADOW_PREFIX = `uds-drop-shadow`;
const INSET_SHADOW_PREFIX = `uds-inset-shadow`;
const BACKGROUND_BLUR_RADIUS_PREFIX = `uds-background-blur-radius`;
const BACKGROUND_BLUR_COLOR_PREFIX = `uds-background-blur-color`;
const BACKGROUND_BLUR_FALLBACK_COLOR_PREFIX = `uds-background-blur-fallback-color`;
const FONT_FAMILY_PREFIX = `uds-font`;
const FONT_SIZE_PREFIX = `uds-font-size`;
const FONT_WEIGHT_PREFIX = `uds-font-weight`;
const FONT_SLANT_PREFIX = `uds-font-slant`;
const FONT_WIDTH_PREFIX = `uds-font-width`;
const ICON_SIZE_PREFIX = `uds-icon-size`;
const LINE_COLOR_PREFIX = `uds-line-color`;
const LINE_HEIGHT_PREFIX = `uds-line-height`;
const LETTER_SPACING_PREFIX = `uds-letter-spacing`;
const MOTION_PREFIX = `uds-motion`;
const OUTLINE_PREFIX = `uds-outline`;
const SPECTRUM_COLOR_PREFIX = `uds-spectrum-color`;
const TEXT_TRANSFORM_PREFIX = `uds-text-transform`;
const DARK_COLOR_MODE_CLASSNAME = `uds-color-mode-dark`;
const LIGHT_COLOR_MODE_CLASSNAME = `uds-color-mode-light`;
const SYSTEM_COLOR_MODE_CLASSNAME = `uds-color-mode-system`;
const INVERT_COLOR_MODE_CLASSNAME = `uds-color-mode-invert`;
const XSMALL_SCALE_MODE_CLASSNAME = `uds-scale-mode-xsmall`;
const SMALL_SCALE_MODE_CLASSNAME = `uds-scale-mode-small`;
const MEDIUM_SCALE_MODE_CLASSNAME = `uds-scale-mode-medium`;
const LARGE_SCALE_MODE_CLASSNAME = `uds-scale-mode-large`;
const XLARGE_SCALE_MODE_CLASSNAME = `uds-scale-mode-xlarge`;
const XXLARGE_SCALE_MODE_CLASSNAME = `uds-scale-mode-xxlarge`;
const XXXLARGE_SCALE_MODE_CLASSNAME = `uds-scale-mode-xxxlarge`;
const DEFAULT_COLOR_MODE_CLASSNAME = LIGHT_COLOR_MODE_CLASSNAME;
const DEFAULT_SCALE_MODE_CLASSNAME = LARGE_SCALE_MODE_CLASSNAME;
const TEXT_RESPONSIVE_CLASSNAME = "uds-text-responsive";
const TEXT_RESPONSIVE_BREAKPOINT_CLASSNAMES = {
	defaultBreakpoint: "uds-text-default",
	base: "uds-text-base",
	sm: "uds-text-sm",
	md: "uds-text-md",
	lg: "uds-text-lg",
	xl: "uds-text-xl",
	"2xl": "uds-text-2xl"
};
const BUTTON_GAP_VAR = `--uds-button-gap`;
const BUTTON_SCALE_EFFECT = `--uds-button-scale-effect`;
const BUTTON_SCALE_EFFECT_REST = `${BUTTON_SCALE_EFFECT}-rest`;
const BUTTON_SCALE_EFFECT_HOVER = `${BUTTON_SCALE_EFFECT}-hover`;
const BUTTON_SCALE_EFFECT_PRESSED = `${BUTTON_SCALE_EFFECT}-pressed`;
const PSEUDO_STYLE_SELECTOR_MAP = {
	hover: ":hover:not([disabled])",
	pressed: ":active:not([disabled])",
	disabled: ":disabled",
	focused: ":focus-visible",
	focusedWithin: ":has(:focus-visible)",
	notDisabled: ":not(:has(:disabled))"
};
/**
* These CSS utilities are temporarily housed here because they are shared
* dependencies between:
* - @yahoo/uds-automated-config (component automation/styling generation)
* - @yahoo/uds (tailwind plugin for shadow generation)
*
* Placing them in css-tokens avoids circular dependencies between these packages.
* TODO: Consider creating a dedicated shared utilities package if this grows.
*/
const textVariantsSafe = (variant) => variant.replace("/", "-");
function hexToRgb(hex) {
	hex = hex.replace("#", "");
	if (hex.length === 3) hex = hex.split("").map((char) => char + char).join("");
	return `${parseInt(hex.substring(0, 2), 16)} ${parseInt(hex.substring(2, 4), 16)} ${parseInt(hex.substring(4, 6), 16)}`;
}
const RGB = {
	white: hexToRgb(require_index$1.newAlwaysPalette["always/white"]),
	black: hexToRgb(require_index$1.newAlwaysPalette["always/black"]),
	brand: hexToRgb(require_index$1.newAlwaysPalette["always/brand"]),
	accent: hexToRgb(require_index$1.newAlwaysPalette["always/accent"])
};
const ALWAYS_AS_RGB = {
	black: RGB.black,
	white: RGB.white,
	"always/black": RGB.black,
	"always/white": RGB.white,
	"always/brand": RGB.brand,
	"always/accent": RGB.accent
};
/**
* Generate a single shadow value from a shadow preset configuration
*
* @param preset - The shadow preset configuration
* @param index - Optional index for numbered shadows (2-5)
* @param shadowType - The type of shadow (drop or inset)
* @returns A CSS box-shadow value string
*/
function getShadowLayerValue({ preset, prefix, shadowType, cssVarPrefix }) {
	const varPrefix = cssVarPrefix ?? `--uds-${shadowType}-shadow-`;
	const isPaletteColor = preset.color?.type === "palette";
	const isAlwaysColor = preset.color?.type === "always";
	let shadowColor = `var(--uds-${isPaletteColor ? "shadow" : "spectrum"}-color-${preset?.color?.value})`;
	if (isAlwaysColor) shadowColor = ALWAYS_AS_RGB[preset.color.value];
	const defaultColor = `var(${varPrefix}${prefix ? `${prefix}-` : ""}color, ${shadowColor})`;
	const cssValues = [
		`${require_index.shadowOffsetMap[preset.offsetX]}px`,
		`${require_index.shadowOffsetMap[preset.offsetY]}px`,
		`${require_index.spacingMap[preset.blur]}px`,
		`${require_index.shadowSpreadRadiusMap[preset.spread]}px`
	].map((value) => value).join(" ");
	const colorValue = `rgb(${defaultColor} / var(${varPrefix}${prefix ? `${prefix}-` : ""}opacity, ${Number(preset.opacity) / 100}))`;
	return `${shadowType === "inset" ? "inset " : ""}${cssValues} ${colorValue}`;
}
function getMotionVar({ variant, speed, control }) {
	return `${[
		`--${MOTION_PREFIX}`,
		variant,
		speed,
		control
	].join("-")}`;
}
//#endregion
exports.AVATAR_SIZE_PREFIX = AVATAR_SIZE_PREFIX;
exports.BACKGROUND_BLUR_COLOR_PREFIX = BACKGROUND_BLUR_COLOR_PREFIX;
exports.BACKGROUND_BLUR_FALLBACK_COLOR_PREFIX = BACKGROUND_BLUR_FALLBACK_COLOR_PREFIX;
exports.BACKGROUND_BLUR_RADIUS_PREFIX = BACKGROUND_BLUR_RADIUS_PREFIX;
exports.BACKGROUND_COLOR_PREFIX = BACKGROUND_COLOR_PREFIX;
exports.BORDER_RADIUS_PREFIX = BORDER_RADIUS_PREFIX;
exports.BORDER_WIDTH_PREFIX = BORDER_WIDTH_PREFIX;
exports.BUTTON_GAP_VAR = BUTTON_GAP_VAR;
exports.BUTTON_SCALE_EFFECT = BUTTON_SCALE_EFFECT;
exports.BUTTON_SCALE_EFFECT_HOVER = BUTTON_SCALE_EFFECT_HOVER;
exports.BUTTON_SCALE_EFFECT_PRESSED = BUTTON_SCALE_EFFECT_PRESSED;
exports.BUTTON_SCALE_EFFECT_REST = BUTTON_SCALE_EFFECT_REST;
exports.DARK_COLOR_MODE_CLASSNAME = DARK_COLOR_MODE_CLASSNAME;
exports.DEFAULT_COLOR_MODE_CLASSNAME = DEFAULT_COLOR_MODE_CLASSNAME;
exports.DEFAULT_SCALE_MODE_CLASSNAME = DEFAULT_SCALE_MODE_CLASSNAME;
exports.DROP_SHADOW_PREFIX = DROP_SHADOW_PREFIX;
exports.FONT_FAMILY_PREFIX = FONT_FAMILY_PREFIX;
exports.FONT_SIZE_PREFIX = FONT_SIZE_PREFIX;
exports.FONT_SLANT_PREFIX = FONT_SLANT_PREFIX;
exports.FONT_WEIGHT_PREFIX = FONT_WEIGHT_PREFIX;
exports.FONT_WIDTH_PREFIX = FONT_WIDTH_PREFIX;
exports.ICON_SIZE_PREFIX = ICON_SIZE_PREFIX;
exports.INSET_SHADOW_PREFIX = INSET_SHADOW_PREFIX;
exports.INVERT_COLOR_MODE_CLASSNAME = INVERT_COLOR_MODE_CLASSNAME;
exports.LARGE_SCALE_MODE_CLASSNAME = LARGE_SCALE_MODE_CLASSNAME;
exports.LETTER_SPACING_PREFIX = LETTER_SPACING_PREFIX;
exports.LIGHT_COLOR_MODE_CLASSNAME = LIGHT_COLOR_MODE_CLASSNAME;
exports.LINE_COLOR_PREFIX = LINE_COLOR_PREFIX;
exports.LINE_HEIGHT_PREFIX = LINE_HEIGHT_PREFIX;
exports.MEDIUM_SCALE_MODE_CLASSNAME = MEDIUM_SCALE_MODE_CLASSNAME;
exports.MOTION_PREFIX = MOTION_PREFIX;
exports.OUTLINE_PREFIX = OUTLINE_PREFIX;
exports.PSEUDO_STYLE_SELECTOR_MAP = PSEUDO_STYLE_SELECTOR_MAP;
exports.SMALL_SCALE_MODE_CLASSNAME = SMALL_SCALE_MODE_CLASSNAME;
exports.SPECTRUM_COLOR_PREFIX = SPECTRUM_COLOR_PREFIX;
exports.SYSTEM_COLOR_MODE_CLASSNAME = SYSTEM_COLOR_MODE_CLASSNAME;
exports.TEXT_RESPONSIVE_BREAKPOINT_CLASSNAMES = TEXT_RESPONSIVE_BREAKPOINT_CLASSNAMES;
exports.TEXT_RESPONSIVE_CLASSNAME = TEXT_RESPONSIVE_CLASSNAME;
exports.TEXT_TRANSFORM_PREFIX = TEXT_TRANSFORM_PREFIX;
exports.UDS_PREFIX = UDS_PREFIX;
exports.XLARGE_SCALE_MODE_CLASSNAME = XLARGE_SCALE_MODE_CLASSNAME;
exports.XSMALL_SCALE_MODE_CLASSNAME = XSMALL_SCALE_MODE_CLASSNAME;
exports.XXLARGE_SCALE_MODE_CLASSNAME = XXLARGE_SCALE_MODE_CLASSNAME;
exports.XXXLARGE_SCALE_MODE_CLASSNAME = XXXLARGE_SCALE_MODE_CLASSNAME;
exports.getMotionVar = getMotionVar;
exports.getShadowLayerValue = getShadowLayerValue;
exports.textVariantsSafe = textVariantsSafe;
