@primer/react 0.0.0-20260312192556 → 0.0.0-20260312205452
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 +4 -12
- package/dist/ActionBar/ActionBar-a41224b2.css +2 -0
- package/dist/ActionBar/ActionBar-a41224b2.css.map +1 -0
- package/dist/ActionBar/ActionBar.d.ts +1 -1
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +390 -389
- package/dist/ActionBar/ActionBar.module.css.js +2 -2
- package/dist/ActionBar/index.d.ts +1 -1
- package/dist/Autocomplete/AutocompleteInput.js +3 -3
- package/dist/Autocomplete/AutocompleteOverlay.js +3 -3
- package/dist/Banner/Banner-f672cdf9.css +2 -0
- package/dist/Banner/Banner-f672cdf9.css.map +1 -0
- package/dist/Banner/Banner.module.css.js +1 -1
- package/dist/Button/ButtonBase.d.ts.map +1 -1
- package/dist/Button/ButtonBase.js +3 -4
- package/dist/Dialog/Dialog.js +3 -3
- package/dist/Heading/Heading.js +3 -3
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +3 -4
- package/dist/Overlay/Overlay.js +22 -21
- package/dist/PageLayout/PageLayout.js +5 -5
- package/dist/TextInputWithTokens/TextInputWithTokens.js +96 -95
- package/dist/deprecated/DialogV1/Dialog.js +12 -11
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useCombinedRefs.d.ts +51 -0
- package/dist/hooks/useCombinedRefs.d.ts.map +1 -0
- package/dist/hooks/useCombinedRefs.js +86 -0
- package/dist/hooks/useRefObjectAsForwardedRef.d.ts +12 -0
- package/dist/hooks/useRefObjectAsForwardedRef.d.ts.map +1 -1
- package/dist/hooks/useRefObjectAsForwardedRef.js +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/generated/components.json +1 -1
- package/generated/hooks.json +22 -0
- package/package.json +1 -1
- package/dist/ActionBar/ActionBar-f2b70d1d.css +0 -2
- package/dist/ActionBar/ActionBar-f2b70d1d.css.map +0 -1
- package/dist/Banner/Banner-b3871000.css +0 -2
- package/dist/Banner/Banner-b3871000.css.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './ActionBar-
|
|
1
|
+
import './ActionBar-a41224b2.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"List":"prc-ActionBar-List-9uz46","
|
|
3
|
+
var styles = {"List":"prc-ActionBar-List-9uz46","Divider":"prc-ActionBar-Divider-6V8yH","Nav":"prc-ActionBar-Nav-9spON","Group":"prc-ActionBar-Group-peNCk"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { ActionBarProps, ActionBarMenuProps, ActionBarMenuItemProps } from './ActionBar';
|
|
2
2
|
declare const ActionBar: import("react").FC<import("react").PropsWithChildren<import("./ActionBar").ActionBarProps>> & {
|
|
3
3
|
IconButton: import("react").ForwardRefExoticComponent<import("./ActionBar").ActionBarIconButtonProps & import("react").RefAttributes<unknown>>;
|
|
4
|
-
Divider: () => import("react").JSX.Element;
|
|
4
|
+
Divider: () => import("react").JSX.Element | null;
|
|
5
5
|
Group: import("react").ForwardRefExoticComponent<{
|
|
6
6
|
children?: import("react").ReactNode | undefined;
|
|
7
7
|
} & import("react").RefAttributes<unknown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useContext, useState, useCallback, useEffect } from 'react';
|
|
2
2
|
import { AutocompleteContext, AutocompleteInputContext } from './AutocompleteContext.js';
|
|
3
|
-
import {
|
|
3
|
+
import { useCombinedRefs } from '../hooks/useCombinedRefs.js';
|
|
4
4
|
import useSafeTimeout from '../hooks/useSafeTimeout.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
import TextInput from '../TextInput/TextInput.js';
|
|
@@ -36,7 +36,7 @@ const AutocompleteInput = /*#__PURE__*/React.forwardRef(({
|
|
|
36
36
|
inputValue = '',
|
|
37
37
|
isMenuDirectlyActivated
|
|
38
38
|
} = inputContext;
|
|
39
|
-
|
|
39
|
+
const combinedRef = useCombinedRefs(forwardedRef, inputRef);
|
|
40
40
|
const [highlightRemainingText, setHighlightRemainingText] = useState(true);
|
|
41
41
|
const {
|
|
42
42
|
safeSetTimeout
|
|
@@ -130,7 +130,7 @@ const AutocompleteInput = /*#__PURE__*/React.forwardRef(({
|
|
|
130
130
|
onKeyDown: handleInputKeyDown,
|
|
131
131
|
onKeyPress: onInputKeyPress,
|
|
132
132
|
onKeyUp: handleInputKeyUp,
|
|
133
|
-
ref:
|
|
133
|
+
ref: combinedRef,
|
|
134
134
|
"aria-controls": `${id}-listbox`,
|
|
135
135
|
"aria-autocomplete": "both",
|
|
136
136
|
role: "combobox",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useContext, useRef, useEffect, useCallback } from 'react';
|
|
2
2
|
import { AutocompleteContext } from './AutocompleteContext.js';
|
|
3
|
-
import {
|
|
3
|
+
import { useCombinedRefs } from '../hooks/useCombinedRefs.js';
|
|
4
4
|
import VisuallyHidden from '../_VisuallyHidden.js';
|
|
5
5
|
import classes from './AutocompleteOverlay.module.css.js';
|
|
6
6
|
import { clsx } from 'clsx';
|
|
@@ -48,7 +48,7 @@ function AutocompleteOverlay({
|
|
|
48
48
|
align: 'start',
|
|
49
49
|
anchorElementRef: computedAnchorRef
|
|
50
50
|
}, [showMenu, selectedItemLength]);
|
|
51
|
-
|
|
51
|
+
const combinedRef = useCombinedRefs(scrollContainerRef, floatingElementRef);
|
|
52
52
|
const closeOptionList = useCallback(() => {
|
|
53
53
|
setShowMenu(false);
|
|
54
54
|
}, [setShowMenu]);
|
|
@@ -60,7 +60,7 @@ function AutocompleteOverlay({
|
|
|
60
60
|
preventFocusOnOpen: true,
|
|
61
61
|
onClickOutside: closeOptionList,
|
|
62
62
|
onEscape: closeOptionList,
|
|
63
|
-
ref:
|
|
63
|
+
ref: combinedRef,
|
|
64
64
|
top: position === null || position === void 0 ? void 0 : position.top,
|
|
65
65
|
left: position === null || position === void 0 ? void 0 : position.left,
|
|
66
66
|
className: clsx(classes.Overlay, className),
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-Banner-Banner-IPLJ2{align-items:start;background-color:var(--banner-bgColor);border:var(--borderWidth-thin,.0625rem) solid var(--banner-borderColor);border-radius:var(--borderRadius-medium,.375rem);display:grid;grid-template-columns:auto minmax(0,1fr) auto;padding:var(--base-size-8,.5rem)}@supports (container-type:inline-size){.prc-Banner-Banner-IPLJ2[data-actions-layout=default]{container:banner/inline-size}}.prc-Banner-Banner-IPLJ2[data-actions-layout=stacked] .prc-Banner-BannerContainer-T-Siu{flex-direction:column}.prc-Banner-Banner-IPLJ2[data-actions-layout=stacked] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=trailing]){display:none}.prc-Banner-Banner-IPLJ2[data-actions-layout=stacked] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=leading]){display:flex}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerContainer-T-Siu{flex-wrap:nowrap}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerActions-gvCLf{flex:0 0 auto}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=trailing]){display:flex}.prc-Banner-Banner-IPLJ2[data-actions-layout=inline] .prc-Banner-BannerActions-gvCLf :where([data-primary-action=leading]){display:none}.prc-Banner-Banner-IPLJ2[data-layout=compact]{padding:var(--base-size-4,.25rem)}.prc-Banner-Banner-IPLJ2[data-flush]{border-left:none;border-radius:0;border-right:none}.prc-Banner-Banner-IPLJ2[data-variant=critical]{--banner-bgColor:var(--bgColor-danger-muted,var(--color-danger-subtle));--banner-borderColor:var(--borderColor-danger-muted,var(--color-danger-muted));--banner-icon-fgColor:var(--fgColor-danger,var(--color-danger-fg))}.prc-Banner-Banner-IPLJ2[data-variant=info]{--banner-bgColor:var(--bgColor-accent-muted,var(--color-accent-subtle));--banner-borderColor:var(--borderColor-accent-muted,var(--color-accent-muted));--banner-icon-fgColor:var(--fgColor-accent,var(--color-accent-fg))}.prc-Banner-Banner-IPLJ2[data-variant=success]{--banner-bgColor:var(--bgColor-success-muted,var(--color-success-subtle));--banner-borderColor:var(--borderColor-success-muted,var(--color-success-muted));--banner-icon-fgColor:var(--fgColor-success,var(--color-success-fg))}.prc-Banner-Banner-IPLJ2[data-variant=upsell]{--banner-bgColor:var(--bgColor-upsell-muted,#fbefff);--banner-borderColor:var(--borderColor-upsell-muted,#c297ff66);--banner-icon-fgColor:var(--fgColor-upsell,#8250df)}.prc-Banner-Banner-IPLJ2[data-variant=warning]{--banner-bgColor:var(--bgColor-attention-muted,var(--color-attention-subtle));--banner-borderColor:var(--borderColor-attention-muted,var(--color-attention-muted));--banner-icon-fgColor:var(--fgColor-attention,var(--color-attention-fg))}.prc-Banner-BannerContainer-T-Siu{align-items:start;column-gap:var(--base-size-4,.25rem);font-size:var(--text-body-size-medium,.875rem);line-height:var(--text-body-lineHeight-medium,1.5);row-gap:var(--base-size-4,.25rem)}.prc-Banner-Banner-IPLJ2 :where(.prc-Banner-BannerContainer-T-Siu){display:flex;flex-wrap:wrap;justify-content:space-between}.prc-Banner-Banner-IPLJ2[data-dismissible]:not([data-title-hidden],[data-actions-layout=inline]) .prc-Banner-BannerContainer-T-Siu{display:grid;grid-template-columns:auto;grid-template-rows:auto}.prc-Banner-BannerContent-LraS2{display:grid;grid-column-start:1;margin-block:var(--base-size-8,.5rem);row-gap:var(--base-size-4,.25rem)}.prc-Banner-Banner-IPLJ2[data-title-hidden]:not(:has(.prc-Banner-BannerActions-gvCLf)) .prc-Banner-BannerContent-LraS2{margin-block:var(--base-size-6,.375rem)}@media screen and (min-width:544px){.prc-Banner-BannerContent-LraS2{flex:1 1 0%}}.prc-Banner-BannerTitle-T4z0L{font-size:inherit;font-weight:var(--base-text-weight-semibold,600);margin:0}.prc-Banner-BannerIcon-o4ayx{display:grid;padding:var(--base-size-8,.5rem);place-items:center}.prc-Banner-BannerIcon-o4ayx svg{color:var(--banner-icon-fgColor);height:var(--base-size-20,1.25rem);fill:var(--banner-icon-fgColor)}.prc-Banner-Banner-IPLJ2[data-title-hidden]:not(:has(.prc-Banner-BannerActions-gvCLf)) .prc-Banner-BannerIcon-o4ayx svg{height:var(--base-size-16,1rem)}.prc-Banner-BannerDismiss-b12FL{display:grid;margin-inline-start:var(--base-size-4,.25rem);padding:var(--base-size-8,.5rem);place-items:center}:where(.prc-Banner-Banner-IPLJ2):has(.prc-Banner-BannerActions-gvCLf) .prc-Banner-BannerDismiss-b12FL{margin-block:var(--base-size-2,.125rem)}.prc-Banner-BannerDismiss-b12FL svg{color:var(--banner-icon-fgColor)}.prc-Banner-BannerActionsContainer-PdBu1{align-items:center;column-gap:var(--base-size-12,.75rem);display:flex;margin-block:var(--base-size-2,.125rem)}.prc-Banner-BannerActions-gvCLf :where([data-primary-action=trailing]){display:none}.prc-Banner-Banner-IPLJ2[data-dismissible]:not([data-title-hidden],[data-actions-layout=inline]) .prc-Banner-BannerActions-gvCLf{margin-block-end:var(--base-size-6,.375rem)}.prc-Banner-Banner-IPLJ2[data-dismissible]:not([data-title-hidden],[data-actions-layout=inline]) .prc-Banner-BannerActionsContainer-PdBu1[data-primary-action=trailing]{display:none}.prc-Banner-Banner-IPLJ2[data-dismissible]:not([data-title-hidden],[data-actions-layout=inline]) .prc-Banner-BannerActionsContainer-PdBu1[data-primary-action=leading]{display:flex}@container banner (max-width: 500px){.prc-Banner-BannerContainer-T-Siu{display:grid}.prc-Banner-BannerContainer-T-Siu:has(.prc-Banner-BannerActionsContainer-PdBu1){grid-template-rows:auto auto}.prc-Banner-BannerActions-gvCLf{margin-block-end:var(--base-size-6,.375rem)}.prc-Banner-BannerActions-gvCLf [data-primary-action=trailing]{display:none}.prc-Banner-BannerActions-gvCLf [data-primary-action=leading]{display:flex}}@container banner (min-width: 500px){.prc-Banner-BannerContainer-T-Siu{display:grid;grid-template-columns:auto auto}:where(.prc-Banner-Banner-IPLJ2):not([data-dismissible]) :where(.prc-Banner-BannerActionsContainer-PdBu1[data-primary-action=trailing]) :where([data-variant=link]:only-child){padding-inline:0 var(--base-size-12,.75rem)}.prc-Banner-BannerActions-gvCLf [data-primary-action=trailing]{display:flex;min-height:var(--base-size-32,2rem)}.prc-Banner-BannerActions-gvCLf [data-primary-action=leading]{display:none}}
|
|
2
|
+
/*# sourceMappingURL=Banner-f672cdf9.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Banner/Banner.module.css.js"],"names":[],"mappings":"AAAA,yBASE,iBAAkB,CALlB,sCAAuC,CAEvC,uEAA+D,CAC/D,gDAAyC,CANzC,YAAa,CAOb,6CAA+C,CAN/C,gCAsFF,CA5EI,uCADF,sDAEI,4BAEJ,CADE,CAIA,wFACE,qBACF,CAEA,6HACE,YACF,CAEA,4HACE,YACF,CAIA,uFACE,gBACF,CAEA,qFACE,aACF,CAEA,4HACE,YACF,CAEA,2HACE,YACF,CAGF,8CACE,iCACF,CAEA,qCACE,gBAAiB,CAEjB,eAAgB,CADhB,iBAEF,CAEA,gDACE,uEAA6C,CAC7C,8EAAqD,CACrD,kEACF,CAEA,4CACE,uEAA6C,CAC7C,8EAAqD,CACrD,kEACF,CAEA,+CACE,yEAA8C,CAC9C,gFAAsD,CACtD,oEACF,CAEA,8CACE,oDAA6C,CAC7C,8DAAqD,CACrD,mDACF,CAEA,+CACE,6EAAgD,CAChD,oFAAwD,CACxD,wEACF,CAKF,kCAEE,iBAAkB,CAGlB,oCAA8B,CAJ9B,8CAAuC,CAEvC,kDAA+C,CAC/C,iCAEF,CAEA,mEACE,YAAa,CACb,cAAe,CACf,6BACF,CAEA,mIACE,YAAa,CACb,0BAA2B,CAC3B,uBACF,CAIA,gCACE,YAAa,CAEb,mBAAoB,CACpB,qCAAgC,CAFhC,iCAGF,CAEA,uHACE,uCACF,CAEA,oCACE,gCACE,WACF,CACF,CAEA,8BAEE,iBAAkB,CAClB,gDAA6C,CAF7C,QAGF,CAIA,6BACE,YAAa,CAEb,gCAA2B,CAD3B,kBAEF,CAEA,iCAIE,gCAAiC,CAFjC,kCAA2B,CAI3B,+BACF,CAGA,wHACE,+BACF,CAIA,gCACE,YAAa,CAGb,6CAAuC,CADvC,gCAA2B,CAD3B,kBAGF,CAEA,sGACE,uCACF,CAEA,oCAEE,gCACF,CAIA,yCAGE,kBAAmB,CADnB,qCAA+B,CAD/B,YAAa,CAGb,uCACF,CAEA,uEACE,YACF,CAEA,iIACE,2CACF,CAGA,wKAEE,YACF,CAGA,uKAEE,YACF,CAIA,qCACE,kCACE,YACF,CAEA,gFACE,4BACF,CAEA,gCACE,2CACF,CAEA,+DACE,YACF,CAEA,8DACE,YACF,CACF,CAEA,qCACE,kCACE,YAAa,CACb,+BACF,CAEA,+KAGE,2CACF,CAEA,+DACE,YAAa,CACb,mCACF,CAEA,8DACE,YACF,CACF","file":"Banner-f672cdf9.css","sourcesContent":[".Banner {\n display: grid;\n padding: var(--base-size-8);\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--banner-bgColor);\n /* stylelint-disable-next-line primer/colors */\n border: var(--borderWidth-thin) solid var(--banner-borderColor);\n border-radius: var(--borderRadius-medium);\n grid-template-columns: auto minmax(0, 1fr) auto;\n align-items: start;\n\n &[data-actions-layout='default'] {\n @supports (container-type: inline-size) {\n container: banner / inline-size;\n }\n }\n\n &[data-actions-layout='stacked'] {\n & .BannerContainer {\n flex-direction: column;\n }\n\n & .BannerActions :where([data-primary-action='trailing']) {\n display: none;\n }\n\n & .BannerActions :where([data-primary-action='leading']) {\n display: flex;\n }\n }\n\n &[data-actions-layout='inline'] {\n & .BannerContainer {\n flex-wrap: nowrap;\n }\n\n & .BannerActions {\n flex: 0 0 auto;\n }\n\n & .BannerActions :where([data-primary-action='trailing']) {\n display: flex;\n }\n\n & .BannerActions :where([data-primary-action='leading']) {\n display: none;\n }\n }\n\n &[data-layout='compact'] {\n padding: var(--base-size-4);\n }\n\n &[data-flush] {\n border-left: none;\n border-right: none;\n border-radius: 0;\n }\n\n &[data-variant='critical'] {\n --banner-bgColor: var(--bgColor-danger-muted);\n --banner-borderColor: var(--borderColor-danger-muted);\n --banner-icon-fgColor: var(--fgColor-danger);\n }\n\n &[data-variant='info'] {\n --banner-bgColor: var(--bgColor-accent-muted);\n --banner-borderColor: var(--borderColor-accent-muted);\n --banner-icon-fgColor: var(--fgColor-accent);\n }\n\n &[data-variant='success'] {\n --banner-bgColor: var(--bgColor-success-muted);\n --banner-borderColor: var(--borderColor-success-muted);\n --banner-icon-fgColor: var(--fgColor-success);\n }\n\n &[data-variant='upsell'] {\n --banner-bgColor: var(--bgColor-upsell-muted);\n --banner-borderColor: var(--borderColor-upsell-muted);\n --banner-icon-fgColor: var(--fgColor-upsell);\n }\n\n &[data-variant='warning'] {\n --banner-bgColor: var(--bgColor-attention-muted);\n --banner-borderColor: var(--borderColor-attention-muted);\n --banner-icon-fgColor: var(--fgColor-attention);\n }\n}\n\n/* BannerContainer -------------------------------------------------------- */\n\n.BannerContainer {\n font-size: var(--text-body-size-medium);\n align-items: start;\n line-height: var(--text-body-lineHeight-medium);\n row-gap: var(--base-size-4);\n column-gap: var(--base-size-4);\n}\n\n.Banner :where(.BannerContainer) {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n}\n\n.Banner[data-dismissible]:not([data-title-hidden], [data-actions-layout='inline']) .BannerContainer {\n display: grid;\n grid-template-columns: auto;\n grid-template-rows: auto;\n}\n\n/* BannerContent ---------------------------------------------------------- */\n\n.BannerContent {\n display: grid;\n row-gap: var(--base-size-4);\n grid-column-start: 1;\n margin-block: var(--base-size-8);\n}\n\n.Banner[data-title-hidden]:not(:has(.BannerActions)) .BannerContent {\n margin-block: var(--base-size-6);\n}\n\n@media screen and (min-width: 544px) {\n .BannerContent {\n flex: 1 1 0%;\n }\n}\n\n.BannerTitle {\n margin: 0;\n font-size: inherit;\n font-weight: var(--base-text-weight-semibold);\n}\n\n/* BannerIcon ------------------------------------------------------------- */\n\n.BannerIcon {\n display: grid;\n place-items: center;\n padding: var(--base-size-8);\n}\n\n.BannerIcon svg {\n /* 20px is the line box height of the trailing action buttons */\n height: var(--base-size-20);\n /* stylelint-disable-next-line primer/colors */\n color: var(--banner-icon-fgColor);\n /* stylelint-disable-next-line primer/colors */\n fill: var(--banner-icon-fgColor);\n}\n\n/* stylelint-disable-next-line selector-max-specificity */\n.Banner[data-title-hidden]:not(:has(.BannerActions)) .BannerIcon svg {\n height: var(--base-size-16);\n}\n\n/* BannerDismiss ---------------------------------------------------------- */\n\n.BannerDismiss {\n display: grid;\n place-items: center;\n padding: var(--base-size-8);\n margin-inline-start: var(--base-size-4);\n}\n\n:where(.Banner):has(.BannerActions) .BannerDismiss {\n margin-block: var(--base-size-2);\n}\n\n.BannerDismiss svg {\n /* stylelint-disable-next-line primer/colors */\n color: var(--banner-icon-fgColor);\n}\n\n/* BannerActions ---------------------------------------------------------- */\n\n.BannerActionsContainer {\n display: flex;\n column-gap: var(--base-size-12);\n align-items: center;\n margin-block: var(--base-size-2);\n}\n\n.BannerActions :where([data-primary-action='trailing']) {\n display: none;\n}\n\n.Banner[data-dismissible]:not([data-title-hidden], [data-actions-layout='inline']) .BannerActions {\n margin-block-end: var(--base-size-6);\n}\n\n/* stylelint-disable-next-line selector-max-specificity */\n.Banner[data-dismissible]:not([data-title-hidden], [data-actions-layout='inline'])\n .BannerActionsContainer[data-primary-action='trailing'] {\n display: none;\n}\n\n/* stylelint-disable-next-line selector-max-specificity */\n.Banner[data-dismissible]:not([data-title-hidden], [data-actions-layout='inline'])\n .BannerActionsContainer[data-primary-action='leading'] {\n display: flex;\n}\n\n/* Layout ------------------------------------------------------------------- */\n\n@container banner (max-width: 500px) {\n .BannerContainer {\n display: grid;\n }\n\n .BannerContainer:has(.BannerActionsContainer) {\n grid-template-rows: auto auto;\n }\n\n .BannerActions {\n margin-block-end: var(--base-size-6);\n }\n\n .BannerActions [data-primary-action='trailing'] {\n display: none;\n }\n\n .BannerActions [data-primary-action='leading'] {\n display: flex;\n }\n}\n\n@container banner (min-width: 500px) {\n .BannerContainer {\n display: grid;\n grid-template-columns: auto auto;\n }\n\n :where(.Banner):not([data-dismissible])\n :where(.BannerActionsContainer[data-primary-action='trailing'])\n :where([data-variant='link']:only-child) {\n padding-inline: 0 var(--base-size-12);\n }\n\n .BannerActions [data-primary-action='trailing'] {\n display: flex;\n min-height: var(--base-size-32, 2rem);\n }\n\n .BannerActions [data-primary-action='leading'] {\n display: none;\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './Banner-
|
|
1
|
+
import './Banner-f672cdf9.css';
|
|
2
2
|
|
|
3
3
|
var classes = {"Banner":"prc-Banner-Banner-IPLJ2","BannerContainer":"prc-Banner-BannerContainer-T-Siu","BannerActions":"prc-Banner-BannerActions-gvCLf","BannerContent":"prc-Banner-BannerContent-LraS2","BannerTitle":"prc-Banner-BannerTitle-T4z0L","BannerIcon":"prc-Banner-BannerIcon-o4ayx","BannerDismiss":"prc-Banner-BannerDismiss-b12FL","BannerActionsContainer":"prc-Banner-BannerActionsContainer-PdBu1"};
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../src/Button/ButtonBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAC/F,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAA;AA2BxC,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../src/Button/ButtonBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAC/F,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAA;AA2BxC,QAAA,MAAM,UAAU,EA0JV,8BAA8B,CAAC,QAAQ,GAAG,GAAG,EAAE,WAAW,CAAC,CAAA;AAEjE,OAAO,EAAC,UAAU,EAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useCombinedRefs } from '../hooks/useCombinedRefs.js';
|
|
3
3
|
import { ConditionalWrapper } from '../internal/components/ConditionalWrapper.js';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import classes from './ButtonBase.module.css.js';
|
|
@@ -46,7 +46,7 @@ const ButtonBase = /*#__PURE__*/forwardRef(({
|
|
|
46
46
|
...rest
|
|
47
47
|
} = props;
|
|
48
48
|
const innerRef = React.useRef(null);
|
|
49
|
-
|
|
49
|
+
const combinedRefs = useCombinedRefs(forwardedRef, innerRef);
|
|
50
50
|
const uuid = useId(id);
|
|
51
51
|
const loadingAnnouncementID = `${uuid}-loading-announcement`;
|
|
52
52
|
|
|
@@ -74,8 +74,7 @@ const ButtonBase = /*#__PURE__*/forwardRef(({
|
|
|
74
74
|
children: [/*#__PURE__*/jsx(Component, {
|
|
75
75
|
"aria-disabled": loading ? true : undefined,
|
|
76
76
|
...rest,
|
|
77
|
-
|
|
78
|
-
ref: innerRef,
|
|
77
|
+
ref: combinedRefs,
|
|
79
78
|
className: clsx(classes.ButtonBase, className),
|
|
80
79
|
"data-block": block ? 'block' : null,
|
|
81
80
|
"data-inactive": inactive ? true : undefined,
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -6,7 +6,7 @@ import { XIcon } from '@primer/octicons-react';
|
|
|
6
6
|
import { useFocusZone } from '../hooks/useFocusZone.js';
|
|
7
7
|
import { FocusKeys } from '@primer/behaviors';
|
|
8
8
|
import { Portal } from '../Portal/Portal.js';
|
|
9
|
-
import {
|
|
9
|
+
import { useCombinedRefs } from '../hooks/useCombinedRefs.js';
|
|
10
10
|
import { useId } from '../hooks/useId.js';
|
|
11
11
|
import classes from './Dialog.module.css.js';
|
|
12
12
|
import { clsx } from 'clsx';
|
|
@@ -126,7 +126,7 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
126
126
|
footer: Dialog.Footer
|
|
127
127
|
});
|
|
128
128
|
const dialogRef = useRef(null);
|
|
129
|
-
|
|
129
|
+
const combinedRef = useCombinedRefs(forwardedRef, dialogRef);
|
|
130
130
|
const backdropRef = useRef(null);
|
|
131
131
|
useFocusTrap({
|
|
132
132
|
containerRef: dialogRef,
|
|
@@ -189,7 +189,7 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
189
189
|
setLastMouseDownIsBackdrop(e.target === e.currentTarget);
|
|
190
190
|
},
|
|
191
191
|
children: /*#__PURE__*/jsxs("div", {
|
|
192
|
-
ref:
|
|
192
|
+
ref: combinedRef,
|
|
193
193
|
role: role,
|
|
194
194
|
"aria-labelledby": dialogLabelId,
|
|
195
195
|
"aria-describedby": dialogDescriptionId,
|
package/dist/Heading/Heading.js
CHANGED
|
@@ -2,7 +2,7 @@ import { clsx } from 'clsx';
|
|
|
2
2
|
import React, { forwardRef, useEffect } from 'react';
|
|
3
3
|
import classes from './Heading.module.css.js';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
import {
|
|
5
|
+
import { useCombinedRefs } from '../hooks/useCombinedRefs.js';
|
|
6
6
|
|
|
7
7
|
const Heading = /*#__PURE__*/forwardRef(({
|
|
8
8
|
as: Component = 'h2',
|
|
@@ -11,7 +11,7 @@ const Heading = /*#__PURE__*/forwardRef(({
|
|
|
11
11
|
...props
|
|
12
12
|
}, forwardedRef) => {
|
|
13
13
|
const innerRef = React.useRef(null);
|
|
14
|
-
|
|
14
|
+
const combinedRef = useCombinedRefs(forwardedRef, innerRef);
|
|
15
15
|
if (process.env.NODE_ENV !== "production") {
|
|
16
16
|
/**
|
|
17
17
|
* The Linter yells because it thinks this conditionally calls an effect,
|
|
@@ -31,7 +31,7 @@ const Heading = /*#__PURE__*/forwardRef(({
|
|
|
31
31
|
className: clsx(className, classes.Heading),
|
|
32
32
|
"data-variant": variant,
|
|
33
33
|
...props,
|
|
34
|
-
ref:
|
|
34
|
+
ref: combinedRef
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
Heading.displayName = 'Heading';
|
package/dist/Link/Link.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/Link/Link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAY,KAAK,YAAY,EAAkB,MAAM,OAAO,CAAA;AAG1E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAC,KAAK,gBAAgB,EAAkB,MAAM,6BAA6B,CAAA;AAElF,KAAK,eAAe,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI;IACzD,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,EAC9D,OAAO,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,eAAe,CAAC,EACjD,KAAK,YAAY,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/Link/Link.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAY,KAAK,YAAY,EAAkB,MAAM,OAAO,CAAA;AAG1E,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAC,KAAK,gBAAgB,EAAkB,MAAM,6BAA6B,CAAA;AAElF,KAAK,eAAe,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI;IACzD,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,EAC9D,OAAO,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,eAAe,CAAC,EACjD,KAAK,YAAY,CAAC,OAAO,CAAC,sBAwC3B,CAAA;AAID,QAAA,MAAM,IAAI,IA9CoB,EAAE,SAAS,KAAK,CAAC,WAAW;;;;CA8CM,CAAA;AAEhE,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,IAAI,CAAC,CAAA;AACnD,eAAe,IAAI,CAAA"}
|
package/dist/Link/Link.js
CHANGED
|
@@ -3,7 +3,7 @@ import React, { useEffect } from 'react';
|
|
|
3
3
|
import classes from './Link.module.css.js';
|
|
4
4
|
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
import {
|
|
6
|
+
import { useCombinedRefs } from '../hooks/useCombinedRefs.js';
|
|
7
7
|
|
|
8
8
|
const UnwrappedLink = (props, ref) => {
|
|
9
9
|
const {
|
|
@@ -14,7 +14,7 @@ const UnwrappedLink = (props, ref) => {
|
|
|
14
14
|
...restProps
|
|
15
15
|
} = props;
|
|
16
16
|
const innerRef = React.useRef(null);
|
|
17
|
-
|
|
17
|
+
const combinedRef = useCombinedRefs(ref, innerRef);
|
|
18
18
|
if (process.env.NODE_ENV !== "production") {
|
|
19
19
|
/**
|
|
20
20
|
* The Linter yells because it thinks this conditionally calls an effect,
|
|
@@ -36,8 +36,7 @@ const UnwrappedLink = (props, ref) => {
|
|
|
36
36
|
"data-inline": inline,
|
|
37
37
|
"data-hover-color": hoverColor,
|
|
38
38
|
...restProps,
|
|
39
|
-
|
|
40
|
-
ref: innerRef
|
|
39
|
+
ref: combinedRef
|
|
41
40
|
});
|
|
42
41
|
};
|
|
43
42
|
UnwrappedLink.displayName = "UnwrappedLink";
|
package/dist/Overlay/Overlay.js
CHANGED
|
@@ -2,7 +2,7 @@ import { c } from 'react-compiler-runtime';
|
|
|
2
2
|
import React, { useRef, useEffect } from 'react';
|
|
3
3
|
import useIsomorphicLayoutEffect from '../utils/useIsomorphicLayoutEffect.js';
|
|
4
4
|
import { Portal } from '../Portal/Portal.js';
|
|
5
|
-
import {
|
|
5
|
+
import { useCombinedRefs } from '../hooks/useCombinedRefs.js';
|
|
6
6
|
import classes from './Overlay.module.css.js';
|
|
7
7
|
import { clsx } from 'clsx';
|
|
8
8
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -115,7 +115,7 @@ const BaseOverlay = /*#__PURE__*/React.forwardRef(({
|
|
|
115
115
|
|
|
116
116
|
*/
|
|
117
117
|
const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
118
|
-
const $ = c(
|
|
118
|
+
const $ = c(46);
|
|
119
119
|
let anchorSide;
|
|
120
120
|
let ignoreClickRefs;
|
|
121
121
|
let initialFocusRef;
|
|
@@ -196,7 +196,7 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
|
196
196
|
const visibility = t4 === undefined ? "visible" : t4;
|
|
197
197
|
const width = t5 === undefined ? "auto" : t5;
|
|
198
198
|
const overlayRef = useRef(null);
|
|
199
|
-
|
|
199
|
+
const combinedRef = useCombinedRefs(forwardedRef, overlayRef);
|
|
200
200
|
let t6;
|
|
201
201
|
if ($[18] !== ignoreClickRefs || $[19] !== initialFocusRef || $[20] !== onClickOutside || $[21] !== onEscape || $[22] !== preventFocusOnOpen || $[23] !== returnFocusRef) {
|
|
202
202
|
t6 = {
|
|
@@ -269,12 +269,12 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
|
269
269
|
const leftPosition = left === undefined && right === undefined ? 0 : left;
|
|
270
270
|
const t11 = !preventOverflow ? true : undefined;
|
|
271
271
|
let t12;
|
|
272
|
-
if ($[32] !==
|
|
272
|
+
if ($[32] !== combinedRef || $[33] !== height || $[34] !== leftPosition || $[35] !== props || $[36] !== responsiveVariant || $[37] !== right || $[38] !== role || $[39] !== t11 || $[40] !== visibility || $[41] !== width) {
|
|
273
273
|
t12 = /*#__PURE__*/jsx(BaseOverlay, {
|
|
274
274
|
role: role,
|
|
275
275
|
width: width,
|
|
276
276
|
"data-reflow-container": t11,
|
|
277
|
-
ref:
|
|
277
|
+
ref: combinedRef,
|
|
278
278
|
left: leftPosition,
|
|
279
279
|
right: right,
|
|
280
280
|
height: height,
|
|
@@ -282,30 +282,31 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
|
282
282
|
"data-responsive": responsiveVariant,
|
|
283
283
|
...props
|
|
284
284
|
});
|
|
285
|
-
$[32] =
|
|
286
|
-
$[33] =
|
|
287
|
-
$[34] =
|
|
288
|
-
$[35] =
|
|
289
|
-
$[36] =
|
|
290
|
-
$[37] =
|
|
291
|
-
$[38] =
|
|
292
|
-
$[39] =
|
|
293
|
-
$[40] =
|
|
294
|
-
$[41] =
|
|
285
|
+
$[32] = combinedRef;
|
|
286
|
+
$[33] = height;
|
|
287
|
+
$[34] = leftPosition;
|
|
288
|
+
$[35] = props;
|
|
289
|
+
$[36] = responsiveVariant;
|
|
290
|
+
$[37] = right;
|
|
291
|
+
$[38] = role;
|
|
292
|
+
$[39] = t11;
|
|
293
|
+
$[40] = visibility;
|
|
294
|
+
$[41] = width;
|
|
295
|
+
$[42] = t12;
|
|
295
296
|
} else {
|
|
296
|
-
t12 = $[
|
|
297
|
+
t12 = $[42];
|
|
297
298
|
}
|
|
298
299
|
let t13;
|
|
299
|
-
if ($[
|
|
300
|
+
if ($[43] !== portalContainerName || $[44] !== t12) {
|
|
300
301
|
t13 = /*#__PURE__*/jsx(Portal, {
|
|
301
302
|
containerName: portalContainerName,
|
|
302
303
|
children: t12
|
|
303
304
|
});
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
305
|
+
$[43] = portalContainerName;
|
|
306
|
+
$[44] = t12;
|
|
307
|
+
$[45] = t13;
|
|
307
308
|
} else {
|
|
308
|
-
t13 = $[
|
|
309
|
+
t13 = $[45];
|
|
309
310
|
}
|
|
310
311
|
return t13;
|
|
311
312
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useRef, memo } from 'react';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { useId } from '../hooks/useId.js';
|
|
4
|
-
import {
|
|
4
|
+
import { useCombinedRefs } from '../hooks/useCombinedRefs.js';
|
|
5
5
|
import { isResponsiveValue } from '../hooks/useResponsiveValue.js';
|
|
6
6
|
import { useSlots } from '../hooks/useSlots.js';
|
|
7
7
|
import { useOverflow } from '../hooks/useOverflow.js';
|
|
@@ -569,7 +569,7 @@ const Pane = /*#__PURE__*/React.forwardRef(({
|
|
|
569
569
|
onResizeEnd,
|
|
570
570
|
currentWidth: controlledWidth
|
|
571
571
|
});
|
|
572
|
-
|
|
572
|
+
const combinedRef = useCombinedRefs(forwardRef, paneRef);
|
|
573
573
|
const hasOverflow = useOverflow(paneRef);
|
|
574
574
|
const paneId = useId(id);
|
|
575
575
|
const labelProp = {};
|
|
@@ -603,7 +603,7 @@ const Pane = /*#__PURE__*/React.forwardRef(({
|
|
|
603
603
|
},
|
|
604
604
|
position: positionProp
|
|
605
605
|
}), /*#__PURE__*/jsx("div", {
|
|
606
|
-
ref:
|
|
606
|
+
ref: combinedRef
|
|
607
607
|
// Suppress hydration mismatch for --pane-width when localStorage
|
|
608
608
|
// provides a width that differs from the server-rendered default.
|
|
609
609
|
// Not needed when onResizeEnd is provided (localStorage isn't read).
|
|
@@ -773,7 +773,7 @@ const Sidebar = /*#__PURE__*/React.forwardRef(({
|
|
|
773
773
|
contentWrapperRef: sidebarContentWrapperRef,
|
|
774
774
|
constrainToViewport: true
|
|
775
775
|
});
|
|
776
|
-
|
|
776
|
+
const combinedRef = useCombinedRefs(forwardRef, sidebarRef);
|
|
777
777
|
const hasOverflow = useOverflow(sidebarRef);
|
|
778
778
|
const sidebarId = useId(id);
|
|
779
779
|
const labelProp = {};
|
|
@@ -812,7 +812,7 @@ const Sidebar = /*#__PURE__*/React.forwardRef(({
|
|
|
812
812
|
getDefaultWidth: getDefaultWidth,
|
|
813
813
|
saveWidth: saveWidth
|
|
814
814
|
}), /*#__PURE__*/jsx("div", {
|
|
815
|
-
ref:
|
|
815
|
+
ref: combinedRef
|
|
816
816
|
// Suppress hydration mismatch for --pane-width when localStorage
|
|
817
817
|
// provides a width that differs from the server-rendered default.
|
|
818
818
|
,
|