@atlaskit/forge-react-types 0.36.0 → 0.37.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.
Files changed (26) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/components/__generated__/TextProps.codegen.js +5 -0
  3. package/dist/cjs/components/__generated__/index.js +5 -1
  4. package/dist/es2019/components/__generated__/TextProps.codegen.js +1 -0
  5. package/dist/es2019/components/__generated__/index.js +1 -0
  6. package/dist/esm/components/__generated__/TextProps.codegen.js +1 -0
  7. package/dist/esm/components/__generated__/index.js +1 -0
  8. package/dist/types/components/__generated__/CodeProps.codegen.d.ts +2 -2
  9. package/dist/types/components/__generated__/HeadingProps.codegen.d.ts +5 -5
  10. package/dist/types/components/__generated__/LozengeProps.codegen.d.ts +2 -2
  11. package/dist/types/components/__generated__/TextProps.codegen.d.ts +18 -0
  12. package/dist/types/components/__generated__/index.d.ts +4 -0
  13. package/dist/types/index.d.ts +1 -1
  14. package/dist/types-ts4.5/components/__generated__/CodeProps.codegen.d.ts +2 -2
  15. package/dist/types-ts4.5/components/__generated__/HeadingProps.codegen.d.ts +5 -5
  16. package/dist/types-ts4.5/components/__generated__/LozengeProps.codegen.d.ts +2 -2
  17. package/dist/types-ts4.5/components/__generated__/TextProps.codegen.d.ts +18 -0
  18. package/dist/types-ts4.5/components/__generated__/index.d.ts +4 -0
  19. package/dist/types-ts4.5/index.d.ts +1 -1
  20. package/package.json +3 -3
  21. package/src/components/__generated__/CodeProps.codegen.tsx +2 -2
  22. package/src/components/__generated__/HeadingProps.codegen.tsx +5 -5
  23. package/src/components/__generated__/LozengeProps.codegen.tsx +2 -2
  24. package/src/components/__generated__/TextProps.codegen.tsx +25 -0
  25. package/src/components/__generated__/index.ts +5 -0
  26. package/src/index.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/forge-react-types
2
2
 
3
+ ## 0.37.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#116826](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/116826)
8
+ [`8c12c6e2b3efe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8c12c6e2b3efe) -
9
+ Add props for "Text" component
10
+
3
11
  ## 0.36.0
4
12
 
5
13
  ### Minor Changes
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - CodeProps
5
5
  *
6
- * @codegen <<SignedSource::1a39727c921b99c3519aa0020e967c21>>
6
+ * @codegen <<SignedSource::e0386444a3c82762fe87b25289122301>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/code/__generated__/code.partial.tsx <<SignedSource::370e450903cb8f21b11acac7a9fc720b>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/code/__generated__/code.partial.tsx <<SignedSource::a54209d8f81fb1e2f354f4563725efeb>>
9
9
  */
10
10
  import React from 'react';
11
11
  import { Code as PlatformCode } from '@atlaskit/code';
@@ -3,16 +3,16 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - HeadingProps
5
5
  *
6
- * @codegen <<SignedSource::f5b58f64c5c8cfbaff45b7d288ec4ffd>>
6
+ * @codegen <<SignedSource::b8bb5780d2b0112f8f2a4c7190d63fc7>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/heading/__generated__/index.partial.tsx <<SignedSource::b9f5a7af9c404be1b3bf1e55075715fc>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/heading/__generated__/index.partial.tsx <<SignedSource::96b99b296364dce930bb91174b226eaa>>
9
9
  */
10
10
  import type { HeadingProps as PlatformHeadingProps } from '@atlaskit/heading';
11
- type HeadingTags = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
11
+ type Sizes = 'xxlarge' | 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall' | 'xxsmall';
12
12
  type TemporaryColors = 'default' | 'inverse';
13
13
  type NewColors = 'color.text' | 'color.text.inverse' | 'color.text.warning.inverse';
14
- export type HeadingProps = Pick<PlatformHeadingProps, 'children' | 'id' | 'testId'> & {
15
- as: HeadingTags;
14
+ export type HeadingProps = Pick<PlatformHeadingProps, 'children' | 'id' | 'testId' | 'as'> & {
15
+ size?: Sizes;
16
16
  color?: NewColors | TemporaryColors;
17
17
  };
18
18
  /**
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - LozengeProps
5
5
  *
6
- * @codegen <<SignedSource::010c29755ec75417d1649af3008801cd>>
6
+ * @codegen <<SignedSource::3d662c95d84fa4bb1441b1edbac2c302>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/lozenge/__generated__/index.partial.tsx <<SignedSource::20810ed29278b94c2bf310c8d80efdf8>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/lozenge/__generated__/index.partial.tsx <<SignedSource::e362dbb308b0f7785d47bb5e9aa46ab0>>
9
9
  */
10
10
  import React from 'react';
11
11
  import PlatformLozenge from '@atlaskit/lozenge';
@@ -0,0 +1,18 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * Extract component prop types from UIKit 2 components - TextProps
5
+ *
6
+ * @codegen <<SignedSource::31d160b53a47008ce61df934652b99c0>>
7
+ * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/text/__generated__/index.partial.tsx <<SignedSource::813a1a6f22d33e27a5651da301ca7ab1>>
9
+ */
10
+ import React from 'react';
11
+ import { Text as PlatformText } from '@atlaskit/primitives';
12
+ type PlatformTextProps = React.ComponentProps<typeof PlatformText>;
13
+ export type TextProps = Pick<PlatformTextProps, 'align' | 'as' | 'color' | 'maxLines' | 'size' | 'weight' | 'children' | 'testId'>;
14
+ /**
15
+ * Primitives are token-backed low-level building blocks.
16
+ */
17
+ export type TText<T> = (props: TextProps) => T;
18
+ export {};
@@ -59,3 +59,7 @@ export type { TooltipProps } from './TooltipProps.codegen';
59
59
  export type { ValidMessageProps } from './ValidMessageProps.codegen';
60
60
  export type { PopupProps } from './PopupProps.codegen';
61
61
  export type { AdfRendererProps, TAdfRenderer } from './AdfRendererProps.codegen';
62
+ import type { TextProps as OriginalTextProps } from './TextProps.codegen';
63
+ export type TextProps = Omit<OriginalTextProps, 'as'> & {
64
+ as?: OriginalTextProps['as'] | 'strike';
65
+ };
@@ -1,3 +1,3 @@
1
- export type { AdfRendererProps, BadgeProps, BleedProps, BoxProps, ButtonGroupProps, ButtonProps, CalendarProps, CheckboxProps, CheckboxGroupProps, CodeBlockProps, CodeProps, DatePickerProps, DynamicTableProps, EmptyStateProps, ErrorMessageProps, FlexProps, FormFooterProps, FormHeaderProps, FormProps, FormSectionProps, GridProps, HeadingProps, HelperMessageProps, IconProps, InlineProps, LabelProps, LinkButtonProps, ListProps, ListItemProps, LoadingButtonProps, LozengeProps, ModalBodyProps, ModalFooterProps, ModalHeaderProps, ModalProps, ModalTitleProps, ModalTransitionProps, ProgressBarProps, ProgressTrackerProps, RadioGroupProps, RadioProps, RangeProps, SectionMessageActionProps, SectionMessageProps, SelectProps, SpinnerProps, StackProps, TabListProps, TabPanelProps, TabProps, TabsProps, TagGroupProps, TagProps, TextAreaProps, TextfieldProps, ToggleProps, TooltipProps, TimePickerProps, ValidMessageProps, PopupProps, InlineEditProps, TBadge, TBox, TAdfRenderer, } from './components/__generated__';
1
+ export type { AdfRendererProps, BadgeProps, BleedProps, BoxProps, ButtonGroupProps, ButtonProps, CalendarProps, CheckboxProps, CheckboxGroupProps, CodeBlockProps, CodeProps, DatePickerProps, DynamicTableProps, EmptyStateProps, ErrorMessageProps, FlexProps, FormFooterProps, FormHeaderProps, FormProps, FormSectionProps, GridProps, HeadingProps, HelperMessageProps, IconProps, InlineProps, LabelProps, LinkButtonProps, ListProps, ListItemProps, LoadingButtonProps, LozengeProps, ModalBodyProps, ModalFooterProps, ModalHeaderProps, ModalProps, ModalTitleProps, ModalTransitionProps, ProgressBarProps, ProgressTrackerProps, RadioGroupProps, RadioProps, RangeProps, SectionMessageActionProps, SectionMessageProps, SelectProps, SpinnerProps, StackProps, TabListProps, TabPanelProps, TabProps, TabsProps, TagGroupProps, TagProps, TextProps, TextAreaProps, TextfieldProps, ToggleProps, TooltipProps, TimePickerProps, ValidMessageProps, PopupProps, InlineEditProps, TBadge, TBox, TAdfRenderer, } from './components/__generated__';
2
2
  export type { BarChartProps, StackBarChartProps, HorizontalStackBarChartProps, HorizontalBarChartProps, LineChartProps, SingleValueChartProps, PieChartProps, } from './components/charts';
3
3
  export type { ChartColorTokens } from './types';
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - CodeProps
5
5
  *
6
- * @codegen <<SignedSource::1a39727c921b99c3519aa0020e967c21>>
6
+ * @codegen <<SignedSource::e0386444a3c82762fe87b25289122301>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/code/__generated__/code.partial.tsx <<SignedSource::370e450903cb8f21b11acac7a9fc720b>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/code/__generated__/code.partial.tsx <<SignedSource::a54209d8f81fb1e2f354f4563725efeb>>
9
9
  */
10
10
  import React from 'react';
11
11
  import { Code as PlatformCode } from '@atlaskit/code';
@@ -3,16 +3,16 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - HeadingProps
5
5
  *
6
- * @codegen <<SignedSource::f5b58f64c5c8cfbaff45b7d288ec4ffd>>
6
+ * @codegen <<SignedSource::b8bb5780d2b0112f8f2a4c7190d63fc7>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/heading/__generated__/index.partial.tsx <<SignedSource::b9f5a7af9c404be1b3bf1e55075715fc>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/heading/__generated__/index.partial.tsx <<SignedSource::96b99b296364dce930bb91174b226eaa>>
9
9
  */
10
10
  import type { HeadingProps as PlatformHeadingProps } from '@atlaskit/heading';
11
- type HeadingTags = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
11
+ type Sizes = 'xxlarge' | 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall' | 'xxsmall';
12
12
  type TemporaryColors = 'default' | 'inverse';
13
13
  type NewColors = 'color.text' | 'color.text.inverse' | 'color.text.warning.inverse';
14
- export type HeadingProps = Pick<PlatformHeadingProps, 'children' | 'id' | 'testId'> & {
15
- as: HeadingTags;
14
+ export type HeadingProps = Pick<PlatformHeadingProps, 'children' | 'id' | 'testId' | 'as'> & {
15
+ size?: Sizes;
16
16
  color?: NewColors | TemporaryColors;
17
17
  };
18
18
  /**
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - LozengeProps
5
5
  *
6
- * @codegen <<SignedSource::010c29755ec75417d1649af3008801cd>>
6
+ * @codegen <<SignedSource::3d662c95d84fa4bb1441b1edbac2c302>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/lozenge/__generated__/index.partial.tsx <<SignedSource::20810ed29278b94c2bf310c8d80efdf8>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/lozenge/__generated__/index.partial.tsx <<SignedSource::e362dbb308b0f7785d47bb5e9aa46ab0>>
9
9
  */
10
10
  import React from 'react';
11
11
  import PlatformLozenge from '@atlaskit/lozenge';
@@ -0,0 +1,18 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * Extract component prop types from UIKit 2 components - TextProps
5
+ *
6
+ * @codegen <<SignedSource::31d160b53a47008ce61df934652b99c0>>
7
+ * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/text/__generated__/index.partial.tsx <<SignedSource::813a1a6f22d33e27a5651da301ca7ab1>>
9
+ */
10
+ import React from 'react';
11
+ import { Text as PlatformText } from '@atlaskit/primitives';
12
+ type PlatformTextProps = React.ComponentProps<typeof PlatformText>;
13
+ export type TextProps = Pick<PlatformTextProps, 'align' | 'as' | 'color' | 'maxLines' | 'size' | 'weight' | 'children' | 'testId'>;
14
+ /**
15
+ * Primitives are token-backed low-level building blocks.
16
+ */
17
+ export type TText<T> = (props: TextProps) => T;
18
+ export {};
@@ -59,3 +59,7 @@ export type { TooltipProps } from './TooltipProps.codegen';
59
59
  export type { ValidMessageProps } from './ValidMessageProps.codegen';
60
60
  export type { PopupProps } from './PopupProps.codegen';
61
61
  export type { AdfRendererProps, TAdfRenderer } from './AdfRendererProps.codegen';
62
+ import type { TextProps as OriginalTextProps } from './TextProps.codegen';
63
+ export type TextProps = Omit<OriginalTextProps, 'as'> & {
64
+ as?: OriginalTextProps['as'] | 'strike';
65
+ };
@@ -1,3 +1,3 @@
1
- export type { AdfRendererProps, BadgeProps, BleedProps, BoxProps, ButtonGroupProps, ButtonProps, CalendarProps, CheckboxProps, CheckboxGroupProps, CodeBlockProps, CodeProps, DatePickerProps, DynamicTableProps, EmptyStateProps, ErrorMessageProps, FlexProps, FormFooterProps, FormHeaderProps, FormProps, FormSectionProps, GridProps, HeadingProps, HelperMessageProps, IconProps, InlineProps, LabelProps, LinkButtonProps, ListProps, ListItemProps, LoadingButtonProps, LozengeProps, ModalBodyProps, ModalFooterProps, ModalHeaderProps, ModalProps, ModalTitleProps, ModalTransitionProps, ProgressBarProps, ProgressTrackerProps, RadioGroupProps, RadioProps, RangeProps, SectionMessageActionProps, SectionMessageProps, SelectProps, SpinnerProps, StackProps, TabListProps, TabPanelProps, TabProps, TabsProps, TagGroupProps, TagProps, TextAreaProps, TextfieldProps, ToggleProps, TooltipProps, TimePickerProps, ValidMessageProps, PopupProps, InlineEditProps, TBadge, TBox, TAdfRenderer, } from './components/__generated__';
1
+ export type { AdfRendererProps, BadgeProps, BleedProps, BoxProps, ButtonGroupProps, ButtonProps, CalendarProps, CheckboxProps, CheckboxGroupProps, CodeBlockProps, CodeProps, DatePickerProps, DynamicTableProps, EmptyStateProps, ErrorMessageProps, FlexProps, FormFooterProps, FormHeaderProps, FormProps, FormSectionProps, GridProps, HeadingProps, HelperMessageProps, IconProps, InlineProps, LabelProps, LinkButtonProps, ListProps, ListItemProps, LoadingButtonProps, LozengeProps, ModalBodyProps, ModalFooterProps, ModalHeaderProps, ModalProps, ModalTitleProps, ModalTransitionProps, ProgressBarProps, ProgressTrackerProps, RadioGroupProps, RadioProps, RangeProps, SectionMessageActionProps, SectionMessageProps, SelectProps, SpinnerProps, StackProps, TabListProps, TabPanelProps, TabProps, TabsProps, TagGroupProps, TagProps, TextProps, TextAreaProps, TextfieldProps, ToggleProps, TooltipProps, TimePickerProps, ValidMessageProps, PopupProps, InlineEditProps, TBadge, TBox, TAdfRenderer, } from './components/__generated__';
2
2
  export type { BarChartProps, StackBarChartProps, HorizontalStackBarChartProps, HorizontalBarChartProps, LineChartProps, SingleValueChartProps, PieChartProps, } from './components/charts';
3
3
  export type { ChartColorTokens } from './types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/forge-react-types",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "description": "Component types for Forge UI Kit React components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@atlaskit/badge": "^18.0.0",
28
- "@atlaskit/button": "^21.0.0",
28
+ "@atlaskit/button": "^21.1.0",
29
29
  "@atlaskit/calendar": "^17.0.0",
30
30
  "@atlaskit/checkbox": "^16.0.0",
31
31
  "@atlaskit/code": "^16.0.0",
@@ -53,7 +53,7 @@
53
53
  "@atlaskit/textarea": "^8.0.0",
54
54
  "@atlaskit/textfield": "^8.0.0",
55
55
  "@atlaskit/toggle": "^15.0.0",
56
- "@atlaskit/tokens": "^4.0.0",
56
+ "@atlaskit/tokens": "^4.1.0",
57
57
  "@atlaskit/tooltip": "^20.0.0",
58
58
  "@babel/runtime": "^7.0.0"
59
59
  },
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - CodeProps
5
5
  *
6
- * @codegen <<SignedSource::1a39727c921b99c3519aa0020e967c21>>
6
+ * @codegen <<SignedSource::e0386444a3c82762fe87b25289122301>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/code/__generated__/code.partial.tsx <<SignedSource::370e450903cb8f21b11acac7a9fc720b>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/code/__generated__/code.partial.tsx <<SignedSource::a54209d8f81fb1e2f354f4563725efeb>>
9
9
  */
10
10
  /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
11
11
 
@@ -3,20 +3,20 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - HeadingProps
5
5
  *
6
- * @codegen <<SignedSource::f5b58f64c5c8cfbaff45b7d288ec4ffd>>
6
+ * @codegen <<SignedSource::b8bb5780d2b0112f8f2a4c7190d63fc7>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/heading/__generated__/index.partial.tsx <<SignedSource::b9f5a7af9c404be1b3bf1e55075715fc>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/heading/__generated__/index.partial.tsx <<SignedSource::96b99b296364dce930bb91174b226eaa>>
9
9
  */
10
10
  /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
11
11
 
12
12
  import type { HeadingProps as PlatformHeadingProps } from '@atlaskit/heading';
13
13
 
14
- type HeadingTags = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
14
+ type Sizes = 'xxlarge' | 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall' | 'xxsmall';
15
15
  type TemporaryColors = 'default' | 'inverse';
16
16
  type NewColors = 'color.text' | 'color.text.inverse' | 'color.text.warning.inverse';
17
17
 
18
- export type HeadingProps = Pick<PlatformHeadingProps, 'children' | 'id' | 'testId'> & {
19
- as: HeadingTags;
18
+ export type HeadingProps = Pick<PlatformHeadingProps, 'children' | 'id' | 'testId' | 'as'> & {
19
+ size?: Sizes;
20
20
  color?: NewColors | TemporaryColors;
21
21
  };
22
22
 
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - LozengeProps
5
5
  *
6
- * @codegen <<SignedSource::010c29755ec75417d1649af3008801cd>>
6
+ * @codegen <<SignedSource::3d662c95d84fa4bb1441b1edbac2c302>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/lozenge/__generated__/index.partial.tsx <<SignedSource::20810ed29278b94c2bf310c8d80efdf8>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/lozenge/__generated__/index.partial.tsx <<SignedSource::e362dbb308b0f7785d47bb5e9aa46ab0>>
9
9
  */
10
10
  /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
11
11
 
@@ -0,0 +1,25 @@
1
+ /**
2
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
3
+ *
4
+ * Extract component prop types from UIKit 2 components - TextProps
5
+ *
6
+ * @codegen <<SignedSource::31d160b53a47008ce61df934652b99c0>>
7
+ * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/text/__generated__/index.partial.tsx <<SignedSource::813a1a6f22d33e27a5651da301ca7ab1>>
9
+ */
10
+ /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
11
+
12
+ import React from 'react';
13
+ import { Text as PlatformText } from '@atlaskit/primitives';
14
+
15
+ type PlatformTextProps = React.ComponentProps<typeof PlatformText>;
16
+
17
+ export type TextProps = Pick<
18
+ PlatformTextProps,
19
+ 'align' | 'as' | 'color' | 'maxLines' | 'size' | 'weight' | 'children' | 'testId'
20
+ >;
21
+
22
+ /**
23
+ * Primitives are token-backed low-level building blocks.
24
+ */
25
+ export type TText<T> = (props: TextProps) => T;
@@ -59,3 +59,8 @@ export type { TooltipProps } from './TooltipProps.codegen';
59
59
  export type { ValidMessageProps } from './ValidMessageProps.codegen';
60
60
  export type { PopupProps } from './PopupProps.codegen';
61
61
  export type { AdfRendererProps, TAdfRenderer } from './AdfRendererProps.codegen';
62
+
63
+ // Forge UI supports the value "strike" for the "as" prop of the Text component, to have a migration path
64
+ // off using <Strike>. The native ADS Text component does not support it, so we patched it to support it.
65
+ import type { TextProps as OriginalTextProps } from './TextProps.codegen'
66
+ export type TextProps = Omit<OriginalTextProps, 'as'> & { as?: OriginalTextProps['as'] | 'strike' };
package/src/index.ts CHANGED
@@ -52,6 +52,7 @@ export type {
52
52
  TabsProps,
53
53
  TagGroupProps,
54
54
  TagProps,
55
+ TextProps,
55
56
  TextAreaProps,
56
57
  TextfieldProps,
57
58
  ToggleProps,