@mgdis/mg-components 4.1.1 → 4.2.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 (124) hide show
  1. package/dist/cjs/{index-dd2c7f7b.js → index-64cee0c8.js} +248 -128
  2. package/dist/cjs/loader.cjs.js +3 -3
  3. package/dist/cjs/{mg-badge_24.cjs.entry.js → mg-badge_23.cjs.entry.js} +206 -2180
  4. package/dist/cjs/mg-components.cjs.js +3 -26
  5. package/dist/cjs/mg-modal.cjs.entry.js +8 -1
  6. package/dist/cjs/mg-popover.cjs.entry.js +171 -0
  7. package/dist/cjs/popper-71bf3058.js +1790 -0
  8. package/dist/collection/collection-manifest.json +2 -2
  9. package/dist/collection/components/atoms/mg-badge/mg-badge.js +116 -99
  10. package/dist/collection/components/atoms/mg-button/mg-button.js +221 -220
  11. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +72 -69
  12. package/dist/collection/components/atoms/mg-icon/doc/mg-icon.stories.js +1 -2
  13. package/dist/collection/components/atoms/mg-icon/mg-icon.js +102 -92
  14. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +83 -67
  15. package/dist/collection/components/atoms/mg-tag/mg-tag.js +64 -55
  16. package/dist/collection/components/atoms/mg-tooltip/doc/mg-tooltip.stories.js +3 -6
  17. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +120 -106
  18. package/dist/collection/components/molecules/inputs/MgInput.js +8 -17
  19. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +323 -318
  20. package/dist/collection/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.js +3 -2
  21. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +356 -361
  22. package/dist/collection/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.js +1 -2
  23. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +462 -456
  24. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +347 -340
  25. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +348 -343
  26. package/dist/collection/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.js +4 -3
  27. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +406 -401
  28. package/dist/collection/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.js +12 -15
  29. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +2 -0
  30. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +476 -473
  31. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +461 -456
  32. package/dist/collection/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.js +2 -8
  33. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +1 -0
  34. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +299 -298
  35. package/dist/collection/components/molecules/mg-details/doc/mg-details.stories.js +1 -3
  36. package/dist/collection/components/molecules/mg-details/mg-details.js +95 -93
  37. package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +13 -27
  38. package/dist/collection/components/molecules/mg-form/mg-form.js +175 -166
  39. package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +2 -6
  40. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +37 -37
  41. package/dist/collection/components/molecules/mg-message/doc/mg-message.stories.js +1 -3
  42. package/dist/collection/components/molecules/mg-message/mg-message.js +154 -153
  43. package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +11 -15
  44. package/dist/collection/components/molecules/mg-modal/mg-modal.js +147 -134
  45. package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +5 -6
  46. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +112 -117
  47. package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +1 -8
  48. package/dist/collection/components/molecules/mg-panel/mg-panel.css +2 -2
  49. package/dist/collection/components/molecules/mg-panel/mg-panel.js +192 -189
  50. package/dist/collection/components/molecules/mg-popover/doc/mg-popover.stories.js +1 -4
  51. package/dist/collection/components/molecules/mg-popover/mg-popover.js +129 -127
  52. package/dist/collection/components/molecules/mg-tabs/doc/mg-tabs.stories.js +1 -5
  53. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +1 -0
  54. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +150 -135
  55. package/dist/collection/fonts/OpenSans-Bold.ttf +0 -0
  56. package/dist/collection/locales/en/messages.json +50 -0
  57. package/dist/collection/locales/fr/messages.json +50 -0
  58. package/dist/collection/stories/grids.stories.js +1 -44
  59. package/dist/collection/stories/helpers.stories.js +1 -19
  60. package/dist/collection/stories/icons.stories.js +1 -4
  61. package/dist/collection/stories/typography.stories.js +1 -12
  62. package/dist/collection/variables.css +3 -2
  63. package/dist/collection/variables.scss +3 -2
  64. package/dist/components/MgInput.js +6 -3
  65. package/dist/components/mg-badge2.js +7 -0
  66. package/dist/components/mg-button2.js +2 -7
  67. package/dist/components/mg-input-checkbox.js +1 -6
  68. package/dist/components/mg-input-date.js +10 -27
  69. package/dist/components/mg-input-numeric.js +1 -6
  70. package/dist/components/mg-input-password.js +1 -6
  71. package/dist/components/mg-input-radio.js +1 -6
  72. package/dist/components/mg-input-select2.js +1 -6
  73. package/dist/components/mg-input-text2.js +3 -8
  74. package/dist/components/mg-input-textarea.js +2 -7
  75. package/dist/components/mg-input-title2.js +9 -0
  76. package/dist/components/mg-input-toggle.js +2 -7
  77. package/dist/components/mg-modal.js +7 -0
  78. package/dist/components/mg-pagination.js +3 -3
  79. package/dist/components/mg-panel.js +8 -4
  80. package/dist/components/mg-tabs.js +8 -1
  81. package/dist/components/mg-tooltip2.js +7 -0
  82. package/dist/esm/{index-f58b769f.js → index-120f47fd.js} +249 -128
  83. package/dist/esm/loader.js +3 -3
  84. package/dist/esm/{mg-badge_24.entry.js → mg-badge_23.entry.js} +207 -2180
  85. package/dist/esm/mg-components.js +3 -26
  86. package/dist/esm/mg-modal.entry.js +8 -1
  87. package/dist/esm/mg-popover.entry.js +167 -0
  88. package/dist/esm/popper-93ecb064.js +1788 -0
  89. package/dist/mg-components/fonts/OpenSans-Bold.ttf +0 -0
  90. package/dist/mg-components/locales/en/messages.json +50 -0
  91. package/dist/mg-components/locales/fr/messages.json +50 -0
  92. package/dist/mg-components/mg-components.css +1 -1
  93. package/dist/mg-components/mg-components.esm.js +1 -1
  94. package/dist/mg-components/p-21991be8.entry.js +1 -0
  95. package/dist/mg-components/p-36a64f8c.entry.js +1 -0
  96. package/dist/mg-components/p-4c66f794.js +1 -0
  97. package/dist/mg-components/p-7bc32a2f.js +2 -0
  98. package/dist/mg-components/p-b380a0df.entry.js +1 -0
  99. package/dist/mg-components/variables.css +3 -2
  100. package/dist/mg-components/variables.scss +3 -2
  101. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -0
  102. package/dist/types/components/atoms/mg-button/mg-button.d.ts +0 -1
  103. package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +1 -0
  104. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +1 -0
  105. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +0 -1
  106. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +1 -10
  107. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +0 -1
  108. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +0 -1
  109. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -1
  110. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -1
  111. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +0 -1
  112. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -1
  113. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +0 -1
  114. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +1 -0
  115. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +1 -1
  116. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +1 -0
  117. package/dist/types/components.d.ts +29 -29
  118. package/loader/package.json +1 -0
  119. package/package.json +8 -8
  120. package/dist/collection/fonts/Poppins-Bold.ttf +0 -0
  121. package/dist/mg-components/fonts/Poppins-Bold.ttf +0 -0
  122. package/dist/mg-components/p-2a3d8f60.entry.js +0 -1
  123. package/dist/mg-components/p-b6df1cac.js +0 -2
  124. package/dist/mg-components/p-c8779533.entry.js +0 -1
@@ -1,4 +1,4 @@
1
- import { Component, h, Prop, State, Watch, Element, Event, Listen } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import { createID, ClassList } from '../../../utils/components.utils';
3
3
  import { initLocales } from '../../../locales';
4
4
  export class MgModal {
@@ -48,6 +48,11 @@ export class MgModal {
48
48
  this.hide = true;
49
49
  };
50
50
  }
51
+ validateModalTitle(newValue) {
52
+ if (typeof newValue !== 'string' || newValue.trim() === '') {
53
+ throw new Error('<mg-modal> prop "modalTitle" is required.');
54
+ }
55
+ }
51
56
  validateHide(newValue) {
52
57
  if (newValue) {
53
58
  this.componentHide.emit();
@@ -88,6 +93,7 @@ export class MgModal {
88
93
  this.closeButtonId = `${this.identifier}-close-button`;
89
94
  }
90
95
  this.titleId = `${this.identifier}-title`;
96
+ this.validateModalTitle(this.modalTitle);
91
97
  this.validateHide(this.hide);
92
98
  }
93
99
  /**
@@ -96,145 +102,152 @@ export class MgModal {
96
102
  * @returns {HTMLElement} HTML Element
97
103
  */
98
104
  render() {
99
- return (h("section", { role: "dialog", id: this.identifier, class: this.classList.join(), tabindex: "-1", "aria-labelledby": this.titleId, "aria-modal": "true", "aria-hidden": this.hide },
100
- h("article", { class: "mg-modal__dialog" },
101
- h("header", { class: "mg-modal__header" },
102
- this.closeButton && (h("span", { class: "mg-modal__close-button" },
103
- h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose },
104
- h("mg-icon", { icon: "cross" })))),
105
- h("h1", { class: "mg-modal__title", id: this.titleId }, this.modalTitle)),
106
- this.hasContent && (h("article", { class: "mg-modal__content" },
107
- h("slot", { name: "content" }))),
108
- this.hasActions && (h("footer", { class: "mg-modal__footer" },
109
- h("slot", { name: "actions" }))))));
105
+ return (h("section", { role: "dialog", id: this.identifier, class: this.classList.join(), tabindex: "-1", "aria-labelledby": this.titleId, "aria-modal": "true", "aria-hidden": this.hide }, h("article", { class: "mg-modal__dialog" }, h("header", { class: "mg-modal__header" }, this.closeButton && (h("span", { class: "mg-modal__close-button" }, h("mg-button", { identifier: this.closeButtonId, "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { icon: "cross" })))), h("h1", { class: "mg-modal__title", id: this.titleId }, this.modalTitle)), this.hasContent && (h("article", { class: "mg-modal__content" }, h("slot", { name: "content" }))), this.hasActions && (h("footer", { class: "mg-modal__footer" }, h("slot", { name: "actions" }))))));
110
106
  }
111
107
  static get is() { return "mg-modal"; }
112
108
  static get encapsulation() { return "shadow"; }
113
- static get originalStyleUrls() { return {
114
- "$": ["mg-modal.scss"]
115
- }; }
116
- static get styleUrls() { return {
117
- "$": ["mg-modal.css"]
118
- }; }
119
- static get properties() { return {
120
- "identifier": {
121
- "type": "string",
122
- "mutable": false,
123
- "complexType": {
124
- "original": "string",
125
- "resolved": "string",
126
- "references": {}
127
- },
128
- "required": false,
129
- "optional": false,
130
- "docs": {
131
- "tags": [],
132
- "text": "Identifier is used for the element ID (id is a reserved prop in Stencil.js)\nIf not set, it will be created."
133
- },
134
- "attribute": "identifier",
135
- "reflect": false,
136
- "defaultValue": "createID('mg-modal')"
137
- },
138
- "modalTitle": {
139
- "type": "string",
140
- "mutable": false,
141
- "complexType": {
142
- "original": "string",
143
- "resolved": "string",
144
- "references": {}
145
- },
146
- "required": true,
147
- "optional": false,
148
- "docs": {
149
- "tags": [],
150
- "text": "Displayed modal title\nrequired"
151
- },
152
- "attribute": "modal-title",
153
- "reflect": false
154
- },
155
- "closeButton": {
156
- "type": "boolean",
157
- "mutable": true,
158
- "complexType": {
159
- "original": "boolean",
160
- "resolved": "boolean",
161
- "references": {}
162
- },
163
- "required": false,
164
- "optional": false,
165
- "docs": {
166
- "tags": [],
167
- "text": "Define if modal has a cross button"
168
- },
169
- "attribute": "close-button",
170
- "reflect": false,
171
- "defaultValue": "false"
172
- },
173
- "hide": {
174
- "type": "boolean",
175
- "mutable": true,
176
- "complexType": {
177
- "original": "boolean",
178
- "resolved": "boolean",
179
- "references": {}
180
- },
181
- "required": false,
182
- "optional": false,
183
- "docs": {
184
- "tags": [],
185
- "text": "Define if modal is hidden"
109
+ static get originalStyleUrls() {
110
+ return {
111
+ "$": ["mg-modal.scss"]
112
+ };
113
+ }
114
+ static get styleUrls() {
115
+ return {
116
+ "$": ["mg-modal.css"]
117
+ };
118
+ }
119
+ static get properties() {
120
+ return {
121
+ "identifier": {
122
+ "type": "string",
123
+ "mutable": false,
124
+ "complexType": {
125
+ "original": "string",
126
+ "resolved": "string",
127
+ "references": {}
128
+ },
129
+ "required": false,
130
+ "optional": false,
131
+ "docs": {
132
+ "tags": [],
133
+ "text": "Identifier is used for the element ID (id is a reserved prop in Stencil.js)\nIf not set, it will be created."
134
+ },
135
+ "attribute": "identifier",
136
+ "reflect": false,
137
+ "defaultValue": "createID('mg-modal')"
186
138
  },
187
- "attribute": "hide",
188
- "reflect": false,
189
- "defaultValue": "false"
190
- }
191
- }; }
192
- static get states() { return {
193
- "hasActions": {},
194
- "hasContent": {},
195
- "classList": {}
196
- }; }
197
- static get events() { return [{
198
- "method": "componentShow",
199
- "name": "component-show",
200
- "bubbles": true,
201
- "cancelable": true,
202
- "composed": true,
203
- "docs": {
204
- "tags": [],
205
- "text": "Emmited event when modal is diplayed"
139
+ "modalTitle": {
140
+ "type": "string",
141
+ "mutable": false,
142
+ "complexType": {
143
+ "original": "string",
144
+ "resolved": "string",
145
+ "references": {}
146
+ },
147
+ "required": true,
148
+ "optional": false,
149
+ "docs": {
150
+ "tags": [],
151
+ "text": "Displayed modal title\nrequired"
152
+ },
153
+ "attribute": "modal-title",
154
+ "reflect": false
206
155
  },
207
- "complexType": {
208
- "original": "string",
209
- "resolved": "string",
210
- "references": {}
211
- }
212
- }, {
213
- "method": "componentHide",
214
- "name": "component-hide",
215
- "bubbles": true,
216
- "cancelable": true,
217
- "composed": true,
218
- "docs": {
219
- "tags": [],
220
- "text": "Emmited event when modal is hidden"
156
+ "closeButton": {
157
+ "type": "boolean",
158
+ "mutable": true,
159
+ "complexType": {
160
+ "original": "boolean",
161
+ "resolved": "boolean",
162
+ "references": {}
163
+ },
164
+ "required": false,
165
+ "optional": false,
166
+ "docs": {
167
+ "tags": [],
168
+ "text": "Define if modal has a cross button"
169
+ },
170
+ "attribute": "close-button",
171
+ "reflect": false,
172
+ "defaultValue": "false"
221
173
  },
222
- "complexType": {
223
- "original": "string",
224
- "resolved": "string",
225
- "references": {}
174
+ "hide": {
175
+ "type": "boolean",
176
+ "mutable": true,
177
+ "complexType": {
178
+ "original": "boolean",
179
+ "resolved": "boolean",
180
+ "references": {}
181
+ },
182
+ "required": false,
183
+ "optional": false,
184
+ "docs": {
185
+ "tags": [],
186
+ "text": "Define if modal is hidden"
187
+ },
188
+ "attribute": "hide",
189
+ "reflect": false,
190
+ "defaultValue": "false"
226
191
  }
227
- }]; }
192
+ };
193
+ }
194
+ static get states() {
195
+ return {
196
+ "hasActions": {},
197
+ "hasContent": {},
198
+ "classList": {}
199
+ };
200
+ }
201
+ static get events() {
202
+ return [{
203
+ "method": "componentShow",
204
+ "name": "component-show",
205
+ "bubbles": true,
206
+ "cancelable": true,
207
+ "composed": true,
208
+ "docs": {
209
+ "tags": [],
210
+ "text": "Emmited event when modal is diplayed"
211
+ },
212
+ "complexType": {
213
+ "original": "string",
214
+ "resolved": "string",
215
+ "references": {}
216
+ }
217
+ }, {
218
+ "method": "componentHide",
219
+ "name": "component-hide",
220
+ "bubbles": true,
221
+ "cancelable": true,
222
+ "composed": true,
223
+ "docs": {
224
+ "tags": [],
225
+ "text": "Emmited event when modal is hidden"
226
+ },
227
+ "complexType": {
228
+ "original": "string",
229
+ "resolved": "string",
230
+ "references": {}
231
+ }
232
+ }];
233
+ }
228
234
  static get elementRef() { return "element"; }
229
- static get watchers() { return [{
230
- "propName": "hide",
231
- "methodName": "validateHide"
232
- }]; }
233
- static get listeners() { return [{
234
- "name": "keydown",
235
- "method": "handleKeyDown",
236
- "target": "window",
237
- "capture": false,
238
- "passive": false
239
- }]; }
235
+ static get watchers() {
236
+ return [{
237
+ "propName": "modalTitle",
238
+ "methodName": "validateModalTitle"
239
+ }, {
240
+ "propName": "hide",
241
+ "methodName": "validateHide"
242
+ }];
243
+ }
244
+ static get listeners() {
245
+ return [{
246
+ "name": "keydown",
247
+ "method": "handleKeyDown",
248
+ "target": "window",
249
+ "capture": false,
250
+ "passive": false
251
+ }];
252
+ }
240
253
  }
@@ -19,21 +19,20 @@
19
19
  outline: none;
20
20
  }
21
21
 
22
- .mg-pagination__nav {
22
+ .mg-pagination {
23
23
  display: flex;
24
24
  align-items: center;
25
25
  flex-direction: row;
26
26
  }
27
- .mg-pagination__nav mg-input-select {
27
+ .mg-pagination mg-input-select {
28
28
  margin-right: 0.5rem;
29
29
  }
30
-
31
- .mg-pagination__button {
30
+ .mg-pagination mg-button {
32
31
  display: flex;
33
32
  }
34
- .mg-pagination__button:first-of-type {
33
+ .mg-pagination mg-button:first-of-type {
35
34
  margin-right: 1rem;
36
35
  }
37
- .mg-pagination__button:last-of-type {
36
+ .mg-pagination mg-button:last-of-type {
38
37
  margin-left: 1rem;
39
38
  }
@@ -1,4 +1,4 @@
1
- import { Component, Element, h, Prop, Watch, Event } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import { createID } from '../../../utils/components.utils';
3
3
  import { NavigationAction } from './mg-pagination.conf';
4
4
  import { initLocales } from './../../../locales';
@@ -109,129 +109,124 @@ export class MgPagination {
109
109
  * @returns {HTMLElement} HTML Element
110
110
  */
111
111
  render() {
112
- const navigationActionButton = (disabled, action) => (h("mg-button", { identifier: `${this.identifier}-button-${action}`, class: "mg-pagination__button", label: this.messages.pagination[`${action}Page`],
112
+ const navigationActionButton = (disabled, action) => (h("mg-button", { identifier: `${this.identifier}-button-${action}`, label: this.messages.pagination[`${action}Page`],
113
113
  // eslint-disable-next-line react/jsx-no-bind
114
- onClick: () => this.handleGoToPage(action), disabled: disabled, variant: "flat" },
115
- action === NavigationAction.PREVIOUS && h("mg-icon", { icon: "chevron-left" }),
116
- this.messages.general[action],
117
- action === NavigationAction.NEXT && h("mg-icon", { icon: "chevron-right" })));
118
- return (h("nav", { "aria-label": this.label, id: this.identifier, class: "mg-pagination__nav" },
119
- navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS),
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 }),
121
- h("span", { class: "sr-only" },
122
- this.messages.pagination.page,
123
- " ",
124
- this.currentPage),
125
- h("span", null,
126
- "/ ",
127
- this.totalPages,
128
- " ",
129
- this.totalPages > 1 ? this.messages.pagination.pages : this.messages.pagination.page),
130
- navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT)));
114
+ onClick: () => this.handleGoToPage(action), disabled: disabled, variant: "flat" }, action === NavigationAction.PREVIOUS && h("mg-icon", { icon: "chevron-left" }), this.messages.general[action], action === NavigationAction.NEXT && h("mg-icon", { icon: "chevron-right" })));
115
+ return (h("nav", { "aria-label": this.label, id: this.identifier, class: "mg-pagination" }, navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS), 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 }), h("span", { class: "sr-only" }, this.messages.pagination.page, " ", this.currentPage), h("span", null, "/ ", this.totalPages, " ", this.totalPages > 1 ? this.messages.pagination.pages : this.messages.pagination.page), navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT)));
131
116
  }
132
117
  static get is() { return "mg-pagination"; }
133
118
  static get encapsulation() { return "shadow"; }
134
- static get originalStyleUrls() { return {
135
- "$": ["mg-pagination.scss"]
136
- }; }
137
- static get styleUrls() { return {
138
- "$": ["mg-pagination.css"]
139
- }; }
140
- static get properties() { return {
141
- "identifier": {
142
- "type": "string",
143
- "mutable": false,
144
- "complexType": {
145
- "original": "string",
146
- "resolved": "string",
147
- "references": {}
148
- },
149
- "required": false,
150
- "optional": false,
151
- "docs": {
152
- "tags": [],
153
- "text": "Identifier is used for the element ID (id is a reserved prop in Stencil.js)\nIf not set, it will be created."
154
- },
155
- "attribute": "identifier",
156
- "reflect": false,
157
- "defaultValue": "createID('mg-pagination')"
158
- },
159
- "label": {
160
- "type": "string",
161
- "mutable": true,
162
- "complexType": {
163
- "original": "string",
164
- "resolved": "string",
165
- "references": {}
166
- },
167
- "required": false,
168
- "optional": false,
169
- "docs": {
170
- "tags": [],
171
- "text": "Panignation label. Is a short description.\nCustomize default value can be usefull to improve accessibility"
172
- },
173
- "attribute": "label",
174
- "reflect": false
175
- },
176
- "totalPages": {
177
- "type": "number",
178
- "mutable": false,
179
- "complexType": {
180
- "original": "number",
181
- "resolved": "number",
182
- "references": {}
183
- },
184
- "required": false,
185
- "optional": false,
186
- "docs": {
187
- "tags": [],
188
- "text": "Component total pages"
189
- },
190
- "attribute": "total-pages",
191
- "reflect": false,
192
- "defaultValue": "1"
193
- },
194
- "currentPage": {
195
- "type": "number",
196
- "mutable": true,
197
- "complexType": {
198
- "original": "number",
199
- "resolved": "number",
200
- "references": {}
119
+ static get originalStyleUrls() {
120
+ return {
121
+ "$": ["mg-pagination.scss"]
122
+ };
123
+ }
124
+ static get styleUrls() {
125
+ return {
126
+ "$": ["mg-pagination.css"]
127
+ };
128
+ }
129
+ static get properties() {
130
+ return {
131
+ "identifier": {
132
+ "type": "string",
133
+ "mutable": false,
134
+ "complexType": {
135
+ "original": "string",
136
+ "resolved": "string",
137
+ "references": {}
138
+ },
139
+ "required": false,
140
+ "optional": false,
141
+ "docs": {
142
+ "tags": [],
143
+ "text": "Identifier is used for the element ID (id is a reserved prop in Stencil.js)\nIf not set, it will be created."
144
+ },
145
+ "attribute": "identifier",
146
+ "reflect": false,
147
+ "defaultValue": "createID('mg-pagination')"
201
148
  },
202
- "required": false,
203
- "optional": false,
204
- "docs": {
205
- "tags": [],
206
- "text": "Component current page"
149
+ "label": {
150
+ "type": "string",
151
+ "mutable": true,
152
+ "complexType": {
153
+ "original": "string",
154
+ "resolved": "string",
155
+ "references": {}
156
+ },
157
+ "required": false,
158
+ "optional": false,
159
+ "docs": {
160
+ "tags": [],
161
+ "text": "Panignation label. Is a short description.\nCustomize default value can be usefull to improve accessibility"
162
+ },
163
+ "attribute": "label",
164
+ "reflect": false
207
165
  },
208
- "attribute": "current-page",
209
- "reflect": true,
210
- "defaultValue": "1"
211
- }
212
- }; }
213
- static get events() { return [{
214
- "method": "currentPageChange",
215
- "name": "current-page-change",
216
- "bubbles": true,
217
- "cancelable": true,
218
- "composed": true,
219
- "docs": {
220
- "tags": [],
221
- "text": "Emmited event when current page change"
166
+ "totalPages": {
167
+ "type": "number",
168
+ "mutable": false,
169
+ "complexType": {
170
+ "original": "number",
171
+ "resolved": "number",
172
+ "references": {}
173
+ },
174
+ "required": false,
175
+ "optional": false,
176
+ "docs": {
177
+ "tags": [],
178
+ "text": "Component total pages"
179
+ },
180
+ "attribute": "total-pages",
181
+ "reflect": false,
182
+ "defaultValue": "1"
222
183
  },
223
- "complexType": {
224
- "original": "number",
225
- "resolved": "number",
226
- "references": {}
184
+ "currentPage": {
185
+ "type": "number",
186
+ "mutable": true,
187
+ "complexType": {
188
+ "original": "number",
189
+ "resolved": "number",
190
+ "references": {}
191
+ },
192
+ "required": false,
193
+ "optional": false,
194
+ "docs": {
195
+ "tags": [],
196
+ "text": "Component current page"
197
+ },
198
+ "attribute": "current-page",
199
+ "reflect": true,
200
+ "defaultValue": "1"
227
201
  }
228
- }]; }
202
+ };
203
+ }
204
+ static get events() {
205
+ return [{
206
+ "method": "currentPageChange",
207
+ "name": "current-page-change",
208
+ "bubbles": true,
209
+ "cancelable": true,
210
+ "composed": true,
211
+ "docs": {
212
+ "tags": [],
213
+ "text": "Emmited event when current page change"
214
+ },
215
+ "complexType": {
216
+ "original": "number",
217
+ "resolved": "number",
218
+ "references": {}
219
+ }
220
+ }];
221
+ }
229
222
  static get elementRef() { return "element"; }
230
- static get watchers() { return [{
231
- "propName": "totalPages",
232
- "methodName": "validateTotalPages"
233
- }, {
234
- "propName": "currentPage",
235
- "methodName": "validateCurrentPage"
236
- }]; }
223
+ static get watchers() {
224
+ return [{
225
+ "propName": "totalPages",
226
+ "methodName": "validateTotalPages"
227
+ }, {
228
+ "propName": "currentPage",
229
+ "methodName": "validateCurrentPage"
230
+ }];
231
+ }
237
232
  }
@@ -12,14 +12,7 @@ export default {
12
12
  * @returns {HTMLElement} HTMLElement
13
13
  */
14
14
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
- const Template = (args) => (h("mg-panel", Object.assign({}, filterArgs(args)),
16
- h("div", null, "Content"),
17
- h("div", { slot: "header-right" },
18
- h("mg-button", { variant: "secondary" },
19
- h("mg-icon", { icon: "file-upload" }),
20
- " Upload"),
21
- h("mg-button", Object.assign({}, filterArgs({ isIcon: true }), { variant: "secondary", label: "delete" }),
22
- h("mg-icon", { icon: "trash" })))));
15
+ const Template = (args) => (h("mg-panel", Object.assign({}, filterArgs(args)), h("div", null, "Content"), h("div", { slot: "header-right" }, h("mg-button", { variant: "secondary" }, h("mg-icon", { icon: "file-upload" }), " Upload"), h("mg-button", Object.assign({}, filterArgs({ isIcon: true }), { variant: "secondary", label: "delete" }), h("mg-icon", { icon: "trash" })))));
23
16
  export const MgPanel = Template.bind({});
24
17
  MgPanel.args = {
25
18
  panelTitle: 'title',
@@ -36,11 +36,11 @@
36
36
  .mg-panel__header-left mg-button:not([slot=append-input]) > *:first-of-type {
37
37
  font-family: var(--font-family-heading);
38
38
  font-size: 1.4rem;
39
- font-weight: 500;
39
+ font-weight: 600;
40
40
  }
41
41
 
42
42
  .mg-panel__content {
43
- padding: 1.5rem;
43
+ padding: var(--mg-panel-content-padding);
44
44
  }
45
45
 
46
46
  .mg-panel ::slotted([slot=header-right]) {