@mgdis/mg-components 5.6.0 → 5.7.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 (184) hide show
  1. package/dist/cjs/{index-4dcc1812.js → index-5e7ede97.js} +109 -3
  2. package/dist/cjs/loader.cjs.js +4 -3
  3. package/dist/cjs/{mg-badge_30.cjs.entry.js → mg-action-more_31.cjs.entry.js} +623 -445
  4. package/dist/cjs/mg-components.cjs.js +7 -3
  5. package/dist/collection/collection-manifest.json +5 -4
  6. package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -1
  7. package/dist/collection/components/atoms/mg-button/mg-button.css +7 -21
  8. package/dist/collection/components/atoms/mg-button/mg-button.js +1 -1
  9. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +27 -27
  10. package/dist/collection/components/atoms/mg-icon/mg-icon.js +3 -3
  11. package/dist/collection/components/atoms/mg-tag/mg-tag.js +1 -1
  12. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +12 -15
  13. package/dist/collection/components/molecules/inputs/MgInput.js +6 -1
  14. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +4 -3
  15. package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +3 -2
  16. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +4 -0
  17. package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
  18. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +4 -0
  19. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +1 -1
  20. package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +4 -0
  21. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +4 -3
  22. package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +2 -1
  23. package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +4 -0
  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.css +4 -0
  26. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +4 -0
  27. package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
  28. package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +4 -4
  29. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +2 -3
  30. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +2 -1
  31. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +31 -11
  32. package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js +1 -0
  33. package/dist/collection/components/molecules/mg-action-more/mg-action-more.css +38 -0
  34. package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +252 -0
  35. package/dist/collection/components/molecules/mg-form/mg-form.js +2 -2
  36. package/dist/collection/components/molecules/mg-message/mg-message.js +1 -1
  37. package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +19 -1
  38. package/dist/collection/components/molecules/mg-panel/mg-panel.js +2 -2
  39. package/dist/collection/components/molecules/mg-popover/mg-popover.css +0 -1
  40. package/dist/collection/components/molecules/mg-popover/mg-popover.js +17 -4
  41. package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +2 -1
  42. package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +2 -1
  43. package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +9 -8
  44. package/dist/collection/locales/en/messages.json +6 -1
  45. package/dist/collection/locales/fr/messages.json +6 -1
  46. package/dist/collection/locales/index.js +1 -1
  47. package/dist/collection/styles/mg-icon-animation.scss +6 -0
  48. package/dist/collection/styles/navigation-button.scss +2 -1
  49. package/dist/collection/utils/behaviors.utils.js +16 -34
  50. package/dist/collection/utils/components.utils.js +3 -1
  51. package/dist/collection/utils/locale.utils.js +9 -9
  52. package/dist/collection/utils/unit.test.utils.js +32 -4
  53. package/dist/collection/variables.css +2 -1
  54. package/dist/components/MgInput.js +6 -1
  55. package/dist/components/components.utils.js +3 -1
  56. package/dist/components/index.d.ts +10 -0
  57. package/dist/components/index.js +2 -1
  58. package/dist/components/index2.js +26 -14
  59. package/dist/components/mg-action-more.d.ts +11 -0
  60. package/dist/components/mg-action-more.js +215 -0
  61. package/dist/components/mg-badge2.js +1 -1
  62. package/dist/components/mg-button2.js +2 -2
  63. package/dist/components/mg-form.js +2 -2
  64. package/dist/components/mg-icon2.js +30 -30
  65. package/dist/components/mg-input-checkbox.js +3 -3
  66. package/dist/components/mg-input-date.js +2 -2
  67. package/dist/components/mg-input-numeric.js +2 -2
  68. package/dist/components/mg-input-password.js +1 -1
  69. package/dist/components/mg-input-radio.js +2 -2
  70. package/dist/components/mg-input-select2.js +2 -2
  71. package/dist/components/mg-input-text2.js +1 -1
  72. package/dist/components/mg-input-textarea.js +2 -2
  73. package/dist/components/mg-input-toggle.js +1 -1
  74. package/dist/components/mg-menu-item2.js +75 -72
  75. package/dist/components/mg-menu.js +1 -246
  76. package/dist/components/mg-menu2.js +247 -0
  77. package/dist/components/mg-message.js +1 -1
  78. package/dist/components/mg-pagination.js +3 -1
  79. package/dist/components/mg-panel.js +2 -2
  80. package/dist/components/mg-popover2.js +17 -3
  81. package/dist/components/mg-skip-links.js +1 -1
  82. package/dist/components/mg-tabs.js +10 -9
  83. package/dist/components/mg-tag.js +1 -1
  84. package/dist/components/mg-tooltip2.js +12 -15
  85. package/dist/esm/{index-dc9a2348.js → index-03cceb11.js} +109 -4
  86. package/dist/esm/loader.js +4 -3
  87. package/dist/esm/{mg-badge_30.entry.js → mg-action-more_31.entry.js} +623 -446
  88. package/dist/esm/mg-components.js +4 -3
  89. package/dist/mg-components/locales/en/messages.json +6 -1
  90. package/dist/mg-components/locales/fr/messages.json +6 -1
  91. package/dist/mg-components/mg-components.css +1 -1
  92. package/dist/mg-components/mg-components.esm.js +1 -1
  93. package/dist/mg-components/p-4cfd5423.entry.js +1 -0
  94. package/dist/mg-components/p-e126dd84.js +2 -0
  95. package/dist/mg-components/styles/mg-icon-animation.scss +6 -0
  96. package/dist/mg-components/styles/navigation-button.scss +2 -1
  97. package/dist/mg-components/variables.css +2 -1
  98. package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +1 -1
  99. package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +7 -1
  100. package/dist/types/components/molecules/mg-action-more/mg-action-more.conf.d.ts +42 -0
  101. package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +81 -0
  102. package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +4 -0
  103. package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +2 -1
  104. package/dist/types/components.d.ts +54 -0
  105. package/dist/types/locales/index.d.ts +12 -2
  106. package/dist/types/stencil-public-runtime.d.ts +9 -0
  107. package/dist/types/utils/behaviors.utils.d.ts +1 -7
  108. package/dist/types/utils/locale.utils.d.ts +5 -5
  109. package/dist/types/utils/unit.test.utils.d.ts +20 -2
  110. package/loader/index.d.ts +9 -0
  111. package/package.json +17 -16
  112. package/readme.md +0 -18
  113. package/dist/.storybook/utils.js +0 -24
  114. package/dist/collection/components/atoms/mg-badge/doc/mg-badge.stories.js +0 -27
  115. package/dist/collection/components/atoms/mg-button/doc/mg-button.stories.js +0 -38
  116. package/dist/collection/components/atoms/mg-card/doc/mg-card.stories.js +0 -18
  117. package/dist/collection/components/atoms/mg-character-left/doc/mg-character-left.stories.js +0 -20
  118. package/dist/collection/components/atoms/mg-divider/doc/mg-divider.stories.js +0 -18
  119. package/dist/collection/components/atoms/mg-icon/doc/mg-icon.stories.js +0 -41
  120. package/dist/collection/components/atoms/mg-input-title/doc/mg-input-title.stories.js +0 -21
  121. package/dist/collection/components/atoms/mg-tag/doc/mg-tag.stories.js +0 -22
  122. package/dist/collection/components/atoms/mg-tooltip/doc/mg-tooltip.stories.js +0 -50
  123. package/dist/collection/components/molecules/inputs/mg-input-checkbox/doc/mg-input-checkbox.stories.js +0 -50
  124. package/dist/collection/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.js +0 -43
  125. package/dist/collection/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.js +0 -68
  126. package/dist/collection/components/molecules/inputs/mg-input-password/doc/mg-input-password.stories.js +0 -46
  127. package/dist/collection/components/molecules/inputs/mg-input-radio/doc/mg-input-radio.stories.js +0 -59
  128. package/dist/collection/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.js +0 -77
  129. package/dist/collection/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.js +0 -110
  130. package/dist/collection/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.js +0 -54
  131. package/dist/collection/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.js +0 -51
  132. package/dist/collection/components/molecules/menu/mg-menu/doc/mg-menu.stories.js +0 -119
  133. package/dist/collection/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.js +0 -34
  134. package/dist/collection/components/molecules/mg-details/doc/mg-details.stories.js +0 -24
  135. package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +0 -47
  136. package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +0 -19
  137. package/dist/collection/components/molecules/mg-message/doc/mg-message.stories.js +0 -39
  138. package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +0 -39
  139. package/dist/collection/components/molecules/mg-pagination/doc/mg-pagination.stories.js +0 -20
  140. package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +0 -22
  141. package/dist/collection/components/molecules/mg-popover/doc/mg-popover.stories.js +0 -34
  142. package/dist/collection/components/molecules/mg-skip-links/doc/mg-skip-links.stories.js +0 -24
  143. package/dist/collection/components/molecules/mg-tabs/doc/mg-tabs.stories.js +0 -53
  144. package/dist/collection/stories/grids.stories.js +0 -7
  145. package/dist/collection/stories/helpers.stories.js +0 -23
  146. package/dist/collection/stories/icons.stories.js +0 -25
  147. package/dist/collection/stories/typography.stories.js +0 -24
  148. package/dist/mg-components/p-182bd802.js +0 -2
  149. package/dist/mg-components/p-f7da9dd2.entry.js +0 -1
  150. package/dist/types/components/atoms/mg-badge/doc/mg-badge.stories.d.ts +0 -13
  151. package/dist/types/components/atoms/mg-button/doc/mg-button.stories.d.ts +0 -16
  152. package/dist/types/components/atoms/mg-card/doc/mg-card.stories.d.ts +0 -6
  153. package/dist/types/components/atoms/mg-character-left/doc/mg-character-left.stories.d.ts +0 -6
  154. package/dist/types/components/atoms/mg-divider/doc/mg-divider.stories.d.ts +0 -6
  155. package/dist/types/components/atoms/mg-icon/doc/mg-icon.stories.d.ts +0 -26
  156. package/dist/types/components/atoms/mg-input-title/doc/mg-input-title.stories.d.ts +0 -6
  157. package/dist/types/components/atoms/mg-tag/doc/mg-tag.stories.d.ts +0 -6
  158. package/dist/types/components/atoms/mg-tooltip/doc/mg-tooltip.stories.d.ts +0 -18
  159. package/dist/types/components/molecules/inputs/mg-input-checkbox/doc/mg-input-checkbox.stories.d.ts +0 -11
  160. package/dist/types/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.d.ts +0 -12
  161. package/dist/types/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.d.ts +0 -32
  162. package/dist/types/components/molecules/inputs/mg-input-password/doc/mg-input-password.stories.d.ts +0 -22
  163. package/dist/types/components/molecules/inputs/mg-input-radio/doc/mg-input-radio.stories.d.ts +0 -20
  164. package/dist/types/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.d.ts +0 -34
  165. package/dist/types/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.d.ts +0 -39
  166. package/dist/types/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.d.ts +0 -19
  167. package/dist/types/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.d.ts +0 -12
  168. package/dist/types/components/molecules/menu/mg-menu/doc/mg-menu.stories.d.ts +0 -22
  169. package/dist/types/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.d.ts +0 -12
  170. package/dist/types/components/molecules/mg-details/doc/mg-details.stories.d.ts +0 -11
  171. package/dist/types/components/molecules/mg-form/doc/mg-form.stories.d.ts +0 -11
  172. package/dist/types/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.d.ts +0 -6
  173. package/dist/types/components/molecules/mg-message/doc/mg-message.stories.d.ts +0 -26
  174. package/dist/types/components/molecules/mg-modal/doc/mg-modal.stories.d.ts +0 -13
  175. package/dist/types/components/molecules/mg-pagination/doc/mg-pagination.stories.d.ts +0 -11
  176. package/dist/types/components/molecules/mg-panel/doc/mg-panel.stories.d.ts +0 -11
  177. package/dist/types/components/molecules/mg-popover/doc/mg-popover.stories.d.ts +0 -22
  178. package/dist/types/components/molecules/mg-skip-links/doc/mg-skip-links.stories.d.ts +0 -11
  179. package/dist/types/components/molecules/mg-tabs/doc/mg-tabs.stories.d.ts +0 -20
  180. package/dist/types/home/runner/work/mg-components/mg-components/.stencil/.storybook/utils.d.ts +0 -1
  181. package/dist/types/stories/grids.stories.d.ts +0 -5
  182. package/dist/types/stories/helpers.stories.d.ts +0 -13
  183. package/dist/types/stories/icons.stories.d.ts +0 -13
  184. package/dist/types/stories/typography.stories.d.ts +0 -5
@@ -1,53 +0,0 @@
1
- import { h } from '@stencil/core';
2
- import { filterArgs } from '../../../../../.storybook/utils';
3
- import { sizes, Status } from '../mg-tabs.conf';
4
- export default {
5
- component: 'mg-tabs',
6
- title: 'Molecules/mg-tabs',
7
- argTypes: {
8
- size: {
9
- options: sizes,
10
- control: { type: 'select' },
11
- },
12
- },
13
- parameters: { actions: { handles: ['active-tab-change'] } },
14
- };
15
- /**
16
- * Template
17
- *
18
- * @param {any} args component arguments
19
- * @returns {HTMLElement} HTMLElement
20
- */
21
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
- const Template = (args) => (h("mg-tabs", Object.assign({}, filterArgs(args, { size: sizes[0], activeTab: 1 })), h("div", { slot: "tab_content-1" }, "Content 1"), h("div", { slot: "tab_content-2" }, "Content 2"), h("div", { slot: "tab_content-3" }, "Content 3"), h("div", { slot: "tab_content-4" }, "Content 4")));
23
- export const MgTabs = Template.bind({});
24
- MgTabs.args = {
25
- items: ['Tab 1', 'Tab 2', 'Tab 3', 'Tab 4'],
26
- label: 'Short tabs description. Needed for accessibility',
27
- activeTab: 2,
28
- size: sizes[0], // regular
29
- };
30
- export const MgTabsItems = Template.bind({});
31
- MgTabsItems.args = Object.assign(Object.assign({}, MgTabs.args), { activeTab: undefined, items: [
32
- {
33
- label: 'Tab 1',
34
- icon: 'check',
35
- badge: { value: 1, label: 'message' },
36
- },
37
- {
38
- label: 'Tab 2',
39
- badge: { value: 5, label: 'messages', role: 'information' },
40
- status: Status.DISABLED,
41
- },
42
- {
43
- label: 'Tab 3',
44
- icon: 'cross',
45
- badge: { value: '9+', label: 'messages', role: 'notification' },
46
- status: Status.ACTIVE,
47
- },
48
- {
49
- label: 'Tab 4',
50
- icon: 'trash',
51
- status: Status.HIDDEN,
52
- },
53
- ] });
@@ -1,7 +0,0 @@
1
- import { h } from '@stencil/core';
2
- export default {
3
- title: 'Style/Layout/Grid',
4
- };
5
- const Template = () => (h("main", { id: "demo" }, h("h1", null, "Grid"), h("p", null, "You can use grid classes by using the ", h("code", null, ".mg-grid"), " class in the container. This call will add flex properties to the container."), h("h2", null, "Auto layout"), h("p", null, "Default column class is ", h("code", null, "mg-grid__col"), ". The width will be defined by the number of element using the class."), h("div", { class: "mg-grid" }, h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col")), h("div", { class: "mg-grid" }, h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col")), h("div", { class: "mg-grid" }, h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col" }, ".mg-grid__col")), h("h2", null, "Sized column"), h("p", null, "Like Bootstrap, you can use sized colomn based on a 12 colomns grid."), h("p", null, "The library is using the BEM methodology, so to define a column width we need to set a modifier class, for exemple ", h("code", null, "mg-grid__col-2"), "."), [...Array.from(Array(12).keys())].map((_e, i) => (h("div", { class: "mg-grid" }, h("div", { class: `mg-grid__col mg-grid__col-${i + 1}` }, ".mg-grid__col.mg-grid__col-", i + 1)))), h("h2", null, "Mix"), h("p", null, "You can also mix unsized column with sized column."), h("div", { class: "mg-grid" }, h("div", { class: "mg-grid__col mg-grid__col-3" }, ".mg-grid__col.mg-grid__col-3"), h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col mg-grid__col-3" }, ".mg-grid__col.mg-grid__col-3")), h("div", { class: "mg-grid" }, h("div", { class: "mg-grid__col" }, ".mg-grid__col"), h("div", { class: "mg-grid__col mg-grid__col-5" }, ".mg-grid__col.mg-grid__col-5"), h("div", { class: "mg-grid__col" }, ".mg-grid__col"))));
6
- export const Grid = Template.bind({});
7
- Grid.args = {};
@@ -1,23 +0,0 @@
1
- import { h } from '@stencil/core';
2
- import { filterArgs } from '../../.storybook/utils';
3
- export default {
4
- title: 'Style/Helpers',
5
- argTypes: {
6
- align: {
7
- options: ['left', 'right'],
8
- control: { type: 'select' },
9
- },
10
- },
11
- };
12
- /**
13
- * Template
14
- *
15
- * @param {any} args component arguments
16
- * @returns {HTMLElement} HTMLElement
17
- */
18
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
- const Template = (args) => (h("div", null, h("h1", null, "Helpers"), h("h2", null, ".mg-group-elements"), h("p", null, "Buttons can be grouped in an HTMLelement using the ", h("code", null, ".mg-group-elements"), " class, it will ensure a 10px margin space between them, even verticaly. Above exemples are using it."), h("p", null, "By adding the ", h("code", null, ".mg-group-elements--align-right"), " class you 'll set a right alignment of the button, even when line breaks."), h("h3", null, "Demo"), h("div", { class: `mg-group-elements${args.align === 'right' ? ' mg-group-elements--align-right' : ''}` }, h("mg-button", null, "First Button"), h("mg-button", null, h("mg-icon", { icon: "info-circle" }), "Second Button"), h("mg-button", Object.assign({}, filterArgs({ isIcon: true }), { label: "Third button" }), h("mg-icon", { icon: "info-circle" })))));
20
- export const Helpers = Template.bind({});
21
- Helpers.args = {
22
- align: 'left',
23
- };
@@ -1,25 +0,0 @@
1
- import { h } from '@stencil/core';
2
- import { filterArgs } from '../../.storybook/utils';
3
- import { icons, sizes } from '../components/atoms/mg-icon/mg-icon.conf';
4
- export default {
5
- title: 'Style/Icons',
6
- argTypes: {
7
- size: {
8
- options: sizes,
9
- control: { type: 'select' },
10
- },
11
- },
12
- };
13
- /**
14
- * Template
15
- *
16
- * @param {any} args component arguments
17
- * @returns {HTMLElement} HTMLElement
18
- */
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- const Template = (args) => (h("ul", { style: { display: 'flex', flexWrap: 'wrap', margin: '0', padding: '0', listStyle: 'none', textAlign: 'center' } }, Object.keys(icons).map((icon) => (h("li", { style: { margin: '1rem', padding: '1rem', width: '100px' } }, h("div", { style: { color: args.color, margin: '1rem' } }, h("mg-icon", Object.assign({}, filterArgs({ icon, size: args.size }, { size: 'regular' })))), h("div", null, icon))))));
21
- export const Icons = Template.bind({});
22
- Icons.args = {
23
- color: '',
24
- size: sizes[0], // regular
25
- };
@@ -1,24 +0,0 @@
1
- import { h } from '@stencil/core';
2
- export default {
3
- title: 'Style/Typography',
4
- };
5
- /**
6
- * Template
7
- *
8
- * @param {any} args component arguments
9
- * @returns {HTMLElement} HTMLElement
10
- */
11
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
- const Template = (args) => (h("div", null, h("h1", null, args.h1), h("h2", null, args.h2), h("h3", null, args.h3), h("h4", null, args.h4), h("h5", null, args.h5), h("h6", null, args.h6), h("p", null, args.p), h("p", null, h("strong", null, args.strong)), h("p", null, h("small", null, args.small))));
13
- export const Typography = Template.bind({});
14
- Typography.args = {
15
- h1: 'The h1 heading element',
16
- h2: 'The h2 heading element',
17
- h3: 'The h3 heading element',
18
- h4: 'The h4 heading element',
19
- h5: 'The h5 heading element',
20
- h6: 'The h6 heading element',
21
- p: 'The Paragraph element',
22
- strong: 'The Strong Importance element',
23
- small: 'The side comment element',
24
- };
@@ -1,2 +0,0 @@
1
- let t,e,n,l=!1,o=!1,s=!1,r=!1,c=!1;const i={},f=t=>"object"==(t=typeof t)||"function"===t,a=(t,e,...n)=>{let l=null,o=null,s=!1,r=!1;const c=[],i=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?i(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!f(l))&&(l+=""),s&&r?c[c.length-1].t+=l:c.push(s?u(null,l):l),r=s)};if(i(n),e){e.name&&(o=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,c,$);const a=u(t,null);return a.l=e,c.length>0&&(a.o=c),a.i=o,a},u=(t,e)=>({u:0,$:t,t:e,h:null,o:null,l:null,i:null}),d={},$={forEach:(t,e)=>t.map(h).forEach(e),map:(t,e)=>t.map(h).map(e).map(m)},h=t=>({vattrs:t.l,vchildren:t.o,vkey:t.m,vname:t.i,vtag:t.$,vtext:t.t}),m=t=>{if("function"==typeof t.vtag){const e=Object.assign({},t.vattrs);return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),a(t.vtag,e,...t.vchildren||[])}const e=u(t.vtag,t.vtext);return e.l=t.vattrs,e.o=t.vchildren,e.m=t.vkey,e.i=t.vname,e},p=t=>et(t).p,y=(t,e,n)=>{const l=p(t);return{emit:t=>b(l,e,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:t})}},b=(t,e,n)=>{const l=ut.ce(e,n);return t.dispatchEvent(l),l},w=new WeakMap,g=t=>"sc-"+t.g,v=(t,e,n,l,o,s)=>{if(n!==l){let r=ot(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,o=S(n),s=S(l);e.remove(...o.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!o.includes(t))))}else if("style"===e){for(const e in n)l&&null!=l[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in l)n&&l[e]===n[e]||(e.includes("-")?t.style.setProperty(e,l[e]):t.style[e]=l[e])}else if("ref"===e)l&&l(t);else if(r||"o"!==e[0]||"n"!==e[1]){const c=f(l);if((r||c&&null!==l)&&!o)try{if(t.tagName.includes("-"))t[e]=l;else{const o=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==o||(t[e]=o)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&s||o)&&!c&&t.setAttribute(e,l=!0===l?"":l)}else e="-"===e[2]?e.slice(3):ot(ft,c)?c.slice(2):c[2]+e.slice(3),n&&ut.rel(t,e,n,!1),l&&ut.ael(t,e,l,!1)}},j=/\s/,S=t=>t?t.split(j):[],k=(t,e,n,l)=>{const o=11===e.h.nodeType&&e.h.host?e.h.host:e.h,s=t&&t.l||i,r=e.l||i;for(l in s)l in r||v(o,l,s[l],void 0,n,e.u);for(l in r)v(o,l,s[l],r[l],n,e.u)},O=(o,c,i,f)=>{const a=c.o[i];let u,d,$,h=0;if(l||(s=!0,"slot"===a.$&&(t&&f.classList.add(t+"-s"),a.u|=a.o?2:1)),null!==a.t)u=a.h=at.createTextNode(a.t);else if(1&a.u)u=a.h=at.createTextNode("");else{if(r||(r="svg"===a.$),u=a.h=at.createElementNS(r?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&a.u?"slot-fb":a.$),r&&"foreignObject"===a.$&&(r=!1),k(null,a,r),null!=t&&u["s-si"]!==t&&u.classList.add(u["s-si"]=t),a.o)for(h=0;h<a.o.length;++h)d=O(o,a,h,u),d&&u.appendChild(d);"svg"===a.$?r=!1:"foreignObject"===u.tagName&&(r=!0)}return u["s-hn"]=n,3&a.u&&(u["s-sr"]=!0,u["s-cr"]=e,u["s-sn"]=a.i||"",$=o&&o.o&&o.o[i],$&&$.$===a.$&&o.h&&M(o.h,!1)),u},M=(t,e)=>{ut.u|=1;const l=t.childNodes;for(let t=l.length-1;t>=0;t--){const o=l[t];o["s-hn"]!==n&&o["s-ol"]&&(T(o).insertBefore(o,P(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),e&&M(o,e)}ut.u&=-2},C=(t,e,l,o,s,r)=>{let c,i=t["s-cr"]&&t["s-cr"].parentNode||t;for(i.shadowRoot&&i.tagName===n&&(i=i.shadowRoot);s<=r;++s)o[s]&&(c=O(null,l,s,t),c&&(o[s].h=c,i.insertBefore(c,P(e))))},R=(t,e,n,l,s)=>{for(;e<=n;++e)(l=t[e])&&(s=l.h,D(l),o=!0,s["s-ol"]?s["s-ol"].remove():M(s,!0),s.remove())},x=(t,e)=>t.$===e.$&&("slot"!==t.$||t.i===e.i),P=t=>t&&t["s-ol"]||t,T=t=>(t["s-ol"]?t["s-ol"]:t).parentNode,E=(t,e)=>{const n=e.h=t.h,l=t.o,o=e.o,s=e.$,c=e.t;let i;null===c?(r="svg"===s||"foreignObject"!==s&&r,"slot"===s||k(t,e,r),null!==l&&null!==o?((t,e,n,l)=>{let o,s=0,r=0,c=e.length-1,i=e[0],f=e[c],a=l.length-1,u=l[0],d=l[a];for(;s<=c&&r<=a;)null==i?i=e[++s]:null==f?f=e[--c]:null==u?u=l[++r]:null==d?d=l[--a]:x(i,u)?(E(i,u),i=e[++s],u=l[++r]):x(f,d)?(E(f,d),f=e[--c],d=l[--a]):x(i,d)?("slot"!==i.$&&"slot"!==d.$||M(i.h.parentNode,!1),E(i,d),t.insertBefore(i.h,f.h.nextSibling),i=e[++s],d=l[--a]):x(f,u)?("slot"!==i.$&&"slot"!==d.$||M(f.h.parentNode,!1),E(f,u),t.insertBefore(f.h,i.h),f=e[--c],u=l[++r]):(o=O(e&&e[r],n,r,t),u=l[++r],o&&T(i.h).insertBefore(o,P(i.h)));s>c?C(t,null==l[a+1]?null:l[a+1].h,n,l,r,a):r>a&&R(e,s,c)})(n,l,e,o):null!==o?(null!==t.t&&(n.textContent=""),C(n,null,e,o,0,o.length-1)):null!==l&&R(l,0,l.length-1),r&&"svg"===s&&(r=!1)):(i=n["s-cr"])?i.parentNode.textContent=c:t.t!==c&&(n.data=c)},L=t=>{const e=t.childNodes;let n,l,o,s,r,c;for(l=0,o=e.length;l<o;l++)if(n=e[l],1===n.nodeType){if(n["s-sr"])for(r=n["s-sn"],n.hidden=!1,s=0;s<o;s++)if(c=e[s].nodeType,e[s]["s-hn"]!==n["s-hn"]||""!==r){if(1===c&&r===e[s].getAttribute("slot")){n.hidden=!0;break}}else if(1===c||3===c&&""!==e[s].textContent.trim()){n.hidden=!0;break}L(n)}},N=[],W=t=>{let e,n,l,s,r,c,i=0;const f=t.childNodes,a=f.length;for(;i<a;i++){if(e=f[i],e["s-sr"]&&(n=e["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=e["s-sn"],c=l.length-1;c>=0;c--)n=l[c],n["s-cn"]||n["s-nr"]||n["s-hn"]===e["s-hn"]||(A(n,s)?(r=N.find((t=>t.v===n)),o=!0,n["s-sn"]=n["s-sn"]||s,r?r.j=e:N.push({j:e,v:n}),n["s-sr"]&&N.map((t=>{A(t.v,n["s-sn"])&&(r=N.find((t=>t.v===n)),r&&!t.j&&(t.j=r.j))}))):N.some((t=>t.v===n))||N.push({v:n}));1===e.nodeType&&W(e)}},A=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,D=t=>{t.l&&t.l.ref&&t.l.ref(null),t.o&&t.o.map(D)},F=(t,e)=>{e&&!t.S&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.S=e)))},H=(t,e)=>{if(t.u|=16,!(4&t.u))return F(t,t.k),gt((()=>U(t,e)));t.u|=512},U=(t,e)=>{const n=t.O;let l;return e&&(t.u|=256,t.M&&(t.M.map((([t,e])=>B(n,t,e))),t.M=null),l=B(n,"componentWillLoad")),G(l,(()=>q(t,n,e)))},q=async(t,e,n)=>{const l=t.p,o=l["s-rc"];n&&(t=>{const e=t.C,n=t.p,l=e.u,o=((t,e)=>{let n=g(e);const l=it.get(n);if(t=11===t.nodeType?t:at,l)if("string"==typeof l){let e,o=w.get(t=t.head||t);o||w.set(t,o=new Set),o.has(n)||(e=at.createElement("style"),e.innerHTML=l,t.insertBefore(e,t.querySelector("link")),o&&o.add(n))}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"),2&l&&n.classList.add(o+"-s"))})(t);V(t,e),o&&(o.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>_(t);0===e.length?n():(Promise.all(e).then(n),t.u|=4,e.length=0)}},V=(r,c)=>{try{c=c.render(),r.u&=-17,r.u|=2,((r,c)=>{const i=r.p,f=r.C,$=r.R||u(null,null),h=(t=>t&&t.$===d)(c)?c:a(null,null,c);if(n=i.tagName,f.P&&(h.l=h.l||{},f.P.map((([t,e])=>h.l[e]=i[t]))),h.$=null,h.u|=4,r.R=h,h.h=$.h=i.shadowRoot||i,t=i["s-sc"],e=i["s-cr"],l=0!=(1&f.u),o=!1,E($,h),ut.u|=1,s){let t,e,n,l,o,s;W(h.h);let r=0;for(;r<N.length;r++)t=N[r],e=t.v,e["s-ol"]||(n=at.createTextNode(""),n["s-nr"]=e,e.parentNode.insertBefore(e["s-ol"]=n,e));for(r=0;r<N.length;r++)if(t=N[r],e=t.v,t.j){for(l=t.j.parentNode,o=t.j.nextSibling,n=e["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===e["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==e.parentNode||e.nextSibling!==o)&&e!==o&&(!e["s-hn"]&&e["s-ol"]&&(e["s-hn"]=e["s-ol"].parentNode.nodeName),l.insertBefore(e,o))}else 1===e.nodeType&&(e.hidden=!0)}o&&L(h.h),ut.u&=-2,N.length=0})(r,c)}catch(t){st(t,r.p)}return null},_=t=>{const e=t.p,n=t.O,l=t.k;B(n,"componentDidRender"),64&t.u||(t.u|=64,I(e),B(n,"componentDidLoad"),t.T(e),l||z()),t.L(e),t.S&&(t.S(),t.S=void 0),512&t.u&&wt((()=>H(t,!1))),t.u&=-517},z=()=>{I(at.documentElement),wt((()=>b(ft,"appload",{detail:{namespace:"mg-components"}})))},B=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){st(t)}},G=(t,e)=>t&&t.then?t.then(e):e(),I=t=>t.classList.add("hydrated"),J=(t,e,n)=>{if(e.N){t.watchers&&(e.W=t.watchers);const l=Object.entries(e.N),o=t.prototype;if(l.map((([t,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,t,{get(){return((t,e)=>et(this).A.get(e))(0,t)},set(n){((t,e,n,l)=>{const o=et(t),s=o.p,r=o.A.get(e),c=o.u,i=o.O;if(n=((t,e)=>null==t||f(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(n,l.N[e][0]),(!(8&c)||void 0===r)&&n!==r&&(!Number.isNaN(r)||!Number.isNaN(n))&&(o.A.set(e,n),i)){if(l.W&&128&c){const t=l.W[e];t&&t.map((t=>{try{i[t](n,r,e)}catch(t){st(t,s)}}))}2==(18&c)&&H(o,!1)}})(this,t,n,e)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,t,{value(...e){const n=et(this);return n.D.then((()=>n.O[t](...e)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(t,e,l){ut.jmp((()=>{const e=n.get(t);if(this.hasOwnProperty(e))l=this[e],delete this[e];else if(o.hasOwnProperty(e)&&"number"==typeof this[e]&&this[e]==l)return;this[e]=(null!==l||"boolean"!=typeof this[e])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,l])=>{const o=l[1]||t;return n.set(o,t),512&l[0]&&e.P.push([t,o]),o}))}}return t},K=(t,e={})=>{const n=[],l=e.exclude||[],o=ft.customElements,s=at.head,r=s.querySelector("meta[charset]"),c=at.createElement("style"),i=[];let f,a=!0;Object.assign(ut,e),ut.F=new URL(e.resourcesUrl||"./",at.baseURI).href,t.map((t=>{t[1].map((e=>{const s={u:e[0],g:e[1],N:e[2],H:e[3]};s.N=e[2],s.H=e[3],s.P=[],s.W={};const r=s.g,c=class extends HTMLElement{constructor(t){super(t),lt(t=this,s),1&s.u&&t.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),a?i.push(this):ut.jmp((()=>(t=>{if(0==(1&ut.u)){const e=et(t),n=e.C,l=()=>{};if(1&e.u)Q(t,e,n.H);else{e.u|=1,12&n.u&&(t=>{const e=t["s-cr"]=at.createComment("");e["s-cn"]=!0,t.insertBefore(e,t.firstChild)})(t);{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){F(e,e.k=n);break}}n.N&&Object.entries(n.N).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,o)=>{if(0==(32&e.u)){{if(e.u|=32,(o=ct(n)).then){const t=()=>{};o=await o,t()}o.isProxied||(n.W=o.watchers,J(o,n,2),o.isProxied=!0);const t=()=>{};e.u|=8;try{new o(e)}catch(t){st(t)}e.u&=-9,e.u|=128,t()}if(o.style){let t=o.style;const e=g(n);if(!it.has(e)){const l=()=>{};((t,e,n)=>{let l=it.get(t);$t&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,it.set(t,l)})(e,t,!!(1&n.u)),l()}}}const s=e.k,r=()=>H(e,!0);s&&s["s-rc"]?s["s-rc"].push(r):r()})(0,e,n)}l()}})(this)))}disconnectedCallback(){ut.jmp((()=>(()=>{if(0==(1&ut.u)){const t=et(this),e=t.O;t.U&&(t.U.map((t=>t())),t.U=void 0),B(e,"disconnectedCallback")}})()))}componentOnReady(){return et(this).q}};s.V=t[0],l.includes(r)||o.get(r)||(n.push(r),o.define(r,J(c,s,1)))}))})),c.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",c.setAttribute("data-styles",""),s.insertBefore(c,r?r.nextSibling:s.firstChild),a=!1,i.length?i.map((t=>t.connectedCallback())):ut.jmp((()=>f=setTimeout(z,30)))},Q=(t,e,n)=>{n&&n.map((([n,l,o])=>{const s=Y(t,n),r=X(e,o),c=Z(n);ut.ael(s,l,r,c),(e.U=e.U||[]).push((()=>ut.rel(s,l,r,c)))}))},X=(t,e)=>n=>{try{256&t.u?t.O[e](n):(t.M=t.M||[]).push([e,n])}catch(t){st(t)}},Y=(t,e)=>8&e?ft:t,Z=t=>0!=(2&t),tt=new WeakMap,et=t=>tt.get(t),nt=(t,e)=>tt.set(e.O=t,e),lt=(t,e)=>{const n={u:0,p:t,C:e,A:new Map};return n.D=new Promise((t=>n.L=t)),n.q=new Promise((t=>n.T=t)),t["s-p"]=[],t["s-rc"]=[],Q(t,n,e.H),tt.set(t,n)},ot=(t,e)=>e in t,st=(t,e)=>(0,console.error)(t,e),rt=new Map,ct=t=>{const e=t.g.replace(/-/g,"_"),n=t.V,l=rt.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(rt.set(n,t),t[e])),st)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},it=new Map,ft="undefined"!=typeof window?window:{},at=ft.document||{head:{}},ut={u:0,F:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},dt=t=>Promise.resolve(t),$t=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),ht=[],mt=[],pt=(t,e)=>n=>{t.push(n),c||(c=!0,e&&4&ut.u?wt(bt):ut.raf(bt))},yt=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){st(t)}t.length=0},bt=()=>{yt(ht),yt(mt),(c=ht.length>0)&&ut.raf(bt)},wt=t=>dt().then(t),gt=pt(mt,!0);export{d as H,K as b,y as c,p as g,a as h,dt as p,nt as r}