@primer/react 0.0.0-20260220185847 → 0.0.0-20260220191813
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 +2 -24
- package/dist/ActionList/ActionList-f4ac3b54.css +2 -0
- package/dist/ActionList/ActionList-f4ac3b54.css.map +1 -0
- package/dist/ActionList/ActionList.module.css.js +1 -1
- package/dist/ActionList/Item.d.ts.map +1 -1
- package/dist/ActionList/Item.js +0 -1
- package/dist/Autocomplete/Autocomplete.js +159 -76
- package/dist/Autocomplete/AutocompleteMenu.js +333 -128
- package/dist/Autocomplete/AutocompleteOverlay.js +130 -49
- package/dist/Banner/Banner.js +238 -64
- package/dist/Blankslate/{Blankslate-a039d79a.css → Blankslate-f5a9755a.css} +2 -2
- package/dist/Blankslate/Blankslate-f5a9755a.css.map +1 -0
- package/dist/Blankslate/Blankslate.module.css.js +1 -1
- package/dist/Button/Button.js +34 -11
- package/dist/Button/IconButton.js +140 -51
- package/dist/Button/LinkButton.js +39 -11
- package/dist/Checkbox/Checkbox.js +163 -55
- package/dist/Dialog/Dialog.js +347 -105
- package/dist/FilteredActionList/FilteredActionList.d.ts +1 -16
- package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +42 -147
- package/dist/PageLayout/PageLayout-cb491b47.css +2 -0
- package/dist/PageLayout/PageLayout-cb491b47.css.map +1 -0
- package/dist/PageLayout/PageLayout.d.ts +2 -72
- package/dist/PageLayout/PageLayout.d.ts.map +1 -1
- package/dist/PageLayout/PageLayout.js +1235 -750
- package/dist/PageLayout/PageLayout.module.css.js +2 -2
- package/dist/PageLayout/usePaneWidth.d.ts +5 -18
- package/dist/PageLayout/usePaneWidth.d.ts.map +1 -1
- package/dist/PageLayout/usePaneWidth.js +111 -125
- package/dist/SelectPanel/SelectPanel.d.ts +1 -1
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +1 -3
- package/dist/SplitPageLayout/SplitPageLayout.d.ts +1 -4
- package/dist/SplitPageLayout/SplitPageLayout.d.ts.map +1 -1
- package/dist/SplitPageLayout/SplitPageLayout.js +2 -54
- package/dist/Text/Text.d.ts +1 -1
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +13 -10
- package/dist/UnderlineNav/UnderlineNav-bec9faaa.css +2 -0
- package/dist/UnderlineNav/UnderlineNav-bec9faaa.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +84 -323
- package/dist/UnderlineNav/UnderlineNav.module.css.js +2 -2
- package/dist/UnderlineNav/UnderlineNavContext.d.ts +4 -11
- package/dist/UnderlineNav/UnderlineNavContext.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNavContext.js +2 -3
- package/dist/UnderlineNav/UnderlineNavItem-db9dc5d0.css +2 -0
- package/dist/UnderlineNav/UnderlineNavItem-db9dc5d0.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNavItem.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNavItem.js +161 -59
- package/dist/UnderlineNav/UnderlineNavItem.module.css.js +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +593 -209
- package/dist/experimental/UnderlinePanels/UnderlinePanels-133b9c25.css +2 -0
- package/dist/experimental/UnderlinePanels/UnderlinePanels-133b9c25.css.map +1 -0
- package/dist/experimental/UnderlinePanels/UnderlinePanels.module.css.js +1 -1
- package/dist/hooks/useRefObjectAsForwardedRef.d.ts.map +1 -1
- package/dist/hooks/useRefObjectAsForwardedRef.js +2 -10
- package/dist/hooks/useScrollFlash.d.ts.map +1 -1
- package/dist/hooks/useScrollFlash.js +22 -14
- package/dist/hooks/useSlots.d.ts +6 -50
- package/dist/hooks/useSlots.d.ts.map +1 -1
- package/dist/hooks/useSlots.js +36 -114
- package/dist/internal/components/UnderlineTabbedInterface-6bea1152.css +2 -0
- package/dist/internal/components/UnderlineTabbedInterface-6bea1152.css.map +1 -0
- package/dist/internal/components/UnderlineTabbedInterface.d.ts +0 -1
- package/dist/internal/components/UnderlineTabbedInterface.d.ts.map +1 -1
- package/dist/internal/components/UnderlineTabbedInterface.js +41 -48
- package/dist/internal/components/UnderlineTabbedInterface.module.css.js +1 -1
- package/generated/components.json +4 -196
- package/package.json +2 -2
- package/dist/ActionList/ActionList-c04a02d6.css +0 -2
- package/dist/ActionList/ActionList-c04a02d6.css.map +0 -1
- package/dist/Blankslate/Blankslate-a039d79a.css.map +0 -1
- package/dist/PageLayout/PageLayout-06f4c069.css +0 -2
- package/dist/PageLayout/PageLayout-06f4c069.css.map +0 -1
- package/dist/UnderlineNav/UnderlineNav-4344d9b0.css +0 -2
- package/dist/UnderlineNav/UnderlineNav-4344d9b0.css.map +0 -1
- package/dist/UnderlineNav/UnderlineNavItem-b65e8fd3.css +0 -2
- package/dist/UnderlineNav/UnderlineNavItem-b65e8fd3.css.map +0 -1
- package/dist/UnderlineNav/styles.d.ts +0 -16
- package/dist/UnderlineNav/styles.d.ts.map +0 -1
- package/dist/UnderlineNav/styles.js +0 -19
- package/dist/experimental/UnderlinePanels/UnderlinePanels-e4b325b9.css +0 -2
- package/dist/experimental/UnderlinePanels/UnderlinePanels-e4b325b9.css.map +0 -1
- package/dist/internal/components/UnderlineTabbedInterface-4197ee28.css +0 -2
- package/dist/internal/components/UnderlineTabbedInterface-4197ee28.css.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
1
2
|
import React, { useRef, memo } from 'react';
|
|
2
3
|
import { clsx } from 'clsx';
|
|
3
4
|
import { useId } from '../hooks/useId.js';
|
|
@@ -8,9 +9,9 @@ import { useOverflow } from '../hooks/useOverflow.js';
|
|
|
8
9
|
import { warning } from '../utils/warning.js';
|
|
9
10
|
import { getResponsiveAttributes } from '../internal/utils/getResponsiveAttributes.js';
|
|
10
11
|
import classes from './PageLayout.module.css.js';
|
|
11
|
-
import { usePaneWidth,
|
|
12
|
+
import { usePaneWidth, isCustomWidthOptions, isPaneWidth, updateAriaValues, ARROW_KEY_STEP } from './usePaneWidth.js';
|
|
12
13
|
import { setDraggingStyles, removeDraggingStyles } from './paneUtils.js';
|
|
13
|
-
import {
|
|
14
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
14
15
|
|
|
15
16
|
const isArrowKey = key => key === 'ArrowLeft' || key === 'ArrowRight' || key === 'ArrowUp' || key === 'ArrowDown';
|
|
16
17
|
const isShrinkKey = key => key === 'ArrowLeft' || key === 'ArrowDown';
|
|
@@ -23,533 +24,895 @@ const PageLayoutContext = /*#__PURE__*/React.createContext({
|
|
|
23
24
|
},
|
|
24
25
|
contentWrapperRef: {
|
|
25
26
|
current: null
|
|
26
|
-
},
|
|
27
|
-
sidebarRef: {
|
|
28
|
-
current: null
|
|
29
|
-
},
|
|
30
|
-
sidebarContentWrapperRef: {
|
|
31
|
-
current: null
|
|
32
27
|
}
|
|
33
28
|
});
|
|
34
29
|
|
|
35
30
|
// TODO: refs
|
|
36
|
-
const Root =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
const Root = t0 => {
|
|
32
|
+
const $ = c(22);
|
|
33
|
+
const {
|
|
34
|
+
containerWidth: t1,
|
|
35
|
+
padding: t2,
|
|
36
|
+
rowGap: t3,
|
|
37
|
+
columnGap: t4,
|
|
38
|
+
children,
|
|
39
|
+
className,
|
|
40
|
+
style,
|
|
41
|
+
_slotsConfig: slotsConfig
|
|
42
|
+
} = t0;
|
|
43
|
+
const containerWidth = t1 === undefined ? "xlarge" : t1;
|
|
44
|
+
const padding = t2 === undefined ? "normal" : t2;
|
|
45
|
+
const rowGap = t3 === undefined ? "normal" : t3;
|
|
46
|
+
const columnGap = t4 === undefined ? "normal" : t4;
|
|
46
47
|
const paneRef = useRef(null);
|
|
47
48
|
const contentWrapperRef = useRef(null);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
let t5;
|
|
50
|
+
if ($[0] !== slotsConfig) {
|
|
51
|
+
t5 = slotsConfig !== null && slotsConfig !== void 0 ? slotsConfig : {
|
|
52
|
+
header: Header,
|
|
53
|
+
footer: Footer
|
|
54
|
+
};
|
|
55
|
+
$[0] = slotsConfig;
|
|
56
|
+
$[1] = t5;
|
|
57
|
+
} else {
|
|
58
|
+
t5 = $[1];
|
|
59
|
+
}
|
|
60
|
+
const [slots, rest] = useSlots(children, t5);
|
|
61
|
+
let t6;
|
|
62
|
+
if ($[2] !== columnGap || $[3] !== padding || $[4] !== rowGap) {
|
|
63
|
+
t6 = {
|
|
57
64
|
padding,
|
|
58
65
|
rowGap,
|
|
59
66
|
columnGap,
|
|
60
67
|
paneRef,
|
|
61
|
-
contentWrapperRef
|
|
62
|
-
sidebarRef,
|
|
63
|
-
sidebarContentWrapperRef
|
|
68
|
+
contentWrapperRef
|
|
64
69
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
$[2] = columnGap;
|
|
71
|
+
$[3] = padding;
|
|
72
|
+
$[4] = rowGap;
|
|
73
|
+
$[5] = t6;
|
|
74
|
+
} else {
|
|
75
|
+
t6 = $[5];
|
|
76
|
+
}
|
|
77
|
+
const memoizedContextValue = t6;
|
|
78
|
+
const t7 = slots.header;
|
|
79
|
+
let t8;
|
|
80
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
81
|
+
t8 = clsx(classes.PageLayoutContent);
|
|
82
|
+
$[6] = t8;
|
|
83
|
+
} else {
|
|
84
|
+
t8 = $[6];
|
|
85
|
+
}
|
|
86
|
+
let t9;
|
|
87
|
+
if ($[7] !== rest) {
|
|
88
|
+
t9 = /*#__PURE__*/jsx("div", {
|
|
89
|
+
className: t8,
|
|
90
|
+
children: rest
|
|
91
|
+
});
|
|
92
|
+
$[7] = rest;
|
|
93
|
+
$[8] = t9;
|
|
94
|
+
} else {
|
|
95
|
+
t9 = $[8];
|
|
96
|
+
}
|
|
97
|
+
let t10;
|
|
98
|
+
if ($[9] !== containerWidth || $[10] !== slots.footer || $[11] !== slots.header || $[12] !== t9) {
|
|
99
|
+
t10 = /*#__PURE__*/jsxs("div", {
|
|
100
|
+
className: classes.PageLayoutWrapper,
|
|
101
|
+
"data-width": containerWidth,
|
|
102
|
+
children: [t7, t9, slots.footer]
|
|
103
|
+
});
|
|
104
|
+
$[9] = containerWidth;
|
|
105
|
+
$[10] = slots.footer;
|
|
106
|
+
$[11] = slots.header;
|
|
107
|
+
$[12] = t9;
|
|
108
|
+
$[13] = t10;
|
|
109
|
+
} else {
|
|
110
|
+
t10 = $[13];
|
|
111
|
+
}
|
|
112
|
+
let t11;
|
|
113
|
+
if ($[14] !== className || $[15] !== padding || $[16] !== style || $[17] !== t10) {
|
|
114
|
+
t11 = /*#__PURE__*/jsx(RootWrapper, {
|
|
69
115
|
style: style,
|
|
70
116
|
padding: padding,
|
|
71
117
|
className: className,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
118
|
+
children: t10
|
|
119
|
+
});
|
|
120
|
+
$[14] = className;
|
|
121
|
+
$[15] = padding;
|
|
122
|
+
$[16] = style;
|
|
123
|
+
$[17] = t10;
|
|
124
|
+
$[18] = t11;
|
|
125
|
+
} else {
|
|
126
|
+
t11 = $[18];
|
|
127
|
+
}
|
|
128
|
+
let t12;
|
|
129
|
+
if ($[19] !== memoizedContextValue || $[20] !== t11) {
|
|
130
|
+
t12 = /*#__PURE__*/jsx(PageLayoutContext.Provider, {
|
|
131
|
+
value: memoizedContextValue,
|
|
132
|
+
children: t11
|
|
133
|
+
});
|
|
134
|
+
$[19] = memoizedContextValue;
|
|
135
|
+
$[20] = t11;
|
|
136
|
+
$[21] = t12;
|
|
137
|
+
} else {
|
|
138
|
+
t12 = $[21];
|
|
139
|
+
}
|
|
140
|
+
return t12;
|
|
84
141
|
};
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
142
|
+
const RootWrapper = /*#__PURE__*/memo(t0 => {
|
|
143
|
+
const $ = c(9);
|
|
144
|
+
const {
|
|
145
|
+
style,
|
|
146
|
+
padding,
|
|
147
|
+
children,
|
|
148
|
+
className
|
|
149
|
+
} = t0;
|
|
150
|
+
const t1 = `var(--spacing-${padding})`;
|
|
151
|
+
let t2;
|
|
152
|
+
if ($[0] !== style || $[1] !== t1) {
|
|
153
|
+
t2 = {
|
|
154
|
+
"--spacing": t1,
|
|
96
155
|
...style
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
156
|
+
};
|
|
157
|
+
$[0] = style;
|
|
158
|
+
$[1] = t1;
|
|
159
|
+
$[2] = t2;
|
|
160
|
+
} else {
|
|
161
|
+
t2 = $[2];
|
|
162
|
+
}
|
|
163
|
+
const t3 = t2;
|
|
164
|
+
let t4;
|
|
165
|
+
if ($[3] !== className) {
|
|
166
|
+
t4 = clsx(classes.PageLayoutRoot, className);
|
|
167
|
+
$[3] = className;
|
|
168
|
+
$[4] = t4;
|
|
169
|
+
} else {
|
|
170
|
+
t4 = $[4];
|
|
171
|
+
}
|
|
172
|
+
let t5;
|
|
173
|
+
if ($[5] !== children || $[6] !== t3 || $[7] !== t4) {
|
|
174
|
+
t5 = /*#__PURE__*/jsx("div", {
|
|
175
|
+
style: t3,
|
|
176
|
+
className: t4,
|
|
177
|
+
children: children
|
|
178
|
+
});
|
|
179
|
+
$[5] = children;
|
|
180
|
+
$[6] = t3;
|
|
181
|
+
$[7] = t4;
|
|
182
|
+
$[8] = t5;
|
|
183
|
+
} else {
|
|
184
|
+
t5 = $[8];
|
|
185
|
+
}
|
|
186
|
+
return t5;
|
|
102
187
|
});
|
|
103
188
|
Root.displayName = 'PageLayout';
|
|
104
189
|
|
|
105
190
|
// ----------------------------------------------------------------------------
|
|
106
191
|
// Divider (internal)
|
|
107
192
|
|
|
108
|
-
const HorizontalDivider = /*#__PURE__*/memo(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
193
|
+
const HorizontalDivider = /*#__PURE__*/memo(t0 => {
|
|
194
|
+
const $ = c(14);
|
|
195
|
+
const {
|
|
196
|
+
variant: t1,
|
|
197
|
+
className,
|
|
198
|
+
position,
|
|
199
|
+
style
|
|
200
|
+
} = t0;
|
|
201
|
+
const variant = t1 === undefined ? "none" : t1;
|
|
114
202
|
const {
|
|
115
203
|
padding
|
|
116
204
|
} = React.useContext(PageLayoutContext);
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
205
|
+
let t2;
|
|
206
|
+
if ($[0] !== className) {
|
|
207
|
+
t2 = clsx(classes.HorizontalDivider, className);
|
|
208
|
+
$[0] = className;
|
|
209
|
+
$[1] = t2;
|
|
210
|
+
} else {
|
|
211
|
+
t2 = $[1];
|
|
212
|
+
}
|
|
213
|
+
let t3;
|
|
214
|
+
if ($[2] !== variant) {
|
|
215
|
+
t3 = getResponsiveAttributes("variant", variant);
|
|
216
|
+
$[2] = variant;
|
|
217
|
+
$[3] = t3;
|
|
218
|
+
} else {
|
|
219
|
+
t3 = $[3];
|
|
220
|
+
}
|
|
221
|
+
let t4;
|
|
222
|
+
if ($[4] !== position) {
|
|
223
|
+
t4 = getResponsiveAttributes("position", position);
|
|
224
|
+
$[4] = position;
|
|
225
|
+
$[5] = t4;
|
|
226
|
+
} else {
|
|
227
|
+
t4 = $[5];
|
|
228
|
+
}
|
|
229
|
+
const t5 = `var(--spacing-${padding})`;
|
|
230
|
+
let t6;
|
|
231
|
+
if ($[6] !== style || $[7] !== t5) {
|
|
232
|
+
t6 = {
|
|
233
|
+
"--spacing-divider": t5,
|
|
123
234
|
...style
|
|
124
|
-
}
|
|
125
|
-
|
|
235
|
+
};
|
|
236
|
+
$[6] = style;
|
|
237
|
+
$[7] = t5;
|
|
238
|
+
$[8] = t6;
|
|
239
|
+
} else {
|
|
240
|
+
t6 = $[8];
|
|
241
|
+
}
|
|
242
|
+
const t7 = t6;
|
|
243
|
+
let t8;
|
|
244
|
+
if ($[9] !== t2 || $[10] !== t3 || $[11] !== t4 || $[12] !== t7) {
|
|
245
|
+
t8 = /*#__PURE__*/jsx("div", {
|
|
246
|
+
className: t2,
|
|
247
|
+
...t3,
|
|
248
|
+
...t4,
|
|
249
|
+
style: t7
|
|
250
|
+
});
|
|
251
|
+
$[9] = t2;
|
|
252
|
+
$[10] = t3;
|
|
253
|
+
$[11] = t4;
|
|
254
|
+
$[12] = t7;
|
|
255
|
+
$[13] = t8;
|
|
256
|
+
} else {
|
|
257
|
+
t8 = $[13];
|
|
258
|
+
}
|
|
259
|
+
return t8;
|
|
126
260
|
});
|
|
127
261
|
HorizontalDivider.displayName = 'HorizontalDivider';
|
|
128
|
-
const VerticalDivider = /*#__PURE__*/memo(
|
|
129
|
-
|
|
130
|
-
position,
|
|
131
|
-
className,
|
|
132
|
-
style,
|
|
133
|
-
children
|
|
134
|
-
}) => {
|
|
135
|
-
return /*#__PURE__*/jsx("div", {
|
|
136
|
-
className: clsx(classes.VerticalDivider, className),
|
|
137
|
-
...getResponsiveAttributes('variant', variant),
|
|
138
|
-
...getResponsiveAttributes('position', position),
|
|
139
|
-
style: style,
|
|
140
|
-
children: children
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
VerticalDivider.displayName = 'VerticalDivider';
|
|
144
|
-
const SidebarDivider = /*#__PURE__*/memo(function SidebarDivider({
|
|
145
|
-
position,
|
|
146
|
-
divider,
|
|
147
|
-
resizable,
|
|
148
|
-
minPaneWidth,
|
|
149
|
-
maxPaneWidth,
|
|
150
|
-
currentWidth,
|
|
151
|
-
currentWidthRef,
|
|
152
|
-
handleRef,
|
|
153
|
-
sidebarRef,
|
|
154
|
-
dragStartClientXRef,
|
|
155
|
-
dragStartWidthRef,
|
|
156
|
-
dragMaxWidthRef,
|
|
157
|
-
getMaxPaneWidth,
|
|
158
|
-
getDefaultWidth,
|
|
159
|
-
saveWidth
|
|
160
|
-
}) {
|
|
262
|
+
const VerticalDivider = /*#__PURE__*/memo(t0 => {
|
|
263
|
+
const $ = c(12);
|
|
161
264
|
const {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
onDragEnd: () => {
|
|
218
|
-
saveWidth(currentWidthRef.current);
|
|
219
|
-
},
|
|
220
|
-
onDoubleClick: () => {
|
|
221
|
-
const resetWidth = getDefaultWidth();
|
|
222
|
-
if (sidebarRef.current) {
|
|
223
|
-
sidebarRef.current.style.setProperty('--pane-width', `${resetWidth}px`);
|
|
224
|
-
currentWidthRef.current = resetWidth;
|
|
225
|
-
updateAriaValues(handleRef.current, {
|
|
226
|
-
current: resetWidth
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
saveWidth(resetWidth);
|
|
230
|
-
}
|
|
231
|
-
}) : null
|
|
232
|
-
});
|
|
265
|
+
variant: t1,
|
|
266
|
+
position,
|
|
267
|
+
className,
|
|
268
|
+
style,
|
|
269
|
+
children
|
|
270
|
+
} = t0;
|
|
271
|
+
const variant = t1 === undefined ? "none" : t1;
|
|
272
|
+
let t2;
|
|
273
|
+
if ($[0] !== className) {
|
|
274
|
+
t2 = clsx(classes.VerticalDivider, className);
|
|
275
|
+
$[0] = className;
|
|
276
|
+
$[1] = t2;
|
|
277
|
+
} else {
|
|
278
|
+
t2 = $[1];
|
|
279
|
+
}
|
|
280
|
+
let t3;
|
|
281
|
+
if ($[2] !== variant) {
|
|
282
|
+
t3 = getResponsiveAttributes("variant", variant);
|
|
283
|
+
$[2] = variant;
|
|
284
|
+
$[3] = t3;
|
|
285
|
+
} else {
|
|
286
|
+
t3 = $[3];
|
|
287
|
+
}
|
|
288
|
+
let t4;
|
|
289
|
+
if ($[4] !== position) {
|
|
290
|
+
t4 = getResponsiveAttributes("position", position);
|
|
291
|
+
$[4] = position;
|
|
292
|
+
$[5] = t4;
|
|
293
|
+
} else {
|
|
294
|
+
t4 = $[5];
|
|
295
|
+
}
|
|
296
|
+
let t5;
|
|
297
|
+
if ($[6] !== children || $[7] !== style || $[8] !== t2 || $[9] !== t3 || $[10] !== t4) {
|
|
298
|
+
t5 = /*#__PURE__*/jsx("div", {
|
|
299
|
+
className: t2,
|
|
300
|
+
...t3,
|
|
301
|
+
...t4,
|
|
302
|
+
style: style,
|
|
303
|
+
children: children
|
|
304
|
+
});
|
|
305
|
+
$[6] = children;
|
|
306
|
+
$[7] = style;
|
|
307
|
+
$[8] = t2;
|
|
308
|
+
$[9] = t3;
|
|
309
|
+
$[10] = t4;
|
|
310
|
+
$[11] = t5;
|
|
311
|
+
} else {
|
|
312
|
+
t5 = $[11];
|
|
313
|
+
}
|
|
314
|
+
return t5;
|
|
233
315
|
});
|
|
316
|
+
VerticalDivider.displayName = 'VerticalDivider';
|
|
234
317
|
/**
|
|
235
318
|
* DragHandle - handles all pointer and keyboard interactions for resizing
|
|
236
319
|
* ARIA values are set in JSX for SSR accessibility,
|
|
237
320
|
* then updated via DOM manipulation during drag for performance
|
|
238
321
|
*/
|
|
239
|
-
const DragHandle = /*#__PURE__*/memo(function DragHandle({
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
322
|
+
const DragHandle = /*#__PURE__*/memo(function DragHandle(t0) {
|
|
323
|
+
const $ = c(35);
|
|
324
|
+
const {
|
|
325
|
+
handleRef,
|
|
326
|
+
onDragStart,
|
|
327
|
+
onDrag,
|
|
328
|
+
onDragEnd,
|
|
329
|
+
onDoubleClick,
|
|
330
|
+
"aria-valuemin": ariaValueMin,
|
|
331
|
+
"aria-valuemax": ariaValueMax,
|
|
332
|
+
"aria-valuenow": ariaValueNow
|
|
333
|
+
} = t0;
|
|
249
334
|
const stableOnDragStart = React.useRef(onDragStart);
|
|
250
335
|
const stableOnDrag = React.useRef(onDrag);
|
|
251
336
|
const stableOnDragEnd = React.useRef(onDragEnd);
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
337
|
+
let t1;
|
|
338
|
+
if ($[0] !== onDrag || $[1] !== onDragEnd || $[2] !== onDragStart) {
|
|
339
|
+
t1 = () => {
|
|
340
|
+
stableOnDragStart.current = onDragStart;
|
|
341
|
+
stableOnDrag.current = onDrag;
|
|
342
|
+
stableOnDragEnd.current = onDragEnd;
|
|
343
|
+
};
|
|
344
|
+
$[0] = onDrag;
|
|
345
|
+
$[1] = onDragEnd;
|
|
346
|
+
$[2] = onDragStart;
|
|
347
|
+
$[3] = t1;
|
|
348
|
+
} else {
|
|
349
|
+
t1 = $[3];
|
|
350
|
+
}
|
|
351
|
+
React.useEffect(t1);
|
|
257
352
|
const {
|
|
258
353
|
paneRef,
|
|
259
354
|
contentWrapperRef
|
|
260
355
|
} = React.useContext(PageLayoutContext);
|
|
261
|
-
|
|
262
|
-
// Dragging state as a ref - cheaper than reading from DOM style
|
|
263
356
|
const isDraggingRef = React.useRef(false);
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
357
|
+
let t2;
|
|
358
|
+
if ($[4] !== contentWrapperRef || $[5] !== handleRef || $[6] !== paneRef) {
|
|
359
|
+
t2 = () => {
|
|
360
|
+
if (isDraggingRef.current) {
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
setDraggingStyles({
|
|
364
|
+
handle: handleRef.current,
|
|
365
|
+
pane: paneRef.current,
|
|
366
|
+
contentWrapper: contentWrapperRef.current
|
|
367
|
+
});
|
|
368
|
+
isDraggingRef.current = true;
|
|
369
|
+
};
|
|
370
|
+
$[4] = contentWrapperRef;
|
|
371
|
+
$[5] = handleRef;
|
|
372
|
+
$[6] = paneRef;
|
|
373
|
+
$[7] = t2;
|
|
374
|
+
} else {
|
|
375
|
+
t2 = $[7];
|
|
376
|
+
}
|
|
377
|
+
const startDragging = t2;
|
|
378
|
+
let t3;
|
|
379
|
+
if ($[8] !== contentWrapperRef || $[9] !== handleRef || $[10] !== paneRef) {
|
|
380
|
+
t3 = () => {
|
|
381
|
+
if (!isDraggingRef.current) {
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
removeDraggingStyles({
|
|
385
|
+
handle: handleRef.current,
|
|
386
|
+
pane: paneRef.current,
|
|
387
|
+
contentWrapper: contentWrapperRef.current
|
|
388
|
+
});
|
|
389
|
+
isDraggingRef.current = false;
|
|
390
|
+
};
|
|
391
|
+
$[8] = contentWrapperRef;
|
|
392
|
+
$[9] = handleRef;
|
|
393
|
+
$[10] = paneRef;
|
|
394
|
+
$[11] = t3;
|
|
395
|
+
} else {
|
|
396
|
+
t3 = $[11];
|
|
397
|
+
}
|
|
398
|
+
const endDragging = t3;
|
|
399
|
+
let t4;
|
|
400
|
+
if ($[12] !== startDragging) {
|
|
401
|
+
t4 = event => {
|
|
402
|
+
if (event.button !== 0) {
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
event.preventDefault();
|
|
406
|
+
const target = event.currentTarget;
|
|
407
|
+
try {
|
|
408
|
+
target.setPointerCapture(event.pointerId);
|
|
409
|
+
} catch {}
|
|
410
|
+
stableOnDragStart.current(event.clientX);
|
|
411
|
+
startDragging();
|
|
412
|
+
};
|
|
413
|
+
$[12] = startDragging;
|
|
414
|
+
$[13] = t4;
|
|
415
|
+
} else {
|
|
416
|
+
t4 = $[13];
|
|
417
|
+
}
|
|
418
|
+
const handlePointerDown = t4;
|
|
304
419
|
const rafIdRef = React.useRef(null);
|
|
305
420
|
const pendingClientXRef = React.useRef(null);
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
421
|
+
let t5;
|
|
422
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
423
|
+
t5 = event_0 => {
|
|
424
|
+
if (!isDraggingRef.current) {
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
event_0.preventDefault();
|
|
428
|
+
pendingClientXRef.current = event_0.clientX;
|
|
429
|
+
if (rafIdRef.current === null) {
|
|
430
|
+
rafIdRef.current = requestAnimationFrame(() => {
|
|
431
|
+
rafIdRef.current = null;
|
|
432
|
+
if (pendingClientXRef.current !== null) {
|
|
433
|
+
stableOnDrag.current(pendingClientXRef.current, false);
|
|
434
|
+
pendingClientXRef.current = null;
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
$[14] = t5;
|
|
440
|
+
} else {
|
|
441
|
+
t5 = $[14];
|
|
442
|
+
}
|
|
443
|
+
const handlePointerMove = t5;
|
|
444
|
+
let t6;
|
|
445
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
446
|
+
t6 = event_1 => {
|
|
447
|
+
if (!isDraggingRef.current) {
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
event_1.preventDefault();
|
|
451
|
+
};
|
|
452
|
+
$[15] = t6;
|
|
453
|
+
} else {
|
|
454
|
+
t6 = $[15];
|
|
455
|
+
}
|
|
456
|
+
const handlePointerUp = t6;
|
|
457
|
+
let t7;
|
|
458
|
+
if ($[16] !== endDragging) {
|
|
459
|
+
t7 = () => {
|
|
460
|
+
if (!isDraggingRef.current) {
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
if (rafIdRef.current !== null) {
|
|
464
|
+
cancelAnimationFrame(rafIdRef.current);
|
|
322
465
|
rafIdRef.current = null;
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
startDragging();
|
|
374
|
-
}
|
|
375
|
-
stableOnDrag.current(delta, true);
|
|
376
|
-
}, [startDragging]);
|
|
377
|
-
const handleKeyUp = React.useCallback(event => {
|
|
378
|
-
if (!isArrowKey(event.key)) return;
|
|
379
|
-
event.preventDefault();
|
|
380
|
-
endDragging();
|
|
381
|
-
stableOnDragEnd.current();
|
|
382
|
-
}, [endDragging]);
|
|
383
|
-
|
|
384
|
-
// Cleanup rAF on unmount to prevent stale callbacks
|
|
385
|
-
React.useEffect(() => {
|
|
386
|
-
return () => {
|
|
466
|
+
pendingClientXRef.current = null;
|
|
467
|
+
}
|
|
468
|
+
endDragging();
|
|
469
|
+
stableOnDragEnd.current();
|
|
470
|
+
};
|
|
471
|
+
$[16] = endDragging;
|
|
472
|
+
$[17] = t7;
|
|
473
|
+
} else {
|
|
474
|
+
t7 = $[17];
|
|
475
|
+
}
|
|
476
|
+
const handleLostPointerCapture = t7;
|
|
477
|
+
let t8;
|
|
478
|
+
if ($[18] !== startDragging) {
|
|
479
|
+
t8 = event_2 => {
|
|
480
|
+
if (!isArrowKey(event_2.key)) {
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
event_2.preventDefault();
|
|
484
|
+
const delta = isShrinkKey(event_2.key) ? -ARROW_KEY_STEP : ARROW_KEY_STEP;
|
|
485
|
+
if (!isDraggingRef.current) {
|
|
486
|
+
startDragging();
|
|
487
|
+
}
|
|
488
|
+
stableOnDrag.current(delta, true);
|
|
489
|
+
};
|
|
490
|
+
$[18] = startDragging;
|
|
491
|
+
$[19] = t8;
|
|
492
|
+
} else {
|
|
493
|
+
t8 = $[19];
|
|
494
|
+
}
|
|
495
|
+
const handleKeyDown = t8;
|
|
496
|
+
let t9;
|
|
497
|
+
if ($[20] !== endDragging) {
|
|
498
|
+
t9 = event_3 => {
|
|
499
|
+
if (!isArrowKey(event_3.key)) {
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
event_3.preventDefault();
|
|
503
|
+
endDragging();
|
|
504
|
+
stableOnDragEnd.current();
|
|
505
|
+
};
|
|
506
|
+
$[20] = endDragging;
|
|
507
|
+
$[21] = t9;
|
|
508
|
+
} else {
|
|
509
|
+
t9 = $[21];
|
|
510
|
+
}
|
|
511
|
+
const handleKeyUp = t9;
|
|
512
|
+
let t10;
|
|
513
|
+
let t11;
|
|
514
|
+
if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
|
|
515
|
+
t10 = () => () => {
|
|
387
516
|
if (rafIdRef.current !== null) {
|
|
388
517
|
cancelAnimationFrame(rafIdRef.current);
|
|
389
518
|
rafIdRef.current = null;
|
|
390
519
|
}
|
|
391
520
|
};
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
521
|
+
t11 = [];
|
|
522
|
+
$[22] = t10;
|
|
523
|
+
$[23] = t11;
|
|
524
|
+
} else {
|
|
525
|
+
t10 = $[22];
|
|
526
|
+
t11 = $[23];
|
|
527
|
+
}
|
|
528
|
+
React.useEffect(t10, t11);
|
|
529
|
+
const t12 = ariaValueNow !== undefined ? `Pane width ${ariaValueNow} pixels` : undefined;
|
|
530
|
+
let t13;
|
|
531
|
+
if ($[24] !== ariaValueMax || $[25] !== ariaValueMin || $[26] !== ariaValueNow || $[27] !== handleKeyDown || $[28] !== handleKeyUp || $[29] !== handleLostPointerCapture || $[30] !== handlePointerDown || $[31] !== handleRef || $[32] !== onDoubleClick || $[33] !== t12) {
|
|
532
|
+
t13 = /*#__PURE__*/jsx("div", {
|
|
533
|
+
ref: handleRef,
|
|
534
|
+
className: classes.DraggableHandle,
|
|
535
|
+
role: "slider",
|
|
536
|
+
"aria-label": "Draggable pane splitter",
|
|
537
|
+
"aria-valuemin": ariaValueMin,
|
|
538
|
+
"aria-valuemax": ariaValueMax,
|
|
539
|
+
"aria-valuenow": ariaValueNow,
|
|
540
|
+
"aria-valuetext": t12,
|
|
541
|
+
tabIndex: 0,
|
|
542
|
+
onPointerDown: handlePointerDown,
|
|
543
|
+
onPointerMove: handlePointerMove,
|
|
544
|
+
onPointerUp: handlePointerUp,
|
|
545
|
+
onLostPointerCapture: handleLostPointerCapture,
|
|
546
|
+
onKeyDown: handleKeyDown,
|
|
547
|
+
onKeyUp: handleKeyUp,
|
|
548
|
+
onDoubleClick: onDoubleClick
|
|
549
|
+
});
|
|
550
|
+
$[24] = ariaValueMax;
|
|
551
|
+
$[25] = ariaValueMin;
|
|
552
|
+
$[26] = ariaValueNow;
|
|
553
|
+
$[27] = handleKeyDown;
|
|
554
|
+
$[28] = handleKeyUp;
|
|
555
|
+
$[29] = handleLostPointerCapture;
|
|
556
|
+
$[30] = handlePointerDown;
|
|
557
|
+
$[31] = handleRef;
|
|
558
|
+
$[32] = onDoubleClick;
|
|
559
|
+
$[33] = t12;
|
|
560
|
+
$[34] = t13;
|
|
561
|
+
} else {
|
|
562
|
+
t13 = $[34];
|
|
563
|
+
}
|
|
564
|
+
return t13;
|
|
411
565
|
});
|
|
412
566
|
|
|
413
567
|
// ----------------------------------------------------------------------------
|
|
414
568
|
// PageLayout.Header
|
|
415
569
|
|
|
416
|
-
const Header =
|
|
417
|
-
|
|
418
|
-
'aria-labelledby': labelledBy,
|
|
419
|
-
padding = 'none',
|
|
420
|
-
divider = 'none',
|
|
421
|
-
dividerWhenNarrow = 'inherit',
|
|
422
|
-
hidden = false,
|
|
423
|
-
children,
|
|
424
|
-
style,
|
|
425
|
-
className
|
|
426
|
-
}) => {
|
|
427
|
-
// Combine divider and dividerWhenNarrow for backwards compatibility
|
|
428
|
-
const dividerProp = !isResponsiveValue(divider) && dividerWhenNarrow !== 'inherit' ? {
|
|
429
|
-
regular: divider,
|
|
430
|
-
narrow: dividerWhenNarrow
|
|
431
|
-
} : divider;
|
|
570
|
+
const Header = t0 => {
|
|
571
|
+
const $ = c(28);
|
|
432
572
|
const {
|
|
433
|
-
rowGap
|
|
434
|
-
} = React.useContext(PageLayoutContext);
|
|
435
|
-
return /*#__PURE__*/jsxs("header", {
|
|
436
573
|
"aria-label": label,
|
|
437
574
|
"aria-labelledby": labelledBy,
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
575
|
+
padding: t1,
|
|
576
|
+
divider: t2,
|
|
577
|
+
dividerWhenNarrow: t3,
|
|
578
|
+
hidden: t4,
|
|
579
|
+
children,
|
|
580
|
+
style,
|
|
581
|
+
className
|
|
582
|
+
} = t0;
|
|
583
|
+
const padding = t1 === undefined ? "none" : t1;
|
|
584
|
+
const divider = t2 === undefined ? "none" : t2;
|
|
585
|
+
const dividerWhenNarrow = t3 === undefined ? "inherit" : t3;
|
|
586
|
+
const hidden = t4 === undefined ? false : t4;
|
|
587
|
+
let t5;
|
|
588
|
+
if ($[0] !== divider || $[1] !== dividerWhenNarrow) {
|
|
589
|
+
t5 = !isResponsiveValue(divider) && dividerWhenNarrow !== "inherit" ? {
|
|
590
|
+
regular: divider,
|
|
591
|
+
narrow: dividerWhenNarrow
|
|
592
|
+
} : divider;
|
|
593
|
+
$[0] = divider;
|
|
594
|
+
$[1] = dividerWhenNarrow;
|
|
595
|
+
$[2] = t5;
|
|
596
|
+
} else {
|
|
597
|
+
t5 = $[2];
|
|
598
|
+
}
|
|
599
|
+
const dividerProp = t5;
|
|
600
|
+
const {
|
|
601
|
+
rowGap
|
|
602
|
+
} = React.useContext(PageLayoutContext);
|
|
603
|
+
let t6;
|
|
604
|
+
if ($[3] !== hidden) {
|
|
605
|
+
t6 = getResponsiveAttributes("hidden", hidden);
|
|
606
|
+
$[3] = hidden;
|
|
607
|
+
$[4] = t6;
|
|
608
|
+
} else {
|
|
609
|
+
t6 = $[4];
|
|
610
|
+
}
|
|
611
|
+
let t7;
|
|
612
|
+
if ($[5] !== className) {
|
|
613
|
+
t7 = clsx(classes.Header, className);
|
|
614
|
+
$[5] = className;
|
|
615
|
+
$[6] = t7;
|
|
616
|
+
} else {
|
|
617
|
+
t7 = $[6];
|
|
618
|
+
}
|
|
619
|
+
const t8 = `var(--spacing-${rowGap})`;
|
|
620
|
+
let t9;
|
|
621
|
+
if ($[7] !== style || $[8] !== t8) {
|
|
622
|
+
t9 = {
|
|
623
|
+
"--spacing": t8,
|
|
442
624
|
...style
|
|
443
|
-
}
|
|
444
|
-
|
|
625
|
+
};
|
|
626
|
+
$[7] = style;
|
|
627
|
+
$[8] = t8;
|
|
628
|
+
$[9] = t9;
|
|
629
|
+
} else {
|
|
630
|
+
t9 = $[9];
|
|
631
|
+
}
|
|
632
|
+
const t10 = t9;
|
|
633
|
+
const t11 = `var(--spacing-${padding})`;
|
|
634
|
+
let t12;
|
|
635
|
+
if ($[10] !== t11) {
|
|
636
|
+
t12 = {
|
|
637
|
+
"--spacing": t11
|
|
638
|
+
};
|
|
639
|
+
$[10] = t11;
|
|
640
|
+
$[11] = t12;
|
|
641
|
+
} else {
|
|
642
|
+
t12 = $[11];
|
|
643
|
+
}
|
|
644
|
+
const t13 = t12;
|
|
645
|
+
let t14;
|
|
646
|
+
if ($[12] !== children || $[13] !== t13) {
|
|
647
|
+
t14 = /*#__PURE__*/jsx("div", {
|
|
445
648
|
className: classes.HeaderContent,
|
|
446
|
-
style:
|
|
447
|
-
'--spacing': `var(--spacing-${padding})`
|
|
448
|
-
},
|
|
649
|
+
style: t13,
|
|
449
650
|
children: children
|
|
450
|
-
})
|
|
651
|
+
});
|
|
652
|
+
$[12] = children;
|
|
653
|
+
$[13] = t13;
|
|
654
|
+
$[14] = t14;
|
|
655
|
+
} else {
|
|
656
|
+
t14 = $[14];
|
|
657
|
+
}
|
|
658
|
+
const t15 = `var(--spacing-${rowGap})`;
|
|
659
|
+
let t16;
|
|
660
|
+
if ($[15] !== t15) {
|
|
661
|
+
t16 = {
|
|
662
|
+
"--spacing": t15
|
|
663
|
+
};
|
|
664
|
+
$[15] = t15;
|
|
665
|
+
$[16] = t16;
|
|
666
|
+
} else {
|
|
667
|
+
t16 = $[16];
|
|
668
|
+
}
|
|
669
|
+
const t17 = t16;
|
|
670
|
+
let t18;
|
|
671
|
+
if ($[17] !== dividerProp || $[18] !== t17) {
|
|
672
|
+
t18 = /*#__PURE__*/jsx(HorizontalDivider, {
|
|
451
673
|
variant: dividerProp,
|
|
452
674
|
className: classes.HeaderHorizontalDivider,
|
|
453
|
-
style:
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
675
|
+
style: t17
|
|
676
|
+
});
|
|
677
|
+
$[17] = dividerProp;
|
|
678
|
+
$[18] = t17;
|
|
679
|
+
$[19] = t18;
|
|
680
|
+
} else {
|
|
681
|
+
t18 = $[19];
|
|
682
|
+
}
|
|
683
|
+
let t19;
|
|
684
|
+
if ($[20] !== label || $[21] !== labelledBy || $[22] !== t10 || $[23] !== t14 || $[24] !== t18 || $[25] !== t6 || $[26] !== t7) {
|
|
685
|
+
t19 = /*#__PURE__*/jsxs("header", {
|
|
686
|
+
"aria-label": label,
|
|
687
|
+
"aria-labelledby": labelledBy,
|
|
688
|
+
...t6,
|
|
689
|
+
className: t7,
|
|
690
|
+
style: t10,
|
|
691
|
+
children: [t14, t18]
|
|
692
|
+
});
|
|
693
|
+
$[20] = label;
|
|
694
|
+
$[21] = labelledBy;
|
|
695
|
+
$[22] = t10;
|
|
696
|
+
$[23] = t14;
|
|
697
|
+
$[24] = t18;
|
|
698
|
+
$[25] = t6;
|
|
699
|
+
$[26] = t7;
|
|
700
|
+
$[27] = t19;
|
|
701
|
+
} else {
|
|
702
|
+
t19 = $[27];
|
|
703
|
+
}
|
|
704
|
+
return t19;
|
|
458
705
|
};
|
|
459
|
-
Header.displayName = "Header";
|
|
460
706
|
Header.displayName = 'PageLayout.Header';
|
|
461
|
-
const Content =
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
707
|
+
const Content = t0 => {
|
|
708
|
+
const $ = c(19);
|
|
709
|
+
const {
|
|
710
|
+
as: t1,
|
|
711
|
+
"aria-label": label,
|
|
712
|
+
"aria-labelledby": labelledBy,
|
|
713
|
+
width: t2,
|
|
714
|
+
padding: t3,
|
|
715
|
+
hidden: t4,
|
|
716
|
+
children,
|
|
717
|
+
className,
|
|
718
|
+
style
|
|
719
|
+
} = t0;
|
|
720
|
+
const as = t1 === undefined ? "main" : t1;
|
|
721
|
+
const width = t2 === undefined ? "full" : t2;
|
|
722
|
+
const padding = t3 === undefined ? "none" : t3;
|
|
723
|
+
const hidden = t4 === undefined ? false : t4;
|
|
472
724
|
const Component = as;
|
|
473
725
|
const {
|
|
474
726
|
contentWrapperRef
|
|
475
727
|
} = React.useContext(PageLayoutContext);
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
728
|
+
let t5;
|
|
729
|
+
if ($[0] !== className) {
|
|
730
|
+
t5 = clsx(classes.ContentWrapper, className);
|
|
731
|
+
$[0] = className;
|
|
732
|
+
$[1] = t5;
|
|
733
|
+
} else {
|
|
734
|
+
t5 = $[1];
|
|
735
|
+
}
|
|
736
|
+
let t6;
|
|
737
|
+
if ($[2] !== hidden) {
|
|
738
|
+
t6 = getResponsiveAttributes("is-hidden", hidden);
|
|
739
|
+
$[2] = hidden;
|
|
740
|
+
$[3] = t6;
|
|
741
|
+
} else {
|
|
742
|
+
t6 = $[3];
|
|
743
|
+
}
|
|
744
|
+
const t7 = `var(--spacing-${padding})`;
|
|
745
|
+
let t8;
|
|
746
|
+
if ($[4] !== t7) {
|
|
747
|
+
t8 = {
|
|
748
|
+
"--spacing": t7
|
|
749
|
+
};
|
|
750
|
+
$[4] = t7;
|
|
751
|
+
$[5] = t8;
|
|
752
|
+
} else {
|
|
753
|
+
t8 = $[5];
|
|
754
|
+
}
|
|
755
|
+
const t9 = t8;
|
|
756
|
+
let t10;
|
|
757
|
+
if ($[6] !== children || $[7] !== t9 || $[8] !== width) {
|
|
758
|
+
t10 = /*#__PURE__*/jsx("div", {
|
|
484
759
|
className: classes.Content,
|
|
485
760
|
"data-width": width,
|
|
486
|
-
style:
|
|
487
|
-
'--spacing': `var(--spacing-${padding})`
|
|
488
|
-
},
|
|
761
|
+
style: t9,
|
|
489
762
|
children: children
|
|
490
|
-
})
|
|
491
|
-
|
|
763
|
+
});
|
|
764
|
+
$[6] = children;
|
|
765
|
+
$[7] = t9;
|
|
766
|
+
$[8] = width;
|
|
767
|
+
$[9] = t10;
|
|
768
|
+
} else {
|
|
769
|
+
t10 = $[9];
|
|
770
|
+
}
|
|
771
|
+
let t11;
|
|
772
|
+
if ($[10] !== Component || $[11] !== contentWrapperRef || $[12] !== label || $[13] !== labelledBy || $[14] !== style || $[15] !== t10 || $[16] !== t5 || $[17] !== t6) {
|
|
773
|
+
t11 = /*#__PURE__*/jsx(Component, {
|
|
774
|
+
ref: contentWrapperRef,
|
|
775
|
+
"aria-label": label,
|
|
776
|
+
"aria-labelledby": labelledBy,
|
|
777
|
+
style: style,
|
|
778
|
+
className: t5,
|
|
779
|
+
...t6,
|
|
780
|
+
children: t10
|
|
781
|
+
});
|
|
782
|
+
$[10] = Component;
|
|
783
|
+
$[11] = contentWrapperRef;
|
|
784
|
+
$[12] = label;
|
|
785
|
+
$[13] = labelledBy;
|
|
786
|
+
$[14] = style;
|
|
787
|
+
$[15] = t10;
|
|
788
|
+
$[16] = t5;
|
|
789
|
+
$[17] = t6;
|
|
790
|
+
$[18] = t11;
|
|
791
|
+
} else {
|
|
792
|
+
t11 = $[18];
|
|
793
|
+
}
|
|
794
|
+
return t11;
|
|
492
795
|
};
|
|
493
|
-
Content.displayName = "Content";
|
|
494
796
|
Content.displayName = 'PageLayout.Content';
|
|
495
797
|
const overflowProps = {
|
|
496
798
|
tabIndex: 0,
|
|
497
799
|
role: 'region'
|
|
498
800
|
};
|
|
499
|
-
const Pane = /*#__PURE__*/React.forwardRef(({
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
const
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
801
|
+
const Pane = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
|
|
802
|
+
const $ = c(96);
|
|
803
|
+
const {
|
|
804
|
+
"aria-label": label,
|
|
805
|
+
"aria-labelledby": labelledBy,
|
|
806
|
+
position: t1,
|
|
807
|
+
positionWhenNarrow: t2,
|
|
808
|
+
width: t3,
|
|
809
|
+
minWidth: t4,
|
|
810
|
+
currentWidth: controlledWidth,
|
|
811
|
+
onResizeEnd,
|
|
812
|
+
padding: t5,
|
|
813
|
+
resizable: t6,
|
|
814
|
+
widthStorageKey: t7,
|
|
815
|
+
divider: t8,
|
|
816
|
+
dividerWhenNarrow: t9,
|
|
817
|
+
sticky: t10,
|
|
818
|
+
offsetHeader: t11,
|
|
819
|
+
hidden: t12,
|
|
820
|
+
children,
|
|
821
|
+
id,
|
|
822
|
+
className,
|
|
823
|
+
style
|
|
824
|
+
} = t0;
|
|
825
|
+
const responsivePosition = t1 === undefined ? "end" : t1;
|
|
826
|
+
const positionWhenNarrow = t2 === undefined ? "inherit" : t2;
|
|
827
|
+
const width = t3 === undefined ? "medium" : t3;
|
|
828
|
+
const minWidth = t4 === undefined ? 256 : t4;
|
|
829
|
+
const padding = t5 === undefined ? "none" : t5;
|
|
830
|
+
const resizable = t6 === undefined ? false : t6;
|
|
831
|
+
const widthStorageKey = t7 === undefined ? "paneWidth" : t7;
|
|
832
|
+
const responsiveDivider = t8 === undefined ? "none" : t8;
|
|
833
|
+
const dividerWhenNarrow = t9 === undefined ? "inherit" : t9;
|
|
834
|
+
const sticky = t10 === undefined ? false : t10;
|
|
835
|
+
const offsetHeader = t11 === undefined ? 0 : t11;
|
|
836
|
+
const responsiveHidden = t12 === undefined ? false : t12;
|
|
837
|
+
let t13;
|
|
838
|
+
if ($[0] !== positionWhenNarrow || $[1] !== responsivePosition) {
|
|
839
|
+
t13 = !isResponsiveValue(responsivePosition) && positionWhenNarrow !== "inherit" ? {
|
|
840
|
+
regular: responsivePosition,
|
|
841
|
+
narrow: positionWhenNarrow
|
|
842
|
+
} : responsivePosition;
|
|
843
|
+
$[0] = positionWhenNarrow;
|
|
844
|
+
$[1] = responsivePosition;
|
|
845
|
+
$[2] = t13;
|
|
846
|
+
} else {
|
|
847
|
+
t13 = $[2];
|
|
848
|
+
}
|
|
849
|
+
const positionProp = t13;
|
|
850
|
+
let t14;
|
|
851
|
+
if ($[3] !== dividerWhenNarrow || $[4] !== responsiveDivider) {
|
|
852
|
+
t14 = !isResponsiveValue(responsiveDivider) && dividerWhenNarrow !== "inherit" ? {
|
|
853
|
+
regular: responsiveDivider,
|
|
854
|
+
narrow: dividerWhenNarrow
|
|
855
|
+
} : responsiveDivider;
|
|
856
|
+
$[3] = dividerWhenNarrow;
|
|
857
|
+
$[4] = responsiveDivider;
|
|
858
|
+
$[5] = t14;
|
|
859
|
+
} else {
|
|
860
|
+
t14 = $[5];
|
|
861
|
+
}
|
|
862
|
+
const dividerProp = t14;
|
|
863
|
+
let t15;
|
|
864
|
+
if ($[6] !== positionProp) {
|
|
865
|
+
t15 = isResponsiveValue(positionProp) ? "end" : positionProp;
|
|
866
|
+
$[6] = positionProp;
|
|
867
|
+
$[7] = t15;
|
|
868
|
+
} else {
|
|
869
|
+
t15 = $[7];
|
|
870
|
+
}
|
|
871
|
+
const position = t15;
|
|
872
|
+
let t16;
|
|
873
|
+
if ($[8] !== dividerProp) {
|
|
874
|
+
t16 = isResponsiveValue(dividerProp) ? "none" : dividerProp;
|
|
875
|
+
$[8] = dividerProp;
|
|
876
|
+
$[9] = t16;
|
|
877
|
+
} else {
|
|
878
|
+
t16 = $[9];
|
|
879
|
+
}
|
|
880
|
+
const dividerVariant = t16;
|
|
537
881
|
const {
|
|
538
882
|
rowGap,
|
|
539
883
|
columnGap,
|
|
540
884
|
paneRef,
|
|
541
885
|
contentWrapperRef
|
|
542
886
|
} = React.useContext(PageLayoutContext);
|
|
543
|
-
|
|
544
|
-
// Ref to the drag handle for updating ARIA attributes
|
|
545
887
|
const handleRef = React.useRef(null);
|
|
546
|
-
|
|
547
|
-
// Cache drag start values to calculate relative delta during drag
|
|
548
|
-
// This approach is immune to layout shifts (scrollbars appearing/disappearing)
|
|
549
888
|
const dragStartClientXRef = React.useRef(0);
|
|
550
889
|
const dragStartWidthRef = React.useRef(0);
|
|
551
|
-
// Cache max width at drag start - won't change during a drag operation
|
|
552
890
|
const dragMaxWidthRef = React.useRef(0);
|
|
891
|
+
let t17;
|
|
892
|
+
if ($[10] !== contentWrapperRef || $[11] !== controlledWidth || $[12] !== minWidth || $[13] !== onResizeEnd || $[14] !== paneRef || $[15] !== resizable || $[16] !== width || $[17] !== widthStorageKey) {
|
|
893
|
+
t17 = {
|
|
894
|
+
width,
|
|
895
|
+
minWidth,
|
|
896
|
+
resizable,
|
|
897
|
+
widthStorageKey,
|
|
898
|
+
paneRef,
|
|
899
|
+
handleRef,
|
|
900
|
+
contentWrapperRef,
|
|
901
|
+
onResizeEnd,
|
|
902
|
+
currentWidth: controlledWidth
|
|
903
|
+
};
|
|
904
|
+
$[10] = contentWrapperRef;
|
|
905
|
+
$[11] = controlledWidth;
|
|
906
|
+
$[12] = minWidth;
|
|
907
|
+
$[13] = onResizeEnd;
|
|
908
|
+
$[14] = paneRef;
|
|
909
|
+
$[15] = resizable;
|
|
910
|
+
$[16] = width;
|
|
911
|
+
$[17] = widthStorageKey;
|
|
912
|
+
$[18] = t17;
|
|
913
|
+
} else {
|
|
914
|
+
t17 = $[18];
|
|
915
|
+
}
|
|
553
916
|
const {
|
|
554
917
|
currentWidth,
|
|
555
918
|
currentWidthRef,
|
|
@@ -558,349 +921,473 @@ const Pane = /*#__PURE__*/React.forwardRef(({
|
|
|
558
921
|
getMaxPaneWidth,
|
|
559
922
|
saveWidth,
|
|
560
923
|
getDefaultWidth
|
|
561
|
-
} = usePaneWidth(
|
|
562
|
-
width,
|
|
563
|
-
minWidth,
|
|
564
|
-
resizable,
|
|
565
|
-
widthStorageKey,
|
|
566
|
-
paneRef,
|
|
567
|
-
handleRef,
|
|
568
|
-
contentWrapperRef,
|
|
569
|
-
onResizeEnd,
|
|
570
|
-
currentWidth: controlledWidth
|
|
571
|
-
});
|
|
924
|
+
} = usePaneWidth(t17);
|
|
572
925
|
useRefObjectAsForwardedRef(forwardRef, paneRef);
|
|
573
926
|
const hasOverflow = useOverflow(paneRef);
|
|
574
927
|
const paneId = useId(id);
|
|
575
|
-
|
|
576
|
-
if (hasOverflow) {
|
|
577
|
-
|
|
578
|
-
if (
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
928
|
+
let labelProp;
|
|
929
|
+
if ($[19] !== hasOverflow || $[20] !== label || $[21] !== labelledBy) {
|
|
930
|
+
labelProp = {};
|
|
931
|
+
if (hasOverflow) {
|
|
932
|
+
process.env.NODE_ENV !== "production" ? warning(label === undefined && labelledBy === undefined, "The <PageLayout.Pane> has overflow and `aria-label` or `aria-labelledby` has not been set. Please provide `aria-label` or `aria-labelledby` to <PageLayout.Pane> in order to label this region.") : void 0;
|
|
933
|
+
if (labelledBy) {
|
|
934
|
+
labelProp["aria-labelledby"] = labelledBy;
|
|
935
|
+
} else {
|
|
936
|
+
if (label) {
|
|
937
|
+
labelProp["aria-label"] = label;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
582
940
|
}
|
|
941
|
+
$[19] = hasOverflow;
|
|
942
|
+
$[20] = label;
|
|
943
|
+
$[21] = labelledBy;
|
|
944
|
+
$[22] = labelProp;
|
|
945
|
+
} else {
|
|
946
|
+
labelProp = $[22];
|
|
947
|
+
}
|
|
948
|
+
let t18;
|
|
949
|
+
if ($[23] !== className) {
|
|
950
|
+
t18 = clsx(classes.PaneWrapper, className);
|
|
951
|
+
$[23] = className;
|
|
952
|
+
$[24] = t18;
|
|
953
|
+
} else {
|
|
954
|
+
t18 = $[24];
|
|
583
955
|
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
956
|
+
const t19 = typeof offsetHeader === "number" ? `${offsetHeader}px` : offsetHeader;
|
|
957
|
+
const t20 = `var(--spacing-${rowGap})`;
|
|
958
|
+
const t21 = `var(--spacing-${columnGap})`;
|
|
959
|
+
let t22;
|
|
960
|
+
if ($[25] !== style || $[26] !== t19 || $[27] !== t20 || $[28] !== t21) {
|
|
961
|
+
t22 = {
|
|
962
|
+
"--offset-header": t19,
|
|
963
|
+
"--spacing-row": t20,
|
|
964
|
+
"--spacing-column": t21,
|
|
590
965
|
...style
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
966
|
+
};
|
|
967
|
+
$[25] = style;
|
|
968
|
+
$[26] = t19;
|
|
969
|
+
$[27] = t20;
|
|
970
|
+
$[28] = t21;
|
|
971
|
+
$[29] = t22;
|
|
972
|
+
} else {
|
|
973
|
+
t22 = $[29];
|
|
974
|
+
}
|
|
975
|
+
const t23 = t22;
|
|
976
|
+
let t24;
|
|
977
|
+
if ($[30] !== responsiveHidden) {
|
|
978
|
+
t24 = getResponsiveAttributes("is-hidden", responsiveHidden);
|
|
979
|
+
$[30] = responsiveHidden;
|
|
980
|
+
$[31] = t24;
|
|
981
|
+
} else {
|
|
982
|
+
t24 = $[31];
|
|
983
|
+
}
|
|
984
|
+
let t25;
|
|
985
|
+
if ($[32] !== positionProp) {
|
|
986
|
+
t25 = getResponsiveAttributes("position", positionProp);
|
|
987
|
+
$[32] = positionProp;
|
|
988
|
+
$[33] = t25;
|
|
989
|
+
} else {
|
|
990
|
+
t25 = $[33];
|
|
991
|
+
}
|
|
992
|
+
const t26 = sticky || undefined;
|
|
993
|
+
let t27;
|
|
994
|
+
if ($[34] !== dividerProp || $[35] !== dividerVariant) {
|
|
995
|
+
t27 = isResponsiveValue(dividerProp) ? dividerProp : {
|
|
996
|
+
narrow: dividerVariant,
|
|
997
|
+
regular: "none"
|
|
998
|
+
};
|
|
999
|
+
$[34] = dividerProp;
|
|
1000
|
+
$[35] = dividerVariant;
|
|
1001
|
+
$[36] = t27;
|
|
1002
|
+
} else {
|
|
1003
|
+
t27 = $[36];
|
|
1004
|
+
}
|
|
1005
|
+
const t28 = `var(--spacing-${rowGap})`;
|
|
1006
|
+
let t29;
|
|
1007
|
+
if ($[37] !== t28) {
|
|
1008
|
+
t29 = {
|
|
1009
|
+
"--spacing": t28
|
|
1010
|
+
};
|
|
1011
|
+
$[37] = t28;
|
|
1012
|
+
$[38] = t29;
|
|
1013
|
+
} else {
|
|
1014
|
+
t29 = $[38];
|
|
1015
|
+
}
|
|
1016
|
+
const t30 = t29;
|
|
1017
|
+
let t31;
|
|
1018
|
+
if ($[39] !== positionProp || $[40] !== t27 || $[41] !== t30) {
|
|
1019
|
+
t31 = /*#__PURE__*/jsx(HorizontalDivider, {
|
|
1020
|
+
variant: t27,
|
|
600
1021
|
className: classes.PaneHorizontalDivider,
|
|
601
|
-
style:
|
|
602
|
-
'--spacing': `var(--spacing-${rowGap})`
|
|
603
|
-
},
|
|
1022
|
+
style: t30,
|
|
604
1023
|
position: positionProp
|
|
605
|
-
})
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
1024
|
+
});
|
|
1025
|
+
$[39] = positionProp;
|
|
1026
|
+
$[40] = t27;
|
|
1027
|
+
$[41] = t30;
|
|
1028
|
+
$[42] = t31;
|
|
1029
|
+
} else {
|
|
1030
|
+
t31 = $[42];
|
|
1031
|
+
}
|
|
1032
|
+
const t32 = resizable === true && !onResizeEnd;
|
|
1033
|
+
let t33;
|
|
1034
|
+
if ($[43] !== hasOverflow) {
|
|
1035
|
+
t33 = hasOverflow ? overflowProps : {};
|
|
1036
|
+
$[43] = hasOverflow;
|
|
1037
|
+
$[44] = t33;
|
|
1038
|
+
} else {
|
|
1039
|
+
t33 = $[44];
|
|
1040
|
+
}
|
|
1041
|
+
let t34;
|
|
1042
|
+
if ($[45] !== id || $[46] !== paneId) {
|
|
1043
|
+
t34 = id && {
|
|
1044
|
+
id: paneId
|
|
1045
|
+
};
|
|
1046
|
+
$[45] = id;
|
|
1047
|
+
$[46] = paneId;
|
|
1048
|
+
$[47] = t34;
|
|
1049
|
+
} else {
|
|
1050
|
+
t34 = $[47];
|
|
1051
|
+
}
|
|
1052
|
+
const t35 = resizable || undefined;
|
|
1053
|
+
const t36 = `var(--spacing-${padding})`;
|
|
1054
|
+
const t37 = isCustomWidthOptions(width) ? width.min : `${minWidth}px`;
|
|
1055
|
+
const t38 = isCustomWidthOptions(width) ? width.max : "calc(100vw - var(--pane-max-width-diff))";
|
|
1056
|
+
const t39 = isCustomWidthOptions(width) ? width.default : undefined;
|
|
1057
|
+
const t40 = `var(--pane-width-${isPaneWidth(width) ? width : "custom"})`;
|
|
1058
|
+
const t41 = `${currentWidth}px`;
|
|
1059
|
+
let t42;
|
|
1060
|
+
if ($[48] !== t36 || $[49] !== t37 || $[50] !== t38 || $[51] !== t39 || $[52] !== t40 || $[53] !== t41) {
|
|
1061
|
+
t42 = {
|
|
1062
|
+
"--spacing": t36,
|
|
1063
|
+
"--pane-min-width": t37,
|
|
1064
|
+
"--pane-max-width": t38,
|
|
1065
|
+
"--pane-width-custom": t39,
|
|
1066
|
+
"--pane-width-size": t40,
|
|
1067
|
+
"--pane-width": t41
|
|
1068
|
+
};
|
|
1069
|
+
$[48] = t36;
|
|
1070
|
+
$[49] = t37;
|
|
1071
|
+
$[50] = t38;
|
|
1072
|
+
$[51] = t39;
|
|
1073
|
+
$[52] = t40;
|
|
1074
|
+
$[53] = t41;
|
|
1075
|
+
$[54] = t42;
|
|
1076
|
+
} else {
|
|
1077
|
+
t42 = $[54];
|
|
1078
|
+
}
|
|
1079
|
+
const t43 = t42;
|
|
1080
|
+
let t44;
|
|
1081
|
+
if ($[55] !== children || $[56] !== labelProp || $[57] !== paneRef || $[58] !== t32 || $[59] !== t33 || $[60] !== t34 || $[61] !== t35 || $[62] !== t43) {
|
|
1082
|
+
t44 = /*#__PURE__*/jsx("div", {
|
|
1083
|
+
ref: paneRef,
|
|
1084
|
+
suppressHydrationWarning: t32,
|
|
1085
|
+
...t33,
|
|
613
1086
|
...labelProp,
|
|
614
|
-
...
|
|
615
|
-
id: paneId
|
|
616
|
-
}),
|
|
1087
|
+
...t34,
|
|
617
1088
|
className: classes.Pane,
|
|
618
|
-
"data-resizable":
|
|
619
|
-
style:
|
|
620
|
-
'--spacing': `var(--spacing-${padding})`,
|
|
621
|
-
'--pane-min-width': isCustomWidthOptions(width) ? width.min : `${minWidth}px`,
|
|
622
|
-
'--pane-max-width': isCustomWidthOptions(width) ? width.max : `calc(100vw - var(--pane-max-width-diff))`,
|
|
623
|
-
'--pane-width-custom': isCustomWidthOptions(width) ? width.default : undefined,
|
|
624
|
-
'--pane-width-size': `var(--pane-width-${isPaneWidth(width) ? width : 'custom'})`,
|
|
625
|
-
'--pane-width': `${currentWidth}px`
|
|
626
|
-
},
|
|
1089
|
+
"data-resizable": t35,
|
|
1090
|
+
style: t43,
|
|
627
1091
|
children: children
|
|
628
|
-
})
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
1092
|
+
});
|
|
1093
|
+
$[55] = children;
|
|
1094
|
+
$[56] = labelProp;
|
|
1095
|
+
$[57] = paneRef;
|
|
1096
|
+
$[58] = t32;
|
|
1097
|
+
$[59] = t33;
|
|
1098
|
+
$[60] = t34;
|
|
1099
|
+
$[61] = t35;
|
|
1100
|
+
$[62] = t43;
|
|
1101
|
+
$[63] = t44;
|
|
1102
|
+
} else {
|
|
1103
|
+
t44 = $[63];
|
|
1104
|
+
}
|
|
1105
|
+
let t45;
|
|
1106
|
+
if ($[64] !== dividerProp || $[65] !== dividerVariant || $[66] !== resizable) {
|
|
1107
|
+
t45 = isResponsiveValue(dividerProp) ? {
|
|
1108
|
+
narrow: "none",
|
|
1109
|
+
regular: resizable ? "line" : dividerProp.regular || "none",
|
|
1110
|
+
wide: resizable ? "line" : dividerProp.wide || dividerProp.regular || "none"
|
|
1111
|
+
} : {
|
|
1112
|
+
narrow: "none",
|
|
1113
|
+
regular: resizable ? "line" : dividerVariant
|
|
1114
|
+
};
|
|
1115
|
+
$[64] = dividerProp;
|
|
1116
|
+
$[65] = dividerVariant;
|
|
1117
|
+
$[66] = resizable;
|
|
1118
|
+
$[67] = t45;
|
|
1119
|
+
} else {
|
|
1120
|
+
t45 = $[67];
|
|
1121
|
+
}
|
|
1122
|
+
const t46 = `var(--spacing-${columnGap})`;
|
|
1123
|
+
let t47;
|
|
1124
|
+
if ($[68] !== t46) {
|
|
1125
|
+
t47 = {
|
|
1126
|
+
"--spacing": t46
|
|
1127
|
+
};
|
|
1128
|
+
$[68] = t46;
|
|
1129
|
+
$[69] = t47;
|
|
1130
|
+
} else {
|
|
1131
|
+
t47 = $[69];
|
|
1132
|
+
}
|
|
1133
|
+
const t48 = t47;
|
|
1134
|
+
let t49;
|
|
1135
|
+
if ($[70] !== currentWidth || $[71] !== currentWidthRef || $[72] !== getDefaultWidth || $[73] !== getMaxPaneWidth || $[74] !== maxPaneWidth || $[75] !== minPaneWidth || $[76] !== paneRef || $[77] !== position || $[78] !== resizable || $[79] !== saveWidth) {
|
|
1136
|
+
t49 = resizable ? /*#__PURE__*/jsx(DragHandle, {
|
|
1137
|
+
handleRef: handleRef,
|
|
1138
|
+
"aria-valuemin": minPaneWidth,
|
|
1139
|
+
"aria-valuemax": maxPaneWidth,
|
|
1140
|
+
"aria-valuenow": currentWidth,
|
|
1141
|
+
onDragStart: clientX => {
|
|
1142
|
+
var _paneRef$current$getB, _paneRef$current;
|
|
1143
|
+
dragStartClientXRef.current = clientX;
|
|
1144
|
+
dragStartWidthRef.current = (_paneRef$current$getB = (_paneRef$current = paneRef.current) === null || _paneRef$current === void 0 ? void 0 : _paneRef$current.getBoundingClientRect().width) !== null && _paneRef$current$getB !== void 0 ? _paneRef$current$getB : currentWidthRef.current;
|
|
1145
|
+
dragMaxWidthRef.current = getMaxPaneWidth();
|
|
645
1146
|
},
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
var _paneRef$current2;
|
|
670
|
-
currentWidthRef.current = newWidth;
|
|
671
|
-
(_paneRef$current2 = paneRef.current) === null || _paneRef$current2 === void 0 ? void 0 : _paneRef$current2.style.setProperty('--pane-width', `${newWidth}px`);
|
|
1147
|
+
onDrag: (value, isKeyboard) => {
|
|
1148
|
+
const maxWidth = isKeyboard ? getMaxPaneWidth() : dragMaxWidthRef.current;
|
|
1149
|
+
if (isKeyboard) {
|
|
1150
|
+
const delta = value;
|
|
1151
|
+
const newWidth = Math.max(minPaneWidth, Math.min(maxWidth, currentWidthRef.current + delta));
|
|
1152
|
+
if (newWidth !== currentWidthRef.current) {
|
|
1153
|
+
var _paneRef$current2;
|
|
1154
|
+
currentWidthRef.current = newWidth;
|
|
1155
|
+
(_paneRef$current2 = paneRef.current) === null || _paneRef$current2 === void 0 ? void 0 : _paneRef$current2.style.setProperty("--pane-width", `${newWidth}px`);
|
|
1156
|
+
updateAriaValues(handleRef.current, {
|
|
1157
|
+
current: newWidth,
|
|
1158
|
+
max: maxWidth
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
1161
|
+
} else {
|
|
1162
|
+
if (paneRef.current) {
|
|
1163
|
+
const deltaX = value - dragStartClientXRef.current;
|
|
1164
|
+
const directedDelta = position === "end" ? -deltaX : deltaX;
|
|
1165
|
+
const newWidth_0 = dragStartWidthRef.current + directedDelta;
|
|
1166
|
+
const clampedWidth = Math.max(minPaneWidth, Math.min(maxWidth, newWidth_0));
|
|
1167
|
+
if (Math.round(clampedWidth) !== Math.round(currentWidthRef.current)) {
|
|
1168
|
+
paneRef.current.style.setProperty("--pane-width", `${clampedWidth}px`);
|
|
1169
|
+
currentWidthRef.current = clampedWidth;
|
|
672
1170
|
updateAriaValues(handleRef.current, {
|
|
673
|
-
current:
|
|
1171
|
+
current: Math.round(clampedWidth),
|
|
674
1172
|
max: maxWidth
|
|
675
1173
|
});
|
|
676
1174
|
}
|
|
677
|
-
} else {
|
|
678
|
-
// Pointer: value is clientX - calculate width using relative delta from drag start
|
|
679
|
-
// This approach is immune to layout shifts during drag
|
|
680
|
-
if (paneRef.current) {
|
|
681
|
-
const deltaX = value - dragStartClientXRef.current;
|
|
682
|
-
// For position='end': cursor moving left (negative delta) increases width
|
|
683
|
-
// For position='start': cursor moving right (positive delta) increases width
|
|
684
|
-
const directedDelta = position === 'end' ? -deltaX : deltaX;
|
|
685
|
-
const newWidth = dragStartWidthRef.current + directedDelta;
|
|
686
|
-
const clampedWidth = Math.max(minPaneWidth, Math.min(maxWidth, newWidth));
|
|
687
|
-
|
|
688
|
-
// Only update if width actually changed
|
|
689
|
-
if (Math.round(clampedWidth) !== Math.round(currentWidthRef.current)) {
|
|
690
|
-
paneRef.current.style.setProperty('--pane-width', `${clampedWidth}px`);
|
|
691
|
-
currentWidthRef.current = clampedWidth;
|
|
692
|
-
updateAriaValues(handleRef.current, {
|
|
693
|
-
current: Math.round(clampedWidth),
|
|
694
|
-
max: maxWidth
|
|
695
|
-
});
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
},
|
|
700
|
-
onDragEnd: () => {
|
|
701
|
-
// Sync React state so parent re-renders use the correct width
|
|
702
|
-
saveWidth(currentWidthRef.current);
|
|
703
|
-
},
|
|
704
|
-
onDoubleClick: () => {
|
|
705
|
-
const resetWidth = getDefaultWidth();
|
|
706
|
-
if (paneRef.current) {
|
|
707
|
-
paneRef.current.style.setProperty('--pane-width', `${resetWidth}px`);
|
|
708
|
-
currentWidthRef.current = resetWidth;
|
|
709
|
-
updateAriaValues(handleRef.current, {
|
|
710
|
-
current: resetWidth
|
|
711
|
-
});
|
|
712
1175
|
}
|
|
713
|
-
saveWidth(resetWidth);
|
|
714
1176
|
}
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
|
|
1177
|
+
},
|
|
1178
|
+
onDragEnd: () => {
|
|
1179
|
+
saveWidth(currentWidthRef.current);
|
|
1180
|
+
},
|
|
1181
|
+
onDoubleClick: () => {
|
|
1182
|
+
const resetWidth = getDefaultWidth();
|
|
1183
|
+
if (paneRef.current) {
|
|
1184
|
+
paneRef.current.style.setProperty("--pane-width", `${resetWidth}px`);
|
|
1185
|
+
currentWidthRef.current = resetWidth;
|
|
1186
|
+
updateAriaValues(handleRef.current, {
|
|
1187
|
+
current: resetWidth
|
|
1188
|
+
});
|
|
1189
|
+
}
|
|
1190
|
+
saveWidth(resetWidth);
|
|
1191
|
+
}
|
|
1192
|
+
}) : null;
|
|
1193
|
+
$[70] = currentWidth;
|
|
1194
|
+
$[71] = currentWidthRef;
|
|
1195
|
+
$[72] = getDefaultWidth;
|
|
1196
|
+
$[73] = getMaxPaneWidth;
|
|
1197
|
+
$[74] = maxPaneWidth;
|
|
1198
|
+
$[75] = minPaneWidth;
|
|
1199
|
+
$[76] = paneRef;
|
|
1200
|
+
$[77] = position;
|
|
1201
|
+
$[78] = resizable;
|
|
1202
|
+
$[79] = saveWidth;
|
|
1203
|
+
$[80] = t49;
|
|
1204
|
+
} else {
|
|
1205
|
+
t49 = $[80];
|
|
1206
|
+
}
|
|
1207
|
+
let t50;
|
|
1208
|
+
if ($[81] !== positionProp || $[82] !== resizable || $[83] !== t45 || $[84] !== t48 || $[85] !== t49) {
|
|
1209
|
+
t50 = /*#__PURE__*/jsx(VerticalDivider, {
|
|
1210
|
+
variant: t45,
|
|
1211
|
+
draggable: resizable,
|
|
1212
|
+
position: positionProp,
|
|
1213
|
+
className: classes.PaneVerticalDivider,
|
|
1214
|
+
style: t48,
|
|
1215
|
+
children: t49
|
|
1216
|
+
});
|
|
1217
|
+
$[81] = positionProp;
|
|
1218
|
+
$[82] = resizable;
|
|
1219
|
+
$[83] = t45;
|
|
1220
|
+
$[84] = t48;
|
|
1221
|
+
$[85] = t49;
|
|
1222
|
+
$[86] = t50;
|
|
1223
|
+
} else {
|
|
1224
|
+
t50 = $[86];
|
|
1225
|
+
}
|
|
1226
|
+
let t51;
|
|
1227
|
+
if ($[87] !== t18 || $[88] !== t23 || $[89] !== t24 || $[90] !== t25 || $[91] !== t26 || $[92] !== t31 || $[93] !== t44 || $[94] !== t50) {
|
|
1228
|
+
t51 = /*#__PURE__*/jsxs("div", {
|
|
1229
|
+
className: t18,
|
|
1230
|
+
style: t23,
|
|
1231
|
+
...t24,
|
|
1232
|
+
...t25,
|
|
1233
|
+
"data-sticky": t26,
|
|
1234
|
+
children: [t31, t44, t50]
|
|
1235
|
+
});
|
|
1236
|
+
$[87] = t18;
|
|
1237
|
+
$[88] = t23;
|
|
1238
|
+
$[89] = t24;
|
|
1239
|
+
$[90] = t25;
|
|
1240
|
+
$[91] = t26;
|
|
1241
|
+
$[92] = t31;
|
|
1242
|
+
$[93] = t44;
|
|
1243
|
+
$[94] = t50;
|
|
1244
|
+
$[95] = t51;
|
|
1245
|
+
} else {
|
|
1246
|
+
t51 = $[95];
|
|
1247
|
+
}
|
|
1248
|
+
return t51;
|
|
718
1249
|
});
|
|
719
1250
|
Pane.displayName = 'PageLayout.Pane';
|
|
720
1251
|
|
|
721
1252
|
// ----------------------------------------------------------------------------
|
|
722
1253
|
// PageLayout.Footer
|
|
723
1254
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
const Sidebar = /*#__PURE__*/React.forwardRef(({
|
|
728
|
-
'aria-label': label,
|
|
729
|
-
'aria-labelledby': labelledBy,
|
|
730
|
-
position = 'start',
|
|
731
|
-
width = 'medium',
|
|
732
|
-
minWidth = 256,
|
|
733
|
-
padding = 'none',
|
|
734
|
-
resizable = false,
|
|
735
|
-
widthStorageKey,
|
|
736
|
-
divider = 'none',
|
|
737
|
-
sticky = false,
|
|
738
|
-
responsiveVariant = 'default',
|
|
739
|
-
hidden: responsiveHidden = false,
|
|
740
|
-
children,
|
|
741
|
-
id,
|
|
742
|
-
className,
|
|
743
|
-
style
|
|
744
|
-
}, forwardRef) => {
|
|
1255
|
+
const Footer = t0 => {
|
|
1256
|
+
const $ = c(28);
|
|
745
1257
|
const {
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
const
|
|
757
|
-
const
|
|
758
|
-
const
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
paneRef: sidebarRef,
|
|
772
|
-
handleRef,
|
|
773
|
-
contentWrapperRef: sidebarContentWrapperRef,
|
|
774
|
-
constrainToViewport: true
|
|
775
|
-
});
|
|
776
|
-
useRefObjectAsForwardedRef(forwardRef, sidebarRef);
|
|
777
|
-
const hasOverflow = useOverflow(sidebarRef);
|
|
778
|
-
const sidebarId = useId(id);
|
|
779
|
-
const labelProp = {};
|
|
780
|
-
if (hasOverflow) {
|
|
781
|
-
process.env.NODE_ENV !== "production" ? warning(label === undefined && labelledBy === undefined, 'The <PageLayout.Sidebar> has overflow and `aria-label` or `aria-labelledby` has not been set. ' + 'Please provide `aria-label` or `aria-labelledby` to <PageLayout.Sidebar> in order to label this ' + 'region.') : void 0;
|
|
782
|
-
if (labelledBy) {
|
|
783
|
-
labelProp['aria-labelledby'] = labelledBy;
|
|
784
|
-
} else if (label) {
|
|
785
|
-
labelProp['aria-label'] = label;
|
|
786
|
-
}
|
|
1258
|
+
"aria-label": label,
|
|
1259
|
+
"aria-labelledby": labelledBy,
|
|
1260
|
+
padding: t1,
|
|
1261
|
+
divider: t2,
|
|
1262
|
+
dividerWhenNarrow: t3,
|
|
1263
|
+
hidden: t4,
|
|
1264
|
+
children,
|
|
1265
|
+
className,
|
|
1266
|
+
style
|
|
1267
|
+
} = t0;
|
|
1268
|
+
const padding = t1 === undefined ? "none" : t1;
|
|
1269
|
+
const divider = t2 === undefined ? "none" : t2;
|
|
1270
|
+
const dividerWhenNarrow = t3 === undefined ? "inherit" : t3;
|
|
1271
|
+
const hidden = t4 === undefined ? false : t4;
|
|
1272
|
+
let t5;
|
|
1273
|
+
if ($[0] !== divider || $[1] !== dividerWhenNarrow) {
|
|
1274
|
+
t5 = !isResponsiveValue(divider) && dividerWhenNarrow !== "inherit" ? {
|
|
1275
|
+
regular: divider,
|
|
1276
|
+
narrow: dividerWhenNarrow
|
|
1277
|
+
} : divider;
|
|
1278
|
+
$[0] = divider;
|
|
1279
|
+
$[1] = dividerWhenNarrow;
|
|
1280
|
+
$[2] = t5;
|
|
1281
|
+
} else {
|
|
1282
|
+
t5 = $[2];
|
|
787
1283
|
}
|
|
788
|
-
|
|
789
|
-
className: clsx(classes.SidebarWrapper, className),
|
|
790
|
-
style: {
|
|
791
|
-
'--spacing-column': `var(--spacing-${columnGap})`,
|
|
792
|
-
...style
|
|
793
|
-
},
|
|
794
|
-
...getResponsiveAttributes('is-hidden', responsiveHidden),
|
|
795
|
-
"data-position": position,
|
|
796
|
-
"data-sticky": sticky || undefined,
|
|
797
|
-
"data-responsive-variant": responsiveVariant !== 'default' ? responsiveVariant : undefined,
|
|
798
|
-
children: [position === 'end' && /*#__PURE__*/jsx(SidebarDivider, {
|
|
799
|
-
position: position,
|
|
800
|
-
divider: divider,
|
|
801
|
-
resizable: resizable,
|
|
802
|
-
minPaneWidth: minPaneWidth,
|
|
803
|
-
maxPaneWidth: maxPaneWidth,
|
|
804
|
-
currentWidth: currentWidth,
|
|
805
|
-
currentWidthRef: currentWidthRef,
|
|
806
|
-
handleRef: handleRef,
|
|
807
|
-
sidebarRef: sidebarRef,
|
|
808
|
-
dragStartClientXRef: dragStartClientXRef,
|
|
809
|
-
dragStartWidthRef: dragStartWidthRef,
|
|
810
|
-
dragMaxWidthRef: dragMaxWidthRef,
|
|
811
|
-
getMaxPaneWidth: getMaxPaneWidth,
|
|
812
|
-
getDefaultWidth: getDefaultWidth,
|
|
813
|
-
saveWidth: saveWidth
|
|
814
|
-
}), /*#__PURE__*/jsx("div", {
|
|
815
|
-
ref: sidebarRef
|
|
816
|
-
// Suppress hydration mismatch for --pane-width when localStorage
|
|
817
|
-
// provides a width that differs from the server-rendered default.
|
|
818
|
-
,
|
|
819
|
-
suppressHydrationWarning: resizable === true && !!widthStorageKey,
|
|
820
|
-
...(hasOverflow ? overflowProps : {}),
|
|
821
|
-
...labelProp,
|
|
822
|
-
...(id && {
|
|
823
|
-
id: sidebarId
|
|
824
|
-
}),
|
|
825
|
-
className: classes.Sidebar,
|
|
826
|
-
"data-resizable": resizable || undefined,
|
|
827
|
-
style: {
|
|
828
|
-
'--spacing': `var(--spacing-${padding})`,
|
|
829
|
-
'--pane-min-width': isCustomWidthOptions(width) ? width.min : `${minWidth}px`,
|
|
830
|
-
'--pane-max-width': isCustomWidthOptions(width) ? width.max : `calc(100vw - var(--sidebar-max-width-diff))`,
|
|
831
|
-
'--pane-width-custom': isCustomWidthOptions(width) ? width.default : undefined,
|
|
832
|
-
'--pane-width-size': `var(--pane-width-${isPaneWidth(width) ? width : 'custom'})`,
|
|
833
|
-
'--pane-width': `${currentWidth}px`
|
|
834
|
-
},
|
|
835
|
-
children: children
|
|
836
|
-
}), position === 'start' && /*#__PURE__*/jsx(SidebarDivider, {
|
|
837
|
-
position: position,
|
|
838
|
-
divider: divider,
|
|
839
|
-
resizable: resizable,
|
|
840
|
-
minPaneWidth: minPaneWidth,
|
|
841
|
-
maxPaneWidth: maxPaneWidth,
|
|
842
|
-
currentWidth: currentWidth,
|
|
843
|
-
currentWidthRef: currentWidthRef,
|
|
844
|
-
handleRef: handleRef,
|
|
845
|
-
sidebarRef: sidebarRef,
|
|
846
|
-
dragStartClientXRef: dragStartClientXRef,
|
|
847
|
-
dragStartWidthRef: dragStartWidthRef,
|
|
848
|
-
dragMaxWidthRef: dragMaxWidthRef,
|
|
849
|
-
getMaxPaneWidth: getMaxPaneWidth,
|
|
850
|
-
getDefaultWidth: getDefaultWidth,
|
|
851
|
-
saveWidth: saveWidth
|
|
852
|
-
})]
|
|
853
|
-
});
|
|
854
|
-
});
|
|
855
|
-
Sidebar.displayName = 'PageLayout.Sidebar';
|
|
856
|
-
|
|
857
|
-
// ----------------------------------------------------------------------------
|
|
858
|
-
// PageLayout.Footer
|
|
859
|
-
|
|
860
|
-
const Footer = ({
|
|
861
|
-
'aria-label': label,
|
|
862
|
-
'aria-labelledby': labelledBy,
|
|
863
|
-
padding = 'none',
|
|
864
|
-
divider = 'none',
|
|
865
|
-
dividerWhenNarrow = 'inherit',
|
|
866
|
-
hidden = false,
|
|
867
|
-
children,
|
|
868
|
-
className,
|
|
869
|
-
style
|
|
870
|
-
}) => {
|
|
871
|
-
// Combine divider and dividerWhenNarrow for backwards compatibility
|
|
872
|
-
const dividerProp = !isResponsiveValue(divider) && dividerWhenNarrow !== 'inherit' ? {
|
|
873
|
-
regular: divider,
|
|
874
|
-
narrow: dividerWhenNarrow
|
|
875
|
-
} : divider;
|
|
1284
|
+
const dividerProp = t5;
|
|
876
1285
|
const {
|
|
877
1286
|
rowGap
|
|
878
1287
|
} = React.useContext(PageLayoutContext);
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
"
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
1288
|
+
let t6;
|
|
1289
|
+
if ($[3] !== hidden) {
|
|
1290
|
+
t6 = getResponsiveAttributes("hidden", hidden);
|
|
1291
|
+
$[3] = hidden;
|
|
1292
|
+
$[4] = t6;
|
|
1293
|
+
} else {
|
|
1294
|
+
t6 = $[4];
|
|
1295
|
+
}
|
|
1296
|
+
let t7;
|
|
1297
|
+
if ($[5] !== className) {
|
|
1298
|
+
t7 = clsx(classes.FooterWrapper, className);
|
|
1299
|
+
$[5] = className;
|
|
1300
|
+
$[6] = t7;
|
|
1301
|
+
} else {
|
|
1302
|
+
t7 = $[6];
|
|
1303
|
+
}
|
|
1304
|
+
const t8 = `var(--spacing-${rowGap})`;
|
|
1305
|
+
let t9;
|
|
1306
|
+
if ($[7] !== style || $[8] !== t8) {
|
|
1307
|
+
t9 = {
|
|
1308
|
+
"--spacing": t8,
|
|
886
1309
|
...style
|
|
887
|
-
}
|
|
888
|
-
|
|
1310
|
+
};
|
|
1311
|
+
$[7] = style;
|
|
1312
|
+
$[8] = t8;
|
|
1313
|
+
$[9] = t9;
|
|
1314
|
+
} else {
|
|
1315
|
+
t9 = $[9];
|
|
1316
|
+
}
|
|
1317
|
+
const t10 = t9;
|
|
1318
|
+
const t11 = `var(--spacing-${rowGap})`;
|
|
1319
|
+
let t12;
|
|
1320
|
+
if ($[10] !== t11) {
|
|
1321
|
+
t12 = {
|
|
1322
|
+
"--spacing": t11
|
|
1323
|
+
};
|
|
1324
|
+
$[10] = t11;
|
|
1325
|
+
$[11] = t12;
|
|
1326
|
+
} else {
|
|
1327
|
+
t12 = $[11];
|
|
1328
|
+
}
|
|
1329
|
+
const t13 = t12;
|
|
1330
|
+
let t14;
|
|
1331
|
+
if ($[12] !== dividerProp || $[13] !== t13) {
|
|
1332
|
+
t14 = /*#__PURE__*/jsx(HorizontalDivider, {
|
|
889
1333
|
className: classes.FooterHorizontalDivider,
|
|
890
|
-
style:
|
|
891
|
-
'--spacing': `var(--spacing-${rowGap})`
|
|
892
|
-
},
|
|
1334
|
+
style: t13,
|
|
893
1335
|
variant: dividerProp
|
|
894
|
-
})
|
|
1336
|
+
});
|
|
1337
|
+
$[12] = dividerProp;
|
|
1338
|
+
$[13] = t13;
|
|
1339
|
+
$[14] = t14;
|
|
1340
|
+
} else {
|
|
1341
|
+
t14 = $[14];
|
|
1342
|
+
}
|
|
1343
|
+
const t15 = `var(--spacing-${padding})`;
|
|
1344
|
+
let t16;
|
|
1345
|
+
if ($[15] !== t15) {
|
|
1346
|
+
t16 = {
|
|
1347
|
+
"--spacing": t15
|
|
1348
|
+
};
|
|
1349
|
+
$[15] = t15;
|
|
1350
|
+
$[16] = t16;
|
|
1351
|
+
} else {
|
|
1352
|
+
t16 = $[16];
|
|
1353
|
+
}
|
|
1354
|
+
const t17 = t16;
|
|
1355
|
+
let t18;
|
|
1356
|
+
if ($[17] !== children || $[18] !== t17) {
|
|
1357
|
+
t18 = /*#__PURE__*/jsx("div", {
|
|
895
1358
|
className: classes.FooterContent,
|
|
896
|
-
style:
|
|
897
|
-
'--spacing': `var(--spacing-${padding})`
|
|
898
|
-
},
|
|
1359
|
+
style: t17,
|
|
899
1360
|
children: children
|
|
900
|
-
})
|
|
901
|
-
|
|
1361
|
+
});
|
|
1362
|
+
$[17] = children;
|
|
1363
|
+
$[18] = t17;
|
|
1364
|
+
$[19] = t18;
|
|
1365
|
+
} else {
|
|
1366
|
+
t18 = $[19];
|
|
1367
|
+
}
|
|
1368
|
+
let t19;
|
|
1369
|
+
if ($[20] !== label || $[21] !== labelledBy || $[22] !== t10 || $[23] !== t14 || $[24] !== t18 || $[25] !== t6 || $[26] !== t7) {
|
|
1370
|
+
t19 = /*#__PURE__*/jsxs("footer", {
|
|
1371
|
+
"aria-label": label,
|
|
1372
|
+
"aria-labelledby": labelledBy,
|
|
1373
|
+
...t6,
|
|
1374
|
+
className: t7,
|
|
1375
|
+
style: t10,
|
|
1376
|
+
children: [t14, t18]
|
|
1377
|
+
});
|
|
1378
|
+
$[20] = label;
|
|
1379
|
+
$[21] = labelledBy;
|
|
1380
|
+
$[22] = t10;
|
|
1381
|
+
$[23] = t14;
|
|
1382
|
+
$[24] = t18;
|
|
1383
|
+
$[25] = t6;
|
|
1384
|
+
$[26] = t7;
|
|
1385
|
+
$[27] = t19;
|
|
1386
|
+
} else {
|
|
1387
|
+
t19 = $[27];
|
|
1388
|
+
}
|
|
1389
|
+
return t19;
|
|
902
1390
|
};
|
|
903
|
-
Footer.displayName = "Footer";
|
|
904
1391
|
Footer.displayName = 'PageLayout.Footer';
|
|
905
1392
|
|
|
906
1393
|
// ----------------------------------------------------------------------------
|
|
@@ -911,13 +1398,11 @@ const PageLayout = Object.assign(Root, {
|
|
|
911
1398
|
Header,
|
|
912
1399
|
Content,
|
|
913
1400
|
Pane: Pane,
|
|
914
|
-
Sidebar: Sidebar,
|
|
915
1401
|
Footer
|
|
916
1402
|
});
|
|
917
1403
|
Header.__SLOT__ = Symbol('PageLayout.Header');
|
|
918
1404
|
Content.__SLOT__ = Symbol('PageLayout.Content');
|
|
919
1405
|
Pane.__SLOT__ = Symbol('PageLayout.Pane');
|
|
920
|
-
Sidebar.__SLOT__ = Symbol('PageLayout.Sidebar');
|
|
921
1406
|
Footer.__SLOT__ = Symbol('PageLayout.Footer');
|
|
922
1407
|
|
|
923
1408
|
export { PageLayout };
|