@primer/react 0.0.0-20260507160128 → 0.0.0-20260507175140
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 +5 -11
- package/dist/ActionBar/ActionBar-e2c44be2.css +2 -0
- package/dist/ActionBar/ActionBar-e2c44be2.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 +293 -381
- package/dist/ActionBar/ActionBar.module.css.js +2 -2
- package/dist/ActionBar/index.d.ts +1 -1
- package/dist/ActionList/LinkItem.d.ts +1 -1
- package/dist/ActionList/index.d.ts +2 -2
- package/dist/AnchoredOverlay/{AnchoredOverlay-ec9e15fc.css → AnchoredOverlay-0c26c5f8.css} +2 -2
- package/dist/AnchoredOverlay/AnchoredOverlay-0c26c5f8.css.map +1 -0
- package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.js +26 -63
- package/dist/AnchoredOverlay/AnchoredOverlay.module.css.js +1 -1
- package/dist/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/DataTable/sorting.d.ts +1 -1
- package/dist/TextInput/TextInput.d.ts +1 -1
- package/dist/TextInputWithTokens/TextInputWithTokens.d.ts +3 -3
- package/dist/experimental/SelectPanel2/mock-story-data.d.ts +3 -3
- package/dist/hooks/useSyncedState.d.ts +1 -1
- package/dist/internal/components/TextInputInnerAction.d.ts +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/utils/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/utils/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/ActionBar/ActionBar-a41224b2.css +0 -2
- package/dist/ActionBar/ActionBar-a41224b2.css.map +0 -1
- package/dist/AnchoredOverlay/AnchoredOverlay-ec9e15fc.css.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './ActionBar-
|
|
1
|
+
import './ActionBar-e2c44be2.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"List":"prc-ActionBar-List-9uz46","Divider":"prc-ActionBar-Divider-6V8yH","Nav":"prc-ActionBar-Nav-9spON","Group":"prc-ActionBar-Group-peNCk"};
|
|
3
|
+
var styles = {"List":"prc-ActionBar-List-9uz46","detect-overflow":"prc-ActionBar-detect-overflow-mAuJu","Divider":"prc-ActionBar-Divider-6V8yH","Nav":"prc-ActionBar-Nav-9spON","Group":"prc-ActionBar-Group-peNCk","OverflowContainer":"prc-ActionBar-OverflowContainer-AkYZs","MoreButton":"prc-ActionBar-MoreButton-RHqpx"};
|
|
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;
|
|
5
5
|
Group: import("react").ForwardRefExoticComponent<{
|
|
6
6
|
children?: import("react").ReactNode | undefined;
|
|
7
7
|
} & import("react").RefAttributes<unknown>>;
|
|
@@ -14,7 +14,7 @@ type LinkProps = {
|
|
|
14
14
|
className?: string;
|
|
15
15
|
};
|
|
16
16
|
export type ActionListLinkItemProps = Pick<ActionListItemProps, 'active' | 'children' | 'inactiveText' | 'variant' | 'size'> & LinkProps;
|
|
17
|
-
declare const LinkItemComponent: <As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "
|
|
17
|
+
declare const LinkItemComponent: <As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & LinkProps extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & LinkProps ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
18
18
|
as?: As | undefined;
|
|
19
19
|
} & React.RefAttributes<unknown>) => React.ReactNode;
|
|
20
20
|
export declare const LinkItem: WithSlotMarker<typeof LinkItemComponent>;
|
|
@@ -84,7 +84,7 @@ export declare const ActionList: (<As extends React.ElementType = "ul">(props: (
|
|
|
84
84
|
__SLOT__: symbol;
|
|
85
85
|
};
|
|
86
86
|
/** A `Item` that renders a full-size anchor inside ListItem */
|
|
87
|
-
LinkItem: import("../utils/types").WithSlotMarker<(<As extends React.ElementType = "a">(props: (import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "
|
|
87
|
+
LinkItem: import("../utils/types").WithSlotMarker<(<As extends React.ElementType = "a">(props: (import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & {
|
|
88
88
|
download?: string;
|
|
89
89
|
href?: string;
|
|
90
90
|
hrefLang?: string;
|
|
@@ -95,7 +95,7 @@ export declare const ActionList: (<As extends React.ElementType = "ul">(props: (
|
|
|
95
95
|
type?: string;
|
|
96
96
|
referrerPolicy?: React.AnchorHTMLAttributes<HTMLAnchorElement>["referrerPolicy"];
|
|
97
97
|
className?: string;
|
|
98
|
-
} extends infer T ? T extends import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "
|
|
98
|
+
} extends infer T ? T extends import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & {
|
|
99
99
|
download?: string;
|
|
100
100
|
href?: string;
|
|
101
101
|
hrefLang?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.prc-AnchoredOverlay-ResponsiveCloseButtonContainer-nuium{position:relative}.prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx{display:none;position:absolute;right:var(--base-size-8,.5rem);top:var(--base-size-8,.5rem)}@media screen and (max-width:calc(48rem - 0.02px)){.prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx{display:inline-grid}}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z{position-try-fallbacks:flip-block,flip-inline,flip-block flip-inline;position-visibility:anchors-visible;position:fixed!important;z-index:100}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[popover]{border:0;inset:auto;margin:0;max-width:none;padding:0}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom]{left:anchor(left);top:calc(anchor(bottom) + var(--base-size-4,.25rem))}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom][data-align=left]{left:auto;right:calc(anchor(right) - var(--anchored-overlay-anchor-offset-left))}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-top]{bottom:anchor(top);left:anchor(left);margin-bottom:var(--base-size-4,.25rem)}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-top][data-align=left]{left:auto;right:anchor(right)}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-left]{margin-right:var(--base-size-4,.25rem);right:anchor(left);top:
|
|
2
|
-
/*# sourceMappingURL=AnchoredOverlay-
|
|
1
|
+
.prc-AnchoredOverlay-ResponsiveCloseButtonContainer-nuium{position:relative}.prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx{display:none;position:absolute;right:var(--base-size-8,.5rem);top:var(--base-size-8,.5rem)}@media screen and (max-width:calc(48rem - 0.02px)){.prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx{display:inline-grid}}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z{position-try-fallbacks:flip-block,flip-inline,flip-block flip-inline;position-visibility:anchors-visible;position:fixed!important;z-index:100}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[popover]{border:0;inset:auto;margin:0;max-width:none;padding:0}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom]{left:anchor(left);top:calc(anchor(bottom) + var(--base-size-4,.25rem))}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-bottom][data-align=left]{left:auto;right:calc(anchor(right) - var(--anchored-overlay-anchor-offset-left))}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-top]{bottom:anchor(top);left:anchor(left);margin-bottom:var(--base-size-4,.25rem)}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-top][data-align=left]{left:auto;right:anchor(right)}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-left]{margin-right:var(--base-size-4,.25rem);right:anchor(left);top:anchor(top);position-try-fallbacks:flip-inline,flip-block,flip-start,--outside-left-to-bottom}.prc-AnchoredOverlay-AnchoredOverlay-fYg9Z[data-side=outside-right]{left:anchor(right);margin-left:var(--base-size-4,.25rem);top:anchor(top);position-try-fallbacks:flip-inline,flip-block,flip-start,--outside-right-to-bottom}@position-try --outside-left-to-bottom{margin:0;right:anchor(right);top:calc(anchor(bottom) + var(--base-size-4,.25rem));width:auto}@position-try --outside-right-to-bottom{left:anchor(left);margin:0;top:calc(anchor(bottom) + var(--base-size-4,.25rem));width:auto}
|
|
2
|
+
/*# sourceMappingURL=AnchoredOverlay-0c26c5f8.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/AnchoredOverlay/AnchoredOverlay.module.css.js"],"names":[],"mappings":"AAAA,0DACE,iBACF,CAEA,iDAIE,YAAa,CAHb,iBAAkB,CAElB,8BAAyB,CADzB,4BAOF,CAHE,mDANF,iDAOI,mBAEJ,CADE,CAGF,2CACE,oEAGwB,CACxB,mCAAoC,CAEpC,wBAA0B,CAD1B,WA8CF,CA3CE,oDAIE,QAAS,CAHT,UAAW,CACX,QAAS,CAGT,cAAe,CAFf,SAGF,CAEA,qEAGE,iBAAkB,CADlB,oDAOF,CAJE,sFACE,SAAU,CACV,sEACF,CAGF,kEAEE,kBAAmB,CACnB,iBAAkB,CAFlB,uCAQF,CAJE,mFACE,SAAU,CACV,mBACF,CAGF,mEAGE,sCAAgC,CAFhC,kBAAmB,CACnB,eAAgB,CAEhB,iFACF,CAEA,oEACE,kBAAmB,CAEnB,qCAA+B,CAD/B,eAAgB,CAEhB,kFACF,CAGF,uCAGE,QAAS,CAFT,mBAAoB,CACpB,oDAA8C,CAE9C,UACF,CAEA,wCACE,iBAAkB,CAElB,QAAS,CADT,oDAA8C,CAE9C,UACF","file":"AnchoredOverlay-0c26c5f8.css","sourcesContent":[".ResponsiveCloseButtonContainer {\n position: relative;\n}\n\n.ResponsiveCloseButton {\n position: absolute;\n top: var(--base-size-8);\n right: var(--base-size-8);\n display: none;\n\n @media screen and (--viewportRange-narrow) {\n display: inline-grid;\n }\n}\n\n.AnchoredOverlay {\n position-try-fallbacks:\n flip-block,\n flip-inline,\n flip-block flip-inline;\n position-visibility: anchors-visible;\n z-index: 100;\n position: fixed !important;\n\n &[popover] {\n inset: auto;\n margin: 0;\n padding: 0;\n border: 0;\n max-width: none;\n }\n\n &[data-side='outside-bottom'] {\n /* stylelint-disable primer/spacing */\n top: calc(anchor(bottom) + var(--base-size-4));\n left: anchor(left);\n\n &[data-align='left'] {\n left: auto;\n right: calc(anchor(right) - var(--anchored-overlay-anchor-offset-left));\n }\n }\n\n &[data-side='outside-top'] {\n margin-bottom: var(--base-size-4);\n bottom: anchor(top);\n left: anchor(left);\n\n &[data-align='left'] {\n left: auto;\n right: anchor(right);\n }\n }\n\n &[data-side='outside-left'] {\n right: anchor(left);\n top: anchor(top);\n margin-right: var(--base-size-4);\n position-try-fallbacks: flip-inline, flip-block, flip-start, --outside-left-to-bottom;\n }\n\n &[data-side='outside-right'] {\n left: anchor(right);\n top: anchor(top);\n margin-left: var(--base-size-4);\n position-try-fallbacks: flip-inline, flip-block, flip-start, --outside-right-to-bottom;\n }\n}\n\n@position-try --outside-left-to-bottom {\n right: anchor(right);\n top: calc(anchor(bottom) + var(--base-size-4));\n margin: 0;\n width: auto;\n}\n\n@position-try --outside-right-to-bottom {\n left: anchor(left);\n top: calc(anchor(bottom) + var(--base-size-4));\n margin: 0;\n width: auto;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnchoredOverlay.d.ts","sourceRoot":"","sources":["../../src/AnchoredOverlay/AnchoredOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAmC,KAAK,GAAG,EAAC,MAAM,OAAO,CAAA;AAChE,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAE5C,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAA;AAEhE,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAA;AAIhE,OAAO,KAAK,EAAC,cAAc,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAA;AACvE,OAAO,EAAC,KAAK,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAa,KAAK,eAAe,EAAC,MAAM,WAAW,CAAA;AAO1D,UAAU,8BAA8B;IACtC;;;OAGG;IACH,YAAY,EAAE,CAAC,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,YAAY,GAAG,iBAAiB,CAAC,EAChG,KAAK,EAAE,CAAC,KACL,GAAG,CAAC,OAAO,CAAA;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAE/C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAA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;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC,UAAU,EAAE,UAAU,GAAG,YAAY,CAAC,CAAA;IAChE;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,EAAC,QAAQ,EAAC,EAAE;QAAC,QAAQ,EAAE,cAAc,CAAA;KAAC,KAAK,IAAI,CAAA;IACnE;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IAC3C;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;CAChC;AAED,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GACzD,CAAC,8BAA8B,GAAG,iCAAiC,CAAC,GACpE,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,MAAM,GAAG,cAAc,GAAG,iBAAiB,GAAG,mBAAmB,CAAC,CAAC,CAAA;AAS9G;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CA2PnF,CAAA"}
|
|
@@ -54,7 +54,7 @@ const AnchoredOverlay = ({
|
|
|
54
54
|
// Lazy initial state so feature detection runs once per mount on the client.
|
|
55
55
|
// Guarded for SSR where `document` is undefined.
|
|
56
56
|
const [supportsNativeCSSAnchorPositioning] = useState(() => typeof document !== 'undefined' && 'anchorName' in document.documentElement.style);
|
|
57
|
-
const cssAnchorPositioning = cssAnchorPositioningFlag && supportsNativeCSSAnchorPositioning
|
|
57
|
+
const cssAnchorPositioning = cssAnchorPositioningFlag && supportsNativeCSSAnchorPositioning;
|
|
58
58
|
// Only use Popover API when both CSS anchor positioning is enabled AND renderAs is true
|
|
59
59
|
const shouldRenderAsPopover = cssAnchorPositioning && renderAs === 'popover';
|
|
60
60
|
const anchorRef = useProvidedRefOrCreate(externalAnchorRef);
|
|
@@ -133,51 +133,28 @@ const AnchoredOverlay = ({
|
|
|
133
133
|
});
|
|
134
134
|
const popoverId = useId();
|
|
135
135
|
const id = popoverId.replaceAll(':', '_'); // popoverId can contain colons which are invalid in CSS custom property names, so we replace them with underscores
|
|
136
|
-
const anchorName = `--anchored-overlay-anchor-${id}`;
|
|
137
136
|
|
|
138
|
-
// Manage `anchor-name` on the anchor independently of `open`/`width` so a
|
|
139
|
-
// parent re-render that re-runs the positioning effect below doesn't
|
|
140
|
-
// briefly flicker the anchor link off and back on.
|
|
141
|
-
useEffect(() => {
|
|
142
|
-
if (!cssAnchorPositioning || !anchorElement) return;
|
|
143
|
-
if (anchorElement.style.getPropertyValue('anchor-name')) return;
|
|
144
|
-
anchorElement.style.setProperty('anchor-name', anchorName);
|
|
145
|
-
return () => {
|
|
146
|
-
if (anchorElement.style.getPropertyValue('anchor-name') === anchorName) {
|
|
147
|
-
anchorElement.style.removeProperty('anchor-name');
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
}, [cssAnchorPositioning, anchorElement, anchorName]);
|
|
151
137
|
useEffect(() => {
|
|
152
138
|
if (!cssAnchorPositioning || !anchorElement) return;
|
|
153
139
|
const currentOverlay = overlayRef.current;
|
|
154
|
-
|
|
140
|
+
|
|
141
|
+
// Link the anchor and the overlay (when present) via CSS anchor positioning.
|
|
142
|
+
anchorElement.style.setProperty('anchor-name', `--anchored-overlay-anchor-${id}`);
|
|
155
143
|
let pendingPositionFrame = null;
|
|
156
144
|
if (open && currentOverlay) {
|
|
157
|
-
currentOverlay.style.setProperty('position-anchor',
|
|
145
|
+
currentOverlay.style.setProperty('position-anchor', `--anchored-overlay-anchor-${id}`);
|
|
158
146
|
|
|
159
147
|
// Defer the getBoundingClientRect read into a `requestAnimationFrame` so the style write above
|
|
160
148
|
// does not force a synchronous layout.
|
|
161
149
|
pendingPositionFrame = requestAnimationFrame(() => {
|
|
162
150
|
pendingPositionFrame = null;
|
|
163
|
-
const
|
|
164
|
-
const result = getDefaultPosition(anchorElement,
|
|
151
|
+
const overlayWidth = width ? parseInt(widthMap[width]) : null;
|
|
152
|
+
const result = getDefaultPosition(anchorElement, overlayWidth);
|
|
165
153
|
currentOverlay.setAttribute('data-align', result.horizontal);
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
154
|
+
|
|
155
|
+
// Apply offset only when viewport is too narrow
|
|
169
156
|
const offset = result.horizontal === 'left' ? result.leftOffset : result.rightOffset;
|
|
170
157
|
currentOverlay.style.setProperty(`--anchored-overlay-anchor-offset-${result.horizontal}`, `${offset || 0}px`);
|
|
171
|
-
|
|
172
|
-
// Set y-axis offset to prevent overflow if needed.
|
|
173
|
-
const settledRect = currentOverlay.getBoundingClientRect();
|
|
174
|
-
const overflowBottom = settledRect.bottom - window.innerHeight;
|
|
175
|
-
if (overflowBottom > 0) {
|
|
176
|
-
const clampedTop = Math.max(0, settledRect.top - overflowBottom - 8);
|
|
177
|
-
currentOverlay.style.setProperty('--anchored-overlay-top-override', `${clampedTop}px`);
|
|
178
|
-
} else {
|
|
179
|
-
currentOverlay.style.removeProperty('--anchored-overlay-top-override');
|
|
180
|
-
}
|
|
181
158
|
});
|
|
182
159
|
|
|
183
160
|
// Only call showPopover when shouldRenderAsPopover is enabled
|
|
@@ -193,6 +170,7 @@ const AnchoredOverlay = ({
|
|
|
193
170
|
}
|
|
194
171
|
return () => {
|
|
195
172
|
if (pendingPositionFrame !== null) cancelAnimationFrame(pendingPositionFrame);
|
|
173
|
+
anchorElement.style.removeProperty('anchor-name');
|
|
196
174
|
// The overlay may no longer be in the DOM at this point, so we need to check for its presence before trying to update it.
|
|
197
175
|
if (currentOverlay) {
|
|
198
176
|
currentOverlay.style.removeProperty('position-anchor');
|
|
@@ -279,45 +257,30 @@ const AnchoredOverlay = ({
|
|
|
279
257
|
}) : null]
|
|
280
258
|
});
|
|
281
259
|
};
|
|
282
|
-
function getDefaultPosition(anchorElement,
|
|
283
|
-
const
|
|
284
|
-
const overlayRect = overlayElement.getBoundingClientRect();
|
|
260
|
+
function getDefaultPosition(anchorElement, overlayWidth) {
|
|
261
|
+
const rect = anchorElement.getBoundingClientRect();
|
|
285
262
|
const vw = window.innerWidth;
|
|
286
|
-
const
|
|
287
|
-
const
|
|
288
|
-
const
|
|
289
|
-
const spaceLeft = anchorRect.left;
|
|
290
|
-
const spaceRight = vw - anchorRect.right;
|
|
263
|
+
const viewportMargin = 8;
|
|
264
|
+
const spaceLeft = rect.left;
|
|
265
|
+
const spaceRight = vw - rect.right;
|
|
291
266
|
const horizontal = spaceLeft > spaceRight ? 'left' : 'right';
|
|
292
267
|
|
|
293
|
-
//
|
|
294
|
-
//
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
if (overflowsX && overflowsY) {
|
|
300
|
-
if (spaceLeft >= overlayWidth + margin) {
|
|
301
|
-
suggestedSide = 'outside-left';
|
|
302
|
-
} else if (spaceRight >= overlayWidth + margin) {
|
|
303
|
-
suggestedSide = 'outside-right';
|
|
304
|
-
} else {
|
|
305
|
-
suggestedSide = 'outside-bottom';
|
|
306
|
-
}
|
|
268
|
+
// If there's no explicit overlay width, or either side has enough space
|
|
269
|
+
// to contain the overlay, let CSS position-try-fallbacks handle positioning
|
|
270
|
+
if (!overlayWidth || spaceLeft >= overlayWidth + viewportMargin || spaceRight >= overlayWidth + viewportMargin) {
|
|
271
|
+
return {
|
|
272
|
+
horizontal
|
|
273
|
+
};
|
|
307
274
|
}
|
|
308
275
|
|
|
309
|
-
// If the viewport is too narrow to fit the overlay on either side, calculate offsets to prevent overflow
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
leftOffset = Math.max(0, overlayWidth - anchorRect.right + margin);
|
|
314
|
-
rightOffset = Math.max(0, anchorRect.left + overlayWidth - vw + margin);
|
|
315
|
-
}
|
|
276
|
+
// If the viewport is too narrow to fit the overlay on either side, calculate offsets to prevent overflow
|
|
277
|
+
// leftOffset is how much to shift the overlay to the right, rightOffset is how much to shift the overlay to the left
|
|
278
|
+
const leftOffset = Math.max(0, overlayWidth - rect.right + viewportMargin);
|
|
279
|
+
const rightOffset = Math.max(0, rect.left + overlayWidth - vw + viewportMargin);
|
|
316
280
|
return {
|
|
317
281
|
horizontal,
|
|
318
282
|
leftOffset,
|
|
319
|
-
rightOffset
|
|
320
|
-
suggestedSide
|
|
283
|
+
rightOffset
|
|
321
284
|
};
|
|
322
285
|
}
|
|
323
286
|
function assignRef(ref, value) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './AnchoredOverlay-
|
|
1
|
+
import './AnchoredOverlay-0c26c5f8.css';
|
|
2
2
|
|
|
3
3
|
var classes = {"ResponsiveCloseButtonContainer":"prc-AnchoredOverlay-ResponsiveCloseButtonContainer-nuium","ResponsiveCloseButton":"prc-AnchoredOverlay-ResponsiveCloseButton-z-2rx","AnchoredOverlay":"prc-AnchoredOverlay-AnchoredOverlay-fYg9Z"};
|
|
4
4
|
|
|
@@ -28,7 +28,7 @@ declare const _default: React.FC<React.PropsWithChildren<{
|
|
|
28
28
|
} | null>;
|
|
29
29
|
Input: import("../utils/polymorphic").ForwardRefComponent<import("../utils/polymorphic").ForwardRefComponent<"input", import("..").TextInputProps> & {
|
|
30
30
|
__SLOT__: symbol;
|
|
31
|
-
Action: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
31
|
+
Action: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "aria-label" | "tooltipDirection"> & {
|
|
32
32
|
children?: React.ReactNode;
|
|
33
33
|
"aria-label"?: string;
|
|
34
34
|
tooltipDirection?: "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
|
|
@@ -7,7 +7,7 @@ export declare function transition(direction: Exclude<SortDirection, 'NONE'>): E
|
|
|
7
7
|
/**
|
|
8
8
|
* A sort strategy for comparing any two values
|
|
9
9
|
*/
|
|
10
|
-
export declare function basic<T>(a: T, b: T):
|
|
10
|
+
export declare function basic<T>(a: T, b: T): 1 | 0 | -1;
|
|
11
11
|
/**
|
|
12
12
|
* A sort strategy for comparing two `Date` values. Also includes support for
|
|
13
13
|
* values from `Date.now()`
|
|
@@ -37,7 +37,7 @@ export type TextInputNonPassthroughProps = {
|
|
|
37
37
|
export type TextInputProps = Merge<React.ComponentPropsWithoutRef<'input'>, TextInputNonPassthroughProps>;
|
|
38
38
|
declare const _default: PolymorphicForwardRefComponent<"input", TextInputProps> & {
|
|
39
39
|
__SLOT__: symbol;
|
|
40
|
-
Action: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
40
|
+
Action: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "aria-label" | "tooltipDirection"> & {
|
|
41
41
|
children?: React.ReactNode;
|
|
42
42
|
"aria-label"?: string;
|
|
43
43
|
tooltipDirection?: "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
|
|
@@ -48,11 +48,11 @@ declare const TextInputWithTokens: React.ForwardRefExoticComponent<{
|
|
|
48
48
|
* The array of tokens to render
|
|
49
49
|
*/
|
|
50
50
|
tokens: any[] | (Omit<(Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
51
|
-
ref?:
|
|
51
|
+
ref?: ((instance: HTMLAnchorElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLAnchorElement> | null | undefined;
|
|
52
52
|
}) | (Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
53
|
-
ref?:
|
|
53
|
+
ref?: ((instance: HTMLButtonElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLButtonElement> | null | undefined;
|
|
54
54
|
}) | (Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
55
|
-
ref?:
|
|
55
|
+
ref?: ((instance: HTMLSpanElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLSpanElement> | null | undefined;
|
|
56
56
|
}), keyof import("..").TokenProps> & import("..").TokenProps & {
|
|
57
57
|
as?: "a" | "button" | "span" | undefined;
|
|
58
58
|
})[];
|
|
@@ -10,10 +10,10 @@ declare const data: {
|
|
|
10
10
|
login: string;
|
|
11
11
|
recommended: boolean;
|
|
12
12
|
} | {
|
|
13
|
-
recommended?: undefined;
|
|
14
13
|
id: string;
|
|
15
14
|
name: string;
|
|
16
15
|
login: string;
|
|
16
|
+
recommended?: undefined;
|
|
17
17
|
})[];
|
|
18
18
|
labels: ({
|
|
19
19
|
color: string;
|
|
@@ -38,18 +38,18 @@ declare const data: {
|
|
|
38
38
|
name: string;
|
|
39
39
|
trailingInfo: string;
|
|
40
40
|
} | {
|
|
41
|
-
trailingInfo?: undefined;
|
|
42
41
|
id: string;
|
|
43
42
|
name: string;
|
|
43
|
+
trailingInfo?: undefined;
|
|
44
44
|
})[];
|
|
45
45
|
tags: ({
|
|
46
46
|
id: string;
|
|
47
47
|
name: string;
|
|
48
48
|
trailingInfo: string;
|
|
49
49
|
} | {
|
|
50
|
-
trailingInfo?: undefined;
|
|
51
50
|
id: string;
|
|
52
51
|
name: string;
|
|
52
|
+
trailingInfo?: undefined;
|
|
53
53
|
})[];
|
|
54
54
|
repos: {
|
|
55
55
|
org: string;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* This is adapted almost directly from https://beta.reactjs.org/learn/you-might-not-need-an-effect#adjusting-some-state-when-a-prop-changes
|
|
10
10
|
*/
|
|
11
11
|
export declare const useSyncedState: <T>(initialValue: T | (() => T), { isPropUpdateDisabled, isEqual }?: {
|
|
12
|
-
isEqual?: ((value1: any, value2: any) => boolean) | undefined;
|
|
13
12
|
isPropUpdateDisabled?: boolean | undefined;
|
|
13
|
+
isEqual?: ((value1: any, value2: any) => boolean) | undefined;
|
|
14
14
|
}) => readonly [T, import("react").Dispatch<import("react").SetStateAction<T>>];
|
|
15
15
|
//# sourceMappingURL=useSyncedState.d.ts.map
|
|
@@ -16,7 +16,7 @@ export type TextInputActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonEle
|
|
|
16
16
|
*/
|
|
17
17
|
variant?: ButtonProps['variant'];
|
|
18
18
|
};
|
|
19
|
-
declare const TextInputAction: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
19
|
+
declare const TextInputAction: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "aria-label" | "tooltipDirection"> & {
|
|
20
20
|
/** @deprecated Text input action buttons should only use icon buttons */
|
|
21
21
|
children?: React.ReactNode;
|
|
22
22
|
/** Text that appears in a tooltip. If an icon is passed, this is also used as the label used by assistive technologies. */
|
package/dist/theme.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ declare const theme: {
|
|
|
29
29
|
xlarge: string;
|
|
30
30
|
};
|
|
31
31
|
space: string[];
|
|
32
|
-
colorSchemes: Record<"
|
|
32
|
+
colorSchemes: Record<"light" | "light_high_contrast" | "light_colorblind" | "light_tritanopia" | "dark" | "dark_dimmed" | "dark_high_contrast" | "dark_colorblind" | "dark_tritanopia", {
|
|
33
33
|
colors: Partial<{
|
|
34
34
|
colors: {
|
|
35
35
|
canvasDefaultTransparent: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const useIsomorphicLayoutEffect: typeof
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
3
3
|
export default useIsomorphicLayoutEffect;
|
|
4
4
|
//# sourceMappingURL=useIsomorphicLayoutEffect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsomorphicLayoutEffect.d.ts","sourceRoot":"","sources":["../../src/utils/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"useIsomorphicLayoutEffect.d.ts","sourceRoot":"","sources":["../../src/utils/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAkB,MAAM,OAAO,CAAA;AAEhD,QAAA,MAAM,yBAAyB,kBAOhB,CAAA;AAEf,eAAe,yBAAyB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-20260507175140",
|
|
5
5
|
"description": "An implementation of GitHub's Primer Design System using React",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
"ts-toolbelt": "9.6.0",
|
|
179
179
|
"tsx": "4.20.3",
|
|
180
180
|
"typed-css-modules": "^0.9.1",
|
|
181
|
-
"typescript": "^
|
|
181
|
+
"typescript": "^5.9.2",
|
|
182
182
|
"typescript-plugin-css-modules": "^5.2.0",
|
|
183
183
|
"unist-util-find": "3.0.0",
|
|
184
184
|
"unist-util-find-before": "4.0.0",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.prc-ActionBar-List-9uz46{align-items:center;display:flex;gap:var(--actionbar-gap,var(--stack-gap-condensed,.5rem));list-style:none;margin-bottom:-1px;min-width:0;position:relative;white-space:nowrap}.prc-ActionBar-List-9uz46:where([data-gap=none]){--actionbar-gap:0}.prc-ActionBar-List-9uz46:where([data-gap=none]) .prc-ActionBar-Divider-6V8yH{padding:0 var(--base-size-8,.5rem)}.prc-ActionBar-List-9uz46:where([data-gap=condensed]){--actionbar-gap:var(--stack-gap-condensed,0.5rem)}.prc-ActionBar-Nav-9spON{align-items:center;display:flex;justify-content:flex-end;padding-inline:var(--base-size-16,1rem)}.prc-ActionBar-Nav-9spON:where([data-flush=true]){padding-inline:0}.prc-ActionBar-Divider-6V8yH:before{background:var(--borderColor-muted,#d1d9e0b3);content:"";display:block;height:var(--base-size-20,1.25rem);width:var(--borderWidth-thin,.0625rem)}.prc-ActionBar-Group-peNCk{display:flex;gap:inherit}
|
|
2
|
-
/*# sourceMappingURL=ActionBar-a41224b2.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ActionBar/ActionBar.module.css.js"],"names":[],"mappings":"AAAA,0BAUE,kBAAmB,CARnB,YAAa,CASb,yDAAqD,CAFrD,eAAgB,CAFhB,kBAAmB,CAJnB,WAAY,CAFZ,iBAAkB,CAOlB,kBAiBF,CAXE,iDACE,iBAKF,CAHE,8EACE,kCACF,CAGF,sDACE,iDACF,CAGF,yBAIE,kBAAmB,CAHnB,YAAa,CAEb,wBAAyB,CADzB,uCAOF,CAHE,kDACE,gBACF,CAIA,oCAME,6CAAoC,CAFpC,UAAW,CAHX,aAAc,CAEd,kCAA2B,CAD3B,sCAKF,CAGF,2BACE,YAAa,CACb,WACF","file":"ActionBar-a41224b2.css","sourcesContent":[".List {\n position: relative;\n display: flex;\n min-width: 0;\n\n /* wonder why this is here */\n /* stylelint-disable-next-line primer/spacing */\n margin-bottom: -1px;\n white-space: nowrap;\n list-style: none;\n align-items: center;\n gap: var(--actionbar-gap, var(--stack-gap-condensed));\n\n /* Gap scale (mirrors Stack) */\n &:where([data-gap='none']) {\n --actionbar-gap: 0;\n\n .Divider {\n padding: 0 var(--base-size-8);\n }\n }\n\n &:where([data-gap='condensed']) {\n --actionbar-gap: var(--stack-gap-condensed);\n }\n}\n\n.Nav {\n display: flex;\n padding-inline: var(--base-size-16);\n justify-content: flex-end;\n align-items: center;\n\n &:where([data-flush='true']) {\n padding-inline: 0;\n }\n}\n\n.Divider {\n &::before {\n display: block;\n width: var(--borderWidth-thin);\n height: var(--base-size-20);\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background: var(--borderColor-muted);\n }\n}\n\n.Group {\n display: flex;\n gap: inherit;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/AnchoredOverlay/AnchoredOverlay.module.css.js"],"names":[],"mappings":"AAAA,0DACE,iBACF,CAEA,iDAIE,YAAa,CAHb,iBAAkB,CAElB,8BAAyB,CADzB,4BAOF,CAHE,mDANF,iDAOI,mBAEJ,CADE,CAGF,2CACE,oEAGwB,CACxB,mCAAoC,CAEpC,wBAA0B,CAD1B,WAsDF,CAnDE,oDAIE,QAAS,CAHT,UAAW,CACX,QAAS,CAGT,cAAe,CAFf,SAGF,CAEA,qEAGE,iBAAkB,CADlB,oDAOF,CAJE,sFACE,SAAU,CACV,sEACF,CAGF,kEAEE,kBAAmB,CACnB,iBAAkB,CAFlB,uCAQF,CAJE,mFACE,SAAU,CACV,mBACF,CAGF,mEAWE,sCAAgC,CAVhC,kBAAmB,CASnB,oDAAsD,CAEtD,iFACF,CAEA,oEACE,kBAAmB,CAEnB,qCAA+B,CAD/B,oDAAsD,CAEtD,kFACF,CAGF,uCAGE,QAAS,CAFT,mBAAoB,CACpB,oDAA8C,CAE9C,UACF,CAEA,wCACE,iBAAkB,CAElB,QAAS,CADT,oDAA8C,CAE9C,UACF","file":"AnchoredOverlay-ec9e15fc.css","sourcesContent":[".ResponsiveCloseButtonContainer {\n position: relative;\n}\n\n.ResponsiveCloseButton {\n position: absolute;\n top: var(--base-size-8);\n right: var(--base-size-8);\n display: none;\n\n @media screen and (--viewportRange-narrow) {\n display: inline-grid;\n }\n}\n\n.AnchoredOverlay {\n position-try-fallbacks:\n flip-block,\n flip-inline,\n flip-block flip-inline;\n position-visibility: anchors-visible;\n z-index: 100;\n position: fixed !important;\n\n &[popover] {\n inset: auto;\n margin: 0;\n padding: 0;\n border: 0;\n max-width: none;\n }\n\n &[data-side='outside-bottom'] {\n /* stylelint-disable primer/spacing */\n top: calc(anchor(bottom) + var(--base-size-4));\n left: anchor(left);\n\n &[data-align='left'] {\n left: auto;\n right: calc(anchor(right) - var(--anchored-overlay-anchor-offset-left));\n }\n }\n\n &[data-side='outside-top'] {\n margin-bottom: var(--base-size-4);\n bottom: anchor(top);\n left: anchor(left);\n\n &[data-align='left'] {\n left: auto;\n right: anchor(right);\n }\n }\n\n &[data-side='outside-left'] {\n right: anchor(left);\n /* Falls back to `anchor(top)` when JS hasn't overridden it. JS sets the\n override when the overlay's bottom would overflow the viewport so we\n can lift it up to keep the bottom edge on screen, mirroring the JS\n anchored-positioning code path.\n\n This override only applies when CSS cannot find space using the default position -\n or any of its defined fallbacks.\n */\n top: var(--anchored-overlay-top-override, anchor(top));\n margin-right: var(--base-size-4);\n position-try-fallbacks: flip-inline, flip-block, flip-start, --outside-left-to-bottom;\n }\n\n &[data-side='outside-right'] {\n left: anchor(right);\n top: var(--anchored-overlay-top-override, anchor(top));\n margin-left: var(--base-size-4);\n position-try-fallbacks: flip-inline, flip-block, flip-start, --outside-right-to-bottom;\n }\n}\n\n@position-try --outside-left-to-bottom {\n right: anchor(right);\n top: calc(anchor(bottom) + var(--base-size-4));\n margin: 0;\n width: auto;\n}\n\n@position-try --outside-right-to-bottom {\n left: anchor(left);\n top: calc(anchor(bottom) + var(--base-size-4));\n margin: 0;\n width: auto;\n}\n"]}
|