@atlaskit/primitives
Advanced tools
Comparing version 10.1.0 to 11.0.0
# @atlaskit/primitives | ||
## 11.0.0 | ||
### Major Changes | ||
- [#119014](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/119014) | ||
[`80c46fcb18957`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/80c46fcb18957) - | ||
Increased type safety for `xcss`. In general, non-token values for the following properties are no | ||
longer allowed: | ||
- `margin` | ||
- `marginBlock` | ||
- `marginBlockEnd` | ||
- `marginBlockStart` | ||
- `marginBottom` | ||
- `marginInline` | ||
- `marginInlineEnd` | ||
- `marginInlineStart` | ||
- `marginLeft` | ||
- `marginRight` | ||
- `marginTop` | ||
- `paddingBottom` | ||
- `paddingLeft` | ||
- `paddingRight` | ||
- `paddingTop` | ||
Note: Logical properties for `padding`, e.g. `paddingInline`, already prohibit non-token values. | ||
For example: | ||
```typescript | ||
const styles = xcss({ | ||
padding: '8px', // <-- Type Error | ||
^^^^^ | ||
}); | ||
``` | ||
A few additional non-token values are still accepted: | ||
- `margin`: `'0 auto'` | `'auto'` | `'0'` | ||
- `marginBlock`: `'auto'` | `'0'` | ||
- `marginBlockEnd`: `'auto'` | `'0'` | ||
- `marginBlockStart`: `'auto'` | `'0'` | ||
- `marginBottom`: `'auto'` | `'0'` | ||
- `marginInline`: `'auto'` | `'0'` | ||
- `marginInlineEnd`: `'auto'` | `'0'` | ||
- `marginInlineStart`: `'auto'` | `'0'` | ||
- `marginLeft`: `'auto'` | `'0'` | ||
- `marginRight`: `'auto'` | `'0'` | ||
- `marginTop`: `'auto'` | `'0'` | ||
- `paddingBlock`: `'0'` | ||
- `paddingBlockEnd`: `'0'` | ||
- `paddingBlockStart`: `'0'` | ||
- `paddingBottom`: `'0'` | ||
- `paddingInline`: `'0'` | ||
- `paddingInlineEnd`: `'0'` | ||
- `paddingInlineStart`: `'0'` | ||
- `paddingLeft`: `'0'` | ||
- `paddingRight`: `'0'` | ||
- `paddingTop`: `'0'` | ||
as well as global CSS properties: `'inherit'` | `'initial'` | `'revert'` | `'revert-layer'` | | ||
`'unset'` | ||
## 10.1.0 | ||
@@ -4,0 +67,0 @@ |
@@ -106,3 +106,3 @@ "use strict"; | ||
packageName: "@atlaskit/primitives", | ||
packageVersion: "10.1.0", | ||
packageVersion: "11.0.0", | ||
analyticsData: analyticsContext, | ||
@@ -109,0 +109,0 @@ actionSubject: 'link' |
@@ -98,3 +98,3 @@ "use strict"; | ||
packageName: "@atlaskit/primitives", | ||
packageVersion: "10.1.0", | ||
packageVersion: "11.0.0", | ||
analyticsData: analyticsContext, | ||
@@ -101,0 +101,0 @@ actionSubject: 'button' |
@@ -533,2 +533,4 @@ "use strict"; | ||
// Margin needs some bespoke types: https://atlassian.slack.com/archives/CKRHB23K8/p1712623192772909 | ||
// Generate maps for Box props. backgroundColor, padding, etc | ||
@@ -535,0 +537,0 @@ var spacingProperties = [ |
@@ -96,3 +96,3 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
packageName: "@atlaskit/primitives", | ||
packageVersion: "10.1.0", | ||
packageVersion: "11.0.0", | ||
analyticsData: analyticsContext, | ||
@@ -99,0 +99,0 @@ actionSubject: 'link' |
@@ -88,3 +88,3 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
packageName: "@atlaskit/primitives", | ||
packageVersion: "10.1.0", | ||
packageVersion: "11.0.0", | ||
analyticsData: analyticsContext, | ||
@@ -91,0 +91,0 @@ actionSubject: 'button' |
@@ -528,2 +528,4 @@ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766 | ||
// Margin needs some bespoke types: https://atlassian.slack.com/archives/CKRHB23K8/p1712623192772909 | ||
// Generate maps for Box props. backgroundColor, padding, etc | ||
@@ -530,0 +532,0 @@ const spacingProperties = [ |
@@ -100,3 +100,3 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
packageName: "@atlaskit/primitives", | ||
packageVersion: "10.1.0", | ||
packageVersion: "11.0.0", | ||
analyticsData: analyticsContext, | ||
@@ -103,0 +103,0 @@ actionSubject: 'link' |
@@ -92,3 +92,3 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
packageName: "@atlaskit/primitives", | ||
packageVersion: "10.1.0", | ||
packageVersion: "11.0.0", | ||
analyticsData: analyticsContext, | ||
@@ -95,0 +95,0 @@ actionSubject: 'button' |
@@ -528,2 +528,4 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty"; | ||
// Margin needs some bespoke types: https://atlassian.slack.com/archives/CKRHB23K8/p1712623192772909 | ||
// Generate maps for Box props. backgroundColor, padding, etc | ||
@@ -530,0 +532,0 @@ var spacingProperties = [ |
@@ -553,3 +553,5 @@ import { type SerializedStyles } from '@emotion/react'; | ||
*/ | ||
type MarginSpace = AllSpace | 'auto'; | ||
type MarginSpace = AllSpace | 'auto' | '0'; | ||
type PaddingSpace = Space | '0'; | ||
type GlobalValue = 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset'; | ||
type AutoComplete<T extends string> = T | Omit<string, T>; | ||
@@ -605,13 +607,13 @@ export type TokenisedProps = { | ||
left?: AutoComplete<AllSpace>; | ||
margin?: AutoComplete<MarginSpace>; | ||
marginBlock?: AutoComplete<MarginSpace>; | ||
marginBlockEnd?: AutoComplete<MarginSpace>; | ||
marginBlockStart?: AutoComplete<MarginSpace>; | ||
marginBottom?: AutoComplete<MarginSpace>; | ||
marginInline?: AutoComplete<MarginSpace>; | ||
marginInlineEnd?: AutoComplete<MarginSpace>; | ||
marginInlineStart?: AutoComplete<MarginSpace>; | ||
marginLeft?: AutoComplete<MarginSpace>; | ||
marginRight?: AutoComplete<MarginSpace>; | ||
marginTop?: AutoComplete<MarginSpace>; | ||
margin?: MarginSpace | '0 auto' | GlobalValue; | ||
marginBlock?: MarginSpace | GlobalValue; | ||
marginInline?: MarginSpace | GlobalValue; | ||
marginBlockEnd?: MarginSpace | GlobalValue; | ||
marginBlockStart?: MarginSpace | GlobalValue; | ||
marginBottom?: MarginSpace | GlobalValue; | ||
marginInlineEnd?: MarginSpace | GlobalValue; | ||
marginInlineStart?: MarginSpace | GlobalValue; | ||
marginLeft?: MarginSpace | GlobalValue; | ||
marginRight?: MarginSpace | GlobalValue; | ||
marginTop?: MarginSpace | GlobalValue; | ||
maxBlockSize?: Dimension | string; | ||
@@ -629,13 +631,13 @@ maxHeight?: Dimension | string; | ||
outlineWidth?: BorderWidth | string; | ||
padding?: Space; | ||
paddingBlock?: Space; | ||
paddingBlockEnd?: Space; | ||
paddingBlockStart?: Space; | ||
paddingBottom?: AutoComplete<Space>; | ||
paddingInline?: Space; | ||
paddingInlineEnd?: Space; | ||
paddingInlineStart?: Space; | ||
paddingLeft?: AutoComplete<Space>; | ||
paddingRight?: AutoComplete<Space>; | ||
paddingTop?: AutoComplete<Space>; | ||
padding?: PaddingSpace | GlobalValue; | ||
paddingBlock?: PaddingSpace | GlobalValue; | ||
paddingBlockEnd?: PaddingSpace | GlobalValue; | ||
paddingBlockStart?: PaddingSpace | GlobalValue; | ||
paddingBottom?: PaddingSpace | GlobalValue; | ||
paddingInline?: PaddingSpace | GlobalValue; | ||
paddingInlineEnd?: PaddingSpace | GlobalValue; | ||
paddingInlineStart?: PaddingSpace | GlobalValue; | ||
paddingLeft?: PaddingSpace | GlobalValue; | ||
paddingRight?: PaddingSpace | GlobalValue; | ||
paddingTop?: PaddingSpace | GlobalValue; | ||
right?: AutoComplete<AllSpace>; | ||
@@ -642,0 +644,0 @@ rowGap?: Space; |
@@ -553,3 +553,5 @@ import { type SerializedStyles } from '@emotion/react'; | ||
*/ | ||
type MarginSpace = AllSpace | 'auto'; | ||
type MarginSpace = AllSpace | 'auto' | '0'; | ||
type PaddingSpace = Space | '0'; | ||
type GlobalValue = 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset'; | ||
type AutoComplete<T extends string> = T | Omit<string, T>; | ||
@@ -605,13 +607,13 @@ export type TokenisedProps = { | ||
left?: AutoComplete<AllSpace>; | ||
margin?: AutoComplete<MarginSpace>; | ||
marginBlock?: AutoComplete<MarginSpace>; | ||
marginBlockEnd?: AutoComplete<MarginSpace>; | ||
marginBlockStart?: AutoComplete<MarginSpace>; | ||
marginBottom?: AutoComplete<MarginSpace>; | ||
marginInline?: AutoComplete<MarginSpace>; | ||
marginInlineEnd?: AutoComplete<MarginSpace>; | ||
marginInlineStart?: AutoComplete<MarginSpace>; | ||
marginLeft?: AutoComplete<MarginSpace>; | ||
marginRight?: AutoComplete<MarginSpace>; | ||
marginTop?: AutoComplete<MarginSpace>; | ||
margin?: MarginSpace | '0 auto' | GlobalValue; | ||
marginBlock?: MarginSpace | GlobalValue; | ||
marginInline?: MarginSpace | GlobalValue; | ||
marginBlockEnd?: MarginSpace | GlobalValue; | ||
marginBlockStart?: MarginSpace | GlobalValue; | ||
marginBottom?: MarginSpace | GlobalValue; | ||
marginInlineEnd?: MarginSpace | GlobalValue; | ||
marginInlineStart?: MarginSpace | GlobalValue; | ||
marginLeft?: MarginSpace | GlobalValue; | ||
marginRight?: MarginSpace | GlobalValue; | ||
marginTop?: MarginSpace | GlobalValue; | ||
maxBlockSize?: Dimension | string; | ||
@@ -629,13 +631,13 @@ maxHeight?: Dimension | string; | ||
outlineWidth?: BorderWidth | string; | ||
padding?: Space; | ||
paddingBlock?: Space; | ||
paddingBlockEnd?: Space; | ||
paddingBlockStart?: Space; | ||
paddingBottom?: AutoComplete<Space>; | ||
paddingInline?: Space; | ||
paddingInlineEnd?: Space; | ||
paddingInlineStart?: Space; | ||
paddingLeft?: AutoComplete<Space>; | ||
paddingRight?: AutoComplete<Space>; | ||
paddingTop?: AutoComplete<Space>; | ||
padding?: PaddingSpace | GlobalValue; | ||
paddingBlock?: PaddingSpace | GlobalValue; | ||
paddingBlockEnd?: PaddingSpace | GlobalValue; | ||
paddingBlockStart?: PaddingSpace | GlobalValue; | ||
paddingBottom?: PaddingSpace | GlobalValue; | ||
paddingInline?: PaddingSpace | GlobalValue; | ||
paddingInlineEnd?: PaddingSpace | GlobalValue; | ||
paddingInlineStart?: PaddingSpace | GlobalValue; | ||
paddingLeft?: PaddingSpace | GlobalValue; | ||
paddingRight?: PaddingSpace | GlobalValue; | ||
paddingTop?: PaddingSpace | GlobalValue; | ||
right?: AutoComplete<AllSpace>; | ||
@@ -642,0 +644,0 @@ rowGap?: Space; |
{ | ||
"name": "@atlaskit/primitives", | ||
"version": "10.1.0", | ||
"version": "11.0.0", | ||
"description": "Primitives are token-backed low-level building blocks.", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1893243
15684