@genesislcap/pbc-notify-ui 1.0.37 → 1.0.38

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.
@@ -1,2 +1,4 @@
1
+ /** Class to use when there are no items */
2
+ export declare const noItemsClass = "no-items";
1
3
  export declare const FoundationInboxCounterStyles: import("@microsoft/fast-element").ElementStyles;
2
4
  //# sourceMappingURL=foundation-inbox-counter.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"foundation-inbox-counter.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,4BAA4B,iDAkBxC,CAAC"}
1
+ {"version":3,"file":"foundation-inbox-counter.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.styles.ts"],"names":[],"mappings":"AAIA,2CAA2C;AAC3C,eAAO,MAAM,YAAY,aAAa,CAAC;AAEvC,eAAO,MAAM,4BAA4B,iDAsBxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"foundation-inbox-counter.template.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAIzE,eAAO,MAAM,8BAA8B,6EAO1C,CAAC"}
1
+ {"version":3,"file":"foundation-inbox-counter.template.d.ts","sourceRoot":"","sources":["../../../../../../src/components/foundation-inbox/components/foundation-inbox-counter/foundation-inbox-counter.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAKzE,eAAO,MAAM,8BAA8B,6EAS1C,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import { css } from '@genesislcap/web-core';
2
2
  const BACKGROUND_COLOR = '#EF5547';
3
+ /** Class to use when there are no items */
4
+ export const noItemsClass = 'no-items';
3
5
  export const FoundationInboxCounterStyles = css `
4
6
  :host {
5
7
  display: inline-block;
@@ -18,4 +20,8 @@ export const FoundationInboxCounterStyles = css `
18
20
  .hidden {
19
21
  visibility: hidden;
20
22
  }
23
+
24
+ :host(.${noItemsClass}) {
25
+ display: none;
26
+ }
21
27
  `;
@@ -1,7 +1,10 @@
1
- import { html, when } from '@genesislcap/web-core';
1
+ import { classNames, html, when } from '@genesislcap/web-core';
2
+ import { noItemsClass } from './foundation-inbox-counter.styles';
2
3
  const MAX_NUMBER_TO_DISPLAY = 99;
3
4
  export const FoundationInboxCounterTemplate = html `
4
- ${when((x) => x.value > 0, html `
5
- ${(x) => (x.value > MAX_NUMBER_TO_DISPLAY ? `${MAX_NUMBER_TO_DISPLAY}+` : x.value)}
6
- `)}
5
+ <template class="${(x) => classNames([noItemsClass, x.value < 1])}">
6
+ ${when((x) => x.value > 0, html `
7
+ ${(x) => (x.value > MAX_NUMBER_TO_DISPLAY ? `${MAX_NUMBER_TO_DISPLAY}+` : x.value)}
8
+ `)}
9
+ </template>
7
10
  `;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/pbc-notify-ui",
3
3
  "description": "Genesis PBC Notify UI",
4
- "version": "1.0.37",
4
+ "version": "1.0.38",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "workspaces": [
7
7
  "client"