@mgdis/mg-components 6.23.0 → 6.25.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 (186) hide show
  1. package/dist/cjs/index-Acmyl4hv.js +5 -0
  2. package/dist/cjs/{index-BxB20_Vw.js → index-B6J2EllP.js} +3 -1
  3. package/dist/cjs/{index-BEF-cqV9.js → index-BmFwLEZT.js} +5 -1
  4. package/dist/cjs/{index-CpENFzEo.js → index-DrZECzp6.js} +14 -6
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/mg-action-more_36.cjs.entry.js +394 -260
  7. package/dist/cjs/mg-alert.cjs.entry.js +7 -8
  8. package/dist/cjs/mg-breadcrumb.cjs.entry.js +27 -10
  9. package/dist/cjs/mg-components.cjs.js +2 -2
  10. package/dist/cjs/mg-fieldset.cjs.entry.js +8 -8
  11. package/dist/cjs/mg-illustration.cjs.entry.js +57 -0
  12. package/dist/cjs/mg-input-combobox.cjs.entry.js +46 -28
  13. package/dist/cjs/mg-input-file.cjs.entry.js +12 -11
  14. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +3367 -4140
  15. package/dist/cjs/mg-loader.cjs.entry.js +5 -5
  16. package/dist/cjs/mg-progress.cjs.entry.js +3 -3
  17. package/dist/collection/assets/illustrations/index.js +1 -0
  18. package/dist/collection/collection-manifest.json +1 -0
  19. package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +1 -1
  20. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +1 -1
  21. package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -1
  22. package/dist/collection/components/atoms/mg-button/mg-button.js +4 -1
  23. package/dist/collection/components/atoms/mg-card/mg-card.js +1 -1
  24. package/dist/collection/components/atoms/mg-divider/mg-divider.conf.js +4 -0
  25. package/dist/collection/components/atoms/mg-divider/mg-divider.js +62 -3
  26. package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
  27. package/dist/collection/components/atoms/mg-illustration/mg-illustration.conf.js +1 -0
  28. package/dist/collection/components/atoms/mg-illustration/mg-illustration.js +95 -0
  29. package/dist/collection/components/atoms/mg-tag/mg-tag.js +1 -1
  30. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +1 -1
  31. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +9 -7
  32. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +49 -19
  33. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +5 -2
  34. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +5 -1
  35. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +30 -22
  36. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +75 -30
  37. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +14 -8
  38. package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +8 -7
  39. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +21 -12
  40. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +7 -7
  41. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +15 -10
  42. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js +29 -3
  43. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +260 -7
  44. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +21 -19
  45. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +18 -13
  46. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +7 -7
  47. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +10 -9
  48. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +1 -1
  49. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +7 -5
  50. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +18 -17
  51. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +7 -4
  52. package/dist/collection/components/molecules/mg-alert/mg-alert.js +6 -7
  53. package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +49 -6
  54. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  55. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +6 -6
  56. package/dist/collection/components/molecules/mg-form/mg-form.js +16 -13
  57. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +2 -2
  58. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  59. package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
  60. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  61. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +8 -4
  62. package/dist/collection/components/molecules/mg-panel/mg-panel.js +13 -4
  63. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +2 -2
  64. package/dist/collection/components/molecules/mg-popover/mg-popover.js +29 -37
  65. package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
  66. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +5 -3
  67. package/dist/collection/components/molecules/mg-table/mg-table.js +10 -6
  68. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +12 -9
  69. package/dist/collection/utils/behaviors.utils.js +3 -3
  70. package/dist/collection/utils/playwright.fixture.js +7 -2
  71. package/dist/components/mg-action-more.js +1 -1
  72. package/dist/components/mg-alert.js +1 -1
  73. package/dist/components/mg-badge2.js +1 -1
  74. package/dist/components/mg-breadcrumb.js +1 -1
  75. package/dist/components/mg-button2.js +1 -1
  76. package/dist/components/mg-card2.js +1 -1
  77. package/dist/components/mg-character-left2.js +1 -1
  78. package/dist/components/mg-details.js +1 -1
  79. package/dist/components/mg-divider2.js +1 -1
  80. package/dist/components/mg-fieldset.js +1 -1
  81. package/dist/components/mg-form.js +1 -1
  82. package/dist/components/mg-icon2.js +1 -1
  83. package/dist/components/mg-illustrated-message.js +1 -1
  84. package/dist/components/mg-illustration.d.ts +11 -0
  85. package/dist/components/mg-illustration.js +1 -0
  86. package/dist/components/mg-input-checkbox.js +1 -1
  87. package/dist/components/mg-input-combobox.js +1 -1
  88. package/dist/components/mg-input-date.js +1 -1
  89. package/dist/components/mg-input-file.js +1 -1
  90. package/dist/components/mg-input-numeric.js +1 -1
  91. package/dist/components/mg-input-password.js +1 -1
  92. package/dist/components/mg-input-radio.js +1 -1
  93. package/dist/components/mg-input-rich-text-editor.js +298 -289
  94. package/dist/components/mg-input-select2.js +1 -1
  95. package/dist/components/mg-input-text2.js +1 -1
  96. package/dist/components/mg-input-textarea.js +1 -1
  97. package/dist/components/mg-input-title2.js +1 -1
  98. package/dist/components/mg-input-toggle.js +1 -1
  99. package/dist/components/mg-input2.js +1 -1
  100. package/dist/components/mg-item-more2.js +1 -1
  101. package/dist/components/mg-loader2.js +1 -1
  102. package/dist/components/mg-menu-item2.js +1 -1
  103. package/dist/components/mg-message2.js +1 -1
  104. package/dist/components/mg-modal.js +1 -1
  105. package/dist/components/mg-pagination.js +1 -1
  106. package/dist/components/mg-panel.js +1 -1
  107. package/dist/components/mg-popover-content2.js +1 -1
  108. package/dist/components/mg-popover2.js +1 -1
  109. package/dist/components/mg-progress.js +1 -1
  110. package/dist/components/mg-skip-links.js +1 -1
  111. package/dist/components/mg-table.js +1 -1
  112. package/dist/components/mg-tabs2.js +1 -1
  113. package/dist/components/mg-tag.js +1 -1
  114. package/dist/components/mg-tooltip-content2.js +1 -1
  115. package/dist/components/mg-tooltip2.js +1 -1
  116. package/dist/custom-elements.json +178 -48
  117. package/dist/esm/{index-C7xjtdiw.js → index-91BOpzAB.js} +14 -6
  118. package/dist/esm/{index-DSEloqPn.js → index-BfblyCaJ.js} +3 -1
  119. package/dist/esm/index-Ci9Hv7DG.js +3 -0
  120. package/dist/esm/{index-DshvCiTL.js → index-D4bO_UCn.js} +5 -1
  121. package/dist/esm/loader.js +3 -3
  122. package/dist/esm/mg-action-more_36.entry.js +391 -257
  123. package/dist/esm/mg-alert.entry.js +7 -8
  124. package/dist/esm/mg-breadcrumb.entry.js +27 -10
  125. package/dist/esm/mg-components.js +3 -3
  126. package/dist/esm/mg-fieldset.entry.js +8 -8
  127. package/dist/esm/mg-illustration.entry.js +55 -0
  128. package/dist/esm/mg-input-combobox.entry.js +46 -28
  129. package/dist/esm/mg-input-file.entry.js +12 -11
  130. package/dist/esm/mg-input-rich-text-editor.entry.js +3352 -4125
  131. package/dist/esm/mg-loader.entry.js +5 -5
  132. package/dist/esm/mg-progress.entry.js +3 -3
  133. package/dist/mg-components/mg-components.css +1 -1
  134. package/dist/mg-components/mg-components.esm.js +1 -1
  135. package/dist/mg-components/{p-cdb01923.entry.js → p-3ad7441c.entry.js} +1 -1
  136. package/dist/mg-components/p-413b4536.entry.js +1 -0
  137. package/dist/mg-components/p-4693077a.entry.js +1 -0
  138. package/dist/mg-components/p-5dff879a.entry.js +1 -0
  139. package/dist/mg-components/{p-236bb1d2.entry.js → p-96fc508e.entry.js} +1 -1
  140. package/dist/mg-components/p-Ci9Hv7DG.js +1 -0
  141. package/dist/mg-components/p-D4bO_UCn.js +2 -0
  142. package/dist/mg-components/{p-d0b6d8f5.entry.js → p-ad533d08.entry.js} +1 -1
  143. package/dist/mg-components/p-b20f3698.entry.js +1 -0
  144. package/dist/mg-components/p-d0d12800.entry.js +1 -0
  145. package/dist/mg-components/p-ec4bd337.entry.js +1667 -0
  146. package/dist/mg-components/p-f8e58181.entry.js +1 -0
  147. package/dist/types/assets/illustrations/index.d.ts +21 -0
  148. package/dist/types/components/atoms/mg-divider/mg-divider.conf.d.ts +9 -0
  149. package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +13 -0
  150. package/dist/types/components/atoms/mg-illustration/mg-illustration.conf.d.ts +5 -0
  151. package/dist/types/components/atoms/mg-illustration/mg-illustration.d.ts +24 -0
  152. package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +18 -0
  153. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +1 -1
  154. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +10 -5
  155. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +2 -2
  156. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +2 -2
  157. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +2 -2
  158. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +1 -1
  159. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.d.ts +4 -0
  160. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.d.ts +25 -0
  161. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +61 -2
  162. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +2 -2
  163. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +2 -2
  164. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +2 -2
  165. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +2 -2
  166. package/dist/types/components/molecules/menus/mg-menu-item/mg-menu-item.d.ts +2 -2
  167. package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +2 -2
  168. package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.d.ts +11 -0
  169. package/dist/types/components/molecules/mg-popover/mg-popover-content/mg-popover-content.d.ts +1 -1
  170. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +3 -3
  171. package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +1 -1
  172. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +1 -1
  173. package/dist/types/components.d.ts +145 -40
  174. package/ide/intellij/web-types.json +134 -64
  175. package/ide/vscode/css-custom-data.json +6 -2
  176. package/ide/vscode/html-custom-data.json +190 -32
  177. package/package.json +22 -22
  178. package/dist/mg-components/p-13feb37a.entry.js +0 -1
  179. package/dist/mg-components/p-79265ad3.entry.js +0 -1
  180. package/dist/mg-components/p-7c63e469.entry.js +0 -1
  181. package/dist/mg-components/p-7fd3e519.entry.js +0 -1
  182. package/dist/mg-components/p-DshvCiTL.js +0 -2
  183. package/dist/mg-components/p-a0e2c886.entry.js +0 -1
  184. package/dist/mg-components/p-d698fa67.entry.js +0 -1658
  185. /package/dist/mg-components/{p-C7xjtdiw.js → p-91BOpzAB.js} +0 -0
  186. /package/dist/mg-components/{p-DSEloqPn.js → p-BfblyCaJ.js} +0 -0
@@ -1,17 +1,20 @@
1
- import { r as registerInstance, c as createEvent, h, a as getElement } from './index-DshvCiTL.js';
2
- import { P as Paginate, C as ClassList, t as toString, a as Cursor, n as nextTick, g as getObjectValueFromKey, b as allItemsAreString, i as isValidString, c as isObject, f as formatID, d as Page } from './index-C7xjtdiw.js';
1
+ import { r as registerInstance, c as createEvent, h, a as getElement } from './index-D4bO_UCn.js';
2
+ import { P as Paginate, C as ClassList, t as toString, a as Cursor, n as nextTick, g as getObjectValueFromKey, b as allItemsAreString, i as isValidString, c as isObject, f as formatID, d as Page } from './index-91BOpzAB.js';
3
3
  import { c as classReadonly, a as classDisabled, w as widths, n as normalizeBooleanAttributes } from './mg-input.conf-DOi9lJXy.js';
4
- import { i as initLocales } from './index-DSEloqPn.js';
4
+ import { i as initLocales } from './index-BfblyCaJ.js';
5
5
  import { K as Keys } from './events.utils-yMGqY8YG.js';
6
6
 
7
- const mgInputComboboxCss = () => `.mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left:0;--mg-c-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right:0;--mg-c-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right:var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right:var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-c-input__popover-info{padding:var(--mg-b-size-8);margin:0;color:var(--mg-b-color-neutral-90);text-align:center}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-full .mg-c-input__input-group-container{width:100%;flex-grow:1}.mg-c-input.mg-c-input--width-2.mg-c-input--display-character-left .mg-c-input__input-group-container,.mg-c-input.mg-c-input--width-4.mg-c-input--display-character-left .mg-c-input__input-group-container,.mg-c-input.mg-c-input--width-16.mg-c-input--display-character-left .mg-c-input__input-group-container{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2.mg-c-input--text.mg-c-input--display-character-left .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4.mg-c-input--text.mg-c-input--display-character-left .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16.mg-c-input--text.mg-c-input--display-character-left .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}a{color:inherit;text-decoration:underline}a:hover,a:focus,a:active{text-decoration:none}.mg-c-input.mg-c-input--combobox mg-popover{--mg-c-popover-overflow:auto;--mg-c-popover-spacing-vertical:0;--mg-c-popover-spacing-horizontal:0;--mg-c-popover-min-width:var(--mg-c-input-list-width);--mg-c-popover-max-height:calc(50 * var(--mg-b-size-8) - var(--mg-b-size-32))}.mg-c-input.mg-c-input--combobox .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--combobox .mg-c-input__box{cursor:pointer}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-container{display:flex;flex-direction:column;gap:var(--mg-b-size-4)}.mg-c-input.mg-c-input--combobox .mg-c-input__load-more{padding:0 var(--mg-b-size-8) var(--mg-b-size-4)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list{padding:0;margin:0;cursor:pointer;list-style:none}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item{display:flex;padding:var(--mg-b-size-8)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item:hover,.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--focus-visible{background-color:var(--mg-b-color-neutral-20)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected{font-weight:700}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected mg-icon{margin-left:auto}.mg-c-input.mg-c-input--combobox.mg-c-input--width-2 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-24) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-4 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-48) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-16 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + calc(23 * var(--mg-b-size-8)) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full mg-popover{--mg-c-popover-max-width:var(--mg-c-input-list-width, var(--mg-c-popover-max-width))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__input-group-container{display:flex;width:100%}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__box{flex:1}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box{padding-right:calc(var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box-append{position:absolute;top:0;right:0}`;
7
+ const mgInputComboboxCss = () => `.mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left:0;--mg-c-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:calc(-1*var(--mg-b-size-2));outline-style:solid;outline-width:var(--mg-b-size-2)}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right:0;--mg-c-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right:var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right:var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-c-input__popover-info{padding:var(--mg-b-size-8);margin:0;color:var(--mg-b-color-neutral-90);text-align:center}.mg-c-input__input-container{width:100%;flex:1 auto}.mg-c-input.mg-c-input--width-full .mg-c-input__box{width:100%}.mg-c-input.mg-c-input--width-full .mg-c-input__input-group-container{width:100%;flex-grow:1}.mg-c-input.mg-c-input--width-2.mg-c-input--display-character-left .mg-c-input__input-group-container,.mg-c-input.mg-c-input--width-4.mg-c-input--display-character-left .mg-c-input__input-group-container,.mg-c-input.mg-c-input--width-16.mg-c-input--display-character-left .mg-c-input__input-group-container{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__box{width:var(--mg-b-size-48)}.mg-c-input.mg-c-input--width-2.mg-c-input--text.mg-c-input--display-character-left .mg-c-input__box{width:calc(var(--mg-b-size-48) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-4 .mg-c-input__box{width:var(--mg-b-size-72)}.mg-c-input.mg-c-input--width-4.mg-c-input--text.mg-c-input--display-character-left .mg-c-input__box{width:calc(var(--mg-b-size-72) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-16 .mg-c-input__box{width:calc(26*var(--mg-b-size-8))}.mg-c-input.mg-c-input--width-16.mg-c-input--text.mg-c-input--display-character-left .mg-c-input__box{width:calc(calc(26 * var(--mg-b-size-8)) + var(--mg-c-character-left-message-length)*(.35ch + .3rem))}.mg-c-input.mg-c-input--width-full:not(.mg-c-input--label-on-top){justify-content:stretch}.mg-c-input.mg-c-input--is-input-group-append ::slotted([slot=append-input]),.mg-c-input.mg-c-input--is-append-input-slot-content ::slotted([slot=append-input]){width:auto}:host(.mg-c-input.mg-c-input--width-full) ::slotted(*:not(mg-input-title)){width:100%;max-width:100%}.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip-path:inset(50%) !important;white-space:nowrap !important}.mg-u-visually-hidden *{overflow:hidden !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}a{color:inherit;text-decoration:underline}a:has(mg-icon){display:inline-flex;align-items:center;gap:var(--mg-b-size-4)}a:hover,a:focus,a:active{text-decoration:none}.mg-c-input.mg-c-input--combobox mg-popover{--mg-c-popover-overflow:auto;--mg-c-popover-spacing-vertical:0;--mg-c-popover-spacing-horizontal:0;--mg-c-popover-min-width:var(--mg-c-input-list-width);--mg-c-popover-max-height:calc(50 * var(--mg-b-size-8) - var(--mg-b-size-32))}.mg-c-input.mg-c-input--combobox .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--combobox .mg-c-input__box{cursor:pointer}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-container{display:flex;flex-direction:column;gap:var(--mg-b-size-4)}.mg-c-input.mg-c-input--combobox .mg-c-input__load-more{padding:0 var(--mg-b-size-8) var(--mg-b-size-4)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list{padding:0;margin:0;cursor:pointer;list-style:none}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item{display:flex;padding:var(--mg-b-size-8)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item:hover,.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--focus-visible{background-color:var(--mg-b-color-neutral-20)}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected{font-weight:700}.mg-c-input.mg-c-input--combobox .mg-c-input__input-list-item.mg-c-input__input-list-item--selected mg-icon{margin-left:auto}.mg-c-input.mg-c-input--combobox.mg-c-input--width-2 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-24) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-4 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + var(--mg-b-size-48) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-16 .mg-c-input__box{width:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2 + calc(23 * var(--mg-b-size-8)) + var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full mg-popover{--mg-c-popover-max-width:var(--mg-c-input-list-width, var(--mg-c-popover-max-width))}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__input-group-container{display:flex;width:100%}.mg-c-input.mg-c-input--combobox.mg-c-input--width-full .mg-c-input__box{flex:1}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box{padding-right:calc(var(--mg-b-size-min-height) + var(--mg-b-size-4))}.mg-c-input.mg-c-input--combobox.mg-c-input--input-append .mg-c-input__box-append{position:absolute;top:0;right:0}`;
8
8
 
9
9
  /**
10
10
  * Check if object is an item
11
11
  * @param item - object to check
12
12
  * @returns True if object is an item
13
13
  */
14
- const isItem = (item) => item && typeof item === 'object' && typeof item.title === 'string' && item.value !== undefined;
14
+ const isItem = (item) => item &&
15
+ typeof item === 'object' &&
16
+ typeof item.title === 'string' &&
17
+ item.value !== undefined;
15
18
  /**
16
19
  * Check if objects are items
17
20
  * @param items - items to check
@@ -27,9 +30,10 @@ const isFetchmappings = (value) => {
27
30
  const isValidRoot = isObject(value) && Object.hasOwn(value, 'request') && Object.hasOwn(value, 'response');
28
31
  if (isValidRoot) {
29
32
  const { request, response } = value;
30
- if ([request, response].some(property => !isObject(property)))
33
+ if ([request, response].some((property) => !isObject(property)))
31
34
  return false;
32
- const isValidRequest = typeof request.filter === 'string' && (request.filterTransform === undefined || typeof request.filterTransform === 'function');
35
+ const isValidRequest = typeof request.filter === 'string' &&
36
+ (request.filterTransform === undefined || typeof request.filterTransform === 'function');
33
37
  const isValidResponse = typeof response === 'object' &&
34
38
  typeof response.total === 'string' &&
35
39
  typeof response.items === 'string' &&
@@ -82,6 +86,10 @@ const MgInputCombobox = class {
82
86
  * Define input width
83
87
  */
84
88
  this.mgWidth = 'full';
89
+ /**
90
+ * Define the popover placement
91
+ */
92
+ this.popoverPlacement = 'bottom-start';
85
93
  /**
86
94
  * Define tooltip position
87
95
  */
@@ -97,7 +105,11 @@ const MgInputCombobox = class {
97
105
  /**
98
106
  * Component classes
99
107
  */
100
- this.classCollection = new ClassList(['mg-c-input--combobox', 'mg-c-input--has-icon', 'mg-c-input--input-append']);
108
+ this.classCollection = new ClassList([
109
+ 'mg-c-input--combobox',
110
+ 'mg-c-input--has-icon',
111
+ 'mg-c-input--input-append',
112
+ ]);
101
113
  /**
102
114
  * Popover display state
103
115
  */
@@ -107,7 +119,7 @@ const MgInputCombobox = class {
107
119
  * @param event - option element click event
108
120
  */
109
121
  this.handleOptionClick = (event) => {
110
- this.setValue(this.options.items.find(option => toString(option.value) === event.target.dataset.value));
122
+ this.setValue(this.options.items.find((option) => toString(option.value) === event.target.dataset.value));
111
123
  this.popoverDisplay = false;
112
124
  };
113
125
  /**
@@ -302,7 +314,8 @@ const MgInputCombobox = class {
302
314
  var _a;
303
315
  if (!this.popoverDisplay)
304
316
  return;
305
- (_a = this.element.shadowRoot.querySelector(`li:nth-of-type(${(index || 0) + this.page.baseIndex})`)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ block: 'nearest' });
317
+ (_a = this.element.shadowRoot
318
+ .querySelector(`li:nth-of-type(${(index || 0) + this.page.baseIndex})`)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ block: 'nearest' });
306
319
  });
307
320
  };
308
321
  /**
@@ -351,7 +364,7 @@ const MgInputCombobox = class {
351
364
  * Get first page with filter applied
352
365
  * @returns first page with filter applied
353
366
  */
354
- this.getFirstPage = () => this.options.getPage(0, option => this.filter === '' || option.title.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase()));
367
+ this.getFirstPage = () => this.options.getPage(0, (option) => this.filter === '' || option.title.toLocaleLowerCase().includes(this.filter.toLocaleLowerCase()));
355
368
  /**
356
369
  * Loading wrapper with a given action
357
370
  * @param action - wrapped loading action
@@ -365,7 +378,7 @@ const MgInputCombobox = class {
365
378
  (_a = this.loadingAction) !== null && _a !== void 0 ? _a : (this.loadingAction = action.name);
366
379
  // update index
367
380
  if (Boolean(this.option) && this.loadingAction !== 'load-more') {
368
- index = this.page.items.findIndex(option => toString(option.value) === toString(this.option.value));
381
+ index = this.page.items.findIndex((option) => toString(option.value) === toString(this.option.value));
369
382
  }
370
383
  else if (this.loadingAction === 'load-more') {
371
384
  index = this.page.items.length - this.page.baseIndex;
@@ -395,7 +408,9 @@ const MgInputCombobox = class {
395
408
  return promise()
396
409
  .then(() => {
397
410
  // parse full items list from options
398
- const options = this.filter === '' ? this.options.items : this.options.items.filter(option => option.title.includes(this.filter));
411
+ const options = this.filter === ''
412
+ ? this.options.items
413
+ : this.options.items.filter((option) => option.title.includes(this.filter));
399
414
  // update visual focus
400
415
  if (action.name !== 'load-data') {
401
416
  index = this.page.getIndexFromCursor(action.cursor, this.loadingAction === 'load-more' && index >= 0 ? options[index] : this.option);
@@ -419,7 +434,7 @@ const MgInputCombobox = class {
419
434
  this.goToNextPage = () => {
420
435
  this.showMore.emit();
421
436
  if (this.fetchurl !== undefined) {
422
- return this.getOptions(typeof this.page.next === 'string' ? this.page.next : undefined).then(nextPage => {
437
+ return this.getOptions(typeof this.page.next === 'string' ? this.page.next : undefined).then((nextPage) => {
423
438
  if (nextPage !== undefined) {
424
439
  // merge items from current page and next page
425
440
  const items = [...this.page.items, ...nextPage.items];
@@ -443,7 +458,7 @@ const MgInputCombobox = class {
443
458
  */
444
459
  this.updatePage = async () => {
445
460
  if (this.fetchurl !== undefined) {
446
- return this.getOptions().then(page => {
461
+ return this.getOptions().then((page) => {
447
462
  if (page !== undefined) {
448
463
  // reset current options pagination from API response
449
464
  this.options = new Paginate(page.items, { total: page.total, next: page.next, top: page.top });
@@ -461,7 +476,9 @@ const MgInputCombobox = class {
461
476
  */
462
477
  this.getOptions = async (url = this.fetchurl) => {
463
478
  // add text filter to url
464
- const filter = typeof this.fetchmappings.request.filterTransform === 'function' ? this.fetchmappings.request.filterTransform(this.filter) : this.filter;
479
+ const filter = typeof this.fetchmappings.request.filterTransform === 'function'
480
+ ? this.fetchmappings.request.filterTransform(this.filter)
481
+ : this.filter;
465
482
  const updateUrl = (typeof url === 'string' ? url : url.toString()).replaceAll(this.fetchmappings.request.filter, encodeURIComponent(filter));
466
483
  try {
467
484
  const response = await fetch(updateUrl, this.fetchoptions);
@@ -479,11 +496,12 @@ const MgInputCombobox = class {
479
496
  });
480
497
  const total = Number(getObjectValueFromKey(json, this.fetchmappings.response.total, 0));
481
498
  let next = getObjectValueFromKey(json, this.fetchmappings.response.next);
482
- if (URL.canParse(updateUrl) && Boolean(next) && !URL.canParse(next)) {
483
- const previousUrl = new URL(updateUrl);
484
- if (previousUrl.pathname.endsWith(next.split('?')[0])) {
485
- next = new URL(next, previousUrl).toString();
486
- }
499
+ if (Boolean(next) && !URL.canParse(next)) {
500
+ // `next` is a relative link returned by the API: resolve it against the request URL (RFC 3986).
501
+ // The request URL is first made absolute against the document base so a root-relative `fetchurl`
502
+ // resolves the next page on the API path, not against the document location (which would 404).
503
+ const requestUrl = new URL(updateUrl, this.element.ownerDocument.baseURI);
504
+ next = new URL(next, requestUrl).toString();
487
505
  }
488
506
  return { items, total, next, top: items.length };
489
507
  }
@@ -510,7 +528,7 @@ const MgInputCombobox = class {
510
528
  }
511
529
  // String array
512
530
  else if (allItemsAreString(newValue)) {
513
- this.options = new Paginate(newValue.map(item => ({ title: item, value: item })), { total: newValue.length });
531
+ this.options = new Paginate(newValue.map((item) => ({ title: item, value: item })), { total: newValue.length });
514
532
  }
515
533
  // Object array
516
534
  else if (isItems(newValue)) {
@@ -552,7 +570,7 @@ const MgInputCombobox = class {
552
570
  }
553
571
  watchMgWidth(newValue) {
554
572
  // reset width class
555
- widths.forEach(width => {
573
+ widths.forEach((width) => {
556
574
  this.classCollection.delete(`mg-c-input--width-${width}`);
557
575
  });
558
576
  // apply new width
@@ -618,7 +636,7 @@ const MgInputCombobox = class {
618
636
  // - Async operations are completed
619
637
  // - No timing issues with Stencil's render cycle
620
638
  // - Keep everything in sync both inside and outside the component
621
- return new Promise(resolve => {
639
+ return new Promise((resolve) => {
622
640
  requestAnimationFrame(() => {
623
641
  this.checkValidity();
624
642
  this.setErrorMessage();
@@ -667,7 +685,7 @@ const MgInputCombobox = class {
667
685
  // - Async operations are completed
668
686
  // - No timing issues with Stencil's render cycle
669
687
  // - Keep everything in sync both inside and outside the component
670
- return new Promise(resolve => {
688
+ return new Promise((resolve) => {
671
689
  requestAnimationFrame(() => {
672
690
  // unlock validity check by reseting customErrorMessage
673
691
  this.customErrorMessage = { lock: false };
@@ -768,14 +786,14 @@ const MgInputCombobox = class {
768
786
  else {
769
787
  activeDescendant = (_e = this.value) === null || _e === void 0 ? void 0 : _e.value;
770
788
  }
771
- return (h("mg-input", { key: '3f9b79e5c34d691589c16d0955883109501b86fc', label: this.label, identifier: this.identifier, class: this.classCollection.classes.join(' '), ariaDescribedbyIDs: popoverContent && popoverContent !== 'list' ? popoverContent : undefined, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, readonlyValue)) : (h("mg-popover", { identifier: this.popoverId, placement: "bottom-start", display: this.popoverDisplay, "arrow-hide": true, style: {
789
+ return (h("mg-input", { key: 'c8cff9468c9bfdcc6dd5c96c1452ad81620e050c', label: this.label, identifier: this.identifier, class: this.classCollection.classes.join(' '), ariaDescribedbyIDs: popoverContent && popoverContent !== 'list' ? popoverContent : undefined, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, readonlyValue)) : (h("mg-popover", { identifier: this.popoverId, placement: this.popoverPlacement, display: this.popoverDisplay, style: {
772
790
  '--mg-c-input-list-width': ((_f = this.input) === null || _f === void 0 ? void 0 : _f.offsetWidth) > 0 ? `${this.input.offsetWidth}px` : undefined,
773
791
  }, "data-fallback-placement": "bottom-end", "onDisplay-change": this.handlePopoverDisplay }, h("div", { class: "mg-c-input__input-group-container" }, h("mg-icon", { icon: "magnifying-glass" }), h("input", { type: "text", role: "combobox", class: "mg-c-input__box mg-c-input__box--width", value: this.filter, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, autocomplete: "off", "aria-autocomplete": "list", "aria-expanded": this.popoverDisplay.toString(), "aria-controls": listId, "aria-invalid": (this.invalid === true).toString(), "aria-activedescendant": formatID(activeDescendant), onInput: this.handleFilterInput, onBlur: this.handleFilterBlur, onFocus: this.handleFilterFocus, onKeyDown: this.handleFilterKeydown, ref: (el) => {
774
792
  if (el !== null)
775
793
  this.input = el;
776
794
  } }), withResetButton ? (h("mg-button", { class: "mg-c-input__box-append mg-c-input__reset", variant: "flat", "is-icon": true, label: this.messages.general.reset, "aria-controls": this.identifier, tabindex: "-1", onClick: this.handleResetButton }, h("mg-icon", { icon: "cross" }))) : (h("mg-button", { class: "mg-c-input__box-append", variant: "flat", "is-icon": true, label: this.itemsLabel, tabindex: "-1", disabled: this.disabled }, h("mg-icon", { icon: `chevron-${this.popoverDisplay ? 'up' : 'down'}` })))), h("div", { slot: "content", class: "mg-c-input__popover-container" }, popoverContent === 'list' && [
777
795
  // eslint-disable-next-line jsx-a11y/role-supports-aria-props
778
- h("ul", { key: "list", class: "mg-c-input__input-list", role: "listbox", id: listId, "aria-label": this.itemsLabel, "aria-setsize": this.page.total }, this.page.items.map(option => {
796
+ h("ul", { key: "list", class: "mg-c-input__input-list", role: "listbox", id: listId, "aria-label": this.itemsLabel, "aria-setsize": this.page.total }, this.page.items.map((option) => {
779
797
  var _a;
780
798
  return (
781
799
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events
@@ -785,7 +803,7 @@ const MgInputCombobox = class {
785
803
  'mg-c-input__input-list-item--selected': this.isCurrentOption(option),
786
804
  }, key: option.title, id: formatID(option.value), "aria-selected": this.isCurrentOption(option).toString(), "data-value": toString(option.value), onClick: this.handleOptionClick }, option.title, this.isCurrentOption(option) && h("mg-icon", { icon: "check" })));
787
805
  })),
788
- this.isLoading && h("mg-loader", { key: "loader", message: this.messages.input.combobox.search, class: { 'mg-u-visually-hidden': Boolean(this.page.next) } }),
806
+ this.isLoading && (h("mg-loader", { key: "loader", message: this.messages.input.combobox.search, class: { 'mg-u-visually-hidden': Boolean(this.page.next) } })),
789
807
  this.page.next && (h("mg-button", { key: "load-more", variant: "flat", class: "mg-c-input__load-more", tabIndex: -1, disabled: this.isLoading, "full-width": true, "disable-on-click": true, onClick: this.handleLoadMoreButton, "aria-controls": listId, ref: (el) => {
790
808
  if (el !== null)
791
809
  this.loadMoreElement = el;
@@ -1,12 +1,13 @@
1
- import { r as registerInstance, c as createEvent, h, a as getElement } from './index-DshvCiTL.js';
2
- import { C as ClassList, b as allItemsAreString, t as toString, i as isValidString, c as isObject } from './index-C7xjtdiw.js';
1
+ import { r as registerInstance, c as createEvent, h, a as getElement } from './index-D4bO_UCn.js';
2
+ import { C as ClassList, b as allItemsAreString, t as toString, i as isValidString, c as isObject } from './index-91BOpzAB.js';
3
3
  import { a as classDisabled, n as normalizeBooleanAttributes } from './mg-input.conf-DOi9lJXy.js';
4
- import { l as localeByte, i as initLocales } from './index-DSEloqPn.js';
4
+ import { l as localeByte, i as initLocales } from './index-BfblyCaJ.js';
5
5
 
6
- const mgInputFileCss = () => `.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left:0;--mg-c-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:-0.2rem;outline-style:solid;outline-width:.2rem}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right:0;--mg-c-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right:var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right:var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input__file-container{display:flex;flex-direction:column;gap:var(--mg-b-size-8)}.mg-c-input__file-item{display:inline-flex;min-height:var(--mg-b-size-min-height);align-items:center;padding-left:var(--mg-b-size-8);background-color:var(--mg-b-color-neutral-10);font-weight:600;gap:var(--mg-b-size-8)}.mg-c-input__file-item-name{word-break:break-all}.mg-c-input__file-item-size{color:var(--mg-b-color-neutral-90);font-weight:400;word-break:normal}.mg-c-input__file-delete-button{align-self:flex-start}.mg-c-input__file-list{display:flex;flex-direction:column;padding:0;margin:0;gap:var(--mg-b-size-4);list-style:none}.mg-c-input__file-list .mg-c-input__file-item{min-height:unset;padding:var(--mg-b-size-8)}.mg-c-input__file-list-container{position:relative;padding:var(--mg-b-size-8) calc(var(--mg-b-size-8) + var(--mg-b-size-min-height)) var(--mg-b-size-8) var(--mg-b-size-8);border:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30);border-radius:var(--mg-b-size-4)}.mg-c-input__file-list-container .mg-c-input__file-delete-button{position:absolute;top:0;right:0}`;
6
+ const mgInputFileCss = () => `.mg-c-input__readonly-value{min-height:var(--mg-b-font-size);align-self:flex-start;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);overflow-wrap:anywhere}.mg-c-input__box{height:var(--mg-b-size-min-height);box-sizing:border-box;padding:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2) var(--mg-b-size-8);border-width:var(--mg-c-input-border-width);border-style:solid;border-color:var(--mg-c-input-color-border);border-radius:var(--mg-c-input-border-radius);background-color:var(--mg-b-color-light);color:var(--mg-b-color-dark);font-family:inherit;font-size:var(--mg-b-font-size);text-align:var(--mg-c-input-text-align, left)}.mg-c-input__box::placeholder{color:var(--mg-c-input-placeholder-color-text);font-style:italic}.mg-c-input__box:focus{box-shadow:0 0 var(--mg-b-size-4) var(--mg-c-input-color-box-shadow-focus)}.mg-c-input__box:disabled{opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input.mg-c-input--has-error .mg-c-input__box{border-color:var(--mg-b-color-danger)}.mg-c-input.mg-c-input--is-input-group-append{--mg-c-button-border-radius-top-left:0;--mg-c-button-border-radius-bottom-left:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box{margin-right:calc(-1*var(--mg-b-size-border));border-bottom-right-radius:0;border-top-right-radius:0}.mg-c-input.mg-c-input--is-input-group-append .mg-c-input__box:focus-visible{outline-offset:calc(-1*var(--mg-b-size-2));outline-style:solid;outline-width:var(--mg-b-size-2)}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]){--mg-c-button-border-radius-top-right:0;--mg-c-button-border-radius-bottom-right:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:not(:last-of-type)){--mg-c-button-border-right-width:0}.mg-c-input.mg-c-input--has-buttons-group-append ::slotted([slot=append-input]:last-of-type){--mg-c-button-border-radius-top-right:var(--mg-c-input-border-radius);--mg-c-button-border-radius-bottom-right:var(--mg-c-input-border-radius)}.mg-c-input.mg-c-input--is-append-input-slot-content:not(.mg-c-input--readonly) ::slotted([slot=append-input]){align-self:start;padding-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container{position:relative}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container>mg-icon:first-of-type{position:absolute;top:50%;left:var(--mg-b-size-8);color:var(--mg-c-input-color-icon);transform:translateY(-50%)}.mg-c-input.mg-c-input--has-icon .mg-c-input__input-group-container .mg-c-input__box{padding-left:calc(var(--mg-b-size-16) + var(--mg-b-size-8)*2)}.mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip-path:inset(50%) !important;white-space:nowrap !important}.mg-u-visually-hidden *{overflow:hidden !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}.mg-c-input__file-container{display:flex;flex-direction:column;gap:var(--mg-b-size-8)}.mg-c-input__file-item{display:inline-flex;min-height:var(--mg-b-size-min-height);align-items:center;padding-left:var(--mg-b-size-8);background-color:var(--mg-b-color-neutral-10);font-weight:600;gap:var(--mg-b-size-8)}.mg-c-input__file-item-name{word-break:break-all}.mg-c-input__file-item-size{color:var(--mg-b-color-neutral-90);font-weight:400;word-break:normal}.mg-c-input__file-delete-button{align-self:flex-start}.mg-c-input__file-list{display:flex;flex-direction:column;padding:0;margin:0;gap:var(--mg-b-size-4);list-style:none}.mg-c-input__file-list .mg-c-input__file-item{min-height:unset;padding:var(--mg-b-size-8)}.mg-c-input__file-list-container{position:relative;padding:var(--mg-b-size-8) calc(var(--mg-b-size-8) + var(--mg-b-size-min-height)) var(--mg-b-size-8) var(--mg-b-size-8);border:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30);border-radius:var(--mg-b-size-4)}.mg-c-input__file-list-container .mg-c-input__file-delete-button{position:absolute;top:0;right:0}`;
7
7
 
8
8
  const allItemsAreFile = (items) => {
9
- return Array.isArray(items) && items.every(item => isObject(item) && typeof item.name === 'string' && typeof item.size === 'number');
9
+ return (Array.isArray(items) &&
10
+ items.every((item) => isObject(item) && typeof item.name === 'string' && typeof item.size === 'number'));
10
11
  };
11
12
  const MgInputFile = class {
12
13
  constructor(hostRef) {
@@ -153,7 +154,7 @@ const MgInputFile = class {
153
154
  * @returns boolean - true if max size is exceeded
154
155
  */
155
156
  this.isMaxSizeExceeded = () => {
156
- return this.maxSize >= 0 && this.files.some(file => file.size > this.maxSize);
157
+ return this.maxSize >= 0 && this.files.some((file) => file.size > this.maxSize);
157
158
  };
158
159
  /**
159
160
  * Render files
@@ -161,7 +162,7 @@ const MgInputFile = class {
161
162
  */
162
163
  this.renderFiles = () => {
163
164
  const fileListId = `${this.identifier}-file-list`;
164
- const renderFileName = (file) => (h("span", { class: "mg-c-input__file-item-name" }, file.name, file.size > 0 ? h("span", { class: "mg-c-input__file-item-size" }, ` ${localeByte(file.size, this.locale)}`) : undefined));
165
+ const renderFileName = (file) => (h("span", { class: "mg-c-input__file-item-name" }, file.name, file.size > 0 ? (h("span", { class: "mg-c-input__file-item-size" }, ` ${localeByte(file.size, this.locale)}`)) : undefined));
165
166
  const renderDeleteButton = () => (h("mg-button", { variant: "flat", class: "mg-c-input__file-delete-button", "is-icon": true, label: this.messages.input.file.deleteButton, type: "button", disabled: this.disabled, "aria-controls": [this.identifier, fileListId].join(' '), onClick: this.handleDeleteFileClick }, h("mg-icon", { icon: "cross" })));
166
167
  if (this.files.length === 0) {
167
168
  return null;
@@ -250,7 +251,7 @@ const MgInputFile = class {
250
251
  // - Async operations are completed
251
252
  // - No timing issues with Stencil's render cycle
252
253
  // - Keep everything in sync both inside and outside the component
253
- return new Promise(resolve => {
254
+ return new Promise((resolve) => {
254
255
  requestAnimationFrame(() => {
255
256
  this.checkValidity();
256
257
  this.setErrorMessage();
@@ -296,7 +297,7 @@ const MgInputFile = class {
296
297
  // - Async operations are completed
297
298
  // - No timing issues with Stencil's render cycle
298
299
  // - Keep everything in sync both inside and outside the component
299
- return new Promise(resolve => {
300
+ return new Promise((resolve) => {
300
301
  requestAnimationFrame(() => {
301
302
  // unlock validity check by resetting customErrorMessage
302
303
  this.customErrorMessage = { lock: false };
@@ -338,9 +339,9 @@ const MgInputFile = class {
338
339
  * @returns HTML Element
339
340
  */
340
341
  render() {
341
- return (h("mg-input", { key: '0ca01b9b4697f55406262e93438946c2fe12e5f5', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("div", { key: '99fe30d5339687054392ca2fd8773af76af35396', class: "mg-c-input__file-container" }, h("input", { key: '84d9bee62d4c0c5975b561cc3e261905c759556f', name: this.name, id: this.identifier, class: "mg-u-visually-hidden", type: "file", multiple: this.multiple === true, capture: this.capture, accept: this.accept, disabled: this.disabled, required: this.files.length === 0 && this.required, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-invalid": (this.invalid === true).toString(), ref: (el) => {
342
+ return (h("mg-input", { key: '3c4c0ebdd1661e381f0002b2ae68dcf454097913', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("div", { key: 'bd7665fe8c6e01ec4e04fbbbf9cc21ccc4128b17', class: "mg-c-input__file-container" }, h("input", { key: 'f27d10160115ec1ff5163a1c55aa2658779c6fd7', name: this.name, id: this.identifier, class: "mg-u-visually-hidden", type: "file", multiple: this.multiple === true, capture: this.capture, accept: this.accept, disabled: this.disabled, required: this.files.length === 0 && this.required, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-invalid": (this.invalid === true).toString(), ref: (el) => {
342
343
  this.inputElement = el;
343
- } }), h("mg-button", { key: '1b6694f7c36fa2c8a2c5347d93a9cb07678e9363', variant: "secondary", class: "mg-c-input__file-button", type: "button", disabled: this.disabled, onClick: this.handleButtonClick, onBlur: this.handleButtonBlur, tabindex: "-1", ref: (el) => {
344
+ } }), h("mg-button", { key: 'd16c4cbd95d676bcddb895659aab37f0f9c396eb', variant: "secondary", class: "mg-c-input__file-button", type: "button", disabled: this.disabled, onClick: this.handleButtonClick, onBlur: this.handleButtonBlur, tabindex: "-1", ref: (el) => {
344
345
  this.fileButtonElement = el;
345
346
  } }, this.messages.input.file.browse), this.renderFiles())));
346
347
  }