@mgdis/mg-components 6.22.1 → 6.23.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 (129) 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 +162 -71
  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 +4 -3
  9. package/dist/cjs/mg-input-file.cjs.entry.js +5 -4
  10. package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +7489 -6389
  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 +1 -1
  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 +4 -2
  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-panel/mg-panel.js +16 -4
  44. package/dist/components/index3.js +1 -1
  45. package/dist/components/index4.js +1 -0
  46. package/dist/components/mg-action-more.js +1 -1
  47. package/dist/components/mg-alert.js +1 -1
  48. package/dist/components/mg-badge2.js +1 -1
  49. package/dist/components/mg-breadcrumb.js +1 -1
  50. package/dist/components/mg-button2.js +1 -1
  51. package/dist/components/mg-card2.js +1 -1
  52. package/dist/components/mg-character-left2.js +1 -1
  53. package/dist/components/mg-details.js +1 -1
  54. package/dist/components/mg-divider2.js +1 -1
  55. package/dist/components/mg-fieldset.js +1 -1
  56. package/dist/components/mg-form.js +1 -1
  57. package/dist/components/mg-icon2.js +1 -1
  58. package/dist/components/mg-input-checkbox.js +1 -1
  59. package/dist/components/mg-input-combobox.js +1 -1
  60. package/dist/components/mg-input-date.js +1 -1
  61. package/dist/components/mg-input-file.js +1 -1
  62. package/dist/components/mg-input-numeric.js +1 -1
  63. package/dist/components/mg-input-password.js +1 -1
  64. package/dist/components/mg-input-radio.js +1 -1
  65. package/dist/components/mg-input-rich-text-editor.js +284 -284
  66. package/dist/components/mg-input-select2.js +1 -1
  67. package/dist/components/mg-input-text2.js +1 -1
  68. package/dist/components/mg-input-textarea.js +1 -1
  69. package/dist/components/mg-input-title2.js +1 -1
  70. package/dist/components/mg-input-toggle.js +1 -1
  71. package/dist/components/mg-input2.js +1 -1
  72. package/dist/components/mg-item-more2.js +1 -1
  73. package/dist/components/mg-loader2.js +1 -1
  74. package/dist/components/mg-menu-item2.js +1 -1
  75. package/dist/components/mg-message2.js +1 -1
  76. package/dist/components/mg-modal.js +1 -1
  77. package/dist/components/mg-pagination.js +1 -1
  78. package/dist/components/mg-panel.js +1 -1
  79. package/dist/components/mg-popover-content2.js +1 -1
  80. package/dist/components/mg-skip-links.js +1 -1
  81. package/dist/components/mg-table.js +1 -1
  82. package/dist/components/mg-tooltip2.js +1 -1
  83. package/dist/custom-elements.json +8828 -0
  84. package/dist/esm/{index-C3jUhxdI.js → index-DshvCiTL.js} +1 -1
  85. package/dist/esm/loader.js +3 -3
  86. package/dist/esm/mg-action-more_36.entry.js +162 -71
  87. package/dist/esm/mg-alert.entry.js +6 -2
  88. package/dist/esm/mg-breadcrumb.entry.js +1 -1
  89. package/dist/esm/mg-components.js +4 -4
  90. package/dist/esm/mg-fieldset.entry.js +4 -3
  91. package/dist/esm/mg-input-combobox.entry.js +4 -3
  92. package/dist/esm/mg-input-file.entry.js +5 -4
  93. package/dist/esm/mg-input-rich-text-editor.entry.js +7489 -6389
  94. package/dist/esm/mg-input.conf-DOi9lJXy.js +73 -0
  95. package/dist/esm/mg-loader.entry.js +1 -1
  96. package/dist/esm/mg-progress.entry.js +1 -1
  97. package/dist/mg-components/mg-components.esm.js +1 -1
  98. package/dist/mg-components/{p-661da56b.entry.js → p-13feb37a.entry.js} +1 -1
  99. package/dist/mg-components/{p-c1aeb277.entry.js → p-236bb1d2.entry.js} +1 -1
  100. package/dist/mg-components/p-79265ad3.entry.js +1 -0
  101. package/dist/mg-components/{p-8e256086.entry.js → p-7c63e469.entry.js} +1 -1
  102. package/dist/mg-components/p-7fd3e519.entry.js +1 -0
  103. package/dist/mg-components/p-DOi9lJXy.js +1 -0
  104. package/dist/mg-components/p-a0e2c886.entry.js +1 -0
  105. package/dist/mg-components/p-cdb01923.entry.js +1 -0
  106. package/dist/mg-components/p-d0b6d8f5.entry.js +1 -0
  107. package/dist/mg-components/p-d698fa67.entry.js +1658 -0
  108. package/dist/types/assets/icons/index.d.ts +2 -0
  109. package/dist/types/components/atoms/internals/mg-input-title/mg-input-title.d.ts +4 -0
  110. package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +4 -0
  111. package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +12 -6
  112. package/dist/types/components/molecules/mg-alert/mg-alert.d.ts +4 -0
  113. package/dist/types/components/molecules/mg-message/mg-message.d.ts +6 -0
  114. package/dist/types/components.d.ts +22 -0
  115. package/dist/types/stencil-public-runtime.d.ts +1 -0
  116. package/ide/intellij/web-types.json +207 -3472
  117. package/ide/vscode/css-custom-data.json +1 -1
  118. package/ide/vscode/html-custom-data.json +58 -314
  119. package/package.json +29 -24
  120. package/dist/cjs/mg-input.conf-BNpeATnq.js +0 -35
  121. package/dist/esm/mg-input.conf-C9rmNQIL.js +0 -25
  122. package/dist/mg-components/p-06fbdb2f.entry.js +0 -1
  123. package/dist/mg-components/p-188b9ca9.entry.js +0 -1
  124. package/dist/mg-components/p-4667078d.entry.js +0 -1
  125. package/dist/mg-components/p-5a859ecf.entry.js +0 -1658
  126. package/dist/mg-components/p-C9rmNQIL.js +0 -1
  127. package/dist/mg-components/p-b0b8c58f.entry.js +0 -1
  128. package/dist/mg-components/p-bbcef41c.entry.js +0 -1
  129. /package/dist/mg-components/{p-C3jUhxdI.js → p-DshvCiTL.js} +0 -0
@@ -0,0 +1,84 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Retrieve Component Storybook URL from file path
5
+ * @param storybookBaseUrl - Storybook Base URL
6
+ * @param filePath - Component file path
7
+ * @returns Component Storybook URL
8
+ */
9
+
10
+ /**
11
+ * Per the HTML spec, a boolean attribute is `true` whenever it is present on the
12
+ * element, regardless of its value (including `="false"`). Stencil's default Prop
13
+ * parser converts the string `"false"` to the boolean `false`, which breaks this
14
+ * contract for consumers writing markup. Call this helper from `componentWillLoad`
15
+ * to re-normalize every present attribute that maps to a boolean-typed Prop.
16
+ *
17
+ * Iterates the host element's attributes and, for each one whose camelCase name
18
+ * matches a `typeof === 'boolean'` Prop on the instance, rewrites the attribute
19
+ * to `''` — Stencil's parser then turns that into `true` via the standard
20
+ * attribute → prop pipeline (no need for `mutable: true` on the Prop, since the
21
+ * write goes through Stencil's internal setter, not through user code).
22
+ *
23
+ * Non-boolean Props and non-Prop attributes (`class`, `id`, ...) are skipped
24
+ * naturally by the type check.
25
+ *
26
+ * @param target - the component instance (must expose `element` via `@Element()`)
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * @Component({ tag: 'my-input' })
31
+ * export class MyInput {
32
+ * @Element() element: HTMLMyInputElement;
33
+ * @Prop() readonly = false;
34
+ * @Prop() disabled = false;
35
+ *
36
+ * componentWillLoad() {
37
+ * normalizeBooleanAttributes(this);
38
+ * }
39
+ * }
40
+ * ```
41
+ */
42
+ const normalizeBooleanAttributes = (target) => {
43
+ for (const attr of Array.from(target.element.attributes)) {
44
+ const propName = attr.name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
45
+ if (typeof target[propName] === 'boolean') {
46
+ target.element.setAttribute(attr.name, '');
47
+ }
48
+ }
49
+ };
50
+
51
+ /**
52
+ * Possible input width
53
+ */
54
+ const widths = [2, 4, 16, 'full'];
55
+ /**
56
+ * Possible tootltip postions
57
+ */
58
+ const tooltipPositions = ['input', 'label'];
59
+ /**
60
+ * Possible label headings
61
+ */
62
+ const labelHeadings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
63
+ /**
64
+ * Is HTMLMgInputElement an HTMLMgInputFileElement
65
+ * @param input - input element
66
+ * @returns true if input is an mg-input-file element
67
+ */
68
+ const isMgInputFile = (input) => input.nodeName === 'MG-INPUT-FILE';
69
+ const classFieldset = 'mg-c-input--fieldset';
70
+ const classDisabled = 'mg-c-input--disabled';
71
+ const classReadonly = 'mg-c-input--readonly';
72
+ const classVerticalList = 'mg-c-input--vertical-list';
73
+ const classDisplayCharacterLeft = 'mg-c-input--display-character-left';
74
+
75
+ exports.classDisabled = classDisabled;
76
+ exports.classDisplayCharacterLeft = classDisplayCharacterLeft;
77
+ exports.classFieldset = classFieldset;
78
+ exports.classReadonly = classReadonly;
79
+ exports.classVerticalList = classVerticalList;
80
+ exports.isMgInputFile = isMgInputFile;
81
+ exports.labelHeadings = labelHeadings;
82
+ exports.normalizeBooleanAttributes = normalizeBooleanAttributes;
83
+ exports.tooltipPositions = tooltipPositions;
84
+ exports.widths = widths;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Dz2LAZQT.js');
3
+ var index = require('./index-BEF-cqV9.js');
4
4
  var index$2 = require('./index-BxB20_Vw.js');
5
5
  var index$1 = require('./index-CpENFzEo.js');
6
6
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Dz2LAZQT.js');
3
+ var index = require('./index-BEF-cqV9.js');
4
4
  var index$1 = require('./index-CpENFzEo.js');
5
5
 
6
6
  /**