@kuma-ui/system
Version:
🐻 Kuma UI is a utility-first, zero-runtime CSS-in-JS library that offers an outstanding developer experience and optimized performance.
374 lines (372 loc) • 7.58 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/keys.ts
var keys_exports = {};
__export(keys_exports, {
isStyledProp: () => isStyledProp,
styleKeys: () => styleKeys
});
module.exports = __toCommonJS(keys_exports);
var styleKeys = {
animation: [
"animation",
"animationComposition",
"animationDelay",
"animationDirection",
"animationDuration",
"animationFillMode",
"animationIterationCount",
"animationName",
"animationPlayState",
"animationTimeline",
"animationTimingFunction"
],
space: [
"margin",
"m",
"marginTop",
"mt",
"marginBottom",
"mb",
"marginLeft",
"ml",
"marginRight",
"mr",
"marginX",
"mx",
"marginY",
"my",
"marginInlineStart",
"marginInlineEnd",
"marginBlockStart",
"marginBlockEnd",
"marginInline",
"marginBlock",
"padding",
"p",
"paddingTop",
"pt",
"paddingBottom",
"pb",
"paddingLeft",
"pl",
"paddingRight",
"pr",
"paddingX",
"px",
"paddingY",
"py",
"paddingInlineStart",
"paddingInlineEnd",
"paddingBlockStart",
"paddingBlockEnd",
"paddingInline",
"paddingBlock"
],
typography: [
"hyphenateCharacter",
"hyphenateLimitChars",
"hyphens",
"hangingPunctuation",
"lineHeight",
"lineBreak",
"letterSpacing",
"orphans",
"quotes",
"rubyPosition",
"unicodeBidi",
"widows",
"whiteSpace",
"wordBreak",
"wordSpacing",
"writingMode"
],
fontKeys: [
"font",
"fontFamily",
"fontFeatureSettings",
"fontKerning",
"fontLanguageOverride",
"fontOpticalSizing",
"fontPalette",
"fontSize",
"fontSizeAdjust",
"fontStretch",
"fontStyle",
"fontSynthesis",
"fontVariant",
"fontVariantAlternates",
"fontVariantCaps",
"fontVariantEastAsian",
"fontVariantEmoji",
"fontVariantLigatures",
"fontVariantNumeric",
"fontVariantPosition",
"fontVariationSettings",
"fontWeight"
],
textKeys: [
"textAlign",
"textAlignLast",
"textCombineUpright",
"textDecoration",
"textDecorationColor",
"textDecorationLine",
"textDecorationSkipInk",
"textDecorationStyle",
"textDecorationThickness",
"textEmphasis",
"textEmphasisColor",
"textEmphasisPosition",
"textEmphasisStyle",
"textIndent",
"textJustify",
"textOrientation",
"textOverflow",
"textRendering",
"textShadow",
"textTransform",
"textUnderlineOffset",
"textUnderlinePosition"
],
layout: [
"width",
"w",
"minWidth",
"minW",
"maxWidth",
"maxW",
"height",
"h",
"minHeight",
"minH",
"maxHeight",
"maxH",
"display",
"overflow",
"overflowX",
"overflowY",
"position",
"zIndex",
"cursor",
"userSelect",
"aspectRatio",
"boxSizing",
"float",
"clear",
"objectFit",
"objectPosition",
"resize",
"verticalAlign"
],
flex: [
"flexDirection",
"flexDir",
"justifyContent",
"justify",
"alignItems",
"alignContent",
"alignSelf",
"flex",
"flexFlow",
"flexWrap",
"flexGrow",
"flexShrink",
"flexBasis",
"justifyItems",
"justifySelf",
"placeItems",
"placeContent",
"gap"
],
color: [
"background",
"bg",
"backgroundColor",
"bgColor",
"color",
"borderColor",
"outlineColor",
"accentColor",
"caretColor",
"opacity",
"visibility"
],
border: [
"border",
"borderWidth",
"borderTopWidth",
"borderBottomWidth",
"borderLeftWidth",
"borderRightWidth",
"borderStyle",
"borderTopStyle",
"borderBottomStyle",
"borderLeftStyle",
"borderRightStyle",
"borderRadius",
"borderTopLeftRadius",
"borderTopRightRadius",
"borderBottomLeftRadius",
"borderBottomRightRadius",
"borderTop",
"borderRight",
"borderBottom",
"borderLeft",
"borderX",
"borderY",
"borderStart",
"borderEnd",
"borderStartWidth",
"borderEndWidth",
"borderStartStyle",
"borderEndStyle",
"borderStartRadius",
"borderEndRadius"
],
outline: [
"outline",
"outlineWidth",
"outlineStyle",
"outlineOffset"
],
position: ["top", "right", "bottom", "left", "inset"],
shadow: ["textShadow", "boxShadow"],
list: [
"listStyle",
"listStyleImage",
"listStylePosition",
"listStyleType"
],
grid: [
"grid",
"gridArea",
"gridAutoColumns",
"gridAutoFlow",
"gridAutoRows",
"gridColumn",
"gridColumnEnd",
"gridColumnStart",
"gridRow",
"gridRowEnd",
"gridRowStart",
"gridTemplate",
"gridTemplateAreas",
"gridTemplateColumns",
"gridTemplateRows",
"gridGap",
"gridColumnGap",
"gridRowGap"
],
column: [
"columnCount",
"columnFill",
"columnGap",
"columnRule",
"columnRuleColor",
"columnRuleStyle",
"columnRuleWidth",
"columnSpan",
"columnWidth",
"columns"
],
contain: [
"contain",
"containIntrinsicBlockSize",
"containIntrinsicHeight",
"containIntrinsicInlineSize",
"containIntrinsicSize",
"containIntrinsicWidth"
],
effect: [
"transition",
"transitionDuration",
"transitionProperty",
"transitionTimingFunction",
"transitionDelay",
"transform",
"transformBox",
"transformOrigin",
"transformStyle",
"clipPath",
"content",
"contentVisibility"
],
mask: [
"mask",
"maskBorder",
"maskBorderMode",
"maskBorderOutset",
"maskBorderRepeat",
"maskBorderSlice",
"maskBorderSource",
"maskBorderWidth",
"maskClip",
"maskComposite",
"maskImage",
"maskMode",
"maskOrigin",
"maskPosition",
"maskRepeat",
"maskSize",
"maskType"
],
background: [
"backgroundImage",
"bgImage",
"backgroundPosition",
"bgPosition",
"backgroundPositionX",
"bgPositionX",
"backgroundPositionY",
"bgPositionY",
"backgroundSize",
"bgSize",
"backgroundRepeat",
"bgRepeat",
"backgroundAttachment",
"bgAttachment",
"backgroundClip",
"bgClip",
"backgroundOrigin",
"bgOrigin",
"backgroundBlendMode",
"bgBlendMode"
],
filter: ["filter", "backdropFilter"]
};
function memo(fn) {
const cache = /* @__PURE__ */ Object.create(null);
return (arg) => {
if (cache[arg] === void 0)
cache[arg] = fn(arg);
return cache[arg];
};
}
var isStyledProp = memo((_prop) => {
const prop = _prop;
return Object.values(styleKeys).some(
(keyGroup) => keyGroup.includes(prop)
);
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
isStyledProp,
styleKeys
});