@primer/react 0.0.0-20260617202152 → 0.0.0-20260617213021
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 +24 -1
- 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/Description.d.ts.map +1 -1
- package/dist/ActionList/GroupHeadingTrailingAction.js +20 -14
- 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/TrailingAction.d.ts +2 -1
- package/dist/ActionList/TrailingAction.d.ts.map +1 -1
- package/dist/ActionList/TrailingAction.js +37 -31
- 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 +8 -3
- package/dist/Autocomplete/AutocompleteInput.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteInput.js +3 -1
- package/dist/Autocomplete/AutocompleteMenu.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteMenu.js +7 -1
- package/dist/AvatarStack/AvatarStack-9bb5649f.css +1 -1
- package/dist/AvatarStack/AvatarStack-9bb5649f.css.map +1 -1
- package/dist/AvatarStack/AvatarStack.d.ts.map +1 -1
- package/dist/AvatarStack/AvatarStack.js +1 -0
- package/dist/BaseStyles-fda34843.css +1 -1
- package/dist/BaseStyles-fda34843.css.map +1 -1
- package/dist/Blankslate/Blankslate-11d7a7fd.css +2 -0
- package/dist/Blankslate/Blankslate-11d7a7fd.css.map +1 -0
- package/dist/Blankslate/Blankslate.module.css.js +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 -149
- 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/DataTable/storybook/data.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +1 -1
- package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +4 -0
- package/dist/FilteredActionList/useAnnouncements.d.ts.map +1 -1
- package/dist/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/LabelGroup/LabelGroup.js +5 -0
- 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/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +25 -2
- package/dist/SideNav-baa2364d.css +1 -1
- package/dist/SideNav-baa2364d.css.map +1 -1
- package/dist/Spinner/Spinner.d.ts.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/Textarea/Textarea.d.ts.map +1 -1
- package/dist/Timeline/Timeline-ff81db92.css +1 -1
- package/dist/Timeline/Timeline-ff81db92.css.map +1 -1
- package/dist/ToggleSwitch/ToggleSwitch.d.ts.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/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +1 -0
- 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/experimental/SelectPanel2/SelectPanel.d.ts +4 -1
- package/dist/experimental/SelectPanel2/SelectPanel.d.ts.map +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +3 -2
- package/dist/hooks/useControllableState.d.ts.map +1 -1
- package/dist/hooks/useControllableState.js +2 -0
- package/dist/hooks/useDetails.d.ts.map +1 -1
- package/dist/hooks/useDialog.d.ts.map +1 -1
- package/dist/hooks/useFocusZone.d.ts.map +1 -1
- package/dist/hooks/useFocusZone.js +3 -1
- package/dist/hooks/useMenuInitialFocus.d.ts.map +1 -1
- package/dist/hooks/useMenuInitialFocus.js +1 -0
- package/dist/hooks/useMergedRefs.js +17 -30
- package/dist/hooks/useMnemonics.d.ts.map +1 -1
- package/dist/internal/components/TextInputWrapper-b2f7f9fa.css +1 -1
- package/dist/internal/components/TextInputWrapper-b2f7f9fa.css.map +1 -1
- package/dist/utils/StressTest.d.ts.map +1 -1
- package/dist/utils/descendant-registry.d.ts.map +1 -1
- package/dist/utils/form-story-helpers.d.ts +2 -1
- package/dist/utils/form-story-helpers.d.ts.map +1 -1
- package/dist/utils/modern-polymorphic.d.ts +1 -1
- package/dist/utils/modern-polymorphic.d.ts.map +1 -1
- package/dist/utils/story-helpers.d.ts +2 -1
- package/dist/utils/story-helpers.d.ts.map +1 -1
- package/generated/components.json +18 -6
- package/package.json +2 -2
- package/dist/Blankslate/Blankslate-a039d79a.css +0 -2
- package/dist/Blankslate/Blankslate-a039d79a.css.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/TreeView/TreeView.module.css.js"],"names":[],"mappings":"AAAA,yCAGE,eAAgB,CADhB,QAAS,CADT,SA8PF,CA7OE,0EAQE,YAAa,CADb,6CAgBF,CAbE,kMAEE,mFAMF,CAJE,8BAJF,kMAKI,+BAAgC,CAChC,mBAEJ,CADE,CAGF,wGACE,sBACF,CAGF,mFACE,SAAU,CACV,mBAAoB,CACpB,sBAAuB,CAcvB,g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mFAEE,8DAAuD,CADvD,YAEF,CAEA,oFAGE,UAAW,CAGX,WAAY,CACZ,eAAgB,CAHhB,SAAU,CAHV,iBAAkB,CAClB,SAAU,CAOV,kBAAsB,CAEtB,cAAe,CADf,kBAEF,CAGF,uDAEE,kBAAmB,CACnB,gBAAkB,CAFlB,YAAa,CAGb,WAyBF,CAvBE,wBANF,uDAOI,cAsBJ,CArBE,CAEA,yEACE,6BACF,CAEA,yEACE,6BACF,CAEA,yEACE,6BACF,CAEA,yEACE,6BACF,CAEA,yEACE,6BACF,CAGF,+CACE,wCACF","file":"TreeView-1bf45a33.css","sourcesContent":[".TreeViewRootUlStyles {\n padding: 0;\n margin: 0;\n list-style: none;\n\n /*\n * WARNING: This is a performance optimization.\n *\n * We define styles for the tree items at the root level of the tree\n * to avoid recomputing the styles for each item when the tree updates.\n * We're sacrificing maintainability for performance because TreeView\n * needs to be performant enough to handle large trees (thousands of items).\n *\n * This is intended to be a temporary solution until we can improve the\n * performance of our styling patterns.\n *\n * Do NOT copy this pattern without understanding the tradeoffs.\n */\n .TreeViewItem {\n /*\n * `overflow-clip-margin` extends the paint clip edge by 8px so the current-item indicator\n * (positioned at `left: -8px` of the row container) remains visible when a consumer applies\n * `contain: paint` (or `contain: strict`, or `content-visibility: auto`) to this `<li>`. Has\n * no effect when no paint containment is active, so default rendering is unchanged.\n */\n overflow-clip-margin: var(--base-size-8);\n outline: none;\n\n &:focus-visible > div,\n &:global(.focus-visible) > div {\n box-shadow: var(--boxShadow-thick) var(--fgColor-accent);\n\n @media (forced-colors: active) {\n outline: 2px solid HighlightText;\n outline-offset: -2px;\n }\n }\n\n &[data-has-leading-action] {\n --has-leading-action: 1;\n }\n }\n\n .TreeViewItemContainer {\n --level: 1;\n --toggle-width: 1rem;\n --min-item-height: 2rem;\n\n position: relative;\n display: grid;\n width: 100%;\n /*\n * Mirrors the `overflow-clip-margin` on `.TreeViewItem` so the indicator also stays\n * visible when `containIntrinsicSize` is set on this row (which sets\n * `content-visibility: auto` on this container and implies paint containment).\n */\n overflow-clip-margin: var(--base-size-8);\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-default);\n cursor: pointer;\n border-radius: var(--borderRadius-medium);\n grid-template-columns: var(--spacer-width) var(--leading-action-width) var(--toggle-width) 1fr auto;\n grid-template-areas: 'spacer leadingAction toggle content trailingAction';\n\n --leading-action-width: calc(var(--has-leading-action, 0) * 1.5rem);\n --spacer-width: calc(calc(var(--level) - 1) * (var(--toggle-width) / 2));\n\n &:hover {\n background-color: var(--control-transparent-bgColor-hover);\n\n @media (forced-colors: active) {\n outline: 2px solid transparent;\n outline-offset: -2px;\n }\n }\n\n @media (pointer: coarse) {\n --toggle-width: 1.5rem;\n --min-item-height: 2.75rem;\n }\n }\n\n &:where([data-omit-spacer='true']) .TreeViewItemContainer {\n grid-template-columns: 0 0 0 1fr auto;\n }\n\n /*\n * Suppress hover affordances on rows being used as skeleton loading placeholders.\n * Marked positively via `data-loading` from `LoadingItem` so we avoid the broad\n * invalidation cost of `:has(.TreeViewItemSkeleton)` across every row in large trees.\n */\n .TreeViewItem:where([data-loading]) > .TreeViewItemContainer:hover {\n cursor: default;\n background-color: transparent;\n\n @media (forced-colors: active) {\n outline: none;\n }\n }\n\n .TreeViewItem[aria-current='true'] > .TreeViewItemContainer {\n background-color: var(--control-transparent-bgColor-selected);\n\n /* Current item indicator */\n /* stylelint-disable-next-line selector-max-specificity */\n &::after {\n position: absolute;\n top: calc(50% - var(--base-size-12));\n left: calc(-1 * var(--base-size-8));\n width: 0.25rem;\n height: 1.5rem;\n content: '';\n\n /*\n * Use fgColor accent for consistency across all themes. Using the \"correct\" variable,\n * --bgColor-accent-emphasis, causes vrt failures for dark high contrast mode\n */\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--fgColor-accent);\n border-radius: var(--borderRadius-medium);\n\n @media (forced-colors: active) {\n background-color: HighlightText;\n }\n }\n }\n\n .TreeViewItemToggle {\n display: flex;\n height: 100%;\n\n /* The toggle should appear vertically centered for single-line items, but remain at the top for items that wrap\n across more lines. */\n /* stylelint-disable-next-line primer/spacing */\n padding-top: calc(var(--min-item-height) / 2 - var(--base-size-12) / 2);\n color: var(--fgColor-muted);\n grid-area: toggle;\n justify-content: center;\n align-items: flex-start;\n }\n\n .TreeViewItemToggleHover:hover {\n background-color: var(--control-transparent-bgColor-hover);\n }\n\n .TreeViewItemToggleEnd {\n border-top-left-radius: var(--borderRadius-medium);\n border-bottom-left-radius: var(--borderRadius-medium);\n }\n\n .TreeViewItemContent {\n display: flex;\n height: 100%;\n padding: 0 var(--base-size-8);\n\n /* The dynamic top and bottom padding to maintain the minimum item height for single line items */\n /* stylelint-disable-next-line primer/spacing */\n padding-top: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem)) / 2);\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem)) / 2);\n line-height: var(--custom-line-height, var(--text-body-lineHeight-medium, 1.4285));\n grid-area: content;\n gap: var(--stack-gap-condensed);\n }\n\n .TreeViewItemContentText {\n flex: 1 1 auto;\n width: 0;\n }\n\n &:where([data-truncate-text='true']) .TreeViewItemContentText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &:where([data-truncate-text='false']) .TreeViewItemContentText {\n /* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */\n word-break: break-word;\n }\n\n .TreeViewItemVisual {\n display: flex;\n\n /* The visual icons should appear vertically centered for single-line items, but remain at the top for items that wrap\n across more lines. */\n height: var(--custom-line-height, 1.3rem);\n color: var(--fgColor-muted);\n align-items: center;\n }\n\n .TreeViewItemLeadingAction {\n display: flex;\n color: var(--fgColor-muted);\n grid-area: leadingAction;\n\n & > button {\n flex-shrink: 1;\n }\n }\n\n .TreeViewItemTrailingAction {\n display: flex;\n color: var(--fgColor-muted);\n grid-area: trailingAction;\n }\n\n .TreeViewItemTrailingActionButton {\n flex-shrink: 1;\n }\n\n .TreeViewItemLevelLine {\n width: 100%;\n height: 100%;\n border-right: var(--borderWidth-thin) solid;\n\n /*\n * `--tree-line-color` is set on the root `<ul>` and inherited down. On coarse pointers it\n * stays unset and falls back to `muted` (lines always visible). On hover-capable devices it\n * is initialized to `transparent` on the root and flipped to `muted` while the tree is\n * hovered or focused, so the browser only has to propagate a single inherited custom\n * property instead of re-matching `.TreeViewItemLevelLine` descendant selectors on every\n * hover/focus change inside large trees.\n */\n /* stylelint-disable-next-line primer/colors -- private custom property, defaults to a Primer token */\n border-color: var(--tree-line-color, var(--borderColor-muted));\n }\n\n @media (hover: hover) {\n --tree-line-color: transparent;\n\n &:hover,\n &:focus-within {\n --tree-line-color: var(--borderColor-muted);\n }\n }\n\n .TreeViewDirectoryIcon {\n display: grid;\n color: var(--treeViewItem-leadingVisual-iconColor-rest);\n }\n\n .TreeViewVisuallyHidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n /* stylelint-disable-next-line primer/spacing */\n margin: -1px;\n overflow: hidden;\n /* stylelint-disable-next-line property-no-deprecated */\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n}\n\n.TreeViewSkeletonItemContainerStyle {\n display: flex;\n align-items: center;\n column-gap: 0.5rem;\n height: 2rem;\n\n @media (pointer: coarse) {\n height: 2.75rem;\n }\n\n &:nth-of-type(5n + 1) {\n --tree-item-loading-width: 67%;\n }\n\n &:nth-of-type(5n + 2) {\n --tree-item-loading-width: 47%;\n }\n\n &:nth-of-type(5n + 3) {\n --tree-item-loading-width: 73%;\n }\n\n &:nth-of-type(5n + 4) {\n --tree-item-loading-width: 64%;\n }\n\n &:nth-of-type(5n + 5) {\n --tree-item-loading-width: 50%;\n }\n}\n\n.TreeItemSkeletonTextStyles {\n width: var(--tree-item-loading-width, 67%);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/TreeView/TreeView.module.css.js"],"names":[],"mappings":"AAAA,yCAGE,eAAgB,CADhB,QAAS,CADT,SA8PF,CA7OE,0EAQE,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uBAKF,CAHE,8FACE,aACF,CAGF,wFAEE,kCAA2B,CAD3B,YAAa,CAEb,wBACF,CAEA,8FACE,aACF,CAEA,mFAGE,mDAA2C,CAW3C,sEAA8D,CAZ9D,WAAY,CADZ,UAcF,CAEA,qBApOF,yCAqOI,6BA0BJ,CAxBI,qGAEE,oDACF,CACF,CAEA,mFAEE,8DAAuD,CADvD,YAEF,CAEA,oFAGE,UAAW,CAGX,WAAY,CACZ,eAAgB,CAHhB,SAAU,CAHV,iBAAkB,CAClB,SAAU,CAOV,kBAAsB,CAEtB,cAAe,CADf,kBAEF,CAGF,uDAEE,kBAAmB,CACnB,gBAAkB,CAFlB,YAAa,CAGb,WAyBF,CAvBE,wBANF,uDAOI,cAsBJ,CArBE,CAEA,yEACE,6BACF,CAEA,yEACE,6BACF,CAEA,yEACE,6BACF,CAEA,yEACE,6BACF,CAEA,yEACE,6BACF,CAGF,+CACE,wCACF","file":"TreeView-1bf45a33.css","sourcesContent":[".TreeViewRootUlStyles {\n padding: 0;\n margin: 0;\n list-style: none;\n\n /*\n * WARNING: This is a performance optimization.\n *\n * We define styles for the tree items at the root level of the tree\n * to avoid recomputing the styles for each item when the tree updates.\n * We're sacrificing maintainability for performance because TreeView\n * needs to be performant enough to handle large trees (thousands of items).\n *\n * This is intended to be a temporary solution until we can improve the\n * performance of our styling patterns.\n *\n * Do NOT copy this pattern without understanding the tradeoffs.\n */\n .TreeViewItem {\n /*\n * `overflow-clip-margin` extends the paint clip edge by 8px so the current-item indicator\n * (positioned at `left: -8px` of the row container) remains visible when a consumer applies\n * `contain: paint` (or `contain: strict`, or `content-visibility: auto`) to this `<li>`. Has\n * no effect when no paint containment is active, so default rendering is unchanged.\n */\n overflow-clip-margin: var(--base-size-8);\n outline: none;\n\n &:focus-visible > div,\n &:global(.focus-visible) > div {\n box-shadow: var(--boxShadow-thick) var(--fgColor-accent);\n\n @media (forced-colors: active) {\n outline: 2px solid HighlightText;\n outline-offset: -2px;\n }\n }\n\n &[data-has-leading-action] {\n --has-leading-action: 1;\n }\n }\n\n .TreeViewItemContainer {\n --level: 1;\n --toggle-width: 1rem;\n --min-item-height: 2rem;\n\n position: relative;\n display: grid;\n width: 100%;\n /*\n * Mirrors the `overflow-clip-margin` on `.TreeViewItem` so the indicator also stays\n * visible when `containIntrinsicSize` is set on this row (which sets\n * `content-visibility: auto` on this container and implies paint containment).\n */\n overflow-clip-margin: var(--base-size-8);\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-default);\n cursor: pointer;\n border-radius: var(--borderRadius-medium);\n grid-template-columns: var(--spacer-width) var(--leading-action-width) var(--toggle-width) 1fr auto;\n grid-template-areas: 'spacer leadingAction toggle content trailingAction';\n\n --leading-action-width: calc(var(--has-leading-action, 0) * 1.5rem);\n --spacer-width: calc(calc(var(--level) - 1) * (var(--toggle-width) / 2));\n\n &:hover {\n background-color: var(--control-transparent-bgColor-hover);\n\n @media (forced-colors: active) {\n outline: 2px solid transparent;\n outline-offset: -2px;\n }\n }\n\n @media (pointer: coarse) {\n --toggle-width: 1.5rem;\n --min-item-height: 2.75rem;\n }\n }\n\n &:where([data-omit-spacer='true']) .TreeViewItemContainer {\n grid-template-columns: 0 0 0 1fr auto;\n }\n\n /*\n * Suppress hover affordances on rows being used as skeleton loading placeholders.\n * Marked positively via `data-loading` from `LoadingItem` so we avoid the broad\n * invalidation cost of `:has(.TreeViewItemSkeleton)` across every row in large trees.\n */\n .TreeViewItem:where([data-loading]) > .TreeViewItemContainer:hover {\n cursor: default;\n background-color: transparent;\n\n @media (forced-colors: active) {\n outline: none;\n }\n }\n\n .TreeViewItem[aria-current='true'] > .TreeViewItemContainer {\n background-color: var(--control-transparent-bgColor-selected);\n\n /* Current item indicator */\n /* stylelint-disable-next-line selector-max-specificity */\n &::after {\n position: absolute;\n top: calc(50% - var(--base-size-12));\n left: calc(-1 * var(--base-size-8));\n width: 0.25rem;\n height: 1.5rem;\n content: '';\n\n /*\n * Use fgColor accent for consistency across all themes. Using the \"correct\" variable,\n * --bgColor-accent-emphasis, causes vrt failures for dark high contrast mode\n */\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--fgColor-accent);\n border-radius: var(--borderRadius-medium);\n\n @media (forced-colors: active) {\n background-color: HighlightText;\n }\n }\n }\n\n .TreeViewItemToggle {\n display: flex;\n height: 100%;\n\n /* The toggle should appear vertically centered for single-line items, but remain at the top for items that wrap\n across more lines. */\n /* stylelint-disable-next-line primer/spacing */\n padding-top: calc(var(--min-item-height) / 2 - var(--base-size-12) / 2);\n color: var(--fgColor-muted);\n grid-area: toggle;\n justify-content: center;\n align-items: flex-start;\n }\n\n .TreeViewItemToggleHover:hover {\n background-color: var(--control-transparent-bgColor-hover);\n }\n\n .TreeViewItemToggleEnd {\n border-top-left-radius: var(--borderRadius-medium);\n border-bottom-left-radius: var(--borderRadius-medium);\n }\n\n .TreeViewItemContent {\n display: flex;\n height: 100%;\n padding: 0 var(--base-size-8);\n\n /* The dynamic top and bottom padding to maintain the minimum item height for single line items */\n /* stylelint-disable-next-line primer/spacing */\n padding-top: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem)) / 2);\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem)) / 2);\n line-height: var(--custom-line-height, var(--text-body-lineHeight-medium, 1.4285));\n grid-area: content;\n gap: var(--stack-gap-condensed);\n }\n\n .TreeViewItemContentText {\n flex: 1 1 auto;\n width: 0;\n }\n\n &:where([data-truncate-text='true']) .TreeViewItemContentText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &:where([data-truncate-text='false']) .TreeViewItemContentText {\n /* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */\n word-break: break-word;\n }\n\n .TreeViewItemVisual {\n display: flex;\n\n /* The visual icons should appear vertically centered for single-line items, but remain at the top for items that wrap\n across more lines. */\n height: var(--custom-line-height, 1.3rem);\n color: var(--fgColor-muted);\n align-items: center;\n }\n\n .TreeViewItemLeadingAction {\n display: flex;\n color: var(--fgColor-muted);\n grid-area: leadingAction;\n\n & > button {\n flex-shrink: 1;\n }\n }\n\n .TreeViewItemTrailingAction {\n display: flex;\n color: var(--fgColor-muted);\n grid-area: trailingAction;\n }\n\n .TreeViewItemTrailingActionButton {\n flex-shrink: 1;\n }\n\n .TreeViewItemLevelLine {\n width: 100%;\n height: 100%;\n border-right: var(--borderWidth-thin) solid;\n\n /*\n * `--tree-line-color` is set on the root `<ul>` and inherited down. On coarse pointers it\n * stays unset and falls back to `muted` (lines always visible). On hover-capable devices it\n * is initialized to `transparent` on the root and flipped to `muted` while the tree is\n * hovered or focused, so the browser only has to propagate a single inherited custom\n * property instead of re-matching `.TreeViewItemLevelLine` descendant selectors on every\n * hover/focus change inside large trees.\n */\n /* stylelint-disable-next-line primer/colors -- private custom property, defaults to a Primer token */\n border-color: var(--tree-line-color, var(--borderColor-muted));\n }\n\n @media (hover: hover) {\n --tree-line-color: transparent;\n\n &:hover,\n &:focus-within {\n --tree-line-color: var(--borderColor-muted);\n }\n }\n\n .TreeViewDirectoryIcon {\n display: grid;\n color: var(--treeViewItem-leadingVisual-iconColor-rest);\n }\n\n .TreeViewVisuallyHidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n /* stylelint-disable-next-line primer/spacing */\n margin: -1px;\n overflow: hidden;\n /* stylelint-disable-next-line property-no-deprecated */\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n}\n\n.TreeViewSkeletonItemContainerStyle {\n display: flex;\n align-items: center;\n column-gap: 0.5rem;\n height: 2rem;\n\n @media (pointer: coarse) {\n height: 2.75rem;\n }\n\n &:nth-of-type(5n + 1) {\n --tree-item-loading-width: 67%;\n }\n\n &:nth-of-type(5n + 2) {\n --tree-item-loading-width: 47%;\n }\n\n &:nth-of-type(5n + 3) {\n --tree-item-loading-width: 73%;\n }\n\n &:nth-of-type(5n + 4) {\n --tree-item-loading-width: 64%;\n }\n\n &:nth-of-type(5n + 5) {\n --tree-item-loading-width: 50%;\n }\n}\n\n.TreeItemSkeletonTextStyles {\n width: var(--tree-item-loading-width, 67%);\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Icon } from '@primer/octicons-react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { FCWithSlotMarker } from '../utils/types';
|
|
4
|
+
import { type DistributiveOmit } from '../utils/modern-polymorphic';
|
|
4
5
|
export type TreeViewProps = {
|
|
5
6
|
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
6
7
|
'aria-labelledby'?: React.AriaAttributes['aria-labelledby'];
|
|
@@ -17,7 +18,7 @@ export type TreeViewSecondaryActions = {
|
|
|
17
18
|
count?: number | string;
|
|
18
19
|
className?: string;
|
|
19
20
|
};
|
|
20
|
-
|
|
21
|
+
type TreeViewItemBaseProps = {
|
|
21
22
|
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
22
23
|
'aria-labelledby'?: React.AriaAttributes['aria-labelledby'];
|
|
23
24
|
id: string;
|
|
@@ -31,6 +32,9 @@ export type TreeViewItemProps = {
|
|
|
31
32
|
className?: string;
|
|
32
33
|
secondaryActions?: TreeViewSecondaryActions[];
|
|
33
34
|
};
|
|
35
|
+
export type TreeViewItemProps<As extends React.ElementType = 'li'> = DistributiveOmit<React.ComponentPropsWithoutRef<React.ElementType extends As ? 'li' : As>, 'as' | 'onSelect'> & TreeViewItemBaseProps & {
|
|
36
|
+
as?: As;
|
|
37
|
+
};
|
|
34
38
|
export type SubTreeState = 'initial' | 'loading' | 'done' | 'error';
|
|
35
39
|
export type TreeViewSubTreeProps = {
|
|
36
40
|
children?: React.ReactNode;
|
|
@@ -62,7 +66,11 @@ export type TreeViewErrorDialogProps = {
|
|
|
62
66
|
onDismiss?: () => void;
|
|
63
67
|
};
|
|
64
68
|
export declare const TreeView: React.FC<TreeViewProps> & {
|
|
65
|
-
Item: React.
|
|
69
|
+
Item: (<As extends React.ElementType = "li">(props: DistributiveOmit<React.PropsWithoutRef<React.ComponentProps<React.ElementType<any, keyof React.JSX.IntrinsicElements> extends As ? "li" : As>>, "as" | "onSelect"> & TreeViewItemBaseProps & {
|
|
70
|
+
as?: As | undefined;
|
|
71
|
+
} & React.RefAttributes<unknown>) => React.ReactNode) & {
|
|
72
|
+
displayName: string;
|
|
73
|
+
};
|
|
66
74
|
SubTree: FCWithSlotMarker<TreeViewSubTreeProps>;
|
|
67
75
|
LeadingAction: React.FC<TreeViewVisualProps>;
|
|
68
76
|
LeadingVisual: React.FC<TreeViewVisualProps>;
|
|
@@ -70,4 +78,5 @@ export declare const TreeView: React.FC<TreeViewProps> & {
|
|
|
70
78
|
DirectoryIcon: () => React.JSX.Element;
|
|
71
79
|
ErrorDialog: React.FC<TreeViewErrorDialogProps>;
|
|
72
80
|
};
|
|
81
|
+
export {};
|
|
73
82
|
//# sourceMappingURL=TreeView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeView.d.ts","sourceRoot":"","sources":["../../src/TreeView/TreeView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,IAAI,EACV,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAA+B,MAAM,OAAO,CAAA;AAsBnD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"TreeView.d.ts","sourceRoot":"","sources":["../../src/TreeView/TreeView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,IAAI,EACV,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAA+B,MAAM,OAAO,CAAA;AAsBnD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAEpD,OAAO,EAAkB,KAAK,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAgDlF,MAAM,MAAM,aAAa,GAAG;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IACjD,iBAA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,QAAQ;YArwBlB,EAAE,SAAS,KAAK,CAAC,WAAW;;;;;;;;;;;CA6wB7B,CAAA"}
|
|
@@ -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;
|