@mgdis/mg-components 5.1.0 → 5.3.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 (108) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/{mg-badge_27.cjs.entry.js → mg-badge_29.cjs.entry.js} +730 -242
  3. package/dist/cjs/mg-components.cjs.js +1 -1
  4. package/dist/collection/collection-manifest.json +3 -1
  5. package/dist/collection/components/atoms/mg-badge/mg-badge.js +14 -19
  6. package/dist/collection/components/atoms/mg-button/mg-button.js +3 -3
  7. package/dist/collection/components/atoms/mg-icon/mg-icon.js +17 -7
  8. package/dist/collection/components/atoms/mg-tag/mg-tag.js +1 -1
  9. package/dist/collection/components/molecules/inputs/MgInput.js +3 -11
  10. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +41 -20
  11. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +50 -39
  12. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +25 -6
  13. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +42 -33
  14. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +25 -6
  15. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +36 -17
  16. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +35 -14
  17. package/dist/collection/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.js +2 -3
  18. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +28 -6
  19. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +36 -17
  20. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +25 -6
  21. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +38 -19
  22. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +25 -6
  23. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +37 -18
  24. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +1 -1
  25. package/dist/collection/components/molecules/menu/mg-menu/doc/mg-menu.stories.js +87 -0
  26. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js +8 -0
  27. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.css +10 -0
  28. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +185 -0
  29. package/dist/collection/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.js +32 -0
  30. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js +22 -0
  31. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +316 -0
  32. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +324 -0
  33. package/dist/collection/components/molecules/mg-form/mg-form.js +73 -27
  34. package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +6 -6
  35. package/dist/collection/components/molecules/mg-message/mg-message.js +1 -1
  36. package/dist/collection/components/molecules/mg-modal/mg-modal.js +0 -4
  37. package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +3 -0
  38. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +67 -17
  39. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +10 -4
  40. package/dist/collection/locales/index.js +3 -1
  41. package/dist/collection/utils/unit.test.utils.js +51 -0
  42. package/dist/collection/variables.css +29 -7
  43. package/dist/components/MgInput.js +4 -12
  44. package/dist/components/index.d.ts +2 -0
  45. package/dist/components/index.js +2 -0
  46. package/dist/components/index2.js +3 -1
  47. package/dist/components/mg-badge2.js +1 -1
  48. package/dist/components/mg-button2.js +3 -3
  49. package/dist/components/mg-form.js +67 -26
  50. package/dist/components/mg-input-checkbox.js +36 -21
  51. package/dist/components/mg-input-date.js +44 -39
  52. package/dist/components/mg-input-numeric.js +37 -34
  53. package/dist/components/mg-input-password.js +32 -19
  54. package/dist/components/mg-input-radio.js +30 -15
  55. package/dist/components/mg-input-select2.js +32 -19
  56. package/dist/components/mg-input-text2.js +34 -21
  57. package/dist/components/mg-input-textarea.js +32 -19
  58. package/dist/components/mg-input-toggle.js +1 -1
  59. package/dist/components/mg-menu-item.d.ts +11 -0
  60. package/dist/components/mg-menu-item.js +273 -0
  61. package/dist/components/mg-menu.conf.js +10 -0
  62. package/dist/components/mg-menu.d.ts +11 -0
  63. package/dist/components/mg-menu.js +149 -0
  64. package/dist/components/mg-message.js +1 -1
  65. package/dist/components/mg-modal.js +0 -4
  66. package/dist/components/mg-tabs.js +6 -2
  67. package/dist/components/mg-tag.js +1 -1
  68. package/dist/esm/loader.js +1 -1
  69. package/dist/esm/{mg-badge_27.entry.js → mg-badge_29.entry.js} +729 -243
  70. package/dist/esm/mg-components.js +1 -1
  71. package/dist/mg-components/mg-components.css +1 -1
  72. package/dist/mg-components/mg-components.esm.js +1 -1
  73. package/dist/mg-components/p-204af46f.entry.js +1 -0
  74. package/dist/mg-components/variables.css +29 -7
  75. package/dist/types/components/atoms/mg-badge/doc/mg-badge.stories.d.ts +2 -2
  76. package/dist/types/components/atoms/mg-badge/mg-badge.conf.d.ts +5 -5
  77. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +8 -8
  78. package/dist/types/components/atoms/mg-button/mg-button.d.ts +2 -2
  79. package/dist/types/components/atoms/mg-icon/doc/mg-icon.stories.d.ts +2 -2
  80. package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +10 -2
  81. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +7 -6
  82. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +10 -8
  83. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +3 -8
  84. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +3 -8
  85. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +4 -3
  86. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +4 -2
  87. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +4 -3
  88. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +5 -4
  89. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +4 -3
  90. package/dist/types/components/molecules/menu/mg-menu/doc/mg-menu.stories.d.ts +17 -0
  91. package/dist/types/components/molecules/menu/mg-menu/mg-menu.conf.d.ts +7 -0
  92. package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +69 -0
  93. package/dist/types/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.d.ts +11 -0
  94. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.conf.d.ts +24 -0
  95. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +119 -0
  96. package/dist/types/components/molecules/mg-form/mg-form.d.ts +21 -1
  97. package/dist/types/components/molecules/mg-message/mg-message.d.ts +3 -0
  98. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +3 -0
  99. package/dist/types/components/molecules/mg-tabs/doc/mg-tabs.stories.d.ts +1 -1
  100. package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +12 -4
  101. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +6 -6
  102. package/dist/types/components.d.ts +91 -14
  103. package/dist/types/locales/index.d.ts +7 -1
  104. package/dist/types/stories/icons.stories.d.ts +1 -1
  105. package/package.json +7 -8
  106. package/dist/collection/utils/test.utils.js +0 -38
  107. package/dist/mg-components/p-e131701a.entry.js +0 -1
  108. package/dist/types/utils/test.utils.d.ts +0 -17
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["mg-badge_27.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-card"],[1,"mg-divider",{"size":[1]}],[1,"mg-form",{"identifier":[1],"name":[1],"readonly":[4],"disabled":[4],"valid":[1028],"invalid":[1028],"classList":[32],"displayError":[64]}],[1,"mg-illustrated-message",{"size":[1],"direction":[1]}],[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_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],"classList":[32],"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],"classList":[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);
19
19
  });
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "entries": [
3
3
  "./components/atoms/mg-badge/mg-badge.js",
4
+ "./components/atoms/mg-icon/mg-icon.js",
4
5
  "./components/atoms/mg-button/mg-button.js",
5
6
  "./components/atoms/mg-card/mg-card.js",
6
7
  "./components/atoms/mg-character-left/mg-character-left.js",
7
8
  "./components/atoms/mg-divider/mg-divider.js",
8
- "./components/atoms/mg-icon/mg-icon.js",
9
9
  "./components/atoms/mg-input-title/mg-input-title.js",
10
10
  "./components/atoms/mg-tag/mg-tag.js",
11
11
  "./components/atoms/mg-tooltip/mg-tooltip.js",
@@ -18,6 +18,8 @@
18
18
  "./components/molecules/inputs/mg-input-text/mg-input-text.js",
19
19
  "./components/molecules/inputs/mg-input-textarea/mg-input-textarea.js",
20
20
  "./components/molecules/inputs/mg-input-toggle/mg-input-toggle.js",
21
+ "./components/molecules/menu/mg-menu/mg-menu.js",
22
+ "./components/molecules/menu/mg-menu-item/mg-menu-item.js",
21
23
  "./components/molecules/mg-details/mg-details.js",
22
24
  "./components/molecules/mg-form/mg-form.js",
23
25
  "./components/molecules/mg-illustrated-message/mg-illustrated-message.js",
@@ -6,7 +6,7 @@ export class MgBadge {
6
6
  /************
7
7
  * Internal *
8
8
  ************/
9
- // classes
9
+ // Classes
10
10
  this.classOutline = `mg-badge--outline`;
11
11
  /**
12
12
  * Define button variant
@@ -81,14 +81,9 @@ export class MgBadge {
81
81
  "type": "any",
82
82
  "mutable": true,
83
83
  "complexType": {
84
- "original": "BadgeType['value']",
84
+ "original": "string | number",
85
85
  "resolved": "number | string",
86
- "references": {
87
- "BadgeType": {
88
- "location": "import",
89
- "path": "./mg-badge.conf"
90
- }
91
- }
86
+ "references": {}
92
87
  },
93
88
  "required": true,
94
89
  "optional": false,
@@ -103,14 +98,9 @@ export class MgBadge {
103
98
  "type": "string",
104
99
  "mutable": false,
105
100
  "complexType": {
106
- "original": "BadgeType['label']",
101
+ "original": "string",
107
102
  "resolved": "string",
108
- "references": {
109
- "BadgeType": {
110
- "location": "import",
111
- "path": "./mg-badge.conf"
112
- }
113
- }
103
+ "references": {}
114
104
  },
115
105
  "required": true,
116
106
  "optional": false,
@@ -125,12 +115,17 @@ export class MgBadge {
125
115
  "type": "string",
126
116
  "mutable": false,
127
117
  "complexType": {
128
- "original": "string",
129
- "resolved": "string",
130
- "references": {}
118
+ "original": "BadgeVariantType",
119
+ "resolved": "\"danger\" | \"info\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"",
120
+ "references": {
121
+ "BadgeVariantType": {
122
+ "location": "import",
123
+ "path": "./mg-badge.conf"
124
+ }
125
+ }
131
126
  },
132
127
  "required": false,
133
- "optional": false,
128
+ "optional": true,
134
129
  "docs": {
135
130
  "tags": [],
136
131
  "text": "Define button variant"
@@ -54,7 +54,7 @@ export class MgButton {
54
54
  }
55
55
  };
56
56
  /**
57
- * Handle onKeyDown event
57
+ * Handle onKeydown event
58
58
  *
59
59
  * @param {KeyboardEvent} event keyboard event
60
60
  * @returns {void}
@@ -69,7 +69,7 @@ export class MgButton {
69
69
  }
70
70
  };
71
71
  /**
72
- * Handle onKeyUp event
72
+ * Handle onKeyup event
73
73
  *
74
74
  * @param {KeyboardEvent} event keyboard event
75
75
  * @returns {void}
@@ -152,7 +152,7 @@ export class MgButton {
152
152
  * @returns {HTMLElement} html element
153
153
  */
154
154
  render() {
155
- return (h(Host, { role: "button", tabIndex: this.disabled ? -1 : 0, type: this.type, form: this.form, "full-width": this.fullWidth, "aria-label": this.label, "aria-disabled": this.disabled !== undefined && this.disabled.toString(), onClick: this.handleClick, onKeyUp: this.handleKeyup, onKeyDown: this.handleKeydown }, h("div", { class: this.classList.join(), id: this.identifier }, this.loading && h("mg-icon", { icon: "loader", spin: true }), h("div", { class: "mg-button__content" }, h("slot", null)))));
155
+ return (h(Host, { role: "button", tabIndex: this.disabled ? -1 : 0, type: this.type, form: this.form, "full-width": this.fullWidth, "aria-label": this.label, "aria-disabled": this.disabled !== undefined && this.disabled.toString(), onClick: this.handleClick, onKeyup: this.handleKeyup, onKeydown: this.handleKeydown }, h("div", { class: this.classList.join(), id: this.identifier }, this.loading && h("mg-icon", { icon: "loader", spin: true }), h("div", { class: "mg-button__content" }, h("slot", null)))));
156
156
  }
157
157
  static get is() { return "mg-button"; }
158
158
  static get encapsulation() { return "shadow"; }
@@ -117,9 +117,14 @@ export class MgIcon {
117
117
  "type": "string",
118
118
  "mutable": false,
119
119
  "complexType": {
120
- "original": "string",
121
- "resolved": "string",
122
- "references": {}
120
+ "original": "IconSizeType",
121
+ "resolved": "\"extra-large\" | \"large\" | \"regular\" | \"small\"",
122
+ "references": {
123
+ "IconSizeType": {
124
+ "location": "import",
125
+ "path": "./mg-icon.conf"
126
+ }
127
+ }
123
128
  },
124
129
  "required": false,
125
130
  "optional": false,
@@ -135,12 +140,17 @@ export class MgIcon {
135
140
  "type": "string",
136
141
  "mutable": false,
137
142
  "complexType": {
138
- "original": "string",
139
- "resolved": "string",
140
- "references": {}
143
+ "original": "IconVariantType",
144
+ "resolved": "\"danger\" | \"info\" | \"success\" | \"warning\"",
145
+ "references": {
146
+ "IconVariantType": {
147
+ "location": "import",
148
+ "path": "./mg-icon.conf"
149
+ }
150
+ }
141
151
  },
142
152
  "required": false,
143
- "optional": false,
153
+ "optional": true,
144
154
  "docs": {
145
155
  "tags": [],
146
156
  "text": "Define icon variant\nAdd a background to the icon based on variant color"
@@ -6,7 +6,7 @@ export class MgTag {
6
6
  /************
7
7
  * Internal *
8
8
  ************/
9
- // classes
9
+ // Classes
10
10
  this.classOutline = `mg-tag--outline`;
11
11
  /**************
12
12
  * Decorators *
@@ -76,15 +76,6 @@ export const MgInput = (props, children, utils) => {
76
76
  if (typeof props.errorMessage === 'string' && props.errorMessage !== '') {
77
77
  ariaDescribedbyIDs.add(helpTextErrorId);
78
78
  }
79
- /**
80
- * Update input(s) in children
81
- */
82
- if (props.readonly) {
83
- children = children.filter(child => child.$name$ === 'append-input');
84
- }
85
- else {
86
- children = applyAriadescribedBy(children, ariaDescribedbyIDs, utils);
87
- }
88
79
  /**
89
80
  * Return template
90
81
  *
@@ -109,9 +100,10 @@ export const MgInput = (props, children, utils) => {
109
100
  const getTooltip = () => (h("mg-tooltip", { identifier: `${props.identifier}-tooltip`, message: props.tooltip }, h("mg-icon", { icon: "info-circle" })));
110
101
  /**
111
102
  * Get input title (label) node
103
+ * Display asterisk only if not disabled and not readonly
112
104
  *
113
105
  * @returns {VNode[]} mg-input-title
114
106
  */
115
- const getInputTitle = () => (h("mg-input-title", { identifier: props.identifier, class: props.labelHide ? 'sr-only' : undefined, required: props.required && !props.disabled, "is-legend": props.isFieldset }, props.label));
116
- return (h(TagName, { class: props.classList.join() }, props.labelOnTop ? (h("div", { class: "mg-input__title" }, getInputTitle(), !props.readonly && props.tooltip && getTooltip())) : (getInputTitle()), props.readonly ? (h("div", { class: "mg-input__input-container" }, h("strong", null, props.readonlyValue || props.value), children)) : (h("div", { class: "mg-input__input-container" }, h("div", { class: { 'mg-input__input': true, 'mg-input__input--has-error': props.errorMessage !== undefined } }, children, !props.labelOnTop && props.tooltip && getTooltip()), props.helpText && h("div", { id: helpTextId, class: "mg-input__help-text", innerHTML: props.helpText }), props.errorMessage && !props.readonly && !props.disabled && (h("div", { id: helpTextErrorId, class: "mg-input__error", innerHTML: props.errorMessage, "aria-live": "assertive" }))))));
107
+ const getInputTitle = () => (h("mg-input-title", { identifier: props.identifier, class: props.labelHide ? 'sr-only' : undefined, required: props.required && !props.disabled && !props.readonly, "is-legend": props.isFieldset }, props.label));
108
+ return (h(TagName, { class: props.classList.join() }, props.labelOnTop ? (h("div", { class: "mg-input__title" }, getInputTitle(), !props.readonly && props.tooltip && getTooltip())) : (getInputTitle()), props.readonly ? (h("div", { class: "mg-input__input-container" }, h("strong", null, props.readonlyValue || props.value), children.filter(child => child.$name$ === 'append-input'))) : (h("div", { class: "mg-input__input-container" }, h("div", { class: { 'mg-input__input': true, 'mg-input__input--has-error': props.errorMessage !== undefined } }, applyAriadescribedBy(children, ariaDescribedbyIDs, utils), !props.labelOnTop && props.tooltip && getTooltip()), props.helpText && h("div", { id: helpTextId, class: "mg-input__help-text", innerHTML: props.helpText }), props.errorMessage && !props.readonly && !props.disabled && (h("div", { id: helpTextErrorId, class: "mg-input__error", innerHTML: props.errorMessage, "aria-live": "assertive" }))))));
117
109
  };
@@ -16,6 +16,8 @@ export class MgInputCheckbox {
16
16
  ************/
17
17
  // HTML selector
18
18
  this.inputs = [];
19
+ // hasDisplayedError (triggered by blur event)
20
+ this.hasDisplayedError = false;
19
21
  /**
20
22
  * Input name
21
23
  * If not set the value equals the identifier
@@ -70,25 +72,27 @@ export class MgInputCheckbox {
70
72
  this.handleBlur = () => {
71
73
  // Check validity
72
74
  this.checkValidity();
73
- this.checkError();
75
+ this.setErrorMessage();
74
76
  };
77
+ /**
78
+ * get invalid element
79
+ *
80
+ * @returns {HTMLInputElement} element
81
+ */
82
+ this.getInvalidElement = () => this.inputs.find((input) => input !== null && !input.disabled && !input.checkValidity());
75
83
  /**
76
84
  * Check if input is valid
77
85
  */
78
86
  this.checkValidity = () => {
79
- if (!this.readonly) {
80
- const validity = this.getInvalidElement() === undefined;
81
- // Set validity
82
- this.valid = validity;
83
- this.invalid = !validity;
84
- //Send event
85
- this.inputValid.emit(validity);
86
- }
87
+ this.valid = this.readonly || this.disabled || this.getInvalidElement() === undefined;
88
+ this.invalid = !this.valid;
89
+ // We need to send valid event even if it is the same value
90
+ this.inputValid.emit(this.valid);
87
91
  };
88
92
  /**
89
- * Check input errors
93
+ * Set input error message
90
94
  */
91
- this.checkError = () => {
95
+ this.setErrorMessage = () => {
92
96
  const invalidElement = this.getInvalidElement();
93
97
  // Set error message
94
98
  this.errorMessage = undefined;
@@ -96,12 +100,6 @@ export class MgInputCheckbox {
96
100
  this.errorMessage = this.messages.errors.required;
97
101
  }
98
102
  };
99
- /**
100
- * get invalid element
101
- *
102
- * @returns {HTMLInputElement} element
103
- */
104
- this.getInvalidElement = () => this.inputs.find((element) => !element.disabled && !element.checkValidity());
105
103
  }
106
104
  validateValue(newValue) {
107
105
  if (newValue && newValue.every(item => isCheckboxItem(item))) {
@@ -117,6 +115,16 @@ export class MgInputCheckbox {
117
115
  throw new Error('<mg-input-checkbox> prop "value" is required and all values must be the same type, CheckboxItem.');
118
116
  }
119
117
  }
118
+ handleValidityChange(newValue, _oldValue, prop) {
119
+ this.inputs.forEach(input => {
120
+ input[prop] = newValue;
121
+ });
122
+ this.checkValidity();
123
+ if (this.hasDisplayedError) {
124
+ this.setErrorMessage();
125
+ this.hasDisplayedError = false;
126
+ }
127
+ }
120
128
  /**
121
129
  * Public method to display errors
122
130
  *
@@ -124,7 +132,8 @@ export class MgInputCheckbox {
124
132
  */
125
133
  async displayError() {
126
134
  this.checkValidity();
127
- this.checkError();
135
+ this.setErrorMessage();
136
+ this.hasDisplayedError = this.invalid;
128
137
  }
129
138
  /*************
130
139
  * Lifecycle *
@@ -152,11 +161,14 @@ export class MgInputCheckbox {
152
161
  * @returns {HTMLElement} HTML Element
153
162
  */
154
163
  render() {
155
- return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: undefined, mgWidth: undefined, disabled: this.disabled, value: this.value && this.value.toString(), readonlyValue: undefined, tooltip: !this.readonly && this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: true }, h("ul", { class: { 'mg-input__input-group-container': true, 'mg-input__input-group-container--vertical': this.inputVerticalList } }, this.checkboxItems
164
+ return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: !this.readonly ? this.required : undefined, readonly: undefined, mgWidth: undefined, disabled: this.disabled, value: this.value && this.value.toString(), readonlyValue: undefined, tooltip: !this.readonly ? this.tooltip : undefined, helpText: !this.readonly ? this.helpText : undefined, errorMessage: !this.readonly ? this.errorMessage : undefined, isFieldset: true }, h("ul", { class: { 'mg-input__input-group-container': true, 'mg-input__input-group-container--vertical': this.inputVerticalList } }, this.checkboxItems
156
165
  .filter(item => {
157
166
  return !this.readonly || item.value;
158
167
  })
159
- .map(input => (h("li", { class: { 'mg-input__input-group': true, 'mg-input__input-group--disabled': this.disabled || input.disabled } }, h("input", { type: "checkbox", id: input.id, name: this.identifier, value: input.value && input.value.toString(), checked: Boolean(input.value), disabled: this.readonly || this.disabled || input.disabled, required: this.required, indeterminate: input.value === null, onInput: this.handleInput, onBlur: this.handleBlur, ref: el => this.inputs.push(el) }), h("label", { htmlFor: input.id }, input.title)))))));
168
+ .map((input, index) => (h("li", { class: { 'mg-input__input-group': true, 'mg-input__input-group--disabled': this.disabled || input.disabled } }, h("input", { type: "checkbox", id: input.id, name: this.identifier, value: input.value && input.value.toString(), checked: Boolean(input.value), disabled: this.readonly || this.disabled || input.disabled, required: this.required, indeterminate: input.value === null, onInput: this.handleInput, onBlur: this.handleBlur, ref: el => {
169
+ if (el !== null)
170
+ this.inputs[index] = el;
171
+ } }), h("label", { htmlFor: input.id }, input.title)))))));
160
172
  }
161
173
  static get is() { return "mg-input-checkbox"; }
162
174
  static get encapsulation() { return "shadow"; }
@@ -494,6 +506,15 @@ export class MgInputCheckbox {
494
506
  return [{
495
507
  "propName": "value",
496
508
  "methodName": "validateValue"
509
+ }, {
510
+ "propName": "required",
511
+ "methodName": "handleValidityChange"
512
+ }, {
513
+ "propName": "readonly",
514
+ "methodName": "handleValidityChange"
515
+ }, {
516
+ "propName": "disabled",
517
+ "methodName": "handleValidityChange"
497
518
  }];
498
519
  }
499
520
  }
@@ -6,8 +6,8 @@ import { localeDate, dateRegExp } from '../../../../utils/locale.utils';
6
6
  import { initLocales } from '../../../../locales';
7
7
  export class MgInputDate {
8
8
  constructor() {
9
- // hasError (triggered by blur event)
10
- this.hasError = false;
9
+ // hasDisplayedError (triggered by blur event)
10
+ this.hasDisplayedError = false;
11
11
  /**
12
12
  * Input name
13
13
  * If not set the value equals the identifier
@@ -38,8 +38,8 @@ export class MgInputDate {
38
38
  */
39
39
  this.handleInput = () => {
40
40
  this.checkValidity();
41
- if (this.hasError) {
42
- this.checkError();
41
+ if (this.hasDisplayedError) {
42
+ this.setErrorMessage();
43
43
  }
44
44
  this.value = this.input.value;
45
45
  };
@@ -53,14 +53,11 @@ export class MgInputDate {
53
53
  * Check if input is valid
54
54
  */
55
55
  this.checkValidity = () => {
56
- if (!this.readonly && this.input !== undefined) {
57
- const validity = this.input.checkValidity();
58
- // Set validity
59
- this.valid = validity;
60
- this.invalid = !validity;
61
- //Send event
62
- this.inputValid.emit(validity);
63
- }
56
+ var _a;
57
+ this.valid = this.readonly || this.disabled || (((_a = this.input) === null || _a === void 0 ? void 0 : _a.checkValidity) !== undefined ? this.input.checkValidity() : true);
58
+ this.invalid = !this.valid;
59
+ // We need to send valid event even if it is the same value
60
+ this.inputValid.emit(this.valid);
64
61
  };
65
62
  /**
66
63
  * get input error code
@@ -89,48 +86,50 @@ export class MgInputDate {
89
86
  return inputError;
90
87
  };
91
88
  /**
92
- * Set error message
89
+ * Check input errors
93
90
  *
94
91
  * @returns {void}
95
92
  */
96
93
  this.setErrorMessage = () => {
97
94
  var _a;
98
- const inputError = this.getInputError();
99
- // required
100
- if (inputError === InputError.REQUIRED) {
101
- this.errorMessage = this.messages.errors[inputError];
102
- }
103
- // min, max & minMax
104
- else if ([InputError.MIN, InputError.MAX, InputError.MINMAX].includes(inputError)) {
105
- this.errorMessage = this.messages.errors.date[inputError].replace('{min}', localeDate(this.min, this.locale)).replace('{max}', localeDate(this.max, this.locale));
106
- }
107
- // wrong date format
108
- // element.validity.badInput is default error message
109
- else {
110
- this.errorMessage = this.messages.errors.date.badInput.replace('{min}', ((_a = this.min) === null || _a === void 0 ? void 0 : _a.length) > 0 ? localeDate(this.min, this.locale) : localeDate('1900-01-01', this.locale));
111
- }
112
- };
113
- /**
114
- * Check input errors
115
- *
116
- * @returns {void}
117
- */
118
- this.checkError = () => {
119
95
  // Set error message
120
96
  this.errorMessage = undefined;
121
97
  if (!this.valid) {
122
- this.setErrorMessage();
98
+ const inputError = this.getInputError();
99
+ // required
100
+ if (inputError === InputError.REQUIRED) {
101
+ this.errorMessage = this.messages.errors[inputError];
102
+ }
103
+ // min, max & minMax
104
+ else if ([InputError.MIN, InputError.MAX, InputError.MINMAX].includes(inputError)) {
105
+ this.errorMessage = this.messages.errors.date[inputError].replace('{min}', localeDate(this.min, this.locale)).replace('{max}', localeDate(this.max, this.locale));
106
+ }
107
+ // wrong date format
108
+ // element.validity.badInput is default error message
109
+ else {
110
+ this.errorMessage = this.messages.errors.date.badInput.replace('{min}', ((_a = this.min) === null || _a === void 0 ? void 0 : _a.length) > 0 ? localeDate(this.min, this.locale) : localeDate('1900-01-01', this.locale));
111
+ }
123
112
  }
124
113
  };
125
114
  }
126
115
  validateValue(newValue) {
127
- if (newValue !== undefined && (typeof newValue !== 'string' || !dateRegExp.test(newValue))) {
116
+ if (newValue !== undefined && newValue !== null && (typeof newValue !== 'string' || !dateRegExp.test(newValue))) {
128
117
  throw new Error("<mg-input-date> props 'value' doesn't match pattern: yyyy-mm-dd");
129
118
  }
130
119
  else {
131
120
  this.valueChange.emit(this.value);
132
121
  }
133
122
  }
123
+ handleValidityChange(newValue, _oldValue, prop) {
124
+ if (this.input !== undefined) {
125
+ this.input[prop] = newValue;
126
+ this.checkValidity();
127
+ if (this.hasDisplayedError) {
128
+ this.setErrorMessage();
129
+ this.hasDisplayedError = false;
130
+ }
131
+ }
132
+ }
134
133
  validateMinMax(newValue) {
135
134
  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)))) {
136
135
  throw new Error("<mg-input-date> props 'min/max' doesn't match pattern: yyyy-mm-dd");
@@ -143,8 +142,8 @@ export class MgInputDate {
143
142
  */
144
143
  async displayError() {
145
144
  this.checkValidity();
146
- this.checkError();
147
- this.hasError = this.invalid;
145
+ this.setErrorMessage();
146
+ this.hasDisplayedError = this.invalid;
148
147
  }
149
148
  /*************
150
149
  * Lifecycle *
@@ -176,7 +175,10 @@ export class MgInputDate {
176
175
  * @returns {HTMLElement} HTML Element
177
176
  */
178
177
  render() {
179
- return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, mgWidth: undefined, disabled: this.disabled, value: this.value, readonlyValue: localeDate(this.value, this.locale), tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, h("input", { type: "date", class: "mg-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, onInput: this.handleInput, onBlur: this.handleBlur, pattern: "[0-9]{4}-[0-9]{2}-[0-9]{2}", ref: el => (this.input = el) })));
178
+ return (h(MgInput, { identifier: this.identifier, classList: this.classList, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, readonly: this.readonly, mgWidth: undefined, disabled: this.disabled, value: this.value, readonlyValue: localeDate(this.value, this.locale), tooltip: this.tooltip, helpText: this.helpText, errorMessage: this.errorMessage, isFieldset: false }, h("input", { type: "date", class: "mg-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, onInput: this.handleInput, onBlur: this.handleBlur, pattern: "[0-9]{4}-[0-9]{2}-[0-9]{2}", ref: el => {
179
+ if (el !== null)
180
+ this.input = el;
181
+ } })));
180
182
  }
181
183
  static get is() { return "mg-input-date"; }
182
184
  static get encapsulation() { return "shadow"; }
@@ -521,6 +523,15 @@ export class MgInputDate {
521
523
  return [{
522
524
  "propName": "value",
523
525
  "methodName": "validateValue"
526
+ }, {
527
+ "propName": "required",
528
+ "methodName": "handleValidityChange"
529
+ }, {
530
+ "propName": "readonly",
531
+ "methodName": "handleValidityChange"
532
+ }, {
533
+ "propName": "disabled",
534
+ "methodName": "handleValidityChange"
524
535
  }, {
525
536
  "propName": "min",
526
537
  "methodName": "validateMinMax"
@@ -185,21 +185,40 @@
185
185
  .mg-input.mg-input--width-full:not(.mg-input--label-on-top) {
186
186
  justify-content: space-between;
187
187
  }
188
+ .mg-input.mg-input--width-full.mg-input--label-on-top .mg-input__box {
189
+ width: 100%;
190
+ }
188
191
  .mg-input.mg-input--width-full .mg-input__input-container {
189
192
  flex: auto;
190
193
  width: 100%;
191
194
  }
192
195
  .mg-input.mg-input--width-full .mg-input__input-container .mg-input__box {
196
+ max-width: 100%;
197
+ }
198
+ .mg-input:not(.mg-input--label-on-top) .mg-input__box {
199
+ width: 100%;
200
+ max-width: calc(17.7rem + var(--mg-inputs-spacer) * 2);
201
+ min-width: 5rem;
202
+ }
203
+ .mg-input.mg-input--width-16 .mg-input__input-container {
204
+ width: 100%;
205
+ }
206
+ .mg-input.mg-input--width-16 .mg-input__input-container .mg-input__input {
207
+ width: 100%;
208
+ max-width: 21rem;
209
+ }
210
+ .mg-input.mg-input--width-16 .mg-input__input-container .mg-input__with-character-left {
193
211
  width: 100%;
194
212
  }
195
- .mg-input.mg-input--width-16 .mg-input__box {
196
- width: 21rem;
213
+ .mg-input.mg-input--width-16 .mg-input__input-container .mg-input__box {
214
+ max-width: 21rem;
215
+ min-width: 100%;
197
216
  }
198
- .mg-input.mg-input--width-4 .mg-input__box {
199
- width: 7rem;
217
+ .mg-input.mg-input--width-4 .mg-input__input-container .mg-input__box {
218
+ max-width: 7rem;
200
219
  }
201
- .mg-input.mg-input--width-2 .mg-input__box {
202
- width: 5rem;
220
+ .mg-input.mg-input--width-2 .mg-input__input-container .mg-input__box {
221
+ max-width: 5rem;
203
222
  }
204
223
 
205
224
  /**