Skip to main content
react-md
react-md - Badge - Changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

5.1.6 (2023-12-11)

Note: Version bump only for package @react-md/badge

5.1.3 (2022-05-07)

Documentation

  • fix typos throughout codebase (725d1a2)

Other Internal Changes

  • typos: fix additional typos throughout repo (ef20132)

5.1.2 (2022-04-02)

Note: Version bump only for package @react-md/badge

5.1.0 (2022-03-18)

Other Internal Changes

  • run lint-scripts --fix for consistent-type-imports (42d839d)

5.0.0 (2022-01-31)

Note: Version bump only for package @react-md/badge

4.0.3 (2021-12-31)

Other Internal Changes

  • Updated all packages' peerDependenciesMeta (60fcd71), closes #1319

4.0.1 (2021-11-27)

Other Internal Changes

  • Updated imports to use import type when possible (ba96bb6)

4.0.0 (2021-11-24)

Features

  • Update to use new JSX Transform and latest eslint (8111cd3)

Other Internal Changes

  • always skip lib check (229cef1)
  • react-md: Remove prop-types package and usage (2637a6f)

Breaking Changes

  • Minimum React version is now 16.14 instead of 16.8
  • react-md: There will no longer be run-time prop validation with the prop-types package.

3.1.0 (2021-09-10)

Other Internal Changes

  • ran yarn format to include new files (48d3d7f)

3.0.1 (2021-08-15)

Bug Fixes

  • Updated peerDependencies to fix yarn berry peer requirements (250efcd), closes #1224

3.0.0 (2021-08-13)

Note: Version bump only for package @react-md/badge

2.9.1 (2021-07-27)

Other Internal Changes

  • install: slighly reduce install size by excluding tests in publish (9d01a44)

2.9.0 (2021-07-18)

Note: Version bump only for package @react-md/badge

2.8.5 (2021-07-03)

Note: Version bump only for package @react-md/badge

2.8.4 (2021-06-10)

Note: Version bump only for package @react-md/badge

2.8.3 (2021-05-18)

Documentation

  • react-md.dev: updated tsdoc to work with typedoc (cf54c35)

2.8.2 (2021-04-23)

Note: Version bump only for package @react-md/badge

2.8.0 (2021-04-22)

Other Internal Changes

  • tsconfig: separate tsconfig by package instead of a single root (b278230)

2.7.1 (2021-03-23)

Note: Version bump only for package @react-md/badge

2.7.0 (2021-02-28)

Documentation

  • tsdoc: fixed remaining tsdoc syntax warnings (946f4dd)
  • tsdoc: fixed some tsdoc annotations and styling (0449b86)

Other Internal Changes

  • updated test coverage to not include conditional component PropTypes (24e5df1)

2.6.0 (2021-02-13)

Note: Version bump only for package @react-md/badge

2.5.5 (2021-01-30)

Note: Version bump only for package @react-md/badge

2.5.4 (2021-01-27)

Note: Version bump only for package @react-md/badge

2.5.0 (2020-12-15)

Note: Version bump only for package @react-md/badge

2.4.2 (2020-10-23)

Note: Version bump only for package @react-md/badge

2.4.1 (2020-10-17)

Note: Version bump only for package @react-md/badge

2.4.0 (2020-10-17)

Features

2.3.1 (2020-09-15)

Note: Version bump only for package @react-md/badge

2.3.0 (2020-09-10)

Note: Version bump only for package @react-md/badge

2.2.2 (2020-09-02)

Note: Version bump only for package @react-md/badge

2.2.1 (2020-09-02)

Note: Version bump only for package @react-md/badge

2.2.0 (2020-08-11)

Note: Version bump only for package @react-md/badge

2.1.2 (2020-08-01)

Note: Version bump only for package @react-md/badge

2.1.1 (2020-07-21)

Note: Version bump only for package @react-md/badge

2.1.0 (2020-07-12)

Note: Version bump only for package @react-md/badge

2.0.2 (2020-06-30)

Bug Fixes

  • LICENSE: Removed the time range from license since it was incorrect (50c9021)
  • Added sideEffects field to package.json (31820b9)
  • sideEffects formatting (78a7b6b)

v2.0.1

No changes.

v2.0.0

This release has introduced two additional components: BadgeContainer and BadgedButton. The BadgedButton is the closest thing to the old Badge component but it always renders as a Button instead. The BadgeContainer is a small wrapper component to add basic styles to allow a Badge to be positioned relative to another component.

New Behavior and Features

  • the Badge now renders as a <span> instead of a <div>
  • the ref is now correctly forwarded to the DOM element
  • added a new BadgeContainer component for styling a Badge relative to another element
  • added a new BadgedButton for convenience for adding a Badge to a Button
  • badges are always circular without additional styles
  • the badge's size, colors, and positioning can now be styled with the new theme API and CSS variables
  • the badge's positioning automatically updates for right-to-left languages

Breaking Changes

  • the max prop no longer exists and the Badge will no longer automatically change a number greater than a specific threshold into ${max}+
  • component prop was removed so the Badge can only be rendered as a <span>
  • the primary, secondary, and default props were removed in favor of the new theme prop
  • the circular prop was removed since badges will always be rendered as a circle now
  • invisibleOnZero was renamed to disableNullOnZero
  • the multiple "default" themes were removed and there is only one "default" theme now
  • the badge will no longer be offset from the parent element by default
New SCSS Variables, Functions, and Mixins
  • $rmd-badge-default-background-color: rgba($rmd-black-base, 0.2) !default - the background-color to use for the "default" theme
  • $rmd-badge-default-color: rmd-theme-tone($rmd-badge-default-background-color) == light, $rmd-black-base, $rmd-white-base) !default - the text color to use for the "default" theme
Renamed SCSS Variables, Functions, and Mixins
  • renamed $md-badge-top to $rmd-badge-offset-top and changed the default value from -8px to 0
  • renamed $md-badge-right to $rmd-badge-offset-right and changed the default value from -8px to 0
  • renamed $md-badge-circular-border-radius to $rmd-badge-border-radius
  • renamed $md-badge-circular-font-size to $rmd-badge-font-size and changed the default value from 10px to 0.625rem
  • renamed $md-badge-circular-height and $md-badge-circular-width to $rmd-badge-size and changed the default value from 24px to 1.5rem
  • @function rmd-badge-theme - gets one of the theme values and validates that the theme name is valid
  • @function rmd-badge-theme-var - gets one of the theme values as a css variable with a fallback value and validates that the theme name is valid
  • @mixin rmd-badge-theme - applies one of the theme values to a css property as a css variable
  • @mixin rmd-badge-theme-update-var - updates one of the theme values as a css variable
Removed SCSS Variables Placeholders, and Mixins
  • removed $md-badge-include-circular since badges are always circular going forward
  • removed $md-badge-include-default since the default theme can be disabled by setting the $rmd-badge-default-color to null
  • removed $md-badge-bottom and $md-badge-left since they are no longer needed
  • removed $md-bage-light-theme-default-color and $md-badge-dark-theme-default-color since they are no longer used
  • removed react-md-theme-badges since it is no longer required