@primer/react 38.42.1-rc.620720f41 → 38.43.0-rc.fa07fd4a4

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,9 +1,15 @@
1
1
  # @primer/react
2
2
 
3
- ## 38.42.1
3
+ ## 38.43.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#8545](https://github.com/primer/react/pull/8545) [`c29b6fe`](https://github.com/primer/react/commit/c29b6fec94c8b18b4f59f7935740ab7b94598ecc) Thanks [@tay1orjones](https://github.com/tay1orjones)! - TextInput and Textarea: Deprecate the `contrast` prop. Omit it to use the default background.
4
8
 
5
9
  ### Patch Changes
6
10
 
11
+ - [#8545](https://github.com/primer/react/pull/8545) [`c29b6fe`](https://github.com/primer/react/commit/c29b6fec94c8b18b4f59f7935740ab7b94598ecc) Thanks [@tay1orjones](https://github.com/tay1orjones)! - SelectPanel: Use the default filter input background. Enable `primer_react_select_panel_legacy_contrast` to restore the previous appearance.
12
+
7
13
  - [#8524](https://github.com/primer/react/pull/8524) [`0d5607c`](https://github.com/primer/react/commit/0d5607c3b29ab090a0a97d1532fdc3a066a37d3d) Thanks [@tay1orjones](https://github.com/tay1orjones)! - TreeView: Prevent typeahead errors and focus changes when typing in nested controls.
8
14
 
9
15
  ## 38.42.0
@@ -3,6 +3,7 @@ import { FeatureFlagScope } from "./FeatureFlagScope.js";
3
3
  const DefaultFeatureFlags = FeatureFlagScope.create({
4
4
  primer_react_css_anchor_positioning: false,
5
5
  primer_react_select_panel_fullscreen_on_narrow: false,
6
+ primer_react_select_panel_legacy_contrast: false,
6
7
  primer_react_select_panel_order_selected_at_top: false,
7
8
  primer_react_styled_react_use_primer_theme_providers: false,
8
9
  primer_react_action_list_group_heading_trailing_action: false,
@@ -92,6 +92,7 @@ function Panel({ open, onOpenChange, renderAnchor = defaultRenderAnchor, anchorR
92
92
  const [availablePanelHeight, setAvailablePanelHeight] = useState(void 0);
93
93
  const KEYBOARD_VISIBILITY_THRESHOLD = 10;
94
94
  const featureFlagFullScreenOnNarrow = useFeatureFlag("primer_react_select_panel_fullscreen_on_narrow");
95
+ const legacyContrast = useFeatureFlag("primer_react_select_panel_legacy_contrast");
95
96
  const usingFullScreenOnNarrow = disableFullscreenOnNarrow ? false : featureFlagFullScreenOnNarrow;
96
97
  const shouldOrderSelectedFirst = useFeatureFlag("primer_react_select_panel_order_selected_at_top") && showSelectedOptionsFirst;
97
98
  const { isReferenced, labelId } = useFormControlContext();
@@ -392,12 +393,16 @@ function Panel({ open, onOpenChange, renderAnchor = defaultRenderAnchor, anchorR
392
393
  const extendedTextInputProps = useMemo(() => {
393
394
  return {
394
395
  className: SelectPanel_module_css_default.TextInput,
395
- contrast: true,
396
+ contrast: legacyContrast,
396
397
  leadingVisual: SearchIcon,
397
398
  "aria-label": inputLabel,
398
399
  ...textInputProps
399
400
  };
400
- }, [inputLabel, textInputProps]);
401
+ }, [
402
+ inputLabel,
403
+ legacyContrast,
404
+ textInputProps
405
+ ]);
401
406
  const loadingType = () => {
402
407
  if (dataLoadedOnce) return FilteredActionListLoadingTypes.input;
403
408
  else if (initialLoadingType === "spinner") return FilteredActionListLoadingTypes.bodySpinner;
@@ -6877,7 +6877,7 @@
6877
6877
  "name": "textInputProps",
6878
6878
  "type": "Partial<Omit<TextInputProps, 'onChange'>>",
6879
6879
  "defaultValue": "",
6880
- "description": "See [TextInput props](/react/TextInput#props)."
6880
+ "description": "See [TextInput props](/react/TextInput#props). The filter input uses the normal TextInput background by default. Enable `primer_react_select_panel_legacy_contrast` to restore the previous contrast background. An explicit `textInputProps.contrast` value takes precedence over the flag: `true` enables contrast, while `false` or explicitly passing `undefined` disables it. The `contrast` prop remains deprecated."
6881
6881
  },
6882
6882
  {
6883
6883
  "name": "variant",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "38.42.1-rc.620720f41",
4
+ "version": "38.43.0-rc.fa07fd4a4",
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",