@atlaskit/flag 14.3.4 → 14.5.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 +47 -0
- package/__perf__/withFlagGroup.tsx +7 -1
- package/dist/cjs/auto-dismiss-flag.js +1 -1
- package/dist/cjs/flag-group.js +1 -1
- package/dist/cjs/flag-provider.js +1 -1
- package/dist/cjs/flag.js +32 -35
- package/dist/cjs/index.js +12 -12
- package/dist/cjs/theme.js +84 -60
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/auto-dismiss-flag.js +1 -1
- package/dist/es2019/flag.js +74 -56
- package/dist/es2019/theme.js +78 -53
- package/dist/es2019/version.json +1 -1
- package/dist/esm/auto-dismiss-flag.js +1 -1
- package/dist/esm/flag.js +33 -35
- package/dist/esm/theme.js +80 -53
- package/dist/esm/version.json +1 -1
- package/dist/types/auto-dismiss-flag.d.ts +1 -0
- package/dist/types/flag.d.ts +1 -0
- package/dist/types/theme.d.ts +2 -1
- package/package.json +12 -11
- package/dist/cjs/utils.js +0 -24
- package/dist/es2019/utils.js +0 -15
- package/dist/esm/utils.js +0 -15
- package/dist/types/utils.d.ts +0 -2
- package/utils/package.json +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @atlaskit/flag
|
|
2
2
|
|
|
3
|
+
## 14.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`c04528ade6a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c04528ade6a) - **Note**: It is a re-release of the wrongly `patched` version `14.4.2` that should have been a `minor` release.
|
|
8
|
+
|
|
9
|
+
[ux] Instrumented flag with the new theming package, `@atlaskit/tokens`.
|
|
10
|
+
|
|
11
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
12
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
18
|
+
## 14.4.2
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
_WRONG RELEASE TYPE - DON'T USE_
|
|
23
|
+
|
|
24
|
+
- [`4567d73813c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4567d73813c) - Instrumented flag with the new theming package, `@atlaskit/tokens`.
|
|
25
|
+
|
|
26
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
27
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- [`f460cc7c411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f460cc7c411) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving bundle size.
|
|
32
|
+
- Updated dependencies
|
|
33
|
+
|
|
34
|
+
## 14.4.1
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies
|
|
39
|
+
|
|
40
|
+
## 14.4.0
|
|
41
|
+
|
|
42
|
+
### Minor Changes
|
|
43
|
+
|
|
44
|
+
- [`230e1862182`](https://bitbucket.org/atlassian/atlassian-frontend/commits/230e1862182) - Fix a11y eslint error in Flag component
|
|
45
|
+
|
|
46
|
+
### Patch Changes
|
|
47
|
+
|
|
48
|
+
- Updated dependencies
|
|
49
|
+
|
|
3
50
|
## 14.3.4
|
|
4
51
|
|
|
5
52
|
### Patch Changes
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import SuccessIcon from '@atlaskit/icon/glyph/check-circle';
|
|
4
4
|
import { G400 } from '@atlaskit/theme/colors';
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
|
|
6
7
|
import Flag, { FlagGroup } from '../src';
|
|
7
8
|
|
|
@@ -9,7 +10,12 @@ export default () => (
|
|
|
9
10
|
<FlagGroup>
|
|
10
11
|
<Flag
|
|
11
12
|
appearance="success"
|
|
12
|
-
icon={
|
|
13
|
+
icon={
|
|
14
|
+
<SuccessIcon
|
|
15
|
+
label="Success"
|
|
16
|
+
secondaryColor={token('color.iconBorder.success', G400)}
|
|
17
|
+
/>
|
|
18
|
+
}
|
|
13
19
|
id="success"
|
|
14
20
|
key="success"
|
|
15
21
|
title="Connected"
|
|
@@ -24,7 +24,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
24
24
|
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; }
|
|
25
25
|
|
|
26
26
|
var packageName = "@atlaskit/flag";
|
|
27
|
-
var packageVersion = "14.
|
|
27
|
+
var packageVersion = "14.5.0";
|
|
28
28
|
var AUTO_DISMISS_SECONDS = 8;
|
|
29
29
|
exports.AUTO_DISMISS_SECONDS = AUTO_DISMISS_SECONDS;
|
|
30
30
|
|
package/dist/cjs/flag-group.js
CHANGED
|
@@ -5,8 +5,8 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
exports.flagWidth = exports.flagAnimationTime = exports.default = exports.FlagGroupContext = void 0;
|
|
8
9
|
exports.useFlagGroup = useFlagGroup;
|
|
9
|
-
exports.default = exports.FlagGroupContext = exports.flagAnimationTime = exports.flagWidth = void 0;
|
|
10
10
|
|
|
11
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
12
|
|
|
@@ -7,8 +7,8 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.useFlags = useFlags;
|
|
11
10
|
exports.FlagsProvider = FlagsProvider;
|
|
11
|
+
exports.useFlags = useFlags;
|
|
12
12
|
exports.withFlagsProvider = void 0;
|
|
13
13
|
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
package/dist/cjs/flag.js
CHANGED
|
@@ -41,9 +41,7 @@ var _flagActions = _interopRequireDefault(require("./flag-actions"));
|
|
|
41
41
|
|
|
42
42
|
var _flagGroup = require("./flag-group");
|
|
43
43
|
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
44
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
47
45
|
|
|
48
46
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
49
47
|
|
|
@@ -54,7 +52,7 @@ function noop() {}
|
|
|
54
52
|
var analyticsAttributes = {
|
|
55
53
|
componentName: 'flag',
|
|
56
54
|
packageName: "@atlaskit/flag",
|
|
57
|
-
packageVersion: "14.
|
|
55
|
+
packageVersion: "14.5.0"
|
|
58
56
|
};
|
|
59
57
|
var gridSize = (0, _constants.gridSize)();
|
|
60
58
|
var doubleGridSize = gridSize * 2;
|
|
@@ -178,44 +176,43 @@ var Flag = function Flag(props) {
|
|
|
178
176
|
onBlur: onBlurAnalytics
|
|
179
177
|
};
|
|
180
178
|
var OptionalDismissButton = renderToggleOrDismissButton;
|
|
181
|
-
var boxShadow = "0 20px 32px -8px ".concat(_theme.flagShadowColor);
|
|
179
|
+
var boxShadow = "var(--ds-overlay, ".concat("0 20px 32px -8px ".concat(_theme.flagShadowColor), ")");
|
|
182
180
|
|
|
183
181
|
if (!isBold) {
|
|
184
|
-
boxShadow = "0 0 1px ".concat(_theme.flagBorderColor, ", ").concat(boxShadow);
|
|
182
|
+
boxShadow = "var(--ds-overlay, ".concat("0 0 1px ".concat(_theme.flagBorderColor, ", ").concat(boxShadow), ")");
|
|
185
183
|
}
|
|
186
184
|
|
|
187
185
|
return (0, _core.jsx)(_components.default.Consumer, null, function (tokens) {
|
|
188
186
|
var mode = tokens.mode;
|
|
189
187
|
var textColour = (0, _theme.getFlagTextColor)(appearance, mode);
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
(0, _core.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
);
|
|
188
|
+
var iconColour = (0, _theme.getFlagIconColor)(appearance, mode);
|
|
189
|
+
return (0, _core.jsx)("div", (0, _extends2.default)({
|
|
190
|
+
css: (0, _core.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n color: ", ";\n transition: background-color 200ms;\n width: 100%;\n z-index: ", ";\n "])), (0, _theme.getFlagBackgroundColor)(appearance, mode), (0, _constants.borderRadius)(), boxShadow, textColour, _constants.layers.flag()),
|
|
191
|
+
role: "alert",
|
|
192
|
+
"data-testid": testId
|
|
193
|
+
}, autoDismissProps), (0, _core.jsx)("div", {
|
|
194
|
+
css: (0, _core.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n padding: ", "px;\n box-sizing: border-box;\n border-radius: ", "px;\n\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px\n ", ";\n }\n\n @supports not selector(*:focus-visible) {\n &:focus {\n outline: none;\n box-shadow: 0 0 0 2px\n ", ";\n }\n }\n\n @media screen and (forced-colors: active),\n screen and (-ms-high-contrast: active) {\n &:focus-visible {\n outline: 1px solid;\n }\n }\n "])), doubleGridSize, (0, _constants.borderRadius)(), (0, _theme.getFlagFocusRingColor)(appearance, mode), (0, _theme.getFlagFocusRingColor)(appearance, mode)) // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
195
|
+
,
|
|
196
|
+
tabIndex: 0
|
|
197
|
+
}, (0, _core.jsx)("div", {
|
|
198
|
+
css: (0, _core.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n display: flex;\n align-items: center;\n height: ", "px;\n "])), iconColour, headerHeight)
|
|
199
|
+
}, icon, (0, _core.jsx)("span", {
|
|
200
|
+
css: (0, _core.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-weight: 600;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0 0 0 ", "px;\n "])), textColour, doubleGridSize)
|
|
201
|
+
}, title), (0, _core.jsx)(OptionalDismissButton, {
|
|
202
|
+
mode: mode
|
|
203
|
+
})), (0, _core.jsx)(_expander.default, {
|
|
204
|
+
isExpanded: !isBold || isExpanded,
|
|
205
|
+
testId: testId
|
|
206
|
+
}, description && (0, _core.jsx)("div", {
|
|
207
|
+
css: (0, _core.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n word-wrap: break-word;\n overflow: auto;\n max-height: 100px; /* height is defined as 5 lines maximum by design */\n "])), textColour),
|
|
208
|
+
"data-testid": testId && "".concat(testId, "-description")
|
|
209
|
+
}, description), (0, _core.jsx)(_flagActions.default, {
|
|
210
|
+
actions: actions,
|
|
211
|
+
appearance: appearance,
|
|
212
|
+
linkComponent: linkComponent,
|
|
213
|
+
testId: testId,
|
|
214
|
+
mode: mode
|
|
215
|
+
}))));
|
|
219
216
|
});
|
|
220
217
|
};
|
|
221
218
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -5,12 +5,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _flag.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
8
|
Object.defineProperty(exports, "AutoDismissFlag", {
|
|
15
9
|
enumerable: true,
|
|
16
10
|
get: function get() {
|
|
@@ -23,22 +17,28 @@ Object.defineProperty(exports, "FlagGroup", {
|
|
|
23
17
|
return _flagGroup.default;
|
|
24
18
|
}
|
|
25
19
|
});
|
|
26
|
-
Object.defineProperty(exports, "
|
|
20
|
+
Object.defineProperty(exports, "FlagsProvider", {
|
|
27
21
|
enumerable: true,
|
|
28
22
|
get: function get() {
|
|
29
|
-
return _flagProvider.
|
|
23
|
+
return _flagProvider.FlagsProvider;
|
|
30
24
|
}
|
|
31
25
|
});
|
|
32
|
-
Object.defineProperty(exports, "
|
|
26
|
+
Object.defineProperty(exports, "default", {
|
|
33
27
|
enumerable: true,
|
|
34
28
|
get: function get() {
|
|
35
|
-
return
|
|
29
|
+
return _flag.default;
|
|
36
30
|
}
|
|
37
31
|
});
|
|
38
|
-
Object.defineProperty(exports, "
|
|
32
|
+
Object.defineProperty(exports, "useFlags", {
|
|
39
33
|
enumerable: true,
|
|
40
34
|
get: function get() {
|
|
41
|
-
return _flagProvider.
|
|
35
|
+
return _flagProvider.useFlags;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "withFlagsProvider", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _flagProvider.withFlagsProvider;
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
|
package/dist/cjs/theme.js
CHANGED
|
@@ -1,38 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
11
|
-
|
|
12
|
-
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); }
|
|
6
|
+
exports.getFlagTextColor = exports.getFlagIconColor = exports.getFlagFocusRingColor = exports.getFlagBackgroundColor = exports.getActionColor = exports.getActionBackground = exports.flagShadowColor = exports.flagBorderColor = void 0;
|
|
13
7
|
|
|
14
|
-
|
|
8
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
15
9
|
|
|
16
10
|
var flagBackgroundColor = {
|
|
17
11
|
error: {
|
|
18
|
-
light:
|
|
19
|
-
dark:
|
|
12
|
+
light: "var(--ds-background-overlay, ".concat(_colors.R400, ")"),
|
|
13
|
+
dark: "var(--ds-background-overlay, ".concat(_colors.R300, ")")
|
|
20
14
|
},
|
|
21
15
|
info: {
|
|
22
|
-
light:
|
|
23
|
-
dark:
|
|
16
|
+
light: "var(--ds-background-overlay, ".concat(_colors.N500, ")"),
|
|
17
|
+
dark: "var(--ds-background-overlay, ".concat(_colors.N500, ")")
|
|
24
18
|
},
|
|
25
19
|
normal: {
|
|
26
|
-
light:
|
|
27
|
-
dark:
|
|
20
|
+
light: "var(--ds-background-overlay, ".concat(_colors.N0, ")"),
|
|
21
|
+
dark: "var(--ds-background-overlay, ".concat(_colors.DN50, ")")
|
|
28
22
|
},
|
|
29
23
|
success: {
|
|
30
|
-
light:
|
|
31
|
-
dark:
|
|
24
|
+
light: "var(--ds-background-overlay, ".concat(_colors.G400, ")"),
|
|
25
|
+
dark: "var(--ds-background-overlay, ".concat(_colors.G300, ")")
|
|
32
26
|
},
|
|
33
27
|
warning: {
|
|
34
|
-
light:
|
|
35
|
-
dark:
|
|
28
|
+
light: "var(--ds-background-overlay, ".concat(_colors.Y200, ")"),
|
|
29
|
+
dark: "var(--ds-background-overlay, ".concat(_colors.Y300, ")")
|
|
36
30
|
}
|
|
37
31
|
};
|
|
38
32
|
|
|
@@ -41,28 +35,50 @@ var getFlagBackgroundColor = function getFlagBackgroundColor(appearance, mode) {
|
|
|
41
35
|
};
|
|
42
36
|
|
|
43
37
|
exports.getFlagBackgroundColor = getFlagBackgroundColor;
|
|
44
|
-
var flagBorderColor =
|
|
38
|
+
var flagBorderColor = "var(--ds-background-overlay, ".concat(_colors.N60A, ")");
|
|
45
39
|
exports.flagBorderColor = flagBorderColor;
|
|
40
|
+
var flagIconColor = {
|
|
41
|
+
error: {
|
|
42
|
+
light: "var(--ds-iconBorder-danger, ".concat(_colors.N0, ")"),
|
|
43
|
+
dark: "var(--ds-iconBorder-danger, ".concat(_colors.DN40, ")")
|
|
44
|
+
},
|
|
45
|
+
info: {
|
|
46
|
+
light: "var(--ds-iconBorder-discovery, ".concat(_colors.N0, ")"),
|
|
47
|
+
dark: "var(--ds-iconBorder-discovery, ".concat(_colors.DN600, ")")
|
|
48
|
+
},
|
|
49
|
+
normal: {
|
|
50
|
+
light: "var(--ds-iconBorder-brand, ".concat(_colors.N500, ")"),
|
|
51
|
+
dark: "var(--ds-iconBorder-brand, ".concat(_colors.DN600, ")")
|
|
52
|
+
},
|
|
53
|
+
success: {
|
|
54
|
+
light: "var(--ds-iconBorder-success, ".concat(_colors.N0, ")"),
|
|
55
|
+
dark: "var(--ds-iconBorder-success, ".concat(_colors.DN40, ")")
|
|
56
|
+
},
|
|
57
|
+
warning: {
|
|
58
|
+
light: "var(--ds-iconBorder-warning, ".concat(_colors.N700, ")"),
|
|
59
|
+
dark: "var(--ds-iconBorder-warning, ".concat(_colors.DN40, ")")
|
|
60
|
+
}
|
|
61
|
+
};
|
|
46
62
|
var flagTextColor = {
|
|
47
63
|
error: {
|
|
48
|
-
light:
|
|
49
|
-
dark:
|
|
64
|
+
light: "var(--ds-text-highEmphasis, ".concat(_colors.N0, ")"),
|
|
65
|
+
dark: "var(--ds-text-highEmphasis, ".concat(_colors.DN40, ")")
|
|
50
66
|
},
|
|
51
67
|
info: {
|
|
52
|
-
light:
|
|
53
|
-
dark:
|
|
68
|
+
light: "var(--ds-text-highEmphasis, ".concat(_colors.N0, ")"),
|
|
69
|
+
dark: "var(--ds-text-highEmphasis, ".concat(_colors.DN600, ")")
|
|
54
70
|
},
|
|
55
71
|
normal: {
|
|
56
|
-
light:
|
|
57
|
-
dark:
|
|
72
|
+
light: "var(--ds-text-highEmphasis, ".concat(_colors.N500, ")"),
|
|
73
|
+
dark: "var(--ds-text-highEmphasis, ".concat(_colors.DN600, ")")
|
|
58
74
|
},
|
|
59
75
|
success: {
|
|
60
|
-
light:
|
|
61
|
-
dark:
|
|
76
|
+
light: "var(--ds-text-highEmphasis, ".concat(_colors.N0, ")"),
|
|
77
|
+
dark: "var(--ds-text-highEmphasis, ".concat(_colors.DN40, ")")
|
|
62
78
|
},
|
|
63
79
|
warning: {
|
|
64
|
-
light:
|
|
65
|
-
dark:
|
|
80
|
+
light: "var(--ds-text-highEmphasis, ".concat(_colors.N700, ")"),
|
|
81
|
+
dark: "var(--ds-text-highEmphasis, ".concat(_colors.DN40, ")")
|
|
66
82
|
}
|
|
67
83
|
};
|
|
68
84
|
|
|
@@ -71,28 +87,36 @@ var getFlagTextColor = function getFlagTextColor(appearance, mode) {
|
|
|
71
87
|
};
|
|
72
88
|
|
|
73
89
|
exports.getFlagTextColor = getFlagTextColor;
|
|
74
|
-
|
|
90
|
+
|
|
91
|
+
var getFlagIconColor = function getFlagIconColor(appearance, mode) {
|
|
92
|
+
return flagIconColor[appearance][mode];
|
|
93
|
+
}; // token set in flag.tsx instead
|
|
94
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
exports.getFlagIconColor = getFlagIconColor;
|
|
98
|
+
var flagShadowColor = _colors.N50A;
|
|
75
99
|
exports.flagShadowColor = flagShadowColor;
|
|
76
100
|
var flagFocusRingColor = {
|
|
77
101
|
error: {
|
|
78
|
-
light:
|
|
79
|
-
dark:
|
|
102
|
+
light: "var(--ds-border-focus, ".concat(_colors.N40, ")"),
|
|
103
|
+
dark: "var(--ds-border-focus, ".concat(_colors.N40, ")")
|
|
80
104
|
},
|
|
81
105
|
info: {
|
|
82
|
-
light:
|
|
83
|
-
dark:
|
|
106
|
+
light: "var(--ds-border-focus, ".concat(_colors.N40, ")"),
|
|
107
|
+
dark: "var(--ds-border-focus, ".concat(_colors.N40, ")")
|
|
84
108
|
},
|
|
85
109
|
normal: {
|
|
86
|
-
light:
|
|
87
|
-
dark:
|
|
110
|
+
light: "var(--ds-border-focus, ".concat(_colors.B100, ")"),
|
|
111
|
+
dark: "var(--ds-border-focus, ".concat(_colors.B100, ")")
|
|
88
112
|
},
|
|
89
113
|
success: {
|
|
90
|
-
light:
|
|
91
|
-
dark:
|
|
114
|
+
light: "var(--ds-border-focus, ".concat(_colors.N40, ")"),
|
|
115
|
+
dark: "var(--ds-border-focus, ".concat(_colors.N40, ")")
|
|
92
116
|
},
|
|
93
117
|
warning: {
|
|
94
|
-
light:
|
|
95
|
-
dark:
|
|
118
|
+
light: "var(--ds-border-focus, ".concat(_colors.N200, ")"),
|
|
119
|
+
dark: "var(--ds-border-focus, ".concat(_colors.N200, ")")
|
|
96
120
|
}
|
|
97
121
|
};
|
|
98
122
|
|
|
@@ -104,46 +128,46 @@ exports.getFlagFocusRingColor = getFlagFocusRingColor;
|
|
|
104
128
|
var lightButtonBackground = 'rgba(255, 255, 255, 0.08)';
|
|
105
129
|
var actionBackground = {
|
|
106
130
|
success: {
|
|
107
|
-
light: lightButtonBackground,
|
|
108
|
-
dark:
|
|
131
|
+
light: "var(--ds-background-subtleNeutral-resting, ".concat(lightButtonBackground, ")"),
|
|
132
|
+
dark: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N30A, ")")
|
|
109
133
|
},
|
|
110
134
|
info: {
|
|
111
|
-
light: lightButtonBackground,
|
|
112
|
-
dark: lightButtonBackground
|
|
135
|
+
light: "var(--ds-background-subtleNeutral-resting, ".concat(lightButtonBackground, ")"),
|
|
136
|
+
dark: "var(--ds-background-subtleNeutral-resting, ".concat(lightButtonBackground, ")")
|
|
113
137
|
},
|
|
114
138
|
error: {
|
|
115
|
-
light: lightButtonBackground,
|
|
116
|
-
dark:
|
|
139
|
+
light: "var(--ds-background-subtleNeutral-resting, ".concat(lightButtonBackground, ")"),
|
|
140
|
+
dark: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N30A, ")")
|
|
117
141
|
},
|
|
118
142
|
warning: {
|
|
119
|
-
light:
|
|
120
|
-
dark:
|
|
143
|
+
light: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N30A, ")"),
|
|
144
|
+
dark: "var(--ds-background-subtleNeutral-resting, ".concat(_colors.N30A, ")")
|
|
121
145
|
},
|
|
122
146
|
normal: {
|
|
123
|
-
light:
|
|
124
|
-
dark:
|
|
147
|
+
light: "var(--ds-background-subtleNeutral-resting, none)",
|
|
148
|
+
dark: "var(--ds-background-subtleNeutral-resting, none)"
|
|
125
149
|
}
|
|
126
150
|
};
|
|
127
151
|
var actionColor = {
|
|
128
152
|
success: {
|
|
129
|
-
light:
|
|
130
|
-
dark:
|
|
153
|
+
light: "var(--ds-text-mediumEmphasis, ".concat(_colors.N0, ")"),
|
|
154
|
+
dark: "var(--ds-text-mediumEmphasis, ".concat(_colors.DN40, ")")
|
|
131
155
|
},
|
|
132
156
|
info: {
|
|
133
|
-
light:
|
|
134
|
-
dark:
|
|
157
|
+
light: "var(--ds-text-mediumEmphasis, ".concat(_colors.N0, ")"),
|
|
158
|
+
dark: "var(--ds-text-mediumEmphasis, ".concat(_colors.DN600, ")")
|
|
135
159
|
},
|
|
136
160
|
error: {
|
|
137
|
-
light:
|
|
138
|
-
dark:
|
|
161
|
+
light: "var(--ds-text-mediumEmphasis, ".concat(_colors.N0, ")"),
|
|
162
|
+
dark: "var(--ds-text-mediumEmphasis, ".concat(_colors.DN600, ")")
|
|
139
163
|
},
|
|
140
164
|
warning: {
|
|
141
|
-
light:
|
|
142
|
-
dark:
|
|
165
|
+
light: "var(--ds-text-mediumEmphasis, ".concat(_colors.N700, ")"),
|
|
166
|
+
dark: "var(--ds-text-mediumEmphasis, ".concat(_colors.DN40, ")")
|
|
143
167
|
},
|
|
144
168
|
normal: {
|
|
145
|
-
light:
|
|
146
|
-
dark:
|
|
169
|
+
light: "var(--ds-text-mediumEmphasis, ".concat(_colors.B400, ")"),
|
|
170
|
+
dark: "var(--ds-text-mediumEmphasis, ".concat(_colors.B100, ")")
|
|
147
171
|
}
|
|
148
172
|
};
|
|
149
173
|
|
package/dist/cjs/version.json
CHANGED
|
@@ -4,7 +4,7 @@ import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next/usePlatfor
|
|
|
4
4
|
import Flag from './flag';
|
|
5
5
|
import { useFlagGroup } from './flag-group';
|
|
6
6
|
const packageName = "@atlaskit/flag";
|
|
7
|
-
const packageVersion = "14.
|
|
7
|
+
const packageVersion = "14.5.0";
|
|
8
8
|
export const AUTO_DISMISS_SECONDS = 8;
|
|
9
9
|
|
|
10
10
|
function noop() {}
|