@mgdis/mg-components 5.8.2 → 5.10.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/loader.cjs.js +1 -1
- package/dist/cjs/mg-action-more_31.cjs.entry.js +216 -277
- package/dist/cjs/mg-components.cjs.js +1 -1
- package/dist/cjs/mg-item-more.cjs.entry.js +1 -16
- package/dist/cjs/{mg-menu.conf-9afe6571.js → mg-menu.conf-1942ac70.js} +0 -5
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +1 -3
- package/dist/collection/components/atoms/mg-button/mg-button.js +2 -7
- package/dist/collection/components/atoms/mg-card/mg-card.conf.js +8 -0
- package/dist/collection/components/atoms/mg-card/mg-card.css +54 -0
- package/dist/collection/components/atoms/mg-card/mg-card.js +113 -2
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +0 -2
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +0 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +38 -7
- package/dist/collection/components/atoms/mg-icon/mg-icon.css +70 -11
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +65 -24
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +0 -2
- package/dist/collection/components/atoms/mg-tag/mg-tag.css +12 -12
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +0 -3
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +42 -15
- package/dist/collection/components/molecules/inputs/MgInput.js +0 -6
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +0 -6
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +0 -5
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +12 -21
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +0 -3
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +0 -9
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +0 -13
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +1 -12
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -5
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +0 -5
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +1 -12
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +1 -0
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +1 -19
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.css +1 -0
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +0 -8
- package/dist/collection/components/molecules/mg-details/mg-details.css +0 -3
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -4
- package/dist/collection/components/molecules/mg-form/mg-form.js +0 -8
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +0 -2
- package/dist/collection/components/molecules/mg-item-more/mg-item-more.js +0 -5
- package/dist/collection/components/molecules/mg-message/mg-message.css +1 -19
- package/dist/collection/components/molecules/mg-message/mg-message.js +11 -11
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +1 -0
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +1 -6
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +0 -6
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +1 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -15
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +2 -0
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +1 -8
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +0 -12
- package/dist/collection/locales/index.js +0 -1
- package/dist/collection/styles/reset-mg-card-slotted-variables.scss +1 -0
- package/dist/collection/utils/behaviors.utils.js +0 -10
- package/dist/collection/utils/components.utils.js +1 -10
- package/dist/collection/utils/locale.utils.js +0 -4
- package/dist/collection/utils/unit.test.utils.js +0 -5
- package/dist/collection/variables.css +7 -1
- package/dist/components/MgInput.js +0 -6
- package/dist/components/components.utils.js +1 -10
- package/dist/components/index2.js +0 -5
- package/dist/components/mg-action-more.js +1 -9
- package/dist/components/mg-badge2.js +1 -3
- package/dist/components/mg-button2.js +2 -7
- package/dist/components/mg-card2.js +67 -4
- package/dist/components/mg-character-left2.js +0 -2
- package/dist/components/mg-details.js +2 -5
- package/dist/components/mg-divider.js +0 -1
- package/dist/components/mg-form.js +0 -8
- package/dist/components/mg-icon2.js +74 -25
- package/dist/components/mg-illustrated-message.js +0 -2
- package/dist/components/mg-input-checkbox.js +0 -6
- package/dist/components/mg-input-date.js +0 -5
- package/dist/components/mg-input-numeric.js +12 -21
- package/dist/components/mg-input-password.js +0 -3
- package/dist/components/mg-input-radio.js +0 -9
- package/dist/components/mg-input-select2.js +0 -13
- package/dist/components/mg-input-text2.js +1 -12
- package/dist/components/mg-input-textarea.js +1 -5
- package/dist/components/mg-input-title2.js +0 -2
- package/dist/components/mg-input-toggle.js +0 -5
- package/dist/components/mg-item-more.js +0 -15
- package/dist/components/mg-menu-item2.js +2 -20
- package/dist/components/mg-menu2.js +0 -11
- package/dist/components/mg-message.js +4 -9
- package/dist/components/mg-modal.js +2 -7
- package/dist/components/mg-pagination.js +0 -6
- package/dist/components/mg-panel.js +6 -16
- package/dist/components/mg-popover2.js +2 -9
- package/dist/components/mg-skip-links.js +1 -4
- package/dist/components/mg-tabs.js +0 -12
- package/dist/components/mg-tag.js +1 -4
- package/dist/components/mg-tooltip2.js +42 -15
- package/dist/components/popper.js +3 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mg-action-more_31.entry.js +216 -277
- package/dist/esm/mg-components.js +1 -1
- package/dist/esm/mg-item-more.entry.js +1 -16
- package/dist/esm/{mg-menu.conf-881fbd82.js → mg-menu.conf-2cc1bb67.js} +0 -5
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-67ce7cb8.entry.js → p-a56a3157.entry.js} +1 -1
- package/dist/mg-components/p-eb32bb18.entry.js +1 -0
- package/dist/mg-components/styles/reset-mg-card-slotted-variables.scss +1 -0
- package/dist/mg-components/variables.css +7 -1
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +0 -2
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +0 -5
- package/dist/types/components/atoms/mg-card/mg-card.conf.d.ts +16 -0
- package/dist/types/components/atoms/mg-card/mg-card.d.ts +37 -1
- package/dist/types/components/atoms/mg-character-left/mg-character-left.d.ts +0 -2
- package/dist/types/components/atoms/mg-divider/mg-divider.d.ts +0 -1
- package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +10 -2
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +19 -8
- package/dist/types/components/atoms/mg-input-title/mg-input-title.d.ts +0 -2
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +0 -3
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +18 -9
- package/dist/types/components/molecules/inputs/MgInput.d.ts +0 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +0 -5
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +0 -5
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +5 -17
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +0 -3
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +0 -8
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +0 -9
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +0 -11
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +0 -4
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +0 -5
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +0 -11
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +0 -18
- package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +0 -5
- package/dist/types/components/molecules/mg-details/mg-details.d.ts +0 -3
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +0 -8
- package/dist/types/components/molecules/mg-illustrated-message/mg-illustrated-message.d.ts +0 -2
- package/dist/types/components/molecules/mg-item-more/mg-item-more.d.ts +0 -5
- package/dist/types/components/molecules/mg-message/mg-message.conf.d.ts +5 -1
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +7 -11
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +0 -5
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +0 -5
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +0 -10
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +0 -7
- package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +0 -3
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +0 -11
- package/dist/types/components.d.ts +35 -9
- package/dist/types/locales/index.d.ts +0 -1
- package/dist/types/utils/behaviors.utils.d.ts +0 -9
- package/dist/types/utils/components.utils.d.ts +1 -9
- package/dist/types/utils/locale.utils.d.ts +0 -4
- package/dist/types/utils/unit.test.utils.d.ts +0 -7
- package/package.json +15 -16
- package/dist/mg-components/p-0b68c4b4.entry.js +0 -1
- /package/dist/mg-components/{p-367f92d2.js → p-73156ac9.js} +0 -0
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["mg-action-more_31.cjs",[[1,"mg-action-more",{"icon":[16],"button":[16],"items":[16],"displayChevron":[4,"display-chevron"],"expanded":[32]}],[1,"mg-panel",{"identifier":[1],"panelTitle":[1025,"panel-title"],"titlePattern":[
|
|
20
|
+
return index.bootstrapLazy([["mg-action-more_31.cjs",[[1,"mg-action-more",{"icon":[16],"button":[16],"items":[16],"displayChevron":[4,"display-chevron"],"expanded":[32]}],[1,"mg-panel",{"identifier":[1],"panelTitle":[1025,"panel-title"],"titlePattern":[1,"title-pattern"],"titlePatternErrorMessage":[1,"title-pattern-error-message"],"expanded":[1028],"expandToggleDisabled":[4,"expand-toggle-disabled"],"titleEditable":[4,"title-editable"],"classList":[32],"isEditing":[32],"updatedPanelTitle":[32]}],[1,"mg-pagination",{"identifier":[1],"label":[1025],"hideNavigationLabels":[4,"hide-navigation-labels"],"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"]}],[1,"mg-input-textarea",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"rows":[2],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"resizable":[1],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-checkbox",{"value":[1040],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"checkboxItems":[32],"displayError":[64]}],[1,"mg-input-date",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"min":[1],"max":[1],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-numeric",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"type":[1],"currency":[1],"max":[2],"min":[2],"integerLength":[2,"integer-length"],"decimalLength":[2,"decimal-length"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"hasFocus":[32],"displayError":[64]}],[1,"mg-input-password",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-radio",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"displayError":[64]}],[1,"mg-input-toggle",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"isOnOff":[4,"is-on-off"],"isIcon":[4,"is-icon"],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"classList":[32],"options":[32],"checked":[32]}],[1,"mg-message",{"identifier":[1],"delay":[2],"variant":[1],"closeButton":[1028,"close-button"],"hide":[1028],"classList":[32],"hasActions":[32]}],[1,"mg-modal",{"identifier":[1],"modalTitle":[1,"modal-title"],"closeButton":[4,"close-button"],"hide":[1028],"hasActions":[32],"hasContent":[32],"classList":[32]},[[8,"keydown","handleKeyDown"]]],[1,"mg-tabs",{"identifier":[1],"label":[1],"size":[1],"items":[16],"activeTab":[1538,"active-tab"],"tabs":[32],"classList":[32]}],[1,"mg-details",{"toggleClosed":[1,"toggle-closed"],"toggleOpened":[1,"toggle-opened"],"hideSummary":[4,"hide-summary"],"expanded":[1028]}],[1,"mg-divider",{"size":[1]}],[1,"mg-form",{"identifier":[1],"name":[1],"readonly":[4],"disabled":[4],"valid":[1028],"invalid":[1028],"classList":[32],"requiredMessage":[32],"displayError":[64]}],[1,"mg-illustrated-message",{"size":[1],"direction":[1]}],[1,"mg-skip-links",{"links":[16]}],[1,"mg-tag",{"variant":[1],"outline":[4],"soft":[4],"classList":[32]}],[1,"mg-input-text",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"type":[1],"icon":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64]}],[1,"mg-input-select",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1025],"placeholderHide":[4,"placeholder-hide"],"placeholderDisabled":[4,"placeholder-disabled"],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"valueExist":[32],"readonlyValue":[32],"displayError":[64]}],[1,"mg-menu-item",{"identifier":[1],"href":[1],"status":[1537],"expanded":[1028],"size":[32],"navigationButtonClassList":[32],"direction":[32],"isInMainMenu":[32],"isItemMore":[32],"hasChildren":[32],"displayNotificationBadge":[32]}],[1,"mg-menu",{"label":[1],"direction":[513],"itemmore":[16],"size":[1],"isChildMenu":[32]}],[1,"mg-popover",{"identifier":[1],"placement":[1],"arrowHide":[4,"arrow-hide"],"closeButton":[4,"close-button"],"display":[1028],"disabled":[4],"classList":[32]}],[2,"mg-character-left",{"identifier":[1],"characters":[1],"maxlength":[2]}],[1,"mg-badge",{"value":[8],"label":[1],"variant":[1],"outline":[4],"classList":[32]}],[1,"mg-card",{"variant":[1],"variantStyle":[1025,"variant-style"],"classList":[32]}],[1,"mg-button",{"variant":[1],"identifier":[1],"label":[1],"type":[1],"fullWidth":[4,"full-width"],"form":[1],"disabled":[1028],"isIcon":[4,"is-icon"],"disableOnClick":[4,"disable-on-click"],"loading":[32],"classList":[32]}],[6,"mg-input-title",{"identifier":[1],"required":[4],"isLegend":[4,"is-legend"],"tagName":[32]}],[1,"mg-tooltip",{"identifier":[1],"message":[1],"placement":[1],"display":[1028],"disabled":[4]}],[1,"mg-icon",{"icon":[1],"size":[1],"variant":[1],"variantStyle":[1025,"variant-style"],"spin":[4],"classList":[32]}]]],["mg-item-more.cjs",[[1,"mg-item-more",{"icon":[16],"slotlabel":[16],"size":[1],"parentMenu":[32]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -3,11 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9e1091ab.js');
|
|
6
|
-
const mgMenu_conf = require('./mg-menu.conf-
|
|
6
|
+
const mgMenu_conf = require('./mg-menu.conf-1942ac70.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* MgItemMore type guard
|
|
10
|
-
*
|
|
11
10
|
* @param {HTMLElement} element element to control type
|
|
12
11
|
* @returns {boolean} truthy if element is mg-item-more
|
|
13
12
|
*/
|
|
@@ -26,7 +25,6 @@ class OverflowBehavior {
|
|
|
26
25
|
**********/
|
|
27
26
|
/**
|
|
28
27
|
* Disconnect ResizeObserver
|
|
29
|
-
*
|
|
30
28
|
* @returns {void}
|
|
31
29
|
*/
|
|
32
30
|
this.disconnect = () => {
|
|
@@ -37,7 +35,6 @@ class OverflowBehavior {
|
|
|
37
35
|
************/
|
|
38
36
|
/**
|
|
39
37
|
* run overflow behavior
|
|
40
|
-
*
|
|
41
38
|
* @param {number} width width of the container. Optional.
|
|
42
39
|
* @returns {void}
|
|
43
40
|
*/
|
|
@@ -62,14 +59,12 @@ class OverflowBehavior {
|
|
|
62
59
|
};
|
|
63
60
|
/**
|
|
64
61
|
* Get interactive children filtred by authorized nodeName ['MG-MENU-ITEM', 'MG-BUTTON']
|
|
65
|
-
*
|
|
66
62
|
* @param {Element} element element to parse
|
|
67
63
|
* @returns {Element[]} children
|
|
68
64
|
*/
|
|
69
65
|
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)); };
|
|
70
66
|
/**
|
|
71
67
|
* Update displayed items in container from a given available space
|
|
72
|
-
*
|
|
73
68
|
* @param {number} availableWidth available width in container to display child items
|
|
74
69
|
* @returns {void}
|
|
75
70
|
*/
|
|
@@ -90,7 +85,6 @@ class OverflowBehavior {
|
|
|
90
85
|
};
|
|
91
86
|
/**
|
|
92
87
|
* Utility method to know if item overflow partialy or totaly in the container
|
|
93
|
-
*
|
|
94
88
|
* @param {number} cumulateWidth previous sibling elements cumulate width + item width
|
|
95
89
|
* @param {HTMLElement} item item HTML element
|
|
96
90
|
* @param {number} availableWidth container available width
|
|
@@ -106,14 +100,12 @@ class OverflowBehavior {
|
|
|
106
100
|
};
|
|
107
101
|
/**
|
|
108
102
|
* Utility method to know if a given element is the 'MORE' element
|
|
109
|
-
*
|
|
110
103
|
* @param {Element} element element to match with 'MORE' element
|
|
111
104
|
* @returns {boolean} truthy if element is the 'MORE' element
|
|
112
105
|
*/
|
|
113
106
|
this.isMoreElement = (element) => element.nodeName === 'MG-ITEM-MORE';
|
|
114
107
|
/**
|
|
115
108
|
* Toggle display item element
|
|
116
|
-
*
|
|
117
109
|
* @param {HTMLElement} item item to control
|
|
118
110
|
* @param {boolean} isHidden is item hidden
|
|
119
111
|
* @returns {void}
|
|
@@ -129,7 +121,6 @@ class OverflowBehavior {
|
|
|
129
121
|
};
|
|
130
122
|
/**
|
|
131
123
|
* Toggle element's hidde attribute
|
|
132
|
-
*
|
|
133
124
|
* @param {Element} element element to toggle
|
|
134
125
|
* @param {boolean} isHidden element is hidden
|
|
135
126
|
* @returns {void}
|
|
@@ -142,7 +133,6 @@ class OverflowBehavior {
|
|
|
142
133
|
};
|
|
143
134
|
/**
|
|
144
135
|
* Remove hidden attributes on all items
|
|
145
|
-
*
|
|
146
136
|
* @returns {void}
|
|
147
137
|
*/
|
|
148
138
|
this.restoreItems = () => {
|
|
@@ -175,7 +165,6 @@ const MgItemMore = class {
|
|
|
175
165
|
***********/
|
|
176
166
|
/**
|
|
177
167
|
* render mg-item-more overflow element
|
|
178
|
-
*
|
|
179
168
|
* @returns {HTMLMgItemMoreElement} mg-item-more element
|
|
180
169
|
*/
|
|
181
170
|
this.renderMgMenuItemOverflowElement = () => {
|
|
@@ -225,7 +214,6 @@ const MgItemMore = class {
|
|
|
225
214
|
*************/
|
|
226
215
|
/**
|
|
227
216
|
* Disconnect overflow ResizeObserver
|
|
228
|
-
*
|
|
229
217
|
* @returns {void} run overflow resize obeserver disconnexion
|
|
230
218
|
*/
|
|
231
219
|
disconnectedCallback() {
|
|
@@ -233,7 +221,6 @@ const MgItemMore = class {
|
|
|
233
221
|
}
|
|
234
222
|
/**
|
|
235
223
|
* Set variables and validate props
|
|
236
|
-
*
|
|
237
224
|
* @returns {void}
|
|
238
225
|
*/
|
|
239
226
|
componentWillLoad() {
|
|
@@ -248,7 +235,6 @@ const MgItemMore = class {
|
|
|
248
235
|
}
|
|
249
236
|
/**
|
|
250
237
|
* Add overflow behavior
|
|
251
|
-
*
|
|
252
238
|
* @returns {void}
|
|
253
239
|
*/
|
|
254
240
|
componentDidLoad() {
|
|
@@ -256,7 +242,6 @@ const MgItemMore = class {
|
|
|
256
242
|
}
|
|
257
243
|
/**
|
|
258
244
|
* Render
|
|
259
|
-
*
|
|
260
245
|
* @returns {HTMLElement} HTML Element
|
|
261
246
|
*/
|
|
262
247
|
render() {
|
|
@@ -152,7 +152,6 @@ const fr = {
|
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
* Format number to the locale currency
|
|
155
|
-
*
|
|
156
155
|
* @param {number} number number to format
|
|
157
156
|
* @param {string} locale locale to apply
|
|
158
157
|
* @param {string} currency currency to apply
|
|
@@ -163,7 +162,6 @@ const localeCurrency = (number, locale, currency) => {
|
|
|
163
162
|
};
|
|
164
163
|
/**
|
|
165
164
|
* Format number to locale
|
|
166
|
-
*
|
|
167
165
|
* @param {number} number number to format
|
|
168
166
|
* @param {string} locale locale to apply
|
|
169
167
|
* @returns {string} formatted number
|
|
@@ -177,7 +175,6 @@ const localeNumber = (number, locale) => {
|
|
|
177
175
|
const dateRegExp = /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;
|
|
178
176
|
/**
|
|
179
177
|
* Locale date format
|
|
180
|
-
*
|
|
181
178
|
* @param {string} date date to format
|
|
182
179
|
* @param {string} locale locale to apply
|
|
183
180
|
* @returns {string} formatted date
|
|
@@ -191,7 +188,6 @@ const localeDate = (date, locale) => {
|
|
|
191
188
|
/**
|
|
192
189
|
* Get locale and messages
|
|
193
190
|
* We load the defined locale but for now we only support the first subtag for messages
|
|
194
|
-
*
|
|
195
191
|
* @param {HTMLElement} element element we need to get the language
|
|
196
192
|
* @param {unknown} messages messages to use
|
|
197
193
|
* @param {string} defaultLocale default messages locale
|
|
@@ -215,7 +211,6 @@ const defaultLocale = 'en';
|
|
|
215
211
|
const messages = { en, fr };
|
|
216
212
|
/**
|
|
217
213
|
* Get Intl object
|
|
218
|
-
*
|
|
219
214
|
* @param {HTMLElement} element element we need to get the language
|
|
220
215
|
* @returns {{ locale: string; messages: Record<string, unknown> }} messages object
|
|
221
216
|
*/
|
|
@@ -43,7 +43,6 @@ export class MgBadge {
|
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Check if props are well configured on init
|
|
46
|
-
*
|
|
47
46
|
* @returns {void}
|
|
48
47
|
*/
|
|
49
48
|
componentWillLoad() {
|
|
@@ -54,7 +53,6 @@ export class MgBadge {
|
|
|
54
53
|
}
|
|
55
54
|
/**
|
|
56
55
|
* Render
|
|
57
|
-
*
|
|
58
56
|
* @returns {HTMLElement} HTML Element
|
|
59
57
|
*/
|
|
60
58
|
render() {
|
|
@@ -76,7 +74,7 @@ export class MgBadge {
|
|
|
76
74
|
return {
|
|
77
75
|
"value": {
|
|
78
76
|
"type": "any",
|
|
79
|
-
"mutable":
|
|
77
|
+
"mutable": false,
|
|
80
78
|
"complexType": {
|
|
81
79
|
"original": "string | number",
|
|
82
80
|
"resolved": "number | string",
|
|
@@ -12,7 +12,6 @@ export class MgButton {
|
|
|
12
12
|
this.classFullWidth = 'mg-button--full-width';
|
|
13
13
|
/**
|
|
14
14
|
* Trigger actions onClick event
|
|
15
|
-
*
|
|
16
15
|
* @param {MouseEvent} event click event
|
|
17
16
|
* @returns {void}
|
|
18
17
|
*/
|
|
@@ -27,7 +26,6 @@ export class MgButton {
|
|
|
27
26
|
};
|
|
28
27
|
/**
|
|
29
28
|
* Handle onKeydown event
|
|
30
|
-
*
|
|
31
29
|
* @param {KeyboardEvent} event keyboard event
|
|
32
30
|
* @returns {void}
|
|
33
31
|
*/
|
|
@@ -42,7 +40,6 @@ export class MgButton {
|
|
|
42
40
|
};
|
|
43
41
|
/**
|
|
44
42
|
* Handle onKeyup event
|
|
45
|
-
*
|
|
46
43
|
* @param {KeyboardEvent} event keyboard event
|
|
47
44
|
* @returns {void}
|
|
48
45
|
*/
|
|
@@ -115,7 +112,6 @@ export class MgButton {
|
|
|
115
112
|
}
|
|
116
113
|
/**
|
|
117
114
|
* Check if props are well configured on init
|
|
118
|
-
*
|
|
119
115
|
* @returns {void}
|
|
120
116
|
*/
|
|
121
117
|
componentWillLoad() {
|
|
@@ -133,7 +129,6 @@ export class MgButton {
|
|
|
133
129
|
}
|
|
134
130
|
/**
|
|
135
131
|
* Render component
|
|
136
|
-
*
|
|
137
132
|
* @returns {HTMLElement} html element
|
|
138
133
|
*/
|
|
139
134
|
render() {
|
|
@@ -234,7 +229,7 @@ export class MgButton {
|
|
|
234
229
|
},
|
|
235
230
|
"fullWidth": {
|
|
236
231
|
"type": "boolean",
|
|
237
|
-
"mutable":
|
|
232
|
+
"mutable": false,
|
|
238
233
|
"complexType": {
|
|
239
234
|
"original": "boolean",
|
|
240
235
|
"resolved": "boolean",
|
|
@@ -252,7 +247,7 @@ export class MgButton {
|
|
|
252
247
|
},
|
|
253
248
|
"form": {
|
|
254
249
|
"type": "string",
|
|
255
|
-
"mutable":
|
|
250
|
+
"mutable": false,
|
|
256
251
|
"complexType": {
|
|
257
252
|
"original": "string",
|
|
258
253
|
"resolved": "string",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
.mg-card {
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
|
+
max-width: var(--mg-card-max-width);
|
|
4
5
|
padding: var(--mg-card-padding, var(--mg-card-padding-default));
|
|
5
6
|
overflow: var(--mg-card-overflow, var(--mg-card-overflow-default));
|
|
6
7
|
box-sizing: border-box;
|
|
@@ -16,4 +17,57 @@
|
|
|
16
17
|
--mg-card-border-radius: var(--mg-card-border-radius-default);
|
|
17
18
|
--mg-card-background: var(--mg-card-background-default);
|
|
18
19
|
--mg-card-box-shadow: var(--mg-card-box-shadow-default);
|
|
20
|
+
--mg-card-max-width: unset;
|
|
21
|
+
}
|
|
22
|
+
.mg-card.mg-card--info {
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
.mg-card.mg-card--info.mg-card--bar-left .mg-card__bar {
|
|
26
|
+
background-color: hsl(var(--color-info-h), var(--color-info-s), var(--color-info-l));
|
|
27
|
+
}
|
|
28
|
+
.mg-card.mg-card--info.mg-card--fill {
|
|
29
|
+
background-color: hsl(var(--color-info-h), var(--color-info-s), var(--mg-color-soft-l));
|
|
30
|
+
}
|
|
31
|
+
.mg-card.mg-card--warning {
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
}
|
|
34
|
+
.mg-card.mg-card--warning.mg-card--bar-left .mg-card__bar {
|
|
35
|
+
background-color: hsl(var(--color-warning-h), var(--color-warning-s), var(--color-warning-l));
|
|
36
|
+
}
|
|
37
|
+
.mg-card.mg-card--warning.mg-card--fill {
|
|
38
|
+
background-color: hsl(var(--color-warning-h), var(--color-warning-s), var(--mg-color-soft-l));
|
|
39
|
+
}
|
|
40
|
+
.mg-card.mg-card--success {
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
}
|
|
43
|
+
.mg-card.mg-card--success.mg-card--bar-left .mg-card__bar {
|
|
44
|
+
background-color: hsl(var(--color-success-h), var(--color-success-s), var(--color-success-l));
|
|
45
|
+
}
|
|
46
|
+
.mg-card.mg-card--success.mg-card--fill {
|
|
47
|
+
background-color: hsl(var(--color-success-h), var(--color-success-s), var(--mg-color-soft-l));
|
|
48
|
+
}
|
|
49
|
+
.mg-card.mg-card--danger {
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
}
|
|
52
|
+
.mg-card.mg-card--danger.mg-card--bar-left .mg-card__bar {
|
|
53
|
+
background-color: hsl(var(--color-danger-h), var(--color-danger-s), var(--color-danger-l));
|
|
54
|
+
}
|
|
55
|
+
.mg-card.mg-card--danger.mg-card--fill {
|
|
56
|
+
background-color: hsl(var(--color-danger-h), var(--color-danger-s), var(--mg-color-soft-l));
|
|
57
|
+
}
|
|
58
|
+
.mg-card.mg-card--app {
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
}
|
|
61
|
+
.mg-card.mg-card--app.mg-card--bar-left .mg-card__bar {
|
|
62
|
+
background-color: hsl(var(--mg-color-app-h), var(--mg-color-app-s), var(--mg-color-app-l));
|
|
63
|
+
}
|
|
64
|
+
.mg-card.mg-card--app.mg-card--fill {
|
|
65
|
+
background-color: hsl(var(--mg-color-app-h), var(--mg-color-app-s), var(--mg-color-soft-l));
|
|
66
|
+
}
|
|
67
|
+
.mg-card__bar {
|
|
68
|
+
position: absolute;
|
|
69
|
+
top: 0;
|
|
70
|
+
left: 0;
|
|
71
|
+
width: 0.3rem;
|
|
72
|
+
height: 100%;
|
|
19
73
|
}
|
|
@@ -1,15 +1,64 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
|
+
import { ClassList } from '../../../utils/components.utils';
|
|
3
|
+
import { variantStyles, variants } from './mg-card.conf';
|
|
2
4
|
export class MgCard {
|
|
5
|
+
constructor() {
|
|
6
|
+
/*************
|
|
7
|
+
* Private *
|
|
8
|
+
*************/
|
|
9
|
+
this.name = 'mg-card';
|
|
10
|
+
this.baseClass = this.name;
|
|
11
|
+
/**
|
|
12
|
+
* Methode to set default varianStyle props
|
|
13
|
+
* needeed has stencil doesn't know that props is mutated when updated in prop watcher
|
|
14
|
+
* @returns {void}
|
|
15
|
+
*/
|
|
16
|
+
this.setDefaultVariantStyle = () => {
|
|
17
|
+
if (this.variantStyle === undefined)
|
|
18
|
+
this.variantStyle = 'bar-left';
|
|
19
|
+
};
|
|
20
|
+
this.variant = undefined;
|
|
21
|
+
this.variantStyle = undefined;
|
|
22
|
+
this.classList = new ClassList([this.baseClass]);
|
|
23
|
+
}
|
|
24
|
+
validateVariant(newValue, oldValue) {
|
|
25
|
+
if (newValue && !variants.includes(newValue))
|
|
26
|
+
throw new Error(`<${this.name}> prop "variant" must match VariantType type.`);
|
|
27
|
+
if (Boolean(newValue)) {
|
|
28
|
+
this.setDefaultVariantStyle();
|
|
29
|
+
this.classList.add(`${this.baseClass}--${newValue}`);
|
|
30
|
+
}
|
|
31
|
+
if (Boolean(oldValue))
|
|
32
|
+
this.classList.delete(`${this.baseClass}--${oldValue}`);
|
|
33
|
+
}
|
|
34
|
+
validateVariantStyle(newValue, oldValue) {
|
|
35
|
+
if (newValue && !variantStyles.includes(newValue))
|
|
36
|
+
throw new Error(`<${this.name}> prop "variantStyle" must match VariantStyleType type.`);
|
|
37
|
+
else if (Boolean(newValue) && !variants.includes(this.variant))
|
|
38
|
+
throw new Error(`<${this.name}> prop "variantStyle" must be paired with ${JSON.stringify(variants)} "variant" prop.`);
|
|
39
|
+
if (Boolean(newValue))
|
|
40
|
+
this.classList.add(`${this.baseClass}--${newValue}`);
|
|
41
|
+
if (Boolean(oldValue))
|
|
42
|
+
this.classList.delete(`${this.baseClass}--${oldValue}`);
|
|
43
|
+
}
|
|
3
44
|
/*************
|
|
4
45
|
* Lifecycle *
|
|
5
46
|
*************/
|
|
47
|
+
/**
|
|
48
|
+
* Check if props are well configured on init
|
|
49
|
+
* @returns {void}
|
|
50
|
+
*/
|
|
51
|
+
componentWillLoad() {
|
|
52
|
+
this.validateVariant(this.variant);
|
|
53
|
+
this.validateVariantStyle(this.variantStyle);
|
|
54
|
+
}
|
|
6
55
|
/**
|
|
7
56
|
* Render
|
|
8
|
-
*
|
|
9
57
|
* @returns {HTMLElement} HTML Element
|
|
10
58
|
*/
|
|
11
59
|
render() {
|
|
12
|
-
|
|
60
|
+
var _a;
|
|
61
|
+
return (h("div", { class: this.classList.join() }, ((_a = this.variantStyle) === null || _a === void 0 ? void 0 : _a.startsWith('bar-')) && h("span", { class: "mg-card__bar" }), h("slot", null)));
|
|
13
62
|
}
|
|
14
63
|
static get is() { return "mg-card"; }
|
|
15
64
|
static get encapsulation() { return "shadow"; }
|
|
@@ -23,4 +72,66 @@ export class MgCard {
|
|
|
23
72
|
"$": ["mg-card.css"]
|
|
24
73
|
};
|
|
25
74
|
}
|
|
75
|
+
static get properties() {
|
|
76
|
+
return {
|
|
77
|
+
"variant": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"mutable": false,
|
|
80
|
+
"complexType": {
|
|
81
|
+
"original": "undefined | VariantType",
|
|
82
|
+
"resolved": "\"app\" | \"danger\" | \"info\" | \"success\" | \"warning\"",
|
|
83
|
+
"references": {
|
|
84
|
+
"VariantType": {
|
|
85
|
+
"location": "import",
|
|
86
|
+
"path": "./mg-card.conf"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "Define variant prop\nDefault: undefined"
|
|
95
|
+
},
|
|
96
|
+
"attribute": "variant",
|
|
97
|
+
"reflect": false
|
|
98
|
+
},
|
|
99
|
+
"variantStyle": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"mutable": true,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "undefined | VariantStyleType",
|
|
104
|
+
"resolved": "\"bar-left\" | \"fill\"",
|
|
105
|
+
"references": {
|
|
106
|
+
"VariantStyleType": {
|
|
107
|
+
"location": "import",
|
|
108
|
+
"path": "./mg-card.conf"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": false,
|
|
113
|
+
"optional": false,
|
|
114
|
+
"docs": {
|
|
115
|
+
"tags": [],
|
|
116
|
+
"text": "Define variantStyle prop\nDefault: undefined"
|
|
117
|
+
},
|
|
118
|
+
"attribute": "variant-style",
|
|
119
|
+
"reflect": false
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
static get states() {
|
|
124
|
+
return {
|
|
125
|
+
"classList": {}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
static get watchers() {
|
|
129
|
+
return [{
|
|
130
|
+
"propName": "variant",
|
|
131
|
+
"methodName": "validateVariant"
|
|
132
|
+
}, {
|
|
133
|
+
"propName": "variantStyle",
|
|
134
|
+
"methodName": "validateVariantStyle"
|
|
135
|
+
}];
|
|
136
|
+
}
|
|
26
137
|
}
|
|
@@ -16,7 +16,6 @@ export class MgCharacterLeft {
|
|
|
16
16
|
*************/
|
|
17
17
|
/**
|
|
18
18
|
* Check if props are well configured on init
|
|
19
|
-
*
|
|
20
19
|
* @returns {void}
|
|
21
20
|
*/
|
|
22
21
|
componentWillLoad() {
|
|
@@ -25,7 +24,6 @@ export class MgCharacterLeft {
|
|
|
25
24
|
}
|
|
26
25
|
/**
|
|
27
26
|
* Render component
|
|
28
|
-
*
|
|
29
27
|
* @returns {HTMLElement} HTML Element
|
|
30
28
|
*/
|
|
31
29
|
render() {
|
|
@@ -72,7 +72,11 @@ export const icons = {
|
|
|
72
72
|
'ellipsis-vertical': () => (h("path", { fill: "currentColor", d: "M6.17 13.5A1.83 1.83 0 1 0 8 11.67c-1.01 0-1.83.82-1.83 1.83Zm0-11A1.83 1.83 0 1 0 8 .67c-1.01 0-1.83.82-1.83 1.83Zm0 5.5A1.83 1.83 0 1 0 8 6.17c-1.01 0-1.83.82-1.83 1.83Z" })),
|
|
73
73
|
'euro': () => (h("path", { fill: "currentColor", d: "m12.1 11.02 1.4 1.42a5.948 5.948 0 0 1-4 1.56c-2.64 0-4.86-1.68-5.66-4.04H1.5v-1.5h2.02C3.5 8.3 3.5 8.16 3.5 8c0-.18 0-.36.04-.54H1.5v-1.5h2.38C4.7 3.66 6.9 2 9.5 2c1.54 0 2.94.6 4 1.56l-1.4 1.42c-.7-.6-1.6-.98-2.6-.98-1.46 0-2.74.78-3.44 1.96h3.5v1.5H5.54c-.02.18-.04.36-.04.54 0 .16 0 .32.02.46h4.04v1.5H6.02C6.7 11.18 8.02 12 9.5 12c1 0 1.9-.38 2.6-.98Z" })),
|
|
74
74
|
'euro-circle': () => (h("path", { fill: "currentColor", d: "M8 .67C3.95.67.67 3.95.67 8S3.95 15.33 8 15.33s7.33-3.28 7.33-7.33S12.05.67 8 .67Zm2.27 11.4c-.38.09-.76.14-1.15.14a4.038 4.038 0 0 1-3.99-2.92h-.58c-.13 0-.23-.1-.23-.22v-.54c0-.12.11-.22.23-.22h.41a5.34 5.34 0 0 1 0-.8h-.41c-.13 0-.23-.1-.23-.22v-.58c0-.13.11-.22.23-.22h.63c.6-1.65 2.18-2.74 3.94-2.71.34 0 .68.03 1.02.1.12.03.19.16.16.28l-.23.84c-.03.12-.15.19-.27.17-.24-.05-.48-.08-.73-.08A2.42 2.42 0 0 0 6.81 6.5h2.71c.12.03.2.15.17.27l-.13.58c-.02.1-.12.18-.22.18H6.52c-.03.26-.03.53 0 .8h2.63c.12.03.2.15.17.27l-.11.52c-.03.1-.12.18-.22.18H6.8c.36.96 1.28 1.6 2.31 1.61.3 0 .59-.04.88-.1.12-.02.24.05.27.18l.17.84c.02.12-.05.24-.17.27v-.03Z" })),
|
|
75
|
-
'exclamation-circle': () => (h("path", { fill: "currentColor", d: "M8
|
|
75
|
+
'exclamation-circle': () => (h("path", { fill: "currentColor", stroke: "currentColor", d: "M8.75 9.5h.5v-6h-2.5v6h2Zm.5 1V10h-2.5v2.5h2.5v-2ZM1.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" })),
|
|
76
|
+
'exclamation-circle-outline': () => [
|
|
77
|
+
h("path", { fill: "currentColor", key: "exclamation-circle-outline-1", d: "M8.75 4v5h-1.5V4h1.5ZM8.75 12v-1.5h-1.5V12h1.5Z" }),
|
|
78
|
+
h("path", { fill: "currentColor", key: "exclamation-circle-outline-2", "fill-rule": "evenodd", d: "M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1ZM2 8a6 6 0 1 0 12 0A6 6 0 0 0 2 8Z" }),
|
|
79
|
+
],
|
|
76
80
|
'exclamation-stamp': () => (h("path", { fill: "currentColor", d: "m15 8-1.55-1.86.22-2.46-2.3-.55L10.17 1 8 1.98 5.84 1 4.63 3.13l-2.29.54.22 2.46L1.01 8l1.55 1.86-.22 2.47 2.3.55 1.2 2.13L8 14.03l2.17.98 1.2-2.13 2.3-.55-.22-2.46L15 8.01Zm-6.36 3.35H7.36v-1.34h1.28v1.34Zm0-2.67H7.36V4.67h1.28v4.01Z" })),
|
|
77
81
|
'exclamation-triangle': () => (h("path", { fill: "currentColor", d: "m14.3 13.88-6-12a.32.32 0 0 0-.41-.15.31.31 0 0 0-.15.15l-6 12a.31.31 0 0 0 .14.42.32.32 0 0 0 .14 0H14a.31.31 0 0 0 .33-.29.23.23 0 0 0-.03-.13ZM7 6a.28.28 0 0 1 .28-.28h1.46A.28.28 0 0 1 9 6v4a.29.29 0 0 1-.28.29H7.3A.29.29 0 0 1 7 10Zm2 7a.31.31 0 0 1-.31.32H7.34A.32.32 0 0 1 7 13v-1.37a.31.31 0 0 1 .32-.31h1.39a.31.31 0 0 1 .31.31Z" })),
|
|
78
82
|
'eye': () => [
|
|
@@ -92,14 +96,37 @@ export const icons = {
|
|
|
92
96
|
h("path", { key: "file-download-1", fill: "currentColor", d: "M13.12 3.67 10.41.87a.63.63 0 0 0-.47-.2h-.17v3.66h3.54v-.17a.69.69 0 0 0-.19-.49Z" }),
|
|
93
97
|
h("path", { key: "file-download-2", fill: "currentColor", d: "M13.31 14.65v-9.4H9.55a.67.67 0 0 1-.66-.68V.67H3.35a.67.67 0 0 0-.66.66v13.32a.67.67 0 0 0 .66.68h9.3a.67.67 0 0 0 .66-.66Zm-2.91-4.24-2.54 2.53a.18.18 0 0 1-.26 0l-2.54-2.53a.2.2 0 0 1-.06-.15.18.18 0 0 1 .19-.18h1.34a.2.2 0 0 0 .2-.2V7.27a.19.19 0 0 1 .19-.18h1.63a.18.18 0 0 1 .18.19v2.6a.2.2 0 0 0 .2.2h1.34a.16.16 0 0 1 .14.06.19.19 0 0 1-.01.27Z" }),
|
|
94
98
|
],
|
|
95
|
-
'file-excel': () =>
|
|
96
|
-
|
|
99
|
+
'file-excel': () => [
|
|
100
|
+
h("path", { key: "file-excel-1", fill: "currentColor", "fill-rule": "evenodd", d: "M9 5V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V5H9Zm-.018 7h1.335L8.776 9.48l1.5-2.48H9.02l-.795 1.485a5.09 5.09 0 0 0-.157.436h-.014a2.59 2.59 0 0 0-.15-.422L7.19 7H5.82l1.457 2.5L5.683 12h1.342l.865-1.614c.06-.156.099-.272.115-.349h.014c.035.163.069.274.101.335L8.982 12Z" }),
|
|
101
|
+
h("path", { key: "file-excel-2", fill: "currentColor", d: "M10 4V1l3 3h-3Z" }),
|
|
102
|
+
],
|
|
103
|
+
'file-excel-outline': () => [
|
|
104
|
+
h("path", { fill: "currentColor", key: "file-excel-outline-1", d: "M8.982 12h1.335L8.776 9.48l1.5-2.48H9.02l-.795 1.485a5.09 5.09 0 0 0-.157.436h-.014a2.59 2.59 0 0 0-.15-.422L7.19 7H5.82l1.457 2.5L5.683 12h1.342l.865-1.614c.06-.156.099-.272.115-.349h.014c.035.163.069.274.101.335L8.982 12Z" }),
|
|
105
|
+
h("path", { fill: "currentColor", key: "file-excel-outline-2", d: "M4 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4l-3-3H4Zm6 3V2.537L11.254 4H10Zm2 1v9H4V2h5v3h3Z" }),
|
|
106
|
+
],
|
|
107
|
+
'file-pdf': () => [
|
|
108
|
+
h("path", { fill: "currentColor", key: "file-pdf-1", d: "M6.464 11.274a3.81 3.81 0 0 0-.393.207c-.223.137-.37.27-.444.387-.072.11-.073.19-.03.273a.175.175 0 0 0 .019.034.223.223 0 0 0 .027-.01c.103-.042.268-.177.48-.433.12-.147.234-.3.34-.458ZM7.706 10.267c.252-.06.507-.108.764-.146a8.824 8.824 0 0 1-.386-.65 15.7 15.7 0 0 1-.378.796ZM9.579 10.63a2.916 2.916 0 0 0 .341.314c.164.123.28.165.344.168a.082.082 0 0 0 .053-.012.232.232 0 0 0 .07-.094.33.33 0 0 0 .045-.152.072.072 0 0 0-.02-.047c-.039-.047-.15-.116-.391-.159a2.926 2.926 0 0 0-.463-.04l.02.022ZM8.051 7.952c.064-.205.114-.414.151-.626.024-.142.033-.26.029-.352a.464.464 0 0 0-.024-.15.391.391 0 0 0-.11.03c-.066.027-.12.08-.148.215a.744.744 0 0 0-.01.057c-.018.142-.006.331.044.565.018.084.041.171.068.26Z" }),
|
|
109
|
+
h("path", { fill: "currentColor", key: "file-pdf-2", "fill-rule": "evenodd", d: "M9 1v4h4v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5ZM5.42 12.713a.613.613 0 0 1-.332-.318c-.147-.294-.098-.588.06-.834.15-.233.4-.43.68-.596a5.816 5.816 0 0 1 1.122-.489c.303-.544.571-1.107.804-1.686a5.554 5.554 0 0 1-.326-.98c-.065-.303-.09-.603-.034-.86.056-.268.207-.509.492-.623l.055-.02a.75.75 0 0 1 .4-.038.53.53 0 0 1 .362.276c.066.124.09.27.096.407.005.142-.01.3-.036.465-.063.386-.204.859-.394 1.358.21.447.458.874.742 1.277a4.457 4.457 0 0 1 1.01.038c.276.049.556.147.727.352a.64.64 0 0 1 .151.392.88.88 0 0 1-.104.426.788.788 0 0 1-.312.341.647.647 0 0 1-.342.078c-.25-.01-.495-.148-.706-.315a4.327 4.327 0 0 1-.69-.72 8.812 8.812 0 0 0-1.512.308 8.57 8.57 0 0 1-.773 1.143c-.22.265-.46.496-.701.596a.6.6 0 0 1-.44.022Z" }),
|
|
110
|
+
h("path", { fill: "currentColor", key: "file-pdf-3", d: "M10 1v3h3l-3-3Z" }),
|
|
111
|
+
],
|
|
112
|
+
'file-pdf-outline': () => [
|
|
113
|
+
h("path", { fill: "currentColor", key: "file-pdf-outline-1", d: "M5.42 12.713a.613.613 0 0 1-.332-.318c-.147-.294-.098-.588.06-.834.15-.233.4-.43.68-.596a5.816 5.816 0 0 1 1.122-.489c.303-.544.571-1.107.804-1.686a5.503 5.503 0 0 1-.326-.98c-.065-.303-.09-.603-.034-.86.056-.268.207-.509.492-.623.145-.058.303-.09.455-.058a.53.53 0 0 1 .362.276c.066.124.09.27.096.407.005.142-.01.3-.036.465-.063.386-.204.859-.394 1.358.21.447.458.874.742 1.277a4.354 4.354 0 0 1 1.01.038c.276.049.556.147.727.352a.64.64 0 0 1 .151.392.88.88 0 0 1-.104.426.788.788 0 0 1-.268.315.648.648 0 0 1-.386.104c-.25-.01-.495-.148-.706-.315a4.324 4.324 0 0 1-.69-.72 8.812 8.812 0 0 0-1.512.308 8.57 8.57 0 0 1-.773 1.143c-.22.265-.46.496-.701.596a.6.6 0 0 1-.44.022Zm1.044-1.44a3.81 3.81 0 0 0-.348.18c-.248.148-.41.29-.49.415-.07.11-.072.19-.03.273a.175.175 0 0 0 .02.034.223.223 0 0 0 .027-.01c.103-.042.268-.177.48-.433.12-.147.234-.3.34-.458Zm1.242-1.006c.252-.06.507-.108.764-.146a8.824 8.824 0 0 1-.386-.65 15.7 15.7 0 0 1-.378.796Zm2.18.65a2.971 2.971 0 0 1-.328-.309c.155.001.31.015.463.04.24.043.352.112.392.159.012.012.02.03.02.047a.33.33 0 0 1-.045.152.232.232 0 0 1-.071.094.082.082 0 0 1-.053.012c-.07-.003-.196-.05-.377-.194Zm-1.684-3.59c-.037.21-.087.42-.15.625a3.355 3.355 0 0 1-.069-.26c-.057-.268-.065-.478-.034-.623.028-.134.082-.188.148-.214a.391.391 0 0 1 .11-.03.464.464 0 0 1 .024.15c.004.092-.005.209-.029.351Z" }),
|
|
114
|
+
h("path", { fill: "currentColor", key: "file-pdf-outline-2", d: "M3 2a1 1 0 0 1 1-1h6l3 3v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2Zm7 .537V4h1.254L10 2.537ZM12 14V5H9V2H4v12h8Z" }),
|
|
115
|
+
],
|
|
97
116
|
'file-text': () => (h("path", { fill: "currentColor", d: "M8.89 4.56V.67H3.35c-.36 0-.66.3-.66.66v13.32c0 .37.29.67.66.68h9.3c.36 0 .66-.3.66-.66V5.25H9.55c-.37 0-.67-.31-.66-.68Zm1.77 6.75c0 .19-.15.34-.34.35H5.68c-.19 0-.34-.16-.34-.35v-.23c0-.19.15-.34.34-.34h4.64c.19 0 .34.15.34.34v.23Zm0-1.83c0 .19-.15.34-.34.34H5.68c-.19 0-.34-.15-.34-.34v-.23c0-.19.15-.34.34-.34h4.64c.19 0 .34.15.34.34v.23Zm0-2.06v.23c0 .19-.15.34-.34.34H5.68c-.19 0-.34-.15-.34-.34v-.23c0-.19.15-.34.34-.35h4.64c.19 0 .34.16.34.35Zm2.65-3.27v.17H9.77V.67h.17c.18 0 .35.07.47.2l2.71 2.8c.13.13.19.31.19.49Z" })),
|
|
98
117
|
'file-text-outline': () => (h("path", { fill: "currentColor", d: "M10.31 10.74H5.69c-.2 0-.36.16-.36.35v.22c0 .19.16.35.36.35h4.62c.2 0 .36-.16.36-.35v-.22c0-.19-.16-.35-.36-.35Zm0-1.84H5.69c-.2 0-.36.16-.36.36v.21c0 .2.16.35.36.35h4.62c.2 0 .36-.15.36-.35v-.21c0-.2-.16-.36-.36-.36Zm0-1.83H5.69c-.2 0-.36.16-.36.35v.22c0 .19.16.35.36.35h4.62c.2 0 .36-.16.36-.35v-.22c0-.19-.16-.35-.36-.35Zm0 3.67H5.69c-.2 0-.36.16-.36.35v.22c0 .19.16.35.36.35h4.62c.2 0 .36-.16.36-.35v-.22c0-.19-.16-.35-.36-.35Zm0-1.84H5.69c-.2 0-.36.16-.36.36v.21c0 .2.16.35.36.35h4.62c.2 0 .36-.15.36-.35v-.21c0-.2-.16-.36-.36-.36Zm0-1.83H5.69c-.2 0-.36.16-.36.35v.22c0 .19.16.35.36.35h4.62c.2 0 .36-.16.36-.35v-.22c0-.19-.16-.35-.36-.35Zm2.76-2.64L9.69.92A.8.8 0 0 0 9.1.67H3.35c-.36 0-.66.3-.66.66v13.32c0 .37.29.67.66.68h9.3c.36 0 .66-.3.66-.66V5.05c0-.23-.07-.45-.24-.62Zm-.76 9.9H3.69V1.67h5.2v2.75c0 .46.37.83.83.83h2.59v9.08Z" })),
|
|
99
118
|
'file-upload': () => [
|
|
100
119
|
h("path", { key: "file-upload-1", fill: "currentColor", d: "M13.1 3.7 10.4.9c-.1-.1-.3-.2-.5-.2h-.1v3.7h3.5v-.2c0-.2-.1-.4-.2-.5z" }),
|
|
101
120
|
h("path", { key: "file-upload-2", fill: "currentColor", d: "M13.3 14.6V5.3H9.6c-.4 0-.7-.3-.7-.7V.7H3.3c-.3 0-.6.3-.6.6v13.3c0 .4.3.7.7.7h9.3c.3 0 .6-.3.6-.7zm-3-4.6H8.9c-.1 0-.2.1-.2.2v2.6c0 .1-.1.2-.2.2H6.9c-.1 0-.2-.1-.2-.2v-2.6c0-.1-.1-.2-.2-.2H5.1C5 9.9 5 9.8 5 9.7l2.5-2.6c.1-.1.2-.1.3 0l2.5 2.5.1.1c.1.2 0 .3-.1.3z" }),
|
|
102
121
|
],
|
|
122
|
+
'file-word': () => [
|
|
123
|
+
h("path", { fill: "currentColor", "fill-rule": "evenodd", key: "file-word-1", d: "M9 5V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V5H9ZM5 7l1.091 5h1.002L8 8.262 8.91 12h.98L11 7h-.93l-.701 3.492L8.568 7H7.47l-.836 3.434L5.944 7H5Z" }),
|
|
124
|
+
h("path", { fill: "currentColor", key: "file-word-2", d: "M10 4V1l3 3h-3Z" }),
|
|
125
|
+
],
|
|
126
|
+
'file-word-outline': () => [
|
|
127
|
+
h("path", { fill: "currentColor", d: "m5 7 1.091 5h1.002L8 8.262 8.91 12h.98L11 7h-.93l-.701 3.492L8.568 7H7.47l-.836 3.434L5.944 7H5Z" }),
|
|
128
|
+
h("path", { fill: "currentColor", d: "M4 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4l-3-3H4Zm6 3V2.537L11.254 4H10Zm2 1v9H4V2h5v3h3Z" }),
|
|
129
|
+
],
|
|
103
130
|
'filter': () => (h("path", { fill: "currentColor", d: "M13.74 1.66H2.26a.6.6 0 0 0-.59.6.59.59 0 0 0 .17.42l4.58 4.58v5.1a.58.58 0 0 0 .25.48l2 1.39a.6.6 0 0 0 .83-.15.59.59 0 0 0 .1-.34V7.26l4.58-4.58a.6.6 0 0 0 0-.84.64.64 0 0 0-.44-.18Z" })),
|
|
104
131
|
'floppy-disk': () => (h("path", { fill: "currentColor", d: "m13.93 4.44-2.37-2.37c-.25-.25-.6-.4-.96-.4H3.03c-.75 0-1.36.61-1.36 1.36v9.94c0 .75.61 1.36 1.36 1.36h9.94c.75 0 1.36-.61 1.36-1.36V5.4c0-.36-.14-.7-.4-.96ZM8 12.52A1.81 1.81 0 1 1 8 8.9a1.81 1.81 0 0 1 0 3.62Zm2.71-5.77c0 .09-.04.18-.1.24a.35.35 0 0 1-.24.1H3.82c-.19 0-.34-.15-.34-.34V3.82c0-.19.15-.34.34-.34h6.55c.19 0 .34.15.34.34v2.93Z" })),
|
|
105
132
|
'folder': () => (h("path", { fill: "currentColor", d: "M14 4.44H8.46L6.62 2.67H2C1.27 2.67.68 3.27.67 4v8c0 .73.6 1.32 1.33 1.33h12c.73 0 1.32-.6 1.33-1.33V5.78c0-.73-.6-1.33-1.33-1.34Z" })),
|
|
@@ -179,8 +206,8 @@ export const icons = {
|
|
|
179
206
|
'user': () => (h("path", { fill: "currentColor", d: "M8 8.79a3.56 3.56 0 1 0-3.56-3.56A3.56 3.56 0 0 0 8 8.79Zm3.17.79H9.8a4.27 4.27 0 0 1-3.6 0H4.83a3.16 3.16 0 0 0-3.16 3.17v.4a1.18 1.18 0 0 0 1.18 1.18h10.3a1.18 1.18 0 0 0 1.18-1.18v-.4a3.16 3.16 0 0 0-3.16-3.17Z" })),
|
|
180
207
|
'user-circle': () => (h("path", { fill: "currentColor", d: "M8 .62C3.95.61.66 3.9.65 7.95c0 4.05 3.28 7.34 7.33 7.35 4.04 0 7.33-3.26 7.35-7.3.02-4.05-3.25-7.36-7.3-7.38H8Zm0 .75c3.64 0 6.59 2.96 6.58 6.6V8c0 1.35-.41 2.66-1.19 3.76a2.713 2.713 0 0 0-2.66-2.37H9.54c-.98.46-2.1.46-3.08 0H5.28c-1.36 0-2.5 1.02-2.67 2.37A6.483 6.483 0 0 1 1.42 8a6.59 6.59 0 0 1 6.55-6.63H8ZM5 5.63c0-1.68 1.37-3.05 3.05-3.05 1.68 0 3.05 1.37 3.05 3.05 0 1.68-1.37 3.05-3.05 3.05H8c-1.66-.03-3-1.39-3-3.05Z" })),
|
|
181
208
|
'user-pen-fancy-outline': () => [
|
|
182
|
-
h("path", { fill: "currentColor", d: "M7.5 7a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5Zm0-4C6.67 3 6 3.67 6 4.5S6.67 6 7.5 6 9 5.33 9 4.5 8.33 3 7.5 3ZM11.12 11.46l-.22.54-.3.77s-.04.09-.06.13c-.03.04-.06.07-.1.1-.05.04-.1.07-.16.08L7.52 14l-.07-.07 1.45-1.45h.13c.15 0 .27-.06.36-.16a.56.56 0 0 0 .1-.15c.01-.02.02-.04.03-.07v-.02s.01-.05.01-.08v-.03c0-.28-.23-.5-.51-.5-.28.01-.5.24-.5.51v.14l-.76.75-.14.13-.55.55-.07-.07.16-.48.1-.29.24-.71.42-1.27c.05-.16.17-.28.32-.32l1.31-.52 1.57 1.57ZM14.56 8.22l-2.05 1.87-.7.64-.06.05-.32.29-1.52-1.52.28-.31.06-.06.64-.7 1.88-2.04c1.16-1.31 3.11.61 1.79 1.78Z" }),
|
|
183
|
-
h("path", { fill: "currentColor", d: "M9 8H6c-2.21 0-4 1.79-4 4 0 .55.45 1 1 1h3.11l.33-1H3c0-1.66 1.34-3 3-3h3.05l.12-.13.71-.77C9.6 8.03 9.3 8 9 8Z" }),
|
|
209
|
+
h("path", { fill: "currentColor", key: "user-pen-fancy-outline-1", d: "M7.5 7a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5Zm0-4C6.67 3 6 3.67 6 4.5S6.67 6 7.5 6 9 5.33 9 4.5 8.33 3 7.5 3ZM11.12 11.46l-.22.54-.3.77s-.04.09-.06.13c-.03.04-.06.07-.1.1-.05.04-.1.07-.16.08L7.52 14l-.07-.07 1.45-1.45h.13c.15 0 .27-.06.36-.16a.56.56 0 0 0 .1-.15c.01-.02.02-.04.03-.07v-.02s.01-.05.01-.08v-.03c0-.28-.23-.5-.51-.5-.28.01-.5.24-.5.51v.14l-.76.75-.14.13-.55.55-.07-.07.16-.48.1-.29.24-.71.42-1.27c.05-.16.17-.28.32-.32l1.31-.52 1.57 1.57ZM14.56 8.22l-2.05 1.87-.7.64-.06.05-.32.29-1.52-1.52.28-.31.06-.06.64-.7 1.88-2.04c1.16-1.31 3.11.61 1.79 1.78Z" }),
|
|
210
|
+
h("path", { fill: "currentColor", key: "user-pen-fancy-outline-2", d: "M9 8H6c-2.21 0-4 1.79-4 4 0 .55.45 1 1 1h3.11l.33-1H3c0-1.66 1.34-3 3-3h3.05l.12-.13.71-.77C9.6 8.03 9.3 8 9 8Z" }),
|
|
184
211
|
],
|
|
185
212
|
'user-group': () => (h("path", { fill: "currentColor", d: "M13.15 4.12c-.81-.01-1.47.65-1.48 1.46 0 .82.65 1.47 1.46 1.48s1.47-.65 1.48-1.46-.65-1.47-1.46-1.48Zm-10.04.01a1.47 1.47 0 0 0-1.58 1.59c.06.71.62 1.28 1.34 1.34.81.07 1.52-.53 1.59-1.34.06-.81-.54-1.52-1.35-1.59Zm7.36.39c-.22-.84-.87-1.51-1.71-1.75-1.36-.41-2.8.36-3.22 1.72-.18.61-.13 1.27.14 1.85.41.9 1.33 1.48 2.32 1.45 1.41.01 2.56-1.14 2.57-2.55 0-.24-.03-.49-.1-.72Zm-.71 4h-.19c-.99.49-2.14.49-3.13 0h-.19c-1.46 0-2.64 1.18-2.64 2.64v2.69c1.23.93 2.74 1.47 4.39 1.47s3.17-.55 4.4-1.48v-2.68c0-1.46-1.18-2.64-2.64-2.64Zm5.52.25a7.282 7.282 0 0 1-1.65 3.91c-.08.1-.16.19-.25.28-.08.09-.17.18-.25.27v-.55h.03v-.72s.01-.07 0-.1v-.66c.01-1.25-.66-2.4-1.76-3 .27-.26.63-.41 1-.41h1.51c.63.01 1.17.41 1.37.98ZM2.86 11.16v1.52h.01v.55l-.28-.31c-.08-.08-.15-.16-.22-.24A7.238 7.238 0 0 1 .74 8.86c.16-.62.72-1.07 1.4-1.07h1.47c.37-.01.73.12 1.01.37-1.1.6-1.77 1.75-1.76 3Z" })),
|
|
186
213
|
'user-plus': () => (h("path", { fill: "currentColor", d: "M14,3.33H12.65V2a.36.36,0,0,0-.35-.33h-.65A.36.36,0,0,0,11.3,2V3.33H10a.34.34,0,0,0-.33.34v.66a.34.34,0,0,0,.33.34H11.3V6a.37.37,0,0,0,.35.33h.65A.37.37,0,0,0,12.65,6V4.67H14a.34.34,0,0,0,.32-.34V3.67A.34.34,0,0,0,14,3.33ZM9.28,9.77h-.2a5.19,5.19,0,0,1-3.91,0H5A3,3,0,0,0,1.7,12.46h0v.72A1.27,1.27,0,0,0,3,14.33h8.25a1.26,1.26,0,0,0,1.36-1.14v-.68A3,3,0,0,0,9.37,9.76H9.28ZM7.13,3.7A2.64,2.64,0,1,1,4.5,6.34h0A2.64,2.64,0,0,1,7.13,3.7Z" })),
|
|
@@ -192,8 +219,12 @@ export const icons = {
|
|
|
192
219
|
/**
|
|
193
220
|
* List of all possibles sizes
|
|
194
221
|
*/
|
|
195
|
-
export const sizes = ['small', 'regular', 'large', 'extra-large'];
|
|
222
|
+
export const sizes = ['small', 'regular', 'medium', 'large', 'extra-large'];
|
|
196
223
|
/**
|
|
197
224
|
* List of all possibles variants
|
|
198
225
|
*/
|
|
199
|
-
export const variants = ['success', 'warning', 'danger', 'info'];
|
|
226
|
+
export const variants = ['success', 'warning', 'danger', 'info', 'app'];
|
|
227
|
+
/**
|
|
228
|
+
* List of all possibles variants styles
|
|
229
|
+
*/
|
|
230
|
+
export const variantStyles = ['icon', 'background', 'full'];
|