@primer/react 38.29.0-rc.e2fa16f13 → 38.29.0-rc.edaf62be4
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 +19 -0
- package/dist/ActionList/ActionList-65f7daac.css +1 -1
- package/dist/ActionList/ActionList-65f7daac.css.map +1 -1
- package/dist/ActionList/ActionList.module.css.js +1 -1
- package/dist/ActionList/LinkItem.d.ts +1 -1
- package/dist/ActionList/List.d.ts +2 -11
- package/dist/ActionList/List.d.ts.map +1 -1
- package/dist/ActionList/index.d.ts +4 -24
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay-83281f45.css +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay-83281f45.css.map +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.js +7 -3
- package/dist/AvatarStack/AvatarStack-9bb5649f.css +1 -1
- package/dist/AvatarStack/AvatarStack-9bb5649f.css.map +1 -1
- package/dist/BaseStyles-fda34843.css +1 -1
- package/dist/BaseStyles-fda34843.css.map +1 -1
- package/dist/BranchName/BranchName-2fad4f4b.css +1 -1
- package/dist/BranchName/BranchName-2fad4f4b.css.map +1 -1
- package/dist/BranchName/BranchName.d.ts +2 -4
- package/dist/BranchName/BranchName.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs-54395fc6.css +1 -1
- package/dist/Breadcrumbs/Breadcrumbs-54395fc6.css.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +4 -10
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +330 -156
- package/dist/Button/ButtonBase-311501b9.css +1 -1
- package/dist/Button/ButtonBase-311501b9.css.map +1 -1
- package/dist/Button/ButtonBase.module.css.js +1 -1
- package/dist/ButtonGroup/ButtonGroup-54ba293b.css +1 -1
- package/dist/ButtonGroup/ButtonGroup-54ba293b.css.map +1 -1
- package/dist/Card/Card.d.ts +2 -20
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/index.d.ts +2 -8
- package/dist/Card/index.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox-edc5dc3e.css +1 -1
- package/dist/Checkbox/Checkbox-edc5dc3e.css.map +1 -1
- package/dist/CircleBadge/CircleBadge.d.ts +1 -1
- package/dist/CircleBadge/CircleBadge.d.ts.map +1 -1
- package/dist/CircleBadge/CircleBadge.js +2 -1
- package/dist/Link/Link-ba423096.css +1 -1
- package/dist/Link/Link-ba423096.css.map +1 -1
- package/dist/Link/Link.d.ts +1 -1
- package/dist/NavList/NavList.d.ts +2 -8
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/Overlay/Overlay-214d10dd.css +1 -1
- package/dist/Overlay/Overlay-214d10dd.css.map +1 -1
- package/dist/Overlay/Overlay.module.css.js +1 -1
- package/dist/Popover/Popover-a93df39c.css +1 -1
- package/dist/Popover/Popover-a93df39c.css.map +1 -1
- package/dist/SideNav-baa2364d.css +1 -1
- package/dist/SideNav-baa2364d.css.map +1 -1
- package/dist/SubNav/SubNav-88128e5c.css +1 -1
- package/dist/SubNav/SubNav-88128e5c.css.map +1 -1
- package/dist/Text/Text.d.ts +2 -7
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Timeline/Timeline-ff81db92.css +1 -1
- package/dist/Timeline/Timeline-ff81db92.css.map +1 -1
- package/dist/Token/IssueLabelToken-10cfada5.css +1 -1
- package/dist/Token/IssueLabelToken-10cfada5.css.map +1 -1
- package/dist/Token/_TokenTextContainer-55ce2de3.css +1 -1
- package/dist/Token/_TokenTextContainer-55ce2de3.css.map +1 -1
- package/dist/Token/_TokenTextContainer.module.css.js +1 -1
- package/dist/TreeView/TreeView-1bf45a33.css +1 -1
- package/dist/TreeView/TreeView-1bf45a33.css.map +1 -1
- package/dist/TreeView/TreeView.d.ts +11 -2
- package/dist/TreeView/TreeView.d.ts.map +1 -1
- package/dist/TreeView/TreeView.js +201 -166
- package/dist/deprecated/ActionList/Group.d.ts +1 -1
- package/dist/deprecated/ActionList/Group.d.ts.map +1 -1
- package/dist/deprecated/ActionList/Group.js +9 -5
- package/dist/experimental/SelectPanel2/SelectPanel-608e207e.css +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel-608e207e.css.map +1 -1
- package/dist/hooks/useMergedRefs.js +17 -30
- package/dist/internal/components/TextInputWrapper-b2f7f9fa.css +1 -1
- package/dist/internal/components/TextInputWrapper-b2f7f9fa.css.map +1 -1
- package/dist/utils/modern-polymorphic.d.ts +1 -1
- package/dist/utils/modern-polymorphic.d.ts.map +1 -1
- package/generated/components.json +6 -0
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ import { ButtonComponent } from '../Button/Button.js';
|
|
|
17
17
|
import { ActionList } from '../ActionList/index.js';
|
|
18
18
|
import { usePlatform } from '../KeybindingHint/platform.js';
|
|
19
19
|
import { isSlot } from '../utils/is-slot.js';
|
|
20
|
+
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
20
21
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
21
22
|
import { getAccessibleKeybindingHintString } from '../KeybindingHint/utils.js';
|
|
22
23
|
import { AriaStatus } from '../live-region/AriaStatus.js';
|
|
@@ -265,7 +266,17 @@ Root.displayName = 'TreeView';
|
|
|
265
266
|
// ----------------------------------------------------------------------------
|
|
266
267
|
// TreeView.Item
|
|
267
268
|
|
|
268
|
-
|
|
269
|
+
// We build this type manually (instead of using `PolymorphicProps`) so we can omit
|
|
270
|
+
// `ref` and `onSelect` from the underlying element's props:
|
|
271
|
+
// - `ref` is provided solely by `fixedForwardRef` (typed as `Ref<unknown>`), preserving
|
|
272
|
+
// backward compatibility with consumers that pass `Ref<HTMLElement>` rather than the
|
|
273
|
+
// intrinsic element's ref type (e.g. `Ref<HTMLLIElement>` for the default `<li>`).
|
|
274
|
+
// - Our custom `onSelect` (typed against `HTMLElement`) replaces the native
|
|
275
|
+
// `ReactEventHandler<HTMLLIElement>` that would otherwise be intersected in
|
|
276
|
+
// and conflict with existing consumers.
|
|
277
|
+
// `DistributiveOmit` keeps the omit distributing over `as` union types.
|
|
278
|
+
|
|
279
|
+
const ItemImpl = fixedForwardRef(({
|
|
269
280
|
id: itemId,
|
|
270
281
|
containIntrinsicSize,
|
|
271
282
|
current: isCurrentItem = false,
|
|
@@ -277,8 +288,19 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
277
288
|
className,
|
|
278
289
|
'aria-label': ariaLabel,
|
|
279
290
|
'aria-labelledby': ariaLabelledby,
|
|
280
|
-
secondaryActions
|
|
291
|
+
secondaryActions,
|
|
292
|
+
as: Component,
|
|
293
|
+
...restProps
|
|
281
294
|
}, ref) => {
|
|
295
|
+
// When `as` is provided (and resolves to something other than the default
|
|
296
|
+
// `'li'`), we render the polymorphic element as the `role="treeitem"` and
|
|
297
|
+
// wrap it in an `<li role="none">` so the markup remains valid (a
|
|
298
|
+
// `<ul role="tree">` may only directly contain `<li>` elements). When `as`
|
|
299
|
+
// is omitted, or explicitly set to `'li'`, we render an `<li>` directly as
|
|
300
|
+
// the treeitem to preserve the historical DOM shape and ref typing for
|
|
301
|
+
// existing consumers and to avoid nesting `<li>` inside `<li>`.
|
|
302
|
+
const ItemElement = Component !== null && Component !== void 0 ? Component : 'li';
|
|
303
|
+
const isPolymorphic = Component !== undefined && Component !== 'li';
|
|
282
304
|
const [slots, rest] = useSlots(children, {
|
|
283
305
|
leadingAction: LeadingAction,
|
|
284
306
|
leadingVisual: LeadingVisual,
|
|
@@ -320,9 +342,7 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
320
342
|
const platform = usePlatform();
|
|
321
343
|
|
|
322
344
|
// Set the expanded state and cache it
|
|
323
|
-
const setIsExpandedWithCache = React.useCallback(
|
|
324
|
-
// eslint-disable-next-line react-hooks/preserve-manual-memoization
|
|
325
|
-
newIsExpanded => {
|
|
345
|
+
const setIsExpandedWithCache = React.useCallback(newIsExpanded => {
|
|
326
346
|
var _expandedStateCache$c3;
|
|
327
347
|
setIsExpanded(newIsExpanded);
|
|
328
348
|
(_expandedStateCache$c3 = expandedStateCache.current) === null || _expandedStateCache$c3 === void 0 ? void 0 : _expandedStateCache$c3.set(itemId, newIsExpanded);
|
|
@@ -345,34 +365,34 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
345
365
|
action();
|
|
346
366
|
}
|
|
347
367
|
}, [secondaryActions]);
|
|
348
|
-
const handleKeyDown = React.useCallback(
|
|
349
|
-
switch (
|
|
368
|
+
const handleKeyDown = React.useCallback(event => {
|
|
369
|
+
switch (event.key) {
|
|
350
370
|
case 'Enter':
|
|
351
371
|
case ' ':
|
|
352
372
|
if (onSelect) {
|
|
353
|
-
onSelect(
|
|
373
|
+
onSelect(event);
|
|
354
374
|
} else {
|
|
355
|
-
toggle(
|
|
375
|
+
toggle(event);
|
|
356
376
|
}
|
|
357
|
-
|
|
377
|
+
event.stopPropagation();
|
|
358
378
|
break;
|
|
359
379
|
case 'ArrowRight':
|
|
360
380
|
// Ignore if modifier keys are pressed
|
|
361
|
-
if (
|
|
362
|
-
|
|
363
|
-
|
|
381
|
+
if (event.altKey || event.metaKey) return;
|
|
382
|
+
event.preventDefault();
|
|
383
|
+
event.stopPropagation();
|
|
364
384
|
setIsExpandedWithCache(true);
|
|
365
385
|
break;
|
|
366
386
|
case 'ArrowLeft':
|
|
367
387
|
// Ignore if modifier keys are pressed
|
|
368
|
-
if (
|
|
369
|
-
|
|
370
|
-
|
|
388
|
+
if (event.altKey || event.metaKey) return;
|
|
389
|
+
event.preventDefault();
|
|
390
|
+
event.stopPropagation();
|
|
371
391
|
setIsExpandedWithCache(false);
|
|
372
392
|
break;
|
|
373
393
|
case 'U':
|
|
374
394
|
case 'u':
|
|
375
|
-
if (!(
|
|
395
|
+
if (!(event.shiftKey && (event.metaKey || event.ctrlKey))) return;
|
|
376
396
|
activateActionsDialog();
|
|
377
397
|
break;
|
|
378
398
|
}
|
|
@@ -380,6 +400,106 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
380
400
|
const ariaDescribedByIds = [slots.leadingVisual ? leadingVisualId : null, slots.trailingVisual ? trailingVisualId : null].filter(Boolean);
|
|
381
401
|
const shortcut = `Shift+${platform === 'apple' ? 'Meta' : 'Control'}+U`;
|
|
382
402
|
const trailingActionShortcutText = `Press (${getAccessibleKeybindingHintString(shortcut, platform)}) for more actions.`;
|
|
403
|
+
const itemElement =
|
|
404
|
+
/*#__PURE__*/
|
|
405
|
+
// @ts-ignore TypeScript can't infer that the `ref` here is compatible
|
|
406
|
+
// with every possible polymorphic `ItemElement` (it's typed as
|
|
407
|
+
// `Ref<unknown>` by `fixedForwardRef`), so we cast at the boundary.
|
|
408
|
+
jsxs(ItemElement, {
|
|
409
|
+
...restProps,
|
|
410
|
+
className: clsx('PRIVATE_TreeView-item', className, classes.TreeViewItem),
|
|
411
|
+
ref: ref,
|
|
412
|
+
tabIndex: 0,
|
|
413
|
+
id: itemId,
|
|
414
|
+
role: "treeitem",
|
|
415
|
+
"aria-label": secondaryActions ? ariaLabel ? `${ariaLabel}. ${trailingActionShortcutText}` : undefined : ariaLabel,
|
|
416
|
+
"aria-labelledby": ariaLabel ? undefined : `${ariaLabelledby || labelId} ${secondaryActions ? trailingActionId : ''}`.trim(),
|
|
417
|
+
"aria-describedby": ariaDescribedByIds.length ? ariaDescribedByIds.join(' ') : undefined,
|
|
418
|
+
"aria-level": level,
|
|
419
|
+
"aria-expanded": isSubTreeEmpty && (!isExpanded || !hasSubTree) || expanded === null ? undefined : isExpanded,
|
|
420
|
+
"aria-current": isCurrentItem ? 'true' : undefined,
|
|
421
|
+
"aria-selected": isFocused ? 'true' : 'false',
|
|
422
|
+
"data-has-leading-action": slots.leadingAction ? true : undefined,
|
|
423
|
+
"data-loading": isLoadingPlaceholder ? true : undefined,
|
|
424
|
+
onKeyDown: handleKeyDown,
|
|
425
|
+
onFocus: event => {
|
|
426
|
+
// Defer scroll to the next animation frame so that rapid keyboard
|
|
427
|
+
// navigation (held key) coalesces into a single reflow per frame
|
|
428
|
+
scrollElementIntoView(event.currentTarget.firstElementChild);
|
|
429
|
+
|
|
430
|
+
// Set the focused state
|
|
431
|
+
setIsFocused(true);
|
|
432
|
+
|
|
433
|
+
// Prevent focus event from bubbling up to parent items
|
|
434
|
+
event.stopPropagation();
|
|
435
|
+
},
|
|
436
|
+
onBlur: () => setIsFocused(false),
|
|
437
|
+
onClick: event => {
|
|
438
|
+
if (onSelect) {
|
|
439
|
+
onSelect(event);
|
|
440
|
+
} else {
|
|
441
|
+
toggle(event);
|
|
442
|
+
}
|
|
443
|
+
event.stopPropagation();
|
|
444
|
+
},
|
|
445
|
+
onAuxClick: event => {
|
|
446
|
+
if (onSelect && event.button === 1) {
|
|
447
|
+
onSelect(event);
|
|
448
|
+
}
|
|
449
|
+
event.stopPropagation();
|
|
450
|
+
},
|
|
451
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
452
|
+
className: clsx('PRIVATE_TreeView-item-container', classes.TreeViewItemContainer),
|
|
453
|
+
style: {
|
|
454
|
+
// @ts-ignore CSS custom property
|
|
455
|
+
'--level': level,
|
|
456
|
+
contentVisibility: containIntrinsicSize ? 'auto' : undefined,
|
|
457
|
+
containIntrinsicSize
|
|
458
|
+
},
|
|
459
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
460
|
+
style: {
|
|
461
|
+
gridArea: 'spacer',
|
|
462
|
+
display: 'flex'
|
|
463
|
+
},
|
|
464
|
+
children: /*#__PURE__*/jsx(LevelIndicatorLines, {
|
|
465
|
+
level: level
|
|
466
|
+
})
|
|
467
|
+
}), slots.leadingAction, hasSubTree ?
|
|
468
|
+
/*#__PURE__*/
|
|
469
|
+
// This lint rule is disabled due to the guidelines in the `TreeView` api docs.
|
|
470
|
+
// https://github.com/github/primer/blob/main/apis/tree-view-api.md#the-expandcollapse-chevron-toggle
|
|
471
|
+
// This has specific advice that the chevron be available only to pointer event.
|
|
472
|
+
// If they take up a button role, they become unnecessary and numerous tab stops.
|
|
473
|
+
jsx("div", {
|
|
474
|
+
className: clsx('PRIVATE_TreeView-item-toggle', onSelect && 'PRIVATE_TreeView-item-toggle--hover', level === 1 && 'PRIVATE_TreeView-item-toggle--end', classes.TreeViewItemToggle, classes.TreeViewItemToggleHover, classes.TreeViewItemToggleEnd),
|
|
475
|
+
onClick: event => {
|
|
476
|
+
if (onSelect) {
|
|
477
|
+
toggle(event);
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
children: isExpanded ? /*#__PURE__*/jsx(ChevronDownIcon, {
|
|
481
|
+
size: TOGGLE_ICON_SIZE
|
|
482
|
+
}) : /*#__PURE__*/jsx(ChevronRightIcon, {
|
|
483
|
+
size: TOGGLE_ICON_SIZE
|
|
484
|
+
})
|
|
485
|
+
}) : null, /*#__PURE__*/jsxs("div", {
|
|
486
|
+
id: labelId,
|
|
487
|
+
className: clsx('PRIVATE_TreeView-item-content', classes.TreeViewItemContent),
|
|
488
|
+
children: [slots.leadingVisual, /*#__PURE__*/jsx("span", {
|
|
489
|
+
className: clsx('PRIVATE_TreeView-item-content-text', classes.TreeViewItemContentText),
|
|
490
|
+
children: childrenWithoutSubTree
|
|
491
|
+
}), slots.trailingVisual]
|
|
492
|
+
}), secondaryActions ? /*#__PURE__*/jsxs(Fragment, {
|
|
493
|
+
children: [/*#__PURE__*/jsx(TrailingAction, {
|
|
494
|
+
items: secondaryActions,
|
|
495
|
+
shortcutText: trailingActionShortcutText
|
|
496
|
+
}), actionCommandPressed ? /*#__PURE__*/jsx(ActionDialog, {
|
|
497
|
+
items: secondaryActions,
|
|
498
|
+
onClose: () => setActionCommandPressed(false)
|
|
499
|
+
}) : null]
|
|
500
|
+
}) : null]
|
|
501
|
+
}), subTree]
|
|
502
|
+
});
|
|
383
503
|
return /*#__PURE__*/jsx(ItemContext.Provider, {
|
|
384
504
|
value: {
|
|
385
505
|
itemId,
|
|
@@ -392,102 +512,15 @@ const Item = /*#__PURE__*/React.forwardRef(({
|
|
|
392
512
|
trailingVisualId,
|
|
393
513
|
trailingActionId
|
|
394
514
|
},
|
|
395
|
-
children: /*#__PURE__*/
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
id: itemId,
|
|
400
|
-
role: "treeitem",
|
|
401
|
-
"aria-label": secondaryActions ? ariaLabel ? `${ariaLabel}. ${trailingActionShortcutText}` : undefined : ariaLabel,
|
|
402
|
-
"aria-labelledby": ariaLabel ? undefined : `${ariaLabelledby || labelId} ${secondaryActions ? trailingActionId : ''}`.trim(),
|
|
403
|
-
"aria-describedby": ariaDescribedByIds.length ? ariaDescribedByIds.join(' ') : undefined,
|
|
404
|
-
"aria-level": level,
|
|
405
|
-
"aria-expanded": isSubTreeEmpty && (!isExpanded || !hasSubTree) || expanded === null ? undefined : isExpanded,
|
|
406
|
-
"aria-current": isCurrentItem ? 'true' : undefined,
|
|
407
|
-
"aria-selected": isFocused ? 'true' : 'false',
|
|
408
|
-
"data-has-leading-action": slots.leadingAction ? true : undefined,
|
|
409
|
-
"data-loading": isLoadingPlaceholder ? true : undefined,
|
|
410
|
-
onKeyDown: handleKeyDown,
|
|
411
|
-
onFocus: event_1 => {
|
|
412
|
-
// Defer scroll to the next animation frame so that rapid keyboard
|
|
413
|
-
// navigation (held key) coalesces into a single reflow per frame
|
|
414
|
-
scrollElementIntoView(event_1.currentTarget.firstElementChild);
|
|
415
|
-
|
|
416
|
-
// Set the focused state
|
|
417
|
-
setIsFocused(true);
|
|
418
|
-
|
|
419
|
-
// Prevent focus event from bubbling up to parent items
|
|
420
|
-
event_1.stopPropagation();
|
|
421
|
-
},
|
|
422
|
-
onBlur: () => setIsFocused(false),
|
|
423
|
-
onClick: event_2 => {
|
|
424
|
-
if (onSelect) {
|
|
425
|
-
onSelect(event_2);
|
|
426
|
-
} else {
|
|
427
|
-
toggle(event_2);
|
|
428
|
-
}
|
|
429
|
-
event_2.stopPropagation();
|
|
430
|
-
},
|
|
431
|
-
onAuxClick: event_3 => {
|
|
432
|
-
if (onSelect && event_3.button === 1) {
|
|
433
|
-
onSelect(event_3);
|
|
434
|
-
}
|
|
435
|
-
event_3.stopPropagation();
|
|
436
|
-
},
|
|
437
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
438
|
-
className: clsx('PRIVATE_TreeView-item-container', classes.TreeViewItemContainer),
|
|
439
|
-
style: {
|
|
440
|
-
// @ts-ignore CSS custom property
|
|
441
|
-
'--level': level,
|
|
442
|
-
contentVisibility: containIntrinsicSize ? 'auto' : undefined,
|
|
443
|
-
containIntrinsicSize
|
|
444
|
-
},
|
|
445
|
-
children: [/*#__PURE__*/jsx("div", {
|
|
446
|
-
style: {
|
|
447
|
-
gridArea: 'spacer',
|
|
448
|
-
display: 'flex'
|
|
449
|
-
},
|
|
450
|
-
children: /*#__PURE__*/jsx(LevelIndicatorLines, {
|
|
451
|
-
level: level
|
|
452
|
-
})
|
|
453
|
-
}), slots.leadingAction, hasSubTree ?
|
|
454
|
-
/*#__PURE__*/
|
|
455
|
-
// This lint rule is disabled due to the guidelines in the `TreeView` api docs.
|
|
456
|
-
// https://github.com/github/primer/blob/main/apis/tree-view-api.md#the-expandcollapse-chevron-toggle
|
|
457
|
-
// This has specific advice that the chevron be available only to pointer event.
|
|
458
|
-
// If they take up a button role, they become unnecessary and numerous tab stops.
|
|
459
|
-
jsx("div", {
|
|
460
|
-
className: clsx('PRIVATE_TreeView-item-toggle', onSelect && 'PRIVATE_TreeView-item-toggle--hover', level === 1 && 'PRIVATE_TreeView-item-toggle--end', classes.TreeViewItemToggle, classes.TreeViewItemToggleHover, classes.TreeViewItemToggleEnd),
|
|
461
|
-
onClick: event_4 => {
|
|
462
|
-
if (onSelect) {
|
|
463
|
-
toggle(event_4);
|
|
464
|
-
}
|
|
465
|
-
},
|
|
466
|
-
children: isExpanded ? /*#__PURE__*/jsx(ChevronDownIcon, {
|
|
467
|
-
size: TOGGLE_ICON_SIZE
|
|
468
|
-
}) : /*#__PURE__*/jsx(ChevronRightIcon, {
|
|
469
|
-
size: TOGGLE_ICON_SIZE
|
|
470
|
-
})
|
|
471
|
-
}) : null, /*#__PURE__*/jsxs("div", {
|
|
472
|
-
id: labelId,
|
|
473
|
-
className: clsx('PRIVATE_TreeView-item-content', classes.TreeViewItemContent),
|
|
474
|
-
children: [slots.leadingVisual, /*#__PURE__*/jsx("span", {
|
|
475
|
-
className: clsx('PRIVATE_TreeView-item-content-text', classes.TreeViewItemContentText),
|
|
476
|
-
children: childrenWithoutSubTree
|
|
477
|
-
}), slots.trailingVisual]
|
|
478
|
-
}), secondaryActions ? /*#__PURE__*/jsxs(Fragment, {
|
|
479
|
-
children: [/*#__PURE__*/jsx(TrailingAction, {
|
|
480
|
-
items: secondaryActions,
|
|
481
|
-
shortcutText: trailingActionShortcutText
|
|
482
|
-
}), actionCommandPressed ? /*#__PURE__*/jsx(ActionDialog, {
|
|
483
|
-
items: secondaryActions,
|
|
484
|
-
onClose: () => setActionCommandPressed(false)
|
|
485
|
-
}) : null]
|
|
486
|
-
}) : null]
|
|
487
|
-
}), subTree]
|
|
488
|
-
})
|
|
515
|
+
children: isPolymorphic ? /*#__PURE__*/jsx("li", {
|
|
516
|
+
role: "none",
|
|
517
|
+
children: itemElement
|
|
518
|
+
}) : itemElement
|
|
489
519
|
});
|
|
490
520
|
});
|
|
521
|
+
const Item = Object.assign(ItemImpl, {
|
|
522
|
+
displayName: 'TreeView.Item'
|
|
523
|
+
});
|
|
491
524
|
|
|
492
525
|
/** Lines to indicate the depth of an item in a TreeView */
|
|
493
526
|
const LevelIndicatorLines = t0 => {
|
|
@@ -520,7 +553,6 @@ const LevelIndicatorLines = t0 => {
|
|
|
520
553
|
}
|
|
521
554
|
return t2;
|
|
522
555
|
};
|
|
523
|
-
Item.displayName = 'TreeView.Item';
|
|
524
556
|
|
|
525
557
|
// ----------------------------------------------------------------------------
|
|
526
558
|
// TreeView.SubTree
|
|
@@ -755,118 +787,121 @@ const LoadingItem = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
755
787
|
} = t0;
|
|
756
788
|
const itemId = useId();
|
|
757
789
|
if (count) {
|
|
758
|
-
|
|
790
|
+
const t1 = ref;
|
|
791
|
+
let t2;
|
|
759
792
|
if ($[0] !== count) {
|
|
760
|
-
|
|
793
|
+
t2 = Array.from({
|
|
761
794
|
length: count
|
|
762
795
|
}).map(_temp3);
|
|
763
796
|
$[0] = count;
|
|
764
|
-
$[1] =
|
|
797
|
+
$[1] = t2;
|
|
765
798
|
} else {
|
|
766
|
-
|
|
799
|
+
t2 = $[1];
|
|
767
800
|
}
|
|
768
|
-
let
|
|
801
|
+
let t3;
|
|
769
802
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
770
|
-
|
|
771
|
-
$[2] =
|
|
803
|
+
t3 = clsx("PRIVATE_VisuallyHidden", classes.TreeViewVisuallyHidden);
|
|
804
|
+
$[2] = t3;
|
|
772
805
|
} else {
|
|
773
|
-
|
|
806
|
+
t3 = $[2];
|
|
774
807
|
}
|
|
775
|
-
let
|
|
808
|
+
let t4;
|
|
776
809
|
if ($[3] !== count) {
|
|
777
|
-
|
|
778
|
-
className:
|
|
810
|
+
t4 = /*#__PURE__*/jsxs("div", {
|
|
811
|
+
className: t3,
|
|
779
812
|
children: ["Loading ", count, " items"]
|
|
780
813
|
});
|
|
781
814
|
$[3] = count;
|
|
782
|
-
$[4] =
|
|
815
|
+
$[4] = t4;
|
|
783
816
|
} else {
|
|
784
|
-
|
|
817
|
+
t4 = $[4];
|
|
785
818
|
}
|
|
786
|
-
let
|
|
787
|
-
if ($[5] !== itemId || $[6] !==
|
|
788
|
-
|
|
819
|
+
let t5;
|
|
820
|
+
if ($[5] !== itemId || $[6] !== t1 || $[7] !== t2 || $[8] !== t4) {
|
|
821
|
+
t5 = /*#__PURE__*/jsx(LoadingPlaceholderContext.Provider, {
|
|
789
822
|
value: true,
|
|
790
823
|
children: /*#__PURE__*/jsxs(Item, {
|
|
791
824
|
id: itemId,
|
|
792
|
-
ref:
|
|
793
|
-
children: [
|
|
825
|
+
ref: t1,
|
|
826
|
+
children: [t2, t4]
|
|
794
827
|
})
|
|
795
828
|
});
|
|
796
829
|
$[5] = itemId;
|
|
797
|
-
$[6] =
|
|
798
|
-
$[7] =
|
|
799
|
-
$[8] =
|
|
800
|
-
$[9] =
|
|
830
|
+
$[6] = t1;
|
|
831
|
+
$[7] = t2;
|
|
832
|
+
$[8] = t4;
|
|
833
|
+
$[9] = t5;
|
|
801
834
|
} else {
|
|
802
|
-
|
|
835
|
+
t5 = $[9];
|
|
803
836
|
}
|
|
804
|
-
return
|
|
837
|
+
return t5;
|
|
805
838
|
}
|
|
806
|
-
|
|
839
|
+
const t1 = ref;
|
|
807
840
|
let t2;
|
|
841
|
+
let t3;
|
|
808
842
|
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
809
|
-
|
|
843
|
+
t2 = /*#__PURE__*/jsx(LeadingVisual, {
|
|
810
844
|
children: /*#__PURE__*/jsx(Spinner, {
|
|
811
845
|
size: "small"
|
|
812
846
|
})
|
|
813
847
|
});
|
|
814
|
-
|
|
848
|
+
t3 = /*#__PURE__*/jsx(Text, {
|
|
815
849
|
className: "fgColor-muted",
|
|
816
850
|
children: "Loading..."
|
|
817
851
|
});
|
|
818
|
-
$[10] =
|
|
819
|
-
$[11] =
|
|
852
|
+
$[10] = t2;
|
|
853
|
+
$[11] = t3;
|
|
820
854
|
} else {
|
|
821
|
-
|
|
822
|
-
|
|
855
|
+
t2 = $[10];
|
|
856
|
+
t3 = $[11];
|
|
823
857
|
}
|
|
824
|
-
let
|
|
825
|
-
if ($[12] !== itemId || $[13] !==
|
|
826
|
-
|
|
858
|
+
let t4;
|
|
859
|
+
if ($[12] !== itemId || $[13] !== t1) {
|
|
860
|
+
t4 = /*#__PURE__*/jsx(LoadingPlaceholderContext.Provider, {
|
|
827
861
|
value: true,
|
|
828
862
|
children: /*#__PURE__*/jsxs(Item, {
|
|
829
863
|
id: itemId,
|
|
830
|
-
ref:
|
|
831
|
-
children: [
|
|
864
|
+
ref: t1,
|
|
865
|
+
children: [t2, t3]
|
|
832
866
|
})
|
|
833
867
|
});
|
|
834
868
|
$[12] = itemId;
|
|
835
|
-
$[13] =
|
|
836
|
-
$[14] =
|
|
869
|
+
$[13] = t1;
|
|
870
|
+
$[14] = t4;
|
|
837
871
|
} else {
|
|
838
|
-
|
|
872
|
+
t4 = $[14];
|
|
839
873
|
}
|
|
840
|
-
return
|
|
874
|
+
return t4;
|
|
841
875
|
});
|
|
842
876
|
const EmptyItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
843
877
|
const $ = c(4);
|
|
844
878
|
const t0 = useId();
|
|
845
|
-
|
|
879
|
+
const t1 = ref;
|
|
880
|
+
let t2;
|
|
846
881
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
847
|
-
|
|
882
|
+
t2 = /*#__PURE__*/jsx(Text, {
|
|
848
883
|
className: "fgColor-muted",
|
|
849
884
|
children: "No items found"
|
|
850
885
|
});
|
|
851
|
-
$[0] =
|
|
886
|
+
$[0] = t2;
|
|
852
887
|
} else {
|
|
853
|
-
|
|
888
|
+
t2 = $[0];
|
|
854
889
|
}
|
|
855
|
-
let
|
|
856
|
-
if ($[1] !==
|
|
857
|
-
|
|
890
|
+
let t3;
|
|
891
|
+
if ($[1] !== t0 || $[2] !== t1) {
|
|
892
|
+
t3 = /*#__PURE__*/jsx(Item, {
|
|
858
893
|
expanded: null,
|
|
859
894
|
id: t0,
|
|
860
|
-
ref:
|
|
861
|
-
children:
|
|
895
|
+
ref: t1,
|
|
896
|
+
children: t2
|
|
862
897
|
});
|
|
863
|
-
$[1] =
|
|
864
|
-
$[2] =
|
|
865
|
-
$[3] =
|
|
898
|
+
$[1] = t0;
|
|
899
|
+
$[2] = t1;
|
|
900
|
+
$[3] = t3;
|
|
866
901
|
} else {
|
|
867
|
-
|
|
902
|
+
t3 = $[3];
|
|
868
903
|
}
|
|
869
|
-
return
|
|
904
|
+
return t3;
|
|
870
905
|
});
|
|
871
906
|
function useSubTree(children) {
|
|
872
907
|
const $ = c(8);
|
|
@@ -25,5 +25,5 @@ export interface GroupProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
|
25
25
|
/**
|
|
26
26
|
* Collects related `Items` in an `ActionList`.
|
|
27
27
|
*/
|
|
28
|
-
export declare function Group({ header, items, ...props }: GroupProps): JSX.Element;
|
|
28
|
+
export declare function Group({ header, items, groupId: _groupId, ...props }: GroupProps): JSX.Element;
|
|
29
29
|
//# sourceMappingURL=Group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/deprecated/ActionList/Group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AAGzC,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,OAAO,CAAA;AAE9B;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACvE;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,CAAA;IAErB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,EAAC,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,EAAC,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/deprecated/ActionList/Group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AAGzC,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,OAAO,CAAA;AAE9B;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACvE;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,CAAA;IAErB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,EAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAC,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAO3F"}
|
|
@@ -11,11 +11,15 @@ function Group(t0) {
|
|
|
11
11
|
let items;
|
|
12
12
|
let props;
|
|
13
13
|
if ($[0] !== t0) {
|
|
14
|
-
|
|
15
|
-
header,
|
|
16
|
-
items,
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
const {
|
|
15
|
+
header: t1,
|
|
16
|
+
items: t2,
|
|
17
|
+
groupId: _groupId,
|
|
18
|
+
...t3
|
|
19
|
+
} = t0;
|
|
20
|
+
header = t1;
|
|
21
|
+
items = t2;
|
|
22
|
+
props = t3;
|
|
19
23
|
$[0] = t0;
|
|
20
24
|
$[1] = header;
|
|
21
25
|
$[2] = items;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.prc-SelectPanel2-Overlay--Q-FI{border:none;color:var(--fgColor-default,#1f2328);padding:0;--max-height:0;--position-top:0;--position-left:0}.prc-SelectPanel2-Overlay--Q-FI:where([open]){display:flex}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=anchored]),.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=full-screen]){left:var(--position-left);margin:0;top:var(--position-top)}
|
|
1
|
+
.prc-SelectPanel2-Overlay--Q-FI{border:none;color:var(--fgColor-default,#1f2328);padding:0;--max-height:0;--position-top:0;--position-left:0}.prc-SelectPanel2-Overlay--Q-FI:where([open]){display:flex}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=anchored]),.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=full-screen]){left:var(--position-left);margin:0;top:var(--position-top)}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=anchored])::backdrop{background-color:transparent}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=full-screen])::backdrop{background-color:transparent}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=modal]){bottom:0;left:0;right:0;top:0}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=modal])::backdrop{background-color:var(--overlay-backdrop-bgColor,#c8d1da66)}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=full-screen]){border-radius:unset;height:100%;left:0;margin:0;max-height:100vh;max-width:100vw;top:0;width:100%}.prc-SelectPanel2-Overlay--Q-FI:where([data-variant=bottom-sheet]){border-bottom-left-radius:0;border-bottom-right-radius:0;bottom:0;left:0;margin:0;max-height:calc(100vh - 64px);max-width:100vw;top:auto;width:100%}.prc-SelectPanel2-Form-bZ9HS{width:100%}.prc-SelectPanel2-Container-e5e6-,.prc-SelectPanel2-Form-bZ9HS{display:flex;flex-direction:column}.prc-SelectPanel2-Container-e5e6-{flex-grow:1;flex-shrink:1;justify-content:space-between;overflow:hidden}.prc-SelectPanel2-Container-e5e6- ul{flex-grow:1;overflow-y:auto}.prc-SelectPanel2-Container-e5e6- li:not(:focus,[data-is-active-descendant],[data-active]){contain-intrinsic-size:auto 32px;content-visibility:auto}.prc-SelectPanel2-HeaderContent-MsaAS{align-items:center;display:flex;justify-content:space-between;margin-bottom:0}.prc-SelectPanel2-HeaderContent-MsaAS:where([data-description]){align-items:flex-start}.prc-SelectPanel2-HeaderContent-MsaAS:where([data-search-input]){margin-bottom:var(--base-size-8,.5rem)}.prc-SelectPanel2-TitleWrapper-HzPu3{margin-left:var(--base-size-8,.5rem);margin-top:0}.prc-SelectPanel2-TitleWrapper-HzPu3:where([data-description]){margin-top:2px}.prc-SelectPanel2-TitleWrapper-HzPu3:where([data-on-back]){margin-left:var(--base-size-4,.25rem)}.prc-SelectPanel2-TextInput-lHH1n{padding-left:var(--base-size-8,.5rem)!important}.prc-SelectPanel2-TextInput-lHH1n:has(input:placeholder-shown) .TextInput-action{display:none}.prc-SelectPanel2-Checkbox-AYR38{margin-top:0}.prc-SelectPanel2-FlexBox-gWPRg{display:flex}.prc-SelectPanel2-Title-T-h3f{font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-semibold,600)}.prc-SelectPanel2-Description-qTXfi{display:block;font-size:var(--text-body-size-small,.75rem)}.prc-SelectPanel2-ClearAction-tQj-f,.prc-SelectPanel2-Description-qTXfi{color:var(--fgColor-muted,#59636e)}.prc-SelectPanel2-ClearAction-tQj-f{background:none}.prc-SelectPanel2-Footer-TibV0{align-items:center;border-top:var(--borderWidth-thin,.0625rem) solid;border-top-color:var(--borderColor-default,#d1d9e0);display:flex;flex-shrink:0;justify-content:space-between;min-height:44px;padding:var(--base-size-16,1rem)}.prc-SelectPanel2-Footer-TibV0:where([data-hide-primary-actions]){padding:var(--base-size-8,.5rem)}.prc-SelectPanel2-FooterContent-UjAOM{flex-grow:0}.prc-SelectPanel2-FooterContent-UjAOM:where([data-hide-primary-actions]){flex-grow:1}.prc-SelectPanel2-FooterActions-T6yQR,.prc-SelectPanel2-SecondaryCheckbox-omkf-{display:flex;gap:var(--stack-gap-condensed,.5rem)}.prc-SelectPanel2-SecondaryCheckbox-omkf-{align-items:center}.prc-SelectPanel2-SmallText-c42ay{font-size:var(--text-body-size-small,.75rem)}.prc-SelectPanel2-SelectPanelLoading-mtyhD{align-items:center;display:flex;flex-direction:column;gap:var(--stack-gap-normal,1rem);height:100%;justify-content:center;min-height:min(calc(var(--max-height) - 150px),324px)}.prc-SelectPanel2-LoadingText-DB0wN{color:var(--fgColor-muted,#59636e);font-size:var(--text-body-size-medium,.875rem)}.prc-SelectPanel2-MessageFull-nY-qF{align-items:center;display:flex;flex-direction:column;flex-grow:1;gap:var(--base-size-4,.25rem);height:100%;justify-content:center;min-height:min(calc(var(--max-height) - 150px),324px);padding-left:var(--base-size-24,1.5rem);padding-right:var(--base-size-24,1.5rem);text-align:center}.prc-SelectPanel2-MessageFull-nY-qF a{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.prc-SelectPanel2-Octicon-zt-zU{margin-bottom:var(--base-size-8,.5rem)}.prc-SelectPanel2-Octicon-zt-zU.prc-SelectPanel2-Error-ZrZQQ{color:var(--fgColor-danger,#d1242f)}.prc-SelectPanel2-Octicon-zt-zU.prc-SelectPanel2-Warning-PDsVF{color:var(--fgColor-attention,#9a6700)}.prc-SelectPanel2-MessageTitle-T7v9d{font-size:var(--text-body-size-medium,.875rem);font-weight:var(--base-text-weight-medium,500)}.prc-SelectPanel2-MessageContent-UZ9vY{align-items:center;color:var(--fgColor-muted,#59636e);flex-direction:column;font-size:var(--text-body-size-medium,.875rem)}.prc-SelectPanel2-MessageContent-UZ9vY,.prc-SelectPanel2-MessageInline-sErQf{display:flex;gap:var(--stack-gap-condensed,.5rem)}.prc-SelectPanel2-MessageInline-sErQf{border-bottom:var(--borderWidth-thin,.0625rem) solid;font-size:var(--text-body-size-small,.75rem);padding:var(--base-size-12,.75rem) var(--base-size-16,1rem)}.prc-SelectPanel2-MessageInline-sErQf a{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.prc-SelectPanel2-MessageInline-sErQf:where([data-variant=error]){background-color:var(--bgColor-danger-muted,#ffebe9);border-color:var(--borderColor-danger-muted,#ff818266);color:var(--fgColor-danger,#d1242f)}.prc-SelectPanel2-MessageInline-sErQf:where([data-variant=warning]){background-color:var(--bgColor-attention-muted,#fff8c5);border-color:var(--borderColor-attention-muted,#d4a72c66);color:var(--fgColor-attention,#9a6700)}.prc-SelectPanel2-Header-LKyEJ{border-bottom:var(--borderWidth-thin,.0625rem) solid;border-bottom-color:var(--borderColor-default,#d1d9e0);display:flex;flex-direction:column;padding:var(--base-size-8,.5rem)}
|
|
2
2
|
/*# sourceMappingURL=SelectPanel-608e207e.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/experimental/SelectPanel2/SelectPanel.module.css.js"],"names":[],"mappings":"AAAA,gCAGE,WAAY,CADZ,oCAA6B,CAD7B,SAAU,CAKV,cAAe,CACf,gBAAiB,CACjB,iBAoDF,CAlDE,8CACE,YACF,CAEA,iIAKE,yBAA0B,CAC1B,QAAS,CAHT,uBAQF,CAHE,
|
|
1
|
+
{"version":3,"sources":["../../src/experimental/SelectPanel2/SelectPanel.module.css.js"],"names":[],"mappings":"AAAA,gCAGE,WAAY,CADZ,oCAA6B,CAD7B,SAAU,CAKV,cAAe,CACf,gBAAiB,CACjB,iBAoDF,CAlDE,8CACE,YACF,CAEA,iIAKE,yBAA0B,CAC1B,QAAS,CAHT,uBAQF,CAHE,yEACE,4BACF,CAFA,4EACE,4BACF,CAGF,4DAIE,QAAS,CAFT,MAAO,CACP,OAAQ,CAFR,KAIF,CAEA,sEACE,0DACF,CAEA,kEAQE,mBAAoB,CAHpB,WAAY,CAHZ,MAAO,CAKP,QAAS,CADT,gBAAiB,CAFjB,eAAgB,CAHhB,KAAM,CAEN,UAMF,CAEA,mEASE,2BAA4B,CAD5B,4BAA6B,CAN7B,QAAS,CACT,MAAO,CAIP,QAAS,CADT,6BAA8B,CAD9B,eAAgB,CAJhB,QAAS,CAGT,UAMF,CAGF,6BAEE,UAEF,CAEA,+DALE,YAAa,CAEb,qBAwBF,CArBA,kCAKE,WAAY,CADZ,aAAc,CAEd,6BAA8B,CAJ9B,eAmBF,CAbE,qCAEE,WAAY,CADZ,eAEF,CAMA,2FAEE,gCAAiC,CADjC,uBAEF,CAGF,sCAGE,kBAAmB,CAFnB,YAAa,CACb,6BAA8B,CAE9B,eASF,CAPE,gEACE,sBACF,CAEA,iEACE,sCACF,CAGF,qCAEE,oCAA+B,CAD/B,YAWF,CARE,+DAEE,cACF,CAEA,2DACE,qCACF,CAGF,kCACE,+CAMF,CAHE,iFACE,YACF,CAGF,iCACE,YACF,CAEA,gCACE,YACF,CAEA,8BACE,8CAAuC,CACvC,gDACF,CAEA,oCACE,aAAc,CACd,4CAEF,CAEA,wEAHE,kCAMF,CAHA,oCAEE,eACF,CAEA,+BAOE,kBAAmB,CAHnB,iDAAyC,CACzC,mDAA4C,CAJ5C,YAAa,CAOb,aAAc,CAFd,6BAA8B,CAJ9B,eAAgB,CAChB,gCAUF,CAHE,kEACE,gCACF,CAGF,sCACE,WAKF,CAHE,yEACE,WACF,CAQF,gFAJE,YAAa,CACb,oCAOF,CAJA,0CAEE,kBAEF,CAEA,kCACE,4CACF,CAEA,2CAQE,kBAAmB,CAPnB,YAAa,CAKb,qBAAsB,CAGtB,gCAA4B,CAP5B,WAAY,CAKZ,sBAAuB,CAFvB,qDAKF,CAEA,oCAEE,kCAA2B,CAD3B,8CAEF,CAEA,oCAWE,kBAAmB,CAVnB,YAAa,CAQb,qBAAsB,CAGtB,WAAY,CACZ,6BAAuB,CAXvB,WAAY,CAQZ,sBAAuB,CALvB,qDAAuD,CAEvD,uCAAiC,CADjC,wCAAkC,CAElC,iBAWF,CAJE,sCACE,aAAc,CACd,iCAA0B,CAA1B,yBACF,CAGF,gCACE,sCASF,CAPE,6DACE,mCACF,CAEA,+DACE,sCACF,CAGF,qCACE,8CAAuC,CACvC,8CACF,CAEA,uCAME,kBAAmB,CAHnB,kCAA2B,CAC3B,qBAAsB,CAFtB,8CAKF,CAEA,6EARE,YAAa,CAIb,oCA8BF,CA1BA,sCAOE,oDAA4C,CAD5C,4CAAsC,CADtC,2DAqBF,CAhBE,wCACE,aAAc,CACd,iCAA0B,CAA1B,yBACF,CAEA,kEAEE,oDAA6C,CAC7C,sDAA6C,CAF7C,mCAGF,CAEA,oEAEE,uDAAgD,CAChD,yDAAgD,CAFhD,sCAGF,CAGF,+BAIE,oDAA4C,CAC5C,sDAA+C,CAJ/C,YAAa,CAEb,qBAAsB,CADtB,gCAIF","file":"SelectPanel-608e207e.css","sourcesContent":[".Overlay {\n padding: 0;\n color: var(--fgColor-default);\n border: none;\n\n /* CSS variables values are passed in via styles */\n --max-height: 0;\n --position-top: 0;\n --position-left: 0;\n\n &:where([open]) {\n display: flex; /* to fit children */\n }\n\n &:where([data-variant='anchored']),\n &:where([data-variant='full-screen']) {\n /* stylelint-disable-next-line primer/spacing */\n top: var(--position-top);\n /* stylelint-disable-next-line primer/spacing */\n left: var(--position-left);\n margin: 0;\n\n &::backdrop {\n background-color: transparent;\n }\n }\n\n &:where([data-variant='modal']) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n\n &:where([data-variant='modal'])::backdrop {\n background-color: var(--overlay-backdrop-bgColor);\n }\n\n &:where([data-variant='full-screen']) {\n top: 0;\n left: 0;\n width: 100%;\n max-width: 100vw;\n height: 100%;\n max-height: 100vh;\n margin: 0;\n border-radius: unset;\n }\n\n &:where([data-variant='bottom-sheet']) {\n top: auto;\n bottom: 0;\n left: 0;\n width: 100%;\n max-width: 100vw;\n max-height: calc(100vh - 64px);\n margin: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n }\n}\n\n.Form {\n display: flex;\n width: 100%;\n flex-direction: column;\n}\n\n.Container {\n display: flex;\n overflow: hidden;\n flex-direction: column;\n flex-shrink: 1;\n flex-grow: 1;\n justify-content: space-between;\n\n ul {\n overflow-y: auto;\n flex-grow: 1;\n }\n\n /* Allow the browser to skip rendering for off-screen items, reducing style recalc and layout costs in long lists.\n Exclude items that show the active indicator line, as content-visibility: auto applies paint containment\n which clips the absolutely-positioned ::after pseudo-element that renders outside the item bounds. */\n /* stylelint-disable-next-line selector-no-qualifying-type */\n li:not(:focus, [data-is-active-descendant], [data-active]) {\n content-visibility: auto;\n contain-intrinsic-size: auto 32px;\n }\n}\n\n.HeaderContent {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0;\n\n &:where([data-description]) {\n align-items: flex-start;\n }\n\n &:where([data-search-input]) {\n margin-bottom: var(--base-size-8);\n }\n}\n\n.TitleWrapper {\n margin-top: 0;\n margin-left: var(--base-size-8);\n\n &:where([data-description]) {\n /* stylelint-disable-next-line primer/spacing */\n margin-top: 2px;\n }\n\n &:where([data-on-back]) {\n margin-left: var(--base-size-4);\n }\n}\n\n.TextInput {\n padding-left: var(--base-size-8) !important;\n\n /* stylelint-disable-next-line selector-class-pattern, selector-no-qualifying-type, selector-pseudo-class-disallowed-list -- :has() scoped to CSS Module, audited (github/github-ui#17224) */\n &:has(input:placeholder-shown) :global(.TextInput-action) {\n display: none;\n }\n}\n\n.Checkbox {\n margin-top: 0;\n}\n\n.FlexBox {\n display: flex;\n}\n\n.Title {\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-semibold);\n}\n\n.Description {\n display: block;\n font-size: var(--text-body-size-small);\n color: var(--fgColor-muted);\n}\n\n.ClearAction {\n color: var(--fgColor-muted);\n background: none;\n}\n\n.Footer {\n display: flex;\n min-height: 44px;\n padding: var(--base-size-16);\n border-top: var(--borderWidth-thin) solid;\n border-top-color: var(--borderColor-default);\n justify-content: space-between;\n align-items: center;\n flex-shrink: 0;\n\n &:where([data-hide-primary-actions]) {\n padding: var(--base-size-8);\n }\n}\n\n.FooterContent {\n flex-grow: 0;\n\n &:where([data-hide-primary-actions]) {\n flex-grow: 1;\n }\n}\n\n.FooterActions {\n display: flex;\n gap: var(--stack-gap-condensed);\n}\n\n.SecondaryCheckbox {\n display: flex;\n align-items: center;\n gap: var(--stack-gap-condensed);\n}\n\n.SmallText {\n font-size: var(--text-body-size-small);\n}\n\n.SelectPanelLoading {\n display: flex;\n height: 100%;\n\n /* maxHeight of dialog - (header & footer) */\n min-height: min(calc(var(--max-height) - 150px), 324px);\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: var(--stack-gap-normal);\n}\n\n.LoadingText {\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n}\n\n.MessageFull {\n display: flex;\n height: 100%;\n\n /* maxHeight of dialog - (header & footer) */\n min-height: min(calc(var(--max-height) - 150px), 324px);\n padding-right: var(--base-size-24);\n padding-left: var(--base-size-24);\n text-align: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n gap: var(--base-size-4);\n\n a {\n color: inherit;\n text-decoration: underline;\n }\n}\n\n.Octicon {\n margin-bottom: var(--base-size-8);\n\n &.Error {\n color: var(--fgColor-danger);\n }\n\n &.Warning {\n color: var(--fgColor-attention);\n }\n}\n\n.MessageTitle {\n font-size: var(--text-body-size-medium);\n font-weight: var(--base-text-weight-medium);\n}\n\n.MessageContent {\n display: flex;\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n flex-direction: column;\n gap: var(--stack-gap-condensed);\n align-items: center;\n}\n\n.MessageInline {\n display: flex;\n padding-top: var(--base-size-12);\n padding-right: var(--base-size-16);\n padding-bottom: var(--base-size-12);\n padding-left: var(--base-size-16);\n font-size: var(--text-body-size-small);\n border-bottom: var(--borderWidth-thin) solid;\n gap: var(--stack-gap-condensed);\n\n a {\n color: inherit;\n text-decoration: underline;\n }\n\n &:where([data-variant='error']) {\n color: var(--fgColor-danger);\n background-color: var(--bgColor-danger-muted);\n border-color: var(--borderColor-danger-muted);\n }\n\n &:where([data-variant='warning']) {\n color: var(--fgColor-attention);\n background-color: var(--bgColor-attention-muted);\n border-color: var(--borderColor-attention-muted);\n }\n}\n\n.Header {\n display: flex;\n padding: var(--base-size-8);\n flex-direction: column;\n border-bottom: var(--borderWidth-thin) solid;\n border-bottom-color: var(--borderColor-default);\n}\n"]}
|