@mgdis/mg-components 5.8.2 → 5.10.0

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 (149) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mg-action-more_31.cjs.entry.js +216 -277
  3. package/dist/cjs/mg-components.cjs.js +1 -1
  4. package/dist/cjs/mg-item-more.cjs.entry.js +1 -16
  5. package/dist/cjs/{mg-menu.conf-9afe6571.js → mg-menu.conf-1942ac70.js} +0 -5
  6. package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -3
  7. package/dist/collection/components/atoms/mg-button/mg-button.js +2 -7
  8. package/dist/collection/components/atoms/mg-card/mg-card.conf.js +8 -0
  9. package/dist/collection/components/atoms/mg-card/mg-card.css +54 -0
  10. package/dist/collection/components/atoms/mg-card/mg-card.js +113 -2
  11. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +0 -2
  12. package/dist/collection/components/atoms/mg-divider/mg-divider.js +0 -1
  13. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +38 -7
  14. package/dist/collection/components/atoms/mg-icon/mg-icon.css +70 -11
  15. package/dist/collection/components/atoms/mg-icon/mg-icon.js +65 -24
  16. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +0 -2
  17. package/dist/collection/components/atoms/mg-tag/mg-tag.css +12 -12
  18. package/dist/collection/components/atoms/mg-tag/mg-tag.js +0 -3
  19. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +42 -15
  20. package/dist/collection/components/molecules/inputs/MgInput.js +0 -6
  21. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +0 -6
  22. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +0 -5
  23. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +12 -21
  24. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +0 -3
  25. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +0 -9
  26. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +0 -13
  27. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +1 -12
  28. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -5
  29. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +0 -5
  30. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +1 -12
  31. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +1 -0
  32. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +1 -19
  33. package/dist/collection/components/molecules/mg-action-more/mg-action-more.css +1 -0
  34. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +0 -8
  35. package/dist/collection/components/molecules/mg-details/mg-details.css +0 -3
  36. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -4
  37. package/dist/collection/components/molecules/mg-form/mg-form.js +0 -8
  38. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +0 -2
  39. package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +0 -5
  40. package/dist/collection/components/molecules/mg-message/mg-message.css +1 -19
  41. package/dist/collection/components/molecules/mg-message/mg-message.js +11 -11
  42. package/dist/collection/components/molecules/mg-modal/mg-modal.css +1 -0
  43. package/dist/collection/components/molecules/mg-modal/mg-modal.js +1 -6
  44. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +0 -6
  45. package/dist/collection/components/molecules/mg-panel/mg-panel.css +1 -0
  46. package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -15
  47. package/dist/collection/components/molecules/mg-popover/mg-popover.css +2 -0
  48. package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -8
  49. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -4
  50. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +0 -12
  51. package/dist/collection/locales/index.js +0 -1
  52. package/dist/collection/styles/reset-mg-card-slotted-variables.scss +1 -0
  53. package/dist/collection/utils/behaviors.utils.js +0 -10
  54. package/dist/collection/utils/components.utils.js +1 -10
  55. package/dist/collection/utils/locale.utils.js +0 -4
  56. package/dist/collection/utils/unit.test.utils.js +0 -5
  57. package/dist/collection/variables.css +7 -1
  58. package/dist/components/MgInput.js +0 -6
  59. package/dist/components/components.utils.js +1 -10
  60. package/dist/components/index2.js +0 -5
  61. package/dist/components/mg-action-more.js +1 -9
  62. package/dist/components/mg-badge2.js +1 -3
  63. package/dist/components/mg-button2.js +2 -7
  64. package/dist/components/mg-card2.js +67 -4
  65. package/dist/components/mg-character-left2.js +0 -2
  66. package/dist/components/mg-details.js +2 -5
  67. package/dist/components/mg-divider.js +0 -1
  68. package/dist/components/mg-form.js +0 -8
  69. package/dist/components/mg-icon2.js +74 -25
  70. package/dist/components/mg-illustrated-message.js +0 -2
  71. package/dist/components/mg-input-checkbox.js +0 -6
  72. package/dist/components/mg-input-date.js +0 -5
  73. package/dist/components/mg-input-numeric.js +12 -21
  74. package/dist/components/mg-input-password.js +0 -3
  75. package/dist/components/mg-input-radio.js +0 -9
  76. package/dist/components/mg-input-select2.js +0 -13
  77. package/dist/components/mg-input-text2.js +1 -12
  78. package/dist/components/mg-input-textarea.js +1 -5
  79. package/dist/components/mg-input-title2.js +0 -2
  80. package/dist/components/mg-input-toggle.js +0 -5
  81. package/dist/components/mg-item-more.js +0 -15
  82. package/dist/components/mg-menu-item2.js +2 -20
  83. package/dist/components/mg-menu2.js +0 -11
  84. package/dist/components/mg-message.js +4 -9
  85. package/dist/components/mg-modal.js +2 -7
  86. package/dist/components/mg-pagination.js +0 -6
  87. package/dist/components/mg-panel.js +6 -16
  88. package/dist/components/mg-popover2.js +2 -9
  89. package/dist/components/mg-skip-links.js +1 -4
  90. package/dist/components/mg-tabs.js +0 -12
  91. package/dist/components/mg-tag.js +1 -4
  92. package/dist/components/mg-tooltip2.js +42 -15
  93. package/dist/components/popper.js +3 -4
  94. package/dist/esm/loader.js +1 -1
  95. package/dist/esm/mg-action-more_31.entry.js +216 -277
  96. package/dist/esm/mg-components.js +1 -1
  97. package/dist/esm/mg-item-more.entry.js +1 -16
  98. package/dist/esm/{mg-menu.conf-881fbd82.js → mg-menu.conf-2cc1bb67.js} +0 -5
  99. package/dist/mg-components/mg-components.css +1 -1
  100. package/dist/mg-components/mg-components.esm.js +1 -1
  101. package/dist/mg-components/{p-67ce7cb8.entry.js → p-a56a3157.entry.js} +1 -1
  102. package/dist/mg-components/p-eb32bb18.entry.js +1 -0
  103. package/dist/mg-components/styles/reset-mg-card-slotted-variables.scss +1 -0
  104. package/dist/mg-components/variables.css +7 -1
  105. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +0 -2
  106. package/dist/types/components/atoms/mg-button/mg-button.d.ts +0 -5
  107. package/dist/types/components/atoms/mg-card/mg-card.conf.d.ts +16 -0
  108. package/dist/types/components/atoms/mg-card/mg-card.d.ts +37 -1
  109. package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +0 -2
  110. package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +0 -1
  111. package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +10 -2
  112. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +19 -8
  113. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +0 -2
  114. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +0 -3
  115. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +18 -9
  116. package/dist/types/components/molecules/inputs/MgInput.d.ts +0 -1
  117. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +0 -5
  118. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +0 -5
  119. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +5 -17
  120. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +0 -3
  121. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -8
  122. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -9
  123. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +0 -11
  124. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -4
  125. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +0 -5
  126. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +0 -11
  127. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +0 -18
  128. package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +0 -5
  129. package/dist/types/components/molecules/mg-details/mg-details.d.ts +0 -3
  130. package/dist/types/components/molecules/mg-form/mg-form.d.ts +0 -8
  131. package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +0 -2
  132. package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +0 -5
  133. package/dist/types/components/molecules/mg-message/mg-message.conf.d.ts +5 -1
  134. package/dist/types/components/molecules/mg-message/mg-message.d.ts +7 -11
  135. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +0 -5
  136. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +0 -5
  137. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +0 -10
  138. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +0 -7
  139. package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +0 -3
  140. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +0 -11
  141. package/dist/types/components.d.ts +35 -9
  142. package/dist/types/locales/index.d.ts +0 -1
  143. package/dist/types/utils/behaviors.utils.d.ts +0 -9
  144. package/dist/types/utils/components.utils.d.ts +1 -9
  145. package/dist/types/utils/locale.utils.d.ts +0 -4
  146. package/dist/types/utils/unit.test.utils.d.ts +0 -7
  147. package/package.json +15 -16
  148. package/dist/mg-components/p-0b68c4b4.entry.js +0 -1
  149. /package/dist/mg-components/{p-367f92d2.js → p-73156ac9.js} +0 -0
@@ -41,7 +41,6 @@ export declare class MgPagination {
41
41
  currentPageChange: EventEmitter<number>;
42
42
  /**
43
43
  * Change current page from target
44
- *
45
44
  * @param {number} target target page
46
45
  * @returns {void}
47
46
  */
@@ -51,14 +50,12 @@ export declare class MgPagination {
51
50
  ************/
52
51
  /**
53
52
  * select handler
54
- *
55
53
  * @param {InputEvent} event value change event
56
54
  * @returns {void}
57
55
  */
58
56
  private handleSelect;
59
57
  /**
60
58
  * Go to 'previous/next' page button handler
61
- *
62
59
  * @param {string} action navigation action
63
60
  * @param {boolean} disabled button disable state
64
61
  * @returns {void}
@@ -69,13 +66,11 @@ export declare class MgPagination {
69
66
  *************/
70
67
  /**
71
68
  * Check if props are well configured on init
72
- *
73
69
  * @returns {void}
74
70
  */
75
71
  componentWillLoad(): void;
76
72
  /**
77
73
  * Render
78
- *
79
74
  * @returns {HTMLElement} HTML Element
80
75
  */
81
76
  render(): HTMLElement;
@@ -70,7 +70,6 @@ export declare class MgPanel {
70
70
  ************/
71
71
  /**
72
72
  * Toggle is editing state
73
- *
74
73
  * @returns {void}
75
74
  */
76
75
  private toggleIsEditing;
@@ -79,32 +78,27 @@ export declare class MgPanel {
79
78
  ************/
80
79
  /**
81
80
  * Collapse button click handler
82
- *
83
81
  * @returns {void}
84
82
  */
85
83
  private handleCollapseButton;
86
84
  /**
87
85
  * Edit button click handler
88
- *
89
86
  * @returns {void}
90
87
  */
91
88
  private handleEditButton;
92
89
  /**
93
90
  * Update title handler
94
- *
95
91
  * @param {CustomEvent<string>} event input value change event
96
92
  * @returns {void}
97
93
  */
98
94
  private handleUpdateTitle;
99
95
  /**
100
96
  * Cancel edition button handler
101
- *
102
97
  * @returns {void}
103
98
  */
104
99
  private handleCancelEditButton;
105
100
  /**
106
101
  * Validate edition button handler
107
- *
108
102
  * @returns {void}
109
103
  */
110
104
  private handleValidateEditButton;
@@ -113,26 +107,22 @@ export declare class MgPanel {
113
107
  *************/
114
108
  /**
115
109
  * Check if props are well configured on init
116
- *
117
110
  * @returns {void}
118
111
  */
119
112
  componentWillLoad(): void;
120
113
  /**
121
114
  * Header left conditional render
122
- *
123
115
  * @typedef {HTMLElement} HTMLMgButtonElement
124
116
  * @returns {HTMLMgButtonElement | HTMLElement | HTMLElement[]} header left element
125
117
  */
126
118
  private headerLeft;
127
119
  /**
128
120
  * Edit DOM after render
129
- *
130
121
  * @returns {void}
131
122
  */
132
123
  componentDidRender(): void;
133
124
  /**
134
125
  * Render component
135
- *
136
126
  * @returns {HTMLElement} html element
137
127
  */
138
128
  render(): HTMLElement;
@@ -56,26 +56,22 @@ export declare class MgPopover {
56
56
  displayChange: EventEmitter<boolean>;
57
57
  /**
58
58
  * Check if clicked outside of component
59
- *
60
59
  * @param {MouseEvent} event mouse event
61
60
  * @returns {void}
62
61
  */
63
62
  private clickOutside;
64
63
  /**
65
64
  * Show popover
66
- *
67
65
  * @returns {void}
68
66
  */
69
67
  private show;
70
68
  /**
71
69
  * Hide popover
72
- *
73
70
  * @returns {void}
74
71
  */
75
72
  private hide;
76
73
  /**
77
74
  * Handle action for close button
78
- *
79
75
  * @returns {void}
80
76
  */
81
77
  private handleCloseButton;
@@ -84,19 +80,16 @@ export declare class MgPopover {
84
80
  *************/
85
81
  /**
86
82
  * Check if component props are well configured on init
87
- *
88
83
  * @returns {void} timeout
89
84
  */
90
85
  componentWillLoad(): void;
91
86
  /**
92
87
  * Check if component props are well configured on init
93
- *
94
88
  * @returns {void}
95
89
  */
96
90
  componentDidLoad(): void;
97
91
  /**
98
92
  * Render
99
- *
100
93
  * @returns {HTMLElement} HTML Element
101
94
  */
102
95
  render(): HTMLElement;
@@ -26,7 +26,6 @@ export declare class MgSkipLinks {
26
26
  **********/
27
27
  /**
28
28
  * Handle link click and emit go-to-anchor event
29
- *
30
29
  * @param {MouseEvent} event mouse event
31
30
  * @returns {void}
32
31
  */
@@ -36,13 +35,11 @@ export declare class MgSkipLinks {
36
35
  *************/
37
36
  /**
38
37
  * Check if props are well configured on init
39
- *
40
38
  * @returns {void}
41
39
  */
42
40
  componentWillLoad(): void;
43
41
  /**
44
42
  * Render
45
- *
46
43
  * @returns {HTMLElement} HTML Element
47
44
  */
48
45
  render(): HTMLElement;
@@ -57,7 +57,6 @@ export declare class MgTabs {
57
57
  activeTabChange: EventEmitter<number>;
58
58
  /**
59
59
  * Method to know if given tab has the given status
60
- *
61
60
  * @param {TabItem} tab item tab key to set to ACTIVE status
62
61
  * @param {Status} status status to valide
63
62
  * @returns {boolean} status comparaison
@@ -65,7 +64,6 @@ export declare class MgTabs {
65
64
  private tabHasStatus;
66
65
  /**
67
66
  * Method to get element id from index
68
- *
69
67
  * @param {string} element to get id
70
68
  * @param {number} index to generate id
71
69
  * @returns {string} generated element id
@@ -73,40 +71,34 @@ export declare class MgTabs {
73
71
  private getElementId;
74
72
  /**
75
73
  * Method to get tab item index
76
- *
77
74
  * @param {number} index to get
78
75
  * @returns {number} index
79
76
  */
80
77
  private getTabItemIndex;
81
78
  /**
82
79
  * Method to get the active-tab value
83
- *
84
80
  * @returns {number} of the active-tab
85
81
  */
86
82
  private getActiveTab;
87
83
  /**
88
84
  * Handle click events on tabs
89
- *
90
85
  * @param {MouseEvent} event mouse event
91
86
  */
92
87
  private handleClick;
93
88
  /**
94
89
  * get navigation button class from given status
95
- *
96
90
  * @param {Status} status button tab status
97
91
  * @returns {string} button class/selector variant
98
92
  */
99
93
  private getNavigationButtonClass;
100
94
  /**
101
95
  * Handle keyboard event on tabs
102
- *
103
96
  * @param {MouseEvent} event mouse event
104
97
  * @returns {void}
105
98
  */
106
99
  private handleKeydown;
107
100
  /**
108
101
  * Method to reset focus behavior
109
- *
110
102
  * @returns {void}
111
103
  */
112
104
  private resetFocus;
@@ -119,19 +111,16 @@ export declare class MgTabs {
119
111
  *************/
120
112
  /**
121
113
  * Check if component props are well configured on init
122
- *
123
114
  * @returns {void}
124
115
  */
125
116
  componentWillLoad(): void;
126
117
  /**
127
118
  * add listners
128
- *
129
119
  * @returns {void}
130
120
  */
131
121
  componentDidLoad(): void;
132
122
  /**
133
123
  * Render
134
- *
135
124
  * @returns {HTMLElement} HTML Element
136
125
  */
137
126
  render(): HTMLElement;
@@ -8,7 +8,8 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { MgActionMoreButtonType, MgActionMoreIconType, MgActionMoreItemType } from "./components/molecules/mg-action-more/mg-action-more.conf";
9
9
  import { BadgeVariantType } from "./components/atoms/mg-badge/mg-badge.conf";
10
10
  import { ButtonType, VariantType } from "./components/atoms/mg-button/mg-button.conf";
11
- import { IconSizeType, IconVariantType } from "./components/atoms/mg-icon/mg-icon.conf";
11
+ import { VariantStyleType, VariantType as VariantType1 } from "./components/atoms/mg-card/mg-card.conf";
12
+ import { IconSizeType, IconVariantStyleType, IconVariantType } from "./components/atoms/mg-icon/mg-icon.conf";
12
13
  import { CheckboxValue } from "./components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf";
13
14
  import { Width } from "./components/molecules/inputs/MgInput.conf";
14
15
  import { RadioOption } from "./components/molecules/inputs/mg-input-radio/mg-input-radio.conf";
@@ -17,6 +18,7 @@ import { ToggleValue } from "./components/molecules/inputs/mg-input-toggle/mg-in
17
18
  import { IconType, SizeType, SlotLabelType } from "./components/molecules/mg-item-more/mg-item-more.conf";
18
19
  import { Direction, ItemMoreType, MenuSizeType } from "./components/molecules/menu/mg-menu/mg-menu.conf";
19
20
  import { Status } from "./components/molecules/menu/mg-menu-item/mg-menu-item.conf";
21
+ import { VariantType as VariantType2 } from "./components/molecules/mg-message/mg-message.conf";
20
22
  import { Placement } from "@popperjs/core";
21
23
  import { SkipLink } from "./components/molecules/mg-skip-links/mg-skip-links.conf";
22
24
  import { SizeType as SizeType1, TabItem } from "./components/molecules/mg-tabs/mg-tabs.conf";
@@ -97,6 +99,14 @@ export namespace Components {
97
99
  "variant": VariantType;
98
100
  }
99
101
  interface MgCard {
102
+ /**
103
+ * Define variant prop Default: undefined
104
+ */
105
+ "variant": undefined | VariantType1;
106
+ /**
107
+ * Define variantStyle prop Default: undefined
108
+ */
109
+ "variantStyle": undefined | VariantStyleType;
100
110
  }
101
111
  interface MgCharacterLeft {
102
112
  /**
@@ -169,7 +179,7 @@ export namespace Components {
169
179
  }
170
180
  interface MgIcon {
171
181
  /**
172
- * Icon to display
182
+ * Icon to display.
173
183
  */
174
184
  "icon": string;
175
185
  /**
@@ -181,9 +191,13 @@ export namespace Components {
181
191
  */
182
192
  "spin": boolean;
183
193
  /**
184
- * Define icon variant Add a background to the icon based on variant color
194
+ * Define icon variant color
185
195
  */
186
- "variant"?: IconVariantType;
196
+ "variant": IconVariantType;
197
+ /**
198
+ * Define icon color variant style Add a color to the icon based on variant color with given style 'full': Used to set a circular background with variant soft color and icon variant color 'background': Used to set a circular background with variant soft color 'icon': Used to set a color only to the icon
199
+ */
200
+ "variantStyle": IconVariantStyleType;
187
201
  }
188
202
  interface MgIllustratedMessage {
189
203
  /**
@@ -955,7 +969,7 @@ export namespace Components {
955
969
  /**
956
970
  * Message variant
957
971
  */
958
- "variant": string;
972
+ "variant": VariantType2;
959
973
  }
960
974
  interface MgModal {
961
975
  /**
@@ -1506,6 +1520,14 @@ declare namespace LocalJSX {
1506
1520
  "variant"?: VariantType;
1507
1521
  }
1508
1522
  interface MgCard {
1523
+ /**
1524
+ * Define variant prop Default: undefined
1525
+ */
1526
+ "variant"?: undefined | VariantType1;
1527
+ /**
1528
+ * Define variantStyle prop Default: undefined
1529
+ */
1530
+ "variantStyle"?: undefined | VariantStyleType;
1509
1531
  }
1510
1532
  interface MgCharacterLeft {
1511
1533
  /**
@@ -1585,9 +1607,9 @@ declare namespace LocalJSX {
1585
1607
  }
1586
1608
  interface MgIcon {
1587
1609
  /**
1588
- * Icon to display
1610
+ * Icon to display.
1589
1611
  */
1590
- "icon"?: string;
1612
+ "icon": string;
1591
1613
  /**
1592
1614
  * Define icon size
1593
1615
  */
@@ -1597,9 +1619,13 @@ declare namespace LocalJSX {
1597
1619
  */
1598
1620
  "spin"?: boolean;
1599
1621
  /**
1600
- * Define icon variant Add a background to the icon based on variant color
1622
+ * Define icon variant color
1601
1623
  */
1602
1624
  "variant"?: IconVariantType;
1625
+ /**
1626
+ * Define icon color variant style Add a color to the icon based on variant color with given style 'full': Used to set a circular background with variant soft color and icon variant color 'background': Used to set a circular background with variant soft color 'icon': Used to set a color only to the icon
1627
+ */
1628
+ "variantStyle"?: IconVariantStyleType;
1603
1629
  }
1604
1630
  interface MgIllustratedMessage {
1605
1631
  /**
@@ -2414,7 +2440,7 @@ declare namespace LocalJSX {
2414
2440
  /**
2415
2441
  * Message variant
2416
2442
  */
2417
- "variant"?: string;
2443
+ "variant"?: VariantType2;
2418
2444
  }
2419
2445
  interface MgModal {
2420
2446
  /**
@@ -126,7 +126,6 @@ declare const messages: {
126
126
  };
127
127
  /**
128
128
  * Get Intl object
129
- *
130
129
  * @param {HTMLElement} element element we need to get the language
131
130
  * @returns {{ locale: string; messages: Record<string, unknown> }} messages object
132
131
  */
@@ -15,7 +15,6 @@ export declare class OverflowBehavior {
15
15
  **********/
16
16
  /**
17
17
  * Disconnect ResizeObserver
18
- *
19
18
  * @returns {void}
20
19
  */
21
20
  disconnect: () => void;
@@ -24,28 +23,24 @@ export declare class OverflowBehavior {
24
23
  ************/
25
24
  /**
26
25
  * run overflow behavior
27
- *
28
26
  * @param {number} width width of the container. Optional.
29
27
  * @returns {void}
30
28
  */
31
29
  private run;
32
30
  /**
33
31
  * Get interactive children filtred by authorized nodeName ['MG-MENU-ITEM', 'MG-BUTTON']
34
- *
35
32
  * @param {Element} element element to parse
36
33
  * @returns {Element[]} children
37
34
  */
38
35
  private getInteractiveItems;
39
36
  /**
40
37
  * Update displayed items in container from a given available space
41
- *
42
38
  * @param {number} availableWidth available width in container to display child items
43
39
  * @returns {void}
44
40
  */
45
41
  private updateDisplayedItems;
46
42
  /**
47
43
  * Utility method to know if item overflow partialy or totaly in the container
48
- *
49
44
  * @param {number} cumulateWidth previous sibling elements cumulate width + item width
50
45
  * @param {HTMLElement} item item HTML element
51
46
  * @param {number} availableWidth container available width
@@ -54,14 +49,12 @@ export declare class OverflowBehavior {
54
49
  private isOverflowElement;
55
50
  /**
56
51
  * Utility method to know if a given element is the 'MORE' element
57
- *
58
52
  * @param {Element} element element to match with 'MORE' element
59
53
  * @returns {boolean} truthy if element is the 'MORE' element
60
54
  */
61
55
  private isMoreElement;
62
56
  /**
63
57
  * Toggle display item element
64
- *
65
58
  * @param {HTMLElement} item item to control
66
59
  * @param {boolean} isHidden is item hidden
67
60
  * @returns {void}
@@ -69,7 +62,6 @@ export declare class OverflowBehavior {
69
62
  private toggleItem;
70
63
  /**
71
64
  * Toggle element's hidde attribute
72
- *
73
65
  * @param {Element} element element to toggle
74
66
  * @param {boolean} isHidden element is hidden
75
67
  * @returns {void}
@@ -77,7 +69,6 @@ export declare class OverflowBehavior {
77
69
  private toggleElement;
78
70
  /**
79
71
  * Remove hidden attributes on all items
80
- *
81
72
  * @returns {void}
82
73
  */
83
74
  private restoreItems;
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * Create random ID
3
- *
4
3
  * @param {string} prefix add prefix to created ID
5
4
  * @param {number} length ID length
6
5
  * @returns {string} ID
@@ -15,42 +14,36 @@ export declare class ClassList {
15
14
  constructor(classlist?: string[]);
16
15
  /**
17
16
  * Add class
18
- *
19
17
  * @param {string} className class name to add
20
18
  * @returns {void}
21
19
  */
22
20
  add: (className: string) => void;
23
21
  /**
24
22
  * Delete class
25
- *
26
23
  * @param {string} className class name to delete
27
24
  * @returns {void}
28
25
  */
29
26
  delete: (className: string) => void;
30
27
  /**
31
28
  * Check if class exist in list
32
- *
33
29
  * @param {string} className class name to check
34
30
  * @returns {boolean} class name is in the list
35
31
  */
36
32
  has: (className: string) => boolean;
37
33
  /**
38
34
  * Join classes seperated by spaces
39
- *
40
35
  * @returns {string} joined values
41
36
  */
42
37
  join: () => string;
43
38
  }
44
39
  /**
45
40
  * Check if all items are string
46
- *
47
41
  * @param {unknown} items items to check
48
42
  * @returns {boolean} all items are string
49
43
  */
50
44
  export declare const allItemsAreString: (items: unknown) => items is string[];
51
45
  /**
52
46
  * Check if element is a heading
53
- *
54
47
  * @param {Element} element slotted element
55
48
  * @param {string[]} tagNames allowed tag names list
56
49
  * @returns {boolean} element is a heading
@@ -61,14 +54,13 @@ export declare const isTagName: (element: Element, tagNames: string[]) => boolea
61
54
  */
62
55
  export declare const focusableElements = "a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"]), [identifier]";
63
56
  /**
64
- *
57
+ * Get windows
65
58
  * @param {Window} localWindow the window we are lookink for other windows
66
59
  * @returns {Window[]} The list of windows found
67
60
  */
68
61
  export declare const getWindows: (localWindow: Window) => Window[];
69
62
  /**
70
63
  * Get parent windows
71
- *
72
64
  * @param {Window} localWindow the window we are lookink for parents
73
65
  * @param {Window[]} windows The list of allready found windows
74
66
  * @returns {Window[]} The list of windows found
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * Format number to the locale currency
3
- *
4
3
  * @param {number} number number to format
5
4
  * @param {string} locale locale to apply
6
5
  * @param {string} currency currency to apply
@@ -9,7 +8,6 @@
9
8
  export declare const localeCurrency: (number: number, locale: string, currency: string) => string;
10
9
  /**
11
10
  * Format number to locale
12
- *
13
11
  * @param {number} number number to format
14
12
  * @param {string} locale locale to apply
15
13
  * @returns {string} formatted number
@@ -21,7 +19,6 @@ export declare const localeNumber: (number: number, locale: string) => string;
21
19
  export declare const dateRegExp: RegExp;
22
20
  /**
23
21
  * Locale date format
24
- *
25
22
  * @param {string} date date to format
26
23
  * @param {string} locale locale to apply
27
24
  * @returns {string} formatted date
@@ -30,7 +27,6 @@ export declare const localeDate: (date: string, locale: string) => string;
30
27
  /**
31
28
  * Get locale and messages
32
29
  * We load the defined locale but for now we only support the first subtag for messages
33
- *
34
30
  * @param {HTMLElement} element element we need to get the language
35
31
  * @param {unknown} messages messages to use
36
32
  * @param {string} defaultLocale default messages locale
@@ -1,14 +1,12 @@
1
1
  import { MockCustomEvent } from '@stencil/core/mock-doc';
2
2
  /**
3
3
  * Clone Deep function
4
- *
5
4
  * @param {unknown} obj object to clone
6
5
  * @returns {unknown} cloned json
7
6
  */
8
7
  export declare const cloneDeep: (obj: unknown) => unknown;
9
8
  /**
10
9
  * Utility function that mocks the `MutationObserver` API. Recommended to execute inside `beforeEach`.
11
- *
12
10
  * @param mutationObserverMock - Parameter that is sent to the `Object.defineProperty`
13
11
  * overwrite method. `jest.fn()` mock functions can be passed here if the goal is to not only
14
12
  * mock the mutation observer, but its methods.
@@ -37,7 +35,6 @@ type SetupMutationObserverMockParams = {
37
35
  export declare const setupMutationObserverMock: ({ disconnect, observe, takeRecords }: SetupMutationObserverMockParams) => typeof MutationObserver;
38
36
  /**
39
37
  * Utility function that mocks the `ResizeObserver` API. Recommended to execute inside `beforeEach`.
40
- *
41
38
  * @param resizeObserverMock - Parameter that is sent to the `Object.defineProperty`
42
39
  * overwrite method. `jest.fn()` mock functions can be passed here if the goal is to not only
43
40
  * mock the resize observer, but its methods.
@@ -70,7 +67,6 @@ type setupResizeObserverMockParams = {
70
67
  export declare const setupResizeObserverMock: ({ disconnect, observe }: setupResizeObserverMockParams) => typeof ResizeObserver;
71
68
  /**
72
69
  * Utility function that mocks the `SubmitEvent` API. Recommended to execute inside `beforeEach`.
73
- *
74
70
  * @returns {void}
75
71
  * @example
76
72
  * ```
@@ -80,7 +76,6 @@ export declare const setupResizeObserverMock: ({ disconnect, observe }: setupRes
80
76
  export declare const setupSubmitEventMock: () => typeof MockCustomEvent;
81
77
  /**
82
78
  * force popover id when component use randomed identifier
83
- *
84
79
  * @param {Element} component element wich include mg-popover
85
80
  * @param {string} id new fixed id
86
81
  * @param {string} interactiveElement element where attribute 'aria-controls' is set
@@ -93,14 +88,12 @@ export declare const forcePopoverId: (component: Element, id: string, interactiv
93
88
  * this is due to internal function isHTMLElement(), so we can not mock it directly.
94
89
  * this function check if test DOM element mockHTMLElement instance is 'instanceof HTMLElement'
95
90
  * so we only override the console.error side effect for this error
96
- *
97
91
  * @returns {void}
98
92
  */
99
93
  export declare const mockConsoleError: () => void;
100
94
  /**
101
95
  * Add missing window.frames property to test context
102
96
  * usefull for component with iframe listeners, ex: mg-popover
103
- *
104
97
  * @returns {void}
105
98
  */
106
99
  export declare const mockWindowFrames: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mgdis/mg-components",
3
- "version": "5.8.2",
3
+ "version": "5.10.0",
4
4
  "description": "MG Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -30,8 +30,8 @@
30
30
  "devDependencies": {
31
31
  "@babel/core": "^7.20.12",
32
32
  "@babel/plugin-transform-react-jsx": "^7.20.13",
33
+ "@playwright/test": "^1.33.0",
33
34
  "@pxtrn/storybook-addon-docs-stencil": "^6.4.1",
34
- "@stencil/eslint-plugin": "^0.4.0",
35
35
  "@stencil/sass": "^1.5.2",
36
36
  "@storybook/addon-a11y": "^6.5.16",
37
37
  "@storybook/addon-actions": "^6.5.16",
@@ -40,34 +40,32 @@
40
40
  "@storybook/addon-links": "^6.5.16",
41
41
  "@storybook/html": "^6.5.16",
42
42
  "@storybook/preset-scss": "^1.0.3",
43
- "@types/jest": "^26.0.24",
43
+ "@types/jest": "npm:@types/jest@^26",
44
44
  "@types/jest-image-snapshot": "^4.3.2",
45
45
  "@types/node": "^18.14.0",
46
- "@typescript-eslint/eslint-plugin": "^4.33.0",
47
- "@typescript-eslint/parser": "^4.33.0",
48
46
  "babel-loader": "^8.3.0",
49
47
  "babel-plugin-jsx-pragmatic": "^1.0.2",
50
48
  "chromatic": "^6.15.0",
51
49
  "css-loader": "^5.2.7",
52
- "eslint": "^7.32.0",
53
- "eslint-plugin-jsdoc": "^38.1.6",
54
- "eslint-plugin-jsx-a11y": "^6.7.1",
55
- "eslint-plugin-react": "^7.32.2",
56
- "eslint-plugin-storybook": "^0.6.10",
57
- "jest": "^27.0.3",
58
- "jest-cli": "^26.6.3",
50
+ "eslint": "^8.39.0",
51
+ "eslint-plugin-storybook": "^0.6.11",
52
+ "jest": "npm:jest@^26",
53
+ "jest-cli": "npm:jest-cli@^26",
59
54
  "jest-image-snapshot": "^4.5.1",
60
- "jest-junit": "^14.0.1",
55
+ "jest-junit": "^15.0.0",
61
56
  "jsx-dom": "^8.0.4",
62
57
  "npm-run-all": "^4.1.5",
58
+ "playwright-config": "^1.0.0",
63
59
  "prettier": "^2.8.4",
64
60
  "puppeteer": "^13.7.0",
65
61
  "sass": "^1.58.0",
66
62
  "sass-loader": "^10.4.1",
67
63
  "style-loader": "^2.0.0",
68
64
  "ts-node": "^10.9.1",
69
- "turbo": "^1.8.1",
70
- "typescript": "^4.9.5"
65
+ "typescript": "^4.9.5",
66
+ "@mgdis/linting-stencil": "1.0.0",
67
+ "eslint-config-stencil": "1.0.0",
68
+ "tsconfig": "1.0.0"
71
69
  },
72
70
  "license": "BSD-3-Clause",
73
71
  "scripts": {
@@ -82,10 +80,11 @@
82
80
  "test": "TZ=UTC stencil test --spec --e2e",
83
81
  "test:unit": "TZ=UTC stencil test --spec --collectCoverage",
84
82
  "test:e2e": "stencil test --e2e",
83
+ "test:e2e:playwright": "pnpm dlx playwright test",
85
84
  "test:watch": "stencil test --spec --e2e --watchAll",
86
85
  "generate": "stencil generate",
87
86
  "storybook": "NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6006",
88
87
  "storybook:build": "NODE_OPTIONS=--openssl-legacy-provider build-storybook",
89
- "coverage": "TZ=UTC stencil test --spec --collectCoverage --reporters=\"default\" --reporters=\"jest-junit\""
88
+ "coverage": "TZ=UTC stencil test --spec --no-build --collectCoverage --reporters=\"default\" --reporters=\"jest-junit\""
90
89
  }
91
90
  }