Skip to content

Commit

Permalink
Unread count badge updates (#1850)
Browse files Browse the repository at this point in the history
* chore: update unread badge outline and deps

* chore: update version
  • Loading branch information
NotNestor authored Dec 13, 2024
1 parent 056bcb0 commit 391492c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 11 deletions.
8 changes: 4 additions & 4 deletions web-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@momentum-ui/web-components",
"version": "2.16.7",
"version": "2.16.8",
"author": "Yana Harris",
"license": "MIT",
"repository": "https://github.com/momentum-design/momentum-ui.git",
Expand Down Expand Up @@ -59,9 +59,9 @@
"@interactjs/interact": "1.10.3",
"@interactjs/modifiers": "1.10.3",
"@interactjs/utils": "1.10.3",
"@momentum-design/brand-visuals": "0.1.2",
"@momentum-design/icons": "0.7.0",
"@momentum-design/tokens": "0.2.6",
"@momentum-design/brand-visuals": "0.2.0",
"@momentum-design/icons": "0.8.0",
"@momentum-design/tokens": "0.3.0",
"@popperjs/core": "^2.11.8",
"country-codes-list": "1.6.8",
"country-flags-svg": "1.1.4",
Expand Down
5 changes: 5 additions & 0 deletions web-components/src/[sandbox]/examples/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ export const badgeTemplate = html`
<h4 class="snadbox-header">Unread count</h4>
<md-badge color="unreadcount"> 999 </md-badge>
<md-badge color="unreadcount"> 99 </md-badge>
<md-badge color="unreadcount"> 4 </md-badge>
<md-badge color="unreadcount" outlined> 99 </md-badge>
<md-badge color="unreadcount" outlined> 99 </md-badge>
<md-badge color="unreadcount" outlined> 4 </md-badge>
`;
2 changes: 1 addition & 1 deletion web-components/src/components/avatar/Presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getPresenceSize } from "./Presence.utils";
import styles from "./scss/module.scss";

export namespace Presence {
export type Size = typeof AvatarSize[number];
export type Size = (typeof AvatarSize)[number];

@customElementWithCheck("md-presence")
export class ELEMENT extends LitElement {
Expand Down
15 changes: 11 additions & 4 deletions web-components/src/components/badge/scss/badge.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,19 @@
var(--badge-unreadcount-text-color, var(--button-primary-text-color))
);
font-family: var(--brand-font-medium);
font-size: var(--label-compact-font-size, rem-calc(12));
font-weight: 550;
font-size: rem-calc(12);
font-weight: 500;
padding: 0rem 0.25rem;
min-width: rem-calc(20);
height: rem-calc(20);
min-width: rem-calc(16);
height: rem-calc(16);
justify-content: center;

&.md-badge--outline {
border: 1px solid;
min-width: rem-calc(18);
height: rem-calc(18);
border-color: var(--md-primary-bg-color);
}
}

&--orange {
Expand Down
2 changes: 1 addition & 1 deletion web-components/src/components/icon/Icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export namespace Icon {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const importedIcon =
this.iconSet === "momentumBrandVisuals"
? require(`@momentum-design/brand-visuals/dist/svg/${iconName}.svg`)
? require(`@momentum-design/brand-visuals/dist/logos/${iconName}.svg`)
: require(`@momentum-design/icons/dist/svg/${iconName}.svg`);

if (this.isPath(importedIcon)) {
Expand Down
2 changes: 1 addition & 1 deletion web-components/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const common: webpack.Configuration = {
},
include: [
path.resolve("node_modules/@momentum-design/icons/dist/svg"),
path.resolve("node_modules/@momentum-design/brand-visuals/dist/svg")
path.resolve("node_modules/@momentum-design/brand-visuals/dist/logos")
]
}
]
Expand Down

0 comments on commit 391492c

Please sign in to comment.