@atlaskit/forge-react-types 0.42.8 → 0.42.10
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 +17 -0
- package/dist/types/components/__generated__/BadgeProps.codegen.d.ts +2 -7
- package/dist/types/components/__generated__/BoxProps.codegen.d.ts +2 -2
- package/dist/types/components/__generated__/CalendarProps.codegen.d.ts +128 -4
- package/dist/types/components/__generated__/CheckboxProps.codegen.d.ts +62 -4
- package/dist/types/components/__generated__/CodeProps.codegen.d.ts +2 -2
- package/dist/types/components/__generated__/EmptyStateProps.codegen.d.ts +45 -4
- package/dist/types/components/__generated__/ErrorMessageProps.codegen.d.ts +14 -4
- package/dist/types/components/__generated__/HeadingProps.codegen.d.ts +29 -3
- package/dist/types/components/__generated__/LozengeProps.codegen.d.ts +26 -4
- package/dist/types/components/__generated__/PressableProps.codegen.d.ts +2 -2
- package/dist/types/components/__generated__/RangeProps.codegen.d.ts +50 -5
- package/dist/types/components/__generated__/index.d.ts +0 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types-ts4.5/components/__generated__/BadgeProps.codegen.d.ts +2 -7
- package/dist/types-ts4.5/components/__generated__/BoxProps.codegen.d.ts +2 -2
- package/dist/types-ts4.5/components/__generated__/CalendarProps.codegen.d.ts +128 -4
- package/dist/types-ts4.5/components/__generated__/CheckboxProps.codegen.d.ts +62 -4
- package/dist/types-ts4.5/components/__generated__/CodeProps.codegen.d.ts +2 -2
- package/dist/types-ts4.5/components/__generated__/EmptyStateProps.codegen.d.ts +45 -4
- package/dist/types-ts4.5/components/__generated__/ErrorMessageProps.codegen.d.ts +14 -4
- package/dist/types-ts4.5/components/__generated__/HeadingProps.codegen.d.ts +29 -3
- package/dist/types-ts4.5/components/__generated__/LozengeProps.codegen.d.ts +26 -4
- package/dist/types-ts4.5/components/__generated__/PressableProps.codegen.d.ts +2 -2
- package/dist/types-ts4.5/components/__generated__/RangeProps.codegen.d.ts +50 -5
- package/dist/types-ts4.5/components/__generated__/index.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/package.json +5 -11
- package/scripts/codegen/codeGenerator.ts +118 -24
- package/scripts/codegen/typeSerializer.ts +122 -70
- package/scripts/codegen/utils.ts +71 -0
- package/scripts/typechecker.ts +37 -2
- package/src/components/__generated__/BadgeProps.codegen.tsx +3 -7
- package/src/components/__generated__/CalendarProps.codegen.tsx +119 -4
- package/src/components/__generated__/CheckboxProps.codegen.tsx +64 -4
- package/src/components/__generated__/CodeProps.codegen.tsx +2 -2
- package/src/components/__generated__/EmptyStateProps.codegen.tsx +47 -4
- package/src/components/__generated__/ErrorMessageProps.codegen.tsx +16 -4
- package/src/components/__generated__/HeadingProps.codegen.tsx +31 -3
- package/src/components/__generated__/LozengeProps.codegen.tsx +28 -4
- package/src/components/__generated__/RangeProps.codegen.tsx +54 -5
- package/src/components/__generated__/index.ts +1 -2
- package/src/index.ts +0 -2
- package/dist/cjs/components/__generated__/BleedProps.codegen.js +0 -5
- package/dist/es2019/components/__generated__/BleedProps.codegen.js +0 -1
- package/dist/esm/components/__generated__/BleedProps.codegen.js +0 -1
- package/dist/types/components/__generated__/BleedProps.codegen.d.ts +0 -15
- package/dist/types-ts4.5/components/__generated__/BleedProps.codegen.d.ts +0 -15
- package/src/components/__generated__/BleedProps.codegen.tsx +0 -22
|
@@ -3,13 +3,137 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - CalendarProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
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
|
-
|
|
12
|
-
|
|
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,14 +3,72 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - CheckboxProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::634533a7eaed746ad58981b553539cdf>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
8
|
* @codegenDependency ../../../../forge-ui/src/components/UIKit/checkbox/__generated__/index.partial.tsx <<SignedSource::e34c0ab52d3409a8548b6e51450ba43b>>
|
|
9
9
|
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import PlatformCheckbox from '@atlaskit/checkbox';
|
|
12
10
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
|
-
type
|
|
11
|
+
import type React from 'react';
|
|
12
|
+
type PlatformCheckboxProps = {
|
|
13
|
+
/**
|
|
14
|
+
* The name of the submitted field in a checkbox.
|
|
15
|
+
*/
|
|
16
|
+
name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The value to be used in the checkbox input. This is the value that will be returned on form submission.
|
|
19
|
+
*/
|
|
20
|
+
value?: string | number;
|
|
21
|
+
/**
|
|
22
|
+
* Sets whether the checkbox begins as checked or unchecked.
|
|
23
|
+
*/
|
|
24
|
+
defaultChecked?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The ID assigned to the input.
|
|
27
|
+
*/
|
|
28
|
+
id?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Indicates the entered value does not conform to the format expected by the application.
|
|
31
|
+
* @see aria-errormessage.
|
|
32
|
+
*/
|
|
33
|
+
"aria-invalid"?: false | true | 'false' | 'true' | 'grammar' | 'spelling';
|
|
34
|
+
/**
|
|
35
|
+
* Identifies the element (or elements) that labels the current element.
|
|
36
|
+
* @see aria-describedby.
|
|
37
|
+
*/
|
|
38
|
+
"aria-labelledby"?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Sets whether the checkbox is checked or unchecked.
|
|
41
|
+
*/
|
|
42
|
+
isChecked?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Sets whether the checkbox is disabled. Don’t use a disabled checkbox if it needs to remain in the tab order for assistive technologies.
|
|
45
|
+
*/
|
|
46
|
+
isDisabled?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Sets whether the checkbox is indeterminate. This only affects the
|
|
49
|
+
* style and does not modify the isChecked property.
|
|
50
|
+
*/
|
|
51
|
+
isIndeterminate?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Marks the field as invalid. Changes style of unchecked component.
|
|
54
|
+
*/
|
|
55
|
+
isInvalid?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Marks the field as required & changes the label style.
|
|
58
|
+
*/
|
|
59
|
+
isRequired?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* The label to be displayed to the right of the checkbox. The label is part
|
|
62
|
+
* of the clickable element to select the checkbox.
|
|
63
|
+
*/
|
|
64
|
+
label?: React.ReactChild;
|
|
65
|
+
/**
|
|
66
|
+
* 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
|
|
67
|
+
* we have generated testid based on the one you pass to the Checkbox component:
|
|
68
|
+
* - `{testId}--hidden-checkbox` to check if it got changed to checked/unchecked.
|
|
69
|
+
*/
|
|
70
|
+
testId?: string;
|
|
71
|
+
};
|
|
14
72
|
export type CheckboxProps = Pick<PlatformCheckboxProps, 'testId' | 'defaultChecked' | 'isChecked' | 'isIndeterminate' | 'label' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
15
73
|
/**
|
|
16
74
|
* A checkbox is an input control that allows a user to select one or more options from a number of choices.
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - CodeProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
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,13 +3,54 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - EmptyStateProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::62fe186d8326a7c3e8533e18dba9fcfb>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
8
|
* @codegenDependency ../../../../forge-ui/src/components/UIKit/emptystate/__generated__/index.partial.tsx <<SignedSource::d6c509a722d55de0f55d401cd2e75435>>
|
|
9
9
|
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import type React from 'react';
|
|
11
|
+
type PlatformEmptyStateProps = {
|
|
12
|
+
/**
|
|
13
|
+
* Accessible name for the action buttons group of empty state. Can be used for internationalization. Default is "Button group".
|
|
14
|
+
*/
|
|
15
|
+
buttonGroupLabel?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The main block of text that holds additional supporting information.
|
|
18
|
+
*/
|
|
19
|
+
description?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Title that briefly describes the page to the user.
|
|
22
|
+
*/
|
|
23
|
+
header: string;
|
|
24
|
+
/**
|
|
25
|
+
* The value used to set the heading level of the header element.
|
|
26
|
+
* Must be in the range of 1 to 6. Defaults to 4.
|
|
27
|
+
*/
|
|
28
|
+
headingLevel?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Used to indicate a loading state. Will show a spinner next to the action buttons when true.
|
|
31
|
+
*/
|
|
32
|
+
isLoading?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Primary action button for the page, usually it will be something like "Create" (or "Retry" for error pages).
|
|
35
|
+
*/
|
|
36
|
+
primaryAction?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Secondary action button for the page.
|
|
39
|
+
*/
|
|
40
|
+
secondaryAction?: React.ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Controls how much horizontal space the component fills. Defaults to "wide".
|
|
43
|
+
*/
|
|
44
|
+
width?: 'narrow' | 'wide';
|
|
45
|
+
/**
|
|
46
|
+
* Button with link to some external resource like documentation or tutorial, it will be opened in a new tab.
|
|
47
|
+
*/
|
|
48
|
+
tertiaryAction?: React.ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* A hook for automated testing.
|
|
51
|
+
*/
|
|
52
|
+
testId?: string;
|
|
53
|
+
};
|
|
13
54
|
export type EmptyStateProps = Pick<PlatformEmptyStateProps, 'buttonGroupLabel' | 'description' | 'header' | 'headingLevel' | 'isLoading' | 'primaryAction' | 'secondaryAction' | 'tertiaryAction' | 'testId' | 'width'>;
|
|
14
55
|
/**
|
|
15
56
|
* An empty state appears when there is no data to display and describes what the user can do next.
|
|
@@ -3,13 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - ErrorMessageProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::e5e94f85cf8efd7d6cc06b1355785c4b>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
8
|
* @codegenDependency ../../../../forge-ui/src/components/UIKit/form/__generated__/error-message.partial.tsx <<SignedSource::3758488a0115c629a624fcaae1f524c7>>
|
|
9
9
|
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import type React from 'react';
|
|
11
|
+
type PlatformErrorMessageProps = {
|
|
12
|
+
/**
|
|
13
|
+
* The content of the message
|
|
14
|
+
*/
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* A testId prop is provided for specified elements, which is a unique string
|
|
18
|
+
* that appears as a data attribute data-testid in the rendered code,
|
|
19
|
+
* serving as a hook for automated tests
|
|
20
|
+
*/
|
|
21
|
+
testId?: string;
|
|
22
|
+
};
|
|
13
23
|
export type ErrorMessageProps = Pick<PlatformErrorMessageProps, 'children' | 'testId'>;
|
|
14
24
|
/**
|
|
15
25
|
* An error message is used to tell a user that the field input is invalid.
|
|
@@ -3,12 +3,38 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - HeadingProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
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::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/heading/__generated__/index.partial.tsx <<SignedSource::b40904da638774634ed529b90c13d99d>>
|
|
9
9
|
*/
|
|
10
|
-
import type
|
|
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
|
};
|
|
@@ -3,13 +3,35 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - LozengeProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::0ef732d9e1b715ee6f4229d3ef5b4649>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
8
|
* @codegenDependency ../../../../forge-ui/src/components/UIKit/lozenge/__generated__/index.partial.tsx <<SignedSource::e362dbb308b0f7785d47bb5e9aa46ab0>>
|
|
9
9
|
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import type React from 'react';
|
|
11
|
+
type PlatformLozengeProps = {
|
|
12
|
+
/**
|
|
13
|
+
* Elements to be rendered inside the lozenge. This should ideally be just a word or two.
|
|
14
|
+
*/
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* A `testId` prop is provided for specified elements, which is a unique
|
|
18
|
+
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
19
|
+
* serving as a hook for automated tests
|
|
20
|
+
*/
|
|
21
|
+
testId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Determines whether to apply the bold style or not.
|
|
24
|
+
*/
|
|
25
|
+
isBold?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The appearance type.
|
|
28
|
+
*/
|
|
29
|
+
appearance?: 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
|
|
30
|
+
/**
|
|
31
|
+
* max-width of lozenge container. Default to 200px.
|
|
32
|
+
*/
|
|
33
|
+
maxWidth?: string | number;
|
|
34
|
+
};
|
|
13
35
|
export type LozengeProps = Pick<PlatformLozengeProps, 'appearance' | 'children' | 'isBold' | 'maxWidth' | 'testId'>;
|
|
14
36
|
/**
|
|
15
37
|
* A lozenge is a visual indicator used to highlight an item's status for quick recognition.
|
|
@@ -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?: "
|
|
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?: "
|
|
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::
|
|
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::
|
|
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 =
|
|
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,
|
|
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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/forge-react-types",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.10",
|
|
4
4
|
"description": "Component types for Forge UI Kit React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,25 +25,19 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@atlaskit/button": "^23.2.0",
|
|
28
|
-
"@atlaskit/calendar": "^17.1.0",
|
|
29
|
-
"@atlaskit/checkbox": "^17.1.0",
|
|
30
28
|
"@atlaskit/comment": "^13.0.0",
|
|
31
29
|
"@atlaskit/datetime-picker": "^17.0.0",
|
|
32
30
|
"@atlaskit/dynamic-table": "^18.2.0",
|
|
33
|
-
"@atlaskit/empty-state": "^10.1.0",
|
|
34
31
|
"@atlaskit/form": "^12.0.0",
|
|
35
|
-
"@atlaskit/heading": "^5.2.0",
|
|
36
32
|
"@atlaskit/inline-edit": "^15.3.0",
|
|
37
|
-
"@atlaskit/lozenge": "^13.0.0",
|
|
38
33
|
"@atlaskit/modal-dialog": "^14.2.0",
|
|
39
34
|
"@atlaskit/popup": "^4.3.0",
|
|
40
35
|
"@atlaskit/primitives": "^14.10.0",
|
|
41
36
|
"@atlaskit/progress-bar": "^4.0.0",
|
|
42
|
-
"@atlaskit/progress-tracker": "^10.
|
|
37
|
+
"@atlaskit/progress-tracker": "^10.3.0",
|
|
43
38
|
"@atlaskit/radio": "^8.1.0",
|
|
44
|
-
"@atlaskit/range": "^9.1.0",
|
|
45
39
|
"@atlaskit/section-message": "^8.2.0",
|
|
46
|
-
"@atlaskit/select": "^21.
|
|
40
|
+
"@atlaskit/select": "^21.2.0",
|
|
47
41
|
"@atlaskit/spinner": "^18.0.0",
|
|
48
42
|
"@atlaskit/tabs": "^18.1.0",
|
|
49
43
|
"@atlaskit/tag": "^14.0.0",
|
|
@@ -51,7 +45,7 @@
|
|
|
51
45
|
"@atlaskit/textarea": "^8.0.0",
|
|
52
46
|
"@atlaskit/textfield": "^8.0.0",
|
|
53
47
|
"@atlaskit/toggle": "^15.0.0",
|
|
54
|
-
"@atlaskit/tokens": "^5.
|
|
48
|
+
"@atlaskit/tokens": "^5.5.0",
|
|
55
49
|
"@atlaskit/tooltip": "^20.3.0",
|
|
56
50
|
"@babel/runtime": "^7.0.0"
|
|
57
51
|
},
|
|
@@ -60,7 +54,7 @@
|
|
|
60
54
|
},
|
|
61
55
|
"devDependencies": {
|
|
62
56
|
"@atlassian/codegen": "^0.1.0",
|
|
63
|
-
"@atlassian/forge-ui": "^32.
|
|
57
|
+
"@atlassian/forge-ui": "^32.25.0",
|
|
64
58
|
"@types/node": "~20.16.5",
|
|
65
59
|
"lodash": "^4.17.21",
|
|
66
60
|
"react": "^18.2.0",
|