@momentum-ui/web-components 2.13.10 → 2.13.12

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.
Files changed (97) hide show
  1. package/dist/chunks/md-10.js +2 -2
  2. package/dist/chunks/md-11.js +1 -1
  3. package/dist/chunks/md-14.js +3 -3
  4. package/dist/chunks/md-16.js +23 -119
  5. package/dist/chunks/md-17.js +119 -23
  6. package/dist/chunks/md-19.js +1 -8
  7. package/dist/chunks/md-20.js +8 -1
  8. package/dist/chunks/md-21.js +22 -1
  9. package/dist/chunks/md-22.js +1 -7
  10. package/dist/chunks/md-23.js +7 -8
  11. package/dist/chunks/md-24.js +8 -1
  12. package/dist/chunks/md-25.js +1 -1
  13. package/dist/chunks/md-26.js +1 -22
  14. package/dist/chunks/md-27.js +1 -1
  15. package/dist/chunks/md-29.js +1 -1
  16. package/dist/chunks/md-34.js +7 -6
  17. package/dist/chunks/md-39.js +1 -1
  18. package/dist/chunks/md-41.js +1 -1
  19. package/dist/chunks/md-44.js +1 -1
  20. package/dist/chunks/md-50.js +1 -1
  21. package/dist/chunks/md-53.js +2 -2
  22. package/dist/chunks/md-57.js +1 -1
  23. package/dist/chunks/md-60.js +1 -1
  24. package/dist/chunks/md-61.js +1 -1
  25. package/dist/chunks/md-62.js +1 -1
  26. package/dist/chunks/md-65.js +1 -1
  27. package/dist/chunks/md-66.js +1 -1
  28. package/dist/chunks/md-7.js +1 -1
  29. package/dist/chunks/md-71.js +18 -18
  30. package/dist/chunks/md-75.js +1 -1
  31. package/dist/chunks/md-80.js +1 -1
  32. package/dist/chunks/md-81.js +1 -1
  33. package/dist/chunks/md-82.js +1 -1
  34. package/dist/chunks/md-84.js +1 -1
  35. package/dist/chunks/md-85.js +1 -1
  36. package/dist/comp/md-audio-player-entry.js +1 -1
  37. package/dist/comp/md-audio-player.js +2 -2
  38. package/dist/comp/md-avatar-entry.js +1 -1
  39. package/dist/comp/md-avatar.js +1 -1
  40. package/dist/comp/md-card-entry.js +1 -1
  41. package/dist/comp/md-card.js +4 -0
  42. package/dist/comp/md-chat-message-entry.js +1 -1
  43. package/dist/comp/md-chat-message.js +1 -1
  44. package/dist/comp/md-chip-entry.js +1 -1
  45. package/dist/comp/md-chip.js +2 -2
  46. package/dist/comp/md-combobox-entry.js +1 -1
  47. package/dist/comp/md-combobox.js +1 -1
  48. package/dist/comp/md-composite-avatar-entry.js +1 -1
  49. package/dist/comp/md-composite-avatar.js +1 -1
  50. package/dist/comp/md-date-range-picker-entry.js +1 -1
  51. package/dist/comp/md-date-range-picker.js +3 -3
  52. package/dist/comp/md-date-time-picker-entry.js +1 -1
  53. package/dist/comp/md-date-time-picker.js +1 -1
  54. package/dist/comp/md-datepicker-calendar-entry.js +1 -1
  55. package/dist/comp/md-datepicker-calendar.js +2 -2
  56. package/dist/comp/md-datepicker-entry.js +1 -1
  57. package/dist/comp/md-datepicker-month-entry.js +1 -1
  58. package/dist/comp/md-datepicker-month.js +2 -2
  59. package/dist/comp/md-datepicker-week-entry.js +1 -1
  60. package/dist/comp/md-datepicker-week.js +1 -1
  61. package/dist/comp/md-datepicker.js +3 -3
  62. package/dist/comp/md-draggable-entry.js +1 -1
  63. package/dist/comp/md-editable-field-entry.js +1 -1
  64. package/dist/comp/md-editable-field.js +2 -2
  65. package/dist/comp/md-floating-minimize-entry.js +1 -1
  66. package/dist/comp/md-floating-modal-entry.js +1 -1
  67. package/dist/comp/md-input-entry.js +1 -1
  68. package/dist/comp/md-input.js +1 -1
  69. package/dist/comp/md-loading-entry.js +1 -1
  70. package/dist/comp/md-loading.js +1 -1
  71. package/dist/comp/md-meeting-alert-entry.js +1 -1
  72. package/dist/comp/md-meeting-alert.js +1 -1
  73. package/dist/comp/md-menu-overlay-entry.js +1 -1
  74. package/dist/comp/md-menu-overlay.js +1 -1
  75. package/dist/comp/md-phone-input-entry.js +1 -1
  76. package/dist/comp/md-phone-input.js +2 -2
  77. package/dist/comp/md-tab-entry.js +1 -1
  78. package/dist/comp/md-table-advanced-entry.js +1 -1
  79. package/dist/comp/md-table-advanced.js +1 -1
  80. package/dist/comp/md-table-entry.js +1 -1
  81. package/dist/comp/md-tabs-entry.js +1 -1
  82. package/dist/comp/md-tabs.js +2 -2
  83. package/dist/comp/md-theme-entry.js +1 -1
  84. package/dist/comp/md-theme.js +1 -1
  85. package/dist/comp/md-timepicker-entry.js +1 -1
  86. package/dist/comp/md-timepicker.js +3 -3
  87. package/dist/comp/md-tooltip-entry.js +1 -1
  88. package/dist/comp/md-tooltip.js +2 -2
  89. package/dist/index-entry.js +2 -2
  90. package/dist/index.js +5 -5
  91. package/dist/types/components/card/Card.d.ts +3 -1
  92. package/dist/types/components/combobox/ComboBox.d.ts +1 -1
  93. package/dist/types/components/favorite/Favorite.d.ts +2 -2
  94. package/dist/types/components/help-text/HelpText.d.ts +1 -1
  95. package/dist/types/components/icon/Icon.d.ts +117 -2
  96. package/dist/types/components/label/Label.d.ts +1 -1
  97. package/package.json +3 -3
@@ -5,8 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  */
8
- import { LitElement } from "lit-element";
9
8
  import "@/components/icon/Icon";
9
+ import { LitElement } from "lit-element";
10
10
  export declare namespace Favorite {
11
11
  const ELEMENT_base: typeof LitElement & import("../../mixins/FocusMixin").AnyConstructor<import("../../mixins/FocusMixin").FocusClass>;
12
12
  export class ELEMENT extends ELEMENT_base {
@@ -18,7 +18,7 @@ export declare namespace Favorite {
18
18
  private customId;
19
19
  connectedCallback(): void;
20
20
  static get styles(): import("lit-element").CSSResult[];
21
- handleFavorite(event: CustomEvent): void;
21
+ handleFavorite(): void;
22
22
  handleElectKeyDown(event: KeyboardEvent): void;
23
23
  disconnectedCallback(): void;
24
24
  get favoriteClassMap(): {
@@ -17,7 +17,7 @@ export declare namespace HelpText {
17
17
  [x: string]: boolean;
18
18
  };
19
19
  static get styles(): import("lit-element").CSSResult[];
20
- getIconName(): "" | "clear-bold" | "check-bold" | "warning-bold";
20
+ getIconName(): "" | "check-bold" | "clear-bold" | "warning-bold";
21
21
  render(): import("lit-element").TemplateResult;
22
22
  }
23
23
  }
@@ -18,17 +18,132 @@ export declare namespace Icon {
18
18
  [key: string]: string;
19
19
  };
20
20
  class ELEMENT extends LitElement {
21
+ /**
22
+ * @property {String} color - This property sets the color for font icons and the fill color for SVG icons.
23
+ * It can accept any color value supported by CSS, including CSS variables.
24
+ *
25
+ * Example usage:
26
+ * ```html
27
+ * <md-icon color="#ff0000"></md-icon> <!-- Sets the icon color to red -->
28
+ * <md-icon color="var(--my-custom-color)"></md-icon> <!-- Uses a CSS variable for the icon color -->
29
+ * ```
30
+ */
21
31
  color: string;
32
+ /**
33
+ * @property {String} description - This property is used to set extra information on the `aria-label` attribute for the icon.
34
+ * It provides additional descriptive text that can be used in conjunction with the `title` property to form a more complete `aria-label`.
35
+ *
36
+ */
22
37
  description: string;
38
+ /**
39
+ * @property {String} name - This property sets the name of the icon.
40
+ * It determines the icon to be displayed and affects the class and SVG icon name.
41
+ *
42
+ *
43
+ * Example usage:
44
+ * ```html
45
+ * <md-icon name="search"></md-icon> <!-- Sets the icon name to "search" -->
46
+ * <md-icon name="icon-search"></md-icon> <!-- Sets the icon name to "search" after removing the "icon-" prefix -->
47
+ * ```
48
+ */
23
49
  name: string;
50
+ /**
51
+ * @property {String} id - This property sets the `id` attribute for the icon element.
52
+ * It allows you to specify a unique identifier for the icon.
53
+ */
24
54
  id: string;
55
+ /**
56
+ * @property {String} size - This property sets the size of the icon.
57
+ * For SVG icon sets ("momentumDesign"), it sets the width and height in pixels.
58
+ * For font-based icon sets ("momentumUI"), it sets the font-size in pixels.
59
+ *
60
+ * Example usage:
61
+ * ```html
62
+ * <md-icon iconSet="momentumUI" name="search_16" size="24"></md-icon> <!-- Sets the font-size to 24px for the legacy font-based icon set -->
63
+ * <md-icon iconSet="momentumDesign" name="search-bold" size="24"></md-icon> <!-- Sets the width and height to 24px for the new SVG-based icon set -->
64
+ * ```
65
+ */
25
66
  size: string;
26
- sizeOverrided: boolean;
67
+ /**
68
+ * @property {String} title - This property sets the `title` attribute for the icon element.
69
+ * It provides a tooltip text when the user hovers over the icon and is also used in the computation of the `aria-label` for accessibility purposes.
70
+ *
71
+ * Example in HTML:
72
+ * ```html
73
+ * <md-icon title="Search Icon"></md-icon> <!-- Sets the title attribute to "Search Icon" -->
74
+ * ```
75
+ */
27
76
  title: string;
28
- type: string;
77
+ /**
78
+ * @property {String} ariaHidden - This property sets the `aria-hidden` attribute for the icon.
79
+ * It can accept the following values:
80
+ * - "true": Hides the icon from assistive technologies.
81
+ * - "false": Makes the icon visible to assistive technologies.
82
+ * - null: Removes the `aria-hidden` attribute.
83
+ *
84
+ * Example usage:
85
+ * ```html
86
+ * <md-icon ariaHidden="true"></md-icon> <!-- Hides the icon from assistive technologies -->
87
+ * <md-icon ariaHidden="false"></md-icon> <!-- Makes the icon visible to assistive technologies -->
88
+ * <md-icon ariaHidden=null></md-icon> <!-- Removes the aria-hidden attribute -->
89
+ * ```
90
+ */
29
91
  ariaHidden: "true" | "false" | null;
92
+ type: string;
93
+ /**
94
+ * @property {Boolean} isActive - This property indicates whether the icon is in an active state.
95
+ * It is only relevant for `momentumUI` icons.
96
+ *
97
+ * When `isActive` is true, the `iconClassMap` getter method includes specific classes for styling the active state of the icon.
98
+ *
99
+ * Example usage:
100
+ * ```html
101
+ * <md-icon name="search" isActive></md-icon> <!-- Sets the icon to an active state -->
102
+ * ```
103
+ *
104
+ * The `iconClassMap` getter method:
105
+ * - Adds the class `md-combobox-input__icon--active` when `isComboBoxIcon` and `isActive` are both true.
106
+ * - Adds other relevant classes based on the icon's state.
107
+ */
30
108
  isActive: boolean;
109
+ /**
110
+ * @property {Boolean} isComboBoxIcon - This property indicates whether the icon is used within a combobox input.
111
+ * It is only relevant for `momentumUI` icons.
112
+ *
113
+ * When `isComboBoxIcon` is true, the `iconClassMap` getter method includes specific classes for styling the combobox icon.
114
+ *
115
+ * Example usage:
116
+ * ```html
117
+ * <md-icon name="search" isComboBoxIcon></md-icon> <!-- Adds combobox-specific classes to the icon -->
118
+ * ```
119
+ */
31
120
  isComboBoxIcon: boolean;
121
+ /**
122
+ * @property {Boolean} sizeOverrided - This property indicates whether the size of the icon has been overridden.
123
+ * It is only used with `momentumUI` icons.
124
+ *
125
+ * When `sizeOverrided` is true, the `handleSizeOverride` method is called to adjust the icon name based on the overridden size.
126
+ * This has no effect on momentumDesign icons
127
+ */
128
+ sizeOverrided: boolean;
129
+ /**
130
+ * @property {String} iconSet - This property allows selection of the icon set to be used.
131
+ * It supports the following values:
132
+ * - "momentumUI": Always use the legacy font-based icon set. from @momentum-ui/icons
133
+ * - "momentumDesign": Always use the new SVG-based icon set. from @momentum-design/icons
134
+ * - "preferMomentumDesign": Attempt to map icons from the legacy "momentumUI" set to their "momentumDesign" counterparts automatically.
135
+ * A lookup is done to get the momentum-design name, and if an icon is found and loaded, this is used instead of the font icon.
136
+ *
137
+ * Note: momentum-design icons do not contain size as part of their name, so the size needs to be specified; otherwise, the default size of 16 is used.
138
+ * for this reason the size property should always be used to allow for easier migration. if no size specified default of 16 used
139
+ *
140
+ * Example usage:
141
+ * ```html
142
+ * <md-icon iconSet="momentumUI" name="search_16"></md-icon> <!-- Uses the legacy font-based icon set -->
143
+ * <md-icon iconSet="momentumDesign" name="search-bold" size="16"></md-icon> <!-- Uses the new SVG-based icon set -->
144
+ * <md-icon iconSet="preferMomentumDesign name="search+16""></md-icon> <!-- Attempts to map icons to the new SVG-based set -->
145
+ * ```
146
+ */
32
147
  iconSet: IconSet;
33
148
  private static designLookup;
34
149
  private svgIcon;
@@ -32,7 +32,7 @@ export declare namespace Label {
32
32
  disabled: boolean;
33
33
  indeterminate: boolean;
34
34
  };
35
- handleClick(event: MouseEvent): void;
35
+ handleClick(): void;
36
36
  render(): import("lit-element").TemplateResult;
37
37
  }
38
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momentum-ui/web-components",
3
- "version": "2.13.10",
3
+ "version": "2.13.12",
4
4
  "author": "Yana Harris",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/momentum-design/momentum-ui.git",
@@ -13,8 +13,8 @@
13
13
  "@interactjs/interact": "1.10.3",
14
14
  "@interactjs/modifiers": "1.10.3",
15
15
  "@interactjs/utils": "1.10.3",
16
- "@momentum-design/icons": "0.0.154",
17
- "@momentum-design/tokens": "0.0.73",
16
+ "@momentum-design/icons": "0.0.155",
17
+ "@momentum-design/tokens": "0.0.77",
18
18
  "@popperjs/core": "^2.4.4",
19
19
  "country-codes-list": "1.6.8",
20
20
  "country-flags-svg": "1.1.4",