@primer/react 38.30.0-rc.dc0369509 → 38.30.1-rc.2d1806208
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 +18 -0
- package/dist/ActionBar/ActionBar.d.ts +24 -1
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +96 -4
- package/dist/ActionBar/index.d.ts +21 -1
- package/dist/ActionBar/index.d.ts.map +1 -1
- package/dist/ActionBar/index.js +2 -1
- package/dist/Heading/Heading.js +69 -19
- package/dist/Link/Link.js +81 -25
- package/dist/NavList/NavList-b50d982b.css +2 -0
- package/dist/NavList/NavList-b50d982b.css.map +1 -0
- package/dist/NavList/NavList.d.ts +13 -4
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/NavList/NavList.js +238 -70
- package/dist/NavList/NavList.module.css.js +2 -2
- package/dist/Pagehead/Pagehead.js +45 -11
- package/dist/SelectPanel/SelectPanel.d.ts +2 -2
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +4 -1
- package/dist/SideNav.js +112 -41
- package/dist/UnderlineNav/UnderlineNav-47547980.css +2 -0
- package/dist/UnderlineNav/UnderlineNav-47547980.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNav.d.ts +1 -2
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +91 -331
- package/dist/UnderlineNav/UnderlineNav.module.css.js +2 -2
- package/dist/UnderlineNav/UnderlineNavContext.d.ts +1 -11
- package/dist/UnderlineNav/UnderlineNavContext.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNavContext.js +1 -4
- package/dist/UnderlineNav/UnderlineNavItem-402cd41c.css +2 -0
- package/dist/UnderlineNav/UnderlineNavItem-402cd41c.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNavItem.d.ts +1 -44
- package/dist/UnderlineNav/UnderlineNavItem.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNavItem.js +33 -38
- package/dist/UnderlineNav/UnderlineNavItem.module.css.js +1 -1
- package/dist/UnderlineNav/UnderlineNavItemsRegistry.d.ts +51 -0
- package/dist/UnderlineNav/UnderlineNavItemsRegistry.d.ts.map +1 -0
- package/dist/UnderlineNav/UnderlineNavItemsRegistry.js +8 -0
- package/dist/UnderlineNav/index.d.ts +1 -1
- package/dist/UnderlineNav/index.d.ts.map +1 -1
- package/dist/UnderlineNav/utils.d.ts +2 -0
- package/dist/UnderlineNav/utils.d.ts.map +1 -1
- package/dist/UnderlineNav/utils.js +2 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels-162f9aed.css +2 -0
- package/dist/experimental/UnderlinePanels/UnderlinePanels-162f9aed.css.map +1 -0
- package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts.map +1 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +8 -11
- package/dist/experimental/UnderlinePanels/UnderlinePanels.module.css.js +1 -1
- package/dist/internal/components/UnderlineTabbedInterface-1745a3d6.css +2 -0
- package/dist/internal/components/UnderlineTabbedInterface-1745a3d6.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 +66 -60
- package/dist/internal/components/UnderlineTabbedInterface.module.css.js +1 -1
- package/generated/components.json +72 -5
- package/package.json +1 -1
- package/dist/NavList/NavList-5dc067e3.css +0 -2
- package/dist/NavList/NavList-5dc067e3.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/UnderlineNav/types.d.ts +0 -10
- package/dist/UnderlineNav/types.d.ts.map +0 -1
- 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
package/dist/NavList/NavList.js
CHANGED
|
@@ -12,65 +12,210 @@ import navListClasses from './NavList.module.css.js';
|
|
|
12
12
|
import { flushSync } from 'react-dom';
|
|
13
13
|
import { useSlots } from '../hooks/useSlots.js';
|
|
14
14
|
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
15
|
-
import
|
|
15
|
+
import visuallyHiddenClasses from '../_VisuallyHidden.module.css.js';
|
|
16
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
17
|
+
import Heading$1 from '../Heading/Heading.js';
|
|
18
|
+
|
|
19
|
+
// Publishes the resolved numeric level of a NavList.Heading (e.g. 2 for an h2) so
|
|
20
|
+
// NavList.Group/NavList.GroupHeading can default to one level deeper. `null` when
|
|
21
|
+
// there is no NavList.Heading, in which case groups keep their historical h3 default.
|
|
22
|
+
const NavListHeadingLevelContext = /*#__PURE__*/React.createContext(null);
|
|
23
|
+
function headingTagToLevel(as) {
|
|
24
|
+
return Number.parseInt(as.slice(1), 10);
|
|
25
|
+
}
|
|
26
|
+
function levelToHeadingTag(level) {
|
|
27
|
+
// Clamp to h4 so group headings never go deeper than the supported hierarchy.
|
|
28
|
+
const clamped = Math.min(Math.max(level, 1), 4);
|
|
29
|
+
return `h${clamped}`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ----------------------------------------------------------------------------
|
|
33
|
+
// NavList
|
|
16
34
|
|
|
17
35
|
const Root = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
18
|
-
|
|
36
|
+
var _heading$props$id, _ariaLabelledby;
|
|
37
|
+
const $ = c(24);
|
|
38
|
+
let ariaLabel;
|
|
39
|
+
let ariaLabelledby;
|
|
19
40
|
let children;
|
|
20
41
|
let props;
|
|
21
42
|
if ($[0] !== t0) {
|
|
22
43
|
({
|
|
23
44
|
children,
|
|
45
|
+
"aria-label": ariaLabel,
|
|
46
|
+
"aria-labelledby": ariaLabelledby,
|
|
24
47
|
...props
|
|
25
48
|
} = t0);
|
|
26
49
|
$[0] = t0;
|
|
27
|
-
$[1] =
|
|
28
|
-
$[2] =
|
|
50
|
+
$[1] = ariaLabel;
|
|
51
|
+
$[2] = ariaLabelledby;
|
|
52
|
+
$[3] = children;
|
|
53
|
+
$[4] = props;
|
|
29
54
|
} else {
|
|
30
|
-
|
|
31
|
-
|
|
55
|
+
ariaLabel = $[1];
|
|
56
|
+
ariaLabelledby = $[2];
|
|
57
|
+
children = $[3];
|
|
58
|
+
props = $[4];
|
|
32
59
|
}
|
|
33
60
|
let t1;
|
|
34
|
-
if ($[
|
|
61
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
35
62
|
t1 = {
|
|
36
|
-
|
|
63
|
+
heading: Heading
|
|
37
64
|
};
|
|
38
|
-
$[
|
|
65
|
+
$[5] = t1;
|
|
39
66
|
} else {
|
|
40
|
-
t1 = $[
|
|
67
|
+
t1 = $[5];
|
|
41
68
|
}
|
|
69
|
+
const [slots, childrenWithoutHeading] = useSlots(children, t1);
|
|
70
|
+
const fallbackHeadingId = useId();
|
|
71
|
+
const heading = slots.heading;
|
|
72
|
+
const headingId = heading ? (_heading$props$id = heading.props.id) !== null && _heading$props$id !== void 0 ? _heading$props$id : fallbackHeadingId : undefined;
|
|
42
73
|
let t2;
|
|
43
|
-
if ($[
|
|
44
|
-
|
|
45
|
-
|
|
74
|
+
if ($[6] !== heading) {
|
|
75
|
+
var _heading$props$as;
|
|
76
|
+
t2 = heading ? headingTagToLevel((_heading$props$as = heading.props.as) !== null && _heading$props$as !== void 0 ? _heading$props$as : "h2") : null;
|
|
77
|
+
$[6] = heading;
|
|
78
|
+
$[7] = t2;
|
|
79
|
+
} else {
|
|
80
|
+
t2 = $[7];
|
|
81
|
+
}
|
|
82
|
+
const headingLevel = t2;
|
|
83
|
+
const navLabelledby = (_ariaLabelledby = ariaLabelledby) !== null && _ariaLabelledby !== void 0 ? _ariaLabelledby : ariaLabel ? undefined : headingId;
|
|
84
|
+
let t3;
|
|
85
|
+
if ($[8] !== heading || $[9] !== headingId) {
|
|
86
|
+
t3 = heading ? /*#__PURE__*/React.cloneElement(heading, {
|
|
87
|
+
id: headingId
|
|
88
|
+
}) : null;
|
|
89
|
+
$[8] = heading;
|
|
90
|
+
$[9] = headingId;
|
|
91
|
+
$[10] = t3;
|
|
92
|
+
} else {
|
|
93
|
+
t3 = $[10];
|
|
94
|
+
}
|
|
95
|
+
let t4;
|
|
96
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
97
|
+
t4 = {
|
|
98
|
+
container: "NavList"
|
|
99
|
+
};
|
|
100
|
+
$[11] = t4;
|
|
101
|
+
} else {
|
|
102
|
+
t4 = $[11];
|
|
103
|
+
}
|
|
104
|
+
let t5;
|
|
105
|
+
if ($[12] !== childrenWithoutHeading) {
|
|
106
|
+
t5 = /*#__PURE__*/jsx(ActionListContainerContext.Provider, {
|
|
107
|
+
value: t4,
|
|
46
108
|
children: /*#__PURE__*/jsx(ActionList, {
|
|
47
|
-
children:
|
|
109
|
+
children: childrenWithoutHeading
|
|
48
110
|
})
|
|
49
111
|
});
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
112
|
+
$[12] = childrenWithoutHeading;
|
|
113
|
+
$[13] = t5;
|
|
52
114
|
} else {
|
|
53
|
-
|
|
115
|
+
t5 = $[13];
|
|
54
116
|
}
|
|
55
|
-
let
|
|
56
|
-
if ($[
|
|
57
|
-
|
|
117
|
+
let t6;
|
|
118
|
+
if ($[14] !== headingLevel || $[15] !== t3 || $[16] !== t5) {
|
|
119
|
+
t6 = /*#__PURE__*/jsxs(NavListHeadingLevelContext.Provider, {
|
|
120
|
+
value: headingLevel,
|
|
121
|
+
children: [t3, t5]
|
|
122
|
+
});
|
|
123
|
+
$[14] = headingLevel;
|
|
124
|
+
$[15] = t3;
|
|
125
|
+
$[16] = t5;
|
|
126
|
+
$[17] = t6;
|
|
127
|
+
} else {
|
|
128
|
+
t6 = $[17];
|
|
129
|
+
}
|
|
130
|
+
let t7;
|
|
131
|
+
if ($[18] !== ariaLabel || $[19] !== navLabelledby || $[20] !== props || $[21] !== ref || $[22] !== t6) {
|
|
132
|
+
t7 = /*#__PURE__*/jsx("nav", {
|
|
58
133
|
...props,
|
|
134
|
+
"aria-label": ariaLabel,
|
|
135
|
+
"aria-labelledby": navLabelledby,
|
|
59
136
|
ref: ref,
|
|
60
137
|
"data-component": "NavList",
|
|
61
|
-
children:
|
|
138
|
+
children: t6
|
|
62
139
|
});
|
|
63
|
-
$[
|
|
64
|
-
$[
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
140
|
+
$[18] = ariaLabel;
|
|
141
|
+
$[19] = navLabelledby;
|
|
142
|
+
$[20] = props;
|
|
143
|
+
$[21] = ref;
|
|
144
|
+
$[22] = t6;
|
|
145
|
+
$[23] = t7;
|
|
67
146
|
} else {
|
|
68
|
-
|
|
147
|
+
t7 = $[23];
|
|
69
148
|
}
|
|
70
|
-
return
|
|
149
|
+
return t7;
|
|
71
150
|
});
|
|
72
151
|
Root.displayName = 'NavList';
|
|
73
152
|
|
|
153
|
+
// ----------------------------------------------------------------------------
|
|
154
|
+
// NavList.Heading
|
|
155
|
+
|
|
156
|
+
const Heading = t0 => {
|
|
157
|
+
const $ = c(14);
|
|
158
|
+
let children;
|
|
159
|
+
let className;
|
|
160
|
+
let props;
|
|
161
|
+
let t1;
|
|
162
|
+
let t2;
|
|
163
|
+
if ($[0] !== t0) {
|
|
164
|
+
({
|
|
165
|
+
as: t1,
|
|
166
|
+
visuallyHidden: t2,
|
|
167
|
+
className,
|
|
168
|
+
children,
|
|
169
|
+
...props
|
|
170
|
+
} = t0);
|
|
171
|
+
$[0] = t0;
|
|
172
|
+
$[1] = children;
|
|
173
|
+
$[2] = className;
|
|
174
|
+
$[3] = props;
|
|
175
|
+
$[4] = t1;
|
|
176
|
+
$[5] = t2;
|
|
177
|
+
} else {
|
|
178
|
+
children = $[1];
|
|
179
|
+
className = $[2];
|
|
180
|
+
props = $[3];
|
|
181
|
+
t1 = $[4];
|
|
182
|
+
t2 = $[5];
|
|
183
|
+
}
|
|
184
|
+
const as = t1 === undefined ? "h2" : t1;
|
|
185
|
+
const visuallyHidden = t2 === undefined ? false : t2;
|
|
186
|
+
const t3 = visuallyHidden ? visuallyHiddenClasses.InternalVisuallyHidden : navListClasses.Heading;
|
|
187
|
+
let t4;
|
|
188
|
+
if ($[6] !== className || $[7] !== t3) {
|
|
189
|
+
t4 = clsx(t3, className);
|
|
190
|
+
$[6] = className;
|
|
191
|
+
$[7] = t3;
|
|
192
|
+
$[8] = t4;
|
|
193
|
+
} else {
|
|
194
|
+
t4 = $[8];
|
|
195
|
+
}
|
|
196
|
+
let t5;
|
|
197
|
+
if ($[9] !== as || $[10] !== children || $[11] !== props || $[12] !== t4) {
|
|
198
|
+
t5 = /*#__PURE__*/jsx(Heading$1, {
|
|
199
|
+
as: as,
|
|
200
|
+
variant: "small",
|
|
201
|
+
className: t4,
|
|
202
|
+
"data-component": "NavList.Heading",
|
|
203
|
+
...props,
|
|
204
|
+
children: children
|
|
205
|
+
});
|
|
206
|
+
$[9] = as;
|
|
207
|
+
$[10] = children;
|
|
208
|
+
$[11] = props;
|
|
209
|
+
$[12] = t4;
|
|
210
|
+
$[13] = t5;
|
|
211
|
+
} else {
|
|
212
|
+
t5 = $[13];
|
|
213
|
+
}
|
|
214
|
+
return t5;
|
|
215
|
+
};
|
|
216
|
+
Heading.displayName = 'NavList.Heading';
|
|
217
|
+
Heading.__SLOT__ = Symbol('NavList.Heading');
|
|
218
|
+
|
|
74
219
|
// ----------------------------------------------------------------------------
|
|
75
220
|
// NavList.Item
|
|
76
221
|
|
|
@@ -398,7 +543,7 @@ TrailingAction.displayName = 'NavList.TrailingAction';
|
|
|
398
543
|
// NavList.Group
|
|
399
544
|
|
|
400
545
|
const Group = t0 => {
|
|
401
|
-
const $ = c(
|
|
546
|
+
const $ = c(14);
|
|
402
547
|
let children;
|
|
403
548
|
let props;
|
|
404
549
|
let title;
|
|
@@ -417,41 +562,52 @@ const Group = t0 => {
|
|
|
417
562
|
props = $[2];
|
|
418
563
|
title = $[3];
|
|
419
564
|
}
|
|
565
|
+
const headingLevel = React.useContext(NavListHeadingLevelContext);
|
|
420
566
|
let t1;
|
|
421
|
-
if ($[4]
|
|
422
|
-
t1 =
|
|
423
|
-
$[4] =
|
|
567
|
+
if ($[4] !== headingLevel) {
|
|
568
|
+
t1 = headingLevel ? levelToHeadingTag(headingLevel + 1) : "h3";
|
|
569
|
+
$[4] = headingLevel;
|
|
570
|
+
$[5] = t1;
|
|
424
571
|
} else {
|
|
425
|
-
t1 = $[
|
|
572
|
+
t1 = $[5];
|
|
426
573
|
}
|
|
574
|
+
const groupHeadingAs = t1;
|
|
427
575
|
let t2;
|
|
428
|
-
if ($[
|
|
429
|
-
t2 =
|
|
430
|
-
as: "h3",
|
|
431
|
-
"data-component": "ActionList.GroupHeading",
|
|
432
|
-
children: title
|
|
433
|
-
}) : null;
|
|
434
|
-
$[5] = title;
|
|
576
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
577
|
+
t2 = /*#__PURE__*/jsx(ActionList.Divider, {});
|
|
435
578
|
$[6] = t2;
|
|
436
579
|
} else {
|
|
437
580
|
t2 = $[6];
|
|
438
581
|
}
|
|
439
582
|
let t3;
|
|
440
|
-
if ($[7] !==
|
|
441
|
-
t3 = /*#__PURE__*/
|
|
442
|
-
|
|
583
|
+
if ($[7] !== groupHeadingAs || $[8] !== title) {
|
|
584
|
+
t3 = title ? /*#__PURE__*/jsx(ActionList.GroupHeading, {
|
|
585
|
+
as: groupHeadingAs,
|
|
586
|
+
"data-component": "ActionList.GroupHeading",
|
|
587
|
+
children: title
|
|
588
|
+
}) : null;
|
|
589
|
+
$[7] = groupHeadingAs;
|
|
590
|
+
$[8] = title;
|
|
591
|
+
$[9] = t3;
|
|
592
|
+
} else {
|
|
593
|
+
t3 = $[9];
|
|
594
|
+
}
|
|
595
|
+
let t4;
|
|
596
|
+
if ($[10] !== children || $[11] !== props || $[12] !== t3) {
|
|
597
|
+
t4 = /*#__PURE__*/jsxs(Fragment, {
|
|
598
|
+
children: [t2, /*#__PURE__*/jsxs(ActionList.Group, {
|
|
443
599
|
...props,
|
|
444
|
-
children: [
|
|
600
|
+
children: [t3, children]
|
|
445
601
|
})]
|
|
446
602
|
});
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
$[
|
|
603
|
+
$[10] = children;
|
|
604
|
+
$[11] = props;
|
|
605
|
+
$[12] = t3;
|
|
606
|
+
$[13] = t4;
|
|
451
607
|
} else {
|
|
452
|
-
|
|
608
|
+
t4 = $[13];
|
|
453
609
|
}
|
|
454
|
-
return
|
|
610
|
+
return t4;
|
|
455
611
|
};
|
|
456
612
|
// ----------------------------------------------------------------------------
|
|
457
613
|
// NavList.GroupExpand
|
|
@@ -593,49 +749,60 @@ const GroupExpand = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
|
593
749
|
* It was primarily added to allow links in group headings.
|
|
594
750
|
*/
|
|
595
751
|
const GroupHeading = t0 => {
|
|
596
|
-
const $ = c(
|
|
752
|
+
const $ = c(13);
|
|
753
|
+
let as;
|
|
597
754
|
let className;
|
|
598
755
|
let rest;
|
|
599
|
-
let t1;
|
|
600
756
|
if ($[0] !== t0) {
|
|
601
757
|
({
|
|
602
|
-
as
|
|
758
|
+
as,
|
|
603
759
|
className,
|
|
604
760
|
...rest
|
|
605
761
|
} = t0);
|
|
606
762
|
$[0] = t0;
|
|
607
|
-
$[1] =
|
|
608
|
-
$[2] =
|
|
609
|
-
$[3] =
|
|
763
|
+
$[1] = as;
|
|
764
|
+
$[2] = className;
|
|
765
|
+
$[3] = rest;
|
|
766
|
+
} else {
|
|
767
|
+
as = $[1];
|
|
768
|
+
className = $[2];
|
|
769
|
+
rest = $[3];
|
|
770
|
+
}
|
|
771
|
+
const headingLevel = React.useContext(NavListHeadingLevelContext);
|
|
772
|
+
let t1;
|
|
773
|
+
if ($[4] !== as || $[5] !== headingLevel) {
|
|
774
|
+
var _as;
|
|
775
|
+
t1 = (_as = as) !== null && _as !== void 0 ? _as : headingLevel ? levelToHeadingTag(headingLevel + 1) : "h3";
|
|
776
|
+
$[4] = as;
|
|
777
|
+
$[5] = headingLevel;
|
|
778
|
+
$[6] = t1;
|
|
610
779
|
} else {
|
|
611
|
-
|
|
612
|
-
rest = $[2];
|
|
613
|
-
t1 = $[3];
|
|
780
|
+
t1 = $[6];
|
|
614
781
|
}
|
|
615
|
-
const
|
|
782
|
+
const resolvedAs = t1;
|
|
616
783
|
let t2;
|
|
617
|
-
if ($[
|
|
784
|
+
if ($[7] !== className) {
|
|
618
785
|
t2 = clsx(navListClasses.GroupHeading, className);
|
|
619
|
-
$[
|
|
620
|
-
$[
|
|
786
|
+
$[7] = className;
|
|
787
|
+
$[8] = t2;
|
|
621
788
|
} else {
|
|
622
|
-
t2 = $[
|
|
789
|
+
t2 = $[8];
|
|
623
790
|
}
|
|
624
791
|
let t3;
|
|
625
|
-
if ($[
|
|
792
|
+
if ($[9] !== resolvedAs || $[10] !== rest || $[11] !== t2) {
|
|
626
793
|
t3 = /*#__PURE__*/jsx(ActionList.GroupHeading, {
|
|
627
|
-
as:
|
|
794
|
+
as: resolvedAs,
|
|
628
795
|
className: t2,
|
|
629
796
|
"data-component": "NavList.GroupHeading",
|
|
630
797
|
headingWrapElement: "li",
|
|
631
798
|
...rest
|
|
632
799
|
});
|
|
633
|
-
$[
|
|
634
|
-
$[
|
|
635
|
-
$[
|
|
636
|
-
$[
|
|
800
|
+
$[9] = resolvedAs;
|
|
801
|
+
$[10] = rest;
|
|
802
|
+
$[11] = t2;
|
|
803
|
+
$[12] = t3;
|
|
637
804
|
} else {
|
|
638
|
-
t3 = $[
|
|
805
|
+
t3 = $[12];
|
|
639
806
|
}
|
|
640
807
|
return t3;
|
|
641
808
|
};
|
|
@@ -645,6 +812,7 @@ const GroupHeading = t0 => {
|
|
|
645
812
|
|
|
646
813
|
const NavList = Object.assign(Root, {
|
|
647
814
|
Description: ActionList.Description,
|
|
815
|
+
Heading,
|
|
648
816
|
Item,
|
|
649
817
|
SubNav,
|
|
650
818
|
LeadingVisual,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './NavList-
|
|
1
|
+
import './NavList-b50d982b.css';
|
|
2
2
|
|
|
3
|
-
var navListClasses = {"GroupHeading":"prc-NavList-GroupHeading-mN50z"};
|
|
3
|
+
var navListClasses = {"Heading":"prc-NavList-Heading--JQMj","GroupHeading":"prc-NavList-GroupHeading-mN50z"};
|
|
4
4
|
|
|
5
5
|
export { navListClasses as default };
|
|
@@ -1,18 +1,52 @@
|
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
1
2
|
import { clsx } from 'clsx';
|
|
2
3
|
import classes from './Pagehead.module.css.js';
|
|
3
4
|
import { jsx } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
|
-
const Pagehead =
|
|
6
|
-
|
|
7
|
-
className
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
const Pagehead = t0 => {
|
|
7
|
+
const $ = c(10);
|
|
8
|
+
let className;
|
|
9
|
+
let rest;
|
|
10
|
+
let t1;
|
|
11
|
+
if ($[0] !== t0) {
|
|
12
|
+
({
|
|
13
|
+
as: t1,
|
|
14
|
+
className,
|
|
15
|
+
...rest
|
|
16
|
+
} = t0);
|
|
17
|
+
$[0] = t0;
|
|
18
|
+
$[1] = className;
|
|
19
|
+
$[2] = rest;
|
|
20
|
+
$[3] = t1;
|
|
21
|
+
} else {
|
|
22
|
+
className = $[1];
|
|
23
|
+
rest = $[2];
|
|
24
|
+
t1 = $[3];
|
|
25
|
+
}
|
|
26
|
+
const BaseComponent = t1 === undefined ? "div" : t1;
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[4] !== className) {
|
|
29
|
+
t2 = clsx(classes.Pagehead, className);
|
|
30
|
+
$[4] = className;
|
|
31
|
+
$[5] = t2;
|
|
32
|
+
} else {
|
|
33
|
+
t2 = $[5];
|
|
34
|
+
}
|
|
35
|
+
let t3;
|
|
36
|
+
if ($[6] !== BaseComponent || $[7] !== rest || $[8] !== t2) {
|
|
37
|
+
t3 = /*#__PURE__*/jsx(BaseComponent, {
|
|
38
|
+
className: t2,
|
|
39
|
+
"data-component": "Pagehead",
|
|
40
|
+
...rest
|
|
41
|
+
});
|
|
42
|
+
$[6] = BaseComponent;
|
|
43
|
+
$[7] = rest;
|
|
44
|
+
$[8] = t2;
|
|
45
|
+
$[9] = t3;
|
|
46
|
+
} else {
|
|
47
|
+
t3 = $[9];
|
|
48
|
+
}
|
|
49
|
+
return t3;
|
|
15
50
|
};
|
|
16
|
-
Pagehead.displayName = "Pagehead";
|
|
17
51
|
|
|
18
52
|
export { Pagehead as default };
|
|
@@ -63,8 +63,8 @@ type SelectPanelVariantProps = {
|
|
|
63
63
|
variant: 'modal';
|
|
64
64
|
onCancel: () => void;
|
|
65
65
|
};
|
|
66
|
-
export type SelectPanelProps = SelectPanelBaseProps & Omit<FilteredActionListProps, 'selectionVariant' | 'variant' | 'message'> & Pick<AnchoredOverlayProps, 'open' | 'height' | 'width' | 'align' | 'displayInViewport'> & AnchoredOverlayWrapperAnchorProps & (SelectPanelSingleSelection | SelectPanelMultiSelection) & SelectPanelVariantProps;
|
|
67
|
-
declare function Panel({ open, onOpenChange, renderAnchor, anchorRef: externalAnchorRef, placeholder, placeholderText, inputLabel, selected, title, subtitle, onSelectedChange, filterValue: externalFilterValue, onFilterChange: externalOnFilterChange, items, footer, textInputProps, overlayProps, loading, initialLoadingType, className, height, width, id, message, notice, onCancel, variant, secondaryAction, showSelectedOptionsFirst, disableFullscreenOnNarrow, align, showSelectAll, focusPrependedElements, virtualized, displayInViewport, ...listProps }: SelectPanelProps): JSX.Element;
|
|
66
|
+
export type SelectPanelProps = SelectPanelBaseProps & Omit<FilteredActionListProps, 'selectionVariant' | 'variant' | 'message'> & Pick<AnchoredOverlayProps, 'open' | 'height' | 'width' | 'align' | 'displayInViewport' | 'cssAnchorPositioningSettings'> & AnchoredOverlayWrapperAnchorProps & (SelectPanelSingleSelection | SelectPanelMultiSelection) & SelectPanelVariantProps;
|
|
67
|
+
declare function Panel({ open, onOpenChange, renderAnchor, anchorRef: externalAnchorRef, placeholder, placeholderText, inputLabel, selected, title, subtitle, onSelectedChange, filterValue: externalFilterValue, onFilterChange: externalOnFilterChange, items, footer, textInputProps, overlayProps, loading, initialLoadingType, className, height, width, id, message, notice, onCancel, variant, secondaryAction, showSelectedOptionsFirst, disableFullscreenOnNarrow, align, showSelectAll, focusPrependedElements, virtualized, displayInViewport, cssAnchorPositioningSettings, ...listProps }: SelectPanelProps): JSX.Element;
|
|
68
68
|
declare const SecondaryButton: React.FC<ButtonProps>;
|
|
69
69
|
declare const SecondaryLink: React.FC<LinkButtonProps & ButtonProps>;
|
|
70
70
|
export declare const SelectPanel: typeof Panel & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectPanel.d.ts","sourceRoot":"","sources":["../../src/SelectPanel/SelectPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAC1F,OAAO,KAAK,EAAE,EAAoD,KAAK,GAAG,EAAC,MAAM,OAAO,CAAA;AACxF,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAA;AAE5D,OAAO,KAAK,EA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116
|
virtualized,
|
|
117
117
|
displayInViewport,
|
|
118
|
+
cssAnchorPositioningSettings,
|
|
118
119
|
...listProps
|
|
119
120
|
}) {
|
|
120
121
|
var _listProps$groupMetad;
|
|
@@ -708,9 +709,11 @@ function Panel({
|
|
|
708
709
|
closeButtonProps: closeButtonProps,
|
|
709
710
|
displayInViewport: displayInViewport
|
|
710
711
|
// Modal variant is positioned manually so native CSS anchor positioning must not be used
|
|
712
|
+
// Other cssAnchorPositioningSettings (e.g. fallbackStrategy) may be passed in and are forwarded here
|
|
711
713
|
,
|
|
712
714
|
cssAnchorPositioningSettings: {
|
|
713
|
-
|
|
715
|
+
...cssAnchorPositioningSettings,
|
|
716
|
+
disable: variant === 'modal' || (cssAnchorPositioningSettings === null || cssAnchorPositioningSettings === void 0 ? void 0 : cssAnchorPositioningSettings.disable)
|
|
714
717
|
},
|
|
715
718
|
children: /*#__PURE__*/jsxs("div", {
|
|
716
719
|
className: classes.Wrapper,
|