@atlaskit/flag 17.2.1 → 17.2.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 +8 -0
- package/dist/cjs/auto-dismiss-flag.js +1 -1
- package/dist/cjs/flag.js +1 -1
- package/dist/cjs/internal/dismiss-button.js +16 -24
- package/dist/es2019/auto-dismiss-flag.js +1 -1
- package/dist/es2019/flag.js +1 -1
- package/dist/es2019/internal/dismiss-button.js +16 -26
- package/dist/esm/auto-dismiss-flag.js +1 -1
- package/dist/esm/flag.js +1 -1
- package/dist/esm/internal/dismiss-button.js +17 -25
- package/dist/types/internal/dismiss-button.d.ts +2 -2
- package/dist/types-ts4.5/internal/dismiss-button.d.ts +2 -2
- package/package.json +2 -2
- package/dist/cjs/internal/dismiss-button.compiled.css +0 -15
- package/dist/es2019/internal/dismiss-button.compiled.css +0 -15
- package/dist/esm/internal/dismiss-button.compiled.css +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/flag
|
|
2
2
|
|
|
3
|
+
## 17.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#185048](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185048)
|
|
8
|
+
[`216bdb050fde5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/216bdb050fde5) -
|
|
9
|
+
Replaces custom dismiss button implementation with the default base button
|
|
10
|
+
|
|
3
11
|
## 17.2.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -14,7 +14,7 @@ var _flag = _interopRequireDefault(require("./flag"));
|
|
|
14
14
|
var _flagGroup = require("./flag-group");
|
|
15
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
16
|
var packageName = "@atlaskit/flag";
|
|
17
|
-
var packageVersion = "17.2.
|
|
17
|
+
var packageVersion = "17.2.1";
|
|
18
18
|
var AUTO_DISMISS_SECONDS = exports.AUTO_DISMISS_SECONDS = 8;
|
|
19
19
|
|
|
20
20
|
/**
|
package/dist/cjs/flag.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* dismiss-button.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -7,19 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
6
|
value: true
|
|
8
7
|
});
|
|
9
8
|
exports.default = void 0;
|
|
10
|
-
require("
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var
|
|
13
|
-
var _runtime = require("@compiled/react/runtime");
|
|
11
|
+
var _new = require("@atlaskit/button/new");
|
|
14
12
|
var _chevronDownHipchatChevronDown = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-down--hipchat-chevron-down"));
|
|
15
13
|
var _chevronUpHipchatChevronUp = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-up--hipchat-chevron-up"));
|
|
16
14
|
var _closeCross = _interopRequireDefault(require("@atlaskit/icon/core/migration/close--cross"));
|
|
17
|
-
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
15
|
var _theme = require("../theme");
|
|
19
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
20
|
-
var styles = {
|
|
21
|
-
button: "_16jlidpf _1o9zidpf _i0dl1wug _1dqoglyw _1e0c1txw _1bsb1tcg _4t3i1tcg _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _4cvr1h6o _1bah1h6o _80omtlke _o5721q9c"
|
|
22
|
-
};
|
|
23
17
|
var DismissButtonComponent = function DismissButtonComponent(_ref) {
|
|
24
18
|
var appearance = _ref.appearance,
|
|
25
19
|
onClick = _ref.onClick,
|
|
@@ -36,24 +30,22 @@ var DismissButtonComponent = function DismissButtonComponent(_ref) {
|
|
|
36
30
|
size = 'medium';
|
|
37
31
|
buttonTestId = testId && "".concat(testId, "-toggle");
|
|
38
32
|
}
|
|
39
|
-
return /*#__PURE__*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(_new.IconButton, {
|
|
34
|
+
icon: function icon(iconProps) {
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(ButtonIcon, (0, _extends2.default)({}, iconProps, {
|
|
36
|
+
LEGACY_size: size,
|
|
37
|
+
size: "small",
|
|
38
|
+
label: "",
|
|
39
|
+
color: _theme.flagTextColorToken[appearance]
|
|
40
|
+
}));
|
|
46
41
|
},
|
|
42
|
+
appearance: "subtle",
|
|
43
|
+
spacing: "compact",
|
|
44
|
+
label: buttonLabel,
|
|
45
|
+
onClick: onClick,
|
|
47
46
|
"aria-expanded": isBold ? isExpanded : undefined,
|
|
48
|
-
testId: buttonTestId
|
|
49
|
-
|
|
50
|
-
}, /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
51
|
-
label: "",
|
|
52
|
-
LEGACY_size: size,
|
|
53
|
-
LEGACY_primaryColor: _theme.flagTextColorToken[appearance],
|
|
54
|
-
color: _theme.flagTextColorToken[appearance],
|
|
55
|
-
size: "small"
|
|
56
|
-
}));
|
|
47
|
+
testId: buttonTestId
|
|
48
|
+
});
|
|
57
49
|
};
|
|
58
50
|
var DismissButton = /*#__PURE__*/(0, _react.memo)(DismissButtonComponent);
|
|
59
51
|
|
|
@@ -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 = "17.2.
|
|
8
|
+
const packageVersion = "17.2.1";
|
|
9
9
|
export const AUTO_DISMISS_SECONDS = 8;
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/es2019/flag.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { memo } from 'react';
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { memo } from 'react';
|
|
3
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
6
4
|
import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down--hipchat-chevron-down';
|
|
7
5
|
import ChevronUpIcon from '@atlaskit/icon/core/migration/chevron-up--hipchat-chevron-up';
|
|
8
6
|
import CloseIcon from '@atlaskit/icon/core/migration/close--cross';
|
|
9
|
-
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
10
7
|
import { flagTextColorToken } from '../theme';
|
|
11
|
-
const styles = {
|
|
12
|
-
button: "_16jlidpf _1o9zidpf _i0dl1wug _1dqoglyw _1e0c1txw _1bsb1tcg _4t3i1tcg _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _4cvr1h6o _1bah1h6o _80omtlke _o5721q9c"
|
|
13
|
-
};
|
|
14
8
|
const DismissButtonComponent = ({
|
|
15
9
|
appearance,
|
|
16
10
|
onClick,
|
|
@@ -28,24 +22,20 @@ const DismissButtonComponent = ({
|
|
|
28
22
|
size = 'medium';
|
|
29
23
|
buttonTestId = testId && `${testId}-toggle`;
|
|
30
24
|
}
|
|
31
|
-
return /*#__PURE__*/React.createElement(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
26
|
+
icon: iconProps => /*#__PURE__*/React.createElement(ButtonIcon, _extends({}, iconProps, {
|
|
27
|
+
LEGACY_size: size,
|
|
28
|
+
size: "small",
|
|
29
|
+
label: "",
|
|
30
|
+
color: flagTextColorToken[appearance]
|
|
31
|
+
})),
|
|
32
|
+
appearance: "subtle",
|
|
33
|
+
spacing: "compact",
|
|
34
|
+
label: buttonLabel,
|
|
35
|
+
onClick: onClick,
|
|
39
36
|
"aria-expanded": isBold ? isExpanded : undefined,
|
|
40
|
-
testId: buttonTestId
|
|
41
|
-
|
|
42
|
-
}, /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
43
|
-
label: "",
|
|
44
|
-
LEGACY_size: size,
|
|
45
|
-
LEGACY_primaryColor: flagTextColorToken[appearance],
|
|
46
|
-
color: flagTextColorToken[appearance],
|
|
47
|
-
size: "small"
|
|
48
|
-
}));
|
|
37
|
+
testId: buttonTestId
|
|
38
|
+
});
|
|
49
39
|
};
|
|
50
40
|
const DismissButton = /*#__PURE__*/memo(DismissButtonComponent);
|
|
51
41
|
|
|
@@ -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 = "17.2.
|
|
8
|
+
var packageVersion = "17.2.1";
|
|
9
9
|
export var AUTO_DISMISS_SECONDS = 8;
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/esm/flag.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { memo } from 'react';
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { memo } from 'react';
|
|
3
|
+
import { IconButton } from '@atlaskit/button/new';
|
|
6
4
|
import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down--hipchat-chevron-down';
|
|
7
5
|
import ChevronUpIcon from '@atlaskit/icon/core/migration/chevron-up--hipchat-chevron-up';
|
|
8
6
|
import CloseIcon from '@atlaskit/icon/core/migration/close--cross';
|
|
9
|
-
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
10
7
|
import { flagTextColorToken } from '../theme';
|
|
11
|
-
var styles = {
|
|
12
|
-
button: "_16jlidpf _1o9zidpf _i0dl1wug _1dqoglyw _1e0c1txw _1bsb1tcg _4t3i1tcg _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _4cvr1h6o _1bah1h6o _80omtlke _o5721q9c"
|
|
13
|
-
};
|
|
14
8
|
var DismissButtonComponent = function DismissButtonComponent(_ref) {
|
|
15
9
|
var appearance = _ref.appearance,
|
|
16
10
|
onClick = _ref.onClick,
|
|
@@ -27,24 +21,22 @@ var DismissButtonComponent = function DismissButtonComponent(_ref) {
|
|
|
27
21
|
size = 'medium';
|
|
28
22
|
buttonTestId = testId && "".concat(testId, "-toggle");
|
|
29
23
|
}
|
|
30
|
-
return /*#__PURE__*/React.createElement(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
25
|
+
icon: function icon(iconProps) {
|
|
26
|
+
return /*#__PURE__*/React.createElement(ButtonIcon, _extends({}, iconProps, {
|
|
27
|
+
LEGACY_size: size,
|
|
28
|
+
size: "small",
|
|
29
|
+
label: "",
|
|
30
|
+
color: flagTextColorToken[appearance]
|
|
31
|
+
}));
|
|
37
32
|
},
|
|
33
|
+
appearance: "subtle",
|
|
34
|
+
spacing: "compact",
|
|
35
|
+
label: buttonLabel,
|
|
36
|
+
onClick: onClick,
|
|
38
37
|
"aria-expanded": isBold ? isExpanded : undefined,
|
|
39
|
-
testId: buttonTestId
|
|
40
|
-
|
|
41
|
-
}, /*#__PURE__*/React.createElement(ButtonIcon, {
|
|
42
|
-
label: "",
|
|
43
|
-
LEGACY_size: size,
|
|
44
|
-
LEGACY_primaryColor: flagTextColorToken[appearance],
|
|
45
|
-
color: flagTextColorToken[appearance],
|
|
46
|
-
size: "small"
|
|
47
|
-
}));
|
|
38
|
+
testId: buttonTestId
|
|
39
|
+
});
|
|
48
40
|
};
|
|
49
41
|
var DismissButton = /*#__PURE__*/memo(DismissButtonComponent);
|
|
50
42
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type AppearanceTypes } from '../types';
|
|
3
3
|
interface DismissButtonProps {
|
|
4
4
|
appearance: AppearanceTypes;
|
|
@@ -7,5 +7,5 @@ interface DismissButtonProps {
|
|
|
7
7
|
isBold: boolean;
|
|
8
8
|
testId?: string;
|
|
9
9
|
}
|
|
10
|
-
declare const DismissButton:
|
|
10
|
+
declare const DismissButton: React.MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId, }: DismissButtonProps) => React.JSX.Element>;
|
|
11
11
|
export default DismissButton;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type AppearanceTypes } from '../types';
|
|
3
3
|
interface DismissButtonProps {
|
|
4
4
|
appearance: AppearanceTypes;
|
|
@@ -7,5 +7,5 @@ interface DismissButtonProps {
|
|
|
7
7
|
isBold: boolean;
|
|
8
8
|
testId?: string;
|
|
9
9
|
}
|
|
10
|
-
declare const DismissButton:
|
|
10
|
+
declare const DismissButton: React.MemoExoticComponent<({ appearance, onClick, isBold, isExpanded, testId, }: DismissButtonProps) => React.JSX.Element>;
|
|
11
11
|
export default DismissButton;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/flag",
|
|
3
|
-
"version": "17.2.
|
|
3
|
+
"version": "17.2.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/"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/portal": "^5.1.0",
|
|
55
55
|
"@atlaskit/primitives": "^14.10.0",
|
|
56
56
|
"@atlaskit/theme": "^19.0.0",
|
|
57
|
-
"@atlaskit/tokens": "^5.
|
|
57
|
+
"@atlaskit/tokens": "^5.5.0",
|
|
58
58
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
59
59
|
"@babel/runtime": "^7.0.0",
|
|
60
60
|
"@compiled/react": "^0.18.3"
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
._1dqoglyw{border-style:none}._16jlidpf{flex-grow:0}
|
|
3
|
-
._19bvze3t{padding-left:var(--ds-space-0,0)}
|
|
4
|
-
._1bah1h6o{justify-content:center}
|
|
5
|
-
._1bsb1tcg{width:24px}
|
|
6
|
-
._1e0c1txw{display:flex}
|
|
7
|
-
._1o9zidpf{flex-shrink:0}
|
|
8
|
-
._4cvr1h6o{align-items:center}
|
|
9
|
-
._4t3i1tcg{height:24px}
|
|
10
|
-
._80omtlke{cursor:pointer}
|
|
11
|
-
._ca0qze3t{padding-top:var(--ds-space-0,0)}
|
|
12
|
-
._i0dl1wug{flex-basis:auto}
|
|
13
|
-
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
14
|
-
._o5721q9c{white-space:nowrap}
|
|
15
|
-
._u5f3ze3t{padding-right:var(--ds-space-0,0)}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
._1dqoglyw{border-style:none}._16jlidpf{flex-grow:0}
|
|
3
|
-
._19bvze3t{padding-left:var(--ds-space-0,0)}
|
|
4
|
-
._1bah1h6o{justify-content:center}
|
|
5
|
-
._1bsb1tcg{width:24px}
|
|
6
|
-
._1e0c1txw{display:flex}
|
|
7
|
-
._1o9zidpf{flex-shrink:0}
|
|
8
|
-
._4cvr1h6o{align-items:center}
|
|
9
|
-
._4t3i1tcg{height:24px}
|
|
10
|
-
._80omtlke{cursor:pointer}
|
|
11
|
-
._ca0qze3t{padding-top:var(--ds-space-0,0)}
|
|
12
|
-
._i0dl1wug{flex-basis:auto}
|
|
13
|
-
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
14
|
-
._o5721q9c{white-space:nowrap}
|
|
15
|
-
._u5f3ze3t{padding-right:var(--ds-space-0,0)}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
._1dqoglyw{border-style:none}._16jlidpf{flex-grow:0}
|
|
3
|
-
._19bvze3t{padding-left:var(--ds-space-0,0)}
|
|
4
|
-
._1bah1h6o{justify-content:center}
|
|
5
|
-
._1bsb1tcg{width:24px}
|
|
6
|
-
._1e0c1txw{display:flex}
|
|
7
|
-
._1o9zidpf{flex-shrink:0}
|
|
8
|
-
._4cvr1h6o{align-items:center}
|
|
9
|
-
._4t3i1tcg{height:24px}
|
|
10
|
-
._80omtlke{cursor:pointer}
|
|
11
|
-
._ca0qze3t{padding-top:var(--ds-space-0,0)}
|
|
12
|
-
._i0dl1wug{flex-basis:auto}
|
|
13
|
-
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
14
|
-
._o5721q9c{white-space:nowrap}
|
|
15
|
-
._u5f3ze3t{padding-right:var(--ds-space-0,0)}
|