@atlaskit/popup 1.22.0 → 1.22.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/popup
2
2
 
3
+ ## 1.22.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 1.22.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`49e0363439f7c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/49e0363439f7c) -
14
+ [ux] Content inside of a Popup will now always have it's text color reset to `color.text`.
15
+ Previously, the text color of Popup content would be `color.text` if rendering into a
16
+ [portal](https://react.dev/reference/react-dom/createPortal) `shouldRenderToParent={true}` or
17
+ `shouldFitContainer={true}`, but otherwise would inherit the text color of the parent element. We
18
+ have made this change to improve consistency and avoid surprises when working with Popup.
19
+
3
20
  ## 1.22.0
4
21
 
5
22
  ### Minor Changes
@@ -38,7 +38,11 @@ var popupStyles = (0, _react2.css)((_css = {
38
38
  flex: '1 1 auto',
39
39
  backgroundColor: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
40
40
  borderRadius: "var(--ds-border-radius, 3px)",
41
- boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")")
41
+ boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")"),
42
+ // Resetting text color for portal content.
43
+ // Otherwise, when rendering into the parent (not using a portal),
44
+ // the text color can be inherited from the parent.
45
+ color: "var(--ds-text, #172B4D)"
42
46
  }, (0, _defineProperty2.default)(_css, _tokens.CURRENT_SURFACE_CSS_VAR, "var(--ds-surface-overlay, ".concat(_colors.N0, ")")), (0, _defineProperty2.default)(_css, '&:focus', {
43
47
  outline: 'none'
44
48
  }), _css));
@@ -27,6 +27,10 @@ const popupStyles = css({
27
27
  backgroundColor: `var(--ds-surface-overlay, ${N0})`,
28
28
  borderRadius: "var(--ds-border-radius, 3px)",
29
29
  boxShadow: `var(--ds-shadow-overlay, ${`0 4px 8px -2px ${N50A}, 0 0 1px ${N60A}`})`,
30
+ // Resetting text color for portal content.
31
+ // Otherwise, when rendering into the parent (not using a portal),
32
+ // the text color can be inherited from the parent.
33
+ color: "var(--ds-text, #172B4D)",
30
34
  [CURRENT_SURFACE_CSS_VAR]: `var(--ds-surface-overlay, ${N0})`,
31
35
  '&:focus': {
32
36
  outline: 'none'
@@ -32,7 +32,11 @@ var popupStyles = css((_css = {
32
32
  flex: '1 1 auto',
33
33
  backgroundColor: "var(--ds-surface-overlay, ".concat(N0, ")"),
34
34
  borderRadius: "var(--ds-border-radius, 3px)",
35
- boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")")
35
+ boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"),
36
+ // Resetting text color for portal content.
37
+ // Otherwise, when rendering into the parent (not using a portal),
38
+ // the text color can be inherited from the parent.
39
+ color: "var(--ds-text, #172B4D)"
36
40
  }, _defineProperty(_css, CURRENT_SURFACE_CSS_VAR, "var(--ds-surface-overlay, ".concat(N0, ")")), _defineProperty(_css, '&:focus', {
37
41
  outline: 'none'
38
42
  }), _css));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/popup",
3
- "version": "1.22.0",
3
+ "version": "1.22.2",
4
4
  "description": "A popup displays brief content in an overlay.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -44,9 +44,9 @@
44
44
  "@atlaskit/layering": "^0.4.0",
45
45
  "@atlaskit/platform-feature-flags": "^0.3.0",
46
46
  "@atlaskit/popper": "^6.2.0",
47
- "@atlaskit/portal": "^4.8.0",
47
+ "@atlaskit/portal": "^4.9.0",
48
48
  "@atlaskit/primitives": "^12.0.0",
49
- "@atlaskit/theme": "^12.12.0",
49
+ "@atlaskit/theme": "^13.0.0",
50
50
  "@atlaskit/tokens": "^1.58.0",
51
51
  "@babel/runtime": "^7.0.0",
52
52
  "@emotion/react": "^11.7.1",