@mgdis/mg-components 6.19.0 → 6.21.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 (164) hide show
  1. package/dist/cjs/{index-Bp6wZzau.js → index-C2viYwrR.js} +1757 -80
  2. package/dist/cjs/{index-TUElr4Wv.js → index-CCsGMNyq.js} +46 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/mg-action-more_37.cjs.entry.js +735 -337
  5. package/dist/cjs/mg-alert.cjs.entry.js +17 -9
  6. package/dist/cjs/mg-components.cjs.js +3 -3
  7. package/dist/cjs/mg-fieldset.cjs.entry.js +24 -7
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +63 -29
  9. package/dist/cjs/mg-input-file.cjs.entry.js +384 -0
  10. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +30 -18
  11. package/dist/cjs/{mg-input.conf-D7jmj_lh.js → mg-input.conf-BNpeATnq.js} +7 -0
  12. package/dist/cjs/mg-loader.cjs.entry.js +8 -6
  13. package/dist/cjs/mg-progress.cjs.entry.js +19 -9
  14. package/dist/collection/collection-manifest.json +3 -2
  15. package/dist/collection/components/atoms/mg-icon/mg-icon.js +1 -1
  16. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +6 -0
  17. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +1 -1
  18. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +15 -11
  19. package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +877 -0
  20. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +1 -1
  21. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +1 -1
  22. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +1 -1
  23. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +12 -12
  24. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +1 -1
  25. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +2 -2
  26. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
  27. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +72 -84
  28. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
  29. package/dist/collection/components/molecules/mg-alert/mg-alert.js +1 -1
  30. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  31. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +12 -3
  32. package/dist/collection/components/molecules/mg-form/mg-form.js +12 -2
  33. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +1 -1
  34. package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
  35. package/dist/collection/components/molecules/mg-message/mg-message.js +2 -2
  36. package/dist/collection/components/molecules/mg-modal/mg-modal.js +2 -2
  37. package/dist/collection/components/molecules/mg-panel/mg-panel.js +1 -1
  38. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
  39. package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -1
  40. package/dist/collection/components/molecules/mg-progress/mg-progress.js +1 -1
  41. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -1
  42. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +1 -1
  43. package/dist/collection/locales/en/messages.json +11 -0
  44. package/dist/collection/locales/fr/messages.json +11 -0
  45. package/dist/components/events.utils.js +1 -23
  46. package/dist/components/index.d.ts +2 -0
  47. package/dist/components/index.js +1 -1
  48. package/dist/components/index2.js +1 -408
  49. package/dist/components/index3.js +1 -476
  50. package/dist/components/mg-action-more.js +1 -254
  51. package/dist/components/mg-alert.js +1 -224
  52. package/dist/components/mg-badge.js +1 -6
  53. package/dist/components/mg-badge2.js +1 -113
  54. package/dist/components/mg-button.js +1 -6
  55. package/dist/components/mg-button2.js +1 -275
  56. package/dist/components/mg-card.js +1 -6
  57. package/dist/components/mg-card2.js +1 -92
  58. package/dist/components/mg-character-left.js +1 -6
  59. package/dist/components/mg-character-left2.js +1 -75
  60. package/dist/components/mg-details.js +1 -104
  61. package/dist/components/mg-divider.js +1 -6
  62. package/dist/components/mg-divider2.js +1 -49
  63. package/dist/components/mg-fieldset.js +1 -209
  64. package/dist/components/mg-form.js +1 -302
  65. package/dist/components/mg-icon.js +1 -6
  66. package/dist/components/mg-icon2.js +1 -188
  67. package/dist/components/mg-illustrated-message.js +1 -129
  68. package/dist/components/mg-input-checkbox-paginated.js +1 -6
  69. package/dist/components/mg-input-checkbox-paginated2.js +1 -135
  70. package/dist/components/mg-input-checkbox.js +1 -762
  71. package/dist/components/mg-input-combobox.js +1 -936
  72. package/dist/components/mg-input-date.js +1 -463
  73. package/dist/components/mg-input-file.d.ts +11 -0
  74. package/dist/components/mg-input-file.js +1 -0
  75. package/dist/components/mg-input-numeric.js +1 -592
  76. package/dist/components/mg-input-password.js +1 -360
  77. package/dist/components/mg-input-radio.js +1 -392
  78. package/dist/components/mg-input-rich-text-editor.js +1 -16797
  79. package/dist/components/mg-input-select.js +1 -6
  80. package/dist/components/mg-input-select2.js +1 -481
  81. package/dist/components/mg-input-text.js +1 -6
  82. package/dist/components/mg-input-text2.js +1 -514
  83. package/dist/components/mg-input-textarea.js +1 -412
  84. package/dist/components/mg-input-title.js +1 -6
  85. package/dist/components/mg-input-title2.js +1 -81
  86. package/dist/components/mg-input-toggle.js +1 -386
  87. package/dist/components/mg-input.conf.js +1 -0
  88. package/dist/components/mg-input.js +1 -6
  89. package/dist/components/mg-input2.js +1 -459
  90. package/dist/components/mg-item-more.js +1 -6
  91. package/dist/components/mg-item-more2.js +1 -505
  92. package/dist/components/mg-loader.js +1 -6
  93. package/dist/components/mg-loader2.js +1 -74
  94. package/dist/components/mg-menu-item.js +1 -6
  95. package/dist/components/mg-menu-item2.js +1 -485
  96. package/dist/components/mg-menu.js +1 -6
  97. package/dist/components/mg-message.js +1 -6
  98. package/dist/components/mg-message2.js +1 -146
  99. package/dist/components/mg-modal.js +1 -184
  100. package/dist/components/mg-pagination.js +1 -234
  101. package/dist/components/mg-panel.js +1 -350
  102. package/dist/components/mg-popover-content.js +1 -6
  103. package/dist/components/mg-popover-content2.js +1 -96
  104. package/dist/components/mg-popover.js +1 -6
  105. package/dist/components/mg-popover2.js +1 -312
  106. package/dist/components/mg-progress.js +1 -123
  107. package/dist/components/mg-skip-links.js +1 -78
  108. package/dist/components/mg-table.js +1 -319
  109. package/dist/components/mg-tabs.js +1 -6
  110. package/dist/components/mg-tabs2.js +1 -315
  111. package/dist/components/mg-tag.js +1 -133
  112. package/dist/components/mg-tooltip-content.js +1 -6
  113. package/dist/components/mg-tooltip-content2.js +1 -42
  114. package/dist/components/mg-tooltip.js +1 -6
  115. package/dist/components/mg-tooltip2.js +1 -421
  116. package/dist/components/popper.js +1 -1790
  117. package/dist/esm/{index-CNX6lq0x.js → index-D-uaxCxH.js} +46 -1
  118. package/dist/esm/{index-BluNKQ3L.js → index-DFwaH2hS.js} +1757 -80
  119. package/dist/esm/loader.js +3 -3
  120. package/dist/esm/mg-action-more_37.entry.js +735 -337
  121. package/dist/esm/mg-alert.entry.js +17 -9
  122. package/dist/esm/mg-components.js +4 -4
  123. package/dist/esm/mg-fieldset.entry.js +24 -7
  124. package/dist/esm/mg-input-combobox.entry.js +63 -29
  125. package/dist/esm/mg-input-file.entry.js +382 -0
  126. package/dist/esm/mg-input-rich-text-editor.entry.js +30 -18
  127. package/dist/esm/{mg-input.conf-DDnrE1hD.js → mg-input.conf-C9rmNQIL.js} +7 -1
  128. package/dist/esm/mg-loader.entry.js +8 -6
  129. package/dist/esm/mg-progress.entry.js +19 -9
  130. package/dist/mg-components/locales/en/messages.json +11 -0
  131. package/dist/mg-components/locales/fr/messages.json +11 -0
  132. package/dist/mg-components/mg-components.esm.js +1 -1
  133. package/dist/mg-components/{p-d5a276eb.entry.js → p-08fa327b.entry.js} +1 -1
  134. package/dist/mg-components/p-4175dcbe.entry.js +1 -0
  135. package/dist/mg-components/p-6b57f249.entry.js +1 -0
  136. package/dist/mg-components/p-6b655830.entry.js +1 -0
  137. package/dist/mg-components/p-988c282e.entry.js +1 -0
  138. package/dist/mg-components/p-C9rmNQIL.js +1 -0
  139. package/dist/mg-components/p-D-uaxCxH.js +1 -0
  140. package/dist/mg-components/p-DFwaH2hS.js +2 -0
  141. package/dist/mg-components/p-a79b1f19.entry.js +1 -0
  142. package/dist/mg-components/{p-916dfb6d.entry.js → p-c3d116b9.entry.js} +1 -1
  143. package/dist/mg-components/p-dd1934f4.entry.js +1 -0
  144. package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +7 -1
  145. package/dist/types/components/molecules/inputs/mg-input-file/mg-input-file.d.ts +210 -0
  146. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +4 -4
  147. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +13 -16
  148. package/dist/types/components.d.ts +217 -18
  149. package/dist/types/stencil-public-runtime.d.ts +76 -12
  150. package/ide/intellij/web-types.json +373 -26
  151. package/ide/vscode/css-custom-data.json +12 -0
  152. package/ide/vscode/html-custom-data.json +341 -79
  153. package/package.json +22 -22
  154. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.scss +0 -1
  155. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.js +0 -1
  156. package/dist/mg-components/p-016bd291.entry.js +0 -1
  157. package/dist/mg-components/p-186a6139.entry.js +0 -1
  158. package/dist/mg-components/p-66a1cb83.entry.js +0 -1
  159. package/dist/mg-components/p-6efd819f.entry.js +0 -1
  160. package/dist/mg-components/p-BluNKQ3L.js +0 -2
  161. package/dist/mg-components/p-CNX6lq0x.js +0 -1
  162. package/dist/mg-components/p-DDnrE1hD.js +0 -1
  163. package/dist/mg-components/p-d2c72f09.entry.js +0 -1
  164. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +0 -8
@@ -1,129 +1 @@
1
- import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
- import { C as ClassList, t as toString, b as isTagName } from './index2.js';
3
-
4
- /**
5
- * List of all possibles sizes
6
- */
7
- const sizes = ['small', 'medium', 'large'];
8
- /**
9
- * List of all possibles directions
10
- */
11
- const directions = ['vertical', 'horizontal'];
12
-
13
- const mgIllustratedMessageCss = "/*!\n * @prop --mg-c-illustrated-message-spacing-vertical: Defines the vertical padding of the illustrated message. Default value: `--mg-b-size-40`.\n */.mg-c-illustrated-message{display:flex;max-width:calc(60*var(--mg-b-size-8));box-sizing:border-box;flex-direction:column;justify-content:center;padding:var(--mg-c-illustrated-message-spacing-vertical) var(--mg-b-size-16);margin:auto;gap:var(--mg-b-size-16) var(--mg-b-size-64);text-align:center}.mg-c-illustrated-message__illustration{max-height:calc(15*var(--mg-b-size-8))}.mg-c-illustrated-message__illustration ::slotted([slot=illustration]){width:100%;max-width:100%;max-width:calc(15*var(--mg-b-size-8));height:auto;max-height:calc(15*var(--mg-b-size-8))}.mg-c-illustrated-message__slots{display:flex;flex-direction:column;gap:var(--mg-b-size-8)}.mg-c-illustrated-message__slots ::slotted([slot=title]){margin:0;font-family:var(--mg-b-font-family) !important;font-size:var(--mg-b-font-size-h2) !important;font-weight:400 !important}.mg-c-illustrated-message__slots ::slotted([slot=details]){margin:0}.mg-c-illustrated-message.mg-c-illustrated-message--size-small{--mg-c-illustrated-message-spacing-vertical: var(--mg-b-size-24)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__slots{gap:calc(var(--mg-b-size-4)/2)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__illustration{max-height:var(--mg-b-size-64)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__illustration ::slotted([slot=illustration]){max-height:var(--mg-b-size-64)}.mg-c-illustrated-message.mg-c-illustrated-message--size-large .mg-c-illustrated-message__illustration{max-height:calc(23*var(--mg-b-size-8))}.mg-c-illustrated-message.mg-c-illustrated-message--size-large .mg-c-illustrated-message__illustration ::slotted([slot=illustration]){max-height:calc(23*var(--mg-b-size-8))}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal{max-width:unset}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__slots{max-width:calc(60*var(--mg-b-size-8))}@container (width > 52.8rem){.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal{flex-direction:row;align-items:center;column-gap:var(--mg-b-size-48);text-align:left}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__slots{max-width:unset}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__illustration{max-width:fit-content;flex:1 0 auto}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal.mg-c-illustrated-message--size-small{column-gap:var(--mg-b-size-24)}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal.mg-c-illustrated-message--size-large{column-gap:var(--mg-b-size-64)}}:host{display:block;container-type:inline-size}\n";
14
-
15
- const MgIllustratedMessage$1 = /*@__PURE__*/ proxyCustomElement(class MgIllustratedMessage extends HTMLElement {
16
- constructor(registerHost) {
17
- super();
18
- if (registerHost !== false) {
19
- this.__registerHost();
20
- }
21
- this.__attachShadow();
22
- /**
23
- * Define illustration size
24
- */
25
- this.size = 'medium';
26
- /**
27
- * Define component orientation
28
- */
29
- this.direction = 'vertical';
30
- /**
31
- * Component classes
32
- */
33
- this.classCollection = new ClassList(['mg-c-illustrated-message']);
34
- }
35
- watchSize(newValue, oldValue) {
36
- if (!sizes.includes(newValue)) {
37
- throw new Error(`<mg-illustrated-message> prop "size" must be one of: ${sizes.join(', ')}. Passed value: ${toString(newValue)}.`);
38
- }
39
- else {
40
- if (oldValue !== undefined) {
41
- this.classCollection.delete(`mg-c-illustrated-message--size-${oldValue}`);
42
- }
43
- this.classCollection.add(`mg-c-illustrated-message--size-${newValue}`);
44
- }
45
- }
46
- watchDirection(newValue, oldValue) {
47
- if (newValue !== undefined && !directions.includes(newValue)) {
48
- throw new Error(`<mg-illustrated-message> prop "direction" must be one of: ${directions.join(', ')}. Passed value: ${toString(newValue)}.`);
49
- }
50
- else if (newValue === 'horizontal') {
51
- this.classCollection.add('mg-c-illustrated-message--direction-horizontal');
52
- }
53
- else if (oldValue === 'horizontal') {
54
- this.classCollection.delete('mg-c-illustrated-message--direction-horizontal');
55
- }
56
- }
57
- /***********
58
- * Methods *
59
- ***********/
60
- /**
61
- * Validate slots
62
- */
63
- validateSlots() {
64
- const headingTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
65
- const slottedTitle = this.element.querySelector('[slot="title"]');
66
- const slottedIllustrations = this.element.querySelectorAll('[slot="illustration"]');
67
- const slottedDetails = this.element.querySelectorAll('[slot="details"]');
68
- if (slottedDetails.length === 0 && slottedTitle === null) {
69
- throw new Error('<mg-illustrated-message> Slot "title" or "details" must be present.');
70
- }
71
- else if (slottedTitle !== null && !isTagName(slottedTitle, headingTags)) {
72
- throw new Error(`<mg-illustrated-message> Slotted title must be a heading: ${headingTags.join(', ')}.`);
73
- }
74
- else if (slottedIllustrations.length !== 1) {
75
- throw new Error('<mg-illustrated-message> Slotted illustration must be present and unique.');
76
- }
77
- slottedIllustrations[0].setAttribute('aria-hidden', 'true');
78
- }
79
- /*************
80
- * Lifecycle *
81
- *************/
82
- /**
83
- * Check if component props are well configured on init
84
- */
85
- componentWillLoad() {
86
- this.watchDirection(this.direction);
87
- this.watchSize(this.size);
88
- this.validateSlots();
89
- }
90
- /**
91
- * Render
92
- * @returns HTML Element
93
- */
94
- render() {
95
- return (h("div", { key: 'c9d8c8bfd2792b1cf5e78ab9d168d597b20e9a1e', class: this.classCollection.join() }, h("div", { key: 'cc8fa03147b9e59e6e8e015be9ed2b8dddd92ded', class: "mg-c-illustrated-message__illustration" }, h("slot", { key: '83a4ec2223c4e74511beb7c0abfa10e77cee425d', name: "illustration" })), h("div", { key: 'dbb4d13ca5324cab889fa2acc9b9b22522d7a8ec', class: "mg-c-illustrated-message__slots" }, h("slot", { key: '9e74d84becf29539ec9c37e8ad1e317714f3c86c', name: "title" }), h("slot", { key: 'ae97d25c19b76ca092560d2555ebd6a87f542ffe', name: "details" }))));
96
- }
97
- get element() { return this; }
98
- static get watchers() { return {
99
- "size": ["watchSize"],
100
- "direction": ["watchDirection"]
101
- }; }
102
- static get style() { return mgIllustratedMessageCss; }
103
- }, [257, "mg-illustrated-message", {
104
- "size": [1],
105
- "direction": [1],
106
- "classCollection": [32]
107
- }, undefined, {
108
- "size": ["watchSize"],
109
- "direction": ["watchDirection"]
110
- }]);
111
- function defineCustomElement$1() {
112
- if (typeof customElements === "undefined") {
113
- return;
114
- }
115
- const components = ["mg-illustrated-message"];
116
- components.forEach(tagName => { switch (tagName) {
117
- case "mg-illustrated-message":
118
- if (!customElements.get(tagName)) {
119
- customElements.define(tagName, MgIllustratedMessage$1);
120
- }
121
- break;
122
- } });
123
- }
124
- defineCustomElement$1();
125
-
126
- const MgIllustratedMessage = MgIllustratedMessage$1;
127
- const defineCustomElement = defineCustomElement$1;
128
-
129
- export { MgIllustratedMessage, defineCustomElement };
1
+ import{transformTag as e,proxyCustomElement as t,HTMLElement as s,h as a}from"@stencil/core/internal/client";import{C as i,t as l,b as m}from"./index2.js";const r=["small","medium","large"],g=["vertical","horizontal"],o=t(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.size="medium",this.direction="vertical",this.classCollection=new i(["mg-c-illustrated-message"])}watchSize(e,t){if(!r.includes(e))throw Error(`<mg-illustrated-message> prop "size" must be one of: ${r.join(", ")}. Passed value: ${l(e)}.`);void 0!==t&&this.classCollection.delete("mg-c-illustrated-message--size-"+t),this.classCollection.add("mg-c-illustrated-message--size-"+e)}watchDirection(e,t){if(void 0!==e&&!g.includes(e))throw Error(`<mg-illustrated-message> prop "direction" must be one of: ${g.join(", ")}. Passed value: ${l(e)}.`);"horizontal"===e?this.classCollection.add("mg-c-illustrated-message--direction-horizontal"):"horizontal"===t&&this.classCollection.delete("mg-c-illustrated-message--direction-horizontal")}validateSlots(){const e=["h1","h2","h3","h4","h5","h6"],t=this.element.querySelector('[slot="title"]'),s=this.element.querySelectorAll('[slot="illustration"]');if(0===this.element.querySelectorAll('[slot="details"]').length&&null===t)throw Error('<mg-illustrated-message> Slot "title" or "details" must be present.');if(null!==t&&!m(t,e))throw Error(`<mg-illustrated-message> Slotted title must be a heading: ${e.join(", ")}.`);if(1!==s.length)throw Error("<mg-illustrated-message> Slotted illustration must be present and unique.");s[0].setAttribute("aria-hidden","true")}componentWillLoad(){this.watchDirection(this.direction),this.watchSize(this.size),this.validateSlots()}render(){return a("div",{key:"f2bcf91e8d639736514a55a73d0182339eda1455",class:this.classCollection.join()},a("div",{key:"46f862fc2a3daf2f217c55feebd41abb76252de2",class:"mg-c-illustrated-message__illustration"},a("slot",{key:"e2a0e9752a6739a684fd2668a8e8f0f792a0c38b",name:"illustration"})),a("div",{key:"b037dd43ae59c07ca122b68b56dc3230a7aa94f2",class:"mg-c-illustrated-message__slots"},a("slot",{key:"3a99f08cfb68bd51fbd015d213bb462acbfdda1a",name:"title"}),a("slot",{key:"14490ee1e7f9470f433c6249d502bd0a4dd77ca3",name:"details"})))}get element(){return this}static get watchers(){return{size:[{watchSize:0}],direction:[{watchDirection:0}]}}static get style(){return".mg-c-illustrated-message{display:flex;max-width:calc(60*var(--mg-b-size-8));box-sizing:border-box;flex-direction:column;justify-content:center;padding:var(--mg-c-illustrated-message-spacing-vertical) var(--mg-b-size-16);margin:auto;gap:var(--mg-b-size-16) var(--mg-b-size-64);text-align:center}.mg-c-illustrated-message__illustration{max-height:calc(15*var(--mg-b-size-8))}.mg-c-illustrated-message__illustration ::slotted([slot=illustration]){width:100%;max-width:100%;max-width:calc(15*var(--mg-b-size-8));height:auto;max-height:calc(15*var(--mg-b-size-8))}.mg-c-illustrated-message__slots{display:flex;flex-direction:column;gap:var(--mg-b-size-8)}.mg-c-illustrated-message__slots ::slotted([slot=title]){margin:0;font-family:var(--mg-b-font-family) !important;font-size:var(--mg-b-font-size-h2) !important;font-weight:400 !important}.mg-c-illustrated-message__slots ::slotted([slot=details]){margin:0}.mg-c-illustrated-message.mg-c-illustrated-message--size-small{--mg-c-illustrated-message-spacing-vertical:var(--mg-b-size-24)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__slots{gap:calc(var(--mg-b-size-4)/2)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__illustration{max-height:var(--mg-b-size-64)}.mg-c-illustrated-message.mg-c-illustrated-message--size-small .mg-c-illustrated-message__illustration ::slotted([slot=illustration]){max-height:var(--mg-b-size-64)}.mg-c-illustrated-message.mg-c-illustrated-message--size-large .mg-c-illustrated-message__illustration{max-height:calc(23*var(--mg-b-size-8))}.mg-c-illustrated-message.mg-c-illustrated-message--size-large .mg-c-illustrated-message__illustration ::slotted([slot=illustration]){max-height:calc(23*var(--mg-b-size-8))}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal{max-width:unset}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__slots{max-width:calc(60*var(--mg-b-size-8))}@container (width > 52.8rem){.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal{flex-direction:row;align-items:center;column-gap:var(--mg-b-size-48);text-align:left}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__slots{max-width:unset}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal .mg-c-illustrated-message__illustration{max-width:fit-content;flex:1 0 auto}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal.mg-c-illustrated-message--size-small{column-gap:var(--mg-b-size-24)}.mg-c-illustrated-message.mg-c-illustrated-message--direction-horizontal.mg-c-illustrated-message--size-large{column-gap:var(--mg-b-size-64)}}:host{display:block;container-type:inline-size}"}},[257,"mg-illustrated-message",{size:[1],direction:[1],classCollection:[32]},void 0,{size:[{watchSize:0}],direction:[{watchDirection:0}]}]);function c(){"undefined"!=typeof customElements&&["mg-illustrated-message"].forEach((t=>{"mg-illustrated-message"===t&&(customElements.get(e(t))||customElements.define(e(t),o))}))}c();const d=o,n=c;export{d as MgIllustratedMessage,n as defineCustomElement}
@@ -1,6 +1 @@
1
- import { M as MgInputCheckboxPaginated$1, d as defineCustomElement$1 } from './mg-input-checkbox-paginated2.js';
2
-
3
- const MgInputCheckboxPaginated = MgInputCheckboxPaginated$1;
4
- const defineCustomElement = defineCustomElement$1;
5
-
6
- export { MgInputCheckboxPaginated, defineCustomElement };
1
+ import{M as o,d as t}from"./mg-input-checkbox-paginated2.js";const a=o,p=t;export{a as MgInputCheckboxPaginated,p as defineCustomElement}
@@ -1,135 +1 @@
1
- import { h, proxyCustomElement, HTMLElement, Host } from '@stencil/core/internal/client';
2
- import { f as formatID } from './index2.js';
3
- import { d as defineCustomElement$2 } from './mg-button2.js';
4
- import { d as defineCustomElement$1 } from './mg-icon2.js';
5
-
6
- /**
7
- * Get checkboxes list template
8
- * @param props - MgInputCheckboxList Interface Props
9
- * @returns input template
10
- */
11
- const MgInputCheckboxList = (props) => (h("ul", { class: "mg-c-input__input-group-container", role: "list", "aria-labelledby": props.labelledby, id: props.id }, props.checkboxes.map(input => {
12
- var _a, _b;
13
- return (h("li", { key: input._id, class: { 'mg-c-input__input-group': true, 'mg-c-input__input-group--disabled': props.disabled || input.disabled } }, h("input", { type: "checkbox", id: input._id, name: props.name, value: (_a = input.value) === null || _a === void 0 ? void 0 : _a.toString(), checked: Boolean(input.value), required: input.required, "aria-invalid": ((_b = props.invalid) === null || _b === void 0 ? void 0 : _b.toString()) || 'false', disabled: props.disabled || input.disabled, indeterminate: input.value === null, onInput: input._handleInput, onBlur: input._handleBlur, onKeyDown: input._handleKeydown }), h("label", { htmlFor: input._id }, input.title)));
14
- })));
15
-
16
- const MgInputCheckboxPaginated = /*@__PURE__*/ proxyCustomElement(class MgInputCheckboxPaginated extends HTMLElement {
17
- constructor(registerHost) {
18
- super();
19
- if (registerHost !== false) {
20
- this.__registerHost();
21
- }
22
- this.step = 10;
23
- /*************
24
- * Decorators *
25
- *************/
26
- /**
27
- * Define if mg-input-checkbox-list is readonly
28
- */
29
- this.readonly = false;
30
- /**
31
- * Define if mg-input-checkbox-list is disabled
32
- */
33
- this.disabled = false;
34
- /**
35
- * Page items limit to display
36
- */
37
- this.limit = this.step;
38
- /***********
39
- * Methods *
40
- ***********/
41
- /**
42
- * Component has next checkboxes to display
43
- * @returns truthy if have next elements
44
- */
45
- this.hasNext = () => {
46
- return this.checkboxes.length > this.limit;
47
- };
48
- /**
49
- * Set items from checkboxes and limit
50
- */
51
- this.setItems = () => {
52
- this.items = this.checkboxes.slice(0, this.limit);
53
- };
54
- /**
55
- * Handle load-more <mg-button> click event
56
- */
57
- this.handleLoadMore = () => {
58
- if (this.hasNext()) {
59
- this.limit += this.step;
60
- }
61
- };
62
- }
63
- watchCheckboxes() {
64
- this.setItems();
65
- }
66
- watchLimit() {
67
- this.setItems();
68
- }
69
- /**
70
- * Method to reset limit
71
- */
72
- async resetLimit() {
73
- this.limit = this.step;
74
- }
75
- /*************
76
- * Lifecycle *
77
- *************/
78
- /**
79
- * Validate props
80
- */
81
- componentWillLoad() {
82
- this.watchCheckboxes();
83
- }
84
- /**
85
- * Render
86
- * @returns HTML Element
87
- */
88
- render() {
89
- const listId = formatID(this.messages.label);
90
- const tabId = 'tab-info';
91
- return (h(Host, { key: '233ab4fca3f4a3121bc60650ac2f8ae06d47e6e5' }, h("slot", { key: '7d1af8c712928c06953743fc5c182e51d9a6256b', name: "header-action" }), h("div", { key: '95641bd218e36422a6b5b4ead8dd5498e8ac5fa4', class: "mg-c-input__tabs-content" }, h("p", { key: '34814dd1afc9f871cd032500b931e692d63cbd25', id: tabId, class: { 'mg-c-input__popover-info': true, 'mg-u-visually-hidden': this.items.length !== 0 }, "aria-live": this.items.length !== 0 ? 'polite' : undefined }, this.items.length === 0 ? this.messages.noValue : this.messages.values.replace('{count}', this.items.length.toString())), this.items.length > 0 && (h(MgInputCheckboxList, { key: '621077f291a401737157ad0cd9b9348537ef8bdc', checkboxes: this.items, labelledby: tabId, id: listId, disabled: this.disabled, name: this.name, invalid: this.invalid })), this.hasNext() && (h("mg-button", { key: "load-more", variant: "flat", class: "mg-c-input__load-more", tabIndex: -1, "full-width": true, onClick: this.handleLoadMore, "aria-controls": listId }, h("mg-icon", { key: 'cb00bbeb1575475b184cc9623db6c4cefc56c26a', icon: "chevron-down" }), this.messages.showMore)))));
92
- }
93
- static get watchers() { return {
94
- "checkboxes": ["watchCheckboxes"],
95
- "limit": ["watchLimit"]
96
- }; }
97
- }, [262, "mg-input-checkbox-paginated", {
98
- "readonly": [4],
99
- "disabled": [4],
100
- "name": [1],
101
- "invalid": [4],
102
- "checkboxes": [16],
103
- "messages": [16],
104
- "limit": [32],
105
- "resetLimit": [64]
106
- }, undefined, {
107
- "checkboxes": ["watchCheckboxes"],
108
- "limit": ["watchLimit"]
109
- }]);
110
- function defineCustomElement() {
111
- if (typeof customElements === "undefined") {
112
- return;
113
- }
114
- const components = ["mg-input-checkbox-paginated", "mg-button", "mg-icon"];
115
- components.forEach(tagName => { switch (tagName) {
116
- case "mg-input-checkbox-paginated":
117
- if (!customElements.get(tagName)) {
118
- customElements.define(tagName, MgInputCheckboxPaginated);
119
- }
120
- break;
121
- case "mg-button":
122
- if (!customElements.get(tagName)) {
123
- defineCustomElement$2();
124
- }
125
- break;
126
- case "mg-icon":
127
- if (!customElements.get(tagName)) {
128
- defineCustomElement$1();
129
- }
130
- break;
131
- } });
132
- }
133
- defineCustomElement();
134
-
135
- export { MgInputCheckboxPaginated as M, MgInputCheckboxList as a, defineCustomElement as d };
1
+ import{h as t,transformTag as i,proxyCustomElement as e,HTMLElement as s,Host as c}from"@stencil/core/internal/client";import{f as a}from"./index2.js";import{d as n}from"./mg-button2.js";import{d as o}from"./mg-icon2.js";const d=i=>t("ul",{class:"mg-c-input__input-group-container",role:"list","aria-labelledby":i.labelledby,id:i.id},i.checkboxes.map((e=>{var s,c;return t("li",{key:e._id,class:{"mg-c-input__input-group":!0,"mg-c-input__input-group--disabled":i.disabled||e.disabled}},t("input",{type:"checkbox",id:e._id,name:i.name,value:null===(s=e.value)||void 0===s?void 0:s.toString(),checked:Boolean(e.value),required:e.required,"aria-invalid":(null===(c=i.invalid)||void 0===c?void 0:c.toString())||"false",disabled:i.disabled||e.disabled,indeterminate:null===e.value,onInput:e._handleInput,onBlur:e._handleBlur,onKeyDown:e._handleKeydown}),t("label",{htmlFor:e._id},e.title))}))),h=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.step=10,this.readonly=!1,this.disabled=!1,this.limit=this.step,this.hasNext=()=>this.checkboxes.length>this.limit,this.setItems=()=>{this.items=this.checkboxes.slice(0,this.limit)},this.handleLoadMore=()=>{this.hasNext()&&(this.limit+=this.step)}}watchCheckboxes(){this.setItems()}watchLimit(){this.setItems()}async resetLimit(){this.limit=this.step}componentWillLoad(){this.watchCheckboxes()}render(){const i=a(this.messages.label),e="tab-info";return t(c,{key:"233ab4fca3f4a3121bc60650ac2f8ae06d47e6e5"},t("slot",{key:"7d1af8c712928c06953743fc5c182e51d9a6256b",name:"header-action"}),t("div",{key:"95641bd218e36422a6b5b4ead8dd5498e8ac5fa4",class:"mg-c-input__tabs-content"},t("p",{key:"34814dd1afc9f871cd032500b931e692d63cbd25",id:e,class:{"mg-c-input__popover-info":!0,"mg-u-visually-hidden":0!==this.items.length},"aria-live":0!==this.items.length?"polite":void 0},0===this.items.length?this.messages.noValue:this.messages.values.replace("{count}",this.items.length.toString())),this.items.length>0&&t(d,{key:"621077f291a401737157ad0cd9b9348537ef8bdc",checkboxes:this.items,labelledby:e,id:i,disabled:this.disabled,name:this.name,invalid:this.invalid}),this.hasNext()&&t("mg-button",{key:"load-more",variant:"flat",class:"mg-c-input__load-more",tabIndex:-1,"full-width":!0,onClick:this.handleLoadMore,"aria-controls":i},t("mg-icon",{key:"cb00bbeb1575475b184cc9623db6c4cefc56c26a",icon:"chevron-down"}),this.messages.showMore)))}static get watchers(){return{checkboxes:[{watchCheckboxes:0}],limit:[{watchLimit:0}]}}},[262,"mg-input-checkbox-paginated",{readonly:[4],disabled:[4],name:[1],invalid:[4],checkboxes:[16],messages:[16],limit:[32],resetLimit:[64]},void 0,{checkboxes:[{watchCheckboxes:0}],limit:[{watchLimit:0}]}]);function l(){"undefined"!=typeof customElements&&["mg-input-checkbox-paginated","mg-button","mg-icon"].forEach((t=>{switch(t){case"mg-input-checkbox-paginated":customElements.get(i(t))||customElements.define(i(t),h);break;case"mg-button":customElements.get(i(t))||n();break;case"mg-icon":customElements.get(i(t))||o()}}))}l();export{h as M,d as a,l as d}