@primer/react 38.36.0-rc.bd3520b7c → 38.36.0
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 +10 -8
- package/dist/ActionList/Heading.js +2 -1
- package/dist/ActionList/Item.js +282 -277
- package/dist/ActionList/LinkItem.js +11 -3
- package/dist/ActionList/index.d.ts +3 -0
- package/dist/ActionList/shared.d.ts +4 -0
- package/dist/CounterLabel/CounterLabel.js +5 -2
- package/dist/Details/Details.js +2 -1
- package/dist/Dialog/Dialog.js +3 -2
- package/dist/NavList/NavList.d.ts +2 -0
- package/dist/NavList/NavList.js +15 -11
- package/dist/PageHeader/PageHeader.js +2 -1
- package/dist/Portal/Portal.js +91 -29
- package/dist/SelectPanel/SelectPanel.js +26 -25
- package/dist/TooltipV2/Tooltip.js +3 -2
- package/dist/TreeView/TreeView.js +0 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts +3 -2
- package/dist/UnderlineNav/UnderlineNav.js +1 -1
- package/dist/deprecated/ActionList/List.js +2 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +7 -4
- package/dist/hooks/useFocusZone.js +2 -1
- package/dist/hooks/useMenuInitialFocus.js +72 -57
- package/generated/components.json +7 -1
- package/package.json +2 -2
package/dist/ActionList/Item.js
CHANGED
|
@@ -138,9 +138,10 @@ const listRoleTypes = [
|
|
|
138
138
|
"tree"
|
|
139
139
|
];
|
|
140
140
|
const UnwrappedItem = (t0, forwardedRef) => {
|
|
141
|
-
var _slots$trailingVisual, _slots$description$pr, _slots$description, _slots$trailingAction;
|
|
142
|
-
const $ = c(
|
|
141
|
+
var _slots$trailingVisual, _slots$description$pr, _slots$description, _slots$trailingAction, _PrivateTooltipText2;
|
|
142
|
+
const $ = c(162);
|
|
143
143
|
let _PrivateItemWrapper;
|
|
144
|
+
let _PrivateTooltipText;
|
|
144
145
|
let className;
|
|
145
146
|
let id;
|
|
146
147
|
let inactiveText;
|
|
@@ -154,7 +155,7 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
154
155
|
let t4;
|
|
155
156
|
let t5;
|
|
156
157
|
if ($[0] !== t0) {
|
|
157
|
-
const { variant: t6, size: t7, disabled: t8, inactiveText: t9, selected: t10, active: t11, onSelect: t12, id: t13, role: t14, loading: t15, _PrivateItemWrapper: t16,
|
|
158
|
+
const { variant: t6, size: t7, disabled: t8, inactiveText: t9, selected: t10, active: t11, onSelect: t12, id: t13, role: t14, loading: t15, _PrivateItemWrapper: t16, _PrivateTooltipText: t17, className: t18, groupId: _groupId, renderItem: _renderItem, handleAddItem: _handleAddItem, ...t19 } = t0;
|
|
158
159
|
t1 = t6;
|
|
159
160
|
t2 = t7;
|
|
160
161
|
t3 = t8;
|
|
@@ -166,36 +167,39 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
166
167
|
role = t14;
|
|
167
168
|
loading = t15;
|
|
168
169
|
_PrivateItemWrapper = t16;
|
|
169
|
-
|
|
170
|
-
|
|
170
|
+
_PrivateTooltipText = t17;
|
|
171
|
+
className = t18;
|
|
172
|
+
props = t19;
|
|
171
173
|
$[0] = t0;
|
|
172
174
|
$[1] = _PrivateItemWrapper;
|
|
173
|
-
$[2] =
|
|
174
|
-
$[3] =
|
|
175
|
-
$[4] =
|
|
176
|
-
$[5] =
|
|
177
|
-
$[6] =
|
|
178
|
-
$[7] =
|
|
179
|
-
$[8] =
|
|
180
|
-
$[9] =
|
|
181
|
-
$[10] =
|
|
182
|
-
$[11] =
|
|
183
|
-
$[12] =
|
|
184
|
-
$[13] =
|
|
175
|
+
$[2] = _PrivateTooltipText;
|
|
176
|
+
$[3] = className;
|
|
177
|
+
$[4] = id;
|
|
178
|
+
$[5] = inactiveText;
|
|
179
|
+
$[6] = loading;
|
|
180
|
+
$[7] = onSelectUser;
|
|
181
|
+
$[8] = props;
|
|
182
|
+
$[9] = role;
|
|
183
|
+
$[10] = t1;
|
|
184
|
+
$[11] = t2;
|
|
185
|
+
$[12] = t3;
|
|
186
|
+
$[13] = t4;
|
|
187
|
+
$[14] = t5;
|
|
185
188
|
} else {
|
|
186
189
|
_PrivateItemWrapper = $[1];
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
190
|
+
_PrivateTooltipText = $[2];
|
|
191
|
+
className = $[3];
|
|
192
|
+
id = $[4];
|
|
193
|
+
inactiveText = $[5];
|
|
194
|
+
loading = $[6];
|
|
195
|
+
onSelectUser = $[7];
|
|
196
|
+
props = $[8];
|
|
197
|
+
role = $[9];
|
|
198
|
+
t1 = $[10];
|
|
199
|
+
t2 = $[11];
|
|
200
|
+
t3 = $[12];
|
|
201
|
+
t4 = $[13];
|
|
202
|
+
t5 = $[14];
|
|
199
203
|
}
|
|
200
204
|
const variant = t1 === void 0 ? "default" : t1;
|
|
201
205
|
const size = t2 === void 0 ? "medium" : t2;
|
|
@@ -204,22 +208,22 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
204
208
|
const active = t5 === void 0 ? false : t5;
|
|
205
209
|
const [partialSlots, childrenWithoutSlots] = useSlots(props.children, slotsConfig);
|
|
206
210
|
let t6;
|
|
207
|
-
if ($[
|
|
211
|
+
if ($[15] !== partialSlots) {
|
|
208
212
|
t6 = {
|
|
209
213
|
description: void 0,
|
|
210
214
|
...partialSlots
|
|
211
215
|
};
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
} else t6 = $[
|
|
216
|
+
$[15] = partialSlots;
|
|
217
|
+
$[16] = t6;
|
|
218
|
+
} else t6 = $[16];
|
|
215
219
|
const slots = t6;
|
|
216
220
|
const { container, afterSelect, selectionAttribute, defaultTrailingVisual } = React.useContext(ActionListContainerContext);
|
|
217
221
|
let t7;
|
|
218
|
-
if ($[
|
|
222
|
+
if ($[17] !== defaultTrailingVisual) {
|
|
219
223
|
t7 = defaultTrailingVisual ? /*#__PURE__*/ jsx(TrailingVisual, { children: defaultTrailingVisual }) : null;
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
} else t7 = $[
|
|
224
|
+
$[17] = defaultTrailingVisual;
|
|
225
|
+
$[18] = t7;
|
|
226
|
+
} else t7 = $[18];
|
|
223
227
|
const wrappedDefaultTrailingVisual = t7;
|
|
224
228
|
const trailingVisual = (_slots$trailingVisual = slots.trailingVisual) !== null && _slots$trailingVisual !== void 0 ? _slots$trailingVisual : wrappedDefaultTrailingVisual;
|
|
225
229
|
const { role: listRole, selectionVariant: listSelectionVariant } = React.useContext(ListContext);
|
|
@@ -227,23 +231,23 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
227
231
|
const inactive = Boolean(inactiveText);
|
|
228
232
|
const menuContext = container === "ActionMenu" || container === "SelectPanel" || container === "FilteredActionList";
|
|
229
233
|
let t8;
|
|
230
|
-
if ($[
|
|
234
|
+
if ($[19] !== inactive || $[20] !== listRole) {
|
|
231
235
|
t8 = inactive && !(listRole !== void 0 && ["menu", "listbox"].includes(listRole));
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
} else t8 = $[
|
|
236
|
+
$[19] = inactive;
|
|
237
|
+
$[20] = listRole;
|
|
238
|
+
$[21] = t8;
|
|
239
|
+
} else t8 = $[21];
|
|
236
240
|
const showInactiveIndicator = t8;
|
|
237
241
|
let t9;
|
|
238
|
-
if ($[
|
|
242
|
+
if ($[22] !== onSelectUser) {
|
|
239
243
|
t9 = (event, afterSelect_0) => {
|
|
240
244
|
if (typeof onSelectUser === "function") onSelectUser(event);
|
|
241
245
|
if (event.defaultPrevented) return;
|
|
242
246
|
if (typeof afterSelect_0 === "function") afterSelect_0(event);
|
|
243
247
|
};
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
} else t9 = $[
|
|
248
|
+
$[22] = onSelectUser;
|
|
249
|
+
$[23] = t9;
|
|
250
|
+
} else t9 = $[23];
|
|
247
251
|
const onSelect = t9;
|
|
248
252
|
const selectionVariant = groupSelectionVariant ? groupSelectionVariant : listSelectionVariant;
|
|
249
253
|
let inferredItemRole;
|
|
@@ -261,31 +265,31 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
261
265
|
const itemSelectionAttribute = selectionAttribute || inferredSelectionAttribute;
|
|
262
266
|
const listItemSemantics = itemRole === "option" || itemRole === "menuitem" || itemRole === "menuitemradio" || itemRole === "menuitemcheckbox" || itemRole === "tab";
|
|
263
267
|
let t10;
|
|
264
|
-
if ($[
|
|
268
|
+
if ($[24] !== inactive || $[25] !== listItemSemantics || $[26] !== listRole) {
|
|
265
269
|
t10 = listRole && listRoleTypes.includes(listRole) || inactive || listItemSemantics;
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
$[
|
|
270
|
-
} else t10 = $[
|
|
270
|
+
$[24] = inactive;
|
|
271
|
+
$[25] = listItemSemantics;
|
|
272
|
+
$[26] = listRole;
|
|
273
|
+
$[27] = t10;
|
|
274
|
+
} else t10 = $[27];
|
|
271
275
|
const listSemantics = t10;
|
|
272
276
|
const buttonSemantics = !listSemantics && !_PrivateItemWrapper;
|
|
273
277
|
let t11;
|
|
274
|
-
if ($[
|
|
278
|
+
if ($[28] !== afterSelect || $[29] !== disabled || $[30] !== inactive || $[31] !== loading || $[32] !== onSelect) {
|
|
275
279
|
t11 = (event_0) => {
|
|
276
280
|
if (disabled || inactive || loading) return;
|
|
277
281
|
onSelect(event_0, afterSelect);
|
|
278
282
|
};
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
} else t11 = $[
|
|
283
|
+
$[28] = afterSelect;
|
|
284
|
+
$[29] = disabled;
|
|
285
|
+
$[30] = inactive;
|
|
286
|
+
$[31] = loading;
|
|
287
|
+
$[32] = onSelect;
|
|
288
|
+
$[33] = t11;
|
|
289
|
+
} else t11 = $[33];
|
|
286
290
|
const clickHandler = t11;
|
|
287
291
|
let t12;
|
|
288
|
-
if ($[
|
|
292
|
+
if ($[34] !== afterSelect || $[35] !== disabled || $[36] !== inactive || $[37] !== loading || $[38] !== onSelect) {
|
|
289
293
|
t12 = (event_1) => {
|
|
290
294
|
if (disabled || inactive || loading) return;
|
|
291
295
|
if (event_1.key === " " || event_1.key === "Enter") {
|
|
@@ -296,13 +300,13 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
296
300
|
onSelect(event_1, afterSelect);
|
|
297
301
|
}
|
|
298
302
|
};
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
$[
|
|
302
|
-
$[
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
} else t12 = $[
|
|
303
|
+
$[34] = afterSelect;
|
|
304
|
+
$[35] = disabled;
|
|
305
|
+
$[36] = inactive;
|
|
306
|
+
$[37] = loading;
|
|
307
|
+
$[38] = onSelect;
|
|
308
|
+
$[39] = t12;
|
|
309
|
+
} else t12 = $[39];
|
|
306
310
|
const keyPressHandler = t12;
|
|
307
311
|
const itemId = useId$1(id);
|
|
308
312
|
const labelId = `${itemId}--label`;
|
|
@@ -313,40 +317,40 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
313
317
|
const [truncatedText, setTruncatedText] = React.useState(void 0);
|
|
314
318
|
const ItemWrapper = _PrivateItemWrapper || (listSemantics ? DivItemContainer : ButtonItemContainer);
|
|
315
319
|
let t13;
|
|
316
|
-
if ($[
|
|
320
|
+
if ($[40] !== itemRole || $[41] !== itemSelectionAttribute) {
|
|
317
321
|
t13 = itemSelectionAttribute && itemRole && selectableRoles.includes(itemRole);
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
321
|
-
} else t13 = $[
|
|
322
|
+
$[40] = itemRole;
|
|
323
|
+
$[41] = itemSelectionAttribute;
|
|
324
|
+
$[42] = t13;
|
|
325
|
+
} else t13 = $[42];
|
|
322
326
|
const includeSelectionAttribute = t13;
|
|
323
327
|
const focusable = showInactiveIndicator ? true : void 0;
|
|
324
328
|
const descriptionVariant = (_slots$description$pr = (_slots$description = slots.description) === null || _slots$description === void 0 ? void 0 : _slots$description.props.variant) !== null && _slots$description$pr !== void 0 ? _slots$description$pr : "inline";
|
|
325
329
|
const hasTrailingVisualSlot = Boolean(slots.trailingVisual);
|
|
326
330
|
const hasDescriptionSlot = Boolean(slots.description);
|
|
327
331
|
let parts;
|
|
328
|
-
if ($[
|
|
332
|
+
if ($[43] !== hasTrailingVisualSlot || $[44] !== labelId || $[45] !== trailingVisualId) {
|
|
329
333
|
parts = [labelId];
|
|
330
334
|
if (hasTrailingVisualSlot) parts.push(trailingVisualId);
|
|
331
|
-
$[
|
|
332
|
-
$[
|
|
333
|
-
$[
|
|
334
|
-
$[
|
|
335
|
-
} else parts = $[
|
|
335
|
+
$[43] = hasTrailingVisualSlot;
|
|
336
|
+
$[44] = labelId;
|
|
337
|
+
$[45] = trailingVisualId;
|
|
338
|
+
$[46] = parts;
|
|
339
|
+
} else parts = $[46];
|
|
336
340
|
const ariaLabelledBy = parts.join(" ");
|
|
337
341
|
let parts_0;
|
|
338
|
-
if ($[
|
|
342
|
+
if ($[47] !== blockDescriptionId || $[48] !== descriptionVariant || $[49] !== hasDescriptionSlot || $[50] !== inactiveWarningId || $[51] !== inlineDescriptionId) {
|
|
339
343
|
parts_0 = [];
|
|
340
344
|
if (hasDescriptionSlot && descriptionVariant === "block") parts_0.push(blockDescriptionId);
|
|
341
345
|
if (hasDescriptionSlot && descriptionVariant === "inline") parts_0.push(inlineDescriptionId);
|
|
342
346
|
if (inactiveWarningId) parts_0.push(inactiveWarningId);
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
$[
|
|
349
|
-
} else parts_0 = $[
|
|
347
|
+
$[47] = blockDescriptionId;
|
|
348
|
+
$[48] = descriptionVariant;
|
|
349
|
+
$[49] = hasDescriptionSlot;
|
|
350
|
+
$[50] = inactiveWarningId;
|
|
351
|
+
$[51] = inlineDescriptionId;
|
|
352
|
+
$[52] = parts_0;
|
|
353
|
+
} else parts_0 = $[52];
|
|
350
354
|
const ariaDescribedBy = parts_0.length > 0 ? parts_0.join(" ") : void 0;
|
|
351
355
|
const t14 = !buttonSemantics ? keyPressHandler : void 0;
|
|
352
356
|
const t15 = disabled ? true : void 0;
|
|
@@ -354,15 +358,15 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
354
358
|
const t17 = loading && !inactive ? true : void 0;
|
|
355
359
|
const t18 = focusable ? void 0 : 0;
|
|
356
360
|
let t19;
|
|
357
|
-
if ($[
|
|
361
|
+
if ($[53] !== includeSelectionAttribute || $[54] !== itemSelectionAttribute || $[55] !== selected) {
|
|
358
362
|
t19 = includeSelectionAttribute && { [itemSelectionAttribute]: selected };
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
} else t19 = $[
|
|
363
|
+
$[53] = includeSelectionAttribute;
|
|
364
|
+
$[54] = itemSelectionAttribute;
|
|
365
|
+
$[55] = selected;
|
|
366
|
+
$[56] = t19;
|
|
367
|
+
} else t19 = $[56];
|
|
364
368
|
let t20;
|
|
365
|
-
if ($[
|
|
369
|
+
if ($[57] !== ariaDescribedBy || $[58] !== ariaLabelledBy || $[59] !== clickHandler || $[60] !== itemId || $[61] !== itemRole || $[62] !== t14 || $[63] !== t15 || $[64] !== t16 || $[65] !== t17 || $[66] !== t18 || $[67] !== t19) {
|
|
366
370
|
t20 = {
|
|
367
371
|
onClick: clickHandler,
|
|
368
372
|
onKeyPress: t14,
|
|
@@ -376,22 +380,22 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
376
380
|
role: itemRole,
|
|
377
381
|
id: itemId
|
|
378
382
|
};
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
} else t20 = $[
|
|
383
|
+
$[57] = ariaDescribedBy;
|
|
384
|
+
$[58] = ariaLabelledBy;
|
|
385
|
+
$[59] = clickHandler;
|
|
386
|
+
$[60] = itemId;
|
|
387
|
+
$[61] = itemRole;
|
|
388
|
+
$[62] = t14;
|
|
389
|
+
$[63] = t15;
|
|
390
|
+
$[64] = t16;
|
|
391
|
+
$[65] = t17;
|
|
392
|
+
$[66] = t18;
|
|
393
|
+
$[67] = t19;
|
|
394
|
+
$[68] = t20;
|
|
395
|
+
} else t20 = $[68];
|
|
392
396
|
const menuItemProps = t20;
|
|
393
397
|
let t21;
|
|
394
|
-
if ($[
|
|
398
|
+
if ($[69] !== _PrivateItemWrapper || $[70] !== forwardedRef || $[71] !== itemRole || $[72] !== listSemantics || $[73] !== menuItemProps || $[74] !== props) {
|
|
395
399
|
t21 = _PrivateItemWrapper ? {
|
|
396
400
|
role: itemRole ? "none" : void 0,
|
|
397
401
|
...props
|
|
@@ -400,34 +404,34 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
400
404
|
...props,
|
|
401
405
|
ref: forwardedRef
|
|
402
406
|
} || {};
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
$[
|
|
408
|
-
$[
|
|
409
|
-
$[
|
|
410
|
-
} else t21 = $[
|
|
407
|
+
$[69] = _PrivateItemWrapper;
|
|
408
|
+
$[70] = forwardedRef;
|
|
409
|
+
$[71] = itemRole;
|
|
410
|
+
$[72] = listSemantics;
|
|
411
|
+
$[73] = menuItemProps;
|
|
412
|
+
$[74] = props;
|
|
413
|
+
$[75] = t21;
|
|
414
|
+
} else t21 = $[75];
|
|
411
415
|
const containerProps = t21;
|
|
412
416
|
let t22;
|
|
413
|
-
if ($[
|
|
417
|
+
if ($[76] !== _PrivateItemWrapper || $[77] !== forwardedRef || $[78] !== listSemantics || $[79] !== menuItemProps || $[80] !== props) {
|
|
414
418
|
t22 = _PrivateItemWrapper ? menuItemProps : !listSemantics && {
|
|
415
419
|
...menuItemProps,
|
|
416
420
|
...props,
|
|
417
421
|
ref: forwardedRef
|
|
418
422
|
};
|
|
419
|
-
$[
|
|
420
|
-
$[
|
|
421
|
-
$[
|
|
422
|
-
$[
|
|
423
|
-
$[
|
|
424
|
-
$[
|
|
425
|
-
} else t22 = $[
|
|
423
|
+
$[76] = _PrivateItemWrapper;
|
|
424
|
+
$[77] = forwardedRef;
|
|
425
|
+
$[78] = listSemantics;
|
|
426
|
+
$[79] = menuItemProps;
|
|
427
|
+
$[80] = props;
|
|
428
|
+
$[81] = t22;
|
|
429
|
+
} else t22 = $[81];
|
|
426
430
|
const wrapperProps = t22;
|
|
427
431
|
const t23 = Boolean(inactiveText);
|
|
428
432
|
const t24 = buttonSemantics ? setTruncatedText : void 0;
|
|
429
433
|
let t25;
|
|
430
|
-
if ($[
|
|
434
|
+
if ($[82] !== blockDescriptionId || $[83] !== disabled || $[84] !== inlineDescriptionId || $[85] !== size || $[86] !== t23 || $[87] !== t24 || $[88] !== trailingVisualId || $[89] !== variant) {
|
|
431
435
|
t25 = {
|
|
432
436
|
variant,
|
|
433
437
|
size,
|
|
@@ -438,16 +442,16 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
438
442
|
trailingVisualId,
|
|
439
443
|
setTruncatedText: t24
|
|
440
444
|
};
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
} else t25 = $[
|
|
445
|
+
$[82] = blockDescriptionId;
|
|
446
|
+
$[83] = disabled;
|
|
447
|
+
$[84] = inlineDescriptionId;
|
|
448
|
+
$[85] = size;
|
|
449
|
+
$[86] = t23;
|
|
450
|
+
$[87] = t24;
|
|
451
|
+
$[88] = trailingVisualId;
|
|
452
|
+
$[89] = variant;
|
|
453
|
+
$[90] = t25;
|
|
454
|
+
} else t25 = $[90];
|
|
451
455
|
const itemContextValue = t25;
|
|
452
456
|
const trailingActionRendered = !inactive && !loading && !menuContext && Boolean(slots.trailingAction);
|
|
453
457
|
const t26 = listSemantics ? forwardedRef : null;
|
|
@@ -460,182 +464,183 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
460
464
|
const t33 = trailingActionRendered ? true : void 0;
|
|
461
465
|
const t34 = trailingActionRendered && (_slots$trailingAction = slots.trailingAction) !== null && _slots$trailingAction !== void 0 && _slots$trailingAction.props.loading ? true : void 0;
|
|
462
466
|
let t35;
|
|
463
|
-
if ($[
|
|
467
|
+
if ($[91] !== className) {
|
|
464
468
|
t35 = clsx(ActionList_module_css_default.ActionListItem, className);
|
|
465
|
-
$[
|
|
466
|
-
$[
|
|
467
|
-
} else t35 = $[
|
|
468
|
-
|
|
469
|
+
$[91] = className;
|
|
470
|
+
$[92] = t35;
|
|
471
|
+
} else t35 = $[92];
|
|
472
|
+
const t36 = (_PrivateTooltipText2 = _PrivateTooltipText) !== null && _PrivateTooltipText2 !== void 0 ? _PrivateTooltipText2 : truncatedText;
|
|
469
473
|
let t37;
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
t37 =
|
|
473
|
-
|
|
474
|
+
let t38;
|
|
475
|
+
if ($[93] === Symbol.for("react.memo_cache_sentinel")) {
|
|
476
|
+
t37 = {};
|
|
477
|
+
t38 = /*#__PURE__*/ jsx("span", { className: ActionList_module_css_default.Spacer });
|
|
474
478
|
$[93] = t37;
|
|
479
|
+
$[94] = t38;
|
|
475
480
|
} else {
|
|
476
|
-
t36 = $[92];
|
|
477
481
|
t37 = $[93];
|
|
482
|
+
t38 = $[94];
|
|
478
483
|
}
|
|
479
|
-
let
|
|
480
|
-
if ($[
|
|
481
|
-
|
|
484
|
+
let t39;
|
|
485
|
+
if ($[95] !== selected) {
|
|
486
|
+
t39 = /*#__PURE__*/ jsx(Selection, {
|
|
482
487
|
selected,
|
|
483
488
|
className: ActionList_module_css_default.LeadingAction
|
|
484
489
|
});
|
|
485
|
-
$[
|
|
486
|
-
$[
|
|
487
|
-
} else
|
|
488
|
-
const
|
|
489
|
-
const
|
|
490
|
-
let
|
|
491
|
-
if ($[
|
|
492
|
-
|
|
493
|
-
inactiveText:
|
|
494
|
-
itemHasLeadingVisual:
|
|
490
|
+
$[95] = selected;
|
|
491
|
+
$[96] = t39;
|
|
492
|
+
} else t39 = $[96];
|
|
493
|
+
const t40 = showInactiveIndicator ? inactiveText : void 0;
|
|
494
|
+
const t41 = Boolean(slots.leadingVisual);
|
|
495
|
+
let t42;
|
|
496
|
+
if ($[97] !== labelId || $[98] !== loading || $[99] !== slots.leadingVisual || $[100] !== t40 || $[101] !== t41) {
|
|
497
|
+
t42 = /*#__PURE__*/ jsx(VisualOrIndicator, {
|
|
498
|
+
inactiveText: t40,
|
|
499
|
+
itemHasLeadingVisual: t41,
|
|
495
500
|
labelId,
|
|
496
501
|
loading,
|
|
497
502
|
position: "leading",
|
|
498
503
|
children: slots.leadingVisual
|
|
499
504
|
});
|
|
500
|
-
$[
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
503
|
-
$[99] = t39;
|
|
505
|
+
$[97] = labelId;
|
|
506
|
+
$[98] = loading;
|
|
507
|
+
$[99] = slots.leadingVisual;
|
|
504
508
|
$[100] = t40;
|
|
505
509
|
$[101] = t41;
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
if ($[102] !== inactive || $[103] !== loading) {
|
|
510
|
-
t43 = loading === true && !inactive && /*#__PURE__*/ jsx(VisuallyHidden, { children: "Loading" });
|
|
511
|
-
$[102] = inactive;
|
|
512
|
-
$[103] = loading;
|
|
513
|
-
$[104] = t43;
|
|
514
|
-
} else t43 = $[104];
|
|
510
|
+
$[102] = t42;
|
|
511
|
+
} else t42 = $[102];
|
|
512
|
+
const t43 = !!slots.description;
|
|
515
513
|
let t44;
|
|
516
|
-
if ($[
|
|
517
|
-
t44 = /*#__PURE__*/
|
|
514
|
+
if ($[103] !== inactive || $[104] !== loading) {
|
|
515
|
+
t44 = loading === true && !inactive && /*#__PURE__*/ jsx(VisuallyHidden, { children: "Loading" });
|
|
516
|
+
$[103] = inactive;
|
|
517
|
+
$[104] = loading;
|
|
518
|
+
$[105] = t44;
|
|
519
|
+
} else t44 = $[105];
|
|
520
|
+
let t45;
|
|
521
|
+
if ($[106] !== childrenWithoutSlots || $[107] !== labelId || $[108] !== t44) {
|
|
522
|
+
t45 = /*#__PURE__*/ jsxs("span", {
|
|
518
523
|
id: labelId,
|
|
519
524
|
className: ActionList_module_css_default.ItemLabel,
|
|
520
525
|
"data-component": "ActionList.Item.Label",
|
|
521
|
-
children: [childrenWithoutSlots,
|
|
526
|
+
children: [childrenWithoutSlots, t44]
|
|
522
527
|
});
|
|
523
|
-
$[
|
|
524
|
-
$[
|
|
525
|
-
$[107] = t43;
|
|
528
|
+
$[106] = childrenWithoutSlots;
|
|
529
|
+
$[107] = labelId;
|
|
526
530
|
$[108] = t44;
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
531
|
+
$[109] = t45;
|
|
532
|
+
} else t45 = $[109];
|
|
533
|
+
let t46;
|
|
534
|
+
if ($[110] !== descriptionVariant || $[111] !== slots.description || $[112] !== t43 || $[113] !== t45) {
|
|
535
|
+
t46 = /*#__PURE__*/ jsxs(ConditionalWrapper, {
|
|
536
|
+
if: t43,
|
|
532
537
|
className: ActionList_module_css_default.ItemDescriptionWrap,
|
|
533
538
|
"data-description-variant": descriptionVariant,
|
|
534
|
-
children: [
|
|
539
|
+
children: [t45, slots.description]
|
|
535
540
|
});
|
|
536
|
-
$[
|
|
537
|
-
$[
|
|
538
|
-
$[
|
|
539
|
-
$[112] = t44;
|
|
541
|
+
$[110] = descriptionVariant;
|
|
542
|
+
$[111] = slots.description;
|
|
543
|
+
$[112] = t43;
|
|
540
544
|
$[113] = t45;
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
const t47 =
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
545
|
+
$[114] = t46;
|
|
546
|
+
} else t46 = $[114];
|
|
547
|
+
const t47 = showInactiveIndicator ? inactiveText : void 0;
|
|
548
|
+
const t48 = Boolean(slots.leadingVisual);
|
|
549
|
+
let t49;
|
|
550
|
+
if ($[115] !== labelId || $[116] !== loading || $[117] !== t47 || $[118] !== t48 || $[119] !== trailingVisual) {
|
|
551
|
+
t49 = /*#__PURE__*/ jsx(VisualOrIndicator, {
|
|
552
|
+
inactiveText: t47,
|
|
553
|
+
itemHasLeadingVisual: t48,
|
|
549
554
|
labelId,
|
|
550
555
|
loading,
|
|
551
556
|
position: "trailing",
|
|
552
557
|
children: trailingVisual
|
|
553
558
|
});
|
|
554
|
-
$[
|
|
555
|
-
$[
|
|
556
|
-
$[116] = t46;
|
|
559
|
+
$[115] = labelId;
|
|
560
|
+
$[116] = loading;
|
|
557
561
|
$[117] = t47;
|
|
558
|
-
$[118] =
|
|
559
|
-
$[119] =
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
562
|
+
$[118] = t48;
|
|
563
|
+
$[119] = trailingVisual;
|
|
564
|
+
$[120] = t49;
|
|
565
|
+
} else t49 = $[120];
|
|
566
|
+
let t50;
|
|
567
|
+
if ($[121] !== inactiveText || $[122] !== inactiveWarningId || $[123] !== showInactiveIndicator) {
|
|
568
|
+
t50 = !showInactiveIndicator && inactiveText ? /*#__PURE__*/ jsx("span", {
|
|
564
569
|
className: ActionList_module_css_default.InactiveWarning,
|
|
565
570
|
id: inactiveWarningId,
|
|
566
571
|
children: inactiveText
|
|
567
572
|
}) : null;
|
|
568
|
-
$[
|
|
569
|
-
$[
|
|
570
|
-
$[
|
|
571
|
-
$[
|
|
572
|
-
} else
|
|
573
|
-
let
|
|
574
|
-
if ($[
|
|
575
|
-
|
|
573
|
+
$[121] = inactiveText;
|
|
574
|
+
$[122] = inactiveWarningId;
|
|
575
|
+
$[123] = showInactiveIndicator;
|
|
576
|
+
$[124] = t50;
|
|
577
|
+
} else t50 = $[124];
|
|
578
|
+
let t51;
|
|
579
|
+
if ($[125] !== t46 || $[126] !== t49 || $[127] !== t50) {
|
|
580
|
+
t51 = /*#__PURE__*/ jsxs("span", {
|
|
576
581
|
className: ActionList_module_css_default.ActionListSubContent,
|
|
577
582
|
"data-component": "ActionList.Item--DividerContainer",
|
|
578
583
|
children: [
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
584
|
+
t46,
|
|
585
|
+
t49,
|
|
586
|
+
t50
|
|
582
587
|
]
|
|
583
588
|
});
|
|
584
|
-
$[
|
|
585
|
-
$[125] = t48;
|
|
589
|
+
$[125] = t46;
|
|
586
590
|
$[126] = t49;
|
|
587
591
|
$[127] = t50;
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
592
|
+
$[128] = t51;
|
|
593
|
+
} else t51 = $[128];
|
|
594
|
+
let t52;
|
|
595
|
+
if ($[129] !== t39 || $[130] !== t42 || $[131] !== t51) {
|
|
596
|
+
t52 = /*#__PURE__*/ jsxs(TooltipContext.Provider, {
|
|
597
|
+
value: t37,
|
|
593
598
|
children: [
|
|
594
|
-
t37,
|
|
595
599
|
t38,
|
|
596
|
-
|
|
597
|
-
|
|
600
|
+
t39,
|
|
601
|
+
t42,
|
|
602
|
+
t51
|
|
598
603
|
]
|
|
599
604
|
});
|
|
600
|
-
$[
|
|
601
|
-
$[
|
|
602
|
-
$[130] = t50;
|
|
605
|
+
$[129] = t39;
|
|
606
|
+
$[130] = t42;
|
|
603
607
|
$[131] = t51;
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
+
$[132] = t52;
|
|
609
|
+
} else t52 = $[132];
|
|
610
|
+
let t53;
|
|
611
|
+
if ($[133] !== ItemWrapper || $[134] !== forwardedRef || $[135] !== size || $[136] !== t52 || $[137] !== wrapperProps) {
|
|
612
|
+
t53 = /*#__PURE__*/ jsx(ItemWrapper, {
|
|
608
613
|
...wrapperProps,
|
|
609
614
|
className: ActionList_module_css_default.ActionListContent,
|
|
610
615
|
"data-size": size,
|
|
611
616
|
ref: forwardedRef,
|
|
612
|
-
children:
|
|
617
|
+
children: t52
|
|
613
618
|
});
|
|
614
|
-
$[
|
|
615
|
-
$[
|
|
616
|
-
$[
|
|
617
|
-
$[
|
|
618
|
-
$[
|
|
619
|
-
$[
|
|
620
|
-
} else
|
|
621
|
-
let
|
|
622
|
-
if ($[
|
|
623
|
-
|
|
619
|
+
$[133] = ItemWrapper;
|
|
620
|
+
$[134] = forwardedRef;
|
|
621
|
+
$[135] = size;
|
|
622
|
+
$[136] = t52;
|
|
623
|
+
$[137] = wrapperProps;
|
|
624
|
+
$[138] = t53;
|
|
625
|
+
} else t53 = $[138];
|
|
626
|
+
let t54;
|
|
627
|
+
if ($[139] !== buttonSemantics || $[140] !== forwardedRef || $[141] !== t36 || $[142] !== t53) {
|
|
628
|
+
t54 = /*#__PURE__*/ jsx(ConditionalTooltip, {
|
|
624
629
|
ref: forwardedRef,
|
|
625
|
-
text:
|
|
630
|
+
text: t36,
|
|
626
631
|
enabled: buttonSemantics,
|
|
627
|
-
children:
|
|
632
|
+
children: t53
|
|
628
633
|
});
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
631
|
-
$[
|
|
632
|
-
$[141] = truncatedText;
|
|
634
|
+
$[139] = buttonSemantics;
|
|
635
|
+
$[140] = forwardedRef;
|
|
636
|
+
$[141] = t36;
|
|
633
637
|
$[142] = t53;
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
638
|
+
$[143] = t54;
|
|
639
|
+
} else t54 = $[143];
|
|
640
|
+
const t55 = !inactive && !loading && !menuContext && Boolean(slots.trailingAction) && slots.trailingAction;
|
|
641
|
+
let t56;
|
|
642
|
+
if ($[144] !== containerProps || $[145] !== slots.subItem || $[146] !== t26 || $[147] !== t27 || $[148] !== t28 || $[149] !== t29 || $[150] !== t30 || $[151] !== t31 || $[152] !== t32 || $[153] !== t33 || $[154] !== t34 || $[155] !== t35 || $[156] !== t54 || $[157] !== t55) {
|
|
643
|
+
t56 = /*#__PURE__*/ jsxs("li", {
|
|
639
644
|
...containerProps,
|
|
640
645
|
ref: t26,
|
|
641
646
|
"data-component": "ActionList.Item",
|
|
@@ -649,38 +654,38 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
649
654
|
"data-trailing-action-loading": t34,
|
|
650
655
|
className: t35,
|
|
651
656
|
children: [
|
|
652
|
-
t53,
|
|
653
657
|
t54,
|
|
658
|
+
t55,
|
|
654
659
|
slots.subItem
|
|
655
660
|
]
|
|
656
661
|
});
|
|
657
|
-
$[
|
|
658
|
-
$[
|
|
659
|
-
$[
|
|
660
|
-
$[
|
|
661
|
-
$[
|
|
662
|
-
$[
|
|
663
|
-
$[
|
|
664
|
-
$[
|
|
665
|
-
$[
|
|
666
|
-
$[
|
|
667
|
-
$[
|
|
668
|
-
$[
|
|
669
|
-
$[155] = t53;
|
|
662
|
+
$[144] = containerProps;
|
|
663
|
+
$[145] = slots.subItem;
|
|
664
|
+
$[146] = t26;
|
|
665
|
+
$[147] = t27;
|
|
666
|
+
$[148] = t28;
|
|
667
|
+
$[149] = t29;
|
|
668
|
+
$[150] = t30;
|
|
669
|
+
$[151] = t31;
|
|
670
|
+
$[152] = t32;
|
|
671
|
+
$[153] = t33;
|
|
672
|
+
$[154] = t34;
|
|
673
|
+
$[155] = t35;
|
|
670
674
|
$[156] = t54;
|
|
671
675
|
$[157] = t55;
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
+
$[158] = t56;
|
|
677
|
+
} else t56 = $[158];
|
|
678
|
+
let t57;
|
|
679
|
+
if ($[159] !== itemContextValue || $[160] !== t56) {
|
|
680
|
+
t57 = /*#__PURE__*/ jsx(ItemContext.Provider, {
|
|
676
681
|
value: itemContextValue,
|
|
677
|
-
children:
|
|
682
|
+
children: t56
|
|
678
683
|
});
|
|
679
|
-
$[
|
|
680
|
-
$[159] = t55;
|
|
684
|
+
$[159] = itemContextValue;
|
|
681
685
|
$[160] = t56;
|
|
682
|
-
|
|
683
|
-
|
|
686
|
+
$[161] = t57;
|
|
687
|
+
} else t57 = $[161];
|
|
688
|
+
return t57;
|
|
684
689
|
};
|
|
685
690
|
const Item = Object.assign(fixedForwardRef(UnwrappedItem), {
|
|
686
691
|
displayName: "ActionList.Item",
|