@momentum-design/components 0.122.13 → 0.122.14
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.
- package/dist/browser/index.js +32 -18
 - package/dist/browser/index.js.map +4 -4
 - package/dist/components/alertchip/alertchip.component.d.ts +2 -1
 - package/dist/components/alertchip/alertchip.component.js +3 -2
 - package/dist/components/alertchip/alertchip.styles.js +4 -0
 - package/dist/components/chip/chip.component.js +1 -1
 - package/dist/components/staticchip/staticchip.component.js +1 -1
 - package/dist/components/staticchip/staticchip.styles.js +10 -0
 - package/dist/custom-elements.json +1351 -1320
 - package/dist/react/index.d.ts +2 -2
 - package/dist/react/index.js +2 -2
 - package/package.json +1 -1
 
| 
         @@ -1,6 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import { CSSResult } from 'lit';
         
     | 
| 
       2 
2 
     | 
    
         
             
            import Buttonsimple from '../buttonsimple/buttonsimple.component';
         
     | 
| 
       3 
3 
     | 
    
         
             
            import type { VariantType } from './alertchip.types';
         
     | 
| 
      
 4 
     | 
    
         
            +
            declare const AlertChip_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/IconNameMixin").IconNameMixinInterface> & typeof Buttonsimple;
         
     | 
| 
       4 
5 
     | 
    
         
             
            /**
         
     | 
| 
       5 
6 
     | 
    
         
             
             * mdc-alertchip component is an interactive chip that consumers can use to represent an alert.
         
     | 
| 
       6 
7 
     | 
    
         
             
             *
         
     | 
| 
         @@ -27,7 +28,7 @@ import type { VariantType } from './alertchip.types'; 
     | 
|
| 
       27 
28 
     | 
    
         
             
             * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the chip.
         
     | 
| 
       28 
29 
     | 
    
         
             
             * @event focus - (React: onFocus) This event is dispatched when the chip receives focus.
         
     | 
| 
       29 
30 
     | 
    
         
             
             */
         
     | 
| 
       30 
     | 
    
         
            -
            declare class AlertChip extends  
     | 
| 
      
 31 
     | 
    
         
            +
            declare class AlertChip extends AlertChip_base {
         
     | 
| 
       31 
32 
     | 
    
         
             
                /**
         
     | 
| 
       32 
33 
     | 
    
         
             
                 * The variant of the alertchip. It supports 5 variants
         
     | 
| 
       33 
34 
     | 
    
         
             
                 * - neutral
         
     | 
| 
         @@ -11,6 +11,7 @@ import { html, nothing } from 'lit'; 
     | 
|
| 
       11 
11 
     | 
    
         
             
            import { property } from 'lit/decorators.js';
         
     | 
| 
       12 
12 
     | 
    
         
             
            import { Component } from '../../models';
         
     | 
| 
       13 
13 
     | 
    
         
             
            import Buttonsimple from '../buttonsimple/buttonsimple.component';
         
     | 
| 
      
 14 
     | 
    
         
            +
            import { IconNameMixin } from '../../utils/mixins/IconNameMixin';
         
     | 
| 
       14 
15 
     | 
    
         
             
            import styles from './alertchip.styles';
         
     | 
| 
       15 
16 
     | 
    
         
             
            import { DEFAULTS } from './alertchip.constants';
         
     | 
| 
       16 
17 
     | 
    
         
             
            import { getAlertIcon } from './alertchip.utils';
         
     | 
| 
         @@ -40,7 +41,7 @@ import { getAlertIcon } from './alertchip.utils'; 
     | 
|
| 
       40 
41 
     | 
    
         
             
             * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the chip.
         
     | 
| 
       41 
42 
     | 
    
         
             
             * @event focus - (React: onFocus) This event is dispatched when the chip receives focus.
         
     | 
| 
       42 
43 
     | 
    
         
             
             */
         
     | 
| 
       43 
     | 
    
         
            -
            class AlertChip extends Buttonsimple {
         
     | 
| 
      
 44 
     | 
    
         
            +
            class AlertChip extends IconNameMixin(Buttonsimple) {
         
     | 
| 
       44 
45 
     | 
    
         
             
                constructor() {
         
     | 
| 
       45 
46 
     | 
    
         
             
                    super(...arguments);
         
     | 
| 
       46 
47 
     | 
    
         
             
                    /**
         
     | 
| 
         @@ -72,7 +73,7 @@ class AlertChip extends Buttonsimple { 
     | 
|
| 
       72 
73 
     | 
    
         
             
                }
         
     | 
| 
       73 
74 
     | 
    
         
             
                render() {
         
     | 
| 
       74 
75 
     | 
    
         
             
                    return html `
         
     | 
| 
       75 
     | 
    
         
            -
                  <mdc-icon part="icon" name="${getAlertIcon(this.variant)}" length-unit="rem" size="1"></mdc-icon>
         
     | 
| 
      
 76 
     | 
    
         
            +
                  <mdc-icon part="icon" name="${this.iconName || getAlertIcon(this.variant)}" length-unit="rem" size="1"></mdc-icon>
         
     | 
| 
       76 
77 
     | 
    
         
             
                  ${this.label
         
     | 
| 
       77 
78 
     | 
    
         
             
                        ? html `<mdc-text part="label" type="${DEFAULTS.TEXT_TYPE}" tagname="${DEFAULTS.TAG_NAME}"
         
     | 
| 
       78 
79 
     | 
    
         
             
                        >${this.label}</mdc-text
         
     | 
| 
         @@ -21,10 +21,14 @@ const styles = css ` 
     | 
|
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
              :host::part(label) {
         
     | 
| 
       23 
23 
     | 
    
         
             
                color: var(--mdc-chip-color);
         
     | 
| 
      
 24 
     | 
    
         
            +
                text-overflow: ellipsis;
         
     | 
| 
      
 25 
     | 
    
         
            +
                white-space: nowrap;
         
     | 
| 
      
 26 
     | 
    
         
            +
                overflow: hidden;
         
     | 
| 
       24 
27 
     | 
    
         
             
              }
         
     | 
| 
       25 
28 
     | 
    
         | 
| 
       26 
29 
     | 
    
         
             
              :host::part(icon) {
         
     | 
| 
       27 
30 
     | 
    
         
             
                color: var(--mdc-chip-icon-color);
         
     | 
| 
      
 31 
     | 
    
         
            +
                flex-shrink: 0;
         
     | 
| 
       28 
32 
     | 
    
         
             
              }
         
     | 
| 
       29 
33 
     | 
    
         | 
| 
       30 
34 
     | 
    
         
             
              :host([variant='neutral']:hover) {
         
     | 
| 
         @@ -83,7 +83,7 @@ class Chip extends IconNameMixin(Buttonsimple) { 
     | 
|
| 
       83 
83 
     | 
    
         
             
                renderIcon() {
         
     | 
| 
       84 
84 
     | 
    
         
             
                    if (!this.iconName)
         
     | 
| 
       85 
85 
     | 
    
         
             
                        return nothing;
         
     | 
| 
       86 
     | 
    
         
            -
                    return html ` <mdc-icon name="${this.iconName}" length-unit="rem" size="1"></mdc-icon> `;
         
     | 
| 
      
 86 
     | 
    
         
            +
                    return html ` <mdc-icon part="icon" name="${this.iconName}" length-unit="rem" size="1"></mdc-icon> `;
         
     | 
| 
       87 
87 
     | 
    
         
             
                }
         
     | 
| 
       88 
88 
     | 
    
         
             
                render() {
         
     | 
| 
       89 
89 
     | 
    
         
             
                    return html `
         
     | 
| 
         @@ -65,7 +65,7 @@ class StaticChip extends IconNameMixin(Component) { 
     | 
|
| 
       65 
65 
     | 
    
         
             
                renderIcon() {
         
     | 
| 
       66 
66 
     | 
    
         
             
                    if (!this.iconName)
         
     | 
| 
       67 
67 
     | 
    
         
             
                        return nothing;
         
     | 
| 
       68 
     | 
    
         
            -
                    return html ` <mdc-icon name="${this.iconName}" length-unit="rem" size="1"></mdc-icon> `;
         
     | 
| 
      
 68 
     | 
    
         
            +
                    return html ` <mdc-icon part="icon" name="${this.iconName}" length-unit="rem" size="1"></mdc-icon> `;
         
     | 
| 
       69 
69 
     | 
    
         
             
                }
         
     | 
| 
       70 
70 
     | 
    
         
             
                render() {
         
     | 
| 
       71 
71 
     | 
    
         
             
                    return html `
         
     | 
| 
         @@ -18,6 +18,16 @@ const styles = css ` 
     | 
|
| 
       18 
18 
     | 
    
         
             
                background-color: var(--mdc-chip-background-color);
         
     | 
| 
       19 
19 
     | 
    
         
             
              }
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
      
 21 
     | 
    
         
            +
              :host::part(icon) {
         
     | 
| 
      
 22 
     | 
    
         
            +
                flex-shrink: 0;
         
     | 
| 
      
 23 
     | 
    
         
            +
              }
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
              :host::part(label) {
         
     | 
| 
      
 26 
     | 
    
         
            +
                text-overflow: ellipsis;
         
     | 
| 
      
 27 
     | 
    
         
            +
                white-space: nowrap;
         
     | 
| 
      
 28 
     | 
    
         
            +
                overflow: hidden;
         
     | 
| 
      
 29 
     | 
    
         
            +
              }
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
       21 
31 
     | 
    
         
             
              :host([color='cobalt']) {
         
     | 
| 
       22 
32 
     | 
    
         
             
                --mdc-chip-border-color: var(--mds-color-theme-outline-theme-normal);
         
     | 
| 
       23 
33 
     | 
    
         
             
                --mdc-chip-background-color: var(--mds-color-theme-background-label-cobalt-normal);
         
     |