@atlaskit/navigation-system 10.8.0 → 10.9.1

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,48 @@
1
1
  # @atlassian/navigation-system
2
2
 
3
+ ## 10.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ae45184d2cd0b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ae45184d2cd0b) -
8
+ Fix `Panel` enter/exit animation so a panel with a default width of `0` starts hidden instead of
9
+ flashing visible. The panel now uses `useMotion`'s new `initialState` to begin in the `hidden`
10
+ state (behind the `platform-dst-motion-uplift-panel` gate). The `animationFillMode` overrides on
11
+ the entering/exiting styles have been removed, as this is now set within the motion tokens
12
+ themselves.
13
+
14
+ Additionally, a `overflow: hidden` rule is now applied to the page layout root (behind the same
15
+ `platform-dst-motion-uplift-panel` gate) so that the panel transforming off screen no longer
16
+ causes scroll bars to appear.
17
+
18
+ - Updated dependencies
19
+
20
+ ## 10.9.0
21
+
22
+ ### Minor Changes
23
+
24
+ - [`994b264c96af8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/994b264c96af8) -
25
+ `AppLogo` now accepts an optional `secondaryName` prop, which renders supporting text below the
26
+ app name in wider viewports. This can be used to provide extra context for an app or experience
27
+ while keeping the existing `name`, `label`, and small-screen behavior unchanged.
28
+
29
+ ```tsx
30
+ import { ConfluenceIcon } from '@atlaskit/logo/confluence-icon';
31
+ import { AppLogo } from '@atlaskit/navigation-system/top-nav-items';
32
+
33
+ <AppLogo
34
+ href="http://www.atlassian.design"
35
+ icon={ConfluenceIcon}
36
+ name="Confluence"
37
+ secondaryName="Documentation"
38
+ label="Home page"
39
+ />;
40
+ ```
41
+
42
+ ### Patch Changes
43
+
44
+ - Updated dependencies
45
+
3
46
  ## 10.8.0
4
47
 
5
48
  ### Minor Changes
@@ -171,10 +171,7 @@ A button component that supports theming. The following variants are available:
171
171
  Use this component when you need to add buttons to the top nav. Be aware that adding custom buttons
172
172
  may negatively impact the consistency across apps.
173
173
 
174
- <Example
175
- Component={TopNavButtonExample}
176
- featureFlagDefaults={{ 'platform-dst-motion-uplift-button': true }}
177
- />
174
+ <Example Component={TopNavButtonExample} />
178
175
 
179
176
  ## Responsive
180
177
 
@@ -7,8 +7,6 @@
7
7
  ._18m91wug{overflow-y:auto}
8
8
  ._1bsb1dxx{width:min(90%,var(--minWidth))}
9
9
  ._1e0cglyw{display:none}
10
- ._1o51eoah{animation-fill-mode:backwards}
11
- ._1o51q7pw{animation-fill-mode:forwards}
12
10
  ._1pbykb7n{z-index:1}
13
11
  ._1reo1wug{overflow-x:auto}
14
12
  ._4t3i1osq{height:100%}
@@ -44,8 +44,8 @@ var styles = {
44
44
  border: "_191wglyw _16qs130s _1w6eia51 _scbpglyw",
45
45
  scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
46
46
  hidden: "_1e0cglyw",
47
- entering: "_y44v1s3l _1o51eoah",
48
- exiting: "_y44vqhwn _1o51q7pw"
47
+ entering: "_y44v1s3l",
48
+ exiting: "_y44vqhwn"
49
49
  };
50
50
 
51
51
  /**
@@ -73,6 +73,12 @@ function Panel(_ref) {
73
73
  var id = (0, _useLayoutId.useLayoutId)({
74
74
  providedId: providedId
75
75
  });
76
+ var isMotionUpliftEnabled = (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-panel');
77
+ var defaultWidth = (0, _useSafeDefaultWidth.useSafeDefaultWidth)({
78
+ defaultWidthProp: defaultWidthProp,
79
+ fallbackDefaultWidth: fallbackDefaultWidth,
80
+ slotName: 'Panel'
81
+ });
76
82
 
77
83
  // useMotion is applied only when the `platform-dst-motion-uplift-panel` gate is enabled.
78
84
  var _useMotion = (0, _useMotion2.useMotion)({
@@ -81,17 +87,12 @@ function Panel(_ref) {
81
87
  // Set width to 0 as animation is complete
82
88
  setWidth(0);
83
89
  }
84
- }
90
+ },
91
+ initialState: defaultWidth === 0 ? 'hidden' : undefined
85
92
  }),
86
93
  state = _useMotion.state,
87
94
  motionRef = _useMotion.ref,
88
95
  reanimate = _useMotion.reanimate;
89
- var isMotionUpliftEnabled = (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-panel');
90
- var defaultWidth = (0, _useSafeDefaultWidth.useSafeDefaultWidth)({
91
- defaultWidthProp: defaultWidthProp,
92
- fallbackDefaultWidth: fallbackDefaultWidth,
93
- slotName: 'Panel'
94
- });
95
96
 
96
97
  /**
97
98
  * Don't show the skip link if the slot has 0 width.
@@ -199,7 +200,7 @@ function Panel(_ref) {
199
200
  ,
200
201
  className: (0, _runtime.ax)([styles.root, !isMotionUpliftEnabled && defaultWidth === 0 && styles.hidden, hasBorder && styles.border, isMotionUpliftEnabled ?
201
202
  // eslint-disable-next-line @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
202
- (0, _react2.cx)(xcss, state === 'entering' && styles.entering, state === 'exiting' && styles.exiting) : xcss]),
203
+ (0, _react2.cx)(xcss, state === 'hidden' && styles.hidden, state === 'entering' && styles.entering, state === 'exiting' && styles.exiting) : xcss]),
203
204
  style: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.panelVar, panelVariableWidth), '--minWidth', "".concat(minWidth, "px")),
204
205
  "data-testid": testId,
205
206
  ref: mergedRef
@@ -1,6 +1,8 @@
1
+ ._18m915vq{overflow-y:hidden}
1
2
  ._1ciragmp >:not([data-layout-slot]){display:none!important}
2
3
  ._1e0c11p5{display:grid}
3
4
  ._1lmcq9em{grid-template-areas:"banner" "top-bar" "main" "aside"}
5
+ ._1reo15vq{overflow-x:hidden}
4
6
  ._1tke1kxc{min-height:100vh}
5
7
  ._1tvnagmp >:not([data-layout-slot]):not(dialog):not([popover]){display:none!important}
6
8
  ._2z0516ab{grid-template-rows:auto auto 1fr auto}
@@ -25,7 +25,8 @@ var gridRootId = exports.gridRootId = 'unsafe-design-system-page-layout-root';
25
25
  var styles = {
26
26
  root: "_1e0c11p5 _1tke1kxc _1lmcq9em _yv0ei47z _2z0516ab _12fk1aio _12qzrxre _1rqteala _xkmgks3h _jbc7rxre _tyve1nco",
27
27
  safetyRail: "_1ciragmp",
28
- safetyRailWithTopLayer: "_1tvnagmp"
28
+ safetyRailWithTopLayer: "_1tvnagmp",
29
+ panelUplift: "_1reo15vq _18m915vq"
29
30
  };
30
31
 
31
32
  /**
@@ -74,7 +75,7 @@ function Root(_ref) {
74
75
  testId: testId
75
76
  }, /*#__PURE__*/_react.default.createElement("div", {
76
77
  ref: ref,
77
- className: (0, _runtime.ax)([styles.root, (0, _platformFeatureFlags.fg)('platform-dst-top-layer') ? styles.safetyRailWithTopLayer : styles.safetyRail, xcss]),
78
+ className: (0, _runtime.ax)([styles.root, (0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-panel') && styles.panelUplift, (0, _platformFeatureFlags.fg)('platform-dst-top-layer') ? styles.safetyRailWithTopLayer : styles.safetyRail, xcss]),
78
79
  id: gridRootId,
79
80
  "data-testid": testId
80
81
  }, children)))))))));
@@ -1,14 +1,17 @@
1
1
  ._2rko19bv{border-radius:10px}
2
2
  ._2rko1mok{border-radius:var(--ds-radius-large,8px)}
3
3
  ._18zr1b66{padding-inline:var(--ds-space-050,4px)}._18m915vq{overflow-y:hidden}
4
+ ._1bah1h6o{justify-content:center}
4
5
  ._1bsb1ris{width:max-content}
5
6
  ._1e0c1txw{display:flex}
6
7
  ._1e0cglyw{display:none}
7
8
  ._1o9zidpf{flex-shrink:0}
8
9
  ._1o9zkb7n{flex-shrink:1}
10
+ ._1pfh1i6y{margin-block-start:var(--ds-space-negative-025,-2px)}
9
11
  ._1reo15vq{overflow-x:hidden}
10
12
  ._1toh1r31._1toh1r31{text-decoration-color:currentColor}
11
13
  ._1w901kw7._1w901kw7{color:inherit}
14
+ ._2lx21bp4{flex-direction:column}
12
15
  ._4cvr1h6o{align-items:center}
13
16
  ._4t3izwfg{height:2pc}
14
17
  ._5jyqglyw._5jyqglyw{text-decoration-line:none}
@@ -24,4 +27,4 @@
24
27
  ._irr31rps:hover{background-color:var(--ds-top-bar-button-background-hovered)}
25
28
  ._1di69yc7:active{background-color:var(--ds-background-neutral-subtle-pressed,#0b120e24)!important}
26
29
  ._1di6yhlj:active{background-color:var(--ds-top-bar-button-background-pressed)!important}
27
- @media (min-width:64rem){._10y418uv._10y418uv{display:initial}}
30
+ @media (min-width:64rem){._10y41txw._10y41txw{display:flex}}
@@ -34,14 +34,16 @@ var iconContainerStyles = {
34
34
  fullHeightSidebar: "_1o9zidpf"
35
35
  };
36
36
  var logoTextStyles = {
37
- root: "_1bsb1ris _p12fnklw _uiztglyw _y4tiv77o _1e0cglyw _10y418uv"
37
+ root: "_1bsb1ris _p12fnklw _uiztglyw _y4tiv77o _1e0cglyw _2lx21bp4 _1bah1h6o _10y41txw"
38
+ };
39
+ var secondaryNameStyles = {
40
+ root: "_1pfh1i6y"
38
41
  };
39
42
  function isTextClamped(element) {
40
43
  // Checking for vertical height rather than horizontal height.
41
44
  // When text is "clamped", it's technically being clamped vertically! 🤯
42
45
  return element.scrollHeight > element.clientHeight;
43
46
  }
44
-
45
47
  /**
46
48
  * __App logo__
47
49
  *
@@ -52,6 +54,7 @@ function isTextClamped(element) {
52
54
  var AppLogo = exports.AppLogo = function AppLogo(_ref) {
53
55
  var name = _ref.name,
54
56
  label = _ref.label,
57
+ secondaryName = _ref.secondaryName,
55
58
  href = _ref.href,
56
59
  icon = _ref.icon,
57
60
  onClick = _ref.onClick;
@@ -59,6 +62,7 @@ var AppLogo = exports.AppLogo = function AppLogo(_ref) {
59
62
  var ref = (0, _react.useRef)(null);
60
63
  var nameRef = (0, _react.useRef)(null);
61
64
  var hasCustomTheme = (0, _hasCustomThemeContext.useHasCustomTheme)();
65
+ var showSecondaryName = Boolean(secondaryName) && (0, _platformFeatureFlags.fg)('platform_dst_ads_appswitcher_improvements');
62
66
 
63
67
  /**
64
68
  * Show the tooltip if the name is truncated
@@ -107,5 +111,13 @@ var AppLogo = exports.AppLogo = function AppLogo(_ref) {
107
111
  maxLines: 1,
108
112
  ref: nameRef
109
113
  }, name));
110
- }))));
114
+ }), showSecondaryName && /*#__PURE__*/_react.default.createElement("span", {
115
+ className: (0, _runtime.ax)([secondaryNameStyles.root])
116
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
117
+ "aria-hidden": true,
118
+ color: "color.text.subtlest",
119
+ weight: "regular",
120
+ maxLines: 1,
121
+ size: "small"
122
+ }, secondaryName)))));
111
123
  };
@@ -7,8 +7,6 @@
7
7
  ._18m91wug{overflow-y:auto}
8
8
  ._1bsb1dxx{width:min(90%,var(--minWidth))}
9
9
  ._1e0cglyw{display:none}
10
- ._1o51eoah{animation-fill-mode:backwards}
11
- ._1o51q7pw{animation-fill-mode:forwards}
12
10
  ._1pbykb7n{z-index:1}
13
11
  ._1reo1wug{overflow-x:auto}
14
12
  ._4t3i1osq{height:100%}
@@ -33,8 +33,8 @@ const styles = {
33
33
  border: "_191wglyw _16qs130s _1w6eia51 _scbpglyw",
34
34
  scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
35
35
  hidden: "_1e0cglyw",
36
- entering: "_y44v1s3l _1o51eoah",
37
- exiting: "_y44vqhwn _1o51q7pw"
36
+ entering: "_y44v1s3l",
37
+ exiting: "_y44vqhwn"
38
38
  };
39
39
 
40
40
  /**
@@ -59,6 +59,12 @@ export function Panel({
59
59
  const id = useLayoutId({
60
60
  providedId
61
61
  });
62
+ const isMotionUpliftEnabled = fg('platform-dst-motion-uplift-panel');
63
+ const defaultWidth = useSafeDefaultWidth({
64
+ defaultWidthProp,
65
+ fallbackDefaultWidth,
66
+ slotName: 'Panel'
67
+ });
62
68
 
63
69
  // useMotion is applied only when the `platform-dst-motion-uplift-panel` gate is enabled.
64
70
  const {
@@ -71,13 +77,8 @@ export function Panel({
71
77
  // Set width to 0 as animation is complete
72
78
  setWidth(0);
73
79
  }
74
- }
75
- });
76
- const isMotionUpliftEnabled = fg('platform-dst-motion-uplift-panel');
77
- const defaultWidth = useSafeDefaultWidth({
78
- defaultWidthProp,
79
- fallbackDefaultWidth,
80
- slotName: 'Panel'
80
+ },
81
+ initialState: defaultWidth === 0 ? 'hidden' : undefined
81
82
  });
82
83
 
83
84
  /**
@@ -181,7 +182,7 @@ export function Panel({
181
182
  ,
182
183
  className: ax([styles.root, !isMotionUpliftEnabled && defaultWidth === 0 && styles.hidden, hasBorder && styles.border, isMotionUpliftEnabled ?
183
184
  // eslint-disable-next-line @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
184
- cx(xcss, state === 'entering' && styles.entering, state === 'exiting' && styles.exiting) : xcss]),
185
+ cx(xcss, state === 'hidden' && styles.hidden, state === 'entering' && styles.entering, state === 'exiting' && styles.exiting) : xcss]),
185
186
  style: {
186
187
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values
187
188
  [panelVar]: panelVariableWidth,
@@ -1,6 +1,8 @@
1
+ ._18m915vq{overflow-y:hidden}
1
2
  ._1ciragmp >:not([data-layout-slot]){display:none!important}
2
3
  ._1e0c11p5{display:grid}
3
4
  ._1lmcq9em{grid-template-areas:"banner" "top-bar" "main" "aside"}
5
+ ._1reo15vq{overflow-x:hidden}
4
6
  ._1tke1kxc{min-height:100vh}
5
7
  ._1tvnagmp >:not([data-layout-slot]):not(dialog):not([popover]){display:none!important}
6
8
  ._2z0516ab{grid-template-rows:auto auto 1fr auto}
@@ -17,7 +17,8 @@ export const gridRootId = 'unsafe-design-system-page-layout-root';
17
17
  const styles = {
18
18
  root: "_1e0c11p5 _1tke1kxc _1lmcq9em _yv0ei47z _2z0516ab _12fk1aio _12qzrxre _1rqteala _xkmgks3h _jbc7rxre _tyve1nco",
19
19
  safetyRail: "_1ciragmp",
20
- safetyRailWithTopLayer: "_1tvnagmp"
20
+ safetyRailWithTopLayer: "_1tvnagmp",
21
+ panelUplift: "_1reo15vq _18m915vq"
21
22
  };
22
23
 
23
24
  /**
@@ -72,7 +73,7 @@ This message will not be displayed in production.
72
73
  testId: testId
73
74
  }, /*#__PURE__*/React.createElement("div", {
74
75
  ref: ref,
75
- className: ax([styles.root, fg('platform-dst-top-layer') ? styles.safetyRailWithTopLayer : styles.safetyRail, xcss]),
76
+ className: ax([styles.root, fg('platform-dst-motion-uplift-panel') && styles.panelUplift, fg('platform-dst-top-layer') ? styles.safetyRailWithTopLayer : styles.safetyRail, xcss]),
76
77
  id: gridRootId,
77
78
  "data-testid": testId
78
79
  }, children)))))))));
@@ -1,14 +1,17 @@
1
1
  ._2rko19bv{border-radius:10px}
2
2
  ._2rko1mok{border-radius:var(--ds-radius-large,8px)}
3
3
  ._18zr1b66{padding-inline:var(--ds-space-050,4px)}._18m915vq{overflow-y:hidden}
4
+ ._1bah1h6o{justify-content:center}
4
5
  ._1bsb1ris{width:max-content}
5
6
  ._1e0c1txw{display:flex}
6
7
  ._1e0cglyw{display:none}
7
8
  ._1o9zidpf{flex-shrink:0}
8
9
  ._1o9zkb7n{flex-shrink:1}
10
+ ._1pfh1i6y{margin-block-start:var(--ds-space-negative-025,-2px)}
9
11
  ._1reo15vq{overflow-x:hidden}
10
12
  ._1toh1r31._1toh1r31{text-decoration-color:currentColor}
11
13
  ._1w901kw7._1w901kw7{color:inherit}
14
+ ._2lx21bp4{flex-direction:column}
12
15
  ._4cvr1h6o{align-items:center}
13
16
  ._4t3izwfg{height:2pc}
14
17
  ._5jyqglyw._5jyqglyw{text-decoration-line:none}
@@ -24,4 +27,4 @@
24
27
  ._irr31rps:hover{background-color:var(--ds-top-bar-button-background-hovered)}
25
28
  ._1di69yc7:active{background-color:var(--ds-background-neutral-subtle-pressed,#0b120e24)!important}
26
29
  ._1di6yhlj:active{background-color:var(--ds-top-bar-button-background-pressed)!important}
27
- @media (min-width:64rem){._10y418uv._10y418uv{display:initial}}
30
+ @media (min-width:64rem){._10y41txw._10y41txw{display:flex}}
@@ -25,14 +25,16 @@ const iconContainerStyles = {
25
25
  fullHeightSidebar: "_1o9zidpf"
26
26
  };
27
27
  const logoTextStyles = {
28
- root: "_1bsb1ris _p12fnklw _uiztglyw _y4tiv77o _1e0cglyw _10y418uv"
28
+ root: "_1bsb1ris _p12fnklw _uiztglyw _y4tiv77o _1e0cglyw _2lx21bp4 _1bah1h6o _10y41txw"
29
+ };
30
+ const secondaryNameStyles = {
31
+ root: "_1pfh1i6y"
29
32
  };
30
33
  function isTextClamped(element) {
31
34
  // Checking for vertical height rather than horizontal height.
32
35
  // When text is "clamped", it's technically being clamped vertically! 🤯
33
36
  return element.scrollHeight > element.clientHeight;
34
37
  }
35
-
36
38
  /**
37
39
  * __App logo__
38
40
  *
@@ -43,6 +45,7 @@ function isTextClamped(element) {
43
45
  export const AppLogo = ({
44
46
  name,
45
47
  label,
48
+ secondaryName,
46
49
  href,
47
50
  icon,
48
51
  onClick
@@ -51,6 +54,7 @@ export const AppLogo = ({
51
54
  const ref = useRef(null);
52
55
  const nameRef = useRef(null);
53
56
  const hasCustomTheme = useHasCustomTheme();
57
+ const showSecondaryName = Boolean(secondaryName) && fg('platform_dst_ads_appswitcher_improvements');
54
58
 
55
59
  /**
56
60
  * Show the tooltip if the name is truncated
@@ -97,5 +101,13 @@ export const AppLogo = ({
97
101
  weight: "semibold",
98
102
  maxLines: 1,
99
103
  ref: nameRef
100
- }, name))))));
104
+ }, name))), showSecondaryName && /*#__PURE__*/React.createElement("span", {
105
+ className: ax([secondaryNameStyles.root])
106
+ }, /*#__PURE__*/React.createElement(Text, {
107
+ "aria-hidden": true,
108
+ color: "color.text.subtlest",
109
+ weight: "regular",
110
+ maxLines: 1,
111
+ size: "small"
112
+ }, secondaryName)))));
101
113
  };
@@ -7,8 +7,6 @@
7
7
  ._18m91wug{overflow-y:auto}
8
8
  ._1bsb1dxx{width:min(90%,var(--minWidth))}
9
9
  ._1e0cglyw{display:none}
10
- ._1o51eoah{animation-fill-mode:backwards}
11
- ._1o51q7pw{animation-fill-mode:forwards}
12
10
  ._1pbykb7n{z-index:1}
13
11
  ._1reo1wug{overflow-x:auto}
14
12
  ._4t3i1osq{height:100%}
@@ -35,8 +35,8 @@ var styles = {
35
35
  border: "_191wglyw _16qs130s _1w6eia51 _scbpglyw",
36
36
  scrollContainer: "_1reo1wug _18m91wug _4t3i1osq",
37
37
  hidden: "_1e0cglyw",
38
- entering: "_y44v1s3l _1o51eoah",
39
- exiting: "_y44vqhwn _1o51q7pw"
38
+ entering: "_y44v1s3l",
39
+ exiting: "_y44vqhwn"
40
40
  };
41
41
 
42
42
  /**
@@ -64,6 +64,12 @@ export function Panel(_ref) {
64
64
  var id = useLayoutId({
65
65
  providedId: providedId
66
66
  });
67
+ var isMotionUpliftEnabled = fg('platform-dst-motion-uplift-panel');
68
+ var defaultWidth = useSafeDefaultWidth({
69
+ defaultWidthProp: defaultWidthProp,
70
+ fallbackDefaultWidth: fallbackDefaultWidth,
71
+ slotName: 'Panel'
72
+ });
67
73
 
68
74
  // useMotion is applied only when the `platform-dst-motion-uplift-panel` gate is enabled.
69
75
  var _useMotion = useMotion({
@@ -72,17 +78,12 @@ export function Panel(_ref) {
72
78
  // Set width to 0 as animation is complete
73
79
  setWidth(0);
74
80
  }
75
- }
81
+ },
82
+ initialState: defaultWidth === 0 ? 'hidden' : undefined
76
83
  }),
77
84
  state = _useMotion.state,
78
85
  motionRef = _useMotion.ref,
79
86
  reanimate = _useMotion.reanimate;
80
- var isMotionUpliftEnabled = fg('platform-dst-motion-uplift-panel');
81
- var defaultWidth = useSafeDefaultWidth({
82
- defaultWidthProp: defaultWidthProp,
83
- fallbackDefaultWidth: fallbackDefaultWidth,
84
- slotName: 'Panel'
85
- });
86
87
 
87
88
  /**
88
89
  * Don't show the skip link if the slot has 0 width.
@@ -190,7 +191,7 @@ export function Panel(_ref) {
190
191
  ,
191
192
  className: ax([styles.root, !isMotionUpliftEnabled && defaultWidth === 0 && styles.hidden, hasBorder && styles.border, isMotionUpliftEnabled ?
192
193
  // eslint-disable-next-line @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
193
- cx(xcss, state === 'entering' && styles.entering, state === 'exiting' && styles.exiting) : xcss]),
194
+ cx(xcss, state === 'hidden' && styles.hidden, state === 'entering' && styles.entering, state === 'exiting' && styles.exiting) : xcss]),
194
195
  style: _defineProperty(_defineProperty({}, panelVar, panelVariableWidth), '--minWidth', "".concat(minWidth, "px")),
195
196
  "data-testid": testId,
196
197
  ref: mergedRef
@@ -1,6 +1,8 @@
1
+ ._18m915vq{overflow-y:hidden}
1
2
  ._1ciragmp >:not([data-layout-slot]){display:none!important}
2
3
  ._1e0c11p5{display:grid}
3
4
  ._1lmcq9em{grid-template-areas:"banner" "top-bar" "main" "aside"}
5
+ ._1reo15vq{overflow-x:hidden}
4
6
  ._1tke1kxc{min-height:100vh}
5
7
  ._1tvnagmp >:not([data-layout-slot]):not(dialog):not([popover]){display:none!important}
6
8
  ._2z0516ab{grid-template-rows:auto auto 1fr auto}
@@ -17,7 +17,8 @@ export var gridRootId = 'unsafe-design-system-page-layout-root';
17
17
  var styles = {
18
18
  root: "_1e0c11p5 _1tke1kxc _1lmcq9em _yv0ei47z _2z0516ab _12fk1aio _12qzrxre _1rqteala _xkmgks3h _jbc7rxre _tyve1nco",
19
19
  safetyRail: "_1ciragmp",
20
- safetyRailWithTopLayer: "_1tvnagmp"
20
+ safetyRailWithTopLayer: "_1tvnagmp",
21
+ panelUplift: "_1reo15vq _18m915vq"
21
22
  };
22
23
 
23
24
  /**
@@ -66,7 +67,7 @@ export function Root(_ref) {
66
67
  testId: testId
67
68
  }, /*#__PURE__*/React.createElement("div", {
68
69
  ref: ref,
69
- className: ax([styles.root, fg('platform-dst-top-layer') ? styles.safetyRailWithTopLayer : styles.safetyRail, xcss]),
70
+ className: ax([styles.root, fg('platform-dst-motion-uplift-panel') && styles.panelUplift, fg('platform-dst-top-layer') ? styles.safetyRailWithTopLayer : styles.safetyRail, xcss]),
70
71
  id: gridRootId,
71
72
  "data-testid": testId
72
73
  }, children)))))))));
@@ -1,14 +1,17 @@
1
1
  ._2rko19bv{border-radius:10px}
2
2
  ._2rko1mok{border-radius:var(--ds-radius-large,8px)}
3
3
  ._18zr1b66{padding-inline:var(--ds-space-050,4px)}._18m915vq{overflow-y:hidden}
4
+ ._1bah1h6o{justify-content:center}
4
5
  ._1bsb1ris{width:max-content}
5
6
  ._1e0c1txw{display:flex}
6
7
  ._1e0cglyw{display:none}
7
8
  ._1o9zidpf{flex-shrink:0}
8
9
  ._1o9zkb7n{flex-shrink:1}
10
+ ._1pfh1i6y{margin-block-start:var(--ds-space-negative-025,-2px)}
9
11
  ._1reo15vq{overflow-x:hidden}
10
12
  ._1toh1r31._1toh1r31{text-decoration-color:currentColor}
11
13
  ._1w901kw7._1w901kw7{color:inherit}
14
+ ._2lx21bp4{flex-direction:column}
12
15
  ._4cvr1h6o{align-items:center}
13
16
  ._4t3izwfg{height:2pc}
14
17
  ._5jyqglyw._5jyqglyw{text-decoration-line:none}
@@ -24,4 +27,4 @@
24
27
  ._irr31rps:hover{background-color:var(--ds-top-bar-button-background-hovered)}
25
28
  ._1di69yc7:active{background-color:var(--ds-background-neutral-subtle-pressed,#0b120e24)!important}
26
29
  ._1di6yhlj:active{background-color:var(--ds-top-bar-button-background-pressed)!important}
27
- @media (min-width:64rem){._10y418uv._10y418uv{display:initial}}
30
+ @media (min-width:64rem){._10y41txw._10y41txw{display:flex}}
@@ -25,14 +25,16 @@ var iconContainerStyles = {
25
25
  fullHeightSidebar: "_1o9zidpf"
26
26
  };
27
27
  var logoTextStyles = {
28
- root: "_1bsb1ris _p12fnklw _uiztglyw _y4tiv77o _1e0cglyw _10y418uv"
28
+ root: "_1bsb1ris _p12fnklw _uiztglyw _y4tiv77o _1e0cglyw _2lx21bp4 _1bah1h6o _10y41txw"
29
+ };
30
+ var secondaryNameStyles = {
31
+ root: "_1pfh1i6y"
29
32
  };
30
33
  function isTextClamped(element) {
31
34
  // Checking for vertical height rather than horizontal height.
32
35
  // When text is "clamped", it's technically being clamped vertically! 🤯
33
36
  return element.scrollHeight > element.clientHeight;
34
37
  }
35
-
36
38
  /**
37
39
  * __App logo__
38
40
  *
@@ -43,6 +45,7 @@ function isTextClamped(element) {
43
45
  export var AppLogo = function AppLogo(_ref) {
44
46
  var name = _ref.name,
45
47
  label = _ref.label,
48
+ secondaryName = _ref.secondaryName,
46
49
  href = _ref.href,
47
50
  icon = _ref.icon,
48
51
  onClick = _ref.onClick;
@@ -50,6 +53,7 @@ export var AppLogo = function AppLogo(_ref) {
50
53
  var ref = useRef(null);
51
54
  var nameRef = useRef(null);
52
55
  var hasCustomTheme = useHasCustomTheme();
56
+ var showSecondaryName = Boolean(secondaryName) && fg('platform_dst_ads_appswitcher_improvements');
53
57
 
54
58
  /**
55
59
  * Show the tooltip if the name is truncated
@@ -98,5 +102,13 @@ export var AppLogo = function AppLogo(_ref) {
98
102
  maxLines: 1,
99
103
  ref: nameRef
100
104
  }, name));
101
- }))));
105
+ }), showSecondaryName && /*#__PURE__*/React.createElement("span", {
106
+ className: ax([secondaryNameStyles.root])
107
+ }, /*#__PURE__*/React.createElement(Text, {
108
+ "aria-hidden": true,
109
+ color: "color.text.subtlest",
110
+ weight: "regular",
111
+ maxLines: 1,
112
+ size: "small"
113
+ }, secondaryName)))));
102
114
  };
@@ -3,6 +3,6 @@ export declare const getWidthFromDragLocation: ({ initialWidth, location, initia
3
3
  initialWidth: number;
4
4
  location: DragLocationHistory;
5
5
  initialClientX: number;
6
- direction: "ltr" | "rtl";
7
- position: "start" | "end";
6
+ direction: 'ltr' | 'rtl';
7
+ position: 'start' | 'end';
8
8
  }) => number;
@@ -4,18 +4,15 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import type { LogoProps } from '@atlaskit/logo';
7
- /**
8
- * __App logo__
9
- *
10
- * The app logo for the top navigation.
11
- *
12
- * To provide a responsive experience, label text will render next to an icon at larger viewports.
13
- */
14
- export declare const AppLogo: ({ name, label, href, icon, onClick, }: {
7
+ interface AppLogoProps {
15
8
  /**
16
- * The name of the app. Will be displayed next to the logo in wider viewports, and is used as an accessible label at smaller viewports.
9
+ * The name of the app. Will be displayed next to the logo in wider viewports.
17
10
  */
18
11
  name: string;
12
+ /**
13
+ * Provide a secondaryName for the app. Will be displayed below the name in wider viewports.
14
+ */
15
+ secondaryName?: string;
19
16
  /**
20
17
  * Provide an accessible label, often used by screen readers.
21
18
  * This label should include the name of the app, and if applicable,
@@ -34,4 +31,13 @@ export declare const AppLogo: ({ name, label, href, icon, onClick, }: {
34
31
  * Handler called on click.
35
32
  */
36
33
  onClick?: React.MouseEventHandler<HTMLAnchorElement>;
37
- }) => JSX.Element;
34
+ }
35
+ /**
36
+ * __App logo__
37
+ *
38
+ * The app logo for the top navigation.
39
+ *
40
+ * To provide a responsive experience, label text will render next to an icon at larger viewports.
41
+ */
42
+ export declare const AppLogo: ({ name, label, secondaryName, href, icon, onClick, }: AppLogoProps) => JSX.Element;
43
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/navigation-system",
3
- "version": "10.8.0",
3
+ "version": "10.9.1",
4
4
  "description": "The latest navigation system for Atlassian apps.",
5
5
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
6
6
  "author": "Atlassian Pty Ltd",
@@ -55,23 +55,23 @@
55
55
  "dependencies": {
56
56
  "@atlaskit/analytics-next": "^12.3.0",
57
57
  "@atlaskit/app-provider": "^5.1.0",
58
- "@atlaskit/avatar": "^26.2.0",
58
+ "@atlaskit/avatar": "^26.4.0",
59
59
  "@atlaskit/button": "^24.3.0",
60
60
  "@atlaskit/css": "^1.0.0",
61
61
  "@atlaskit/ds-lib": "^8.0.0",
62
- "@atlaskit/icon": "^37.1.0",
62
+ "@atlaskit/icon": "^37.2.0",
63
63
  "@atlaskit/layering": "^5.0.0",
64
64
  "@atlaskit/logo": "^21.4.0",
65
- "@atlaskit/motion": "^7.5.0",
65
+ "@atlaskit/motion": "^8.0.0",
66
66
  "@atlaskit/platform-feature-flags": "^2.1.0",
67
67
  "@atlaskit/platform-feature-flags-react": "^1.1.0",
68
- "@atlaskit/popup": "^5.1.0",
68
+ "@atlaskit/popup": "^5.2.0",
69
69
  "@atlaskit/pragmatic-drag-and-drop": "^2.0.0",
70
70
  "@atlaskit/primitives": "^22.2.0",
71
71
  "@atlaskit/react-compiler-gating": "^0.2.0",
72
72
  "@atlaskit/side-nav-items": "^2.3.0",
73
73
  "@atlaskit/tokens": "^16.3.0",
74
- "@atlaskit/tooltip": "^23.1.0",
74
+ "@atlaskit/tooltip": "^23.2.0",
75
75
  "@atlaskit/visually-hidden": "^4.2.0",
76
76
  "@babel/runtime": "^7.0.0",
77
77
  "@compiled/react": "^1.0.0",
@@ -90,28 +90,28 @@
90
90
  "@atlaskit/badge": "^19.1.0",
91
91
  "@atlaskit/banner": "^15.1.0",
92
92
  "@atlaskit/breadcrumbs": "^17.5.0",
93
- "@atlaskit/dropdown-menu": "^17.1.0",
93
+ "@atlaskit/dropdown-menu": "^17.2.0",
94
94
  "@atlaskit/flag": "^18.2.0",
95
95
  "@atlaskit/form": "^16.1.0",
96
96
  "@atlaskit/heading": "^6.2.0",
97
- "@atlaskit/inline-dialog": "^19.1.0",
97
+ "@atlaskit/inline-dialog": "^19.2.0",
98
98
  "@atlaskit/link": "^4.3.0",
99
99
  "@atlaskit/lozenge": "^14.1.0",
100
100
  "@atlaskit/menu": "^9.2.0",
101
- "@atlaskit/modal-dialog": "^16.1.0",
101
+ "@atlaskit/modal-dialog": "^16.2.0",
102
102
  "@atlaskit/onboarding": "^15.1.0",
103
103
  "@atlaskit/page-header": "^13.1.0",
104
104
  "@atlaskit/page-layout": "^5.2.0",
105
- "@atlaskit/popper": "^8.3.0",
105
+ "@atlaskit/popper": "^8.4.0",
106
106
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.0.0",
107
- "@atlaskit/select": "^22.5.0",
107
+ "@atlaskit/select": "^22.6.0",
108
108
  "@atlaskit/skeleton": "^4.2.0",
109
109
  "@atlaskit/spotlight": "^3.0.0",
110
110
  "@atlaskit/textfield": "^9.1.0",
111
- "@atlaskit/top-layer": "^1.10.0",
111
+ "@atlaskit/top-layer": "^2.0.0",
112
112
  "@atlassian/feature-flags-test-utils": "^1.2.0",
113
113
  "@atlassian/gemini": "^1.51.0",
114
- "@atlassian/search-dialog": "^10.5.0",
114
+ "@atlassian/search-dialog": "^10.6.0",
115
115
  "@atlassian/ssr-tests": "workspace:^",
116
116
  "@atlassian/test-utils": "^1.1.0",
117
117
  "@atlassian/testing-library": "^0.11.0",