@mgdis/mg-components 5.6.0 → 5.8.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.
- package/dist/cjs/{index-4dcc1812.js → index-5e7ede97.js} +109 -3
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/{mg-badge_30.cjs.entry.js → mg-action-more_31.cjs.entry.js} +490 -661
- package/dist/cjs/mg-components.cjs.js +7 -3
- package/dist/cjs/mg-item-more.cjs.entry.js +273 -0
- package/dist/cjs/mg-menu.conf-9afe6571.js +242 -0
- package/dist/collection/collection-manifest.json +7 -5
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.css +7 -21
- package/dist/collection/components/atoms/mg-button/mg-button.js +25 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +35 -27
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +3 -3
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +18 -17
- package/dist/collection/components/molecules/inputs/MgInput.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +4 -3
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +4 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +4 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +4 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +4 -3
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +2 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +4 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +4 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +4 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +4 -4
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js +0 -13
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +41 -70
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +5 -4
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +160 -61
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js +1 -0
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.css +38 -0
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +252 -0
- package/dist/collection/components/molecules/mg-form/mg-form.js +2 -2
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.conf.js +1 -0
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.css +30 -0
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +200 -0
- package/dist/collection/components/molecules/mg-message/mg-message.js +1 -1
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +19 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +2 -2
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +0 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +17 -4
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +2 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +2 -3
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +9 -8
- package/dist/collection/locales/en/messages.json +6 -1
- package/dist/collection/locales/fr/messages.json +6 -1
- package/dist/collection/locales/index.js +1 -1
- package/dist/collection/styles/mg-icon-animation.scss +6 -0
- package/dist/collection/styles/navigation-button.scss +3 -2
- package/dist/collection/utils/behaviors.utils.js +38 -52
- package/dist/collection/utils/components.utils.js +3 -1
- package/dist/collection/utils/locale.utils.js +9 -9
- package/dist/collection/utils/unit.test.utils.js +32 -4
- package/dist/collection/variables.css +2 -1
- package/dist/components/MgInput.js +6 -1
- package/dist/components/components.utils.js +3 -1
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.js +3 -1
- package/dist/components/index2.js +26 -14
- package/dist/components/mg-action-more.d.ts +11 -0
- package/dist/components/mg-action-more.js +216 -0
- package/dist/components/mg-badge2.js +1 -1
- package/dist/components/mg-button2.js +6 -3
- package/dist/components/mg-form.js +2 -2
- package/dist/components/mg-icon2.js +38 -30
- package/dist/components/mg-input-checkbox.js +3 -3
- package/dist/components/mg-input-date.js +2 -2
- package/dist/components/mg-input-numeric.js +2 -2
- package/dist/components/mg-input-password.js +1 -1
- package/dist/components/mg-input-radio.js +2 -2
- package/dist/components/mg-input-select2.js +2 -2
- package/dist/components/mg-input-text2.js +1 -1
- package/dist/components/mg-input-textarea.js +2 -2
- package/dist/components/mg-input-toggle.js +1 -1
- package/dist/components/mg-item-more.d.ts +11 -0
- package/dist/components/mg-item-more.js +336 -0
- package/dist/components/mg-menu-item2.js +137 -250
- package/dist/components/mg-menu.conf.js +14 -0
- package/dist/components/mg-menu.js +1 -246
- package/dist/components/mg-menu2.js +180 -0
- package/dist/components/mg-message.js +1 -1
- package/dist/components/mg-pagination.js +3 -1
- package/dist/components/mg-panel.js +2 -2
- package/dist/components/mg-popover2.js +17 -3
- package/dist/components/mg-skip-links.js +1 -1
- package/dist/components/mg-tabs.js +10 -9
- package/dist/components/mg-tag.js +1 -1
- package/dist/components/mg-tooltip2.js +18 -17
- package/dist/esm/{index-dc9a2348.js → index-03cceb11.js} +109 -4
- package/dist/esm/loader.js +4 -3
- package/dist/esm/{mg-badge_30.entry.js → mg-action-more_31.entry.js} +464 -636
- package/dist/esm/mg-components.js +4 -3
- package/dist/esm/mg-item-more.entry.js +269 -0
- package/dist/esm/mg-menu.conf-881fbd82.js +235 -0
- package/dist/mg-components/locales/en/messages.json +6 -1
- package/dist/mg-components/locales/fr/messages.json +6 -1
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-1221773c.entry.js +1 -0
- package/dist/mg-components/p-367f92d2.js +1 -0
- package/dist/mg-components/p-6aeded97.entry.js +1 -0
- package/dist/mg-components/p-e126dd84.js +2 -0
- package/dist/mg-components/styles/mg-icon-animation.scss +6 -0
- package/dist/mg-components/styles/navigation-button.scss +3 -2
- package/dist/mg-components/variables.css +2 -1
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +1 -1
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.conf.d.ts +3 -27
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +9 -27
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.conf.d.ts +5 -0
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +66 -11
- package/dist/types/components/molecules/mg-action-more/mg-action-more.conf.d.ts +42 -0
- package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +81 -0
- package/dist/types/components/molecules/mg-item-more/mg-item-more.conf.d.ts +26 -0
- package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +74 -0
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +4 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +2 -1
- package/dist/types/components.d.ts +120 -12
- package/dist/types/locales/index.d.ts +12 -2
- package/dist/types/stencil-public-runtime.d.ts +9 -0
- package/dist/types/utils/behaviors.utils.d.ts +12 -11
- package/dist/types/utils/locale.utils.d.ts +5 -5
- package/dist/types/utils/unit.test.utils.d.ts +20 -2
- package/loader/index.d.ts +9 -0
- package/package.json +17 -16
- package/readme.md +0 -18
- package/dist/.storybook/utils.js +0 -24
- package/dist/collection/components/atoms/mg-badge/doc/mg-badge.stories.js +0 -27
- package/dist/collection/components/atoms/mg-button/doc/mg-button.stories.js +0 -38
- package/dist/collection/components/atoms/mg-card/doc/mg-card.stories.js +0 -18
- package/dist/collection/components/atoms/mg-character-left/doc/mg-character-left.stories.js +0 -20
- package/dist/collection/components/atoms/mg-divider/doc/mg-divider.stories.js +0 -18
- package/dist/collection/components/atoms/mg-icon/doc/mg-icon.stories.js +0 -41
- package/dist/collection/components/atoms/mg-input-title/doc/mg-input-title.stories.js +0 -21
- package/dist/collection/components/atoms/mg-tag/doc/mg-tag.stories.js +0 -22
- package/dist/collection/components/atoms/mg-tooltip/doc/mg-tooltip.stories.js +0 -50
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/doc/mg-input-checkbox.stories.js +0 -50
- package/dist/collection/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.js +0 -43
- package/dist/collection/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.js +0 -68
- package/dist/collection/components/molecules/inputs/mg-input-password/doc/mg-input-password.stories.js +0 -46
- package/dist/collection/components/molecules/inputs/mg-input-radio/doc/mg-input-radio.stories.js +0 -59
- package/dist/collection/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.js +0 -77
- package/dist/collection/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.js +0 -110
- package/dist/collection/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.js +0 -54
- package/dist/collection/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.js +0 -51
- package/dist/collection/components/molecules/menu/mg-menu/doc/mg-menu.stories.js +0 -119
- package/dist/collection/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.js +0 -34
- package/dist/collection/components/molecules/mg-details/doc/mg-details.stories.js +0 -24
- package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +0 -47
- package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +0 -19
- package/dist/collection/components/molecules/mg-message/doc/mg-message.stories.js +0 -39
- package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +0 -39
- package/dist/collection/components/molecules/mg-pagination/doc/mg-pagination.stories.js +0 -20
- package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +0 -22
- package/dist/collection/components/molecules/mg-popover/doc/mg-popover.stories.js +0 -34
- package/dist/collection/components/molecules/mg-skip-links/doc/mg-skip-links.stories.js +0 -24
- package/dist/collection/components/molecules/mg-tabs/doc/mg-tabs.stories.js +0 -53
- package/dist/collection/stories/grids.stories.js +0 -7
- package/dist/collection/stories/helpers.stories.js +0 -23
- package/dist/collection/stories/icons.stories.js +0 -25
- package/dist/collection/stories/typography.stories.js +0 -24
- package/dist/mg-components/p-182bd802.js +0 -2
- package/dist/mg-components/p-f7da9dd2.entry.js +0 -1
- package/dist/types/components/atoms/mg-badge/doc/mg-badge.stories.d.ts +0 -13
- package/dist/types/components/atoms/mg-button/doc/mg-button.stories.d.ts +0 -16
- package/dist/types/components/atoms/mg-card/doc/mg-card.stories.d.ts +0 -6
- package/dist/types/components/atoms/mg-character-left/doc/mg-character-left.stories.d.ts +0 -6
- package/dist/types/components/atoms/mg-divider/doc/mg-divider.stories.d.ts +0 -6
- package/dist/types/components/atoms/mg-icon/doc/mg-icon.stories.d.ts +0 -26
- package/dist/types/components/atoms/mg-input-title/doc/mg-input-title.stories.d.ts +0 -6
- package/dist/types/components/atoms/mg-tag/doc/mg-tag.stories.d.ts +0 -6
- package/dist/types/components/atoms/mg-tooltip/doc/mg-tooltip.stories.d.ts +0 -18
- package/dist/types/components/molecules/inputs/mg-input-checkbox/doc/mg-input-checkbox.stories.d.ts +0 -11
- package/dist/types/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.d.ts +0 -12
- package/dist/types/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.d.ts +0 -32
- package/dist/types/components/molecules/inputs/mg-input-password/doc/mg-input-password.stories.d.ts +0 -22
- package/dist/types/components/molecules/inputs/mg-input-radio/doc/mg-input-radio.stories.d.ts +0 -20
- package/dist/types/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.d.ts +0 -34
- package/dist/types/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.d.ts +0 -39
- package/dist/types/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.d.ts +0 -19
- package/dist/types/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.d.ts +0 -12
- package/dist/types/components/molecules/menu/mg-menu/doc/mg-menu.stories.d.ts +0 -22
- package/dist/types/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.d.ts +0 -12
- package/dist/types/components/molecules/mg-details/doc/mg-details.stories.d.ts +0 -11
- package/dist/types/components/molecules/mg-form/doc/mg-form.stories.d.ts +0 -11
- package/dist/types/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.d.ts +0 -6
- package/dist/types/components/molecules/mg-message/doc/mg-message.stories.d.ts +0 -26
- package/dist/types/components/molecules/mg-modal/doc/mg-modal.stories.d.ts +0 -13
- package/dist/types/components/molecules/mg-pagination/doc/mg-pagination.stories.d.ts +0 -11
- package/dist/types/components/molecules/mg-panel/doc/mg-panel.stories.d.ts +0 -11
- package/dist/types/components/molecules/mg-popover/doc/mg-popover.stories.d.ts +0 -22
- package/dist/types/components/molecules/mg-skip-links/doc/mg-skip-links.stories.d.ts +0 -11
- package/dist/types/components/molecules/mg-tabs/doc/mg-tabs.stories.d.ts +0 -20
- package/dist/types/home/runner/work/mg-components/mg-components/.stencil/.storybook/utils.d.ts +0 -1
- package/dist/types/stories/grids.stories.d.ts +0 -5
- package/dist/types/stories/helpers.stories.d.ts +0 -13
- package/dist/types/stories/icons.stories.d.ts +0 -13
- package/dist/types/stories/typography.stories.d.ts +0 -5
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { Status } from '../components/molecules/menu/mg-menu-item/mg-menu-item.conf';
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
2
|
+
* MgItemMore type guard
|
|
4
3
|
*
|
|
5
4
|
* @param {HTMLElement} element element to control type
|
|
6
|
-
* @returns {boolean} truthy if element is mg-
|
|
5
|
+
* @returns {boolean} truthy if element is mg-item-more
|
|
7
6
|
*/
|
|
8
|
-
const
|
|
7
|
+
const isMgItemMore = (element) => element.nodeName === 'MG-ITEM-MORE';
|
|
9
8
|
export var OverflowBehaviorElements;
|
|
10
9
|
(function (OverflowBehaviorElements) {
|
|
11
|
-
OverflowBehaviorElements["MORE"] = "data-overflow-more";
|
|
12
10
|
OverflowBehaviorElements["BASE_INDEX"] = "data-overflow-base-index";
|
|
13
11
|
OverflowBehaviorElements["PROXY_INDEX"] = "data-overflow-proxy-index";
|
|
14
12
|
})(OverflowBehaviorElements || (OverflowBehaviorElements = {}));
|
|
@@ -25,16 +23,7 @@ export class OverflowBehavior {
|
|
|
25
23
|
* @returns {void}
|
|
26
24
|
*/
|
|
27
25
|
this.disconnect = () => {
|
|
28
|
-
this.
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Update more element status if active child
|
|
32
|
-
*
|
|
33
|
-
* @returns {void}
|
|
34
|
-
*/
|
|
35
|
-
this.updateActiveStatus = () => {
|
|
36
|
-
const hasActiveChild = Array.from(this.moreELement.querySelector('mg-menu').children).some(element => element.nodeName === 'MG-MENU-ITEM' && element.getAttribute('status') === Status.ACTIVE && element.getAttribute('hidden') === null);
|
|
37
|
-
this.moreELement.setAttribute('status', hasActiveChild ? Status.ACTIVE : Status.VISIBLE);
|
|
26
|
+
this._resizeObserver.disconnect();
|
|
38
27
|
};
|
|
39
28
|
/************
|
|
40
29
|
* Internal *
|
|
@@ -42,33 +31,35 @@ export class OverflowBehavior {
|
|
|
42
31
|
/**
|
|
43
32
|
* run overflow behavior
|
|
44
33
|
*
|
|
45
|
-
* @param {number} width width of the container
|
|
34
|
+
* @param {number} width width of the container. Optional.
|
|
46
35
|
* @returns {void}
|
|
47
36
|
*/
|
|
48
37
|
this.run = (width) => {
|
|
49
|
-
if (this.
|
|
38
|
+
if (this._moreElement === undefined) {
|
|
50
39
|
// set moreElement
|
|
51
|
-
this.
|
|
52
|
-
this.moreELement.setAttribute(OverflowBehaviorElements.MORE, '');
|
|
40
|
+
this._moreElement = this.render();
|
|
53
41
|
// set children
|
|
54
|
-
this.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (isMgMenuItem(this.moreELement)) {
|
|
58
|
-
moreELementChildren = Array.from(this.moreELement.querySelector('mg-menu').children).filter(element => allowedElements.includes(element.nodeName));
|
|
42
|
+
this._baseChildren = this.getInteractiveItems(this.element);
|
|
43
|
+
if (isMgItemMore(this._moreElement)) {
|
|
44
|
+
this._proxyChildren = this.getInteractiveItems(this._moreElement.shadowRoot.querySelector('mg-menu'));
|
|
59
45
|
}
|
|
60
|
-
|
|
46
|
+
// update children
|
|
47
|
+
this._baseChildren.forEach((child, index) => {
|
|
61
48
|
child.setAttribute(OverflowBehaviorElements.BASE_INDEX, `${index}`);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
moreELementChildren[index].setAttribute(OverflowBehaviorElements.PROXY_INDEX, `${index}`);
|
|
65
|
-
}
|
|
49
|
+
// set moreElement children
|
|
50
|
+
this._proxyChildren[index].setAttribute(OverflowBehaviorElements.PROXY_INDEX, `${index}`);
|
|
66
51
|
});
|
|
67
52
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
this.updateActiveStatus();
|
|
53
|
+
if (width !== undefined)
|
|
54
|
+
this.updateDisplayedItems(width);
|
|
71
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Get interactive children filtred by authorized nodeName ['MG-MENU-ITEM', 'MG-BUTTON']
|
|
58
|
+
*
|
|
59
|
+
* @param {Element} element element to parse
|
|
60
|
+
* @returns {Element[]} children
|
|
61
|
+
*/
|
|
62
|
+
this.getInteractiveItems = (element) => { var _a; return (((_a = element.children) === null || _a === void 0 ? void 0 : _a.length) > 0 ? Array.from(element.children) : []).filter(element => ['MG-MENU-ITEM', 'MG-BUTTON'].includes(element.nodeName)); };
|
|
72
63
|
/**
|
|
73
64
|
* Update displayed items in container from a given available space
|
|
74
65
|
*
|
|
@@ -77,24 +68,18 @@ export class OverflowBehavior {
|
|
|
77
68
|
*/
|
|
78
69
|
this.updateDisplayedItems = (availableWidth) => {
|
|
79
70
|
this.restoreItems();
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
const acc = { accWidth: 0, previousItem: null };
|
|
72
|
+
[...this._baseChildren, this._moreElement].forEach((child) => {
|
|
73
|
+
acc.accWidth += child.offsetWidth;
|
|
82
74
|
const isPreviousItemHidden = acc.previousItem !== null && acc.previousItem.getAttribute('hidden') !== null;
|
|
83
75
|
// if previous item is hidden AND is NOT more element we hidde current
|
|
84
76
|
// OR if item has an overflow we hidde current
|
|
85
77
|
// OR if current item is more element AND have NOT previous hidden items, current more element item is an hidden item
|
|
86
78
|
// ELSE current is a display item
|
|
87
|
-
|
|
88
|
-
this.isOverflowElement(acc.accWidth, curr, availableWidth) ||
|
|
89
|
-
(this.isMoreElement(curr) && !isPreviousItemHidden)) {
|
|
90
|
-
this.toggleItem(curr, true);
|
|
91
|
-
}
|
|
92
|
-
else
|
|
93
|
-
this.toggleItem(curr, false);
|
|
79
|
+
this.toggleItem(child, (isPreviousItemHidden && !this.isMoreElement(child)) || this.isOverflowElement(acc.accWidth, child, availableWidth) || (this.isMoreElement(child) && !isPreviousItemHidden));
|
|
94
80
|
// update previous item with current item
|
|
95
|
-
acc.previousItem =
|
|
96
|
-
|
|
97
|
-
}, { accWidth: 0, previousItem: null });
|
|
81
|
+
acc.previousItem = child;
|
|
82
|
+
});
|
|
98
83
|
};
|
|
99
84
|
/**
|
|
100
85
|
* Utility method to know if item overflow partialy or totaly in the container
|
|
@@ -108,7 +93,7 @@ export class OverflowBehavior {
|
|
|
108
93
|
if (item.previousElementSibling === null || this.isMoreElement(item))
|
|
109
94
|
return false;
|
|
110
95
|
else if (!this.isMoreElement(item.nextElementSibling))
|
|
111
|
-
return cumulateWidth + this.
|
|
96
|
+
return cumulateWidth + this._moreElement.offsetWidth > availableWidth;
|
|
112
97
|
else
|
|
113
98
|
return cumulateWidth > availableWidth;
|
|
114
99
|
};
|
|
@@ -118,7 +103,7 @@ export class OverflowBehavior {
|
|
|
118
103
|
* @param {Element} element element to match with 'MORE' element
|
|
119
104
|
* @returns {boolean} truthy if element is the 'MORE' element
|
|
120
105
|
*/
|
|
121
|
-
this.isMoreElement = (element) => element.
|
|
106
|
+
this.isMoreElement = (element) => element.nodeName === 'MG-ITEM-MORE';
|
|
122
107
|
/**
|
|
123
108
|
* Toggle display item element
|
|
124
109
|
*
|
|
@@ -129,10 +114,10 @@ export class OverflowBehavior {
|
|
|
129
114
|
this.toggleItem = (item, isHidden) => {
|
|
130
115
|
const mgActionMenuindex = Number(item.getAttribute(OverflowBehaviorElements.BASE_INDEX));
|
|
131
116
|
if (this.isMoreElement(item))
|
|
132
|
-
this.toggleElement(this.
|
|
117
|
+
this.toggleElement(this._moreElement, isHidden);
|
|
133
118
|
else if (mgActionMenuindex >= 0) {
|
|
134
119
|
this.toggleElement(item, isHidden);
|
|
135
|
-
this.toggleElement(this.
|
|
120
|
+
this.toggleElement(this._proxyChildren[mgActionMenuindex], !isHidden);
|
|
136
121
|
}
|
|
137
122
|
};
|
|
138
123
|
/**
|
|
@@ -154,16 +139,17 @@ export class OverflowBehavior {
|
|
|
154
139
|
* @returns {void}
|
|
155
140
|
*/
|
|
156
141
|
this.restoreItems = () => {
|
|
157
|
-
this.
|
|
142
|
+
[...this._baseChildren, this._moreElement].forEach(item => item.removeAttribute('hidden'));
|
|
158
143
|
};
|
|
159
|
-
if (this.
|
|
144
|
+
if (this._resizeObserver === undefined) {
|
|
160
145
|
// add resize observer
|
|
161
|
-
this.
|
|
146
|
+
this._resizeObserver = new ResizeObserver(entries => {
|
|
162
147
|
entries.forEach(entry => {
|
|
163
148
|
this.run(entry.contentRect.width);
|
|
164
149
|
});
|
|
165
150
|
});
|
|
166
|
-
this.
|
|
151
|
+
this._resizeObserver.observe(this.element);
|
|
167
152
|
}
|
|
153
|
+
this.run();
|
|
168
154
|
}
|
|
169
155
|
}
|
|
@@ -128,10 +128,12 @@ export const getParentWindows = (localWindow, windows = []) => {
|
|
|
128
128
|
*/
|
|
129
129
|
const getChildWindows = (localWindow, windows = []) => {
|
|
130
130
|
if (localWindow.frames.length > 0) {
|
|
131
|
+
// Window.frames is an array-like object, needs a classic for loop
|
|
132
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Window/frames
|
|
131
133
|
for (let i = 0; i < localWindow.frames.length; i++) {
|
|
132
134
|
const childWindow = localWindow.frames[i];
|
|
133
135
|
windows.push(childWindow);
|
|
134
|
-
|
|
136
|
+
getChildWindows(childWindow, windows);
|
|
135
137
|
}
|
|
136
138
|
}
|
|
137
139
|
return windows;
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* @param {string} currency currency to apply
|
|
7
7
|
* @returns {string} formatted currency
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export const localeCurrency = (number, locale, currency) => {
|
|
10
10
|
return new Intl.NumberFormat(locale, { style: 'currency', currency }).format(number);
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
12
|
/**
|
|
13
13
|
* Format number to locale
|
|
14
14
|
*
|
|
@@ -16,9 +16,9 @@ export function localeCurrency(number, locale, currency) {
|
|
|
16
16
|
* @param {string} locale locale to apply
|
|
17
17
|
* @returns {string} formatted number
|
|
18
18
|
*/
|
|
19
|
-
export
|
|
19
|
+
export const localeNumber = (number, locale) => {
|
|
20
20
|
return new Intl.NumberFormat(locale).format(number);
|
|
21
|
-
}
|
|
21
|
+
};
|
|
22
22
|
/**
|
|
23
23
|
* Date RegExp
|
|
24
24
|
*/
|
|
@@ -30,12 +30,12 @@ export const dateRegExp = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;
|
|
|
30
30
|
* @param {string} locale locale to apply
|
|
31
31
|
* @returns {string} formatted date
|
|
32
32
|
*/
|
|
33
|
-
export
|
|
33
|
+
export const localeDate = (date, locale) => {
|
|
34
34
|
if (typeof date !== 'string' || date === '' || !dateRegExp.test(date)) {
|
|
35
35
|
return '';
|
|
36
36
|
}
|
|
37
37
|
return new Intl.DateTimeFormat(locale).format(new Date(date));
|
|
38
|
-
}
|
|
38
|
+
};
|
|
39
39
|
/**
|
|
40
40
|
* Get locale and messages
|
|
41
41
|
* We load the defined locale but for now we only support the first subtag for messages
|
|
@@ -43,12 +43,12 @@ export function localeDate(date, locale) {
|
|
|
43
43
|
* @param {HTMLElement} element element we need to get the language
|
|
44
44
|
* @param {unknown} messages messages to use
|
|
45
45
|
* @param {string} defaultLocale default messages locale
|
|
46
|
-
* @returns {{ locale: string; messages: unknown }} messages object
|
|
46
|
+
* @returns {{ locale: string; messages: Record<string, unknown> }} messages object
|
|
47
47
|
*/
|
|
48
48
|
export const getLocaleMessages = (element, messages, defaultLocale) => {
|
|
49
|
-
var _a;
|
|
50
49
|
// Get local
|
|
51
|
-
const
|
|
50
|
+
const closestLangAttribute = element.closest('[lang]');
|
|
51
|
+
const closestLang = Intl.NumberFormat.supportedLocalesOf(closestLangAttribute === null || closestLangAttribute === void 0 ? void 0 : closestLangAttribute.lang);
|
|
52
52
|
const locale = closestLang.length > 0 ? closestLang[0] : navigator.language || defaultLocale;
|
|
53
53
|
// Only keep first subtag
|
|
54
54
|
const localeSubtag = locale.split('-').shift();
|
|
@@ -43,14 +43,42 @@ export const setupResizeObserverMock = ({ disconnect, observe }) => {
|
|
|
43
43
|
/**
|
|
44
44
|
* force popover id when component use randomed identifier
|
|
45
45
|
*
|
|
46
|
-
* @param {Element}
|
|
46
|
+
* @param {Element} component element wich include mg-popover
|
|
47
47
|
* @param {string} id new fixed id
|
|
48
|
+
* @param {string} interactiveElement element where attribute 'aria-controls' is set
|
|
48
49
|
* @returns {void}
|
|
49
50
|
*/
|
|
50
|
-
export const forcePopoverId = (
|
|
51
|
-
const popover =
|
|
51
|
+
export const forcePopoverId = (component, id, interactiveElement = 'button') => {
|
|
52
|
+
const popover = component.shadowRoot.querySelector('mg-popover');
|
|
52
53
|
if (popover !== null) {
|
|
53
54
|
popover.shadowRoot.querySelector('.mg-popover').setAttribute('id', id);
|
|
54
|
-
|
|
55
|
+
component.shadowRoot.querySelector(interactiveElement).setAttribute('aria-controls', id);
|
|
55
56
|
}
|
|
56
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* fix popper console.error in test
|
|
60
|
+
* it is generated in @popperjs/core/dist/cjs/popper.js l.1859
|
|
61
|
+
* this is due to internal function isHTMLElement(), so we can not mock it directly.
|
|
62
|
+
* this function check if test DOM element mockHTMLElement instance is 'instanceof HTMLElement'
|
|
63
|
+
* so we only override the console.error side effect for this error
|
|
64
|
+
*
|
|
65
|
+
* @returns {void}
|
|
66
|
+
*/
|
|
67
|
+
export const mockConsoleError = () => {
|
|
68
|
+
jest.spyOn(console, 'error').mockImplementation(error => {
|
|
69
|
+
const compareWith = 'Popper: "arrow" element must be an HTMLElement (not an SVGElement). To use an SVG arrow, wrap it in an HTMLElement that will be used as the arrow.';
|
|
70
|
+
if (error !== compareWith)
|
|
71
|
+
console.log(error);
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Add missing window.frames property to test context
|
|
76
|
+
* usefull for component with iframe listeners, ex: mg-popover
|
|
77
|
+
*
|
|
78
|
+
* @returns {void}
|
|
79
|
+
*/
|
|
80
|
+
export const mockWindowFrames = () => {
|
|
81
|
+
Object.defineProperty(window, 'frames', {
|
|
82
|
+
value: { length: 0 },
|
|
83
|
+
});
|
|
84
|
+
};
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
Global
|
|
103
103
|
*/
|
|
104
104
|
--default-size: 3.5rem;
|
|
105
|
+
--mg-disabled-opacity: 0.4;
|
|
105
106
|
|
|
106
107
|
/*
|
|
107
108
|
<mg-icon>
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
|
|
118
119
|
--mg-button-border-radius: 0.3rem;
|
|
119
120
|
--mg-button-icon-border-radius: var(--default-size);
|
|
120
|
-
--mg-button-disabled-opacity:
|
|
121
|
+
--mg-button-disabled-opacity: var(--mg-disabled-opacity);
|
|
121
122
|
--mg-button-gradient: 1; /* Can only be 1 or 0 to enable disable gradient */
|
|
122
123
|
--mg-button-border-variation: 1; /* Can only be 1 or 0 to enable disable border variation */
|
|
123
124
|
|
|
@@ -59,6 +59,11 @@ const MgInput = (props, children, utils) => {
|
|
|
59
59
|
if (props.labelOnTop && props.labelHide) {
|
|
60
60
|
throw new Error('<mg-input> prop "labelOnTop" must not be paired with the prop "labelHide".');
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Set readonly value
|
|
64
|
+
*/
|
|
65
|
+
if (props.readonlyValue === undefined)
|
|
66
|
+
props.readonlyValue = props.value;
|
|
62
67
|
/**
|
|
63
68
|
* Component classes
|
|
64
69
|
*/
|
|
@@ -112,7 +117,7 @@ const MgInput = (props, children, utils) => {
|
|
|
112
117
|
getInputTitle(),
|
|
113
118
|
!props.readonly && props.tooltip && getTooltip())) : (getInputTitle()),
|
|
114
119
|
props.readonly ? (h("div", { class: "mg-input__input-container" },
|
|
115
|
-
h("strong", null, props.readonlyValue
|
|
120
|
+
h("strong", null, props.readonlyValue),
|
|
116
121
|
children.filter(child => child.$name$ === 'append-input'))) : (h("div", { class: "mg-input__input-container" },
|
|
117
122
|
h("div", { class: { 'mg-input__input': true, 'mg-input__input--has-error': props.errorMessage !== undefined } },
|
|
118
123
|
applyAriadescribedBy(children, ariaDescribedbyIDs, utils),
|
|
@@ -128,10 +128,12 @@ const getParentWindows = (localWindow, windows = []) => {
|
|
|
128
128
|
*/
|
|
129
129
|
const getChildWindows = (localWindow, windows = []) => {
|
|
130
130
|
if (localWindow.frames.length > 0) {
|
|
131
|
+
// Window.frames is an array-like object, needs a classic for loop
|
|
132
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Window/frames
|
|
131
133
|
for (let i = 0; i < localWindow.frames.length; i++) {
|
|
132
134
|
const childWindow = localWindow.frames[i];
|
|
133
135
|
windows.push(childWindow);
|
|
134
|
-
|
|
136
|
+
getChildWindows(childWindow, windows);
|
|
135
137
|
}
|
|
136
138
|
}
|
|
137
139
|
return windows;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* MgComponents custom elements */
|
|
2
|
+
export { MgActionMore as MgActionMore } from '../types/components/molecules/mg-action-more/mg-action-more';
|
|
2
3
|
export { MgBadge as MgBadge } from '../types/components/atoms/mg-badge/mg-badge';
|
|
3
4
|
export { MgButton as MgButton } from '../types/components/atoms/mg-button/mg-button';
|
|
4
5
|
export { MgCard as MgCard } from '../types/components/atoms/mg-card/mg-card';
|
|
@@ -18,6 +19,7 @@ export { MgInputText as MgInputText } from '../types/components/molecules/inputs
|
|
|
18
19
|
export { MgInputTextarea as MgInputTextarea } from '../types/components/molecules/inputs/mg-input-textarea/mg-input-textarea';
|
|
19
20
|
export { MgInputTitle as MgInputTitle } from '../types/components/atoms/mg-input-title/mg-input-title';
|
|
20
21
|
export { MgInputToggle as MgInputToggle } from '../types/components/molecules/inputs/mg-input-toggle/mg-input-toggle';
|
|
22
|
+
export { MgItemMore as MgItemMore } from '../types/components/molecules/mg-item-more/mg-item-more';
|
|
21
23
|
export { MgMenu as MgMenu } from '../types/components/molecules/menu/mg-menu/mg-menu';
|
|
22
24
|
export { MgMenuItem as MgMenuItem } from '../types/components/molecules/menu/mg-menu-item/mg-menu-item';
|
|
23
25
|
export { MgMessage as MgMessage } from '../types/components/molecules/mg-message/mg-message';
|
|
@@ -42,6 +44,15 @@ export { MgTooltip as MgTooltip } from '../types/components/atoms/mg-tooltip/mg-
|
|
|
42
44
|
*/
|
|
43
45
|
export declare const setAssetPath: (path: string) => void;
|
|
44
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
49
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
50
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
51
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
52
|
+
* will result in the same behavior.
|
|
53
|
+
*/
|
|
54
|
+
export declare const setNonce: (nonce: string) => void
|
|
55
|
+
|
|
45
56
|
export interface SetPlatformOptions {
|
|
46
57
|
raf?: (c: FrameRequestCallback) => number;
|
|
47
58
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
1
|
+
export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
|
+
export { MgActionMore, defineCustomElement as defineCustomElementMgActionMore } from './mg-action-more.js';
|
|
2
3
|
export { MgBadge, defineCustomElement as defineCustomElementMgBadge } from './mg-badge.js';
|
|
3
4
|
export { MgButton, defineCustomElement as defineCustomElementMgButton } from './mg-button.js';
|
|
4
5
|
export { MgCard, defineCustomElement as defineCustomElementMgCard } from './mg-card.js';
|
|
@@ -18,6 +19,7 @@ export { MgInputText, defineCustomElement as defineCustomElementMgInputText } fr
|
|
|
18
19
|
export { MgInputTextarea, defineCustomElement as defineCustomElementMgInputTextarea } from './mg-input-textarea.js';
|
|
19
20
|
export { MgInputTitle, defineCustomElement as defineCustomElementMgInputTitle } from './mg-input-title.js';
|
|
20
21
|
export { MgInputToggle, defineCustomElement as defineCustomElementMgInputToggle } from './mg-input-toggle.js';
|
|
22
|
+
export { MgItemMore, defineCustomElement as defineCustomElementMgItemMore } from './mg-item-more.js';
|
|
21
23
|
export { MgMenu, defineCustomElement as defineCustomElementMgMenu } from './mg-menu.js';
|
|
22
24
|
export { MgMenuItem, defineCustomElement as defineCustomElementMgMenuItem } from './mg-menu-item.js';
|
|
23
25
|
export { MgMessage, defineCustomElement as defineCustomElementMgMessage } from './mg-message.js';
|
|
@@ -20,7 +20,9 @@ const input$1 = {
|
|
|
20
20
|
};
|
|
21
21
|
const form$1 = {
|
|
22
22
|
required: "Fields with a <strong class=\"is-asterisk\">*</strong> are required",
|
|
23
|
-
|
|
23
|
+
requiredSingle: "Field with a <strong class=\"is-asterisk\">*</strong> is required",
|
|
24
|
+
allRequired: "All fields are required",
|
|
25
|
+
allRequiredSingle: "The field is required"
|
|
24
26
|
};
|
|
25
27
|
const message$1 = {
|
|
26
28
|
closeButton: "Close message"
|
|
@@ -53,6 +55,9 @@ const plusMenu$1 = {
|
|
|
53
55
|
moreLabel: "Additional menu",
|
|
54
56
|
badgeLabel: "Include notification(s)"
|
|
55
57
|
};
|
|
58
|
+
const actionMore$1 = {
|
|
59
|
+
label: "Actions"
|
|
60
|
+
};
|
|
56
61
|
const en = {
|
|
57
62
|
errors: errors$1,
|
|
58
63
|
nbCharLeft: nbCharLeft$1,
|
|
@@ -64,7 +69,8 @@ const en = {
|
|
|
64
69
|
panel: panel$1,
|
|
65
70
|
skipLinks: skipLinks$1,
|
|
66
71
|
general: general$1,
|
|
67
|
-
plusMenu: plusMenu$1
|
|
72
|
+
plusMenu: plusMenu$1,
|
|
73
|
+
actionMore: actionMore$1
|
|
68
74
|
};
|
|
69
75
|
|
|
70
76
|
const errors = {
|
|
@@ -89,7 +95,9 @@ const input = {
|
|
|
89
95
|
};
|
|
90
96
|
const form = {
|
|
91
97
|
required: "Les champs marqués d'un <strong class=\"is-asterisk\">*</strong> sont obligatoires",
|
|
92
|
-
|
|
98
|
+
requiredSingle: "Le champ marqué d'un <strong class=\"is-asterisk\">*</strong> est obligatoire",
|
|
99
|
+
allRequired: "Tous les champs sont obligatoires",
|
|
100
|
+
allRequiredSingle: "Le champ est obligatoire"
|
|
93
101
|
};
|
|
94
102
|
const message = {
|
|
95
103
|
closeButton: "Fermer le message"
|
|
@@ -122,6 +130,9 @@ const plusMenu = {
|
|
|
122
130
|
moreLabel: "Menu complémentaire",
|
|
123
131
|
badgeLabel: "Notification(s) incluse(s)"
|
|
124
132
|
};
|
|
133
|
+
const actionMore = {
|
|
134
|
+
label: "Actions"
|
|
135
|
+
};
|
|
125
136
|
const fr = {
|
|
126
137
|
errors: errors,
|
|
127
138
|
nbCharLeft: nbCharLeft,
|
|
@@ -133,7 +144,8 @@ const fr = {
|
|
|
133
144
|
panel: panel,
|
|
134
145
|
skipLinks: skipLinks,
|
|
135
146
|
general: general,
|
|
136
|
-
plusMenu: plusMenu
|
|
147
|
+
plusMenu: plusMenu,
|
|
148
|
+
actionMore: actionMore
|
|
137
149
|
};
|
|
138
150
|
|
|
139
151
|
/**
|
|
@@ -144,9 +156,9 @@ const fr = {
|
|
|
144
156
|
* @param {string} currency currency to apply
|
|
145
157
|
* @returns {string} formatted currency
|
|
146
158
|
*/
|
|
147
|
-
|
|
159
|
+
const localeCurrency = (number, locale, currency) => {
|
|
148
160
|
return new Intl.NumberFormat(locale, { style: 'currency', currency }).format(number);
|
|
149
|
-
}
|
|
161
|
+
};
|
|
150
162
|
/**
|
|
151
163
|
* Format number to locale
|
|
152
164
|
*
|
|
@@ -154,9 +166,9 @@ function localeCurrency(number, locale, currency) {
|
|
|
154
166
|
* @param {string} locale locale to apply
|
|
155
167
|
* @returns {string} formatted number
|
|
156
168
|
*/
|
|
157
|
-
|
|
169
|
+
const localeNumber = (number, locale) => {
|
|
158
170
|
return new Intl.NumberFormat(locale).format(number);
|
|
159
|
-
}
|
|
171
|
+
};
|
|
160
172
|
/**
|
|
161
173
|
* Date RegExp
|
|
162
174
|
*/
|
|
@@ -168,12 +180,12 @@ const dateRegExp = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;
|
|
|
168
180
|
* @param {string} locale locale to apply
|
|
169
181
|
* @returns {string} formatted date
|
|
170
182
|
*/
|
|
171
|
-
|
|
183
|
+
const localeDate = (date, locale) => {
|
|
172
184
|
if (typeof date !== 'string' || date === '' || !dateRegExp.test(date)) {
|
|
173
185
|
return '';
|
|
174
186
|
}
|
|
175
187
|
return new Intl.DateTimeFormat(locale).format(new Date(date));
|
|
176
|
-
}
|
|
188
|
+
};
|
|
177
189
|
/**
|
|
178
190
|
* Get locale and messages
|
|
179
191
|
* We load the defined locale but for now we only support the first subtag for messages
|
|
@@ -181,12 +193,12 @@ function localeDate(date, locale) {
|
|
|
181
193
|
* @param {HTMLElement} element element we need to get the language
|
|
182
194
|
* @param {unknown} messages messages to use
|
|
183
195
|
* @param {string} defaultLocale default messages locale
|
|
184
|
-
* @returns {{ locale: string; messages: unknown }} messages object
|
|
196
|
+
* @returns {{ locale: string; messages: Record<string, unknown> }} messages object
|
|
185
197
|
*/
|
|
186
198
|
const getLocaleMessages = (element, messages, defaultLocale) => {
|
|
187
|
-
var _a;
|
|
188
199
|
// Get local
|
|
189
|
-
const
|
|
200
|
+
const closestLangAttribute = element.closest('[lang]');
|
|
201
|
+
const closestLang = Intl.NumberFormat.supportedLocalesOf(closestLangAttribute === null || closestLangAttribute === void 0 ? void 0 : closestLangAttribute.lang);
|
|
190
202
|
const locale = closestLang.length > 0 ? closestLang[0] : navigator.language || defaultLocale;
|
|
191
203
|
// Only keep first subtag
|
|
192
204
|
const localeSubtag = locale.split('-').shift();
|
|
@@ -203,7 +215,7 @@ const messages = { en, fr };
|
|
|
203
215
|
* Get Intl object
|
|
204
216
|
*
|
|
205
217
|
* @param {HTMLElement} element element we need to get the language
|
|
206
|
-
* @returns {{ locale: string; messages: unknown }} messages object
|
|
218
|
+
* @returns {{ locale: string; messages: Record<string, unknown> }} messages object
|
|
207
219
|
*/
|
|
208
220
|
const initLocales = (element) => getLocaleMessages(element, messages, defaultLocale);
|
|
209
221
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface MgActionMore extends Components.MgActionMore, HTMLElement {}
|
|
4
|
+
export const MgActionMore: {
|
|
5
|
+
prototype: MgActionMore;
|
|
6
|
+
new (): MgActionMore;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|