@atlaskit/navigation-system 11.6.1 → 11.7.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,21 @@
1
1
  # @atlassian/navigation-system
2
2
 
3
+ ## 11.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`08ae3998563eb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/08ae3998563eb) -
8
+ Restore local-panel minimum sizing, overlay clearance and coordinated resize limits behind
9
+ platform-dst-chat-panel-layout.
10
+
11
+ ## 11.7.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`248cb52df6c6d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/248cb52df6c6d) -
16
+ Add ChatPanel compactDefaultWidth to override the compact viewport default independently of
17
+ defaultWidth behind platform-dst-chat-panel-layout.
18
+
3
19
  ## 11.6.1
4
20
 
5
21
  ### Patch Changes
@@ -60,6 +60,7 @@ function ChatPanel(_ref) {
60
60
  var _managedSizing$mode, _managedSizing$width;
61
61
  var children = _ref.children,
62
62
  defaultWidthProp = _ref.defaultWidth,
63
+ compactDefaultWidthProp = _ref.compactDefaultWidth,
63
64
  _ref$minWidth = _ref.minWidth,
64
65
  minWidth = _ref$minWidth === void 0 ? fallbackMinWidth : _ref$minWidth,
65
66
  maxWidth = _ref.maxWidth,
@@ -81,7 +82,12 @@ function ChatPanel(_ref) {
81
82
  fallbackDefaultWidth: fallbackDefaultWidth,
82
83
  slotName: 'ChatPanel'
83
84
  });
84
- var compactDefaultWidth = defaultWidthProp === undefined ? fallbackCompactDefaultWidth : defaultWidth;
85
+ var compactFallbackWidth = defaultWidthProp === undefined ? fallbackCompactDefaultWidth : defaultWidth;
86
+ var compactDefaultWidth = (0, _useSafeDefaultWidth.useSafeDefaultWidth)({
87
+ defaultWidthProp: (0, _fg.fg)('platform-dst-chat-panel-layout') ? compactDefaultWidthProp !== null && compactDefaultWidthProp !== void 0 ? compactDefaultWidthProp : compactFallbackWidth : compactFallbackWidth,
88
+ fallbackDefaultWidth: compactFallbackWidth,
89
+ slotName: 'ChatPanel compactDefaultWidth'
90
+ });
85
91
  (0, _useSkipLinkInternal.useSkipLinkInternal)({
86
92
  id: id,
87
93
  label: skipLinkLabel,
@@ -48,6 +48,7 @@ const styles = {
48
48
  export function ChatPanel({
49
49
  children,
50
50
  defaultWidth: defaultWidthProp,
51
+ compactDefaultWidth: compactDefaultWidthProp,
51
52
  minWidth = fallbackMinWidth,
52
53
  maxWidth,
53
54
  label = 'Chat panel',
@@ -67,7 +68,12 @@ export function ChatPanel({
67
68
  fallbackDefaultWidth,
68
69
  slotName: 'ChatPanel'
69
70
  });
70
- const compactDefaultWidth = defaultWidthProp === undefined ? fallbackCompactDefaultWidth : defaultWidth;
71
+ const compactFallbackWidth = defaultWidthProp === undefined ? fallbackCompactDefaultWidth : defaultWidth;
72
+ const compactDefaultWidth = useSafeDefaultWidth({
73
+ defaultWidthProp: fg('platform-dst-chat-panel-layout') ? compactDefaultWidthProp !== null && compactDefaultWidthProp !== void 0 ? compactDefaultWidthProp : compactFallbackWidth : compactFallbackWidth,
74
+ fallbackDefaultWidth: compactFallbackWidth,
75
+ slotName: 'ChatPanel compactDefaultWidth'
76
+ });
71
77
  useSkipLinkInternal({
72
78
  id,
73
79
  label: skipLinkLabel,
@@ -51,6 +51,7 @@ export function ChatPanel(_ref) {
51
51
  var _managedSizing$mode, _managedSizing$width;
52
52
  var children = _ref.children,
53
53
  defaultWidthProp = _ref.defaultWidth,
54
+ compactDefaultWidthProp = _ref.compactDefaultWidth,
54
55
  _ref$minWidth = _ref.minWidth,
55
56
  minWidth = _ref$minWidth === void 0 ? fallbackMinWidth : _ref$minWidth,
56
57
  maxWidth = _ref.maxWidth,
@@ -72,7 +73,12 @@ export function ChatPanel(_ref) {
72
73
  fallbackDefaultWidth: fallbackDefaultWidth,
73
74
  slotName: 'ChatPanel'
74
75
  });
75
- var compactDefaultWidth = defaultWidthProp === undefined ? fallbackCompactDefaultWidth : defaultWidth;
76
+ var compactFallbackWidth = defaultWidthProp === undefined ? fallbackCompactDefaultWidth : defaultWidth;
77
+ var compactDefaultWidth = useSafeDefaultWidth({
78
+ defaultWidthProp: fg('platform-dst-chat-panel-layout') ? compactDefaultWidthProp !== null && compactDefaultWidthProp !== void 0 ? compactDefaultWidthProp : compactFallbackWidth : compactFallbackWidth,
79
+ fallbackDefaultWidth: compactFallbackWidth,
80
+ slotName: 'ChatPanel compactDefaultWidth'
81
+ });
76
82
  useSkipLinkInternal({
77
83
  id: id,
78
84
  label: skipLinkLabel,
@@ -9,7 +9,7 @@ import type { CommonSlotProps } from './types';
9
9
  *
10
10
  * You can optionally render a `PanelSplitter` as a child to make the chat panel resizable.
11
11
  */
12
- export declare function ChatPanel({ children, defaultWidth: defaultWidthProp, minWidth, maxWidth, label, skipLinkLabel, testId, id: providedId, xcss, hasBorder, onClose, }: CommonSlotProps & {
12
+ export declare function ChatPanel({ children, defaultWidth: defaultWidthProp, compactDefaultWidth: compactDefaultWidthProp, minWidth, maxWidth, label, skipLinkLabel, testId, id: providedId, xcss, hasBorder, onClose, }: CommonSlotProps & {
13
13
  /**
14
14
  * The content of the layout area.
15
15
  */
@@ -19,9 +19,16 @@ export declare function ChatPanel({ children, defaultWidth: defaultWidthProp, mi
19
19
  */
20
20
  label?: string;
21
21
  /**
22
- * The default width of the layout area in pixels.
22
+ * The default width of the layout area in pixels. Defaults to 400.
23
+ * Also used at compact viewport sizes unless compactDefaultWidth is supplied.
23
24
  */
24
25
  defaultWidth?: number;
26
+ /**
27
+ * Default width in pixels at compact viewport sizes, before user resizing.
28
+ * Falls back to an explicitly supplied defaultWidth, then 320.
29
+ * Requires platform-dst-chat-panel-layout. Available space and resize bounds still apply.
30
+ */
31
+ compactDefaultWidth?: number;
25
32
  /**
26
33
  * The minimum width the chat panel can be resized to.
27
34
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/navigation-system",
3
- "version": "11.6.1",
3
+ "version": "11.7.1",
4
4
  "description": "The latest navigation system for Atlassian apps.",
5
5
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
6
6
  "license": "Apache-2.0",
@@ -71,10 +71,10 @@
71
71
  "@atlaskit/platform-feature-flags-react": "^1.2.0",
72
72
  "@atlaskit/popup": "^10.2.0",
73
73
  "@atlaskit/pragmatic-drag-and-drop": "^4.0.0",
74
- "@atlaskit/primitives": "^22.6.0",
74
+ "@atlaskit/primitives": "^22.7.0",
75
75
  "@atlaskit/react-compiler-gating": "^0.2.0",
76
76
  "@atlaskit/side-nav-items": "^2.6.0",
77
- "@atlaskit/tokens": "^20.9.0",
77
+ "@atlaskit/tokens": "^20.10.0",
78
78
  "@atlaskit/tooltip": "^24.4.0",
79
79
  "@atlaskit/top-layer": "^7.1.0",
80
80
  "@atlaskit/visually-hidden": "^4.4.0",
@@ -97,7 +97,7 @@
97
97
  "@atlaskit/banner": "^15.3.0",
98
98
  "@atlaskit/breadcrumbs": "^17.8.0",
99
99
  "@atlaskit/docs": "^12.3.0",
100
- "@atlaskit/dropdown-menu": "^21.1.0",
100
+ "@atlaskit/dropdown-menu": "^21.2.0",
101
101
  "@atlaskit/flag": "^19.0.0",
102
102
  "@atlaskit/form": "^18.3.0",
103
103
  "@atlaskit/heading": "^8.0.0",
@@ -129,7 +129,7 @@
129
129
  "@atlassian/panel-system": "^2.0.0",
130
130
  "@atlassian/react-async": "^0.23.0",
131
131
  "@atlassian/react-entrypoint": "^1.1.0",
132
- "@atlassian/search-dialog": "^10.32.0",
132
+ "@atlassian/search-dialog": "^10.33.0",
133
133
  "@atlassian/ssr-tests": "workspace:^",
134
134
  "@atlassian/test-utils": "^1.1.0",
135
135
  "@atlassian/testing-library": "^0.12.0",