@mgdis/mg-components 6.16.0 → 6.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-T3-qWqFE.js → index-DCZEYvlH.js} +51 -28
- package/dist/cjs/{index-YM1EJx9X.js → index-TUElr4Wv.js} +10 -10
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_37.cjs.entry.js +443 -228
- package/dist/cjs/mg-alert.cjs.entry.js +3 -3
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-fieldset.cjs.entry.js +141 -0
- package/dist/cjs/mg-input-combobox.cjs.entry.js +73 -57
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +36 -23
- package/dist/cjs/{mg-input.conf-WTsvDfpC.js → mg-input.conf-HYIzRsy7.js} +5 -0
- package/dist/cjs/mg-loader.cjs.entry.js +3 -3
- package/dist/cjs/mg-progress.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +5 -5
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +7 -7
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +6 -6
- package/dist/collection/components/atoms/mg-button/mg-button.js +13 -13
- package/dist/collection/components/atoms/mg-card/mg-card.js +2 -2
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +32 -26
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +3 -3
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +2 -2
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +6 -6
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.conf.js +4 -0
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +193 -33
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +7 -9
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +65 -46
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +106 -86
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +67 -65
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +71 -66
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +56 -38
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +53 -35
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +66 -47
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +58 -40
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +77 -59
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +63 -45
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +54 -30
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +2 -4
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +9 -6
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +7 -7
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +2 -5
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +5 -5
- package/dist/collection/components/molecules/mg-details/mg-details.js +7 -7
- package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +404 -0
- package/dist/collection/components/molecules/mg-form/mg-form.js +26 -17
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +3 -3
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +4 -4
- package/dist/collection/components/molecules/mg-message/mg-message.js +4 -4
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +8 -8
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +7 -8
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +53 -22
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +2 -2
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +7 -7
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +7 -7
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +1 -2
- package/dist/collection/components/molecules/mg-table/mg-table.js +2 -3
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +7 -8
- package/dist/collection/locales/en/messages.json +5 -5
- package/dist/collection/locales/fr/messages.json +5 -5
- package/dist/components/index3.js +10 -10
- package/dist/components/mg-action-more.js +5 -3
- package/dist/components/mg-alert.js +5 -3
- package/dist/components/mg-badge2.js +4 -2
- package/dist/components/mg-button2.js +4 -2
- package/dist/components/mg-card2.js +4 -2
- package/dist/components/mg-character-left2.js +4 -2
- package/dist/components/mg-details.js +5 -3
- package/dist/components/mg-divider2.js +4 -2
- package/dist/components/mg-fieldset.d.ts +11 -0
- package/dist/components/mg-fieldset.js +209 -0
- package/dist/components/mg-form.js +8 -5
- package/dist/components/mg-icon2.js +29 -21
- package/dist/components/mg-illustrated-message.js +5 -3
- package/dist/components/mg-input-checkbox-paginated2.js +6 -6
- package/dist/components/mg-input-checkbox.js +32 -17
- package/dist/components/mg-input-combobox.js +75 -57
- package/dist/components/mg-input-date.js +39 -42
- package/dist/components/mg-input-numeric.js +30 -30
- package/dist/components/mg-input-password.js +26 -13
- package/dist/components/mg-input-radio.js +27 -13
- package/dist/components/mg-input-rich-text-editor.js +37 -22
- package/dist/components/mg-input-select2.js +28 -14
- package/dist/components/mg-input-text2.js +40 -26
- package/dist/components/mg-input-textarea.js +27 -14
- package/dist/components/mg-input-title2.js +4 -2
- package/dist/components/mg-input-toggle.js +39 -12
- package/dist/components/mg-input2.js +121 -20
- package/dist/components/mg-item-more2.js +13 -5
- package/dist/components/mg-loader2.js +5 -3
- package/dist/components/mg-menu-item2.js +4 -2
- package/dist/components/mg-message2.js +6 -4
- package/dist/components/mg-modal.js +6 -4
- package/dist/components/mg-pagination.js +4 -2
- package/dist/components/mg-panel.js +40 -9
- package/dist/components/mg-popover-content2.js +5 -3
- package/dist/components/mg-popover2.js +5 -3
- package/dist/components/mg-progress.js +5 -3
- package/dist/components/mg-skip-links.js +5 -3
- package/dist/components/mg-table.js +4 -2
- package/dist/components/mg-tabs2.js +5 -3
- package/dist/components/mg-tag.js +4 -2
- package/dist/components/mg-tooltip-content2.js +4 -2
- package/dist/components/mg-tooltip2.js +4 -2
- package/dist/esm/{index-WtiuOkLj.js → index-C7xjtdiw.js} +1 -1
- package/dist/esm/{index-Bab8_u8S.js → index-CNX6lq0x.js} +10 -10
- package/dist/esm/{index-JHj_9FSs.js → index-T6kOJXP1.js} +51 -28
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_37.entry.js +444 -229
- package/dist/esm/mg-alert.entry.js +4 -4
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-fieldset.entry.js +139 -0
- package/dist/esm/mg-input-combobox.entry.js +74 -58
- package/dist/esm/mg-input-rich-text-editor.entry.js +37 -24
- package/dist/esm/{mg-input.conf-CNgv8hc5.js → mg-input.conf-D9V2v4n2.js} +5 -1
- package/dist/esm/mg-loader.entry.js +4 -4
- package/dist/esm/mg-progress.entry.js +3 -3
- package/dist/mg-components/locales/en/messages.json +5 -5
- package/dist/mg-components/locales/fr/messages.json +5 -5
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-2bab89c2.entry.js +1 -0
- package/dist/mg-components/{p-658f828c.entry.js → p-5abc77cd.entry.js} +1 -1
- package/dist/mg-components/p-7d2e43b2.entry.js +1 -0
- package/dist/mg-components/{p-c85b5d10.entry.js → p-92e5e5a6.entry.js} +1 -1
- package/dist/mg-components/{p-42a90251.entry.js → p-952288bd.entry.js} +1 -1
- package/dist/mg-components/{p-WtiuOkLj.js → p-C7xjtdiw.js} +1 -1
- package/dist/mg-components/p-CNX6lq0x.js +1 -0
- package/dist/mg-components/p-D9V2v4n2.js +1 -0
- package/dist/mg-components/p-T6kOJXP1.js +2 -0
- package/dist/mg-components/p-f2cddd52.entry.js +1 -0
- package/dist/mg-components/{p-82455ac7.entry.js → p-f6afaeb8.entry.js} +1 -1
- package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +1 -1
- package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +0 -5
- package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +5 -0
- package/dist/types/components/molecules/inputs/mg-input/mg-input.d.ts +32 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +4 -3
- package/dist/types/components/molecules/inputs/mg-input-combobox/mg-input-combobox.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-date/mg-input-date.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-password/mg-input-password.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-text/mg-input-text.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +4 -2
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.d.ts +4 -2
- package/dist/types/components/molecules/mg-fieldset/mg-fieldset.d.ts +105 -0
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -1
- package/dist/types/components/molecules/mg-panel/mg-panel.d.ts +8 -1
- package/dist/types/components.d.ts +168 -18
- package/dist/types/stencil-public-runtime.d.ts +39 -2
- package/dist/types/types/index.d.ts +1 -1
- package/ide/intellij/web-types.json +289 -181
- package/ide/vscode/html-custom-data.json +259 -18
- package/package.json +23 -23
- package/dist/mg-components/p-54156253.entry.js +0 -1
- package/dist/mg-components/p-Bab8_u8S.js +0 -1
- package/dist/mg-components/p-CNgv8hc5.js +0 -1
- package/dist/mg-components/p-JHj_9FSs.js +0 -2
- package/dist/mg-components/p-abbd151c.entry.js +0 -1
|
@@ -13,17 +13,23 @@ const widths = [2, 4, 16, 'full'];
|
|
|
13
13
|
* Possible tootltip postions
|
|
14
14
|
*/
|
|
15
15
|
const tooltipPositions = ['input', 'label'];
|
|
16
|
+
/**
|
|
17
|
+
* Possible label headings
|
|
18
|
+
*/
|
|
19
|
+
const labelHeadings = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
16
20
|
const classFieldset = 'mg-c-input--fieldset';
|
|
17
21
|
const classDisabled = 'mg-c-input--disabled';
|
|
18
22
|
const classReadonly = 'mg-c-input--readonly';
|
|
19
23
|
const classVerticalList = 'mg-c-input--vertical-list';
|
|
20
24
|
|
|
21
|
-
const mgInputCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}/*!\n * @prop --mg-c-input-border-width: Defines the width of the input border. Default value is `--mg-b-size-border`.\n * @prop --mg-c-input-border-radius: Defines the border radius of the input. Default value is `--mg-b-size-radius`.\n * @prop --mg-c-input-color-border: Defines the color of the input border. Default value is `rgb(181, 194, 201)`.\n * @prop --mg-c-input-placeholder-color-text: Defines the color of the placeholder text. Default value is `rgb(181, 194, 201)`.\n * @prop --mg-c-input-color-box-shadow-focus: Defines the shadow color of the input when focused. Default value is `rgba(0, 221, 255, 0.5)`.\n * @prop --mg-c-input-error-color-background: Defines the background color of the input error message. Default value is `color-mix(in srgb, var(--mg-b-color-danger), white 95%)`.\n * @prop --mg-c-input-toggle-border-radius-ratio: Defines the border radius ratio of the input toggle. Default value is `2`.\n * @prop --mg-c-input-check-size: Defines the size of the input check. Default value is `--mg-b-size-16`.\n */:host{display:block}.mg-c-input__input mg-icon,.mg-c-input__error mg-icon{display:flex}.mg-c-input{display:flex;min-height:var(--mg-b-size-min-height);align-items:flex-start}.mg-c-input__input-container{width:100%;min-height:var(--mg-b-size-min-height)}.mg-c-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-b-size-16);height:var(--mg-b-size-16);margin-left:var(--mg-b-size-8)}@media print{.mg-c-input__input-container mg-tooltip{display:none}}.mg-c-input__input{display:flex;min-height:var(--mg-b-size-min-height);align-items:center;justify-content:start}.mg-c-input__input mg-tooltip{align-self:baseline;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input__input ::slotted(.mg-c-input__button-toggle:disabled){opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input__title{display:flex;width:var(--mg-c-input-title-width, auto);flex-shrink:0;align-items:baseline;justify-content:flex-end;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);margin-right:var(--mg-c-input-title-horizontal-space, var(--mg-b-size-8));text-align:right}.mg-c-input__title slot[name=label]+mg-tooltip{margin-left:var(--mg-b-size-4)}.mg-c-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-c-input__error{display:inline-block;padding:var(--mg-b-size-4) var(--mg-b-size-8);border-radius:var(--mg-b-size-radius);background:var(--mg-c-input-error-color-background);color:var(--mg-b-color-danger)}.mg-c-input__error ::slotted(*),.mg-c-input__help-text ::slotted(*){font-size:var(--mg-b-font-size-small);text-align:start}:host(:not(.mg-c-input--textarea)) .mg-c-input__input+.mg-c-input__error,:host(:not(.mg-c-input--textarea)) .mg-c-input__input+.mg-c-input__help-text{margin-top:var(--mg-b-size-4)}:host(.mg-c-input.mg-c-input--readonly) .mg-c-input__input mg-tooltip{margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2)}:host(.mg-c-input){display:flex;margin-bottom:var(--mg-c-input-margin-bottom, 0)}:host(.mg-c-input.mg-c-input--checkbox) .mg-c-input__input,:host(.mg-c-input.mg-c-input--radio) .mg-c-input__input{min-height:unset;align-items:flex-start}:host(.mg-c-input.mg-c-input--checkbox,.mg-c-input.mg-c-input--radio) .mg-c-input__input{min-height:unset}:host(.mg-c-input.mg-c-input--fieldset:not(.mg-c-input--checkbox-multi,.mg-c-input--readonly)) .mg-c-input__input-container mg-tooltip{margin-left:var(--mg-b-size-32)}:host(.mg-c-input.mg-c-input--label-on-top){flex-direction:column}:host(.mg-c-input.mg-c-input--label-on-top) .mg-c-input__title{width:100%;flex:0;justify-content:flex-start;margin-top:0;margin-right:0;margin-bottom:var(--mg-b-size-4);text-align:left}:host(.mg-c-input.mg-c-input--label-on-top) .mg-c-input__title ::slotted(mg-input-title){flex-shrink:1}@media screen and (max-width: 767px){:host(.mg-c-input){flex-direction:column}:host(.mg-c-input) .mg-c-input__title{width:100%;flex:0;justify-content:flex-start;margin-top:0;margin-right:0;margin-bottom:var(--mg-b-size-4);text-align:left}:host(.mg-c-input) .mg-c-input__title ::slotted(mg-input-title){flex-shrink:1}}";
|
|
25
|
+
const mgInputCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}/*!\n * @prop --mg-c-input-border-width: Defines the width of the input border. Default value is `--mg-b-size-border`.\n * @prop --mg-c-input-border-radius: Defines the border radius of the input. Default value is `--mg-b-size-radius`.\n * @prop --mg-c-input-color-border: Defines the color of the input border. Default value is `rgb(181, 194, 201)`.\n * @prop --mg-c-input-placeholder-color-text: Defines the color of the placeholder text. Default value is `rgb(181, 194, 201)`.\n * @prop --mg-c-input-color-box-shadow-focus: Defines the shadow color of the input when focused. Default value is `rgba(0, 221, 255, 0.5)`.\n * @prop --mg-c-input-error-color-background: Defines the background color of the input error message. Default value is `color-mix(in srgb, var(--mg-b-color-danger), white 95%)`.\n * @prop --mg-c-input-toggle-border-radius-ratio: Defines the border radius ratio of the input toggle. Default value is `2`.\n * @prop --mg-c-input-check-size: Defines the size of the input check. Default value is `--mg-b-size-16`.\n */:host{display:block}.mg-c-input__input mg-icon,.mg-c-input__error mg-icon{display:flex}.mg-c-input{display:flex;min-height:var(--mg-b-size-min-height);align-items:flex-start}.mg-c-input__input-container{width:100%;min-height:var(--mg-b-size-min-height)}.mg-c-input__input-container mg-tooltip{display:inline-flex;width:var(--mg-b-size-16);height:var(--mg-b-size-16);margin-left:var(--mg-b-size-8)}@media print{.mg-c-input__input-container mg-tooltip{display:none}}.mg-c-input__input{display:flex;min-height:var(--mg-b-size-min-height);align-items:center;justify-content:start}.mg-c-input__input mg-tooltip{align-self:baseline;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2)}.mg-c-input__input ::slotted(.mg-c-input__button-toggle:disabled){opacity:var(--mg-b-opacity-element-disabled)}.mg-c-input__title{display:flex;width:var(--mg-c-input-title-width, auto);flex-shrink:0;align-items:baseline;justify-content:flex-end;margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2);margin-right:var(--mg-c-input-title-horizontal-space, var(--mg-b-size-8));text-align:right}.mg-c-input__title slot[name=label]+mg-tooltip{margin-left:var(--mg-b-size-4)}.mg-c-input__title mg-icon{display:inline-flex;vertical-align:text-bottom}.mg-c-input__error{display:inline-block;padding:var(--mg-b-size-4) var(--mg-b-size-8);border-radius:var(--mg-b-size-radius);background:var(--mg-c-input-error-color-background);color:var(--mg-b-color-danger)}.mg-c-input__error ::slotted(*),.mg-c-input__help-text ::slotted(*){font-size:var(--mg-b-font-size-small);text-align:start}:host(:not(.mg-c-input--textarea)) .mg-c-input__input+.mg-c-input__error,:host(:not(.mg-c-input--textarea)) .mg-c-input__input+.mg-c-input__help-text{margin-top:var(--mg-b-size-4)}:host(.mg-c-input.mg-c-input--readonly) .mg-c-input__input mg-tooltip{margin-top:calc((var(--mg-b-size-min-height) - var(--mg-b-font-size)*var(--mg-b-line-height))/2)}:host(.mg-c-input){display:flex;margin-bottom:var(--mg-c-input-margin-bottom, 0)}:host(.mg-c-input.mg-c-input--checkbox) .mg-c-input__input,:host(.mg-c-input.mg-c-input--toggle) .mg-c-input__input,:host(.mg-c-input.mg-c-input--radio) .mg-c-input__input{min-height:unset;align-items:flex-start}:host(.mg-c-input.mg-c-input--checkbox,.mg-c-input.mg-c-input--radio) .mg-c-input__input{min-height:unset}:host(.mg-c-input.mg-c-input--fieldset:not(.mg-c-input--checkbox-multi,.mg-c-input--readonly)) .mg-c-input__input-container mg-tooltip{margin-left:var(--mg-b-size-32)}:host(.mg-c-input.mg-c-input--toggle) .mg-c-input__input-container{min-width:0;flex:1}:host(.mg-c-input.mg-c-input--label-on-top){flex-direction:column}:host(.mg-c-input.mg-c-input--label-on-top) .mg-c-input__title{width:100%;flex:0;justify-content:flex-start;margin-top:0;margin-right:0;margin-bottom:var(--mg-b-size-4);text-align:left}:host(.mg-c-input.mg-c-input--label-on-top) .mg-c-input__title ::slotted(mg-input-title){flex-shrink:1}:host(.mg-c-input.mg-c-input--inputs-on-bottom) .mg-c-input__help-text{margin-top:var(--mg-b-size-4);margin-bottom:var(--mg-b-size-12)}:host(.mg-c-input.mg-c-input--inputs-on-bottom) .mg-c-input__error{margin-bottom:var(--mg-b-size-20)}:host(.mg-c-input.mg-c-input--inputs-on-bottom.mg-c-input--fieldset){--mg-c-input-title-width:var(--mg-c-form-inputs-title-width, calc(28 * var(--mg-b-size-8)));--mg-c-input-title-horizontal-space:var(--mg-b-size-32)}:host(.mg-c-input.mg-c-input--inputs-on-bottom.mg-c-input--fieldset) ::slotted(*){--mg-c-input-margin-bottom:var(--mg-b-size-16)}:host(.mg-c-input.mg-c-input--label-border-display) .mg-c-input__title{border-bottom:var(--mg-b-size-border) solid var(--mg-c-divider-color-background)}:host(.mg-c-input.mg-c-input--has-heading) .mg-c-input__title{margin-bottom:0}:host(.mg-c-input.mg-c-input--has-heading) .mg-c-input-title__text{margin-top:var(--mg-b-font-size-8);margin-bottom:var(--mg-b-font-size-8)}:host(.mg-c-input.mg-c-input--has-heading) .mg-c-input__help-text,:host(.mg-c-input.mg-c-input--has-heading) .mg-c-input__error{margin-top:0;margin-bottom:var(--mg-b-size-4)}:host(.mg-c-input.mg-c-input--has-heading) .mg-c-input__help-text+.mg-c-input__input,:host(.mg-c-input.mg-c-input--has-heading) .mg-c-input__error+.mg-c-input__input{margin-top:var(--mg-b-size-12)}:host(.mg-c-input.mg-c-input--has-heading) .mg-c-input__help-text+.mg-c-input__error{margin-top:var(--mg-b-size-4)}:host(.mg-c-input.mg-c-input--has-heading.mg-c-input--label-border-display) .mg-c-input__title{margin-bottom:var(--mg-b-size-16)}:host(.mg-c-input.mg-c-input--has-heading.mg-c-input--label-border-display) .mg-c-input__help-text,:host(.mg-c-input.mg-c-input--has-heading.mg-c-input--label-border-display) .mg-c-input__error{margin-bottom:0}:host(.mg-c-input.mg-c-input--has-heading.mg-c-input--label-border-display) .mg-c-input__help-text+.mg-c-input__input,:host(.mg-c-input.mg-c-input--has-heading.mg-c-input--label-border-display) .mg-c-input__error+.mg-c-input__input{margin-top:var(--mg-b-size-16)}:host(.mg-c-input.mg-c-input--has-heading.mg-c-input--label-border-display) .mg-c-input__help-text+.mg-c-input__error{margin-top:var(--mg-b-size-8)}@media screen and (max-width: 767px){:host(.mg-c-input){flex-direction:column}:host(.mg-c-input) .mg-c-input__title{width:100%;flex:0;justify-content:flex-start;margin-top:0;margin-right:0;margin-bottom:var(--mg-b-size-4);text-align:left}:host(.mg-c-input) .mg-c-input__title ::slotted(mg-input-title){flex-shrink:1}}";
|
|
22
26
|
|
|
23
27
|
const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLElement {
|
|
24
|
-
constructor() {
|
|
28
|
+
constructor(registerHost) {
|
|
25
29
|
super();
|
|
26
|
-
|
|
30
|
+
if (registerHost !== false) {
|
|
31
|
+
this.__registerHost();
|
|
32
|
+
}
|
|
27
33
|
this.__attachShadow();
|
|
28
34
|
this.slotLabel = 'label';
|
|
29
35
|
this.slotError = 'error';
|
|
@@ -32,6 +38,9 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
32
38
|
this.classInput = 'mg-c-input';
|
|
33
39
|
this.classHasError = 'mg-c-input--has-error';
|
|
34
40
|
this.classLabelOnTop = 'mg-c-input--label-on-top';
|
|
41
|
+
this.classHasHeading = 'mg-c-input--has-heading';
|
|
42
|
+
this.classLabelBorderDisplay = 'mg-c-input--label-border-display';
|
|
43
|
+
this.classInputsOnBottom = 'mg-c-input--inputs-on-bottom';
|
|
35
44
|
/**
|
|
36
45
|
* Define if label is displayed on top
|
|
37
46
|
*/
|
|
@@ -40,6 +49,11 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
40
49
|
* Define if label is visible
|
|
41
50
|
*/
|
|
42
51
|
this.labelHide = false;
|
|
52
|
+
/**
|
|
53
|
+
* Define if label border is visible
|
|
54
|
+
* You must pair this mode with `labelOnTop`and `fieldset` class
|
|
55
|
+
*/
|
|
56
|
+
this.labelBorderDisplay = false;
|
|
43
57
|
/**
|
|
44
58
|
* Define tooltip position
|
|
45
59
|
*/
|
|
@@ -48,6 +62,10 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
48
62
|
* Define if input is required
|
|
49
63
|
*/
|
|
50
64
|
this.required = false;
|
|
65
|
+
/**
|
|
66
|
+
* Display inputs after help-text and error message
|
|
67
|
+
*/
|
|
68
|
+
this.inputsOnBottom = false;
|
|
51
69
|
/**
|
|
52
70
|
* Define aria-describedby ids to link with
|
|
53
71
|
*/
|
|
@@ -68,11 +86,44 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
68
86
|
* Element is disabled
|
|
69
87
|
*/
|
|
70
88
|
this.isVerticalList = false;
|
|
89
|
+
/************
|
|
90
|
+
* Methods *
|
|
91
|
+
************/
|
|
92
|
+
/**
|
|
93
|
+
* Update element aria-describedby
|
|
94
|
+
* @param element - element to update
|
|
95
|
+
* @param ariaDescribedbyIDs - ariaDescribedbyIDs references
|
|
96
|
+
*/
|
|
97
|
+
this.updateElementAriaDescribedby = (element, ariaDescribedbyIDs) => {
|
|
98
|
+
if (ariaDescribedbyIDs.size > 0) {
|
|
99
|
+
element.setAttribute('aria-describedby', Array.from(ariaDescribedbyIDs).join(' '));
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
element.removeAttribute('aria-describedby');
|
|
103
|
+
}
|
|
104
|
+
};
|
|
71
105
|
/**
|
|
72
106
|
* Get tooltip node
|
|
73
107
|
* @returns mg-tooltip
|
|
74
108
|
*/
|
|
75
109
|
this.renderTooltip = () => (h("mg-tooltip", { identifier: `${this.identifier}-tooltip`, message: this.tooltip }, h("mg-icon", { icon: "info-circle" })));
|
|
110
|
+
/**
|
|
111
|
+
* Get input container element
|
|
112
|
+
* @returns ordered elements
|
|
113
|
+
*/
|
|
114
|
+
this.inputContainerElements = () => {
|
|
115
|
+
const elements = [
|
|
116
|
+
this.helptextMessageSlotElement && (h("div", { class: "mg-c-input__help-text" }, h("slot", { name: this.slotHelpText }))),
|
|
117
|
+
!this.isDisabled && this.errorMessage && (h("div", { class: "mg-c-input__error", "aria-live": "assertive" }, h("slot", { name: this.slotError }))),
|
|
118
|
+
];
|
|
119
|
+
const inputSlot = (h("div", { class: "mg-c-input__input" }, h("slot", null), this.tooltip && !this.labelOnTop && (this.tooltipPosition === 'input' || this.labelHide) && this.renderTooltip()));
|
|
120
|
+
if (this.inputsOnBottom) {
|
|
121
|
+
return [...elements, inputSlot];
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
return [inputSlot, ...elements];
|
|
125
|
+
}
|
|
126
|
+
};
|
|
76
127
|
}
|
|
77
128
|
watchIdentifier(newValue) {
|
|
78
129
|
if (!isValidString(newValue)) {
|
|
@@ -99,6 +150,26 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
99
150
|
throw new Error('<mg-input> prop "labelOnTop" must not be paired with the prop "labelHide".');
|
|
100
151
|
}
|
|
101
152
|
}
|
|
153
|
+
watchlabelHeading(newValue) {
|
|
154
|
+
if (this.isFieldset && this.labelOnTop && labelHeadings.includes(newValue)) {
|
|
155
|
+
this.element.classList.add(this.classHasHeading);
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
if ((!this.isFieldset && newValue !== undefined) || typeof newValue === 'string') {
|
|
159
|
+
throw new Error(`<mg-input> prop "labelHeading" must be used with a fieldset and be one of: ${labelHeadings.join(', ')}. Passed value: ${toString(newValue)}.`);
|
|
160
|
+
}
|
|
161
|
+
this.labelHeading = undefined;
|
|
162
|
+
this.element.classList.remove(this.classHasHeading);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
watchLabelBorderDisplay(newValue) {
|
|
166
|
+
if (this.isFieldset && this.labelOnTop && newValue) {
|
|
167
|
+
this.element.classList.add(this.classLabelBorderDisplay);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
this.element.classList.remove(this.classLabelBorderDisplay);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
102
173
|
watchTooltipPosition(newValue) {
|
|
103
174
|
if (!tooltipPositions.includes(newValue)) {
|
|
104
175
|
throw new Error(`<mg-input> prop "tooltipPosition" must be one of: ${tooltipPositions.join(', ')}. Passed value: ${toString(newValue)}.`);
|
|
@@ -118,7 +189,7 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
118
189
|
}
|
|
119
190
|
watchHelpText(newValue) {
|
|
120
191
|
var _a;
|
|
121
|
-
if (newValue && !this.isReadonly) {
|
|
192
|
+
if (isValidString(newValue) && !this.isReadonly) {
|
|
122
193
|
this.renderHelpText();
|
|
123
194
|
}
|
|
124
195
|
else {
|
|
@@ -126,6 +197,14 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
126
197
|
this.helptextMessageSlotElement = undefined;
|
|
127
198
|
}
|
|
128
199
|
}
|
|
200
|
+
watchInputsOnBottom(newValue) {
|
|
201
|
+
if (newValue) {
|
|
202
|
+
this.element.classList.add(this.classInputsOnBottom);
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
this.element.classList.remove(this.classInputsOnBottom);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
129
208
|
watchAriaDescribedbyIDs() {
|
|
130
209
|
if (this.isReadonly) {
|
|
131
210
|
return;
|
|
@@ -141,23 +220,26 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
141
220
|
// a11y IDs
|
|
142
221
|
const ariaDescribedbyIDs = new Set(this.ariaDescribedbyIDs);
|
|
143
222
|
// Help text
|
|
144
|
-
if (this.helpText
|
|
223
|
+
if (isValidString(this.helpText)) {
|
|
145
224
|
this.renderHelpText();
|
|
146
225
|
if (!ariaDescribedbyIDs.has(this.helpTextId))
|
|
147
226
|
ariaDescribedbyIDs.add(this.helpTextId);
|
|
148
227
|
}
|
|
149
228
|
// Error Message
|
|
150
|
-
if (this.errorMessage
|
|
229
|
+
if (isValidString(this.errorMessage)) {
|
|
151
230
|
this.renderErrorMessage();
|
|
152
231
|
if (!ariaDescribedbyIDs.has(this.helpTextErrorId))
|
|
153
232
|
ariaDescribedbyIDs.add(this.helpTextErrorId);
|
|
154
233
|
}
|
|
155
|
-
this.element.querySelectorAll('input,select,textarea,[role="switch"]')
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
234
|
+
const inputs = this.element.querySelectorAll('input,select,textarea,[role="switch"]');
|
|
235
|
+
inputs.forEach((element) => {
|
|
236
|
+
this.updateElementAriaDescribedby(element, ariaDescribedbyIDs);
|
|
237
|
+
});
|
|
238
|
+
// use timeout to await for legend render for componentWillLoad hook
|
|
239
|
+
setTimeout(() => {
|
|
240
|
+
const legend = this.element.querySelector('legend');
|
|
241
|
+
if (legend !== null) {
|
|
242
|
+
this.updateElementAriaDescribedby(legend, ariaDescribedbyIDs);
|
|
161
243
|
}
|
|
162
244
|
});
|
|
163
245
|
}
|
|
@@ -187,9 +269,6 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
187
269
|
this.renderLabel();
|
|
188
270
|
}
|
|
189
271
|
}
|
|
190
|
-
/************
|
|
191
|
-
* Methods *
|
|
192
|
-
************/
|
|
193
272
|
/**
|
|
194
273
|
* Render input label
|
|
195
274
|
*/
|
|
@@ -209,11 +288,21 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
209
288
|
labelSlotElement.setAttribute(attr, val);
|
|
210
289
|
});
|
|
211
290
|
// create label element
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
291
|
+
if (labelHeadings.includes(this.labelHeading)) {
|
|
292
|
+
let label = this.element.shadowRoot.querySelector(this.labelHeading);
|
|
293
|
+
if (label === null) {
|
|
294
|
+
label = document.createElement(this.labelHeading);
|
|
295
|
+
label.classList.add('mg-c-input-title__text');
|
|
296
|
+
labelSlotElement.appendChild(label);
|
|
297
|
+
}
|
|
298
|
+
label.textContent = this.label;
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
labelSlotElement.textContent = this.label;
|
|
302
|
+
}
|
|
216
303
|
this.element.appendChild(labelSlotElement);
|
|
304
|
+
// update aria-describedby
|
|
305
|
+
this.watchAriaDescribedbyIDs();
|
|
217
306
|
}
|
|
218
307
|
/**
|
|
219
308
|
* Render error message
|
|
@@ -256,6 +345,9 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
256
345
|
this.watchTooltipPosition(this.tooltipPosition);
|
|
257
346
|
this.watchHelpText(this.helpText);
|
|
258
347
|
this.watchErrorMessage(this.errorMessage);
|
|
348
|
+
this.watchInputsOnBottom(this.inputsOnBottom);
|
|
349
|
+
this.watchlabelHeading(this.labelHeading);
|
|
350
|
+
this.watchLabelBorderDisplay(this.labelBorderDisplay);
|
|
259
351
|
}
|
|
260
352
|
/**
|
|
261
353
|
* Validate slots
|
|
@@ -272,16 +364,19 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
272
364
|
*/
|
|
273
365
|
render() {
|
|
274
366
|
const isGroup = this.isFieldset && !this.isReadonly;
|
|
275
|
-
return (h(Host, { key: '
|
|
367
|
+
return (h(Host, { key: 'fbab18280a709407c83f324127e8de6cbb05fe7c', class: this.element.classList.toString(), role: isGroup ? 'group' : undefined, "aria-labelledby": isGroup ? `${this.identifier}-title` : undefined }, h("div", { key: 'ac0924c244b9fa87d02e659a5710ee93d12a202f', class: { 'mg-c-input__title': true, 'mg-u-visually-hidden': this.labelHide } }, h("slot", { key: 'c825af33ba0a6c209d02d6487422347f7d8acfed', name: this.slotLabel }), this.tooltip && (this.tooltipPosition === 'label' || this.labelOnTop) && !this.labelHide && this.renderTooltip()), h("div", { key: '805e1eedfdea132f3ea4fd11da761810a3d7c939', class: "mg-c-input__input-container" }, this.inputContainerElements())));
|
|
276
368
|
}
|
|
277
369
|
get element() { return this; }
|
|
278
370
|
static get watchers() { return {
|
|
279
371
|
"identifier": ["watchIdentifier", "watchAriaDescribedbyIDs"],
|
|
280
372
|
"labelOnTop": ["watchLabelOnTop", "watchLabelConfig"],
|
|
281
373
|
"labelHide": ["watchLabelConfig"],
|
|
374
|
+
"labelHeading": ["watchlabelHeading"],
|
|
375
|
+
"labelBorderDisplay": ["watchLabelBorderDisplay"],
|
|
282
376
|
"tooltipPosition": ["watchTooltipPosition"],
|
|
283
377
|
"errorMessage": ["watchErrorMessage", "watchAriaDescribedbyIDs"],
|
|
284
378
|
"helpText": ["watchHelpText", "watchAriaDescribedbyIDs"],
|
|
379
|
+
"inputsOnBottom": ["watchInputsOnBottom"],
|
|
285
380
|
"ariaDescribedbyIDs": ["watchAriaDescribedbyIDs"],
|
|
286
381
|
"class": ["watchClass", "watchLabel"],
|
|
287
382
|
"label": ["watchLabel"],
|
|
@@ -295,11 +390,14 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
295
390
|
"label": [1],
|
|
296
391
|
"labelOnTop": [4, "label-on-top"],
|
|
297
392
|
"labelHide": [4, "label-hide"],
|
|
393
|
+
"labelHeading": [1025, "label-heading"],
|
|
394
|
+
"labelBorderDisplay": [4, "label-border-display"],
|
|
298
395
|
"tooltip": [1],
|
|
299
396
|
"tooltipPosition": [1, "tooltip-position"],
|
|
300
397
|
"required": [4],
|
|
301
398
|
"errorMessage": [1, "error-message"],
|
|
302
399
|
"helpText": [1, "help-text"],
|
|
400
|
+
"inputsOnBottom": [4, "inputs-on-bottom"],
|
|
303
401
|
"ariaDescribedbyIDs": [1025, "aria-describedby-i-ds"],
|
|
304
402
|
"isFieldset": [32],
|
|
305
403
|
"isReadonly": [32],
|
|
@@ -309,9 +407,12 @@ const MgInput = /*@__PURE__*/ proxyCustomElement(class MgInput extends HTMLEleme
|
|
|
309
407
|
"identifier": ["watchIdentifier", "watchAriaDescribedbyIDs"],
|
|
310
408
|
"labelOnTop": ["watchLabelOnTop", "watchLabelConfig"],
|
|
311
409
|
"labelHide": ["watchLabelConfig"],
|
|
410
|
+
"labelHeading": ["watchlabelHeading"],
|
|
411
|
+
"labelBorderDisplay": ["watchLabelBorderDisplay"],
|
|
312
412
|
"tooltipPosition": ["watchTooltipPosition"],
|
|
313
413
|
"errorMessage": ["watchErrorMessage", "watchAriaDescribedbyIDs"],
|
|
314
414
|
"helpText": ["watchHelpText", "watchAriaDescribedbyIDs"],
|
|
415
|
+
"inputsOnBottom": ["watchInputsOnBottom"],
|
|
315
416
|
"ariaDescribedbyIDs": ["watchAriaDescribedbyIDs"],
|
|
316
417
|
"class": ["watchClass", "watchLabel"],
|
|
317
418
|
"label": ["watchLabel"],
|
|
@@ -92,9 +92,11 @@ class OverflowBehavior {
|
|
|
92
92
|
const mgMenuCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}/*!\n * @prop --mg-c-menu-color-background: Defines the background color of the menu. Unset by default, fallback on `--mg-b-color-light`.\n */:host{display:inline-flex;width:100%;min-width:0;background-color:var(--mg-c-menu-color-background, var(--mg-b-color-light))}:host([direction=vertical]){display:flex;height:100%;flex-direction:column;overflow-y:auto}";
|
|
93
93
|
|
|
94
94
|
const MgMenu = /*@__PURE__*/ proxyCustomElement(class MgMenu extends HTMLElement {
|
|
95
|
-
constructor() {
|
|
95
|
+
constructor(registerHost) {
|
|
96
96
|
super();
|
|
97
|
-
|
|
97
|
+
if (registerHost !== false) {
|
|
98
|
+
this.__registerHost();
|
|
99
|
+
}
|
|
98
100
|
this.__attachShadow();
|
|
99
101
|
/************
|
|
100
102
|
* Internal *
|
|
@@ -192,6 +194,10 @@ const MgMenu = /*@__PURE__*/ proxyCustomElement(class MgMenu extends HTMLElement
|
|
|
192
194
|
* @param event - mg-item-loaded "item-loaded" custom event
|
|
193
195
|
*/
|
|
194
196
|
updateItemListener(event) {
|
|
197
|
+
// `<mg-action-more>` element doesn't need `data-has-focus` attribute
|
|
198
|
+
if (event.target.nodeName === 'MG-ACTION-MORE') {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
195
201
|
const itemToWatch = event.target.nodeName === 'MG-ITEM-MORE' ? event.target.shadowRoot.querySelector('mg-menu-item') : event.target;
|
|
196
202
|
['click', 'focus'].forEach(trigger => {
|
|
197
203
|
itemToWatch.addEventListener(trigger, () => {
|
|
@@ -252,7 +258,7 @@ const MgMenu = /*@__PURE__*/ proxyCustomElement(class MgMenu extends HTMLElement
|
|
|
252
258
|
* @returns HTML Element
|
|
253
259
|
*/
|
|
254
260
|
render() {
|
|
255
|
-
return (h(Host, { key: '
|
|
261
|
+
return (h(Host, { key: '753833b01b86d6983f5d063f5598e2187b147a6e', role: "list", "aria-label": this.label }, h("slot", { key: '56702e49f5a97feddeb66e6271bd898061aa0d48' })));
|
|
256
262
|
}
|
|
257
263
|
get element() { return this; }
|
|
258
264
|
static get watchers() { return {
|
|
@@ -336,9 +342,11 @@ defineCustomElement$1();
|
|
|
336
342
|
const mgItemMoreCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host:not([hidden]){display:flex}";
|
|
337
343
|
|
|
338
344
|
const MgItemMore = /*@__PURE__*/ proxyCustomElement(class MgItemMore extends HTMLElement {
|
|
339
|
-
constructor() {
|
|
345
|
+
constructor(registerHost) {
|
|
340
346
|
super();
|
|
341
|
-
|
|
347
|
+
if (registerHost !== false) {
|
|
348
|
+
this.__registerHost();
|
|
349
|
+
}
|
|
342
350
|
this.__attachShadow();
|
|
343
351
|
/************
|
|
344
352
|
* Internal *
|
|
@@ -6,9 +6,11 @@ import { d as defineCustomElement$1 } from './mg-icon2.js';
|
|
|
6
6
|
const mgLoaderCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}:host{display:block}.mg-c-loader{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--mg-b-size-4);text-align:center}";
|
|
7
7
|
|
|
8
8
|
const MgLoader = /*@__PURE__*/ proxyCustomElement(class MgLoader extends HTMLElement {
|
|
9
|
-
constructor() {
|
|
9
|
+
constructor(registerHost) {
|
|
10
10
|
super();
|
|
11
|
-
|
|
11
|
+
if (registerHost !== false) {
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
}
|
|
12
14
|
this.__attachShadow();
|
|
13
15
|
/**
|
|
14
16
|
* Hide message
|
|
@@ -36,7 +38,7 @@ const MgLoader = /*@__PURE__*/ proxyCustomElement(class MgLoader extends HTMLEle
|
|
|
36
38
|
* @returns HTML Element
|
|
37
39
|
*/
|
|
38
40
|
render() {
|
|
39
|
-
return (h("div", { key: '
|
|
41
|
+
return (h("div", { key: '739b4cbacd8a8da056dbb1445c40fac2cf26766a', class: "mg-c-loader", "aria-live": "polite" }, h("mg-icon", { key: '95d3cbf26fcd6dbf0dad4853bf55aa66385f1aba', icon: "loader", spin: true }), h("span", { key: 'f6322cd3054d8976bd2ec24f86a2d6bb60ca7ae1', class: { 'mg-u-visually-hidden': this.messageHide } }, this.message || this.messages.loader.inProgress)));
|
|
40
42
|
}
|
|
41
43
|
get element() { return this; }
|
|
42
44
|
static get watchers() { return {
|
|
@@ -37,9 +37,11 @@ const sizes = ['medium', 'large', 'xlarge'];
|
|
|
37
37
|
const mgMenuItemCss = ".mg-u-visually-hidden{position:absolute !important;overflow:hidden !important;width:.1rem !important;height:.1rem !important;padding:0 !important;border:0 !important;margin:-0.1rem !important;clip:rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;clip-path:inset(50%) !important;white-space:nowrap !important}*:focus:not(:focus-visible){outline:none}@media (prefers-reduced-motion){*{animation:none !important;transition:none !important}}/*!\n * @prop --mg-c-menu-item-color: Defines menu item global color, used for bottom line and active tabs. Default value: `--mg-b-color-app`.\n * @prop --mg-c-menu-item-color-text: Defines the color of the menu item. Unset by default, fallback on `--mg-b-color-dark`.\n * @prop --mg-c-menu-item-navigation-button-max-width: Defines the max-width property for the navigation button. Unset by default.\n */.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{height:var(--mg-b-size-40);padding:var(--mg-b-size-12) var(--mg-b-size-16)}.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button,.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button ::slotted([slot=label]),.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button ::slotted([slot=metadata]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium ::slotted([slot=label]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium ::slotted([slot=metadata]){font-size:var(--mg-b-font-size)}.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--horizontal,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium.mg-c-menu-item__navigation-button--horizontal{padding-bottom:var(--mg-b-size-12)}.mg-c-menu-item.mg-c-menu-item--size-medium .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--vertical,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium.mg-c-menu-item__navigation-button--vertical{padding-left:var(--mg-b-size-16)}.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{height:var(--mg-b-size-48);padding:var(--mg-b-size-12) var(--mg-b-size-32)}.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button,.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button ::slotted([slot=label]),.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button ::slotted([slot=metadata]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large ::slotted([slot=label]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large ::slotted([slot=metadata]){font-size:var(--mg-b-font-size-h4)}.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--horizontal,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large.mg-c-menu-item__navigation-button--horizontal{padding-bottom:var(--mg-b-size-12)}.mg-c-menu-item.mg-c-menu-item--size-large .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--vertical,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large.mg-c-menu-item__navigation-button--vertical{padding-left:var(--mg-b-size-32)}.mg-c-menu-item.mg-c-menu-item--size-xlarge .mg-c-menu-item__navigation-button,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-xlarge{height:var(--mg-b-size-72);padding:var(--mg-b-size-12) var(--mg-b-size-40)}.mg-c-menu-item.mg-c-menu-item--size-xlarge .mg-c-menu-item__navigation-button,.mg-c-menu-item.mg-c-menu-item--size-xlarge .mg-c-menu-item__navigation-button ::slotted([slot=label]),.mg-c-menu-item.mg-c-menu-item--size-xlarge .mg-c-menu-item__navigation-button ::slotted([slot=metadata]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-xlarge,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-xlarge ::slotted([slot=label]),.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-xlarge ::slotted([slot=metadata]){font-size:var(--mg-b-font-size-h4)}.mg-c-menu-item.mg-c-menu-item--size-xlarge .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--horizontal,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-xlarge.mg-c-menu-item__navigation-button--horizontal{padding-bottom:var(--mg-b-size-12)}.mg-c-menu-item.mg-c-menu-item--size-xlarge .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--vertical,.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-xlarge.mg-c-menu-item__navigation-button--vertical{padding-left:var(--mg-b-size-40)}.mg-c-menu-item__navigation-button{display:flex;box-sizing:border-box;align-items:center;border:none;background-color:unset;color:var(--mg-c-menu-item-color-text, var(--mg-b-color-dark));column-gap:var(--mg-c-menu-item-navigation-button-column-gap, var(--mg-b-size-8));cursor:pointer;font-family:var(--mg-b-font-family);font-weight:400;line-height:var(--mg-b-line-height);text-decoration:none;white-space:nowrap}.mg-c-menu-item__navigation-button:disabled,.mg-c-menu-item__navigation-button--disabled{cursor:default;opacity:var(--mg-b-opacity-element-disabled)}.mg-c-menu-item__navigation-button:focus-visible{z-index:10}.mg-c-menu-item__navigation-button:hover:not(.mg-c-menu-item__navigation-button--disabled),.mg-c-menu-item__navigation-button:focus-visible:not(.mg-c-menu-item__navigation-button--disabled){background-color:color-mix(in srgb, var(--mg-c-menu-item-color), transparent 90%)}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--active{color:var(--mg-c-menu-item-color);font-weight:600}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--active.mg-c-menu-item__navigation-button--horizontal{box-shadow:inset 0 calc(-1*var(--mg-b-size-4)) var(--mg-c-menu-item-color)}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--active.mg-c-menu-item__navigation-button--vertical{box-shadow:inset var(--mg-b-size-4) 0 var(--mg-c-menu-item-color)}.mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--hidden{display:none}:host([data-style-direction=vertical][data-level=\"1\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(1*var(--mg-b-size-16))}:host([data-level=\"1\"]) .mg-c-menu-item__collapse-container{z-index:10}:host([data-style-direction=vertical][data-level=\"2\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(2*var(--mg-b-size-16))}:host([data-level=\"2\"]) .mg-c-menu-item__collapse-container{z-index:20}:host([data-style-direction=vertical][data-level=\"3\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(3*var(--mg-b-size-16))}:host([data-level=\"3\"]) .mg-c-menu-item__collapse-container{z-index:30}:host([data-style-direction=vertical][data-level=\"4\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(4*var(--mg-b-size-16))}:host([data-level=\"4\"]) .mg-c-menu-item__collapse-container{z-index:40}:host([data-style-direction=vertical][data-level=\"5\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(5*var(--mg-b-size-16))}:host([data-level=\"5\"]) .mg-c-menu-item__collapse-container{z-index:50}:host([data-style-direction=vertical][data-level=\"6\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-medium{padding-left:calc(6*var(--mg-b-size-16))}:host([data-level=\"6\"]) .mg-c-menu-item__collapse-container{z-index:60}:host([data-style-direction=vertical][data-level=\"1\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(1*var(--mg-b-size-32))}:host([data-level=\"1\"]) .mg-c-menu-item__collapse-container{z-index:10}:host([data-style-direction=vertical][data-level=\"2\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(2*var(--mg-b-size-32))}:host([data-level=\"2\"]) .mg-c-menu-item__collapse-container{z-index:20}:host([data-style-direction=vertical][data-level=\"3\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(3*var(--mg-b-size-32))}:host([data-level=\"3\"]) .mg-c-menu-item__collapse-container{z-index:30}:host([data-style-direction=vertical][data-level=\"4\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(4*var(--mg-b-size-32))}:host([data-level=\"4\"]) .mg-c-menu-item__collapse-container{z-index:40}:host([data-style-direction=vertical][data-level=\"5\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(5*var(--mg-b-size-32))}:host([data-level=\"5\"]) .mg-c-menu-item__collapse-container{z-index:50}:host([data-style-direction=vertical][data-level=\"6\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-large{padding-left:calc(6*var(--mg-b-size-32))}:host([data-level=\"6\"]) .mg-c-menu-item__collapse-container{z-index:60}:host([data-style-direction=vertical][data-level=\"1\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-xlarge{padding-left:calc(1*var(--mg-b-size-40))}:host([data-level=\"1\"]) .mg-c-menu-item__collapse-container{z-index:10}:host([data-style-direction=vertical][data-level=\"2\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-xlarge{padding-left:calc(2*var(--mg-b-size-40))}:host([data-level=\"2\"]) .mg-c-menu-item__collapse-container{z-index:20}:host([data-style-direction=vertical][data-level=\"3\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-xlarge{padding-left:calc(3*var(--mg-b-size-40))}:host([data-level=\"3\"]) .mg-c-menu-item__collapse-container{z-index:30}:host([data-style-direction=vertical][data-level=\"4\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-xlarge{padding-left:calc(4*var(--mg-b-size-40))}:host([data-level=\"4\"]) .mg-c-menu-item__collapse-container{z-index:40}:host([data-style-direction=vertical][data-level=\"5\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-xlarge{padding-left:calc(5*var(--mg-b-size-40))}:host([data-level=\"5\"]) .mg-c-menu-item__collapse-container{z-index:50}:host([data-style-direction=vertical][data-level=\"6\"]) .mg-c-menu-item__navigation-button.mg-c-menu-item__navigation-button--size-xlarge{padding-left:calc(6*var(--mg-b-size-40))}:host([data-level=\"6\"]) .mg-c-menu-item__collapse-container{z-index:60}.mg-c-menu-item{max-width:var(--mg-c-menu-item-navigation-button-max-width)}.mg-c-menu-item__collapse-container{z-index:10;width:max-content}.mg-c-menu-item__navigation-button-center{min-width:0}.mg-c-menu-item__navigation-button-text-content{display:flex;width:100%;align-items:center}.mg-c-menu-item__navigation-button-text-content-notification,.mg-c-menu-item__navigation-button-text-content ::slotted([slot=information]){margin-left:var(--mg-b-size-8);font-size:var(--mg-b-font-size)}.mg-c-menu-item__navigation-button-new-tab{margin-left:var(--mg-b-size-4)}.mg-c-menu-item__navigation-button-chevron{display:var(--mg-c-menu-item-chevron-display);margin-left:auto;transition:200ms}.mg-c-menu-item__navigation-button-chevron--rotate.mg-c-menu-item__navigation-button-chevron{transform:rotate(180deg)}:host{position:relative;display:flex;--mg-c-popover-padding-vertical:0;--mg-c-popover-padding-horizontal:0;--mg-c-popover-max-width:unset}:host([data-style-direction=vertical]){flex-direction:column}:host([data-style-direction=vertical]) .mg-c-menu-item__navigation-button{width:100%}:host([data-style-direction=vertical]) .mg-c-menu-item__collapse-container{position:unset;top:unset;left:unset;width:unset}:host([data-style-direction=vertical]) .mg-c-menu-item-chevron{margin-left:auto}:host([data-overflow-more]){--mg-c-menu-item-navigation-button-column-gap:0}:host([data-overflow-more]) .mg-c-menu-item__navigation-button-chevron{--mg-c-menu-item-chevron-display:none}:host([data-overflow-more]) .mg-c-menu-item__navigation-button-text-content ::slotted([slot=information]){margin-left:0}:host([data-overflow-more]) ::slotted(mg-menu){--mg-c-menu-item-navigation-button-column-gap:var(--mg-b-size-8)}:host([data-style-direction=horizontal]) .mg-c-menu-item__collapse-container.mg-c-menu-item__collapse-container--first-level,:host([data-overflow-more]) .mg-c-menu-item__collapse-container.mg-c-menu-item__collapse-container--first-level{background-color:var(--mg-b-color-light)}:host([data-style-direction=horizontal]) .mg-c-menu-item__collapse-container.mg-c-menu-item__collapse-container--first-level ::slotted(mg-menu),:host([data-overflow-more]) .mg-c-menu-item__collapse-container.mg-c-menu-item__collapse-container--first-level ::slotted(mg-menu){padding:var(--mg-b-size-8) 0}::slotted([slot=label]),::slotted([slot=metadata]){display:block;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}::slotted(*){display:flex;flex-direction:column}:host([status=disabled]){pointer-events:none}:host([hidden]){display:none}";
|
|
38
38
|
|
|
39
39
|
const MgMenuItem = /*@__PURE__*/ proxyCustomElement(class MgMenuItem extends HTMLElement {
|
|
40
|
-
constructor() {
|
|
40
|
+
constructor(registerHost) {
|
|
41
41
|
super();
|
|
42
|
-
|
|
42
|
+
if (registerHost !== false) {
|
|
43
|
+
this.__registerHost();
|
|
44
|
+
}
|
|
43
45
|
this.__attachShadow();
|
|
44
46
|
this.itemLoaded = createEvent(this, "item-loaded", 7);
|
|
45
47
|
this.itemUpdated = createEvent(this, "item-updated", 7);
|
|
@@ -15,9 +15,11 @@ const variantStyles = ['bar-left', 'background'];
|
|
|
15
15
|
const mgMessageCss = "/*!\n * @prop --mg-c-message-border-radius: Defines the border radius of the message. Default value: `--mg-b-size-radius`.\n */:host{--mg-c-card-spacing:0;--mg-c-card-border-radius:var(--mg-c-message-border-radius);--mg-c-card-border:none;--mg-c-card-overflow:hidden}.mg-c-message{display:inline-block;min-height:var(--mg-b-size-min-height)}.mg-c-message.mg-c-message--danger .mg-c-message__icon{color:var(--mg-b-color-danger)}.mg-c-message.mg-c-message--danger.mg-c-message--bar-left .mg-c-message__bar{background-color:var(--mg-b-color-danger)}.mg-c-message.mg-c-message--danger.mg-c-message--background{--mg-c-card-color-background:var(--mg-b-color-red-20, color-mix(in srgb, var(--mg-b-color-danger), white 80%))}.mg-c-message.mg-c-message--info .mg-c-message__icon{color:var(--mg-b-color-info)}.mg-c-message.mg-c-message--info.mg-c-message--bar-left .mg-c-message__bar{background-color:var(--mg-b-color-info)}.mg-c-message.mg-c-message--info.mg-c-message--background{--mg-c-card-color-background:var(--mg-b-color-blue-20, color-mix(in srgb, var(--mg-b-color-info), white 80%))}.mg-c-message.mg-c-message--success .mg-c-message__icon{color:var(--mg-b-color-success)}.mg-c-message.mg-c-message--success.mg-c-message--bar-left .mg-c-message__bar{background-color:var(--mg-b-color-success)}.mg-c-message.mg-c-message--success.mg-c-message--background{--mg-c-card-color-background:var(--mg-b-color-green-20, color-mix(in srgb, var(--mg-b-color-success), white 80%))}.mg-c-message.mg-c-message--warning .mg-c-message__icon{color:var(--mg-b-color-warning)}.mg-c-message.mg-c-message--warning.mg-c-message--bar-left .mg-c-message__bar{background-color:var(--mg-b-color-warning)}.mg-c-message.mg-c-message--warning.mg-c-message--background{--mg-c-card-color-background:var(--mg-b-color-yellow-20, color-mix(in srgb, var(--mg-b-color-warning), white 80%))}.mg-c-message ::slotted(*){padding:0;margin:0}.mg-c-message__icon{position:absolute;top:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2);left:calc(var(--mg-b-size-4) + var(--mg-b-size-8));line-height:1}.mg-c-message__content{display:flex;flex-wrap:wrap;padding:0 var(--mg-b-size-8) 0 calc(var(--mg-b-size-4) + var(--mg-b-size-8) + var(--mg-b-size-16) + var(--mg-b-size-8));place-content:stretch flex-end}.mg-c-message__content-slot{flex-grow:1;margin:var(--mg-b-size-8) 0}.mg-c-message__content-separator{display:inline-block;width:var(--mg-b-size-40);height:0}.mg-c-message__content-actions-slot{padding:var(--mg-b-size-8) 0;text-align:right}.mg-c-message__bar{position:absolute;top:0;left:0;width:var(--mg-b-size-4);height:100%}.mg-c-message ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border:var(--mg-c-card-border-default);--mg-c-card-spacing:var(--mg-c-card-spacing-default);--mg-c-card-border-radius:var(--mg-c-card-border-radius-default);--mg-c-card-color-background:var(--mg-c-card-color-background-default);--mg-c-card-box-shadow:var(--mg-c-card-box-shadow-default);--mg-c-card-max-width:unset;--mg-c-card-min-width:unset}.mg-c-message,.mg-c-message mg-message{max-width:100%}";
|
|
16
16
|
|
|
17
17
|
const MgMessage = /*@__PURE__*/ proxyCustomElement(class MgMessage extends HTMLElement {
|
|
18
|
-
constructor() {
|
|
18
|
+
constructor(registerHost) {
|
|
19
19
|
super();
|
|
20
|
-
|
|
20
|
+
if (registerHost !== false) {
|
|
21
|
+
this.__registerHost();
|
|
22
|
+
}
|
|
21
23
|
this.__attachShadow();
|
|
22
24
|
/************
|
|
23
25
|
* Internal *
|
|
@@ -96,9 +98,9 @@ const MgMessage = /*@__PURE__*/ proxyCustomElement(class MgMessage extends HTMLE
|
|
|
96
98
|
* @returns HTML Element
|
|
97
99
|
*/
|
|
98
100
|
render() {
|
|
99
|
-
return (h("div", { key: '
|
|
101
|
+
return (h("div", { key: 'f99bf527eb2c6005eeaec11f89aaa08f8865ea57', class: this.classCollection.join() }, h("mg-card", { key: 'beede3cd97b022d947c216b6bba454a104ba5790', shadow: true }, this.variantStyle === 'bar-left' && h("span", { key: '515828d725a996c9d57b39ad75e9373150a1b78a', class: "mg-c-message__bar" }), h("span", { key: '02ae41c66af25c2611b9b6cb8c87a1ad99346fa3', class: "mg-c-message__icon" }, h("mg-icon", { key: '3eadb40ed0dfa5ec51155608a67769c5fee3d402', icon: this.getIcon() })), h("div", { key: 'b832251e8f330d00b512bcd508ae9bf6e5f511cb', class: "mg-c-message__content" }, h("span", { key: 'c3520fc49bd5c3c187a83823050ceb9ca8c12d46', class: "mg-c-message__content-slot" }, h("slot", { key: 'f4064dff9536cbb76e45c5c4c1a89621da9531b2' })), this.hasActions && [
|
|
100
102
|
h("span", { class: "mg-c-message__content-separator", key: "content-separator" }),
|
|
101
|
-
h("span", { class: "mg-c-message__content-actions-slot", key: "content-actions-slot" }, h("slot", { key: '
|
|
103
|
+
h("span", { class: "mg-c-message__content-actions-slot", key: "content-actions-slot" }, h("slot", { key: '5585f7c14c2c3896cfdb5319414cd82f4d4b3a8b', name: "actions" })),
|
|
102
104
|
]))));
|
|
103
105
|
}
|
|
104
106
|
get element() { return this; }
|
|
@@ -13,9 +13,11 @@ const dialogRoles = ['dialog', 'alertdialog'];
|
|
|
13
13
|
const mgModalCss = "/*!\n * @prop --mg-c-modal-border-radius: Defines the border radius of the modal. Default value: `--mg-b-size-radius`.\n * @prop --mg-c-modal-title-font-size: Defines the font size of the modal title. Default value: `--mg-b-font-size-h3`.\n */:host{--mg-c-card-border-radius:var(--mg-c-modal-border-radius);--mg-c-card-spacing:var(--mg-b-size-16) var(--mg-b-size-24);--mg-c-card-border:none}.mg-c-modal{border:none;background:none;color:inherit}.mg-c-modal[open]{display:flex;padding:var(--mg-b-size-24) var(--mg-b-size-8)}.mg-c-modal::backdrop{background-color:var(--mg-b-color-light);opacity:.85}.mg-c-modal mg-card{display:flex;width:calc(75*var(--mg-b-size-8));max-width:100%;max-height:100%}.mg-c-modal__dialog{position:relative;display:flex;height:fit-content;max-height:100%;flex-direction:column;align-self:center;row-gap:var(--mg-b-size-24)}.mg-c-modal__title{margin:0;font-family:var(--mg-b-font-family-heading);font-size:var(--mg-c-modal-title-font-size);font-weight:600}.mg-c-modal__close-button{height:var(--mg-c-modal-title-font-size);margin-top:calc((var(--mg-b-size-min-height) - var(--mg-c-modal-title-font-size)*var(--mg-b-line-height))/2*-1);margin-right:calc((var(--mg-b-size-min-height) - var(--mg-b-size-16))/2*-1);margin-left:var(--mg-b-size-16);float:right}.mg-c-modal__content{padding:var(--mg-b-size-16);margin:calc(var(--mg-b-size-16)*-1);overflow-y:auto}.mg-c-modal ::slotted(*:not(mg-panel,mg-message,mg-modal)){--mg-c-card-border:var(--mg-c-card-border-default);--mg-c-card-spacing:var(--mg-c-card-spacing-default);--mg-c-card-border-radius:var(--mg-c-card-border-radius-default);--mg-c-card-color-background:var(--mg-c-card-color-background-default);--mg-c-card-box-shadow:var(--mg-c-card-box-shadow-default);--mg-c-card-max-width:unset;--mg-c-card-min-width:unset}";
|
|
14
14
|
|
|
15
15
|
const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class MgModal extends HTMLElement {
|
|
16
|
-
constructor() {
|
|
16
|
+
constructor(registerHost) {
|
|
17
17
|
super();
|
|
18
|
-
|
|
18
|
+
if (registerHost !== false) {
|
|
19
|
+
this.__registerHost();
|
|
20
|
+
}
|
|
19
21
|
this.__attachShadow();
|
|
20
22
|
this.componentShow = createEvent(this, "component-show", 7);
|
|
21
23
|
this.componentHide = createEvent(this, "component-hide", 7);
|
|
@@ -118,11 +120,11 @@ const MgModal$1 = /*@__PURE__*/ proxyCustomElement(class MgModal extends HTMLEle
|
|
|
118
120
|
* @returns HTML Element
|
|
119
121
|
*/
|
|
120
122
|
render() {
|
|
121
|
-
return (h("dialog", { key: '
|
|
123
|
+
return (h("dialog", { key: '2d99322fd3c80b8cbfea70589cf579e0c1c6f06b', role: this.dialogRole, id: this.identifier, class: this.classCollection.join(), "aria-labelledby": this.titleId, ref: (el) => {
|
|
122
124
|
if (el !== null) {
|
|
123
125
|
this.dialog = el;
|
|
124
126
|
}
|
|
125
|
-
} }, h("mg-card", { key: '
|
|
127
|
+
} }, h("mg-card", { key: '32692a6d41ef30b3d3e61ddcfea47350d374ed09', shadow: true }, h("div", { key: 'c87bb43bb069671b65a9759ee293e77975707597', class: "mg-c-modal__dialog" }, h("header", { key: '1272a946878efcf8c69f3b09852ba6938cbe31b0', class: "mg-c-modal__header" }, this.closeButton && (h("span", { key: '0704656c7c5ac4c8d405f2cd673e91f72763ee8f', class: "mg-c-modal__close-button" }, h("mg-button", { key: '4402971c763ee34145de5bd69d367fde68f9d1a2', "is-icon": true, variant: "flat", label: this.messages.modal.closeButton, onClick: this.handleClose }, h("mg-icon", { key: '9e16add6a3e387971507a252671c895b6c94a586', icon: "cross" })))), h("h1", { key: '3e4fc2b4419398528565d382b728b8b752758ddd', class: "mg-c-modal__title", id: this.titleId }, this.modalTitle)), h("article", { key: '170ff6bd9592687baa4c561615f540ad1c7400e4', class: "mg-c-modal__content" }, h("slot", { key: 'cb710e2a57e4c997deac367169b56047af1200b1' })), this.hasActions && (h("footer", { key: '1e08d67caeaaaf75eb97faa11528719ea537c24c', class: "mg-c-modal__footer" }, h("slot", { key: '461ec8e4117477aef08dc6d346ad0bf6007ec12d', name: "actions" })))))));
|
|
126
128
|
}
|
|
127
129
|
get element() { return this; }
|
|
128
130
|
static get watchers() { return {
|
|
@@ -39,9 +39,11 @@ const mgPaginationCss = ".mg-u-visually-hidden{position:absolute !important;over
|
|
|
39
39
|
*/
|
|
40
40
|
const range = (start, end, step = 1) => Array.from(Array(Math.ceil((end + 1 - start) / step)).keys()).map(x => start + x * step);
|
|
41
41
|
const MgPagination$1 = /*@__PURE__*/ proxyCustomElement(class MgPagination extends HTMLElement {
|
|
42
|
-
constructor() {
|
|
42
|
+
constructor(registerHost) {
|
|
43
43
|
super();
|
|
44
|
-
|
|
44
|
+
if (registerHost !== false) {
|
|
45
|
+
this.__registerHost();
|
|
46
|
+
}
|
|
45
47
|
this.__attachShadow();
|
|
46
48
|
this.currentPageChange = createEvent(this, "current-page-change", 7);
|
|
47
49
|
/**
|