downshift 7.5.0 → 8.0.0-alpha.0

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/README.md CHANGED
@@ -70,6 +70,15 @@ to the hook you need by using the links in the list above.
70
70
  For examples on how to use the hooks or the Downshift component, check out our
71
71
  [docsite][docsite]!
72
72
 
73
+ **🚨 Use the Downshift hooks 🚨**
74
+
75
+ If you are new to the library, consider the _useSelect_ and _useCombobox_ hooks
76
+ as the first option. As mentioned above, the hooks benefit from the updated ARIA
77
+ patterns and are actively maintained and improved. If there are use cases that
78
+ are supported by the _Downshift_ component and not by the hooks, please create
79
+ an issue in our repo. The _Downshift_ component is going to be removed
80
+ completely once the hooks become mature.
81
+
73
82
  ### Downshift
74
83
 
75
84
  This is a component that controls user interactions and state for you so you can
@@ -747,6 +756,12 @@ Optional properties:
747
756
  from `getInputProps` and a `disabled` prop will be returned (effectively
748
757
  disabling the input).
749
758
 
759
+ - `aria-label`: By default the menu will add an `aria-labelledby` that refers to
760
+ the `<label>` rendered with `getLabelProps`. However, if you provide
761
+ `aria-label` to give a more specific label that describes the options
762
+ available, then `aria-labelledby` will not be provided and screen readers can
763
+ use your `aria-label` instead.
764
+
750
765
  #### `getLabelProps`
751
766
 
752
767
  This method should be applied to the `label` you render. It is useful for
@@ -1028,6 +1043,8 @@ const ui = (
1028
1043
  Allows reseting the internal id counter which is used to generate unique ids for
1029
1044
  Downshift component.
1030
1045
 
1046
+ **This is unnecessary if you are using React 18 or newer**
1047
+
1031
1048
  You should never need to use this in the browser. Only if you are running an
1032
1049
  universal React app that is rendered on the server you should call
1033
1050
  [resetIdCounter](#resetidcounter) before every render so that the ids that get
@@ -1491,8 +1508,7 @@ MIT
1491
1508
  https://courses.reacttraining.com/courses/advanced-react/lectures/3172720
1492
1509
  [react-training]: https://reacttraining.com/
1493
1510
  [advanced-react]: https://courses.reacttraining.com/courses/enrolled/200086
1494
- [use-a-render-prop]:
1495
- https://cdb.reacttraining.com/use-a-render-prop-50de598f11ce
1511
+ [use-a-render-prop]: https://medium.com/@mjackson/use-a-render-prop-50de598f11ce
1496
1512
  [semver]: http://semver.org/
1497
1513
  [hooks-readme]: https://github.com/downshift-js/downshift/blob/master/src/hooks
1498
1514
  [useselect-readme]: