@mgdis/mg-components 5.4.0 → 5.5.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 (126) hide show
  1. package/dist/cjs/{index-94497267.js → index-c3450336.js} +0 -0
  2. package/dist/cjs/loader.cjs.js +3 -3
  3. package/dist/cjs/{mg-badge_29.cjs.entry.js → mg-badge_30.cjs.entry.js} +380 -625
  4. package/dist/cjs/mg-components.cjs.js +3 -3
  5. package/dist/collection/collection-manifest.json +3 -2
  6. package/dist/collection/components/atoms/mg-badge/doc/mg-badge.stories.js +0 -7
  7. package/dist/collection/components/atoms/mg-badge/mg-badge.js +4 -7
  8. package/dist/collection/components/atoms/mg-button/doc/mg-button.stories.js +0 -7
  9. package/dist/collection/components/atoms/mg-button/mg-button.conf.js +1 -1
  10. package/dist/collection/components/atoms/mg-button/mg-button.css +13 -0
  11. package/dist/collection/components/atoms/mg-button/mg-button.js +12 -29
  12. package/dist/collection/components/atoms/mg-card/mg-card.css +6 -1
  13. package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +2 -3
  14. package/dist/collection/components/atoms/mg-divider/mg-divider.js +0 -6
  15. package/dist/collection/components/atoms/mg-icon/mg-icon.js +5 -12
  16. package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +4 -8
  17. package/dist/collection/components/atoms/mg-tag/doc/mg-tag.stories.js +1 -9
  18. package/dist/collection/components/atoms/mg-tag/mg-tag.css +58 -0
  19. package/dist/collection/components/atoms/mg-tag/mg-tag.js +60 -15
  20. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +6 -19
  21. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +17 -33
  22. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +17 -25
  23. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +24 -47
  24. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +17 -29
  25. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +18 -33
  26. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +23 -33
  27. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +23 -41
  28. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +23 -45
  29. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +16 -33
  30. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +4 -7
  31. package/dist/collection/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.js +8 -1
  32. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +4 -0
  33. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +13 -24
  34. package/dist/collection/components/molecules/mg-details/mg-details.js +4 -8
  35. package/dist/collection/components/molecules/mg-form/mg-form.js +8 -22
  36. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.css +2 -2
  37. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +0 -6
  38. package/dist/collection/components/molecules/mg-message/mg-message.css +13 -19
  39. package/dist/collection/components/molecules/mg-message/mg-message.js +8 -27
  40. package/dist/collection/components/molecules/mg-modal/mg-modal.css +12 -7
  41. package/dist/collection/components/molecules/mg-modal/mg-modal.js +8 -26
  42. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +4 -13
  43. package/dist/collection/components/molecules/mg-panel/mg-panel.css +10 -5
  44. package/dist/collection/components/molecules/mg-panel/mg-panel.js +11 -22
  45. package/dist/collection/components/molecules/mg-popover/mg-popover.css +13 -9
  46. package/dist/collection/components/molecules/mg-popover/mg-popover.js +7 -23
  47. package/dist/collection/components/molecules/mg-skip-links/doc/mg-skip-links.stories.js +24 -0
  48. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.conf.js +1 -0
  49. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.css +28 -0
  50. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +77 -0
  51. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +10 -23
  52. package/dist/collection/locales/en/messages.json +3 -0
  53. package/dist/collection/locales/fr/messages.json +3 -0
  54. package/dist/components/index.d.ts +1 -0
  55. package/dist/components/index.js +1 -0
  56. package/dist/components/index2.js +8 -0
  57. package/dist/components/mg-badge2.js +4 -7
  58. package/dist/components/mg-button2.js +13 -30
  59. package/dist/components/mg-card.js +1 -37
  60. package/dist/components/mg-card2.js +39 -0
  61. package/dist/components/mg-character-left2.js +2 -3
  62. package/dist/components/mg-details.js +4 -8
  63. package/dist/components/mg-divider.js +0 -6
  64. package/dist/components/mg-form.js +8 -22
  65. package/dist/components/mg-icon2.js +5 -12
  66. package/dist/components/mg-illustrated-message.js +1 -7
  67. package/dist/components/mg-input-checkbox.js +17 -33
  68. package/dist/components/mg-input-date.js +17 -25
  69. package/dist/components/mg-input-numeric.js +24 -47
  70. package/dist/components/mg-input-password.js +17 -29
  71. package/dist/components/mg-input-radio.js +18 -33
  72. package/dist/components/mg-input-select2.js +24 -34
  73. package/dist/components/mg-input-text2.js +23 -41
  74. package/dist/components/mg-input-textarea.js +23 -45
  75. package/dist/components/mg-input-title2.js +4 -8
  76. package/dist/components/mg-input-toggle.js +16 -33
  77. package/dist/components/mg-menu-item.js +14 -25
  78. package/dist/components/mg-menu.js +4 -7
  79. package/dist/components/mg-message.js +17 -30
  80. package/dist/components/mg-modal.js +18 -30
  81. package/dist/components/mg-pagination.js +4 -13
  82. package/dist/components/mg-panel.js +20 -25
  83. package/dist/components/mg-popover.js +16 -26
  84. package/dist/components/mg-skip-links.d.ts +11 -0
  85. package/dist/components/mg-skip-links.js +66 -0
  86. package/dist/components/mg-tabs.js +10 -23
  87. package/dist/components/mg-tag.js +34 -12
  88. package/dist/components/mg-tooltip2.js +6 -19
  89. package/dist/esm/{index-aad0184c.js → index-78edde1d.js} +0 -0
  90. package/dist/esm/loader.js +3 -3
  91. package/dist/esm/{mg-badge_29.entry.js → mg-badge_30.entry.js} +380 -626
  92. package/dist/esm/mg-components.js +3 -3
  93. package/dist/esm/polyfills/core-js.js +0 -0
  94. package/dist/esm/polyfills/dom.js +0 -0
  95. package/dist/esm/polyfills/es5-html-element.js +0 -0
  96. package/dist/esm/polyfills/index.js +0 -0
  97. package/dist/esm/polyfills/system.js +0 -0
  98. package/dist/mg-components/locales/en/messages.json +3 -0
  99. package/dist/mg-components/locales/fr/messages.json +3 -0
  100. package/dist/mg-components/mg-components.css +1 -1
  101. package/dist/mg-components/mg-components.esm.js +1 -1
  102. package/dist/mg-components/{p-3899d5d2.js → p-125c54ca.js} +0 -0
  103. package/dist/mg-components/p-4961c96c.entry.js +1 -0
  104. package/dist/types/components/atoms/mg-badge/doc/mg-badge.stories.d.ts +0 -11
  105. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -1
  106. package/dist/types/components/atoms/mg-button/doc/mg-button.stories.d.ts +0 -11
  107. package/dist/types/components/atoms/mg-button/mg-button.conf.d.ts +2 -2
  108. package/dist/types/components/atoms/mg-button/mg-button.d.ts +6 -6
  109. package/dist/types/components/atoms/mg-tag/doc/mg-tag.stories.d.ts +0 -13
  110. package/dist/types/components/atoms/mg-tag/mg-tag.conf.d.ts +5 -1
  111. package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +27 -6
  112. package/dist/types/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.d.ts +1 -0
  113. package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -1
  114. package/dist/types/components/molecules/mg-message/mg-message.d.ts +1 -1
  115. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +1 -1
  116. package/dist/types/components/molecules/mg-skip-links/doc/mg-skip-links.stories.d.ts +11 -0
  117. package/dist/types/components/molecules/mg-skip-links/mg-skip-links.conf.d.ts +7 -0
  118. package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +34 -0
  119. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +2 -2
  120. package/dist/types/components.d.ts +37 -6
  121. package/dist/types/locales/index.d.ts +6 -0
  122. package/dist/types/stencil-public-runtime.d.ts +5 -0
  123. package/dist/types/utils/unit.test.utils.d.ts +42 -0
  124. package/package.json +36 -31
  125. package/readme.md +3 -1
  126. package/dist/mg-components/p-059a9a59.entry.js +0 -1
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-94497267.js');
3
+ const index = require('./index-c3450336.js');
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v2.18.1 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v2.20.0 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  const patchBrowser = () => {
9
9
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mg-components.cjs.js', document.baseURI).href));
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["mg-badge_29.cjs",[[1,"mg-panel",{"identifier":[1],"panelTitle":[1025,"panel-title"],"titlePattern":[1025,"title-pattern"],"titlePatternErrorMessage":[1025,"title-pattern-error-message"],"expanded":[1028],"expandToggleDisabled":[1028,"expand-toggle-disabled"],"titleEditable":[4,"title-editable"],"classList":[32],"isEditing":[32],"updatedPanelTitle":[32]}],[1,"mg-pagination",{"identifier":[1],"label":[1025],"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"]}],[1,"mg-input-textarea",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"rows":[2],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"resizable":[1],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-checkbox",{"value":[1040],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"checkboxItems":[32],"displayError":[64]}],[1,"mg-input-date",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"min":[1],"max":[1],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-numeric",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"type":[1],"currency":[1],"max":[2],"min":[2],"integerLength":[2,"integer-length"],"decimalLength":[2,"decimal-length"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"hasFocus":[32],"displayError":[64]}],[1,"mg-input-password",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-radio",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"displayError":[64]}],[1,"mg-input-toggle",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"isOnOff":[4,"is-on-off"],"isIcon":[4,"is-icon"],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"classList":[32],"options":[32],"checked":[32]}],[1,"mg-message",{"identifier":[1],"delay":[2],"variant":[1],"closeButton":[1028,"close-button"],"hide":[1028],"classList":[32],"hasActions":[32]}],[1,"mg-modal",{"identifier":[1],"modalTitle":[1,"modal-title"],"closeButton":[1028,"close-button"],"hide":[1028],"hasActions":[32],"hasContent":[32],"classList":[32]},[[8,"keydown","handleKeyDown"]]],[1,"mg-popover",{"identifier":[1],"placement":[1],"closeButton":[4,"close-button"],"display":[1028],"disabled":[1028]}],[1,"mg-tabs",{"identifier":[1],"label":[1],"size":[1],"items":[16],"activeTab":[1538,"active-tab"],"tabs":[32],"classList":[32]}],[1,"mg-details",{"toggleClosed":[1,"toggle-closed"],"toggleOpened":[1,"toggle-opened"],"hideSummary":[4,"hide-summary"],"expanded":[1028]}],[1,"mg-menu-item",{"href":[1],"status":[1537],"size":[1],"expanded":[1028],"navigationButtonClassList":[32],"direction":[32],"isInMainMenu":[32],"hasChildren":[32]}],[1,"mg-card"],[1,"mg-divider",{"size":[1]}],[1,"mg-form",{"identifier":[1],"name":[1],"readonly":[4],"disabled":[4],"valid":[1028],"invalid":[1028],"classList":[32],"requiredMessage":[32],"displayError":[64]}],[1,"mg-illustrated-message",{"size":[1],"direction":[1]}],[1,"mg-menu",{"label":[1],"direction":[513],"isChildMenu":[32]}],[1,"mg-tag",{"variant":[1],"outline":[4],"classList":[32]}],[1,"mg-input-text",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"type":[1],"icon":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64]}],[1,"mg-input-select",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1025],"placeholderHide":[4,"placeholder-hide"],"placeholderDisabled":[4,"placeholder-disabled"],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"valueExist":[32],"readonlyValue":[32],"displayError":[64]}],[1,"mg-badge",{"value":[1032],"label":[1],"variant":[1],"outline":[4],"classList":[32]}],[2,"mg-character-left",{"identifier":[1],"characters":[1],"maxlength":[2]}],[1,"mg-button",{"variant":[1],"identifier":[1],"label":[1],"type":[1],"fullWidth":[1028,"full-width"],"form":[1025],"disabled":[1028],"isIcon":[4,"is-icon"],"disableOnClick":[4,"disable-on-click"],"loading":[32],"classList":[32]}],[6,"mg-input-title",{"identifier":[1],"required":[4],"isLegend":[4,"is-legend"],"tagName":[32]}],[1,"mg-tooltip",{"identifier":[1],"message":[1],"placement":[1],"display":[1028],"disabled":[1028]}],[1,"mg-icon",{"icon":[1],"size":[1],"variant":[1],"spin":[4],"classList":[32]}]]]], options);
18
+ return index.bootstrapLazy([["mg-badge_30.cjs",[[1,"mg-panel",{"identifier":[1],"panelTitle":[1025,"panel-title"],"titlePattern":[1025,"title-pattern"],"titlePatternErrorMessage":[1025,"title-pattern-error-message"],"expanded":[1028],"expandToggleDisabled":[1028,"expand-toggle-disabled"],"titleEditable":[4,"title-editable"],"classList":[32],"isEditing":[32],"updatedPanelTitle":[32]}],[1,"mg-pagination",{"identifier":[1],"label":[1025],"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"]}],[1,"mg-input-textarea",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"rows":[2],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"resizable":[1],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-checkbox",{"value":[1040],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"checkboxItems":[32],"displayError":[64]}],[1,"mg-input-date",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"min":[1],"max":[1],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-numeric",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"type":[1],"currency":[1],"max":[2],"min":[2],"integerLength":[2,"integer-length"],"decimalLength":[2,"decimal-length"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"hasFocus":[32],"displayError":[64]}],[1,"mg-input-password",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-radio",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"displayError":[64]}],[1,"mg-input-toggle",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"isOnOff":[4,"is-on-off"],"isIcon":[4,"is-icon"],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"classList":[32],"options":[32],"checked":[32]}],[1,"mg-message",{"identifier":[1],"delay":[2],"variant":[1],"closeButton":[1028,"close-button"],"hide":[1028],"classList":[32],"hasActions":[32]}],[1,"mg-modal",{"identifier":[1],"modalTitle":[1,"modal-title"],"closeButton":[1028,"close-button"],"hide":[1028],"hasActions":[32],"hasContent":[32],"classList":[32]},[[8,"keydown","handleKeyDown"]]],[1,"mg-popover",{"identifier":[1],"placement":[1],"closeButton":[4,"close-button"],"display":[1028],"disabled":[1028]}],[1,"mg-tabs",{"identifier":[1],"label":[1],"size":[1],"items":[16],"activeTab":[1538,"active-tab"],"tabs":[32],"classList":[32]}],[1,"mg-details",{"toggleClosed":[1,"toggle-closed"],"toggleOpened":[1,"toggle-opened"],"hideSummary":[4,"hide-summary"],"expanded":[1028]}],[1,"mg-menu-item",{"href":[1],"status":[1537],"size":[1],"expanded":[1028],"navigationButtonClassList":[32],"direction":[32],"isInMainMenu":[32],"hasChildren":[32]}],[1,"mg-divider",{"size":[1]}],[1,"mg-form",{"identifier":[1],"name":[1],"readonly":[4],"disabled":[4],"valid":[1028],"invalid":[1028],"classList":[32],"requiredMessage":[32],"displayError":[64]}],[1,"mg-illustrated-message",{"size":[1],"direction":[1]}],[1,"mg-menu",{"label":[1],"direction":[513],"isChildMenu":[32]}],[1,"mg-skip-links",{"links":[1040]}],[1,"mg-tag",{"variant":[1],"outline":[4],"soft":[4],"classList":[32]}],[1,"mg-input-text",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"type":[1],"icon":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64]}],[1,"mg-input-select",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1025],"placeholderHide":[4,"placeholder-hide"],"placeholderDisabled":[4,"placeholder-disabled"],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"valueExist":[32],"readonlyValue":[32],"displayError":[64]}],[1,"mg-badge",{"value":[1032],"label":[1],"variant":[1],"outline":[4],"classList":[32]}],[2,"mg-character-left",{"identifier":[1],"characters":[1],"maxlength":[2]}],[1,"mg-card"],[1,"mg-button",{"variant":[1],"identifier":[1],"label":[1],"type":[1],"fullWidth":[1028,"full-width"],"form":[1025],"disabled":[1028],"isIcon":[4,"is-icon"],"disableOnClick":[4,"disable-on-click"],"loading":[32],"classList":[32]}],[6,"mg-input-title",{"identifier":[1],"required":[4],"isLegend":[4,"is-legend"],"tagName":[32]}],[1,"mg-tooltip",{"identifier":[1],"message":[1],"placement":[1],"display":[1028],"disabled":[1028]}],[1,"mg-icon",{"icon":[1],"size":[1],"variant":[1],"spin":[4],"classList":[32]}]]]], options);
19
19
  });
@@ -28,12 +28,13 @@
28
28
  "./components/molecules/mg-pagination/mg-pagination.js",
29
29
  "./components/molecules/mg-panel/mg-panel.js",
30
30
  "./components/molecules/mg-popover/mg-popover.js",
31
+ "./components/molecules/mg-skip-links/mg-skip-links.js",
31
32
  "./components/molecules/mg-tabs/mg-tabs.js"
32
33
  ],
33
34
  "compiler": {
34
35
  "name": "@stencil/core",
35
- "version": "2.18.1",
36
- "typescriptVersion": "4.7.4"
36
+ "version": "2.20.0",
37
+ "typescriptVersion": "4.8.4"
37
38
  },
38
39
  "collections": [],
39
40
  "bundles": []
@@ -5,13 +5,6 @@ export default {
5
5
  component: 'mg-badge',
6
6
  title: 'Atoms/mg-badge',
7
7
  argTypes: {
8
- variant: {
9
- options: variants,
10
- control: { type: 'select' },
11
- table: {
12
- defaultValue: { summary: variants[0] },
13
- },
14
- },
15
8
  value: {
16
9
  control: { type: 'text' },
17
10
  },
@@ -8,13 +8,10 @@ export class MgBadge {
8
8
  ************/
9
9
  // Classes
10
10
  this.classOutline = `mg-badge--outline`;
11
- /**
12
- * Define button variant
13
- */
14
- this.variant = variants[0]; // info
15
- /**
16
- * Component classes
17
- */
11
+ this.value = undefined;
12
+ this.label = undefined;
13
+ this.variant = variants[0];
14
+ this.outline = undefined;
18
15
  this.classList = new ClassList(['mg-badge']);
19
16
  }
20
17
  validateValue(newValue) {
@@ -6,13 +6,6 @@ export default {
6
6
  component: 'mg-button',
7
7
  title: 'Atoms/mg-button',
8
8
  argTypes: {
9
- variant: {
10
- options: variants,
11
- control: { type: 'select' },
12
- table: {
13
- defaultValue: { summary: variants[0] },
14
- },
15
- },
16
9
  type: {
17
10
  options: [undefined, ...buttonTypes],
18
11
  control: { type: 'select' },
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * List of all possibles variants
3
3
  */
4
- export const variants = ['primary', 'secondary', 'danger', 'danger-alt', 'info', 'flat', 'success'];
4
+ export const variants = ['primary', 'secondary', 'danger', 'danger-alt', 'info', 'flat', 'success', 'link'];
5
5
  /**
6
6
  * List of all possibles button types
7
7
  */
@@ -149,6 +149,19 @@
149
149
  background: none;
150
150
  border: none;
151
151
  }
152
+ .mg-button.mg-button--link {
153
+ padding: unset;
154
+ min-height: unset;
155
+ background: unset;
156
+ border: unset;
157
+ text-decoration: underline;
158
+ }
159
+ .mg-button.mg-button--link slot {
160
+ font-weight: 600;
161
+ }
162
+ .mg-button.mg-button--link:hover {
163
+ text-decoration: none;
164
+ }
152
165
  .mg-button.mg-button--full-width {
153
166
  display: flex;
154
167
  justify-content: center;
@@ -10,34 +10,6 @@ export class MgButton {
10
10
  this.classDisabled = 'mg-button--disabled';
11
11
  this.classLoading = 'mg-button--loading';
12
12
  this.classFullWidth = 'mg-button--full-width';
13
- /**
14
- * Define button variant
15
- */
16
- this.variant = variants[0]; // Primary
17
- /**
18
- * Set button to full-width
19
- */
20
- this.fullWidth = false;
21
- /**
22
- * Define if button is round.
23
- * Used for icon button.
24
- */
25
- this.isIcon = false;
26
- /**
27
- * Option to set input disable on click, in order to prevent multi-click.
28
- * Parent component have to remove the attribute 'disabled' when the process ends.
29
- */
30
- this.disableOnClick = false;
31
- /**
32
- * Define if button is loading, default to false.
33
- * Trigger when button is clicked or key-up ['enter', 'space], then value change to true.
34
- * It's required to reset to false when action/promise in parent is done to stop the loading state
35
- */
36
- this.loading = false;
37
- /**
38
- * Component classes
39
- */
40
- this.classList = new ClassList(['mg-button']);
41
13
  /**
42
14
  * Trigger actions onClick event
43
15
  *
@@ -80,6 +52,17 @@ export class MgButton {
80
52
  this.element.dispatchEvent(new MouseEvent('click', { bubbles: true }));
81
53
  }
82
54
  };
55
+ this.variant = variants[0];
56
+ this.identifier = undefined;
57
+ this.label = undefined;
58
+ this.type = undefined;
59
+ this.fullWidth = false;
60
+ this.form = undefined;
61
+ this.disabled = undefined;
62
+ this.isIcon = false;
63
+ this.disableOnClick = false;
64
+ this.loading = false;
65
+ this.classList = new ClassList(['mg-button']);
83
66
  }
84
67
  validateVariant(newValue, oldValue) {
85
68
  if (!variants.includes(newValue)) {
@@ -173,7 +156,7 @@ export class MgButton {
173
156
  "mutable": false,
174
157
  "complexType": {
175
158
  "original": "VariantType",
176
- "resolved": "\"danger\" | \"danger-alt\" | \"flat\" | \"info\" | \"primary\" | \"secondary\" | \"success\"",
159
+ "resolved": "\"danger\" | \"danger-alt\" | \"flat\" | \"info\" | \"link\" | \"primary\" | \"secondary\" | \"success\"",
177
160
  "references": {
178
161
  "VariantType": {
179
162
  "location": "import",
@@ -1,7 +1,12 @@
1
1
  .mg-card {
2
+ position: relative;
3
+ width: 100%;
2
4
  padding: var(--mg-card-padding);
3
- border-radius: var(--mg-card-border-radius);
5
+ overflow: var(--mg-card-overflow);
6
+ box-sizing: border-box;
7
+ z-index: inherit;
4
8
  background: var(--mg-card-background);
5
9
  border: var(--mg-card-border);
10
+ border-radius: var(--mg-card-border-radius);
6
11
  box-shadow: var(--mg-card-box-shadow);
7
12
  }
@@ -2,10 +2,9 @@ import { h } from '@stencil/core';
2
2
  import { initLocales } from '../../../locales';
3
3
  export class MgCharacterLeft {
4
4
  constructor() {
5
- /**
6
- * Sets the characters to count
7
- */
5
+ this.identifier = undefined;
8
6
  this.characters = '';
7
+ this.maxlength = undefined;
9
8
  }
10
9
  validateMaxlength(newValue) {
11
10
  if (typeof newValue !== 'number') {
@@ -1,12 +1,6 @@
1
1
  import { h } from '@stencil/core';
2
2
  export class MgDivider {
3
3
  constructor() {
4
- /**************
5
- * Decorators *
6
- **************/
7
- /**
8
- * Define component size
9
- */
10
4
  this.size = 'regular';
11
5
  }
12
6
  /**
@@ -3,24 +3,17 @@ import { icons, sizes, variants } from './mg-icon.conf';
3
3
  import { ClassList } from '../../../utils/components.utils';
4
4
  export class MgIcon {
5
5
  constructor() {
6
- /**
7
- * Define icon size
8
- */
9
- this.size = 'regular';
10
- /**
11
- * Make the icon spin
12
- */
13
- this.spin = false;
14
- /**
15
- * Component classes
16
- */
17
- this.classList = new ClassList(['mg-icon']);
18
6
  /**
19
7
  * getIcon
20
8
  *
21
9
  * @returns {HTMLElement} icon html
22
10
  */
23
11
  this.getIcon = () => icons[this.icon]();
12
+ this.icon = undefined;
13
+ this.size = 'regular';
14
+ this.variant = undefined;
15
+ this.spin = false;
16
+ this.classList = new ClassList(['mg-icon']);
24
17
  }
25
18
  validateIcon(newValue, oldValue) {
26
19
  if (!Object.keys(icons).includes(newValue)) {
@@ -1,17 +1,13 @@
1
1
  import { h } from '@stencil/core';
2
2
  export class MgInputTitle {
3
3
  constructor() {
4
- /**
5
- * Switch from label to fieldset sementic
6
- */
7
- this.isLegend = false;
8
- /**
9
- * Component parent tagname
10
- */
11
- this.tagName = 'label';
12
4
  this.getTagName = () => {
13
5
  this.tagName = this.isLegend ? 'legend' : 'label';
14
6
  };
7
+ this.identifier = undefined;
8
+ this.required = undefined;
9
+ this.isLegend = false;
10
+ this.tagName = 'label';
15
11
  }
16
12
  validateIdentifier(newValue) {
17
13
  if (typeof newValue !== 'string' || newValue.trim() === '') {
@@ -4,15 +4,6 @@ import { variants } from '../mg-tag.conf';
4
4
  export default {
5
5
  component: 'mg-tag',
6
6
  title: 'Atoms/mg-tag',
7
- argTypes: {
8
- variant: {
9
- options: variants,
10
- control: { type: 'select' },
11
- table: {
12
- defaultValue: { summary: variants[0] },
13
- },
14
- },
15
- },
16
7
  };
17
8
  /**
18
9
  * Template
@@ -27,4 +18,5 @@ MgTag.args = {
27
18
  slot: 'Label',
28
19
  variant: variants[0],
29
20
  outline: false,
21
+ soft: false,
30
22
  };
@@ -20,6 +20,15 @@
20
20
  background-color: transparent;
21
21
  color: hsl(var(--color-dark));
22
22
  }
23
+ .mg-tag.mg-tag--primary.mg-tag--soft {
24
+ font-weight: 200;
25
+ background-color: hsl(var(--color-dark-h), var(--color-dark-s), 90%);
26
+ border-color: hsl(var(--color-dark-h), var(--color-dark-s), 90%);
27
+ color: hsl(var(--color-dark));
28
+ }
29
+ .mg-tag.mg-tag--primary.mg-tag--soft ::slotted(mg-icon) {
30
+ color: hsl(var(--color-dark));
31
+ }
23
32
  .mg-tag.mg-tag--secondary {
24
33
  background-color: hsl(var(--color-light));
25
34
  border-color: hsl(var(--color-light));
@@ -29,6 +38,15 @@
29
38
  background-color: transparent;
30
39
  color: hsl(var(--color-light));
31
40
  }
41
+ .mg-tag.mg-tag--secondary.mg-tag--soft {
42
+ font-weight: 200;
43
+ background-color: hsl(var(--color-light-h), var(--color-light-s), 90%);
44
+ border-color: hsl(var(--color-light-h), var(--color-light-s), 90%);
45
+ color: hsl(var(--color-dark));
46
+ }
47
+ .mg-tag.mg-tag--secondary.mg-tag--soft ::slotted(mg-icon) {
48
+ color: hsl(var(--color-dark));
49
+ }
32
50
  .mg-tag.mg-tag--success {
33
51
  background-color: hsl(var(--color-success));
34
52
  border-color: hsl(var(--color-success));
@@ -38,6 +56,15 @@
38
56
  background-color: transparent;
39
57
  color: hsl(var(--color-success));
40
58
  }
59
+ .mg-tag.mg-tag--success.mg-tag--soft {
60
+ font-weight: 200;
61
+ background-color: hsl(var(--color-success-h), var(--color-success-s), 90%);
62
+ border-color: hsl(var(--color-success-h), var(--color-success-s), 90%);
63
+ color: hsl(var(--color-dark));
64
+ }
65
+ .mg-tag.mg-tag--success.mg-tag--soft ::slotted(mg-icon) {
66
+ color: hsl(var(--color-success));
67
+ }
41
68
  .mg-tag.mg-tag--warning {
42
69
  background-color: hsl(var(--color-warning));
43
70
  border-color: hsl(var(--color-warning));
@@ -47,6 +74,15 @@
47
74
  background-color: transparent;
48
75
  color: hsl(var(--color-warning));
49
76
  }
77
+ .mg-tag.mg-tag--warning.mg-tag--soft {
78
+ font-weight: 200;
79
+ background-color: hsl(var(--color-warning-h), var(--color-warning-s), 90%);
80
+ border-color: hsl(var(--color-warning-h), var(--color-warning-s), 90%);
81
+ color: hsl(var(--color-dark));
82
+ }
83
+ .mg-tag.mg-tag--warning.mg-tag--soft ::slotted(mg-icon) {
84
+ color: hsl(var(--color-warning));
85
+ }
50
86
  .mg-tag.mg-tag--danger {
51
87
  background-color: hsl(var(--color-danger));
52
88
  border-color: hsl(var(--color-danger));
@@ -56,6 +92,15 @@
56
92
  background-color: transparent;
57
93
  color: hsl(var(--color-danger));
58
94
  }
95
+ .mg-tag.mg-tag--danger.mg-tag--soft {
96
+ font-weight: 200;
97
+ background-color: hsl(var(--color-danger-h), var(--color-danger-s), 90%);
98
+ border-color: hsl(var(--color-danger-h), var(--color-danger-s), 90%);
99
+ color: hsl(var(--color-dark));
100
+ }
101
+ .mg-tag.mg-tag--danger.mg-tag--soft ::slotted(mg-icon) {
102
+ color: hsl(var(--color-danger));
103
+ }
59
104
  .mg-tag.mg-tag--info {
60
105
  background-color: hsl(var(--color-info));
61
106
  border-color: hsl(var(--color-info));
@@ -65,9 +110,22 @@
65
110
  background-color: transparent;
66
111
  color: hsl(var(--color-info));
67
112
  }
113
+ .mg-tag.mg-tag--info.mg-tag--soft {
114
+ font-weight: 200;
115
+ background-color: hsl(var(--color-info-h), var(--color-info-s), 90%);
116
+ border-color: hsl(var(--color-info-h), var(--color-info-s), 90%);
117
+ color: hsl(var(--color-dark));
118
+ }
119
+ .mg-tag.mg-tag--info.mg-tag--soft ::slotted(mg-icon) {
120
+ color: hsl(var(--color-info));
121
+ }
68
122
 
69
123
  .mg-tag,
70
124
  mg-tag {
71
125
  display: inline-block;
72
126
  vertical-align: middle;
127
+ }
128
+
129
+ ::slotted(mg-icon) {
130
+ margin-right: 0.4rem;
73
131
  }
@@ -8,16 +8,10 @@ export class MgTag {
8
8
  ************/
9
9
  // Classes
10
10
  this.classOutline = `mg-tag--outline`;
11
- /**************
12
- * Decorators *
13
- **************/
14
- /**
15
- * Define button variant
16
- */
17
- this.variant = variants[0]; // primary
18
- /**
19
- * Component classes
20
- */
11
+ this.classSoft = `mg-tag--soft`;
12
+ this.variant = variants[0];
13
+ this.outline = undefined;
14
+ this.soft = undefined;
21
15
  this.classList = new ClassList(['mg-tag']);
22
16
  }
23
17
  validateVariant(newValue, oldValue) {
@@ -37,6 +31,29 @@ export class MgTag {
37
31
  else
38
32
  this.classList.delete(this.classOutline);
39
33
  }
34
+ validateSoft(newValue) {
35
+ // usage validation
36
+ if (newValue && this.outline)
37
+ throw new Error('<mg-tag> prop "soft" can NOT be used with prop "outline".');
38
+ // apply class
39
+ if (newValue)
40
+ this.classList.add(this.classSoft);
41
+ else
42
+ this.classList.delete(this.classSoft);
43
+ }
44
+ /*************
45
+ * Methods *
46
+ *************/
47
+ /**
48
+ * Validate the given textContent
49
+ *
50
+ * @param {string} textContent html element textContent property
51
+ * @returns {void}
52
+ */
53
+ validateTextContent(textContent) {
54
+ if (!textContent || textContent.trim() === '')
55
+ throw new Error('<mg-tag> slot must contain a text content.');
56
+ }
40
57
  /*************
41
58
  * Lifecycle *
42
59
  *************/
@@ -48,6 +65,8 @@ export class MgTag {
48
65
  componentWillLoad() {
49
66
  this.validateVariant(this.variant);
50
67
  this.validateOutline(this.outline);
68
+ this.validateSoft(this.soft);
69
+ this.validateTextContent(this.element.textContent);
51
70
  }
52
71
  /**
53
72
  * Render
@@ -75,15 +94,20 @@ export class MgTag {
75
94
  "type": "string",
76
95
  "mutable": false,
77
96
  "complexType": {
78
- "original": "string",
79
- "resolved": "string",
80
- "references": {}
97
+ "original": "TagVariantType",
98
+ "resolved": "\"danger\" | \"info\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"",
99
+ "references": {
100
+ "TagVariantType": {
101
+ "location": "import",
102
+ "path": "./mg-tag.conf"
103
+ }
104
+ }
81
105
  },
82
106
  "required": false,
83
107
  "optional": false,
84
108
  "docs": {
85
109
  "tags": [],
86
- "text": "Define button variant"
110
+ "text": "Define tag variant"
87
111
  },
88
112
  "attribute": "variant",
89
113
  "reflect": false,
@@ -101,10 +125,27 @@ export class MgTag {
101
125
  "optional": false,
102
126
  "docs": {
103
127
  "tags": [],
104
- "text": "Define if button is using outline style"
128
+ "text": "Define if tag is using outline style"
105
129
  },
106
130
  "attribute": "outline",
107
131
  "reflect": false
132
+ },
133
+ "soft": {
134
+ "type": "boolean",
135
+ "mutable": false,
136
+ "complexType": {
137
+ "original": "boolean",
138
+ "resolved": "boolean",
139
+ "references": {}
140
+ },
141
+ "required": false,
142
+ "optional": false,
143
+ "docs": {
144
+ "tags": [],
145
+ "text": "Define if tag is using soft style"
146
+ },
147
+ "attribute": "soft",
148
+ "reflect": false
108
149
  }
109
150
  };
110
151
  }
@@ -113,6 +154,7 @@ export class MgTag {
113
154
  "classList": {}
114
155
  };
115
156
  }
157
+ static get elementRef() { return "element"; }
116
158
  static get watchers() {
117
159
  return [{
118
160
  "propName": "variant",
@@ -120,6 +162,9 @@ export class MgTag {
120
162
  }, {
121
163
  "propName": "outline",
122
164
  "methodName": "validateOutline"
165
+ }, {
166
+ "propName": "soft",
167
+ "methodName": "validateSoft"
123
168
  }];
124
169
  }
125
170
  }
@@ -4,23 +4,6 @@ import { createPopper } from '@popperjs/core';
4
4
  import { Guard } from './mg-tooltip.conf';
5
5
  export class MgTooltip {
6
6
  constructor() {
7
- /**
8
- * Sets an `id` attribute.
9
- * Needed by the input for accessibility `aria-decribedby`.
10
- */
11
- this.identifier = createID('mg-tooltip');
12
- /**
13
- * Tooltip placement
14
- */
15
- this.placement = 'bottom';
16
- /**
17
- * Display tooltip
18
- */
19
- this.display = false;
20
- /**
21
- * Disable tooltip
22
- */
23
- this.disabled = false;
24
7
  /**
25
8
  * Show tooltip
26
9
  *
@@ -166,6 +149,11 @@ export class MgTooltip {
166
149
  });
167
150
  });
168
151
  };
152
+ this.identifier = createID('mg-tooltip');
153
+ this.message = undefined;
154
+ this.placement = 'bottom';
155
+ this.display = false;
156
+ this.disabled = false;
169
157
  }
170
158
  validateMessage(newValue) {
171
159
  if (typeof newValue !== 'string' || newValue.trim() === '') {
@@ -198,8 +186,7 @@ export class MgTooltip {
198
186
  const slotElement = this.element.firstElementChild;
199
187
  // Get interactive element
200
188
  const interactiveElements = ['a', 'button', 'input', 'textarea', 'select']; //! Might needs updates
201
- const interactiveElement = this.element.shadowRoot.querySelector(interactiveElements.join(',')) ||
202
- ((_a = slotElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(interactiveElements.join(',')));
189
+ const interactiveElement = this.element.shadowRoot.querySelector(interactiveElements.join(',')) || ((_a = slotElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(interactiveElements.join(',')));
203
190
  // define selected element to become tooltip selector
204
191
  this.tooltipedElement = interactiveElement || slotElement;
205
192
  // Check if slotted element is a disabled mg-button