csandman / chakra-react-select

A Chakra UI themed wrapper for the popular library React Select
https://www.npmjs.com/package/chakra-react-select
MIT License
775 stars 33 forks source link

feat: Remove `useBasicStyles` and rename other custom props #322

Closed csandman closed 2 months ago

csandman commented 3 months ago

This PR makes a few changes to the custom props this package offers which will be breaking changes.

  1. Removes the useBasicStyles prop, and defaults the styles to those that were previously provided by it. This is a change I've been meaning to make for a while, as I came to really dislike the default styles I gave the dropdown indicator. Originally, it was styled to match the InputRightAddon component, in order to create a visual separation between the dropdown indicator and the clear indicator. However, I grew to strongly dislike the way it visually clashed with the built-in select menu. Also, the original CodeSandbox example I provided for showing how to style the select more closely to the original Chakra select had more views than any other example sandbox that was provided, showing that this is how many people would prefer it to look anyway.
  2. Remove the deprecated selectedOptionColor prop. A new prop was added a while ago to replace that one, selectedOptionColorScheme, as some people were getting confused by the meaning of the original. So I took this opportunity to finally remove the old prop it replaced.
  3. Remove the deprecated hasStickyGroupHeaders prop. I removed this from the documentation a long time ago, as it was only ever really an experimental way to style the grouped option headers so they'd stay in view while you scroll the list of options. It also had some problems with using the keyboard to navigate between options. They would disappear behind the header when you used the up arrow. So this change is also a long time coming.
  4. Renamed the colorScheme prop to tagColorScheme. There has been some confusion around what this prop actually means, and I realized the original name the prop had wasn't specific enough to it's purpose. It didn't make sense to have a specific prop for selectedOptionColorScheme, and not be specific with the naming for the tagColorScheme.

All of these changes can be made automatically using the Codemod provided here

codesandbox-ci[bot] commented 3 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

github-actions[bot] commented 3 months ago

πŸ“Š Package size report   -2.11%↓

File Before After
dist/index.cjs 17.2 kB -1.83%↓16.9 kB
dist/index.cjs.map 81.3 kB -2.64%↓79.2 kB
dist/index.d.cts 21.1 kB -5.71%↓19.9 kB
dist/index.d.ts 21.1 kB -5.71%↓19.9 kB
dist/index.js 16.0 kB -1.97%↓15.7 kB
dist/index.js.map 81.7 kB -2.63%↓79.5 kB
package.json 3.3 kB 0.2%↑3.3 kB
README.md 46.3 kB 3%↑47.6 kB
Total (Includes all files) 289.2 kB -2.11%↓283.1 kB
Tarball size 67.0 kB -3.9%↓64.4 kB
Unchanged files | File | Size | | -------------------------------------------------------------------------------------------------------- | -------: | | [`LICENSE.md`](https://github.com/csandman/chakra-react-select/blob/feat/update-custom-props/LICENSE.md) | `1.1 kB` |

πŸ€– This report was automatically generated by pkg-size-action