@mgdis/mg-components 6.10.1 → 6.11.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 (113) hide show
  1. package/dist/cjs/{index-CL_COdxv.js → index-B_WwxtkQ.js} +4 -4
  2. package/dist/cjs/{index-CL_COdxv.js.map → index-B_WwxtkQ.js.map} +1 -1
  3. package/dist/cjs/{index.es-DaPqByCe.js → index.es-C-3Gv8Eu.js} +47 -43
  4. package/dist/cjs/index.es-C-3Gv8Eu.js.map +1 -0
  5. package/dist/cjs/mg-action-more_37.cjs.entry.js +186 -187
  6. package/dist/cjs/mg-action-more_37.cjs.entry.js.map +1 -1
  7. package/dist/cjs/mg-alert.cjs.entry.js +6 -6
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +74 -71
  9. package/dist/cjs/mg-input-combobox.cjs.entry.js.map +1 -1
  10. package/dist/cjs/mg-input-combobox.entry.cjs.js.map +1 -1
  11. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +6 -6
  12. package/dist/cjs/mg-loader.cjs.entry.js +3 -3
  13. package/dist/cjs/mg-progress.cjs.entry.js +9 -9
  14. package/dist/collection/components/atoms/mg-button/mg-button.js +1 -1
  15. package/dist/collection/components/atoms/mg-button/mg-button.js.map +1 -1
  16. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.js.map +1 -1
  17. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +67 -45
  18. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js.map +1 -1
  19. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +25 -30
  20. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
  21. package/dist/collection/components/molecules/mg-details/mg-details.js +5 -1
  22. package/dist/collection/components/molecules/mg-details/mg-details.js.map +1 -1
  23. package/dist/components/index.es.js +40 -37
  24. package/dist/components/index.es.js.map +1 -1
  25. package/dist/components/index2.js +2 -2
  26. package/dist/components/mg-action-more.js +6 -6
  27. package/dist/components/mg-alert.js +5 -5
  28. package/dist/components/mg-badge2.js +5 -5
  29. package/dist/components/mg-button2.js +6 -6
  30. package/dist/components/mg-button2.js.map +1 -1
  31. package/dist/components/mg-character-left2.js +4 -4
  32. package/dist/components/mg-details.js +6 -2
  33. package/dist/components/mg-details.js.map +1 -1
  34. package/dist/components/mg-form.js +7 -7
  35. package/dist/components/mg-icon2.js +6 -6
  36. package/dist/components/mg-illustrated-message.js +5 -5
  37. package/dist/components/mg-input-checkbox.js +5 -5
  38. package/dist/components/mg-input-combobox.js +73 -70
  39. package/dist/components/mg-input-combobox.js.map +1 -1
  40. package/dist/components/mg-input-date.js +14 -14
  41. package/dist/components/mg-input-numeric.js +11 -11
  42. package/dist/components/mg-input-password.js +2 -2
  43. package/dist/components/mg-input-radio.js +6 -6
  44. package/dist/components/mg-input-rich-text-editor.js +5 -5
  45. package/dist/components/mg-input-select2.js +31 -36
  46. package/dist/components/mg-input-select2.js.map +1 -1
  47. package/dist/components/mg-input-text2.js +6 -6
  48. package/dist/components/mg-input-textarea.js +5 -5
  49. package/dist/components/mg-input-title2.js +3 -3
  50. package/dist/components/mg-input-toggle.js +5 -5
  51. package/dist/components/mg-input2.js +6 -6
  52. package/dist/components/mg-item-more2.js +7 -7
  53. package/dist/components/mg-loader2.js +2 -2
  54. package/dist/components/mg-menu-item2.js +8 -8
  55. package/dist/components/mg-message2.js +4 -4
  56. package/dist/components/mg-modal.js +7 -7
  57. package/dist/components/mg-pagination2.js +6 -6
  58. package/dist/components/mg-panel.js +8 -8
  59. package/dist/components/mg-popover-content2.js +3 -3
  60. package/dist/components/mg-popover2.js +5 -5
  61. package/dist/components/mg-progress.js +9 -9
  62. package/dist/components/mg-table.js +5 -5
  63. package/dist/components/mg-tabs.js +11 -11
  64. package/dist/components/mg-tag.js +3 -3
  65. package/dist/components/mg-tooltip2.js +8 -8
  66. package/dist/esm/{index-DALWFL9i.js → index-DHpyFawS.js} +4 -4
  67. package/dist/esm/{index-DALWFL9i.js.map → index-DHpyFawS.js.map} +1 -1
  68. package/dist/esm/{index.es-hNwGkhG6.js → index.es-lyrZ9KRh.js} +42 -39
  69. package/dist/esm/index.es-lyrZ9KRh.js.map +1 -0
  70. package/dist/esm/mg-action-more_37.entry.js +186 -187
  71. package/dist/esm/mg-action-more_37.entry.js.map +1 -1
  72. package/dist/esm/mg-alert.entry.js +6 -6
  73. package/dist/esm/mg-input-combobox.entry.js +74 -71
  74. package/dist/esm/mg-input-combobox.entry.js.map +1 -1
  75. package/dist/esm/mg-input-rich-text-editor.entry.js +6 -6
  76. package/dist/esm/mg-loader.entry.js +3 -3
  77. package/dist/esm/mg-progress.entry.js +9 -9
  78. package/dist/mg-components/mg-components.esm.js +1 -1
  79. package/dist/mg-components/mg-input-combobox.entry.esm.js.map +1 -1
  80. package/dist/mg-components/{p-bf5de898.entry.js → p-596c0e08.entry.js} +2 -2
  81. package/dist/mg-components/p-8a3bd8ad.entry.js +2 -0
  82. package/dist/mg-components/p-8a3bd8ad.entry.js.map +1 -0
  83. package/dist/mg-components/p-98a74b62.entry.js +2 -0
  84. package/dist/mg-components/{p-a52a168c.entry.js.map → p-98a74b62.entry.js.map} +1 -1
  85. package/dist/mg-components/{p-Cg3R_y_o.js → p-C-vIqOyI.js} +2 -2
  86. package/dist/mg-components/{p-Cg3R_y_o.js.map → p-C-vIqOyI.js.map} +1 -1
  87. package/dist/mg-components/{p-e33557f9.entry.js → p-d4ed3aad.entry.js} +2 -2
  88. package/dist/mg-components/p-e822bd96.entry.js +2 -0
  89. package/dist/mg-components/{p-352cfc01.entry.js.map → p-e822bd96.entry.js.map} +1 -1
  90. package/dist/mg-components/p-fc7b96e6.entry.js +2 -0
  91. package/dist/mg-components/p-fc7b96e6.entry.js.map +1 -0
  92. package/dist/mg-components/p-lyrZ9KRh.js +2 -0
  93. package/dist/mg-components/p-lyrZ9KRh.js.map +1 -0
  94. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf.d.ts +1 -1
  95. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +5 -0
  96. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -9
  97. package/dist/types/components/molecules/mg-details/mg-details.d.ts +1 -0
  98. package/dist/types/components.d.ts +5 -0
  99. package/ide/intellij/web-types.json +6 -2
  100. package/ide/vscode/html-custom-data.json +1 -1
  101. package/package.json +8 -8
  102. package/dist/cjs/index.es-DaPqByCe.js.map +0 -1
  103. package/dist/esm/index.es-hNwGkhG6.js.map +0 -1
  104. package/dist/mg-components/p-352cfc01.entry.js +0 -2
  105. package/dist/mg-components/p-68f7de47.entry.js +0 -2
  106. package/dist/mg-components/p-68f7de47.entry.js.map +0 -1
  107. package/dist/mg-components/p-a52a168c.entry.js +0 -2
  108. package/dist/mg-components/p-dcefa0b0.entry.js +0 -2
  109. package/dist/mg-components/p-dcefa0b0.entry.js.map +0 -1
  110. package/dist/mg-components/p-hNwGkhG6.js +0 -2
  111. package/dist/mg-components/p-hNwGkhG6.js.map +0 -1
  112. /package/dist/mg-components/{p-bf5de898.entry.js.map → p-596c0e08.entry.js.map} +0 -0
  113. /package/dist/mg-components/{p-e33557f9.entry.js.map → p-d4ed3aad.entry.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, f as forceUpdate, h, g as getElement } from './index-CAuxALt5.js';
2
- import { H as Ht, X as Xt } from './index.es-hNwGkhG6.js';
3
- import { i as initLocales } from './index-DALWFL9i.js';
2
+ import { q as qt, Y as Yt } from './index.es-lyrZ9KRh.js';
3
+ import { i as initLocales } from './index-DHpyFawS.js';
4
4
 
5
5
  /**
6
6
  * List available variants
@@ -40,7 +40,7 @@ const MgAlert = class {
40
40
  /**
41
41
  * Component classes
42
42
  */
43
- this.classCollection = new Ht(['mg-c-alert']);
43
+ this.classCollection = new qt(['mg-c-alert']);
44
44
  /**
45
45
  * Define if component is using actions slot
46
46
  */
@@ -84,17 +84,17 @@ const MgAlert = class {
84
84
  }
85
85
  watchDelay(newValue) {
86
86
  if (newValue !== undefined && newValue < 2) {
87
- throw new Error(`<mg-alert> prop "delay" must be greater than 2 seconds. Passed value: ${Xt(newValue)}.`);
87
+ throw new Error(`<mg-alert> prop "delay" must be greater than 2 seconds. Passed value: ${Yt(newValue)}.`);
88
88
  }
89
89
  }
90
90
  watchVariant(newValue) {
91
91
  if (newValue && !variants.includes(newValue)) {
92
- throw new Error(`<mg-alert> prop "variant" must be one of: ${variants.join(', ')}. Passed value: ${Xt(newValue)}.`);
92
+ throw new Error(`<mg-alert> prop "variant" must be one of: ${variants.join(', ')}. Passed value: ${Yt(newValue)}.`);
93
93
  }
94
94
  }
95
95
  watchVariantStyle(newValue) {
96
96
  if (newValue && !variantStyles.includes(newValue)) {
97
- throw new Error(`<mg-alert> prop "variantStyle" must be one of: ${variantStyles.join(', ')}. Passed value: ${Xt(newValue)}.`);
97
+ throw new Error(`<mg-alert> prop "variantStyle" must be one of: ${variantStyles.join(', ')}. Passed value: ${Yt(newValue)}.`);
98
98
  }
99
99
  }
100
100
  /**
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-CAuxALt5.js';
2
- import { e as er, H as Ht, V as Vt, Q as Qt, B as Be, X as Xt, q as qt, n as ne, a as qe, G as Ge } from './index.es-hNwGkhG6.js';
2
+ import { r as rr, q as qt, H as Ht, t as tr, e as er, G as Ge, Y as Yt, a as Gt, K, b as qe, J as Je } from './index.es-lyrZ9KRh.js';
3
3
  import { c as classReadonly, a as classDisabled, w as widths } from './mg-input.conf-CNgv8hc5.js';
4
- import { i as initLocales } from './index-DALWFL9i.js';
4
+ import { i as initLocales } from './index-DHpyFawS.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__with-character-left>mg-icon:first-of-type,.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__with-character-left .mg-c-input__box,.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__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-2 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:has(textarea){flex-grow:inherit}.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__with-character-left:not(:has(textarea)) .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__with-character-left:not(:has(textarea)) .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__with-character-left:not(:has(textarea)) .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);word-break:break-word}.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.mg-c-input--combobox mg-popover{--mg-c-popover-padding-vertical:0;--mg-c-popover-padding-horizontal:0}.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;min-width:var(--mg-c-input-list-width);max-height:calc(50*var(--mg-b-size-8) - var(--mg-b-size-32));flex-direction:column;gap:var(--mg-b-size-4);overflow-y:scroll}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-info{padding:var(--mg-b-size-8);margin:0;text-align:center}.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__reset{padding-right:var(--mg-b-size-min-height)}.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)*2 + 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)*2 + 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)*2 + 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-c-input-append-x) + 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:-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__with-character-left>mg-icon:first-of-type,.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__with-character-left .mg-c-input__box,.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__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-2 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left,.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left{width:max-content}.mg-c-input.mg-c-input--width-2 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-4 .mg-c-input__with-character-left:has(textarea),.mg-c-input.mg-c-input--width-16 .mg-c-input__with-character-left:has(textarea){flex-grow:inherit}.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__with-character-left:not(:has(textarea)) .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__with-character-left:not(:has(textarea)) .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__with-character-left:not(:has(textarea)) .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);word-break:break-word}.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.mg-c-input--combobox mg-popover{--mg-c-popover-padding-vertical:0;--mg-c-popover-padding-horizontal:0}.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;min-width:var(--mg-c-input-list-width);max-height:calc(50*var(--mg-b-size-8) - var(--mg-b-size-32));flex-direction:column;gap:var(--mg-b-size-4);overflow-y:scroll}.mg-c-input.mg-c-input--combobox .mg-c-input__popover-info{padding:var(--mg-b-size-8);margin:0;text-align:center}.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
@@ -24,10 +24,10 @@ const isItems = (items) => Array.isArray(items) && items.every(isItem);
24
24
  * @returns truthy if mapping is valid
25
25
  */
26
26
  const isFetchmappings = (value) => {
27
- const isValidRoot = ne(value) && Object.hasOwn(value, 'request') && Object.hasOwn(value, 'response');
27
+ const isValidRoot = K(value) && Object.hasOwn(value, 'request') && Object.hasOwn(value, 'response');
28
28
  if (isValidRoot) {
29
29
  const { request, response } = value;
30
- if ([request, response].some(property => !ne(property)))
30
+ if ([request, response].some(property => !K(property)))
31
31
  return false;
32
32
  const isValidRequest = typeof request.filter === 'string';
33
33
  const isValidResponse = typeof response === 'object' &&
@@ -35,35 +35,13 @@ const isFetchmappings = (value) => {
35
35
  typeof response.items === 'string' &&
36
36
  typeof response.next === 'string' &&
37
37
  typeof response.itemTitle === 'string' &&
38
- typeof response.itemValue === 'string';
38
+ (typeof response.itemValue === 'string' || response.itemValue === undefined);
39
39
  return isValidRequest && isValidResponse;
40
40
  }
41
41
  else {
42
42
  return isValidRoot;
43
43
  }
44
44
  };
45
- /**
46
- * Map new URL from old url
47
- * @param newValue - new URL value
48
- * @param oldValue - previous URL value
49
- * @returns updated url
50
- */
51
- const mapUrl = (newValue, oldValue) => {
52
- if (!Boolean(newValue))
53
- return;
54
- else if (URL.canParse(newValue)) {
55
- return newValue;
56
- }
57
- // build new URL
58
- const params = newValue.includes('?') && newValue.split('?').pop();
59
- if (Boolean(params)) {
60
- const { origin, pathname } = new URL(oldValue);
61
- return `${origin}${pathname}?${params}`;
62
- }
63
- else {
64
- return newValue;
65
- }
66
- };
67
45
  const MgInputCombobox = class {
68
46
  constructor(hostRef) {
69
47
  registerInstance(this, hostRef);
@@ -71,6 +49,7 @@ const MgInputCombobox = class {
71
49
  this.filterChange = createEvent(this, "filter-change");
72
50
  this.loadMore = createEvent(this, "load-more");
73
51
  this.inputValid = createEvent(this, "input-valid");
52
+ this.fetchError = createEvent(this, "fetch-error");
74
53
  /************
75
54
  * Internal *
76
55
  ************/
@@ -114,7 +93,7 @@ const MgInputCombobox = class {
114
93
  /**
115
94
  * Formated items for display
116
95
  */
117
- this.options = new er([]);
96
+ this.options = new rr([]);
118
97
  /**
119
98
  * Option filter
120
99
  */
@@ -122,7 +101,7 @@ const MgInputCombobox = class {
122
101
  /**
123
102
  * Component classes
124
103
  */
125
- this.classCollection = new Ht(['mg-c-input--combobox', 'mg-c-input--has-icon', 'mg-c-input--input-append']);
104
+ this.classCollection = new qt(['mg-c-input--combobox', 'mg-c-input--has-icon', 'mg-c-input--input-append']);
126
105
  /**
127
106
  * Popover display state
128
107
  */
@@ -132,7 +111,7 @@ const MgInputCombobox = class {
132
111
  * @param event - option element click event
133
112
  */
134
113
  this.handleOptionClick = (event) => {
135
- this.setValue(this.options.items.find(option => option.value === event.target.id));
114
+ this.setValue(this.options.items.find(option => Ht(option.value) === event.target.id));
136
115
  this.popoverDisplay = false;
137
116
  };
138
117
  /**
@@ -160,7 +139,14 @@ const MgInputCombobox = class {
160
139
  this.setErrorMessage();
161
140
  if (!this.popoverDisplay)
162
141
  this.popoverDisplay = true;
163
- this.filter = this.input.value;
142
+ // update filter with debounce to prevent filter update overload
143
+ if (!this.debounce) {
144
+ this.debounce = true;
145
+ setTimeout(() => {
146
+ this.filter = this.input.value;
147
+ this.debounce = false;
148
+ }, 250);
149
+ }
164
150
  };
165
151
  /**
166
152
  * Handle `blur` event
@@ -189,7 +175,7 @@ const MgInputCombobox = class {
189
175
  * Handle load-more <mg-button> `click`
190
176
  */
191
177
  this.handleLoadMoreButton = () => {
192
- this.loadingWrapper({ name: 'load-more', cursor: Vt.NEXT }).then(() => {
178
+ this.loadingWrapper({ name: 'load-more', cursor: tr.NEXT }).then(() => {
193
179
  this.input.focus();
194
180
  });
195
181
  };
@@ -235,14 +221,14 @@ const MgInputCombobox = class {
235
221
  // If the filter is empty and the popover is not displayed, opens the popover and moves visual focus to the first option.
236
222
  // Moves visual focus to the next option.
237
223
  // If visual focus is on the last option, moves visual focus to the first option.
238
- cursor = isNavigationStart ? Vt.NEXT : Vt.FIRST;
224
+ cursor = isNavigationStart ? tr.NEXT : tr.FIRST;
239
225
  }
240
226
  else if ([Keys.UP, Keys.ARROWUP].includes(event.key)) {
241
227
  // If the filter is not empty and the popover is displayed, moves visual focus to the last suggested value.
242
228
  // If the filter is empty, first opens the popover if it is not already displayed and then moves visual focus to the last option.
243
229
  // Moves visual focus to the previous option.
244
230
  // If visual focus is on the first option, moves visual focus to the last option.
245
- cursor = isNavigationStart ? Vt.PREVIOUS : Vt.LAST;
231
+ cursor = isNavigationStart ? tr.PREVIOUS : tr.LAST;
246
232
  }
247
233
  // update scroll and visual focused option in wrapper
248
234
  this.loadingWrapper({ name: 'scroll', cursor });
@@ -379,7 +365,7 @@ const MgInputCombobox = class {
379
365
  this.isLoading = true;
380
366
  promise = this.goToNextPage;
381
367
  }
382
- else if (action.cursor === Vt.NEXT &&
368
+ else if (action.cursor === tr.NEXT &&
383
369
  this.page.items.length <= this.page.total &&
384
370
  index + this.page.baseIndex === this.page.items.length &&
385
371
  index + this.page.baseIndex < this.page.total) {
@@ -388,7 +374,7 @@ const MgInputCombobox = class {
388
374
  return;
389
375
  }
390
376
  else if (action.name === 'scroll') {
391
- promise = Qt;
377
+ promise = er;
392
378
  }
393
379
  else {
394
380
  promise = this.updatePage;
@@ -426,14 +412,14 @@ const MgInputCombobox = class {
426
412
  // merge items from current page and next page
427
413
  const items = [...this.page.items, ...nextPage.items];
428
414
  // create new options pagination withe merged items
429
- this.options = new er(items, { total: nextPage.total, next: nextPage.next, top: items.length });
415
+ this.options = new rr(items, { total: nextPage.total, next: nextPage.next, top: items.length });
430
416
  });
431
417
  }
432
418
  else {
433
- return Qt(() => {
419
+ return er(() => {
434
420
  if (typeof this.page.next === 'function') {
435
421
  const nextPage = this.page.next();
436
- this.page = new Ge(Object.assign(Object.assign({}, nextPage), { items: [...this.page.items, ...nextPage.items] }));
422
+ this.page = new Je(Object.assign(Object.assign({}, nextPage), { items: [...this.page.items, ...nextPage.items] }));
437
423
  }
438
424
  });
439
425
  }
@@ -448,7 +434,7 @@ const MgInputCombobox = class {
448
434
  if (!Boolean(page))
449
435
  return;
450
436
  // reset current options pagination from API response
451
- this.options = new er(page.items, { total: page.total, next: page.next, top: page.top });
437
+ this.options = new rr(page.items, { total: page.total, next: page.next, top: page.top });
452
438
  });
453
439
  }
454
440
  else {
@@ -464,18 +450,23 @@ const MgInputCombobox = class {
464
450
  // add text filter
465
451
  const updateUrl = (typeof url === 'string' ? url : url.toString()).replaceAll(this.fetchmappings.request.filter, encodeURIComponent(this.filter));
466
452
  try {
467
- const response = await fetch(updateUrl, this.fetchoptions).then(response => response.json());
468
- if (!response)
469
- return null;
470
- const items = Be(response, this.fetchmappings.response.items).map((item) => ({
471
- title: Be(item, this.fetchmappings.response.itemTitle),
472
- value: Be(item, this.fetchmappings.response.itemValue),
453
+ const response = await fetch(updateUrl, this.fetchoptions);
454
+ if (!response.ok) {
455
+ this.fetchError.emit(new Error(`${response.status} - ${response.statusText}`));
456
+ return;
457
+ }
458
+ const json = await response.json();
459
+ const items = Ge(json, this.fetchmappings.response.items).map((item) => ({
460
+ title: Ge(item, this.fetchmappings.response.itemTitle),
461
+ value: this.fetchmappings.response.itemValue ? Ge(item, this.fetchmappings.response.itemValue) : item,
473
462
  }));
474
- const total = Number(Be(response, this.fetchmappings.response.total, 0));
475
- const next = mapUrl(Be(response, this.fetchmappings.response.next), this.fetchurl.toString());
463
+ const total = Number(Ge(json, this.fetchmappings.response.total, 0));
464
+ const next = Ge(json, this.fetchmappings.response.next);
476
465
  return { items, total, next, top: items.length };
477
466
  }
478
- catch (_a) { }
467
+ catch (error) {
468
+ this.fetchError.emit(error);
469
+ }
479
470
  };
480
471
  }
481
472
  watchValue(newValue) {
@@ -488,22 +479,22 @@ const MgInputCombobox = class {
488
479
  return;
489
480
  }
490
481
  else if (Boolean(this.fetchurl) && Boolean(newValue)) {
491
- throw new Error(`<mg-input-combobox> prop "items" values cannot be use with "fetchurl" prop defined. Passed value: ${Xt(newValue)}.`);
482
+ throw new Error(`<mg-input-combobox> prop "items" values cannot be use with "fetchurl" prop defined. Passed value: ${Yt(newValue)}.`);
492
483
  }
493
484
  // Empty options
494
485
  else if (Array.isArray(newValue) && newValue.length === 0) {
495
- this.options = new er([]);
486
+ this.options = new rr([]);
496
487
  }
497
488
  // String array
498
- else if (qt(newValue)) {
499
- this.options = new er(newValue.map(item => ({ title: item, value: item })), { total: newValue.length });
489
+ else if (Gt(newValue)) {
490
+ this.options = new rr(newValue.map(item => ({ title: item, value: item })), { total: newValue.length });
500
491
  }
501
492
  // Object array
502
493
  else if (isItems(newValue)) {
503
- this.options = new er(newValue, { total: newValue.length });
494
+ this.options = new rr(newValue, { total: newValue.length });
504
495
  }
505
496
  else {
506
- throw new Error(`<mg-input-combobox> prop "items" values must be the same type, string or Option. Passed value: ${Xt(newValue)}.`);
497
+ throw new Error(`<mg-input-combobox> prop "items" values must be the same type, string or Option. Passed value: ${Yt(newValue)}.`);
507
498
  }
508
499
  }
509
500
  watchIdentifier(newValue) {
@@ -544,16 +535,16 @@ const MgInputCombobox = class {
544
535
  // apply new width
545
536
  if (newValue !== undefined)
546
537
  this.classCollection.add(`mg-c-input--width-${this.mgWidth}`);
547
- this.classCollection = new Ht(this.classCollection.classes);
538
+ this.classCollection = new qt(this.classCollection.classes);
548
539
  }
549
540
  watchFetchUrl(newValue) {
550
- if (newValue && !URL.canParse(newValue)) {
551
- throw new Error(`<mg-input-combobox> prop "fetchurl" value must be URL or string. Passed value: ${Xt(newValue)}.`);
541
+ if (Boolean(newValue)) {
542
+ this.loadingWrapper({ name: 'load-data' });
552
543
  }
553
544
  }
554
545
  watchFetchOptions(newValue) {
555
- if (this.fetchurl && newValue && !ne(newValue)) {
556
- throw new Error(`<mg-input-combobox> prop "fetchoptions" value must be a valid RequestInit. Passed value: ${Xt(newValue)}.`);
546
+ if (this.fetchurl && newValue && !K(newValue)) {
547
+ throw new Error(`<mg-input-combobox> prop "fetchoptions" value must be a valid RequestInit. Passed value: ${Yt(newValue)}.`);
557
548
  }
558
549
  else {
559
550
  new Request(this.fetchurl, newValue);
@@ -564,7 +555,7 @@ const MgInputCombobox = class {
564
555
  throw new Error(`<mg-input-combobox> prop "fetchmappings" is required with "fetchurl" prop.`);
565
556
  }
566
557
  else if (Boolean(newValue) && !isFetchmappings(newValue)) {
567
- throw new Error(`<mg-input-combobox> prop "fetchmappings" value must be { request: RequestMappingType, response: ResponseMappingType }. Passed value: ${Xt(newValue)}.`);
558
+ throw new Error(`<mg-input-combobox> prop "fetchmappings" value must be { request: RequestMappingType, response: ResponseMappingType }. Passed value: ${Yt(newValue)}.`);
568
559
  }
569
560
  }
570
561
  watchOptions(newValue) {
@@ -660,8 +651,11 @@ const MgInputCombobox = class {
660
651
  if (!isItem(newValue)) {
661
652
  this.value = '';
662
653
  }
654
+ else if (Gt(this.items || this.options.items)) {
655
+ this.value = newValue.title;
656
+ }
663
657
  else {
664
- this.value = qt(this.items || this.options.items) ? newValue.title : Object.assign({}, newValue);
658
+ this.value = Object.assign({}, newValue);
665
659
  }
666
660
  }
667
661
  /**
@@ -690,7 +684,6 @@ const MgInputCombobox = class {
690
684
  this.watchIdentifier(this.identifier);
691
685
  this.watchItems(this.items);
692
686
  if (Boolean(this.fetchurl)) {
693
- this.watchFetchUrl(this.fetchurl);
694
687
  this.watchFetchOptions(this.fetchoptions);
695
688
  this.watchFetchMappings(this.fetchmappings);
696
689
  this.loadingWrapper({ name: 'load-data' });
@@ -723,22 +716,32 @@ const MgInputCombobox = class {
723
716
  popoverContent = 'notfound';
724
717
  else if (((_c = this.page) === null || _c === void 0 ? void 0 : _c.items.length) === 0)
725
718
  popoverContent = 'notavailable';
726
- return (h("mg-input", { key: 'b8c4c6d18bb1d16ff0a8494ddb698cb4e0198e43', label: this.label, identifier: this.identifier, class: this.classCollection.classes.join(' '), ariaDescribedbyIDs: popoverContent && popoverContent !== 'list' ? [popoverContent] : [], 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: {
727
- '--mg-c-input-list-width': Boolean((_d = this.input) === null || _d === void 0 ? void 0 : _d.offsetWidth) ? `${this.input.offsetWidth}px` : undefined,
728
- '--mg-c-input-append-x': withResetButton ? '2' : '1',
729
- }, "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": Boolean((_e = this.option) === null || _e === void 0 ? void 0 : _e.value) ? this.option.value : typeof this.value === 'string' ? this.value : (_f = this.value) === null || _f === void 0 ? void 0 : _f.value, onInput: this.handleFilterInput, onBlur: this.handleFilterBlur, onFocus: this.handleFilterFocus, onKeyDown: this.handleFilterKeydown, ref: (el) => {
719
+ let activeDescendant;
720
+ if (Boolean((_d = this.option) === null || _d === void 0 ? void 0 : _d.value)) {
721
+ activeDescendant = this.option.value;
722
+ }
723
+ else if (typeof this.value === 'string') {
724
+ activeDescendant = this.value;
725
+ }
726
+ else {
727
+ activeDescendant = (_e = this.value) === null || _e === void 0 ? void 0 : _e.value;
728
+ }
729
+ return (h("mg-input", { key: '9247630e9b86d6ca8e9e57089454551cf31f5531', label: this.label, identifier: this.identifier, class: this.classCollection.classes.join(' '), ariaDescribedbyIDs: popoverContent && popoverContent !== 'list' ? [popoverContent] : [], 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: {
730
+ '--mg-c-input-list-width': Boolean((_f = this.input) === null || _f === void 0 ? void 0 : _f.offsetWidth) ? `${this.input.offsetWidth}px` : undefined,
731
+ }, "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": Ht(activeDescendant), onInput: this.handleFilterInput, onBlur: this.handleFilterBlur, onFocus: this.handleFilterFocus, onKeyDown: this.handleFilterKeydown, ref: (el) => {
730
732
  if (el !== null)
731
733
  this.input = el;
732
- } }), 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' && [
734
+ } }), 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' && [
733
735
  // eslint-disable-next-line jsx-a11y/role-supports-aria-props
734
736
  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 => {
737
+ var _a;
735
738
  return (
736
739
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events
737
740
  h("li", { role: "option", class: {
738
741
  'mg-c-input__input-list-item': true,
739
- 'mg-c-input__input-list-item--focus-visible': this.option === option,
742
+ 'mg-c-input__input-list-item--focus-visible': JSON.stringify((_a = this.option) === null || _a === void 0 ? void 0 : _a.value) === JSON.stringify(option.value),
740
743
  'mg-c-input__input-list-item--selected': this.isCurrentOption(option),
741
- }, key: option.title, id: option.value.toString(), "aria-selected": this.isCurrentOption(option).toString(), onClick: this.handleOptionClick }, option.title, this.isCurrentOption(option) && h("mg-icon", { icon: "check" })));
744
+ }, key: option.title, id: Ht(option.value), "aria-selected": this.isCurrentOption(option).toString(), onClick: this.handleOptionClick }, option.title, this.isCurrentOption(option) && h("mg-icon", { icon: "check" })));
742
745
  })),
743
746
  this.isLoading && h("mg-loader", { key: "loader", message: this.messages.input.combobox.search, class: { 'mg-u-visually-hidden': Boolean(this.page.next) } }),
744
747
  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) => {