@atlaskit/forge-react-types 0.42.8 → 0.42.9

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 (37) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/types/components/__generated__/BadgeProps.codegen.d.ts +2 -7
  3. package/dist/types/components/__generated__/BoxProps.codegen.d.ts +2 -2
  4. package/dist/types/components/__generated__/CalendarProps.codegen.d.ts +128 -4
  5. package/dist/types/components/__generated__/CodeProps.codegen.d.ts +2 -2
  6. package/dist/types/components/__generated__/HeadingProps.codegen.d.ts +29 -3
  7. package/dist/types/components/__generated__/PressableProps.codegen.d.ts +2 -2
  8. package/dist/types/components/__generated__/RangeProps.codegen.d.ts +50 -5
  9. package/dist/types/components/__generated__/index.d.ts +0 -1
  10. package/dist/types/index.d.ts +1 -1
  11. package/dist/types-ts4.5/components/__generated__/BadgeProps.codegen.d.ts +2 -7
  12. package/dist/types-ts4.5/components/__generated__/BoxProps.codegen.d.ts +2 -2
  13. package/dist/types-ts4.5/components/__generated__/CalendarProps.codegen.d.ts +128 -4
  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 +29 -3
  16. package/dist/types-ts4.5/components/__generated__/PressableProps.codegen.d.ts +2 -2
  17. package/dist/types-ts4.5/components/__generated__/RangeProps.codegen.d.ts +50 -5
  18. package/dist/types-ts4.5/components/__generated__/index.d.ts +0 -1
  19. package/dist/types-ts4.5/index.d.ts +1 -1
  20. package/package.json +1 -4
  21. package/scripts/codegen/codeGenerator.ts +114 -24
  22. package/scripts/codegen/typeSerializer.ts +122 -70
  23. package/scripts/codegen/utils.ts +71 -0
  24. package/scripts/typechecker.ts +17 -2
  25. package/src/components/__generated__/BadgeProps.codegen.tsx +3 -7
  26. package/src/components/__generated__/CalendarProps.codegen.tsx +119 -4
  27. package/src/components/__generated__/CodeProps.codegen.tsx +2 -2
  28. package/src/components/__generated__/HeadingProps.codegen.tsx +31 -3
  29. package/src/components/__generated__/RangeProps.codegen.tsx +54 -5
  30. package/src/components/__generated__/index.ts +1 -2
  31. package/src/index.ts +0 -2
  32. package/dist/cjs/components/__generated__/BleedProps.codegen.js +0 -5
  33. package/dist/es2019/components/__generated__/BleedProps.codegen.js +0 -1
  34. package/dist/esm/components/__generated__/BleedProps.codegen.js +0 -1
  35. package/dist/types/components/__generated__/BleedProps.codegen.d.ts +0 -15
  36. package/dist/types-ts4.5/components/__generated__/BleedProps.codegen.d.ts +0 -15
  37. package/src/components/__generated__/BleedProps.codegen.tsx +0 -22
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/forge-react-types
2
2
 
3
+ ## 0.42.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#184873](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/184873)
8
+ [`44824b4477fc0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/44824b4477fc0) -
9
+ Improve @atlaskit/forge-react-types for Calendar, Bleed, Code, Heading, and Range components.
10
+
3
11
  ## 0.42.8
4
12
 
5
13
  ### Patch Changes
@@ -3,11 +3,11 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - BadgeProps
5
5
  *
6
- * @codegen <<SignedSource::70958e2a60c7a0e1b3443db2d24003cc>>
6
+ * @codegen <<SignedSource::e4726fc9fc56127107db590dd21ef3f6>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/badge/__generated__/index.partial.tsx <<SignedSource::89ad3341c1b8ef4b6fc93df162ac91d3>>
9
9
  */
10
- import React from 'react';
10
+ import type React from 'react';
11
11
  export type PlatformBadgeProps = Omit<_PlatformBadgeProps, 'children'> & {
12
12
  /**
13
13
  * The value displayed within the badge. A badge should only be used in cases where you want to represent a number. Use a lozenge for non-numeric information.
@@ -21,11 +21,6 @@ type _PlatformBadgeProps = {
21
21
  * Affects the visual style of the badge.
22
22
  */
23
23
  appearance?: 'added' | 'default' | 'important' | 'primary' | 'primaryInverted' | 'removed';
24
- /**
25
- * The value displayed within the badge. A badge should only be used in cases where you want to represent a number. Use a lozenge for non-numeric information.
26
- *
27
- * @type string | number
28
- */
29
24
  children?: React.ReactNode;
30
25
  /**
31
26
  * The maximum value to display. Defaults to `99`. If the value is 100, and max is 50, "50+" will be displayed.
@@ -988,7 +988,7 @@ declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof
988
988
  readonly [Symbol.unscopables]?: boolean | undefined;
989
989
  at?: boolean | undefined;
990
990
  } | undefined;
991
- display?: "inline" | "block" | "inline-block" | "none" | {
991
+ display?: "block" | "inline" | "inline-block" | "none" | {
992
992
  [x: number]: boolean | undefined;
993
993
  length?: boolean | undefined;
994
994
  toString?: boolean | undefined;
@@ -2129,7 +2129,7 @@ declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof
2129
2129
  readonly [Symbol.unscopables]?: boolean | undefined;
2130
2130
  at?: boolean | undefined;
2131
2131
  } | undefined;
2132
- display?: "inline" | "block" | "inline-block" | "none" | {
2132
+ display?: "block" | "inline" | "inline-block" | "none" | {
2133
2133
  [x: number]: boolean | undefined;
2134
2134
  length?: boolean | undefined;
2135
2135
  toString?: boolean | undefined;
@@ -3,13 +3,137 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - CalendarProps
5
5
  *
6
- * @codegen <<SignedSource::497faee84f851775b401af97ebfc5c12>>
6
+ * @codegen <<SignedSource::65f2be98c591eb5479ed6a1c399394b2>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/calendar/__generated__/index.partial.tsx <<SignedSource::3fb4c1249481ec420be5118220ebcd82>>
9
9
  */
10
- import React from 'react';
11
- import PlatformCalendar from '@atlaskit/calendar';
12
- type PlatformCalendarProps = React.ComponentProps<typeof PlatformCalendar>;
10
+ import type React from 'react';
11
+ type PlatformCalendarProps = {
12
+ /**
13
+ * The number of the day currently focused. Places border around the date. Enter `0` to highlight no date.
14
+ */
15
+ day?: number;
16
+ /**
17
+ * Sets the default value for `day`.
18
+ */
19
+ defaultDay?: number;
20
+ /**
21
+ * Sets the default value for `month`.
22
+ */
23
+ defaultMonth?: number;
24
+ /**
25
+ * Sets the default value for `previouslySelected`.
26
+ */
27
+ defaultPreviouslySelected?: string[];
28
+ /**
29
+ * Sets the default value for `selected`.
30
+ */
31
+ defaultSelected?: string[];
32
+ /**
33
+ * Sets the default value for `year`.
34
+ */
35
+ defaultYear?: number;
36
+ /**
37
+ * Takes an array of dates as string in the format 'YYYY-MM-DD'. All dates provided are greyed out and not selectable.
38
+ */
39
+ disabled?: string[];
40
+ /**
41
+ * The latest enabled date. All dates in the future after this date will be disabled.
42
+ */
43
+ maxDate?: string;
44
+ /**
45
+ * The earliest enabled date. All dates in the past before this date will be disabled.
46
+ */
47
+ minDate?: string;
48
+ /**
49
+ * The aria-label attribute associated with the next month arrow, to describe it to assistive technology.
50
+ */
51
+ nextMonthLabel?: string;
52
+ /**
53
+ * Function which is called when the calendar is no longer focused.
54
+ */
55
+ onBlur?: React.FocusEventHandler<Element>;
56
+ /**
57
+ * Called when the calendar is navigated. This can be triggered by the keyboard, or by clicking the navigational buttons.
58
+ * The 'interface' property indicates the the direction the calendar was navigated whereas the 'iso' property is a string of the format YYYY-MM-DD.
59
+ */
60
+ onChange?: (event: {
61
+ iso: string;
62
+ type: 'left' | 'up' | 'right' | 'down' | 'prevMonth' | 'prevYear' | 'nextMonth' | 'nextYear';
63
+ day: number;
64
+ month: number;
65
+ year: number;
66
+ }, analyticsEvent: any) => void;
67
+ /**
68
+ * Called when the calendar receives focus. This could be called from a mouse event on the container, or by tabbing into it.
69
+ */
70
+ onFocus?: React.FocusEventHandler<Element>;
71
+ /**
72
+ * Function called when a day is clicked on. Calls with an object that has
73
+ * a day, month and year property as numbers, representing the date just clicked.
74
+ * It also has an 'iso' property, which is a string of the selected date in the
75
+ * format YYYY-MM-DD.
76
+ */
77
+ onSelect?: (event: {
78
+ iso: string;
79
+ day: number;
80
+ month: number;
81
+ year: number;
82
+ }, analyticsEvent: any) => void;
83
+ /**
84
+ * Takes an array of dates as string in the format 'YYYY-MM-DD'. All dates
85
+ * provided are given a background color.
86
+ */
87
+ previouslySelected?: string[];
88
+ /**
89
+ * The aria-label attribute associated with the previous month arrow, to describe it to assistive technology.
90
+ */
91
+ previousMonthLabel?: string;
92
+ /**
93
+ * Takes an array of dates as string in the format 'YYYY-MM-DD'. All dates
94
+ * provided are given a background color.
95
+ */
96
+ selected?: string[];
97
+ /**
98
+ * Value of current day, as a string in the format 'YYYY-MM-DD'.
99
+ */
100
+ today?: string;
101
+ /**
102
+ * Year to display the calendar for.
103
+ */
104
+ year?: number;
105
+ /**
106
+ * BCP 47 language tag (e.g. `ja-JP`) that ensures dates are in the official format for the locale.
107
+ */
108
+ locale?: string;
109
+ /**
110
+ * Start day of the week for the calendar. The mapping between numbers and days of the week is as follows:
111
+ * - `0` Sunday (default value)
112
+ * - `1` Monday
113
+ * - `2` Tuesday
114
+ * - `3` Wednesday
115
+ * - `4` Thursday
116
+ * - `5` Friday
117
+ * - `6` Saturday
118
+ */
119
+ weekStartDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
120
+ /**
121
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
122
+ *
123
+ * - testId--container - Outermost container containing everything inside calendar
124
+ * - testId--month - Container containing all available days for the month
125
+ * - testId--previous-month - Button to show next month
126
+ * - testId--next-month - Button to show previous month
127
+ * - testId--current-month-year - Text containing the current month and year
128
+ * - testId--selected-day - The currently selected day (may be missing if a date isn’t selected)
129
+ */
130
+ testId?: string;
131
+ /**
132
+ * Indicates if the calendar can be focused by keyboard or only
133
+ * programmatically. Defaults to "0".
134
+ */
135
+ tabIndex?: 0 | -1;
136
+ };
13
137
  export type CalendarProps = Pick<PlatformCalendarProps, 'day' | 'defaultDay' | 'defaultMonth' | 'defaultYear' | 'defaultPreviouslySelected' | 'defaultSelected' | 'disabled' | 'maxDate' | 'minDate' | 'nextMonthLabel' | 'onBlur' | 'onChange' | 'onFocus' | 'onSelect' | 'previouslySelected' | 'previousMonthLabel' | 'selected' | 'today' | 'year' | 'locale' | 'testId' | 'weekStartDay' | 'tabIndex'>;
14
138
  /**
15
139
  * An interactive calendar for date selection experiences.
@@ -3,11 +3,11 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - CodeProps
5
5
  *
6
- * @codegen <<SignedSource::e915d32433441373892842df5cce597e>>
6
+ * @codegen <<SignedSource::43cc01ed86828245cbe59920bda9cd4a>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/code/__generated__/code.partial.tsx <<SignedSource::6f210b052488fe7ece12d865706a551e>>
9
9
  */
10
- import React from 'react';
10
+ import type React from 'react';
11
11
  type PlatformCodeProps = {
12
12
  /**
13
13
  * A unique string that appears as a data attribute `data-testid`
@@ -3,12 +3,38 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - HeadingProps
5
5
  *
6
- * @codegen <<SignedSource::0edc0326125b06e6a1280e81282d048d>>
6
+ * @codegen <<SignedSource::8ab3b3f5dd85c2eff37cf908d6e693ba>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/heading/__generated__/index.partial.tsx <<SignedSource::c7fa27d57c7e5695728bcfa2ffa634f9>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/heading/__generated__/index.partial.tsx <<SignedSource::b40904da638774634ed529b90c13d99d>>
9
9
  */
10
- import type { HeadingProps as PlatformHeadingProps } from '@atlaskit/heading';
10
+ import type React from 'react';
11
11
  type Sizes = 'xxlarge' | 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall' | 'xxsmall';
12
+ type PlatformHeadingProps = {
13
+ /**
14
+ * Allows the component to be rendered as the specified DOM element, overriding a default element set by `level` prop.
15
+ */
16
+ as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span';
17
+ /**
18
+ * Token representing text color with a built-in fallback value.
19
+ * Will apply inverse text color automatically if placed within a Box with bold background color.
20
+ * Defaults to `color.text`.
21
+ */
22
+ color?: 'color.text' | 'color.text.inverse' | 'color.text.warning.inverse';
23
+ /**
24
+ * The text of the heading.
25
+ */
26
+ children: React.ReactNode;
27
+ /**
28
+ * Unique identifier for the heading DOM element.
29
+ */
30
+ id?: string;
31
+ /**
32
+ * A `testId` prop is provided for specified elements, which is a unique
33
+ * string that appears as a data attribute `data-testid` in the rendered code,
34
+ * serving as a hook for automated tests.
35
+ */
36
+ testId?: string;
37
+ };
12
38
  export type HeadingProps = Pick<PlatformHeadingProps, 'children' | 'id' | 'testId' | 'as' | 'color'> & {
13
39
  size?: Sizes;
14
40
  };
@@ -988,7 +988,7 @@ declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof
988
988
  readonly [Symbol.unscopables]?: boolean | undefined;
989
989
  at?: boolean | undefined;
990
990
  } | undefined;
991
- display?: "inline" | "block" | "inline-block" | "none" | {
991
+ display?: "block" | "inline" | "inline-block" | "none" | {
992
992
  [x: number]: boolean | undefined;
993
993
  length?: boolean | undefined;
994
994
  toString?: boolean | undefined;
@@ -2129,7 +2129,7 @@ declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof
2129
2129
  readonly [Symbol.unscopables]?: boolean | undefined;
2130
2130
  at?: boolean | undefined;
2131
2131
  } | undefined;
2132
- display?: "inline" | "block" | "inline-block" | "none" | {
2132
+ display?: "block" | "inline" | "inline-block" | "none" | {
2133
2133
  [x: number]: boolean | undefined;
2134
2134
  length?: boolean | undefined;
2135
2135
  toString?: boolean | undefined;
@@ -3,14 +3,59 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - RangeProps
5
5
  *
6
- * @codegen <<SignedSource::8059d330e7cc4a21c671966f6c2496cc>>
6
+ * @codegen <<SignedSource::630c202e2564f5bfeac2d313285aad09>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/range/__generated__/index.partial.tsx <<SignedSource::66f3c55587192848bc42f9fc146e6c7e>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/range/__generated__/index.partial.tsx <<SignedSource::d9ea91886a193f2c5119bc1ed1b50c71>>
9
9
  */
10
- import React from 'react';
11
- import PlatformRange from '@atlaskit/range';
12
10
  import type { EventHandlerProps } from './types.codegen';
13
- type PlatformRangeProps = React.ComponentProps<typeof PlatformRange>;
11
+ type PlatformRangeProps = {
12
+ /**
13
+ * Sets the maximum value of the range.
14
+ */
15
+ max?: number;
16
+ /**
17
+ * Sets the minimum value of the range.
18
+ */
19
+ min?: number;
20
+ name?: string;
21
+ /**
22
+ * Sets the step value for the range.
23
+ */
24
+ step?: number;
25
+ /**
26
+ * Sets the value of the range.
27
+ */
28
+ value?: number;
29
+ /**
30
+ * Hook to be invoked on change of the range.
31
+ */
32
+ onChange?: (value: number) => void;
33
+ /**
34
+ * Sets the default value if range is not set.
35
+ */
36
+ defaultValue?: number;
37
+ id?: string;
38
+ /**
39
+ * Indicates the entered value does not conform to the format expected by the application.
40
+ * @see aria-errormessage.
41
+ */
42
+ "aria-invalid"?: false | true | 'false' | 'true' | 'grammar' | 'spelling';
43
+ /**
44
+ * Identifies the element (or elements) that labels the current element.
45
+ * @see aria-describedby.
46
+ */
47
+ "aria-labelledby"?: string;
48
+ /**
49
+ * Sets whether the field range is disabled.
50
+ */
51
+ isDisabled?: boolean;
52
+ /**
53
+ * A `testId` prop is provided for specific elements. This is a unique string
54
+ * that appears as a data attribute `data-testid` in the rendered code and
55
+ * serves as a hook for automated tests.
56
+ */
57
+ testId?: string;
58
+ };
14
59
  export type RangeProps = Pick<PlatformRangeProps, 'defaultValue' | 'max' | 'min' | 'step' | 'testId' | 'onChange' | 'id' | 'isDisabled' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onBlur' | 'onFocus'>;
15
60
  /**
16
61
  * A range lets users choose an approximate value on a slider.
@@ -1,5 +1,4 @@
1
1
  export type { BadgeProps, TBadge } from './BadgeProps.codegen';
2
- export type { BleedProps, TBleed } from './BleedProps.codegen';
3
2
  export type { BoxProps, TBox } from './BoxProps.codegen';
4
3
  export type { ButtonGroupProps, TButtonGroup } from './ButtonGroupProps.codegen';
5
4
  export type { ButtonProps, TButton } from './ButtonProps.codegen';
@@ -1,3 +1,3 @@
1
- export type { AdfRendererProps, BadgeProps, BleedProps, BoxProps, ButtonGroupProps, ButtonProps, CalendarProps, CheckboxProps, CheckboxGroupProps, CodeBlockProps, CodeProps, CommentProps, 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, ChromelessEditorProps, CommentEditorProps, PressableProps, TBadge, TBleed, TBox, TButtonGroup, TButton, TCalendar, TCheckbox, TCheckboxGroup, TCodeBlock, TCode, TComment, TDatePicker, TDynamicTable, TEmptyState, TErrorMessage, TFlex, TFormFooter, TFormHeader, TForm, TFormSection, TGrid, THeading, THelperMessage, TIcon, TInline, TInlineEdit, TLabel, TLinkButton, TList, TListItem, TLoadingButton, TLozenge, TModalBody, TModalFooter, TModalHeader, TModal, TModalTitle, TModalTransition, TProgressBar, TProgressTracker, TRadioGroup, TRadio, TRange, TSectionMessageAction, TSectionMessage, TSelect, TSpinner, TStack, TTabList, TTabPanel, TTab, TTabs, TTagGroup, TTag, TTextArea, TTextfield, TTimePicker, TToggle, TTooltip, TValidMessage, TPopup, TAdfRenderer, TText, TChromelessEditor, TCommentEditor, TPressable, } from './components/__generated__';
1
+ export type { AdfRendererProps, BadgeProps, BoxProps, ButtonGroupProps, ButtonProps, CalendarProps, CheckboxProps, CheckboxGroupProps, CodeBlockProps, CodeProps, CommentProps, 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, ChromelessEditorProps, CommentEditorProps, PressableProps, TBadge, TBox, TButtonGroup, TButton, TCalendar, TCheckbox, TCheckboxGroup, TCodeBlock, TCode, TComment, TDatePicker, TDynamicTable, TEmptyState, TErrorMessage, TFlex, TFormFooter, TFormHeader, TForm, TFormSection, TGrid, THeading, THelperMessage, TIcon, TInline, TInlineEdit, TLabel, TLinkButton, TList, TListItem, TLoadingButton, TLozenge, TModalBody, TModalFooter, TModalHeader, TModal, TModalTitle, TModalTransition, TProgressBar, TProgressTracker, TRadioGroup, TRadio, TRange, TSectionMessageAction, TSectionMessage, TSelect, TSpinner, TStack, TTabList, TTabPanel, TTab, TTabs, TTagGroup, TTag, TTextArea, TTextfield, TTimePicker, TToggle, TTooltip, TValidMessage, TPopup, TAdfRenderer, TText, TChromelessEditor, TCommentEditor, TPressable, } from './components/__generated__';
2
2
  export type { BarChartProps, StackBarChartProps, HorizontalStackBarChartProps, HorizontalBarChartProps, LineChartProps, DonutChartProps, PieChartProps, TBarChart, TStackBarChart, THorizontalStackBarChart, THorizontalBarChart, TLineChart, TDonutChart, TPieChart, } from './components/charts';
3
3
  export type { ChartColorTokens } from './types';
@@ -3,11 +3,11 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - BadgeProps
5
5
  *
6
- * @codegen <<SignedSource::70958e2a60c7a0e1b3443db2d24003cc>>
6
+ * @codegen <<SignedSource::e4726fc9fc56127107db590dd21ef3f6>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/badge/__generated__/index.partial.tsx <<SignedSource::89ad3341c1b8ef4b6fc93df162ac91d3>>
9
9
  */
10
- import React from 'react';
10
+ import type React from 'react';
11
11
  export type PlatformBadgeProps = Omit<_PlatformBadgeProps, 'children'> & {
12
12
  /**
13
13
  * The value displayed within the badge. A badge should only be used in cases where you want to represent a number. Use a lozenge for non-numeric information.
@@ -21,11 +21,6 @@ type _PlatformBadgeProps = {
21
21
  * Affects the visual style of the badge.
22
22
  */
23
23
  appearance?: 'added' | 'default' | 'important' | 'primary' | 'primaryInverted' | 'removed';
24
- /**
25
- * The value displayed within the badge. A badge should only be used in cases where you want to represent a number. Use a lozenge for non-numeric information.
26
- *
27
- * @type string | number
28
- */
29
24
  children?: React.ReactNode;
30
25
  /**
31
26
  * The maximum value to display. Defaults to `99`. If the value is 100, and max is 50, "50+" will be displayed.
@@ -988,7 +988,7 @@ declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof
988
988
  readonly [Symbol.unscopables]?: boolean | undefined;
989
989
  at?: boolean | undefined;
990
990
  } | undefined;
991
- display?: "inline" | "block" | "inline-block" | "none" | {
991
+ display?: "block" | "inline" | "inline-block" | "none" | {
992
992
  [x: number]: boolean | undefined;
993
993
  length?: boolean | undefined;
994
994
  toString?: boolean | undefined;
@@ -2129,7 +2129,7 @@ declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof
2129
2129
  readonly [Symbol.unscopables]?: boolean | undefined;
2130
2130
  at?: boolean | undefined;
2131
2131
  } | undefined;
2132
- display?: "inline" | "block" | "inline-block" | "none" | {
2132
+ display?: "block" | "inline" | "inline-block" | "none" | {
2133
2133
  [x: number]: boolean | undefined;
2134
2134
  length?: boolean | undefined;
2135
2135
  toString?: boolean | undefined;
@@ -3,13 +3,137 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - CalendarProps
5
5
  *
6
- * @codegen <<SignedSource::497faee84f851775b401af97ebfc5c12>>
6
+ * @codegen <<SignedSource::65f2be98c591eb5479ed6a1c399394b2>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/calendar/__generated__/index.partial.tsx <<SignedSource::3fb4c1249481ec420be5118220ebcd82>>
9
9
  */
10
- import React from 'react';
11
- import PlatformCalendar from '@atlaskit/calendar';
12
- type PlatformCalendarProps = React.ComponentProps<typeof PlatformCalendar>;
10
+ import type React from 'react';
11
+ type PlatformCalendarProps = {
12
+ /**
13
+ * The number of the day currently focused. Places border around the date. Enter `0` to highlight no date.
14
+ */
15
+ day?: number;
16
+ /**
17
+ * Sets the default value for `day`.
18
+ */
19
+ defaultDay?: number;
20
+ /**
21
+ * Sets the default value for `month`.
22
+ */
23
+ defaultMonth?: number;
24
+ /**
25
+ * Sets the default value for `previouslySelected`.
26
+ */
27
+ defaultPreviouslySelected?: string[];
28
+ /**
29
+ * Sets the default value for `selected`.
30
+ */
31
+ defaultSelected?: string[];
32
+ /**
33
+ * Sets the default value for `year`.
34
+ */
35
+ defaultYear?: number;
36
+ /**
37
+ * Takes an array of dates as string in the format 'YYYY-MM-DD'. All dates provided are greyed out and not selectable.
38
+ */
39
+ disabled?: string[];
40
+ /**
41
+ * The latest enabled date. All dates in the future after this date will be disabled.
42
+ */
43
+ maxDate?: string;
44
+ /**
45
+ * The earliest enabled date. All dates in the past before this date will be disabled.
46
+ */
47
+ minDate?: string;
48
+ /**
49
+ * The aria-label attribute associated with the next month arrow, to describe it to assistive technology.
50
+ */
51
+ nextMonthLabel?: string;
52
+ /**
53
+ * Function which is called when the calendar is no longer focused.
54
+ */
55
+ onBlur?: React.FocusEventHandler<Element>;
56
+ /**
57
+ * Called when the calendar is navigated. This can be triggered by the keyboard, or by clicking the navigational buttons.
58
+ * The 'interface' property indicates the the direction the calendar was navigated whereas the 'iso' property is a string of the format YYYY-MM-DD.
59
+ */
60
+ onChange?: (event: {
61
+ iso: string;
62
+ type: 'left' | 'up' | 'right' | 'down' | 'prevMonth' | 'prevYear' | 'nextMonth' | 'nextYear';
63
+ day: number;
64
+ month: number;
65
+ year: number;
66
+ }, analyticsEvent: any) => void;
67
+ /**
68
+ * Called when the calendar receives focus. This could be called from a mouse event on the container, or by tabbing into it.
69
+ */
70
+ onFocus?: React.FocusEventHandler<Element>;
71
+ /**
72
+ * Function called when a day is clicked on. Calls with an object that has
73
+ * a day, month and year property as numbers, representing the date just clicked.
74
+ * It also has an 'iso' property, which is a string of the selected date in the
75
+ * format YYYY-MM-DD.
76
+ */
77
+ onSelect?: (event: {
78
+ iso: string;
79
+ day: number;
80
+ month: number;
81
+ year: number;
82
+ }, analyticsEvent: any) => void;
83
+ /**
84
+ * Takes an array of dates as string in the format 'YYYY-MM-DD'. All dates
85
+ * provided are given a background color.
86
+ */
87
+ previouslySelected?: string[];
88
+ /**
89
+ * The aria-label attribute associated with the previous month arrow, to describe it to assistive technology.
90
+ */
91
+ previousMonthLabel?: string;
92
+ /**
93
+ * Takes an array of dates as string in the format 'YYYY-MM-DD'. All dates
94
+ * provided are given a background color.
95
+ */
96
+ selected?: string[];
97
+ /**
98
+ * Value of current day, as a string in the format 'YYYY-MM-DD'.
99
+ */
100
+ today?: string;
101
+ /**
102
+ * Year to display the calendar for.
103
+ */
104
+ year?: number;
105
+ /**
106
+ * BCP 47 language tag (e.g. `ja-JP`) that ensures dates are in the official format for the locale.
107
+ */
108
+ locale?: string;
109
+ /**
110
+ * Start day of the week for the calendar. The mapping between numbers and days of the week is as follows:
111
+ * - `0` Sunday (default value)
112
+ * - `1` Monday
113
+ * - `2` Tuesday
114
+ * - `3` Wednesday
115
+ * - `4` Thursday
116
+ * - `5` Friday
117
+ * - `6` Saturday
118
+ */
119
+ weekStartDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
120
+ /**
121
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
122
+ *
123
+ * - testId--container - Outermost container containing everything inside calendar
124
+ * - testId--month - Container containing all available days for the month
125
+ * - testId--previous-month - Button to show next month
126
+ * - testId--next-month - Button to show previous month
127
+ * - testId--current-month-year - Text containing the current month and year
128
+ * - testId--selected-day - The currently selected day (may be missing if a date isn’t selected)
129
+ */
130
+ testId?: string;
131
+ /**
132
+ * Indicates if the calendar can be focused by keyboard or only
133
+ * programmatically. Defaults to "0".
134
+ */
135
+ tabIndex?: 0 | -1;
136
+ };
13
137
  export type CalendarProps = Pick<PlatformCalendarProps, 'day' | 'defaultDay' | 'defaultMonth' | 'defaultYear' | 'defaultPreviouslySelected' | 'defaultSelected' | 'disabled' | 'maxDate' | 'minDate' | 'nextMonthLabel' | 'onBlur' | 'onChange' | 'onFocus' | 'onSelect' | 'previouslySelected' | 'previousMonthLabel' | 'selected' | 'today' | 'year' | 'locale' | 'testId' | 'weekStartDay' | 'tabIndex'>;
14
138
  /**
15
139
  * An interactive calendar for date selection experiences.
@@ -3,11 +3,11 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - CodeProps
5
5
  *
6
- * @codegen <<SignedSource::e915d32433441373892842df5cce597e>>
6
+ * @codegen <<SignedSource::43cc01ed86828245cbe59920bda9cd4a>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/code/__generated__/code.partial.tsx <<SignedSource::6f210b052488fe7ece12d865706a551e>>
9
9
  */
10
- import React from 'react';
10
+ import type React from 'react';
11
11
  type PlatformCodeProps = {
12
12
  /**
13
13
  * A unique string that appears as a data attribute `data-testid`
@@ -3,12 +3,38 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - HeadingProps
5
5
  *
6
- * @codegen <<SignedSource::0edc0326125b06e6a1280e81282d048d>>
6
+ * @codegen <<SignedSource::8ab3b3f5dd85c2eff37cf908d6e693ba>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit/heading/__generated__/index.partial.tsx <<SignedSource::c7fa27d57c7e5695728bcfa2ffa634f9>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit/heading/__generated__/index.partial.tsx <<SignedSource::b40904da638774634ed529b90c13d99d>>
9
9
  */
10
- import type { HeadingProps as PlatformHeadingProps } from '@atlaskit/heading';
10
+ import type React from 'react';
11
11
  type Sizes = 'xxlarge' | 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall' | 'xxsmall';
12
+ type PlatformHeadingProps = {
13
+ /**
14
+ * Allows the component to be rendered as the specified DOM element, overriding a default element set by `level` prop.
15
+ */
16
+ as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'div' | 'span';
17
+ /**
18
+ * Token representing text color with a built-in fallback value.
19
+ * Will apply inverse text color automatically if placed within a Box with bold background color.
20
+ * Defaults to `color.text`.
21
+ */
22
+ color?: 'color.text' | 'color.text.inverse' | 'color.text.warning.inverse';
23
+ /**
24
+ * The text of the heading.
25
+ */
26
+ children: React.ReactNode;
27
+ /**
28
+ * Unique identifier for the heading DOM element.
29
+ */
30
+ id?: string;
31
+ /**
32
+ * A `testId` prop is provided for specified elements, which is a unique
33
+ * string that appears as a data attribute `data-testid` in the rendered code,
34
+ * serving as a hook for automated tests.
35
+ */
36
+ testId?: string;
37
+ };
12
38
  export type HeadingProps = Pick<PlatformHeadingProps, 'children' | 'id' | 'testId' | 'as' | 'color'> & {
13
39
  size?: Sizes;
14
40
  };
@@ -988,7 +988,7 @@ declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof
988
988
  readonly [Symbol.unscopables]?: boolean | undefined;
989
989
  at?: boolean | undefined;
990
990
  } | undefined;
991
- display?: "inline" | "block" | "inline-block" | "none" | {
991
+ display?: "block" | "inline" | "inline-block" | "none" | {
992
992
  [x: number]: boolean | undefined;
993
993
  length?: boolean | undefined;
994
994
  toString?: boolean | undefined;
@@ -2129,7 +2129,7 @@ declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof
2129
2129
  readonly [Symbol.unscopables]?: boolean | undefined;
2130
2130
  at?: boolean | undefined;
2131
2131
  } | undefined;
2132
- display?: "inline" | "block" | "inline-block" | "none" | {
2132
+ display?: "block" | "inline" | "inline-block" | "none" | {
2133
2133
  [x: number]: boolean | undefined;
2134
2134
  length?: boolean | undefined;
2135
2135
  toString?: boolean | undefined;