@mgdis/mg-components 3.3.0 → 4.0.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 (226) hide show
  1. package/dist/cjs/{index-bead7dbd.js → index-88560a66.js} +47 -48
  2. package/dist/cjs/{index-369388eb.js → index-a39c5567.js} +97 -10
  3. package/dist/cjs/loader.cjs.js +3 -17
  4. package/dist/cjs/mg-badge_21.cjs.entry.js +461 -281
  5. package/dist/cjs/mg-components.cjs.js +3 -7
  6. package/dist/cjs/mg-modal.cjs.entry.js +12 -6
  7. package/dist/cjs/mg-popover.cjs.entry.js +15 -6
  8. package/dist/cjs/{popper-0c3964e7.js → popper-71bf3058.js} +6 -2
  9. package/dist/collection/collection-manifest.json +1 -1
  10. package/dist/collection/components/atoms/mg-badge/{mg-badge.stories.js → doc/mg-badge.stories.js} +1 -1
  11. package/dist/collection/components/atoms/mg-badge/mg-badge.css +0 -2
  12. package/dist/collection/components/atoms/mg-badge/mg-badge.js +15 -3
  13. package/dist/collection/components/atoms/mg-button/{mg-button.stories.js → doc/mg-button.stories.js} +2 -2
  14. package/dist/collection/components/atoms/mg-button/mg-button.css +6 -30
  15. package/dist/collection/components/atoms/mg-button/mg-button.js +7 -2
  16. package/dist/collection/components/atoms/mg-character-left/{mg-character-left.stories.js → doc/mg-character-left.stories.js} +1 -1
  17. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +10 -47
  18. package/dist/collection/components/atoms/mg-icon/{mg-icon.stories.js → doc/mg-icon.stories.js} +1 -1
  19. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +86 -10
  20. package/dist/collection/components/atoms/mg-icon/mg-icon.css +4 -0
  21. package/dist/collection/components/atoms/mg-icon/mg-icon.js +22 -6
  22. package/dist/collection/components/atoms/mg-input-title/{mg-input-title.stories.js → doc/mg-input-title.stories.js} +0 -0
  23. package/dist/collection/components/atoms/mg-tag/{mg-tag.stories.js → doc/mg-tag.stories.js} +1 -1
  24. package/dist/collection/components/atoms/mg-tag/mg-tag.js +19 -4
  25. package/dist/collection/components/atoms/mg-tooltip/{mg-tooltip.stories.js → doc/mg-tooltip.stories.js} +14 -1
  26. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.conf.js +20 -0
  27. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +7 -2
  28. package/dist/collection/components/molecules/inputs/MgInput.conf.js +1 -7
  29. package/dist/collection/components/molecules/inputs/MgInput.js +5 -15
  30. package/dist/collection/components/molecules/inputs/mg-input-checkbox/{mg-input-checkbox.stories.js → doc/mg-input-checkbox.stories.js} +0 -0
  31. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +19 -13
  32. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +8 -21
  33. package/dist/collection/components/molecules/inputs/mg-input-date/{mg-input-date.stories.js → doc/mg-input-date.stories.js} +0 -0
  34. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +19 -18
  35. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +19 -18
  36. package/dist/collection/components/molecules/inputs/mg-input-numeric/{mg-input-numeric.stories.js → doc/mg-input-numeric.stories.js} +9 -2
  37. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +20 -19
  38. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +43 -19
  39. package/dist/collection/components/molecules/inputs/mg-input-password/{mg-input-password.stories.js → doc/mg-input-password.stories.js} +10 -1
  40. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +19 -18
  41. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +17 -22
  42. package/dist/collection/components/molecules/inputs/mg-input-radio/{mg-input-radio.stories.js → doc/mg-input-radio.stories.js} +0 -0
  43. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +19 -13
  44. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +8 -15
  45. package/dist/collection/components/molecules/inputs/mg-input-select/{mg-input-select.stories.js → doc/mg-input-select.stories.js} +10 -3
  46. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +20 -18
  47. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +24 -31
  48. package/dist/collection/components/molecules/inputs/mg-input-text/{mg-input-text.stories.js → doc/mg-input-text.stories.js} +11 -7
  49. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +51 -28
  50. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +42 -43
  51. package/dist/collection/components/molecules/inputs/mg-input-textarea/{mg-input-textarea.stories.js → doc/mg-input-textarea.stories.js} +10 -4
  52. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +51 -22
  53. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +64 -37
  54. package/dist/collection/components/molecules/inputs/mg-input-toggle/{mg-input-toggle.stories.js → doc/mg-input-toggle.stories.js} +0 -0
  55. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +18 -9
  56. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +9 -3
  57. package/dist/collection/components/molecules/mg-form/{mg-form.stories.js → doc/mg-form.stories.js} +0 -0
  58. package/dist/collection/components/molecules/mg-form/mg-form.css +4 -0
  59. package/dist/collection/components/molecules/mg-form/mg-form.js +5 -3
  60. package/dist/collection/components/molecules/mg-message/{mg-message.stories.js → doc/mg-message.stories.js} +1 -1
  61. package/dist/collection/components/molecules/mg-message/mg-message.js +15 -7
  62. package/dist/collection/components/molecules/mg-modal/{mg-modal.stories.js → doc/mg-modal.stories.js} +0 -0
  63. package/dist/collection/components/molecules/mg-modal/mg-modal.css +5 -7
  64. package/dist/collection/components/molecules/mg-modal/mg-modal.js +10 -4
  65. package/dist/collection/components/molecules/mg-pagination/{mg-pagination.stories.js → doc/mg-pagination.stories.js} +0 -0
  66. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +17 -18
  67. package/dist/collection/components/molecules/mg-panel/{mg-panel.stories.js → doc/mg-panel.stories.js} +0 -0
  68. package/dist/collection/components/molecules/mg-panel/mg-panel.css +5 -1
  69. package/dist/collection/components/molecules/mg-panel/mg-panel.js +10 -9
  70. package/dist/collection/components/molecules/mg-popover/{mg-popover.stories.js → doc/mg-popover.stories.js} +10 -0
  71. package/dist/collection/components/molecules/mg-popover/mg-popover.conf.js +20 -0
  72. package/dist/collection/components/molecules/mg-popover/mg-popover.js +19 -5
  73. package/dist/collection/components/molecules/mg-tabs/{mg-tabs.stories.js → doc/mg-tabs.stories.js} +11 -5
  74. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +7 -0
  75. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +3 -0
  76. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +72 -26
  77. package/dist/collection/locales/index.js +33 -4
  78. package/dist/collection/stories/helpers.stories.js +33 -0
  79. package/dist/collection/utils/locale.utils.js +7 -4
  80. package/dist/collection/variables.css +10 -5
  81. package/dist/collection/variables.scss +10 -5
  82. package/dist/components/MgInput.js +6 -23
  83. package/dist/components/index.d.ts +23 -5
  84. package/dist/components/index.js +23 -0
  85. package/dist/components/index2.js +97 -8
  86. package/dist/components/locale.utils.js +7 -5
  87. package/dist/components/mg-badge2.js +16 -4
  88. package/dist/components/mg-button2.js +8 -3
  89. package/dist/components/mg-character-left2.js +4 -27
  90. package/dist/components/mg-form.js +6 -4
  91. package/dist/components/mg-icon2.js +109 -17
  92. package/dist/components/mg-input-checkbox.js +11 -27
  93. package/dist/components/mg-input-date.js +21 -25
  94. package/dist/components/mg-input-numeric.js +28 -26
  95. package/dist/components/mg-input-password.js +18 -28
  96. package/dist/components/mg-input-radio.js +10 -22
  97. package/dist/components/mg-input-select2.js +24 -35
  98. package/dist/components/mg-input-text2.js +38 -26
  99. package/dist/components/mg-input-textarea.js +43 -20
  100. package/dist/components/mg-input-toggle.js +11 -11
  101. package/dist/components/mg-message.js +16 -8
  102. package/dist/components/mg-modal.js +11 -5
  103. package/dist/components/mg-pagination.js +16 -22
  104. package/dist/components/mg-panel.js +8 -7
  105. package/dist/components/mg-popover.js +13 -4
  106. package/dist/components/mg-tabs.js +75 -21
  107. package/dist/components/mg-tag.js +20 -5
  108. package/dist/components/mg-tooltip2.js +1 -1
  109. package/dist/components/popper.js +6 -2
  110. package/dist/esm/{index-9e877561.js → index-bca81100.js} +48 -46
  111. package/dist/esm/{index-c346f52d.js → index-e51ae032.js} +97 -8
  112. package/dist/esm/loader.js +3 -17
  113. package/dist/esm/mg-badge_21.entry.js +458 -278
  114. package/dist/esm/mg-components.js +3 -7
  115. package/dist/esm/mg-modal.entry.js +12 -6
  116. package/dist/esm/mg-popover.entry.js +15 -6
  117. package/dist/esm/{popper-8874fd6c.js → popper-93ecb064.js} +6 -2
  118. package/dist/index.js +1 -1
  119. package/dist/mg-components/mg-components.css +1 -1
  120. package/dist/mg-components/mg-components.esm.js +1 -1
  121. package/dist/mg-components/p-003a1344.entry.js +1 -0
  122. package/dist/mg-components/p-462d648a.entry.js +1 -0
  123. package/dist/mg-components/p-4c66f794.js +1 -0
  124. package/dist/mg-components/p-5126ab10.entry.js +1 -0
  125. package/dist/mg-components/p-780bd52d.js +1 -0
  126. package/dist/mg-components/p-b14a3443.js +2 -0
  127. package/dist/mg-components/variables.css +10 -5
  128. package/dist/mg-components/variables.scss +10 -5
  129. package/dist/types/components/atoms/mg-badge/{mg-badge.stories.d.ts → doc/mg-badge.stories.d.ts} +0 -0
  130. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +8 -1
  131. package/dist/types/components/atoms/mg-button/{mg-button.stories.d.ts → doc/mg-button.stories.d.ts} +0 -0
  132. package/dist/types/components/atoms/mg-button/mg-button.d.ts +1 -1
  133. package/dist/types/components/atoms/mg-character-left/{mg-character-left.stories.d.ts → doc/mg-character-left.stories.d.ts} +0 -0
  134. package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +5 -13
  135. package/dist/types/components/atoms/mg-icon/{mg-icon.stories.d.ts → doc/mg-icon.stories.d.ts} +0 -0
  136. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +3 -3
  137. package/dist/types/components/atoms/mg-input-title/{mg-input-title.stories.d.ts → doc/mg-input-title.stories.d.ts} +0 -0
  138. package/dist/types/components/atoms/mg-tag/{mg-tag.stories.d.ts → doc/mg-tag.stories.d.ts} +0 -0
  139. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +8 -1
  140. package/dist/types/components/atoms/mg-tooltip/doc/mg-tooltip.stories.d.ts +29 -0
  141. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.conf.d.ts +8 -0
  142. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +2 -1
  143. package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +0 -6
  144. package/dist/types/components/molecules/inputs/MgInput.d.ts +2 -4
  145. package/dist/types/components/molecules/inputs/mg-input-checkbox/{mg-input-checkbox.stories.d.ts → doc/mg-input-checkbox.stories.d.ts} +0 -0
  146. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +5 -2
  147. package/dist/types/components/molecules/inputs/mg-input-date/{mg-input-date.stories.d.ts → doc/mg-input-date.stories.d.ts} +0 -0
  148. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +7 -1
  149. package/dist/types/components/molecules/inputs/mg-input-numeric/{mg-input-numeric.stories.d.ts → doc/mg-input-numeric.stories.d.ts} +6 -0
  150. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +8 -2
  151. package/dist/types/components/molecules/inputs/mg-input-password/{mg-input-password.stories.d.ts → doc/mg-input-password.stories.d.ts} +8 -0
  152. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +7 -2
  153. package/dist/types/components/molecules/inputs/mg-input-radio/{mg-input-radio.stories.d.ts → doc/mg-input-radio.stories.d.ts} +0 -0
  154. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +5 -1
  155. package/dist/types/components/molecules/inputs/mg-input-select/{mg-input-select.stories.d.ts → doc/mg-input-select.stories.d.ts} +11 -5
  156. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +7 -2
  157. package/dist/types/components/molecules/inputs/mg-input-text/{mg-input-text.stories.d.ts → doc/mg-input-text.stories.d.ts} +8 -0
  158. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +7 -7
  159. package/dist/types/components/molecules/inputs/mg-input-textarea/{mg-input-textarea.stories.d.ts → doc/mg-input-textarea.stories.d.ts} +8 -0
  160. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +14 -6
  161. package/dist/types/components/molecules/inputs/mg-input-toggle/{mg-input-toggle.stories.d.ts → doc/mg-input-toggle.stories.d.ts} +0 -0
  162. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +2 -0
  163. package/dist/types/components/molecules/mg-form/{mg-form.stories.d.ts → doc/mg-form.stories.d.ts} +0 -0
  164. package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -0
  165. package/dist/types/components/molecules/mg-message/{mg-message.stories.d.ts → doc/mg-message.stories.d.ts} +0 -0
  166. package/dist/types/components/molecules/mg-message/mg-message.d.ts +2 -0
  167. package/dist/types/components/molecules/mg-modal/{mg-modal.stories.d.ts → doc/mg-modal.stories.d.ts} +0 -0
  168. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +2 -0
  169. package/dist/types/components/molecules/mg-pagination/{mg-pagination.stories.d.ts → doc/mg-pagination.stories.d.ts} +0 -0
  170. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +8 -0
  171. package/dist/types/components/molecules/mg-panel/{mg-panel.stories.d.ts → doc/mg-panel.stories.d.ts} +0 -0
  172. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +5 -0
  173. package/dist/types/components/molecules/mg-popover/doc/mg-popover.stories.d.ts +25 -0
  174. package/dist/types/components/molecules/mg-popover/mg-popover.conf.d.ts +8 -0
  175. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +9 -1
  176. package/dist/types/components/molecules/mg-tabs/{mg-tabs.stories.d.ts → doc/mg-tabs.stories.d.ts} +0 -0
  177. package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +7 -1
  178. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +44 -0
  179. package/dist/types/components.d.ts +149 -151
  180. package/dist/types/locales/index.d.ts +109 -46
  181. package/dist/types/stories/{buttons.stories.d.ts → helpers.stories.d.ts} +1 -1
  182. package/dist/types/utils/locale.utils.d.ts +7 -3
  183. package/loader/index.js +1 -1
  184. package/package.json +41 -14
  185. package/readme.md +6 -35
  186. package/dist/cjs/css-shim-629916b0.js +0 -6
  187. package/dist/cjs/shadow-css-546083ef.js +0 -390
  188. package/dist/collection/stories/buttons.stories.js +0 -43
  189. package/dist/collection/stories/messages.stories.js +0 -44
  190. package/dist/collection/stories/tags.stories.js +0 -13
  191. package/dist/esm/css-shim-0993aa3b.js +0 -4
  192. package/dist/esm/shadow-css-dfa0587f.js +0 -388
  193. package/dist/esm-es5/css-shim-0993aa3b.js +0 -1
  194. package/dist/esm-es5/index-9e877561.js +0 -1
  195. package/dist/esm-es5/index-c346f52d.js +0 -1
  196. package/dist/esm-es5/index.js +0 -0
  197. package/dist/esm-es5/loader.js +0 -1
  198. package/dist/esm-es5/mg-badge_21.entry.js +0 -2
  199. package/dist/esm-es5/mg-components.js +0 -1
  200. package/dist/esm-es5/mg-modal.entry.js +0 -1
  201. package/dist/esm-es5/mg-popover.entry.js +0 -1
  202. package/dist/esm-es5/popper-8874fd6c.js +0 -1
  203. package/dist/esm-es5/shadow-css-dfa0587f.js +0 -12
  204. package/dist/mg-components/mg-components.js +0 -132
  205. package/dist/mg-components/p-136c8d6f.system.entry.js +0 -2
  206. package/dist/mg-components/p-3c14153d.js +0 -1
  207. package/dist/mg-components/p-50ea2036.system.js +0 -1
  208. package/dist/mg-components/p-55a22b35.system.js +0 -1
  209. package/dist/mg-components/p-5e796581.js +0 -12
  210. package/dist/mg-components/p-656b5efb.system.js +0 -1
  211. package/dist/mg-components/p-68d6f104.js +0 -1
  212. package/dist/mg-components/p-6d49ed95.js +0 -1
  213. package/dist/mg-components/p-6f173f62.system.entry.js +0 -1
  214. package/dist/mg-components/p-70177194.entry.js +0 -1
  215. package/dist/mg-components/p-8b2d8a2a.system.js +0 -13
  216. package/dist/mg-components/p-8cb61c3f.system.js +0 -1
  217. package/dist/mg-components/p-ace173b1.js +0 -1
  218. package/dist/mg-components/p-b7488a4c.entry.js +0 -1
  219. package/dist/mg-components/p-c1ffb2e1.entry.js +0 -1
  220. package/dist/mg-components/p-c90cc4bf.system.js +0 -1
  221. package/dist/mg-components/p-de1164fa.system.entry.js +0 -1
  222. package/dist/mg-components/p-e4a502b5.system.js +0 -1
  223. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.stories.d.ts +0 -11
  224. package/dist/types/components/molecules/mg-popover/mg-popover.stories.d.ts +0 -12
  225. package/dist/types/stories/messages.stories.d.ts +0 -13
  226. package/dist/types/stories/tags.stories.d.ts +0 -5
@@ -1,8 +1,7 @@
1
- import { Component, Event, h, Prop, State, Method, Watch } from '@stencil/core';
1
+ import { Component, Element, Event, h, Prop, State, Method, Watch } from '@stencil/core';
2
2
  import { MgInput } from '../MgInput';
3
- import { InputClass } from '../MgInput.conf';
4
3
  import { createID, ClassList } from '../../../../utils/components.utils';
5
- import { messages } from '../../../../locales';
4
+ import { initLocales } from '../../../../locales';
6
5
  export class MgInputTextarea {
7
6
  constructor() {
8
7
  /************
@@ -10,7 +9,9 @@ export class MgInputTextarea {
10
9
  ************/
11
10
  // classes
12
11
  this.classFocus = 'is-focused';
13
- this.classError = InputClass.ERROR;
12
+ this.classHasDisplayCharacterLeft = 'mg-input--has-display-character-left';
13
+ // hasError (triggered by blur event)
14
+ this.hasError = false;
14
15
  /**
15
16
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
16
17
  * If not set, it will be created.
@@ -44,7 +45,7 @@ export class MgInputTextarea {
44
45
  /**
45
46
  * Define input width
46
47
  */
47
- this.width = 'full';
48
+ this.mgWidth = 'full';
48
49
  /**
49
50
  * Define the number of visible text lines for the control
50
51
  */
@@ -53,6 +54,10 @@ export class MgInputTextarea {
53
54
  * Define if component should display character left
54
55
  */
55
56
  this.displayCharacterLeft = true;
57
+ /**
58
+ * Define if input is resizable
59
+ */
60
+ this.resizable = 'none';
56
61
  /**
57
62
  * Component classes
58
63
  */
@@ -61,6 +66,10 @@ export class MgInputTextarea {
61
66
  * Handle input event
62
67
  */
63
68
  this.handleInput = () => {
69
+ if (this.hasError) {
70
+ this.checkValidity();
71
+ this.checkError();
72
+ }
64
73
  this.value = this.input.value;
65
74
  };
66
75
  /**
@@ -77,9 +86,8 @@ export class MgInputTextarea {
77
86
  // Manage focus
78
87
  this.classList.delete(this.classFocus);
79
88
  this.classList = new ClassList(this.classList.classes);
80
- // Check validity
81
- this.checkValidity();
82
- this.checkError();
89
+ // Display Error
90
+ this.displayError();
83
91
  };
84
92
  /**
85
93
  * Get pattern validity
@@ -113,14 +121,7 @@ export class MgInputTextarea {
113
121
  }
114
122
  // required
115
123
  else if (!this.valid && this.input.validity.valueMissing) {
116
- this.errorMessage = messages.errors.required;
117
- }
118
- // Update class
119
- if (this.valid) {
120
- this.classList.delete(this.classError);
121
- }
122
- else {
123
- this.classList.add(this.classError);
124
+ this.errorMessage = this.messages.errors.required;
124
125
  }
125
126
  };
126
127
  /**
@@ -139,6 +140,14 @@ export class MgInputTextarea {
139
140
  this.checkValidity();
140
141
  this.valueChange.emit(newValue);
141
142
  }
143
+ validateDisplayCharacterLeft(newValue) {
144
+ if (newValue) {
145
+ this.classList.add(this.classHasDisplayCharacterLeft);
146
+ }
147
+ else {
148
+ this.classList.delete(this.classHasDisplayCharacterLeft);
149
+ }
150
+ }
142
151
  /**
143
152
  * Public method to display errors
144
153
  *
@@ -147,6 +156,7 @@ export class MgInputTextarea {
147
156
  async displayError() {
148
157
  this.checkValidity();
149
158
  this.checkError();
159
+ this.hasError = this.invalid;
150
160
  }
151
161
  /*************
152
162
  * Lifecycle *
@@ -157,6 +167,11 @@ export class MgInputTextarea {
157
167
  * @returns {ReturnType<typeof setTimeout>} timeout
158
168
  */
159
169
  componentWillLoad() {
170
+ // Get locales
171
+ this.messages = initLocales(this.element).messages;
172
+ this.characterLeftId = `${this.identifier}-character-left`;
173
+ // Validate
174
+ this.validateDisplayCharacterLeft(this.displayCharacterLeft);
160
175
  this.validatePattern();
161
176
  // Check validity when component is ready
162
177
  // return a promise to process action only in the FIRST render().
@@ -171,8 +186,15 @@ export class MgInputTextarea {
171
186
  * @returns {HTMLElement} HTML Element
172
187
  */
173
188
  render() {
174
- return (h(MgInput, { identifier: this.identifier, classList: this.classList, label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, width: this.width, disabled: this.disabled, value: this.value, readonlyValue: undefined, tooltip: this.tooltip, displayCharacterLeft: this.displayCharacterLeft, characterLeftTemplate: this.characterLeftTemplate, maxlength: this.maxlength, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false },
175
- h("textarea", { class: "mg-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, rows: this.rows, maxlength: this.maxlength, disabled: this.disabled, required: this.required, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: el => (this.input = el) })));
189
+ return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [this.characterLeftId], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, mgWidth: this.mgWidth, disabled: this.disabled, value: this.value, readonlyValue: undefined, tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false },
190
+ h("div", { class: "mg-input__with-character-left" },
191
+ h("textarea", { class: {
192
+ 'mg-input__box': true,
193
+ 'mg-input__box--resizable': this.resizable === 'both',
194
+ 'mg-input__box--resizable-horizontal': this.resizable === 'horizontal',
195
+ 'mg-input__box--resizable-vertical': this.resizable === 'vertical',
196
+ }, value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, rows: this.rows, maxlength: this.maxlength, disabled: this.disabled, required: this.required, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: el => (this.input = el) }),
197
+ this.displayCharacterLeft && this.maxlength && (h("mg-character-left", { identifier: this.characterLeftId, characters: this.value, maxlength: this.maxlength })))));
176
198
  }
177
199
  static get is() { return "mg-input-textarea"; }
178
200
  static get encapsulation() { return "shadow"; }
@@ -377,7 +399,7 @@ export class MgInputTextarea {
377
399
  "reflect": false,
378
400
  "defaultValue": "false"
379
401
  },
380
- "width": {
402
+ "mgWidth": {
381
403
  "type": "any",
382
404
  "mutable": false,
383
405
  "complexType": {
@@ -396,7 +418,7 @@ export class MgInputTextarea {
396
418
  "tags": [],
397
419
  "text": "Define input width"
398
420
  },
399
- "attribute": "width",
421
+ "attribute": "mg-width",
400
422
  "reflect": false,
401
423
  "defaultValue": "'full'"
402
424
  },
@@ -487,23 +509,6 @@ export class MgInputTextarea {
487
509
  "reflect": false,
488
510
  "defaultValue": "true"
489
511
  },
490
- "characterLeftTemplate": {
491
- "type": "string",
492
- "mutable": false,
493
- "complexType": {
494
- "original": "string",
495
- "resolved": "string",
496
- "references": {}
497
- },
498
- "required": false,
499
- "optional": false,
500
- "docs": {
501
- "tags": [],
502
- "text": "Template to use for characters left sentence"
503
- },
504
- "attribute": "character-left-template",
505
- "reflect": false
506
- },
507
512
  "helpText": {
508
513
  "type": "string",
509
514
  "mutable": false,
@@ -554,6 +559,24 @@ export class MgInputTextarea {
554
559
  },
555
560
  "attribute": "invalid",
556
561
  "reflect": false
562
+ },
563
+ "resizable": {
564
+ "type": "string",
565
+ "mutable": false,
566
+ "complexType": {
567
+ "original": "'none' | 'both' | 'horizontal' | 'vertical'",
568
+ "resolved": "\"both\" | \"horizontal\" | \"none\" | \"vertical\"",
569
+ "references": {}
570
+ },
571
+ "required": false,
572
+ "optional": false,
573
+ "docs": {
574
+ "tags": [],
575
+ "text": "Define if input is resizable"
576
+ },
577
+ "attribute": "resizable",
578
+ "reflect": false,
579
+ "defaultValue": "'none'"
557
580
  }
558
581
  }; }
559
582
  static get states() { return {
@@ -612,8 +635,12 @@ export class MgInputTextarea {
612
635
  }
613
636
  }
614
637
  }; }
638
+ static get elementRef() { return "element"; }
615
639
  static get watchers() { return [{
616
640
  "propName": "value",
617
641
  "methodName": "handleValue"
642
+ }, {
643
+ "propName": "displayCharacterLeft",
644
+ "methodName": "validateDisplayCharacterLeft"
618
645
  }]; }
619
646
  }
@@ -11,16 +11,9 @@
11
11
  min-height: var(--default-size);
12
12
  max-width: 100%;
13
13
  margin-bottom: var(--mg-inputs-margin-bottom, 0);
14
- /* Style when input is not valid */
15
14
  /* Label */
16
15
  /* Label-on-top */
17
16
  }
18
- .mg-input.is-not-valid {
19
- color: hsl(var(--color-danger));
20
- }
21
- .mg-input.is-not-valid .mg-input__box {
22
- border-color: hsl(var(--color-danger));
23
- }
24
17
  .mg-input mg-input-title {
25
18
  flex-shrink: var(--mg-inputs-shrink, 1);
26
19
  width: var(--mg-inputs-title-width, auto);
@@ -74,6 +67,11 @@
74
67
  .mg-input__input-container mg-icon {
75
68
  display: flex;
76
69
  }
70
+ .mg-input__input-container .mg-input__help-text,
71
+ .mg-input__input-container .mg-input__error {
72
+ text-align: start;
73
+ font-size: 1.2rem;
74
+ }
77
75
 
78
76
  .mg-input__input {
79
77
  display: flex;
@@ -82,11 +80,22 @@
82
80
  .mg-input__input mg-tooltip {
83
81
  margin-top: calc((var(--default-size) - var(--mg-icon-regular-size)) / 2);
84
82
  }
85
- .mg-input__input + * {
86
- text-align: start;
83
+ .mg-input__input.mg-input__input--has-error .mg-input__box {
84
+ border-color: hsl(var(--color-danger));
85
+ }
86
+ .mg-input__input + .mg-input__help-text, .mg-input__input + .mg-input__error {
87
87
  margin-top: 0.5rem;
88
88
  }
89
89
 
90
+ .mg-input__error {
91
+ display: inline-block;
92
+ margin-top: 0.2rem;
93
+ padding: 0.3rem 0.8rem;
94
+ border-radius: 0.3rem;
95
+ background: hsl(var(--mg-inputs-error-bg-color));
96
+ color: hsl(var(--color-danger));
97
+ }
98
+
90
99
  /**
91
100
  * A11Y
92
101
  */
@@ -19,6 +19,8 @@ export class MgInputToggle {
19
19
  this.classReadonly = 'mg-input--toggle-readonly';
20
20
  this.classDisabled = 'mg-input--toggle-disabled';
21
21
  this.classIsActive = 'mg-input--toggle-is-active';
22
+ this.classOnOff = 'mg-input--toggle-on-off';
23
+ this.classIcon = 'mg-input--toggle-icon';
22
24
  /**
23
25
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
24
26
  * If not set, it will be created.
@@ -106,11 +108,15 @@ export class MgInputToggle {
106
108
  }
107
109
  handleIsOnOff(newValue) {
108
110
  if (newValue)
109
- this.classList.add(`mg-input--toggle-on-off`);
111
+ this.classList.add(this.classOnOff);
112
+ else
113
+ this.classList.delete(this.classOnOff);
110
114
  }
111
115
  handleIsIcon(newValue) {
112
116
  if (newValue)
113
- this.classList.add(`mg-input--toggle-icon`);
117
+ this.classList.add(this.classIcon);
118
+ else
119
+ this.classList.delete(this.classIcon);
114
120
  }
115
121
  handleReadonly(newValue) {
116
122
  if (newValue)
@@ -173,7 +179,7 @@ export class MgInputToggle {
173
179
  * @returns {HTMLElement} HTML Element
174
180
  */
175
181
  render() {
176
- return (h(MgInput, { identifier: this.identifier, classList: this.classList, label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, readonly: undefined, width: undefined, disabled: this.disabled, value: this.value, readonlyValue: undefined, tooltip: !this.readonly && this.tooltip, displayCharacterLeft: undefined, characterLeftTemplate: undefined, maxlength: undefined, helpText: this.helpText, errorMessage: undefined, isFieldset: false },
182
+ return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: undefined, readonly: undefined, mgWidth: undefined, disabled: this.disabled, value: this.value, readonlyValue: undefined, tooltip: !this.readonly && this.tooltip, helpText: this.helpText, errorMessage: undefined, isFieldset: false },
177
183
  h("button", { type: "button", role: "switch", "aria-checked": this.checked.toString(), "aria-readonly": this.disabled || this.readonly, id: this.identifier, class: "mg-input__button-toggle", disabled: this.disabled || this.readonly, onClick: this.toggleChecked },
178
184
  h("span", { "aria-hidden": "true", class: "mg-input__toggle-item-container" },
179
185
  h("slot", { name: "item-1" })),
@@ -12,4 +12,8 @@
12
12
  .mg-form.mg-form--all-required,
13
13
  .mg-form-group.mg-form--all-required {
14
14
  --mg-input-title-display: none;
15
+ }
16
+ .mg-form > p,
17
+ .mg-form-group > p {
18
+ font-size: 1.2rem;
15
19
  }
@@ -1,6 +1,6 @@
1
1
  import { Component, Element, Event, h, Method, Prop, State } from '@stencil/core';
2
2
  import { createID, ClassList } from '../../../utils/components.utils';
3
- import { messages } from '../../../locales';
3
+ import { initLocales } from '../../../locales';
4
4
  export class MgForm {
5
5
  constructor() {
6
6
  /**
@@ -37,12 +37,12 @@ export class MgForm {
37
37
  // All fields are required
38
38
  // mg-input-toggle can not be required
39
39
  if (requiredInputs.length > 0 && requiredInputs.length === this.mgInputs.filter(input => input.nodeName !== 'MG-INPUT-TOGGLE').length) {
40
- this.requiredMessage = messages.form.allRequired;
40
+ this.requiredMessage = this.messages.form.allRequired;
41
41
  this.classList.add('mg-form--all-required');
42
42
  }
43
43
  // Some fields are required
44
44
  else if (requiredInputs.length > 0) {
45
- this.requiredMessage = messages.form.required;
45
+ this.requiredMessage = this.messages.form.required;
46
46
  }
47
47
  };
48
48
  /**
@@ -79,6 +79,8 @@ export class MgForm {
79
79
  * @returns {void}
80
80
  */
81
81
  componentWillLoad() {
82
+ // Get locales
83
+ this.messages = initLocales(this.element).messages;
82
84
  // Get slotted mgIputs
83
85
  this.mgInputs = Array.from(this.element.querySelectorAll('*')).filter((node) => node.nodeName.startsWith('MG-INPUT-'));
84
86
  // Define required message
@@ -1,5 +1,5 @@
1
1
  import { h } from '@stencil/core';
2
- import { variants } from './mg-message.conf';
2
+ import { variants } from '../mg-message.conf';
3
3
  export default {
4
4
  component: 'mg-message',
5
5
  title: 'Molecules/mg-message',
@@ -1,12 +1,15 @@
1
1
  import { Component, Element, Event, h, Prop, State, Watch } from '@stencil/core';
2
2
  import { createID, ClassList } from '../../../utils/components.utils';
3
3
  import { variants } from './mg-message.conf';
4
- import { messages } from '../../../locales';
4
+ import { initLocales } from '../../../locales';
5
5
  export class MgMessage {
6
6
  constructor() {
7
7
  /************
8
8
  * Internal *
9
9
  ************/
10
+ // classes
11
+ this.classHide = 'mg-message--hide';
12
+ // IDs
10
13
  this.closeButtonId = '';
11
14
  // Stored timer setted when hide action is run from setTimeOut
12
15
  this.storedTimer = null;
@@ -82,10 +85,12 @@ export class MgMessage {
82
85
  if (!variants.includes(newValue)) {
83
86
  throw new Error(`<mg-message> prop "variant" must be one of : ${variants.join(', ')}`);
84
87
  }
85
- if (oldValue !== undefined) {
86
- this.classList.delete(`mg-message--${oldValue}`);
88
+ else {
89
+ if (oldValue !== undefined) {
90
+ this.classList.delete(`mg-message--${oldValue}`);
91
+ }
92
+ this.classList.add(`mg-message--${newValue}`);
87
93
  }
88
- this.classList.add(`mg-message--${this.variant}`);
89
94
  }
90
95
  validateCloseButton(newValue) {
91
96
  if (newValue && this.hasActions) {
@@ -96,11 +101,11 @@ export class MgMessage {
96
101
  validateHide(newValue) {
97
102
  if (newValue) {
98
103
  this.componentHide.emit();
99
- this.classList.add('mg-message--hide');
104
+ this.classList.add(this.classHide);
100
105
  }
101
106
  else {
102
107
  this.componentShow.emit();
103
- this.classList.delete('mg-message--hide');
108
+ this.classList.delete(this.classHide);
104
109
  }
105
110
  this.hideWithDelay();
106
111
  }
@@ -111,6 +116,9 @@ export class MgMessage {
111
116
  * Check if component props are well configured on init
112
117
  */
113
118
  componentWillLoad() {
119
+ // Get locales
120
+ this.messages = initLocales(this.element).messages;
121
+ // Validate
114
122
  this.validateVariant(this.variant);
115
123
  // Check if close button is an can be activated
116
124
  this.hasActions = this.element.querySelector('[slot="actions"]') !== null;
@@ -138,7 +146,7 @@ export class MgMessage {
138
146
  this.hasActions && (h("span", { class: "mg-message__content-actions-slot" },
139
147
  h("slot", { name: "actions" })))),
140
148
  this.closeButton && (h("span", { class: "mg-message__close-button" },
141
- h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: messages.message.closeButton, onClick: this.handleClose },
149
+ h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: this.messages.message.closeButton, onClick: this.handleClose },
142
150
  h("mg-icon", { icon: "cross" }))))));
143
151
  }
144
152
  static get is() { return "mg-message"; }
@@ -9,13 +9,11 @@
9
9
  left: 0;
10
10
  z-index: 1000;
11
11
  padding: 2rem 0;
12
- background-color: hsla(var(--color-light), 70%);
12
+ background-color: hsla(var(--color-light), 85%);
13
13
  }
14
14
  .mg-modal__dialog {
15
15
  display: flex;
16
16
  flex-direction: column;
17
- flex: none;
18
- /* IE FIX */
19
17
  align-self: center;
20
18
  row-gap: 3rem;
21
19
  padding: 1.5rem 2.5rem;
@@ -37,16 +35,16 @@
37
35
  font-size: var(--mg-modal-title-font-size);
38
36
  font-weight: 600;
39
37
  }
40
- .mg-modal__content {
41
- overflow-y: auto;
42
- }
43
38
  .mg-modal__close-button {
44
39
  float: right;
45
40
  height: var(--mg-modal-title-font-size);
46
41
  margin-top: calc((var(--default-size) - var(--mg-modal-title-font-size) * var(--line-height)) / 2 * -1);
47
42
  margin-right: calc((var(--default-size) - var(--mg-icon-regular-size)) / 2 * -1);
48
43
  }
49
- .mg-modal .mg-modal__content ::slotted(*) {
44
+ .mg-modal .mg-modal__content {
45
+ overflow-y: auto;
46
+ }
47
+ .mg-modal .mg-modal__content::slotted(*) {
50
48
  font-size: var(--mg-modal-content-font-size);
51
49
  }
52
50
  .mg-modal.mg-modal--hide {
@@ -1,11 +1,14 @@
1
1
  import { Component, h, Prop, State, Watch, Element, Event, Listen } from '@stencil/core';
2
2
  import { createID, ClassList } from '../../../utils/components.utils';
3
- import { messages } from '../../../locales';
3
+ import { initLocales } from '../../../locales';
4
4
  export class MgModal {
5
5
  constructor() {
6
6
  /************
7
7
  * Internal *
8
8
  ************/
9
+ // Classes
10
+ this.classHide = 'mg-modal--hide';
11
+ // IDs
9
12
  this.closeButtonId = '';
10
13
  this.titleId = '';
11
14
  /**
@@ -48,11 +51,11 @@ export class MgModal {
48
51
  validateHide(newValue) {
49
52
  if (newValue) {
50
53
  this.componentHide.emit();
51
- this.classList.add('mg-modal--hide');
54
+ this.classList.add(this.classHide);
52
55
  }
53
56
  else {
54
57
  this.componentShow.emit();
55
- this.classList.delete('mg-modal--hide');
58
+ this.classList.delete(this.classHide);
56
59
  }
57
60
  }
58
61
  /**
@@ -76,6 +79,9 @@ export class MgModal {
76
79
  * @returns {void}
77
80
  */
78
81
  componentWillLoad() {
82
+ // Get locales
83
+ this.messages = initLocales(this.element).messages;
84
+ // Validate
79
85
  this.hasActions = this.element.querySelector('[slot="actions"]') !== null;
80
86
  this.hasContent = this.element.querySelector('[slot="content"]') !== null;
81
87
  if (this.closeButton) {
@@ -94,7 +100,7 @@ export class MgModal {
94
100
  h("article", { class: "mg-modal__dialog" },
95
101
  h("header", { class: "mg-modal__header" },
96
102
  this.closeButton && (h("span", { class: "mg-modal__close-button" },
97
- h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: messages.modal.closeButton, onClick: this.handleClose },
103
+ h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose },
98
104
  h("mg-icon", { icon: "cross" })))),
99
105
  h("h1", { class: "mg-modal__title", id: this.titleId }, this.modalTitle)),
100
106
  this.hasContent && (h("article", { class: "mg-modal__content" },
@@ -1,7 +1,7 @@
1
- import { Component, h, Prop, Watch, Event } from '@stencil/core';
1
+ import { Component, Element, h, Prop, Watch, Event } from '@stencil/core';
2
2
  import { createID } from '../../../utils/components.utils';
3
3
  import { NavigationAction } from './mg-pagination.conf';
4
- import { messages } from './../../../locales';
4
+ import { initLocales } from './../../../locales';
5
5
  /**
6
6
  * Range generator
7
7
  *
@@ -25,19 +25,11 @@ import { messages } from './../../../locales';
25
25
  const range = (start, end, step = 1) => Array.from(Array(Math.ceil((end + 1 - start) / step)).keys()).map(x => start + x * step);
26
26
  export class MgPagination {
27
27
  constructor() {
28
- /**************
29
- * Decorators *
30
- **************/
31
28
  /**
32
29
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
33
30
  * If not set, it will be created.
34
31
  */
35
32
  this.identifier = createID('mg-pagination');
36
- /**
37
- * Panignation label. Is a short description.
38
- * Customize default value can be usefull to improve accessibility
39
- */
40
- this.label = 'pagination';
41
33
  /**
42
34
  * Component total pages
43
35
  */
@@ -101,8 +93,15 @@ export class MgPagination {
101
93
  * @returns {void}
102
94
  */
103
95
  componentWillLoad() {
96
+ // Get locales
97
+ this.messages = initLocales(this.element).messages;
98
+ // Validate
104
99
  this.validateTotalPages(this.totalPages);
105
100
  this.validateCurrentPage(this.currentPage);
101
+ // Set default label
102
+ if (this.label === undefined || this.label === '') {
103
+ this.label = this.messages.pagination.label;
104
+ }
106
105
  }
107
106
  /**
108
107
  * Render
@@ -110,24 +109,24 @@ export class MgPagination {
110
109
  * @returns {HTMLElement} HTML Element
111
110
  */
112
111
  render() {
113
- const navigationActionButton = (disabled, action) => (h("mg-button", { identifier: `${this.identifier}-button-${action}`, class: "mg-pagination__button", label: messages.pagination[`${action}Page`],
112
+ const navigationActionButton = (disabled, action) => (h("mg-button", { identifier: `${this.identifier}-button-${action}`, class: "mg-pagination__button", label: this.messages.pagination[`${action}Page`],
114
113
  // eslint-disable-next-line react/jsx-no-bind
115
114
  onClick: () => this.handleGoToPage(action), disabled: disabled, variant: "flat" },
116
115
  action === NavigationAction.PREVIOUS && h("mg-icon", { icon: "chevron-left" }),
117
- messages.general[action],
116
+ this.messages.general[action],
118
117
  action === NavigationAction.NEXT && h("mg-icon", { icon: "chevron-right" })));
119
118
  return (h("nav", { "aria-label": this.label, id: this.identifier, class: "mg-pagination__nav" },
120
119
  navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS),
121
- h("mg-input-select", { identifier: `${this.identifier}-select`, items: range(1, this.totalPages).map(page => page.toString()), label: messages.pagination.selectPage, "label-hide": true, "on-value-change": this.handleSelect, value: this.currentPage.toString(), "placeholder-hide": true }),
120
+ h("mg-input-select", { identifier: `${this.identifier}-select`, items: range(1, this.totalPages).map(page => page.toString()), label: this.messages.pagination.selectPage, "label-hide": true, "on-value-change": this.handleSelect, value: this.currentPage.toString(), "placeholder-hide": true }),
122
121
  h("span", { class: "sr-only" },
123
- messages.pagination.page,
122
+ this.messages.pagination.page,
124
123
  " ",
125
124
  this.currentPage),
126
125
  h("span", null,
127
126
  "/ ",
128
127
  this.totalPages,
129
128
  " ",
130
- this.totalPages > 1 ? messages.pagination.pages : messages.pagination.page),
129
+ this.totalPages > 1 ? this.messages.pagination.pages : this.messages.pagination.page),
131
130
  navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT)));
132
131
  }
133
132
  static get is() { return "mg-pagination"; }
@@ -159,7 +158,7 @@ export class MgPagination {
159
158
  },
160
159
  "label": {
161
160
  "type": "string",
162
- "mutable": false,
161
+ "mutable": true,
163
162
  "complexType": {
164
163
  "original": "string",
165
164
  "resolved": "string",
@@ -172,8 +171,7 @@ export class MgPagination {
172
171
  "text": "Panignation label. Is a short description.\nCustomize default value can be usefull to improve accessibility"
173
172
  },
174
173
  "attribute": "label",
175
- "reflect": false,
176
- "defaultValue": "'pagination'"
174
+ "reflect": false
177
175
  },
178
176
  "totalPages": {
179
177
  "type": "number",
@@ -228,6 +226,7 @@ export class MgPagination {
228
226
  "references": {}
229
227
  }
230
228
  }]; }
229
+ static get elementRef() { return "element"; }
231
230
  static get watchers() { return [{
232
231
  "propName": "totalPages",
233
232
  "methodName": "validateTotalPages"
@@ -30,10 +30,14 @@
30
30
  flex-grow: 1;
31
31
  }
32
32
 
33
- .mg-panel__collapse-button {
33
+ .mg-panel__collapse-button .mg-button {
34
34
  font-family: var(--font-family-heading);
35
35
  font-size: 1.4rem;
36
36
  font-weight: 500;
37
+ }
38
+
39
+ .mg-panel__collapse-button,
40
+ .mg-panel__edit-button {
37
41
  margin: 0 0.3rem 0 0;
38
42
  }
39
43