@mgdis/mg-components 6.22.1 → 6.24.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 (139) hide show
  1. package/dist/cjs/{index-Dz2LAZQT.js → index-BEF-cqV9.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mg-action-more_36.cjs.entry.js +178 -79
  4. package/dist/cjs/mg-alert.cjs.entry.js +6 -2
  5. package/dist/cjs/mg-breadcrumb.cjs.entry.js +1 -1
  6. package/dist/cjs/mg-components.cjs.js +3 -3
  7. package/dist/cjs/mg-fieldset.cjs.entry.js +4 -3
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +10 -8
  9. package/dist/cjs/mg-input-file.cjs.entry.js +5 -4
  10. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +8291 -6518
  11. package/dist/cjs/mg-input.conf-wgTh7iBb.js +84 -0
  12. package/dist/cjs/mg-loader.cjs.entry.js +1 -1
  13. package/dist/cjs/mg-progress.cjs.entry.js +2 -2
  14. package/dist/collection/assets/icons/index.js +1 -1
  15. package/dist/collection/collection-manifest.json +1 -1
  16. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +5 -2
  17. package/dist/collection/components/atoms/mg-badge/mg-badge.js +10 -2
  18. package/dist/collection/components/atoms/mg-button/mg-button.js +3 -1
  19. package/dist/collection/components/atoms/mg-card/mg-card.js +14 -6
  20. package/dist/collection/components/atoms/mg-icon/mg-icon.js +8 -5
  21. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +7 -2
  22. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +11 -11
  23. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +3 -1
  24. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +10 -7
  25. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +4 -2
  26. package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +5 -3
  27. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +3 -1
  28. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +3 -1
  29. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +3 -1
  30. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +3 -1
  31. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +54 -26
  32. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +5 -3
  33. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +3 -1
  34. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +3 -1
  35. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +1 -1
  36. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +4 -2
  37. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
  38. package/dist/collection/components/molecules/mg-alert/mg-alert.js +25 -1
  39. package/dist/collection/components/molecules/mg-details/mg-details.js +3 -1
  40. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +3 -1
  41. package/dist/collection/components/molecules/mg-form/mg-form.js +4 -2
  42. package/dist/collection/components/molecules/mg-message/mg-message.js +39 -2
  43. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  44. package/dist/collection/components/molecules/mg-panel/mg-panel.js +16 -4
  45. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  46. package/dist/collection/components/molecules/mg-popover/mg-popover.js +10 -2
  47. package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
  48. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  49. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
  50. package/dist/components/index3.js +1 -1
  51. package/dist/components/index4.js +1 -0
  52. package/dist/components/mg-action-more.js +1 -1
  53. package/dist/components/mg-alert.js +1 -1
  54. package/dist/components/mg-badge2.js +1 -1
  55. package/dist/components/mg-breadcrumb.js +1 -1
  56. package/dist/components/mg-button2.js +1 -1
  57. package/dist/components/mg-card2.js +1 -1
  58. package/dist/components/mg-character-left2.js +1 -1
  59. package/dist/components/mg-details.js +1 -1
  60. package/dist/components/mg-divider2.js +1 -1
  61. package/dist/components/mg-fieldset.js +1 -1
  62. package/dist/components/mg-form.js +1 -1
  63. package/dist/components/mg-icon2.js +1 -1
  64. package/dist/components/mg-illustrated-message.js +1 -1
  65. package/dist/components/mg-input-checkbox.js +1 -1
  66. package/dist/components/mg-input-combobox.js +1 -1
  67. package/dist/components/mg-input-date.js +1 -1
  68. package/dist/components/mg-input-file.js +1 -1
  69. package/dist/components/mg-input-numeric.js +1 -1
  70. package/dist/components/mg-input-password.js +1 -1
  71. package/dist/components/mg-input-radio.js +1 -1
  72. package/dist/components/mg-input-rich-text-editor.js +288 -289
  73. package/dist/components/mg-input-select2.js +1 -1
  74. package/dist/components/mg-input-text2.js +1 -1
  75. package/dist/components/mg-input-textarea.js +1 -1
  76. package/dist/components/mg-input-title2.js +1 -1
  77. package/dist/components/mg-input-toggle.js +1 -1
  78. package/dist/components/mg-input2.js +1 -1
  79. package/dist/components/mg-item-more2.js +1 -1
  80. package/dist/components/mg-loader2.js +1 -1
  81. package/dist/components/mg-menu-item2.js +1 -1
  82. package/dist/components/mg-message2.js +1 -1
  83. package/dist/components/mg-modal.js +1 -1
  84. package/dist/components/mg-pagination.js +1 -1
  85. package/dist/components/mg-panel.js +1 -1
  86. package/dist/components/mg-popover-content2.js +1 -1
  87. package/dist/components/mg-popover2.js +1 -1
  88. package/dist/components/mg-progress.js +1 -1
  89. package/dist/components/mg-skip-links.js +1 -1
  90. package/dist/components/mg-table.js +1 -1
  91. package/dist/components/mg-tabs2.js +1 -1
  92. package/dist/components/mg-tooltip2.js +1 -1
  93. package/dist/custom-elements.json +8828 -0
  94. package/dist/esm/{index-C3jUhxdI.js → index-DshvCiTL.js} +1 -1
  95. package/dist/esm/loader.js +3 -3
  96. package/dist/esm/mg-action-more_36.entry.js +178 -79
  97. package/dist/esm/mg-alert.entry.js +6 -2
  98. package/dist/esm/mg-breadcrumb.entry.js +1 -1
  99. package/dist/esm/mg-components.js +4 -4
  100. package/dist/esm/mg-fieldset.entry.js +4 -3
  101. package/dist/esm/mg-input-combobox.entry.js +10 -8
  102. package/dist/esm/mg-input-file.entry.js +5 -4
  103. package/dist/esm/mg-input-rich-text-editor.entry.js +8291 -6518
  104. package/dist/esm/mg-input.conf-DOi9lJXy.js +73 -0
  105. package/dist/esm/mg-loader.entry.js +1 -1
  106. package/dist/esm/mg-progress.entry.js +2 -2
  107. package/dist/mg-components/mg-components.esm.js +1 -1
  108. package/dist/mg-components/{p-c1aeb277.entry.js → p-08d3d957.entry.js} +1 -1
  109. package/dist/mg-components/{p-661da56b.entry.js → p-13feb37a.entry.js} +1 -1
  110. package/dist/mg-components/{p-8e256086.entry.js → p-7c63e469.entry.js} +1 -1
  111. package/dist/mg-components/p-7fd3e519.entry.js +1 -0
  112. package/dist/mg-components/p-9953b835.entry.js +1 -0
  113. package/dist/mg-components/p-9c0a9fc7.entry.js +1657 -0
  114. package/dist/mg-components/p-DOi9lJXy.js +1 -0
  115. package/dist/mg-components/p-a338088e.entry.js +1 -0
  116. package/dist/mg-components/p-cdb01923.entry.js +1 -0
  117. package/dist/mg-components/p-d0b6d8f5.entry.js +1 -0
  118. package/dist/types/assets/icons/index.d.ts +2 -0
  119. package/dist/types/components/atoms/internals/mg-input-title/mg-input-title.d.ts +4 -0
  120. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +4 -0
  121. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +12 -6
  122. package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +4 -0
  123. package/dist/types/components/molecules/mg-message/mg-message.d.ts +6 -0
  124. package/dist/types/components.d.ts +22 -0
  125. package/dist/types/stencil-public-runtime.d.ts +1 -0
  126. package/ide/intellij/web-types.json +207 -3472
  127. package/ide/vscode/css-custom-data.json +1 -1
  128. package/ide/vscode/html-custom-data.json +58 -314
  129. package/package.json +32 -27
  130. package/dist/cjs/mg-input.conf-BNpeATnq.js +0 -35
  131. package/dist/esm/mg-input.conf-C9rmNQIL.js +0 -25
  132. package/dist/mg-components/p-06fbdb2f.entry.js +0 -1
  133. package/dist/mg-components/p-188b9ca9.entry.js +0 -1
  134. package/dist/mg-components/p-4667078d.entry.js +0 -1
  135. package/dist/mg-components/p-5a859ecf.entry.js +0 -1658
  136. package/dist/mg-components/p-C9rmNQIL.js +0 -1
  137. package/dist/mg-components/p-b0b8c58f.entry.js +0 -1
  138. package/dist/mg-components/p-bbcef41c.entry.js +0 -1
  139. /package/dist/mg-components/{p-C3jUhxdI.js → p-DshvCiTL.js} +0 -0
@@ -48,7 +48,7 @@
48
48
  "mixins": [],
49
49
  "compiler": {
50
50
  "name": "@stencil/core",
51
- "version": "4.43.4",
51
+ "version": "4.43.5",
52
52
  "typescriptVersion": "5.8.3"
53
53
  },
54
54
  "collections": [],
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
- import { isValideID, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { isValidString, isValideID, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  /**
4
5
  * @internal
5
6
  */
@@ -32,6 +33,7 @@ export class MgInputTitle {
32
33
  * Init tag name
33
34
  */
34
35
  componentWillLoad() {
36
+ normalizeBooleanAttributes(this);
35
37
  this.validateIdentifier(this.identifier);
36
38
  this.validateIsLegend(this.isLegend);
37
39
  }
@@ -42,7 +44,7 @@ export class MgInputTitle {
42
44
  render() {
43
45
  const TagName = this.readonly ? 'span' : this.tagName;
44
46
  // \u00A0 represent a  
45
- return (h(TagName, { key: 'd61ed048e1b2bb124281eb4067894d9a35abf778', class: "mg-c-input-title", htmlFor: !this.isLegend && this.identifier, id: this.isLegend ? `${this.identifier}-title` : undefined }, h("slot", { key: '3bad02b10f8e9bb536c5eba9bf85d4b4967a9d97' }), this.required && !this.readonly && (h("span", { key: 'f0fd90a79f4449a1a3b7ec76a3eeb96bcc2e4ee6', class: "mg-c-input-title__required" }, "\u00A0", h("span", { key: '7ea29cfc494c5c5c2b65b62ea27caee5a41062ca', class: "mg-u-is-asterisk" }, "*")))));
47
+ return (h(TagName, { key: '316341d052fa751e442f749ce66e2712ecd864c2', class: "mg-c-input-title", htmlFor: !this.isLegend && this.identifier, id: this.isLegend ? `${this.identifier}-title` : undefined }, h("slot", { key: '4df4df8d18f46b09081ebc13619034f923132697' }), this.required && !this.readonly && (h("span", { key: '778a3317990278dd95a450dd9aa91c3afafb1b43', class: "mg-c-input-title__required" }, "\u00A0", h("span", { key: '509a4ecc94111d61f3df3ae28286bf23bf8c7d0f', class: "mg-u-is-asterisk" }, "*")))));
46
48
  }
47
49
  static get is() { return "mg-input-title"; }
48
50
  static get encapsulation() { return "scoped"; }
@@ -142,6 +144,7 @@ export class MgInputTitle {
142
144
  "tagName": {}
143
145
  };
144
146
  }
147
+ static get elementRef() { return "element"; }
145
148
  static get watchers() {
146
149
  return [{
147
150
  "propName": "identifier",
@@ -1,6 +1,7 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { variants } from "./mg-badge.conf";
3
3
  import { ClassList, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
4
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
4
5
  export class MgBadge {
5
6
  constructor() {
6
7
  /************
@@ -33,6 +34,11 @@ export class MgBadge {
33
34
  }
34
35
  validateVariant(newValue, oldValue) {
35
36
  if (!variants.includes(newValue)) {
37
+ if (String(newValue) === '') {
38
+ // Reactive frameworks (e.g. Vue) may pass "" instead of undefined when the prop is reset.
39
+ this.variant = 'info';
40
+ return;
41
+ }
36
42
  throw new Error(`<mg-badge> prop "variant" must be one of: ${variants.join(', ')}. Passed value: ${toString(newValue)}.`);
37
43
  }
38
44
  else {
@@ -52,6 +58,7 @@ export class MgBadge {
52
58
  * Check if props are well configured on init
53
59
  */
54
60
  componentWillLoad() {
61
+ normalizeBooleanAttributes(this);
55
62
  this.validateValue(this.value);
56
63
  this.validateLabel(this.label);
57
64
  this.validateVariant(this.variant);
@@ -62,7 +69,7 @@ export class MgBadge {
62
69
  * @returns HTML Element
63
70
  */
64
71
  render() {
65
- return (h("span", { key: '27e42212d525a31576dbe826babca52d99a3476b', class: this.classCollection.join() }, h("span", { key: 'f24658252cc62a38879a1e8321c477723c2dc919', class: "mg-c-badge__value" }, this.value), h("span", { key: '9f51fe7c868a8d53d9f138ec4229e1ba09e7284e', class: "mg-u-visually-hidden" }, this.label)));
72
+ return (h("span", { key: 'b4c55957d7e59c889147cf3ddeb57f94c7afdaaa', class: this.classCollection.join() }, h("span", { key: '3f9bfae0e36de3c14d71d3a904f426508b1d5872', class: "mg-c-badge__value" }, this.value), h("span", { key: '2e6ee3c010b6f0c8c1df7bfdd3aed755e5afc0d8', class: "mg-u-visually-hidden" }, this.label)));
66
73
  }
67
74
  static get is() { return "mg-badge"; }
68
75
  static get encapsulation() { return "shadow"; }
@@ -118,7 +125,7 @@ export class MgBadge {
118
125
  },
119
126
  "variant": {
120
127
  "type": "string",
121
- "mutable": false,
128
+ "mutable": true,
122
129
  "complexType": {
123
130
  "original": "BadgeVariantType",
124
131
  "resolved": "\"danger\" | \"info\" | \"primary\" | \"secondary\" | \"success\" | \"text-color\" | \"warning\"",
@@ -170,6 +177,7 @@ export class MgBadge {
170
177
  "classCollection": {}
171
178
  };
172
179
  }
180
+ static get elementRef() { return "element"; }
173
181
  static get watchers() {
174
182
  return [{
175
183
  "propName": "value",
@@ -1,6 +1,7 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { variants, sizes } from "./mg-button.conf";
3
3
  import { ClassList, isValidString, nextTick, toString } from "@mgdis/core-ui-helpers/dist/utils";
4
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
4
5
  import { Keys } from "../../../utils/events.utils";
5
6
  /**
6
7
  * @slot - Button content
@@ -176,6 +177,7 @@ export class MgButton {
176
177
  * Check if props are well configured on init
177
178
  */
178
179
  componentWillLoad() {
180
+ normalizeBooleanAttributes(this);
179
181
  this.validateVariant(this.variant);
180
182
  this.validateFullWidth(this.fullWidth);
181
183
  this.validateSize(this.size);
@@ -205,7 +207,7 @@ export class MgButton {
205
207
  */
206
208
  render() {
207
209
  var _a;
208
- return (h(Host, { key: '82e03b7b699a821125d066a5ca1d435a87a75675', role: "button", tabIndex: this.element.getAttribute('tabindex') || 0, type: this.type, form: this.form, "full-width": this.fullWidth, "aria-label": this.label, "aria-disabled": (_a = this.disabled) === null || _a === void 0 ? void 0 : _a.toString(), onClick: this.handleClick, onKeyup: this.handleKeyup, onKeydown: this.handleKeydown }, h("div", { key: '92a0a1fbcf320f8afc10106418a992fffd748646', class: this.classCollection.join() }, this.loading && h("mg-icon", { key: 'f5d0bf31534c2dc8dbd7f9e2fc63bd8af055a9a3', icon: "loader", spin: true }), h("div", { key: '7557988a9a70881f25c86b78a3ea28d9842c439b', class: "mg-c-button__content" }, h("slot", { key: '98b64ef7efc4d761fdda8c593b05ec6959b0ea22' })))));
210
+ return (h(Host, { key: 'e79494f9da9f0c4c19841d44a85ee955f2e19016', role: "button", tabIndex: this.element.getAttribute('tabindex') || 0, type: this.type, form: this.form, "full-width": this.fullWidth, "aria-label": this.label, "aria-disabled": (_a = this.disabled) === null || _a === void 0 ? void 0 : _a.toString(), onClick: this.handleClick, onKeyup: this.handleKeyup, onKeydown: this.handleKeydown }, h("div", { key: '1a4802637eca8125d09cae3363ff11fe9b50ffd4', class: this.classCollection.join() }, this.loading && h("mg-icon", { key: '9f4512a0ed650c3af63e8216baa5b0eaabd4bfd2', icon: "loader", spin: true }), h("div", { key: '9c0647c6741a0610a516bc2ac1cce328d3004d51', class: "mg-c-button__content" }, h("slot", { key: '7875b875d0a8a8ac74faf233b0cd49462a775dc6' })))));
209
211
  }
210
212
  static get is() { return "mg-button"; }
211
213
  static get encapsulation() { return "shadow"; }
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
- import { ClassList } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { ClassList, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
3
  import { radiusSizes } from "./mg-card.conf";
4
4
  /**
5
5
  * @slot - Card content
@@ -28,10 +28,18 @@ export class MgCard {
28
28
  }
29
29
  }
30
30
  watchRadiusSize(newValue, oldValue) {
31
- if (oldValue !== undefined && radiusSizes.includes(oldValue)) {
32
- this.classCollection.delete(`mg-c-card--radius-${oldValue}`);
31
+ if (!radiusSizes.includes(newValue)) {
32
+ if (String(newValue) === '') {
33
+ // Reactive frameworks (e.g. Vue) may pass "" instead of undefined when the prop is reset.
34
+ this.radiusSize = 'medium';
35
+ return;
36
+ }
37
+ throw new Error(`<mg-card> prop "radiusSize" must be one of: ${radiusSizes.join(', ')}. Passed value: ${toString(newValue)}.`);
33
38
  }
34
- if (radiusSizes.includes(newValue)) {
39
+ else {
40
+ if (oldValue !== undefined) {
41
+ this.classCollection.delete(`mg-c-card--radius-${oldValue}`);
42
+ }
35
43
  this.classCollection.add(`mg-c-card--radius-${newValue}`);
36
44
  }
37
45
  }
@@ -50,7 +58,7 @@ export class MgCard {
50
58
  * @returns HTML Element
51
59
  */
52
60
  render() {
53
- return (h("div", { key: 'fe5eff1e1d7c533cd533e27d3fb070a4e57194a8', class: this.classCollection.join() }, h("slot", { key: 'ca27dc4039d7bcaa21284714b7820de257625009' })));
61
+ return (h("div", { key: 'd652bf6913d37428bb9729d32fb3541543418a71', class: this.classCollection.join() }, h("slot", { key: '5157ee6cf1330c907babad1f2190973dd4d9f39e' })));
54
62
  }
55
63
  static get is() { return "mg-card"; }
56
64
  static get encapsulation() { return "shadow"; }
@@ -88,7 +96,7 @@ export class MgCard {
88
96
  },
89
97
  "radiusSize": {
90
98
  "type": "string",
91
- "mutable": false,
99
+ "mutable": true,
92
100
  "complexType": {
93
101
  "original": "RadiusSizeType",
94
102
  "resolved": "\"medium\" | \"small\" | \"xsmall\"",
@@ -48,9 +48,12 @@ export class MgIcon {
48
48
  }
49
49
  }
50
50
  validateSize(newValue, oldValue) {
51
- // When removing size attribute, it is set to null
52
- if (newValue === null) {
53
- newValue = 'medium';
51
+ // Reactive frameworks reset the prop differently:
52
+ // - removing the attribute sets it to null
53
+ // - Vue reactivity may set it to ""
54
+ if (newValue === null || String(newValue) === '') {
55
+ this.size = 'medium';
56
+ return;
54
57
  }
55
58
  if (!sizes.includes(newValue)) {
56
59
  throw new Error(`<mg-icon> prop "size" must be one of: ${sizes.join(', ')}. Passed value: ${toString(newValue)}.`);
@@ -144,7 +147,7 @@ export class MgIcon {
144
147
  "mutable": false,
145
148
  "complexType": {
146
149
  "original": "IconType",
147
- "resolved": "\"address-card\" | \"address-card-outline\" | \"align-center\" | \"align-justify\" | \"align-left\" | \"align-right\" | \"api\" | \"archive\" | \"archive-outline\" | \"arrow-clock\" | \"arrow-down\" | \"arrow-down-a-z\" | \"arrow-down-right\" | \"arrow-left\" | \"arrow-right\" | \"arrow-rotate\" | \"arrow-rotate-backward\" | \"arrow-up\" | \"arrow-up-right\" | \"arrow-up-right-square\" | \"arrow-up-z-a\" | \"arrows-compare\" | \"arrows-right-down\" | \"arrows-right-left\" | \"arrows-rotate\" | \"arrows-rotate-backward\" | \"arrows-up-down\" | \"ban\" | \"bell\" | \"bell-outline\" | \"book\" | \"book-outline\" | \"briefcase\" | \"briefcase-outline\" | \"building\" | \"building-outline\" | \"calculator\" | \"calculator-outline\" | \"calendar\" | \"calendar-euro\" | \"calendar-euro-outline\" | \"calendar-outline\" | \"check\" | \"check-circle\" | \"check-circle-outline\" | \"chevron-down\" | \"chevron-down-circle\" | \"chevron-left\" | \"chevron-left-circle\" | \"chevron-right\" | \"chevron-right-circle\" | \"chevron-up\" | \"chevron-up-circle\" | \"circle\" | \"clock\" | \"clock-outline\" | \"code-square-outline\" | \"cog\" | \"cog-outline\" | \"comment\" | \"comment-exclamation\" | \"comment-exclamation-outline\" | \"comment-outline\" | \"comment-question\" | \"comment-question-outline\" | \"comment-sms\" | \"comment-sms-outline\" | \"conversation\" | \"conversation-outline\" | \"copy\" | \"copy-file\" | \"copy-file-outline\" | \"copy-outline\" | \"credit-card\" | \"cross\" | \"cross-circle\" | \"cross-circle-outline\" | \"dashboard\" | \"dashboard-outline\" | \"download\" | \"earth\" | \"earth-outline\" | \"ellipsis\" | \"ellipsis-vertical\" | \"euro\" | \"euro-circle\" | \"exclamation-circle\" | \"exclamation-circle-outline\" | \"exclamation-stamp\" | \"exclamation-triangle\" | \"exclamation-triangle-outline\" | \"eye\" | \"eye-outline\" | \"eye-slash\" | \"eye-slash-outline\" | \"fax\" | \"fax-outline\" | \"file\" | \"file-cog\" | \"file-cog-outline\" | \"file-download\" | \"file-download-outline\" | \"file-excel\" | \"file-excel-outline\" | \"file-outline\" | \"file-pdf\" | \"file-pdf-outline\" | \"file-text\" | \"file-text-outline\" | \"file-upload\" | \"file-upload-outline\" | \"file-word\" | \"file-word-outline\" | \"filter\" | \"filter-outline\" | \"floppy-disk\" | \"floppy-disk-checked\" | \"floppy-disk-checked-outline\" | \"floppy-disk-outline\" | \"folder\" | \"folder-check\" | \"folder-check-outline\" | \"folder-lines\" | \"folder-lines-outline\" | \"folder-link\" | \"folder-link-outline\" | \"folder-outline\" | \"folder-star\" | \"folder-star-outline\" | \"folders\" | \"folders-outline\" | \"gavel\" | \"gavel-outline\" | \"graduation-cap\" | \"graduation-cap-outline\" | \"hand-euro\" | \"hand-euro-outline\" | \"hand-up\" | \"history\" | \"home\" | \"home-outline\" | \"info-circle\" | \"info-circle-outline\" | \"interrogation-circle\" | \"interrogation-circle-outline\" | \"key\" | \"laptop\" | \"layers\" | \"life-ring\" | \"lines-rectangle\" | \"lines-rectangle-outline\" | \"link\" | \"list\" | \"loader\" | \"location\" | \"location-outline\" | \"lock\" | \"lock-outline\" | \"log-in\" | \"log-out\" | \"magnifying-glass\" | \"mail\" | \"mail-open\" | \"mail-open-outline\" | \"mail-outline\" | \"messages-square\" | \"messages-square-outline\" | \"mobile\" | \"mobile-outline\" | \"notes\" | \"notes-outline\" | \"paper-plane\" | \"paper-plane-outline\" | \"paper-plane-slash\" | \"paper-plane-slash-outline\" | \"paperclip\" | \"pause\" | \"pause-outline\" | \"pen\" | \"pen-circle\" | \"pen-fancy\" | \"pen-fancy-files-outline\" | \"pen-fancy-outline\" | \"pen-outline\" | \"phone\" | \"phone-outline\" | \"picture\" | \"picture-outline\" | \"play-circle\" | \"plus\" | \"plus-circle\" | \"plus-circle-outline\" | \"share\" | \"share-outline\" | \"shuffle\" | \"sidebar-arrow-left\" | \"sidebar-arrow-right\" | \"sitemap\" | \"sliders\" | \"sliders-outline\" | \"squares\" | \"star\" | \"star-outline\" | \"table\" | \"tag\" | \"tag-outline\" | \"tags\" | \"tags-outline\" | \"thumb-down\" | \"thumb-down-outline\" | \"thumb-up\" | \"thumb-up-outline\" | \"thumbtack\" | \"thumbtack-outline\" | \"trash\" | \"trash-outline\" | \"universal-access\" | \"universal-access-outline\" | \"unlink\" | \"unlock\" | \"unlock-outline\" | \"upload\" | \"user\" | \"user-circle\" | \"user-group\" | \"user-group-outline\" | \"user-lock\" | \"user-outline\" | \"user-pen-fancy-outline\" | \"user-plus\" | \"user-question-outline\" | \"user-shield\" | \"user-shield-outline\" | \"users\" | \"users-outline\" | \"wallet\" | \"wallet-outline\"",
150
+ "resolved": "\"address-card\" | \"address-card-outline\" | \"align-center\" | \"align-justify\" | \"align-left\" | \"align-right\" | \"api\" | \"archive\" | \"archive-outline\" | \"arrow-clock\" | \"arrow-down\" | \"arrow-down-a-z\" | \"arrow-down-right\" | \"arrow-left\" | \"arrow-right\" | \"arrow-rotate\" | \"arrow-rotate-backward\" | \"arrow-up\" | \"arrow-up-right\" | \"arrow-up-right-square\" | \"arrow-up-z-a\" | \"arrows-compare\" | \"arrows-right-down\" | \"arrows-right-left\" | \"arrows-rotate\" | \"arrows-rotate-backward\" | \"arrows-up-down\" | \"ban\" | \"bell\" | \"bell-outline\" | \"book\" | \"book-outline\" | \"briefcase\" | \"briefcase-outline\" | \"building\" | \"building-outline\" | \"calculator\" | \"calculator-outline\" | \"calendar\" | \"calendar-euro\" | \"calendar-euro-outline\" | \"calendar-outline\" | \"check\" | \"check-circle\" | \"check-circle-outline\" | \"chevron-down\" | \"chevron-down-circle\" | \"chevron-left\" | \"chevron-left-circle\" | \"chevron-right\" | \"chevron-right-circle\" | \"chevron-up\" | \"chevron-up-circle\" | \"circle\" | \"clock\" | \"clock-outline\" | \"code-square-outline\" | \"cog\" | \"cog-outline\" | \"comment\" | \"comment-exclamation\" | \"comment-exclamation-outline\" | \"comment-outline\" | \"comment-question\" | \"comment-question-outline\" | \"comment-sms\" | \"comment-sms-outline\" | \"conversation\" | \"conversation-outline\" | \"copy\" | \"copy-file\" | \"copy-file-outline\" | \"copy-outline\" | \"credit-card\" | \"cross\" | \"cross-circle\" | \"cross-circle-outline\" | \"dashboard\" | \"dashboard-outline\" | \"download\" | \"earth\" | \"earth-outline\" | \"ellipsis\" | \"ellipsis-vertical\" | \"euro\" | \"euro-circle\" | \"exclamation-circle\" | \"exclamation-circle-outline\" | \"exclamation-stamp\" | \"exclamation-triangle\" | \"exclamation-triangle-outline\" | \"eye\" | \"eye-outline\" | \"eye-slash\" | \"eye-slash-outline\" | \"fax\" | \"fax-outline\" | \"file\" | \"file-cog\" | \"file-cog-outline\" | \"file-download\" | \"file-download-outline\" | \"file-excel\" | \"file-excel-outline\" | \"file-outline\" | \"file-pdf\" | \"file-pdf-outline\" | \"file-text\" | \"file-text-outline\" | \"file-upload\" | \"file-upload-outline\" | \"file-word\" | \"file-word-outline\" | \"filter\" | \"filter-outline\" | \"floppy-disk\" | \"floppy-disk-checked\" | \"floppy-disk-checked-outline\" | \"floppy-disk-outline\" | \"folder\" | \"folder-check\" | \"folder-check-outline\" | \"folder-lines\" | \"folder-lines-outline\" | \"folder-link\" | \"folder-link-outline\" | \"folder-outline\" | \"folder-star\" | \"folder-star-outline\" | \"folders\" | \"folders-outline\" | \"gavel\" | \"gavel-outline\" | \"glitters\" | \"glitters-outline\" | \"graduation-cap\" | \"graduation-cap-outline\" | \"hand-euro\" | \"hand-euro-outline\" | \"hand-up\" | \"history\" | \"home\" | \"home-outline\" | \"info-circle\" | \"info-circle-outline\" | \"interrogation-circle\" | \"interrogation-circle-outline\" | \"key\" | \"laptop\" | \"layers\" | \"life-ring\" | \"lines-rectangle\" | \"lines-rectangle-outline\" | \"link\" | \"list\" | \"loader\" | \"location\" | \"location-outline\" | \"lock\" | \"lock-outline\" | \"log-in\" | \"log-out\" | \"magnifying-glass\" | \"mail\" | \"mail-open\" | \"mail-open-outline\" | \"mail-outline\" | \"messages-square\" | \"messages-square-outline\" | \"mobile\" | \"mobile-outline\" | \"notes\" | \"notes-outline\" | \"paper-plane\" | \"paper-plane-outline\" | \"paper-plane-slash\" | \"paper-plane-slash-outline\" | \"paperclip\" | \"pause\" | \"pause-outline\" | \"pen\" | \"pen-circle\" | \"pen-fancy\" | \"pen-fancy-files-outline\" | \"pen-fancy-outline\" | \"pen-outline\" | \"phone\" | \"phone-outline\" | \"picture\" | \"picture-outline\" | \"play-circle\" | \"plus\" | \"plus-circle\" | \"plus-circle-outline\" | \"share\" | \"share-outline\" | \"shuffle\" | \"sidebar-arrow-left\" | \"sidebar-arrow-right\" | \"sitemap\" | \"sliders\" | \"sliders-outline\" | \"squares\" | \"star\" | \"star-outline\" | \"table\" | \"tag\" | \"tag-outline\" | \"tags\" | \"tags-outline\" | \"thumb-down\" | \"thumb-down-outline\" | \"thumb-up\" | \"thumb-up-outline\" | \"thumbtack\" | \"thumbtack-outline\" | \"trash\" | \"trash-outline\" | \"universal-access\" | \"universal-access-outline\" | \"unlink\" | \"unlock\" | \"unlock-outline\" | \"upload\" | \"user\" | \"user-circle\" | \"user-group\" | \"user-group-outline\" | \"user-lock\" | \"user-outline\" | \"user-pen-fancy-outline\" | \"user-plus\" | \"user-question-outline\" | \"user-shield\" | \"user-shield-outline\" | \"users\" | \"users-outline\" | \"wallet\" | \"wallet-outline\"",
148
151
  "references": {
149
152
  "IconType": {
150
153
  "location": "import",
@@ -167,7 +170,7 @@ export class MgIcon {
167
170
  },
168
171
  "size": {
169
172
  "type": "string",
170
- "mutable": false,
173
+ "mutable": true,
171
174
  "complexType": {
172
175
  "original": "IconSizeType",
173
176
  "resolved": "\"large\" | \"medium\" | \"small\" | \"xlarge\" | \"xxlarge\"",
@@ -57,7 +57,7 @@ export class MgTooltip {
57
57
  // Remove event listener
58
58
  this.windows.forEach((localWindow) => {
59
59
  localWindow.removeEventListener('click', this.handleClickOutside, false);
60
- localWindow.removeEventListener('keyboard', this.handlePressEscape, false);
60
+ localWindow.removeEventListener('keydown', this.handlePressEscape, false);
61
61
  });
62
62
  };
63
63
  /**
@@ -326,6 +326,11 @@ export class MgTooltip {
326
326
  this.setMgButtonMutationObserver(slotElement);
327
327
  this.setMgButtonWrapper(slotElement);
328
328
  }
329
+ // Propagate the full-width intent from a slotted mg-button to the tooltip host so it
330
+ // takes the parent's width — the host is `display: inline-block` otherwise.
331
+ if (this.element.querySelector('mg-button[full-width]') !== null) {
332
+ this.element.classList.add('mg-c-tooltip--full-width');
333
+ }
329
334
  // Add tabindex to slotted element if we can't find any interactive element
330
335
  if (!this.disabled && [undefined, null].includes(interactiveElement)) {
331
336
  this.hasCustomTabIndex = true;
@@ -364,7 +369,7 @@ export class MgTooltip {
364
369
  * @returns HTML Element
365
370
  */
366
371
  render() {
367
- return (h(Host, { key: '8d1a0690f0b44381de181c2ea1f9e4c883a1af57' }, h("slot", { key: 'ae45df312e6a251a72b8ace11eb154c5ad13b4ae' }), h("slot", { key: 'fdbb17e42291cd785ff188df14029bcd59ba4c13', name: "content" })));
372
+ return (h(Host, { key: 'f8fe2bfb1fe70bf169abf8ddd77323342af2ac54' }, h("slot", { key: '6d478d941b9cf9374395e597a703ba7c8411eb75' }), h("slot", { key: 'bbbb59eda24731ec2fa54a909b0f3f93000083e5', name: "content" })));
368
373
  }
369
374
  static get is() { return "mg-tooltip"; }
370
375
  static get encapsulation() { return "shadow"; }
@@ -1,5 +1,6 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { isValideID, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { isValidString, isValideID, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { tooltipPositions, classFieldset, classReadonly, classDisabled, classVerticalList, labelHeadings } from "./mg-input.conf";
4
5
  /**
5
6
  * @slot - Input content
@@ -253,15 +254,13 @@ export class MgInput {
253
254
  labelSlotElement === null || labelSlotElement === void 0 ? void 0 : labelSlotElement.remove();
254
255
  // create title element
255
256
  labelSlotElement = document.createElement('mg-input-title');
256
- [
257
- ['slot', this.slotLabel],
258
- ['identifier', this.identifier],
259
- ['readonly', this.isReadonly.toString()],
260
- ['required', ((this.required && !this.isDisabled) || false).toString()],
261
- ['is-legend', this.isFieldset.toString()],
262
- ].forEach(([attr, val]) => {
263
- labelSlotElement.setAttribute(attr, val);
264
- });
257
+ labelSlotElement.setAttribute('slot', this.slotLabel);
258
+ labelSlotElement.setAttribute('identifier', this.identifier);
259
+ // Set boolean props via property assignment to honour HTML attribute-presence semantics: an
260
+ // attribute set to "false" would now be normalized to `true` by mg-input-title's helper.
261
+ labelSlotElement.readonly = this.isReadonly;
262
+ labelSlotElement.required = (this.required && !this.isDisabled) || false;
263
+ labelSlotElement.isLegend = this.isFieldset;
265
264
  // create label element
266
265
  if (labelHeadings.includes(this.labelHeading)) {
267
266
  let label = this.element.shadowRoot.querySelector(this.labelHeading);
@@ -312,6 +311,7 @@ export class MgInput {
312
311
  * Check if component props are well configured on init
313
312
  */
314
313
  componentWillLoad() {
314
+ normalizeBooleanAttributes(this);
315
315
  this.watchIdentifier(this.identifier);
316
316
  this.watchLabel();
317
317
  this.watchClass();
@@ -339,7 +339,7 @@ export class MgInput {
339
339
  */
340
340
  render() {
341
341
  const isGroup = this.isFieldset && !this.isReadonly;
342
- return (h(Host, { key: 'a1db280d19eead30e7ae27eb6e395e58b35baa63', class: this.element.classList.toString(), role: isGroup ? 'group' : undefined, "aria-labelledby": isGroup ? `${this.identifier}-title` : undefined }, h("div", { key: '282f5776a9269272507f3e00f5dce690c9a604f4', class: { 'mg-c-input__title': true, 'mg-u-visually-hidden': this.labelHide } }, h("slot", { key: 'b122979a159912d9c34bb024021257f9f88e6ff4', name: this.slotLabel }), this.tooltip && (this.tooltipPosition === 'label' || this.labelOnTop) && !this.labelHide && this.renderTooltip()), h("div", { key: '098d3a7329fa0b5f37534fdf2df89e0468dcbe2a', class: "mg-c-input__input-container" }, this.inputContainerElements())));
342
+ return (h(Host, { key: 'b5952c998fe8562eb2e5dc0e425484f0aa9177f3', class: this.element.classList.toString(), role: isGroup ? 'group' : undefined, "aria-labelledby": isGroup ? `${this.identifier}-title` : undefined }, h("div", { key: 'd6399c7f4798af37639218373f775739fc04e593', class: { 'mg-c-input__title': true, 'mg-u-visually-hidden': this.labelHide } }, h("slot", { key: '58a593bb16193a5ca6b0374919b22fa64aab26a4', name: this.slotLabel }), this.tooltip && (this.tooltipPosition === 'label' || this.labelOnTop) && !this.labelHide && this.renderTooltip()), h("div", { key: '1a70d0b00d6cf235c7a64d3ebde212eef62e213c', class: "mg-c-input__input-container" }, this.inputContainerElements())));
343
343
  }
344
344
  static get is() { return "mg-input"; }
345
345
  static get encapsulation() { return "shadow"; }
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, cleanString, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { checkboxTypes, SectionKind, } from "./mg-input-checkbox.conf";
4
5
  import { MgInputCheckboxList } from "./MgInputCheckboxList";
5
6
  import { classDisabled, classReadonly, classFieldset, classVerticalList } from "../mg-input/mg-input.conf";
@@ -498,6 +499,7 @@ export class MgInputCheckbox {
498
499
  componentWillLoad() {
499
500
  // Get locales
500
501
  this.messages = initLocales(this.element).messages;
502
+ normalizeBooleanAttributes(this);
501
503
  // Validate
502
504
  // `validateType` must be done before `validateValue` because we need to set mode['auto'|'custom'] from type
503
505
  // and `validateValue` updates `this.checkboxItems` watcher which requires a defined `this.type`.
@@ -595,7 +597,7 @@ export class MgInputCheckbox {
595
597
  else {
596
598
  inputContent = this.renderCheckboxMulti();
597
599
  }
598
- return (h("mg-input", { key: '11b725ebb111707aaf7dc39d191fe6a9efb25ea6', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: !this.readonly ? this.required : undefined, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue.length === 0 ? 'label' : this.tooltipPosition, helpText: !this.readonly ? this.helpText : undefined, errorMessage: !this.readonly ? this.errorMessage : undefined }, inputContent));
600
+ return (h("mg-input", { key: '45c7481c738c254f20892d9c38ba53fd4d22cd7a', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: !this.readonly ? this.required : undefined, tooltip: this.tooltip, tooltipPosition: this.readonly && readonlyValue.length === 0 ? 'label' : this.tooltipPosition, helpText: !this.readonly ? this.helpText : undefined, errorMessage: !this.readonly ? this.errorMessage : undefined }, inputContent));
599
601
  }
600
602
  static get is() { return "mg-input-checkbox"; }
601
603
  static get encapsulation() { return "shadow"; }
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
- import { allItemsAreString, ClassList, getObjectValueFromKey, isValidString, nextTick, Page, Paginate, Cursor, toString, isObject, formatID, } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { ClassList, Cursor, Page, Paginate, allItemsAreString, formatID, getObjectValueFromKey, isObject, isValidString, nextTick, toString, } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { widths, classReadonly, classDisabled } from "../mg-input/mg-input.conf";
4
5
  import { initLocales } from "../../../../locales";
5
6
  import { Keys } from "../../../../utils/events.utils";
@@ -470,11 +471,12 @@ export class MgInputCombobox {
470
471
  });
471
472
  const total = Number(getObjectValueFromKey(json, this.fetchmappings.response.total, 0));
472
473
  let next = getObjectValueFromKey(json, this.fetchmappings.response.next);
473
- if (URL.canParse(updateUrl) && Boolean(next) && !URL.canParse(next)) {
474
- const previousUrl = new URL(updateUrl);
475
- if (previousUrl.pathname.endsWith(next.split('?')[0])) {
476
- next = new URL(next, previousUrl).toString();
477
- }
474
+ if (Boolean(next) && !URL.canParse(next)) {
475
+ // `next` is a relative link returned by the API: resolve it against the request URL (RFC 3986).
476
+ // The request URL is first made absolute against the document base so a root-relative `fetchurl`
477
+ // resolves the next page on the API path, not against the document location (which would 404).
478
+ const requestUrl = new URL(updateUrl, this.element.ownerDocument.baseURI);
479
+ next = new URL(next, requestUrl).toString();
478
480
  }
479
481
  return { items, total, next, top: items.length };
480
482
  }
@@ -709,6 +711,7 @@ export class MgInputCombobox {
709
711
  componentWillLoad() {
710
712
  // Get locales
711
713
  this.messages = initLocales(this.element).messages;
714
+ normalizeBooleanAttributes(this);
712
715
  // Validate
713
716
  this.watchIdentifier(this.identifier);
714
717
  this.watchItems(this.items);
@@ -758,7 +761,7 @@ export class MgInputCombobox {
758
761
  else {
759
762
  activeDescendant = (_e = this.value) === null || _e === void 0 ? void 0 : _e.value;
760
763
  }
761
- return (h("mg-input", { key: 'd19136f775e89188dcecf78a004abd1bc8048174', label: this.label, identifier: this.identifier, class: this.classCollection.classes.join(' '), ariaDescribedbyIDs: popoverContent && popoverContent !== 'list' ? popoverContent : undefined, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, readonlyValue)) : (h("mg-popover", { identifier: this.popoverId, placement: "bottom-start", display: this.popoverDisplay, "arrow-hide": true, style: {
764
+ return (h("mg-input", { key: '5c24478bb10ab8f1d292d38a9be162e370b0fdb2', label: this.label, identifier: this.identifier, class: this.classCollection.classes.join(' '), ariaDescribedbyIDs: popoverContent && popoverContent !== 'list' ? popoverContent : undefined, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, readonlyValue)) : (h("mg-popover", { identifier: this.popoverId, placement: "bottom-start", display: this.popoverDisplay, "arrow-hide": true, style: {
762
765
  '--mg-c-input-list-width': ((_f = this.input) === null || _f === void 0 ? void 0 : _f.offsetWidth) > 0 ? `${this.input.offsetWidth}px` : undefined,
763
766
  }, "data-fallback-placement": "bottom-end", "onDisplay-change": this.handlePopoverDisplay }, h("div", { class: "mg-c-input__input-group-container" }, h("mg-icon", { icon: "magnifying-glass" }), h("input", { type: "text", role: "combobox", class: "mg-c-input__box mg-c-input__box--width", value: this.filter, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, autocomplete: "off", "aria-autocomplete": "list", "aria-expanded": this.popoverDisplay.toString(), "aria-controls": listId, "aria-invalid": (this.invalid === true).toString(), "aria-activedescendant": formatID(activeDescendant), onInput: this.handleFilterInput, onBlur: this.handleFilterBlur, onFocus: this.handleFilterFocus, onKeyDown: this.handleFilterKeydown, ref: (el) => {
764
767
  if (el !== null)
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
- import { ClassList, isValidString, dateRegExp, dateToString, toString } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { ClassList, dateRegExp, dateToString, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { localeDate, localeDatePattern } from "@mgdis/core-ui-helpers/dist/locale";
4
5
  import { DEFAULT_MAX_DATE } from "./mg-input-date.conf";
5
6
  import { classReadonly, classDisabled } from "../mg-input/mg-input.conf";
@@ -339,6 +340,7 @@ export class MgInputDate {
339
340
  // as a native input use the OS locale to define the date pattern
340
341
  // we need to get this locale to define the displayed pattern
341
342
  this.systemLocale = Intl.DateTimeFormat().resolvedOptions().locale;
343
+ normalizeBooleanAttributes(this);
342
344
  // Validate
343
345
  this.validateValue(this.value);
344
346
  this.validateMinMax(this.min);
@@ -357,7 +359,7 @@ export class MgInputDate {
357
359
  * @returns HTML Element
358
360
  */
359
361
  render() {
360
- return (h("mg-input", { key: '0c3e08b8c467207110ef75f7d2516c36adc2ec4c', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === null ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, localeDate(this.value, this.locale))) : (h("input", { type: "date", class: "mg-c-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, ref: (el) => {
362
+ return (h("mg-input", { key: '7c6abb93dd859ba55d62860f4fac79ec29273fac', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === null ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly ? (this.value && h("b", { class: "mg-c-input__readonly-value" }, localeDate(this.value, this.locale))) : (h("input", { type: "date", class: "mg-c-input__box", min: this.min, max: this.max, value: this.value, id: this.identifier, name: this.name, disabled: this.disabled, required: this.required, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, onKeyDown: this.handleKeyDown, ref: (el) => {
361
363
  if (el !== null)
362
364
  this.input = el;
363
365
  } }))));
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
- import { allItemsAreString, ClassList, isObject, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
2
+ import { ClassList, allItemsAreString, isObject, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { localeByte } from "@mgdis/core-ui-helpers/dist/locale";
4
5
  import { classDisabled } from "../mg-input/mg-input.conf";
5
6
  import { initLocales } from "../../../../locales";
@@ -314,6 +315,7 @@ export class MgInputFile {
314
315
  const locales = initLocales(this.element);
315
316
  this.locale = locales.locale;
316
317
  this.messages = locales.messages;
318
+ normalizeBooleanAttributes(this);
317
319
  // Validate
318
320
  this.watchValue(this.value);
319
321
  this.watchDisabled(this.disabled);
@@ -332,9 +334,9 @@ export class MgInputFile {
332
334
  * @returns HTML Element
333
335
  */
334
336
  render() {
335
- return (h("mg-input", { key: '075d0b55b004653115305f5dd0d6bc897fd3e9ed', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("div", { key: '16ce644751bf7e4a23876ed59e7076625661794c', class: "mg-c-input__file-container" }, h("input", { key: 'e00df3de20567ef52825ca002b838a81e586c777', name: this.name, id: this.identifier, class: "mg-u-visually-hidden", type: "file", multiple: this.multiple === true, capture: this.capture, accept: this.accept, disabled: this.disabled, required: this.files.length === 0 && this.required, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-invalid": (this.invalid === true).toString(), ref: (el) => {
337
+ return (h("mg-input", { key: '0ca01b9b4697f55406262e93438946c2fe12e5f5', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, h("div", { key: '99fe30d5339687054392ca2fd8773af76af35396', class: "mg-c-input__file-container" }, h("input", { key: '84d9bee62d4c0c5975b561cc3e261905c759556f', name: this.name, id: this.identifier, class: "mg-u-visually-hidden", type: "file", multiple: this.multiple === true, capture: this.capture, accept: this.accept, disabled: this.disabled, required: this.files.length === 0 && this.required, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onChange: this.handleInputChange, "aria-invalid": (this.invalid === true).toString(), ref: (el) => {
336
338
  this.inputElement = el;
337
- } }), h("mg-button", { key: '92e356bd08d09070b4c58c525ef91ab6bdc64b74', variant: "secondary", class: "mg-c-input__file-button", type: "button", disabled: this.disabled, onClick: this.handleButtonClick, onBlur: this.handleButtonBlur, tabindex: "-1", ref: (el) => {
339
+ } }), h("mg-button", { key: '1b6694f7c36fa2c8a2c5347d93a9cb07678e9363', variant: "secondary", class: "mg-c-input__file-button", type: "button", disabled: this.disabled, onClick: this.handleButtonClick, onBlur: this.handleButtonBlur, tabindex: "-1", ref: (el) => {
338
340
  this.fileButtonElement = el;
339
341
  } }, this.messages.input.file.browse), this.renderFiles())));
340
342
  }
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { localeCurrency, localeNumber, localePercent, localeUnit } from "@mgdis/core-ui-helpers/dist/locale";
4
5
  import { types, formats } from "./mg-input-numeric.conf";
5
6
  import { classReadonly, classDisabled, widths } from "../mg-input/mg-input.conf";
@@ -437,6 +438,7 @@ export class MgInputNumeric {
437
438
  const locales = initLocales(this.element);
438
439
  this.locale = locales.locale;
439
440
  this.messages = locales.messages;
441
+ normalizeBooleanAttributes(this);
440
442
  // Validate component config
441
443
  this.watchFormat(this.format);
442
444
  this.validateType(this.type);
@@ -460,7 +462,7 @@ export class MgInputNumeric {
460
462
  * @returns HTML Element
461
463
  */
462
464
  render() {
463
- return (h("mg-input", { key: '9bea775c3e8d7339a45d18aeb1b3974d6da9a650', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly
465
+ return (h("mg-input", { key: '734f1734139c5919481693c869da68586f18a92f', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && this.value === undefined ? 'label' : this.tooltipPosition, helpText: this.formatHelpText(this.helpText), errorMessage: this.errorMessage }, this.readonly
464
466
  ? this.readonlyValue && this.renderReadonly()
465
467
  : [
466
468
  h("input", { key: "input", type: "text", class: "mg-c-input__box mg-c-input__box--width", value: this.displayValue(), id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, autocomplete: "off", "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, ref: (el) => {
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, isValidString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { classReadonly, classDisabled, widths } from "../mg-input/mg-input.conf";
4
5
  import { initLocales } from "../../../../locales";
5
6
  export class MgInputPassword {
@@ -233,6 +234,7 @@ export class MgInputPassword {
233
234
  componentWillLoad() {
234
235
  // Get locales
235
236
  this.messages = initLocales(this.element).messages;
237
+ normalizeBooleanAttributes(this);
236
238
  this.watchReadonly(this.readonly);
237
239
  this.watchDisabled(this.disabled);
238
240
  this.watchMgWidth(this.mgWidth);
@@ -248,7 +250,7 @@ export class MgInputPassword {
248
250
  * @returns HTML Element
249
251
  */
250
252
  render() {
251
- return (h("mg-input", { key: 'bfa5f289eb4d357c21cd9a753550bab1df846df8', label: this.label, identifier: this.identifier, class: this.classCollection.join(), 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 ? (this.value !== undefined && h("b", { class: "mg-c-input__readonly-value" }, '•'.repeat(this.value.length))) : (h("span", { class: "mg-c-input__input-group" }, h("input", { type: this.displayPassword ? 'text' : 'password', class: "mg-c-input__box mg-c-input__box--width", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, maxlength: this.maxlength, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
253
+ return (h("mg-input", { key: 'fb26a8db11651950de2fe01600443bf2d6cad9e6', label: this.label, identifier: this.identifier, class: this.classCollection.join(), 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 ? (this.value !== undefined && h("b", { class: "mg-c-input__readonly-value" }, '•'.repeat(this.value.length))) : (h("span", { class: "mg-c-input__input-group" }, h("input", { type: this.displayPassword ? 'text' : 'password', class: "mg-c-input__box mg-c-input__box--width", value: this.value, id: this.identifier, name: this.name, placeholder: this.placeholder, title: this.placeholder, disabled: this.disabled, required: this.required, maxlength: this.maxlength, "aria-invalid": (this.invalid === true).toString(), onInput: this.handleInput, onBlur: this.handleBlur, ref: (el) => {
252
254
  if (el !== null)
253
255
  this.input = el;
254
256
  } }), h("mg-button", { label: this.messages.input.password[this.displayPassword ? 'hide' : 'display'], disabled: this.disabled, variant: "flat", class: "mg-c-input__append-button", "is-icon": true, onClick: this.toggleDisplayPassword, "aria-controls": this.identifier }, h("mg-icon", { class: "mg-c-input__input-icon", icon: (this.displayPassword ? 'eye-slash' : 'eye') }))))));
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, allItemsAreString, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { classReadonly, classDisabled, classFieldset } from "../mg-input/mg-input.conf";
4
5
  import { initLocales } from "../../../../locales";
5
6
  /**
@@ -266,6 +267,7 @@ export class MgInputRadio {
266
267
  componentWillLoad() {
267
268
  // Get locales
268
269
  this.messages = initLocales(this.element).messages;
270
+ normalizeBooleanAttributes(this);
269
271
  // Validate
270
272
  this.validateItems(this.items);
271
273
  this.watchInputVerticalList(this.inputVerticalList);
@@ -284,7 +286,7 @@ export class MgInputRadio {
284
286
  * @returns HTML Element
285
287
  */
286
288
  render() {
287
- return (h("mg-input", { key: 'a24a80156ef3e7760d02a52900d93099cd570db8', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && !this.value ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, this.readonlyValue)) : (h("div", { class: "mg-c-input__input-group-container" }, this.options.map((input, index) => (h("div", { key: input.title, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': this.disabled || input.disabled } }, h("input", { type: "radio", id: this.identifier + '_' + index, name: this.identifier, value: index, checked: JSON.stringify(this.value) === JSON.stringify(this.options[index].value), disabled: this.disabled || input.disabled, required: this.required, onBlur: this.handleBlur, onInput: this.handleInput, ref: (el) => {
289
+ return (h("mg-input", { key: 'a749870b0b690a52d75a5ab6340e26cf0b1449c0', label: this.label, identifier: this.identifier, class: this.classCollection.join(), labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.readonly && !this.value ? 'label' : this.tooltipPosition, helpText: this.helpText, errorMessage: this.errorMessage }, this.readonly ? (this.readonlyValue && h("b", { class: "mg-c-input__readonly-value" }, this.readonlyValue)) : (h("div", { class: "mg-c-input__input-group-container" }, this.options.map((input, index) => (h("div", { key: input.title, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': this.disabled || input.disabled } }, h("input", { type: "radio", id: this.identifier + '_' + index, name: this.identifier, value: index, checked: JSON.stringify(this.value) === JSON.stringify(this.options[index].value), disabled: this.disabled || input.disabled, required: this.required, onBlur: this.handleBlur, onInput: this.handleInput, ref: (el) => {
288
290
  if (el !== null)
289
291
  this.inputs[index] = el;
290
292
  } }), h("label", { htmlFor: this.identifier + '_' + index }, input.title))))))));
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { ClassList, isValidString, toString } from "@mgdis/core-ui-helpers/dist/utils";
3
+ import { normalizeBooleanAttributes } from "@mgdis/core-ui-helpers/dist/stencil";
3
4
  import { classReadonly, classDisabled } from "../mg-input/mg-input.conf";
4
5
  import { initLocales } from "../../../../locales";
5
6
  import { Sanitizer } from "@mgdis/sanitize-html";
@@ -312,6 +313,7 @@ export class MgInputRichTextEditor {
312
313
  componentWillLoad() {
313
314
  // Get locales
314
315
  this.messages = initLocales(this.element).messages;
316
+ normalizeBooleanAttributes(this);
315
317
  // Validate
316
318
  this.validatePattern(this.pattern);
317
319
  this.validatePattern(this.patternErrorMessage);
@@ -375,7 +377,7 @@ export class MgInputRichTextEditor {
375
377
  * @returns HTML mg-input Element
376
378
  */
377
379
  render() {
378
- return (h("mg-input", { key: '019cea088aa4a3938d533d7214ba7a8a1e750c0d', identifier: this.identifier, class: this.classCollection.join(), label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.hasDisplayedError ? this.errorMessage : undefined }, this.readonly ? (h("div", { class: "mg-c-input__readonly-value", innerHTML: this.value })) : (h("div", { id: this.identifier, class: "mg-c-input__wrapper" }, h("textarea", { name: this.name, ref: (el) => {
380
+ return (h("mg-input", { key: '0236e3c0a380087557c381077ad382029a6b7ec7', identifier: this.identifier, class: this.classCollection.join(), label: this.label, labelOnTop: this.labelOnTop, labelHide: this.labelHide, required: this.required, tooltip: this.tooltip, tooltipPosition: this.tooltipPosition, helpText: this.helpText, errorMessage: this.hasDisplayedError ? this.errorMessage : undefined }, this.readonly ? (h("div", { class: "mg-c-input__readonly-value", innerHTML: this.value })) : (h("div", { id: this.identifier, class: "mg-c-input__wrapper" }, h("textarea", { name: this.name, ref: (el) => {
379
381
  if (el !== null)
380
382
  this.editorElement = el;
381
383
  } })))));