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)
- fix typos throughout codebase (725d1a2)
- 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)
- 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)
4.0.1 (2021-11-27)
- Updated imports to use
import type
when possible (ba96bb6)
4.0.0 (2021-11-24)
- Update to use new JSX Transform and latest
eslint
(8111cd3)
- 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)
- ran
yarn format
to include new files (48d3d7f)
3.0.1 (2021-08-15)
3.0.0 (2021-08-13)
Note: Version bump only for package @react-md/badge
2.9.1 (2021-07-27)
- 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)
- 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)
- 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)
- tsdoc: fixed remaining tsdoc syntax warnings (946f4dd)
- tsdoc: fixed some tsdoc annotations and styling (0449b86)
- 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)
- @react-md/theme: Better Contrast Colors by Default and dev-utils refactor (#955) (519b128)
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)
- LICENSE: Removed the time range from license since it was incorrect (50c9021)
- Added
sideEffects
field topackage.json
(31820b9) sideEffects
formatting (78a7b6b)
No changes.
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.
- 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 aBadge
relative to another element - added a new
BadgedButton
for convenience for adding aBadge
to aButton
- 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
- the
max
prop no longer exists and theBadge
will no longer automatically change a number greater than a specific threshold into${max}+
component
prop was removed so theBadge
can only be rendered as a<span>
- the
primary
,secondary
, anddefault
props were removed in favor of the newtheme
prop - the
circular
prop was removed since badges will always be rendered as a circle now invisibleOnZero
was renamed todisableNullOnZero
- 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
$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
$md-badge-top
to$rmd-badge-offset-top
and changed the default value from-8px
to0
- renamed
$md-badge-right
to$rmd-badge-offset-right
and changed the default value from-8px
to0
- 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 from10px
to0.625rem
- renamed
$md-badge-circular-height
and$md-badge-circular-width
to$rmd-badge-size
and changed the default value from24px
to1.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
$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
tonull
- 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