@atlaskit/flag 15.0.3 → 15.0.5

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/flag
2
2
 
3
+ ## 15.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`eadbf13d8c0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/eadbf13d8c0) - Updated usages of `Text`, `Box`, `Stack`, and `Inline` primitives to reflect their updated APIs. There are no visual or behaviour changes.
8
+ - Updated dependencies
9
+
10
+ ## 15.0.4
11
+
12
+ ### Patch Changes
13
+
14
+ - [`b0f6dd0bc35`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b0f6dd0bc35) - Updated to use typography tokens. There is no expected behaviour or visual change.
15
+
3
16
  ## 15.0.3
4
17
 
5
18
  ### Patch Changes
@@ -26,7 +26,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
26
26
  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; }
27
27
 
28
28
  var packageName = "@atlaskit/flag";
29
- var packageVersion = "15.0.3";
29
+ var packageVersion = "15.0.5";
30
30
  var AUTO_DISMISS_SECONDS = 8;
31
31
  /**
32
32
  * __Auto dismiss flag__
@@ -30,7 +30,7 @@ var buttonStyles = (0, _react.css)({
30
30
  padding: "0 ".concat(gridSize, "px !important"),
31
31
  background: "var(".concat(_constants2.VAR_BG_COLOR, ")"),
32
32
  color: "var(".concat(_constants2.VAR_COLOR, ") !important"),
33
- fontWeight: 500
33
+ fontWeight: "var(--ds-font-weight-medium, 500)"
34
34
  },
35
35
  '&&:focus, a&&:focus': {
36
36
  boxShadow: "0 0 0 2px var(".concat(_constants2.VAR_FOCUS_COLOR, ")")
@@ -65,7 +65,7 @@ var FlagActions = function FlagActions(props) {
65
65
 
66
66
  var isBold = appearance !== _constants2.DEFAULT_APPEARANCE;
67
67
  return (0, _react.jsx)(_dsExplorations.UNSAFE_Inline, {
68
- gap: "scale.100",
68
+ gap: "space.100",
69
69
  flexWrap: "wrap",
70
70
  alignItems: "center",
71
71
  divider: isBold ? null : '·',
package/dist/cjs/flag.js CHANGED
@@ -42,7 +42,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
42
42
  var analyticsAttributes = {
43
43
  componentName: 'flag',
44
44
  packageName: "@atlaskit/flag",
45
- packageVersion: "15.0.3"
45
+ packageVersion: "15.0.5"
46
46
  };
47
47
  /**
48
48
  * __Flag__
@@ -136,7 +136,7 @@ var Flag = function Flag(props) {
136
136
  display: "block",
137
137
  backgroundColor: _theme.flagBackgroundColor[appearance],
138
138
  shadow: "overlay",
139
- padding: "scale.200",
139
+ padding: "space.200",
140
140
  borderRadius: "normal",
141
141
  overflow: "hidden",
142
142
  layer: "flag",
@@ -148,7 +148,7 @@ var Flag = function Flag(props) {
148
148
  tabIndex: 0,
149
149
  testId: testId
150
150
  }, autoDismissProps), (0, _react2.jsx)(_dsExplorations.UNSAFE_Inline, {
151
- gap: "scale.200"
151
+ gap: "space.200"
152
152
  }, (0, _react2.jsx)(_dsExplorations.UNSAFE_Box, {
153
153
  alignItems: "start",
154
154
  UNSAFE_style: {
@@ -156,14 +156,14 @@ var Flag = function Flag(props) {
156
156
  flexShrink: 0
157
157
  }
158
158
  }, icon), (0, _react2.jsx)(_dsExplorations.UNSAFE_Stack, {
159
- gap: shouldRenderGap ? 'scale.100' : 'scale.0' // Gap exists even when not expanded due to Expander internals always being in the DOM
159
+ gap: shouldRenderGap ? 'space.100' : 'space.0' // Gap exists even when not expanded due to Expander internals always being in the DOM
160
160
  ,
161
161
  UNSAFE_style: {
162
162
  flexGrow: 1,
163
163
  transition: "gap 0.3s"
164
164
  }
165
165
  }, (0, _react2.jsx)(_dsExplorations.UNSAFE_Inline, {
166
- gap: "scale.100",
166
+ gap: "space.100",
167
167
  justifyContent: "spaceBetween"
168
168
  }, (0, _react2.jsx)(_dsExplorations.UNSAFE_Box, {
169
169
  display: "block",
@@ -172,7 +172,7 @@ var Flag = function Flag(props) {
172
172
  }
173
173
  }, (0, _react2.jsx)(_dsExplorations.UNSAFE_Text, {
174
174
  color: textColor,
175
- fontWeight: "600",
175
+ fontWeight: "semibold",
176
176
  UNSAFE_style: {
177
177
  overflowWrap: 'anywhere' // For cases where a single word is longer than the container (e.g. filenames)
178
178
 
@@ -49,7 +49,7 @@ var DismissButton = function DismissButton(_ref) {
49
49
  alignItems: "center",
50
50
  borderStyle: "none",
51
51
  borderRadius: "normal",
52
- padding: "scale.0",
52
+ padding: "space.0",
53
53
  width: "size.200",
54
54
  height: "size.200",
55
55
  onClick: onClick,
@@ -40,7 +40,7 @@ var Expander = function Expander(_ref) {
40
40
  width: '100%'
41
41
  }
42
42
  }, props), /*#__PURE__*/_react.default.createElement(_dsExplorations.UNSAFE_Stack, {
43
- gap: "scale.100"
43
+ gap: "space.100"
44
44
  }, children));
45
45
  })));
46
46
  }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "15.0.3",
3
+ "version": "15.0.5",
4
4
  "sideEffects": false
5
5
  }
@@ -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.0.3";
8
+ const packageVersion = "15.0.5";
9
9
  export const AUTO_DISMISS_SECONDS = 8;
10
10
  /**
11
11
  * __Auto dismiss flag__
@@ -13,7 +13,7 @@ const buttonStyles = css({
13
13
  padding: `0 ${gridSize}px !important`,
14
14
  background: `var(${VAR_BG_COLOR})`,
15
15
  color: `var(${VAR_COLOR}) !important`,
16
- fontWeight: 500
16
+ fontWeight: "var(--ds-font-weight-medium, 500)"
17
17
  },
18
18
  '&&:focus, a&&:focus': {
19
19
  boxShadow: `0 0 0 2px var(${VAR_FOCUS_COLOR})`
@@ -48,7 +48,7 @@ const FlagActions = props => {
48
48
 
49
49
  const isBold = appearance !== DEFAULT_APPEARANCE;
50
50
  return jsx(Inline, {
51
- gap: "scale.100",
51
+ gap: "space.100",
52
52
  flexWrap: "wrap",
53
53
  alignItems: "center",
54
54
  divider: isBold ? null : '·',
@@ -15,7 +15,7 @@ import { Expander, DismissButton } from './internal';
15
15
  const analyticsAttributes = {
16
16
  componentName: 'flag',
17
17
  packageName: "@atlaskit/flag",
18
- packageVersion: "15.0.3"
18
+ packageVersion: "15.0.5"
19
19
  };
20
20
  /**
21
21
  * __Flag__
@@ -101,7 +101,7 @@ const Flag = props => {
101
101
  display: "block",
102
102
  backgroundColor: flagBackgroundColor[appearance],
103
103
  shadow: "overlay",
104
- padding: "scale.200",
104
+ padding: "space.200",
105
105
  borderRadius: "normal",
106
106
  overflow: "hidden",
107
107
  layer: "flag",
@@ -113,7 +113,7 @@ const Flag = props => {
113
113
  tabIndex: 0,
114
114
  testId: testId
115
115
  }, autoDismissProps), jsx(Inline, {
116
- gap: "scale.200"
116
+ gap: "space.200"
117
117
  }, jsx(Box, {
118
118
  alignItems: "start",
119
119
  UNSAFE_style: {
@@ -121,14 +121,14 @@ const Flag = props => {
121
121
  flexShrink: 0
122
122
  }
123
123
  }, icon), jsx(Stack, {
124
- gap: shouldRenderGap ? 'scale.100' : 'scale.0' // Gap exists even when not expanded due to Expander internals always being in the DOM
124
+ gap: shouldRenderGap ? 'space.100' : 'space.0' // Gap exists even when not expanded due to Expander internals always being in the DOM
125
125
  ,
126
126
  UNSAFE_style: {
127
127
  flexGrow: 1,
128
128
  transition: `gap 0.3s`
129
129
  }
130
130
  }, jsx(Inline, {
131
- gap: "scale.100",
131
+ gap: "space.100",
132
132
  justifyContent: "spaceBetween"
133
133
  }, jsx(Box, {
134
134
  display: "block",
@@ -137,7 +137,7 @@ const Flag = props => {
137
137
  }
138
138
  }, jsx(Text, {
139
139
  color: textColor,
140
- fontWeight: "600",
140
+ fontWeight: "semibold",
141
141
  UNSAFE_style: {
142
142
  overflowWrap: 'anywhere' // For cases where a single word is longer than the container (e.g. filenames)
143
143
 
@@ -34,7 +34,7 @@ const DismissButton = ({
34
34
  alignItems: "center",
35
35
  borderStyle: "none",
36
36
  borderRadius: "normal",
37
- padding: "scale.0",
37
+ padding: "space.0",
38
38
  width: "size.200",
39
39
  height: "size.200",
40
40
  onClick: onClick,
@@ -28,7 +28,7 @@ const Expander = ({
28
28
  width: '100%'
29
29
  }
30
30
  }, props), /*#__PURE__*/React.createElement(Stack, {
31
- gap: "scale.100"
31
+ gap: "space.100"
32
32
  }, children)))));
33
33
  }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
34
34
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "15.0.3",
3
+ "version": "15.0.5",
4
4
  "sideEffects": false
5
5
  }
@@ -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.0.3";
8
+ var packageVersion = "15.0.5";
9
9
  export var AUTO_DISMISS_SECONDS = 8;
10
10
  /**
11
11
  * __Auto dismiss flag__
@@ -15,7 +15,7 @@ var buttonStyles = css({
15
15
  padding: "0 ".concat(gridSize, "px !important"),
16
16
  background: "var(".concat(VAR_BG_COLOR, ")"),
17
17
  color: "var(".concat(VAR_COLOR, ") !important"),
18
- fontWeight: 500
18
+ fontWeight: "var(--ds-font-weight-medium, 500)"
19
19
  },
20
20
  '&&:focus, a&&:focus': {
21
21
  boxShadow: "0 0 0 2px var(".concat(VAR_FOCUS_COLOR, ")")
@@ -50,7 +50,7 @@ var FlagActions = function FlagActions(props) {
50
50
 
51
51
  var isBold = appearance !== DEFAULT_APPEARANCE;
52
52
  return jsx(Inline, {
53
- gap: "scale.100",
53
+ gap: "space.100",
54
54
  flexWrap: "wrap",
55
55
  alignItems: "center",
56
56
  divider: isBold ? null : '·',
package/dist/esm/flag.js CHANGED
@@ -21,7 +21,7 @@ import { Expander, DismissButton } from './internal';
21
21
  var analyticsAttributes = {
22
22
  componentName: 'flag',
23
23
  packageName: "@atlaskit/flag",
24
- packageVersion: "15.0.3"
24
+ packageVersion: "15.0.5"
25
25
  };
26
26
  /**
27
27
  * __Flag__
@@ -115,7 +115,7 @@ var Flag = function Flag(props) {
115
115
  display: "block",
116
116
  backgroundColor: flagBackgroundColor[appearance],
117
117
  shadow: "overlay",
118
- padding: "scale.200",
118
+ padding: "space.200",
119
119
  borderRadius: "normal",
120
120
  overflow: "hidden",
121
121
  layer: "flag",
@@ -127,7 +127,7 @@ var Flag = function Flag(props) {
127
127
  tabIndex: 0,
128
128
  testId: testId
129
129
  }, autoDismissProps), jsx(Inline, {
130
- gap: "scale.200"
130
+ gap: "space.200"
131
131
  }, jsx(Box, {
132
132
  alignItems: "start",
133
133
  UNSAFE_style: {
@@ -135,14 +135,14 @@ var Flag = function Flag(props) {
135
135
  flexShrink: 0
136
136
  }
137
137
  }, icon), jsx(Stack, {
138
- gap: shouldRenderGap ? 'scale.100' : 'scale.0' // Gap exists even when not expanded due to Expander internals always being in the DOM
138
+ gap: shouldRenderGap ? 'space.100' : 'space.0' // Gap exists even when not expanded due to Expander internals always being in the DOM
139
139
  ,
140
140
  UNSAFE_style: {
141
141
  flexGrow: 1,
142
142
  transition: "gap 0.3s"
143
143
  }
144
144
  }, jsx(Inline, {
145
- gap: "scale.100",
145
+ gap: "space.100",
146
146
  justifyContent: "spaceBetween"
147
147
  }, jsx(Box, {
148
148
  display: "block",
@@ -151,7 +151,7 @@ var Flag = function Flag(props) {
151
151
  }
152
152
  }, jsx(Text, {
153
153
  color: textColor,
154
- fontWeight: "600",
154
+ fontWeight: "semibold",
155
155
  UNSAFE_style: {
156
156
  overflowWrap: 'anywhere' // For cases where a single word is longer than the container (e.g. filenames)
157
157
 
@@ -33,7 +33,7 @@ var DismissButton = function DismissButton(_ref) {
33
33
  alignItems: "center",
34
34
  borderStyle: "none",
35
35
  borderRadius: "normal",
36
- padding: "scale.0",
36
+ padding: "space.0",
37
37
  width: "size.200",
38
38
  height: "size.200",
39
39
  onClick: onClick,
@@ -28,7 +28,7 @@ var Expander = function Expander(_ref) {
28
28
  width: '100%'
29
29
  }
30
30
  }, props), /*#__PURE__*/React.createElement(Stack, {
31
- gap: "scale.100"
31
+ gap: "space.100"
32
32
  }, children));
33
33
  })));
34
34
  }; // eslint-disable-next-line @repo/internal/react/require-jsdoc
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "15.0.3",
3
+ "version": "15.0.5",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/flag",
3
- "version": "15.0.3",
3
+ "version": "15.0.5",
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/"
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@atlaskit/analytics-next": "^8.0.0",
39
39
  "@atlaskit/button": "^16.5.0",
40
- "@atlaskit/ds-explorations": "^1.0.0",
40
+ "@atlaskit/ds-explorations": "^2.0.0",
41
41
  "@atlaskit/ds-lib": "^2.1.0",
42
42
  "@atlaskit/focus-ring": "^1.2.0",
43
43
  "@atlaskit/icon": "^21.11.0",
package/report.api.md CHANGED
@@ -8,6 +8,7 @@
8
8
  ### Table of contents
9
9
 
10
10
  - [Main Entry Types](#main-entry-types)
11
+ - [Peer Dependencies](#peer-dependencies)
11
12
 
12
13
  ### Main Entry Types
13
14
 
@@ -158,3 +159,15 @@ export const withFlagsProvider: (
158
159
  ```
159
160
 
160
161
  <!--SECTION END: Main Entry Types-->
162
+
163
+ ### Peer Dependencies
164
+
165
+ <!--SECTION START: Peer Dependencies-->
166
+
167
+ ```json
168
+ {
169
+ "react": "^16.8.0"
170
+ }
171
+ ```
172
+
173
+ <!--SECTION END: Peer Dependencies-->