@stokelp/styled-system 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/conditions.mjs +34 -0
- package/css/css.d.ts +9 -0
- package/css/css.mjs +45 -0
- package/css/cva.d.ts +6 -0
- package/css/cva.mjs +87 -0
- package/css/cx.d.ts +5 -0
- package/css/cx.mjs +15 -0
- package/css/index.d.ts +5 -0
- package/css/index.mjs +4 -0
- package/css/sva.d.ts +4 -0
- package/css/sva.mjs +41 -0
- package/jsx/aspect-ratio.d.ts +10 -0
- package/jsx/aspect-ratio.mjs +14 -0
- package/jsx/bleed.d.ts +10 -0
- package/jsx/bleed.mjs +14 -0
- package/jsx/box.d.ts +10 -0
- package/jsx/box.mjs +14 -0
- package/jsx/center.d.ts +10 -0
- package/jsx/center.mjs +14 -0
- package/jsx/circle.d.ts +10 -0
- package/jsx/circle.mjs +14 -0
- package/jsx/container.d.ts +10 -0
- package/jsx/container.mjs +14 -0
- package/jsx/cq.d.ts +10 -0
- package/jsx/cq.mjs +14 -0
- package/jsx/divider.d.ts +10 -0
- package/jsx/divider.mjs +14 -0
- package/jsx/factory-helper.mjs +22 -0
- package/jsx/factory.d.ts +3 -0
- package/jsx/factory.mjs +80 -0
- package/jsx/flex.d.ts +10 -0
- package/jsx/flex.mjs +14 -0
- package/jsx/float.d.ts +10 -0
- package/jsx/float.mjs +14 -0
- package/jsx/grid-item.d.ts +10 -0
- package/jsx/grid-item.mjs +14 -0
- package/jsx/grid.d.ts +10 -0
- package/jsx/grid.mjs +14 -0
- package/jsx/hstack.d.ts +10 -0
- package/jsx/hstack.mjs +14 -0
- package/jsx/index.d.ts +25 -0
- package/jsx/index.mjs +23 -0
- package/jsx/is-valid-prop.d.ts +11 -0
- package/jsx/is-valid-prop.mjs +17 -0
- package/jsx/link-box.d.ts +10 -0
- package/jsx/link-box.mjs +14 -0
- package/jsx/link-overlay.d.ts +10 -0
- package/jsx/link-overlay.mjs +14 -0
- package/jsx/spacer.d.ts +10 -0
- package/jsx/spacer.mjs +14 -0
- package/jsx/square.d.ts +10 -0
- package/jsx/square.mjs +14 -0
- package/jsx/stack.d.ts +10 -0
- package/jsx/stack.mjs +14 -0
- package/jsx/visually-hidden.d.ts +10 -0
- package/jsx/visually-hidden.mjs +14 -0
- package/jsx/vstack.d.ts +10 -0
- package/jsx/vstack.mjs +14 -0
- package/jsx/wrap.d.ts +10 -0
- package/jsx/wrap.mjs +14 -0
- package/package.json +56 -0
- package/panda.buildinfo.json +75 -0
- package/patterns/aspect-ratio.d.ts +21 -0
- package/patterns/aspect-ratio.mjs +38 -0
- package/patterns/bleed.d.ts +22 -0
- package/patterns/bleed.mjs +24 -0
- package/patterns/box.d.ts +21 -0
- package/patterns/box.mjs +15 -0
- package/patterns/center.d.ts +21 -0
- package/patterns/center.mjs +21 -0
- package/patterns/circle.d.ts +21 -0
- package/patterns/circle.mjs +25 -0
- package/patterns/container.d.ts +21 -0
- package/patterns/container.mjs +21 -0
- package/patterns/cq.d.ts +22 -0
- package/patterns/cq.mjs +21 -0
- package/patterns/divider.d.ts +23 -0
- package/patterns/divider.mjs +25 -0
- package/patterns/flex.d.ts +27 -0
- package/patterns/flex.mjs +26 -0
- package/patterns/float.d.ts +24 -0
- package/patterns/float.mjs +52 -0
- package/patterns/grid-item.d.ts +26 -0
- package/patterns/grid-item.mjs +25 -0
- package/patterns/grid.d.ts +25 -0
- package/patterns/grid.mjs +27 -0
- package/patterns/hstack.d.ts +22 -0
- package/patterns/hstack.mjs +24 -0
- package/patterns/index.d.ts +22 -0
- package/patterns/index.mjs +21 -0
- package/patterns/link-box.d.ts +21 -0
- package/patterns/link-box.mjs +22 -0
- package/patterns/link-overlay.d.ts +21 -0
- package/patterns/link-overlay.mjs +27 -0
- package/patterns/spacer.d.ts +21 -0
- package/patterns/spacer.mjs +21 -0
- package/patterns/square.d.ts +21 -0
- package/patterns/square.mjs +24 -0
- package/patterns/stack.d.ts +24 -0
- package/patterns/stack.mjs +24 -0
- package/patterns/visually-hidden.d.ts +21 -0
- package/patterns/visually-hidden.mjs +18 -0
- package/patterns/vstack.d.ts +22 -0
- package/patterns/vstack.mjs +24 -0
- package/patterns/wrap.d.ts +25 -0
- package/patterns/wrap.mjs +25 -0
- package/recipes/accordion.d.ts +28 -0
- package/recipes/accordion.mjs +56 -0
- package/recipes/button.d.ts +30 -0
- package/recipes/button.mjs +116 -0
- package/recipes/checkbox.d.ts +28 -0
- package/recipes/checkbox.mjs +52 -0
- package/recipes/create-recipe.mjs +82 -0
- package/recipes/drawer.d.ts +28 -0
- package/recipes/drawer.mjs +77 -0
- package/recipes/form-control.d.ts +28 -0
- package/recipes/form-control.mjs +24 -0
- package/recipes/form-helper-text.d.ts +28 -0
- package/recipes/form-helper-text.mjs +24 -0
- package/recipes/form-label.d.ts +28 -0
- package/recipes/form-label.mjs +36 -0
- package/recipes/heading.d.ts +30 -0
- package/recipes/heading.mjs +41 -0
- package/recipes/index.d.ts +12 -0
- package/recipes/index.mjs +11 -0
- package/recipes/switch-recipe.d.ts +28 -0
- package/recipes/switch-recipe.mjs +52 -0
- package/recipes/text.d.ts +31 -0
- package/recipes/text.mjs +41 -0
- package/recipes/textarea.d.ts +28 -0
- package/recipes/textarea.mjs +24 -0
- package/tokens/index.d.ts +9 -0
- package/tokens/index.mjs +1496 -0
- package/tokens/tokens.d.ts +63 -0
- package/types/composition.d.ts +111 -0
- package/types/conditions.d.ts +270 -0
- package/types/csstype.d.ts +21298 -0
- package/types/global.d.ts +19 -0
- package/types/index.d.ts +8 -0
- package/types/jsx.d.ts +52 -0
- package/types/parts.d.ts +8 -0
- package/types/pattern.d.ts +74 -0
- package/types/prop-type.d.ts +242 -0
- package/types/recipe.d.ts +173 -0
- package/types/selectors.d.ts +59 -0
- package/types/static-css.d.ts +51 -0
- package/types/style-props.d.ts +7468 -0
- package/types/system-types.d.ts +89 -0
package/jsx/float.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getFloatStyle } from '../patterns/float.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Float = /* @__PURE__ */ forwardRef(function Float(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["offsetX","offsetY","offset","placement"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getFloatStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { GridItemProperties } from '../patterns/grid-item';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface GridItemProps extends GridItemProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof GridItemProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const GridItem: FunctionComponent<GridItemProps>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getGridItemStyle } from '../patterns/grid-item.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const GridItem = /* @__PURE__ */ forwardRef(function GridItem(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["colSpan","rowSpan","colStart","rowStart","colEnd","rowEnd"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getGridItemStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
package/jsx/grid.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { GridProperties } from '../patterns/grid';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface GridProps extends GridProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof GridProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Grid: FunctionComponent<GridProps>
|
package/jsx/grid.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getGridStyle } from '../patterns/grid.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Grid = /* @__PURE__ */ forwardRef(function Grid(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["gap","columnGap","rowGap","columns","minChildWidth"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getGridStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
package/jsx/hstack.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { HstackProperties } from '../patterns/hstack';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface HstackProps extends HstackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof HstackProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const HStack: FunctionComponent<HstackProps>
|
package/jsx/hstack.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getHstackStyle } from '../patterns/hstack.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const HStack = /* @__PURE__ */ forwardRef(function HStack(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["justify","gap"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getHstackStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
package/jsx/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
export * from './factory';
|
|
3
|
+
export * from './is-valid-prop';
|
|
4
|
+
export * from './box';
|
|
5
|
+
export * from './flex';
|
|
6
|
+
export * from './stack';
|
|
7
|
+
export * from './vstack';
|
|
8
|
+
export * from './hstack';
|
|
9
|
+
export * from './spacer';
|
|
10
|
+
export * from './square';
|
|
11
|
+
export * from './circle';
|
|
12
|
+
export * from './center';
|
|
13
|
+
export * from './link-box';
|
|
14
|
+
export * from './link-overlay';
|
|
15
|
+
export * from './aspect-ratio';
|
|
16
|
+
export * from './grid';
|
|
17
|
+
export * from './grid-item';
|
|
18
|
+
export * from './wrap';
|
|
19
|
+
export * from './container';
|
|
20
|
+
export * from './divider';
|
|
21
|
+
export * from './float';
|
|
22
|
+
export * from './bleed';
|
|
23
|
+
export * from './visually-hidden';
|
|
24
|
+
export * from './cq';
|
|
25
|
+
export type { HTMLStyledProps, StyledComponent } from '../types/jsx';
|
package/jsx/index.mjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './factory.mjs';
|
|
2
|
+
export * from './is-valid-prop.mjs';
|
|
3
|
+
export * from './box.mjs';
|
|
4
|
+
export * from './flex.mjs';
|
|
5
|
+
export * from './stack.mjs';
|
|
6
|
+
export * from './vstack.mjs';
|
|
7
|
+
export * from './hstack.mjs';
|
|
8
|
+
export * from './spacer.mjs';
|
|
9
|
+
export * from './square.mjs';
|
|
10
|
+
export * from './circle.mjs';
|
|
11
|
+
export * from './center.mjs';
|
|
12
|
+
export * from './link-box.mjs';
|
|
13
|
+
export * from './link-overlay.mjs';
|
|
14
|
+
export * from './aspect-ratio.mjs';
|
|
15
|
+
export * from './grid.mjs';
|
|
16
|
+
export * from './grid-item.mjs';
|
|
17
|
+
export * from './wrap.mjs';
|
|
18
|
+
export * from './container.mjs';
|
|
19
|
+
export * from './divider.mjs';
|
|
20
|
+
export * from './float.mjs';
|
|
21
|
+
export * from './bleed.mjs';
|
|
22
|
+
export * from './visually-hidden.mjs';
|
|
23
|
+
export * from './cq.mjs';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { DistributiveOmit, HTMLPandaProps, JsxStyleProps, Pretty } from '../types';
|
|
3
|
+
|
|
4
|
+
declare const isCssProperty: (value: string) => boolean;
|
|
5
|
+
|
|
6
|
+
type CssPropKey = keyof JsxStyleProps
|
|
7
|
+
type OmittedCssProps<T> = Pretty<DistributiveOmit<T, CssPropKey>>
|
|
8
|
+
|
|
9
|
+
declare const splitCssProps: <T>(props: T) => [JsxStyleProps, OmittedCssProps<T>]
|
|
10
|
+
|
|
11
|
+
export { isCssProperty, splitCssProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { splitProps } from '../helpers.mjs';
|
|
2
|
+
import { memo } from '../helpers.mjs';
|
|
3
|
+
// src/index.ts
|
|
4
|
+
var userGeneratedStr = "css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,insetInline,insetBlock,inset,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,color,fontFamily,fontSize,fontWeight,fontSmoothing,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,transformOrigin,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,touchAction,userSelect,fill,stroke,strokeWidth,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,boxSize,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_default,_optional,_open,_closed,_fullscreen,_loading,_currentPage,_currentStep,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_starting,_collapsed,_current,_hidden,_today,_underValue,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,@/lg,@/md,@/sm,@/xl,@/xs,textStyle"
|
|
5
|
+
var userGenerated = userGeneratedStr.split(",");
|
|
6
|
+
var cssPropertiesStr = "WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimingFunction,animationTimeline,appearance,aspectRatio,azimuth,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockStyle,borderBlockWidth,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineEnd,borderInlineColor,borderInlineStyle,borderInlineWidth,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,color,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicSize,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,direction,display,emptyCells,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontVariationSettings,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inputSecurity,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,printColorAdjust,quotes,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,scale,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockStart,scrollMarginBlockEnd,scrollMarginBottom,scrollMarginInline,scrollMarginInlineStart,scrollMarginInlineEnd,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineStart,scrollPaddingInlineEnd,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,shapeImageThreshold,shapeMargin,shapeOutside,tabSize,tableLayout,textAlign,textAlignLast,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,zIndex,zoom,alignmentBaseline,baselineShift,clipRule,colorInterpolation,colorRendering,dominantBaseline,fill,fillOpacity,fillRule,floodColor,floodOpacity,glyphOrientationVertical,lightingColor,marker,markerEnd,markerMid,markerStart,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,textAnchor,vectorEffect";
|
|
7
|
+
var allCssProperties = cssPropertiesStr.split(",").concat(userGenerated);
|
|
8
|
+
var properties = new Map(allCssProperties.map((prop) => [prop, true]));
|
|
9
|
+
var cssPropertySelectorRegex = /&|@/;
|
|
10
|
+
var isCssProperty = /* @__PURE__ */ memo((prop) => {
|
|
11
|
+
return properties.has(prop) || prop.startsWith("--") || cssPropertySelectorRegex.test(prop);
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
allCssProperties,
|
|
15
|
+
isCssProperty
|
|
16
|
+
};
|
|
17
|
+
export const splitCssProps = (props) => splitProps(props, isCssProperty)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { LinkBoxProperties } from '../patterns/link-box';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface LinkBoxProps extends LinkBoxProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof LinkBoxProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const LinkBox: FunctionComponent<LinkBoxProps>
|
package/jsx/link-box.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getLinkBoxStyle } from '../patterns/link-box.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const LinkBox = /* @__PURE__ */ forwardRef(function LinkBox(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
+
|
|
10
|
+
const styleProps = getLinkBoxStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { LinkOverlayProperties } from '../patterns/link-overlay';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface LinkOverlayProps extends LinkOverlayProperties, DistributiveOmit<HTMLStyledProps<'a'>, keyof LinkOverlayProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const LinkOverlay: FunctionComponent<LinkOverlayProps>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getLinkOverlayStyle } from '../patterns/link-overlay.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const LinkOverlay = /* @__PURE__ */ forwardRef(function LinkOverlay(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
+
|
|
10
|
+
const styleProps = getLinkOverlayStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.a, mergedProps)
|
|
14
|
+
})
|
package/jsx/spacer.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { SpacerProperties } from '../patterns/spacer';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface SpacerProps extends SpacerProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof SpacerProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Spacer: FunctionComponent<SpacerProps>
|
package/jsx/spacer.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getSpacerStyle } from '../patterns/spacer.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Spacer = /* @__PURE__ */ forwardRef(function Spacer(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getSpacerStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
package/jsx/square.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { SquareProperties } from '../patterns/square';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface SquareProps extends SquareProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof SquareProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Square: FunctionComponent<SquareProps>
|
package/jsx/square.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getSquareStyle } from '../patterns/square.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Square = /* @__PURE__ */ forwardRef(function Square(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getSquareStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
package/jsx/stack.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { StackProperties } from '../patterns/stack';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface StackProps extends StackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof StackProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Stack: FunctionComponent<StackProps>
|
package/jsx/stack.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getStackStyle } from '../patterns/stack.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Stack = /* @__PURE__ */ forwardRef(function Stack(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["align","justify","direction","gap"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getStackStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { VisuallyHiddenProperties } from '../patterns/visually-hidden';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface VisuallyHiddenProps extends VisuallyHiddenProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VisuallyHiddenProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const VisuallyHidden: FunctionComponent<VisuallyHiddenProps>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getVisuallyHiddenStyle } from '../patterns/visually-hidden.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const VisuallyHidden = /* @__PURE__ */ forwardRef(function VisuallyHidden(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
+
|
|
10
|
+
const styleProps = getVisuallyHiddenStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
package/jsx/vstack.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { VstackProperties } from '../patterns/vstack';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface VstackProps extends VstackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VstackProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const VStack: FunctionComponent<VstackProps>
|
package/jsx/vstack.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getVstackStyle } from '../patterns/vstack.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const VStack = /* @__PURE__ */ forwardRef(function VStack(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["justify","gap"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getVstackStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
package/jsx/wrap.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { WrapProperties } from '../patterns/wrap';
|
|
4
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
|
|
7
|
+
export interface WrapProps extends WrapProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof WrapProperties > {}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export declare const Wrap: FunctionComponent<WrapProps>
|
package/jsx/wrap.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
|
+
import { splitProps } from '../helpers.mjs';
|
|
4
|
+
import { getWrapStyle } from '../patterns/wrap.mjs';
|
|
5
|
+
import { styled } from './factory.mjs';
|
|
6
|
+
|
|
7
|
+
export const Wrap = /* @__PURE__ */ forwardRef(function Wrap(props, ref) {
|
|
8
|
+
const [patternProps, restProps] = splitProps(props, ["gap","rowGap","columnGap","align","justify"])
|
|
9
|
+
|
|
10
|
+
const styleProps = getWrapStyle(patternProps)
|
|
11
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
+
|
|
13
|
+
return createElement(styled.div, mergedProps)
|
|
14
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stokelp/styled-system",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Stokelp UI styled-system",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"css",
|
|
11
|
+
"jsx",
|
|
12
|
+
"patterns",
|
|
13
|
+
"recipes",
|
|
14
|
+
"tokens",
|
|
15
|
+
"types",
|
|
16
|
+
"styles.css",
|
|
17
|
+
"panda.buildinfo.json"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
"./css": {
|
|
21
|
+
"types": "./css/index.d.ts",
|
|
22
|
+
"require": "./css/index.mjs",
|
|
23
|
+
"import": "./css/index.mjs"
|
|
24
|
+
},
|
|
25
|
+
"./jsx": {
|
|
26
|
+
"types": "./jsx/index.d.ts",
|
|
27
|
+
"require": "./jsx/index.mjs",
|
|
28
|
+
"import": "./jsx/index.mjs"
|
|
29
|
+
},
|
|
30
|
+
"./patterns": {
|
|
31
|
+
"types": "./patterns/index.d.ts",
|
|
32
|
+
"require": "./patterns/index.mjs",
|
|
33
|
+
"import": "./patterns/index.mjs"
|
|
34
|
+
},
|
|
35
|
+
"./recipes": {
|
|
36
|
+
"types": "./recipes/index.d.ts",
|
|
37
|
+
"require": "./recipes/index.mjs",
|
|
38
|
+
"import": "./recipes/index.mjs"
|
|
39
|
+
},
|
|
40
|
+
"./tokens": {
|
|
41
|
+
"types": "./tokens/index.d.ts",
|
|
42
|
+
"require": "./tokens/index.mjs",
|
|
43
|
+
"import": "./tokens/index.mjs"
|
|
44
|
+
},
|
|
45
|
+
"./types": {
|
|
46
|
+
"types": "./types/index.d.ts",
|
|
47
|
+
"require": "./types/index.mjs",
|
|
48
|
+
"import": "./types/index.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./styles.css": "./styles.css",
|
|
51
|
+
"./panda.buildinfo.json": "./panda.buildinfo.json"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@pandacss/dev": "^0.37.2"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "0.37.2",
|
|
3
|
+
"styles": {
|
|
4
|
+
"atomic": [
|
|
5
|
+
"display]___[value:flex",
|
|
6
|
+
"alignItems]___[value:flex-start",
|
|
7
|
+
"gap]___[value:0",
|
|
8
|
+
"flexDirection]___[value:column",
|
|
9
|
+
"alignItems]___[value:stretch",
|
|
10
|
+
"gap]___[value:space-16",
|
|
11
|
+
"gap]___[value:space-24",
|
|
12
|
+
"borderColor]___[value:primary.100",
|
|
13
|
+
"marginBlock]___[value:space-24",
|
|
14
|
+
"background]___[value:error.500]___[cond:_disabled<___>_hover",
|
|
15
|
+
"background]___[value:error.500]___[cond:_disabled<___>_active",
|
|
16
|
+
"background]___[value:error.500]___[cond:_disabled",
|
|
17
|
+
"background]___[value:error.800]___[cond:_active",
|
|
18
|
+
"background]___[value:error.700]___[cond:_hover",
|
|
19
|
+
"background]___[value:error.500",
|
|
20
|
+
"background]___[value:transparent]___[cond:_disabled<___>_hover",
|
|
21
|
+
"background]___[value:transparent]___[cond:_disabled<___>_active",
|
|
22
|
+
"background]___[value:transparent]___[cond:_disabled",
|
|
23
|
+
"background]___[value:error.700]___[cond:_active",
|
|
24
|
+
"background]___[value:error.500]___[cond:_hover",
|
|
25
|
+
"background]___[value:transparent",
|
|
26
|
+
"boxShadow]___[value:inset 0 0 0 1px {colors.error.500}",
|
|
27
|
+
"boxShadow]___[value:inset 0 0 0 1px {colors.error.700}]___[cond:_active",
|
|
28
|
+
"color]___[value:error.500]___[cond:_disabled<___>_hover",
|
|
29
|
+
"color]___[value:error.500]___[cond:_disabled<___>_active",
|
|
30
|
+
"color]___[value:error.500]___[cond:_disabled",
|
|
31
|
+
"color]___[value:error.500",
|
|
32
|
+
"color]___[value:white]___[cond:_hover",
|
|
33
|
+
"color]___[value:white]___[cond:_active",
|
|
34
|
+
"background]___[value:error.200]___[cond:_active",
|
|
35
|
+
"background]___[value:error.100]___[cond:_hover",
|
|
36
|
+
"color]___[value:error.700]___[cond:_hover",
|
|
37
|
+
"color]___[value:error.700]___[cond:_active",
|
|
38
|
+
"maxWidth]___[value:600px",
|
|
39
|
+
"alignItems]___[value:center",
|
|
40
|
+
"gap]___[value:10px"
|
|
41
|
+
],
|
|
42
|
+
"recipes": {
|
|
43
|
+
"checkbox": [
|
|
44
|
+
"size]___[value:md]___[recipe:checkbox"
|
|
45
|
+
],
|
|
46
|
+
"formControl": [],
|
|
47
|
+
"formLabel": [],
|
|
48
|
+
"switchRecipe": [
|
|
49
|
+
"size]___[value:md]___[recipe:switchRecipe"
|
|
50
|
+
],
|
|
51
|
+
"heading": [
|
|
52
|
+
"size]___[value:h2]___[recipe:heading"
|
|
53
|
+
],
|
|
54
|
+
"text": [
|
|
55
|
+
"size]___[value:lg]___[recipe:text",
|
|
56
|
+
"size]___[value:md]___[recipe:text",
|
|
57
|
+
"size]___[value:sm]___[recipe:text"
|
|
58
|
+
],
|
|
59
|
+
"accordion": [
|
|
60
|
+
"size]___[value:md]___[recipe:accordion"
|
|
61
|
+
],
|
|
62
|
+
"drawer": [
|
|
63
|
+
"variant]___[value:right]___[recipe:drawer"
|
|
64
|
+
],
|
|
65
|
+
"button": [
|
|
66
|
+
"size]___[value:lg]___[recipe:button",
|
|
67
|
+
"variant]___[value:primary]___[recipe:button",
|
|
68
|
+
"severity]___[value:none]___[recipe:button",
|
|
69
|
+
"variant]___[value:tertiary]___[recipe:button"
|
|
70
|
+
],
|
|
71
|
+
"textarea": [],
|
|
72
|
+
"formHelperText": []
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface AspectRatioProperties {
|
|
9
|
+
ratio?: ConditionalValue<number>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
interface AspectRatioStyles extends AspectRatioProperties, DistributiveOmit<SystemStyleObject, keyof AspectRatioProperties | 'aspectRatio'> {}
|
|
14
|
+
|
|
15
|
+
interface AspectRatioPatternFn {
|
|
16
|
+
(styles?: AspectRatioStyles): string
|
|
17
|
+
raw: (styles?: AspectRatioStyles) => SystemStyleObject
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export declare const aspectRatio: AspectRatioPatternFn;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
|
+
import { css } from '../css/index.mjs';
|
|
3
|
+
|
|
4
|
+
const aspectRatioConfig = {
|
|
5
|
+
transform(props5, { map }) {
|
|
6
|
+
const { ratio = 4 / 3, ...rest } = props5;
|
|
7
|
+
return {
|
|
8
|
+
position: "relative",
|
|
9
|
+
_before: {
|
|
10
|
+
content: `""`,
|
|
11
|
+
display: "block",
|
|
12
|
+
height: "0",
|
|
13
|
+
paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
|
|
14
|
+
},
|
|
15
|
+
"&>*": {
|
|
16
|
+
display: "flex",
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
overflow: "hidden",
|
|
20
|
+
position: "absolute",
|
|
21
|
+
inset: "0",
|
|
22
|
+
width: "100%",
|
|
23
|
+
height: "100%"
|
|
24
|
+
},
|
|
25
|
+
"&>img, &>video": {
|
|
26
|
+
objectFit: "cover"
|
|
27
|
+
},
|
|
28
|
+
...rest
|
|
29
|
+
};
|
|
30
|
+
}}
|
|
31
|
+
|
|
32
|
+
export const getAspectRatioStyle = (styles = {}) => {
|
|
33
|
+
const _styles = getPatternStyles(aspectRatioConfig, styles)
|
|
34
|
+
return aspectRatioConfig.transform(_styles, patternFns)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const aspectRatio = (styles) => css(getAspectRatioStyle(styles))
|
|
38
|
+
aspectRatio.raw = getAspectRatioStyle
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface BleedProperties {
|
|
9
|
+
inline?: SystemProperties["marginInline"]
|
|
10
|
+
block?: SystemProperties["marginBlock"]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
interface BleedStyles extends BleedProperties, DistributiveOmit<SystemStyleObject, keyof BleedProperties > {}
|
|
15
|
+
|
|
16
|
+
interface BleedPatternFn {
|
|
17
|
+
(styles?: BleedStyles): string
|
|
18
|
+
raw: (styles?: BleedStyles) => SystemStyleObject
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export declare const bleed: BleedPatternFn;
|