@primer/react 0.0.0-20260506230046 → 0.0.0-20260506232328

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,17 +1,23 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260506230046
3
+ ## 0.0.0-20260506232328
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - [#7776](https://github.com/primer/react/pull/7776) [`8b36590`](https://github.com/primer/react/commit/8b365905a171b48f2efe1e81b8b82d94d1697c93) Thanks [@llastflowers](https://github.com/llastflowers)! - Add `data-component` attributes for Blankslate, BranchName, Breadcrumbs, ButtonGroup, Checkbox, CheckboxGroup, CircleBadge, ConfirmationDialog, and CounterLabel to provide stable selectors.
8
-
9
- - [#7755](https://github.com/primer/react/pull/7755) [`0e868f9`](https://github.com/primer/react/commit/0e868f9c34ee6d073485e81651a16e92d3ff822c) Thanks [@francinelucca](https://github.com/francinelucca)! - feat: add ActionList, SelectPanel primitives exports and new FilteredActionList.Input components
7
+ - [#7776](https://github.com/primer/react/pull/7776) [`8b36590`](https://github.com/primer/react/commit/8b365905a171b48f2efe1e81b8b82d94d1697c93) Thanks [@llastflowers](https://github.com/llastflowers)! - Add `data-component` attributes for Blankslate, BranchName, Breadcrumbs, ButtonGroup, Checkbox, CheckboxGroup, CircleBadge, ConfirmationDialog, CounterLabel, and Dialog to provide stable selectors.
10
8
 
11
9
  ### Patch Changes
12
10
 
13
11
  - Fake entry to force publishing
14
12
 
13
+ ## 38.22.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [#7755](https://github.com/primer/react/pull/7755) [`0e868f9`](https://github.com/primer/react/commit/0e868f9c34ee6d073485e81651a16e92d3ff822c) Thanks [@francinelucca](https://github.com/francinelucca)! - feat: add ActionList, SelectPanel primitives exports and new FilteredActionList.Input components
18
+
19
+ ### Patch Changes
20
+
15
21
  - [#7797](https://github.com/primer/react/pull/7797) [`3e05935`](https://github.com/primer/react/commit/3e059351a65b18e99d006facc1863feb94be0a7e) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Breadcrumbs overflow menu no longer appears when there are only two crumb items.
16
22
 
17
23
  - [#7511](https://github.com/primer/react/pull/7511) [`eb73dee`](https://github.com/primer/react/commit/eb73deea0c9f8fb0fdb44b28445eebc748a39443) Thanks [@RSoeborg](https://github.com/RSoeborg)! - Fix NavList parent item flicker during static-to-interactive transitions when navigating between current sub-items in a SubNav.
@@ -14,7 +14,7 @@ type LinkProps = {
14
14
  className?: string;
15
15
  };
16
16
  export type ActionListLinkItemProps = Pick<ActionListItemProps, 'active' | 'children' | 'inactiveText' | 'variant' | 'size'> & LinkProps;
17
- declare const LinkItemComponent: <As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & LinkProps extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & LinkProps ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
17
+ declare const LinkItemComponent: <As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "active" | "children" | "inactiveText" | "size" | "variant"> & LinkProps extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "active" | "children" | "inactiveText" | "size" | "variant"> & LinkProps ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
18
18
  as?: As | undefined;
19
19
  } & React.RefAttributes<unknown>) => React.ReactNode;
20
20
  export declare const LinkItem: WithSlotMarker<typeof LinkItemComponent>;
@@ -84,7 +84,7 @@ export declare const ActionList: (<As extends React.ElementType = "ul">(props: (
84
84
  __SLOT__: symbol;
85
85
  };
86
86
  /** A `Item` that renders a full-size anchor inside ListItem */
87
- LinkItem: import("../utils/types").WithSlotMarker<(<As extends React.ElementType = "a">(props: (import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & {
87
+ LinkItem: import("../utils/types").WithSlotMarker<(<As extends React.ElementType = "a">(props: (import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "active" | "children" | "inactiveText" | "size" | "variant"> & {
88
88
  download?: string;
89
89
  href?: string;
90
90
  hrefLang?: string;
@@ -95,7 +95,7 @@ export declare const ActionList: (<As extends React.ElementType = "ul">(props: (
95
95
  type?: string;
96
96
  referrerPolicy?: React.AnchorHTMLAttributes<HTMLAnchorElement>["referrerPolicy"];
97
97
  className?: string;
98
- } extends infer T ? T extends import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & {
98
+ } extends infer T ? T extends import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "active" | "children" | "inactiveText" | "size" | "variant"> & {
99
99
  download?: string;
100
100
  href?: string;
101
101
  hrefLang?: string;
@@ -28,7 +28,7 @@ declare const _default: React.FC<React.PropsWithChildren<{
28
28
  } | null>;
29
29
  Input: import("../utils/polymorphic").ForwardRefComponent<import("../utils/polymorphic").ForwardRefComponent<"input", import("..").TextInputProps> & {
30
30
  __SLOT__: symbol;
31
- Action: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "aria-label" | "tooltipDirection"> & {
31
+ Action: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "size" | "tooltipDirection"> & {
32
32
  children?: React.ReactNode;
33
33
  "aria-label"?: string;
34
34
  tooltipDirection?: "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
@@ -7,7 +7,7 @@ export declare function transition(direction: Exclude<SortDirection, 'NONE'>): E
7
7
  /**
8
8
  * A sort strategy for comparing any two values
9
9
  */
10
- export declare function basic<T>(a: T, b: T): 1 | 0 | -1;
10
+ export declare function basic<T>(a: T, b: T): -1 | 0 | 1;
11
11
  /**
12
12
  * A sort strategy for comparing two `Date` values. Also includes support for
13
13
  * values from `Date.now()`
@@ -37,7 +37,7 @@ export type TextInputNonPassthroughProps = {
37
37
  export type TextInputProps = Merge<React.ComponentPropsWithoutRef<'input'>, TextInputNonPassthroughProps>;
38
38
  declare const _default: PolymorphicForwardRefComponent<"input", TextInputProps> & {
39
39
  __SLOT__: symbol;
40
- Action: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "aria-label" | "tooltipDirection"> & {
40
+ Action: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "size" | "tooltipDirection"> & {
41
41
  children?: React.ReactNode;
42
42
  "aria-label"?: string;
43
43
  tooltipDirection?: "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
@@ -48,11 +48,11 @@ declare const TextInputWithTokens: React.ForwardRefExoticComponent<{
48
48
  * The array of tokens to render
49
49
  */
50
50
  tokens: any[] | (Omit<(Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
51
- ref?: ((instance: HTMLAnchorElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLAnchorElement> | null | undefined;
51
+ ref?: RefObject<HTMLAnchorElement> | ((instance: HTMLAnchorElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
52
52
  }) | (Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
53
- ref?: ((instance: HTMLButtonElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLButtonElement> | null | undefined;
53
+ ref?: RefObject<HTMLButtonElement> | ((instance: HTMLButtonElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
54
54
  }) | (Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
55
- ref?: ((instance: HTMLSpanElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | RefObject<HTMLSpanElement> | null | undefined;
55
+ ref?: RefObject<HTMLSpanElement> | ((instance: HTMLSpanElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | null | undefined;
56
56
  }), keyof import("..").TokenProps> & import("..").TokenProps & {
57
57
  as?: "a" | "button" | "span" | undefined;
58
58
  })[];
@@ -10,10 +10,10 @@ declare const data: {
10
10
  login: string;
11
11
  recommended: boolean;
12
12
  } | {
13
+ recommended?: undefined;
13
14
  id: string;
14
15
  name: string;
15
16
  login: string;
16
- recommended?: undefined;
17
17
  })[];
18
18
  labels: ({
19
19
  color: string;
@@ -38,18 +38,18 @@ declare const data: {
38
38
  name: string;
39
39
  trailingInfo: string;
40
40
  } | {
41
+ trailingInfo?: undefined;
41
42
  id: string;
42
43
  name: string;
43
- trailingInfo?: undefined;
44
44
  })[];
45
45
  tags: ({
46
46
  id: string;
47
47
  name: string;
48
48
  trailingInfo: string;
49
49
  } | {
50
+ trailingInfo?: undefined;
50
51
  id: string;
51
52
  name: string;
52
- trailingInfo?: undefined;
53
53
  })[];
54
54
  repos: {
55
55
  org: string;
@@ -9,7 +9,7 @@
9
9
  * This is adapted almost directly from https://beta.reactjs.org/learn/you-might-not-need-an-effect#adjusting-some-state-when-a-prop-changes
10
10
  */
11
11
  export declare const useSyncedState: <T>(initialValue: T | (() => T), { isPropUpdateDisabled, isEqual }?: {
12
- isPropUpdateDisabled?: boolean | undefined;
13
12
  isEqual?: ((value1: any, value2: any) => boolean) | undefined;
13
+ isPropUpdateDisabled?: boolean | undefined;
14
14
  }) => readonly [T, import("react").Dispatch<import("react").SetStateAction<T>>];
15
15
  //# sourceMappingURL=useSyncedState.d.ts.map
@@ -16,7 +16,7 @@ export type TextInputActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonEle
16
16
  */
17
17
  variant?: ButtonProps['variant'];
18
18
  };
19
- declare const TextInputAction: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size" | "aria-label" | "tooltipDirection"> & {
19
+ declare const TextInputAction: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label" | "size" | "tooltipDirection"> & {
20
20
  /** @deprecated Text input action buttons should only use icon buttons */
21
21
  children?: React.ReactNode;
22
22
  /** Text that appears in a tooltip. If an icon is passed, this is also used as the label used by assistive technologies. */
package/dist/theme.d.ts CHANGED
@@ -29,7 +29,7 @@ declare const theme: {
29
29
  xlarge: string;
30
30
  };
31
31
  space: string[];
32
- colorSchemes: Record<"light" | "light_high_contrast" | "light_colorblind" | "light_tritanopia" | "dark" | "dark_dimmed" | "dark_high_contrast" | "dark_colorblind" | "dark_tritanopia", {
32
+ colorSchemes: Record<"dark" | "dark_colorblind" | "dark_dimmed" | "dark_high_contrast" | "dark_tritanopia" | "light" | "light_colorblind" | "light_high_contrast" | "light_tritanopia", {
33
33
  colors: Partial<{
34
34
  colors: {
35
35
  canvasDefaultTransparent: string;
@@ -1,4 +1,4 @@
1
- import { useEffect } from 'react';
2
- declare const useIsomorphicLayoutEffect: typeof useEffect;
1
+ import { useLayoutEffect } from 'react';
2
+ declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
3
3
  export default useIsomorphicLayoutEffect;
4
4
  //# sourceMappingURL=useIsomorphicLayoutEffect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useIsomorphicLayoutEffect.d.ts","sourceRoot":"","sources":["../../src/utils/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAkB,MAAM,OAAO,CAAA;AAEhD,QAAA,MAAM,yBAAyB,kBAOhB,CAAA;AAEf,eAAe,yBAAyB,CAAA"}
1
+ {"version":3,"file":"useIsomorphicLayoutEffect.d.ts","sourceRoot":"","sources":["../../src/utils/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,eAAe,EAAC,MAAM,OAAO,CAAA;AAEhD,QAAA,MAAM,yBAAyB,wBAOhB,CAAA;AAEf,eAAe,yBAAyB,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260506230046",
4
+ "version": "0.0.0-20260506232328",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -178,7 +178,7 @@
178
178
  "ts-toolbelt": "9.6.0",
179
179
  "tsx": "4.20.3",
180
180
  "typed-css-modules": "^0.9.1",
181
- "typescript": "^5.9.2",
181
+ "typescript": "^6.0.3",
182
182
  "typescript-plugin-css-modules": "^5.2.0",
183
183
  "unist-util-find": "3.0.0",
184
184
  "unist-util-find-before": "4.0.0",