@atlaskit/flag 14.7.2 → 15.0.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 +26 -0
- package/dist/cjs/auto-dismiss-flag.js +1 -1
- package/dist/cjs/flag-actions.js +18 -37
- package/dist/cjs/flag-group.js +15 -9
- package/dist/cjs/flag.js +62 -69
- package/dist/cjs/internal/dismiss-button.js +25 -38
- package/dist/cjs/internal/expander.js +25 -26
- package/dist/cjs/internal/index.js +0 -16
- package/dist/cjs/theme.js +50 -169
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/auto-dismiss-flag.js +1 -1
- package/dist/es2019/flag-actions.js +18 -38
- package/dist/es2019/flag-group.js +14 -8
- package/dist/es2019/flag.js +62 -67
- package/dist/es2019/internal/dismiss-button.js +26 -36
- package/dist/es2019/internal/expander.js +20 -23
- package/dist/es2019/internal/index.js +0 -2
- package/dist/es2019/theme.js +47 -141
- package/dist/es2019/version.json +1 -1
- package/dist/esm/auto-dismiss-flag.js +1 -1
- package/dist/esm/flag-actions.js +18 -38
- package/dist/esm/flag-group.js +14 -8
- package/dist/esm/flag.js +62 -68
- package/dist/esm/internal/dismiss-button.js +26 -37
- package/dist/esm/internal/expander.js +21 -24
- package/dist/esm/internal/index.js +0 -2
- package/dist/esm/theme.js +49 -155
- package/dist/esm/version.json +1 -1
- package/dist/types/flag-actions.d.ts +2 -5
- package/dist/types/flag.d.ts +3 -2
- package/dist/types/internal/expander.d.ts +2 -3
- package/dist/types/internal/index.d.ts +0 -2
- package/dist/types/theme.d.ts +14 -9
- package/package.json +9 -15
- package/report.api.md +62 -148
- package/dist/cjs/internal/description.js +0 -34
- package/dist/cjs/internal/title.js +0 -30
- package/dist/es2019/internal/description.js +0 -24
- package/dist/es2019/internal/title.js +0 -20
- package/dist/esm/internal/description.js +0 -25
- package/dist/esm/internal/title.js +0 -21
- package/dist/types/internal/description.d.ts +0 -8
- package/dist/types/internal/title.d.ts +0 -6
- package/dist/types-ts4.0/auto-dismiss-flag.d.ts +0 -13
- package/dist/types-ts4.0/constants.d.ts +0 -2
- package/dist/types-ts4.0/flag-actions.d.ts +0 -15
- package/dist/types-ts4.0/flag-group.d.ts +0 -45
- package/dist/types-ts4.0/flag-provider.d.ts +0 -33
- package/dist/types-ts4.0/flag.d.ts +0 -14
- package/dist/types-ts4.0/index.d.ts +0 -6
- package/dist/types-ts4.0/internal/description.d.ts +0 -8
- package/dist/types-ts4.0/internal/dismiss-button.d.ts +0 -12
- package/dist/types-ts4.0/internal/expander.d.ts +0 -8
- package/dist/types-ts4.0/internal/index.d.ts +0 -4
- package/dist/types-ts4.0/internal/title.d.ts +0 -6
- package/dist/types-ts4.0/theme.d.ts +0 -10
- package/dist/types-ts4.0/types.d.ts +0 -101
|
@@ -1,30 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { memo } from 'react';
|
|
3
|
-
import { jsx
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { UNSAFE_Box as Box } from '@atlaskit/ds-explorations';
|
|
4
5
|
import FocusRing from '@atlaskit/focus-ring';
|
|
5
|
-
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
6
|
-
import ChevronUpIcon from '@atlaskit/icon/glyph/chevron-up';
|
|
6
|
+
import ChevronDownIcon from '@atlaskit/icon/glyph/hipchat/chevron-down';
|
|
7
|
+
import ChevronUpIcon from '@atlaskit/icon/glyph/hipchat/chevron-up';
|
|
7
8
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
8
|
-
import {
|
|
9
|
-
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
10
|
-
import { getFlagTextColor } from '../theme';
|
|
11
|
-
var gridSize = getGridSize();
|
|
12
|
-
var borderRadius = getBorderRadius();
|
|
13
|
-
var dismissButtonStyles = css({
|
|
14
|
-
marginLeft: gridSize,
|
|
15
|
-
padding: 0,
|
|
16
|
-
flex: '0 0 auto',
|
|
17
|
-
appearance: 'none',
|
|
18
|
-
background: 'none',
|
|
19
|
-
border: 'none',
|
|
20
|
-
borderRadius: borderRadius,
|
|
21
|
-
cursor: 'pointer',
|
|
22
|
-
lineHeight: '1',
|
|
23
|
-
whiteSpace: 'nowrap'
|
|
24
|
-
});
|
|
25
|
-
var crossIconStyles = css({
|
|
26
|
-
paddingTop: "".concat(gridSize, "px")
|
|
27
|
-
});
|
|
9
|
+
import { flagTextColorToken } from '../theme';
|
|
28
10
|
|
|
29
11
|
var DismissButton = function DismissButton(_ref) {
|
|
30
12
|
var appearance = _ref.appearance,
|
|
@@ -32,10 +14,6 @@ var DismissButton = function DismissButton(_ref) {
|
|
|
32
14
|
isBold = _ref.isBold,
|
|
33
15
|
isExpanded = _ref.isExpanded,
|
|
34
16
|
testId = _ref.testId;
|
|
35
|
-
|
|
36
|
-
var _useGlobalTheme = useGlobalTheme(),
|
|
37
|
-
mode = _useGlobalTheme.mode;
|
|
38
|
-
|
|
39
17
|
var ButtonIcon = CrossIcon;
|
|
40
18
|
var buttonLabel = 'Dismiss';
|
|
41
19
|
var size = 'small';
|
|
@@ -44,22 +22,33 @@ var DismissButton = function DismissButton(_ref) {
|
|
|
44
22
|
if (isBold) {
|
|
45
23
|
ButtonIcon = isExpanded ? ChevronUpIcon : ChevronDownIcon;
|
|
46
24
|
buttonLabel = isExpanded ? 'Collapse' : 'Expand';
|
|
47
|
-
size = '
|
|
25
|
+
size = 'medium';
|
|
48
26
|
buttonTestId = testId && "".concat(testId, "-toggle");
|
|
49
27
|
}
|
|
50
28
|
|
|
51
|
-
return jsx(FocusRing, null, jsx(
|
|
52
|
-
|
|
53
|
-
color: getFlagTextColor(appearance, mode)
|
|
54
|
-
},
|
|
55
|
-
css: [dismissButtonStyles, !isBold && crossIconStyles],
|
|
56
|
-
onClick: onClick,
|
|
57
|
-
"data-testid": buttonTestId,
|
|
29
|
+
return jsx(FocusRing, null, jsx(Box, {
|
|
30
|
+
as: "button",
|
|
58
31
|
type: "button",
|
|
59
|
-
"
|
|
32
|
+
justifyContent: "center",
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
borderStyle: "none",
|
|
35
|
+
borderRadius: "normal",
|
|
36
|
+
padding: "scale.0",
|
|
37
|
+
width: "size.200",
|
|
38
|
+
height: "size.200",
|
|
39
|
+
onClick: onClick,
|
|
40
|
+
"aria-expanded": isBold ? isExpanded : undefined,
|
|
41
|
+
UNSAFE_style: {
|
|
42
|
+
flex: '0 0 auto',
|
|
43
|
+
background: 'none',
|
|
44
|
+
cursor: 'pointer',
|
|
45
|
+
whiteSpace: 'nowrap'
|
|
46
|
+
},
|
|
47
|
+
testId: buttonTestId
|
|
60
48
|
}, jsx(ButtonIcon, {
|
|
61
49
|
label: buttonLabel,
|
|
62
|
-
size: size
|
|
50
|
+
size: size,
|
|
51
|
+
primaryColor: flagTextColorToken[appearance]
|
|
63
52
|
})));
|
|
64
53
|
};
|
|
65
54
|
|
|
@@ -1,22 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { UNSAFE_Box as Box, UNSAFE_Stack as Stack } from '@atlaskit/ds-explorations';
|
|
3
4
|
import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
|
|
4
|
-
import { gridSize as getGridSize } from '@atlaskit/theme/constants';
|
|
5
|
-
var gridSize = getGridSize();
|
|
6
|
-
var paddingLeft = gridSize * 5;
|
|
7
|
-
var expanderStyles = css({
|
|
8
|
-
display: 'flex',
|
|
9
|
-
minWidth: 0,
|
|
10
|
-
maxHeight: 0,
|
|
11
|
-
padding: "0 0 0 ".concat(paddingLeft, "px"),
|
|
12
|
-
justifyContent: 'center',
|
|
13
|
-
flex: '1 1 100%',
|
|
14
|
-
flexDirection: 'column',
|
|
15
|
-
transition: "max-height 0.3s"
|
|
16
|
-
});
|
|
17
|
-
var expandedStyles = css({
|
|
18
|
-
maxHeight: 150
|
|
19
|
-
});
|
|
20
5
|
|
|
21
6
|
var Expander = function Expander(_ref) {
|
|
22
7
|
var children = _ref.children,
|
|
@@ -25,14 +10,26 @@ var Expander = function Expander(_ref) {
|
|
|
25
10
|
// Need to always render the ExpanderInternal otherwise the
|
|
26
11
|
// reveal transition doesn't happen. We can't use CSS animation for
|
|
27
12
|
// the the reveal because we don't know the height of the content.
|
|
28
|
-
return
|
|
13
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
14
|
+
UNSAFE_style: {
|
|
15
|
+
minWidth: 0,
|
|
16
|
+
maxHeight: isExpanded ? 150 : 0,
|
|
17
|
+
flex: '1 1 100%',
|
|
18
|
+
transition: "max-height 0.3s"
|
|
19
|
+
},
|
|
29
20
|
"aria-hidden": !isExpanded,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}, jsx(ExitingPersistence, {
|
|
21
|
+
testId: testId && "".concat(testId, "-expander")
|
|
22
|
+
}, /*#__PURE__*/React.createElement(ExitingPersistence, {
|
|
33
23
|
appear: true
|
|
34
|
-
}, isExpanded &&
|
|
35
|
-
return
|
|
24
|
+
}, isExpanded && /*#__PURE__*/React.createElement(FadeIn, null, function (props) {
|
|
25
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
26
|
+
display: "block",
|
|
27
|
+
UNSAFE_style: {
|
|
28
|
+
width: '100%'
|
|
29
|
+
}
|
|
30
|
+
}, props), /*#__PURE__*/React.createElement(Stack, {
|
|
31
|
+
gap: "scale.100"
|
|
32
|
+
}, children));
|
|
36
33
|
})));
|
|
37
34
|
}; // eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
38
35
|
|
package/dist/esm/theme.js
CHANGED
|
@@ -1,161 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
light: "var(--ds-background-success-bold, ".concat(G400, ")"),
|
|
17
|
-
dark: "var(--ds-background-success-bold, ".concat(G300, ")")
|
|
18
|
-
},
|
|
19
|
-
warning: {
|
|
20
|
-
light: "var(--ds-background-warning-bold, ".concat(Y200, ")"),
|
|
21
|
-
dark: "var(--ds-background-warning-bold, ".concat(Y300, ")")
|
|
22
|
-
}
|
|
1
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
|
+
import { B100, B400, N0, N200, N30A, N40, N500, N700 } from '@atlaskit/theme/colors';
|
|
3
|
+
export var flagBackgroundColor = {
|
|
4
|
+
error: 'danger.bold',
|
|
5
|
+
info: 'neutral.bold',
|
|
6
|
+
normal: 'elevation.surface.overlay',
|
|
7
|
+
success: 'success.bold',
|
|
8
|
+
warning: 'warning.bold'
|
|
9
|
+
};
|
|
10
|
+
export var flagIconColor = {
|
|
11
|
+
error: "var(--ds-icon-inverse, ".concat(N0, ")"),
|
|
12
|
+
info: "var(--ds-icon-inverse, ".concat(N0, ")"),
|
|
13
|
+
normal: "var(--ds-icon-subtle, ".concat(N500, ")"),
|
|
14
|
+
success: "var(--ds-icon-inverse, ".concat(N0, ")"),
|
|
15
|
+
warning: "var(--ds-icon-warning-inverse, ".concat(N700, ")")
|
|
23
16
|
};
|
|
24
|
-
export var getFlagBackgroundColor = function getFlagBackgroundColor(appearance, mode) {
|
|
25
|
-
return flagBackgroundColor[appearance][mode];
|
|
26
|
-
}; // token set in flag.tsx instead
|
|
27
|
-
|
|
28
17
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
29
18
|
|
|
30
|
-
export var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
info:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
warning: {
|
|
52
|
-
light: "var(--ds-icon-warning-inverse, ".concat(N700, ")"),
|
|
53
|
-
dark: "var(--ds-icon-warning-inverse, ".concat(DN40, ")")
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
var flagTextColor = {
|
|
57
|
-
error: {
|
|
58
|
-
light: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
59
|
-
dark: "var(--ds-text-inverse, ".concat(DN40, ")")
|
|
60
|
-
},
|
|
61
|
-
info: {
|
|
62
|
-
light: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
63
|
-
dark: "var(--ds-text-inverse, ".concat(DN600, ")")
|
|
64
|
-
},
|
|
65
|
-
normal: {
|
|
66
|
-
light: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
67
|
-
dark: "var(--ds-text-subtle, ".concat(DN600, ")")
|
|
68
|
-
},
|
|
69
|
-
success: {
|
|
70
|
-
light: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
71
|
-
dark: "var(--ds-text-inverse, ".concat(DN40, ")")
|
|
72
|
-
},
|
|
73
|
-
warning: {
|
|
74
|
-
light: "var(--ds-text-warning-inverse, ".concat(N700, ")"),
|
|
75
|
-
dark: "var(--ds-text-warning-inverse, ".concat(DN40, ")")
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
export var getFlagTextColor = function getFlagTextColor(appearance, mode) {
|
|
79
|
-
return flagTextColor[appearance][mode];
|
|
80
|
-
};
|
|
81
|
-
export var getFlagIconColor = function getFlagIconColor(appearance, mode) {
|
|
82
|
-
return flagIconColor[appearance][mode];
|
|
83
|
-
};
|
|
84
|
-
var flagFocusRingColor = {
|
|
85
|
-
error: {
|
|
86
|
-
light: "var(--ds-border-focused, ".concat(N40, ")"),
|
|
87
|
-
dark: "var(--ds-border-focused, ".concat(N40, ")")
|
|
88
|
-
},
|
|
89
|
-
info: {
|
|
90
|
-
light: "var(--ds-border-focused, ".concat(N40, ")"),
|
|
91
|
-
dark: "var(--ds-border-focused, ".concat(N40, ")")
|
|
92
|
-
},
|
|
93
|
-
normal: {
|
|
94
|
-
light: "var(--ds-border-focused, ".concat(B100, ")"),
|
|
95
|
-
dark: "var(--ds-border-focused, ".concat(B100, ")")
|
|
96
|
-
},
|
|
97
|
-
success: {
|
|
98
|
-
light: "var(--ds-border-focused, ".concat(N40, ")"),
|
|
99
|
-
dark: "var(--ds-border-focused, ".concat(N40, ")")
|
|
100
|
-
},
|
|
101
|
-
warning: {
|
|
102
|
-
light: "var(--ds-border-focused, ".concat(N200, ")"),
|
|
103
|
-
dark: "var(--ds-border-focused, ".concat(N200, ")")
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
export var getFlagFocusRingColor = function getFlagFocusRingColor(appearance, mode) {
|
|
107
|
-
return flagFocusRingColor[appearance][mode];
|
|
108
|
-
};
|
|
109
|
-
var lightButtonBackground = 'rgba(255, 255, 255, 0.08)'; // TODO: DSP-2519 Interaction tokens should be used for hovered and pressed states
|
|
19
|
+
export var flagTextColor = {
|
|
20
|
+
error: 'inverse',
|
|
21
|
+
info: 'inverse',
|
|
22
|
+
normal: 'subtle',
|
|
23
|
+
success: 'inverse',
|
|
24
|
+
warning: 'warning.inverse'
|
|
25
|
+
};
|
|
26
|
+
export var flagTextColorToken = {
|
|
27
|
+
error: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
28
|
+
info: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
29
|
+
normal: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
30
|
+
success: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
31
|
+
warning: "var(--ds-text-warning-inverse, ".concat(N700, ")")
|
|
32
|
+
};
|
|
33
|
+
export var flagFocusRingColor = {
|
|
34
|
+
error: "var(--ds-border-focused, ".concat(N40, ")"),
|
|
35
|
+
info: "var(--ds-border-focused, ".concat(N40, ")"),
|
|
36
|
+
normal: "var(--ds-border-focused, ".concat(B100, ")"),
|
|
37
|
+
success: "var(--ds-border-focused, ".concat(N40, ")"),
|
|
38
|
+
warning: "var(--ds-border-focused, ".concat(N200, ")")
|
|
39
|
+
}; // TODO: DSP-2519 Interaction tokens should be used for hovered and pressed states
|
|
110
40
|
// https://product-fabric.atlassian.net/browse/DSP-2519
|
|
111
41
|
|
|
112
|
-
var
|
|
113
|
-
success:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
warning: {
|
|
126
|
-
light: "var(--ds-background-neutral, ".concat(N30A, ")"),
|
|
127
|
-
dark: "var(--ds-background-neutral, ".concat(N30A, ")")
|
|
128
|
-
},
|
|
129
|
-
normal: {
|
|
130
|
-
light: 'none',
|
|
131
|
-
dark: 'none'
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
var actionColor = {
|
|
135
|
-
success: {
|
|
136
|
-
light: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
137
|
-
dark: "var(--ds-text-inverse, ".concat(DN40, ")")
|
|
138
|
-
},
|
|
139
|
-
info: {
|
|
140
|
-
light: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
141
|
-
dark: "var(--ds-text-inverse, ".concat(DN600, ")")
|
|
142
|
-
},
|
|
143
|
-
error: {
|
|
144
|
-
light: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
145
|
-
dark: "var(--ds-text-inverse, ".concat(DN600, ")")
|
|
146
|
-
},
|
|
147
|
-
warning: {
|
|
148
|
-
light: "var(--ds-text-warning-inverse, ".concat(N700, ")"),
|
|
149
|
-
dark: "var(--ds-text-warning-inverse, ".concat(DN40, ")")
|
|
150
|
-
},
|
|
151
|
-
normal: {
|
|
152
|
-
light: "var(--ds-link, ".concat(B400, ")"),
|
|
153
|
-
dark: "var(--ds-link, ".concat(B100, ")")
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
export var getActionBackground = function getActionBackground(appearance, mode) {
|
|
157
|
-
return actionBackground[appearance][mode];
|
|
158
|
-
};
|
|
159
|
-
export var getActionColor = function getActionColor(appearance, mode) {
|
|
160
|
-
return actionColor[appearance][mode];
|
|
42
|
+
export var actionBackgroundColor = {
|
|
43
|
+
success: "var(--ds-background-neutral, ".concat(N30A, ")"),
|
|
44
|
+
info: "var(--ds-background-neutral, ".concat(N30A, ")"),
|
|
45
|
+
error: "var(--ds-background-neutral, ".concat(N30A, ")"),
|
|
46
|
+
warning: "var(--ds-background-neutral, ".concat(N30A, ")"),
|
|
47
|
+
normal: 'none'
|
|
48
|
+
};
|
|
49
|
+
export var actionTextColor = {
|
|
50
|
+
success: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
51
|
+
info: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
52
|
+
error: "var(--ds-text-inverse, ".concat(N0, ")"),
|
|
53
|
+
warning: "var(--ds-text-warning-inverse, ".concat(N700, ")"),
|
|
54
|
+
normal: "var(--ds-link, ".concat(B400, ")")
|
|
161
55
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
2
|
+
import { ComponentType, FC } from 'react';
|
|
4
3
|
import type { CustomThemeButtonProps } from '@atlaskit/button/types';
|
|
5
|
-
import type { ThemeModes } from '@atlaskit/theme/types';
|
|
6
4
|
import type { ActionsType, AppearanceTypes } from './types';
|
|
7
5
|
declare type FlagActionsProps = {
|
|
8
6
|
appearance: AppearanceTypes;
|
|
9
7
|
actions: ActionsType;
|
|
10
8
|
linkComponent?: ComponentType<CustomThemeButtonProps>;
|
|
11
|
-
mode: ThemeModes;
|
|
12
9
|
testId?: string;
|
|
13
10
|
};
|
|
14
|
-
declare const FlagActions:
|
|
11
|
+
declare const FlagActions: FC<FlagActionsProps>;
|
|
15
12
|
export default FlagActions;
|
package/dist/types/flag.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { FC } from 'react';
|
|
2
3
|
import type { FlagProps } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* __Flag__
|
|
@@ -10,5 +11,5 @@ import type { FlagProps } from './types';
|
|
|
10
11
|
* - [Code](https://atlassian.design/components/flag/code)
|
|
11
12
|
* - [Usage](https://atlassian.design/components/flag/usage)
|
|
12
13
|
*/
|
|
13
|
-
declare const Flag:
|
|
14
|
+
declare const Flag: FC<FlagProps>;
|
|
14
15
|
export default Flag;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import { FC } from 'react';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
declare type ExpanderProps = {
|
|
4
3
|
isExpanded: boolean;
|
|
5
4
|
testId?: string;
|
|
6
5
|
};
|
|
7
|
-
declare const Expander: FC<ExpanderProps>;
|
|
6
|
+
declare const Expander: React.FC<ExpanderProps>;
|
|
8
7
|
export default Expander;
|
package/dist/types/theme.d.ts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UNSAFE_BoxProps as BoxProps, UNSAFE_TextProps as TextProps } from '@atlaskit/ds-explorations';
|
|
2
2
|
import { AppearanceTypes } from './types';
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
export declare const flagBackgroundColor: Record<AppearanceTypes, BoxProps['backgroundColor']>;
|
|
4
|
+
export declare const flagIconColor: Record<AppearanceTypes, string>;
|
|
5
|
+
export declare const flagTextColor: Record<AppearanceTypes, TextProps['color']>;
|
|
6
|
+
export declare const flagTextColorToken: {
|
|
7
|
+
error: "var(--ds-text-inverse)";
|
|
8
|
+
info: "var(--ds-text-inverse)";
|
|
9
|
+
normal: "var(--ds-text-subtle)";
|
|
10
|
+
success: "var(--ds-text-inverse)";
|
|
11
|
+
warning: "var(--ds-text-warning-inverse)";
|
|
12
|
+
};
|
|
13
|
+
export declare const flagFocusRingColor: Record<AppearanceTypes, string>;
|
|
14
|
+
export declare const actionBackgroundColor: Record<AppearanceTypes, string>;
|
|
15
|
+
export declare const actionTextColor: Record<AppearanceTypes, string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/flag",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
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,14 +12,6 @@
|
|
|
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.0 <4.5": {
|
|
17
|
-
"*": [
|
|
18
|
-
"dist/types-ts4.0/*",
|
|
19
|
-
"dist/types-ts4.0/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"sideEffects": false,
|
|
24
16
|
"atlaskit:src": "src/index.tsx",
|
|
25
17
|
"atlassian": {
|
|
@@ -44,14 +36,15 @@
|
|
|
44
36
|
},
|
|
45
37
|
"dependencies": {
|
|
46
38
|
"@atlaskit/analytics-next": "^8.0.0",
|
|
47
|
-
"@atlaskit/button": "^16.
|
|
39
|
+
"@atlaskit/button": "^16.5.0",
|
|
40
|
+
"@atlaskit/ds-explorations": "^1.0.0",
|
|
48
41
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
49
|
-
"@atlaskit/focus-ring": "^1.
|
|
42
|
+
"@atlaskit/focus-ring": "^1.2.0",
|
|
50
43
|
"@atlaskit/icon": "^21.11.0",
|
|
51
|
-
"@atlaskit/motion": "^1.
|
|
44
|
+
"@atlaskit/motion": "^1.3.0",
|
|
52
45
|
"@atlaskit/portal": "^4.0.0",
|
|
53
46
|
"@atlaskit/theme": "^12.2.0",
|
|
54
|
-
"@atlaskit/tokens": "^0.
|
|
47
|
+
"@atlaskit/tokens": "^0.11.0",
|
|
55
48
|
"@atlaskit/visually-hidden": "^1.1.0",
|
|
56
49
|
"@babel/runtime": "^7.0.0",
|
|
57
50
|
"@emotion/react": "^11.7.1"
|
|
@@ -63,7 +56,7 @@
|
|
|
63
56
|
"@atlaskit/docs": "*",
|
|
64
57
|
"@atlaskit/radio": "^5.4.0",
|
|
65
58
|
"@atlaskit/section-message": "^6.3.0",
|
|
66
|
-
"@atlaskit/spinner": "^15.
|
|
59
|
+
"@atlaskit/spinner": "^15.3.0",
|
|
67
60
|
"@atlaskit/ssr": "*",
|
|
68
61
|
"@atlaskit/theme": "^12.2.0",
|
|
69
62
|
"@atlaskit/visual-regression": "*",
|
|
@@ -87,7 +80,8 @@
|
|
|
87
80
|
"design-system": "v1",
|
|
88
81
|
"design-tokens": "spacing",
|
|
89
82
|
"ui-components": [
|
|
90
|
-
"lite-mode"
|
|
83
|
+
"lite-mode",
|
|
84
|
+
"primitives"
|
|
91
85
|
],
|
|
92
86
|
"analytics": [
|
|
93
87
|
"analytics-next"
|