@atlaskit/primitives 1.18.0 → 1.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 +10 -0
- package/dist/cjs/components/text.js +17 -10
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/xcss/xcss.js +2 -2
- package/dist/es2019/components/text.js +17 -10
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/xcss/xcss.js +1 -1
- package/dist/esm/components/text.js +17 -10
- package/dist/esm/index.js +1 -1
- package/dist/esm/xcss/xcss.js +1 -1
- package/dist/types/components/text.d.ts +5 -3
- package/dist/types/index.d.ts +2 -2
- package/dist/types/responsive/index.d.ts +1 -1
- package/dist/types/xcss/xcss.d.ts +1622 -0
- package/dist/types-ts4.5/components/text.d.ts +5 -3
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/responsive/index.d.ts +1 -1
- package/dist/types-ts4.5/xcss/xcss.d.ts +1622 -0
- package/package.json +1 -1
- package/extract-react-types/text-props.tsx +0 -47
package/package.json
CHANGED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// TODO: This is all hacky, replace with ts-morph solution
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
5
|
-
namespace Token {
|
|
6
|
-
// BoxProps['backgroundColor'] uses keyof, which ERT does not understand
|
|
7
|
-
export type TextColor = 'TextColor';
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
type TextAlign = 'center' | 'end' | 'start';
|
|
11
|
-
type TextVariant = 'body' | 'body.large' | 'body.small' | 'ui' | 'ui.small';
|
|
12
|
-
|
|
13
|
-
interface TextProps {
|
|
14
|
-
/**
|
|
15
|
-
* HTML tag to be rendered. Defaults to `span`.
|
|
16
|
-
*/
|
|
17
|
-
as?: 'span' | 'p' | 'strong' | 'em';
|
|
18
|
-
/**
|
|
19
|
-
* Elements rendered within the Text element
|
|
20
|
-
*/
|
|
21
|
-
children: ReactNode;
|
|
22
|
-
/**
|
|
23
|
-
* Text variant
|
|
24
|
-
*/
|
|
25
|
-
variant?: TextVariant;
|
|
26
|
-
/**
|
|
27
|
-
* Token representing text color with a built-in fallback value.
|
|
28
|
-
* Will apply inverse text color automatically if placed within a Box with backgroundColor.
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
color?: Token.TextColor;
|
|
32
|
-
/**
|
|
33
|
-
* The HTML id attribute https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
|
|
34
|
-
*/
|
|
35
|
-
id?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Truncates text with an ellipsis when text overflows its parent container
|
|
38
|
-
* (i.e. `width` has been set on parent that is shorter than text length).
|
|
39
|
-
*/
|
|
40
|
-
shouldTruncate?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Text align https://developer.mozilla.org/en-US/docs/Web/CSS/text-align
|
|
43
|
-
*/
|
|
44
|
-
textAlign?: TextAlign;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export default function Text(_: TextProps) {}
|