@mgdis/mg-components 5.5.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-c3450336.js → index-5e7ede97.js} +120 -4
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/{mg-badge_30.cjs.entry.js → mg-action-more_31.cjs.entry.js} +1223 -547
- package/dist/cjs/mg-components.cjs.js +7 -3
- package/dist/collection/collection-manifest.json +6 -5
- package/dist/collection/components/atoms/mg-badge/mg-badge.conf.js +1 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.css +13 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +4 -4
- package/dist/collection/components/atoms/mg-button/mg-button.css +9 -22
- package/dist/collection/components/atoms/mg-button/mg-button.js +1 -1
- package/dist/collection/components/atoms/mg-card/mg-card.css +13 -6
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +38 -28
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +3 -3
- package/dist/collection/components/atoms/mg-tag/mg-tag.css +6 -6
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +4 -4
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.css +2 -0
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +14 -17
- package/dist/collection/components/molecules/inputs/MgInput.js +6 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +4 -3
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +7 -3
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +5 -2
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +7 -3
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +7 -3
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +4 -3
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +2 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +7 -3
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +8 -4
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +7 -3
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +7 -3
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +4 -4
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.conf.js +17 -0
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.css +27 -0
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +141 -19
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.conf.js +0 -4
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +48 -21
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +139 -71
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.conf.js +1 -0
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.css +38 -0
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +252 -0
- package/dist/collection/components/molecules/mg-form/mg-form.js +2 -2
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +4 -3
- package/dist/collection/components/molecules/mg-message/mg-message.css +7 -0
- package/dist/collection/components/molecules/mg-message/mg-message.js +54 -13
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +8 -1
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +19 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +7 -0
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +2 -2
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +72 -15
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +64 -7
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +33 -1
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.css +12 -7
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +105 -57
- package/dist/collection/locales/en/messages.json +10 -1
- package/dist/collection/locales/fr/messages.json +10 -1
- package/dist/collection/locales/index.js +3 -26
- package/dist/collection/styles/a11y.scss +32 -0
- package/dist/collection/styles/components.scss +3 -0
- package/dist/collection/styles/fonts.scss +21 -0
- package/dist/collection/styles/form.scss +3 -0
- package/dist/collection/styles/global.scss +87 -0
- package/dist/collection/styles/layout.scss +29 -0
- package/dist/collection/styles/main.scss +23 -0
- package/dist/collection/styles/mg-icon-animation.scss +6 -0
- package/dist/collection/styles/navigation-button.scss +77 -0
- package/dist/collection/styles/reset-mg-card-slotted-variables.scss +9 -0
- package/dist/collection/styles/typography.scss +75 -0
- package/dist/collection/styles/utilities.scss +21 -0
- package/dist/collection/utils/behaviors.utils.js +151 -0
- package/dist/collection/utils/components.utils.js +52 -0
- package/dist/collection/utils/locale.utils.js +28 -6
- package/dist/collection/utils/unit.test.utils.js +65 -32
- package/dist/collection/variables.css +11 -10
- package/dist/components/MgInput.js +6 -1
- package/dist/components/components.utils.js +53 -1
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.js +2 -1
- package/dist/components/index2.js +79 -20
- package/dist/components/mg-action-more.d.ts +11 -0
- package/dist/components/mg-action-more.js +215 -0
- package/dist/components/mg-badge2.js +5 -5
- package/dist/components/mg-button2.js +2 -2
- package/dist/components/mg-card2.js +1 -1
- package/dist/components/mg-form.js +2 -2
- package/dist/components/mg-icon2.js +41 -31
- package/dist/components/mg-illustrated-message.js +4 -3
- package/dist/components/mg-input-checkbox.js +3 -3
- package/dist/components/mg-input-date.js +7 -5
- package/dist/components/mg-input-numeric.js +3 -4
- package/dist/components/mg-input-password.js +1 -1
- package/dist/components/mg-input-radio.js +2 -2
- package/dist/components/mg-input-select2.js +9 -5
- package/dist/components/mg-input-text2.js +1 -1
- package/dist/components/mg-input-textarea.js +2 -2
- package/dist/components/mg-input-toggle.js +1 -1
- package/dist/components/mg-menu-item.js +1 -253
- package/dist/components/mg-menu-item2.js +520 -0
- package/dist/components/mg-menu.js +1 -129
- package/dist/components/mg-menu2.js +247 -0
- package/dist/components/mg-message.js +55 -14
- package/dist/components/mg-modal.js +1 -1
- package/dist/components/mg-pagination.js +3 -1
- package/dist/components/mg-panel.js +3 -3
- package/dist/components/mg-popover.js +1 -190
- package/dist/components/mg-popover2.js +226 -0
- package/dist/components/mg-skip-links.js +16 -2
- package/dist/components/mg-tabs.js +104 -55
- package/dist/components/mg-tag.js +5 -5
- package/dist/components/mg-tooltip2.js +15 -18
- package/dist/esm/{index-78edde1d.js → index-03cceb11.js} +120 -5
- package/dist/esm/loader.js +4 -3
- package/dist/esm/{mg-badge_30.entry.js → mg-action-more_31.entry.js} +1223 -548
- package/dist/esm/mg-components.js +4 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/mg-components/locales/en/messages.json +10 -1
- package/dist/mg-components/locales/fr/messages.json +10 -1
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/p-4cfd5423.entry.js +1 -0
- package/dist/mg-components/p-e126dd84.js +2 -0
- package/dist/mg-components/styles/a11y.scss +32 -0
- package/dist/mg-components/styles/components.scss +3 -0
- package/dist/mg-components/styles/fonts.scss +21 -0
- package/dist/mg-components/styles/form.scss +3 -0
- package/dist/mg-components/styles/global.scss +87 -0
- package/dist/mg-components/styles/layout.scss +29 -0
- package/dist/mg-components/styles/main.scss +23 -0
- package/dist/mg-components/styles/mg-icon-animation.scss +6 -0
- package/dist/mg-components/styles/navigation-button.scss +77 -0
- package/dist/mg-components/styles/reset-mg-card-slotted-variables.scss +9 -0
- package/dist/mg-components/styles/typography.scss +75 -0
- package/dist/mg-components/styles/utilities.scss +21 -0
- package/dist/mg-components/variables.css +11 -10
- package/dist/types/components/atoms/mg-badge/mg-badge.conf.d.ts +2 -2
- package/dist/types/components/atoms/mg-button/mg-button.conf.d.ts +2 -2
- package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +2 -2
- package/dist/types/components/atoms/mg-tag/mg-tag.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/MgInput.conf.d.ts +2 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +2 -2
- package/dist/types/components/molecules/inputs/mg-input-radio/mg-input-radio.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.conf.d.ts +2 -2
- package/dist/types/components/molecules/inputs/mg-input-textarea/mg-input-textarea.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-toggle/mg-input-toggle.conf.d.ts +1 -1
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.conf.d.ts +37 -0
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +51 -3
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.conf.d.ts +0 -8
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +61 -15
- package/dist/types/components/molecules/mg-action-more/mg-action-more.conf.d.ts +42 -0
- package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +81 -0
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +21 -4
- package/dist/types/components/molecules/mg-pagination/mg-pagination.d.ts +4 -0
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +13 -0
- package/dist/types/components/molecules/mg-skip-links/mg-skip-links.conf.d.ts +1 -1
- package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +15 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +5 -3
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +22 -12
- package/dist/types/components.d.ts +98 -12
- package/dist/types/locales/index.d.ts +21 -10
- package/dist/types/stencil-public-runtime.d.ts +48 -3
- package/dist/types/utils/behaviors.utils.d.ts +77 -0
- package/dist/types/utils/components.utils.d.ts +14 -0
- package/dist/types/utils/locale.utils.d.ts +16 -3
- package/dist/types/utils/unit.test.utils.d.ts +68 -14
- package/loader/index.d.ts +9 -0
- package/package.json +28 -27
- package/readme.md +22 -31
- package/dist/.storybook/utils.js +0 -24
- package/dist/collection/components/atoms/mg-badge/doc/mg-badge.stories.js +0 -27
- package/dist/collection/components/atoms/mg-button/doc/mg-button.stories.js +0 -38
- package/dist/collection/components/atoms/mg-card/doc/mg-card.stories.js +0 -18
- package/dist/collection/components/atoms/mg-character-left/doc/mg-character-left.stories.js +0 -20
- package/dist/collection/components/atoms/mg-divider/doc/mg-divider.stories.js +0 -18
- package/dist/collection/components/atoms/mg-icon/doc/mg-icon.stories.js +0 -41
- package/dist/collection/components/atoms/mg-input-title/doc/mg-input-title.stories.js +0 -21
- package/dist/collection/components/atoms/mg-tag/doc/mg-tag.stories.js +0 -22
- package/dist/collection/components/atoms/mg-tooltip/doc/mg-tooltip.stories.js +0 -50
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/doc/mg-input-checkbox.stories.js +0 -50
- package/dist/collection/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.js +0 -43
- package/dist/collection/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.js +0 -68
- package/dist/collection/components/molecules/inputs/mg-input-password/doc/mg-input-password.stories.js +0 -46
- package/dist/collection/components/molecules/inputs/mg-input-radio/doc/mg-input-radio.stories.js +0 -59
- package/dist/collection/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.js +0 -77
- package/dist/collection/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.js +0 -110
- package/dist/collection/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.js +0 -54
- package/dist/collection/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.js +0 -51
- package/dist/collection/components/molecules/menu/mg-menu/doc/mg-menu.stories.js +0 -87
- package/dist/collection/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.js +0 -39
- package/dist/collection/components/molecules/mg-details/doc/mg-details.stories.js +0 -24
- package/dist/collection/components/molecules/mg-form/doc/mg-form.stories.js +0 -47
- package/dist/collection/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.js +0 -19
- package/dist/collection/components/molecules/mg-message/doc/mg-message.stories.js +0 -39
- package/dist/collection/components/molecules/mg-modal/doc/mg-modal.stories.js +0 -39
- package/dist/collection/components/molecules/mg-pagination/doc/mg-pagination.stories.js +0 -20
- package/dist/collection/components/molecules/mg-panel/doc/mg-panel.stories.js +0 -22
- package/dist/collection/components/molecules/mg-popover/doc/mg-popover.stories.js +0 -34
- package/dist/collection/components/molecules/mg-skip-links/doc/mg-skip-links.stories.js +0 -24
- package/dist/collection/components/molecules/mg-tabs/doc/mg-tabs.stories.js +0 -51
- package/dist/collection/stories/grids.stories.js +0 -7
- package/dist/collection/stories/helpers.stories.js +0 -23
- package/dist/collection/stories/icons.stories.js +0 -25
- package/dist/collection/stories/typography.stories.js +0 -24
- package/dist/components/locale.utils.js +0 -40
- package/dist/components/mg-menu.conf.js +0 -10
- package/dist/mg-components/p-125c54ca.js +0 -2
- package/dist/mg-components/p-4961c96c.entry.js +0 -1
- package/dist/types/components/atoms/mg-badge/doc/mg-badge.stories.d.ts +0 -13
- package/dist/types/components/atoms/mg-button/doc/mg-button.stories.d.ts +0 -16
- package/dist/types/components/atoms/mg-card/doc/mg-card.stories.d.ts +0 -6
- package/dist/types/components/atoms/mg-character-left/doc/mg-character-left.stories.d.ts +0 -6
- package/dist/types/components/atoms/mg-divider/doc/mg-divider.stories.d.ts +0 -6
- package/dist/types/components/atoms/mg-icon/doc/mg-icon.stories.d.ts +0 -26
- package/dist/types/components/atoms/mg-input-title/doc/mg-input-title.stories.d.ts +0 -6
- package/dist/types/components/atoms/mg-tag/doc/mg-tag.stories.d.ts +0 -6
- package/dist/types/components/atoms/mg-tooltip/doc/mg-tooltip.stories.d.ts +0 -18
- package/dist/types/components/molecules/inputs/mg-input-checkbox/doc/mg-input-checkbox.stories.d.ts +0 -11
- package/dist/types/components/molecules/inputs/mg-input-date/doc/mg-input-date.stories.d.ts +0 -12
- package/dist/types/components/molecules/inputs/mg-input-numeric/doc/mg-input-numeric.stories.d.ts +0 -32
- package/dist/types/components/molecules/inputs/mg-input-password/doc/mg-input-password.stories.d.ts +0 -22
- package/dist/types/components/molecules/inputs/mg-input-radio/doc/mg-input-radio.stories.d.ts +0 -20
- package/dist/types/components/molecules/inputs/mg-input-select/doc/mg-input-select.stories.d.ts +0 -34
- package/dist/types/components/molecules/inputs/mg-input-text/doc/mg-input-text.stories.d.ts +0 -39
- package/dist/types/components/molecules/inputs/mg-input-textarea/doc/mg-input-textarea.stories.d.ts +0 -19
- package/dist/types/components/molecules/inputs/mg-input-toggle/doc/mg-input-toggle.stories.d.ts +0 -12
- package/dist/types/components/molecules/menu/mg-menu/doc/mg-menu.stories.d.ts +0 -17
- package/dist/types/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.d.ts +0 -12
- package/dist/types/components/molecules/mg-details/doc/mg-details.stories.d.ts +0 -11
- package/dist/types/components/molecules/mg-form/doc/mg-form.stories.d.ts +0 -11
- package/dist/types/components/molecules/mg-illustrated-message/doc/mg-illustrated-message.stories.d.ts +0 -6
- package/dist/types/components/molecules/mg-message/doc/mg-message.stories.d.ts +0 -26
- package/dist/types/components/molecules/mg-modal/doc/mg-modal.stories.d.ts +0 -13
- package/dist/types/components/molecules/mg-pagination/doc/mg-pagination.stories.d.ts +0 -11
- package/dist/types/components/molecules/mg-panel/doc/mg-panel.stories.d.ts +0 -11
- package/dist/types/components/molecules/mg-popover/doc/mg-popover.stories.d.ts +0 -22
- package/dist/types/components/molecules/mg-skip-links/doc/mg-skip-links.stories.d.ts +0 -11
- package/dist/types/components/molecules/mg-tabs/doc/mg-tabs.stories.d.ts +0 -20
- package/dist/types/home/runner/work/mg-components/mg-components/.stencil/.storybook/utils.d.ts +0 -1
- package/dist/types/stories/grids.stories.d.ts +0 -5
- package/dist/types/stories/helpers.stories.d.ts +0 -13
- package/dist/types/stories/icons.stories.d.ts +0 -13
- package/dist/types/stories/typography.stories.d.ts +0 -5
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
let e,t,n,l=!1,o=!1,s=!1,i=!1,r=!1;const c="http://www.w3.org/1999/xlink",f={},u=e=>"object"==(e=typeof e)||"function"===e;function a(e){var t,n,l;return null!==(l=null===(n=null===(t=e.head)||void 0===t?void 0:t.querySelector('meta[name="csp-nonce"]'))||void 0===n?void 0:n.getAttribute("content"))&&void 0!==l?l:void 0}const d=(e,t,...n)=>{let l=null,o=null,s=null,i=!1,r=!1;const c=[],f=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!u(l))&&(l+=""),i&&r?c[c.length-1].t+=l:c.push(i?$(null,l):l),r=i)};if(f(n),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,m);const a=$(e,null);return a.l=t,c.length>0&&(a.o=c),a.i=o,a.u=s,a},$=(e,t)=>({$:0,h:e,t,m:null,o:null,l:null,i:null,u:null}),h={},m={forEach:(e,t)=>e.map(p).forEach(t),map:(e,t)=>e.map(p).map(t).map(y)},p=e=>({vattrs:e.l,vchildren:e.o,vkey:e.i,vname:e.u,vtag:e.h,vtext:e.t}),y=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),d(e.vtag,t,...e.vchildren||[])}const t=$(e.vtag,e.vtext);return t.l=e.vattrs,t.o=e.vchildren,t.i=e.vkey,t.u=e.vname,t},b=e=>oe(e).p,v=(e,t,n)=>{const l=b(e);return{emit:e=>w(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},w=(e,t,n)=>{const l=he.ce(t,n);return e.dispatchEvent(l),l},g=new WeakMap,k=e=>"sc-"+e.v,j=(e,t,n,l,o,s)=>{if(n!==l){let i=re(e,t),r=t.toLowerCase();if("class"===t){const t=e.classList,o=O(n),s=O(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const f=u(l);if((i||f&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}let a=!1;r!==(r=r.replace(/^xlink\:?/,""))&&(t=r,a=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(a?e.removeAttributeNS(c,t):e.removeAttribute(t)):(!i||4&s||o)&&!f&&(l=!0===l?"":l,a?e.setAttributeNS(c,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):re(de,r)?r.slice(2):r[2]+t.slice(3),n&&he.rel(e,t,n,!1),l&&he.ael(e,t,l,!1)}},S=/\s/,O=e=>e?e.split(S):[],M=(e,t,n,l)=>{const o=11===t.m.nodeType&&t.m.host?t.m.host:t.m,s=e&&e.l||f,i=t.l||f;for(l in s)l in i||j(o,l,s[l],void 0,n,t.$);for(l in i)j(o,l,s[l],i[l],n,t.$)},x=(o,r,c,f)=>{const u=r.o[c];let a,d,$,h=0;if(l||(s=!0,"slot"===u.h&&(e&&f.classList.add(e+"-s"),u.$|=u.o?2:1)),null!==u.t)a=u.m=$e.createTextNode(u.t);else if(1&u.$)a=u.m=$e.createTextNode("");else{if(i||(i="svg"===u.h),a=u.m=$e.createElementNS(i?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",2&u.$?"slot-fb":u.h),i&&"foreignObject"===u.h&&(i=!1),M(null,u,i),null!=e&&a["s-si"]!==e&&a.classList.add(a["s-si"]=e),u.o)for(h=0;h<u.o.length;++h)d=x(o,u,h,a),d&&a.appendChild(d);"svg"===u.h?i=!1:"foreignObject"===a.tagName&&(i=!0)}return a["s-hn"]=n,3&u.$&&(a["s-sr"]=!0,a["s-cr"]=t,a["s-sn"]=u.u||"",$=o&&o.o&&o.o[c],$&&$.h===u.h&&o.m&&C(o.m,!1)),a},C=(e,t)=>{he.$|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const o=l[e];o["s-hn"]!==n&&o["s-ol"]&&(L(o).insertBefore(o,E(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&C(o,t)}he.$&=-2},R=(e,t,l,o,s,i)=>{let r,c=e["s-cr"]&&e["s-cr"].parentNode||e;for(c.shadowRoot&&c.tagName===n&&(c=c.shadowRoot);s<=i;++s)o[s]&&(r=x(null,l,s,e),r&&(o[s].m=r,c.insertBefore(r,E(t))))},P=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,H(l),o=!0,s["s-ol"]?s["s-ol"].remove():C(s,!0),s.remove())},T=(e,t)=>e.h===t.h&&("slot"===e.h?e.u===t.u:e.i===t.i),E=e=>e&&e["s-ol"]||e,L=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,N=(e,t)=>{const n=t.m=e.m,l=e.o,o=t.o,s=t.h,r=t.t;let c;null===r?(i="svg"===s||"foreignObject"!==s&&i,"slot"===s||M(e,t,i),null!==l&&null!==o?((e,t,n,l)=>{let o,s,i=0,r=0,c=0,f=0,u=t.length-1,a=t[0],d=t[u],$=l.length-1,h=l[0],m=l[$];for(;i<=u&&r<=$;)if(null==a)a=t[++i];else if(null==d)d=t[--u];else if(null==h)h=l[++r];else if(null==m)m=l[--$];else if(T(a,h))N(a,h),a=t[++i],h=l[++r];else if(T(d,m))N(d,m),d=t[--u],m=l[--$];else if(T(a,m))"slot"!==a.h&&"slot"!==m.h||C(a.m.parentNode,!1),N(a,m),e.insertBefore(a.m,d.m.nextSibling),a=t[++i],m=l[--$];else if(T(d,h))"slot"!==a.h&&"slot"!==m.h||C(d.m.parentNode,!1),N(d,h),e.insertBefore(d.m,a.m),d=t[--u],h=l[++r];else{for(c=-1,f=i;f<=u;++f)if(t[f]&&null!==t[f].i&&t[f].i===h.i){c=f;break}c>=0?(s=t[c],s.h!==h.h?o=x(t&&t[r],n,c,e):(N(s,h),t[c]=void 0,o=s.m),h=l[++r]):(o=x(t&&t[r],n,r,e),h=l[++r]),o&&L(a.m).insertBefore(o,E(a.m))}i>u?R(e,null==l[$+1]?null:l[$+1].m,n,l,r,$):r>$&&P(t,i,u)})(n,l,t,o):null!==o?(null!==e.t&&(n.textContent=""),R(n,null,t,o,0,o.length-1)):null!==l&&P(l,0,l.length-1),i&&"svg"===s&&(i=!1)):(c=n["s-cr"])?c.parentNode.textContent=r:e.t!==r&&(n.data=r)},W=e=>{const t=e.childNodes;let n,l,o,s,i,r;for(l=0,o=t.length;l<o;l++)if(n=t[l],1===n.nodeType){if(n["s-sr"])for(i=n["s-sn"],n.hidden=!1,s=0;s<o;s++)if(r=t[s].nodeType,t[s]["s-hn"]!==n["s-hn"]||""!==i){if(1===r&&i===t[s].getAttribute("slot")){n.hidden=!0;break}}else if(1===r||3===r&&""!==t[s].textContent.trim()){n.hidden=!0;break}W(n)}},A=[],D=e=>{let t,n,l,s,i,r,c=0;const f=e.childNodes,u=f.length;for(;c<u;c++){if(t=f[c],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=t["s-sn"],r=l.length-1;r>=0;r--)n=l[r],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(F(n,s)?(i=A.find((e=>e.g===n)),o=!0,n["s-sn"]=n["s-sn"]||s,i?i.k=t:A.push({k:t,g:n}),n["s-sr"]&&A.map((e=>{F(e.g,n["s-sn"])&&(i=A.find((e=>e.g===n)),i&&!e.k&&(e.k=i.k))}))):A.some((e=>e.g===n))||A.push({g:n}));1===t.nodeType&&D(t)}},F=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,H=e=>{e.l&&e.l.ref&&e.l.ref(null),e.o&&e.o.map(H)},U=(e,t)=>{t&&!e.j&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.j=t)))},q=(e,t)=>{if(e.$|=16,!(4&e.$))return U(e,e.S),je((()=>V(e,t)));e.$|=512},V=(e,t)=>{const n=e.O;let l;return t&&(e.$|=256,e.M&&(e.M.map((([e,t])=>I(n,e,t))),e.M=null),l=I(n,"componentWillLoad")),J(l,(()=>_(e,n,t)))},_=async(e,t,n)=>{const l=e.p,o=l["s-rc"];n&&(e=>{const t=e.C,n=e.p,l=t.$,o=((e,t)=>{var n;let l=k(t);const o=ae.get(l);if(e=11===e.nodeType?e:$e,o)if("string"==typeof o){let t,s=g.get(e=e.head||e);if(s||g.set(e,s=new Set),!s.has(l)){{t=$e.createElement("style"),t.innerHTML=o;const l=null!==(n=he.R)&&void 0!==n?n:a($e);null!=l&&t.setAttribute("nonce",l),e.insertBefore(t,e.querySelector("link"))}s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"),2&l&&n.classList.add(o+"-s"))})(e);z(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>B(e);0===t.length?n():(Promise.all(t).then(n),e.$|=4,t.length=0)}},z=(i,r)=>{try{r=r.render(),i.$&=-17,i.$|=2,((i,r)=>{const c=i.p,f=i.C,u=i.P||$(null,null),a=(e=>e&&e.h===h)(r)?r:d(null,null,r);if(n=c.tagName,f.T&&(a.l=a.l||{},f.T.map((([e,t])=>a.l[t]=c[e]))),a.h=null,a.$|=4,i.P=a,a.m=u.m=c.shadowRoot||c,e=c["s-sc"],t=c["s-cr"],l=0!=(1&f.$),o=!1,N(u,a),he.$|=1,s){let e,t,n,l,o,s;D(a.m);let i=0;for(;i<A.length;i++)e=A[i],t=e.g,t["s-ol"]||(n=$e.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(i=0;i<A.length;i++)if(e=A[i],t=e.g,e.k){for(l=e.k.parentNode,o=e.k.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&W(a.m),he.$&=-2,A.length=0})(i,r)}catch(e){ce(e,i.p)}return null},B=e=>{const t=e.p,n=e.O,l=e.S;I(n,"componentDidRender"),64&e.$||(e.$|=64,K(t),I(n,"componentDidLoad"),e.L(t),l||G()),e.N(t),e.j&&(e.j(),e.j=void 0),512&e.$&&ke((()=>q(e,!1))),e.$&=-517},G=()=>{K($e.documentElement),ke((()=>w(de,"appload",{detail:{namespace:"mg-components"}})))},I=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ce(e)}},J=(e,t)=>e&&e.then?e.then(t):t(),K=e=>e.classList.add("hydrated"),Q=(e,t,n)=>{if(t.W){e.watchers&&(t.A=e.watchers);const l=Object.entries(t.W),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>oe(this).D.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=oe(e),s=o.p,i=o.D.get(t),r=o.$,c=o.O;if(n=((e,t)=>null==e||u(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.W[t][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(o.D.set(t,n),c)){if(l.A&&128&r){const e=l.A[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){ce(e,s)}}))}2==(18&r)&&q(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=oe(this);return n.F.then((()=>n.O[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){he.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.T.push([e,o]),o}))}}return e},X=(e,t={})=>{var n;const l=[],o=t.exclude||[],s=de.customElements,i=$e.head,r=i.querySelector("meta[charset]"),c=$e.createElement("style"),f=[];let u,d=!0;Object.assign(he,t),he.H=new URL(t.resourcesUrl||"./",$e.baseURI).href,e.map((e=>{e[1].map((t=>{const n={$:t[0],v:t[1],W:t[2],U:t[3]};n.W=t[2],n.U=t[3],n.T=[],n.A={};const i=n.v,r=class extends HTMLElement{constructor(e){super(e),ie(e=this,n),1&n.$&&e.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),d?f.push(this):he.jmp((()=>(e=>{if(0==(1&he.$)){const t=oe(e),n=t.C,l=()=>{};if(1&t.$)Y(e,t,n.U);else{t.$|=1,12&n.$&&(e=>{const t=e["s-cr"]=$e.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){U(t,t.S=n);break}}n.W&&Object.entries(n.W).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.$)){{if(t.$|=32,(o=ue(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.A=o.watchers,Q(o,n,2),o.isProxied=!0);const e=()=>{};t.$|=8;try{new o(t)}catch(e){ce(e)}t.$&=-9,t.$|=128,e()}if(o.style){let e=o.style;const t=k(n);if(!ae.has(t)){const l=()=>{};((e,t,n)=>{let l=ae.get(e);pe&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,ae.set(e,l)})(t,e,!!(1&n.$)),l()}}}const s=t.S,i=()=>q(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){he.jmp((()=>(()=>{if(0==(1&he.$)){const e=oe(this),t=e.O;e.q&&(e.q.map((e=>e())),e.q=void 0),I(t,"disconnectedCallback")}})()))}componentOnReady(){return oe(this).V}};n._=e[0],o.includes(i)||s.get(i)||(l.push(i),s.define(i,Q(r,n,1)))}))}));{c.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",c.setAttribute("data-styles","");const e=null!==(n=he.R)&&void 0!==n?n:a($e);null!=e&&c.setAttribute("nonce",e),i.insertBefore(c,r?r.nextSibling:i.firstChild)}d=!1,f.length?f.map((e=>e.connectedCallback())):he.jmp((()=>u=setTimeout(G,30)))},Y=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=ee(e,n),i=Z(t,o),r=te(n);he.ael(s,l,i,r),(t.q=t.q||[]).push((()=>he.rel(s,l,i,r)))}))},Z=(e,t)=>n=>{try{256&e.$?e.O[t](n):(e.M=e.M||[]).push([t,n])}catch(e){ce(e)}},ee=(e,t)=>8&t?de:e,te=e=>0!=(2&e),ne=e=>he.R=e,le=new WeakMap,oe=e=>le.get(e),se=(e,t)=>le.set(t.O=e,t),ie=(e,t)=>{const n={$:0,p:e,C:t,D:new Map};return n.F=new Promise((e=>n.N=e)),n.V=new Promise((e=>n.L=e)),e["s-p"]=[],e["s-rc"]=[],Y(e,n,t.U),le.set(e,n)},re=(e,t)=>t in e,ce=(e,t)=>(0,console.error)(e,t),fe=new Map,ue=e=>{const t=e.v.replace(/-/g,"_"),n=e._,l=fe.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(fe.set(n,e),e[t])),ce)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},ae=new Map,de="undefined"!=typeof window?window:{},$e=de.document||{head:{}},he={$:0,H:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},me=e=>Promise.resolve(e),pe=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),ye=[],be=[],ve=(e,t)=>n=>{e.push(n),r||(r=!0,t&&4&he.$?ke(ge):he.raf(ge))},we=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ce(e)}e.length=0},ge=()=>{we(ye),we(be),(r=ye.length>0)&&he.raf(ge)},ke=e=>me().then(e),je=ve(be,!0);export{h as H,X as b,v as c,b as g,d as h,me as p,se as r,ne as s}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A11Y
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Make content available only for screen reader
|
|
6
|
+
// https://gist.github.com/ffoodd/000b59f431e3e64e4ce1a24d5bb36034
|
|
7
|
+
.sr-only {
|
|
8
|
+
border: 0 !important;
|
|
9
|
+
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
10
|
+
-webkit-clip-path: inset(50%) !important;
|
|
11
|
+
clip-path: inset(50%) !important;
|
|
12
|
+
height: 1px !important;
|
|
13
|
+
margin: -1px !important;
|
|
14
|
+
overflow: hidden !important;
|
|
15
|
+
padding: 0 !important;
|
|
16
|
+
position: absolute !important;
|
|
17
|
+
width: 1px !important;
|
|
18
|
+
white-space: nowrap !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Remove outline for non-keyboard :focus
|
|
22
|
+
// https://www.tpgi.com/focus-visible-and-backwards-compatibility/
|
|
23
|
+
*:focus:not(:focus-visible) {
|
|
24
|
+
outline: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@media (prefers-reduced-motion) {
|
|
28
|
+
.mg-a11y-animation {
|
|
29
|
+
animation: none !important;
|
|
30
|
+
transition: none !important;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Open Sans
|
|
3
|
+
* https://fonts.google.com/specimen/Open+Sans
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@font-face {
|
|
7
|
+
font-family: 'Open Sans';
|
|
8
|
+
src: url('fonts/OpenSans-Regular.ttf') format('truetype');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@font-face {
|
|
12
|
+
font-family: 'Open Sans';
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
src: url('fonts/OpenSans-SemiBold.ttf') format('truetype');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@font-face {
|
|
18
|
+
font-family: 'Open Sans';
|
|
19
|
+
font-weight: 700;
|
|
20
|
+
src: url('fonts/OpenSans-Bold.ttf') format('truetype');
|
|
21
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Here we building the CSS for the component library
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Normalize CSS : https://necolas.github.io/normalize.css/
|
|
6
|
+
@import '~normalize.css/normalize.css';
|
|
7
|
+
|
|
8
|
+
// Fonts
|
|
9
|
+
@import './fonts.scss';
|
|
10
|
+
|
|
11
|
+
// Variables
|
|
12
|
+
@import './variables.css';
|
|
13
|
+
|
|
14
|
+
// Main style
|
|
15
|
+
@import './main.scss';
|
|
16
|
+
|
|
17
|
+
// Typography style
|
|
18
|
+
@import './typography.scss';
|
|
19
|
+
|
|
20
|
+
// Accessibility
|
|
21
|
+
@import './a11y.scss';
|
|
22
|
+
|
|
23
|
+
// Form
|
|
24
|
+
// already included by mg-form
|
|
25
|
+
// @import './form.scss';
|
|
26
|
+
|
|
27
|
+
// Layout
|
|
28
|
+
@import './layout.scss';
|
|
29
|
+
|
|
30
|
+
// Utilities
|
|
31
|
+
@import './utilities.scss';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Components style
|
|
35
|
+
* molecules
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
@import './components.scss';
|
|
39
|
+
|
|
40
|
+
/* Atoms */
|
|
41
|
+
|
|
42
|
+
// <mg-badge>
|
|
43
|
+
@import '../components/atoms/mg-badge/mg-badge.scss';
|
|
44
|
+
|
|
45
|
+
// <mg-button>
|
|
46
|
+
@import '../components/atoms/mg-button/mg-button.scss';
|
|
47
|
+
|
|
48
|
+
// <mg-character-left>
|
|
49
|
+
@import '../components/atoms/mg-character-left/mg-character-left.scss';
|
|
50
|
+
|
|
51
|
+
// <mg-icon>
|
|
52
|
+
@import '../components/atoms/mg-icon/mg-icon.scss';
|
|
53
|
+
|
|
54
|
+
// <mg-input-title>
|
|
55
|
+
//! For now input style will not be included
|
|
56
|
+
// @import '../components/atoms/mg-input-title/mg-input-title.scss';
|
|
57
|
+
|
|
58
|
+
// <mg-tag>
|
|
59
|
+
@import '../components/atoms/mg-tag/mg-tag.scss';
|
|
60
|
+
|
|
61
|
+
// <mg-tooltip>
|
|
62
|
+
@import '../components/atoms/mg-tooltip/mg-tooltip.scss';
|
|
63
|
+
|
|
64
|
+
/* Molecules */
|
|
65
|
+
|
|
66
|
+
// <mg-input-...>
|
|
67
|
+
//! For now input style will not be included
|
|
68
|
+
// @import '../components/molecules/inputs/styles/mg-input.scss';
|
|
69
|
+
// @import '../components/molecules/inputs/styles/mg-input-box.scss';
|
|
70
|
+
// @import '../components/molecules/inputs/styles/mg-input-charleft.scss';
|
|
71
|
+
// @import '../components/molecules/inputs/styles/mg-input-fieldset.scss';
|
|
72
|
+
// @import '../components/molecules/inputs/styles/mg-input-width.scss';
|
|
73
|
+
|
|
74
|
+
// <mg-form>
|
|
75
|
+
@import '../components/molecules/mg-form/mg-form.scss';
|
|
76
|
+
|
|
77
|
+
// <mg-message>
|
|
78
|
+
@import '../components/molecules/mg-message/mg-message.scss';
|
|
79
|
+
|
|
80
|
+
// <mg-pagination>
|
|
81
|
+
@import '../components/molecules/mg-pagination/mg-pagination.scss';
|
|
82
|
+
|
|
83
|
+
// <mg-popover>
|
|
84
|
+
@import '../components/molecules/mg-popover/mg-popover.scss';
|
|
85
|
+
|
|
86
|
+
// <mg-tabs>
|
|
87
|
+
@import '../components/molecules/mg-tabs/mg-tabs.scss';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
3
|
+
// Number of column
|
|
4
|
+
$grid-columns: 12;
|
|
5
|
+
|
|
6
|
+
// Calculate width
|
|
7
|
+
@function round-width($i) {
|
|
8
|
+
$width: math.div(100 * $i, $grid-columns);
|
|
9
|
+
@return #{$width}#{'%'};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.mg-grid {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-wrap: wrap;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Those columns will equaly share space
|
|
18
|
+
.mg-grid__col {
|
|
19
|
+
flex: 1 0 0;
|
|
20
|
+
padding: 0 var(--mg-grid-spacing);
|
|
21
|
+
|
|
22
|
+
// Building columns
|
|
23
|
+
@for $i from 1 through $grid-columns {
|
|
24
|
+
&.mg-grid__col-#{$i} {
|
|
25
|
+
flex: 0 0 auto;
|
|
26
|
+
width: round-width($i);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Make all element use the border box model
|
|
2
|
+
*,
|
|
3
|
+
*::before,
|
|
4
|
+
*::after {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* We set html font size to 62.5% to get 10px in most of the case.
|
|
10
|
+
* This is a common use for an easiest calculation : 1rem = 10px
|
|
11
|
+
* Default font size will be defined in body element.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
html {
|
|
15
|
+
font-size: 62.5%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
body {
|
|
19
|
+
font-size: var(--font-size);
|
|
20
|
+
font-family: var(--font-family);
|
|
21
|
+
line-height: var(--line-height);
|
|
22
|
+
-webkit-font-smoothing: antialiased;
|
|
23
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
$border-bottom-size: 0.3rem;
|
|
4
|
+
$font-size-large: calc(var(--font-size) + 0.2rem);
|
|
5
|
+
$navigation-button-column-gap: 1rem;
|
|
6
|
+
|
|
7
|
+
@mixin navigation-button($element, $button-sizes) {
|
|
8
|
+
@each $name, $size in $button-sizes {
|
|
9
|
+
.#{$element}.#{$element}--size-#{$name} .#{$element}__navigation-button,
|
|
10
|
+
.#{$element}__navigation-button.#{$element}__navigation-button--size-#{$name} {
|
|
11
|
+
padding: #{map.get($size, 'vertical')} #{map.get($size, 'horizontal')};
|
|
12
|
+
height: calc(#{map.get($size, 'height')});
|
|
13
|
+
&,
|
|
14
|
+
::slotted([slot='label']),
|
|
15
|
+
::slotted([slot='metadata']) {
|
|
16
|
+
@if $name == 'regular' {
|
|
17
|
+
font-size: var(--font-size);
|
|
18
|
+
} @else {
|
|
19
|
+
font-size: $font-size-large;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
&.#{$element}__navigation-button--horizontal {
|
|
23
|
+
padding-bottom: calc(#{map.get($size, 'vertical')} - #{$border-bottom-size});
|
|
24
|
+
}
|
|
25
|
+
&.#{$element}__navigation-button--vertical {
|
|
26
|
+
padding-left: calc(#{map.get($size, 'horizontal')} - #{$border-bottom-size});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.#{$element}__navigation-button {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
column-gap: var(--#{$element}-navigation-button-column-gap, $navigation-button-column-gap);
|
|
35
|
+
background-color: unset;
|
|
36
|
+
border: none;
|
|
37
|
+
font-family: var(--font-family);
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
color: hsl(var(--#{$element}-color-hsl, var(--color-dark)));
|
|
40
|
+
line-height: var(--line-height);
|
|
41
|
+
text-decoration: none;
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
&:disabled,
|
|
46
|
+
&--disabled {
|
|
47
|
+
cursor: default;
|
|
48
|
+
opacity: var(--mg-disabled-opacity);
|
|
49
|
+
}
|
|
50
|
+
&:focus-visible {
|
|
51
|
+
z-index: 10;
|
|
52
|
+
}
|
|
53
|
+
&:hover:not(.#{$element}__navigation-button--disabled),
|
|
54
|
+
&:focus-visible:not(.#{$element}__navigation-button--disabled) {
|
|
55
|
+
background-color: hsl(var(--#{$element}-focused-background-color-hsl), 0.1);
|
|
56
|
+
}
|
|
57
|
+
&.#{$element}__navigation-button--active {
|
|
58
|
+
color: hsl(var(--#{$element}-color-active-hsl));
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
&.#{$element}__navigation-button--horizontal {
|
|
61
|
+
border-bottom-color: hsl(var(--#{$element}-border-color-active-hsl));
|
|
62
|
+
}
|
|
63
|
+
&.#{$element}__navigation-button--vertical {
|
|
64
|
+
border-left-color: hsl(var(--#{$element}-border-color-active-hsl));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
&.#{$element}__navigation-button--hidden {
|
|
68
|
+
display: none;
|
|
69
|
+
}
|
|
70
|
+
&.#{$element}__navigation-button--horizontal {
|
|
71
|
+
border-bottom: $border-bottom-size solid transparent;
|
|
72
|
+
}
|
|
73
|
+
&.#{$element}__navigation-button--vertical {
|
|
74
|
+
border-left: $border-bottom-size solid transparent;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@mixin reset-slot-card-variables() {
|
|
2
|
+
::slotted(*) {
|
|
3
|
+
--mg-card-border: var(--mg-card-border-default);
|
|
4
|
+
--mg-card-padding: var(--mg-card-padding-default);
|
|
5
|
+
--mg-card-border-radius: var(--mg-card-border-radius-default);
|
|
6
|
+
--mg-card-background: var(--mg-card-background-default);
|
|
7
|
+
--mg-card-box-shadow: var(--mg-card-box-shadow-default);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paragraph
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
p {
|
|
6
|
+
margin: 0;
|
|
7
|
+
& + p {
|
|
8
|
+
margin-top: 1rem;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Headings
|
|
14
|
+
*
|
|
15
|
+
* Classes can also be used on element to match attending, for exemples :
|
|
16
|
+
* <h4 class="h3">blu</h4>
|
|
17
|
+
* <div role="heading" aria-level="4" class="h4">blu</div>
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
@for $i from 1 through 6 {
|
|
21
|
+
h#{$i},
|
|
22
|
+
.h#{$i} {
|
|
23
|
+
font-family: var(--font-family-heading);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//h1
|
|
28
|
+
h1,
|
|
29
|
+
.h1 {
|
|
30
|
+
font-size: calc(var(--font-size) * 1.85);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//h2
|
|
34
|
+
h2,
|
|
35
|
+
.h2 {
|
|
36
|
+
font-size: calc(var(--font-size) * 1.65);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//h3
|
|
40
|
+
h3,
|
|
41
|
+
.h3 {
|
|
42
|
+
font-size: calc(var(--font-size) * 1.35);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//h4
|
|
46
|
+
h4,
|
|
47
|
+
.h4 {
|
|
48
|
+
font-size: calc(var(--font-size) * 1.2);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//h5
|
|
52
|
+
h5,
|
|
53
|
+
.h5 {
|
|
54
|
+
font-size: calc(var(--font-size) * 1.1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
//h6
|
|
58
|
+
h6,
|
|
59
|
+
.h6 {
|
|
60
|
+
font-size: calc(var(--font-size) * 0.8);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Links
|
|
65
|
+
*/
|
|
66
|
+
a {
|
|
67
|
+
color: hsl(var(--color-primary));
|
|
68
|
+
text-decoration: underline;
|
|
69
|
+
|
|
70
|
+
&:hover,
|
|
71
|
+
&:focus,
|
|
72
|
+
&:active {
|
|
73
|
+
text-decoration: none;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Helper to manage space between elements
|
|
2
|
+
.mg-group-elements {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
gap: 1rem;
|
|
7
|
+
|
|
8
|
+
// remove default margin
|
|
9
|
+
& > * {
|
|
10
|
+
margin: 0 !important; // I would say important is allowed in utility classes ?
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Align button on right side
|
|
14
|
+
&.mg-group-elements--align-right {
|
|
15
|
+
justify-content: flex-end;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.no-padding {
|
|
20
|
+
padding: 0;
|
|
21
|
+
}
|
|
@@ -96,12 +96,13 @@
|
|
|
96
96
|
--color-secondary: hsl(var(--color-neutral));
|
|
97
97
|
|
|
98
98
|
/* Shadow */
|
|
99
|
-
--box-shadow: 0 0.3rem 0.8rem 0
|
|
99
|
+
--box-shadow: 0 0.3rem 0.8rem 0 hsl(var(--color-dark), 0.15);
|
|
100
100
|
|
|
101
101
|
/*
|
|
102
102
|
Global
|
|
103
103
|
*/
|
|
104
104
|
--default-size: 3.5rem;
|
|
105
|
+
--mg-disabled-opacity: 0.4;
|
|
105
106
|
|
|
106
107
|
/*
|
|
107
108
|
<mg-icon>
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
|
|
118
119
|
--mg-button-border-radius: 0.3rem;
|
|
119
120
|
--mg-button-icon-border-radius: var(--default-size);
|
|
120
|
-
--mg-button-disabled-opacity:
|
|
121
|
+
--mg-button-disabled-opacity: var(--mg-disabled-opacity);
|
|
121
122
|
--mg-button-gradient: 1; /* Can only be 1 or 0 to enable disable gradient */
|
|
122
123
|
--mg-button-border-variation: 1; /* Can only be 1 or 0 to enable disable border variation */
|
|
123
124
|
|
|
@@ -180,7 +181,7 @@
|
|
|
180
181
|
--mg-panel-box-shadow: var(--box-shadow);
|
|
181
182
|
--mg-panel-content-padding: 1.5rem;
|
|
182
183
|
|
|
183
|
-
|
|
184
|
+
/*
|
|
184
185
|
<mg-illustrated-message>
|
|
185
186
|
*/
|
|
186
187
|
|
|
@@ -189,16 +190,16 @@
|
|
|
189
190
|
/*
|
|
190
191
|
<mg-card>
|
|
191
192
|
*/
|
|
192
|
-
--mg-card-padding: 1.6rem;
|
|
193
|
-
--mg-card-border-radius: 0.5rem;
|
|
194
|
-
--mg-card-background: hsl(var(--color-light));
|
|
195
|
-
--mg-card-border: 0.1rem solid
|
|
196
|
-
--mg-card-box-shadow: var(--box-shadow);
|
|
193
|
+
--mg-card-padding-default: 1.6rem;
|
|
194
|
+
--mg-card-border-radius-default: 0.5rem;
|
|
195
|
+
--mg-card-background-default: hsl(var(--color-light));
|
|
196
|
+
--mg-card-border-default: 0.1rem solid hsl(var(--color-dark), 0.05);
|
|
197
|
+
--mg-card-box-shadow-default: var(--box-shadow);
|
|
197
198
|
|
|
198
199
|
/*
|
|
199
200
|
<mg-divider>
|
|
200
201
|
*/
|
|
201
|
-
--mg-divider-background-color:
|
|
202
|
+
--mg-divider-background-color: hsl(var(--color-dark), 0.15);
|
|
202
203
|
--mg-divider-thickness: 0.1rem;
|
|
203
204
|
--mg-divider-vertical-spacing: 4rem;
|
|
204
205
|
|
|
@@ -245,7 +246,7 @@
|
|
|
245
246
|
--mg-menu-item-focused-background-color-hsl: var(--mg-color-app-hsl);
|
|
246
247
|
--mg-menu-item-border-color-active-hsl: var(--mg-color-app-hsl);
|
|
247
248
|
--mg-menu-item-color-active-hsl: var(--mg-color-app-hsl);
|
|
248
|
-
|
|
249
|
+
|
|
249
250
|
/*
|
|
250
251
|
<mg-tabs>
|
|
251
252
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* List of all possibles variants
|
|
3
3
|
*/
|
|
4
|
-
export declare const variants: readonly ["info", "primary", "secondary", "success", "warning", "danger"];
|
|
4
|
+
export declare const variants: readonly ["info", "primary", "secondary", "success", "warning", "danger", "text-color"];
|
|
5
5
|
/**
|
|
6
6
|
* Variant type from variants
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type BadgeVariantType = (typeof variants)[number];
|
|
@@ -5,7 +5,7 @@ export declare const variants: readonly ["primary", "secondary", "danger", "dang
|
|
|
5
5
|
/**
|
|
6
6
|
* VariantType type from button variants
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type VariantType = (typeof variants)[number];
|
|
9
9
|
/**
|
|
10
10
|
* List of all possibles button types
|
|
11
11
|
*/
|
|
@@ -13,4 +13,4 @@ export declare const buttonTypes: readonly ["button", "submit", "reset"];
|
|
|
13
13
|
/**
|
|
14
14
|
* ButtonType type from buttonTypes
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type ButtonType = (typeof buttonTypes)[number];
|
|
@@ -9,7 +9,7 @@ export declare const sizes: readonly ["small", "regular", "large", "extra-large"
|
|
|
9
9
|
/**
|
|
10
10
|
* Icon Size from sizes
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type IconSizeType = (typeof sizes)[number];
|
|
13
13
|
/**
|
|
14
14
|
* List of all possibles variants
|
|
15
15
|
*/
|
|
@@ -17,4 +17,4 @@ export declare const variants: readonly ["success", "warning", "danger", "info"]
|
|
|
17
17
|
/**
|
|
18
18
|
* Variant type from variants
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export type IconVariantType = (typeof variants)[number];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Possible input width
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type Width = 2 | 4 | 16 | 'full';
|
|
5
5
|
/**
|
|
6
6
|
* Possible Input types
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type HTMLMgInputsElement = HTMLMgInputCheckboxElement | HTMLMgInputDateElement | HTMLMgInputNumericElement | HTMLMgInputPasswordElement | HTMLMgInputRadioElement | HTMLMgInputSelectElement | HTMLMgInputTextElement | HTMLMgInputTextareaElement | (HTMLMgInputToggleElement & {
|
|
9
9
|
required: true;
|
|
10
10
|
invalid: false;
|
|
11
11
|
displayError: () => void;
|
package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* type CheckboxItem
|
|
3
3
|
* use to match checkbox attributes
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type CheckboxItem = {
|
|
6
6
|
id: string;
|
|
7
7
|
title: string;
|
|
8
8
|
value: boolean | null;
|
|
@@ -12,7 +12,7 @@ export declare type CheckboxItem = {
|
|
|
12
12
|
* type CheckboxValue
|
|
13
13
|
* use to match returned value
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type CheckboxValue = {
|
|
16
16
|
title: string;
|
|
17
17
|
value: boolean | null;
|
|
18
18
|
disabled?: boolean;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* type SelectOption
|
|
3
3
|
* use to match select>option attributes
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type SelectOption = {
|
|
6
6
|
title: string;
|
|
7
7
|
value: unknown;
|
|
8
8
|
disabled?: boolean;
|
|
@@ -12,7 +12,7 @@ export declare type SelectOption = {
|
|
|
12
12
|
* type OptGroup
|
|
13
13
|
* use to match select>optgroup attributes
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type OptGroup = {
|
|
16
16
|
group: string;
|
|
17
17
|
options: SelectOption[];
|
|
18
18
|
};
|
|
@@ -143,7 +143,7 @@ export declare class MgInputTextarea {
|
|
|
143
143
|
private handleBlur;
|
|
144
144
|
/**
|
|
145
145
|
* Get pattern validity
|
|
146
|
-
* Pattern is not defined on textarea field
|
|
146
|
+
* Pattern is not defined on textarea field: https://developer.mozilla.org/fr/docs/Web/HTML/Element/Textarea
|
|
147
147
|
*
|
|
148
148
|
* @returns {boolean} is pattern valid
|
|
149
149
|
*/
|