@mekari/pixel3-styled-system 0.0.7 → 0.0.8
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/CHANGELOG.md +14 -0
- package/css/conditions.mjs +1 -1
- package/css/css.d.ts +15 -2
- package/css/css.mjs +2 -1
- package/css/cva.d.ts +1 -1
- package/css/cva.mjs +3 -1
- package/css/sva.mjs +8 -2
- package/helpers.mjs +44 -48
- package/jsx/aspect-ratio.mjs +1 -1
- package/jsx/bleed.mjs +1 -1
- package/jsx/box.mjs +1 -1
- package/jsx/center.mjs +1 -1
- package/jsx/circle.mjs +1 -1
- package/jsx/container.mjs +1 -1
- package/jsx/cq.mjs +1 -1
- package/jsx/divider.mjs +1 -1
- package/jsx/factory.mjs +46 -18
- package/jsx/flex.mjs +1 -1
- package/jsx/float.mjs +1 -1
- package/jsx/grid-item.mjs +1 -1
- package/jsx/grid.mjs +1 -1
- package/jsx/hstack.mjs +1 -1
- package/jsx/index.d.ts +0 -1
- package/jsx/index.mjs +0 -1
- package/jsx/is-valid-prop.d.ts +1 -2
- package/jsx/is-valid-prop.mjs +2 -2
- package/jsx/link-overlay.mjs +1 -1
- package/jsx/spacer.mjs +1 -1
- package/jsx/square.mjs +1 -1
- package/jsx/stack.mjs +1 -1
- package/jsx/visually-hidden.mjs +1 -1
- package/jsx/vstack.mjs +1 -1
- package/jsx/wrap.mjs +1 -1
- package/package.json +1 -1
- package/patterns/aspect-ratio.d.ts +1 -1
- package/patterns/bleed.d.ts +3 -3
- package/patterns/box.d.ts +1 -1
- package/patterns/center.d.ts +1 -1
- package/patterns/circle.d.ts +2 -2
- package/patterns/container.d.ts +1 -1
- package/patterns/cq.d.ts +2 -2
- package/patterns/divider.d.ts +1 -1
- package/patterns/flex.d.ts +8 -8
- package/patterns/float.d.ts +1 -1
- package/patterns/grid-item.d.ts +1 -1
- package/patterns/grid.d.ts +4 -4
- package/patterns/hstack.d.ts +3 -3
- package/patterns/index.d.ts +0 -1
- package/patterns/index.mjs +0 -1
- package/patterns/link-overlay.d.ts +1 -1
- package/patterns/link-overlay.mjs +0 -3
- package/patterns/spacer.d.ts +1 -1
- package/patterns/square.d.ts +2 -2
- package/patterns/stack.d.ts +5 -5
- package/patterns/visually-hidden.d.ts +1 -1
- package/patterns/vstack.d.ts +3 -3
- package/patterns/wrap.d.ts +6 -6
- package/recipes/accordion.d.ts +1 -0
- package/recipes/accordion.mjs +4 -2
- package/recipes/avatar-group-slot-recipe.d.ts +1 -0
- package/recipes/avatar-group-slot-recipe.mjs +4 -2
- package/recipes/avatar-slot-recipe.d.ts +1 -0
- package/recipes/avatar-slot-recipe.mjs +4 -2
- package/recipes/badge-recipe.d.ts +1 -0
- package/recipes/badge-recipe.mjs +3 -1
- package/recipes/banner-close-button-recipe.d.ts +1 -0
- package/recipes/banner-close-button-recipe.mjs +3 -1
- package/recipes/banner-description-recipe.d.ts +1 -0
- package/recipes/banner-description-recipe.mjs +3 -1
- package/recipes/banner-icon-slot-recipe.d.ts +1 -0
- package/recipes/banner-icon-slot-recipe.mjs +4 -2
- package/recipes/banner-link-recipe.d.ts +1 -0
- package/recipes/banner-link-recipe.mjs +3 -1
- package/recipes/banner-slot-recipe.d.ts +1 -0
- package/recipes/banner-slot-recipe.mjs +4 -2
- package/recipes/banner-title-recipe.d.ts +1 -0
- package/recipes/banner-title-recipe.mjs +3 -1
- package/recipes/broadcast-slot-recipe.d.ts +1 -0
- package/recipes/broadcast-slot-recipe.mjs +4 -2
- package/recipes/button-group-recipe.d.ts +1 -0
- package/recipes/button-group-recipe.mjs +3 -1
- package/recipes/button-recipe.d.ts +1 -0
- package/recipes/button-recipe.mjs +3 -1
- package/recipes/calendar-panel-range-recipe.d.ts +1 -0
- package/recipes/calendar-panel-range-recipe.mjs +3 -1
- package/recipes/carousel-slot-recipe.d.ts +1 -0
- package/recipes/carousel-slot-recipe.mjs +4 -2
- package/recipes/chart-slot-recipe.d.ts +28 -0
- package/recipes/chart-slot-recipe.mjs +80 -0
- package/recipes/checkbox-slot-recipe.d.ts +1 -0
- package/recipes/checkbox-slot-recipe.mjs +4 -2
- package/recipes/create-recipe.mjs +8 -5
- package/recipes/date-item-recipe.d.ts +1 -0
- package/recipes/date-item-recipe.mjs +3 -1
- package/recipes/date-picker-slot-recipe.d.ts +1 -0
- package/recipes/date-picker-slot-recipe.mjs +4 -2
- package/recipes/day-item-recipe.d.ts +1 -0
- package/recipes/day-item-recipe.mjs +3 -1
- package/recipes/divider-recipe.d.ts +1 -0
- package/recipes/divider-recipe.mjs +3 -1
- package/recipes/dropzone-slot-recipe.d.ts +1 -0
- package/recipes/dropzone-slot-recipe.mjs +4 -2
- package/recipes/form-control-slot-recipe.d.ts +1 -0
- package/recipes/form-control-slot-recipe.mjs +4 -2
- package/recipes/icon-recipe.d.ts +1 -0
- package/recipes/icon-recipe.mjs +3 -1
- package/recipes/index.d.ts +2 -1
- package/recipes/index.mjs +2 -1
- package/recipes/input-addon-slot-recipe.d.ts +1 -0
- package/recipes/input-addon-slot-recipe.mjs +4 -2
- package/recipes/input-group-slot-recipe.d.ts +1 -0
- package/recipes/input-group-slot-recipe.mjs +4 -2
- package/recipes/input-slot-recipe.d.ts +1 -0
- package/recipes/input-slot-recipe.mjs +4 -2
- package/recipes/input-tag-slot-recipe.d.ts +1 -0
- package/recipes/input-tag-slot-recipe.mjs +4 -2
- package/recipes/modal-slot-recipe.d.ts +6 -1
- package/recipes/modal-slot-recipe.mjs +4 -2
- package/recipes/month-item-recipe.d.ts +1 -0
- package/recipes/month-item-recipe.mjs +3 -1
- package/recipes/pinbar-slot-recipe.d.ts +1 -0
- package/recipes/pinbar-slot-recipe.mjs +4 -2
- package/recipes/popover-content-recipe.d.ts +1 -0
- package/recipes/popover-content-recipe.mjs +3 -1
- package/recipes/popover-list-item-recipe.d.ts +1 -0
- package/recipes/popover-list-item-recipe.mjs +3 -1
- package/recipes/popover-list-recipe.d.ts +1 -0
- package/recipes/popover-list-recipe.mjs +3 -1
- package/recipes/progress-slot-recipe.d.ts +1 -0
- package/recipes/progress-slot-recipe.mjs +4 -2
- package/recipes/radio-slot-recipe.d.ts +1 -0
- package/recipes/radio-slot-recipe.mjs +4 -2
- package/recipes/rich-text-editor-slot-recipe.d.ts +1 -0
- package/recipes/rich-text-editor-slot-recipe.mjs +4 -2
- package/recipes/rtestyle-provider-recipe.d.ts +1 -0
- package/recipes/rtestyle-provider-recipe.mjs +3 -1
- package/recipes/segmented-control-slot-recipe.d.ts +1 -0
- package/recipes/segmented-control-slot-recipe.mjs +4 -2
- package/recipes/select-slot-recipe.d.ts +1 -0
- package/recipes/select-slot-recipe.mjs +4 -2
- package/recipes/selected-border-recipe.d.ts +1 -0
- package/recipes/selected-border-recipe.mjs +3 -1
- package/recipes/shared-slot-recipe.d.ts +1 -0
- package/recipes/shared-slot-recipe.mjs +4 -2
- package/recipes/spinner-recipe.d.ts +1 -0
- package/recipes/spinner-recipe.mjs +3 -1
- package/recipes/tab-list-recipe.d.ts +1 -0
- package/recipes/tab-list-recipe.mjs +3 -1
- package/recipes/tab-recipe.d.ts +1 -0
- package/recipes/tab-recipe.mjs +3 -1
- package/recipes/table-container-recipe.d.ts +1 -0
- package/recipes/table-container-recipe.mjs +3 -1
- package/recipes/table-date-slot-recipe.d.ts +1 -0
- package/recipes/table-date-slot-recipe.mjs +4 -2
- package/recipes/table-month-slot-recipe.d.ts +1 -0
- package/recipes/table-month-slot-recipe.mjs +4 -2
- package/recipes/table-recipe.d.ts +1 -0
- package/recipes/table-recipe.mjs +3 -1
- package/recipes/table-year-slot-recipe.d.ts +1 -0
- package/recipes/table-year-slot-recipe.mjs +4 -2
- package/recipes/tag-slot-recipe.d.ts +1 -0
- package/recipes/tag-slot-recipe.mjs +4 -2
- package/recipes/text-recipe.d.ts +1 -0
- package/recipes/text-recipe.mjs +3 -1
- package/recipes/textarea-recipe.d.ts +1 -0
- package/recipes/textarea-recipe.mjs +3 -1
- package/recipes/toast-slot-recipe.d.ts +1 -0
- package/recipes/toast-slot-recipe.mjs +4 -2
- package/recipes/toggle-slot-recipe.d.ts +1 -0
- package/recipes/toggle-slot-recipe.mjs +4 -2
- package/recipes/tooltip-recipe.d.ts +1 -0
- package/recipes/tooltip-recipe.mjs +3 -1
- package/recipes/upload-list-slot-recipe.d.ts +1 -0
- package/recipes/upload-list-slot-recipe.mjs +4 -2
- package/recipes/upload-slot-recipe.d.ts +1 -0
- package/recipes/upload-slot-recipe.mjs +4 -2
- package/recipes/year-item-recipe.d.ts +1 -0
- package/recipes/year-item-recipe.mjs +3 -1
- package/tokens/tokens.d.ts +0 -3
- package/types/composition.d.ts +39 -12
- package/types/conditions.d.ts +24 -26
- package/types/pattern.d.ts +4 -0
- package/types/prop-type.d.ts +51 -223
- package/types/recipe.d.ts +33 -10
- package/types/static-css.d.ts +4 -0
- package/types/style-props.d.ts +7458 -644
- package/types/system-types.d.ts +3 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @mekari/pixel3-styled-system
|
|
2
2
|
|
|
3
|
+
## 0.0.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b1662ba: Generate new styledgen
|
|
8
|
+
- f86bca4: Generate new style for Panda version 0.39.2
|
|
9
|
+
|
|
10
|
+
## 0.0.8-dev.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- b1662ba: Generate styledgen
|
|
15
|
+
- f86bca4: Generate new style for Panda version 0.39.2
|
|
16
|
+
|
|
3
17
|
## 0.0.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/css/conditions.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withoutSpace } from '../helpers.mjs';
|
|
2
2
|
|
|
3
|
-
const conditionsStr = "_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,_hidden,_collapsed,_hasIcon,_hasLabel,_highlight,_hasBorder,_hasBackground,_isFullWidth,_placementLeft,_placementRight,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,base"
|
|
3
|
+
const conditionsStr = "_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,_hidden,_collapsed,_hasIcon,_hasLabel,_highlight,_hasBorder,_hasBackground,_isFullWidth,_placementLeft,_placementRight,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,base"
|
|
4
4
|
const conditions = new Set(conditionsStr.split(','))
|
|
5
5
|
|
|
6
6
|
export function isCondition(value){
|
package/css/css.d.ts
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { SystemStyleObject } from '../types/index';
|
|
3
3
|
|
|
4
|
+
type Styles = SystemStyleObject | undefined | null | false
|
|
5
|
+
|
|
6
|
+
interface CssRawFunction {
|
|
7
|
+
(styles: Styles): SystemStyleObject
|
|
8
|
+
(styles: Styles[]): SystemStyleObject
|
|
9
|
+
(...styles: Array<Styles | Styles[]>): SystemStyleObject
|
|
10
|
+
(styles: Styles): SystemStyleObject
|
|
11
|
+
}
|
|
12
|
+
|
|
4
13
|
interface CssFunction {
|
|
5
|
-
(
|
|
6
|
-
|
|
14
|
+
(styles: Styles): string
|
|
15
|
+
(styles: Styles[]): string
|
|
16
|
+
(...styles: Array<Styles | Styles[]>): string
|
|
17
|
+
(styles: Styles): string
|
|
18
|
+
|
|
19
|
+
raw: CssRawFunction
|
|
7
20
|
}
|
|
8
21
|
|
|
9
22
|
export declare const css: CssFunction;
|
package/css/css.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createCss, createMergeCss, hypenateProperty, withoutSpace } from '../helpers.mjs';
|
|
2
2
|
import { sortConditions, finalizeConditions } from './conditions.mjs';
|
|
3
3
|
|
|
4
|
-
const utilities = "aspectRatio:aspect,boxDecorationBreak:decoration,zIndex:z,boxSizing:box,objectPosition:
|
|
4
|
+
const utilities = "aspectRatio:aspect,boxDecorationBreak:decoration,zIndex:z,boxSizing:box,objectPosition:obj-pos,objectFit:obj-fit,overscrollBehavior:overscroll,overscrollBehaviorX:overscroll-x,overscrollBehaviorY:overscroll-y,position:pos/1,top:top,left:left,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,inset:inset,insetBlockEnd:inset-b,insetBlockStart:inset-t,insetInlineEnd:end/insetEnd/1,insetInlineStart:start/insetStart/1,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:basis,flex:flex,flexDirection:flex/flexDir,flexGrow:grow,flexShrink:shrink,gridTemplateColumns:grid-cols,gridTemplateRows:grid-rows,gridColumn:col-span,gridRow:row-span,gridColumnStart:col-start,gridColumnEnd:col-end,gridAutoFlow:grid-flow,gridAutoColumns:auto-cols,gridAutoRows:auto-rows,gap:gap,gridGap:gap,gridRowGap:gap-x,gridColumnGap:gap-y,rowGap:gap-x,columnGap:gap-y,justifyContent:justify,alignContent:content,alignItems:items,alignSelf:self,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pb,paddingBlockStart:pt,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mb,marginBlockStart:mt,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:space-x,spaceY:space-y,outlineWidth:ring-width/ringWidth,outlineColor:ring-color/ringColor,outline:ring/1,outlineOffset:ring-offset/ringOffset,divideX:divide-x,divideY:divide-y,divideColor:divide-color,divideStyle:divide-style,width:w/1,inlineSize:w,minWidth:min-w/minW,minInlineSize:min-w,maxWidth:max-w/maxW,maxInlineSize:max-w,height:h/1,blockSize:h,minHeight:min-h/minH,minBlockSize:min-h,maxHeight:max-h/maxH,maxBlockSize:max-b,color:text,fontFamily:font,fontSize:fs,fontWeight:fw,fontSmoothing:smoothing,fontVariantNumeric:numeric,letterSpacing:tracking,lineHeight:leading,textAlign:text-align,textDecoration:text-decor,textDecorationColor:text-decor-color,textEmphasisColor:text-emphasis-color,textDecorationStyle:decoration-style,textDecorationThickness:decoration-thickness,textUnderlineOffset:underline-offset,textTransform:text-transform,textIndent:indent,textShadow:text-shadow,textShadowColor:text-shadow/textShadowColor,textOverflow:text-overflow,verticalAlign:v-align,wordBreak:break,textWrap:text-wrap,truncate:truncate,lineClamp:clamp,listStyleType:list-type,listStylePosition:list-pos,listStyleImage:list-img,backgroundPosition:bg-pos/bgPosition,backgroundPositionX:bg-pos-x/bgPositionX,backgroundPositionY:bg-pos-y/bgPositionY,backgroundAttachment:bg-attach/bgAttachment,backgroundClip:bg-clip/bgClip,background:bg/1,backgroundColor:bg/bgColor,backgroundOrigin:bg-origin/bgOrigin,backgroundImage:bg-img/bgImage,backgroundRepeat:bg-repeat/bgRepeat,backgroundBlendMode:bg-blend/bgBlendMode,backgroundSize:bg-size/bgSize,backgroundGradient:bg-gradient/bgGradient,textGradient:text-gradient,gradientFromPosition:gradient-from-pos,gradientToPosition:gradient-to-pos,gradientFrom:gradient-from,gradientTo:gradient-to,gradientVia:gradient-via,gradientViaPosition:gradient-via-pos,borderRadius:rounded/1,borderTopLeftRadius:rounded-tl/roundedTopLeft,borderTopRightRadius:rounded-tr/roundedTopRight,borderBottomRightRadius:rounded-br/roundedBottomRight,borderBottomLeftRadius:rounded-bl/roundedBottomLeft,borderTopRadius:rounded-t/roundedTop,borderRightRadius:rounded-r/roundedRight,borderBottomRadius:rounded-b/roundedBottom,borderLeftRadius:rounded-l/roundedLeft,borderStartStartRadius:rounded-ss/roundedStartStart,borderStartEndRadius:rounded-se/roundedStartEnd,borderStartRadius:rounded-s/roundedStart,borderEndStartRadius:rounded-es/roundedEndStart,borderEndEndRadius:rounded-ee/roundedEndEnd,borderEndRadius:rounded-e/roundedEnd,border:border,borderWidth:border-w,borderTopWidth:border-tw,borderLeftWidth:border-lw,borderRightWidth:border-rw,borderBottomWidth:border-bw,borderColor:border,borderInline:border-x/borderX,borderInlineWidth:border-x/borderXWidth,borderInlineColor:border-x/borderXColor,borderBlock:border-y/borderY,borderBlockWidth:border-y/borderYWidth,borderBlockColor:border-y/borderYColor,borderLeft:border-l,borderLeftColor:border-l,borderInlineStart:border-s/borderStart,borderInlineStartWidth:border-s/borderStartWidth,borderInlineStartColor:border-s/borderStartColor,borderRight:border-r,borderRightColor:border-r,borderInlineEnd:border-e/borderEnd,borderInlineEndWidth:border-e/borderEndWidth,borderInlineEndColor:border-e/borderEndColor,borderTop:border-t,borderTopColor:border-t,borderBottom:border-b,borderBottomColor:border-b,borderBlockEnd:border-be,borderBlockEndColor:border-be,borderBlockStart:border-bs,borderBlockStartColor:border-bs,boxShadow:shadow/1,boxShadowColor:shadow-color/shadowColor,mixBlendMode:mix-blend,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:backdrop,backdropBlur:backdrop-blur,backdropBrightness:backdrop-brightness,backdropContrast:backdrop-contrast,backdropGrayscale:backdrop-grayscale,backdropHueRotate:backdrop-hue-rotate,backdropInvert:backdrop-invert,backdropOpacity:backdrop-opacity,backdropSaturate:backdrop-saturate,backdropSepia:backdrop-sepia,borderCollapse:border,borderSpacing:border-spacing,borderSpacingX:border-spacing-x,borderSpacingY:border-spacing-y,tableLayout:table,transitionTimingFunction:ease,transitionDelay:delay,transitionDuration:duration,transitionProperty:transition-prop,transition:transition,animation:animation,animationName:animation-name,animationTimingFunction:animation-ease,animationDuration:animation-duration,animationDelay:animation-delay,transformOrigin:origin,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:accent,caretColor:caret,scrollBehavior:scroll,scrollbar:scrollbar,scrollMargin:scroll-m,scrollMarginLeft:scroll-ml,scrollMarginRight:scroll-mr,scrollMarginTop:scroll-mt,scrollMarginBottom:scroll-mb,scrollMarginBlock:scroll-my/scrollMarginY,scrollMarginBlockEnd:scroll-mb,scrollMarginBlockStart:scroll-mt,scrollMarginInline:scroll-mx/scrollMarginX,scrollMarginInlineEnd:scroll-me,scrollMarginInlineStart:scroll-ms,scrollPadding:scroll-p,scrollPaddingBlock:scroll-pb/scrollPaddingY,scrollPaddingBlockStart:scroll-pt,scrollPaddingBlockEnd:scroll-pb,scrollPaddingInline:scroll-px/scrollPaddingX,scrollPaddingInlineEnd:scroll-pe,scrollPaddingInlineStart:scroll-ps,scrollPaddingLeft:scroll-pl,scrollPaddingRight:scroll-pr,scrollPaddingTop:scroll-pt,scrollPaddingBottom:scroll-pb,scrollSnapAlign:snap-align,scrollSnapStop:snap-stop,scrollSnapType:snap-type,scrollSnapStrictness:snap-strictness,scrollSnapMargin:snap-m,scrollSnapMarginTop:snap-mt,scrollSnapMarginBottom:snap-mb,scrollSnapMarginLeft:snap-ml,scrollSnapMarginRight:snap-mr,touchAction:touch,userSelect:select,fill:fill,stroke:stroke,strokeWidth:stroke-w,srOnly:sr,debug:debug,appearance:appearance,backfaceVisibility:backface,clipPath:clip-path,hyphens:hyphens,mask:mask,maskImage:mask-image,maskSize:mask-size,textSizeAdjust:text-adjust,container:cq,containerName:cq-name,containerType:cq-type,textStyle:textStyle"
|
|
5
5
|
|
|
6
6
|
const classNameByProp = new Map()
|
|
7
7
|
const shorthands = new Map()
|
|
@@ -33,6 +33,7 @@ const context = {
|
|
|
33
33
|
return { className: `${propKey}_${withoutSpace(value)}` }
|
|
34
34
|
},
|
|
35
35
|
hasShorthand: true,
|
|
36
|
+
toHash: (path, hashFn) => hashFn(path.join(":")),
|
|
36
37
|
resolveShorthand: resolveShorthand,
|
|
37
38
|
}
|
|
38
39
|
}
|
package/css/cva.d.ts
CHANGED
package/css/cva.mjs
CHANGED
|
@@ -11,9 +11,10 @@ const defaults = (conf) => ({
|
|
|
11
11
|
|
|
12
12
|
export function cva(config) {
|
|
13
13
|
const { base, variants, defaultVariants, compoundVariants } = defaults(config)
|
|
14
|
+
const getVariantProps = (variants) => ({ ...defaultVariants, ...compact(variants) })
|
|
14
15
|
|
|
15
16
|
function resolve(props = {}) {
|
|
16
|
-
const computedVariants =
|
|
17
|
+
const computedVariants = getVariantProps(props)
|
|
17
18
|
let variantCss = { ...base }
|
|
18
19
|
for (const [key, value] of Object.entries(computedVariants)) {
|
|
19
20
|
if (variants[key]?.[value]) {
|
|
@@ -57,6 +58,7 @@ export function cva(config) {
|
|
|
57
58
|
config,
|
|
58
59
|
merge,
|
|
59
60
|
splitVariantProps,
|
|
61
|
+
getVariantProps
|
|
60
62
|
})
|
|
61
63
|
}
|
|
62
64
|
|
package/css/sva.mjs
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { getSlotRecipes, memo, splitProps } from '../helpers.mjs';
|
|
1
|
+
import { compact, getSlotRecipes, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { cva } from './cva.mjs';
|
|
3
|
+
import { cx } from './cx.mjs';
|
|
4
|
+
|
|
5
|
+
const slotClass = (className, slot) => className + '__' + slot
|
|
3
6
|
|
|
4
7
|
export function sva(config) {
|
|
5
8
|
const slots = Object.entries(getSlotRecipes(config)).map(([slot, slotCva]) => [slot, cva(slotCva)])
|
|
9
|
+
const defaultVariants = config.defaultVariants ?? {}
|
|
6
10
|
|
|
7
11
|
function svaFn(props) {
|
|
8
|
-
const result = slots.map(([slot, cvaFn]) => [slot, cvaFn(props)])
|
|
12
|
+
const result = slots.map(([slot, cvaFn]) => [slot, cx(cvaFn(props), config.className && slotClass(config.className, slot))])
|
|
9
13
|
return Object.fromEntries(result)
|
|
10
14
|
}
|
|
11
15
|
|
|
@@ -20,6 +24,7 @@ export function sva(config) {
|
|
|
20
24
|
function splitVariantProps(props) {
|
|
21
25
|
return splitProps(props, variantKeys);
|
|
22
26
|
}
|
|
27
|
+
const getVariantProps = (variants) => ({ ...(defaultVariants || {}), ...compact(variants) })
|
|
23
28
|
|
|
24
29
|
const variantMap = Object.fromEntries(
|
|
25
30
|
Object.entries(variants).map(([key, value]) => [key, Object.keys(value)])
|
|
@@ -31,5 +36,6 @@ export function sva(config) {
|
|
|
31
36
|
variantMap,
|
|
32
37
|
variantKeys,
|
|
33
38
|
splitVariantProps,
|
|
39
|
+
getVariantProps,
|
|
34
40
|
})
|
|
35
41
|
}
|
package/helpers.mjs
CHANGED
|
@@ -14,18 +14,6 @@ function filterBaseConditions(c) {
|
|
|
14
14
|
return c.slice().filter((v) => !isBaseCondition(v));
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
// src/important.ts
|
|
18
|
-
var importantRegex = /\s*!(important)?/i;
|
|
19
|
-
function isImportant(value) {
|
|
20
|
-
return typeof value === "string" ? importantRegex.test(value) : false;
|
|
21
|
-
}
|
|
22
|
-
function withoutImportant(value) {
|
|
23
|
-
return typeof value === "string" ? value.replace(importantRegex, "").trim() : value;
|
|
24
|
-
}
|
|
25
|
-
function withoutSpace(str) {
|
|
26
|
-
return typeof str === "string" ? str.replaceAll(" ", "_") : str;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
17
|
// src/hash.ts
|
|
30
18
|
function toChar(code) {
|
|
31
19
|
return String.fromCharCode(code + (code > 25 ? 39 : 97));
|
|
@@ -47,21 +35,16 @@ function toHash(value) {
|
|
|
47
35
|
return toName(toPhash(5381, value) >>> 0);
|
|
48
36
|
}
|
|
49
37
|
|
|
50
|
-
// src/
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
prev[key] = value;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
return prev;
|
|
64
|
-
}, {});
|
|
38
|
+
// src/important.ts
|
|
39
|
+
var importantRegex = /\s*!(important)?/i;
|
|
40
|
+
function isImportant(value) {
|
|
41
|
+
return typeof value === "string" ? importantRegex.test(value) : false;
|
|
42
|
+
}
|
|
43
|
+
function withoutImportant(value) {
|
|
44
|
+
return typeof value === "string" ? value.replace(importantRegex, "").trim() : value;
|
|
45
|
+
}
|
|
46
|
+
function withoutSpace(str) {
|
|
47
|
+
return typeof str === "string" ? str.replaceAll(" ", "_") : str;
|
|
65
48
|
}
|
|
66
49
|
|
|
67
50
|
// src/memo.ts
|
|
@@ -79,6 +62,23 @@ var memo = (fn) => {
|
|
|
79
62
|
return get;
|
|
80
63
|
};
|
|
81
64
|
|
|
65
|
+
// src/merge-props.ts
|
|
66
|
+
function mergeProps(...sources) {
|
|
67
|
+
const objects = sources.filter(Boolean);
|
|
68
|
+
return objects.reduce((prev, obj) => {
|
|
69
|
+
Object.keys(obj).forEach((key) => {
|
|
70
|
+
const prevValue = prev[key];
|
|
71
|
+
const value = obj[key];
|
|
72
|
+
if (isObject(prevValue) && isObject(value)) {
|
|
73
|
+
prev[key] = mergeProps(prevValue, value);
|
|
74
|
+
} else {
|
|
75
|
+
prev[key] = value;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return prev;
|
|
79
|
+
}, {});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
82
|
// src/walk-object.ts
|
|
83
83
|
var isNotNullish = (element) => element != null;
|
|
84
84
|
function walkObject(target, predicate, options = {}) {
|
|
@@ -87,7 +87,7 @@ function walkObject(target, predicate, options = {}) {
|
|
|
87
87
|
if (isObject(value) || Array.isArray(value)) {
|
|
88
88
|
const result = {};
|
|
89
89
|
for (const [prop, child] of Object.entries(value)) {
|
|
90
|
-
const key = getKey?.(prop) ?? prop;
|
|
90
|
+
const key = getKey?.(prop, child) ?? prop;
|
|
91
91
|
const childPath = [...path, key];
|
|
92
92
|
if (stop?.(value, childPath)) {
|
|
93
93
|
return predicate(value, path);
|
|
@@ -113,21 +113,16 @@ function mapObject(obj, fn) {
|
|
|
113
113
|
|
|
114
114
|
// src/normalize-style-object.ts
|
|
115
115
|
function toResponsiveObject(values, breakpoints) {
|
|
116
|
-
return values.reduce(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return walkObject(styles, (v) => v, {
|
|
127
|
-
getKey: (prop) => {
|
|
128
|
-
return hasShorthand ? resolveShorthand(prop) : prop;
|
|
129
|
-
}
|
|
130
|
-
});
|
|
116
|
+
return values.reduce(
|
|
117
|
+
(acc, current, index) => {
|
|
118
|
+
const key = breakpoints[index];
|
|
119
|
+
if (current != null) {
|
|
120
|
+
acc[key] = current;
|
|
121
|
+
}
|
|
122
|
+
return acc;
|
|
123
|
+
},
|
|
124
|
+
{}
|
|
125
|
+
);
|
|
131
126
|
}
|
|
132
127
|
function normalizeStyleObject(styles, context, shorthand = true) {
|
|
133
128
|
const { utility, conditions } = context;
|
|
@@ -158,14 +153,15 @@ function createCss(context) {
|
|
|
158
153
|
let result;
|
|
159
154
|
if (hash) {
|
|
160
155
|
const baseArray = [...conds.finalize(conditions), className];
|
|
161
|
-
result = formatClassName(toHash(baseArray
|
|
156
|
+
result = formatClassName(utility.toHash(baseArray, toHash));
|
|
162
157
|
} else {
|
|
163
158
|
const baseArray = [...conds.finalize(conditions), formatClassName(className)];
|
|
164
159
|
result = baseArray.join(":");
|
|
165
160
|
}
|
|
166
161
|
return result;
|
|
167
162
|
};
|
|
168
|
-
return memo((
|
|
163
|
+
return memo(({ base, ...styles } = {}) => {
|
|
164
|
+
const styleObject = Object.assign(styles, base);
|
|
169
165
|
const normalizedObject = normalizeStyleObject(styleObject, context);
|
|
170
166
|
const classNames = /* @__PURE__ */ new Set();
|
|
171
167
|
walkObject(normalizedObject, (value, paths) => {
|
|
@@ -184,14 +180,14 @@ function createCss(context) {
|
|
|
184
180
|
});
|
|
185
181
|
}
|
|
186
182
|
function compactStyles(...styles) {
|
|
187
|
-
return styles.filter((style) => isObject(style) && Object.keys(compact(style)).length > 0);
|
|
183
|
+
return styles.flat().filter((style) => isObject(style) && Object.keys(compact(style)).length > 0);
|
|
188
184
|
}
|
|
189
185
|
function createMergeCss(context) {
|
|
190
186
|
function resolve(styles) {
|
|
191
187
|
const allStyles = compactStyles(...styles);
|
|
192
188
|
if (allStyles.length === 1)
|
|
193
189
|
return allStyles;
|
|
194
|
-
return allStyles.map((style) =>
|
|
190
|
+
return allStyles.map((style) => normalizeStyleObject(style, context));
|
|
195
191
|
}
|
|
196
192
|
function mergeCss(...styles) {
|
|
197
193
|
return mergeProps(...resolve(styles));
|
|
@@ -233,7 +229,7 @@ var patternFns = {
|
|
|
233
229
|
isCssUnit
|
|
234
230
|
};
|
|
235
231
|
var getPatternStyles = (pattern, styles) => {
|
|
236
|
-
if (!pattern
|
|
232
|
+
if (!pattern?.defaultValues)
|
|
237
233
|
return styles;
|
|
238
234
|
const defaults = typeof pattern.defaultValues === "function" ? pattern.defaultValues(styles) : pattern.defaultValues;
|
|
239
235
|
return Object.assign({}, defaults, compact(styles));
|
package/jsx/aspect-ratio.mjs
CHANGED
package/jsx/bleed.mjs
CHANGED
package/jsx/box.mjs
CHANGED
package/jsx/center.mjs
CHANGED
package/jsx/circle.mjs
CHANGED
package/jsx/container.mjs
CHANGED
package/jsx/cq.mjs
CHANGED
package/jsx/divider.mjs
CHANGED
package/jsx/factory.mjs
CHANGED
|
@@ -16,15 +16,17 @@ function styledFn(Dynamic, configOrCva = {}, options = {}) {
|
|
|
16
16
|
)
|
|
17
17
|
|
|
18
18
|
const name = getDisplayName(Dynamic)
|
|
19
|
+
const __cvaFn__ = composeCvaFn(Dynamic.__cva__, cvaFn)
|
|
20
|
+
const __shouldForwardProps__ = composeShouldForwardProps(Dynamic, shouldForwardProp)
|
|
19
21
|
|
|
20
22
|
const PixelComponent = defineComponent({
|
|
21
23
|
name: `Pixel.${name}`,
|
|
22
24
|
inheritAttrs: false,
|
|
23
|
-
props: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: null,
|
|
27
|
+
as: { type: [String, Object], default: Dynamic.__base__ || Dynamic }
|
|
28
|
+
},
|
|
29
|
+
setup(props, { slots, attrs, emit }) {
|
|
28
30
|
const combinedProps = computed(() => Object.assign({}, defaultProps, attrs))
|
|
29
31
|
|
|
30
32
|
const splittedProps = computed(() => {
|
|
@@ -47,39 +49,65 @@ function styledFn(Dynamic, configOrCva = {}, options = {}) {
|
|
|
47
49
|
|
|
48
50
|
const classes = configOrCva.__recipe__ ? recipeClass : cvaClass
|
|
49
51
|
|
|
52
|
+
const vModelProps = computed(() => {
|
|
53
|
+
const result = {};
|
|
54
|
+
|
|
55
|
+
if (
|
|
56
|
+
props.as === 'input' &&
|
|
57
|
+
(props.type === 'checkbox' || props.type === 'radio')
|
|
58
|
+
) {
|
|
59
|
+
result.checked = props.modelValue;
|
|
60
|
+
result.onChange = (event) => {
|
|
61
|
+
const checked = !event.currentTarget.checked;
|
|
62
|
+
emit('change', checked, event);
|
|
63
|
+
emit('update:modelValue', checked, event);
|
|
64
|
+
};
|
|
65
|
+
} else if (
|
|
66
|
+
props.as === 'input' ||
|
|
67
|
+
props.as === 'textarea' ||
|
|
68
|
+
props.as === 'select'
|
|
69
|
+
) {
|
|
70
|
+
result.value = props.modelValue;
|
|
71
|
+
result.onInput = (event) => {
|
|
72
|
+
const value = event.currentTarget.value;
|
|
73
|
+
emit('input', value, event);
|
|
74
|
+
emit('update:modelValue', value, event);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return result;
|
|
79
|
+
});
|
|
80
|
+
|
|
50
81
|
return () => {
|
|
51
82
|
const [htmlProps, forwardedProps, _variantProps, _styleProps, elementProps] = splittedProps.value
|
|
83
|
+
|
|
52
84
|
return h(
|
|
53
85
|
props.as,
|
|
54
86
|
{
|
|
55
87
|
...forwardedProps,
|
|
56
88
|
...elementProps,
|
|
57
89
|
...normalizeHTMLProps(htmlProps),
|
|
90
|
+
...vModelProps.value,
|
|
58
91
|
class: classes.value,
|
|
59
92
|
},
|
|
60
|
-
slots
|
|
93
|
+
slots,
|
|
61
94
|
)
|
|
62
95
|
}
|
|
63
96
|
},
|
|
64
97
|
})
|
|
65
98
|
|
|
66
99
|
PixelComponent.displayName = `Pixel.${name}`
|
|
67
|
-
PixelComponent.__cva__ =
|
|
100
|
+
PixelComponent.__cva__ = __cvaFn__
|
|
68
101
|
PixelComponent.__base__ = Dynamic
|
|
69
102
|
PixelComponent.__shouldForwardProps__ = shouldForwardProp
|
|
70
103
|
|
|
71
104
|
return PixelComponent
|
|
72
105
|
}
|
|
73
106
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return styledFn(...args)
|
|
78
|
-
},
|
|
79
|
-
get(_, el) {
|
|
80
|
-
return styledFn(el)
|
|
81
|
-
},
|
|
82
|
-
})
|
|
83
|
-
}
|
|
107
|
+
const tags = 'a, abbr, address, area, article, aside, audio, b, base, bdi, bdo, big, blockquote, body, br, button, canvas, caption, cite, code, col, colgroup, data, datalist, dd, del, details, dfn, dialog, div, dl, dt, em, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, head, header, hgroup, hr, html, i, iframe, img, input, ins, kbd, keygen, label, legend, li, link, main, map, mark, marquee, menu, menuitem, meta, meter, nav, noscript, object, ol, optgroup, option, output, p, param, picture, pre, progress, q, rp, rt, ruby, s, samp, script, section, select, small, source, span, strong, style, sub, summary, sup, table, tbody, td, textarea, tfoot, th, thead, time, title, tr, track, u, ul, var, video, wbr, circle, clipPath, defs, ellipse, foreignObject, g, image, line, linearGradient, mask, path, pattern, polygon, polyline, radialGradient, rect, stop, svg, text, tspan';
|
|
108
|
+
|
|
109
|
+
export const Pixel = /* @__PURE__ */ styledFn.bind();
|
|
84
110
|
|
|
85
|
-
|
|
111
|
+
tags.split(', ').forEach((tag) => {
|
|
112
|
+
Pixel[tag] = Pixel(tag);
|
|
113
|
+
});
|
package/jsx/flex.mjs
CHANGED
package/jsx/float.mjs
CHANGED
package/jsx/grid-item.mjs
CHANGED
package/jsx/grid.mjs
CHANGED
package/jsx/hstack.mjs
CHANGED
package/jsx/index.d.ts
CHANGED
package/jsx/index.mjs
CHANGED
|
@@ -9,7 +9,6 @@ export * from './spacer.mjs';
|
|
|
9
9
|
export * from './square.mjs';
|
|
10
10
|
export * from './circle.mjs';
|
|
11
11
|
export * from './center.mjs';
|
|
12
|
-
export * from './link-box.mjs';
|
|
13
12
|
export * from './link-overlay.mjs';
|
|
14
13
|
export * from './aspect-ratio.mjs';
|
|
15
14
|
export * from './grid.mjs';
|
package/jsx/is-valid-prop.d.ts
CHANGED
|
@@ -4,9 +4,8 @@ import type { DistributiveOmit, HTMLPandaProps, JsxStyleProps, Pretty } from '..
|
|
|
4
4
|
declare const isCssProperty: (value: string) => boolean;
|
|
5
5
|
|
|
6
6
|
type CssPropKey = keyof JsxStyleProps
|
|
7
|
-
type PickedCssProps<T> = Pretty<Pick<T, CssPropKey>>
|
|
8
7
|
type OmittedCssProps<T> = Pretty<DistributiveOmit<T, CssPropKey>>
|
|
9
8
|
|
|
10
|
-
declare const splitCssProps: <T>(props: T) => [
|
|
9
|
+
declare const splitCssProps: <T>(props: T) => [JsxStyleProps, OmittedCssProps<T>]
|
|
11
10
|
|
|
12
11
|
export { isCssProperty, splitCssProps };
|
package/jsx/is-valid-prop.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { splitProps } from '../helpers.mjs';
|
|
2
2
|
import { memo } from '../helpers.mjs';
|
|
3
3
|
// src/index.ts
|
|
4
|
-
var userGeneratedStr = "css,pos,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,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,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,insetInline,insetBlock,inset,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,
|
|
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,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,_hidden,_collapsed,_hasIcon,_hasLabel,_highlight,_hasBorder,_hasBackground,_isFullWidth,_placementLeft,_placementRight,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,textStyle"
|
|
5
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,animationTimingFunction,animationTimeline,appearance,aspectRatio,azimuth,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,
|
|
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
7
|
var allCssProperties = cssPropertiesStr.split(",").concat(userGenerated);
|
|
8
8
|
var properties = new Map(allCssProperties.map((prop) => [prop, true]));
|
|
9
9
|
var cssPropertySelectorRegex = /&|@/;
|