@atlaskit/flag 15.9.0 → 15.9.2
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 +12 -0
- package/dist/cjs/auto-dismiss-flag.js +1 -1
- package/dist/cjs/flag-group.js +8 -7
- package/dist/cjs/flag.js +1 -1
- package/dist/es2019/auto-dismiss-flag.js +1 -1
- package/dist/es2019/flag-group.js +7 -6
- package/dist/es2019/flag.js +1 -1
- package/dist/esm/auto-dismiss-flag.js +1 -1
- package/dist/esm/flag-group.js +7 -6
- package/dist/esm/flag.js +1 -1
- package/dist/types/auto-dismiss-flag.d.ts +2 -2
- package/dist/types/flag-group.d.ts +4 -1
- package/dist/types/flag-provider.d.ts +1 -1
- package/dist/types/internal/dismiss-button.d.ts +1 -1
- package/dist/types/internal/expander.d.ts +1 -1
- package/dist/types-ts4.5/auto-dismiss-flag.d.ts +2 -2
- package/dist/types-ts4.5/flag-group.d.ts +4 -1
- package/dist/types-ts4.5/flag-provider.d.ts +1 -1
- package/dist/types-ts4.5/internal/dismiss-button.d.ts +1 -1
- package/dist/types-ts4.5/internal/expander.d.ts +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -15,7 +15,7 @@ var _flagGroup = require("./flag-group");
|
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
17
|
var packageName = "@atlaskit/flag";
|
|
18
|
-
var packageVersion = "15.9.
|
|
18
|
+
var packageVersion = "15.9.2";
|
|
19
19
|
var AUTO_DISMISS_SECONDS = exports.AUTO_DISMISS_SECONDS = 8;
|
|
20
20
|
|
|
21
21
|
/**
|
package/dist/cjs/flag-group.js
CHANGED
|
@@ -4,16 +4,16 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.flagWidth = exports.
|
|
7
|
+
exports.flagWidth = exports.default = exports.FlagGroupContext = void 0;
|
|
8
8
|
exports.useFlagGroup = useFlagGroup;
|
|
9
9
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
|
-
var _motion = require("@atlaskit/motion");
|
|
13
|
-
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
14
12
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
13
|
+
var _motion = require("@atlaskit/motion");
|
|
15
14
|
var _portal = _interopRequireDefault(require("@atlaskit/portal"));
|
|
16
15
|
var _constants = require("@atlaskit/theme/constants");
|
|
16
|
+
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
17
17
|
/**
|
|
18
18
|
* @jsxRuntime classic
|
|
19
19
|
* @jsx jsx
|
|
@@ -25,7 +25,6 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
25
25
|
|
|
26
26
|
var gridSize = (0, _constants.gridSize)();
|
|
27
27
|
var flagWidth = exports.flagWidth = gridSize * 50;
|
|
28
|
-
var flagAnimationTime = exports.flagAnimationTime = 400;
|
|
29
28
|
var defaultFlagGroupContext = {
|
|
30
29
|
onDismissed: _noop.default,
|
|
31
30
|
isDismissAllowed: false
|
|
@@ -46,7 +45,8 @@ var baseStyles = (0, _react2.css)({
|
|
|
46
45
|
width: flagWidth,
|
|
47
46
|
position: 'absolute',
|
|
48
47
|
insetBlockEnd: 0,
|
|
49
|
-
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
49
|
+
transition: "transform ".concat(_motion.durations.medium, "ms ease-in-out"),
|
|
50
50
|
// TODO: Use new breakpoints
|
|
51
51
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
52
52
|
'@media (max-width: 560px)': {
|
|
@@ -83,7 +83,8 @@ var dismissAllowedStyles = (0, _react2.css)({
|
|
|
83
83
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
84
84
|
'&& + *': {
|
|
85
85
|
transform: "translate(0, 0)",
|
|
86
|
-
|
|
86
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
87
|
+
transitionDuration: "".concat(_motion.exitingDurations.medium, "ms")
|
|
87
88
|
}
|
|
88
89
|
});
|
|
89
90
|
var flagGroupContainerStyles = (0, _react2.css)({
|
|
@@ -131,7 +132,7 @@ var FlagGroup = function FlagGroup(props) {
|
|
|
131
132
|
return (0, _react2.jsx)(_motion.SlideIn, {
|
|
132
133
|
enterFrom: "left",
|
|
133
134
|
fade: "inout",
|
|
134
|
-
duration:
|
|
135
|
+
duration: "medium",
|
|
135
136
|
animationTimingFunction: function animationTimingFunction() {
|
|
136
137
|
return _motion.easeIn;
|
|
137
138
|
}
|
package/dist/cjs/flag.js
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.9.
|
|
8
|
+
const packageVersion = "15.9.2";
|
|
9
9
|
export const AUTO_DISMISS_SECONDS = 8;
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -7,15 +7,14 @@ import { Children, createContext, useContext, useMemo } from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import { easeIn, ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
11
|
-
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
12
10
|
import noop from '@atlaskit/ds-lib/noop';
|
|
11
|
+
import { durations, easeIn, exitingDurations, ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
13
12
|
import Portal from '@atlaskit/portal';
|
|
14
13
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
15
14
|
import { gridSize as getGridSize, layers } from '@atlaskit/theme/constants';
|
|
15
|
+
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
16
16
|
const gridSize = getGridSize();
|
|
17
17
|
export const flagWidth = gridSize * 50;
|
|
18
|
-
export const flagAnimationTime = 400;
|
|
19
18
|
const defaultFlagGroupContext = {
|
|
20
19
|
onDismissed: noop,
|
|
21
20
|
isDismissAllowed: false
|
|
@@ -36,7 +35,8 @@ const baseStyles = css({
|
|
|
36
35
|
width: flagWidth,
|
|
37
36
|
position: 'absolute',
|
|
38
37
|
insetBlockEnd: 0,
|
|
39
|
-
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
39
|
+
transition: `transform ${durations.medium}ms ease-in-out`,
|
|
40
40
|
// TODO: Use new breakpoints
|
|
41
41
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
42
42
|
'@media (max-width: 560px)': {
|
|
@@ -73,7 +73,8 @@ const dismissAllowedStyles = css({
|
|
|
73
73
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
74
74
|
'&& + *': {
|
|
75
75
|
transform: `translate(0, 0)`,
|
|
76
|
-
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
77
|
+
transitionDuration: `${exitingDurations.medium}ms`
|
|
77
78
|
}
|
|
78
79
|
});
|
|
79
80
|
const flagGroupContainerStyles = css({
|
|
@@ -117,7 +118,7 @@ const FlagGroup = props => {
|
|
|
117
118
|
return jsx(SlideIn, {
|
|
118
119
|
enterFrom: "left",
|
|
119
120
|
fade: "inout",
|
|
120
|
-
duration:
|
|
121
|
+
duration: "medium",
|
|
121
122
|
animationTimingFunction: () => easeIn
|
|
122
123
|
}, ({
|
|
123
124
|
className,
|
package/dist/es2019/flag.js
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.9.
|
|
8
|
+
var packageVersion = "15.9.2";
|
|
9
9
|
export var AUTO_DISMISS_SECONDS = 8;
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/esm/flag-group.js
CHANGED
|
@@ -8,15 +8,14 @@ import { Children, createContext, useContext, useMemo } from 'react';
|
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
|
-
import { easeIn, ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
12
|
-
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
13
11
|
import noop from '@atlaskit/ds-lib/noop';
|
|
12
|
+
import { durations, easeIn, exitingDurations, ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
14
13
|
import Portal from '@atlaskit/portal';
|
|
15
14
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
16
15
|
import { gridSize as getGridSize, layers } from '@atlaskit/theme/constants';
|
|
16
|
+
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
17
17
|
var gridSize = getGridSize();
|
|
18
18
|
export var flagWidth = gridSize * 50;
|
|
19
|
-
export var flagAnimationTime = 400;
|
|
20
19
|
var defaultFlagGroupContext = {
|
|
21
20
|
onDismissed: noop,
|
|
22
21
|
isDismissAllowed: false
|
|
@@ -37,7 +36,8 @@ var baseStyles = css({
|
|
|
37
36
|
width: flagWidth,
|
|
38
37
|
position: 'absolute',
|
|
39
38
|
insetBlockEnd: 0,
|
|
40
|
-
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
40
|
+
transition: "transform ".concat(durations.medium, "ms ease-in-out"),
|
|
41
41
|
// TODO: Use new breakpoints
|
|
42
42
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
43
43
|
'@media (max-width: 560px)': {
|
|
@@ -74,7 +74,8 @@ var dismissAllowedStyles = css({
|
|
|
74
74
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
75
75
|
'&& + *': {
|
|
76
76
|
transform: "translate(0, 0)",
|
|
77
|
-
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
78
|
+
transitionDuration: "".concat(exitingDurations.medium, "ms")
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
var flagGroupContainerStyles = css({
|
|
@@ -122,7 +123,7 @@ var FlagGroup = function FlagGroup(props) {
|
|
|
122
123
|
return jsx(SlideIn, {
|
|
123
124
|
enterFrom: "left",
|
|
124
125
|
fade: "inout",
|
|
125
|
-
duration:
|
|
126
|
+
duration: "medium",
|
|
126
127
|
animationTimingFunction: function animationTimingFunction() {
|
|
127
128
|
return easeIn;
|
|
128
129
|
}
|
package/dist/esm/flag.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type AutoDismissFlagProps } from './types';
|
|
3
3
|
export declare const AUTO_DISMISS_SECONDS = 8;
|
|
4
4
|
/**
|
|
@@ -9,5 +9,5 @@ export declare const AUTO_DISMISS_SECONDS = 8;
|
|
|
9
9
|
* - [Examples](https://atlassian.design/components/flag/auto-dismiss-flag/examples)
|
|
10
10
|
* - [Code](https://atlassian.design/components/flag/auto-dismiss-flag/code)
|
|
11
11
|
*/
|
|
12
|
-
declare const AutoDismissFlag: (props: AutoDismissFlagProps) => JSX.Element;
|
|
12
|
+
declare const AutoDismissFlag: (props: AutoDismissFlagProps) => React.JSX.Element;
|
|
13
13
|
export default AutoDismissFlag;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
1
5
|
import { type ReactElement } from 'react';
|
|
2
6
|
import { jsx } from '@emotion/react';
|
|
3
7
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
@@ -31,7 +35,6 @@ type FlagGroupProps = {
|
|
|
31
35
|
shouldRenderToParent?: boolean;
|
|
32
36
|
};
|
|
33
37
|
export declare const flagWidth: number;
|
|
34
|
-
export declare const flagAnimationTime = 400;
|
|
35
38
|
type FlagGroupAPI = {
|
|
36
39
|
onDismissed: (id: number | string, analyticsEvent: UIAnalyticsEvent) => void;
|
|
37
40
|
isDismissAllowed: boolean;
|
|
@@ -29,6 +29,6 @@ export declare function useFlags(): FlagAPI;
|
|
|
29
29
|
export declare function FlagsProvider({ children, shouldRenderToParent, }: {
|
|
30
30
|
children: React.ReactNode;
|
|
31
31
|
shouldRenderToParent?: boolean;
|
|
32
|
-
}): JSX.Element;
|
|
32
|
+
}): React.JSX.Element;
|
|
33
33
|
export declare const withFlagsProvider: (fn: () => React.ReactNode) => React.ReactNode;
|
|
34
34
|
export {};
|
|
@@ -7,5 +7,5 @@ interface DismissButtonProps {
|
|
|
7
7
|
isBold: boolean;
|
|
8
8
|
testId?: string;
|
|
9
9
|
}
|
|
10
|
-
declare const DismissButton: React.MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId, }: DismissButtonProps) => JSX.Element>;
|
|
10
|
+
declare const DismissButton: React.MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId, }: DismissButtonProps) => React.JSX.Element>;
|
|
11
11
|
export default DismissButton;
|
|
@@ -4,5 +4,5 @@ type ExpanderProps = {
|
|
|
4
4
|
testId?: string;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
};
|
|
7
|
-
declare const Expander: ({ children, isExpanded, testId }: ExpanderProps) => JSX.Element;
|
|
7
|
+
declare const Expander: ({ children, isExpanded, testId }: ExpanderProps) => React.JSX.Element;
|
|
8
8
|
export default Expander;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type AutoDismissFlagProps } from './types';
|
|
3
3
|
export declare const AUTO_DISMISS_SECONDS = 8;
|
|
4
4
|
/**
|
|
@@ -9,5 +9,5 @@ export declare const AUTO_DISMISS_SECONDS = 8;
|
|
|
9
9
|
* - [Examples](https://atlassian.design/components/flag/auto-dismiss-flag/examples)
|
|
10
10
|
* - [Code](https://atlassian.design/components/flag/auto-dismiss-flag/code)
|
|
11
11
|
*/
|
|
12
|
-
declare const AutoDismissFlag: (props: AutoDismissFlagProps) => JSX.Element;
|
|
12
|
+
declare const AutoDismissFlag: (props: AutoDismissFlagProps) => React.JSX.Element;
|
|
13
13
|
export default AutoDismissFlag;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
1
5
|
import { type ReactElement } from 'react';
|
|
2
6
|
import { jsx } from '@emotion/react';
|
|
3
7
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
@@ -31,7 +35,6 @@ type FlagGroupProps = {
|
|
|
31
35
|
shouldRenderToParent?: boolean;
|
|
32
36
|
};
|
|
33
37
|
export declare const flagWidth: number;
|
|
34
|
-
export declare const flagAnimationTime = 400;
|
|
35
38
|
type FlagGroupAPI = {
|
|
36
39
|
onDismissed: (id: number | string, analyticsEvent: UIAnalyticsEvent) => void;
|
|
37
40
|
isDismissAllowed: boolean;
|
|
@@ -29,6 +29,6 @@ export declare function useFlags(): FlagAPI;
|
|
|
29
29
|
export declare function FlagsProvider({ children, shouldRenderToParent, }: {
|
|
30
30
|
children: React.ReactNode;
|
|
31
31
|
shouldRenderToParent?: boolean;
|
|
32
|
-
}): JSX.Element;
|
|
32
|
+
}): React.JSX.Element;
|
|
33
33
|
export declare const withFlagsProvider: (fn: () => React.ReactNode) => React.ReactNode;
|
|
34
34
|
export {};
|
|
@@ -7,5 +7,5 @@ interface DismissButtonProps {
|
|
|
7
7
|
isBold: boolean;
|
|
8
8
|
testId?: string;
|
|
9
9
|
}
|
|
10
|
-
declare const DismissButton: React.MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId, }: DismissButtonProps) => JSX.Element>;
|
|
10
|
+
declare const DismissButton: React.MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId, }: DismissButtonProps) => React.JSX.Element>;
|
|
11
11
|
export default DismissButton;
|
|
@@ -4,5 +4,5 @@ type ExpanderProps = {
|
|
|
4
4
|
testId?: string;
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
};
|
|
7
|
-
declare const Expander: ({ children, isExpanded, testId }: ExpanderProps) => JSX.Element;
|
|
7
|
+
declare const Expander: ({ children, isExpanded, testId }: ExpanderProps) => React.JSX.Element;
|
|
8
8
|
export default Expander;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/flag",
|
|
3
|
-
"version": "15.9.
|
|
3
|
+
"version": "15.9.2",
|
|
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/"
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@atlaskit/analytics-next": "^10.3.0",
|
|
48
|
-
"@atlaskit/button": "^20.
|
|
48
|
+
"@atlaskit/button": "^20.5.0",
|
|
49
49
|
"@atlaskit/ds-lib": "^3.5.0",
|
|
50
50
|
"@atlaskit/heading": "^4.1.0",
|
|
51
|
-
"@atlaskit/icon": "^23.
|
|
52
|
-
"@atlaskit/motion": "^
|
|
51
|
+
"@atlaskit/icon": "^23.8.0",
|
|
52
|
+
"@atlaskit/motion": "^2.0.0",
|
|
53
53
|
"@atlaskit/portal": "^4.11.0",
|
|
54
|
-
"@atlaskit/primitives": "^13.
|
|
55
|
-
"@atlaskit/theme": "^
|
|
54
|
+
"@atlaskit/primitives": "^13.5.0",
|
|
55
|
+
"@atlaskit/theme": "^15.0.0",
|
|
56
56
|
"@atlaskit/tokens": "^3.3.0",
|
|
57
57
|
"@atlaskit/visually-hidden": "^1.6.0",
|
|
58
58
|
"@babel/runtime": "^7.0.0",
|