@primer/react 38.29.0-rc.30acfb591 → 38.29.0-rc.4e02c8150
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 +25 -0
- package/dist/ActionList/ActionList-65f7daac.css +2 -0
- package/dist/ActionList/ActionList-65f7daac.css.map +1 -0
- package/dist/ActionList/ActionList.module.css.js +2 -2
- package/dist/ActionList/Description.d.ts.map +1 -1
- package/dist/ActionList/Group.d.ts +0 -5
- package/dist/ActionList/Group.d.ts.map +1 -1
- package/dist/ActionList/Group.js +2 -5
- package/dist/ActionList/GroupContext.d.ts +8 -0
- package/dist/ActionList/GroupContext.d.ts.map +1 -0
- package/dist/ActionList/GroupContext.js +8 -0
- package/dist/ActionList/GroupHeadingTrailingAction.js +20 -14
- package/dist/ActionList/Item.js +3 -2
- 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/List.js +21 -16
- package/dist/ActionList/Selection.js +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/ActionList/index.js +2 -1
- package/dist/ActionMenu/ActionMenu.js +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 +10 -4
- 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 +7 -0
- 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/Button/IconButton.d.ts.map +1 -1
- package/dist/Button/IconButton.js +3 -2
- 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/ConfirmationDialog/ConfirmationDialog.d.ts +0 -9
- package/dist/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/dist/ConfirmationDialog/ConfirmationDialog.js +1 -42
- package/dist/ConfirmationDialog/useConfirm.d.ts +12 -0
- package/dist/ConfirmationDialog/useConfirm.d.ts.map +1 -0
- package/dist/ConfirmationDialog/useConfirm.js +44 -0
- package/dist/DataTable/storybook/data.d.ts.map +1 -1
- package/dist/Dialog/Dialog.d.ts +0 -1
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +3 -5
- package/dist/Dialog/DialogContext.d.ts +3 -0
- package/dist/Dialog/DialogContext.d.ts.map +1 -0
- package/dist/Dialog/DialogContext.js +5 -0
- package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.js +1 -0
- package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +6 -1
- package/dist/FilteredActionList/FilteredActionListLoaders-bdda3d7e.css +2 -0
- package/dist/FilteredActionList/FilteredActionListLoaders-bdda3d7e.css.map +1 -0
- package/dist/FilteredActionList/FilteredActionListLoaders.d.ts +2 -10
- package/dist/FilteredActionList/FilteredActionListLoaders.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionListLoaders.js +4 -13
- package/dist/FilteredActionList/FilteredActionListLoaders.module.css.js +2 -2
- package/dist/FilteredActionList/constants.d.ts +11 -0
- package/dist/FilteredActionList/constants.d.ts.map +1 -0
- package/dist/FilteredActionList/constants.js +13 -0
- package/dist/FilteredActionList/index.js +0 -1
- package/dist/FilteredActionList/useAnnouncements.d.ts.map +1 -1
- package/dist/KeybindingHint/KeybindingHint.d.ts +0 -14
- package/dist/KeybindingHint/KeybindingHint.d.ts.map +1 -1
- package/dist/KeybindingHint/KeybindingHint.js +2 -16
- package/dist/KeybindingHint/components/Chord.d.ts +0 -3
- package/dist/KeybindingHint/components/Chord.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Chord.js +2 -21
- package/dist/KeybindingHint/components/Sequence.d.ts +0 -3
- package/dist/KeybindingHint/components/Sequence.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Sequence.js +2 -5
- package/dist/KeybindingHint/components/utils.d.ts +8 -0
- package/dist/KeybindingHint/components/utils.d.ts.map +1 -0
- package/dist/KeybindingHint/components/utils.js +32 -0
- package/dist/KeybindingHint/index.d.ts +2 -1
- package/dist/KeybindingHint/index.d.ts.map +1 -1
- package/dist/KeybindingHint/utils.d.ts +15 -0
- package/dist/KeybindingHint/utils.d.ts.map +1 -0
- package/dist/KeybindingHint/utils.js +17 -0
- 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.d.ts +1 -18
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +1 -20
- package/dist/Overlay/Overlay.module.css.js +1 -1
- package/dist/Overlay/constants.d.ts +19 -0
- package/dist/Overlay/constants.d.ts.map +1 -0
- package/dist/Overlay/constants.js +20 -0
- package/dist/Popover/Popover-a93df39c.css +1 -1
- package/dist/Popover/Popover-a93df39c.css.map +1 -1
- package/dist/Portal/Portal.d.ts +0 -14
- package/dist/Portal/Portal.d.ts.map +1 -1
- package/dist/Portal/Portal.js +4 -46
- package/dist/Portal/PortalContext.d.ts +5 -0
- package/dist/Portal/PortalContext.d.ts.map +1 -0
- package/dist/Portal/PortalContext.js +5 -0
- package/dist/Portal/index.d.ts +3 -1
- package/dist/Portal/index.d.ts.map +1 -1
- package/dist/Portal/index.js +0 -1
- package/dist/Portal/portalRoot.d.ts +11 -0
- package/dist/Portal/portalRoot.d.ts.map +1 -0
- package/dist/Portal/portalRoot.js +39 -0
- package/dist/Radio/Radio.js +1 -1
- package/dist/RadioGroup/RadioGroup.d.ts +1 -6
- package/dist/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup/RadioGroup.js +2 -3
- package/dist/RadioGroup/RadioGroupContext.d.ts +7 -0
- package/dist/RadioGroup/RadioGroupContext.d.ts.map +1 -0
- package/dist/RadioGroup/RadioGroupContext.js +5 -0
- package/dist/RadioGroup/index.d.ts +2 -1
- package/dist/RadioGroup/index.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +27 -3
- 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/ThemeContext.d.ts +15 -0
- package/dist/ThemeContext.d.ts.map +1 -0
- package/dist/ThemeContext.js +9 -0
- package/dist/ThemeProvider.d.ts +1 -14
- package/dist/ThemeProvider.d.ts.map +1 -1
- package/dist/ThemeProvider.js +3 -18
- package/dist/Timeline/Timeline-ff81db92.css +1 -1
- package/dist/Timeline/Timeline-ff81db92.css.map +1 -1
- package/dist/Timeline/Timeline.d.ts +1 -1
- package/dist/Timeline/Timeline.d.ts.map +1 -1
- package/dist/Timeline/constants.d.ts +2 -0
- package/dist/Timeline/constants.d.ts.map +1 -0
- 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/IssueLabelToken.d.ts.map +1 -1
- package/dist/Token/IssueLabelToken.js +3 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +3 -1
- package/dist/Token/TokenBase.d.ts +2 -5
- package/dist/Token/TokenBase.d.ts.map +1 -1
- package/dist/Token/TokenBase.js +3 -14
- package/dist/Token/_RemoveTokenButton.js +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/Token/constants.d.ts +4 -0
- package/dist/Token/constants.d.ts.map +1 -0
- package/dist/Token/constants.js +3 -0
- package/dist/Token/utils.d.ts +3 -0
- package/dist/Token/utils.d.ts.map +1 -0
- package/dist/Token/utils.js +14 -0
- package/dist/Tooltip/Tooltip.d.ts +0 -3
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +2 -3
- package/dist/Tooltip/TooltipContext.d.ts +5 -0
- package/dist/Tooltip/TooltipContext.d.ts.map +1 -0
- package/dist/Tooltip/TooltipContext.js +5 -0
- package/dist/TooltipV2/Tooltip.d.ts +0 -3
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +5 -3
- package/dist/TooltipV2/TooltipContext.d.ts +5 -0
- package/dist/TooltipV2/TooltipContext.d.ts.map +1 -0
- package/dist/TooltipV2/TooltipContext.js +5 -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 +202 -167
- package/dist/UnderlineNav/UnderlineNav.d.ts +0 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +2 -5
- package/dist/UnderlineNav/utils.d.ts +3 -0
- package/dist/UnderlineNav/utils.d.ts.map +1 -0
- package/dist/UnderlineNav/utils.js +8 -0
- 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.map +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +3 -1
- package/dist/experimental/SelectPanel2/index.d.ts +2 -1
- package/dist/experimental/SelectPanel2/index.d.ts.map +1 -1
- package/dist/experimental/Tabs/Tabs.d.ts +3 -111
- package/dist/experimental/Tabs/Tabs.d.ts.map +1 -1
- package/dist/experimental/Tabs/Tabs.js +3 -237
- package/dist/experimental/Tabs/TabsContext.d.ts +3 -0
- package/dist/experimental/Tabs/TabsContext.d.ts.map +1 -0
- package/dist/experimental/Tabs/TabsContext.js +5 -0
- package/dist/experimental/Tabs/index.d.ts +5 -2
- package/dist/experimental/Tabs/index.d.ts.map +1 -1
- package/dist/experimental/Tabs/types.d.ts +107 -0
- package/dist/experimental/Tabs/types.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTab.d.ts +7 -0
- package/dist/experimental/Tabs/useTab.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTab.js +97 -0
- package/dist/experimental/Tabs/useTabList.d.ts +3 -0
- package/dist/experimental/Tabs/useTabList.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTabList.js +100 -0
- package/dist/experimental/Tabs/useTabPanel.d.ts +4 -0
- package/dist/experimental/Tabs/useTabPanel.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTabPanel.js +37 -0
- package/dist/experimental/Tabs/useTabs.d.ts +3 -0
- package/dist/experimental/Tabs/useTabs.d.ts.map +1 -0
- package/dist/experimental/Tabs/useTabs.js +12 -0
- package/dist/experimental/index.js +7 -3
- package/dist/hooks/MatchMedia.d.ts +23 -0
- package/dist/hooks/MatchMedia.d.ts.map +1 -0
- package/dist/hooks/MatchMediaContext.d.ts +5 -0
- package/dist/hooks/MatchMediaContext.d.ts.map +1 -0
- package/dist/hooks/MatchMediaContext.js +8 -0
- 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/useMedia.d.ts +1 -24
- package/dist/hooks/useMedia.d.ts.map +1 -1
- package/dist/hooks/useMedia.js +15 -6
- package/dist/hooks/useMenuInitialFocus.d.ts.map +1 -1
- package/dist/hooks/useMenuInitialFocus.js +1 -0
- package/dist/hooks/useMnemonics.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/internal/components/TextInputWrapper-b2f7f9fa.css +1 -1
- package/dist/internal/components/TextInputWrapper-b2f7f9fa.css.map +1 -1
- package/dist/useTheme.d.ts +15 -0
- package/dist/useTheme.d.ts.map +1 -0
- package/dist/useTheme.js +16 -0
- package/dist/utils/StressTest.d.ts.map +1 -1
- package/dist/utils/descendant-registry.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 +70 -0
- package/dist/utils/story-helpers.d.ts.map +1 -0
- package/generated/components.json +18 -6
- package/package.json +5 -3
- package/dist/ActionList/ActionList-1940009e.css +0 -2
- package/dist/ActionList/ActionList-1940009e.css.map +0 -1
- package/dist/Blankslate/Blankslate-a039d79a.css +0 -2
- package/dist/Blankslate/Blankslate-a039d79a.css.map +0 -1
- package/dist/FilteredActionList/FilteredActionListLoaders-a46a8ea4.css +0 -2
- package/dist/FilteredActionList/FilteredActionListLoaders-a46a8ea4.css.map +0 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Platform } from './platform';
|
|
2
|
+
/**
|
|
3
|
+
* AVOID: `KeybindingHint` is nearly always sufficient for providing both visible and accessible keyboard hints.
|
|
4
|
+
* However, there may be cases where we need a plain string version, such as when building `aria-label` or
|
|
5
|
+
* `aria-description`. In that case, this plain string builder can be used instead.
|
|
6
|
+
*
|
|
7
|
+
* NOTE that this string should _only_ be used when building `aria-label` or `aria-description` props (never rendered
|
|
8
|
+
* visibly) and should nearly always also be paired with a visible hint for sighted users.
|
|
9
|
+
*
|
|
10
|
+
* The `platform` argument controls how platform-specific keys (such as `Meta`, `Alt`, and `Mod`) are named. For
|
|
11
|
+
* backwards compatibility, a `boolean` may be passed instead, where `true` is treated as `'apple'` and `false` is
|
|
12
|
+
* treated as `'other'`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const getAccessibleKeybindingHintString: (sequence: string, platform: Platform | boolean) => string;
|
|
15
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/KeybindingHint/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAA;AAExC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iCAAiC,GAAI,UAAU,MAAM,EAAE,UAAU,QAAQ,GAAG,OAAO,WACe,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { accessibleSequenceString } from './components/utils.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AVOID: `KeybindingHint` is nearly always sufficient for providing both visible and accessible keyboard hints.
|
|
5
|
+
* However, there may be cases where we need a plain string version, such as when building `aria-label` or
|
|
6
|
+
* `aria-description`. In that case, this plain string builder can be used instead.
|
|
7
|
+
*
|
|
8
|
+
* NOTE that this string should _only_ be used when building `aria-label` or `aria-description` props (never rendered
|
|
9
|
+
* visibly) and should nearly always also be paired with a visible hint for sighted users.
|
|
10
|
+
*
|
|
11
|
+
* The `platform` argument controls how platform-specific keys (such as `Meta`, `Alt`, and `Mod`) are named. For
|
|
12
|
+
* backwards compatibility, a `boolean` may be passed instead, where `true` is treated as `'apple'` and `false` is
|
|
13
|
+
* treated as `'other'`.
|
|
14
|
+
*/
|
|
15
|
+
const getAccessibleKeybindingHintString = (sequence, platform) => accessibleSequenceString(sequence, typeof platform === 'boolean' ? platform ? 'apple' : 'other' : platform);
|
|
16
|
+
|
|
17
|
+
export { getAccessibleKeybindingHintString };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelGroup.d.ts","sourceRoot":"","sources":["../../src/LabelGroup/LabelGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,MAAM,MAAM,eAAe,GAAG;IAC5B,2DAA2D;IAC3D,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACtB,4LAA4L;IAC5L,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IACpC,4MAA4M;IAC5M,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AA6FD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"LabelGroup.d.ts","sourceRoot":"","sources":["../../src/LabelGroup/LabelGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,MAAM,MAAM,eAAe,GAAG;IAC5B,2DAA2D;IAC3D,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IACtB,4LAA4L;IAC5L,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IACpC,4MAA4M;IAC5M,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACnC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AA6FD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAuPlE,CAAA;AAID,eAAe,UAAU,CAAA"}
|
|
@@ -223,6 +223,7 @@ const LabelGroup = ({
|
|
|
223
223
|
}, [setVisibilityMap, setIsOverflowShown]);
|
|
224
224
|
React.useEffect(() => {
|
|
225
225
|
// If we're not truncating, we don't need to run this useEffect.
|
|
226
|
+
// eslint-disable-next-line react-you-might-not-need-an-effect/no-event-handler
|
|
226
227
|
if (!visibleChildCount || isOverflowShown) {
|
|
227
228
|
return;
|
|
228
229
|
}
|
|
@@ -267,6 +268,7 @@ const LabelGroup = ({
|
|
|
267
268
|
// We need to keep track of this so we can focus the first hidden child when the overflow is shown inline.
|
|
268
269
|
React.useEffect(() => {
|
|
269
270
|
// If we're using an overlay, we don't need to keep track of the first hidden index.
|
|
271
|
+
// eslint-disable-next-line react-you-might-not-need-an-effect/no-event-handler
|
|
270
272
|
if (overflowStyle === 'overlay') {
|
|
271
273
|
return;
|
|
272
274
|
}
|
|
@@ -279,11 +281,14 @@ const LabelGroup = ({
|
|
|
279
281
|
// We need to keep track of this so we can focus the first hidden child when the overflow is shown inline.
|
|
280
282
|
React.useEffect(() => {
|
|
281
283
|
// If we're using an overlay, we don't need to focus the first child that was previously hidden.
|
|
284
|
+
// eslint-disable-next-line react-you-might-not-need-an-effect/no-event-handler
|
|
282
285
|
if (overflowStyle === 'overlay') {
|
|
283
286
|
return;
|
|
284
287
|
}
|
|
285
288
|
const firstHiddenChildDOM = document.querySelector(`[data-index="${firstHiddenIndexRef.current}"]`);
|
|
286
289
|
const focusableChild = firstHiddenChildDOM ? getFocusableChild(firstHiddenChildDOM) : null;
|
|
290
|
+
|
|
291
|
+
// eslint-disable-next-line react-you-might-not-need-an-effect/no-event-handler
|
|
287
292
|
if (isOverflowShown) {
|
|
288
293
|
// If the first hidden child is focusable, focus it.
|
|
289
294
|
// Otherwise, focus the collapse button.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
:where(.prc-Link-Link-9ZwDx){color:var(--fgColor-accent,#0969da);-webkit-text-decoration:none;text-decoration:none;text-underline-offset:.05rem}:where(.prc-Link-Link-9ZwDx)
|
|
1
|
+
:where(.prc-Link-Link-9ZwDx){color:var(--fgColor-accent,#0969da);-webkit-text-decoration:none;text-decoration:none;text-underline-offset:.05rem}button:where(.prc-Link-Link-9ZwDx){appearance:none;background-color:transparent;border:0;cursor:pointer;display:inline-block;font-size:inherit;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}:where(.prc-Link-Link-9ZwDx):hover{-webkit-text-decoration:underline;text-decoration:underline}[data-a11y-link-underlines=true] :where(.prc-Link-Link-9ZwDx):where([data-inline=true]){-webkit-text-decoration:underline;text-decoration:underline}[data-a11y-link-underlines=true] :where(.prc-Link-Link-9ZwDx):where([data-inline=true]):hover{-webkit-text-decoration:none;text-decoration:none}:where(.prc-Link-Link-9ZwDx):where([data-muted=true]){color:var(--fgColor-muted,#59636e)}:where(.prc-Link-Link-9ZwDx):where([data-muted=true]):hover{color:var(--fgColor-accent,#0969da);-webkit-text-decoration:none;text-decoration:none}
|
|
2
2
|
/*# sourceMappingURL=Link-ba423096.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Link/Link.module.css.js"],"names":[],"mappings":"AAAA,6BACE,mCAA4B,CAC5B,4BAAqB,CAArB,oBAAqB,CACrB,4BAsCF,CAnCE,
|
|
1
|
+
{"version":3,"sources":["../src/Link/Link.module.css.js"],"names":[],"mappings":"AAAA,6BACE,mCAA4B,CAC5B,4BAAqB,CAArB,oBAAqB,CACrB,4BAsCF,CAnCE,mCASE,eAAgB,CAFhB,4BAA6B,CAC7B,QAAS,CAHT,cAAe,CAJf,oBAAqB,CAErB,iBAAkB,CADlB,SAAU,CAIV,wBAAiB,CAAjB,gBAAiB,CAFjB,kBAMF,CAEA,mCACE,iCAA0B,CAA1B,yBACF,CAKA,wFACE,iCAA0B,CAA1B,yBAKF,CAHE,8FACE,4BAAqB,CAArB,oBACF,CAGF,sDACE,kCAMF,CAJE,4DACE,mCAA4B,CAC5B,4BAAqB,CAArB,oBACF","file":"Link-ba423096.css","sourcesContent":[":where(.Link) {\n color: var(--fgColor-accent);\n text-decoration: none;\n text-underline-offset: 0.05rem;\n\n /* Reset for button tags */\n &:is(button) {\n display: inline-block;\n padding: 0;\n font-size: inherit;\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n background-color: transparent;\n border: 0;\n appearance: none;\n }\n\n &:hover {\n text-decoration: underline;\n }\n\n /*\n Inline links (inside a text block) should have underline based on accessibility setting set in data-attribute\n */\n [data-a11y-link-underlines='true'] &:where([data-inline='true']) {\n text-decoration: underline;\n\n &:hover {\n text-decoration: none;\n }\n }\n\n &:where([data-muted='true']) {\n color: var(--fgColor-muted);\n\n &:hover {\n color: var(--fgColor-accent);\n text-decoration: none;\n }\n }\n}\n"]}
|
package/dist/Link/Link.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ type StyledLinkProps<As extends React.ElementType = 'a'> = {
|
|
|
9
9
|
inline?: boolean;
|
|
10
10
|
};
|
|
11
11
|
export declare const UnwrappedLink: <As extends React.ElementType = "a">(props: PolymorphicProps<As, "a", StyledLinkProps>, ref: ForwardedRef<unknown>) => React.JSX.Element;
|
|
12
|
-
declare const Link: (<As extends React.ElementType = "a">(props: (
|
|
12
|
+
declare const Link: (<As extends React.ElementType = "a">(props: import("../utils/modern-polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & StyledLinkProps<"a">, "as"> & {
|
|
13
13
|
as?: As | undefined;
|
|
14
14
|
} & React.RefAttributes<unknown>) => React.ReactNode) & {
|
|
15
15
|
displayName: string;
|
|
@@ -41,19 +41,13 @@ export declare const GroupExpand: React.ForwardRefExoticComponent<NavListGroupEx
|
|
|
41
41
|
export type NavListGroupHeadingProps = ActionListGroupHeadingProps;
|
|
42
42
|
export declare const NavList: React.ForwardRefExoticComponent<Omit<NavListProps, "ref"> & React.RefAttributes<HTMLElement>> & {
|
|
43
43
|
Description: import("..").FCWithSlotMarker<React.PropsWithChildren<import("..").ActionListDescriptionProps>>;
|
|
44
|
-
Item: (<As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
|
|
44
|
+
Item: (<As extends React.ElementType = "a">(props: import("../utils/modern-polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
|
|
45
45
|
children: React.ReactNode;
|
|
46
46
|
defaultOpen?: boolean;
|
|
47
47
|
href?: string;
|
|
48
48
|
'aria-current'?: "page" | "step" | "location" | "date" | "time" | "true" | "false" | boolean;
|
|
49
49
|
inactiveText?: string;
|
|
50
|
-
}
|
|
51
|
-
children: React.ReactNode;
|
|
52
|
-
defaultOpen?: boolean;
|
|
53
|
-
href?: string;
|
|
54
|
-
'aria-current'?: "page" | "step" | "location" | "date" | "time" | "true" | "false" | boolean;
|
|
55
|
-
inactiveText?: string;
|
|
56
|
-
} ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
50
|
+
}, "as"> & {
|
|
57
51
|
as?: As | undefined;
|
|
58
52
|
} & React.RefAttributes<unknown>) => React.ReactNode) & {
|
|
59
53
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../src/NavList/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,IAAI,EAAC,MAAM,wBAAwB,CAAA;AAC3E,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAC/F,OAAO,KAAuB,MAAM,OAAO,CAAA;AAE3C,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,4BAA4B,EA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CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,KAAK,CAAC,SAAS,CAAA;CAClD,CAAA;AAED,eAAO,MAAM,WAAW,mGAgFvB,CAAA;AAKD,MAAM,MAAM,wBAAwB,GAAG,2BAA2B,CAAA;AAqBlE,eAAO,MAAM,OAAO;;YA7WjB,EAAE,SAAS,KAAK,CAAC,WAAW;kBATjB,KAAK,CAAC,SAAS;sBACX,OAAO;eACd,MAAM;yBACI,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO;uBAC7E,MAAM;;;;;;;;;;;;;;CA6XvB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@keyframes prc-Overlay-overlay-appear-JpFey{0%{opacity:0}to{opacity:1}}.prc-Overlay-Overlay-jfs-T{background-color:var(--overlay-bgColor,#fff);border-radius:var(--borderRadius-large,.75rem);box-shadow:var(--shadow-floating-small,0 0 0 1px #d1d9e080,0 6px 12px -3px #25292e0a,0 6px 18px 0 #25292e1f);height:auto;max-height:100vh;max-width:calc(100vw - 2rem);min-width:192px;overflow:auto;position:absolute;width:auto}.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal]),.prc-Overlay-Overlay-jfs-T[data-anchor-position=false]{bottom:var(--bottom,auto);right:var(--right,auto)}@media screen and (max-width:calc(48rem - 0.02px)){
|
|
1
|
+
@keyframes prc-Overlay-overlay-appear-JpFey{0%{opacity:0}to{opacity:1}}.prc-Overlay-Overlay-jfs-T{background-color:var(--overlay-bgColor,#fff);border-radius:var(--borderRadius-large,.75rem);box-shadow:var(--shadow-floating-small,0 0 0 1px #d1d9e080,0 6px 12px -3px #25292e0a,0 6px 18px 0 #25292e1f);height:auto;max-height:100vh;max-width:calc(100vw - 2rem);min-width:192px;overflow:auto;position:absolute;width:auto}.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal]),.prc-Overlay-Overlay-jfs-T[data-anchor-position=false]{bottom:var(--bottom,auto);right:var(--right,auto)}@media screen and (max-width:calc(48rem - 0.02px)){.prc-Overlay-Overlay-jfs-T[data-responsive=fullscreen]:not([data-anchor-position]):not([data-variant=modal]):not([data-variant]),.prc-Overlay-Overlay-jfs-T[data-responsive=fullscreen][data-anchor-position=false]:not(.prc-Overlay-does-not-exist-pxAm4):not([data-variant]){left:0;top:0}}.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal]):not([data-variant]),.prc-Overlay-Overlay-jfs-T[data-anchor-position=false]:not(.prc-Overlay-does-not-exist-pxAm4):not([data-variant]){left:var(--left,auto);top:var(--top,auto)}.prc-Overlay-Overlay-jfs-T:focus{outline:none}@media (forced-colors:active){.prc-Overlay-Overlay-jfs-T{outline:1px solid transparent}}.prc-Overlay-Overlay-jfs-T:where([data-reflow-container=true]){max-width:calc(100vw - 2rem)}.prc-Overlay-Overlay-jfs-T:where([data-overflow-auto]){overflow:auto}.prc-Overlay-Overlay-jfs-T:where([data-overflow-hidden]){overflow:hidden}.prc-Overlay-Overlay-jfs-T:where([data-overflow-scroll]){overflow:scroll}.prc-Overlay-Overlay-jfs-T:where([data-overflow-visible]){overflow:visible}.prc-Overlay-Overlay-jfs-T:where([data-height-xsmall]){height:192px}.prc-Overlay-Overlay-jfs-T:where([data-height-small]){height:256px}.prc-Overlay-Overlay-jfs-T:where([data-height-medium]){height:320px}.prc-Overlay-Overlay-jfs-T:where([data-height-large]){height:432px}.prc-Overlay-Overlay-jfs-T:where([data-height-xlarge]){height:600px}.prc-Overlay-Overlay-jfs-T:where([data-height-auto]),.prc-Overlay-Overlay-jfs-T:where([data-height-initial]){height:auto}.prc-Overlay-Overlay-jfs-T:where([data-height-fit-content]){height:-moz-fit-content;height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xsmall]){max-height:min(192px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-xsmall]){max-height:min(192px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:min(256px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:min(256px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:min(320px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:min(320px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:min(432px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:min(432px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:min(600px,100vh)}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:min(600px,100dvh)}}.prc-Overlay-Overlay-jfs-T:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}.prc-Overlay-Overlay-jfs-T:where([data-width-small]){width:256px}.prc-Overlay-Overlay-jfs-T:where([data-width-medium]){width:320px}.prc-Overlay-Overlay-jfs-T:where([data-width-large]){width:480px}.prc-Overlay-Overlay-jfs-T:where([data-width-xlarge]){width:640px}.prc-Overlay-Overlay-jfs-T:where([data-width-xxlarge]){width:960px}.prc-Overlay-Overlay-jfs-T:where([data-width-auto]){width:auto}.prc-Overlay-Overlay-jfs-T:where([data-max-width-small]){max-width:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-medium]){max-width:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-large]){max-width:480px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xlarge]){max-width:640px}.prc-Overlay-Overlay-jfs-T:where([data-max-width-xxlarge]){max-width:960px}.prc-Overlay-Overlay-jfs-T:where([data-visibility-visible]){visibility:visible}.prc-Overlay-Overlay-jfs-T:where([data-visibility-hidden]){visibility:hidden}@media screen and (max-width:calc(48rem - 0.02px)){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]),.prc-Overlay-Overlay-jfs-T[data-component=AnchoredOverlay][data-responsive=fullscreen][data-anchor-position=true],.prc-Overlay-Overlay-jfs-T[data-responsive=fullscreen][data-anchor-position=true]{border-radius:unset;height:100vh;left:0;margin:0;max-height:none;max-width:none;padding-bottom:env(safe-area-inset-bottom);position:fixed;top:0;width:100vw}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-responsive=fullscreen]),.prc-Overlay-Overlay-jfs-T[data-component=AnchoredOverlay][data-responsive=fullscreen][data-anchor-position=true],.prc-Overlay-Overlay-jfs-T[data-responsive=fullscreen][data-anchor-position=true]{height:100dvh}}}@supports (height:100dvh){.prc-Overlay-Overlay-jfs-T:where([data-variant=fullscreen]){height:100dvh}}@media (prefers-reduced-motion:no-preference){.prc-Overlay-Overlay-jfs-T{animation:prc-Overlay-overlay-appear-JpFey .2s cubic-bezier(.33,1,.68,1)}}
|
|
2
2
|
/*# sourceMappingURL=Overlay-214d10dd.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Overlay/Overlay.module.css.js"],"names":[],"mappings":"AAAA,4CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,2BAQE,4CAAwC,CACxC,8CAAwC,CACxC,4GAAwC,CALxC,WAAY,CACZ,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAElB,UA0NF,CAjNE,wIAKE,yBAA2B,CAF3B,uBAkBF,CAZI,mDADF,
|
|
1
|
+
{"version":3,"sources":["../src/Overlay/Overlay.module.css.js"],"names":[],"mappings":"AAAA,4CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,2BAQE,4CAAwC,CACxC,8CAAwC,CACxC,4GAAwC,CALxC,WAAY,CACZ,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAElB,UA0NF,CAjNE,wIAKE,yBAA2B,CAF3B,uBAkBF,CAZI,mDADF,+QAGI,MAAO,CADP,KAGJ,CADE,CAGF,uNAIE,qBAAuB,CAFvB,mBAGF,CAGF,iCACE,YACF,CAEA,8BAvCF,2BAyCI,6BAoLJ,CAnLE,CAEA,+DACE,4BACF,CAEA,uDACE,aACF,CAEA,yDACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,gBACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,sDACE,YACF,CAEA,uDACE,YACF,CAEA,6GAEE,WACF,CAEA,4DACE,uBAAmB,CAAnB,kBACF,CAEA,2DACE,2BAKF,CAHE,0BAHF,2DAII,4BAEJ,CADE,CAGF,0DACE,2BAKF,CAHE,0BAHF,0DAII,4BAEJ,CADE,CAGF,2DACE,2BAKF,CAHE,0BAHF,2DAII,4BAEJ,CADE,CAGF,0DACE,2BAKF,CAHE,0BAHF,0DAII,4BAEJ,CADE,CAGF,2DACE,2BAKF,CAHE,0BAHF,2DAII,4BAEJ,CADE,CAGF,gEACE,2BAAuB,CAAvB,sBACF,CAEA,qDACE,WACF,CAEA,sDACE,WACF,CAEA,qDAEE,WACF,CAEA,sDAEE,WACF,CAEA,uDAEE,WACF,CAEA,oDACE,UACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,yDACE,eACF,CAEA,0DACE,eACF,CAEA,2DACE,eACF,CAEA,4DACE,kBACF,CAEA,2DACE,iBACF,CAKE,mDAHF,mQAYI,mBAAoB,CAHpB,YAAa,CAHb,MAAO,CAKP,QAAS,CADT,eAAgB,CAFhB,cAAe,CAMf,0CAA2C,CAV3C,cAAe,CACf,KAAM,CAEN,WAcJ,CALI,0BAhBJ,mQAkBM,aAGN,CAFI,CACF,CAGF,0BAEE,4DACE,aACF,CACF,CAGF,8CACE,2BACE,wEACF,CACF","file":"Overlay-214d10dd.css","sourcesContent":["@keyframes overlay-appear {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n.Overlay {\n position: absolute;\n max-width: calc(100vw - 2rem);\n width: auto;\n min-width: 192px;\n height: auto;\n max-height: 100vh;\n overflow: auto;\n background-color: var(--overlay-bgColor);\n border-radius: var(--borderRadius-large);\n box-shadow: var(--shadow-floating-small);\n\n &[data-anchor-position='false'],\n &:not([data-anchor-position]):not([data-variant='modal']) {\n /* stylelint-disable-next-line primer/spacing */\n right: var(--right, auto);\n /* stylelint-disable-next-line primer/spacing */\n bottom: var(--bottom, auto);\n\n /* stylelint-disable-next-line selector-max-specificity */\n &[data-responsive='fullscreen']:not([data-variant]) {\n @media screen and (--viewportRange-narrow) {\n top: 0;\n left: 0;\n }\n }\n\n &:not([data-variant]) {\n /* stylelint-disable-next-line primer/spacing */\n top: var(--top, auto);\n /* stylelint-disable-next-line primer/spacing */\n left: var(--left, auto);\n }\n }\n\n &:focus {\n outline: none;\n }\n\n @media (forced-colors: active) {\n /* Support for Windows high contrast https://sarahmhigley.com/writing/whcm-quick-tips */\n outline: solid 1px transparent;\n }\n\n &:where([data-reflow-container='true']) {\n max-width: calc(100vw - 2rem);\n }\n\n &:where([data-overflow-auto]) {\n overflow: auto;\n }\n\n &:where([data-overflow-hidden]) {\n overflow: hidden;\n }\n\n &:where([data-overflow-scroll]) {\n overflow: scroll;\n }\n\n &:where([data-overflow-visible]) {\n overflow: visible;\n }\n\n &:where([data-height-xsmall]) {\n height: 192px;\n }\n\n &:where([data-height-small]) {\n height: 256px;\n }\n\n &:where([data-height-medium]) {\n height: 320px;\n }\n\n &:where([data-height-large]) {\n height: 432px;\n }\n\n &:where([data-height-xlarge]) {\n height: 600px;\n }\n\n &:where([data-height-auto]),\n &:where([data-height-initial]) {\n height: auto;\n }\n\n &:where([data-height-fit-content]) {\n height: fit-content;\n }\n\n &:where([data-max-height-xsmall]) {\n max-height: min(192px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(192px, 100dvh);\n }\n }\n\n &:where([data-max-height-small]) {\n max-height: min(256px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(256px, 100dvh);\n }\n }\n\n &:where([data-max-height-medium]) {\n max-height: min(320px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(320px, 100dvh);\n }\n }\n\n &:where([data-max-height-large]) {\n max-height: min(432px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(432px, 100dvh);\n }\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: min(600px, 100vh);\n\n @supports (height: 100dvh) {\n max-height: min(600px, 100dvh);\n }\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n\n &:where([data-width-small]) {\n width: 256px;\n }\n\n &:where([data-width-medium]) {\n width: 320px;\n }\n\n &:where([data-width-large]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 480px;\n }\n\n &:where([data-width-xlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 640px;\n }\n\n &:where([data-width-xxlarge]) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 960px;\n }\n\n &:where([data-width-auto]) {\n width: auto;\n }\n\n &:where([data-max-width-small]) {\n max-width: 256px;\n }\n\n &:where([data-max-width-medium]) {\n max-width: 320px;\n }\n\n &:where([data-max-width-large]) {\n max-width: 480px;\n }\n\n &:where([data-max-width-xlarge]) {\n max-width: 640px;\n }\n\n &:where([data-max-width-xxlarge]) {\n max-width: 960px;\n }\n\n &:where([data-visibility-visible]) {\n visibility: visible;\n }\n\n &:where([data-visibility-hidden]) {\n visibility: hidden;\n }\n\n &:where([data-responsive='fullscreen']),\n &[data-responsive='fullscreen'][data-anchor-position='true'],\n &[data-component='AnchoredOverlay'][data-responsive='fullscreen'][data-anchor-position='true'] {\n @media screen and (--viewportRange-narrow) {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n max-width: none;\n height: 100vh;\n max-height: none;\n margin: 0;\n border-radius: unset;\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: env(safe-area-inset-bottom);\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n height: 100dvh;\n }\n }\n }\n\n @supports (height: 100dvh) {\n /* fix for mobile safari (100vh clips the screen with the toolbar) */\n &:where([data-variant='fullscreen']) {\n height: 100dvh;\n }\n }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .Overlay {\n animation: overlay-appear 200ms cubic-bezier(0.33, 1, 0.68, 1);\n }\n}\n"]}
|
|
@@ -4,6 +4,7 @@ import type { AriaRole, Merge } from '../utils/types';
|
|
|
4
4
|
import type { TouchOrMouseEvent } from '../hooks';
|
|
5
5
|
import type { AnchorSide } from '@primer/behaviors';
|
|
6
6
|
import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../utils/polymorphic';
|
|
7
|
+
import type { heightMap, widthMap } from './constants';
|
|
7
8
|
type StyledOverlayProps = {
|
|
8
9
|
width?: keyof typeof widthMap;
|
|
9
10
|
height?: keyof typeof heightMap;
|
|
@@ -13,24 +14,6 @@ type StyledOverlayProps = {
|
|
|
13
14
|
overflow?: 'auto' | 'hidden' | 'scroll' | 'visible';
|
|
14
15
|
style?: React.CSSProperties;
|
|
15
16
|
};
|
|
16
|
-
export declare const heightMap: {
|
|
17
|
-
xsmall: string;
|
|
18
|
-
small: string;
|
|
19
|
-
medium: string;
|
|
20
|
-
large: string;
|
|
21
|
-
xlarge: string;
|
|
22
|
-
auto: string;
|
|
23
|
-
initial: string;
|
|
24
|
-
'fit-content': string;
|
|
25
|
-
};
|
|
26
|
-
export declare const widthMap: {
|
|
27
|
-
small: string;
|
|
28
|
-
medium: string;
|
|
29
|
-
large: string;
|
|
30
|
-
xlarge: string;
|
|
31
|
-
xxlarge: string;
|
|
32
|
-
auto: string;
|
|
33
|
-
};
|
|
34
17
|
type BaseOverlayProps = {
|
|
35
18
|
visibility?: 'visible' | 'hidden';
|
|
36
19
|
'data-test-id'?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../src/Overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,qBAAqB,EAAe,MAAM,OAAO,CAAA;AAC9D,OAAO,KAA0B,MAAM,OAAO,CAAA;AAE9C,OAAO,KAAK,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,gBAAgB,CAAA;AACnD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,UAAU,CAAA;AAG/C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../src/Overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,qBAAqB,EAAe,MAAM,OAAO,CAAA;AAC9D,OAAO,KAA0B,MAAM,OAAO,CAAA;AAE9C,OAAO,KAAK,EAAC,QAAQ,EAAE,KAAK,EAAC,MAAM,gBAAgB,CAAA;AACnD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,UAAU,CAAA;AAG/C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAI/F,OAAO,KAAK,EAAC,SAAS,EAAE,QAAQ,EAAC,MAAM,aAAa,CAAA;AAEpD,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,OAAO,SAAS,CAAA;IAC/B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC,OAAO,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;IAC5D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC,OAAO,QAAQ,EAAE,MAAM,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,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IACrD,cAAc,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAA;IAC9C,QAAQ,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAA;IACpC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CACpD,CAAA;AAED,KAAK,oBAAoB,GAAG,KAAK,CAAC,eAAe,EAAE,cAAc,CAAC,CAAA;AAElE;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,OAAO,EA6FR,8BAA8B,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,qBAAqB,CAAC,OAAO,OAAO,CAAC,CAAA;AAEhE,eAAe,OAAO,CAAA"}
|
package/dist/Overlay/Overlay.js
CHANGED
|
@@ -9,25 +9,6 @@ import { useMergedRefs } from '../hooks/useMergedRefs.js';
|
|
|
9
9
|
import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
|
|
10
10
|
import { useOverlay } from '../hooks/useOverlay.js';
|
|
11
11
|
|
|
12
|
-
const heightMap = {
|
|
13
|
-
xsmall: '192px',
|
|
14
|
-
small: '256px',
|
|
15
|
-
medium: '320px',
|
|
16
|
-
large: '432px',
|
|
17
|
-
xlarge: '600px',
|
|
18
|
-
auto: 'auto',
|
|
19
|
-
initial: 'auto',
|
|
20
|
-
// Passing 'initial' initially applies 'auto'
|
|
21
|
-
'fit-content': 'fit-content'
|
|
22
|
-
};
|
|
23
|
-
const widthMap = {
|
|
24
|
-
small: '256px',
|
|
25
|
-
medium: '320px',
|
|
26
|
-
large: '480px',
|
|
27
|
-
xlarge: '640px',
|
|
28
|
-
xxlarge: '960px',
|
|
29
|
-
auto: 'auto'
|
|
30
|
-
};
|
|
31
12
|
const animationDuration = 200;
|
|
32
13
|
function getSlideAnimationStartingVector(anchorSide) {
|
|
33
14
|
if (anchorSide !== null && anchorSide !== void 0 && anchorSide.endsWith('bottom')) {
|
|
@@ -329,4 +310,4 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
|
329
310
|
return t13;
|
|
330
311
|
});
|
|
331
312
|
|
|
332
|
-
export { BaseOverlay, Overlay as default
|
|
313
|
+
export { BaseOverlay, Overlay as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './Overlay-214d10dd.css';
|
|
2
2
|
|
|
3
|
-
var classes = {"Overlay":"prc-Overlay-Overlay-jfs-T","overlay-appear":"prc-Overlay-overlay-appear-JpFey"};
|
|
3
|
+
var classes = {"Overlay":"prc-Overlay-Overlay-jfs-T","does-not-exist":"prc-Overlay-does-not-exist-pxAm4","overlay-appear":"prc-Overlay-overlay-appear-JpFey"};
|
|
4
4
|
|
|
5
5
|
export { classes as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const heightMap: {
|
|
2
|
+
xsmall: string;
|
|
3
|
+
small: string;
|
|
4
|
+
medium: string;
|
|
5
|
+
large: string;
|
|
6
|
+
xlarge: string;
|
|
7
|
+
auto: string;
|
|
8
|
+
initial: string;
|
|
9
|
+
'fit-content': string;
|
|
10
|
+
};
|
|
11
|
+
export declare const widthMap: {
|
|
12
|
+
small: string;
|
|
13
|
+
medium: string;
|
|
14
|
+
large: string;
|
|
15
|
+
xlarge: string;
|
|
16
|
+
xxlarge: string;
|
|
17
|
+
auto: string;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/Overlay/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;CASrB,CAAA;AAED,eAAO,MAAM,QAAQ;;;;;;;CAOpB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const heightMap = {
|
|
2
|
+
xsmall: '192px',
|
|
3
|
+
small: '256px',
|
|
4
|
+
medium: '320px',
|
|
5
|
+
large: '432px',
|
|
6
|
+
xlarge: '600px',
|
|
7
|
+
auto: 'auto',
|
|
8
|
+
initial: 'auto',
|
|
9
|
+
'fit-content': 'fit-content'
|
|
10
|
+
};
|
|
11
|
+
const widthMap = {
|
|
12
|
+
small: '256px',
|
|
13
|
+
medium: '320px',
|
|
14
|
+
large: '480px',
|
|
15
|
+
xlarge: '640px',
|
|
16
|
+
xxlarge: '960px',
|
|
17
|
+
auto: 'auto'
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { heightMap, widthMap };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.prc-Popover-Popover-7QIH8{display:none;position:absolute;z-index:100}.prc-Popover-Popover-7QIH8:where([data-open]){display:block}.prc-Popover-Popover-7QIH8:where([data-relative]){position:relative}.prc-Popover-PopoverContent-2x-Aj{background-color:var(--overlay-bgColor,#fff);border-radius:var(--borderRadius-medium,.375rem);box-shadow:var(--shadow-floating-small,0 0 0 1px #d1d9e080,0 6px 12px -3px #25292e0a,0 6px 18px 0 #25292e1f);margin-left:auto;margin-right:auto;padding:var(--base-size-24,1.5rem);position:relative}.prc-Popover-PopoverContent-2x-Aj:after,.prc-Popover-PopoverContent-2x-Aj:before{content:"";display:inline-block;left:50%;position:absolute}.prc-Popover-PopoverContent-2x-Aj:before{border-bottom-color:transparent;border:var(--base-size-8,.5rem) solid transparent;border-bottom-color:var(--borderColor-default,#d1d9e0);margin-left:-9px;top:calc(var(--base-size-16,1rem)*-1)}.prc-Popover-PopoverContent-2x-Aj:after{border:7px solid transparent;border-bottom:7px solid var(--overlay-bgColor,#fff);margin-left:calc(var(--base-size-8,.5rem)*-1);top:-14px}:is(:where([data-caret=bottom]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj):after,:is(:where([data-caret=bottom]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj):before{border-bottom-color:transparent;top:auto}:is(:where([data-caret=bottom]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj):before{border-top-color:var(--borderColor-default,#d1d9e0);bottom:calc(var(--base-size-16,1rem)*-1)}:is(:where([data-caret=bottom]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj):after{border-top-color:var(--overlay-bgColor,#fff);bottom:-14px}:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=top-right]) .prc-Popover-PopoverContent-2x-Aj{margin-right:0;right:-9px}:is(:where([data-caret=top-right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj):after,:is(:where([data-caret=top-right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj):before{left:auto;margin-left:0}:is(:where([data-caret=top-right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj):before{right:20px}:is(:where([data-caret=top-right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj):after{right:21px}:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=top-left]) .prc-Popover-PopoverContent-2x-Aj{left:-9px;margin-left:0}:is(:where([data-caret=top-left]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj):after,:is(:where([data-caret=top-left]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj):before{left:var(--base-size-24,1.5rem);margin-left:0}:is(:where([data-caret=top-left]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj):after{left:calc(var(--base-size-24,1.5rem) + 1px)}:is(:where([data-caret=right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj):after,:is(:where([data-caret=right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj):before{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:is(:where([data-caret=right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj):before{margin-top:calc((var(--base-size-8,.5rem) + 1px)*-1)}:is(:where([data-caret=right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj):after{margin-top:calc(var(--base-size-8,.5rem)*-1)}:is(:where([data-caret=right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj):before{border-left-color:var(--borderColor-default,#d1d9e0);right:calc(var(--base-size-16,1rem)*-1)}:is(:where([data-caret=right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj):after{border-left-color:var(--overlay-bgColor,#fff);right:-14px}:is(:where([data-caret=left]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj):before{border-right-color:var(--borderColor-default,#d1d9e0);left:calc(var(--base-size-16,1rem)*-1)}:is(:where([data-caret=left]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj):after{border-right-color:var(--overlay-bgColor,#fff);left:-14px}:is(:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj):after,:is(:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj):before{top:var(--base-size-24,1.5rem)}:is(:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj):after,:is(:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj):before{top:auto}:is(:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj):before{bottom:var(--base-size-16,1rem)}:is(:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj):after{bottom:calc(var(--base-size-16,1rem) + 1px)}.prc-Popover-PopoverContent-2x-Aj:where([data-width=xsmall]){width:var(--overlay-width-xsmall,12rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-width=small]){width:var(--overlay-width-small,20rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-width=medium]){width:var(--overlay-width-medium,30rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-width=large]){width:var(--overlay-width-large,40rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-width=xlarge]){width:var(--overlay-width-xlarge,60rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-width=auto]){width:auto}.prc-Popover-PopoverContent-2x-Aj:where([data-height=small]){height:var(--overlay-height-small,16rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-height=medium]){height:var(--overlay-height-medium,20rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-height=large]){height:var(--overlay-height-large,27rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-height=xlarge]){height:var(--overlay-height-xlarge,37.5rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-height=fit-content]){height:-moz-fit-content;height:fit-content}.prc-Popover-PopoverContent-2x-Aj:where([data-height=auto]){height:auto}
|
|
1
|
+
.prc-Popover-Popover-7QIH8{display:none;position:absolute;z-index:100}.prc-Popover-Popover-7QIH8:where([data-open]){display:block}.prc-Popover-Popover-7QIH8:where([data-relative]){position:relative}.prc-Popover-PopoverContent-2x-Aj{background-color:var(--overlay-bgColor,#fff);border-radius:var(--borderRadius-medium,.375rem);box-shadow:var(--shadow-floating-small,0 0 0 1px #d1d9e080,0 6px 12px -3px #25292e0a,0 6px 18px 0 #25292e1f);margin-left:auto;margin-right:auto;padding:var(--base-size-24,1.5rem);position:relative}.prc-Popover-PopoverContent-2x-Aj:after,.prc-Popover-PopoverContent-2x-Aj:before{content:"";display:inline-block;left:50%;position:absolute}.prc-Popover-PopoverContent-2x-Aj:before{border-bottom-color:transparent;border:var(--base-size-8,.5rem) solid transparent;border-bottom-color:var(--borderColor-default,#d1d9e0);margin-left:-9px;top:calc(var(--base-size-16,1rem)*-1)}.prc-Popover-PopoverContent-2x-Aj:after{border:7px solid transparent;border-bottom:7px solid var(--overlay-bgColor,#fff);margin-left:calc(var(--base-size-8,.5rem)*-1);top:-14px}:where([data-caret=bottom]) .prc-Popover-PopoverContent-2x-Aj:before{border-bottom-color:transparent;top:auto}:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj:before{border-bottom-color:transparent;top:auto}:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj:before{border-bottom-color:transparent;top:auto}:where([data-caret=bottom]) .prc-Popover-PopoverContent-2x-Aj:after{border-bottom-color:transparent;top:auto}:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj:after{border-bottom-color:transparent;top:auto}:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj:after{border-bottom-color:transparent;top:auto}:where([data-caret=bottom]) .prc-Popover-PopoverContent-2x-Aj:before{border-top-color:var(--borderColor-default,#d1d9e0);bottom:calc(var(--base-size-16,1rem)*-1)}:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj:before{border-top-color:var(--borderColor-default,#d1d9e0);bottom:calc(var(--base-size-16,1rem)*-1)}:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj:before{border-top-color:var(--borderColor-default,#d1d9e0);bottom:calc(var(--base-size-16,1rem)*-1)}:where([data-caret=bottom]) .prc-Popover-PopoverContent-2x-Aj:after{border-top-color:var(--overlay-bgColor,#fff);bottom:-14px}:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj:after{border-top-color:var(--overlay-bgColor,#fff);bottom:-14px}:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj:after{border-top-color:var(--overlay-bgColor,#fff);bottom:-14px}:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=top-right]) .prc-Popover-PopoverContent-2x-Aj{margin-right:0;right:-9px}:where([data-caret=top-right]) .prc-Popover-PopoverContent-2x-Aj:before{left:auto;margin-left:0}:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj:before{left:auto;margin-left:0}:where([data-caret=top-right]) .prc-Popover-PopoverContent-2x-Aj:after{left:auto;margin-left:0}:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj:after{left:auto;margin-left:0}:where([data-caret=top-right]) .prc-Popover-PopoverContent-2x-Aj:before{right:20px}:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj:before{right:20px}:where([data-caret=top-right]) .prc-Popover-PopoverContent-2x-Aj:after{right:21px}:where([data-caret=bottom-right]) .prc-Popover-PopoverContent-2x-Aj:after{right:21px}:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj,:where([data-caret=top-left]) .prc-Popover-PopoverContent-2x-Aj{left:-9px;margin-left:0}:where([data-caret=top-left]) .prc-Popover-PopoverContent-2x-Aj:before{left:var(--base-size-24,1.5rem);margin-left:0}:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj:before{left:var(--base-size-24,1.5rem);margin-left:0}:where([data-caret=top-left]) .prc-Popover-PopoverContent-2x-Aj:after{left:var(--base-size-24,1.5rem);margin-left:0}:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj:after{left:var(--base-size-24,1.5rem);margin-left:0}:where([data-caret=top-left]) .prc-Popover-PopoverContent-2x-Aj:after{left:calc(var(--base-size-24,1.5rem) + 1px)}:where([data-caret=bottom-left]) .prc-Popover-PopoverContent-2x-Aj:after{left:calc(var(--base-size-24,1.5rem) + 1px)}:where([data-caret=right]) .prc-Popover-PopoverContent-2x-Aj:before{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj:before{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj:before{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:where([data-caret=left]) .prc-Popover-PopoverContent-2x-Aj:before{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj:before{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj:before{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:where([data-caret=right]) .prc-Popover-PopoverContent-2x-Aj:after{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj:after{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj:after{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:where([data-caret=left]) .prc-Popover-PopoverContent-2x-Aj:after{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj:after{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj:after{border-bottom-color:transparent;left:auto;margin-left:0;top:50%}:where([data-caret=right]) .prc-Popover-PopoverContent-2x-Aj:before{margin-top:calc((var(--base-size-8,.5rem) + 1px)*-1)}:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj:before{margin-top:calc((var(--base-size-8,.5rem) + 1px)*-1)}:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj:before{margin-top:calc((var(--base-size-8,.5rem) + 1px)*-1)}:where([data-caret=left]) .prc-Popover-PopoverContent-2x-Aj:before{margin-top:calc((var(--base-size-8,.5rem) + 1px)*-1)}:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj:before{margin-top:calc((var(--base-size-8,.5rem) + 1px)*-1)}:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj:before{margin-top:calc((var(--base-size-8,.5rem) + 1px)*-1)}:where([data-caret=right]) .prc-Popover-PopoverContent-2x-Aj:after{margin-top:calc(var(--base-size-8,.5rem)*-1)}:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj:after{margin-top:calc(var(--base-size-8,.5rem)*-1)}:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj:after{margin-top:calc(var(--base-size-8,.5rem)*-1)}:where([data-caret=left]) .prc-Popover-PopoverContent-2x-Aj:after{margin-top:calc(var(--base-size-8,.5rem)*-1)}:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj:after{margin-top:calc(var(--base-size-8,.5rem)*-1)}:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj:after{margin-top:calc(var(--base-size-8,.5rem)*-1)}:where([data-caret=right]) .prc-Popover-PopoverContent-2x-Aj:before{border-left-color:var(--borderColor-default,#d1d9e0);right:calc(var(--base-size-16,1rem)*-1)}:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj:before{border-left-color:var(--borderColor-default,#d1d9e0);right:calc(var(--base-size-16,1rem)*-1)}:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj:before{border-left-color:var(--borderColor-default,#d1d9e0);right:calc(var(--base-size-16,1rem)*-1)}:where([data-caret=right]) .prc-Popover-PopoverContent-2x-Aj:after{border-left-color:var(--overlay-bgColor,#fff);right:-14px}:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj:after{border-left-color:var(--overlay-bgColor,#fff);right:-14px}:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj:after{border-left-color:var(--overlay-bgColor,#fff);right:-14px}:where([data-caret=left]) .prc-Popover-PopoverContent-2x-Aj:before{border-right-color:var(--borderColor-default,#d1d9e0);left:calc(var(--base-size-16,1rem)*-1)}:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj:before{border-right-color:var(--borderColor-default,#d1d9e0);left:calc(var(--base-size-16,1rem)*-1)}:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj:before{border-right-color:var(--borderColor-default,#d1d9e0);left:calc(var(--base-size-16,1rem)*-1)}:where([data-caret=left]) .prc-Popover-PopoverContent-2x-Aj:after{border-right-color:var(--overlay-bgColor,#fff);left:-14px}:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj:after{border-right-color:var(--overlay-bgColor,#fff);left:-14px}:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj:after{border-right-color:var(--overlay-bgColor,#fff);left:-14px}:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj:before{top:var(--base-size-24,1.5rem)}:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj:before{top:var(--base-size-24,1.5rem)}:where([data-caret=right-top]) .prc-Popover-PopoverContent-2x-Aj:after{top:var(--base-size-24,1.5rem)}:where([data-caret=left-top]) .prc-Popover-PopoverContent-2x-Aj:after{top:var(--base-size-24,1.5rem)}:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj:before{top:auto}:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj:before{top:auto}:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj:after{top:auto}:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj:after{top:auto}:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj:before{bottom:var(--base-size-16,1rem)}:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj:before{bottom:var(--base-size-16,1rem)}:where([data-caret=right-bottom]) .prc-Popover-PopoverContent-2x-Aj:after{bottom:calc(var(--base-size-16,1rem) + 1px)}:where([data-caret=left-bottom]) .prc-Popover-PopoverContent-2x-Aj:after{bottom:calc(var(--base-size-16,1rem) + 1px)}.prc-Popover-PopoverContent-2x-Aj:where([data-width=xsmall]){width:var(--overlay-width-xsmall,12rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-width=small]){width:var(--overlay-width-small,20rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-width=medium]){width:var(--overlay-width-medium,30rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-width=large]){width:var(--overlay-width-large,40rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-width=xlarge]){width:var(--overlay-width-xlarge,60rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-width=auto]){width:auto}.prc-Popover-PopoverContent-2x-Aj:where([data-height=small]){height:var(--overlay-height-small,16rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-height=medium]){height:var(--overlay-height-medium,20rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-height=large]){height:var(--overlay-height-large,27rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-height=xlarge]){height:var(--overlay-height-xlarge,37.5rem)}.prc-Popover-PopoverContent-2x-Aj:where([data-height=fit-content]){height:-moz-fit-content;height:fit-content}.prc-Popover-PopoverContent-2x-Aj:where([data-height=auto]){height:auto}
|
|
2
2
|
/*# sourceMappingURL=Popover-a93df39c.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Popover/Popover.module.css.js"],"names":[],"mappings":"AAAA,2BAGE,YAAa,CAFb,iBAAkB,CAClB,WAUF,CAPE,8CACE,aACF,CAEA,kDACE,iBACF,CAGF,kCAKE,4CAAwC,CACxC,gDAAyC,CACzC,4GAAwC,CAHxC,gBAAiB,CADjB,iBAAkB,CADlB,kCAA4B,CAD5B,iBA+OF,CAtOE,iFAKE,UAAW,CAD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oDAA6C,CAD7C,uCAEF,CAEA,mEAIE,6CAAyC,CAFzC,WAGF,CALA,uEAIE,6CAAyC,CAFzC,WAGF,CALA,0EAIE,6CAAyC,CAFzC,WAGF,CAOA,mEAEE,qDAA8C,CAD9C,sCAEF,CAHA,uEAEE,qDAA8C,CAD9C,sCAEF,CAHA,0EAEE,qDAA8C,CAD9C,sCAEF,CAEA,kEAIE,8CAA0C,CAF1C,UAGF,CALA,sEAIE,8CAA0C,CAF1C,UAGF,CALA,yEAIE,8CAA0C,CAF1C,UAGF,CAMA,wEAEE,8BACF,CAHA,uEAEE,8BACF,CAHA,uEAEE,8BACF,CAHA,sEAEE,8BACF,CAMA,2EAEE,QACF,CAHA,0EAEE,QACF,CAHA,0EAEE,QACF,CAHA,yEAEE,QACF,CAEA,2EACE,+BACF,CAFA,0EACE,+BACF,CAEA,0EAEE,2CACF,CAHA,yEAEE,2CACF,CAGF,6DACE,uCACF,CAEA,4DACE,sCACF,CAEA,6DACE,uCACF,CAEA,4DACE,sCACF,CAEA,6DACE,uCACF,CAEA,2DACE,UACF,CAEA,6DACE,wCACF,CAEA,8DACE,yCACF,CAEA,6DACE,wCACF,CAEA,8DACE,2CACF,CAEA,mEACE,uBAAmB,CAAnB,kBACF,CAEA,4DACE,WACF","file":"Popover-a93df39c.css","sourcesContent":[".Popover {\n position: absolute;\n z-index: 100;\n display: none;\n\n &:where([data-open]) {\n display: block;\n }\n\n &:where([data-relative]) {\n position: relative;\n }\n}\n\n.PopoverContent {\n position: relative;\n padding: var(--base-size-24);\n margin-right: auto;\n margin-left: auto;\n background-color: var(--overlay-bgColor);\n border-radius: var(--borderRadius-medium);\n box-shadow: var(--shadow-floating-small);\n\n /* Carets */\n &::before,\n &::after {\n position: absolute;\n left: 50%;\n display: inline-block;\n content: '';\n }\n\n &::before {\n top: calc(-1 * var(--base-size-16));\n /* stylelint-disable-next-line primer/spacing */\n margin-left: -9px;\n\n /* TODO: solid? */\n /* stylelint-disable-next-line primer/borders */\n border: var(--base-size-8) solid transparent;\n border-bottom-color: var(--borderColor-default);\n }\n\n &::after {\n /* stylelint-disable-next-line primer/spacing */\n top: -14px;\n margin-left: calc(-1 * var(--base-size-8));\n\n /* // todo: solid */\n /* stylelint-disable-next-line primer/borders */\n border: 7px solid transparent;\n /* stylelint-disable-next-line primer/colors */\n border-bottom-color: var(--overlay-bgColor);\n }\n\n /* Bottom-oriented carets */\n :where([data-caret='bottom']) &,\n :where([data-caret='bottom-right']) &,\n :where([data-caret='bottom-left']) & {\n &::before,\n &::after {\n top: auto;\n border-bottom-color: transparent;\n }\n\n &::before {\n bottom: calc(-1 * var(--base-size-16));\n border-top-color: var(--borderColor-default);\n }\n\n &::after {\n /* stylelint-disable-next-line primer/spacing */\n bottom: -14px;\n /* stylelint-disable-next-line primer/colors */\n border-top-color: var(--overlay-bgColor);\n }\n }\n\n /* Top & Bottom: Right-oriented carets */\n :where([data-caret='top-right']) &,\n :where([data-caret='bottom-right']) & {\n /* stylelint-disable-next-line primer/spacing */\n right: -9px;\n margin-right: 0;\n\n &::before,\n &::after {\n left: auto;\n margin-left: 0;\n }\n\n &::before {\n /* stylelint-disable-next-line primer/spacing */\n right: 20px;\n }\n\n &::after {\n /* stylelint-disable-next-line primer/spacing */\n right: 21px;\n }\n }\n\n /* Top & Bottom: Left-oriented carets */\n :where([data-caret='top-left']) &,\n :where([data-caret='bottom-left']) & {\n /* stylelint-disable-next-line primer/spacing */\n left: -9px;\n margin-left: 0;\n\n &::before,\n &::after {\n left: var(--base-size-24);\n margin-left: 0;\n }\n\n &::after {\n /* stylelint-disable-next-line primer/spacing */\n left: calc(var(--base-size-24) + 1px);\n }\n }\n\n /* Right- & Left-oriented carets */\n :where([data-caret='right']) &,\n :where([data-caret='right-top']) &,\n :where([data-caret='right-bottom']) &,\n :where([data-caret='left']) &,\n :where([data-caret='left-top']) &,\n :where([data-caret='left-bottom']) & {\n &::before,\n &::after {\n top: 50%;\n left: auto;\n margin-left: 0;\n border-bottom-color: transparent;\n }\n\n &::before {\n /* stylelint-disable-next-line primer/spacing */\n margin-top: calc((var(--base-size-8) + 1px) * -1);\n }\n\n &::after {\n margin-top: calc(-1 * var(--base-size-8));\n }\n }\n\n /* Right-oriented carets */\n :where([data-caret='right']) &,\n :where([data-caret='right-top']) &,\n :where([data-caret='right-bottom']) & {\n &::before {\n right: calc(-1 * var(--base-size-16));\n border-left-color: var(--borderColor-default);\n }\n\n &::after {\n /* stylelint-disable-next-line primer/spacing */\n right: -14px;\n /* stylelint-disable-next-line primer/colors */\n border-left-color: var(--overlay-bgColor);\n }\n }\n\n /* Left-oriented carets */\n :where([data-caret='left']) &,\n :where([data-caret='left-top']) &,\n :where([data-caret='left-bottom']) & {\n &::before {\n left: calc(-1 * var(--base-size-16));\n border-right-color: var(--borderColor-default);\n }\n\n &::after {\n /* stylelint-disable-next-line primer/spacing */\n left: -14px;\n /* stylelint-disable-next-line primer/colors */\n border-right-color: var(--overlay-bgColor);\n }\n }\n\n /* Right & Left: Top-oriented carets */\n :where([data-caret='right-top']) &,\n :where([data-caret='left-top']) & {\n &::before,\n &::after {\n top: var(--base-size-24);\n }\n }\n\n /* Right & Left: Bottom-oriented carets */\n :where([data-caret='right-bottom']) &,\n :where([data-caret='left-bottom']) & {\n &::before,\n &::after {\n top: auto;\n }\n\n &::before {\n bottom: var(--base-size-16);\n }\n\n &::after {\n /* stylelint-disable-next-line primer/spacing */\n bottom: calc(var(--base-size-16) + 1px);\n }\n }\n\n &:where([data-width='xsmall']) {\n width: var(--overlay-width-xsmall);\n }\n\n &:where([data-width='small']) {\n width: var(--overlay-width-small);\n }\n\n &:where([data-width='medium']) {\n width: var(--overlay-width-medium);\n }\n\n &:where([data-width='large']) {\n width: var(--overlay-width-large);\n }\n\n &:where([data-width='xlarge']) {\n width: var(--overlay-width-xlarge);\n }\n\n &:where([data-width='auto']) {\n width: auto;\n }\n\n &:where([data-height='small']) {\n height: var(--overlay-height-small);\n }\n\n &:where([data-height='medium']) {\n height: var(--overlay-height-medium);\n }\n\n &:where([data-height='large']) {\n height: var(--overlay-height-large);\n }\n\n &:where([data-height='xlarge']) {\n height: var(--overlay-height-xlarge);\n }\n\n &:where([data-height='fit-content']) {\n height: fit-content;\n }\n\n &:where([data-height='auto']) {\n height: auto;\n }\n}\n"]}
|
package/dist/Portal/Portal.d.ts
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Register a container to serve as a portal root.
|
|
4
|
-
* @param root The element that will be the root for portals created in this container
|
|
5
|
-
* @param name The name of the container, to be used with the `containerName` prop on the Portal Component.
|
|
6
|
-
* If name is not specified, registers the default portal root.
|
|
7
|
-
*/
|
|
8
|
-
export declare function registerPortalRoot(root: Element, name?: string): void;
|
|
9
|
-
/**
|
|
10
|
-
* Provides the ability for component trees to override the portal root container for a sub-set of the experience.
|
|
11
|
-
* The portal will prioritize the context value unless overridden by their own `containerName` prop, and fallback to the default root if neither are specified
|
|
12
|
-
*/
|
|
13
|
-
export declare const PortalContext: React.Context<{
|
|
14
|
-
portalContainerName?: string;
|
|
15
|
-
}>;
|
|
16
2
|
export interface PortalProps {
|
|
17
3
|
/**
|
|
18
4
|
* Called when this portal is added to the DOM
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../src/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../src/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAMvC,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IAEpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CA6CjE,CAAA"}
|
package/dist/Portal/Portal.js
CHANGED
|
@@ -1,51 +1,9 @@
|
|
|
1
1
|
import React, { useContext } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
import useIsomorphicLayoutEffect from '../utils/useIsomorphicLayoutEffect.js';
|
|
4
|
+
import { PortalContext } from './PortalContext.js';
|
|
5
|
+
import { DEFAULT_PORTAL_CONTAINER_NAME, ensureDefaultPortal, getPortalRoot } from './portalRoot.js';
|
|
4
6
|
|
|
5
|
-
const PRIMER_PORTAL_ROOT_ID = '__primerPortalRoot__';
|
|
6
|
-
const DEFAULT_PORTAL_CONTAINER_NAME = '__default__';
|
|
7
|
-
const portalRootRegistry = {};
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Register a container to serve as a portal root.
|
|
11
|
-
* @param root The element that will be the root for portals created in this container
|
|
12
|
-
* @param name The name of the container, to be used with the `containerName` prop on the Portal Component.
|
|
13
|
-
* If name is not specified, registers the default portal root.
|
|
14
|
-
*/
|
|
15
|
-
function registerPortalRoot(root, name = DEFAULT_PORTAL_CONTAINER_NAME) {
|
|
16
|
-
portalRootRegistry[name] = root;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Ensures that a default portal root exists and is registered. If a DOM element exists
|
|
20
|
-
// with id __primerPortalRoot__, allow that element to serve as the default portal root.
|
|
21
|
-
// Otherwise, create that element and attach it to the end of document.body.
|
|
22
|
-
function ensureDefaultPortal() {
|
|
23
|
-
const existingDefaultPortalContainer = portalRootRegistry[DEFAULT_PORTAL_CONTAINER_NAME];
|
|
24
|
-
if (!existingDefaultPortalContainer || !document.body.contains(existingDefaultPortalContainer)) {
|
|
25
|
-
let defaultPortalContainer = document.getElementById(PRIMER_PORTAL_ROOT_ID);
|
|
26
|
-
if (!(defaultPortalContainer instanceof Element)) {
|
|
27
|
-
defaultPortalContainer = document.createElement('div');
|
|
28
|
-
defaultPortalContainer.setAttribute('id', PRIMER_PORTAL_ROOT_ID);
|
|
29
|
-
defaultPortalContainer.style.position = 'absolute';
|
|
30
|
-
defaultPortalContainer.style.top = '0';
|
|
31
|
-
defaultPortalContainer.style.left = '0';
|
|
32
|
-
defaultPortalContainer.style.width = '100%';
|
|
33
|
-
const suitablePortalRoot = document.querySelector('[data-portal-root]');
|
|
34
|
-
if (suitablePortalRoot) {
|
|
35
|
-
suitablePortalRoot.appendChild(defaultPortalContainer);
|
|
36
|
-
} else {
|
|
37
|
-
document.body.appendChild(defaultPortalContainer);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
registerPortalRoot(defaultPortalContainer);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Provides the ability for component trees to override the portal root container for a sub-set of the experience.
|
|
46
|
-
* The portal will prioritize the context value unless overridden by their own `containerName` prop, and fallback to the default root if neither are specified
|
|
47
|
-
*/
|
|
48
|
-
const PortalContext = /*#__PURE__*/React.createContext({});
|
|
49
7
|
/**
|
|
50
8
|
* Creates a React Portal, placing all children in a separate physical DOM root node.
|
|
51
9
|
* @see https://reactjs.org/docs/portals.html
|
|
@@ -79,7 +37,7 @@ const Portal = ({
|
|
|
79
37
|
containerName = DEFAULT_PORTAL_CONTAINER_NAME;
|
|
80
38
|
ensureDefaultPortal();
|
|
81
39
|
}
|
|
82
|
-
const parentElement =
|
|
40
|
+
const parentElement = getPortalRoot(containerName);
|
|
83
41
|
if (!parentElement) {
|
|
84
42
|
throw new Error(`Portal container '${containerName}' is not yet registered. Container must be registered with registerPortalRoot before use.`);
|
|
85
43
|
}
|
|
@@ -93,4 +51,4 @@ const Portal = ({
|
|
|
93
51
|
return /*#__PURE__*/createPortal(children, element);
|
|
94
52
|
};
|
|
95
53
|
|
|
96
|
-
export { Portal
|
|
54
|
+
export { Portal };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PortalContext.d.ts","sourceRoot":"","sources":["../../src/Portal/PortalContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,aAAa;0BACF,MAAM;EACxB,CAAA"}
|
package/dist/Portal/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { PortalProps } from './Portal';
|
|
2
|
-
import { Portal
|
|
2
|
+
import { Portal } from './Portal';
|
|
3
|
+
import { PortalContext } from './PortalContext';
|
|
4
|
+
import { registerPortalRoot } from './portalRoot';
|
|
3
5
|
export default Portal;
|
|
4
6
|
export { registerPortalRoot };
|
|
5
7
|
export type { PortalProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Portal/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AACzC,OAAO,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Portal/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAA;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAA;AAC/B,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAC,kBAAkB,EAAC,MAAM,cAAc,CAAA;AAE/C,eAAe,MAAM,CAAA;AACrB,OAAO,EAAC,kBAAkB,EAAC,CAAA;AAC3B,YAAY,EAAC,WAAW,EAAC,CAAA;AACzB,OAAO,EAAC,aAAa,EAAC,CAAA"}
|
package/dist/Portal/index.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DEFAULT_PORTAL_CONTAINER_NAME = "__default__";
|
|
2
|
+
/**
|
|
3
|
+
* Register a container to serve as a portal root.
|
|
4
|
+
* @param root The element that will be the root for portals created in this container
|
|
5
|
+
* @param name The name of the container, to be used with the `containerName` prop on the Portal Component.
|
|
6
|
+
* If name is not specified, registers the default portal root.
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerPortalRoot(root: Element, name?: string): void;
|
|
9
|
+
export declare function ensureDefaultPortal(): void;
|
|
10
|
+
export declare function getPortalRoot(name: string): Element | undefined;
|
|
11
|
+
//# sourceMappingURL=portalRoot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portalRoot.d.ts","sourceRoot":"","sources":["../../src/Portal/portalRoot.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,6BAA6B,gBAAgB,CAAA;AAI1D;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,SAAgC,GAAG,IAAI,CAE5F;AAED,wBAAgB,mBAAmB,SAqBlC;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,uBAEzC"}
|