@primer/react 0.0.0-20260319200330 → 0.0.0-20260319210827

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +1 -12
  2. package/dist/ActionBar/ActionBar.d.ts +1 -1
  3. package/dist/ActionBar/index.d.ts +1 -1
  4. package/dist/ActionMenu/{ActionMenu-58362ca7.css → ActionMenu-53493541.css} +2 -2
  5. package/dist/ActionMenu/ActionMenu-53493541.css.map +1 -0
  6. package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
  7. package/dist/ActionMenu/ActionMenu.js +0 -4
  8. package/dist/ActionMenu/ActionMenu.module.css.js +1 -1
  9. package/dist/Banner/Banner.js +1 -1
  10. package/dist/Button/types.d.ts +1 -1
  11. package/dist/Button/types.d.ts.map +1 -1
  12. package/dist/Details/Details.js +1 -1
  13. package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
  14. package/dist/FeatureFlags/DefaultFeatureFlags.js +1 -2
  15. package/dist/Overlay/{Overlay-f81a131d.css → Overlay-2e0ce8db.css} +2 -2
  16. package/dist/Overlay/Overlay-2e0ce8db.css.map +1 -0
  17. package/dist/Overlay/Overlay.d.ts.map +1 -1
  18. package/dist/Overlay/Overlay.js +22 -35
  19. package/dist/Overlay/Overlay.module.css.js +1 -1
  20. package/dist/StateLabel/{StateLabel-056eec66.css → StateLabel-cd51ae39.css} +2 -2
  21. package/dist/StateLabel/StateLabel-cd51ae39.css.map +1 -0
  22. package/dist/StateLabel/StateLabel.d.ts +1 -0
  23. package/dist/StateLabel/StateLabel.d.ts.map +1 -1
  24. package/dist/StateLabel/StateLabel.js +4 -2
  25. package/dist/StateLabel/StateLabel.module.css.js +1 -1
  26. package/dist/TooltipV2/{Tooltip-dd983e5b.css → Tooltip-fcb90d9c.css} +2 -2
  27. package/dist/TooltipV2/Tooltip-fcb90d9c.css.map +1 -0
  28. package/dist/TooltipV2/Tooltip.d.ts +1 -1
  29. package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
  30. package/dist/TooltipV2/Tooltip.js +11 -17
  31. package/dist/TooltipV2/Tooltip.module.css.js +2 -2
  32. package/dist/hooks/index.d.ts +0 -1
  33. package/dist/hooks/index.d.ts.map +1 -1
  34. package/dist/hooks/useProvidedRefOrCreate.d.ts +0 -12
  35. package/dist/hooks/useProvidedRefOrCreate.d.ts.map +1 -1
  36. package/dist/hooks/useProvidedRefOrCreate.js +0 -12
  37. package/dist/hooks/useRefObjectAsForwardedRef.d.ts +0 -12
  38. package/dist/hooks/useRefObjectAsForwardedRef.d.ts.map +1 -1
  39. package/dist/hooks/useRefObjectAsForwardedRef.js +0 -12
  40. package/dist/index.d.ts +0 -1
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +0 -1
  43. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts.map +1 -1
  44. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +8 -17
  45. package/dist/internal/hooks/useMergedRefs.d.ts +2 -0
  46. package/dist/internal/hooks/useMergedRefs.d.ts.map +1 -0
  47. package/dist/internal/hooks/useMergedRefs.js +16 -0
  48. package/generated/components.json +9 -5
  49. package/generated/hooks.json +0 -22
  50. package/package.json +1 -1
  51. package/dist/ActionMenu/ActionMenu-58362ca7.css.map +0 -1
  52. package/dist/Overlay/Overlay-f81a131d.css.map +0 -1
  53. package/dist/StateLabel/StateLabel-056eec66.css.map +0 -1
  54. package/dist/TooltipV2/Tooltip-dd983e5b.css.map +0 -1
  55. package/dist/hooks/useMergedRefs.d.ts +0 -51
  56. package/dist/hooks/useMergedRefs.d.ts.map +0 -1
  57. package/dist/hooks/useMergedRefs.js +0 -86
package/CHANGELOG.md CHANGED
@@ -1,26 +1,15 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260319200330
3
+ ## 0.0.0-20260319210827
4
4
 
5
5
  ### Minor Changes
6
6
 
7
7
  - [#7658](https://github.com/primer/react/pull/7658) [`259fdff`](https://github.com/primer/react/commit/259fdff67550e328b851129a78e87413ddb07229) Thanks [@hussam-i-am](https://github.com/hussam-i-am)! - fix(polymorphic): Improve prop passthrough for ActionList.LinkItem and Breadcrumbs.Item
8
8
 
9
- - [#7672](https://github.com/primer/react/pull/7672) [`77735f9`](https://github.com/primer/react/commit/77735f975c71b267130899fc1fd7b47bcb5f062d) Thanks [@iansan5653](https://github.com/iansan5653)! - - New: Exposes new `useMergedRefs` hook that can merge two refs into a single combined ref
10
-
11
- - Deprecates `useRefObjectAsForwardedRef`; see doc comment for migration instructions
12
- - Deprecates `useProvidedRefOrCreate`; see doc comment for migration instructions
13
-
14
- - [#7623](https://github.com/primer/react/pull/7623) [`42847d1`](https://github.com/primer/react/commit/42847d1bb943c2db6d2309dfd604e8d3ab55d387) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - `IconButton`: `keybindingHint` now accepts `string[]` in addition to `string`. Multiple hints are rendered joined with "or".
15
-
16
9
  ### Patch Changes
17
10
 
18
11
  - Fake entry to force publishing
19
12
 
20
- - [#7510](https://github.com/primer/react/pull/7510) [`8fa988b`](https://github.com/primer/react/commit/8fa988ba613117874657af722ef6de768b0e0eb8) Thanks [@francinelucca](https://github.com/francinelucca)! - chore: ensure max-height does not surpass viewport height in Overlay, ActionMenu under feature flag
21
-
22
- - [#7682](https://github.com/primer/react/pull/7682) [`8aed331`](https://github.com/primer/react/commit/8aed331f9dcb8c51d86bf531f7e331a6ccd23d9a) Thanks [@llastflowers](https://github.com/llastflowers)! - Update CheckboxOrRadioGroup.tsx to add `required` announcement
23
-
24
13
  ## 38.16.0
25
14
 
26
15
  ### Minor Changes
@@ -118,7 +118,7 @@ export declare const ActionBarMenu: React.ForwardRefExoticComponent<{
118
118
  description?: string;
119
119
  tooltipDirection?: import("../TooltipV2").TooltipDirection;
120
120
  keyshortcuts?: string;
121
- keybindingHint?: string | string[];
121
+ keybindingHint?: string;
122
122
  } & Omit<import("..").ButtonBaseProps, "aria-label" | "aria-labelledby"> & React.RefAttributes<unknown>>;
123
123
  export declare const VerticalDivider: () => React.JSX.Element | null;
124
124
  export {};
@@ -20,7 +20,7 @@ declare const ActionBar: import("react").FC<import("react").PropsWithChildren<im
20
20
  description?: string;
21
21
  tooltipDirection?: import("../TooltipV2").TooltipDirection;
22
22
  keyshortcuts?: string;
23
- keybindingHint?: string | string[];
23
+ keybindingHint?: string;
24
24
  } & Omit<import("..").ButtonBaseProps, "aria-label" | "aria-labelledby"> & import("react").RefAttributes<unknown>>;
25
25
  };
26
26
  export default ActionBar;
@@ -1,2 +1,2 @@
1
- .prc-ActionMenu-ActionMenuContainer-Om1Qz{max-height:100vh}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-variant=fullscreen]){padding-top:var(--base-size-36,2.25rem)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-auto]){overflow:auto}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-hidden]){overflow:hidden}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-scroll]){overflow:scroll}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-visible]){overflow:visible}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xsmall]){max-height:192px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-small]){max-height:256px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-medium]){max-height:320px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-large]){max-height:432px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xlarge]){max-height:600px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-clamp-to-viewport][data-max-height-xsmall]){max-height:min(192px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-clamp-to-viewport][data-max-height-small]){max-height:min(256px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-clamp-to-viewport][data-max-height-medium]){max-height:min(320px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-clamp-to-viewport][data-max-height-large]){max-height:min(432px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-clamp-to-viewport][data-max-height-xlarge]){max-height:min(600px,100dvh)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}
2
- /*# sourceMappingURL=ActionMenu-58362ca7.css.map */
1
+ .prc-ActionMenu-ActionMenuContainer-Om1Qz{max-height:100vh}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-variant=fullscreen]){padding-top:var(--base-size-36,2.25rem)}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-auto]){overflow:auto}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-hidden]){overflow:hidden}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-scroll]){overflow:scroll}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-overflow-visible]){overflow:visible}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xsmall]){max-height:192px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-small]){max-height:256px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-medium]){max-height:320px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-large]){max-height:432px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-xlarge]){max-height:600px}.prc-ActionMenu-ActionMenuContainer-Om1Qz:where([data-max-height-fit-content]){max-height:-moz-fit-content;max-height:fit-content}
2
+ /*# sourceMappingURL=ActionMenu-53493541.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ActionMenu/ActionMenu.module.css.js"],"names":[],"mappings":"AAAA,0CAEE,gBA+CF,CA7CE,2EACE,uCACF,CAGA,sEACE,aACF,CAEA,wEACE,eACF,CAEA,wEACE,eACF,CAEA,yEACE,gBACF,CAGA,0EACE,gBACF,CAEA,yEACE,gBACF,CAEA,0EACE,gBACF,CAEA,yEACE,gBACF,CAEA,0EACE,gBACF,CAEA,+EACE,2BAAuB,CAAvB,sBACF","file":"ActionMenu-53493541.css","sourcesContent":[".ActionMenuContainer {\n /* add default max height */\n max-height: 100vh;\n\n &:where([data-variant='fullscreen']) {\n padding-top: var(--base-size-36);\n }\n\n /* Overflow variants */\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 /* Max-height size tokens (mirror Overlay sizes) */\n &:where([data-max-height-xsmall]) {\n max-height: 192px;\n }\n\n &:where([data-max-height-small]) {\n max-height: 256px;\n }\n\n &:where([data-max-height-medium]) {\n max-height: 320px;\n }\n\n &:where([data-max-height-large]) {\n max-height: 432px;\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: 600px;\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ActionMenu.d.ts","sourceRoot":"","sources":["../../src/ActionMenu/ActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8D,MAAM,OAAO,CAAA;AAGlF,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAA;AAE5D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAI5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAC1C,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAIrD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAK/F,OAAO,KAAK,EAAC,gBAAgB,EAAE,cAAc,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AO,CAAA;IAEd;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CACpC,GAAG,IAAI,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAA;AA8I3C,MAAM,MAAM,qBAAqB,GAAG;IAAC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AA2DxH,6CAA6C;AAC7C,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAA;AAe/C,KAAK,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,GAC3C,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,mBAAmB,CAAC,GAAG;IAC/E;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,gBAAgB,CAAC,EAAE,CAAC,EAAC,QAAQ,EAAC,EAAE;QAAC,QAAQ,EAAE,cAAc,CAAA;KAAC,KAAK,IAAI,CAAA;CACpE,CAAA;AAgHH,eAAO,MAAM,UAAU;;;kBA7LP,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC;aAC5B,MAAM;;;;CA4L4E,CAAA"}
@@ -265,7 +265,6 @@ const Overlay = ({
265
265
  }
266
266
  }, [anchorRef]);
267
267
  const featureFlagDisplayInViewportInsideDialog = useFeatureFlag('primer_react_action_menu_display_in_viewport_inside_dialog');
268
- const featureFlagMaxHeightClampToViewport = useFeatureFlag('primer_react_overlay_max_height_clamp_to_viewport');
269
268
  const isInsideDialog = useContext(DialogContext) !== undefined;
270
269
  return /*#__PURE__*/jsx(AnchoredOverlay, {
271
270
  anchorRef: anchorRef,
@@ -289,9 +288,6 @@ const Overlay = ({
289
288
  ref: containerRef,
290
289
  className: styles.ActionMenuContainer,
291
290
  "data-variant": responsiveVariant,
292
- ...(featureFlagMaxHeightClampToViewport ? {
293
- 'data-max-height-clamp-to-viewport': ''
294
- } : {}),
295
291
  ...(overlayProps.overflow ? {
296
292
  [`data-overflow-${overlayProps.overflow}`]: ''
297
293
  } : {}),
@@ -1,4 +1,4 @@
1
- import './ActionMenu-58362ca7.css';
1
+ import './ActionMenu-53493541.css';
2
2
 
3
3
  var styles = {"ActionMenuContainer":"prc-ActionMenu-ActionMenuContainer-Om1Qz"};
4
4
 
@@ -3,7 +3,7 @@ import React, { useEffect, forwardRef } from 'react';
3
3
  import { XIcon, AlertIcon, InfoIcon, CheckCircleIcon, StopIcon } from '@primer/octicons-react';
4
4
  import { IconButton } from '../Button/IconButton.js';
5
5
  import { ButtonComponent } from '../Button/Button.js';
6
- import { useMergedRefs } from '../hooks/useMergedRefs.js';
6
+ import { useMergedRefs } from '../internal/hooks/useMergedRefs.js';
7
7
  import { useId } from '../hooks/useId.js';
8
8
  import classes from './Banner.module.css.js';
9
9
  import { jsx, jsxs } from 'react/jsx-runtime';
@@ -75,7 +75,7 @@ export type IconButtonProps = ButtonA11yProps & {
75
75
  tooltipDirection?: TooltipDirection;
76
76
  /** @deprecated Use `keybindingHint` instead. */
77
77
  keyshortcuts?: string;
78
- keybindingHint?: string | string[];
78
+ keybindingHint?: string;
79
79
  } & Omit<ButtonBaseProps, 'aria-label' | 'aria-labelledby'>;
80
80
  export type LinkButtonProps = {
81
81
  download?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAErD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAA;AAEjF,MAAM,MAAM,IAAI,GAAG,OAA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c,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;IAEnE;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,IAAI,CAAA;IAEzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACxB,GAAG,eAAe,CAAA;AAEnB,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG;IAC9C,IAAI,EAAE,KAAK,CAAC,WAAW,CAAA;IACvB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;IACnC,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,GAAG,IAAI,CAAC,eAAe,EAAE,YAAY,GAAG,iBAAiB,CAAC,CAAA;AAG3D,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,gBAAgB,CAAC,CAAA;CACjF,CAAA"}
@@ -3,7 +3,7 @@ import React, { useEffect } from 'react';
3
3
  import { warning } from '../utils/warning.js';
4
4
  import { clsx } from 'clsx';
5
5
  import classes from './Details.module.css.js';
6
- import { useMergedRefs } from '../hooks/useMergedRefs.js';
6
+ import { useMergedRefs } from '../internal/hooks/useMergedRefs.js';
7
7
  import { jsx } from 'react/jsx-runtime';
8
8
 
9
9
  const Root = /*#__PURE__*/React.forwardRef(
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,kBAU9B,CAAA"}
1
+ {"version":3,"file":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,kBAS9B,CAAA"}
@@ -8,8 +8,7 @@ const DefaultFeatureFlags = FeatureFlagScope.create({
8
8
  primer_react_select_panel_order_selected_at_top: false,
9
9
  primer_react_select_panel_remove_active_descendant: false,
10
10
  primer_react_spinner_synchronize_animations: false,
11
- primer_react_action_menu_display_in_viewport_inside_dialog: false,
12
- primer_react_overlay_max_height_clamp_to_viewport: false
11
+ primer_react_action_menu_display_in_viewport_inside_dialog: false
13
12
  });
14
13
 
15
14
  export { DefaultFeatureFlags };
@@ -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,var(--color-canvas-overlay));border-radius:var(--borderRadius-large,.75rem);box-shadow:var(--shadow-floating-small,var(--color-overlay-shadow));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)){[data-responsive=fullscreen]:is(.prc-Overlay-Overlay-jfs-T[data-anchor-position=false],.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal])):not([data-variant]){left:0;top:0}}:is(.prc-Overlay-Overlay-jfs-T[data-anchor-position=false],.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal])):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:192px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:432px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:600px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-clamp-to-viewport][data-max-height-xsmall]){max-height:min(192px,100dvh)}.prc-Overlay-Overlay-jfs-T:where([data-max-height-clamp-to-viewport][data-max-height-small]){max-height:min(256px,100dvh)}.prc-Overlay-Overlay-jfs-T:where([data-max-height-clamp-to-viewport][data-max-height-medium]){max-height:min(320px,100dvh)}.prc-Overlay-Overlay-jfs-T:where([data-max-height-clamp-to-viewport][data-max-height-large]){max-height:min(432px,100dvh)}.prc-Overlay-Overlay-jfs-T:where([data-max-height-clamp-to-viewport][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]){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]){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
- /*# sourceMappingURL=Overlay-f81a131d.css.map */
1
+ @keyframes prc-Overlay-overlay-appear-JpFey{0%{opacity:0}to{opacity:1}}.prc-Overlay-Overlay-jfs-T{background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border-radius:var(--borderRadius-large,.75rem);box-shadow:var(--shadow-floating-small,var(--color-overlay-shadow));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)){[data-responsive=fullscreen]:is(.prc-Overlay-Overlay-jfs-T[data-anchor-position=false],.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal])):not([data-variant]){left:0;top:0}}:is(.prc-Overlay-Overlay-jfs-T[data-anchor-position=false],.prc-Overlay-Overlay-jfs-T:not([data-anchor-position]):not([data-variant=modal])):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:192px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-small]){max-height:256px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-medium]){max-height:320px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-large]){max-height:432px}.prc-Overlay-Overlay-jfs-T:where([data-max-height-xlarge]){max-height:600px}.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]){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]){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
+ /*# sourceMappingURL=Overlay-2e0ce8db.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Overlay/Overlay.module.css.js"],"names":[],"mappings":"AAAA,4CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,2BAQE,mEAAwC,CACxC,8CAAwC,CACxC,mEAAwC,CALxC,WAAY,CACZ,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAElB,UAoMF,CA3LE,wIAKE,yBAA2B,CAF3B,uBAkBF,CAZI,mDADF,6LAGI,MAAO,CADP,KAGJ,CADE,CAGF,iKAIE,qBAAuB,CAFvB,mBAGF,CAGF,iCACE,YACF,CAEA,8BAvCF,2BAyCI,6BA8JJ,CA7JE,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,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,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,CAGE,mDADF,+DAUI,mBAAoB,CAHpB,YAAa,CAHb,MAAO,CAKP,QAAS,CADT,eAAgB,CAFhB,cAAe,CAMf,0CAA2C,CAV3C,cAAe,CACf,KAAM,CAEN,WAcJ,CALI,0BAdJ,+DAgBM,aAGN,CAFI,CACF,CAGF,0BAEE,4DACE,aACF,CACF,CAGF,8CACE,2BACE,wEACF,CACF","file":"Overlay-2e0ce8db.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: 192px;\n }\n\n &:where([data-max-height-small]) {\n max-height: 256px;\n }\n\n &:where([data-max-height-medium]) {\n max-height: 320px;\n }\n\n &:where([data-max-height-large]) {\n max-height: 432px;\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: 600px;\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 @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"]}
@@ -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;AAI/C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAK/F,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,CAAC,CAAA;IAC9C,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;IACjC,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,C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CAAC,EAAE,CAAA;IACvD,eAAe,CAAC,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,EAsFR,8BAA8B,CAAC,KAAK,EAAE,oBAAoB,CAAC,CAAA;AAEhE,MAAM,MAAM,YAAY,GAAG,qBAAqB,CAAC,OAAO,OAAO,CAAC,CAAA;AAEhE,eAAe,OAAO,CAAA"}
@@ -116,7 +116,7 @@ const BaseOverlay = /*#__PURE__*/React.forwardRef(({
116
116
 
117
117
  */
118
118
  const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
119
- const $ = c(48);
119
+ const $ = c(45);
120
120
  let anchorSide;
121
121
  let ignoreClickRefs;
122
122
  let initialFocusRef;
@@ -197,7 +197,6 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
197
197
  const visibility = t4 === undefined ? "visible" : t4;
198
198
  const width = t5 === undefined ? "auto" : t5;
199
199
  const cssAnchorPositioning = useFeatureFlag("primer_react_css_anchor_positioning");
200
- const featureFlagMaxHeightClampToViewport = useFeatureFlag("primer_react_overlay_max_height_clamp_to_viewport");
201
200
  const overlayRef = useRef(null);
202
201
  useRefObjectAsForwardedRef(forwardedRef, overlayRef);
203
202
  let t6;
@@ -272,18 +271,8 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
272
271
  const leftPosition = left === undefined && right === undefined ? 0 : left;
273
272
  const t11 = !preventOverflow ? true : undefined;
274
273
  let t12;
275
- if ($[32] !== featureFlagMaxHeightClampToViewport) {
276
- t12 = featureFlagMaxHeightClampToViewport ? {
277
- "data-max-height-clamp-to-viewport": ""
278
- } : {};
279
- $[32] = featureFlagMaxHeightClampToViewport;
280
- $[33] = t12;
281
- } else {
282
- t12 = $[33];
283
- }
284
- let t13;
285
- if ($[34] !== height || $[35] !== leftPosition || $[36] !== props || $[37] !== responsiveVariant || $[38] !== right || $[39] !== role || $[40] !== t11 || $[41] !== t12 || $[42] !== visibility || $[43] !== width) {
286
- t13 = /*#__PURE__*/jsx(BaseOverlay, {
274
+ if ($[32] !== height || $[33] !== leftPosition || $[34] !== props || $[35] !== responsiveVariant || $[36] !== right || $[37] !== role || $[38] !== t11 || $[39] !== visibility || $[40] !== width) {
275
+ t12 = /*#__PURE__*/jsx(BaseOverlay, {
287
276
  role: role,
288
277
  width: width,
289
278
  "data-reflow-container": t11,
@@ -293,40 +282,38 @@ const Overlay = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
293
282
  height: height,
294
283
  visibility: visibility,
295
284
  "data-responsive": responsiveVariant,
296
- ...t12,
297
285
  ...props
298
286
  });
299
- $[34] = height;
300
- $[35] = leftPosition;
301
- $[36] = props;
302
- $[37] = responsiveVariant;
303
- $[38] = right;
304
- $[39] = role;
305
- $[40] = t11;
287
+ $[32] = height;
288
+ $[33] = leftPosition;
289
+ $[34] = props;
290
+ $[35] = responsiveVariant;
291
+ $[36] = right;
292
+ $[37] = role;
293
+ $[38] = t11;
294
+ $[39] = visibility;
295
+ $[40] = width;
306
296
  $[41] = t12;
307
- $[42] = visibility;
308
- $[43] = width;
309
- $[44] = t13;
310
297
  } else {
311
- t13 = $[44];
298
+ t12 = $[41];
312
299
  }
313
- const overlayContent = t13;
300
+ const overlayContent = t12;
314
301
  if (cssAnchorPositioning) {
315
302
  return overlayContent;
316
303
  }
317
- let t14;
318
- if ($[45] !== overlayContent || $[46] !== portalContainerName) {
319
- t14 = /*#__PURE__*/jsx(Portal, {
304
+ let t13;
305
+ if ($[42] !== overlayContent || $[43] !== portalContainerName) {
306
+ t13 = /*#__PURE__*/jsx(Portal, {
320
307
  containerName: portalContainerName,
321
308
  children: overlayContent
322
309
  });
323
- $[45] = overlayContent;
324
- $[46] = portalContainerName;
325
- $[47] = t14;
310
+ $[42] = overlayContent;
311
+ $[43] = portalContainerName;
312
+ $[44] = t13;
326
313
  } else {
327
- t14 = $[47];
314
+ t13 = $[44];
328
315
  }
329
- return t14;
316
+ return t13;
330
317
  });
331
318
 
332
319
  export { BaseOverlay, Overlay as default, heightMap };
@@ -1,4 +1,4 @@
1
- import './Overlay-f81a131d.css';
1
+ import './Overlay-2e0ce8db.css';
2
2
 
3
3
  var classes = {"Overlay":"prc-Overlay-Overlay-jfs-T","overlay-appear":"prc-Overlay-overlay-appear-JpFey"};
4
4
 
@@ -1,2 +1,2 @@
1
- .prc-StateLabel-StateLabel-Iawzp{align-items:center;border-radius:var(--borderRadius-full,624.9375rem);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));display:inline-flex;font-weight:var(--base-text-weight-semibold,600);line-height:16px;text-align:center}.prc-StateLabel-StateLabel-Iawzp:where([data-size=small]){font-size:var(--text-body-size-small,.75rem);padding:var(--base-size-4,.25rem) var(--base-size-8,.5rem)}.prc-StateLabel-StateLabel-Iawzp:where([data-size=medium]){font-size:var(--text-body-size-medium,.875rem);padding:var(--base-size-8,.5rem) var(--base-size-12,.75rem)}.prc-StateLabel-StateLabel-Iawzp:where([data-status=issueClosed]){background-color:var(--bgColor-done-emphasis,var(--color-done-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-done-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=issueClosedNotPlanned]){background-color:var(--bgColor-neutral-emphasis,var(--color-fg-subtle));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-neutral-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=pullClosed]){background-color:var(--bgColor-closed-emphasis,var(--color-closed-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-closed-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=pullMerged]){background-color:var(--bgColor-done-emphasis,var(--color-done-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-done-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=pullQueued]){background-color:var(--bgColor-attention-emphasis,var(--color-attention-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-attention-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=issueOpened]){background-color:var(--bgColor-open-emphasis,var(--color-open-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-open-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=pullOpened]){background-color:var(--bgColor-open-emphasis,var(--color-open-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-open-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=draft]){background-color:var(--bgColor-draft-emphasis,var(--bgColor-neutral-emphasis,var(--color-fg-subtle)));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-draft-emphasis,var(--borderColor-neutral-emphasis,transparent));color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=issueDraft]){background-color:var(--bgColor-draft-emphasis,var(--bgColor-neutral-emphasis,var(--color-fg-subtle)));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-draft-emphasis,var(--borderColor-neutral-emphasis,transparent));color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=unavailable]){background-color:var(--bgColor-neutral-emphasis,var(--color-fg-subtle));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-neutral-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=open]){background-color:var(--bgColor-open-emphasis,var(--color-open-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-open-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=closed]){background-color:var(--bgColor-done-emphasis,var(--color-done-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-done-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=alertOpened]){background-color:var(--bgColor-open-emphasis,var(--color-open-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-open-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=alertFixed]){background-color:var(--bgColor-done-emphasis,var(--color-done-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-done-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=alertDismissed]){background-color:var(--bgColor-draft-emphasis,var(--bgColor-neutral-emphasis,var(--color-fg-subtle)));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-draft-emphasis,var(--borderColor-neutral-emphasis,transparent));color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=alertClosed]){background-color:var(--bgColor-closed-emphasis,var(--color-closed-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-closed-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-Icon-YICrR{margin-right:var(--base-size-4,.25rem)}.prc-StateLabel-Icon-YICrR:where([data-size-small]){width:1em}
2
- /*# sourceMappingURL=StateLabel-056eec66.css.map */
1
+ .prc-StateLabel-StateLabel-Iawzp{align-items:center;border-radius:var(--borderRadius-full,624.9375rem);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis));display:inline-flex;font-weight:var(--base-text-weight-semibold,600);line-height:16px;text-align:center}.prc-StateLabel-StateLabel-Iawzp:where([data-size=small]){font-size:var(--text-body-size-small,.75rem);padding:var(--base-size-4,.25rem) var(--base-size-8,.5rem)}.prc-StateLabel-StateLabel-Iawzp:where([data-size=medium]){font-size:var(--text-body-size-medium,.875rem);padding:var(--base-size-8,.5rem) var(--base-size-12,.75rem)}.prc-StateLabel-StateLabel-Iawzp:where([data-status=issueClosed]){background-color:var(--bgColor-done-emphasis,var(--color-done-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-done-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=issueClosedNotPlanned]){background-color:var(--bgColor-neutral-emphasis,var(--color-fg-subtle));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-neutral-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=pullClosed]){background-color:var(--bgColor-closed-emphasis,var(--color-closed-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-closed-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=pullMerged]){background-color:var(--bgColor-done-emphasis,var(--color-done-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-done-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=pullQueued]){background-color:var(--bgColor-attention-emphasis,var(--color-attention-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-attention-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=issueOpened]){background-color:var(--bgColor-open-emphasis,var(--color-open-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-open-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=pullOpened]){background-color:var(--bgColor-open-emphasis,var(--color-open-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-open-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=draft]){background-color:var(--bgColor-draft-emphasis,var(--bgColor-neutral-emphasis,var(--color-fg-subtle)));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-draft-emphasis,var(--borderColor-neutral-emphasis,transparent));color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=issueDraft]){background-color:var(--bgColor-draft-emphasis,var(--bgColor-neutral-emphasis,var(--color-fg-subtle)));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-draft-emphasis,var(--borderColor-neutral-emphasis,transparent));color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=unavailable]){background-color:var(--bgColor-neutral-emphasis,var(--color-fg-subtle));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-neutral-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=open]){background-color:var(--bgColor-open-emphasis,var(--color-open-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-open-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=closed]){background-color:var(--bgColor-done-emphasis,var(--color-done-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-done-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=alertOpened]){background-color:var(--bgColor-open-emphasis,var(--color-open-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-open-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=alertFixed]){background-color:var(--bgColor-done-emphasis,var(--color-done-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-done-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=alertDismissed]){background-color:var(--bgColor-draft-emphasis,var(--bgColor-neutral-emphasis,var(--color-fg-subtle)));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-draft-emphasis,var(--borderColor-neutral-emphasis,transparent));color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=alertClosed]){background-color:var(--bgColor-closed-emphasis,var(--color-closed-emphasis));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-closed-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-StateLabel-Iawzp:where([data-status=archived]){background-color:var(--bgColor-neutral-emphasis,var(--color-fg-subtle));box-shadow:var(--boxShadow-thin,inset 0 0 0 1px) var(--borderColor-neutral-emphasis,transparent);color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-StateLabel-Icon-YICrR{margin-right:var(--base-size-4,.25rem)}.prc-StateLabel-Icon-YICrR:where([data-size-small]){width:1em}
2
+ /*# sourceMappingURL=StateLabel-cd51ae39.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/StateLabel/StateLabel.module.css.js"],"names":[],"mappings":"AAAA,iCAEE,kBAAmB,CAMnB,kDAAuC,CAFvC,2DAAgC,CALhC,mBAAoB,CAEpB,gDAA6C,CAE7C,gBAAiB,CAEjB,iBAEF,CAGA,0DAEE,4CAAsC,CADtC,0DAEF,CAEA,2DAEE,8CAAuC,CADvC,2DAEF,CAGA,kEACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,4EACE,uEAAiD,CAEjD,gGAAmG,CADnG,2DAEF,CAEA,iEACE,4EAAgD,CAEhD,+FAAkG,CADlG,2DAEF,CAEA,iEACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,iEACE,kFAAmD,CAEnD,kGAAqG,CADrG,2DAEF,CAEA,kEACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,iEACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,4DACE,qGAAgF,CAEhF,kIACqF,CAFrF,2DAGF,CAEA,iEACE,qGAAgF,CAEhF,kIACqF,CAFrF,2DAGF,CAEA,kEACE,uEAAiD,CAEjD,gGAAmG,CADnG,2DAEF,CAEA,2DACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,6DACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,kEACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,iEACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,qEACE,qGAAgF,CAEhF,kIACqF,CAFrF,2DAGF,CAEA,kEACE,4EAAgD,CAEhD,+FAAkG,CADlG,2DAEF,CAEA,+DACE,uEAAiD,CAEjD,gGAAmG,CADnG,2DAEF,CAEA,2BACE,sCACF,CAEA,oDACE,SACF","file":"StateLabel-cd51ae39.css","sourcesContent":[".StateLabel {\n display: inline-flex;\n align-items: center;\n font-weight: var(--base-text-weight-semibold);\n /* stylelint-disable-next-line primer/typography */\n line-height: 16px;\n color: var(--fgColor-onEmphasis);\n text-align: center;\n border-radius: var(--borderRadius-full);\n}\n\n/* Size variants */\n.StateLabel:where([data-size='small']) {\n padding: var(--base-size-4) var(--base-size-8);\n font-size: var(--text-body-size-small);\n}\n\n.StateLabel:where([data-size='medium']) {\n padding: var(--base-size-8) var(--base-size-12);\n font-size: var(--text-body-size-medium);\n}\n\n/* Status color variants */\n.StateLabel:where([data-status='issueClosed']) {\n background-color: var(--bgColor-done-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-done-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='issueClosedNotPlanned']) {\n background-color: var(--bgColor-neutral-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-neutral-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='pullClosed']) {\n background-color: var(--bgColor-closed-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-closed-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='pullMerged']) {\n background-color: var(--bgColor-done-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-done-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='pullQueued']) {\n background-color: var(--bgColor-attention-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-attention-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='issueOpened']) {\n background-color: var(--bgColor-open-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-open-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='pullOpened']) {\n background-color: var(--bgColor-open-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-open-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='draft']) {\n background-color: var(--bgColor-draft-emphasis, var(--bgColor-neutral-emphasis));\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px)\n var(--borderColor-draft-emphasis, var(--borderColor-neutral-emphasis, transparent));\n}\n\n.StateLabel:where([data-status='issueDraft']) {\n background-color: var(--bgColor-draft-emphasis, var(--bgColor-neutral-emphasis));\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px)\n var(--borderColor-draft-emphasis, var(--borderColor-neutral-emphasis, transparent));\n}\n\n.StateLabel:where([data-status='unavailable']) {\n background-color: var(--bgColor-neutral-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-neutral-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='open']) {\n background-color: var(--bgColor-open-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-open-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='closed']) {\n background-color: var(--bgColor-done-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-done-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='alertOpened']) {\n background-color: var(--bgColor-open-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-open-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='alertFixed']) {\n background-color: var(--bgColor-done-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-done-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='alertDismissed']) {\n background-color: var(--bgColor-draft-emphasis, var(--bgColor-neutral-emphasis));\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px)\n var(--borderColor-draft-emphasis, var(--borderColor-neutral-emphasis, transparent));\n}\n\n.StateLabel:where([data-status='alertClosed']) {\n background-color: var(--bgColor-closed-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-closed-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='archived']) {\n background-color: var(--bgColor-neutral-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-neutral-emphasis, transparent);\n}\n\n.Icon {\n margin-right: var(--base-size-4);\n}\n\n.Icon:where([data-size-small]) {\n width: 1em;\n}\n"]}
@@ -16,6 +16,7 @@ declare const octiconMap: {
16
16
  alertClosed: import("@primer/octicons-react").Icon;
17
17
  open: null;
18
18
  closed: null;
19
+ archived: import("@primer/octicons-react").Icon;
19
20
  };
20
21
  export type StateLabelProps = React.HTMLAttributes<HTMLSpanElement> & {
21
22
  size?: 'small' | 'medium';
@@ -1 +1 @@
1
- {"version":3,"file":"StateLabel.d.ts","sourceRoot":"","sources":["../../src/StateLabel/StateLabel.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;CAiBf,CAAA;AAqBD,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG;IACpE,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IACzB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;IAC5B,MAAM,EAAE,MAAM,OAAO,UAAU,CAAA;CAChC,CAAA;AAED,QAAA,MAAM,UAAU;WANP,OAAO,GAAG,QAAQ;IACzB,2EAA2E;cACjE,QAAQ,GAAG,OAAO;YACpB,MAAM,OAAO,UAAU;yCA+BhC,CAAA;AAID,eAAe,UAAU,CAAA"}
1
+ {"version":3,"file":"StateLabel.d.ts","sourceRoot":"","sources":["../../src/StateLabel/StateLabel.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;CAkBf,CAAA;AAyBD,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,GAAG;IACpE,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IACzB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;IAC5B,MAAM,EAAE,MAAM,OAAO,UAAU,CAAA;CAChC,CAAA;AAED,QAAA,MAAM,UAAU;WANP,OAAO,GAAG,QAAQ;IACzB,2EAA2E;cACjE,QAAQ,GAAG,OAAO;YACpB,MAAM,OAAO,UAAU;yCA+BhC,CAAA;AAID,eAAe,UAAU,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { c } from 'react-compiler-runtime';
2
- import { ShieldXIcon, ShieldSlashIcon, ShieldCheckIcon, ShieldIcon, AlertIcon, GitMergeQueueIcon, IssueDraftIcon, GitPullRequestDraftIcon, GitMergeIcon, GitPullRequestClosedIcon, SkipIcon, IssueClosedIcon, GitPullRequestIcon, IssueOpenedIcon } from '@primer/octicons-react';
2
+ import { ArchiveIcon, ShieldXIcon, ShieldSlashIcon, ShieldCheckIcon, ShieldIcon, AlertIcon, GitMergeQueueIcon, IssueDraftIcon, GitPullRequestDraftIcon, GitMergeIcon, GitPullRequestClosedIcon, SkipIcon, IssueClosedIcon, GitPullRequestIcon, IssueOpenedIcon } from '@primer/octicons-react';
3
3
  import { forwardRef } from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import classes from './StateLabel.module.css.js';
@@ -22,7 +22,8 @@ const octiconMap = {
22
22
  alertDismissed: ShieldSlashIcon,
23
23
  alertClosed: ShieldXIcon,
24
24
  open: null,
25
- closed: null
25
+ closed: null,
26
+ archived: ArchiveIcon
26
27
  };
27
28
  const labelMap = {
28
29
  issueOpened: 'Issue',
@@ -39,6 +40,7 @@ const labelMap = {
39
40
  alertFixed: 'Alert',
40
41
  alertDismissed: 'Alert',
41
42
  alertClosed: 'Alert',
43
+ archived: 'Archived',
42
44
  open: '',
43
45
  closed: ''
44
46
  };
@@ -1,4 +1,4 @@
1
- import './StateLabel-056eec66.css';
1
+ import './StateLabel-cd51ae39.css';
2
2
 
3
3
  var classes = {"StateLabel":"prc-StateLabel-StateLabel-Iawzp","Icon":"prc-StateLabel-Icon-YICrR"};
4
4
 
@@ -1,2 +1,2 @@
1
- @keyframes prc-TooltipV2-tooltip-appear-xyBco{0%{opacity:0}to{opacity:1}}.prc-TooltipV2-Tooltip-tLeuB{display:none}.prc-TooltipV2-Tooltip-tLeuB[popover]{margin:auto;max-width:250px;overflow:visible;padding:var(--overlay-paddingBlock-condensed,.25rem) var(--overlay-padding-condensed,.5rem);position:absolute;width:max-content;clip:auto;background:var(--tooltip-bgColor,#25292e);border:0;border-radius:var(--borderRadius-medium,.375rem);color:var(--tooltip-fgColor,#fff);font:var(--text-body-shorthand-small,400 .75rem/1.625 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji");overflow-wrap:break-word;text-align:center;white-space:normal;-webkit-font-smoothing:subpixel-antialiased;inset:auto;text-wrap:balance}.prc-TooltipV2-Tooltip-tLeuB[popover]:popover-open{display:block}.prc-TooltipV2-Tooltip-tLeuB[popover].\\:popover-open{display:block}@media (forced-colors:active){.prc-TooltipV2-Tooltip-tLeuB{outline:1px solid transparent}}.prc-TooltipV2-Tooltip-tLeuB:after{content:"";display:block;height:var(--overlay-offset,.25rem);left:0;position:absolute;right:0}.prc-TooltipV2-Tooltip-tLeuB[data-direction=n]:after,.prc-TooltipV2-Tooltip-tLeuB[data-direction=ne]:after,.prc-TooltipV2-Tooltip-tLeuB[data-direction=nw]:after{top:100%}.prc-TooltipV2-Tooltip-tLeuB[data-direction=s]:after,.prc-TooltipV2-Tooltip-tLeuB[data-direction=se]:after,.prc-TooltipV2-Tooltip-tLeuB[data-direction=sw]:after{bottom:100%}.prc-TooltipV2-Tooltip-tLeuB[data-direction=w]:after{left:100%}.prc-TooltipV2-Tooltip-tLeuB[data-direction=e]:after,.prc-TooltipV2-Tooltip-tLeuB[data-direction=w]:after{bottom:0;content:"";display:block;height:100%;position:absolute;width:8px}.prc-TooltipV2-Tooltip-tLeuB[data-direction=e]:after{margin-left:-8px;right:100%}@media screen and (prefers-reduced-motion:no-preference){.prc-TooltipV2-Tooltip-tLeuB:popover-open,.prc-TooltipV2-Tooltip-tLeuB:popover-open:before{animation-delay:0s;animation-duration:.1s;animation-fill-mode:forwards;animation-name:prc-TooltipV2-tooltip-appear-xyBco;animation-timing-function:ease-in}.prc-TooltipV2-Tooltip-tLeuB.\\:popover-open,.prc-TooltipV2-Tooltip-tLeuB.\\:popover-open:before{animation-delay:0s;animation-duration:.1s;animation-fill-mode:forwards;animation-name:prc-TooltipV2-tooltip-appear-xyBco;animation-timing-function:ease-in}}.prc-TooltipV2-KeybindingHintContainer-Ymj-3.prc-TooltipV2-HasTextBefore-fdOXj{margin-left:var(--base-size-6,.375rem)}.prc-TooltipV2-KeybindingHintContainer-Ymj-3.prc-TooltipV2-HasTextBefore-fdOXj.prc-TooltipV2-HasMultipleHints-9VYeg{margin-left:var(--base-size-8,.5rem)}
2
- /*# sourceMappingURL=Tooltip-dd983e5b.css.map */
1
+ @keyframes prc-TooltipV2-tooltip-appear-xyBco{0%{opacity:0}to{opacity:1}}.prc-TooltipV2-Tooltip-tLeuB{display:none}.prc-TooltipV2-Tooltip-tLeuB[popover]{margin:auto;max-width:250px;overflow:visible;padding:var(--overlay-paddingBlock-condensed,.25rem) var(--overlay-padding-condensed,.5rem);position:absolute;width:max-content;clip:auto;background:var(--tooltip-bgColor,#25292e);border:0;border-radius:var(--borderRadius-medium,.375rem);color:var(--tooltip-fgColor,#fff);font:var(--text-body-shorthand-small,400 .75rem/1.625 -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji");overflow-wrap:break-word;text-align:center;white-space:normal;-webkit-font-smoothing:subpixel-antialiased;inset:auto;text-wrap:balance}.prc-TooltipV2-Tooltip-tLeuB[popover]:popover-open{display:block}.prc-TooltipV2-Tooltip-tLeuB[popover].\\:popover-open{display:block}@media (forced-colors:active){.prc-TooltipV2-Tooltip-tLeuB{outline:1px solid transparent}}.prc-TooltipV2-Tooltip-tLeuB:after{content:"";display:block;height:var(--overlay-offset,.25rem);left:0;position:absolute;right:0}.prc-TooltipV2-Tooltip-tLeuB[data-direction=n]:after,.prc-TooltipV2-Tooltip-tLeuB[data-direction=ne]:after,.prc-TooltipV2-Tooltip-tLeuB[data-direction=nw]:after{top:100%}.prc-TooltipV2-Tooltip-tLeuB[data-direction=s]:after,.prc-TooltipV2-Tooltip-tLeuB[data-direction=se]:after,.prc-TooltipV2-Tooltip-tLeuB[data-direction=sw]:after{bottom:100%}.prc-TooltipV2-Tooltip-tLeuB[data-direction=w]:after{left:100%}.prc-TooltipV2-Tooltip-tLeuB[data-direction=e]:after,.prc-TooltipV2-Tooltip-tLeuB[data-direction=w]:after{bottom:0;content:"";display:block;height:100%;position:absolute;width:8px}.prc-TooltipV2-Tooltip-tLeuB[data-direction=e]:after{margin-left:-8px;right:100%}@media screen and (prefers-reduced-motion:no-preference){.prc-TooltipV2-Tooltip-tLeuB:popover-open,.prc-TooltipV2-Tooltip-tLeuB:popover-open:before{animation-delay:0s;animation-duration:.1s;animation-fill-mode:forwards;animation-name:prc-TooltipV2-tooltip-appear-xyBco;animation-timing-function:ease-in}.prc-TooltipV2-Tooltip-tLeuB.\\:popover-open,.prc-TooltipV2-Tooltip-tLeuB.\\:popover-open:before{animation-delay:0s;animation-duration:.1s;animation-fill-mode:forwards;animation-name:prc-TooltipV2-tooltip-appear-xyBco;animation-timing-function:ease-in}}.prc-TooltipV2-KeybindingHintContainer-Ymj-3.prc-TooltipV2-HasTextBefore-fdOXj{margin-left:var(--base-size-6,.375rem)}
2
+ /*# sourceMappingURL=Tooltip-fcb90d9c.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/TooltipV2/Tooltip.module.css.js"],"names":[],"mappings":"AACA,8CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,6BAEE,YA8GF,CA5GE,sCAME,WAAY,CAHZ,eAAgB,CAMhB,gBAAiB,CAJjB,2FAA+E,CAJ/E,iBAAkB,CAClB,iBAAkB,CASlB,SAAU,CAMV,yCAAkC,CAClC,QAAS,CACT,gDAAyC,CANzC,iCAA6B,CAD7B,8KAAsC,CAGtC,wBAAyB,CADzB,iBAAkB,CAElB,kBAAmB,CAInB,2CAA4C,CAC5C,UAAW,CACX,iBACF,CAGA,mDACE,aACF,CAIA,sDACE,aACF,CAEA,8BAxCF,6BAyCI,6BAuEJ,CAtEE,CAGA,mCAME,UAAW,CAFX,aAAc,CACd,mCAA6B,CAF7B,MAAO,CAFP,iBAAkB,CAClB,OAKF,CAGA,iKAGE,QACF,CAEA,iKAGE,WACF,CAEA,qDAGE,SAKF,CAGA,0GATE,QAAS,CAKT,UAAW,CAHX,aAAc,CAEd,WAAY,CALZ,iBAAkB,CAIlB,SAgBF,CAVA,qDAQE,gBAAiB,CANjB,UAQF,CAGA,yDAEE,2FAME,kBAAmB,CAHnB,sBAAwB,CACxB,4BAA6B,CAF7B,iDAA8B,CAG9B,iCAEF,CAGA,iGAME,kBAAmB,CAHnB,sBAAwB,CACxB,4BAA6B,CAF7B,iDAA8B,CAG9B,iCAEF,CACF,CAGF,+EACE,sCACF","file":"Tooltip-fcb90d9c.css","sourcesContent":["/* Animation definition */\n@keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n.Tooltip {\n /* Overriding the default popover styles */\n display: none;\n\n &[popover] {\n position: absolute;\n width: max-content;\n max-width: 250px;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed);\n margin: auto;\n\n /* for scrollbar */\n overflow: visible;\n /* stylelint-disable-next-line property-no-deprecated */\n clip: auto;\n font: var(--text-body-shorthand-small);\n color: var(--tooltip-fgColor);\n text-align: center;\n overflow-wrap: break-word;\n white-space: normal;\n background: var(--tooltip-bgColor);\n border: 0;\n border-radius: var(--borderRadius-medium);\n -webkit-font-smoothing: subpixel-antialiased;\n inset: auto;\n text-wrap: balance;\n }\n\n /* class name in chrome is :popover-open */\n &[popover]:popover-open {\n display: block;\n }\n\n /* class name in firefox and safari is \\:popover-open */\n /* stylelint-disable-next-line selector-class-pattern */\n &[popover]:global(.\\\\:popover-open) {\n display: block;\n }\n\n @media (forced-colors: active) {\n outline: 1px solid transparent;\n }\n\n /* This is needed to keep the tooltip open when the user leaves the trigger element to hover tooltip */\n &::after {\n position: absolute;\n right: 0;\n left: 0;\n display: block;\n height: var(--overlay-offset);\n content: '';\n }\n\n /* South, East, Southeast, Southwest after */\n &[data-direction='n']::after,\n &[data-direction='ne']::after,\n &[data-direction='nw']::after {\n top: 100%;\n }\n\n &[data-direction='s']::after,\n &[data-direction='se']::after,\n &[data-direction='sw']::after {\n bottom: 100%;\n }\n\n &[data-direction='w']::after {\n position: absolute;\n bottom: 0;\n left: 100%;\n display: block;\n width: 8px;\n height: 100%;\n content: '';\n }\n\n /* East before and after */\n &[data-direction='e']::after {\n position: absolute;\n right: 100%;\n bottom: 0;\n display: block;\n width: 8px;\n height: 100%;\n /* stylelint-disable-next-line primer/spacing */\n margin-left: -8px;\n content: '';\n }\n\n /* Only show animations if users don't have a preference for reduced motion */\n @media screen and (prefers-reduced-motion: no-preference) {\n /* Animation styles */\n &:popover-open,\n &:popover-open::before {\n animation-name: tooltip-appear;\n animation-duration: 0.1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: 0s;\n }\n\n /* Animation styles */\n &:global(.\\\\:popover-open) /* stylelint-disable-line selector-class-pattern */,\n &:global(.\\\\:popover-open)::before /* stylelint-disable-line selector-class-pattern */ {\n animation-name: tooltip-appear;\n animation-duration: 0.1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: 0s;\n }\n }\n}\n\n.KeybindingHintContainer.HasTextBefore {\n margin-left: var(--base-size-6);\n}\n"]}
@@ -6,7 +6,7 @@ export type TooltipProps = React.PropsWithChildren<{
6
6
  direction?: TooltipDirection;
7
7
  text: string;
8
8
  type?: 'label' | 'description';
9
- keybindingHint?: KeybindingHintProps['keys'] | Array<KeybindingHintProps['keys']>;
9
+ keybindingHint?: KeybindingHintProps['keys'];
10
10
  /**
11
11
  * Delay in milliseconds before showing the tooltip
12
12
  * @default short (50ms)
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/TooltipV2/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiD,KAAK,yBAAyB,EAAC,MAAM,OAAO,CAAA;AAS3G,OAAO,EAAoD,KAAK,mBAAmB,EAAC,MAAM,mBAAmB,CAAA;AAG7G,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,gBA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C,iBAAiB,CAAC;IACjD,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,GAAG,aAAa,CAAA;IAC9B,cAAc,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAA;IAC5C;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IACnC;;;;;;;;OAQG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;CACjC,CAAC,GACA,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AAiEnC,eAAO,MAAM,cAAc;gBAAoC,MAAM;EAAM,CAAA;AAE3E,eAAO,MAAM,OAAO,EAAE,yBAAyB,CAC7C,KAAK,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CACvE,GACC,UAgRD,CAAA"}
@@ -76,7 +76,6 @@ const isInteractive = element => {
76
76
  return interactiveElements.some(selector => element.matches(selector)) || element.hasAttribute('role') && element.getAttribute('role') === 'button';
77
77
  };
78
78
  const TooltipContext = /*#__PURE__*/React.createContext({});
79
- const emptyKeybindingHints = [];
80
79
  const Tooltip = /*#__PURE__*/React.forwardRef(({
81
80
  direction = 's',
82
81
  text,
@@ -84,7 +83,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
84
83
  children,
85
84
  id,
86
85
  className,
87
- keybindingHint = emptyKeybindingHints,
86
+ keybindingHint,
88
87
  delay = 'short',
89
88
  _privateDisableTooltip = false,
90
89
  ...rest
@@ -197,9 +196,6 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
197
196
  }, [isPopoverOpen]);
198
197
  const isMacOS = useIsMacOS();
199
198
  const hasAriaLabel = 'aria-label' in rest;
200
-
201
- // Normalize keybindingHint to an array for uniform rendering
202
- const keybindingHints = Array.isArray(keybindingHint) ? keybindingHint : [keybindingHint];
203
199
  return /*#__PURE__*/jsx(TooltipContext.Provider, {
204
200
  value: value,
205
201
  children: /*#__PURE__*/jsxs(Fragment, {
@@ -287,24 +283,22 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
287
283
  onMouseLeave: closeTooltip
288
284
  // If there is an aria-label prop, always assign the ID to the parent so the accessible label can be overridden
289
285
  ,
290
- id: hasAriaLabel || keybindingHints.length === 0 ? tooltipId : undefined,
291
- children: keybindingHints.length > 0 ? /*#__PURE__*/jsxs(Fragment, {
286
+ id: hasAriaLabel || !keybindingHint ? tooltipId : undefined,
287
+ children: keybindingHint ? /*#__PURE__*/jsxs(Fragment, {
292
288
  children: [/*#__PURE__*/jsxs("span", {
293
289
  id: hasAriaLabel ? undefined : tooltipId,
294
290
  children: [text, /*#__PURE__*/jsxs(VisuallyHidden, {
295
- children: ["(", keybindingHints.map(hint => getAccessibleKeybindingHintString(hint, isMacOS)).join(' or '), ")"]
291
+ children: ["(", getAccessibleKeybindingHintString(keybindingHint, isMacOS), ")"]
296
292
  })]
297
293
  }), /*#__PURE__*/jsx("span", {
298
- className: clsx(classes.KeybindingHintContainer, text && classes.HasTextBefore, keybindingHints.length > 1 && classes.HasMultipleHints),
294
+ className: clsx(classes.KeybindingHintContainer, text && classes.HasTextBefore),
299
295
  "aria-hidden": true,
300
- children: keybindingHints.map((hint, i) => /*#__PURE__*/jsxs(React.Fragment, {
301
- children: [i > 0 && ' or ', /*#__PURE__*/jsx(KeybindingHint, {
302
- keys: hint,
303
- format: "condensed",
304
- variant: "onEmphasis",
305
- size: "small"
306
- })]
307
- }, `${i}-${hint}`))
296
+ children: /*#__PURE__*/jsx(KeybindingHint, {
297
+ keys: keybindingHint,
298
+ format: "condensed",
299
+ variant: "onEmphasis",
300
+ size: "small"
301
+ })
308
302
  })]
309
303
  }) : text
310
304
  })]
@@ -1,5 +1,5 @@
1
- import './Tooltip-dd983e5b.css';
1
+ import './Tooltip-fcb90d9c.css';
2
2
 
3
- var classes = {"Tooltip":"prc-TooltipV2-Tooltip-tLeuB","tooltip-appear":"prc-TooltipV2-tooltip-appear-xyBco","KeybindingHintContainer":"prc-TooltipV2-KeybindingHintContainer-Ymj-3","HasTextBefore":"prc-TooltipV2-HasTextBefore-fdOXj","HasMultipleHints":"prc-TooltipV2-HasMultipleHints-9VYeg"};
3
+ var classes = {"Tooltip":"prc-TooltipV2-Tooltip-tLeuB","tooltip-appear":"prc-TooltipV2-tooltip-appear-xyBco","KeybindingHintContainer":"prc-TooltipV2-KeybindingHintContainer-Ymj-3","HasTextBefore":"prc-TooltipV2-HasTextBefore-fdOXj"};
4
4
 
5
5
  export { classes as default };
@@ -16,5 +16,4 @@ export { useMnemonics } from './useMnemonics';
16
16
  export { useRefObjectAsForwardedRef } from './useRefObjectAsForwardedRef';
17
17
  export { useId } from './useId';
18
18
  export { useIsMacOS } from './useIsMacOS';
19
- export { useMergedRefs } from './useMergedRefs';
20
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAA;AACrD,YAAY,EAAC,yBAAyB,EAAE,iBAAiB,EAAC,MAAM,qBAAqB,CAAA;AACrF,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAA;AAC3D,YAAY,EAAC,4BAA4B,EAAC,MAAM,wBAAwB,CAAA;AACxE,YAAY,EAAC,4BAA4B,EAAC,MAAM,uBAAuB,CAAA;AACvE,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,YAAY,EAAC,kBAAkB,EAAC,MAAM,cAAc,CAAA;AACpD,OAAO,EAAC,mBAAmB,EAAC,M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C,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,0BAA0B,EAAC,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAA;AAC7B,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA"}
@@ -6,18 +6,6 @@ import React from 'react';
6
6
  * This hook aims to encapsulate that logic, so the consumer doesn't need to be concerned with violating `rules-of-hooks`.
7
7
  * @param providedRef The ref to use - if undefined, will use the ref from a call to React.useRef
8
8
  * @type TRef The type of the RefObject which should be created.
9
- *
10
- * @deprecated This hook is incompatible with forwarded callback refs. Prefer `useMergedRefs` with an internally
11
- * created ref instead.
12
- *
13
- * ```diff
14
- * - const ref = useProvidedRefOrCreate(forwardedRef as RefObject<...>)
15
- * + const ref = useRef(null)
16
- * + const mergedRef = useMergedRefs(forwardedRef, ref)
17
- *
18
- * - return <div ref={ref} />
19
- * + return <div ref={mergedRef} />
20
- * ```
21
9
  */
22
10
  export declare function useProvidedRefOrCreate<TRef>(providedRef?: React.RefObject<TRef | null>): React.RefObject<TRef | null>;
23
11
  //# sourceMappingURL=useProvidedRefOrCreate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useProvidedRefOrCreate.d.ts","sourceRoot":"","sources":["../../src/hooks/useProvidedRefOrCreate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAGrH"}
1
+ {"version":3,"file":"useProvidedRefOrCreate.d.ts","sourceRoot":"","sources":["../../src/hooks/useProvidedRefOrCreate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAGrH"}
@@ -7,18 +7,6 @@ import React from 'react';
7
7
  * This hook aims to encapsulate that logic, so the consumer doesn't need to be concerned with violating `rules-of-hooks`.
8
8
  * @param providedRef The ref to use - if undefined, will use the ref from a call to React.useRef
9
9
  * @type TRef The type of the RefObject which should be created.
10
- *
11
- * @deprecated This hook is incompatible with forwarded callback refs. Prefer `useMergedRefs` with an internally
12
- * created ref instead.
13
- *
14
- * ```diff
15
- * - const ref = useProvidedRefOrCreate(forwardedRef as RefObject<...>)
16
- * + const ref = useRef(null)
17
- * + const mergedRef = useMergedRefs(forwardedRef, ref)
18
- *
19
- * - return <div ref={ref} />
20
- * + return <div ref={mergedRef} />
21
- * ```
22
10
  */
23
11
  function useProvidedRefOrCreate(providedRef) {
24
12
  const createdRef = React.useRef(null);
@@ -5,18 +5,6 @@ import type { ForwardedRef, RefObject } from 'react';
5
5
  * instance with `.current`.
6
6
  *
7
7
  * **NOTE**: The `refObject` should be passed to the underlying element, NOT the `forwardedRef`.
8
- *
9
- * @deprecated Migrate to `useMergedRefs`. It's safer, faster, and easier to use:
10
- *
11
- * ```diff
12
- * const ref = useRef(null)
13
- *
14
- * - useRefObjectAsForwardedRef(forwardedRef, ref)
15
- * + const mergedRef = useMergedRefs(forwardedRef, ref)
16
- *
17
- * - return <div ref={ref} />
18
- * + return <div ref={mergedRef} />
19
- * ```
20
8
  */
21
9
  export declare function useRefObjectAsForwardedRef<T>(forwardedRef: ForwardedRef<T>, refObject: RefObject<T | null>): void;
22
10
  //# sourceMappingURL=useRefObjectAsForwardedRef.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRefObjectAsForwardedRef.d.ts","sourceRoot":"","sources":["../../src/hooks/useRefObjectAsForwardedRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAGlD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAEjH"}
1
+ {"version":3,"file":"useRefObjectAsForwardedRef.d.ts","sourceRoot":"","sources":["../../src/hooks/useRefObjectAsForwardedRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAA;AAGlD;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAEjH"}
@@ -7,18 +7,6 @@ import { useImperativeHandle } from 'react';
7
7
  * instance with `.current`.
8
8
  *
9
9
  * **NOTE**: The `refObject` should be passed to the underlying element, NOT the `forwardedRef`.
10
- *
11
- * @deprecated Migrate to `useMergedRefs`. It's safer, faster, and easier to use:
12
- *
13
- * ```diff
14
- * const ref = useRef(null)
15
- *
16
- * - useRefObjectAsForwardedRef(forwardedRef, ref)
17
- * + const mergedRef = useMergedRefs(forwardedRef, ref)
18
- *
19
- * - return <div ref={ref} />
20
- * + return <div ref={mergedRef} />
21
- * ```
22
10
  */
23
11
  function useRefObjectAsForwardedRef(forwardedRef, refObject) {
24
12
  const $ = c(2);
package/dist/index.d.ts CHANGED
@@ -21,7 +21,6 @@ export type { FocusTrapHookSettings } from './hooks/useFocusTrap';
21
21
  export { useFocusZone } from './hooks/useFocusZone';
22
22
  export type { FocusZoneHookSettings } from './hooks/useFocusZone';
23
23
  export { useRefObjectAsForwardedRef } from './hooks/useRefObjectAsForwardedRef';
24
- export { useMergedRefs } from './hooks/useMergedRefs';
25
24
  export { useResizeObserver } from './hooks/useResizeObserver';
26
25
  export { useResponsiveValue, type ResponsiveValue } from './hooks/useResponsiveValue';
27
26
  export { default as useIsomorphicLayoutEffect } from './utils/useIsomorphicLayoutEffect';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,OAAO,IAAI,KAAK,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAC,MAAM,SAAS,CAAA;AACrF,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,cAAc,CAAA;AAClD,YAAY,EAAC,eAAe,EAAC,MAAM,cAAc,CAAA;AACjD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAE,QAAQ,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAA;AACrF,YAAY,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAA;AAGvD,cAAc,UAAU,CAAA;AACxB,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAA;AACjD,YAAY,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAA;AAC3D,YAAY,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAC,oBAAoB,E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A;AAC9C,YAAY,EAAC,aAAa,EAAC,MAAM,YAAY,CAAA;AAE7C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,YAAY,CAAA;AAC9C,YAAY,EAAC,aAAa,EAAC,MAAM,YAAY,CAAA;AAE7C,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAA;AACnC,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAC/C,YAAY,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAA;AAEzD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,YAAY,EAAC,iBAAiB,EAAE,qBAAqB,EAAC,MAAM,gBAAgB,CAAA;AAE5E,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,YAAY,EAAC,cAAc,EAAC,MAAM,aAAa,CAAA;AAE/C,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAA;AAC7B,YAAY,EAAC,UAAU,EAAE,cAAc,EAAC,MAAM,SAAS,CAAA;AAEvD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,YAAY,EACV,eAAe,EACf,UAAU,IAAI,oBAAoB,EAClC,YAAY,IAAI,sBAAsB,EACtC,cAAc,IAAI,wBAAwB,EAC1C,iBAAiB,IAAI,2BAA2B,GACjD,MAAM,cAAc,CAAA;AAErB,OAAO,EAAC,WAAW,EAAC,MAAM,YAAY,CAAA;AACtC,YAAY,EAAC,gBAAgB,EAAC,MAAM,YAAY,CAAA"}
package/dist/index.js CHANGED
@@ -12,7 +12,6 @@ export { ConfirmationDialog, useConfirm } from './ConfirmationDialog/Confirmatio
12
12
  export { useFocusTrap } from './hooks/useFocusTrap.js';
13
13
  export { useFocusZone } from './hooks/useFocusZone.js';
14
14
  export { useRefObjectAsForwardedRef } from './hooks/useRefObjectAsForwardedRef.js';
15
- export { useMergedRefs } from './hooks/useMergedRefs.js';
16
15
  export { useResizeObserver } from './hooks/useResizeObserver.js';
17
16
  export { useResponsiveValue } from './hooks/useResponsiveValue.js';
18
17
  export { default as useIsomorphicLayoutEffect } from './utils/useIsomorphicLayoutEffect.js';
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxOrRadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,MAAM,MAAM,yBAAyB,GAAG;IACtC,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,CAAC,iBAAiB,CAAC,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAyHD,YAAY,EAAC,8BAA8B,EAAC,MAAM,6BAA6B,CAAA;;;;;;;;;;AAC/E,wBAIE"}
1
+ {"version":3,"file":"CheckboxOrRadioGroup.d.ts","sourceRoot":"","sources":["../../../../src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,MAAM,MAAM,yBAAyB,GAAG;IACtC,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,CAAC,iBAAiB,CAAC,CAAC,EAAE,MAAM,CAAA;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAoHD,YAAY,EAAC,8BAA8B,EAAC,MAAM,6BAA6B,CAAA;;;;;;;;;;AAC/E,wBAIE"}
@@ -10,7 +10,7 @@ import { useSlots } from '../../../hooks/useSlots.js';
10
10
  import classes from './CheckboxOrRadioGroup.module.css.js';
11
11
  import { clsx } from 'clsx';
12
12
  import { isSlot } from '../../../utils/is-slot.js';
13
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
+ import { jsx, jsxs } from 'react/jsx-runtime';
14
14
 
15
15
  const CheckboxOrRadioGroup = ({
16
16
  'aria-labelledby': ariaLabelledby,
@@ -31,7 +31,6 @@ const CheckboxOrRadioGroup = ({
31
31
  const id = useId(idProp);
32
32
  const validationMessageId = validationChild ? `${id}-validationMessage` : undefined;
33
33
  const captionId = captionChild ? `${id}-caption` : undefined;
34
- const requiredMessageId = required ? `${id}-requiredMessage` : undefined;
35
34
  if (!labelChild && !ariaLabelledby) {
36
35
  // eslint-disable-next-line no-console
37
36
  console.warn('A choice group must be labelled using a `CheckboxOrRadioGroup.Label` child, or by passing `aria-labelledby` to the CheckboxOrRadioGroup component.');
@@ -62,27 +61,19 @@ const CheckboxOrRadioGroup = ({
62
61
  jsxs("legend", {
63
62
  className: classes.GroupLegend,
64
63
  "data-legend-visible": isLegendVisible ? '' : undefined,
65
- children: [slots.label, required && /*#__PURE__*/jsx(VisuallyHidden, {
66
- children: ", required"
67
- }), slots.caption, /*#__PURE__*/React.isValidElement(slots.validation) && slots.validation.props.children && /*#__PURE__*/jsx(VisuallyHidden, {
64
+ children: [slots.label, slots.caption, /*#__PURE__*/React.isValidElement(slots.validation) && slots.validation.props.children && /*#__PURE__*/jsx(VisuallyHidden, {
68
65
  children: slots.validation.props.children
69
66
  })]
70
- }) :
71
- /*#__PURE__*/
67
+ }) : (
72
68
  /*
73
- If CheckboxOrRadioGroup.Label wasn't passed as a child, we don't render a <legend>
74
- but we still want to render a caption
75
- */
76
- jsxs(Fragment, {
77
- children: [slots.caption, required && requiredMessageId && /*#__PURE__*/jsx(VisuallyHidden, {
78
- id: requiredMessageId,
79
- children: "Required"
80
- })]
81
- }), /*#__PURE__*/jsx("div", {
69
+ If CheckboxOrRadioGroup.Label wasn't passed as a child, we don't render a <legend>
70
+ but we still want to render a caption
71
+ */
72
+ slots.caption), /*#__PURE__*/jsx("div", {
82
73
  className: classes.Body,
83
74
  ...(!labelChild ? {
84
75
  ['aria-labelledby']: ariaLabelledby,
85
- ['aria-describedby']: [validationMessageId, captionId, requiredMessageId].filter(Boolean).join(' '),
76
+ ['aria-describedby']: [validationMessageId, captionId].filter(Boolean).join(' '),
86
77
  as: 'div',
87
78
  role: 'group'
88
79
  } : {}),
@@ -0,0 +1,2 @@
1
+ export declare function useMergedRefs<T>(...refs: Array<React.MutableRefObject<T> | React.ForwardedRef<T> | React.RefCallback<T>>): React.RefCallback<T>;
2
+ //# sourceMappingURL=useMergedRefs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMergedRefs.d.ts","sourceRoot":"","sources":["../../../src/internal/hooks/useMergedRefs.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,CAAC,EAC7B,GAAG,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GACvF,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAWtB"}
@@ -0,0 +1,16 @@
1
+ import { useCallback } from 'react';
2
+
3
+ function useMergedRefs(...refs) {
4
+ return useCallback(instance => {
5
+ for (const ref of refs) {
6
+ if (typeof ref === 'function') {
7
+ ref(instance);
8
+ } else if (ref) {
9
+ ref.current = instance;
10
+ }
11
+ }
12
+ // eslint-disable-next-line react-hooks/exhaustive-deps
13
+ }, refs);
14
+ }
15
+
16
+ export { useMergedRefs };
@@ -2043,8 +2043,8 @@
2043
2043
  },
2044
2044
  {
2045
2045
  "name": "keybindingHint",
2046
- "type": "string | string[]",
2047
- "description": "Optional keybinding hint to show in the tooltip for this button. Pass a string for a single shortcut or an array of strings to show multiple shortcuts joined with \"or\". See the `KeybindingHint` component documentation for the correct format. Has no effect if tooltip is overridden or disabled. Does **not** bind any keybindings for this button - this is only for visual hints."
2046
+ "type": "string",
2047
+ "description": "Optional keybinding hint to show in the tooltip for this button. See the `KeybindingHint` component documentation for the correct format for this string. Has no effect if tooltip is overridden or disabled. Does **not** bind any keybindings for this button - this is only for visual hints."
2048
2048
  },
2049
2049
  {
2050
2050
  "name": "tooltipDirection",
@@ -7141,6 +7141,10 @@
7141
7141
  {
7142
7142
  "id": "components-statelabel-features--closed",
7143
7143
  "code": "() => <StateLabel status=\"closed\">Closed</StateLabel>"
7144
+ },
7145
+ {
7146
+ "id": "components-statelabel-features--archived",
7147
+ "code": "() => <StateLabel status=\"archived\">Archived</StateLabel>"
7144
7148
  }
7145
7149
  ],
7146
7150
  "importPath": "@primer/react",
@@ -7152,7 +7156,7 @@
7152
7156
  },
7153
7157
  {
7154
7158
  "name": "status",
7155
- "type": "'issueOpened' | 'issueClosed' | 'issueClosedNotPlanned' | 'pullOpened' | 'pullClosed' | 'pullMerged' | 'draft' | 'issueDraft' | 'pullQueued' | 'unavailable' | 'alertOpened' | 'alertFixed' | 'alertDismissed' | 'alertClosed' | 'open' | 'closed'",
7159
+ "type": "'issueOpened' | 'issueClosed' | 'issueClosedNotPlanned' | 'pullOpened' | 'pullClosed' | 'pullMerged' | 'draft' | 'issueDraft' | 'pullQueued' | 'unavailable' | 'alertOpened' | 'alertFixed' | 'alertDismissed' | 'alertClosed' | 'open' | 'closed' | 'archived'",
7156
7160
  "required": true
7157
7161
  }
7158
7162
  ],
@@ -8298,8 +8302,8 @@
8298
8302
  },
8299
8303
  {
8300
8304
  "name": "keybindingHint",
8301
- "type": "string | string[]",
8302
- "description": "Optional keybinding hint to indicate the availability of a keyboard shortcut. Pass a string for a single shortcut or an array of strings to show multiple shortcuts joined with \"or\". Supported syntax is described in the docs for the `KeybindingHint` component."
8305
+ "type": "string",
8306
+ "description": "Optional keybinding hint to indicate the availability of a keyboard shortcut. Supported syntax is described in the docs for the `KeybindingHint` component."
8303
8307
  },
8304
8308
  {
8305
8309
  "name": "delay",
@@ -519,28 +519,6 @@
519
519
  "description": "The refs for the trapping container and the initial focus element."
520
520
  }
521
521
  },
522
- "useMergedRefs": {
523
- "name": "useMergedRefs",
524
- "importPath": "@primer/react",
525
- "stories": [],
526
- "parameters": [
527
- {
528
- "name": "refA",
529
- "type": "React.Ref<T> | undefined",
530
- "required": true,
531
- "description": "First ref to combine."
532
- },
533
- {
534
- "name": "refB",
535
- "type": "React.Ref<T> | undefined",
536
- "required": true,
537
- "description": "Second ref to combine."
538
- }
539
- ],
540
- "returns": {
541
- "type": "React.RefCallback<T>"
542
- }
543
- },
544
522
  "useOnEscapePress": {
545
523
  "name": "useOnEscapePress",
546
524
  "importPath": "@primer/react",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260319200330",
4
+ "version": "0.0.0-20260319210827",
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",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ActionMenu/ActionMenu.module.css.js"],"names":[],"mappings":"AAAA,0CAEE,gBAoEF,CAlEE,2EACE,uCACF,CAGA,sEACE,aACF,CAEA,wEACE,eACF,CAEA,wEACE,eACF,CAEA,yEACE,gBACF,CAGA,0EACE,gBACF,CAEA,yEACE,gBACF,CAEA,0EACE,gBACF,CAEA,yEACE,gBACF,CAEA,0EACE,gBACF,CAGA,6GACE,4BACF,CAEA,4GACE,4BACF,CAEA,6GACE,4BACF,CAEA,4GACE,4BACF,CAEA,6GACE,4BACF,CAEA,+EACE,2BAAuB,CAAvB,sBACF","file":"ActionMenu-58362ca7.css","sourcesContent":[".ActionMenuContainer {\n /* add default max height */\n max-height: 100vh;\n\n &:where([data-variant='fullscreen']) {\n padding-top: var(--base-size-36);\n }\n\n /* Overflow variants */\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 /* Max-height size tokens (mirror Overlay sizes) */\n &:where([data-max-height-xsmall]) {\n max-height: 192px;\n }\n\n &:where([data-max-height-small]) {\n max-height: 256px;\n }\n\n &:where([data-max-height-medium]) {\n max-height: 320px;\n }\n\n &:where([data-max-height-large]) {\n max-height: 432px;\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: 600px;\n }\n\n /* Max-height size tokens clamped to viewport (enabled via feature flag) */\n &:where([data-max-height-clamp-to-viewport][data-max-height-xsmall]) {\n max-height: min(192px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-small]) {\n max-height: min(256px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-medium]) {\n max-height: min(320px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-large]) {\n max-height: min(432px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-xlarge]) {\n max-height: min(600px, 100dvh);\n }\n\n &:where([data-max-height-fit-content]) {\n max-height: fit-content;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Overlay/Overlay.module.css.js"],"names":[],"mappings":"AAAA,4CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,2BAQE,mEAAwC,CACxC,8CAAwC,CACxC,mEAAwC,CALxC,WAAY,CACZ,gBAAiB,CAJjB,4BAA6B,CAE7B,eAAgB,CAGhB,aAAc,CANd,iBAAkB,CAElB,UAyNF,CAhNE,wIAKE,yBAA2B,CAF3B,uBAkBF,CAZI,mDADF,6LAGI,MAAO,CADP,KAGJ,CADE,CAGF,iKAIE,qBAAuB,CAFvB,mBAGF,CAGF,iCACE,YACF,CAEA,8BAvCF,2BAyCI,6BAmLJ,CAlLE,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,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAEA,0DACE,gBACF,CAEA,2DACE,gBACF,CAGA,8FACE,4BACF,CAEA,6FACE,4BACF,CAEA,8FACE,4BACF,CAEA,6FACE,4BACF,CAEA,8FACE,4BACF,CAEA,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,CAGE,mDADF,+DAUI,mBAAoB,CAHpB,YAAa,CAHb,MAAO,CAKP,QAAS,CADT,eAAgB,CAFhB,cAAe,CAMf,0CAA2C,CAV3C,cAAe,CACf,KAAM,CAEN,WAcJ,CALI,0BAdJ,+DAgBM,aAGN,CAFI,CACF,CAGF,0BAEE,4DACE,aACF,CACF,CAGF,8CACE,2BACE,wEACF,CACF","file":"Overlay-f81a131d.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: 192px;\n }\n\n &:where([data-max-height-small]) {\n max-height: 256px;\n }\n\n &:where([data-max-height-medium]) {\n max-height: 320px;\n }\n\n &:where([data-max-height-large]) {\n max-height: 432px;\n }\n\n &:where([data-max-height-xlarge]) {\n max-height: 600px;\n }\n\n /* Max-height size tokens clamped to viewport (enabled via feature flag) */\n &:where([data-max-height-clamp-to-viewport][data-max-height-xsmall]) {\n max-height: min(192px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-small]) {\n max-height: min(256px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-medium]) {\n max-height: min(320px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-large]) {\n max-height: min(432px, 100dvh);\n }\n\n &:where([data-max-height-clamp-to-viewport][data-max-height-xlarge]) {\n max-height: min(600px, 100dvh);\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 @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"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/StateLabel/StateLabel.module.css.js"],"names":[],"mappings":"AAAA,iCAEE,kBAAmB,CAMnB,kDAAuC,CAFvC,2DAAgC,CALhC,mBAAoB,CAEpB,gDAA6C,CAE7C,gBAAiB,CAEjB,iBAEF,CAGA,0DAEE,4CAAsC,CADtC,0DAEF,CAEA,2DAEE,8CAAuC,CADvC,2DAEF,CAGA,kEACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,4EACE,uEAAiD,CAEjD,gGAAmG,CADnG,2DAEF,CAEA,iEACE,4EAAgD,CAEhD,+FAAkG,CADlG,2DAEF,CAEA,iEACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,iEACE,kFAAmD,CAEnD,kGAAqG,CADrG,2DAEF,CAEA,kEACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,iEACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,4DACE,qGAAgF,CAEhF,kIACqF,CAFrF,2DAGF,CAEA,iEACE,qGAAgF,CAEhF,kIACqF,CAFrF,2DAGF,CAEA,kEACE,uEAAiD,CAEjD,gGAAmG,CADnG,2DAEF,CAEA,2DACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,6DACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,kEACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,iEACE,wEAA8C,CAE9C,6FAAgG,CADhG,2DAEF,CAEA,qEACE,qGAAgF,CAEhF,kIACqF,CAFrF,2DAGF,CAEA,kEACE,4EAAgD,CAEhD,+FAAkG,CADlG,2DAEF,CAEA,2BACE,sCACF,CAEA,oDACE,SACF","file":"StateLabel-056eec66.css","sourcesContent":[".StateLabel {\n display: inline-flex;\n align-items: center;\n font-weight: var(--base-text-weight-semibold);\n /* stylelint-disable-next-line primer/typography */\n line-height: 16px;\n color: var(--fgColor-onEmphasis);\n text-align: center;\n border-radius: var(--borderRadius-full);\n}\n\n/* Size variants */\n.StateLabel:where([data-size='small']) {\n padding: var(--base-size-4) var(--base-size-8);\n font-size: var(--text-body-size-small);\n}\n\n.StateLabel:where([data-size='medium']) {\n padding: var(--base-size-8) var(--base-size-12);\n font-size: var(--text-body-size-medium);\n}\n\n/* Status color variants */\n.StateLabel:where([data-status='issueClosed']) {\n background-color: var(--bgColor-done-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-done-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='issueClosedNotPlanned']) {\n background-color: var(--bgColor-neutral-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-neutral-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='pullClosed']) {\n background-color: var(--bgColor-closed-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-closed-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='pullMerged']) {\n background-color: var(--bgColor-done-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-done-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='pullQueued']) {\n background-color: var(--bgColor-attention-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-attention-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='issueOpened']) {\n background-color: var(--bgColor-open-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-open-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='pullOpened']) {\n background-color: var(--bgColor-open-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-open-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='draft']) {\n background-color: var(--bgColor-draft-emphasis, var(--bgColor-neutral-emphasis));\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px)\n var(--borderColor-draft-emphasis, var(--borderColor-neutral-emphasis, transparent));\n}\n\n.StateLabel:where([data-status='issueDraft']) {\n background-color: var(--bgColor-draft-emphasis, var(--bgColor-neutral-emphasis));\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px)\n var(--borderColor-draft-emphasis, var(--borderColor-neutral-emphasis, transparent));\n}\n\n.StateLabel:where([data-status='unavailable']) {\n background-color: var(--bgColor-neutral-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-neutral-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='open']) {\n background-color: var(--bgColor-open-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-open-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='closed']) {\n background-color: var(--bgColor-done-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-done-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='alertOpened']) {\n background-color: var(--bgColor-open-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-open-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='alertFixed']) {\n background-color: var(--bgColor-done-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-done-emphasis, transparent);\n}\n\n.StateLabel:where([data-status='alertDismissed']) {\n background-color: var(--bgColor-draft-emphasis, var(--bgColor-neutral-emphasis));\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px)\n var(--borderColor-draft-emphasis, var(--borderColor-neutral-emphasis, transparent));\n}\n\n.StateLabel:where([data-status='alertClosed']) {\n background-color: var(--bgColor-closed-emphasis);\n color: var(--fgColor-onEmphasis);\n box-shadow: var(--boxShadow-thin, inset 0 0 0 1px) var(--borderColor-closed-emphasis, transparent);\n}\n\n.Icon {\n margin-right: var(--base-size-4);\n}\n\n.Icon:where([data-size-small]) {\n width: 1em;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/TooltipV2/Tooltip.module.css.js"],"names":[],"mappings":"AACA,8CACE,GACE,SACF,CAEA,GACE,SACF,CACF,CAEA,6BAEE,YA8GF,CA5GE,sCAME,WAAY,CAHZ,eAAgB,CAMhB,gBAAiB,CAJjB,2FAA+E,CAJ/E,iBAAkB,CAClB,iBAAkB,CASlB,SAAU,CAMV,yCAAkC,CAClC,QAAS,CACT,gDAAyC,CANzC,iCAA6B,CAD7B,8KAAsC,CAGtC,wBAAyB,CADzB,iBAAkB,CAElB,kBAAmB,CAInB,2CAA4C,CAC5C,UAAW,CACX,iBACF,CAGA,mDACE,aACF,CAIA,sDACE,aACF,CAEA,8BAxCF,6BAyCI,6BAuEJ,CAtEE,CAGA,mCAME,UAAW,CAFX,aAAc,CACd,mCAA6B,CAF7B,MAAO,CAFP,iBAAkB,CAClB,OAKF,CAGA,iKAGE,QACF,CAEA,iKAGE,WACF,CAEA,qDAGE,SAKF,CAGA,0GATE,QAAS,CAKT,UAAW,CAHX,aAAc,CAEd,WAAY,CALZ,iBAAkB,CAIlB,SAgBF,CAVA,qDAQE,gBAAiB,CANjB,UAQF,CAGA,yDAEE,2FAME,kBAAmB,CAHnB,sBAAwB,CACxB,4BAA6B,CAF7B,iDAA8B,CAG9B,iCAEF,CAGA,iGAME,kBAAmB,CAHnB,sBAAwB,CACxB,4BAA6B,CAF7B,iDAA8B,CAG9B,iCAEF,CACF,CAGF,+EACE,sCACF,CAEA,oHACE,oCACF","file":"Tooltip-dd983e5b.css","sourcesContent":["/* Animation definition */\n@keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n.Tooltip {\n /* Overriding the default popover styles */\n display: none;\n\n &[popover] {\n position: absolute;\n width: max-content;\n max-width: 250px;\n /* stylelint-disable-next-line primer/spacing */\n padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed);\n margin: auto;\n\n /* for scrollbar */\n overflow: visible;\n /* stylelint-disable-next-line property-no-deprecated */\n clip: auto;\n font: var(--text-body-shorthand-small);\n color: var(--tooltip-fgColor);\n text-align: center;\n overflow-wrap: break-word;\n white-space: normal;\n background: var(--tooltip-bgColor);\n border: 0;\n border-radius: var(--borderRadius-medium);\n -webkit-font-smoothing: subpixel-antialiased;\n inset: auto;\n text-wrap: balance;\n }\n\n /* class name in chrome is :popover-open */\n &[popover]:popover-open {\n display: block;\n }\n\n /* class name in firefox and safari is \\:popover-open */\n /* stylelint-disable-next-line selector-class-pattern */\n &[popover]:global(.\\\\:popover-open) {\n display: block;\n }\n\n @media (forced-colors: active) {\n outline: 1px solid transparent;\n }\n\n /* This is needed to keep the tooltip open when the user leaves the trigger element to hover tooltip */\n &::after {\n position: absolute;\n right: 0;\n left: 0;\n display: block;\n height: var(--overlay-offset);\n content: '';\n }\n\n /* South, East, Southeast, Southwest after */\n &[data-direction='n']::after,\n &[data-direction='ne']::after,\n &[data-direction='nw']::after {\n top: 100%;\n }\n\n &[data-direction='s']::after,\n &[data-direction='se']::after,\n &[data-direction='sw']::after {\n bottom: 100%;\n }\n\n &[data-direction='w']::after {\n position: absolute;\n bottom: 0;\n left: 100%;\n display: block;\n width: 8px;\n height: 100%;\n content: '';\n }\n\n /* East before and after */\n &[data-direction='e']::after {\n position: absolute;\n right: 100%;\n bottom: 0;\n display: block;\n width: 8px;\n height: 100%;\n /* stylelint-disable-next-line primer/spacing */\n margin-left: -8px;\n content: '';\n }\n\n /* Only show animations if users don't have a preference for reduced motion */\n @media screen and (prefers-reduced-motion: no-preference) {\n /* Animation styles */\n &:popover-open,\n &:popover-open::before {\n animation-name: tooltip-appear;\n animation-duration: 0.1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: 0s;\n }\n\n /* Animation styles */\n &:global(.\\\\:popover-open) /* stylelint-disable-line selector-class-pattern */,\n &:global(.\\\\:popover-open)::before /* stylelint-disable-line selector-class-pattern */ {\n animation-name: tooltip-appear;\n animation-duration: 0.1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n animation-delay: 0s;\n }\n }\n}\n\n.KeybindingHintContainer.HasTextBefore {\n margin-left: var(--base-size-6);\n}\n\n.KeybindingHintContainer.HasTextBefore.HasMultipleHints {\n margin-left: var(--base-size-8);\n}\n"]}
@@ -1,51 +0,0 @@
1
- import type { ForwardedRef, Ref as StandardRef } from 'react';
2
- /**
3
- * Combine two refs of matching type (typically an external or forwarded ref and an internal `useRef` object or
4
- * callback ref).
5
- *
6
- * If you need to combine more than two refs (what are you doing?) just nest the hook:
7
- * `useMergedRefs(refA, useMergedRefs(refB, refC))`
8
- *
9
- * @param refA First ref to merge. The order is not important.
10
- * @param refB Second ref to merge. The order is not important.
11
- * @returns A new ref which must be passed to the relevant child component. **Important**: do not pass `refA` or
12
- * `refB` to the component!
13
- *
14
- * @example
15
- * // React 18
16
- * const Example = forwardRef<HTMLButtonElement, {}>((props, forwardedRef) => {
17
- * const ref = useRef<HTMLButtonElement>(null)
18
- * const combinedRef = useMergedRefs(forwardedRef, ref)
19
- *
20
- * return <button ref={combinedRef} />
21
- * })
22
- *
23
- * @example
24
- * // React 19
25
- * const Example = ({ref: externalRef}: {ref?: Ref<HTMLButtonElement>}) => {
26
- * const ref = useRef<HTMLButtonElement>(null)
27
- * const combinedRef = useMergedRefs(externalRef, ref)
28
- *
29
- * return <button ref={combinedRef} />
30
- * }
31
- */
32
- export declare function useMergedRefs<T>(refA: Ref<T | null>, refB: Ref<T | null>): (value: T | null) => () => void;
33
- type CleanupFunction = () => void;
34
- /**
35
- * React 19 supports callback refs that can return a cleanup function. If a cleanup function is returned, the
36
- * cleanup is called on unmount **instead** of setting the ref to null.
37
- */
38
- type React19RefCallback<T> = {
39
- bivarianceHack(instance: T): void | CleanupFunction;
40
- }['bivarianceHack'];
41
- /**
42
- * Supporting React 18 and 19 while alleviating the need for any hacks or casts in consumers:
43
- * - `ForwardedRef` from the React 18 `forwardRef` HOC
44
- * - `React19RefCallback` for callback refs that can return a cleanup function (this is included in `Ref` in React 19
45
- * but not in 18)
46
- * - `Ref` for standard refs from `useRef` or passed in as React 19 prop
47
- * - `undefined` to allow for easy use of optional `ref` props in React 19
48
- */
49
- type Ref<T> = ForwardedRef<T> | React19RefCallback<T> | StandardRef<T> | undefined;
50
- export {};
51
- //# sourceMappingURL=useMergedRefs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useMergedRefs.d.ts","sourceRoot":"","sources":["../../src/hooks/useMergedRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAE,GAAG,IAAI,WAAW,EAAmB,MAAM,OAAO,CAAA;AAG7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,WAE7D,CAAC,GAAG,IAAI,gBAiBnB;AAED,KAAK,eAAe,GAAG,MAAM,IAAI,CAAA;AAEjC;;;GAGG;AAEH,KAAK,kBAAkB,CAAC,CAAC,IAAI;IAC3B,cAAc,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,GAAG,eAAe,CAAA;CACpD,CAAC,gBAAgB,CAAC,CAAA;AAEnB;;;;;;;GAOG;AACH,KAAK,GAAG,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA"}
@@ -1,86 +0,0 @@
1
- import { c } from 'react-compiler-runtime';
2
- import 'react';
3
-
4
- /**
5
- * Combine two refs of matching type (typically an external or forwarded ref and an internal `useRef` object or
6
- * callback ref).
7
- *
8
- * If you need to combine more than two refs (what are you doing?) just nest the hook:
9
- * `useMergedRefs(refA, useMergedRefs(refB, refC))`
10
- *
11
- * @param refA First ref to merge. The order is not important.
12
- * @param refB Second ref to merge. The order is not important.
13
- * @returns A new ref which must be passed to the relevant child component. **Important**: do not pass `refA` or
14
- * `refB` to the component!
15
- *
16
- * @example
17
- * // React 18
18
- * const Example = forwardRef<HTMLButtonElement, {}>((props, forwardedRef) => {
19
- * const ref = useRef<HTMLButtonElement>(null)
20
- * const combinedRef = useMergedRefs(forwardedRef, ref)
21
- *
22
- * return <button ref={combinedRef} />
23
- * })
24
- *
25
- * @example
26
- * // React 19
27
- * const Example = ({ref: externalRef}: {ref?: Ref<HTMLButtonElement>}) => {
28
- * const ref = useRef<HTMLButtonElement>(null)
29
- * const combinedRef = useMergedRefs(externalRef, ref)
30
- *
31
- * return <button ref={combinedRef} />
32
- * }
33
- */
34
- function useMergedRefs(refA, refB) {
35
- const $ = c(3);
36
- let t0;
37
- if ($[0] !== refA || $[1] !== refB) {
38
- t0 = value => {
39
- const cleanupA = setRef(refA, value);
40
- const cleanupB = setRef(refB, value);
41
- return () => {
42
- if (cleanupA) {
43
- cleanupA();
44
- } else {
45
- setRef(refA, null);
46
- }
47
- if (cleanupB) {
48
- cleanupB();
49
- } else {
50
- setRef(refB, null);
51
- }
52
- };
53
- };
54
- $[0] = refA;
55
- $[1] = refB;
56
- $[2] = t0;
57
- } else {
58
- t0 = $[2];
59
- }
60
- return t0;
61
- }
62
-
63
- /**
64
- * React 19 supports callback refs that can return a cleanup function. If a cleanup function is returned, the
65
- * cleanup is called on unmount **instead** of setting the ref to null.
66
- */
67
- // bivarianceHack copied from React types
68
-
69
- /**
70
- * Supporting React 18 and 19 while alleviating the need for any hacks or casts in consumers:
71
- * - `ForwardedRef` from the React 18 `forwardRef` HOC
72
- * - `React19RefCallback` for callback refs that can return a cleanup function (this is included in `Ref` in React 19
73
- * but not in 18)
74
- * - `Ref` for standard refs from `useRef` or passed in as React 19 prop
75
- * - `undefined` to allow for easy use of optional `ref` props in React 19
76
- */
77
-
78
- function setRef(ref, value) {
79
- if (typeof ref === 'function') {
80
- return ref(value);
81
- } else if (ref) {
82
- ref.current = value;
83
- }
84
- }
85
-
86
- export { useMergedRefs };