@atlaskit/flag 15.5.2 → 15.6.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 +1026 -1010
- package/README.md +2 -1
- package/__perf__/autodismiss.tsx +10 -10
- package/__perf__/default.tsx +10 -10
- package/__perf__/with-flag-group.tsx +11 -16
- package/dist/cjs/auto-dismiss-flag.js +1 -1
- package/dist/cjs/flag-actions.js +23 -4
- package/dist/cjs/flag-group.js +16 -2
- package/dist/cjs/flag.js +8 -3
- package/dist/cjs/internal/expander.js +2 -0
- package/dist/es2019/auto-dismiss-flag.js +1 -1
- package/dist/es2019/flag-actions.js +27 -4
- package/dist/es2019/flag-group.js +16 -2
- package/dist/es2019/flag.js +10 -2
- package/dist/es2019/internal/expander.js +2 -0
- package/dist/esm/auto-dismiss-flag.js +1 -1
- package/dist/esm/flag-actions.js +22 -4
- package/dist/esm/flag-group.js +16 -2
- package/dist/esm/flag.js +10 -2
- package/dist/esm/internal/expander.js +2 -0
- package/dist/types/auto-dismiss-flag.d.ts +1 -1
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/flag-actions.d.ts +4 -1
- package/dist/types/flag-group.d.ts +1 -1
- package/dist/types/flag.d.ts +4 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/internal/dismiss-button.d.ts +1 -1
- package/dist/types/theme.d.ts +2 -2
- package/dist/types/types.d.ts +3 -3
- package/dist/types-ts4.5/auto-dismiss-flag.d.ts +1 -1
- package/dist/types-ts4.5/constants.d.ts +1 -1
- package/dist/types-ts4.5/flag-actions.d.ts +4 -1
- package/dist/types-ts4.5/flag-group.d.ts +1 -1
- package/dist/types-ts4.5/flag.d.ts +4 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/internal/dismiss-button.d.ts +1 -1
- package/dist/types-ts4.5/theme.d.ts +2 -2
- package/dist/types-ts4.5/types.d.ts +3 -3
- package/extract-react-types/show-flag-args.tsx +2 -2
- package/package.json +108 -110
- package/report.api.md +39 -62
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/flag"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -33,43 +34,33 @@ export type ActionsType = Array<ActionType>;
|
|
|
33
34
|
|
|
34
35
|
// @public (undocumented)
|
|
35
36
|
type ActionType = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
href?: string;
|
|
42
|
-
target?: string;
|
|
43
|
-
testId?: string;
|
|
37
|
+
content: ReactNode;
|
|
38
|
+
onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
39
|
+
href?: string;
|
|
40
|
+
target?: string;
|
|
41
|
+
testId?: string;
|
|
44
42
|
};
|
|
45
43
|
|
|
46
44
|
// @public (undocumented)
|
|
47
|
-
export type AppearanceTypes =
|
|
48
|
-
| 'error'
|
|
49
|
-
| 'info'
|
|
50
|
-
| 'normal'
|
|
51
|
-
| 'success'
|
|
52
|
-
| 'warning';
|
|
45
|
+
export type AppearanceTypes = 'error' | 'info' | 'normal' | 'success' | 'warning';
|
|
53
46
|
|
|
54
47
|
// @public
|
|
55
48
|
export const AutoDismissFlag: (props: AutoDismissFlagProps) => JSX.Element;
|
|
56
49
|
|
|
57
50
|
// @public (undocumented)
|
|
58
|
-
interface AutoDismissFlagProps
|
|
59
|
-
extends AutoDismissFlagPropsWithoutId,
|
|
60
|
-
FlagPropsId {}
|
|
51
|
+
interface AutoDismissFlagProps extends AutoDismissFlagPropsWithoutId, FlagPropsId {}
|
|
61
52
|
|
|
62
53
|
// @public (undocumented)
|
|
63
54
|
type AutoDismissFlagPropsWithoutId = {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
55
|
+
actions?: ActionsType;
|
|
56
|
+
appearance?: AppearanceTypes;
|
|
57
|
+
description?: ReactNode;
|
|
58
|
+
icon: ReactNode;
|
|
59
|
+
title: ReactNode;
|
|
60
|
+
onDismissed?: (id: number | string, analyticsEvent: UIAnalyticsEvent) => void;
|
|
61
|
+
linkComponent?: ComponentType<CustomThemeButtonProps>;
|
|
62
|
+
testId?: string;
|
|
63
|
+
analyticsContext?: Record<string, any>;
|
|
73
64
|
};
|
|
74
65
|
|
|
75
66
|
// @public (undocumented)
|
|
@@ -77,8 +68,8 @@ type Combine<First, Second> = Omit<First, keyof Second> & Second;
|
|
|
77
68
|
|
|
78
69
|
// @public (undocumented)
|
|
79
70
|
export interface CreateFlagArgs extends FlagPropsWithoutId {
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
id?: FlagId;
|
|
72
|
+
isAutoDismiss?: boolean;
|
|
82
73
|
}
|
|
83
74
|
|
|
84
75
|
// @public (undocumented)
|
|
@@ -90,15 +81,15 @@ export default Flag;
|
|
|
90
81
|
|
|
91
82
|
// @public (undocumented)
|
|
92
83
|
export type FlagAPI = {
|
|
93
|
-
|
|
84
|
+
showFlag: (args: CreateFlagArgs) => DismissFn;
|
|
94
85
|
};
|
|
95
86
|
|
|
96
87
|
// @public (undocumented)
|
|
97
88
|
export type FlagArgs = Combine<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
CreateFlagArgs,
|
|
90
|
+
{
|
|
91
|
+
id: FlagId;
|
|
92
|
+
}
|
|
102
93
|
>;
|
|
103
94
|
|
|
104
95
|
// @public
|
|
@@ -106,11 +97,11 @@ export const FlagGroup: (props: FlagGroupProps) => jsx.JSX.Element;
|
|
|
106
97
|
|
|
107
98
|
// @public (undocumented)
|
|
108
99
|
type FlagGroupProps = {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
id?: string;
|
|
101
|
+
label?: string;
|
|
102
|
+
labelTag?: React.ElementType;
|
|
103
|
+
children?: Array<ReactElement> | ReactElement | boolean | null;
|
|
104
|
+
onDismissed?: (id: number | string, analyticsEvent: UIAnalyticsEvent) => void;
|
|
114
105
|
};
|
|
115
106
|
|
|
116
107
|
// @public (undocumented)
|
|
@@ -121,39 +112,25 @@ export interface FlagProps extends FlagPropsWithoutId, FlagPropsId {}
|
|
|
121
112
|
|
|
122
113
|
// @public (undocumented)
|
|
123
114
|
type FlagPropsId = {
|
|
124
|
-
|
|
115
|
+
id: number | string;
|
|
125
116
|
};
|
|
126
117
|
|
|
127
118
|
// @public (undocumented)
|
|
128
|
-
interface FlagPropsWithoutId
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
analyticsEvent: UIAnalyticsEvent,
|
|
134
|
-
) => void;
|
|
135
|
-
onFocus?: (
|
|
136
|
-
e: React.FocusEvent<HTMLElement>,
|
|
137
|
-
analyticsEvent: UIAnalyticsEvent,
|
|
138
|
-
) => void;
|
|
139
|
-
onMouseOut?: MouseEventHandler;
|
|
140
|
-
onMouseOver?: MouseEventHandler;
|
|
119
|
+
interface FlagPropsWithoutId extends AutoDismissFlagPropsWithoutId, WithAnalyticsEventsProps {
|
|
120
|
+
onBlur?: (e: React.FocusEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
121
|
+
onFocus?: (e: React.FocusEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
122
|
+
onMouseOut?: MouseEventHandler;
|
|
123
|
+
onMouseOver?: MouseEventHandler;
|
|
141
124
|
}
|
|
142
125
|
|
|
143
126
|
// @public (undocumented)
|
|
144
|
-
export function FlagsProvider({
|
|
145
|
-
children,
|
|
146
|
-
}: {
|
|
147
|
-
children: React_2.ReactNode;
|
|
148
|
-
}): JSX.Element;
|
|
127
|
+
export function FlagsProvider({ children }: { children: React_2.ReactNode }): JSX.Element;
|
|
149
128
|
|
|
150
129
|
// @public
|
|
151
130
|
export function useFlags(): FlagAPI;
|
|
152
131
|
|
|
153
132
|
// @public (undocumented)
|
|
154
|
-
export const withFlagsProvider: (
|
|
155
|
-
fn: () => React_2.ReactNode,
|
|
156
|
-
) => React_2.ReactNode;
|
|
133
|
+
export const withFlagsProvider: (fn: () => React_2.ReactNode) => React_2.ReactNode;
|
|
157
134
|
|
|
158
135
|
// (No @packageDocumentation comment for this package)
|
|
159
136
|
```
|
|
@@ -166,7 +143,7 @@ export const withFlagsProvider: (
|
|
|
166
143
|
|
|
167
144
|
```json
|
|
168
145
|
{
|
|
169
|
-
|
|
146
|
+
"react": "^16.8.0"
|
|
170
147
|
}
|
|
171
148
|
```
|
|
172
149
|
|