@primer/react 0.0.0-20260424043508 → 0.0.0-20260424044536

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,6 +1,6 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260424043508
3
+ ## 0.0.0-20260424044536
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -147,6 +147,8 @@ function FilteredActionList({
147
147
  // Items are measured dynamically via `measureElement`, so this only affects the
148
148
  // initial total-height estimate before items scroll into view.
149
149
  const DEFAULT_VIRTUAL_ITEM_HEIGHT = 32;
150
+
151
+ // eslint-disable-next-line react-hooks/incompatible-library
150
152
  const virtualizer = useVirtualizer({
151
153
  count: items.length,
152
154
  getScrollElement: () => scrollContainerRef.current,
@@ -384,11 +386,10 @@ function FilteredActionList({
384
386
  "data-component": "FilteredActionList",
385
387
  children: [/*#__PURE__*/jsx(FilteredActionListInput, {
386
388
  inputRef: inputRef,
387
- filterValue: filterValue,
389
+ value: filterValue,
388
390
  onInputChange: onInputChange,
389
391
  onInputKeyPress: onInputKeyPress,
390
- onInputKeyDown: onInputKeyDown,
391
- usingRovingTabindex: usingRovingTabindex,
392
+ onInputKeyDown: usingRovingTabindex ? onInputKeyDown : undefined,
392
393
  placeholderText: placeholderText,
393
394
  listId: listId,
394
395
  inputDescriptionTextId: inputDescriptionTextId,
@@ -2,16 +2,14 @@ import type React from 'react';
2
2
  import type { TextInputProps } from '../TextInput';
3
3
  export interface FilteredActionLsitInputProps extends Partial<Omit<TextInputProps, 'onChange'>> {
4
4
  inputRef: React.RefObject<HTMLInputElement | null>;
5
- filterValue: string;
6
- onInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
7
- onInputKeyPress: React.KeyboardEventHandler<HTMLInputElement>;
8
- onInputKeyDown: React.KeyboardEventHandler<HTMLInputElement>;
9
- usingRovingTabindex: boolean;
5
+ onInputChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
6
+ onInputKeyPress?: React.KeyboardEventHandler<HTMLInputElement>;
7
+ onInputKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
10
8
  placeholderText?: string;
11
9
  listId: string;
12
10
  inputDescriptionTextId: string;
13
11
  loading: boolean;
14
12
  fullScreenOnNarrow?: boolean;
15
13
  }
16
- export declare function FilteredActionListInput({ inputRef, filterValue, onInputChange, onInputKeyPress, onInputKeyDown, usingRovingTabindex, placeholderText, listId, inputDescriptionTextId, loading, fullScreenOnNarrow, className, ...restTextInputProps }: FilteredActionLsitInputProps): React.JSX.Element;
14
+ export declare function FilteredActionListInput({ inputRef, value, onInputChange, onInputKeyPress, onInputKeyDown, placeholderText, listId, inputDescriptionTextId, loading, fullScreenOnNarrow, className, ...restTextInputProps }: FilteredActionLsitInputProps): React.JSX.Element;
17
15
  //# sourceMappingURL=FilteredActionListInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilteredActionListInput.d.ts","sourceRoot":"","sources":["../../src/FilteredActionList/FilteredActionListInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,cAAc,CAAA;AAGhD,MAAM,WAAW,4BAA6B,SAAQ,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;IAC7F,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;IAClD,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAC/D,eAAe,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;IAC7D,cAAc,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;IAC5D,mBAAmB,EAAE,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,sBAAsB,EAAE,MAAM,CAAA;IAC9B,OAAO,EAAE,OAAO,CAAA;IAChB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,WAAW,EACX,aAAa,EACb,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,MAAM,EACN,sBAAsB,EACtB,OAAO,EACP,kBAAkB,EAClB,SAAS,EACT,GAAG,kBAAkB,EACtB,EAAE,4BAA4B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2BlD"}
1
+ {"version":3,"file":"FilteredActionListInput.d.ts","sourceRoot":"","sources":["../../src/FilteredActionList/FilteredActionListInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,cAAc,CAAA;AAGhD,MAAM,WAAW,4BAA6B,SAAQ,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;IAC7F,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;IAClD,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAChE,eAAe,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;IAC9D,cAAc,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;IAC7D,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,sBAAsB,EAAE,MAAM,CAAA;IAC9B,OAAO,EAAE,OAAO,CAAA;IAChB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,KAAK,EACL,aAAa,EACb,eAAe,EACf,cAAc,EACd,eAAe,EACf,MAAM,EACN,sBAAsB,EACtB,OAAO,EACP,kBAAkB,EAClB,SAAS,EACT,GAAG,kBAAkB,EACtB,EAAE,4BAA4B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA2BlD"}
@@ -5,9 +5,8 @@ import { jsx } from 'react/jsx-runtime';
5
5
  import TextInput from '../TextInput/TextInput.js';
6
6
 
7
7
  function FilteredActionListInput(t0) {
8
- const $ = c(29);
8
+ const $ = c(28);
9
9
  let className;
10
- let filterValue;
11
10
  let fullScreenOnNarrow;
12
11
  let inputDescriptionTextId;
13
12
  let inputRef;
@@ -18,15 +17,14 @@ function FilteredActionListInput(t0) {
18
17
  let onInputKeyPress;
19
18
  let placeholderText;
20
19
  let restTextInputProps;
21
- let usingRovingTabindex;
20
+ let value;
22
21
  if ($[0] !== t0) {
23
22
  ({
24
23
  inputRef,
25
- filterValue,
24
+ value,
26
25
  onInputChange,
27
26
  onInputKeyPress,
28
27
  onInputKeyDown,
29
- usingRovingTabindex,
30
28
  placeholderText,
31
29
  listId,
32
30
  inputDescriptionTextId,
@@ -37,48 +35,45 @@ function FilteredActionListInput(t0) {
37
35
  } = t0);
38
36
  $[0] = t0;
39
37
  $[1] = className;
40
- $[2] = filterValue;
41
- $[3] = fullScreenOnNarrow;
42
- $[4] = inputDescriptionTextId;
43
- $[5] = inputRef;
44
- $[6] = listId;
45
- $[7] = loading;
46
- $[8] = onInputChange;
47
- $[9] = onInputKeyDown;
48
- $[10] = onInputKeyPress;
49
- $[11] = placeholderText;
50
- $[12] = restTextInputProps;
51
- $[13] = usingRovingTabindex;
38
+ $[2] = fullScreenOnNarrow;
39
+ $[3] = inputDescriptionTextId;
40
+ $[4] = inputRef;
41
+ $[5] = listId;
42
+ $[6] = loading;
43
+ $[7] = onInputChange;
44
+ $[8] = onInputKeyDown;
45
+ $[9] = onInputKeyPress;
46
+ $[10] = placeholderText;
47
+ $[11] = restTextInputProps;
48
+ $[12] = value;
52
49
  } else {
53
50
  className = $[1];
54
- filterValue = $[2];
55
- fullScreenOnNarrow = $[3];
56
- inputDescriptionTextId = $[4];
57
- inputRef = $[5];
58
- listId = $[6];
59
- loading = $[7];
60
- onInputChange = $[8];
61
- onInputKeyDown = $[9];
62
- onInputKeyPress = $[10];
63
- placeholderText = $[11];
64
- restTextInputProps = $[12];
65
- usingRovingTabindex = $[13];
51
+ fullScreenOnNarrow = $[2];
52
+ inputDescriptionTextId = $[3];
53
+ inputRef = $[4];
54
+ listId = $[5];
55
+ loading = $[6];
56
+ onInputChange = $[7];
57
+ onInputKeyDown = $[8];
58
+ onInputKeyPress = $[9];
59
+ placeholderText = $[10];
60
+ restTextInputProps = $[11];
61
+ value = $[12];
66
62
  }
67
- const t1 = usingRovingTabindex ? onInputKeyDown : undefined;
68
- let t2;
69
- if ($[14] !== className || $[15] !== fullScreenOnNarrow) {
70
- t2 = clsx(className, {
63
+ let t1;
64
+ if ($[13] !== className || $[14] !== fullScreenOnNarrow) {
65
+ t1 = clsx(className, {
71
66
  [classes.FullScreenTextInput]: fullScreenOnNarrow
72
67
  });
73
- $[14] = className;
74
- $[15] = fullScreenOnNarrow;
75
- $[16] = t2;
68
+ $[13] = className;
69
+ $[14] = fullScreenOnNarrow;
70
+ $[15] = t1;
76
71
  } else {
77
- t2 = $[16];
72
+ t1 = $[15];
78
73
  }
79
- let t3;
80
- if ($[17] !== filterValue || $[18] !== inputDescriptionTextId || $[19] !== inputRef || $[20] !== listId || $[21] !== loading || $[22] !== onInputChange || $[23] !== onInputKeyPress || $[24] !== placeholderText || $[25] !== restTextInputProps || $[26] !== t1 || $[27] !== t2) {
81
- t3 = /*#__PURE__*/jsx("div", {
74
+ let t2;
75
+ if ($[16] !== inputDescriptionTextId || $[17] !== inputRef || $[18] !== listId || $[19] !== loading || $[20] !== onInputChange || $[21] !== onInputKeyDown || $[22] !== onInputKeyPress || $[23] !== placeholderText || $[24] !== restTextInputProps || $[25] !== t1 || $[26] !== value) {
76
+ t2 = /*#__PURE__*/jsx("div", {
82
77
  className: classes.Header,
83
78
  "data-component": "FilteredActionList.Header",
84
79
  children: /*#__PURE__*/jsx(TextInput, {
@@ -86,10 +81,10 @@ function FilteredActionListInput(t0) {
86
81
  block: true,
87
82
  width: "auto",
88
83
  color: "fg.default",
89
- value: filterValue,
84
+ value: value,
90
85
  onChange: onInputChange,
91
86
  onKeyPress: onInputKeyPress,
92
- onKeyDown: t1,
87
+ onKeyDown: onInputKeyDown,
93
88
  placeholder: placeholderText,
94
89
  role: "combobox",
95
90
  "aria-expanded": "true",
@@ -99,26 +94,26 @@ function FilteredActionListInput(t0) {
99
94
  "aria-describedby": inputDescriptionTextId,
100
95
  loaderPosition: "leading",
101
96
  loading: loading,
102
- className: t2,
97
+ className: t1,
103
98
  ...restTextInputProps
104
99
  })
105
100
  });
106
- $[17] = filterValue;
107
- $[18] = inputDescriptionTextId;
108
- $[19] = inputRef;
109
- $[20] = listId;
110
- $[21] = loading;
111
- $[22] = onInputChange;
112
- $[23] = onInputKeyPress;
113
- $[24] = placeholderText;
114
- $[25] = restTextInputProps;
115
- $[26] = t1;
101
+ $[16] = inputDescriptionTextId;
102
+ $[17] = inputRef;
103
+ $[18] = listId;
104
+ $[19] = loading;
105
+ $[20] = onInputChange;
106
+ $[21] = onInputKeyDown;
107
+ $[22] = onInputKeyPress;
108
+ $[23] = placeholderText;
109
+ $[24] = restTextInputProps;
110
+ $[25] = t1;
111
+ $[26] = value;
116
112
  $[27] = t2;
117
- $[28] = t3;
118
113
  } else {
119
- t3 = $[28];
114
+ t2 = $[27];
120
115
  }
121
- return t3;
116
+ return t2;
122
117
  }
123
118
 
124
119
  export { FilteredActionListInput };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260424043508",
4
+ "version": "0.0.0-20260424044536",
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",