@atlaskit/css 0.18.1 → 0.19.0
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
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/css
|
|
2
2
|
|
|
3
|
+
## 0.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`55546332d4ef4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55546332d4ef4) -
|
|
8
|
+
Restricted `borderRadius` xcss and cssMap types to only accept tokens, 0, and "inherit".
|
|
9
|
+
Restricted `borderWidth` types to only accept tokens and 0. Previously any string was allowed,
|
|
10
|
+
this is no longer the case and will throw a type error.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 0.18.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { css, type SerializedStyles } from '@emotion/react';
|
|
3
3
|
|
|
4
4
|
import { CURRENT_SURFACE_CSS_VAR, token } from '@atlaskit/tokens';
|
|
5
|
+
import type { CSSTokenMap } from '@atlaskit/tokens/token-names';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
@@ -1585,6 +1586,15 @@ export type MetricTextSize = keyof typeof metricTextSizeMap;
|
|
|
1585
1586
|
// Margin needs some bespoke types: https://atlassian.slack.com/archives/CKRHB23K8/p1712623192772909
|
|
1586
1587
|
type MarginSpace = AllSpace | 'auto' | '0';
|
|
1587
1588
|
type PaddingSpace = Space | '0';
|
|
1589
|
+
type BorderWidthExtended = BorderWidth | 0 | '0';
|
|
1590
|
+
/**
|
|
1591
|
+
* Token functions are currently allowed for borderRadius in xcss to ease migration.
|
|
1592
|
+
* Because 'radius.small' defaults to 3px, we need a mechanism to allow for 4px values to be provided:
|
|
1593
|
+
* This is done by calling the token function - token('radius.small')
|
|
1594
|
+
*
|
|
1595
|
+
* TODO: Remove once shape them is rolled out and fg platform-dst-shape-theme-default removed
|
|
1596
|
+
*/
|
|
1597
|
+
type BorderRadiusExtended = BorderRadius | 0 | '0' | 'inherit' | CSSTokenMap[BorderRadius];
|
|
1588
1598
|
type GlobalValue = 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset';
|
|
1589
1599
|
type AutoComplete<T extends string> = T | Omit<string, T>;
|
|
1590
1600
|
|
|
@@ -1593,35 +1603,35 @@ export type TokenisedProps = {
|
|
|
1593
1603
|
blockSize?: Dimension | string;
|
|
1594
1604
|
borderBlockColor?: AutoComplete<BorderColor>;
|
|
1595
1605
|
borderBlockEndColor?: AutoComplete<BorderColor>;
|
|
1596
|
-
borderBlockEndWidth?:
|
|
1606
|
+
borderBlockEndWidth?: BorderWidthExtended;
|
|
1597
1607
|
borderBlockStartColor?: AutoComplete<BorderColor>;
|
|
1598
|
-
borderBlockStartWidth?:
|
|
1599
|
-
borderBlockWidth?:
|
|
1608
|
+
borderBlockStartWidth?: BorderWidthExtended;
|
|
1609
|
+
borderBlockWidth?: BorderWidthExtended;
|
|
1600
1610
|
borderBottomColor?: AutoComplete<BorderColor>;
|
|
1601
|
-
borderBottomLeftRadius?:
|
|
1602
|
-
borderBottomRightRadius?:
|
|
1603
|
-
borderBottomWidth?:
|
|
1611
|
+
borderBottomLeftRadius?: BorderRadiusExtended;
|
|
1612
|
+
borderBottomRightRadius?: BorderRadiusExtended;
|
|
1613
|
+
borderBottomWidth?: BorderWidthExtended;
|
|
1604
1614
|
borderColor?: BorderColor;
|
|
1605
|
-
borderEndEndRadius?:
|
|
1606
|
-
borderEndStartRadius?:
|
|
1615
|
+
borderEndEndRadius?: BorderRadiusExtended;
|
|
1616
|
+
borderEndStartRadius?: BorderRadiusExtended;
|
|
1607
1617
|
borderInlineColor?: AutoComplete<BorderColor>;
|
|
1608
1618
|
borderInlineEndColor?: AutoComplete<BorderColor>;
|
|
1609
|
-
borderInlineEndWidth?:
|
|
1619
|
+
borderInlineEndWidth?: BorderWidthExtended;
|
|
1610
1620
|
borderInlineStartColor?: AutoComplete<BorderColor>;
|
|
1611
|
-
borderInlineStartWidth?:
|
|
1612
|
-
borderInlineWidth?:
|
|
1621
|
+
borderInlineStartWidth?: BorderWidthExtended;
|
|
1622
|
+
borderInlineWidth?: BorderWidthExtended;
|
|
1613
1623
|
borderLeftColor?: AutoComplete<BorderColor>;
|
|
1614
|
-
borderLeftWidth?:
|
|
1615
|
-
borderRadius?:
|
|
1624
|
+
borderLeftWidth?: BorderWidthExtended;
|
|
1625
|
+
borderRadius?: BorderRadiusExtended;
|
|
1616
1626
|
borderRightColor?: AutoComplete<BorderColor>;
|
|
1617
|
-
borderRightWidth?:
|
|
1618
|
-
borderStartEndRadius?:
|
|
1619
|
-
borderStartStartRadius?:
|
|
1627
|
+
borderRightWidth?: BorderWidthExtended;
|
|
1628
|
+
borderStartEndRadius?: BorderRadiusExtended;
|
|
1629
|
+
borderStartStartRadius?: BorderRadiusExtended;
|
|
1620
1630
|
borderTopColor?: AutoComplete<BorderColor>;
|
|
1621
|
-
borderTopLeftRadius?:
|
|
1622
|
-
borderTopRightRadius?:
|
|
1623
|
-
borderTopWidth?:
|
|
1624
|
-
borderWidth?:
|
|
1631
|
+
borderTopLeftRadius?: BorderRadiusExtended;
|
|
1632
|
+
borderTopRightRadius?: BorderRadiusExtended;
|
|
1633
|
+
borderTopWidth?: BorderWidthExtended;
|
|
1634
|
+
borderWidth?: BorderWidthExtended;
|
|
1625
1635
|
bottom?: AutoComplete<AllSpace>;
|
|
1626
1636
|
boxShadow?: Shadow;
|
|
1627
1637
|
color?: TextColor;
|
|
@@ -1663,7 +1673,7 @@ export type TokenisedProps = {
|
|
|
1663
1673
|
opacity?: AutoComplete<Opacity> | number;
|
|
1664
1674
|
outlineColor?: BorderColor;
|
|
1665
1675
|
outlineOffset?: AllSpace;
|
|
1666
|
-
outlineWidth?:
|
|
1676
|
+
outlineWidth?: BorderWidthExtended;
|
|
1667
1677
|
padding?: PaddingSpace | GlobalValue;
|
|
1668
1678
|
paddingBlock?: PaddingSpace | GlobalValue;
|
|
1669
1679
|
paddingBlockEnd?: PaddingSpace | GlobalValue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/css",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
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",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
],
|
|
45
45
|
"atlaskit:src": "src/index.tsx",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@atlaskit/tokens": "^
|
|
47
|
+
"@atlaskit/tokens": "^9.0.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@compiled/react": "^0.18.6"
|
|
50
50
|
},
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@af/visual-regression": "workspace:^",
|
|
56
|
-
"@atlaskit/button": "^23.
|
|
56
|
+
"@atlaskit/button": "^23.9.0",
|
|
57
57
|
"@atlaskit/ds-lib": "^5.3.0",
|
|
58
|
-
"@atlaskit/primitives": "^
|
|
58
|
+
"@atlaskit/primitives": "^17.0.0",
|
|
59
59
|
"@emotion/react": "^11.7.1",
|
|
60
60
|
"@testing-library/react": "^13.4.0",
|
|
61
61
|
"@types/jscodeshift": "^0.11.0",
|