@mgdis/mg-components 6.16.0 → 6.18.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 (160) hide show
  1. package/dist/cjs/{index-T3-qWqFE.js → index-DCZEYvlH.js} +51 -28
  2. package/dist/cjs/{index-YM1EJx9X.js → index-TUElr4Wv.js} +10 -10
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/mg-action-more_37.cjs.entry.js +443 -228
  5. package/dist/cjs/mg-alert.cjs.entry.js +3 -3
  6. package/dist/cjs/mg-components.cjs.js +3 -3
  7. package/dist/cjs/mg-fieldset.cjs.entry.js +141 -0
  8. package/dist/cjs/mg-input-combobox.cjs.entry.js +73 -57
  9. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +36 -23
  10. package/dist/cjs/{mg-input.conf-WTsvDfpC.js → mg-input.conf-HYIzRsy7.js} +5 -0
  11. package/dist/cjs/mg-loader.cjs.entry.js +3 -3
  12. package/dist/cjs/mg-progress.cjs.entry.js +2 -2
  13. package/dist/collection/collection-manifest.json +2 -1
  14. package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +5 -5
  15. package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +7 -7
  16. package/dist/collection/components/atoms/mg-badge/mg-badge.js +6 -6
  17. package/dist/collection/components/atoms/mg-button/mg-button.js +13 -13
  18. package/dist/collection/components/atoms/mg-card/mg-card.js +2 -2
  19. package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -1
  20. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +1 -1
  21. package/dist/collection/components/atoms/mg-icon/mg-icon.js +32 -26
  22. package/dist/collection/components/atoms/mg-tag/mg-tag.js +3 -3
  23. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +2 -2
  24. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +6 -6
  25. package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +4 -0
  26. package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +193 -33
  27. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +7 -9
  28. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +65 -46
  29. package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +106 -86
  30. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +67 -65
  31. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +71 -66
  32. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +56 -38
  33. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +53 -35
  34. package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +66 -47
  35. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +58 -40
  36. package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +77 -59
  37. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +63 -45
  38. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +54 -30
  39. package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +2 -4
  40. package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +9 -6
  41. package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +7 -7
  42. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +2 -5
  43. package/dist/collection/components/molecules/mg-alert/mg-alert.js +5 -5
  44. package/dist/collection/components/molecules/mg-details/mg-details.js +7 -7
  45. package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +404 -0
  46. package/dist/collection/components/molecules/mg-form/mg-form.js +26 -17
  47. package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +3 -3
  48. package/dist/collection/components/molecules/mg-loader/mg-loader.js +4 -4
  49. package/dist/collection/components/molecules/mg-message/mg-message.js +4 -4
  50. package/dist/collection/components/molecules/mg-modal/mg-modal.js +8 -8
  51. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +7 -8
  52. package/dist/collection/components/molecules/mg-panel/mg-panel.js +53 -22
  53. package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +2 -2
  54. package/dist/collection/components/molecules/mg-popover/mg-popover.js +7 -7
  55. package/dist/collection/components/molecules/mg-progress/mg-progress.js +7 -7
  56. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -2
  57. package/dist/collection/components/molecules/mg-table/mg-table.js +2 -3
  58. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +7 -8
  59. package/dist/collection/locales/en/messages.json +5 -5
  60. package/dist/collection/locales/fr/messages.json +5 -5
  61. package/dist/components/index3.js +10 -10
  62. package/dist/components/mg-action-more.js +5 -3
  63. package/dist/components/mg-alert.js +5 -3
  64. package/dist/components/mg-badge2.js +4 -2
  65. package/dist/components/mg-button2.js +4 -2
  66. package/dist/components/mg-card2.js +4 -2
  67. package/dist/components/mg-character-left2.js +4 -2
  68. package/dist/components/mg-details.js +5 -3
  69. package/dist/components/mg-divider2.js +4 -2
  70. package/dist/components/mg-fieldset.d.ts +11 -0
  71. package/dist/components/mg-fieldset.js +209 -0
  72. package/dist/components/mg-form.js +8 -5
  73. package/dist/components/mg-icon2.js +29 -21
  74. package/dist/components/mg-illustrated-message.js +5 -3
  75. package/dist/components/mg-input-checkbox-paginated2.js +6 -6
  76. package/dist/components/mg-input-checkbox.js +32 -17
  77. package/dist/components/mg-input-combobox.js +75 -57
  78. package/dist/components/mg-input-date.js +39 -42
  79. package/dist/components/mg-input-numeric.js +30 -30
  80. package/dist/components/mg-input-password.js +26 -13
  81. package/dist/components/mg-input-radio.js +27 -13
  82. package/dist/components/mg-input-rich-text-editor.js +37 -22
  83. package/dist/components/mg-input-select2.js +28 -14
  84. package/dist/components/mg-input-text2.js +40 -26
  85. package/dist/components/mg-input-textarea.js +27 -14
  86. package/dist/components/mg-input-title2.js +4 -2
  87. package/dist/components/mg-input-toggle.js +39 -12
  88. package/dist/components/mg-input2.js +121 -20
  89. package/dist/components/mg-item-more2.js +13 -5
  90. package/dist/components/mg-loader2.js +5 -3
  91. package/dist/components/mg-menu-item2.js +4 -2
  92. package/dist/components/mg-message2.js +6 -4
  93. package/dist/components/mg-modal.js +6 -4
  94. package/dist/components/mg-pagination.js +4 -2
  95. package/dist/components/mg-panel.js +40 -9
  96. package/dist/components/mg-popover-content2.js +5 -3
  97. package/dist/components/mg-popover2.js +5 -3
  98. package/dist/components/mg-progress.js +5 -3
  99. package/dist/components/mg-skip-links.js +5 -3
  100. package/dist/components/mg-table.js +4 -2
  101. package/dist/components/mg-tabs2.js +5 -3
  102. package/dist/components/mg-tag.js +4 -2
  103. package/dist/components/mg-tooltip-content2.js +4 -2
  104. package/dist/components/mg-tooltip2.js +4 -2
  105. package/dist/esm/{index-WtiuOkLj.js → index-C7xjtdiw.js} +1 -1
  106. package/dist/esm/{index-Bab8_u8S.js → index-CNX6lq0x.js} +10 -10
  107. package/dist/esm/{index-JHj_9FSs.js → index-T6kOJXP1.js} +51 -28
  108. package/dist/esm/loader.js +3 -3
  109. package/dist/esm/mg-action-more_37.entry.js +444 -229
  110. package/dist/esm/mg-alert.entry.js +4 -4
  111. package/dist/esm/mg-components.js +4 -4
  112. package/dist/esm/mg-fieldset.entry.js +139 -0
  113. package/dist/esm/mg-input-combobox.entry.js +74 -58
  114. package/dist/esm/mg-input-rich-text-editor.entry.js +37 -24
  115. package/dist/esm/{mg-input.conf-CNgv8hc5.js → mg-input.conf-D9V2v4n2.js} +5 -1
  116. package/dist/esm/mg-loader.entry.js +4 -4
  117. package/dist/esm/mg-progress.entry.js +3 -3
  118. package/dist/mg-components/locales/en/messages.json +5 -5
  119. package/dist/mg-components/locales/fr/messages.json +5 -5
  120. package/dist/mg-components/mg-components.esm.js +1 -1
  121. package/dist/mg-components/p-2bab89c2.entry.js +1 -0
  122. package/dist/mg-components/{p-658f828c.entry.js → p-5abc77cd.entry.js} +1 -1
  123. package/dist/mg-components/p-7d2e43b2.entry.js +1 -0
  124. package/dist/mg-components/{p-c85b5d10.entry.js → p-92e5e5a6.entry.js} +1 -1
  125. package/dist/mg-components/{p-42a90251.entry.js → p-952288bd.entry.js} +1 -1
  126. package/dist/mg-components/{p-WtiuOkLj.js → p-C7xjtdiw.js} +1 -1
  127. package/dist/mg-components/p-CNX6lq0x.js +1 -0
  128. package/dist/mg-components/p-D9V2v4n2.js +1 -0
  129. package/dist/mg-components/p-T6kOJXP1.js +2 -0
  130. package/dist/mg-components/p-f2cddd52.entry.js +1 -0
  131. package/dist/mg-components/{p-82455ac7.entry.js → p-f6afaeb8.entry.js} +1 -1
  132. package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +1 -1
  133. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +0 -5
  134. package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +5 -0
  135. package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +32 -1
  136. package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +4 -3
  137. package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +4 -2
  138. package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +4 -2
  139. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +4 -2
  140. package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +4 -2
  141. package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +4 -2
  142. package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +4 -2
  143. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +4 -2
  144. package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +4 -2
  145. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +4 -2
  146. package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +4 -2
  147. package/dist/types/components/molecules/mg-fieldset/mg-fieldset.d.ts +105 -0
  148. package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -1
  149. package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +8 -1
  150. package/dist/types/components.d.ts +168 -18
  151. package/dist/types/stencil-public-runtime.d.ts +39 -2
  152. package/dist/types/types/index.d.ts +1 -1
  153. package/ide/intellij/web-types.json +289 -181
  154. package/ide/vscode/html-custom-data.json +259 -18
  155. package/package.json +23 -23
  156. package/dist/mg-components/p-54156253.entry.js +0 -1
  157. package/dist/mg-components/p-Bab8_u8S.js +0 -1
  158. package/dist/mg-components/p-CNgv8hc5.js +0 -1
  159. package/dist/mg-components/p-JHj_9FSs.js +0 -2
  160. package/dist/mg-components/p-abbd151c.entry.js +0 -1
@@ -0,0 +1,105 @@
1
+ import { ClassList } from '@mgdis/core-ui-helpers/dist/utils';
2
+ import { labelHeading } from '../inputs/mg-input/mg-input.conf';
3
+ export declare class MgFieldset {
4
+ /************
5
+ * Internal *
6
+ ************/
7
+ private mgInputs;
8
+ /**************
9
+ * Decorators *
10
+ **************/
11
+ /**
12
+ * Get component DOM element
13
+ */
14
+ element: HTMLMgFieldsetElement;
15
+ /**
16
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
17
+ */
18
+ identifier: string;
19
+ /**
20
+ * Fieldset name
21
+ * If not set the value equals the identifier
22
+ */
23
+ name: string;
24
+ /**
25
+ * Fieldset legend
26
+ */
27
+ legend: string;
28
+ /**
29
+ * Define if legend is visible
30
+ */
31
+ legendHide: boolean;
32
+ /**
33
+ * Define legend heading, use to define legend with associated semantic
34
+ */
35
+ legendHeading?: labelHeading;
36
+ /**
37
+ * Define if legend border is visible.
38
+ */
39
+ legendBorderDisplay: boolean;
40
+ watchLegendBorderDisplay(newValue: MgFieldset['legendBorderDisplay']): void;
41
+ /**
42
+ * Define if inputs are readonly
43
+ */
44
+ readonly: boolean;
45
+ watchReadonly(newValue: MgFieldset['readonly']): void;
46
+ /**
47
+ * Define if inputs are disabled
48
+ */
49
+ disabled: boolean;
50
+ handleAttributeChange(): void;
51
+ /**
52
+ * Add a tooltip message next to the fieldset
53
+ */
54
+ tooltip?: string;
55
+ /**
56
+ * Add a help text under the fieldset, usually expected data format and example
57
+ */
58
+ helpText?: string;
59
+ /**
60
+ * Define custom error message to display
61
+ */
62
+ errorMessage?: string;
63
+ /**
64
+ * Define fieldset valid state
65
+ */
66
+ valid: boolean;
67
+ /**
68
+ * Component classes
69
+ */
70
+ classCollection: ClassList;
71
+ /**
72
+ * Component is not a candidate for constraint validation.
73
+ * You can use this method to define the `errorMessage` and set the `valid` state to `false`.
74
+ * @param errorMessage - error message to display. Use a valid `string` to define an error or `undefined` to delete the error
75
+ */
76
+ setCustomValidity(errorMessage?: string): Promise<void>;
77
+ /**
78
+ * Display inputs error if it exists.
79
+ */
80
+ displayError(): Promise<void>;
81
+ /**
82
+ * Check if fieldset is valid
83
+ */
84
+ private checkValidity;
85
+ /**
86
+ * Set mgInputs
87
+ */
88
+ private setMgInputs;
89
+ /*************
90
+ * Lifecycle *
91
+ *************/
92
+ /**
93
+ * Check if component props are well configured on init
94
+ */
95
+ componentWillLoad(): void;
96
+ /**
97
+ * Add slot listeners
98
+ */
99
+ componentDidLoad(): void;
100
+ /**
101
+ * Render
102
+ * @returns HTML Element
103
+ */
104
+ render(): HTMLElement;
105
+ }
@@ -92,7 +92,7 @@ export declare class MgForm {
92
92
  */
93
93
  formReset: EventEmitter<boolean>;
94
94
  /**
95
- * Display input error if it exists.
95
+ * Display inputs/fieldsets errors if it exists.
96
96
  */
97
97
  displayError(): Promise<void>;
98
98
  /**
@@ -3,6 +3,7 @@ import { ClassList } from '@mgdis/core-ui-helpers/dist/utils';
3
3
  import { type ExpandToggleDisplayType, type TitlePositionType } from './mg-panel.conf';
4
4
  /**
5
5
  * @slot - Panel content
6
+ * @slot panel-title - Panel title content (replaces panel-title prop when used)
6
7
  * @slot header-right - Header right panel content
7
8
  */
8
9
  export declare class MgPanel {
@@ -27,7 +28,7 @@ export declare class MgPanel {
27
28
  /**
28
29
  * Panel title
29
30
  */
30
- panelTitle: string;
31
+ panelTitle?: string;
31
32
  validatePanelTitle(newValue: MgPanel['panelTitle']): void;
32
33
  /**
33
34
  * Panel title pattern
@@ -42,6 +43,7 @@ export declare class MgPanel {
42
43
  * Define if panel title is editable
43
44
  */
44
45
  titleEditable: boolean;
46
+ validateTitleEditable(newValue: MgPanel['titleEditable']): void;
45
47
  /**
46
48
  * Define title position
47
49
  */
@@ -88,6 +90,11 @@ export declare class MgPanel {
88
90
  /************
89
91
  * Methods *
90
92
  ************/
93
+ /**
94
+ * Check if panel-title slot is used
95
+ * @returns true if slot is used
96
+ */
97
+ private hasPanelTitleSlot;
91
98
  /**
92
99
  * Toggle is editing state
93
100
  */
@@ -10,10 +10,10 @@ import { VariantStyleType, VariantType } from "./components/molecules/mg-alert/m
10
10
  import { BadgeVariantType } from "./components/atoms/mg-badge/mg-badge.conf";
11
11
  import { ButtonType, SizeType, VariantType as VariantType1 } from "./components/atoms/mg-button/mg-button.conf";
12
12
  import { RadiusSizeType } from "./components/atoms/mg-card/mg-card.conf";
13
+ import { labelHeading, TooltipPosition, Width } from "./components/molecules/inputs/mg-input/mg-input.conf";
13
14
  import { AriaRoleType, RequiredMessageStatusType } from "./components/molecules/mg-form/mg-form.conf";
14
15
  import { IconSizeType, IconType, IconVariantStyleType, IconVariantType } from "./components/atoms/mg-icon/mg-icon.conf";
15
16
  import { IllustratedMessageDirectionType, IllustratedMessageSizeType } from "./components/molecules/mg-illustrated-message/mg-illustrated-message.conf";
16
- import { TooltipPosition, Width } from "./components/molecules/inputs/mg-input/mg-input.conf";
17
17
  import { CheckboxItem, CheckboxType, CheckboxValue } from "./components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf";
18
18
  import { Direction, Option } from "./types";
19
19
  import { RequestMappingType, ResponseMappingType } from "./components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf";
@@ -42,10 +42,10 @@ export { VariantStyleType, VariantType } from "./components/molecules/mg-alert/m
42
42
  export { BadgeVariantType } from "./components/atoms/mg-badge/mg-badge.conf";
43
43
  export { ButtonType, SizeType, VariantType as VariantType1 } from "./components/atoms/mg-button/mg-button.conf";
44
44
  export { RadiusSizeType } from "./components/atoms/mg-card/mg-card.conf";
45
+ export { labelHeading, TooltipPosition, Width } from "./components/molecules/inputs/mg-input/mg-input.conf";
45
46
  export { AriaRoleType, RequiredMessageStatusType } from "./components/molecules/mg-form/mg-form.conf";
46
47
  export { IconSizeType, IconType, IconVariantStyleType, IconVariantType } from "./components/atoms/mg-icon/mg-icon.conf";
47
48
  export { IllustratedMessageDirectionType, IllustratedMessageSizeType } from "./components/molecules/mg-illustrated-message/mg-illustrated-message.conf";
48
- export { TooltipPosition, Width } from "./components/molecules/inputs/mg-input/mg-input.conf";
49
49
  export { CheckboxItem, CheckboxType, CheckboxValue } from "./components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf";
50
50
  export { Direction, Option } from "./types";
51
51
  export { RequestMappingType, ResponseMappingType } from "./components/molecules/inputs/mg-input-combobox/mg-input-combobox.conf";
@@ -223,6 +223,62 @@ export namespace Components {
223
223
  */
224
224
  "fullWidth": boolean;
225
225
  }
226
+ interface MgFieldset {
227
+ /**
228
+ * Define if inputs are disabled
229
+ * @default false
230
+ */
231
+ "disabled": boolean;
232
+ /**
233
+ * Display inputs error if it exists.
234
+ */
235
+ "displayError": () => Promise<void>;
236
+ /**
237
+ * Add a help text under the fieldset, usually expected data format and example
238
+ */
239
+ "helpText"?: string;
240
+ /**
241
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
242
+ */
243
+ "identifier": string;
244
+ /**
245
+ * Fieldset legend
246
+ */
247
+ "legend": string;
248
+ /**
249
+ * Define if legend border is visible.
250
+ * @default false
251
+ */
252
+ "legendBorderDisplay": boolean;
253
+ /**
254
+ * Define legend heading, use to define legend with associated semantic
255
+ */
256
+ "legendHeading"?: labelHeading;
257
+ /**
258
+ * Define if legend is visible
259
+ * @default false
260
+ */
261
+ "legendHide": boolean;
262
+ /**
263
+ * Fieldset name If not set the value equals the identifier
264
+ * @default this.identifier
265
+ */
266
+ "name": string;
267
+ /**
268
+ * Define if inputs are readonly
269
+ * @default false
270
+ */
271
+ "readonly": boolean;
272
+ /**
273
+ * Component is not a candidate for constraint validation. You can use this method to define the `errorMessage` and set the `valid` state to `false`.
274
+ * @param errorMessage - error message to display. Use a valid `string` to define an error or `undefined` to delete the error
275
+ */
276
+ "setCustomValidity": (errorMessage?: string) => Promise<void>;
277
+ /**
278
+ * Add a tooltip message next to the fieldset
279
+ */
280
+ "tooltip"?: string;
281
+ }
226
282
  interface MgForm {
227
283
  /**
228
284
  * Define `<form/>` element aria role see more about aria roles use case: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles
@@ -234,7 +290,7 @@ export namespace Components {
234
290
  */
235
291
  "disabled": boolean;
236
292
  /**
237
- * Display input error if it exists.
293
+ * Display inputs/fieldsets errors if it exists.
238
294
  */
239
295
  "displayError": () => Promise<void>;
240
296
  /**
@@ -328,10 +384,24 @@ export namespace Components {
328
384
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
329
385
  */
330
386
  "identifier": string;
387
+ /**
388
+ * Display inputs after help-text and error message
389
+ * @default false
390
+ */
391
+ "inputsOnBottom"?: boolean;
331
392
  /**
332
393
  * Define input label
333
394
  */
334
395
  "label": string;
396
+ /**
397
+ * Define if label border is visible You must pair this mode with `labelOnTop`and `fieldset` class
398
+ * @default false
399
+ */
400
+ "labelBorderDisplay": boolean;
401
+ /**
402
+ * Define label heading, use to define label with associated semantic You must pair this mode with `labelOnTop`and `fieldset` class
403
+ */
404
+ "labelHeading"?: labelHeading;
335
405
  /**
336
406
  * Define if label is visible
337
407
  * @default false
@@ -434,8 +504,9 @@ export namespace Components {
434
504
  * Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
435
505
  * @param valid - value indicating the validity
436
506
  * @param errorMessage - the error message to display
507
+ * @param errorMessageLock - lock the error message and validity state
437
508
  */
438
- "setError": (valid: MgInputCheckbox["valid"], errorMessage: string) => Promise<void>;
509
+ "setError": (valid: MgInputCheckbox["valid"], errorMessage?: string, errorMessageLock?: boolean) => Promise<void>;
439
510
  /**
440
511
  * Set focus on input.
441
512
  */
@@ -594,8 +665,9 @@ export namespace Components {
594
665
  * Set an error and display a custom error message. This method can be used to set the component's error state from its concombobox by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given concombobox. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
595
666
  * @param valid - value indicating the validity
596
667
  * @param errorMessage - the error message to display
668
+ * @param errorMessageLock - lock the error message and validity state
597
669
  */
598
- "setError": (valid: MgInputCombobox["valid"], errorMessage: string) => Promise<void>;
670
+ "setError": (valid: MgInputCombobox["valid"], errorMessage?: string, errorMessageLock?: boolean) => Promise<void>;
599
671
  /**
600
672
  * Set focus on input.
601
673
  */
@@ -686,8 +758,9 @@ export namespace Components {
686
758
  * Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
687
759
  * @param valid - value indicating the validity
688
760
  * @param errorMessage - the error message to display
761
+ * @param errorMessageLock - lock the error message and validity state
689
762
  */
690
- "setError": (valid: MgInputDate["valid"], errorMessage: string) => Promise<void>;
763
+ "setError": (valid: MgInputDate["valid"], errorMessage?: string, errorMessageLock?: boolean) => Promise<void>;
691
764
  /**
692
765
  * Set focus on input.
693
766
  */
@@ -805,8 +878,9 @@ export namespace Components {
805
878
  * Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
806
879
  * @param valid - value indicating the validity
807
880
  * @param errorMessage - the error message to display
881
+ * @param errorMessageLock - lock the error message and validity state
808
882
  */
809
- "setError": (valid: MgInputNumeric["valid"], errorMessage: string) => Promise<void>;
883
+ "setError": (valid: MgInputNumeric["valid"], errorMessage?: string, errorMessageLock?: boolean) => Promise<void>;
810
884
  /**
811
885
  * Set focus on input.
812
886
  */
@@ -915,8 +989,9 @@ export namespace Components {
915
989
  * Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
916
990
  * @param valid - value indicating the validity
917
991
  * @param errorMessage - the error message to display
992
+ * @param errorMessageLock - lock the error message and validity state
918
993
  */
919
- "setError": (valid: MgInputPassword["valid"], errorMessage: string) => Promise<void>;
994
+ "setError": (valid: MgInputPassword["valid"], errorMessage?: string, errorMessageLock?: boolean) => Promise<void>;
920
995
  /**
921
996
  * Set focus on input.
922
997
  */
@@ -1007,8 +1082,9 @@ export namespace Components {
1007
1082
  * Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
1008
1083
  * @param valid - value indicating the validity
1009
1084
  * @param errorMessage - the error message to display
1085
+ * @param errorMessageLock - lock the error message and validity state
1010
1086
  */
1011
- "setError": (valid: MgInputRadio["valid"], errorMessage: string) => Promise<void>;
1087
+ "setError": (valid: MgInputRadio["valid"], errorMessage?: string, errorMessageLock?: boolean) => Promise<void>;
1012
1088
  /**
1013
1089
  * Set focus on input.
1014
1090
  */
@@ -1116,8 +1192,9 @@ export namespace Components {
1116
1192
  * Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
1117
1193
  * @param valid - value indicating the validity
1118
1194
  * @param errorMessage - the error message to display
1195
+ * @param errorMessageLock - lock the error message and validity state
1119
1196
  */
1120
- "setError": (valid: MgInputRichTextEditor["valid"], errorMessage: string) => Promise<void>;
1197
+ "setError": (valid: MgInputRichTextEditor["valid"], errorMessage?: string, errorMessageLock?: boolean) => Promise<void>;
1121
1198
  /**
1122
1199
  * Set focus on input.
1123
1200
  */
@@ -1222,8 +1299,9 @@ export namespace Components {
1222
1299
  * Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
1223
1300
  * @param valid - value indicating the validity
1224
1301
  * @param errorMessage - the error message to display
1302
+ * @param errorMessageLock - lock the error message and validity state
1225
1303
  */
1226
- "setError": (valid: MgInputSelect["valid"], errorMessage: string) => Promise<void>;
1304
+ "setError": (valid: MgInputSelect["valid"], errorMessage?: string, errorMessageLock?: boolean) => Promise<void>;
1227
1305
  /**
1228
1306
  * Set focus on input.
1229
1307
  */
@@ -1340,8 +1418,9 @@ export namespace Components {
1340
1418
  * Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
1341
1419
  * @param valid - value indicating the validity
1342
1420
  * @param errorMessage - the error message to display
1421
+ * @param errorMessageLock - lock the error message and validity state
1343
1422
  */
1344
- "setError": (valid: MgInputText["valid"], errorMessage: string) => Promise<void>;
1423
+ "setError": (valid: MgInputText["valid"], errorMessage?: string, errorMessageLock?: boolean) => Promise<void>;
1345
1424
  /**
1346
1425
  * Set focus on input.
1347
1426
  */
@@ -1465,8 +1544,9 @@ export namespace Components {
1465
1544
  * Set an error and display a custom error message. This method can be used to set the component's error state from its context by passing a boolean value to the `valid` parameter. It must be paired with an error message to display for the given context. When used to set validity to `false`, you should use this method again to reset the validity to `true`.
1466
1545
  * @param valid - value indicating the validity
1467
1546
  * @param errorMessage - the error message to display
1547
+ * @param errorMessageLock - lock the error message and validity state
1468
1548
  */
1469
- "setError": (valid: MgInputTextarea["valid"], errorMessage: string) => Promise<void>;
1549
+ "setError": (valid: MgInputTextarea["valid"], errorMessage?: string, errorMessageLock?: boolean) => Promise<void>;
1470
1550
  /**
1471
1551
  * Set focus on input.
1472
1552
  */
@@ -1528,7 +1608,7 @@ export namespace Components {
1528
1608
  */
1529
1609
  "isIcon": boolean;
1530
1610
  /**
1531
- * Define if toggle have on/off style
1611
+ * Define if toggle have on/off style, the left icon is hidden. Only available in combination with the "isIcon" prop.
1532
1612
  * @default false
1533
1613
  */
1534
1614
  "isOnOff": boolean;
@@ -1569,7 +1649,7 @@ export namespace Components {
1569
1649
  * @param valid - value indicating the validity
1570
1650
  * @param errorMessage - the error message to display
1571
1651
  */
1572
- "setError": (valid: boolean, errorMessage: string) => Promise<void>;
1652
+ "setError": (valid: boolean, errorMessage?: string) => Promise<void>;
1573
1653
  /**
1574
1654
  * Set focus on input.
1575
1655
  */
@@ -1757,7 +1837,7 @@ export namespace Components {
1757
1837
  /**
1758
1838
  * Panel title
1759
1839
  */
1760
- "panelTitle": string;
1840
+ "panelTitle"?: string;
1761
1841
  /**
1762
1842
  * Add box-shadow style
1763
1843
  * @default false
@@ -2119,6 +2199,12 @@ declare global {
2119
2199
  prototype: HTMLMgDividerElement;
2120
2200
  new (): HTMLMgDividerElement;
2121
2201
  };
2202
+ interface HTMLMgFieldsetElement extends Components.MgFieldset, HTMLStencilElement {
2203
+ }
2204
+ var HTMLMgFieldsetElement: {
2205
+ prototype: HTMLMgFieldsetElement;
2206
+ new (): HTMLMgFieldsetElement;
2207
+ };
2122
2208
  interface HTMLMgFormElementEventMap {
2123
2209
  "form-valid": HTMLMgFormElement['valid'];
2124
2210
  "form-submit": boolean;
@@ -2581,6 +2667,7 @@ declare global {
2581
2667
  "mg-character-left": HTMLMgCharacterLeftElement;
2582
2668
  "mg-details": HTMLMgDetailsElement;
2583
2669
  "mg-divider": HTMLMgDividerElement;
2670
+ "mg-fieldset": HTMLMgFieldsetElement;
2584
2671
  "mg-form": HTMLMgFormElement;
2585
2672
  "mg-icon": HTMLMgIconElement;
2586
2673
  "mg-illustrated-message": HTMLMgIllustratedMessageElement;
@@ -2791,6 +2878,53 @@ declare namespace LocalJSX {
2791
2878
  */
2792
2879
  "fullWidth"?: boolean;
2793
2880
  }
2881
+ interface MgFieldset {
2882
+ /**
2883
+ * Define if inputs are disabled
2884
+ * @default false
2885
+ */
2886
+ "disabled"?: boolean;
2887
+ /**
2888
+ * Add a help text under the fieldset, usually expected data format and example
2889
+ */
2890
+ "helpText"?: string;
2891
+ /**
2892
+ * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
2893
+ */
2894
+ "identifier": string;
2895
+ /**
2896
+ * Fieldset legend
2897
+ */
2898
+ "legend": string;
2899
+ /**
2900
+ * Define if legend border is visible.
2901
+ * @default false
2902
+ */
2903
+ "legendBorderDisplay"?: boolean;
2904
+ /**
2905
+ * Define legend heading, use to define legend with associated semantic
2906
+ */
2907
+ "legendHeading"?: labelHeading;
2908
+ /**
2909
+ * Define if legend is visible
2910
+ * @default false
2911
+ */
2912
+ "legendHide"?: boolean;
2913
+ /**
2914
+ * Fieldset name If not set the value equals the identifier
2915
+ * @default this.identifier
2916
+ */
2917
+ "name"?: string;
2918
+ /**
2919
+ * Define if inputs are readonly
2920
+ * @default false
2921
+ */
2922
+ "readonly"?: boolean;
2923
+ /**
2924
+ * Add a tooltip message next to the fieldset
2925
+ */
2926
+ "tooltip"?: string;
2927
+ }
2794
2928
  interface MgForm {
2795
2929
  /**
2796
2930
  * Define `<form/>` element aria role see more about aria roles use case: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles
@@ -2900,10 +3034,24 @@ declare namespace LocalJSX {
2900
3034
  * Identifier is used for the element ID (id is a reserved prop in Stencil.js)
2901
3035
  */
2902
3036
  "identifier": string;
3037
+ /**
3038
+ * Display inputs after help-text and error message
3039
+ * @default false
3040
+ */
3041
+ "inputsOnBottom"?: boolean;
2903
3042
  /**
2904
3043
  * Define input label
2905
3044
  */
2906
3045
  "label": string;
3046
+ /**
3047
+ * Define if label border is visible You must pair this mode with `labelOnTop`and `fieldset` class
3048
+ * @default false
3049
+ */
3050
+ "labelBorderDisplay"?: boolean;
3051
+ /**
3052
+ * Define label heading, use to define label with associated semantic You must pair this mode with `labelOnTop`and `fieldset` class
3053
+ */
3054
+ "labelHeading"?: labelHeading;
2907
3055
  /**
2908
3056
  * Define if label is visible
2909
3057
  * @default false
@@ -3998,7 +4146,7 @@ declare namespace LocalJSX {
3998
4146
  */
3999
4147
  "isIcon"?: boolean;
4000
4148
  /**
4001
- * Define if toggle have on/off style
4149
+ * Define if toggle have on/off style, the left icon is hidden. Only available in combination with the "isIcon" prop.
4002
4150
  * @default false
4003
4151
  */
4004
4152
  "isOnOff"?: boolean;
@@ -4253,7 +4401,7 @@ declare namespace LocalJSX {
4253
4401
  /**
4254
4402
  * Panel title
4255
4403
  */
4256
- "panelTitle": string;
4404
+ "panelTitle"?: string;
4257
4405
  /**
4258
4406
  * Add box-shadow style
4259
4407
  * @default false
@@ -4467,6 +4615,7 @@ declare namespace LocalJSX {
4467
4615
  "mg-character-left": MgCharacterLeft;
4468
4616
  "mg-details": MgDetails;
4469
4617
  "mg-divider": MgDivider;
4618
+ "mg-fieldset": MgFieldset;
4470
4619
  "mg-form": MgForm;
4471
4620
  "mg-icon": MgIcon;
4472
4621
  "mg-illustrated-message": MgIllustratedMessage;
@@ -4515,6 +4664,7 @@ declare module "@stencil/core" {
4515
4664
  "mg-character-left": LocalJSX.MgCharacterLeft & JSXBase.HTMLAttributes<HTMLMgCharacterLeftElement>;
4516
4665
  "mg-details": LocalJSX.MgDetails & JSXBase.HTMLAttributes<HTMLMgDetailsElement>;
4517
4666
  "mg-divider": LocalJSX.MgDivider & JSXBase.HTMLAttributes<HTMLMgDividerElement>;
4667
+ "mg-fieldset": LocalJSX.MgFieldset & JSXBase.HTMLAttributes<HTMLMgFieldsetElement>;
4518
4668
  "mg-form": LocalJSX.MgForm & JSXBase.HTMLAttributes<HTMLMgFormElement>;
4519
4669
  "mg-icon": LocalJSX.MgIcon & JSXBase.HTMLAttributes<HTMLMgIconElement>;
4520
4670
  "mg-illustrated-message": LocalJSX.MgIllustratedMessage & JSXBase.HTMLAttributes<HTMLMgIllustratedMessageElement>;
@@ -1,4 +1,5 @@
1
- declare type CustomMethodDecorator<T> = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
1
+ type CustomMethodDecorator<T> = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
2
+ type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
2
3
  export interface ComponentDecorator {
3
4
  (opts?: ComponentOptions): ClassDecorator;
4
5
  }
@@ -151,7 +152,13 @@ export interface StateDecorator {
151
152
  (): PropertyDecorator;
152
153
  }
153
154
  export interface WatchDecorator {
154
- (propName: string): CustomMethodDecorator<any>;
155
+ (propName: any): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
156
+ }
157
+ export interface PropSerializeDecorator {
158
+ (propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => string | null>;
159
+ }
160
+ export interface AttrDeserializeDecorator {
161
+ (propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => any>;
155
162
  }
156
163
  export interface UserBuildConditionals {
157
164
  isDev: boolean;
@@ -233,6 +240,14 @@ export declare const State: StateDecorator;
233
240
  * https://stenciljs.com/docs/reactive-data#watch-decorator
234
241
  */
235
242
  export declare const Watch: WatchDecorator;
243
+ /**
244
+ * Decorator to serialize a property to an attribute string.
245
+ */
246
+ export declare const PropSerialize: PropSerializeDecorator;
247
+ /**
248
+ * Decorator to deserialize an attribute string to a property.
249
+ */
250
+ export declare const AttrDeserialize: AttrDeserializeDecorator;
236
251
  export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
237
252
  export type ErrorHandler = (err: any, element?: HTMLElement) => void;
238
253
  /**
@@ -349,6 +364,28 @@ export declare function readTask(task: RafCallback): void;
349
364
  * Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
350
365
  */
351
366
  export declare const setErrorHandler: (handler: ErrorHandler) => void;
367
+ export type MixinFactory = <TBase extends new (...args: any[]) => any>(base: TBase) => abstract new (...args: ConstructorParameters<TBase>) => any;
368
+ /**
369
+ * Compose multiple mixin classes into a single constructor.
370
+ * The resulting class has the combined instance types of all mixed-in classes.
371
+ *
372
+ * Example:
373
+ * ```
374
+ * import { Mixin, MixinFactory } from '@stencil/core';
375
+ *
376
+ * const AWrap: MixinFactory = (Base) => {class A extends Base { propA = A }; return A;}
377
+ * const BWrap: MixinFactory = (Base) => {class B extends Base { propB = B }; return B;}
378
+ * const CWrap: MixinFactory = (Base) => {class C extends Base { propC = C }; return C;}
379
+ *
380
+ * class X extends Mixin(AWrap, BWrap, CWrap) {
381
+ * render() { return <div>{this.propA} {this.propB} {this.propC}</div>; }
382
+ * }
383
+ * ```
384
+ *
385
+ * @param mixinFactories mixin factory functions that return a class which extends from the provided class.
386
+ * @returns a class that that is composed from extending each of the provided classes in the order they were provided.
387
+ */
388
+ export declare function Mixin<TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<InstanceType<ReturnType<TMixins[number]>>>;
352
389
  /**
353
390
  * This file gets copied to all distributions of stencil component collections.
354
391
  * - no imports
@@ -5,7 +5,7 @@ export type Size = 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge
5
5
  /**
6
6
  * Defines the possible values for variant
7
7
  */
8
- export type Variant = 'info' | 'success' | 'warning' | 'danger' | 'danger-alt' | 'primary' | 'secondary' | 'app' | 'light' | 'dark' | 'flat' | 'text-color' | 'link';
8
+ export type Variant = 'info' | 'success' | 'warning' | 'danger' | 'danger-alt' | 'primary' | 'secondary' | 'app' | 'light' | 'dark' | 'flat' | 'text-color' | 'link' | 'neutral';
9
9
  /**
10
10
  * Defines the possible values for directions
11
11
  */