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