@atlaskit/flag 15.1.6 → 15.2.1
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 +16 -0
- package/auto-dismiss-flag/package.json +2 -2
- package/constants/package.json +2 -2
- package/dist/cjs/auto-dismiss-flag.js +1 -1
- package/dist/cjs/flag.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/auto-dismiss-flag.js +1 -1
- package/dist/es2019/flag.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/auto-dismiss-flag.js +1 -1
- package/dist/esm/flag.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/flag-actions.d.ts +1 -1
- package/dist/types/flag-group.d.ts +2 -2
- package/dist/types/flag-provider.d.ts +5 -5
- package/dist/types/internal/expander.d.ts +1 -1
- package/dist/types/theme.d.ts +1 -1
- package/dist/types/types.d.ts +5 -5
- package/flag/package.json +2 -2
- package/flag-actions/package.json +2 -2
- package/flag-group/package.json +2 -2
- package/flag-provider/package.json +2 -2
- package/package.json +26 -18
- package/theme/package.json +2 -2
- package/types/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/flag
|
|
2
2
|
|
|
3
|
+
## 15.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
8
|
+
|
|
9
|
+
## 15.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 15.1.6
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/constants/package.json
CHANGED
|
@@ -15,7 +15,7 @@ var _flagGroup = require("./flag-group");
|
|
|
15
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
var packageName = "@atlaskit/flag";
|
|
18
|
-
var packageVersion = "15.1
|
|
18
|
+
var packageVersion = "15.2.1";
|
|
19
19
|
var AUTO_DISMISS_SECONDS = 8;
|
|
20
20
|
|
|
21
21
|
/**
|
package/dist/cjs/flag.js
CHANGED
|
@@ -26,7 +26,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
26
26
|
var analyticsAttributes = {
|
|
27
27
|
componentName: 'flag',
|
|
28
28
|
packageName: "@atlaskit/flag",
|
|
29
|
-
packageVersion: "15.1
|
|
29
|
+
packageVersion: "15.2.1"
|
|
30
30
|
};
|
|
31
31
|
var transitionStyles = (0, _react2.css)({
|
|
32
32
|
flexGrow: 1,
|
package/dist/cjs/version.json
CHANGED
|
@@ -5,7 +5,7 @@ import noop from '@atlaskit/ds-lib/noop';
|
|
|
5
5
|
import Flag from './flag';
|
|
6
6
|
import { useFlagGroup } from './flag-group';
|
|
7
7
|
const packageName = "@atlaskit/flag";
|
|
8
|
-
const packageVersion = "15.1
|
|
8
|
+
const packageVersion = "15.2.1";
|
|
9
9
|
export const AUTO_DISMISS_SECONDS = 8;
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/es2019/flag.js
CHANGED
package/dist/es2019/version.json
CHANGED
|
@@ -5,7 +5,7 @@ import noop from '@atlaskit/ds-lib/noop';
|
|
|
5
5
|
import Flag from './flag';
|
|
6
6
|
import { useFlagGroup } from './flag-group';
|
|
7
7
|
var packageName = "@atlaskit/flag";
|
|
8
|
-
var packageVersion = "15.1
|
|
8
|
+
var packageVersion = "15.2.1";
|
|
9
9
|
export var AUTO_DISMISS_SECONDS = 8;
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/esm/flag.js
CHANGED
package/dist/esm/version.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ComponentType, FC } from 'react';
|
|
3
3
|
import type { CustomThemeButtonProps } from '@atlaskit/button/types';
|
|
4
4
|
import type { ActionsType, AppearanceTypes } from './types';
|
|
5
|
-
|
|
5
|
+
type FlagActionsProps = {
|
|
6
6
|
appearance: AppearanceTypes;
|
|
7
7
|
actions: ActionsType;
|
|
8
8
|
linkComponent?: ComponentType<CustomThemeButtonProps>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
|
-
|
|
5
|
+
type FlagGroupProps = {
|
|
6
6
|
/**
|
|
7
7
|
* ID attribute used for DOM selection.
|
|
8
8
|
*/
|
|
@@ -27,7 +27,7 @@ declare type FlagGroupProps = {
|
|
|
27
27
|
};
|
|
28
28
|
export declare const flagWidth: number;
|
|
29
29
|
export declare const flagAnimationTime = 400;
|
|
30
|
-
|
|
30
|
+
type FlagGroupAPI = {
|
|
31
31
|
onDismissed: (id: number | string, analyticsEvent: UIAnalyticsEvent) => void;
|
|
32
32
|
isDismissAllowed: boolean;
|
|
33
33
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FlagPropsWithoutId } from './types';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
type FlagId = string | number;
|
|
4
|
+
export type Combine<First, Second> = Omit<First, keyof Second> & Second;
|
|
5
5
|
export interface CreateFlagArgs extends FlagPropsWithoutId {
|
|
6
6
|
/**
|
|
7
7
|
* A unique identifier used for rendering and onDismissed callbacks.
|
|
@@ -14,11 +14,11 @@ export interface CreateFlagArgs extends FlagPropsWithoutId {
|
|
|
14
14
|
*/
|
|
15
15
|
isAutoDismiss?: boolean;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type FlagArgs = Combine<CreateFlagArgs, {
|
|
18
18
|
id: FlagId;
|
|
19
19
|
}>;
|
|
20
|
-
export
|
|
21
|
-
export
|
|
20
|
+
export type DismissFn = () => void;
|
|
21
|
+
export type FlagAPI = {
|
|
22
22
|
showFlag: (args: CreateFlagArgs) => DismissFn;
|
|
23
23
|
};
|
|
24
24
|
/**
|
package/dist/types/theme.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const flagTextColorToken: {
|
|
|
10
10
|
success: "var(--ds-text-inverse)";
|
|
11
11
|
warning: "var(--ds-text-warning-inverse)";
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type ActionBackgroundColor = Record<Exclude<AppearanceTypes, 'normal'>, {
|
|
14
14
|
default: 'var(--ds-background-inverse-subtle)';
|
|
15
15
|
active: 'var(--ds-background-inverse-subtle-pressed)';
|
|
16
16
|
pressed: 'var(--ds-background-inverse-subtle-hovered)';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { ComponentType, MouseEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent, WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
3
|
import { CustomThemeButtonProps } from '@atlaskit/button/types';
|
|
4
|
-
export
|
|
4
|
+
export type ActionType = {
|
|
5
5
|
content: ReactNode;
|
|
6
6
|
onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
7
7
|
href?: string;
|
|
8
8
|
target?: string;
|
|
9
9
|
testId?: string;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type ActionsType = Array<ActionType>;
|
|
12
|
+
export type AppearanceTypes = 'error' | 'info' | 'success' | 'warning' | 'normal';
|
|
13
13
|
export declare const AppearanceArray: AppearanceTypes[];
|
|
14
|
-
|
|
14
|
+
type FlagPropsId = {
|
|
15
15
|
/**
|
|
16
16
|
* A unique identifier used for rendering and onDismissed callbacks.
|
|
17
17
|
*/
|
|
18
18
|
id: number | string;
|
|
19
19
|
};
|
|
20
|
-
|
|
20
|
+
type AutoDismissFlagPropsWithoutId = {
|
|
21
21
|
/**
|
|
22
22
|
* Array of clickable actions to be shown at the bottom of the flag. For flags where appearance
|
|
23
23
|
* is 'normal', actions will be shown as links. For all other appearance values, actions will
|
package/flag/package.json
CHANGED
package/flag-group/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/flag",
|
|
3
|
-
"version": "15.1
|
|
3
|
+
"version": "15.2.1",
|
|
4
4
|
"description": "A flag is used for confirmations, alerts, and acknowledgments that require minimal user interaction, often displayed using a flag group.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.5 <4.9": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.5/*",
|
|
19
|
+
"dist/types-ts4.5/index.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
15
23
|
"sideEffects": false,
|
|
16
24
|
"atlaskit:src": "src/index.tsx",
|
|
17
25
|
"atlassian": {
|
|
@@ -34,18 +42,18 @@
|
|
|
34
42
|
"./types": "./src/types.tsx"
|
|
35
43
|
},
|
|
36
44
|
"dependencies": {
|
|
37
|
-
"@atlaskit/analytics-next": "^9.
|
|
38
|
-
"@atlaskit/button": "^16.
|
|
39
|
-
"@atlaskit/ds-explorations": "^2.
|
|
40
|
-
"@atlaskit/ds-lib": "^2.
|
|
41
|
-
"@atlaskit/focus-ring": "^1.
|
|
42
|
-
"@atlaskit/icon": "^21.
|
|
43
|
-
"@atlaskit/motion": "^1.
|
|
44
|
-
"@atlaskit/portal": "^4.
|
|
45
|
-
"@atlaskit/primitives": "^0.
|
|
46
|
-
"@atlaskit/theme": "^12.
|
|
47
|
-
"@atlaskit/tokens": "^1.
|
|
48
|
-
"@atlaskit/visually-hidden": "^1.
|
|
45
|
+
"@atlaskit/analytics-next": "^9.1.0",
|
|
46
|
+
"@atlaskit/button": "^16.7.0",
|
|
47
|
+
"@atlaskit/ds-explorations": "^2.1.0",
|
|
48
|
+
"@atlaskit/ds-lib": "^2.2.0",
|
|
49
|
+
"@atlaskit/focus-ring": "^1.3.0",
|
|
50
|
+
"@atlaskit/icon": "^21.12.0",
|
|
51
|
+
"@atlaskit/motion": "^1.4.0",
|
|
52
|
+
"@atlaskit/portal": "^4.3.0",
|
|
53
|
+
"@atlaskit/primitives": "^0.9.0",
|
|
54
|
+
"@atlaskit/theme": "^12.5.0",
|
|
55
|
+
"@atlaskit/tokens": "^1.4.0",
|
|
56
|
+
"@atlaskit/visually-hidden": "^1.2.0",
|
|
49
57
|
"@babel/runtime": "^7.0.0",
|
|
50
58
|
"@emotion/react": "^11.7.1"
|
|
51
59
|
},
|
|
@@ -54,11 +62,11 @@
|
|
|
54
62
|
},
|
|
55
63
|
"devDependencies": {
|
|
56
64
|
"@atlaskit/docs": "*",
|
|
57
|
-
"@atlaskit/radio": "^5.
|
|
58
|
-
"@atlaskit/section-message": "^6.
|
|
59
|
-
"@atlaskit/spinner": "^15.
|
|
65
|
+
"@atlaskit/radio": "^5.5.0",
|
|
66
|
+
"@atlaskit/section-message": "^6.4.0",
|
|
67
|
+
"@atlaskit/spinner": "^15.5.0",
|
|
60
68
|
"@atlaskit/ssr": "*",
|
|
61
|
-
"@atlaskit/theme": "^12.
|
|
69
|
+
"@atlaskit/theme": "^12.5.0",
|
|
62
70
|
"@atlaskit/visual-regression": "*",
|
|
63
71
|
"@atlaskit/webdriver-runner": "*",
|
|
64
72
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
@@ -67,7 +75,7 @@
|
|
|
67
75
|
"jest-emotion": "^10.0.32",
|
|
68
76
|
"react-dom": "^16.8.0",
|
|
69
77
|
"storybook-addon-performance": "^0.16.0",
|
|
70
|
-
"typescript": "4.
|
|
78
|
+
"typescript": "~4.9.5"
|
|
71
79
|
},
|
|
72
80
|
"keywords": [
|
|
73
81
|
"atlaskit",
|
package/theme/package.json
CHANGED