Download chakra-ui/packages/react/src/styled-system/composition.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 3.69 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/src/styled-system/composition.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/src/styled-system/composition.ts
-
curl -L -o composition.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/src/styled-system/composition.ts
3.69 kB
| import type { CompositionStyleObject } from "./css.types" | |
| interface Token<T> { | |
| value: T | |
| description?: string | undefined | |
| } | |
| interface Recursive<T> { | |
| [key: string]: Recursive<T> | T | |
| } | |
| /* ----------------------------------------------------------------------------- | |
| * Text styles | |
| * -----------------------------------------------------------------------------*/ | |
| type TextStyleProperty = | |
| | "fontSize" | |
| | "fontSizeAdjust" | |
| | "fontVariationSettings" | |
| | "fontVariantPosition" | |
| | "fontVariantCaps" | |
| | "fontVariantNumeric" | |
| | "fontVariantAlternates" | |
| | "fontVariantLigatures" | |
| | "fontFamily" | |
| | "fontWeight" | |
| | "fontSynthesis" | |
| | "fontStyle" | |
| | "fontVariant" | |
| | "lineHeight" | |
| | "letterSpacing" | |
| | "textDecoration" | |
| | "textTransform" | |
| | "textIndent" | |
| | "textDecorationColor" | |
| | "textDecorationLine" | |
| | "textDecorationStyle" | |
| | "textEmphasisColor" | |
| | "textEmphasisPosition" | |
| | "textEmphasisStyle" | |
| | "hyphenateCharacter" | |
| | "textOrientation" | |
| | "textOverflow" | |
| | "textRendering" | |
| export type TextStyle = CompositionStyleObject<TextStyleProperty> | |
| export type TextStyles = Recursive<Token<TextStyle>> | |
| /* ----------------------------------------------------------------------------- | |
| * Layer styles | |
| * -----------------------------------------------------------------------------*/ | |
| type LogicalPlacement = | |
| | "Inline" | |
| | "Block" | |
| | "InlineStart" | |
| | "InlineEnd" | |
| | "BlockStart" | |
| | "BlockEnd" | |
| type PhysicalPlacement = "Top" | "Right" | "Bottom" | "Left" | |
| type Placement = PhysicalPlacement | LogicalPlacement | |
| type Radius = | |
| | `Top${"Right" | "Left"}` | |
| | `Bottom${"Right" | "Left"}` | |
| | `Start${"Start" | "End"}` | |
| | `End${"Start" | "End"}` | |
| type LayerStyleProperty = | |
| | "background" | |
| | "bg" | |
| | "backgroundColor" | |
| | "bgColor" | |
| | "backgroundImage" | |
| | "bgImage" | |
| | "content" | |
| | "borderRadius" | |
| | "border" | |
| | "borderWidth" | |
| | "borderColor" | |
| | "borderStyle" | |
| | "boxShadow" | |
| | "boxShadowColor" | |
| | "filter" | |
| | "backdropFilter" | |
| | "transform" | |
| | "cursor" | |
| | "color" | |
| | "opacity" | |
| | "backgroundBlendMode" | |
| | "backgroundAttachment" | |
| | "backgroundClip" | |
| | "backgroundOrigin" | |
| | "backgroundPosition" | |
| | "backgroundRepeat" | |
| | "backgroundSize" | |
| | `border${Placement}` | |
| | `border${Placement}Width` | |
| | "borderRadius" | |
| | `border${Radius}Radius` | |
| | `border${Placement}Color` | |
| | `border${Placement}Style` | |
| | "padding" | |
| | "position" | |
| | "zIndex" | |
| | `padding${Placement}` | |
| | "height" | |
| | "width" | |
| | "minHeight" | |
| | "minWidth" | |
| | "maxHeight" | |
| | "maxWidth" | |
| | `margin${Placement}` | |
| | "inset" | |
| | `inset${LogicalPlacement}` | |
| | Lowercase<PhysicalPlacement> | |
| | "outline" | |
| | "outlineColor" | |
| | "outlineStyle" | |
| | "outlineWidth" | |
| | "outlineOffset" | |
| | "transition" | |
| export type LayerStyle = CompositionStyleObject<LayerStyleProperty> | |
| export type LayerStyles = Recursive<Token<LayerStyle>> | |
| /* ----------------------------------------------------------------------------- | |
| * Motion styles | |
| * -----------------------------------------------------------------------------*/ | |
| type AnimationStyleProperty = | |
| | "animation" | |
| | "animationComposition" | |
| | "animationDelay" | |
| | "animationDirection" | |
| | "animationDuration" | |
| | "animationFillMode" | |
| | "animationIterationCount" | |
| | "animationName" | |
| | "animationPlayState" | |
| | "animationTimingFunction" | |
| | "animationRange" | |
| | "animationRangeStart" | |
| | "animationRangeEnd" | |
| | "animationTimeline" | |
| | "transformOrigin" | |
| export type AnimationStyle = CompositionStyleObject<AnimationStyleProperty> | |
| export type AnimationStyles = Recursive<Token<AnimationStyle>> | |
| export interface CompositionStyles { | |
| textStyles: TextStyles | |
| layerStyles: LayerStyles | |
| animationStyles: AnimationStyles | |
| } | |