@atlaskit/primitives 16.4.4 → 17.1.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 +20 -0
- package/dist/cjs/compiled/components/anchor.js +1 -1
- package/dist/cjs/compiled/components/pressable.js +1 -1
- package/dist/cjs/compiled/index.js +6 -0
- package/dist/cjs/components/anchor.js +1 -1
- package/dist/cjs/components/pressable.js +1 -1
- package/dist/cjs/xcss/style-maps.partial.js +8 -0
- package/dist/es2019/compiled/components/anchor.js +1 -1
- package/dist/es2019/compiled/components/pressable.js +1 -1
- package/dist/es2019/compiled/index.js +1 -1
- package/dist/es2019/components/anchor.js +1 -1
- package/dist/es2019/components/pressable.js +1 -1
- package/dist/es2019/xcss/style-maps.partial.js +8 -1
- package/dist/esm/compiled/components/anchor.js +1 -1
- package/dist/esm/compiled/components/pressable.js +1 -1
- package/dist/esm/compiled/index.js +1 -1
- package/dist/esm/components/anchor.js +1 -1
- package/dist/esm/components/pressable.js +1 -1
- package/dist/esm/xcss/style-maps.partial.js +8 -1
- package/dist/types/compiled/index.d.ts +1 -1
- package/dist/types/xcss/style-maps.partial.d.ts +31 -21
- package/dist/types-ts4.5/compiled/index.d.ts +1 -1
- package/dist/types-ts4.5/xcss/style-maps.partial.d.ts +31 -21
- package/package.json +17 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 17.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`f9c6c17de4114`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f9c6c17de4114) -
|
|
8
|
+
Cleaning up platform_migrate_to_native_box and removing codegen Box
|
|
9
|
+
|
|
10
|
+
## 17.0.0
|
|
11
|
+
|
|
12
|
+
### Major Changes
|
|
13
|
+
|
|
14
|
+
- [`55546332d4ef4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55546332d4ef4) -
|
|
15
|
+
Restricted `borderRadius` xcss and cssMap types to only accept tokens, 0, and "inherit".
|
|
16
|
+
Restricted `borderWidth` types to only accept tokens and 0. Previously any string was allowed,
|
|
17
|
+
this is no longer the case and will throw a type error.
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 16.4.4
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -70,7 +70,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
70
70
|
action: 'clicked',
|
|
71
71
|
componentName: componentName || 'Anchor',
|
|
72
72
|
packageName: "@atlaskit/primitives",
|
|
73
|
-
packageVersion: "
|
|
73
|
+
packageVersion: "0.0.0-development",
|
|
74
74
|
analyticsData: analyticsContext,
|
|
75
75
|
actionSubject: 'link'
|
|
76
76
|
});
|
|
@@ -61,7 +61,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
61
61
|
action: 'clicked',
|
|
62
62
|
componentName: componentName || 'Pressable',
|
|
63
63
|
packageName: "@atlaskit/primitives",
|
|
64
|
-
packageVersion: "
|
|
64
|
+
packageVersion: "0.0.0-development",
|
|
65
65
|
analyticsData: analyticsContext,
|
|
66
66
|
actionSubject: 'button'
|
|
67
67
|
});
|
|
@@ -82,6 +82,12 @@ Object.defineProperty(exports, "Text", {
|
|
|
82
82
|
return _text.default;
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
+
Object.defineProperty(exports, "UNSAFE_SurfaceContext", {
|
|
86
|
+
enumerable: true,
|
|
87
|
+
get: function get() {
|
|
88
|
+
return _surfaceProvider.SurfaceContext;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
85
91
|
Object.defineProperty(exports, "UNSAFE_useMediaQuery", {
|
|
86
92
|
enumerable: true,
|
|
87
93
|
get: function get() {
|
|
@@ -105,7 +105,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
105
105
|
action: 'clicked',
|
|
106
106
|
componentName: componentName || 'Anchor',
|
|
107
107
|
packageName: "@atlaskit/primitives",
|
|
108
|
-
packageVersion: "
|
|
108
|
+
packageVersion: "0.0.0-development",
|
|
109
109
|
analyticsData: analyticsContext,
|
|
110
110
|
actionSubject: 'link'
|
|
111
111
|
});
|
|
@@ -97,7 +97,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
97
97
|
action: 'clicked',
|
|
98
98
|
componentName: componentName || 'Pressable',
|
|
99
99
|
packageName: "@atlaskit/primitives",
|
|
100
|
-
packageVersion: "
|
|
100
|
+
packageVersion: "0.0.0-development",
|
|
101
101
|
analyticsData: analyticsContext,
|
|
102
102
|
actionSubject: 'button'
|
|
103
103
|
});
|
|
@@ -594,6 +594,14 @@ var metricTextSizeMap = exports.metricTextSizeMap = {
|
|
|
594
594
|
|
|
595
595
|
// Margin needs some bespoke types: https://atlassian.slack.com/archives/CKRHB23K8/p1712623192772909
|
|
596
596
|
|
|
597
|
+
/**
|
|
598
|
+
* Token functions are currently allowed for borderRadius in xcss to ease migration.
|
|
599
|
+
* Because 'radius.small' defaults to 3px, we need a mechanism to allow for 4px values to be provided:
|
|
600
|
+
* This is done by calling the token function - token('radius.small')
|
|
601
|
+
*
|
|
602
|
+
* TODO: Remove once shape them is rolled out and fg platform-dst-shape-theme-default removed
|
|
603
|
+
*/
|
|
604
|
+
|
|
597
605
|
// Generate maps for Box props. backgroundColor, padding, etc
|
|
598
606
|
var spacingProperties = [
|
|
599
607
|
// Used by Box
|
|
@@ -56,7 +56,7 @@ const AnchorNoRef = ({
|
|
|
56
56
|
action: 'clicked',
|
|
57
57
|
componentName: componentName || 'Anchor',
|
|
58
58
|
packageName: "@atlaskit/primitives",
|
|
59
|
-
packageVersion: "
|
|
59
|
+
packageVersion: "0.0.0-development",
|
|
60
60
|
analyticsData: analyticsContext,
|
|
61
61
|
actionSubject: 'link'
|
|
62
62
|
});
|
|
@@ -48,7 +48,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
|
|
|
48
48
|
action: 'clicked',
|
|
49
49
|
componentName: componentName || 'Pressable',
|
|
50
50
|
packageName: "@atlaskit/primitives",
|
|
51
|
-
packageVersion: "
|
|
51
|
+
packageVersion: "0.0.0-development",
|
|
52
52
|
analyticsData: analyticsContext,
|
|
53
53
|
actionSubject: 'button'
|
|
54
54
|
});
|
|
@@ -11,4 +11,4 @@ export { default as Anchor } from './components/anchor';
|
|
|
11
11
|
export { media, UNSAFE_useMediaQuery, Show, Hide } from './responsive';
|
|
12
12
|
export { default as Focusable } from './components/focusable';
|
|
13
13
|
// TODO: This is still not figured out from before…
|
|
14
|
-
export { useSurface as UNSAFE_useSurface } from '../utils/surface-provider';
|
|
14
|
+
export { useSurface as UNSAFE_useSurface, SurfaceContext as UNSAFE_SurfaceContext } from '../utils/surface-provider';
|
|
@@ -94,7 +94,7 @@ const AnchorNoRef = ({
|
|
|
94
94
|
action: 'clicked',
|
|
95
95
|
componentName: componentName || 'Anchor',
|
|
96
96
|
packageName: "@atlaskit/primitives",
|
|
97
|
-
packageVersion: "
|
|
97
|
+
packageVersion: "0.0.0-development",
|
|
98
98
|
analyticsData: analyticsContext,
|
|
99
99
|
actionSubject: 'link'
|
|
100
100
|
});
|
|
@@ -86,7 +86,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
|
|
|
86
86
|
action: 'clicked',
|
|
87
87
|
componentName: componentName || 'Pressable',
|
|
88
88
|
packageName: "@atlaskit/primitives",
|
|
89
|
-
packageVersion: "
|
|
89
|
+
packageVersion: "0.0.0-development",
|
|
90
90
|
analyticsData: analyticsContext,
|
|
91
91
|
actionSubject: 'button'
|
|
92
92
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { CURRENT_SURFACE_CSS_VAR } from '@atlaskit/tokens';
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
7
6
|
* @codegen <<SignedSource::df710bcd99c0a8704ca36bddb12c2154>>
|
|
@@ -589,6 +588,14 @@ export const metricTextSizeMap = {
|
|
|
589
588
|
|
|
590
589
|
// Margin needs some bespoke types: https://atlassian.slack.com/archives/CKRHB23K8/p1712623192772909
|
|
591
590
|
|
|
591
|
+
/**
|
|
592
|
+
* Token functions are currently allowed for borderRadius in xcss to ease migration.
|
|
593
|
+
* Because 'radius.small' defaults to 3px, we need a mechanism to allow for 4px values to be provided:
|
|
594
|
+
* This is done by calling the token function - token('radius.small')
|
|
595
|
+
*
|
|
596
|
+
* TODO: Remove once shape them is rolled out and fg platform-dst-shape-theme-default removed
|
|
597
|
+
*/
|
|
598
|
+
|
|
592
599
|
// Generate maps for Box props. backgroundColor, padding, etc
|
|
593
600
|
const spacingProperties = [
|
|
594
601
|
// Used by Box
|
|
@@ -61,7 +61,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
61
61
|
action: 'clicked',
|
|
62
62
|
componentName: componentName || 'Anchor',
|
|
63
63
|
packageName: "@atlaskit/primitives",
|
|
64
|
-
packageVersion: "
|
|
64
|
+
packageVersion: "0.0.0-development",
|
|
65
65
|
analyticsData: analyticsContext,
|
|
66
66
|
actionSubject: 'link'
|
|
67
67
|
});
|
|
@@ -52,7 +52,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
52
52
|
action: 'clicked',
|
|
53
53
|
componentName: componentName || 'Pressable',
|
|
54
54
|
packageName: "@atlaskit/primitives",
|
|
55
|
-
packageVersion: "
|
|
55
|
+
packageVersion: "0.0.0-development",
|
|
56
56
|
analyticsData: analyticsContext,
|
|
57
57
|
actionSubject: 'button'
|
|
58
58
|
});
|
|
@@ -11,4 +11,4 @@ export { default as Anchor } from './components/anchor';
|
|
|
11
11
|
export { media, UNSAFE_useMediaQuery, Show, Hide } from './responsive';
|
|
12
12
|
export { default as Focusable } from './components/focusable';
|
|
13
13
|
// TODO: This is still not figured out from before…
|
|
14
|
-
export { useSurface as UNSAFE_useSurface } from '../utils/surface-provider';
|
|
14
|
+
export { useSurface as UNSAFE_useSurface, SurfaceContext as UNSAFE_SurfaceContext } from '../utils/surface-provider';
|
|
@@ -99,7 +99,7 @@ var AnchorNoRef = function AnchorNoRef(_ref, ref) {
|
|
|
99
99
|
action: 'clicked',
|
|
100
100
|
componentName: componentName || 'Anchor',
|
|
101
101
|
packageName: "@atlaskit/primitives",
|
|
102
|
-
packageVersion: "
|
|
102
|
+
packageVersion: "0.0.0-development",
|
|
103
103
|
analyticsData: analyticsContext,
|
|
104
104
|
actionSubject: 'link'
|
|
105
105
|
});
|
|
@@ -91,7 +91,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
91
91
|
action: 'clicked',
|
|
92
92
|
componentName: componentName || 'Pressable',
|
|
93
93
|
packageName: "@atlaskit/primitives",
|
|
94
|
-
packageVersion: "
|
|
94
|
+
packageVersion: "0.0.0-development",
|
|
95
95
|
analyticsData: analyticsContext,
|
|
96
96
|
actionSubject: 'button'
|
|
97
97
|
});
|
|
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { CURRENT_SURFACE_CSS_VAR } from '@atlaskit/tokens';
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
10
9
|
* @codegen <<SignedSource::df710bcd99c0a8704ca36bddb12c2154>>
|
|
@@ -589,6 +588,14 @@ export var metricTextSizeMap = {
|
|
|
589
588
|
|
|
590
589
|
// Margin needs some bespoke types: https://atlassian.slack.com/archives/CKRHB23K8/p1712623192772909
|
|
591
590
|
|
|
591
|
+
/**
|
|
592
|
+
* Token functions are currently allowed for borderRadius in xcss to ease migration.
|
|
593
|
+
* Because 'radius.small' defaults to 3px, we need a mechanism to allow for 4px values to be provided:
|
|
594
|
+
* This is done by calling the token function - token('radius.small')
|
|
595
|
+
*
|
|
596
|
+
* TODO: Remove once shape them is rolled out and fg platform-dst-shape-theme-default removed
|
|
597
|
+
*/
|
|
598
|
+
|
|
592
599
|
// Generate maps for Box props. backgroundColor, padding, etc
|
|
593
600
|
var spacingProperties = [
|
|
594
601
|
// Used by Box
|
|
@@ -11,6 +11,6 @@ export { default as Anchor, type AnchorProps } from './components/anchor';
|
|
|
11
11
|
export { media, type Breakpoint, type MediaQuery, UNSAFE_useMediaQuery, Show, Hide, } from './responsive';
|
|
12
12
|
export { default as Focusable } from './components/focusable';
|
|
13
13
|
export type { FocusableProps } from './components/focusable';
|
|
14
|
-
export { useSurface as UNSAFE_useSurface } from '../utils/surface-provider';
|
|
14
|
+
export { useSurface as UNSAFE_useSurface, SurfaceContext as UNSAFE_SurfaceContext } from '../utils/surface-provider';
|
|
15
15
|
export type { BackgroundColorToken as BackgroundColor } from '../utils/types';
|
|
16
16
|
export type { PositiveSpaceToken as Space, TextColor } from './components/types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type SerializedStyles } from '@emotion/react';
|
|
2
2
|
import { CURRENT_SURFACE_CSS_VAR, token } from '@atlaskit/tokens';
|
|
3
|
+
import type { CSSTokenMap } from '@atlaskit/tokens/token-names';
|
|
3
4
|
/**
|
|
4
5
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
5
6
|
* @codegen <<SignedSource::df710bcd99c0a8704ca36bddb12c2154>>
|
|
@@ -617,6 +618,15 @@ export type MetricTextSize = keyof typeof metricTextSizeMap;
|
|
|
617
618
|
*/
|
|
618
619
|
type MarginSpace = AllSpace | 'auto' | '0';
|
|
619
620
|
type PaddingSpace = Space | '0';
|
|
621
|
+
type BorderWidthExtended = BorderWidth | 0 | '0';
|
|
622
|
+
/**
|
|
623
|
+
* Token functions are currently allowed for borderRadius in xcss to ease migration.
|
|
624
|
+
* Because 'radius.small' defaults to 3px, we need a mechanism to allow for 4px values to be provided:
|
|
625
|
+
* This is done by calling the token function - token('radius.small')
|
|
626
|
+
*
|
|
627
|
+
* TODO: Remove once shape them is rolled out and fg platform-dst-shape-theme-default removed
|
|
628
|
+
*/
|
|
629
|
+
type BorderRadiusExtended = BorderRadius | 0 | '0' | 'inherit' | CSSTokenMap[BorderRadius];
|
|
620
630
|
type GlobalValue = 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset';
|
|
621
631
|
type AutoComplete<T extends string> = T | Omit<string, T>;
|
|
622
632
|
export type TokenisedProps = {
|
|
@@ -624,35 +634,35 @@ export type TokenisedProps = {
|
|
|
624
634
|
blockSize?: Dimension | string;
|
|
625
635
|
borderBlockColor?: AutoComplete<BorderColor>;
|
|
626
636
|
borderBlockEndColor?: AutoComplete<BorderColor>;
|
|
627
|
-
borderBlockEndWidth?:
|
|
637
|
+
borderBlockEndWidth?: BorderWidthExtended;
|
|
628
638
|
borderBlockStartColor?: AutoComplete<BorderColor>;
|
|
629
|
-
borderBlockStartWidth?:
|
|
630
|
-
borderBlockWidth?:
|
|
639
|
+
borderBlockStartWidth?: BorderWidthExtended;
|
|
640
|
+
borderBlockWidth?: BorderWidthExtended;
|
|
631
641
|
borderBottomColor?: AutoComplete<BorderColor>;
|
|
632
|
-
borderBottomLeftRadius?:
|
|
633
|
-
borderBottomRightRadius?:
|
|
634
|
-
borderBottomWidth?:
|
|
642
|
+
borderBottomLeftRadius?: BorderRadiusExtended;
|
|
643
|
+
borderBottomRightRadius?: BorderRadiusExtended;
|
|
644
|
+
borderBottomWidth?: BorderWidthExtended;
|
|
635
645
|
borderColor?: BorderColor;
|
|
636
|
-
borderEndEndRadius?:
|
|
637
|
-
borderEndStartRadius?:
|
|
646
|
+
borderEndEndRadius?: BorderRadiusExtended;
|
|
647
|
+
borderEndStartRadius?: BorderRadiusExtended;
|
|
638
648
|
borderInlineColor?: AutoComplete<BorderColor>;
|
|
639
649
|
borderInlineEndColor?: AutoComplete<BorderColor>;
|
|
640
|
-
borderInlineEndWidth?:
|
|
650
|
+
borderInlineEndWidth?: BorderWidthExtended;
|
|
641
651
|
borderInlineStartColor?: AutoComplete<BorderColor>;
|
|
642
|
-
borderInlineStartWidth?:
|
|
643
|
-
borderInlineWidth?:
|
|
652
|
+
borderInlineStartWidth?: BorderWidthExtended;
|
|
653
|
+
borderInlineWidth?: BorderWidthExtended;
|
|
644
654
|
borderLeftColor?: AutoComplete<BorderColor>;
|
|
645
|
-
borderLeftWidth?:
|
|
646
|
-
borderRadius?:
|
|
655
|
+
borderLeftWidth?: BorderWidthExtended;
|
|
656
|
+
borderRadius?: BorderRadiusExtended;
|
|
647
657
|
borderRightColor?: AutoComplete<BorderColor>;
|
|
648
|
-
borderRightWidth?:
|
|
649
|
-
borderStartEndRadius?:
|
|
650
|
-
borderStartStartRadius?:
|
|
658
|
+
borderRightWidth?: BorderWidthExtended;
|
|
659
|
+
borderStartEndRadius?: BorderRadiusExtended;
|
|
660
|
+
borderStartStartRadius?: BorderRadiusExtended;
|
|
651
661
|
borderTopColor?: AutoComplete<BorderColor>;
|
|
652
|
-
borderTopLeftRadius?:
|
|
653
|
-
borderTopRightRadius?:
|
|
654
|
-
borderTopWidth?:
|
|
655
|
-
borderWidth?:
|
|
662
|
+
borderTopLeftRadius?: BorderRadiusExtended;
|
|
663
|
+
borderTopRightRadius?: BorderRadiusExtended;
|
|
664
|
+
borderTopWidth?: BorderWidthExtended;
|
|
665
|
+
borderWidth?: BorderWidthExtended;
|
|
656
666
|
bottom?: AutoComplete<AllSpace>;
|
|
657
667
|
boxShadow?: Shadow;
|
|
658
668
|
color?: TextColor;
|
|
@@ -694,7 +704,7 @@ export type TokenisedProps = {
|
|
|
694
704
|
opacity?: AutoComplete<Opacity> | number;
|
|
695
705
|
outlineColor?: BorderColor;
|
|
696
706
|
outlineOffset?: AllSpace;
|
|
697
|
-
outlineWidth?:
|
|
707
|
+
outlineWidth?: BorderWidthExtended;
|
|
698
708
|
padding?: PaddingSpace | GlobalValue;
|
|
699
709
|
paddingBlock?: PaddingSpace | GlobalValue;
|
|
700
710
|
paddingBlockEnd?: PaddingSpace | GlobalValue;
|
|
@@ -11,6 +11,6 @@ export { default as Anchor, type AnchorProps } from './components/anchor';
|
|
|
11
11
|
export { media, type Breakpoint, type MediaQuery, UNSAFE_useMediaQuery, Show, Hide, } from './responsive';
|
|
12
12
|
export { default as Focusable } from './components/focusable';
|
|
13
13
|
export type { FocusableProps } from './components/focusable';
|
|
14
|
-
export { useSurface as UNSAFE_useSurface } from '../utils/surface-provider';
|
|
14
|
+
export { useSurface as UNSAFE_useSurface, SurfaceContext as UNSAFE_SurfaceContext } from '../utils/surface-provider';
|
|
15
15
|
export type { BackgroundColorToken as BackgroundColor } from '../utils/types';
|
|
16
16
|
export type { PositiveSpaceToken as Space, TextColor } from './components/types';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type SerializedStyles } from '@emotion/react';
|
|
2
2
|
import { CURRENT_SURFACE_CSS_VAR, token } from '@atlaskit/tokens';
|
|
3
|
+
import type { CSSTokenMap } from '@atlaskit/tokens/token-names';
|
|
3
4
|
/**
|
|
4
5
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
5
6
|
* @codegen <<SignedSource::df710bcd99c0a8704ca36bddb12c2154>>
|
|
@@ -617,6 +618,15 @@ export type MetricTextSize = keyof typeof metricTextSizeMap;
|
|
|
617
618
|
*/
|
|
618
619
|
type MarginSpace = AllSpace | 'auto' | '0';
|
|
619
620
|
type PaddingSpace = Space | '0';
|
|
621
|
+
type BorderWidthExtended = BorderWidth | 0 | '0';
|
|
622
|
+
/**
|
|
623
|
+
* Token functions are currently allowed for borderRadius in xcss to ease migration.
|
|
624
|
+
* Because 'radius.small' defaults to 3px, we need a mechanism to allow for 4px values to be provided:
|
|
625
|
+
* This is done by calling the token function - token('radius.small')
|
|
626
|
+
*
|
|
627
|
+
* TODO: Remove once shape them is rolled out and fg platform-dst-shape-theme-default removed
|
|
628
|
+
*/
|
|
629
|
+
type BorderRadiusExtended = BorderRadius | 0 | '0' | 'inherit' | CSSTokenMap[BorderRadius];
|
|
620
630
|
type GlobalValue = 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset';
|
|
621
631
|
type AutoComplete<T extends string> = T | Omit<string, T>;
|
|
622
632
|
export type TokenisedProps = {
|
|
@@ -624,35 +634,35 @@ export type TokenisedProps = {
|
|
|
624
634
|
blockSize?: Dimension | string;
|
|
625
635
|
borderBlockColor?: AutoComplete<BorderColor>;
|
|
626
636
|
borderBlockEndColor?: AutoComplete<BorderColor>;
|
|
627
|
-
borderBlockEndWidth?:
|
|
637
|
+
borderBlockEndWidth?: BorderWidthExtended;
|
|
628
638
|
borderBlockStartColor?: AutoComplete<BorderColor>;
|
|
629
|
-
borderBlockStartWidth?:
|
|
630
|
-
borderBlockWidth?:
|
|
639
|
+
borderBlockStartWidth?: BorderWidthExtended;
|
|
640
|
+
borderBlockWidth?: BorderWidthExtended;
|
|
631
641
|
borderBottomColor?: AutoComplete<BorderColor>;
|
|
632
|
-
borderBottomLeftRadius?:
|
|
633
|
-
borderBottomRightRadius?:
|
|
634
|
-
borderBottomWidth?:
|
|
642
|
+
borderBottomLeftRadius?: BorderRadiusExtended;
|
|
643
|
+
borderBottomRightRadius?: BorderRadiusExtended;
|
|
644
|
+
borderBottomWidth?: BorderWidthExtended;
|
|
635
645
|
borderColor?: BorderColor;
|
|
636
|
-
borderEndEndRadius?:
|
|
637
|
-
borderEndStartRadius?:
|
|
646
|
+
borderEndEndRadius?: BorderRadiusExtended;
|
|
647
|
+
borderEndStartRadius?: BorderRadiusExtended;
|
|
638
648
|
borderInlineColor?: AutoComplete<BorderColor>;
|
|
639
649
|
borderInlineEndColor?: AutoComplete<BorderColor>;
|
|
640
|
-
borderInlineEndWidth?:
|
|
650
|
+
borderInlineEndWidth?: BorderWidthExtended;
|
|
641
651
|
borderInlineStartColor?: AutoComplete<BorderColor>;
|
|
642
|
-
borderInlineStartWidth?:
|
|
643
|
-
borderInlineWidth?:
|
|
652
|
+
borderInlineStartWidth?: BorderWidthExtended;
|
|
653
|
+
borderInlineWidth?: BorderWidthExtended;
|
|
644
654
|
borderLeftColor?: AutoComplete<BorderColor>;
|
|
645
|
-
borderLeftWidth?:
|
|
646
|
-
borderRadius?:
|
|
655
|
+
borderLeftWidth?: BorderWidthExtended;
|
|
656
|
+
borderRadius?: BorderRadiusExtended;
|
|
647
657
|
borderRightColor?: AutoComplete<BorderColor>;
|
|
648
|
-
borderRightWidth?:
|
|
649
|
-
borderStartEndRadius?:
|
|
650
|
-
borderStartStartRadius?:
|
|
658
|
+
borderRightWidth?: BorderWidthExtended;
|
|
659
|
+
borderStartEndRadius?: BorderRadiusExtended;
|
|
660
|
+
borderStartStartRadius?: BorderRadiusExtended;
|
|
651
661
|
borderTopColor?: AutoComplete<BorderColor>;
|
|
652
|
-
borderTopLeftRadius?:
|
|
653
|
-
borderTopRightRadius?:
|
|
654
|
-
borderTopWidth?:
|
|
655
|
-
borderWidth?:
|
|
662
|
+
borderTopLeftRadius?: BorderRadiusExtended;
|
|
663
|
+
borderTopRightRadius?: BorderRadiusExtended;
|
|
664
|
+
borderTopWidth?: BorderWidthExtended;
|
|
665
|
+
borderWidth?: BorderWidthExtended;
|
|
656
666
|
bottom?: AutoComplete<AllSpace>;
|
|
657
667
|
boxShadow?: Shadow;
|
|
658
668
|
color?: TextColor;
|
|
@@ -694,7 +704,7 @@ export type TokenisedProps = {
|
|
|
694
704
|
opacity?: AutoComplete<Opacity> | number;
|
|
695
705
|
outlineColor?: BorderColor;
|
|
696
706
|
outlineOffset?: AllSpace;
|
|
697
|
-
outlineWidth?:
|
|
707
|
+
outlineWidth?: BorderWidthExtended;
|
|
698
708
|
padding?: PaddingSpace | GlobalValue;
|
|
699
709
|
paddingBlock?: PaddingSpace | GlobalValue;
|
|
700
710
|
paddingBlockEnd?: PaddingSpace | GlobalValue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.1.0",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -133,11 +133,11 @@
|
|
|
133
133
|
},
|
|
134
134
|
"dependencies": {
|
|
135
135
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
136
|
-
"@atlaskit/app-provider": "^3.
|
|
137
|
-
"@atlaskit/css": "^0.
|
|
136
|
+
"@atlaskit/app-provider": "^3.3.0",
|
|
137
|
+
"@atlaskit/css": "^0.19.0",
|
|
138
138
|
"@atlaskit/ds-lib": "^5.3.0",
|
|
139
139
|
"@atlaskit/interaction-context": "^3.1.0",
|
|
140
|
-
"@atlaskit/tokens": "^
|
|
140
|
+
"@atlaskit/tokens": "^9.1.0",
|
|
141
141
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
142
142
|
"@babel/runtime": "^7.0.0",
|
|
143
143
|
"@compiled/react": "^0.18.6",
|
|
@@ -154,32 +154,31 @@
|
|
|
154
154
|
"@af/formatting": "workspace:^",
|
|
155
155
|
"@af/integration-testing": "workspace:^",
|
|
156
156
|
"@af/visual-regression": "workspace:^",
|
|
157
|
-
"@atlaskit/avatar": "^25.
|
|
158
|
-
"@atlaskit/button": "^23.
|
|
159
|
-
"@atlaskit/checkbox": "^17.
|
|
157
|
+
"@atlaskit/avatar": "^25.7.0",
|
|
158
|
+
"@atlaskit/button": "^23.9.0",
|
|
159
|
+
"@atlaskit/checkbox": "^17.3.0",
|
|
160
160
|
"@atlaskit/code": "^17.4.0",
|
|
161
161
|
"@atlaskit/docs": "^11.2.0",
|
|
162
|
-
"@atlaskit/dropdown-menu": "^16.
|
|
163
|
-
"@atlaskit/flag": "^17.
|
|
164
|
-
"@atlaskit/form": "^15.
|
|
162
|
+
"@atlaskit/dropdown-menu": "^16.4.0",
|
|
163
|
+
"@atlaskit/flag": "^17.8.0",
|
|
164
|
+
"@atlaskit/form": "^15.3.0",
|
|
165
165
|
"@atlaskit/heading": "^5.2.0",
|
|
166
|
-
"@atlaskit/icon": "^29.
|
|
166
|
+
"@atlaskit/icon": "^29.4.0",
|
|
167
167
|
"@atlaskit/icon-object": "^7.4.0",
|
|
168
168
|
"@atlaskit/image": "^3.0.0",
|
|
169
|
-
"@atlaskit/link": "^3.
|
|
170
|
-
"@atlaskit/logo": "^19.
|
|
171
|
-
"@atlaskit/lozenge": "^13.
|
|
169
|
+
"@atlaskit/link": "^3.3.0",
|
|
170
|
+
"@atlaskit/logo": "^19.10.0",
|
|
171
|
+
"@atlaskit/lozenge": "^13.3.0",
|
|
172
172
|
"@atlaskit/motion": "^5.3.0",
|
|
173
173
|
"@atlaskit/range": "^9.3.0",
|
|
174
|
-
"@atlaskit/section-message": "^8.
|
|
174
|
+
"@atlaskit/section-message": "^8.12.0",
|
|
175
175
|
"@atlaskit/textfield": "^8.2.0",
|
|
176
176
|
"@atlaskit/toggle": "^15.2.0",
|
|
177
|
-
"@atlaskit/tooltip": "^20.
|
|
177
|
+
"@atlaskit/tooltip": "^20.14.0",
|
|
178
178
|
"@atlassian/analytics-bridge": "^0.7.0",
|
|
179
179
|
"@atlassian/codegen": "^0.1.0",
|
|
180
180
|
"@atlassian/ssr-tests": "workspace:^",
|
|
181
|
-
"@testing-library/react": "^
|
|
182
|
-
"@testing-library/react-hooks": "^8.0.1",
|
|
181
|
+
"@testing-library/react": "^16.3.0",
|
|
183
182
|
"@testing-library/user-event": "^14.4.3",
|
|
184
183
|
"csstype": "^3.1.0",
|
|
185
184
|
"jscodeshift": "^17.0.0",
|