@mgdis/mg-components 5.12.0 → 5.13.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 (69) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/{mg-action-more_31.cjs.entry.js → mg-action-more_32.cjs.entry.js} +325 -137
  3. package/dist/cjs/mg-components.cjs.js +1 -1
  4. package/dist/cjs/mg-item-more.cjs.entry.js +1 -1
  5. package/dist/cjs/{mg-menu.conf-79f0c761.js → mg-menu.conf-857748e1.js} +20 -2
  6. package/dist/collection/collection-manifest.json +1 -0
  7. package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +15 -0
  8. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +259 -0
  9. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +16 -0
  10. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +41 -3
  11. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +106 -100
  12. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +1 -1
  13. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +1 -1
  14. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +1 -1
  15. package/dist/collection/components/molecules/mg-details/mg-details.css +3 -5
  16. package/dist/collection/components/molecules/mg-modal/mg-modal.js +1 -1
  17. package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +3 -0
  18. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +19 -1
  19. package/dist/collection/components/molecules/mg-panel/mg-panel.conf.js +8 -0
  20. package/dist/collection/components/molecules/mg-panel/mg-panel.css +9 -5
  21. package/dist/collection/components/molecules/mg-panel/mg-panel.js +133 -47
  22. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +1 -0
  23. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
  24. package/dist/collection/locales/en/messages.json +13 -1
  25. package/dist/collection/locales/fr/messages.json +7 -1
  26. package/dist/collection/stories/icon-gallery.js +9 -0
  27. package/dist/collection/variables.css +7 -2
  28. package/dist/components/index.d.ts +1 -0
  29. package/dist/components/index.js +1 -0
  30. package/dist/components/index2.js +20 -2
  31. package/dist/components/mg-details.js +1 -1
  32. package/dist/components/mg-input-checkbox-paginated.d.ts +11 -0
  33. package/dist/components/mg-input-checkbox-paginated.js +6 -0
  34. package/dist/components/mg-input-checkbox-paginated2.js +205 -0
  35. package/dist/components/mg-input-checkbox.js +114 -108
  36. package/dist/components/mg-menu-item2.js +1 -1
  37. package/dist/components/mg-menu2.js +1 -1
  38. package/dist/components/mg-pagination2.js +4 -2
  39. package/dist/components/mg-panel.js +83 -37
  40. package/dist/components/mg-tabs.js +1 -1
  41. package/dist/esm/loader.js +1 -1
  42. package/dist/esm/{mg-action-more_31.entry.js → mg-action-more_32.entry.js} +325 -138
  43. package/dist/esm/mg-components.js +1 -1
  44. package/dist/esm/mg-item-more.entry.js +1 -1
  45. package/dist/esm/{mg-menu.conf-850d4c6e.js → mg-menu.conf-c31828ca.js} +20 -2
  46. package/dist/mg-components/locales/en/messages.json +13 -1
  47. package/dist/mg-components/locales/fr/messages.json +7 -1
  48. package/dist/mg-components/mg-components.css +1 -1
  49. package/dist/mg-components/mg-components.esm.js +1 -1
  50. package/dist/mg-components/p-622e2323.js +1 -0
  51. package/dist/mg-components/p-bda0b795.entry.js +1 -0
  52. package/dist/mg-components/{p-67ba5d05.entry.js → p-d37b29bb.entry.js} +1 -1
  53. package/dist/mg-components/variables.css +7 -2
  54. package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +8 -0
  55. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +103 -0
  56. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +50 -12
  57. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +48 -53
  58. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -1
  59. package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +0 -1
  60. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +4 -0
  61. package/dist/types/components/molecules/mg-panel/mg-panel.conf.d.ts +16 -0
  62. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +44 -10
  63. package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +0 -1
  64. package/dist/types/components.d.ts +125 -19
  65. package/dist/types/locales/index.d.ts +18 -0
  66. package/dist/types/stories/icon-gallery.d.ts +6 -0
  67. package/package.json +23 -13
  68. package/dist/mg-components/p-60b7afd9.entry.js +0 -1
  69. package/dist/mg-components/p-689503fc.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-407d5211.js';
2
- import { i as initLocales, D as Direction, l as localeDate, d as dateRegExp, a as localeCurrency, b as localeNumber, s as sizes$2 } from './mg-menu.conf-850d4c6e.js';
2
+ import { i as initLocales, D as Direction, l as localeDate, d as dateRegExp, a as localeCurrency, b as localeNumber, s as sizes$2 } from './mg-menu.conf-c31828ca.js';
3
3
 
4
4
  /**
5
5
  * Available menu-item positions
@@ -614,7 +614,7 @@ const MgCharacterLeft = class {
614
614
  };
615
615
  MgCharacterLeft.style = mgCharacterLeftCss;
616
616
 
617
- const mgDetailsCss = "/**\n * A11Y\n */\n.sr-only {\n border: 0 !important;\n clip: rect(1px, 1px, 1px, 1px) !important;\n -webkit-clip-path: inset(50%) !important;\n clip-path: inset(50%) !important;\n height: 1px !important;\n margin: -1px !important;\n overflow: hidden !important;\n padding: 0 !important;\n position: absolute !important;\n width: 1px !important;\n white-space: nowrap !important;\n}\n\n*:focus:not(:focus-visible) {\n outline: none;\n}\n\n@media (prefers-reduced-motion) {\n .mg-a11y-animation {\n animation: none !important;\n transition: none !important;\n }\n}\n.mg-details {\n container: mg-details/inline-size;\n}\n.mg-details summary {\n display: flex;\n align-items: baseline;\n cursor: pointer;\n}\n.mg-details__toggle {\n margin-left: 1.5rem;\n flex-shrink: 0;\n display: flex;\n align-items: center;\n align-self: flex-start;\n gap: 0.6rem;\n min-height: calc(var(--font-size) * var(--line-height));\n}\n.mg-details__details {\n margin-top: var(--mg-details-spacing);\n}\n\n@container mg-details (max-width: 60rem) {\n .mg-details__toggle span {\n border: 0 !important;\n clip: rect(1px, 1px, 1px, 1px) !important;\n -webkit-clip-path: inset(50%) !important;\n clip-path: inset(50%) !important;\n height: 1px !important;\n margin: -1px !important;\n overflow: hidden !important;\n padding: 0 !important;\n position: absolute !important;\n width: 1px !important;\n white-space: nowrap !important;\n }\n}";
617
+ const mgDetailsCss = ".sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){.mg-a11y-animation{animation:none !important;transition:none !important}}.mg-details summary{display:flex;align-items:baseline;cursor:pointer}.mg-details__toggle{margin-left:1.5rem;flex-shrink:0;display:flex;align-items:center;align-self:flex-start;gap:0.6rem;min-height:calc(var(--font-size) * var(--line-height))}.mg-details__details{margin-top:var(--mg-details-spacing)}@media (width < 43.75rem){.mg-details__toggle>span{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}}";
618
618
 
619
619
  const MgDetails = class {
620
620
  constructor(hostRef) {
@@ -1279,8 +1279,41 @@ const MgInput = (props, children, utils) => {
1279
1279
  * List of all availables checkbox type
1280
1280
  */
1281
1281
  const checkboxTypes = ['checkbox', 'multi'];
1282
+ /**
1283
+ * mg-input-checkbox-paginated section kind
1284
+ */
1285
+ var SectionKind;
1286
+ (function (SectionKind) {
1287
+ SectionKind["SELECTED"] = "selected";
1288
+ SectionKind["NOT_SELECTED"] = "not-selected";
1289
+ })(SectionKind || (SectionKind = {}));
1290
+ /**
1291
+ * mg-input-checkbox-paginated section title kind
1292
+ */
1293
+ var SectionTitleKind;
1294
+ (function (SectionTitleKind) {
1295
+ SectionTitleKind["BUTTON"] = "button";
1296
+ SectionTitleKind["TEXT"] = "text";
1297
+ })(SectionTitleKind || (SectionTitleKind = {}));
1282
1298
 
1283
- const mgInputCheckboxCss = ":host{display:block}.mg-input{display:flex;align-items:flex-start;min-height:var(--default-size);max-width:100%;margin-bottom:var(--mg-inputs-margin-bottom, 0);}.mg-input mg-input-title{flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-input.mg-input--label-on-top{flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:flex;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-input__input-container .mg-input__help-text,.mg-input__input-container .mg-input__error{text-align:start;font-size:1.2rem}.mg-input__input{display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input.mg-input__input--has-error .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input__input+.mg-input__help-text,.mg-input__input+.mg-input__error{margin-top:0.5rem}.mg-input__input .mg-input__box:disabled,.mg-input__input-group--disabled label,.mg-input.mg-input--toggle-disabled .mg-input__input .mg-input__button-toggle,.mg-input.mg-input--checkbox-multi-disabled .mg-input__input strong{opacity:var(--mg-disabled-opacity)}.mg-input__error{display:inline-block;margin-top:0.2rem;padding:0.3rem 0.8rem;border-radius:0.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-input__input mg-icon,.mg-input__error mg-icon{display:flex}fieldset.mg-input{border:0;margin-left:0;margin-right:0;padding:0}fieldset.mg-input input[type=radio],fieldset.mg-input input[type=checkbox]{flex-shrink:0;width:var(--mg-input-check-size);height:var(--mg-input-check-size);margin-top:calc((var(--font-size) * var(--line-height) - var(--mg-input-check-size)) / 2);margin-right:0.6rem;margin-bottom:0;margin-left:0}fieldset.mg-input.mg-input--label-on-top .mg-input__input-group-container{margin-top:0.7rem}.mg-input__input-container mg-tooltip{margin-left:3rem}.mg-input__input-group-container{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;column-gap:2.3rem;row-gap:1rem;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2)}.mg-input__input-group-container--vertical{flex-direction:column}.mg-input__input-group{display:flex;align-items:top}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){.mg-a11y-animation{animation:none !important;transition:none !important}}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi{display:flex;flex-wrap:wrap;gap:calc(var(--mg-inputs-spacer) * 1.2)}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi--with-values.mg-input__input-checkbox-multi{gap:0.4rem}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-values-container{display:flex;flex-wrap:wrap;gap:0.4rem;margin:0;padding:0;list-style:none}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-value{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;min-height:var(--default-size);min-width:var(--default-size);padding:calc((var(--default-size) - 0.2rem - var(--font-size) * var(--line-height)) / 2) 1.1rem;background-color:var(--mg-color-dark-5-hsl);border-radius:0.3rem;font-size:var(--font-size)}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-no-result{text-align:center}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-inputs{margin:0}.mg-input.mg-input--checkbox-multi:not(.mg-input--label-on-top) mg-tooltip{margin-left:var(--mg-inputs-spacer)}.mg-input.mg-input--checkbox-multi mg-popover{--mg-popover-min-width:7rem}.mg-input.mg-input--checkbox-multi mg-popover [slot=content]{display:flex;flex-direction:column;gap:calc(0.4rem * 2)}.mg-input.mg-input--checkbox-multi mg-input-text{--mg-inputs-margin-bottom:0}";
1299
+ /**
1300
+ * Get checkboxes list template
1301
+ * @param props - MgInputCheckboxList Interface Props
1302
+ * @returns input template
1303
+ */
1304
+ const MgInputCheckboxList = (props) => (
1305
+ // eslint-disable-next-line jsx-a11y/no-redundant-roles
1306
+ h("ul", { class: {
1307
+ 'mg-input__input-group-container': true,
1308
+ 'mg-input__input-group-container--vertical': props.inputVerticalList || (props.type === 'multi' && !props.readonly),
1309
+ 'mg-input__input-checkbox-multi-inputs': props.type === 'multi' && !props.readonly,
1310
+ }, role: "list", "aria-describedby": props.displaySearchInput ? 'search-results' : undefined, "aria-label": props.displaySearchInput ? props.messages.searchResults : undefined, "aria-live": props.displaySearchInput ? 'polite' : undefined, id: props.id }, props.checkboxes
1311
+ .filter(item => !props.readonly || item.value)
1312
+ .map(input => (h("li", { key: input.id, class: { 'mg-input__input-group': true, 'mg-input__input-group--disabled': props.disabled || input.disabled } },
1313
+ h("input", { type: "checkbox", id: input.id, name: props.name, value: input.value && input.value.toString(), checked: Boolean(input.value), required: input.required, disabled: props.readonly || props.disabled || input.disabled, indeterminate: input.value === null, onInput: input.handleInput, onBlur: input.handleBlur, onKeyDown: input.handleKeydown }),
1314
+ h("label", { htmlFor: input.id }, input.title))))));
1315
+
1316
+ const mgInputCheckboxCss = ":host{display:block}.mg-input{display:flex;align-items:flex-start;min-height:var(--default-size);max-width:100%;margin-bottom:var(--mg-inputs-margin-bottom, 0);}.mg-input mg-input-title{flex-shrink:var(--mg-inputs-shrink, 1);width:var(--mg-inputs-title-width, auto);margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);margin-right:var(--mg-inputs-title-horizontal-space, var(--mg-inputs-spacer));text-align:right}.mg-input.mg-input--label-on-top{flex-direction:column}.mg-input.mg-input--label-on-top .mg-input__input-container{width:100%}.mg-input__title{display:flex;align-items:baseline;margin-bottom:0.3rem}.mg-input__title mg-input-title{flex-shrink:1;width:auto;margin-top:0;margin-right:var(--mg-inputs-spacer);text-align:left}.mg-input__title mg-tooltip{margin-top:0}.mg-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-input__input-container{min-height:var(--default-size);}.mg-input__input-container>strong{display:inline-block;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2);min-height:var(--font-size)}.mg-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-icon-regular-size);height:var(--mg-icon-regular-size);margin-left:var(--mg-inputs-spacer)}.mg-input__input-container .mg-input__help-text,.mg-input__input-container .mg-input__error{text-align:start;font-size:1.2rem}.mg-input__input{display:flex;}.mg-input__input mg-tooltip{margin-top:calc((var(--default-size) - var(--mg-icon-regular-size)) / 2)}.mg-input__input.mg-input__input--has-error .mg-input__box{border-color:hsl(var(--color-danger))}.mg-input__input+.mg-input__help-text,.mg-input__input+.mg-input__error{margin-top:0.5rem}.mg-input__input .mg-input__box:disabled,.mg-input__input-group--disabled label,.mg-input.mg-input--toggle-disabled .mg-input__input .mg-input__button-toggle,.mg-input.mg-input--checkbox-multi-disabled .mg-input__input strong{opacity:var(--mg-disabled-opacity)}.mg-input__error{display:inline-block;margin-top:0.2rem;padding:0.3rem 0.8rem;border-radius:0.3rem;background:hsl(var(--mg-inputs-error-bg-color));color:hsl(var(--color-danger))}.mg-input__input mg-icon,.mg-input__error mg-icon{display:flex}fieldset.mg-input{border:0;margin-left:0;margin-right:0;padding:0}fieldset.mg-input input[type=radio],fieldset.mg-input input[type=checkbox]{flex-shrink:0;width:var(--mg-input-check-size);height:var(--mg-input-check-size);margin-top:calc((var(--font-size) * var(--line-height) - var(--mg-input-check-size)) / 2);margin-right:0.6rem;margin-bottom:0;margin-left:0}fieldset.mg-input.mg-input--label-on-top .mg-input__input-group-container{margin-top:0.7rem}.mg-input__input-container mg-tooltip{margin-left:3rem}.mg-input__input-group-container{margin:0;padding:0;list-style:none;display:flex;flex-wrap:wrap;column-gap:2.3rem;row-gap:1rem;margin-top:calc((var(--default-size) - var(--font-size) * var(--line-height)) / 2)}.mg-input__input-group-container--vertical{flex-direction:column}.mg-input__input-group{display:flex;align-items:top}.sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){.mg-a11y-animation{animation:none !important;transition:none !important}}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi{display:flex;flex-wrap:wrap;gap:calc(var(--mg-inputs-spacer) * 1.2)}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi--with-values.mg-input__input-checkbox-multi{gap:0.4rem}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-values-container{display:flex;flex-wrap:wrap;gap:calc(0.4rem * 1);flex-direction:row;margin:0;padding:0;list-style:none}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-value{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;min-height:var(--default-size);min-width:var(--default-size);padding:calc((var(--default-size) - 0.2rem - var(--font-size) * var(--line-height)) / 2) 1.1rem;background-color:hsl(var(--mg-color-dark-5-hsl));border-radius:0.3rem;font-size:var(--font-size)}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-no-result{text-align:center}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-text,.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-title{display:inline;margin:0;color:hsl(var(--mg-color-dark-40-hsl))}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-title{margin:0 1.1rem}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-sections{display:flex;flex-wrap:wrap;gap:calc(0.4rem * 1);flex-direction:column}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-sections-container{display:flex;flex-wrap:nowrap;gap:calc(0.4rem * 0);flex-direction:column;max-height:80vh;padding-right:1rem;overflow-y:auto}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-section-header{display:flex;flex-wrap:wrap;gap:calc(0.4rem * 2);flex-direction:row;align-items:center;min-height:var(--default-size)}.mg-input.mg-input--checkbox-multi .mg-input__input-checkbox-multi-inputs{margin:0;padding:0.4rem calc(0.4rem * 2) 0.4rem calc(0.4rem / 2)}.mg-input.mg-input--checkbox-multi:not(.mg-input--label-on-top) mg-tooltip{margin-left:var(--mg-inputs-spacer)}.mg-input.mg-input--checkbox-multi mg-popover{--mg-popover-min-width:7rem;--mg-card-padding:calc(0.4rem * 2)}.mg-input.mg-input--checkbox-multi mg-popover [slot=content]{display:flex;flex-wrap:wrap;gap:calc(0.4rem * 2);flex-direction:column}.mg-input.mg-input--checkbox-multi mg-popover [slot=content] .mg-input__input-group{margin-left:calc(0.4rem * 2)}.mg-input.mg-input--checkbox-multi mg-input-text{--mg-inputs-margin-bottom:0}";
1284
1317
 
1285
1318
  /**
1286
1319
  * type CheckboxItem validation function
@@ -1294,30 +1327,20 @@ const MgInputCheckbox = class {
1294
1327
  registerInstance(this, hostRef);
1295
1328
  this.valueChange = createEvent(this, "value-change", 7);
1296
1329
  this.inputValid = createEvent(this, "input-valid", 7);
1297
- /************
1298
- * Internal *
1299
- ************/
1300
- // HTML selector
1301
- this.inputs = [];
1302
1330
  // hasDisplayedError (triggered by blur event)
1303
1331
  this.hasDisplayedError = false;
1304
1332
  // style
1305
1333
  this.baseClassName = 'mg-input--checkbox';
1334
+ // "multi" setup
1306
1335
  this.multiStart = 5;
1307
1336
  this.searchStart = 10;
1308
- this.searchOffset = 10;
1309
1337
  /**
1310
1338
  * Handle input event
1311
1339
  * @param event - input event
1312
1340
  */
1313
1341
  this.handleInput = (event) => {
1314
- this.checkboxItems = this.checkboxItems.map(item => {
1315
- if (item.id === event.target.id) {
1316
- item.value = Boolean(event.target.checked);
1317
- }
1318
- return item;
1319
- });
1320
- this.value = this.checkboxItems.map(o => ({ value: o.value, title: o.title, disabled: o.disabled }));
1342
+ this.updateCheckboxItems('value', Boolean(event.target.checked), item => item.id === event.target.id);
1343
+ this.updateValues();
1321
1344
  this.checkValidity();
1322
1345
  };
1323
1346
  /**
@@ -1328,10 +1351,17 @@ const MgInputCheckbox = class {
1328
1351
  var _a;
1329
1352
  // track "Tab" key event when popover display (is "multi" type selected)
1330
1353
  if (event.key === 'Tab' && ((_a = this.mgPopover) === null || _a === void 0 ? void 0 : _a.display)) {
1331
- const enableInputs = this.checkboxItems.filter(input => !input.disabled).map(({ id }) => id);
1354
+ // when search input and do a back tab we close the popover
1355
+ if (Boolean(this.searchInput) && event.shiftKey && this.searchInput.id === event.target.id) {
1356
+ this.mgPopover.display = false;
1357
+ return;
1358
+ }
1359
+ const enableInputs = Array.from(this.element.shadowRoot.querySelectorAll('input'))
1360
+ .filter(input => !Boolean(input.getAttribute('disabled')))
1361
+ .map(({ id }) => id);
1332
1362
  const originInputIndex = enableInputs.findIndex(id => id === event.target.id);
1333
1363
  // close popover when tab trigger focus outside its DOM
1334
- if ((originInputIndex + 1 >= enableInputs.length && !event.shiftKey) || (originInputIndex === 0 && event.shiftKey))
1364
+ if ((originInputIndex + 1 >= enableInputs.length && !event.shiftKey) || (originInputIndex === 0 && event.shiftKey && !Boolean(this.searchInput)))
1335
1365
  this.mgPopover.display = false;
1336
1366
  }
1337
1367
  };
@@ -1351,29 +1381,54 @@ const MgInputCheckbox = class {
1351
1381
  this.searchValue = event.detail;
1352
1382
  };
1353
1383
  /**
1354
- * Handle mg-pagination current page change event
1355
- * @param event - pagination current page change event
1384
+ * popover display-change handler
1385
+ * @param event - mg-popover display-change custom event
1356
1386
  */
1357
- this.handleCurrentPageChange = (event) => {
1358
- this.currentSearchPage = Number(event.detail);
1359
- };
1360
1387
  this.handleMgPopoverDisplayChange = (event) => {
1361
1388
  // reset search value
1362
1389
  if (!event.detail) {
1363
1390
  this.searchValue = '';
1364
- this.setCurrentSearchPage();
1391
+ this.checkValidity();
1365
1392
  }
1366
1393
  };
1394
+ /**
1395
+ * Handle select all button
1396
+ * @param event - mass action event trigger a global select/unselect on values
1397
+ */
1398
+ this.handleMassAction = (event) => {
1399
+ this.updateCheckboxItems('value', event.detail !== 'selected');
1400
+ this.updateValues();
1401
+ };
1402
+ /**
1403
+ * Update values
1404
+ */
1405
+ this.updateValues = () => {
1406
+ this.value = this.checkboxItems.map(o => ({ value: o.value, title: o.title, disabled: o.disabled }));
1407
+ };
1367
1408
  /**
1368
1409
  * get invalid element
1369
1410
  * @returns element
1370
1411
  */
1371
- this.getInvalidElement = () => this.inputs.find((input) => input !== null && !input.disabled && !input.checkValidity());
1412
+ this.getInvalidElement = () => {
1413
+ const items = Array.from(this.element.shadowRoot.querySelectorAll('input[type="checkbox"]'));
1414
+ return items.find(input => input !== null && !input.disabled && !input.checkValidity());
1415
+ };
1416
+ /**
1417
+ * Method to update searchResults
1418
+ */
1419
+ this.updateSearchResults = () => {
1420
+ this.searchResults = this.checkboxItems.filter(item => item.title.toLocaleLowerCase().includes(this.searchValue.trim().toLocaleLowerCase()));
1421
+ };
1422
+ /**
1423
+ * Methode to validate if one of inputs value is checked id required
1424
+ * @returns truthy if condition is valid
1425
+ */
1426
+ this.validateRequired = () => !this.required || this.checkboxItems.some(({ value }) => value);
1372
1427
  /**
1373
1428
  * Check if input is valid
1374
1429
  */
1375
1430
  this.checkValidity = () => {
1376
- this.valid = this.readonly || this.disabled || this.getInvalidElement() === undefined;
1431
+ this.valid = this.readonly || this.disabled || (this.getInvalidElement() === undefined && this.validateRequired());
1377
1432
  this.invalid = !this.valid;
1378
1433
  // We need to send valid event even if it is the same value
1379
1434
  this.inputValid.emit(this.valid);
@@ -1393,14 +1448,13 @@ const MgInputCheckbox = class {
1393
1448
  };
1394
1449
  /**
1395
1450
  * Set input error message
1451
+ * @param displayError - dispay error condition
1396
1452
  */
1397
- this.setErrorMessage = () => {
1398
- const invalidElement = this.getInvalidElement();
1453
+ this.setErrorMessage = (displayError = true) => {
1399
1454
  // Set error message
1400
1455
  this.errorMessage = undefined;
1401
- if (!this.valid && invalidElement.validity.valueMissing) {
1456
+ if (displayError && !this.valid && !this.validateRequired())
1402
1457
  this.errorMessage = this.messages.errors.required;
1403
- }
1404
1458
  };
1405
1459
  /**
1406
1460
  * Method to get mg-popover identifier
@@ -1412,12 +1466,6 @@ const MgInputCheckbox = class {
1412
1466
  * @returns items to display
1413
1467
  */
1414
1468
  this.getDisplayItems = () => (this.searchValue.length > 0 ? this.searchResults : this.checkboxItems);
1415
- /**
1416
- * Method to get pagination total-page
1417
- * @param checkboxes - checkboxes to paginate
1418
- * @returns total page number for pagination
1419
- */
1420
- this.getPaginationTotalPages = (checkboxes) => Math.ceil(checkboxes.length / this.searchOffset);
1421
1469
  this.value = undefined;
1422
1470
  this.type = checkboxTypes[0];
1423
1471
  this.identifier = undefined;
@@ -1438,7 +1486,6 @@ const MgInputCheckbox = class {
1438
1486
  this.errorMessage = undefined;
1439
1487
  this.checkboxItems = [];
1440
1488
  this.displaySearchInput = undefined;
1441
- this.currentSearchPage = 0;
1442
1489
  this.searchValue = '';
1443
1490
  this.searchResults = [];
1444
1491
  }
@@ -1449,6 +1496,10 @@ const MgInputCheckbox = class {
1449
1496
  title: item.title,
1450
1497
  value: item.value,
1451
1498
  disabled: item.disabled,
1499
+ required: item.required,
1500
+ handleInput: this.handleInput.bind(this),
1501
+ handleBlur: this.handleBlur.bind(this),
1502
+ handleKeydown: this.handleKeydown.bind(this),
1452
1503
  }));
1453
1504
  this.valueChange.emit(newValue);
1454
1505
  }
@@ -1475,13 +1526,12 @@ const MgInputCheckbox = class {
1475
1526
  throw new Error('<mg-input-checkbox> prop "displaySelectedValues" can only be used with prop type "multi".');
1476
1527
  }
1477
1528
  handleValidityChange(newValue, _oldValue, prop) {
1478
- this.inputs.forEach(input => {
1479
- input[prop] = newValue;
1480
- });
1529
+ if (prop !== 'readonly')
1530
+ this.updateCheckboxItems(prop, newValue);
1481
1531
  this.checkValidity();
1482
1532
  if (this.hasDisplayedError) {
1483
- this.setErrorMessage();
1484
- this.hasDisplayedError = false;
1533
+ this.hasDisplayedError = prop !== 'required';
1534
+ this.setErrorMessage(this.hasDisplayedError);
1485
1535
  }
1486
1536
  }
1487
1537
  validateDisabled(newValue) {
@@ -1494,13 +1544,15 @@ const MgInputCheckbox = class {
1494
1544
  validateCheckboxItems(newValue) {
1495
1545
  if (newValue.length > this.multiStart)
1496
1546
  this.type = 'multi';
1497
- if (newValue.length > this.searchStart)
1547
+ if (newValue.length > this.searchStart) {
1498
1548
  this.displaySearchInput = this.type === 'multi';
1549
+ // refresh search values
1550
+ this.updateSearchResults();
1551
+ }
1499
1552
  }
1500
- validateSearchValue(newValue) {
1501
- this.searchResults = this.checkboxItems.filter(item => item.title.toLocaleLowerCase().includes(newValue.trim().toLocaleLowerCase()));
1502
- // after each query we reset pagination
1503
- this.setCurrentSearchPage();
1553
+ validateSearchValue() {
1554
+ // refresh search values
1555
+ this.updateSearchResults();
1504
1556
  }
1505
1557
  /**
1506
1558
  * Public method to display errors
@@ -1511,29 +1563,17 @@ const MgInputCheckbox = class {
1511
1563
  this.hasDisplayedError = this.invalid;
1512
1564
  }
1513
1565
  /**
1514
- * Reset current-search-page prop
1515
- */
1516
- setCurrentSearchPage() {
1517
- this.currentSearchPage = this.getDisplayItems().length > 0 ? 1 : 0;
1518
- }
1519
- /**
1520
- * Method to get a array range
1521
- * @param from - array start index
1522
- * @param to - array end index
1523
- * @returns array's range
1524
- */
1525
- getArrayRange(array, from, to) {
1526
- return array.slice(from, to);
1527
- }
1528
- /**
1529
- * Get from and to index
1530
- * @returns [from,to] index
1566
+ * Update ckecboxes item
1567
+ * @param key - property to update
1568
+ * @param newValue - value to update with
1569
+ * @param condition - condtion to applu change on item
1531
1570
  */
1532
- getFromToIndexes() {
1533
- const isFirstPage = this.currentSearchPage === 1;
1534
- const checkboxItemsFromIndex = isFirstPage ? 0 : (this.currentSearchPage - 1) * this.searchOffset;
1535
- const checkboxItemsToIndex = isFirstPage ? this.searchOffset : this.currentSearchPage * this.searchOffset;
1536
- return [checkboxItemsFromIndex, checkboxItemsToIndex];
1571
+ updateCheckboxItems(key, newValue, condition) {
1572
+ this.checkboxItems = this.checkboxItems.map(item => {
1573
+ if ((typeof condition === 'function' && condition(item)) || condition === undefined)
1574
+ item[key] = newValue;
1575
+ return item;
1576
+ });
1537
1577
  }
1538
1578
  /*************
1539
1579
  * Lifecycle *
@@ -1550,7 +1590,6 @@ const MgInputCheckbox = class {
1550
1590
  this.validateValue(this.value);
1551
1591
  this.validateDisabled(this.disabled);
1552
1592
  this.validateDisplaySelectedValues(this.displaySelectedValues);
1553
- this.setCurrentSearchPage();
1554
1593
  // Check validity when component is ready
1555
1594
  // return a promise to process action only in the FIRST render().
1556
1595
  // https://stenciljs.com/docs/component-lifecycle#componentwillload
@@ -1558,6 +1597,14 @@ const MgInputCheckbox = class {
1558
1597
  this.checkValidity();
1559
1598
  }, 0);
1560
1599
  }
1600
+ /**
1601
+ * add listeners
1602
+ */
1603
+ componentDidLoad() {
1604
+ var _a, _b;
1605
+ this.searchInput = (_a = this.element.shadowRoot.querySelector('mg-input-text')) === null || _a === void 0 ? void 0 : _a.shadowRoot.querySelector('input');
1606
+ (_b = this.searchInput) === null || _b === void 0 ? void 0 : _b.addEventListener('keydown', this.handleKeydown);
1607
+ }
1561
1608
  /**
1562
1609
  * Render checkbox multi display values
1563
1610
  * @param selectedValuesNb - selected values length
@@ -1574,16 +1621,25 @@ const MgInputCheckbox = class {
1574
1621
  }
1575
1622
  }
1576
1623
  /**
1577
- * Render paginated checkboxes
1624
+ * Render checkboxes by section
1578
1625
  * @param checkboxes - checkboxes to render
1579
- * @returns paginated checkboxes
1626
+ * @returns render sections of checkboxes
1580
1627
  */
1581
- renderPaginatedCheckboxes(checkboxes) {
1582
- const [checkboxItemsFromIndex, checkboxItemsToIndex] = this.getFromToIndexes();
1583
- return [
1584
- this.renderCheckboxes(this.getArrayRange(checkboxes, checkboxItemsFromIndex, checkboxItemsToIndex)),
1585
- h("mg-pagination", { key: "search-pagination", totalPages: this.getPaginationTotalPages(checkboxes), currentPage: this.currentSearchPage, "onCurrent-page-change": this.handleCurrentPageChange, hideNavigationLabels: true, identifier: `${this.identifier}-pagination` }),
1628
+ renderCheckboxBySection(checkboxes) {
1629
+ const [checkedValues, notCheckedValues] = checkboxes.reduce((acc, curr) => {
1630
+ acc[curr.value ? 0 : 1].push(curr);
1631
+ return acc;
1632
+ }, [[], []]);
1633
+ const baseSection = {
1634
+ readonly: this.readonly,
1635
+ disabled: this.disabled,
1636
+ identifier: this.identifier,
1637
+ };
1638
+ const sections = [
1639
+ Object.assign(Object.assign({}, baseSection), { sectionKind: SectionKind.SELECTED, checkboxes: checkedValues, messages: this.messages.input.checkbox.sections.selected }),
1640
+ Object.assign(Object.assign({}, baseSection), { sectionKind: SectionKind.NOT_SELECTED, checkboxes: notCheckedValues, messages: this.messages.input.checkbox.sections.notSelected }),
1586
1641
  ];
1642
+ return sections.map(section => h("mg-input-checkbox-paginated", Object.assign({}, section, { "onMass-action": this.handleMassAction })));
1587
1643
  }
1588
1644
  /**
1589
1645
  * render checkbox multi element
@@ -1598,31 +1654,14 @@ const MgInputCheckbox = class {
1598
1654
  } }, h("mg-button", { variant: "secondary" }, h("mg-icon", { icon: "list" }), this.renderButtonText(selectedValuesNb)), h("div", { slot: "content" }, this.displaySearchInput && [
1599
1655
  h("mg-input-text", { key: "input-search", identifier: `${this.identifier}-input-search`, icon: "magnifying-glass", type: "search", placeholder: this.messages.input.checkbox.label, label: this.messages.input.checkbox.label, mgWidth: "full", value: this.searchValue, labelHide: true, displayCharacterLeft: false, name: "q", "onValue-change": this.handleSearchChange, "aria-controls": "search-results items-list" }),
1600
1656
  h("p", { key: "search-results", role: "status", class: "sr-only", id: "search-results" }, `${checkboxes.length} ${this.messages.input.checkbox[checkboxes.length > 0 ? 'results' : 'result']}`),
1601
- ], this.displaySearchInput && this.getPaginationTotalPages(checkboxes) > 1 ? this.renderPaginatedCheckboxes(checkboxes) : this.renderCheckboxes(checkboxes), this.displaySearchInput && checkboxes.length === 0 && h("p", { class: "mg-input__input-checkbox-multi-no-result" }, this.messages.input.checkbox.noResult)))));
1602
- }
1603
- /**
1604
- * Render checkbox element
1605
- * @param checkboxes - checkboxes to render
1606
- * @returns HTML Element
1607
- */
1608
- renderCheckboxes(checkboxes) {
1609
- return (h("ul", { class: {
1610
- 'mg-input__input-group-container': true,
1611
- 'mg-input__input-group-container--vertical': this.inputVerticalList || (this.type === 'multi' && !this.readonly),
1612
- 'mg-input__input-checkbox-multi-inputs': this.type === 'multi' && !this.readonly,
1613
- }, role: "list", "aria-describedby": this.displaySearchInput ? 'search-results' : false, "aria-label": this.displaySearchInput ? this.messages.input.checkbox.searchResults : false, "aria-live": this.displaySearchInput ? 'polite' : false, id: "items-list", key: "checkboxes" }, checkboxes
1614
- .filter(item => !this.readonly || item.value)
1615
- .map((input, index) => (h("li", { key: input.id, class: { 'mg-input__input-group': true, 'mg-input__input-group--disabled': this.disabled || input.disabled } }, h("input", { type: "checkbox", id: input.id, name: this.identifier, value: input.value && input.value.toString(), checked: Boolean(input.value), disabled: this.readonly || this.disabled || input.disabled, required: this.required, indeterminate: input.value === null, onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeydown, ref: el => {
1616
- if (el !== null)
1617
- this.inputs[index] = el;
1618
- } }), h("label", { htmlFor: input.id }, input.title))))));
1657
+ ], this.displaySearchInput ? (h("div", { class: "mg-input__input-checkbox-multi-sections-container" }, this.renderCheckboxBySection(checkboxes))) : (h(MgInputCheckboxList, { checkboxes: checkboxes, inputVerticalList: true, type: this.type, readonly: this.readonly, displaySearchInput: this.displaySearchInput, messages: this.messages.input.checkbox, id: "checkboxes-list", disabled: this.disabled, name: this.name })), this.displaySearchInput && checkboxes.length === 0 && h("p", { class: "mg-input__input-checkbox-multi-no-result" }, this.messages.input.checkbox.noResult)))));
1619
1658
  }
1620
1659
  /**
1621
1660
  * Render
1622
1661
  * @returns HTML Element
1623
1662
  */
1624
1663
  render() {
1625
- return (h(MgInput, { identifier: this.identifier, classCollection: this.classCollection, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: !this.readonly ? this.required : undefined, readonly: undefined, mgWidth: undefined, disabled: this.disabled, value: this.value && this.value.toString(), readonlyValue: undefined, tooltip: !this.readonly ? this.tooltip : undefined, helpText: !this.readonly ? this.helpText : undefined, errorMessage: !this.readonly ? this.errorMessage : undefined, isFieldset: true }, this.type === 'checkbox' || this.readonly ? this.renderCheckboxes(this.checkboxItems) : this.renderCheckboxMulti()));
1664
+ return (h(MgInput, { identifier: this.identifier, classCollection: this.classCollection, ariaDescribedbyIDs: [], label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: !this.readonly ? this.required : undefined, readonly: undefined, mgWidth: undefined, disabled: this.disabled, value: this.value && this.value.toString(), readonlyValue: undefined, tooltip: !this.readonly ? this.tooltip : undefined, helpText: !this.readonly ? this.helpText : undefined, errorMessage: !this.readonly ? this.errorMessage : undefined, isFieldset: true }, this.type === 'checkbox' || this.readonly ? (h(MgInputCheckboxList, { checkboxes: this.checkboxItems, inputVerticalList: this.inputVerticalList, type: this.type, readonly: this.readonly, displaySearchInput: this.displaySearchInput, messages: this.messages.input.checkbox, id: "checkboxes-list", disabled: this.disabled, name: this.name })) : (this.renderCheckboxMulti())));
1626
1665
  }
1627
1666
  get element() { return getElement(this); }
1628
1667
  static get watchers() { return {
@@ -1638,6 +1677,109 @@ const MgInputCheckbox = class {
1638
1677
  };
1639
1678
  MgInputCheckbox.style = mgInputCheckboxCss;
1640
1679
 
1680
+ const MgInputCheckboxPaginated = class {
1681
+ constructor(hostRef) {
1682
+ registerInstance(this, hostRef);
1683
+ this.massAction = createEvent(this, "mass-action", 7);
1684
+ /*************
1685
+ * Constantes *
1686
+ *************/
1687
+ this.offset = 10;
1688
+ /***********
1689
+ * Methods *
1690
+ ***********/
1691
+ /**
1692
+ * Mass action handler
1693
+ */
1694
+ this.massActionHandler = () => {
1695
+ this.massAction.emit(this.sectionKind);
1696
+ };
1697
+ /**
1698
+ * Toogle items button handler
1699
+ */
1700
+ this.handleToggleClick = () => {
1701
+ this.itemsExpanded = !this.itemsExpanded;
1702
+ };
1703
+ /**
1704
+ * Method to get a array range
1705
+ * @param from - array start index
1706
+ * @param to - array end index
1707
+ * @returns array's range
1708
+ */
1709
+ this.getArrayRange = (array, from, to) => array.slice(from, to);
1710
+ /**
1711
+ * Method to get page count from items
1712
+ * @param items - items to count
1713
+ * @returns page count from items
1714
+ */
1715
+ this.getPageCount = (item) => Math.ceil(item.length / this.offset);
1716
+ /**
1717
+ * Handle mg-pagination current page change event
1718
+ * @param event - pagination current page change event
1719
+ */
1720
+ this.handleCurrentPageChange = (event) => {
1721
+ this.currentPage = Number(event.detail);
1722
+ };
1723
+ this.readonly = undefined;
1724
+ this.disabled = undefined;
1725
+ this.name = undefined;
1726
+ this.checkboxes = [];
1727
+ this.sectionKind = undefined;
1728
+ this.messages = undefined;
1729
+ this.titleKind = undefined;
1730
+ this.currentPage = 1;
1731
+ this.itemsExpanded = true;
1732
+ }
1733
+ validateCheckboxes(newValue, oldValue) {
1734
+ // after each array.length update we reset pagination
1735
+ // when items fill on page, we set current page to 1
1736
+ if (this.getPageCount(newValue) === 1)
1737
+ this.currentPage = 1;
1738
+ // when old items page numbers match the current page AND new items page number is lower than current page, we set the new last page
1739
+ else if (this.getPageCount(oldValue) === this.currentPage && this.getPageCount(newValue) < this.currentPage)
1740
+ this.currentPage = this.getPageCount(newValue);
1741
+ }
1742
+ validateSectionKind(newValue) {
1743
+ if (newValue === SectionKind.SELECTED)
1744
+ this.titleKind = SectionTitleKind.BUTTON;
1745
+ else
1746
+ this.titleKind = SectionTitleKind.TEXT;
1747
+ }
1748
+ /**
1749
+ * Get from and to index
1750
+ * @returns [from,to] index
1751
+ */
1752
+ getFromToIndexes() {
1753
+ const isFirstPage = this.currentPage === 1;
1754
+ const checkboxItemsFromIndex = isFirstPage ? 0 : (this.currentPage - 1) * this.offset;
1755
+ const checkboxItemsToIndex = isFirstPage ? this.offset : this.currentPage * this.offset;
1756
+ return [checkboxItemsFromIndex, checkboxItemsToIndex];
1757
+ }
1758
+ /*************
1759
+ * Lifecycle *
1760
+ *************/
1761
+ /**
1762
+ * Check if component props are well configured on init
1763
+ */
1764
+ componentWillLoad() {
1765
+ this.validateSectionKind(this.sectionKind);
1766
+ }
1767
+ /**
1768
+ * Render
1769
+ * @returns HTML Element
1770
+ */
1771
+ render() {
1772
+ const [checkboxItemsFromIndex, checkboxItemsToIndex] = this.getFromToIndexes();
1773
+ const itemsContainerId = `items-${this.sectionKind}-container`;
1774
+ const getText = (checkboxes) => h("em", null, `${this.messages[checkboxes.length > 1 ? 'titlePlurial' : 'title']} (${checkboxes.length})`);
1775
+ return (h(Host, { hidden: this.checkboxes.length < 1 }, h("div", { class: "mg-input__input-checkbox-multi-section-header" }, this.titleKind === SectionTitleKind.BUTTON ? (h("mg-button", { variant: "flat", onClick: this.handleToggleClick, "aria-controls": itemsContainerId, "aria-expanded": this.itemsExpanded.toString() }, h("mg-icon", { icon: this.itemsExpanded ? 'chevron-up' : 'chevron-down', size: "small" }), h("span", { class: "mg-input__input-checkbox-multi-text" }, getText(this.checkboxes)))) : (h("p", { class: "mg-input__input-checkbox-multi-title" }, getText(this.checkboxes))), ((this.sectionKind === SectionKind.SELECTED && this.itemsExpanded) || this.sectionKind === SectionKind.NOT_SELECTED) && (h("mg-button", { variant: "link", onClick: this.massActionHandler }, this.messages.action)), this.getPageCount(this.checkboxes) > 1 && (h("mg-pagination", { key: "search-pagination", totalPages: this.getPageCount(this.checkboxes), currentPage: this.currentPage > 1 ? this.currentPage : 1, "onCurrent-page-change": this.handleCurrentPageChange, hideNavigationLabels: true, hidePageCount: true, identifier: `input-checkbox-pagination-${this.sectionKind}` }))), h("div", { hidden: !this.itemsExpanded, id: itemsContainerId, class: "mg-input__input-checkbox-multi-section-content" }, h(MgInputCheckboxList, { checkboxes: this.getArrayRange(this.checkboxes, checkboxItemsFromIndex, checkboxItemsToIndex), inputVerticalList: true, type: 'multi', displaySearchInput: true, messages: this.messages, id: `items-${this.sectionKind}`, readonly: this.readonly, disabled: this.disabled, name: this.name }))));
1776
+ }
1777
+ static get watchers() { return {
1778
+ "checkboxes": ["validateCheckboxes"],
1779
+ "sectionKind": ["validateSectionKind"]
1780
+ }; }
1781
+ };
1782
+
1641
1783
  var InputError$1;
1642
1784
  (function (InputError) {
1643
1785
  InputError["MIN"] = "min";
@@ -3379,7 +3521,7 @@ const MgMenu = class {
3379
3521
  * @returns HTML Element
3380
3522
  */
3381
3523
  render() {
3382
- return (h(Host, { role: this.isChildMenu ? 'menu' : 'menubar', "aria-label": this.label }, h("slot", null)));
3524
+ return (h(Host, { role: "list", "aria-label": this.label }, h("slot", null)));
3383
3525
  }
3384
3526
  get element() { return getElement(this); }
3385
3527
  static get watchers() { return {
@@ -3672,7 +3814,7 @@ const MgMenuItem = class {
3672
3814
  [`${this.name}__collapse-container`]: true,
3673
3815
  [`${this.name}__collapse-container--first-level`]: (this.isInMainMenu || this.isItemMore) && this.isDirection(Direction.HORIZONTAL),
3674
3816
  });
3675
- return (h(Host, { role: !this.isItemMore && 'menuitem', "aria-haspopup": !this.isItemMore && this.hasChildren.toString() }, this.displayPopover() ? (h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.getPopoverIdentifier() }, this.renderInteractiveElement(), h("div", { class: getContainerClasses(), slot: "content" }, this.renderSlot()))) : ([
3817
+ return (h(Host, { role: "listitem" }, this.displayPopover() ? (h("mg-popover", { display: this.expanded, placement: "bottom-start", arrowHide: true, "onDisplay-change": this.handlePopoverDisplay, identifier: this.getPopoverIdentifier() }, this.renderInteractiveElement(), h("div", { class: getContainerClasses(), slot: "content" }, this.renderSlot()))) : ([
3676
3818
  this.renderInteractiveElement(),
3677
3819
  h("div", { key: "vertical-container", class: getContainerClasses(), hidden: !this.expanded }, this.renderSlot()),
3678
3820
  ])));
@@ -3999,7 +4141,7 @@ var NavigationAction;
3999
4141
  NavigationAction["PREVIOUS"] = "previous";
4000
4142
  })(NavigationAction || (NavigationAction = {}));
4001
4143
 
4002
- const mgPaginationCss = ".sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){.mg-a11y-animation{animation:none !important;transition:none !important}}.mg-pagination{display:flex;align-items:center;flex-direction:row}.mg-pagination mg-input-select{margin-right:0.5rem}.mg-pagination mg-button{display:flex}.mg-pagination mg-button:first-of-type{margin-right:1rem}.mg-pagination mg-button:last-of-type{margin-left:1rem}";
4144
+ const mgPaginationCss = ".sr-only{border:0 !important;clip:rect(1px, 1px, 1px, 1px) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){.mg-a11y-animation{animation:none !important;transition:none !important}}.mg-pagination{display:flex;align-items:center;flex-direction:row}.mg-pagination mg-input-select{margin-right:0.5rem}.mg-pagination mg-button{display:flex}.mg-pagination mg-button:first-of-type{margin-right:1rem}.mg-pagination mg-button:last-of-type{margin-left:1rem}.mg-pagination.mg-pagination--hide-page-count mg-button{margin:0}";
4003
4145
 
4004
4146
  /**
4005
4147
  * Range generator
@@ -4056,6 +4198,7 @@ const MgPagination = class {
4056
4198
  this.identifier = createID('mg-pagination');
4057
4199
  this.label = undefined;
4058
4200
  this.hideNavigationLabels = undefined;
4201
+ this.hidePageCount = undefined;
4059
4202
  this.totalPages = 1;
4060
4203
  this.currentPage = 1;
4061
4204
  }
@@ -4098,7 +4241,7 @@ const MgPagination = class {
4098
4241
  const navigationActionButton = (disabled, action) => (h("mg-button", { identifier: `${this.identifier}-button-${action}`, label: this.messages.pagination[`${action}Page`],
4099
4242
  // eslint-disable-next-line react/jsx-no-bind
4100
4243
  onClick: () => this.handleGoToPage(action, disabled), disabled: disabled, variant: "flat", isIcon: this.hideNavigationLabels }, action === NavigationAction.PREVIOUS && h("mg-icon", { icon: "chevron-left" }), !this.hideNavigationLabels && this.messages.general[action], action === NavigationAction.NEXT && h("mg-icon", { icon: "chevron-right" })));
4101
- return (h("nav", { "aria-label": this.label, id: this.identifier, class: "mg-pagination" }, navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS), h("mg-input-select", { identifier: `${this.identifier}-select`, items: range(1, this.totalPages).map(page => page.toString()), label: this.messages.pagination.selectPage, "label-hide": true, "on-value-change": this.handleSelect, value: this.currentPage.toString(), "placeholder-hide": true }), h("span", { class: "sr-only" }, this.messages.pagination.page, " ", this.currentPage), h("span", null, "/ ", this.totalPages, " ", this.totalPages > 1 ? this.messages.pagination.pages : this.messages.pagination.page), navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT)));
4244
+ return (h("nav", { "aria-label": this.label, id: this.identifier, class: { 'mg-pagination': true, 'mg-pagination--hide-page-count': this.hidePageCount } }, navigationActionButton(this.currentPage <= 1, NavigationAction.PREVIOUS), !this.hidePageCount && (h("mg-input-select", { identifier: `${this.identifier}-select`, items: range(1, this.totalPages).map(page => page.toString()), label: this.messages.pagination.selectPage, "label-hide": true, "on-value-change": this.handleSelect, value: this.currentPage.toString(), "placeholder-hide": true })), h("span", { class: "sr-only" }, this.messages.pagination.page, " ", this.currentPage), h("span", { class: { 'sr-only': this.hidePageCount } }, "/ ", this.totalPages, " ", this.totalPages > 1 ? this.messages.pagination.pages : this.messages.pagination.page), navigationActionButton(this.currentPage >= this.totalPages, NavigationAction.NEXT)));
4102
4245
  }
4103
4246
  get element() { return getElement(this); }
4104
4247
  static get watchers() { return {
@@ -4108,7 +4251,16 @@ const MgPagination = class {
4108
4251
  };
4109
4252
  MgPagination.style = mgPaginationCss;
4110
4253
 
4111
- const mgPanelCss = ":host{--mg-card-border:none;--mg-card-padding:0;--mg-card-border-radius:var(--mg-panel-border-radius);--mg-card-background:hsl(var(--mg-panel-background));--mg-card-box-shadow:var(--mg-panel-box-shadow)}.mg-panel__header{display:flex;flex-wrap:wrap;justify-content:space-between;padding:0 1rem 0 0.3rem;align-items:flex-start}.mg-panel__header-left,.mg-panel__header-right{display:flex;margin:0.3rem 0}.mg-panel__header-right{padding-left:0.3rem;flex:1 auto;min-height:var(--default-size);align-items:center}.mg-panel__header-left mg-input-text{flex-grow:1;margin-left:0.3rem}.mg-panel__header-left mg-button+mg-button:not([slot=append-input]){margin-left:0.3rem}.mg-panel__header-left.mg-panel__header-left--full{flex:1 1 auto}.mg-panel__collapse-button-content{--font-size:1.4rem;--mg-button-font-weight:600}.mg-panel__content{padding:var(--mg-panel-content-padding)}.mg-panel ::slotted([slot=header-right]){display:flex;flex-wrap:wrap;gap:1rem;margin-left:auto}.mg-panel ::slotted(*){--mg-card-border:var(--mg-card-border-default);--mg-card-padding:var(--mg-card-padding-default);--mg-card-border-radius:var(--mg-card-border-radius-default);--mg-card-background:var(--mg-card-background-default);--mg-card-box-shadow:var(--mg-card-box-shadow-default);--mg-card-max-width:unset;--mg-card-min-width:unset}";
4254
+ /**
4255
+ * Available expand toggle display options
4256
+ */
4257
+ const expandToggleDisplays = ['text', 'icon'];
4258
+ /**
4259
+ * Available title positions
4260
+ */
4261
+ const titlePositions = ['left', 'right'];
4262
+
4263
+ const mgPanelCss = ":host{--mg-card-border:none;--mg-card-padding:0;--mg-card-border-radius:var(--mg-panel-border-radius);--mg-card-background:hsl(var(--mg-panel-background));--mg-card-box-shadow:var(--mg-panel-box-shadow)}.mg-panel__header{display:flex;flex-wrap:wrap;justify-content:space-between;padding:0 1rem 0 0.3rem;align-items:flex-start}.mg-panel__header.mg-panel__header--reverse{padding-right:0.3rem;padding-left:1rem}.mg-panel__header-title,.mg-panel__header-content{display:flex;margin:0.3rem 0}.mg-panel__header-content{padding-left:0.3rem;flex:1 auto;min-height:var(--default-size);align-items:center}.mg-panel__header-title mg-input-text{flex-grow:1;margin-left:0.3rem}.mg-panel__header-title mg-button+mg-button:not([slot=append-input]){margin-left:0.3rem}.mg-panel__header-title.mg-panel__header-title--full{flex:1 1 auto}.mg-panel__collapse-button-content{--font-size:1.4rem;--mg-button-font-weight:600}.mg-panel__content{padding:var(--mg-panel-content-padding)}.mg-panel ::slotted([slot=header-right]){display:flex;flex-wrap:wrap;gap:1rem;margin-left:auto}.mg-panel ::slotted(*){--mg-card-border:var(--mg-card-border-default);--mg-card-padding:var(--mg-card-padding-default);--mg-card-border-radius:var(--mg-card-border-radius-default);--mg-card-background:var(--mg-card-background-default);--mg-card-box-shadow:var(--mg-card-box-shadow-default);--mg-card-max-width:unset;--mg-card-min-width:unset}";
4112
4264
 
4113
4265
  const MgPanel = class {
4114
4266
  constructor(hostRef) {
@@ -4131,9 +4283,8 @@ const MgPanel = class {
4131
4283
  * Collapse button click handler
4132
4284
  */
4133
4285
  this.handleCollapseButton = () => {
4134
- if (!this.expandToggleDisabled) {
4286
+ if (!this.expandToggleDisabled)
4135
4287
  this.expanded = !this.expanded;
4136
- }
4137
4288
  };
4138
4289
  /**
4139
4290
  * Edit button click handler
@@ -4159,60 +4310,92 @@ const MgPanel = class {
4159
4310
  * Validate edition button handler
4160
4311
  */
4161
4312
  this.handleValidateEditButton = () => {
4162
- if (this.editInputElement.valid) {
4163
- if (this.updatedPanelTitle !== undefined)
4164
- this.panelTitle = this.updatedPanelTitle;
4165
- this.toggleIsEditing();
4166
- }
4313
+ if (!this.editInputElement.valid)
4314
+ return;
4315
+ if (this.updatedPanelTitle !== undefined)
4316
+ this.panelTitle = this.updatedPanelTitle;
4317
+ this.toggleIsEditing();
4167
4318
  };
4319
+ /*************
4320
+ * Render *
4321
+ *************/
4168
4322
  /**
4169
- * Header left conditional render
4170
- * @returns header left element
4323
+ * Render collapse button
4324
+ * @returns collpase button
4171
4325
  */
4172
- this.headerLeft = () => {
4173
- const collapseButton = () => (h("mg-button", { onClick: this.handleCollapseButton, variant: "flat", identifier: `${this.identifier}-collapse-button`, "aria-expanded": this.expanded !== undefined && this.expanded.toString(), "aria-controls": `${this.identifier}-content`, disabled: this.expandToggleDisabled }, h("span", { class: "mg-panel__collapse-button-content" }, h("mg-icon", { icon: this.expanded ? 'chevron-up' : 'chevron-down' }), !this.isEditing && this.panelTitle)));
4174
- if (this.titleEditable && !this.isEditing) {
4175
- return [
4176
- collapseButton(),
4177
- h("mg-button", { key: "edit-button", "is-icon": true, variant: "flat", label: this.messages.panel.editLabel, onClick: this.handleEditButton, identifier: `${this.identifier}-edit-button` }, h("mg-icon", { icon: "pen" })),
4178
- ];
4179
- }
4180
- if (this.titleEditable && this.isEditing) {
4181
- return [
4182
- collapseButton(),
4183
- h("mg-input-text", { key: "edition-input", label: this.messages.panel.editLabel, "label-hide": true, value: this.panelTitle, "onValue-change": this.handleUpdateTitle, displayCharacterLeft: false, pattern: this.titlePattern, "pattern-error-message": this.titlePatternErrorMessage, identifier: `${this.identifier}-edition-input`, ref: el => (this.editInputElement = el) }, h("mg-button", { slot: "append-input", label: this.messages.general.cancel, "is-icon": true, variant: "secondary", onClick: this.handleCancelEditButton, identifier: `${this.identifier}-edition-button-cancel` }, h("mg-icon", { icon: "cross" })), h("mg-button", { slot: "append-input", label: this.messages.general.confirm, "is-icon": true, variant: "secondary", onClick: this.handleValidateEditButton, identifier: `${this.identifier}-edition-button-validate` }, h("mg-icon", { icon: "check" }))),
4184
- ];
4326
+ this.renderCollapseButton = () => (h("mg-button", { onClick: this.handleCollapseButton, variant: "flat", identifier: `${this.identifier}-collapse-button`, "aria-expanded": this.expanded !== undefined && this.expanded.toString(), "aria-controls": `${this.identifier}-content`, disabled: this.expandToggleDisabled, isIcon: this.expandToggleDisplay === 'icon', label: this.panelTitle }, h("span", { class: "mg-panel__collapse-button-content" }, h("mg-icon", { icon: this.expanded ? 'chevron-up' : 'chevron-down' }), !this.isEditing && this.expandToggleDisplay !== 'icon' && this.panelTitle)));
4327
+ /**
4328
+ * Render edit button
4329
+ * @returns edit Button
4330
+ */
4331
+ this.renderEditButton = () => (h("mg-button", { key: "edit-button", "is-icon": true, variant: "flat", label: this.messages.panel.editLabel, onClick: this.handleEditButton, identifier: `${this.identifier}-edit-button` }, h("mg-icon", { icon: "pen" })));
4332
+ /**
4333
+ * Render input button
4334
+ * @returns edit title input
4335
+ */
4336
+ this.renderEditInput = () => (h("mg-input-text", { key: "edition-input", label: this.messages.panel.editLabel, "label-hide": true, value: this.panelTitle, "onValue-change": this.handleUpdateTitle, displayCharacterLeft: false, pattern: this.titlePattern, "pattern-error-message": this.titlePatternErrorMessage, identifier: `${this.identifier}-edition-input`, ref: el => (this.editInputElement = el) }, h("mg-button", { slot: "append-input", label: this.messages.general.cancel, "is-icon": true, variant: "secondary", onClick: this.handleCancelEditButton, identifier: `${this.identifier}-edition-button-cancel` }, h("mg-icon", { icon: "cross" })), h("mg-button", { slot: "append-input", label: this.messages.general.confirm, "is-icon": true, variant: "secondary", onClick: this.handleValidateEditButton, identifier: `${this.identifier}-edition-button-validate` }, h("mg-icon", { icon: "check" }))));
4337
+ /**
4338
+ * Render title
4339
+ * @returns title element
4340
+ */
4341
+ this.renderTitle = () => {
4342
+ const elementsToRender = [this.renderCollapseButton()];
4343
+ if (this.titleEditable) {
4344
+ if (!this.isEditing)
4345
+ elementsToRender.push(this.renderEditButton());
4346
+ else
4347
+ elementsToRender.push(this.renderEditInput());
4185
4348
  }
4186
- return collapseButton();
4349
+ return this.titlePosition === 'right' ? elementsToRender.reverse() : elementsToRender;
4350
+ };
4351
+ /**
4352
+ * Render header children
4353
+ * @returns header child
4354
+ */
4355
+ this.renderHeaderChildren = () => {
4356
+ const children = [
4357
+ h("div", { class: { 'mg-panel__header-title': true, 'mg-panel__header-title--full': this.isEditing, 'mg-panel__header-title--reverse': this.titlePosition === 'right' }, key: this.panelTitle }, this.renderTitle()),
4358
+ h("div", { class: "mg-panel__header-content", key: "slot-header" }, h("slot", { name: "header-right" })),
4359
+ ];
4360
+ return this.titlePosition === 'right' ? children.reverse() : children;
4187
4361
  };
4188
4362
  this.identifier = createID('mg-panel');
4189
4363
  this.panelTitle = undefined;
4190
4364
  this.titlePattern = undefined;
4191
4365
  this.titlePatternErrorMessage = undefined;
4366
+ this.titleEditable = false;
4367
+ this.titlePosition = titlePositions[0];
4192
4368
  this.expanded = false;
4369
+ this.expandToggleDisplay = expandToggleDisplays[0];
4193
4370
  this.expandToggleDisabled = undefined;
4194
- this.titleEditable = false;
4195
4371
  this.classCollection = new ClassList(['mg-panel']);
4196
4372
  this.isEditing = false;
4197
4373
  this.updatedPanelTitle = undefined;
4198
4374
  }
4199
4375
  validatePanelTitle(newValue) {
4200
- if (typeof newValue !== 'string' || newValue.trim() === '') {
4376
+ if (typeof newValue !== 'string' || newValue.trim() === '')
4201
4377
  throw new Error('<mg-panel> prop "panelTitle" is required.');
4202
- }
4203
4378
  this.titleChange.emit(newValue);
4204
4379
  }
4205
4380
  validatetitlePattern(newValue) {
4206
- if (newValue !== undefined && !this.titleEditable) {
4381
+ if (newValue !== undefined && !this.titleEditable)
4207
4382
  throw new Error('<mg-panel> prop "titleEditable" must be set to `true`.');
4208
- }
4209
- if (newValue !== undefined && (this.titlePatternErrorMessage === undefined || this.titlePatternErrorMessage.trim() === '')) {
4383
+ if (newValue !== undefined && (this.titlePatternErrorMessage === undefined || this.titlePatternErrorMessage.trim() === ''))
4210
4384
  throw new Error('<mg-panel> prop "titlePattern" must be paired with the prop "titlePatternErrorMessage".');
4211
- }
4385
+ }
4386
+ validateTitlePosition(newValue) {
4387
+ if (!titlePositions.includes(newValue))
4388
+ throw new Error(`<mg-panel> prop "titlePosition" must be one of: ${titlePositions.join(', ')}.`);
4212
4389
  }
4213
4390
  handleExpanded(newValue) {
4214
4391
  this.expandedChange.emit(newValue);
4215
4392
  }
4393
+ validateExpandToggleDisplay(newValue) {
4394
+ if (!expandToggleDisplays.includes(newValue))
4395
+ throw new Error(`<mg-panel> prop "expandToggleDisplay" must be one of: ${expandToggleDisplays.join(', ')}.`);
4396
+ if (newValue === 'icon' && this.titleEditable)
4397
+ this.titleEditable = false;
4398
+ }
4216
4399
  /*************
4217
4400
  * Lifecycle *
4218
4401
  *************/
@@ -4225,28 +4408,32 @@ const MgPanel = class {
4225
4408
  // Validate
4226
4409
  this.validatetitlePattern(this.titlePattern);
4227
4410
  this.validatePanelTitle(this.panelTitle);
4411
+ this.validateExpandToggleDisplay(this.expandToggleDisplay);
4412
+ this.validateTitlePosition(this.titlePosition);
4228
4413
  }
4229
4414
  /**
4230
4415
  * Edit DOM after render
4231
4416
  */
4232
4417
  componentDidRender() {
4233
4418
  // when we are editing we get focus on edition input
4234
- if (this.isEditing) {
4419
+ if (this.isEditing)
4235
4420
  this.editInputElement.setFocus();
4236
- }
4237
4421
  }
4238
4422
  /**
4239
4423
  * Render component
4240
- * @returns html element
4424
+ * @returns rendered component
4241
4425
  */
4242
4426
  render() {
4243
- return (h("section", { class: this.classCollection.join(), id: this.identifier }, h("mg-card", null, h("header", { class: "mg-panel__header", id: `${this.identifier}-header` }, h("div", { class: `mg-panel__header-left ${this.isEditing ? 'mg-panel__header-left--full' : ''}` }, this.headerLeft()), h("div", { class: "mg-panel__header-right" }, h("slot", { name: "header-right" }))), h("article", { class: "mg-panel__content", id: `${this.identifier}-content`, "aria-labelledby": `${this.identifier}-header`, hidden: !this.expanded }, h("slot", null)))));
4427
+ const headerId = `${this.identifier}-header`;
4428
+ return (h("section", { class: this.classCollection.join(), id: this.identifier }, h("mg-card", null, h("header", { class: { 'mg-panel__header': true, 'mg-panel__header--reverse': this.titlePosition === 'right' }, id: headerId }, this.renderHeaderChildren()), h("article", { class: "mg-panel__content", id: `${this.identifier}-content`, "aria-labelledby": headerId, hidden: !this.expanded }, h("slot", null)))));
4244
4429
  }
4245
4430
  get element() { return getElement(this); }
4246
4431
  static get watchers() { return {
4247
4432
  "panelTitle": ["validatePanelTitle"],
4248
4433
  "titlePattern": ["validatetitlePattern"],
4249
- "expanded": ["handleExpanded"]
4434
+ "titlePosition": ["validateTitlePosition"],
4435
+ "expanded": ["handleExpanded"],
4436
+ "expandToggleDisplay": ["validateExpandToggleDisplay"]
4250
4437
  }; }
4251
4438
  };
4252
4439
  MgPanel.style = mgPanelCss;
@@ -6284,7 +6471,7 @@ var Status;
6284
6471
  */
6285
6472
  const sizes = ['regular', 'large'];
6286
6473
 
6287
- const mgTabsCss = ".mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-regular{padding:1rem 2rem}.mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button,.mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button ::slotted([slot=label]),.mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button ::slotted([slot=metadata]),.mg-tabs__navigation-button.mg-tabs__navigation-button--size-regular,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-regular ::slotted([slot=label]),.mg-tabs__navigation-button.mg-tabs__navigation-button--size-regular ::slotted([slot=metadata]){font-size:var(--font-size)}.mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button.mg-tabs__navigation-button--horizontal,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-regular.mg-tabs__navigation-button--horizontal{padding-bottom:calc(1rem - 0.3rem)}.mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button.mg-tabs__navigation-button--vertical,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-regular.mg-tabs__navigation-button--vertical{padding-left:calc(2rem - 0.3rem)}.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-large{padding:1.5rem 3rem}.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button,.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button ::slotted([slot=label]),.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button ::slotted([slot=metadata]),.mg-tabs__navigation-button.mg-tabs__navigation-button--size-large,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-large ::slotted([slot=label]),.mg-tabs__navigation-button.mg-tabs__navigation-button--size-large ::slotted([slot=metadata]){font-size:calc(var(--font-size) + 0.2rem)}.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button.mg-tabs__navigation-button--horizontal,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-large.mg-tabs__navigation-button--horizontal{padding-bottom:calc(1.5rem - 0.3rem)}.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button.mg-tabs__navigation-button--vertical,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-large.mg-tabs__navigation-button--vertical{padding-left:calc(3rem - 0.3rem)}.mg-tabs__navigation-button{display:flex;align-items:center;column-gap:var(--mg-tabs-navigation-button-column-gap, 1rem);background-color:unset;border:none;font-family:var(--font-family);font-weight:400;color:hsl(var(--mg-tabs-color-hsl, var(--color-dark)));line-height:var(--line-height);text-decoration:none;white-space:nowrap;box-sizing:border-box;cursor:pointer}.mg-tabs__navigation-button:disabled,.mg-tabs__navigation-button--disabled{cursor:default;opacity:var(--mg-disabled-opacity)}.mg-tabs__navigation-button:focus-visible{z-index:10}.mg-tabs__navigation-button:hover:not(.mg-tabs__navigation-button--disabled),.mg-tabs__navigation-button:focus-visible:not(.mg-tabs__navigation-button--disabled){background-color:hsl(var(--mg-tabs-focused-background-color-hsl), 0.1)}.mg-tabs__navigation-button.mg-tabs__navigation-button--active{color:hsl(var(--mg-tabs-color-active-hsl));font-weight:600}.mg-tabs__navigation-button.mg-tabs__navigation-button--active.mg-tabs__navigation-button--horizontal{border-bottom-color:hsl(var(--mg-tabs-border-color-active-hsl))}.mg-tabs__navigation-button.mg-tabs__navigation-button--active.mg-tabs__navigation-button--vertical{border-left-color:hsl(var(--mg-tabs-border-color-active-hsl))}.mg-tabs__navigation-button.mg-tabs__navigation-button--hidden{display:none}.mg-tabs__navigation-button.mg-tabs__navigation-button--horizontal{border-bottom:0.3rem solid transparent}.mg-tabs__navigation-button.mg-tabs__navigation-button--vertical{border-left:0.3rem solid transparent}.mg-tabs__header{display:flex;flex-direction:row;flex-wrap:wrap}.mg-tabs__content-container:focus-visible{outline:none}.mg-tabs__navigation-button-text{flex:0 0 content}";
6474
+ const mgTabsCss = ".mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-regular{padding:1rem 2rem}.mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button,.mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button ::slotted([slot=label]),.mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button ::slotted([slot=metadata]),.mg-tabs__navigation-button.mg-tabs__navigation-button--size-regular,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-regular ::slotted([slot=label]),.mg-tabs__navigation-button.mg-tabs__navigation-button--size-regular ::slotted([slot=metadata]){font-size:var(--font-size)}.mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button.mg-tabs__navigation-button--horizontal,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-regular.mg-tabs__navigation-button--horizontal{padding-bottom:calc(1rem - 0.3rem)}.mg-tabs.mg-tabs--size-regular .mg-tabs__navigation-button.mg-tabs__navigation-button--vertical,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-regular.mg-tabs__navigation-button--vertical{padding-left:calc(2rem - 0.3rem)}.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-large{padding:1.5rem 3rem}.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button,.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button ::slotted([slot=label]),.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button ::slotted([slot=metadata]),.mg-tabs__navigation-button.mg-tabs__navigation-button--size-large,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-large ::slotted([slot=label]),.mg-tabs__navigation-button.mg-tabs__navigation-button--size-large ::slotted([slot=metadata]){font-size:calc(var(--font-size) + 0.2rem)}.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button.mg-tabs__navigation-button--horizontal,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-large.mg-tabs__navigation-button--horizontal{padding-bottom:calc(1.5rem - 0.3rem)}.mg-tabs.mg-tabs--size-large .mg-tabs__navigation-button.mg-tabs__navigation-button--vertical,.mg-tabs__navigation-button.mg-tabs__navigation-button--size-large.mg-tabs__navigation-button--vertical{padding-left:calc(3rem - 0.3rem)}.mg-tabs__navigation-button{display:flex;align-items:center;column-gap:var(--mg-tabs-navigation-button-column-gap, 1rem);background-color:unset;border:none;font-family:var(--font-family);font-weight:400;color:hsl(var(--mg-tabs-color-hsl, var(--color-dark)));line-height:var(--line-height);text-decoration:none;white-space:nowrap;box-sizing:border-box;cursor:pointer}.mg-tabs__navigation-button:disabled,.mg-tabs__navigation-button--disabled{cursor:default;opacity:var(--mg-disabled-opacity)}.mg-tabs__navigation-button:focus-visible{z-index:10}.mg-tabs__navigation-button:hover:not(.mg-tabs__navigation-button--disabled),.mg-tabs__navigation-button:focus-visible:not(.mg-tabs__navigation-button--disabled){background-color:hsl(var(--mg-tabs-focused-background-color-hsl), 0.1)}.mg-tabs__navigation-button.mg-tabs__navigation-button--active{color:hsl(var(--mg-tabs-color-active-hsl));font-weight:600}.mg-tabs__navigation-button.mg-tabs__navigation-button--active.mg-tabs__navigation-button--horizontal{border-bottom-color:hsl(var(--mg-tabs-border-color-active-hsl))}.mg-tabs__navigation-button.mg-tabs__navigation-button--active.mg-tabs__navigation-button--vertical{border-left-color:hsl(var(--mg-tabs-border-color-active-hsl))}.mg-tabs__navigation-button.mg-tabs__navigation-button--hidden{display:none}.mg-tabs__navigation-button.mg-tabs__navigation-button--horizontal{border-bottom:0.3rem solid transparent}.mg-tabs__navigation-button.mg-tabs__navigation-button--vertical{border-left:0.3rem solid transparent}.mg-tabs__header{display:flex;flex-direction:row;flex-wrap:wrap;border-bottom:var(--mg-tabs-border-bottom)}.mg-tabs__content-container:focus-visible{outline:none}.mg-tabs__navigation-button-text{flex:0 0 content}";
6288
6475
 
6289
6476
  /**
6290
6477
  * type TabItem validation function
@@ -6847,4 +7034,4 @@ const MgTooltip = class {
6847
7034
  };
6848
7035
  MgTooltip.style = mgTooltipCss;
6849
7036
 
6850
- export { MgActionMore as mg_action_more, MgBadge as mg_badge, MgButton as mg_button, MgCard as mg_card, MgCharacterLeft as mg_character_left, MgDetails as mg_details, MgDivider as mg_divider, MgForm as mg_form, MgIcon as mg_icon, MgIllustratedMessage as mg_illustrated_message, MgInputCheckbox as mg_input_checkbox, MgInputDate as mg_input_date, MgInputNumeric as mg_input_numeric, MgInputPassword as mg_input_password, MgInputRadio as mg_input_radio, MgInputSelect as mg_input_select, MgInputText as mg_input_text, MgInputTextarea as mg_input_textarea, MgInputTitle as mg_input_title, MgInputToggle as mg_input_toggle, MgMenu as mg_menu, MgMenuItem as mg_menu_item, MgMessage as mg_message, MgModal as mg_modal, MgPagination as mg_pagination, MgPanel as mg_panel, MgPopover as mg_popover, MgSkipLinks as mg_skip_links, MgTabs as mg_tabs, MgTag as mg_tag, MgTooltip as mg_tooltip };
7037
+ export { MgActionMore as mg_action_more, MgBadge as mg_badge, MgButton as mg_button, MgCard as mg_card, MgCharacterLeft as mg_character_left, MgDetails as mg_details, MgDivider as mg_divider, MgForm as mg_form, MgIcon as mg_icon, MgIllustratedMessage as mg_illustrated_message, MgInputCheckbox as mg_input_checkbox, MgInputCheckboxPaginated as mg_input_checkbox_paginated, MgInputDate as mg_input_date, MgInputNumeric as mg_input_numeric, MgInputPassword as mg_input_password, MgInputRadio as mg_input_radio, MgInputSelect as mg_input_select, MgInputText as mg_input_text, MgInputTextarea as mg_input_textarea, MgInputTitle as mg_input_title, MgInputToggle as mg_input_toggle, MgMenu as mg_menu, MgMenuItem as mg_menu_item, MgMessage as mg_message, MgModal as mg_modal, MgPagination as mg_pagination, MgPanel as mg_panel, MgPopover as mg_popover, MgSkipLinks as mg_skip_links, MgTabs as mg_tabs, MgTag as mg_tag, MgTooltip as mg_tooltip };