@mgdis/mg-components 4.1.0 → 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 (123) hide show
  1. package/dist/cjs/{index-88560a66.js → index-64cee0c8.js} +248 -81
  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 -3
  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-bca81100.js → index-120f47fd.js} +248 -81
  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 -3
  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-b14a3443.js → p-7bc32a2f.js} +0 -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-a2883dc7.entry.js +0 -1
  123. package/dist/mg-components/p-cffe0519.entry.js +0 -1
@@ -0,0 +1,50 @@
1
+ {
2
+ "errors": {
3
+ "required": "This field is required.",
4
+ "date": {
5
+ "badInput": "The date format must be <span aria-hidden=\"true\">mm/dd/yyyy</span><span class=\"sr-only\">m m / d d / y y y y</span> and the date must be greater than {min}",
6
+ "min": "The date cannot be earlier than {min}",
7
+ "max": "The date cannot be later than {max}",
8
+ "minMax": "The date must be between {min} and {max}"
9
+ },
10
+ "numeric": {
11
+ "min": "The value cannot be less than {min}",
12
+ "max": "The value cannot be greater than {max}",
13
+ "minMax": "The value must be between {min} et {max}"
14
+ }
15
+ },
16
+ "nbCharLeft": "{counter} characters left.",
17
+ "input": {
18
+ "select": {
19
+ "placeholder": "Select a value"
20
+ }
21
+ },
22
+ "form": {
23
+ "required": "Fields with a <strong class=\"is-asterisk\">*</strong> are required",
24
+ "allRequired": "All fields are required"
25
+ },
26
+ "message": {
27
+ "closeButton": "Close message"
28
+ },
29
+ "modal": {
30
+ "closeButton": "Close modal"
31
+ },
32
+ "pagination": {
33
+ "label": "Pagination",
34
+ "page": "page",
35
+ "pages": "pages",
36
+ "nextPage": "Next page",
37
+ "previousPage": "Previous page",
38
+ "selectPage": "Select the page to display."
39
+ },
40
+ "panel": {
41
+ "editLabel": "Edit section title."
42
+ },
43
+ "general": {
44
+ "confirm": "Confirm",
45
+ "cancel": "Cancel",
46
+ "close": "Close",
47
+ "next": "next",
48
+ "previous": "previous"
49
+ }
50
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "errors": {
3
+ "required": "Ce champ est obligatoire.",
4
+ "date": {
5
+ "badInput": "Le format de la date doit être du type <span aria-hidden=\"true\">jj/mm/aaaa</span><span class=\"sr-only\">j j / m m / a a a a</span> et la date supérieure au {min}",
6
+ "min": "La date ne peut pas être antérieure au {min}",
7
+ "max": "La date ne peut pas être postérieure au {max}",
8
+ "minMax": "La date doit être comprise entre le {min} et le {max}"
9
+ },
10
+ "numeric": {
11
+ "min": "La valeur ne peut pas être inférieure à {min}",
12
+ "max": "La valeur ne peut pas être supérieure à {max}",
13
+ "minMax": "La valeur doit être comprise entre {min} et {max}"
14
+ }
15
+ },
16
+ "nbCharLeft": "{counter} caractères disponibles.",
17
+ "input": {
18
+ "select": {
19
+ "placeholder": "Sélectionnez une valeur"
20
+ }
21
+ },
22
+ "form": {
23
+ "required": "Les champs marqués d'un <strong class=\"is-asterisk\">*</strong> sont obligatoires",
24
+ "allRequired": "Tous les champs sont obligatoires"
25
+ },
26
+ "message": {
27
+ "closeButton": "Fermer le message"
28
+ },
29
+ "modal": {
30
+ "closeButton": "Fermer la modale"
31
+ },
32
+ "pagination": {
33
+ "label": "Pagination",
34
+ "page": "page",
35
+ "pages": "pages",
36
+ "nextPage": "Page suivante",
37
+ "previousPage": "Page précédente",
38
+ "selectPage": "Sélectionner la page à afficher."
39
+ },
40
+ "panel": {
41
+ "editLabel": "Modifier le titre de la section."
42
+ },
43
+ "general": {
44
+ "confirm": "Valider",
45
+ "cancel": "Annuler",
46
+ "close": "Fermer",
47
+ "next": "suivant",
48
+ "previous": "précédent"
49
+ }
50
+ }
@@ -2,49 +2,6 @@ import { h } from '@stencil/core';
2
2
  export default {
3
3
  title: 'Style/Layout/Grid',
4
4
  };
5
- const Template = () => (h("main", { id: "demo" },
6
- h("h1", null, "Grid"),
7
- h("p", null,
8
- "You can use grid classes by using the ",
9
- h("code", null, ".mg-grid"),
10
- " class in the container. This call will add flex properties to the container."),
11
- h("h2", null, "Auto layout"),
12
- h("p", null,
13
- "Default column class is ",
14
- h("code", null, "mg-grid__col"),
15
- ". The width will be defined by the number of element using the class."),
16
- h("div", { class: "mg-grid" },
17
- h("div", { class: "mg-grid__col" }, ".mg-grid__col"),
18
- h("div", { class: "mg-grid__col" }, ".mg-grid__col")),
19
- h("div", { class: "mg-grid" },
20
- h("div", { class: "mg-grid__col" }, ".mg-grid__col"),
21
- h("div", { class: "mg-grid__col" }, ".mg-grid__col"),
22
- h("div", { class: "mg-grid__col" }, ".mg-grid__col")),
23
- h("div", { class: "mg-grid" },
24
- h("div", { class: "mg-grid__col" }, ".mg-grid__col"),
25
- h("div", { class: "mg-grid__col" }, ".mg-grid__col"),
26
- h("div", { class: "mg-grid__col" }, ".mg-grid__col"),
27
- h("div", { class: "mg-grid__col" }, ".mg-grid__col"),
28
- h("div", { class: "mg-grid__col" }, ".mg-grid__col")),
29
- h("h2", null, "Sized column"),
30
- h("p", null, "Like Bootstrap, you can use sized colomn based on a 12 colomns grid."),
31
- h("p", null,
32
- "The library is using the BEM methodology, so to define a column width we need to set a modifier class, for exemple ",
33
- h("code", null, "mg-grid__col-2"),
34
- "."),
35
- [...Array.from(Array(12).keys())].map((_e, i) => (h("div", { class: "mg-grid" },
36
- h("div", { class: `mg-grid__col mg-grid__col-${i + 1}` },
37
- ".mg-grid__col.mg-grid__col-",
38
- i + 1)))),
39
- h("h2", null, "Mix"),
40
- h("p", null, "You can also mix unsized column with sized column."),
41
- h("div", { class: "mg-grid" },
42
- h("div", { class: "mg-grid__col mg-grid__col-3" }, ".mg-grid__col.mg-grid__col-3"),
43
- h("div", { class: "mg-grid__col" }, ".mg-grid__col"),
44
- h("div", { class: "mg-grid__col mg-grid__col-3" }, ".mg-grid__col.mg-grid__col-3")),
45
- h("div", { class: "mg-grid" },
46
- h("div", { class: "mg-grid__col" }, ".mg-grid__col"),
47
- h("div", { class: "mg-grid__col mg-grid__col-5" }, ".mg-grid__col.mg-grid__col-5"),
48
- h("div", { class: "mg-grid__col" }, ".mg-grid__col"))));
5
+ const Template = () => (h("main", { id: "demo" }, h("h1", null, "Grid"), h("p", null, "You can use grid classes by using the ", h("code", null, ".mg-grid"), " class in the container. This call will add flex properties to the container."), h("h2", null, "Auto layout"), h("p", null, "Default column class is ", h("code", null, "mg-grid__col"), ". The width will be defined by the number of element using the class."), h("div", { class: "mg-grid" }, h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col")), h("div", { class: "mg-grid" }, h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col")), h("div", { class: "mg-grid" }, h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col")), h("h2", null, "Sized column"), h("p", null, "Like Bootstrap, you can use sized colomn based on a 12 colomns grid."), h("p", null, "The library is using the BEM methodology, so to define a column width we need to set a modifier class, for exemple ", h("code", null, "mg-grid__col-2"), "."), [...Array.from(Array(12).keys())].map((_e, i) => (h("div", { class: "mg-grid" }, h("div", { class: `mg-grid__col mg-grid__col-${i + 1}` }, ".mg-grid__col.mg-grid__col-", i + 1)))), h("h2", null, "Mix"), h("p", null, "You can also mix unsized column with sized column."), h("div", { class: "mg-grid" }, h("div", { class: "mg-grid__col mg-grid__col-3" }, ".mg-grid__col.mg-grid__col-3"), h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col mg-grid__col-3" }, ".mg-grid__col.mg-grid__col-3")), h("div", { class: "mg-grid" }, h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col mg-grid__col-5" }, ".mg-grid__col.mg-grid__col-5"), h("div", { class: "mg-grid__col" }, ".mg-grid__col"))));
49
6
  export const Grid = Template.bind({});
50
7
  Grid.args = {};
@@ -16,25 +16,7 @@ export default {
16
16
  * @returns {HTMLElement} HTMLElement
17
17
  */
18
18
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
- const Template = (args) => (h("div", null,
20
- h("h1", null, "Helpers"),
21
- h("h2", null, ".mg-group-elements"),
22
- h("p", null,
23
- "Buttons can be grouped in an HTMLelement using the ",
24
- h("code", null, ".mg-group-elements"),
25
- " class, it will ensure a 10px margin space between them, even verticaly. Above exemples are using it."),
26
- h("p", null,
27
- "By adding the ",
28
- h("code", null, ".mg-group-elements--align-right"),
29
- " class you 'll set a right alignment of the button, even when line breaks."),
30
- h("h3", null, "Demo"),
31
- h("div", { class: `mg-group-elements${args.align === 'right' ? ' mg-group-elements--align-right' : ''}` },
32
- h("mg-button", null, "First Button"),
33
- h("mg-button", null,
34
- h("mg-icon", { icon: "info-circle" }),
35
- "Second Button"),
36
- h("mg-button", Object.assign({}, filterArgs({ isIcon: true }), { label: "Third button" }),
37
- h("mg-icon", { icon: "info-circle" })))));
19
+ const Template = (args) => (h("div", null, h("h1", null, "Helpers"), h("h2", null, ".mg-group-elements"), h("p", null, "Buttons can be grouped in an HTMLelement using the ", h("code", null, ".mg-group-elements"), " class, it will ensure a 10px margin space between them, even verticaly. Above exemples are using it."), h("p", null, "By adding the ", h("code", null, ".mg-group-elements--align-right"), " class you 'll set a right alignment of the button, even when line breaks."), h("h3", null, "Demo"), h("div", { class: `mg-group-elements${args.align === 'right' ? ' mg-group-elements--align-right' : ''}` }, h("mg-button", null, "First Button"), h("mg-button", null, h("mg-icon", { icon: "info-circle" }), "Second Button"), h("mg-button", Object.assign({}, filterArgs({ isIcon: true }), { label: "Third button" }), h("mg-icon", { icon: "info-circle" })))));
38
20
  export const Helpers = Template.bind({});
39
21
  Helpers.args = {
40
22
  align: 'left',
@@ -17,10 +17,7 @@ export default {
17
17
  * @returns {HTMLElement} HTMLElement
18
18
  */
19
19
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- const Template = (args) => (h("ul", { style: { display: 'flex', flexWrap: 'wrap', margin: '0', padding: '0', listStyle: 'none', textAlign: 'center' } }, Object.keys(icons).map((icon) => (h("li", { style: { margin: '1rem', padding: '1rem', width: '100px' } },
21
- h("div", { style: { color: args.color, margin: '1rem' } },
22
- h("mg-icon", Object.assign({}, filterArgs({ icon, size: args.size }, { size: 'regular' })))),
23
- h("div", null, icon))))));
20
+ const Template = (args) => (h("ul", { style: { display: 'flex', flexWrap: 'wrap', margin: '0', padding: '0', listStyle: 'none', textAlign: 'center' } }, Object.keys(icons).map((icon) => (h("li", { style: { margin: '1rem', padding: '1rem', width: '100px' } }, h("div", { style: { color: args.color, margin: '1rem' } }, h("mg-icon", Object.assign({}, filterArgs({ icon, size: args.size }, { size: 'regular' })))), h("div", null, icon))))));
24
21
  export const Icons = Template.bind({});
25
22
  Icons.args = {
26
23
  color: '',
@@ -9,18 +9,7 @@ export default {
9
9
  * @returns {HTMLElement} HTMLElement
10
10
  */
11
11
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
- const Template = (args) => (h("div", null,
13
- h("h1", null, args.h1),
14
- h("h2", null, args.h2),
15
- h("h3", null, args.h3),
16
- h("h4", null, args.h4),
17
- h("h5", null, args.h5),
18
- h("h6", null, args.h6),
19
- h("p", null, args.p),
20
- h("p", null,
21
- h("strong", null, args.strong)),
22
- h("p", null,
23
- h("small", null, args.small))));
12
+ const Template = (args) => (h("div", null, h("h1", null, args.h1), h("h2", null, args.h2), h("h3", null, args.h3), h("h4", null, args.h4), h("h5", null, args.h5), h("h6", null, args.h6), h("p", null, args.p), h("p", null, h("strong", null, args.strong)), h("p", null, h("small", null, args.small))));
24
13
  export const Typography = Template.bind({});
25
14
  Typography.args = {
26
15
  h1: 'The h1 heading element',
@@ -9,8 +9,8 @@
9
9
  /* Open Sans is used for the body (mostly all texts) */
10
10
  --font-family: 'Open Sans', sans-serif;
11
11
 
12
- /* Poppins is used for the headings (h1 to h6) */
13
- --font-family-heading: 'Poppins', sans-serif;
12
+ /* Headings (h1 to h6) font can be customized */
13
+ --font-family-heading: var(--font-family);
14
14
 
15
15
  /* Font colors */
16
16
  --color-font-light: var(--color-light);
@@ -171,6 +171,7 @@
171
171
 
172
172
  --mg-panel-border-radius: 0.5rem;
173
173
  --mg-panel-background: var(--color-info-h) var(--color-info-s) calc(var(--color-info-l) + 68%);
174
+ --mg-panel-content-padding: 1.5rem;
174
175
 
175
176
  /*
176
177
  Layout
@@ -9,8 +9,8 @@
9
9
  /* Open Sans is used for the body (mostly all texts) */
10
10
  --font-family: 'Open Sans', sans-serif;
11
11
 
12
- /* Poppins is used for the headings (h1 to h6) */
13
- --font-family-heading: 'Poppins', sans-serif;
12
+ /* Headings (h1 to h6) font can be customized */
13
+ --font-family-heading: var(--font-family);
14
14
 
15
15
  /* Font colors */
16
16
  --color-font-light: var(--color-light);
@@ -171,6 +171,7 @@
171
171
 
172
172
  --mg-panel-border-radius: 0.5rem;
173
173
  --mg-panel-background: var(--color-info-h) var(--color-info-s) calc(var(--color-info-l) + 68%);
174
+ --mg-panel-content-padding: 1.5rem;
174
175
 
175
176
  /*
176
177
  Layout
@@ -50,11 +50,14 @@ const MgInput = (props, children, utils) => {
50
50
  /**
51
51
  * Check required properties
52
52
  */
53
- if (typeof props.label !== 'string' || props.label === '') {
54
- throw new Error('<mg-input> prop "label" is required');
53
+ if (typeof props.identifier !== 'string' || props.identifier.trim() === '') {
54
+ throw new Error('<mg-input> prop "identifier" is required.');
55
+ }
56
+ if (typeof props.label !== 'string' || props.label.trim() === '') {
57
+ throw new Error('<mg-input> prop "label" is required.');
55
58
  }
56
59
  if (props.labelOnTop && props.labelHide) {
57
- throw new Error('<mg-input> prop "labelOnTop" must not be paired with the prop "labelHide"');
60
+ throw new Error('<mg-input> prop "labelOnTop" must not be paired with the prop "labelHide".');
58
61
  }
59
62
  /**
60
63
  * Component classes
@@ -32,6 +32,11 @@ const MgBadge = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
32
32
  throw new Error('<mg-badge> prop "value" must be interger or ponctuation character.');
33
33
  }
34
34
  }
35
+ validateLabel(newValue) {
36
+ if (typeof newValue !== 'string' || newValue.trim() === '') {
37
+ throw new Error('<mg-badge> prop "label" is required.');
38
+ }
39
+ }
35
40
  validateVariant(newValue, oldValue) {
36
41
  if (!variants.includes(newValue)) {
37
42
  throw new Error(`<mg-badge> prop "variant" must be one of : ${variants.join(', ')}.`);
@@ -56,6 +61,7 @@ const MgBadge = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
56
61
  */
57
62
  componentWillLoad() {
58
63
  this.validateValue(this.value);
64
+ this.validateLabel(this.label);
59
65
  this.validateVariant(this.variant);
60
66
  this.validateOutline(this.outline);
61
67
  }
@@ -69,6 +75,7 @@ const MgBadge = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
69
75
  }
70
76
  static get watchers() { return {
71
77
  "value": ["validateValue"],
78
+ "label": ["validateLabel"],
72
79
  "variant": ["validateVariant"],
73
80
  "outline": ["validateOutline"]
74
81
  }; }
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
- import { c as createID, C as ClassList } from './components.utils.js';
2
+ import { C as ClassList } from './components.utils.js';
3
3
  import { d as defineCustomElement$1 } from './mg-icon2.js';
4
4
 
5
5
  /**
@@ -21,11 +21,6 @@ const MgButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
21
21
  * Define button variant
22
22
  */
23
23
  this.variant = variants[0]; // Primary
24
- /**
25
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
26
- * If not set, it will be created.
27
- */
28
- this.identifier = createID('mg-button');
29
24
  /**
30
25
  * Define if button is round.
31
26
  * Used for icon button.
@@ -100,7 +95,7 @@ const MgButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
100
95
  this.validateVariant(this.variant);
101
96
  if (this.isIcon) {
102
97
  this.classList.add(`mg-button--icon`);
103
- if (typeof this.label !== 'string' || this.label === '') {
98
+ if (typeof this.label !== 'string' || this.label.trim() === '') {
104
99
  throw new Error(`<mg-button> prop "label" is mandatory when prop "isIcon" is set to true.`);
105
100
  }
106
101
  }
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { M as MgInput } from './MgInput.js';
3
- import { c as createID, C as ClassList } from './components.utils.js';
3
+ import { C as ClassList } from './components.utils.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$4 } from './mg-icon2.js';
6
6
  import { d as defineCustomElement$3 } from './mg-input-title2.js';
@@ -27,11 +27,6 @@ const MgInputCheckbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
27
27
  ************/
28
28
  // HTML selector
29
29
  this.inputs = [];
30
- /**
31
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
32
- * If not set, it will be created.
33
- */
34
- this.identifier = createID('mg-input-checkbox');
35
30
  /**
36
31
  * Input name
37
32
  * If not set the value equals the identifier
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { M as MgInput } from './MgInput.js';
3
- import { c as createID, C as ClassList } from './components.utils.js';
3
+ import { C as ClassList } from './components.utils.js';
4
4
  import { l as localeDate, d as dateRegExp } from './locale.utils.js';
5
5
  import { i as initLocales } from './index2.js';
6
6
  import { d as defineCustomElement$4 } from './mg-icon2.js';
@@ -26,11 +26,6 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
26
26
  this.inputValid = createEvent(this, "input-valid", 7);
27
27
  // hasError (triggered by blur event)
28
28
  this.hasError = false;
29
- /**
30
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
31
- * If not set, it will be created.
32
- */
33
- this.identifier = createID('mg-input-date');
34
29
  /**
35
30
  * Input name
36
31
  * If not set the value equals the identifier
@@ -147,18 +142,17 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
147
142
  };
148
143
  }
149
144
  validateValue(newValue) {
150
- if (newValue !== undefined && newValue !== '' && !(typeof newValue === 'string' && dateRegExp.test(newValue))) {
145
+ if (newValue !== undefined && (typeof newValue !== 'string' || !dateRegExp.test(newValue))) {
151
146
  throw new Error("<mg-input-date> props 'value' doesn't match pattern: yyyy-mm-dd");
152
147
  }
153
148
  else {
154
149
  this.valueChange.emit(this.value);
155
150
  }
156
151
  }
157
- validateMin(newValue) {
158
- this.validateDateFormat(newValue);
159
- }
160
- validateMax(newValue) {
161
- this.validateDateFormat(newValue);
152
+ validateMinMax(newValue) {
153
+ if ((newValue === null || newValue === void 0 ? void 0 : newValue.length) === 0 || ((newValue === null || newValue === void 0 ? void 0 : newValue.length) > 0 && !(typeof newValue === 'string' && dateRegExp.test(newValue)))) {
154
+ throw new Error("<mg-input-date> props 'min/max' doesn't match pattern: yyyy-mm-dd");
155
+ }
162
156
  }
163
157
  /**
164
158
  * Public method to display errors
@@ -170,17 +164,6 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
170
164
  this.checkError();
171
165
  this.hasError = this.invalid;
172
166
  }
173
- /**
174
- * Date format validation
175
- *
176
- * @param {string} date date to validate
177
- * @returns {void}
178
- */
179
- validateDateFormat(date) {
180
- if ((date === null || date === void 0 ? void 0 : date.length) > 0 && !(typeof date === 'string' && dateRegExp.test(date))) {
181
- throw new Error("<mg-input-date> props 'min/max' doesn't match pattern: yyyy-mm-dd");
182
- }
183
- }
184
167
  /*************
185
168
  * Lifecycle *
186
169
  *************/
@@ -196,8 +179,8 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
196
179
  this.messages = locales.messages;
197
180
  // Validate
198
181
  this.validateValue(this.value);
199
- this.validateMin(this.min);
200
- this.validateMax(this.max);
182
+ this.validateMinMax(this.min);
183
+ this.validateMinMax(this.max);
201
184
  // Check validity when component is ready
202
185
  // return a promise to process action only in the FIRST render().
203
186
  // https://stenciljs.com/docs/component-lifecycle#componentwillload
@@ -216,8 +199,8 @@ const MgInputDate$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
216
199
  get element() { return this; }
217
200
  static get watchers() { return {
218
201
  "value": ["validateValue"],
219
- "min": ["validateMin"],
220
- "max": ["validateMax"]
202
+ "min": ["validateMinMax"],
203
+ "max": ["validateMinMax"]
221
204
  }; }
222
205
  static get style() { return mgInputDateCss; }
223
206
  }, [1, "mg-input-date", {
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { M as MgInput } from './MgInput.js';
3
- import { c as createID, C as ClassList } from './components.utils.js';
3
+ import { C as ClassList } from './components.utils.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { a as localeCurrency, b as localeNumber } from './locale.utils.js';
6
6
  import { d as defineCustomElement$4 } from './mg-icon2.js';
@@ -30,11 +30,6 @@ const MgInputNumeric$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
30
30
  this.inputValid = createEvent(this, "input-valid", 7);
31
31
  // hasError (triggered by blur event)
32
32
  this.hasError = false;
33
- /**
34
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
35
- * If not set, it will be created.
36
- */
37
- this.identifier = createID('mg-input-numeric');
38
33
  /**
39
34
  * Input name
40
35
  * If not set the value equals the identifier
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { M as MgInput } from './MgInput.js';
3
- import { c as createID, C as ClassList } from './components.utils.js';
3
+ import { C as ClassList } from './components.utils.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$4 } from './mg-icon2.js';
6
6
  import { d as defineCustomElement$3 } from './mg-input-title2.js';
@@ -17,11 +17,6 @@ const MgInputPassword$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
17
17
  this.inputValid = createEvent(this, "input-valid", 7);
18
18
  // hasError (triggered by blur event)
19
19
  this.hasError = false;
20
- /**
21
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
22
- * If not set, it will be created.
23
- */
24
- this.identifier = createID('mg-input-password');
25
20
  /**
26
21
  * Input name
27
22
  * If not set the value equals the identifier
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { M as MgInput } from './MgInput.js';
3
- import { c as createID, C as ClassList, a as allItemsAreString } from './components.utils.js';
3
+ import { C as ClassList, a as allItemsAreString } from './components.utils.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$4 } from './mg-icon2.js';
6
6
  import { d as defineCustomElement$3 } from './mg-input-title2.js';
@@ -27,11 +27,6 @@ const MgInputRadio$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
27
27
  ************/
28
28
  // HTML selector
29
29
  this.inputs = [];
30
- /**
31
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
32
- * If not set, it will be created.
33
- */
34
- this.identifier = createID('mg-input-radio');
35
30
  /**
36
31
  * Input name
37
32
  * If not set the value equals the identifier
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { M as MgInput } from './MgInput.js';
3
- import { c as createID, C as ClassList, a as allItemsAreString } from './components.utils.js';
3
+ import { C as ClassList, a as allItemsAreString } from './components.utils.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$3 } from './mg-icon2.js';
6
6
  import { d as defineCustomElement$2 } from './mg-input-title2.js';
@@ -53,11 +53,6 @@ const MgInputSelect = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
53
53
  this.inputValid = createEvent(this, "input-valid", 7);
54
54
  // hasError (triggered by blur event)
55
55
  this.hasError = false;
56
- /**
57
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
58
- * If not set, it will be created.
59
- */
60
- this.identifier = createID('mg-input-select');
61
56
  /**
62
57
  * Input name
63
58
  * If not set the value equals the identifier
@@ -1,13 +1,13 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { M as MgInput } from './MgInput.js';
3
- import { c as createID, C as ClassList } from './components.utils.js';
3
+ import { C as ClassList } from './components.utils.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$4 } from './mg-character-left2.js';
6
6
  import { d as defineCustomElement$3 } from './mg-icon2.js';
7
7
  import { d as defineCustomElement$2 } from './mg-input-title2.js';
8
8
  import { d as defineCustomElement$1 } from './mg-tooltip2.js';
9
9
 
10
- const mgInputTextCss = ":host{display:block}.mg-input{display:flex;align-items:flex-start;min-height:var(--default-size);max-width:100%;margin-bottom:var(--mg-inputs-margin-bottom, 0);}.mg-input mg-input-title{flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-input.mg-input--label-on-top{flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:flex;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-input__input-container .mg-input__help-text,.mg-input__input-container .mg-input__error{text-align:start;font-size:1.2rem}.mg-input__input{display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input.mg-input__input--has-error .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input__input+.mg-input__help-text,.mg-input__input+.mg-input__error{margin-top:0.5rem}.mg-input__error{display:inline-block;margin-top:0.2rem;padding:0.3rem 0.8rem;border-radius:0.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-input__input mg-icon,.mg-input__error mg-icon{display:flex}.mg-input__box{padding:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2) var(--mg-inputs-spacer);height:var(--default-size);box-sizing:border-box;border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));font-family:inherit;color:hsl(var(--color-dark));font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box:focus{box-shadow:0 0 0.6rem hsla(var(--mg-inputs-color-shadow-focus-hsl), 0.5)}.mg-input__box:disabled{opacity:0.3}.mg-input.mg-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0;}.mg-input.mg-input--is-input-group-append .mg-input__box{margin-right:-0.1rem;border-top-right-radius:0%;border-bottom-right-radius:0%}.mg-input.mg-input--is-input-group-append .mg-input__box:focus-visible{outline-style:solid;outline-offset:-0.2rem;outline-width:0.2rem}.mg-input.mg-input--is-input-group-append.mg-input--readonly slot[name=append-input]{display:none}.mg-input.mg-input--label-on-top .mg-input__box{width:auto;max-width:100%}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right:0;--mg-button-border-radius-bottom-right:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-button-border-radius-top-right:var(--mg-inputs-border-radius);--mg-button-border-radius-bottom-right:var(--mg-inputs-border-radius)}.mg-input.mg-input--is-append-input-slot-content:not(.mg-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input.mg-input--width-full:not(.mg-input--label-on-top){justify-content:space-between}.mg-input.mg-input--width-full .mg-input__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{width:5rem}.mg-input mg-character-left{opacity:0.6;font-size:1.1rem}.mg-input.mg-input--has-display-character-left .mg-input__input+.mg-input__help-text,.mg-input.mg-input--has-display-character-left .mg-input__input+.mg-input__error{margin-top:0}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}.mg-input.mg-input--has-icon .mg-input__with-character-left>mg-icon{position:absolute;top:50%;left:var(--mg-inputs-spacer);color:var(--mg-inputs-color);transform:translateY(-50%)}.mg-input.mg-input--has-icon .mg-input__with-character-left .mg-input__box{padding-left:calc(var(--mg-icon-regular-size) + var(--mg-inputs-spacer) * 2)}.mg-input__with-character-left{position:relative;display:inline-flex;width:100%}.mg-input.is-focused .mg-input__with-character-left .mg-input__box{padding-right:calc(var(--mg-character-left-message-length) * 1ch + 0.8rem)}.mg-input__with-character-left mg-character-left{position:absolute;display:none;top:50%;right:1rem;opacity:0.6;transform:translateY(-50%);font-size:1.1rem}.mg-input.is-focused .mg-input__with-character-left mg-character-left{display:block}";
10
+ const mgInputTextCss = ":host{display:block}.mg-input{display:flex;align-items:flex-start;min-height:var(--default-size);max-width:100%;margin-bottom:var(--mg-inputs-margin-bottom, 0);}.mg-input mg-input-title{flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-input.mg-input--label-on-top{flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:flex;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-input__input-container .mg-input__help-text,.mg-input__input-container .mg-input__error{text-align:start;font-size:1.2rem}.mg-input__input{display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input.mg-input__input--has-error .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input__input+.mg-input__help-text,.mg-input__input+.mg-input__error{margin-top:0.5rem}.mg-input__error{display:inline-block;margin-top:0.2rem;padding:0.3rem 0.8rem;border-radius:0.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-input__input mg-icon,.mg-input__error mg-icon{display:flex}.mg-input__box{padding:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2) var(--mg-inputs-spacer);height:var(--default-size);box-sizing:border-box;border-width:var(--mg-inputs-border-width);border-style:solid;border-color:var(--mg-inputs-color);border-radius:var(--mg-inputs-border-radius);background-color:hsl(var(--color-light));font-family:inherit;color:hsl(var(--color-dark));font-size:var(--font-size);text-align:var(--mg-inputs-text-align, left)}.mg-input__box::placeholder{color:var(--mg-inputs-color);font-style:italic}.mg-input__box:focus{box-shadow:0 0 0.6rem hsla(var(--mg-inputs-color-shadow-focus-hsl), 0.5)}.mg-input__box:disabled{opacity:0.3}.mg-input.mg-input--is-input-group-append{--mg-button-border-radius-top-left:0;--mg-button-border-radius-bottom-left:0;}.mg-input.mg-input--is-input-group-append .mg-input__box{margin-right:-0.1rem;border-top-right-radius:0%;border-bottom-right-radius:0%}.mg-input.mg-input--is-input-group-append .mg-input__box:focus-visible{outline-style:solid;outline-offset:-0.2rem;outline-width:0.2rem}.mg-input.mg-input--is-input-group-append.mg-input--readonly slot[name=append-input]{display:none}.mg-input.mg-input--label-on-top .mg-input__box{width:auto;max-width:100%}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-button-border-radius-top-right:0;--mg-button-border-radius-bottom-right:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-button-border-right-width:0}.mg-input.mg-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-button-border-radius-top-right:var(--mg-inputs-border-radius);--mg-button-border-radius-bottom-right:var(--mg-inputs-border-radius)}.mg-input.mg-input--is-append-input-slot-content:not(.mg-input--readonly) ::slotted([slot=append-input]){padding-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input.mg-input--width-full:not(.mg-input--label-on-top){justify-content:space-between}.mg-input.mg-input--width-full .mg-input__input-container{flex:auto;width:100%}.mg-input.mg-input--width-full .mg-input__input-container .mg-input__box{width:100%}.mg-input.mg-input--width-16 .mg-input__box{width:21rem}.mg-input.mg-input--width-4 .mg-input__box{width:7rem}.mg-input.mg-input--width-2 .mg-input__box{width:5rem}.mg-input mg-character-left{opacity:0.6;font-size:1.1rem}.mg-input.mg-input--has-display-character-left .mg-input__input+.mg-input__help-text,.mg-input.mg-input--has-display-character-left .mg-input__input+.mg-input__error{margin-top:0}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}.mg-input.mg-input--has-icon .mg-input__with-character-left>mg-icon{position:absolute;top:50%;left:var(--mg-inputs-spacer);color:var(--mg-inputs-color);transform:translateY(-50%)}.mg-input.mg-input--has-icon .mg-input__with-character-left .mg-input__box{padding-left:calc(var(--mg-icon-regular-size) + var(--mg-inputs-spacer) * 2)}.mg-input__with-character-left{position:relative;display:inline-flex}.mg-input--width-full .mg-input__with-character-left{width:100%}.mg-input.is-focused .mg-input__with-character-left .mg-input__box{padding-right:calc(var(--mg-character-left-message-length) * 1ch + 0.8rem)}.mg-input__with-character-left mg-character-left{position:absolute;display:none;top:50%;right:1rem;opacity:0.6;transform:translateY(-50%);font-size:1.1rem}.mg-input.is-focused .mg-input__with-character-left mg-character-left{display:block}";
11
11
 
12
12
  const MgInputText = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
13
13
  constructor() {
@@ -25,11 +25,6 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
25
25
  this.classHasIcon = 'mg-input--has-icon';
26
26
  // hasError (triggered by blur event)
27
27
  this.hasError = false;
28
- /**
29
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
30
- * If not set, it will be created.
31
- */
32
- this.identifier = createID('mg-input-text');
33
28
  /**
34
29
  * Input name
35
30
  * If not set the value equals the identifier
@@ -227,7 +222,7 @@ const MgInputText = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
227
222
  '--mg-character-left-message-length': (this.displayCharacterLeft
228
223
  ? (this.maxlength - (this.value || '').length).toString().length + this.maxlength.toString().length + 1
229
224
  : 0).toString(),
230
- } }, this.icon !== undefined && h("mg-icon", { icon: this.icon }), h("input", { type: this.type, class: "mg-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, maxlength: this.maxlength, disabled: this.disabled, required: this.required, pattern: this.pattern, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: el => (this.input = el) }), this.displayCharacterLeft && this.maxlength && (h("mg-character-left", { identifier: this.characterLeftId, characters: this.value, maxlength: this.maxlength }))), h("slot", { name: "append-input" })));
225
+ } }, this.icon !== undefined && h("mg-icon", { icon: this.icon }), h("input", { type: this.type, class: "mg-input__box", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, maxlength: this.maxlength, disabled: this.disabled, required: this.required, pattern: this.pattern, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: el => (this.input = el) }), this.displayCharacterLeft && this.maxlength > 0 && (h("mg-character-left", { identifier: this.characterLeftId, characters: this.value, maxlength: this.maxlength }))), h("slot", { name: "append-input" })));
231
226
  }
232
227
  get element() { return this; }
233
228
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { M as MgInput } from './MgInput.js';
3
- import { c as createID, C as ClassList } from './components.utils.js';
3
+ import { C as ClassList } from './components.utils.js';
4
4
  import { i as initLocales } from './index2.js';
5
5
  import { d as defineCustomElement$5 } from './mg-character-left2.js';
6
6
  import { d as defineCustomElement$4 } from './mg-icon2.js';
@@ -24,11 +24,6 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
24
24
  this.classHasDisplayCharacterLeft = 'mg-input--has-display-character-left';
25
25
  // hasError (triggered by blur event)
26
26
  this.hasError = false;
27
- /**
28
- * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
29
- * If not set, it will be created.
30
- */
31
- this.identifier = createID('mg-input-textarea');
32
27
  /**
33
28
  * Input name
34
29
  * If not set the value equals the identifier
@@ -203,7 +198,7 @@ const MgInputTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
203
198
  'mg-input__box--resizable': this.resizable === 'both',
204
199
  'mg-input__box--resizable-horizontal': this.resizable === 'horizontal',
205
200
  'mg-input__box--resizable-vertical': this.resizable === 'vertical',
206
- }, 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) }), this.displayCharacterLeft && this.maxlength && (h("mg-character-left", { identifier: this.characterLeftId, characters: this.value, maxlength: this.maxlength })))));
201
+ }, 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) }), this.displayCharacterLeft && this.maxlength > 0 && (h("mg-character-left", { identifier: this.characterLeftId, characters: this.value, maxlength: this.maxlength })))));
207
202
  }
208
203
  get element() { return this; }
209
204
  static get watchers() { return {