@atlaskit/primitives 1.9.0 → 1.10.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 +6 -0
- package/dist/cjs/index.js +7 -0
- package/dist/es2019/index.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types-ts4.5/index.d.ts +2 -0
- package/package.json +2 -1
- package/report.api.md +54 -0
- package/text/package.json +15 -0
- package/tmp/api-report-tmp.d.ts +54 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/primitives
|
|
2
2
|
|
|
3
|
+
## 1.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#42931](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42931) [`5778f757885`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5778f757885) - Added export for Text component. This component is currently in closed beta and is not intended for general use at this stage.
|
|
8
|
+
|
|
3
9
|
## 1.9.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -40,6 +40,12 @@ Object.defineProperty(exports, "Stack", {
|
|
|
40
40
|
return _stack.default;
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
+
Object.defineProperty(exports, "Text", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function get() {
|
|
46
|
+
return _text.default;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
43
49
|
Object.defineProperty(exports, "UNSAFE_BREAKPOINTS_CONFIG", {
|
|
44
50
|
enumerable: true,
|
|
45
51
|
get: function get() {
|
|
@@ -71,4 +77,5 @@ var _stack = _interopRequireDefault(require("./components/stack"));
|
|
|
71
77
|
var _flex = _interopRequireDefault(require("./components/flex"));
|
|
72
78
|
var _grid = _interopRequireDefault(require("./components/grid"));
|
|
73
79
|
var _bleed = _interopRequireDefault(require("./components/bleed"));
|
|
80
|
+
var _text = _interopRequireDefault(require("./components/text"));
|
|
74
81
|
var _responsive = require("./responsive");
|
package/dist/es2019/index.js
CHANGED
|
@@ -5,4 +5,5 @@ export { default as Stack } from './components/stack';
|
|
|
5
5
|
export { default as Flex } from './components/flex';
|
|
6
6
|
export { default as Grid } from './components/grid';
|
|
7
7
|
export { default as Bleed } from './components/bleed';
|
|
8
|
+
export { default as Text } from './components/text';
|
|
8
9
|
export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
|
package/dist/esm/index.js
CHANGED
|
@@ -5,4 +5,5 @@ export { default as Stack } from './components/stack';
|
|
|
5
5
|
export { default as Flex } from './components/flex';
|
|
6
6
|
export { default as Grid } from './components/grid';
|
|
7
7
|
export { default as Bleed } from './components/bleed';
|
|
8
|
+
export { default as Text } from './components/text';
|
|
8
9
|
export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,5 +12,7 @@ export { default as Grid } from './components/grid';
|
|
|
12
12
|
export type { GridProps } from './components/grid';
|
|
13
13
|
export { default as Bleed } from './components/bleed';
|
|
14
14
|
export type { BleedProps } from './components/bleed';
|
|
15
|
+
export { default as Text } from './components/text';
|
|
16
|
+
export type { TextProps } from './components/text';
|
|
15
17
|
export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
|
|
16
18
|
export type { Breakpoint } from './responsive';
|
|
@@ -12,5 +12,7 @@ export { default as Grid } from './components/grid';
|
|
|
12
12
|
export type { GridProps } from './components/grid';
|
|
13
13
|
export { default as Bleed } from './components/bleed';
|
|
14
14
|
export type { BleedProps } from './components/bleed';
|
|
15
|
+
export { default as Text } from './components/text';
|
|
16
|
+
export type { TextProps } from './components/text';
|
|
15
17
|
export { media, UNSAFE_media, UNSAFE_BREAKPOINTS_CONFIG } from './responsive';
|
|
16
18
|
export type { Breakpoint } from './responsive';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/primitives",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Primitives are token-backed low-level building blocks.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -191,6 +191,7 @@
|
|
|
191
191
|
"./box": "./src/components/box.tsx",
|
|
192
192
|
"./stack": "./src/components/stack.tsx",
|
|
193
193
|
"./inline": "./src/components/inline.tsx",
|
|
194
|
+
"./text": "./src/components/text.tsx",
|
|
194
195
|
"./pressable": "./src/components/pressable.tsx",
|
|
195
196
|
"./link": "./src/components/link.tsx",
|
|
196
197
|
"./responsive": "./src/responsive/index.tsx"
|
package/report.api.md
CHANGED
|
@@ -21,6 +21,7 @@ import type * as CSS_2 from 'csstype';
|
|
|
21
21
|
import type { CSSProperties } from 'react';
|
|
22
22
|
import type { CSSPropertiesWithMultiValues } from '@emotion/serialize';
|
|
23
23
|
import { ElementType } from 'react';
|
|
24
|
+
import { FC } from 'react';
|
|
24
25
|
import { ForwardRefExoticComponent } from 'react';
|
|
25
26
|
import { jsx } from '@emotion/react';
|
|
26
27
|
import { MemoExoticComponent } from 'react';
|
|
@@ -84,6 +85,12 @@ type AllMedia =
|
|
|
84
85
|
// @public (undocumented)
|
|
85
86
|
type AllowedElements = Exclude<keyof JSX.IntrinsicElements, SVGElements>;
|
|
86
87
|
|
|
88
|
+
// @public (undocumented)
|
|
89
|
+
const asAllowlist: readonly ['span', 'p', 'strong', 'em'];
|
|
90
|
+
|
|
91
|
+
// @public (undocumented)
|
|
92
|
+
type AsElement = (typeof asAllowlist)[number];
|
|
93
|
+
|
|
87
94
|
// @public (undocumented)
|
|
88
95
|
type AtRulesWithoutMedia = Exclude<CSS_2.AtRules, '@media'>;
|
|
89
96
|
|
|
@@ -337,6 +344,16 @@ export type BleedProps = {
|
|
|
337
344
|
block?: Space_2;
|
|
338
345
|
} & BasePrimitiveProps;
|
|
339
346
|
|
|
347
|
+
// @public (undocumented)
|
|
348
|
+
type BodyText = keyof typeof bodyTextMap;
|
|
349
|
+
|
|
350
|
+
// @public (undocumented)
|
|
351
|
+
const bodyTextMap: {
|
|
352
|
+
body: 'var(--ds-font-body)';
|
|
353
|
+
'body.large': 'var(--ds-font-body-large)';
|
|
354
|
+
'body.small': 'var(--ds-font-body-small)';
|
|
355
|
+
};
|
|
356
|
+
|
|
340
357
|
// @public (undocumented)
|
|
341
358
|
export type BorderColor = keyof typeof borderColorMap;
|
|
342
359
|
|
|
@@ -1040,6 +1057,20 @@ type SVGElements =
|
|
|
1040
1057
|
| 'use'
|
|
1041
1058
|
| 'view';
|
|
1042
1059
|
|
|
1060
|
+
// @internal
|
|
1061
|
+
const Text_2: FC<TextProps>;
|
|
1062
|
+
export { Text_2 as Text };
|
|
1063
|
+
|
|
1064
|
+
// @public (undocumented)
|
|
1065
|
+
type TextAlign = keyof typeof textAlignMap;
|
|
1066
|
+
|
|
1067
|
+
// @public (undocumented)
|
|
1068
|
+
const textAlignMap: {
|
|
1069
|
+
center: SerializedStyles_2;
|
|
1070
|
+
end: SerializedStyles_2;
|
|
1071
|
+
start: SerializedStyles_2;
|
|
1072
|
+
};
|
|
1073
|
+
|
|
1043
1074
|
// @public (undocumented)
|
|
1044
1075
|
export type TextColor = keyof typeof textColorMap;
|
|
1045
1076
|
|
|
@@ -1083,6 +1114,17 @@ const textColorMap: {
|
|
|
1083
1114
|
readonly 'color.link.visited': 'var(--ds-link-visited)';
|
|
1084
1115
|
};
|
|
1085
1116
|
|
|
1117
|
+
// @public (undocumented)
|
|
1118
|
+
export interface TextProps extends BasePrimitiveProps {
|
|
1119
|
+
as?: AsElement;
|
|
1120
|
+
children: ReactNode;
|
|
1121
|
+
color?: TextColor;
|
|
1122
|
+
id?: string;
|
|
1123
|
+
shouldTruncate?: boolean;
|
|
1124
|
+
textAlign?: TextAlign;
|
|
1125
|
+
variant?: Variant;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1086
1128
|
// @public (undocumented)
|
|
1087
1129
|
type TokenisedProps = {
|
|
1088
1130
|
backgroundColor?: BackgroundColor;
|
|
@@ -1145,6 +1187,15 @@ type TokenisedProps = {
|
|
|
1145
1187
|
zIndex?: Layer;
|
|
1146
1188
|
};
|
|
1147
1189
|
|
|
1190
|
+
// @public (undocumented)
|
|
1191
|
+
type UiText = keyof typeof uiTextMap;
|
|
1192
|
+
|
|
1193
|
+
// @public (undocumented)
|
|
1194
|
+
const uiTextMap: {
|
|
1195
|
+
ui: 'var(--ds-font-ui)';
|
|
1196
|
+
'ui.small': 'var(--ds-font-ui-small)';
|
|
1197
|
+
};
|
|
1198
|
+
|
|
1148
1199
|
// @public (undocumented)
|
|
1149
1200
|
const uniqueSymbol: unique symbol;
|
|
1150
1201
|
|
|
@@ -1215,6 +1266,9 @@ export const UNSAFE_media: {
|
|
|
1215
1266
|
};
|
|
1216
1267
|
};
|
|
1217
1268
|
|
|
1269
|
+
// @public (undocumented)
|
|
1270
|
+
type Variant = BodyText | UiText;
|
|
1271
|
+
|
|
1218
1272
|
// @public (undocumented)
|
|
1219
1273
|
type Wrap = keyof typeof flexWrapMap;
|
|
1220
1274
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/primitives/text",
|
|
3
|
+
"main": "../dist/cjs/components/text.js",
|
|
4
|
+
"module": "../dist/esm/components/text.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/components/text.js",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"types": "../dist/types/components/text.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.5 <4.9": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.5/components/text.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import type * as CSS_2 from 'csstype';
|
|
|
10
10
|
import type { CSSProperties } from 'react';
|
|
11
11
|
import type { CSSPropertiesWithMultiValues } from '@emotion/serialize';
|
|
12
12
|
import { ElementType } from 'react';
|
|
13
|
+
import { FC } from 'react';
|
|
13
14
|
import { ForwardRefExoticComponent } from 'react';
|
|
14
15
|
import { jsx } from '@emotion/react';
|
|
15
16
|
import { MemoExoticComponent } from 'react';
|
|
@@ -68,6 +69,12 @@ type AllMedia = '@media (prefers-color-scheme: dark)' | '@media (prefers-color-s
|
|
|
68
69
|
// @public (undocumented)
|
|
69
70
|
type AllowedElements = Exclude<keyof JSX.IntrinsicElements, SVGElements>;
|
|
70
71
|
|
|
72
|
+
// @public (undocumented)
|
|
73
|
+
const asAllowlist: readonly ["span", "p", "strong", "em"];
|
|
74
|
+
|
|
75
|
+
// @public (undocumented)
|
|
76
|
+
type AsElement = (typeof asAllowlist)[number];
|
|
77
|
+
|
|
71
78
|
// @public (undocumented)
|
|
72
79
|
type AtRulesWithoutMedia = Exclude<CSS_2.AtRules, '@media'>;
|
|
73
80
|
|
|
@@ -312,6 +319,16 @@ export type BleedProps = {
|
|
|
312
319
|
block?: Space_2;
|
|
313
320
|
} & BasePrimitiveProps;
|
|
314
321
|
|
|
322
|
+
// @public (undocumented)
|
|
323
|
+
type BodyText = keyof typeof bodyTextMap;
|
|
324
|
+
|
|
325
|
+
// @public (undocumented)
|
|
326
|
+
const bodyTextMap: {
|
|
327
|
+
body: "var(--ds-font-body)";
|
|
328
|
+
'body.large': "var(--ds-font-body-large)";
|
|
329
|
+
'body.small': "var(--ds-font-body-small)";
|
|
330
|
+
};
|
|
331
|
+
|
|
315
332
|
// @public (undocumented)
|
|
316
333
|
export type BorderColor = keyof typeof borderColorMap;
|
|
317
334
|
|
|
@@ -694,6 +711,20 @@ type StyleProp = {
|
|
|
694
711
|
// @public (undocumented)
|
|
695
712
|
type SVGElements = 'animate' | 'animateMotion' | 'animateTransform' | 'circle' | 'clipPath' | 'defs' | 'desc' | 'ellipse' | 'feBlend' | 'feColorMatrix' | 'feComponentTransfer' | 'feComposite' | 'feConvolveMatrix' | 'feDiffuseLighting' | 'feDisplacementMap' | 'feDistantLight' | 'feDropShadow' | 'feFlood' | 'feFuncA' | 'feFuncB' | 'feFuncG' | 'feFuncR' | 'feGaussianBlur' | 'feImage' | 'feMerge' | 'feMergeNode' | 'feMorphology' | 'feOffset' | 'fePointLight' | 'feSpecularLighting' | 'feSpotLight' | 'feTile' | 'feTurbulence' | 'filter' | 'foreignObject' | 'g' | 'image' | 'line' | 'linearGradient' | 'marker' | 'mask' | 'metadata' | 'mpath' | 'path' | 'pattern' | 'polygon' | 'polyline' | 'radialGradient' | 'rect' | 'stop' | 'svg' | 'switch' | 'symbol' | 'text' | 'textPath' | 'tspan' | 'use' | 'view';
|
|
696
713
|
|
|
714
|
+
// @internal
|
|
715
|
+
const Text_2: FC<TextProps>;
|
|
716
|
+
export { Text_2 as Text }
|
|
717
|
+
|
|
718
|
+
// @public (undocumented)
|
|
719
|
+
type TextAlign = keyof typeof textAlignMap;
|
|
720
|
+
|
|
721
|
+
// @public (undocumented)
|
|
722
|
+
const textAlignMap: {
|
|
723
|
+
center: SerializedStyles_2;
|
|
724
|
+
end: SerializedStyles_2;
|
|
725
|
+
start: SerializedStyles_2;
|
|
726
|
+
};
|
|
727
|
+
|
|
697
728
|
// @public (undocumented)
|
|
698
729
|
export type TextColor = keyof typeof textColorMap;
|
|
699
730
|
|
|
@@ -737,6 +768,17 @@ const textColorMap: {
|
|
|
737
768
|
readonly 'color.link.visited': "var(--ds-link-visited)";
|
|
738
769
|
};
|
|
739
770
|
|
|
771
|
+
// @public (undocumented)
|
|
772
|
+
export interface TextProps extends BasePrimitiveProps {
|
|
773
|
+
as?: AsElement;
|
|
774
|
+
children: ReactNode;
|
|
775
|
+
color?: TextColor;
|
|
776
|
+
id?: string;
|
|
777
|
+
shouldTruncate?: boolean;
|
|
778
|
+
textAlign?: TextAlign;
|
|
779
|
+
variant?: Variant;
|
|
780
|
+
}
|
|
781
|
+
|
|
740
782
|
// @public (undocumented)
|
|
741
783
|
type TokenisedProps = {
|
|
742
784
|
backgroundColor?: BackgroundColor;
|
|
@@ -799,6 +841,15 @@ type TokenisedProps = {
|
|
|
799
841
|
zIndex?: Layer;
|
|
800
842
|
};
|
|
801
843
|
|
|
844
|
+
// @public (undocumented)
|
|
845
|
+
type UiText = keyof typeof uiTextMap;
|
|
846
|
+
|
|
847
|
+
// @public (undocumented)
|
|
848
|
+
const uiTextMap: {
|
|
849
|
+
ui: "var(--ds-font-ui)";
|
|
850
|
+
'ui.small': "var(--ds-font-ui-small)";
|
|
851
|
+
};
|
|
852
|
+
|
|
802
853
|
// @public (undocumented)
|
|
803
854
|
const uniqueSymbol: unique symbol;
|
|
804
855
|
|
|
@@ -869,6 +920,9 @@ export const UNSAFE_media: {
|
|
|
869
920
|
};
|
|
870
921
|
};
|
|
871
922
|
|
|
923
|
+
// @public (undocumented)
|
|
924
|
+
type Variant = BodyText | UiText;
|
|
925
|
+
|
|
872
926
|
// @public (undocumented)
|
|
873
927
|
type Wrap = keyof typeof flexWrapMap;
|
|
874
928
|
|