@atlaskit/css 0.0.4 → 0.0.6
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 +12 -0
- package/dist/cjs/index.js +5 -2
- package/dist/es2019/index.js +5 -2
- package/dist/esm/index.js +5 -2
- package/dist/types/index.d.ts +9 -4
- package/dist/types-ts4.5/index.d.ts +10 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/css
|
|
2
2
|
|
|
3
|
+
## 0.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#89540](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/89540) [`1748b673d90d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1748b673d90d) - DSP-17890 Add media query types to createStrictAPI, just be aware that cascading media queries are not guaranteed to work with Compiled, refer to https://compiledcssinjs.com/docs/atomic-css#selector-specificity
|
|
8
|
+
|
|
9
|
+
## 0.0.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116) [`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) - Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
14
|
+
|
|
3
15
|
## 0.0.4
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -17,6 +17,9 @@ var _createStrictAPI = (0, _react2.createStrictAPI)(),
|
|
|
17
17
|
cssMap = exports.cssMap = _createStrictAPI.cssMap,
|
|
18
18
|
cx = exports.cx = _createStrictAPI.cx;
|
|
19
19
|
|
|
20
|
+
// This is to mitigate local TS error TS2315: Type 'StrictXCSSProp' is not generic.
|
|
21
|
+
// Currently for some reason tsc is generating malformed .d.ts in local dev environment, below change fixes it
|
|
22
|
+
|
|
20
23
|
/**
|
|
21
24
|
* ## StrictXCSSProp
|
|
22
25
|
*
|
|
@@ -31,7 +34,7 @@ var _createStrictAPI = (0, _react2.createStrictAPI)(),
|
|
|
31
34
|
* the styles!
|
|
32
35
|
*
|
|
33
36
|
* The {@link StrictXCSSProp} type has generics two of which must be defined — use to explicitly
|
|
34
|
-
* set
|
|
37
|
+
* set what you want to maintain as API. Use {@link XCSSAllProperties} and {@link XCSSAllPseudos}
|
|
35
38
|
* to enable all properties and pseudos.
|
|
36
39
|
*
|
|
37
40
|
* The third generic is used to declare what properties and pseudos should be required.
|
|
@@ -41,7 +44,7 @@ var _createStrictAPI = (0, _react2.createStrictAPI)(),
|
|
|
41
44
|
* // Color is accepted, all other properties / pseudos are considered violations.
|
|
42
45
|
* xcss?: StrictXCSSProp<'color', never>;
|
|
43
46
|
*
|
|
44
|
-
* // Only
|
|
47
|
+
* // Only background color and hover pseudo are accepted.
|
|
45
48
|
* xcss?: StrictXCSSProp<'backgroundColor', '&:hover'>;
|
|
46
49
|
*
|
|
47
50
|
* // All properties are accepted, all pseudos are considered violations.
|
package/dist/es2019/index.js
CHANGED
|
@@ -10,6 +10,9 @@ const {
|
|
|
10
10
|
} = createStrictAPI();
|
|
11
11
|
export { css, cssMap, cx };
|
|
12
12
|
|
|
13
|
+
// This is to mitigate local TS error TS2315: Type 'StrictXCSSProp' is not generic.
|
|
14
|
+
// Currently for some reason tsc is generating malformed .d.ts in local dev environment, below change fixes it
|
|
15
|
+
|
|
13
16
|
/**
|
|
14
17
|
* ## StrictXCSSProp
|
|
15
18
|
*
|
|
@@ -24,7 +27,7 @@ export { css, cssMap, cx };
|
|
|
24
27
|
* the styles!
|
|
25
28
|
*
|
|
26
29
|
* The {@link StrictXCSSProp} type has generics two of which must be defined — use to explicitly
|
|
27
|
-
* set
|
|
30
|
+
* set what you want to maintain as API. Use {@link XCSSAllProperties} and {@link XCSSAllPseudos}
|
|
28
31
|
* to enable all properties and pseudos.
|
|
29
32
|
*
|
|
30
33
|
* The third generic is used to declare what properties and pseudos should be required.
|
|
@@ -34,7 +37,7 @@ export { css, cssMap, cx };
|
|
|
34
37
|
* // Color is accepted, all other properties / pseudos are considered violations.
|
|
35
38
|
* xcss?: StrictXCSSProp<'color', never>;
|
|
36
39
|
*
|
|
37
|
-
* // Only
|
|
40
|
+
* // Only background color and hover pseudo are accepted.
|
|
38
41
|
* xcss?: StrictXCSSProp<'backgroundColor', '&:hover'>;
|
|
39
42
|
*
|
|
40
43
|
* // All properties are accepted, all pseudos are considered violations.
|
package/dist/esm/index.js
CHANGED
|
@@ -9,6 +9,9 @@ var _createStrictAPI = createStrictAPI(),
|
|
|
9
9
|
cx = _createStrictAPI.cx;
|
|
10
10
|
export { css, cssMap, cx };
|
|
11
11
|
|
|
12
|
+
// This is to mitigate local TS error TS2315: Type 'StrictXCSSProp' is not generic.
|
|
13
|
+
// Currently for some reason tsc is generating malformed .d.ts in local dev environment, below change fixes it
|
|
14
|
+
|
|
12
15
|
/**
|
|
13
16
|
* ## StrictXCSSProp
|
|
14
17
|
*
|
|
@@ -23,7 +26,7 @@ export { css, cssMap, cx };
|
|
|
23
26
|
* the styles!
|
|
24
27
|
*
|
|
25
28
|
* The {@link StrictXCSSProp} type has generics two of which must be defined — use to explicitly
|
|
26
|
-
* set
|
|
29
|
+
* set what you want to maintain as API. Use {@link XCSSAllProperties} and {@link XCSSAllPseudos}
|
|
27
30
|
* to enable all properties and pseudos.
|
|
28
31
|
*
|
|
29
32
|
* The third generic is used to declare what properties and pseudos should be required.
|
|
@@ -33,7 +36,7 @@ export { css, cssMap, cx };
|
|
|
33
36
|
* // Color is accepted, all other properties / pseudos are considered violations.
|
|
34
37
|
* xcss?: StrictXCSSProp<'color', never>;
|
|
35
38
|
*
|
|
36
|
-
* // Only
|
|
39
|
+
* // Only background color and hover pseudo are accepted.
|
|
37
40
|
* xcss?: StrictXCSSProp<'backgroundColor', '&:hover'>;
|
|
38
41
|
*
|
|
39
42
|
* // All properties are accepted, all pseudos are considered violations.
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { type CSSPseudos, type StrictCSSProperties, type XCSSAllProperties, type XCSSAllPseudos } from '@compiled/react';
|
|
2
2
|
import { type DesignTokenStyles } from '@atlaskit/tokens/css-type-schema';
|
|
3
|
+
type MediaQuery = '(min-width: 30rem)' | '(min-width: 48rem)' | '(min-width: 64rem)' | '(min-width: 90rem)' | '(min-width: 110rem)';
|
|
3
4
|
declare const XCSSProp: <TAllowedProperties extends "flex" | "grid" | "fill" | "stroke" | "all" | "bottom" | "left" | "right" | "top" | "clip" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "alignTracks" | "animationComposition" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimeline" | "animationTimingFunction" | "appearance" | "aspectRatio" | "backdropFilter" | "backfaceVisibility" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "blockOverflow" | "blockSize" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInlineColor" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderInlineStyle" | "borderInlineWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxDecorationBreak" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "caretShape" | "clear" | "clipPath" | "color" | "colorAdjust" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "contain" | "containIntrinsicBlockSize" | "containIntrinsicHeight" | "containIntrinsicInlineSize" | "containIntrinsicWidth" | "containerName" | "containerType" | "content" | "contentVisibility" | "counterIncrement" | "counterReset" | "counterSet" | "cursor" | "direction" | "display" | "emptyCells" | "filter" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontLanguageOverride" | "fontOpticalSizing" | "fontPalette" | "fontSize" | "fontSizeAdjust" | "fontSmooth" | "fontStretch" | "fontStyle" | "fontSynthesis" | "fontVariant" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantEmoji" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontVariationSettings" | "fontWeight" | "forcedColorAdjust" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "hangingPunctuation" | "height" | "hyphenateCharacter" | "hyphenateLimitChars" | "hyphens" | "imageOrientation" | "imageRendering" | "imageResolution" | "initialLetter" | "inlineSize" | "inputSecurity" | "insetBlockEnd" | "insetBlockStart" | "insetInlineEnd" | "insetInlineStart" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "justifyTracks" | "letterSpacing" | "lineBreak" | "lineHeight" | "lineHeightStep" | "listStyleImage" | "listStylePosition" | "listStyleType" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "marginTrim" | "maskBorderMode" | "maskBorderOutset" | "maskBorderRepeat" | "maskBorderSlice" | "maskBorderSource" | "maskBorderWidth" | "maskClip" | "maskComposite" | "maskImage" | "maskMode" | "maskOrigin" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "mathDepth" | "mathShift" | "mathStyle" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxLines" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "motionDistance" | "motionPath" | "motionRotation" | "objectFit" | "objectPosition" | "offsetAnchor" | "offsetDistance" | "offsetPath" | "offsetPosition" | "offsetRotate" | "offsetRotation" | "opacity" | "order" | "orphans" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflowAnchor" | "overflowBlock" | "overflowClipBox" | "overflowClipMargin" | "overflowInline" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "page" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "paintOrder" | "perspective" | "perspectiveOrigin" | "pointerEvents" | "position" | "printColorAdjust" | "quotes" | "resize" | "rotate" | "rowGap" | "rubyAlign" | "rubyMerge" | "rubyPosition" | "scale" | "scrollBehavior" | "scrollMarginBlockEnd" | "scrollMarginBlockStart" | "scrollMarginBottom" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPaddingBlockEnd" | "scrollPaddingBlockStart" | "scrollPaddingBottom" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapMarginBottom" | "scrollSnapMarginLeft" | "scrollSnapMarginRight" | "scrollSnapMarginTop" | "scrollSnapStop" | "scrollSnapType" | "scrollTimelineAxis" | "scrollTimelineName" | "scrollbarColor" | "scrollbarGutter" | "scrollbarWidth" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textCombineUpright" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkip" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textJustify" | "textOrientation" | "textOverflow" | "textRendering" | "textShadow" | "textSizeAdjust" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "verticalAlign" | "viewTransitionName" | "visibility" | "whiteSpace" | "widows" | "width" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "zoom" | "animation" | "background" | "backgroundPosition" | "border" | "borderBlock" | "borderBlockEnd" | "borderBlockStart" | "borderBottom" | "borderColor" | "borderImage" | "borderInline" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "caret" | "columnRule" | "columns" | "containIntrinsicSize" | "container" | "flexFlow" | "font" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "gridTemplate" | "inset" | "insetBlock" | "insetInline" | "lineClamp" | "listStyle" | "margin" | "marginBlock" | "marginInline" | "mask" | "maskBorder" | "motion" | "offset" | "outline" | "overflow" | "overscrollBehavior" | "padding" | "paddingBlock" | "paddingInline" | "placeContent" | "placeItems" | "placeSelf" | "scrollMargin" | "scrollMarginBlock" | "scrollMarginInline" | "scrollPadding" | "scrollPaddingBlock" | "scrollPaddingInline" | "scrollSnapMargin" | "scrollTimeline" | "textDecoration" | "textEmphasis" | "transition" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "marker" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect", TAllowedPseudos extends CSSPseudos, TRequiredProperties extends {
|
|
4
5
|
requiredProperties: TAllowedProperties;
|
|
5
|
-
} = never>() => import("@compiled/react
|
|
6
|
+
} = never>() => import("@compiled/react").Internal$XCSSProp<TAllowedProperties, TAllowedPseudos, MediaQuery, DesignTokenStyles, TRequiredProperties, "strict">, css: <TStyles extends import("@compiled/react").ApplySchema<TStyles, DesignTokenStyles, "">>(styles: Readonly<import("csstype").StandardProperties<0 | (string & {}), string & {}> & import("csstype").SvgProperties<0 | (string & {}), string & {}>> & import("@compiled/react").PseudosDeclarations & import("@compiled/react").MediaQueries<MediaQuery> & TStyles) => Readonly<import("csstype").Properties<import("@compiled/react").CssFunction<unknown>, string & {}>>, cssMap: <TObject extends Record<string, import("@compiled/react").AllowedStyles<MediaQuery>>, TStylesMap extends import("@compiled/react").ApplySchemaMap<TObject, DesignTokenStyles>>(styles: Record<string, import("@compiled/react").AllowedStyles<MediaQuery>> & TStylesMap) => { readonly [P in keyof TStylesMap]: import("@compiled/react").CompiledStyles<TStylesMap[P]>; }, cx: <TStyles extends import("@compiled/react").XCSSProp<any, any, never>[]>(...styles: TStyles) => TStyles[number];
|
|
6
7
|
export { css, cssMap, cx, XCSSAllProperties, XCSSAllPseudos };
|
|
8
|
+
type LocalXCSSProp<TAllowedProperties extends keyof StrictCSSProperties, TAllowedPseudos extends CSSPseudos, TRequiredProperties extends {
|
|
9
|
+
requiredProperties: TAllowedProperties;
|
|
10
|
+
requiredPseudos: TAllowedPseudos;
|
|
11
|
+
} = never> = ReturnType<typeof XCSSProp<TAllowedProperties, TAllowedPseudos, TRequiredProperties>>;
|
|
7
12
|
/**
|
|
8
13
|
* ## StrictXCSSProp
|
|
9
14
|
*
|
|
@@ -18,7 +23,7 @@ export { css, cssMap, cx, XCSSAllProperties, XCSSAllPseudos };
|
|
|
18
23
|
* the styles!
|
|
19
24
|
*
|
|
20
25
|
* The {@link StrictXCSSProp} type has generics two of which must be defined — use to explicitly
|
|
21
|
-
* set
|
|
26
|
+
* set what you want to maintain as API. Use {@link XCSSAllProperties} and {@link XCSSAllPseudos}
|
|
22
27
|
* to enable all properties and pseudos.
|
|
23
28
|
*
|
|
24
29
|
* The third generic is used to declare what properties and pseudos should be required.
|
|
@@ -28,7 +33,7 @@ export { css, cssMap, cx, XCSSAllProperties, XCSSAllPseudos };
|
|
|
28
33
|
* // Color is accepted, all other properties / pseudos are considered violations.
|
|
29
34
|
* xcss?: StrictXCSSProp<'color', never>;
|
|
30
35
|
*
|
|
31
|
-
* // Only
|
|
36
|
+
* // Only background color and hover pseudo are accepted.
|
|
32
37
|
* xcss?: StrictXCSSProp<'backgroundColor', '&:hover'>;
|
|
33
38
|
*
|
|
34
39
|
* // All properties are accepted, all pseudos are considered violations.
|
|
@@ -66,4 +71,4 @@ export { css, cssMap, cx, XCSSAllProperties, XCSSAllPseudos };
|
|
|
66
71
|
export type StrictXCSSProp<TAllowedProperties extends keyof StrictCSSProperties, TAllowedPseudos extends CSSPseudos, TRequiredProperties extends {
|
|
67
72
|
requiredProperties: TAllowedProperties;
|
|
68
73
|
requiredPseudos: TAllowedPseudos;
|
|
69
|
-
} = never> =
|
|
74
|
+
} = never> = LocalXCSSProp<TAllowedProperties, TAllowedPseudos, TRequiredProperties>;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { type CSSPseudos, type StrictCSSProperties, type XCSSAllProperties, type XCSSAllPseudos } from '@compiled/react';
|
|
2
2
|
import { type DesignTokenStyles } from '@atlaskit/tokens/css-type-schema';
|
|
3
|
+
type MediaQuery = '(min-width: 30rem)' | '(min-width: 48rem)' | '(min-width: 64rem)' | '(min-width: 90rem)' | '(min-width: 110rem)';
|
|
3
4
|
declare const XCSSProp: <TAllowedProperties extends "flex" | "grid" | "fill" | "stroke" | "all" | "bottom" | "left" | "right" | "top" | "clip" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "alignTracks" | "animationComposition" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimeline" | "animationTimingFunction" | "appearance" | "aspectRatio" | "backdropFilter" | "backfaceVisibility" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "blockOverflow" | "blockSize" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInlineColor" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderInlineStyle" | "borderInlineWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxDecorationBreak" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "caretShape" | "clear" | "clipPath" | "color" | "colorAdjust" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "contain" | "containIntrinsicBlockSize" | "containIntrinsicHeight" | "containIntrinsicInlineSize" | "containIntrinsicWidth" | "containerName" | "containerType" | "content" | "contentVisibility" | "counterIncrement" | "counterReset" | "counterSet" | "cursor" | "direction" | "display" | "emptyCells" | "filter" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "fontFamily" | "fontFeatureSettings" | "fontKerning" | "fontLanguageOverride" | "fontOpticalSizing" | "fontPalette" | "fontSize" | "fontSizeAdjust" | "fontSmooth" | "fontStretch" | "fontStyle" | "fontSynthesis" | "fontVariant" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantEmoji" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontVariationSettings" | "fontWeight" | "forcedColorAdjust" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "hangingPunctuation" | "height" | "hyphenateCharacter" | "hyphenateLimitChars" | "hyphens" | "imageOrientation" | "imageRendering" | "imageResolution" | "initialLetter" | "inlineSize" | "inputSecurity" | "insetBlockEnd" | "insetBlockStart" | "insetInlineEnd" | "insetInlineStart" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "justifyTracks" | "letterSpacing" | "lineBreak" | "lineHeight" | "lineHeightStep" | "listStyleImage" | "listStylePosition" | "listStyleType" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "marginTrim" | "maskBorderMode" | "maskBorderOutset" | "maskBorderRepeat" | "maskBorderSlice" | "maskBorderSource" | "maskBorderWidth" | "maskClip" | "maskComposite" | "maskImage" | "maskMode" | "maskOrigin" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "mathDepth" | "mathShift" | "mathStyle" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxLines" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "motionDistance" | "motionPath" | "motionRotation" | "objectFit" | "objectPosition" | "offsetAnchor" | "offsetDistance" | "offsetPath" | "offsetPosition" | "offsetRotate" | "offsetRotation" | "opacity" | "order" | "orphans" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflowAnchor" | "overflowBlock" | "overflowClipBox" | "overflowClipMargin" | "overflowInline" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "page" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "paintOrder" | "perspective" | "perspectiveOrigin" | "pointerEvents" | "position" | "printColorAdjust" | "quotes" | "resize" | "rotate" | "rowGap" | "rubyAlign" | "rubyMerge" | "rubyPosition" | "scale" | "scrollBehavior" | "scrollMarginBlockEnd" | "scrollMarginBlockStart" | "scrollMarginBottom" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPaddingBlockEnd" | "scrollPaddingBlockStart" | "scrollPaddingBottom" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapMarginBottom" | "scrollSnapMarginLeft" | "scrollSnapMarginRight" | "scrollSnapMarginTop" | "scrollSnapStop" | "scrollSnapType" | "scrollTimelineAxis" | "scrollTimelineName" | "scrollbarColor" | "scrollbarGutter" | "scrollbarWidth" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textCombineUpright" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkip" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textJustify" | "textOrientation" | "textOverflow" | "textRendering" | "textShadow" | "textSizeAdjust" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "touchAction" | "transform" | "transformBox" | "transformOrigin" | "transformStyle" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "userSelect" | "verticalAlign" | "viewTransitionName" | "visibility" | "whiteSpace" | "widows" | "width" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "zoom" | "animation" | "background" | "backgroundPosition" | "border" | "borderBlock" | "borderBlockEnd" | "borderBlockStart" | "borderBottom" | "borderColor" | "borderImage" | "borderInline" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "caret" | "columnRule" | "columns" | "containIntrinsicSize" | "container" | "flexFlow" | "font" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "gridTemplate" | "inset" | "insetBlock" | "insetInline" | "lineClamp" | "listStyle" | "margin" | "marginBlock" | "marginInline" | "mask" | "maskBorder" | "motion" | "offset" | "outline" | "overflow" | "overscrollBehavior" | "padding" | "paddingBlock" | "paddingInline" | "placeContent" | "placeItems" | "placeSelf" | "scrollMargin" | "scrollMarginBlock" | "scrollMarginInline" | "scrollPadding" | "scrollPaddingBlock" | "scrollPaddingInline" | "scrollSnapMargin" | "scrollTimeline" | "textDecoration" | "textEmphasis" | "transition" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "marker" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect", TAllowedPseudos extends CSSPseudos, TRequiredProperties extends {
|
|
4
5
|
requiredProperties: TAllowedProperties;
|
|
5
|
-
} = never>() => import("@compiled/react
|
|
6
|
-
readonly [P in keyof TStylesMap]: import("@compiled/react
|
|
6
|
+
} = never>() => import("@compiled/react").Internal$XCSSProp<TAllowedProperties, TAllowedPseudos, MediaQuery, DesignTokenStyles, TRequiredProperties, "strict">, css: <TStyles extends import("@compiled/react").ApplySchema<TStyles, DesignTokenStyles, "">>(styles: Readonly<import("csstype").StandardProperties<0 | (string & {}), string & {}> & import("csstype").SvgProperties<0 | (string & {}), string & {}>> & import("@compiled/react").PseudosDeclarations & import("@compiled/react").MediaQueries<MediaQuery> & TStyles) => Readonly<import("csstype").Properties<import("@compiled/react").CssFunction<unknown>, string & {}>>, cssMap: <TObject extends Record<string, import("@compiled/react").AllowedStyles<MediaQuery>>, TStylesMap extends import("@compiled/react").ApplySchemaMap<TObject, DesignTokenStyles>>(styles: Record<string, import("@compiled/react").AllowedStyles<MediaQuery>> & TStylesMap) => {
|
|
7
|
+
readonly [P in keyof TStylesMap]: import("@compiled/react").CompiledStyles<TStylesMap[P]>;
|
|
7
8
|
}, cx: <TStyles extends import("@compiled/react").XCSSProp<any, any, never>[]>(...styles: TStyles) => TStyles[number];
|
|
8
9
|
export { css, cssMap, cx, XCSSAllProperties, XCSSAllPseudos };
|
|
10
|
+
type LocalXCSSProp<TAllowedProperties extends keyof StrictCSSProperties, TAllowedPseudos extends CSSPseudos, TRequiredProperties extends {
|
|
11
|
+
requiredProperties: TAllowedProperties;
|
|
12
|
+
requiredPseudos: TAllowedPseudos;
|
|
13
|
+
} = never> = ReturnType<typeof XCSSProp<TAllowedProperties, TAllowedPseudos, TRequiredProperties>>;
|
|
9
14
|
/**
|
|
10
15
|
* ## StrictXCSSProp
|
|
11
16
|
*
|
|
@@ -20,7 +25,7 @@ export { css, cssMap, cx, XCSSAllProperties, XCSSAllPseudos };
|
|
|
20
25
|
* the styles!
|
|
21
26
|
*
|
|
22
27
|
* The {@link StrictXCSSProp} type has generics two of which must be defined — use to explicitly
|
|
23
|
-
* set
|
|
28
|
+
* set what you want to maintain as API. Use {@link XCSSAllProperties} and {@link XCSSAllPseudos}
|
|
24
29
|
* to enable all properties and pseudos.
|
|
25
30
|
*
|
|
26
31
|
* The third generic is used to declare what properties and pseudos should be required.
|
|
@@ -30,7 +35,7 @@ export { css, cssMap, cx, XCSSAllProperties, XCSSAllPseudos };
|
|
|
30
35
|
* // Color is accepted, all other properties / pseudos are considered violations.
|
|
31
36
|
* xcss?: StrictXCSSProp<'color', never>;
|
|
32
37
|
*
|
|
33
|
-
* // Only
|
|
38
|
+
* // Only background color and hover pseudo are accepted.
|
|
34
39
|
* xcss?: StrictXCSSProp<'backgroundColor', '&:hover'>;
|
|
35
40
|
*
|
|
36
41
|
* // All properties are accepted, all pseudos are considered violations.
|
|
@@ -68,4 +73,4 @@ export { css, cssMap, cx, XCSSAllProperties, XCSSAllPseudos };
|
|
|
68
73
|
export type StrictXCSSProp<TAllowedProperties extends keyof StrictCSSProperties, TAllowedPseudos extends CSSPseudos, TRequiredProperties extends {
|
|
69
74
|
requiredProperties: TAllowedProperties;
|
|
70
75
|
requiredPseudos: TAllowedPseudos;
|
|
71
|
-
} = never> =
|
|
76
|
+
} = never> = LocalXCSSProp<TAllowedProperties, TAllowedPseudos, TRequiredProperties>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/css",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Style components backed by Atlassian Design System design tokens powered by Compiled CSS-in-JS.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
".": "./src/index.ts"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@atlaskit/tokens": "^1.
|
|
38
|
+
"@atlaskit/tokens": "^1.43.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0",
|
|
40
40
|
"@compiled/react": "^0.17.0"
|
|
41
41
|
},
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
51
51
|
"@testing-library/react": "^12.1.5",
|
|
52
52
|
"react-dom": "^16.8.0",
|
|
53
|
-
"typescript": "~4.
|
|
53
|
+
"typescript": "~5.4.2",
|
|
54
54
|
"wait-for-expect": "^1.2.0"
|
|
55
55
|
},
|
|
56
56
|
"techstack": {
|