@momentum-design/components 0.80.0 → 0.80.1

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.
@@ -13,9 +13,9 @@ export { default as Buttonsimple } from './buttonsimple';
13
13
  export { default as Card } from './card';
14
14
  export { default as CardButton } from './cardbutton';
15
15
  export { default as CardCheckbox } from './cardcheckbox';
16
- export { default as CardRadio } from './cardradio';
17
16
  export { default as Checkbox } from './checkbox';
18
17
  export { default as Chip } from './chip';
18
+ export { default as CardRadio } from './cardradio';
19
19
  export { default as Coachmark } from './coachmark';
20
20
  export { default as Dialog } from './dialog';
21
21
  export { default as Divider } from './divider';
@@ -35,8 +35,8 @@ export { default as Menu } from './menu';
35
35
  export { default as MenuBar } from './menubar';
36
36
  export { default as MenuItem } from './menuitem';
37
37
  export { default as MenuItemCheckbox } from './menuitemcheckbox';
38
- export { default as MenuItemRadio } from './menuitemradio';
39
38
  export { default as MenuPopover } from './menupopover';
39
+ export { default as MenuItemRadio } from './menuitemradio';
40
40
  export { default as MenuSection } from './menusection';
41
41
  export { default as OptGroup } from './optgroup';
42
42
  export { default as Option } from './option';
@@ -13,9 +13,9 @@ export { default as Buttonsimple } from './buttonsimple';
13
13
  export { default as Card } from './card';
14
14
  export { default as CardButton } from './cardbutton';
15
15
  export { default as CardCheckbox } from './cardcheckbox';
16
- export { default as CardRadio } from './cardradio';
17
16
  export { default as Checkbox } from './checkbox';
18
17
  export { default as Chip } from './chip';
18
+ export { default as CardRadio } from './cardradio';
19
19
  export { default as Coachmark } from './coachmark';
20
20
  export { default as Dialog } from './dialog';
21
21
  export { default as Divider } from './divider';
@@ -35,8 +35,8 @@ export { default as Menu } from './menu';
35
35
  export { default as MenuBar } from './menubar';
36
36
  export { default as MenuItem } from './menuitem';
37
37
  export { default as MenuItemCheckbox } from './menuitemcheckbox';
38
- export { default as MenuItemRadio } from './menuitemradio';
39
38
  export { default as MenuPopover } from './menupopover';
39
+ export { default as MenuItemRadio } from './menuitemradio';
40
40
  export { default as MenuSection } from './menusection';
41
41
  export { default as OptGroup } from './optgroup';
42
42
  export { default as Option } from './option';
@@ -1,9 +1,9 @@
1
1
  import { LitElement, TemplateResult } from 'lit';
2
2
  import type { Constructor } from './index.types';
3
3
  export declare class CardAndDialogFooterMixinInterface {
4
- footerLink?: Array<HTMLElement>;
5
- footerButtonPrimary?: Array<HTMLElement>;
6
- footerButtonSecondary?: Array<HTMLElement>;
4
+ protected footerLink?: Array<HTMLElement>;
5
+ protected footerButtonPrimary?: Array<HTMLElement>;
6
+ protected footerButtonSecondary?: Array<HTMLElement>;
7
7
  protected updateFooterButtonColors(variant: string): void;
8
8
  protected handleFooterSlot(tagname: string, variant?: string): void;
9
9
  protected renderFooter(): TemplateResult;
@@ -15,11 +15,11 @@ import { BUTTON_COLORS, BUTTON_VARIANTS } from '../../components/button/button.c
15
15
  export const CardAndDialogFooterMixin = (superClass) => {
16
16
  class InnerMixinClass extends superClass {
17
17
  /**
18
- * Updates the color of the footer buttons based on the variant.
19
- * If the variant is promotional, the color is promotional, else default.
20
- *
21
- * @internal
22
- */
18
+ * Updates the color of the footer buttons based on the variant.
19
+ * If the variant is promotional, the color is promotional, else default.
20
+ *
21
+ * @internal
22
+ */
23
23
  updateFooterButtonColors(variant) {
24
24
  const footerButtons = [...(this.footerButtonPrimary || []), ...(this.footerButtonSecondary || [])];
25
25
  footerButtons === null || footerButtons === void 0 ? void 0 : footerButtons.forEach((button) => {
@@ -32,13 +32,13 @@ export const CardAndDialogFooterMixin = (superClass) => {
32
32
  });
33
33
  }
34
34
  /**
35
- * Filters and renders only the following content into the footer section and removes anything other than it
36
- * - One mdc-link element in the footer-link slot
37
- * - One secondary variant of the mdc-button element in the footer-button-secondary slot
38
- * - One primary variant of the mdc-button element in the footer-button-primary slot
39
- *
40
- * @internal
41
- */
35
+ * Filters and renders only the following content into the footer section and removes anything other than it
36
+ * - One mdc-link element in the footer-link slot
37
+ * - One secondary variant of the mdc-button element in the footer-button-secondary slot
38
+ * - One primary variant of the mdc-button element in the footer-button-primary slot
39
+ *
40
+ * @internal
41
+ */
42
42
  handleFooterSlot(tagname, variant) {
43
43
  var _a, _b, _c;
44
44
  let arrayItems = [];
@@ -78,10 +78,14 @@ export const CardAndDialogFooterMixin = (superClass) => {
78
78
  renderFooter() {
79
79
  return html `<div part="footer">
80
80
  <slot name="footer-link" @slotchange=${() => this.handleFooterSlot(DEFAULTS.LINK)}></slot>
81
- <slot name="footer-button-secondary"
82
- @slotchange=${() => this.handleFooterSlot(DEFAULTS.BUTTON, BUTTON_VARIANTS.SECONDARY)}></slot>
83
- <slot name="footer-button-primary"
84
- @slotchange=${() => this.handleFooterSlot(DEFAULTS.BUTTON, BUTTON_VARIANTS.PRIMARY)}></slot>
81
+ <slot
82
+ name="footer-button-secondary"
83
+ @slotchange=${() => this.handleFooterSlot(DEFAULTS.BUTTON, BUTTON_VARIANTS.SECONDARY)}
84
+ ></slot>
85
+ <slot
86
+ name="footer-button-primary"
87
+ @slotchange=${() => this.handleFooterSlot(DEFAULTS.BUTTON, BUTTON_VARIANTS.PRIMARY)}
88
+ ></slot>
85
89
  </div>`;
86
90
  }
87
91
  }
package/package.json CHANGED
@@ -41,5 +41,5 @@
41
41
  "lottie-web": "^5.12.2",
42
42
  "uuid": "^11.0.5"
43
43
  },
44
- "version": "0.80.0"
44
+ "version": "0.80.1"
45
45
  }
@@ -1,7 +0,0 @@
1
- import type Dialog from './dialog.component';
2
- export declare class DialogUtils {
3
- private dialog;
4
- constructor(dialog: Dialog);
5
- setupAriaAttributes(): void;
6
- createBackdrop(): void;
7
- }
@@ -1,33 +0,0 @@
1
- export class DialogUtils {
2
- constructor(dialog) {
3
- this.dialog = dialog;
4
- }
5
- setupAriaAttributes() {
6
- if (this.dialog.headerText && !this.dialog.ariaLabel && !this.dialog.ariaLabelledby) {
7
- this.dialog.setAttribute('aria-labelledby', this.dialog.headerText);
8
- }
9
- else if (!this.dialog.headerText && !this.dialog.ariaLabel && !this.dialog.ariaLabelledby) {
10
- this.dialog.setAttribute('aria-labelledby', this.dialog.triggerId);
11
- }
12
- }
13
- createBackdrop() {
14
- var _a;
15
- const backdrop = document.createElement('div');
16
- backdrop.classList.add('dialog-backdrop');
17
- const styleElement = document.createElement('style');
18
- styleElement.textContent = `
19
- .dialog-backdrop {
20
- position: fixed;
21
- top: 0;
22
- left: 0;
23
- width: 100%;
24
- height: 100%;
25
- background: var(--mds-color-theme-common-overlays-secondary-normal);
26
- z-index: ${this.dialog.zIndex - 1};
27
- }
28
- `;
29
- backdrop.appendChild(styleElement);
30
- (_a = this.dialog.parentElement) === null || _a === void 0 ? void 0 : _a.appendChild(backdrop);
31
- this.dialog.backdropElement = backdrop;
32
- }
33
- }