material-inspired-component-library 1.3.0 → 2.0.1
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/CODE_OF_CONDUCT.md +128 -0
- package/README.md +9 -1
- package/components/badge/README.md +65 -0
- package/components/badge/index.scss +61 -0
- package/components/bottomsheet/README.md +29 -17
- package/components/bottomsheet/index.scss +23 -23
- package/components/bottomsheet/index.ts +25 -24
- package/components/button/README.md +1 -1
- package/components/button/index.scss +10 -12
- package/components/button/index.ts +5 -0
- package/components/card/index.scss +2 -2
- package/components/checkbox/index.scss +1 -1
- package/components/dialog/README.md +9 -9
- package/components/iconbutton/index.scss +2 -2
- package/components/iconbutton/index.ts +5 -0
- package/components/list/index.scss +2 -2
- package/components/navigationrail/README.md +110 -59
- package/components/navigationrail/index.scss +399 -88
- package/components/{checkbox → navigationrail}/index.ts +12 -7
- package/components/radio/index.scss +2 -2
- package/components/sidesheet/README.md +32 -17
- package/components/sidesheet/index.scss +43 -47
- package/components/slider/README.md +5 -5
- package/dist/badge.css +1 -0
- package/dist/badge.js +1 -0
- package/dist/bottomsheet.css +1 -1
- package/dist/button.css +1 -1
- package/dist/card.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/components/navigationrail/index.d.ts +5 -0
- package/dist/iconbutton.css +1 -1
- package/dist/list.css +1 -1
- package/dist/micl.css +1 -1
- package/dist/micl.js +1 -1
- package/dist/navigationrail.css +1 -1
- package/dist/radio.css +1 -1
- package/dist/sidesheet.css +1 -1
- package/docs/bottomsheet.html +58 -7
- package/docs/button.html +30 -30
- package/docs/docs.css +2 -1
- package/docs/index.html +35 -4
- package/docs/micl.css +1 -1
- package/docs/micl.js +1 -1
- package/docs/navigationrail.html +48 -42
- package/docs/sidesheet.html +22 -7
- package/micl.ts +20 -27
- package/package.json +4 -1
- package/styles.scss +17 -0
- package/dist/components/checkbox/index.d.ts +0 -5
package/docs/micl.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.micl=t():e.micl=t()}(self,()=>(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};return(()=>{e.r(t),e.d(t,{default:()=>v});const n="dialog.micl-bottomsheet",o=(()=>{var e=0;const t=t=>{let n=parseInt(window.getComputedStyle(t).getPropertyValue("max-height")),o=(t.dataset.snapheights||"").split(",").map(Number).filter(e=>!isNaN(e)&&e>0&&e<=n);return e||(e=t.getBoundingClientRect().height),[...new Set(o.concat([e,n]).sort())]},n=(e,n)=>{let o=e.getBoundingClientRect().height,i=t(e);return i.filter(e=>e>o+4)[0]||i[n?i.length-1:0]},o=(e,t)=>{e.style.setProperty("--md-sys-bottomsheet-height",`${t}px`)};return{initialize:e=>{if(!e.matches("dialog.micl-bottomsheet")||e.dataset.miclinitialized)return;e.dataset.miclinitialized="1";const i=e.querySelector(".micl-bottomsheet__headline");if(!i)return;const r=i.querySelector(".micl-bottomsheet__draghandle");r?.addEventListener("click",()=>{const t=n(e,!1);t>4&&o(e,t)});let l,a,s=!1,c=!1;function m(t){const n=t.clientY;s&&Math.abs(l-n)>4&&(s=!1,c=!0,e.classList.add("micl-bottomsheet--resizing")),c&&o(e,a+l-n)}function d(i){s=!1,e.classList.remove("micl-bottomsheet--resizing"),c&&(c=!1,i.clientY<l?o(e,n(e,!0)):e.getBoundingClientRect().height<48?(e.popover&&e.hidePopover(),o(e,a)):o(e,(e=>{let n=e.getBoundingClientRect().height,o=t(e),i=o.filter(e=>e<n-4);return i[i.length-1]||o[0]})(e)),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",d))}i.addEventListener("mousedown",t=>{t.eventPhase===Event.AT_TARGET&&(s=!0,t.preventDefault(),l=t.clientY,a=e.getBoundingClientRect().height,document.addEventListener("mousemove",m),document.addEventListener("mouseup",d))})},cleanup:e=>{e.matches("dialog.micl-bottomsheet")&&delete e.dataset.miclinitialized}}})(),i="button[popovertarget],button.micl-button--toggle",r=(()=>{const e=e=>{e.target&&e.target instanceof HTMLButtonElement&&(e.target.popoverTargetElement instanceof HTMLDialogElement&&(e.target.popoverTargetElement.open?e.target.popoverTargetElement.close():e.target.popoverTargetElement.showModal()),e.target.classList.contains("micl-button--toggle")&&e.target.classList.toggle("micl-button--selected"))};return{initialize:t=>{t.matches("button[popovertarget],button.micl-button--toggle")&&!t.dataset.miclinitialized&&(t.dataset.miclinitialized="1",(t.popoverTargetElement instanceof HTMLDialogElement&&!t.popoverTargetElement.hasAttribute("popover")||t.classList.contains("micl-button--toggle"))&&t.addEventListener("click",e))},cleanup:t=>{t.matches("button[popovertarget],button.micl-button--toggle")&&(document.removeEventListener("click",e),delete t.dataset.miclinitialized)}}})(),l=".micl-checkbox",a={keydown:e=>{if(e.target.matches(l)&&e instanceof KeyboardEvent&&e.target instanceof HTMLInputElement&&!e.target.disabled)switch(e.key){case"Enter":case" ":e.target.checked=!e.target.checked,e.preventDefault()}}},s=".micl-list-item-one,.micl-list-item-two,.micl-list-item-three",c=(()=>{const e=e=>!!e&&e.classList.contains("micl-list-item--disabled");return{keydown:t=>{if(!(t instanceof KeyboardEvent&&t.target instanceof Element&&t.target.matches(".micl-list-item-one,.micl-list-item-two,.micl-list-item-three")))return;const n=t.target.parentElement;if(!n)return;let o=[];if(n instanceof HTMLDetailsElement?o=Array.from(n.parentElement?.children||[]).map(t=>{let n=t.querySelector(":scope > summary");return e(n)?null:n}).filter(e=>!!e):n instanceof HTMLUListElement&&(o=Array.from(n.children).map(t=>t instanceof HTMLLIElement&&!e(t)?t:null).filter(e=>!!e)),0===o.length)return;let i=o.findIndex(e=>(e=>!!e&&e.matches(":has(input[type=checkbox]:checked)"))(e)),r=o.findIndex(e=>0===e.tabIndex),l=r;switch(t.key){case"ArrowDown":l=(r+1)%o.length,t.preventDefault();break;case"ArrowUp":l=(r-1+o.length)%o.length,t.preventDefault();break;case"Tab":-1===i?0!==r&&(o[r].tabIndex=-1,o[0].tabIndex=0):i!==r&&(o[r].tabIndex=-1,o[i].tabIndex=0);break;case"Enter":case" ":const e=t.target.querySelector("input[type=checkbox]");e instanceof HTMLInputElement&&(e.checked=!e.checked)}if(l!==r){o[r].tabIndex=-1,o[l].tabIndex=0,o[l].focus();const e=o[l].querySelector(":scope > button");e?.dispatchEvent(new MouseEvent("mouseenter",{bubbles:!0,cancelable:!0,view:window}))}}}})(),m=".micl-menu[popover]",d=(()=>{const e=(e,t)=>{const n=e.getBoundingClientRect(),o=t.getBoundingClientRect();return(n.x>o.x?"right ":"left ")+(n.y>o.y?"bottom":"top")};return{initialize:t=>{if(!t.matches(".micl-menu[popover]")||t.dataset.miclinitialized)return;t.dataset.miclinitialized="1";const n=document.querySelector(`[popovertarget="${t.id}"]`);n&&t.addEventListener("beforetoggle",o=>{"open"===o.oldState&&(t.style.transformOrigin=e(n,t))}),n&&t.addEventListener("toggle",o=>{"closed"===o.oldState&&(t.style.transformOrigin=e(n,t))}),t.querySelectorAll(":scope > ul.micl-list > li > button[popovertarget]").forEach(e=>{if(e.popoverTargetElement?.matches(".micl-menu[popover]")){let t,n=`--${e.popoverTargetElement.id}`;e.popoverTargetElement instanceof HTMLElement&&(e.style.setProperty("anchor-name",n),e.popoverTargetElement.style.insetBlockStart=`anchor(${n} start)`,e.popoverTargetElement.style.insetInlineStart=`anchor(${n} end)`),e.addEventListener("mouseenter",()=>{e.popoverTargetElement instanceof HTMLElement&&e.popoverTargetElement.showPopover()}),e.addEventListener("mouseleave",()=>{t=setTimeout(()=>{e.popoverTargetElement instanceof HTMLElement&&!e.popoverTargetElement.matches(":hover")&&e.popoverTargetElement.hidePopover()},100)}),e.popoverTargetElement.addEventListener("mouseenter",()=>{clearTimeout(t)}),e.popoverTargetElement.addEventListener("mouseleave",()=>{e.popoverTargetElement instanceof HTMLElement&&e.popoverTargetElement.hidePopover()})}})}}})(),p="input[type=range].micl-slider-xs,input[type=range].micl-slider-s,input[type=range].micl-slider-m,input[type=range].micl-slider-l,input[type=range].micl-slider-xl",u=(()=>{const e=String.fromCharCode(8226),t=String.fromCharCode(8201),n=e=>e.parentElement?.classList.contains("micl-slider__container")?e.parentElement:null,o=(e,t)=>{e.dataset.miclsliderticks=t},i=e=>{let t=JSON.stringify(e.value+""),o=n(e);o&&(o.style.setProperty("--md-sys-slider-value",e.value),o.style.setProperty("--md-sys-slider-tip",t)),e.style.setProperty("--md-sys-slider-value",e.value),e.style.setProperty("--md-sys-slider-tip",t)};return{initialize:r=>{if(!r.matches(p))return;(e=>{let t=e.max||"100";n(e)?.style.setProperty("--md-sys-slider-max",t),e.style.setProperty("--md-sys-slider-max",t)})(r),(e=>{let t=e.min||"0";n(e)?.style.setProperty("--md-sys-slider-min",t),e.style.setProperty("--md-sys-slider-min",t)})(r),i(r),(e=>{let t=n(e);if(t){const n=window.getComputedStyle(e);["--md-sys-slider-handle-height","--md-sys-slider-track-height"].forEach(e=>{t.style.setProperty(e,n.getPropertyValue(e))})}})(r);const l=parseFloat(r.max),a=parseFloat(r.min),s=r.getBoundingClientRect(),c=((e,t,n)=>{const o=[];return e.list&&t>n&&e.list.querySelectorAll("option[value]").forEach(e=>{let i=parseFloat(e.value);!isNaN(i)&&i>=n&&i<=t&&o.push(i)}),o})(r,l,a).sort((e,t)=>e-t).map(e=>Math.round(100*(e-a)/(l-a)));if(c.length>0){const n=document.createElement("canvas"),i=n.getContext("2d");if(i){i.font=window.getComputedStyle(r).getPropertyValue("font");let n=i.measureText(t).width,l=i.measureText(e).width,a=s.width-10,m=0,d="";c.forEach(o=>{let i=a*o/100,r=Math.round((i-m)/n)-1;for(let e=0;e<r;e++)d+=t,m+=n;d+=e,m+=l}),o(r,d)}n.remove()}else o(r,e)},input:e=>{e.target.matches(p)&&e.target instanceof HTMLInputElement&&!e.target.disabled&&i(e.target)}}})(),g=".micl-textfield-outlined > input,.micl-textfield-filled > input",f=".micl-textfield-outlined > select,.micl-textfield-filled > select",y=".micl-textfield-outlined > textarea,.micl-textfield-filled > textarea",h=(()=>{const e=".micl-textfield__character-counter";return{initialize:t=>{if(t.dataset.miclinitialized)return;if(t.dataset.miclinitialized="1",t.value&&(t.dataset.miclvalue="1"),t instanceof HTMLSelectElement||!t.maxLength)return;const n=t.parentElement?.querySelector(e);n&&(n.textContent=`${t.value.length}/${t.maxLength}`)},input:t=>{if(!t.target.matches(`${g},${f},${y}`)||!(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement||t.target instanceof HTMLTextAreaElement)||!t.target.dataset.miclinitialized||t.target.disabled)return;if(t.target.value?t.target.dataset.miclvalue="1":delete t.target.dataset.miclvalue,t.target instanceof HTMLSelectElement||!t.target.maxLength)return;const n=t.target.parentElement?.querySelector(e);n&&(n.textContent=`${t.target.value.length}/${t.target.maxLength}`)}}})(),v=(()=>{const e={[n]:{component:o,type:HTMLDialogElement},[i]:{component:r,type:HTMLButtonElement},[l]:{component:a,type:HTMLInputElement},[s]:{component:c,type:HTMLElement},[m]:{component:d,type:HTMLElement},[f]:{component:h,type:HTMLSelectElement},[p]:{component:u,type:HTMLInputElement},[y]:{component:h,type:HTMLTextAreaElement},[g]:{component:h,type:HTMLInputElement}},t=Object.keys(e).join(","),v=t=>{for(const[n,{component:o,type:i}]of Object.entries(e))if(t.matches(n)&&t instanceof i&&"function"==typeof o.initialize)return void o.initialize(t)},E=e=>{e.querySelectorAll(t).forEach(v),e.querySelectorAll('[class*="micl-"]').forEach(e=>{e.parentElement&&!window.getComputedStyle(e.parentElement).getPropertyValue("--miclripple")&&window.getComputedStyle(e).getPropertyValue("--miclripple")&&e.addEventListener("pointerdown",t=>{if(t.currentTarget.classList.contains("micl-card--nonactionable"))return;let n=e.getBoundingClientRect(),o=0,i="",r="";for(;(i=e.style.item(o++))&&i;)"--x"!=i&&"--y"!=i&&(r+=`${i}:${e.style.getPropertyValue(i)};`);e.style.cssText=r+`--x:${t.clientX-n.left}px;--y:${t.clientY-n.top}px`})})},b=t=>{for(const[n,{component:o,type:i}]of Object.entries(e))if(t.matches(n)&&t instanceof i&&"function"==typeof o.cleanup)return void o.cleanup(t)},L=e=>{e.querySelectorAll(t).forEach(b)},T=()=>{new MutationObserver(e=>{e.forEach(e=>{"childList"===e.type&&(e.addedNodes.forEach(e=>{e instanceof HTMLElement&&(e.matches(t)&&v(e),e.querySelectorAll(t).forEach(v))}),e.removedNodes.forEach(e=>{e instanceof HTMLElement&&(e.matches(t)&&b(e),L(e))}))})}).observe(document.body,{childList:!0,subtree:!0}),E(document),document.addEventListener("input",t=>{for(const[n,{component:o,type:i}]of Object.entries(e))if(t.target.matches(n)&&t.target instanceof i&&"function"==typeof o.input)return void o.input(t)}),document.addEventListener("keydown",t=>{for(const[n,{component:o,type:i}]of Object.entries(e))if(t.target.matches(n)&&t.target instanceof i&&"function"==typeof o.keydown)return void o.keydown(t)})},x=()=>{document.removeEventListener("DOMContentLoaded",x),T()};return"loading"!==document.readyState?T():document.addEventListener("DOMContentLoaded",x),{initialize:()=>E(document),cleanup:()=>L(document)}})()})(),t})());
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.micl=t():e.micl=t()}(self,()=>(()=>{"use strict";var e={d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};return(()=>{e.r(t),e.d(t,{default:()=>v});const n="dialog.micl-bottomsheet",i=(()=>{const e=e=>{let t=parseInt(e.dataset.miclfitheight||"0",10),n=parseInt(window.getComputedStyle(e).getPropertyValue("max-block-size"),10),i=(e.dataset.miclsnapheights||"").split(",").map(Number).filter(e=>!isNaN(e)&&e>=0&&e<=n);return t<1&&(t=Math.min(e.getBoundingClientRect().height,n),e.dataset.miclfitheight=`${t}`),[...new Set(i.concat([t]).sort())]},t=(t,n)=>{let i=t.getBoundingClientRect().height,o=e(t);return o.filter(e=>e>i+4)[0]||o[n?o.length-1:0]},i=(e,t)=>{t<1?(delete e.dataset.miclfitheight,e.style.removeProperty("--md-sys-bottomsheet-height"),e[e.popover?"hidePopover":"close"]()):e.style.setProperty("--md-sys-bottomsheet-height",`${t}px`)};return{initialize:o=>{if(!o.matches(n)||o.dataset.miclinitialized)return;o.dataset.miclinitialized="1";const r=o.querySelector(".micl-bottomsheet__headline");if(!r)return;const l=r.querySelector(".micl-bottomsheet__draghandle");l?.addEventListener("click",()=>{i(o,t(o,!1))});let a,s,c=!1,m=!1;function d(e){const t=e.clientY;c&&Math.abs(a-t)>4&&(c=!1,m=!0,o.classList.add("micl-bottomsheet--resizing")),m&&i(o,s+a-t)}function p(n){c=!1,o.classList.remove("micl-bottomsheet--resizing"),m&&(m=!1,n.clientY<a?i(o,t(o,!0)):o.getBoundingClientRect().height<48?i(o,0):i(o,(t=>{let n=t.getBoundingClientRect().height,i=e(t),o=i.filter(e=>e<n-4);return o[o.length-1]||i[0]})(o)),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",p))}r.addEventListener("mousedown",e=>{e.eventPhase===Event.AT_TARGET&&(c=!0,e.preventDefault(),a=e.clientY,s=o.getBoundingClientRect().height,document.addEventListener("mousemove",d),document.addEventListener("mouseup",p))})},cleanup:e=>{e.matches(n)&&(e.classList.remove("micl-bottomsheet--resizing"),delete e.dataset.miclinitialized,delete e.dataset.miclfitheight)}}})(),o="button[popovertarget],button.micl-button--toggle",r=(()=>{const e=e=>{e.target&&e.target instanceof HTMLButtonElement&&(e.target.popoverTargetElement instanceof HTMLDialogElement&&(e.target.popoverTargetElement.open?e.target.popoverTargetElement.close():e.target.popoverTargetElement.showModal()),e.target.classList.contains("micl-button--toggle")&&(e.target.classList.add("micl-button--toggled"),e.target.classList.toggle("micl-button--selected"),e.target.dataset.miclalt&&([e.target.textContent,e.target.dataset.miclalt]=[e.target.dataset.miclalt,e.target.textContent])))};return{initialize:t=>{t.matches("button[popovertarget],button.micl-button--toggle")&&!t.dataset.miclinitialized&&(t.dataset.miclinitialized="1",(t.popoverTargetElement instanceof HTMLDialogElement&&!t.popoverTargetElement.hasAttribute("popover")||t.classList.contains("micl-button--toggle"))&&t.addEventListener("click",e))},cleanup:t=>{t.matches("button[popovertarget],button.micl-button--toggle")&&(document.removeEventListener("click",e),delete t.dataset.miclinitialized)}}})(),l=".micl-list-item-one,.micl-list-item-two,.micl-list-item-three",a=(()=>{const e=e=>!!e&&e.classList.contains("micl-list-item--disabled");return{keydown:t=>{if(!(t instanceof KeyboardEvent&&t.target instanceof Element&&t.target.matches(".micl-list-item-one,.micl-list-item-two,.micl-list-item-three")))return;const n=t.target.parentElement;if(!n)return;let i=[];if(n instanceof HTMLDetailsElement?i=Array.from(n.parentElement?.children||[]).map(t=>{let n=t.querySelector(":scope > summary");return e(n)?null:n}).filter(e=>!!e):n instanceof HTMLUListElement&&(i=Array.from(n.children).map(t=>t instanceof HTMLLIElement&&!e(t)?t:null).filter(e=>!!e)),0===i.length)return;let o=i.findIndex(e=>(e=>!!e&&e.matches(":has(input[type=checkbox]:checked)"))(e)),r=i.findIndex(e=>0===e.tabIndex),l=r;switch(t.key){case"ArrowDown":l=(r+1)%i.length,t.preventDefault();break;case"ArrowUp":l=(r-1+i.length)%i.length,t.preventDefault();break;case"Tab":-1===o?0!==r&&(i[r].tabIndex=-1,i[0].tabIndex=0):o!==r&&(i[r].tabIndex=-1,i[o].tabIndex=0);break;case"Enter":case" ":const e=t.target.querySelector("input[type=checkbox]");e instanceof HTMLInputElement&&(e.checked=!e.checked)}if(l!==r){i[r].tabIndex=-1,i[l].tabIndex=0,i[l].focus();const e=i[l].querySelector(":scope > button");e?.dispatchEvent(new MouseEvent("mouseenter",{bubbles:!0,cancelable:!0,view:window}))}}}})(),s=".micl-menu[popover]",c=(()=>{const e=(e,t)=>{const n=e.getBoundingClientRect(),i=t.getBoundingClientRect();return(n.x>i.x?"right ":"left ")+(n.y>i.y?"bottom":"top")};return{initialize:t=>{if(!t.matches(".micl-menu[popover]")||t.dataset.miclinitialized)return;t.dataset.miclinitialized="1";const n=document.querySelector(`[popovertarget="${t.id}"]`);n&&t.addEventListener("beforetoggle",i=>{"open"===i.oldState&&(t.style.transformOrigin=e(n,t))}),n&&t.addEventListener("toggle",i=>{"closed"===i.oldState&&(t.style.transformOrigin=e(n,t))}),t.querySelectorAll(":scope > ul.micl-list > li > button[popovertarget]").forEach(e=>{if(e.popoverTargetElement?.matches(".micl-menu[popover]")){let t,n=`--${e.popoverTargetElement.id}`;e.popoverTargetElement instanceof HTMLElement&&(e.style.setProperty("anchor-name",n),e.popoverTargetElement.style.insetBlockStart=`anchor(${n} start)`,e.popoverTargetElement.style.insetInlineStart=`anchor(${n} end)`),e.addEventListener("mouseenter",()=>{e.popoverTargetElement instanceof HTMLElement&&e.popoverTargetElement.showPopover()}),e.addEventListener("mouseleave",()=>{t=setTimeout(()=>{e.popoverTargetElement instanceof HTMLElement&&!e.popoverTargetElement.matches(":hover")&&e.popoverTargetElement.hidePopover()},100)}),e.popoverTargetElement.addEventListener("mouseenter",()=>{clearTimeout(t)}),e.popoverTargetElement.addEventListener("mouseleave",()=>{e.popoverTargetElement instanceof HTMLElement&&e.popoverTargetElement.hidePopover()})}})}}})(),m=".micl-navigationrail__item[for]:not(.micl-navigationrail__item--disabled)",d={keydown:e=>{if(!(e instanceof KeyboardEvent&&e.target instanceof HTMLLabelElement&&e.target.matches(m)))return;const t=document.getElementById(e.target.htmlFor);if(t)switch(e.key){case"Enter":case" ":e.preventDefault(),t.checked||(t.checked=!t.checked)}}},p="input[type=range].micl-slider-xs,input[type=range].micl-slider-s,input[type=range].micl-slider-m,input[type=range].micl-slider-l,input[type=range].micl-slider-xl",u=(()=>{const e=String.fromCharCode(8226),t=String.fromCharCode(8201),n=e=>e.parentElement?.classList.contains("micl-slider__container")?e.parentElement:null,i=(e,t)=>{e.dataset.miclsliderticks=t},o=e=>{let t=JSON.stringify(e.value+""),i=n(e);i&&(i.style.setProperty("--md-sys-slider-value",e.value),i.style.setProperty("--md-sys-slider-tip",t)),e.style.setProperty("--md-sys-slider-value",e.value),e.style.setProperty("--md-sys-slider-tip",t)};return{initialize:r=>{if(!r.matches(p))return;(e=>{let t=e.max||"100";n(e)?.style.setProperty("--md-sys-slider-max",t),e.style.setProperty("--md-sys-slider-max",t)})(r),(e=>{let t=e.min||"0";n(e)?.style.setProperty("--md-sys-slider-min",t),e.style.setProperty("--md-sys-slider-min",t)})(r),o(r),(e=>{let t=n(e);if(t){const n=window.getComputedStyle(e);["--md-sys-slider-handle-height","--md-sys-slider-track-height"].forEach(e=>{t.style.setProperty(e,n.getPropertyValue(e))})}})(r);const l=parseFloat(r.max),a=parseFloat(r.min),s=r.getBoundingClientRect(),c=((e,t,n)=>{const i=[];return e.list&&t>n&&e.list.querySelectorAll("option[value]").forEach(e=>{let o=parseFloat(e.value);!isNaN(o)&&o>=n&&o<=t&&i.push(o)}),i})(r,l,a).sort((e,t)=>e-t).map(e=>Math.round(100*(e-a)/(l-a)));if(c.length>0){const n=document.createElement("canvas"),o=n.getContext("2d");if(o){o.font=window.getComputedStyle(r).getPropertyValue("font");let n=o.measureText(t).width,l=o.measureText(e).width,a=s.width-10,m=0,d="";c.forEach(i=>{let o=a*i/100,r=Math.round((o-m)/n)-1;for(let e=0;e<r;e++)d+=t,m+=n;d+=e,m+=l}),i(r,d)}n.remove()}else i(r,e)},input:e=>{e.target.matches(p)&&e.target instanceof HTMLInputElement&&!e.target.disabled&&o(e.target)}}})(),g=".micl-textfield-outlined > input,.micl-textfield-filled > input",f=".micl-textfield-outlined > select,.micl-textfield-filled > select",h=".micl-textfield-outlined > textarea,.micl-textfield-filled > textarea",y=(()=>{const e=".micl-textfield__character-counter";return{initialize:t=>{if(t.dataset.miclinitialized)return;if(t.dataset.miclinitialized="1",t.value&&(t.dataset.miclvalue="1"),t instanceof HTMLSelectElement||!t.maxLength)return;const n=t.parentElement?.querySelector(e);n&&(n.textContent=`${t.value.length}/${t.maxLength}`)},input:t=>{if(!t.target.matches(`${g},${f},${h}`)||!(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement||t.target instanceof HTMLTextAreaElement)||!t.target.dataset.miclinitialized||t.target.disabled)return;if(t.target.value?t.target.dataset.miclvalue="1":delete t.target.dataset.miclvalue,t.target instanceof HTMLSelectElement||!t.target.maxLength)return;const n=t.target.parentElement?.querySelector(e);n&&(n.textContent=`${t.target.value.length}/${t.target.maxLength}`)}}})(),v=(()=>{const e={[n]:{component:i,type:HTMLDialogElement},[o]:{component:r,type:HTMLButtonElement},[l]:{component:a,type:HTMLElement},[s]:{component:c,type:HTMLElement},[m]:{component:d,type:HTMLLabelElement},[f]:{component:y,type:HTMLSelectElement},[p]:{component:u,type:HTMLInputElement},[h]:{component:y,type:HTMLTextAreaElement},[g]:{component:y,type:HTMLInputElement}},t=Object.keys(e).join(","),v=t=>{for(const[n,{component:i,type:o}]of Object.entries(e))if(t.matches(n)&&t instanceof o&&"function"==typeof i.initialize)return void i.initialize(t)},E=e=>{e.querySelectorAll(t).forEach(v),e.querySelectorAll('[class*="micl-"]').forEach(e=>{"1"===window.getComputedStyle(e).getPropertyValue("--micl-ripple")&&e.addEventListener("pointerdown",t=>{if(t.currentTarget.classList.contains("micl-card--nonactionable"))return;t.stopPropagation();let n=e.getBoundingClientRect();e.style.setProperty("--micl-x",t.clientX-n.left+"px"),e.style.setProperty("--micl-y",t.clientY-n.top+"px")})})},b=t=>{for(const[n,{component:i,type:o}]of Object.entries(e))if(t.matches(n)&&t instanceof o&&"function"==typeof i.cleanup)return void i.cleanup(t)},L=e=>{e.querySelectorAll(t).forEach(b)},T=()=>{new MutationObserver(e=>{e.forEach(e=>{"childList"===e.type&&(e.addedNodes.forEach(e=>{e instanceof HTMLElement&&(e.matches(t)&&v(e),e.querySelectorAll(t).forEach(v))}),e.removedNodes.forEach(e=>{e instanceof HTMLElement&&(e.matches(t)&&b(e),L(e))}))})}).observe(document.body,{childList:!0,subtree:!0}),E(document),document.addEventListener("input",t=>{for(const[n,{component:i,type:o}]of Object.entries(e))if(t.target.matches(n)&&t.target instanceof o&&"function"==typeof i.input)return void i.input(t)}),document.addEventListener("keydown",t=>{for(const[n,{component:i,type:o}]of Object.entries(e))if(t.target.matches(n)&&t.target instanceof o&&"function"==typeof i.keydown)return void i.keydown(t)})},x=()=>{document.removeEventListener("DOMContentLoaded",x),T()};return"loading"!==document.readyState?T():document.addEventListener("DOMContentLoaded",x),{initialize:()=>E(document),cleanup:()=>L(document)}})()})(),t})());
|
package/docs/navigationrail.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>MICL Navigation Rail</title>
|
|
7
7
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap">
|
|
8
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:FILL@0..1&icon_names=
|
|
8
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:FILL@0..1&icon_names=dark_mode,delete,favorite,inbox,menu,menu_open,outbox&display=block">
|
|
9
9
|
<link rel="stylesheet" href="themes/airblue/theme.css" id="theme-link">
|
|
10
10
|
<link rel="stylesheet" href="micl.css">
|
|
11
11
|
<link rel="stylesheet" href="docs.css">
|
|
@@ -20,53 +20,59 @@
|
|
|
20
20
|
</style>
|
|
21
21
|
</head>
|
|
22
22
|
<body class="light">
|
|
23
|
+
<!-- <dialog id="mynavigationrail1" class="micl-navigationrail" closedby="closerequest"> -->
|
|
24
|
+
<!-- <div id="mynavigationrail1" class="micl-navigationrail" popover="manual"> -->
|
|
25
|
+
<div id="mynavigationrail1" class="micl-navigationrail">
|
|
26
|
+
<div class="micl-navigationrail__headline">
|
|
27
|
+
<button type="button" class="micl-iconbutton-standard-s micl-button--toggle material-symbols-outlined" popovertarget="mynavigationrail1" data-miclalt="menu_open" aria-label="Toggle navigation rail">menu</button>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="micl-navigationrail__content">
|
|
30
|
+
<input type="radio" id="item1" name="navitem" value="email_inbox" checked>
|
|
31
|
+
<label for="item1" class="micl-navigationrail__item" tabindex="0">
|
|
32
|
+
<span class="micl-navigationrail__icon material-symbols-outlined" style="anchor-name:--inbox" aria-hidden="true">inbox</span>
|
|
33
|
+
<span class="micl-navigationrail__text">Inbox</span>
|
|
34
|
+
</label>
|
|
35
|
+
<input type="radio" id="item2" name="navitem" value="email_outbox">
|
|
36
|
+
<label for="item2" class="micl-navigationrail__item" tabindex="0">
|
|
37
|
+
<span class="micl-navigationrail__icon material-symbols-outlined" aria-hidden="true">outbox</span>
|
|
38
|
+
<span class="micl-navigationrail__text">Outbox</span>
|
|
39
|
+
</label>
|
|
40
|
+
<input type="radio" id="item3" name="navitem" value="email_favorites">
|
|
41
|
+
<label for="item3" class="micl-navigationrail__item" tabindex="0">
|
|
42
|
+
<span class="micl-navigationrail__icon material-symbols-outlined" style="anchor-name:--favorites" aria-hidden="true">favorite</span>
|
|
43
|
+
<span class="micl-navigationrail__text">Favorites</span>
|
|
44
|
+
</label>
|
|
45
|
+
<input type="radio" id="item4" name="navitem" value="email_trash">
|
|
46
|
+
<label for="item4" class="micl-navigationrail__item" tabindex="0">
|
|
47
|
+
<span class="micl-navigationrail__icon material-symbols-outlined" aria-hidden="true">delete</span>
|
|
48
|
+
<span class="micl-navigationrail__text">Trash</span>
|
|
49
|
+
</label>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<span class="micl-badge" style="position-anchor:--inbox;--md-sys-badge-block-offset:4px;--md-sys-badge-inline-offset:16px">97</span>
|
|
53
|
+
<span class="micl-badge micl-badge--small" style="position-anchor:--favorites;--md-sys-badge-block-offset:4px;--md-sys-badge-inline-offset:16px"></span>
|
|
54
|
+
</div>
|
|
55
|
+
<!-- </dialog> -->
|
|
56
|
+
|
|
23
57
|
<div class="headline">
|
|
58
|
+
<!-- <button type="button" class="micl-iconbutton-standard-s micl-button--toggle material-symbols-outlined" style="margin:8px 0 0 8px" popovertarget="mynavigationrail1" aria-label="Toggle navigation rail">menu</button> -->
|
|
24
59
|
<h1 class="md-sys-typescale-emphasized-display-small">Navigation rails</h1>
|
|
25
60
|
<div id="settings-placeholder"></div>
|
|
26
61
|
</div>
|
|
27
62
|
|
|
28
63
|
<div class="cards">
|
|
29
|
-
<div class="micl-card-filled">
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<p>Label</p>
|
|
42
|
-
<button type="button" class="micl-button-tonal-m">
|
|
43
|
-
<span class="micl-button__icon material-symbols-outlined">stars</span>
|
|
44
|
-
Label
|
|
45
|
-
</button>
|
|
46
|
-
<button type="button" class="micl-button-text-xs">
|
|
47
|
-
<span class="micl-button__icon material-symbols-outlined">stars</span>
|
|
48
|
-
Label
|
|
49
|
-
</button>
|
|
50
|
-
<button type="button" class="micl-button-text-xs">
|
|
51
|
-
<span class="micl-button__icon material-symbols-outlined">star</span>
|
|
52
|
-
Label
|
|
53
|
-
</button>
|
|
54
|
-
<p class="md-sys-typescale-title-small">Section Header</p>
|
|
55
|
-
<button type="button" class="micl-button-text-xs">
|
|
56
|
-
<span class="micl-button__icon material-symbols-outlined">stars</span>
|
|
57
|
-
Label
|
|
58
|
-
</button>
|
|
59
|
-
<span>Label</span>
|
|
60
|
-
<button type="button" class="micl-button-text-xs">
|
|
61
|
-
<span class="micl-button__icon material-symbols-outlined">star</span>
|
|
62
|
-
Label
|
|
63
|
-
</button>
|
|
64
|
-
<span>Label</span>
|
|
65
|
-
</div>
|
|
66
|
-
</dialog>
|
|
67
|
-
<button type="button" class="micl-button-filled-m" popovertarget="mynavigationrail1">Open Standard Navigation Rail</button>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
64
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
65
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
66
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
67
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
68
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
69
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
70
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
71
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
72
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
73
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
74
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
75
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
70
76
|
</div>
|
|
71
77
|
|
|
72
78
|
<script src="micl.js"></script>
|
package/docs/sidesheet.html
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<meta name="description" content="Demonstrating MICL Side Sheets">
|
|
6
7
|
<title>MICL Side Sheets</title>
|
|
7
8
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap">
|
|
8
9
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:FILL@0..1&icon_names=arrow_back,close,dark_mode&display=block">
|
|
@@ -42,11 +43,11 @@
|
|
|
42
43
|
</div>
|
|
43
44
|
|
|
44
45
|
<div class="cards">
|
|
45
|
-
<div class="micl-card-filled">
|
|
46
|
+
<div class="micl-card-filled" style="height:400px">
|
|
46
47
|
<div class="micl-card__content">
|
|
47
|
-
<dialog id="mysidesheet1" class="micl-sidesheet"
|
|
48
|
+
<dialog id="mysidesheet1" class="micl-sidesheet" popover aria-labelledby="title1">
|
|
48
49
|
<div class="micl-sidesheet__headline">
|
|
49
|
-
<h2>
|
|
50
|
+
<h2 id="title1">Lorem Ipsum</h2>
|
|
50
51
|
<button class="micl-iconbutton-standard-s material-symbols-outlined" popovertarget="mysidesheet1">close</button>
|
|
51
52
|
</div>
|
|
52
53
|
<div class="micl-sidesheet__content">
|
|
@@ -58,9 +59,9 @@
|
|
|
58
59
|
</dialog>
|
|
59
60
|
<button type="button" class="micl-button-filled-m" popovertarget="mysidesheet1">Open Standard Sheet</button>
|
|
60
61
|
|
|
61
|
-
<dialog id="mysidesheet2" class="micl-sidesheet"
|
|
62
|
+
<dialog id="mysidesheet2" class="micl-sidesheet" popover aria-labelledby="title2">
|
|
62
63
|
<div class="micl-sidesheet__headline">
|
|
63
|
-
<h2>
|
|
64
|
+
<h2 id="title2">Lorem Ipsum</h2>
|
|
64
65
|
<button class="micl-iconbutton-standard-s material-symbols-outlined" popovertarget="mysidesheet2">close</button>
|
|
65
66
|
</div>
|
|
66
67
|
<div class="micl-sidesheet__content">
|
|
@@ -72,10 +73,10 @@
|
|
|
72
73
|
</dialog>
|
|
73
74
|
<button type="button" class="micl-button-filled-m" popovertarget="mysidesheet2">Open Standard Sheet without dividers</button>
|
|
74
75
|
|
|
75
|
-
<dialog id="mysidesheet3" class="micl-sidesheet" closedby="closerequest">
|
|
76
|
+
<dialog id="mysidesheet3" class="micl-sidesheet" closedby="closerequest" aria-labelledby="title1">
|
|
76
77
|
<div class="micl-sidesheet__headline">
|
|
77
78
|
<button class="micl-iconbutton-standard-s material-symbols-outlined">arrow_back</button>
|
|
78
|
-
<h2>Title</h2>
|
|
79
|
+
<h2 id="title3">Title</h2>
|
|
79
80
|
<button class="micl-iconbutton-standard-s material-symbols-outlined" popovertarget="mysidesheet3">close</button>
|
|
80
81
|
</div>
|
|
81
82
|
<div class="micl-sidesheet__content">
|
|
@@ -102,11 +103,25 @@
|
|
|
102
103
|
</div>
|
|
103
104
|
</div>
|
|
104
105
|
<div class="micl-sidesheet__actions">
|
|
106
|
+
<button type="button" class="micl-button-filled-s">Save</button>
|
|
107
|
+
<button type="button" class="micl-button-outlined-s">Cancel</button>
|
|
105
108
|
</div>
|
|
106
109
|
</dialog>
|
|
107
110
|
<button type="button" class="micl-button-filled-m" popovertarget="mysidesheet3">Open Modal Sheet</button>
|
|
108
111
|
</div>
|
|
109
112
|
</div>
|
|
113
|
+
|
|
114
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
115
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
116
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
117
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
118
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
119
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
120
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
121
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
122
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
123
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
124
|
+
<div class="micl-card-filled" style="height:400px"></div>
|
|
110
125
|
</div>
|
|
111
126
|
|
|
112
127
|
<script src="micl.js"></script>
|
package/micl.ts
CHANGED
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
|
|
22
22
|
import _bottomsheet, { bottomsheetSelector } from './components/bottomsheet';
|
|
23
23
|
import _button, { buttonSelector } from './components/button';
|
|
24
|
-
import _checkbox, { checkboxSelector } from './components/checkbox';
|
|
25
24
|
import _list, { listSelector } from './components/list';
|
|
26
25
|
import _menu, { menuSelector } from './components/menu';
|
|
26
|
+
import _navigationrail, { navigationrailSelector } from './components/navigationrail';
|
|
27
27
|
import _slider, { sliderSelector } from './components/slider';
|
|
28
28
|
import _textfield, { textfieldSelector, selectSelector, textareaSelector } from './components/textfield';
|
|
29
29
|
|
|
@@ -40,15 +40,15 @@ interface ComponentEntry<T extends HTMLElement> {
|
|
|
40
40
|
export default (() =>
|
|
41
41
|
{
|
|
42
42
|
const componentMap: Record<string, ComponentEntry<any>> = {
|
|
43
|
-
[bottomsheetSelector]: { component: _bottomsheet, type: HTMLDialogElement },
|
|
44
|
-
[buttonSelector]
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[selectSelector]
|
|
49
|
-
[sliderSelector]
|
|
50
|
-
[textareaSelector]
|
|
51
|
-
[textfieldSelector]
|
|
43
|
+
[bottomsheetSelector] : { component: _bottomsheet, type: HTMLDialogElement },
|
|
44
|
+
[buttonSelector] : { component: _button, type: HTMLButtonElement },
|
|
45
|
+
[listSelector] : { component: _list, type: HTMLElement },
|
|
46
|
+
[menuSelector] : { component: _menu, type: HTMLElement },
|
|
47
|
+
[navigationrailSelector]: { component: _navigationrail, type: HTMLLabelElement },
|
|
48
|
+
[selectSelector] : { component: _textfield, type: HTMLSelectElement },
|
|
49
|
+
[sliderSelector] : { component: _slider, type: HTMLInputElement },
|
|
50
|
+
[textareaSelector] : { component: _textfield, type: HTMLTextAreaElement },
|
|
51
|
+
[textfieldSelector] : { component: _textfield, type: HTMLInputElement }
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
const selector = Object.keys(componentMap).join(',');
|
|
@@ -71,26 +71,19 @@ export default (() =>
|
|
|
71
71
|
{
|
|
72
72
|
parent.querySelectorAll<HTMLElement>(selector).forEach(initializeComponent);
|
|
73
73
|
|
|
74
|
-
parent.querySelectorAll<HTMLElement>('[class*="micl-"]').forEach(element =>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
) {
|
|
80
|
-
element.addEventListener('pointerdown', e => {
|
|
74
|
+
parent.querySelectorAll<HTMLElement>('[class*="micl-"]').forEach(element =>
|
|
75
|
+
{
|
|
76
|
+
if (window.getComputedStyle(element).getPropertyValue('--micl-ripple') === '1') {
|
|
77
|
+
element.addEventListener('pointerdown', e =>
|
|
78
|
+
{
|
|
81
79
|
if ((e.currentTarget as Element).classList.contains('micl-card--nonactionable')) {
|
|
82
80
|
return;
|
|
83
81
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if ((name != '--x') && (name != '--y')) {
|
|
90
|
-
styles += `${name}:${element.style.getPropertyValue(name)};`;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
element.style.cssText = styles + `--x:${e.clientX - r.left}px;--y:${e.clientY - r.top}px`;
|
|
82
|
+
e.stopPropagation();
|
|
83
|
+
|
|
84
|
+
let r = element.getBoundingClientRect();
|
|
85
|
+
element.style.setProperty('--micl-x', `${e.clientX - r.left}px`);
|
|
86
|
+
element.style.setProperty('--micl-y', `${e.clientY - r.top}px`);
|
|
94
87
|
});
|
|
95
88
|
}
|
|
96
89
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "material-inspired-component-library",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "The Material-Inspired Component Library (MICL) offers a collection of beautifully crafted components leveraging native HTML markup, designed to align with the Material Design 3 guidelines.",
|
|
5
5
|
"author": "MICL Hermana <micl.hermana@proton.me> (https://github.com/henkpb/micl)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
"front-end",
|
|
12
12
|
"UI",
|
|
13
13
|
"UX",
|
|
14
|
+
"CSS",
|
|
14
15
|
"accordion",
|
|
16
|
+
"badge",
|
|
15
17
|
"bottomsheet",
|
|
16
18
|
"button",
|
|
17
19
|
"card",
|
|
@@ -21,6 +23,7 @@
|
|
|
21
23
|
"iconbutton",
|
|
22
24
|
"list",
|
|
23
25
|
"menu",
|
|
26
|
+
"navigation rail",
|
|
24
27
|
"radio button",
|
|
25
28
|
"sidesheet",
|
|
26
29
|
"slider",
|
package/styles.scss
CHANGED
|
@@ -38,6 +38,23 @@
|
|
|
38
38
|
@use 'components/select';
|
|
39
39
|
@use 'components/card';
|
|
40
40
|
@use 'components/dialog';
|
|
41
|
+
@use 'components/badge';
|
|
41
42
|
@use 'components/sidesheet';
|
|
42
43
|
@use 'components/bottomsheet';
|
|
43
44
|
@use 'components/navigationrail';
|
|
45
|
+
|
|
46
|
+
@property --micl-ripple {
|
|
47
|
+
syntax: '<integer>';
|
|
48
|
+
inherits: false;
|
|
49
|
+
initial-value: 0;
|
|
50
|
+
}
|
|
51
|
+
@property --micl-x {
|
|
52
|
+
syntax: '<length>';
|
|
53
|
+
inherits: false;
|
|
54
|
+
initial-value: -100000px;
|
|
55
|
+
}
|
|
56
|
+
@property --micl-y {
|
|
57
|
+
syntax: '<length>';
|
|
58
|
+
inherits: false;
|
|
59
|
+
initial-value: -100000px;
|
|
60
|
+
}
|