@khipu/design-system 0.2.0-alpha.2 → 0.2.0-alpha.21

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.
@@ -1 +1 @@
1
- const _emptyNodeList=[],_weakElements=new WeakSet,isChrome=navigator.userAgent.includes("Chrome");navigator.userAgent.includes("Firefox"),navigator.userAgent.includes("Safari"),navigator.userAgent.includes("Windows");const isMac=navigator.userAgent.includes("Macintosh");navigator.userAgent.includes("Linux"),navigator.userAgent.includes("Android");const isIOS=/iPad|iPhone|iPod/.test(navigator.userAgent);function isDark(){return null==window?void 0:window.matchMedia("(prefers-color-scheme: dark)").matches}async function wait(e){await new Promise(t=>setTimeout(t,e))}function guid(){return"fxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function query(e,t){try{return"string"==typeof e?(t??document).querySelector(e):e}catch{return null}}function queryAll(e,t){try{return"string"==typeof e?(t??document).querySelectorAll(e):e??_emptyNodeList}catch{return _emptyNodeList}}function hasClass(e,t){return(null==e?void 0:e.classList.contains(t))??!1}function hasTag(e,t){var n;return(null==(n=null==e?void 0:e.tagName)?void 0:n.toLowerCase())===t}function hasType(e,t){var n;return(null==(n=null==e?void 0:e.type)?void 0:n.toLowerCase())===t}function addClass(e,t){if(e instanceof NodeList)for(let n=0;n<e.length;n++)e[n].classList.add(t);else null==e||e.classList.add(t)}function removeClass(e,t){if(e instanceof NodeList)for(let n=0;n<e.length;n++)e[n].classList.remove(t);else null==e||e.classList.remove(t)}function on(e,t,n,o=!0){(null==e?void 0:e.addEventListener)&&e.addEventListener(t,n,o)}function onWeak(e,t,n,o=!0){addWeakElement(e),on(e,t,n,o)}function off(e,t,n,o=!0){(null==e?void 0:e.removeEventListener)&&e.removeEventListener(t,n,o)}function insertBefore(e,t){var n;null==(n=null==t?void 0:t.parentNode)||n.insertBefore(e,t)}function prev(e){return null==e?void 0:e.previousElementSibling}function next(e){return null==e?void 0:e.nextElementSibling}function parent(e){return null==e?void 0:e.parentElement}function create(e){const t=document.createElement("div");for(let n=0,o=Object.keys(e),a=o.length;n<a;n++){const a=o[n],i=e[a];t.setAttribute(a,i)}return t}function blurActiveElement(){var e;null==(e=document.activeElement)||e.blur()}function queryAllDataUi(e){return queryAll('[data-ui="#'+e+'"]')}function queryDataUi(e){return query('[data-ui="#'+e+'"]')}function updateAllClickable(e){e.id&&hasClass(e,"page")&&(e=queryDataUi(e.id)??e);const t=parent(e);if(!hasClass(t,"tabs")&&!hasClass(t,"tabbed")&&!hasTag(t,"nav"))return;const n=queryAll("a",t);for(let e=0;e<n.length;e++)removeClass(n[e],"active");hasTag(e,"button")||hasClass(e,"button")||hasClass(e,"chip")||addClass(e,"active")}function addWeakElement(e){_weakElements.has(e)||_weakElements.add(e)}function rootSizeInPixels(){const e=getComputedStyle(document.documentElement).getPropertyValue("--size")||"16px";return e.includes("%")?16*parseInt(e)/100:e.includes("em")?16*parseInt(e):parseInt(e)}function updatePlaceholder(e){e.placeholder||(e.placeholder=" ")}function onClickLabel(e){const t=query("input:not([type=file], [type=checkbox], [type=radio]), select, textarea",parent(e.currentTarget));t&&t.focus()}function onFocusInput(e){updateInput(e.currentTarget)}function onBlurInput(e){updateInput(e.currentTarget)}function onChangeFile(e){updateFile(e.currentTarget)}function onChangeColor(e){updateColor(e.currentTarget)}function onKeydownFile(e){updateFile(e.currentTarget,e)}function onKeydownColor(e){updateColor(e.currentTarget,e)}function onPasswordIconClick(e){var t;const n=e.currentTarget,o=query("input",parent(n));o&&(null==(t=n.textContent)?void 0:t.includes("visibility"))&&("password"===o.type?(o.type="text",n.textContent="visibility_off"):(o.type="password",n.textContent="visibility"))}function onInputTextarea(e){updateTextarea(e.currentTarget)}function updateAllLabels(){const e=queryAll(".field > label");for(let t=0;t<e.length;t++)onWeak(e[t],"click",onClickLabel)}function updateAllInputs(){const e=queryAll(".field > input:not([type=file], [type=color], [type=range])");for(let t=0;t<e.length;t++)onWeak(e[t],"focus",onFocusInput),onWeak(e[t],"blur",onBlurInput),updateInput(e[t])}function updateAllSelects(){const e=queryAll(".field > select");for(let t=0;t<e.length;t++)onWeak(e[t],"focus",onFocusInput),onWeak(e[t],"blur",onBlurInput)}function updateAllFiles(){const e=queryAll(".field > input[type=file]");for(let t=0;t<e.length;t++)onWeak(e[t],"change",onChangeFile),updateFile(e[t])}function updateAllColors(){const e=queryAll(".field > input[type=color]");for(let t=0;t<e.length;t++)onWeak(e[t],"change",onChangeColor),updateColor(e[t])}function updateAllTextareas(){const e=queryAll(".field > textarea");for(let t=0;t<e.length;t++)onWeak(e[t],"focus",onFocusInput),onWeak(e[t],"blur",onBlurInput),updatePlaceholder(e[t]),(!isChrome||isMac||isIOS)&&(onWeak(e[t],"input",onInputTextarea),updateTextarea(e[t]))}function updateAllPasswordIcons(){const e=queryAll(".field:has(> input[type=password]) > i, a");for(let t=0;t<e.length;t++)onWeak(e[t],"click",onPasswordIconClick)}function updateInput(e){hasType(e,"number")&&!e.value&&(e.value=""),updatePlaceholder(e)}function updateFile(e,t){if("Enter"===(null==t?void 0:t.key)){const t=prev(e);if(!hasType(t,"file"))return;return void t.click()}const n=next(e);hasType(n,"text")&&(n.value=e.files?Array.from(e.files).map(e=>e.name).join(", "):"",n.readOnly=!0,onWeak(n,"keydown",onKeydownFile,!1),updateInput(n))}function updateColor(e,t){if("Enter"===(null==t?void 0:t.key)){const t=prev(e);if(!hasType(t,"color"))return;return void t.click()}const n=next(e);hasType(n,"text")&&(n.readOnly=!0,n.value=e.value,onWeak(n,"keydown",onKeydownColor,!1),updateInput(n))}function updateTextarea(e){if(updatePlaceholder(e),e.hasAttribute("rows"))return;const t=rootSizeInPixels();e.style.blockSize="auto",e.style.blockSize=e.scrollHeight-t+"px"}function updateAllFields(){updateAllLabels(),updateAllInputs(),updateAllSelects(),updateAllFiles(),updateAllColors(),updateAllTextareas(),updateAllPasswordIcons()}function onInputDocument$1(e){const t=e.target;(hasTag(t,"input")||hasTag(t,"select"))&&("range"===t.type?(t.focus(),updateRange(t)):updateAllRanges())}function onChangeInput(e){if(!window.matchMedia("(pointer: coarse)").matches)return;e.target.blur()}function updateAllRanges(){const e=document.body,t=queryAll(".slider > input[type=range]");t.length?on(e,"input",onInputDocument$1,!1):off(e,"input",onInputDocument$1,!1);for(let e=0;e<t.length;e++)updateRange(t[e])}function updateRange(e){onWeak(e,"change",onChangeInput);const t=parent(e),n=query("span",t),o=queryAll("input",t);if(!o.length||!n)return;const a=rootSizeInPixels(),i=hasClass(t,"max")?0:.25*a*100/o[0].offsetWidth,r=[],s=[];for(let e=0,t=o.length;e<t;e++){const t=parseFloat(o[e].min)||0,n=parseFloat(o[e].max)||100,a=parseFloat(o[e].value)||0,l=100*(a-t)/(n-t),c=i/2-i*l/100;r.push(l+c),s.push(a)}let l=r[0],c=0,u=100-c-l,d=s[0],p=s[1]||0;o.length>1&&(l=Math.abs(r[1]-r[0]),c=r[1]>r[0]?r[0]:r[1],u=100-c-l,p>d&&(d=s[1]||0,p=s[0])),requestAnimationFrame(()=>t.style.cssText=`--_start: ${c}%; --_end: ${u}%; --_value1: '${d}'; --_value2: '${p}';`)}function updateAllSliders(){updateAllRanges()}const _lastTheme={light:"",dark:""};function getMode(){var e;return(null==(e=null==document?void 0:document.body)?void 0:e.classList.contains("dark"))?"dark":"light"}function lastTheme(){if(_lastTheme.light&&_lastTheme.dark)return _lastTheme;const e=document.body,t=document.createElement("body");t.className="light",e.appendChild(t);const n=document.createElement("body");n.className="dark",e.appendChild(n);const o=getComputedStyle(t),a=getComputedStyle(n),i=["--primary","--on-primary","--primary-container","--on-primary-container","--secondary","--on-secondary","--secondary-container","--on-secondary-container","--tertiary","--on-tertiary","--tertiary-container","--on-tertiary-container","--error","--on-error","--error-container","--on-error-container","--background","--on-background","--surface","--on-surface","--surface-variant","--on-surface-variant","--outline","--outline-variant","--shadow","--scrim","--inverse-surface","--inverse-on-surface","--inverse-primary","--surface-dim","--surface-bright","--surface-container-lowest","--surface-container-low","--surface-container","--surface-container-high","--surface-container-highest"];for(let e=0,t=i.length;e<t;e++)_lastTheme.light+=i[e]+":"+o.getPropertyValue(i[e])+";",_lastTheme.dark+=i[e]+":"+a.getPropertyValue(i[e])+";";return e.removeChild(t),e.removeChild(n),_lastTheme}async function updateTheme(e){const t=globalThis,n=document.body;return e&&t.materialDynamicColors?e.light&&e.dark?(_lastTheme.light=e.light,_lastTheme.dark=e.dark,n.setAttribute("style",e[getMode()]),e):t.materialDynamicColors(e).then(e=>{const t=e=>{let t="";for(let n=0,o=Object.keys(e),a=o.length;n<a;n++){const a=o[n],i=e[a];t+="--"+a.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()+":"+i+";"}return t};return _lastTheme.light=t(e.light),_lastTheme.dark=t(e.dark),n.setAttribute("style",_lastTheme[getMode()]),_lastTheme}):lastTheme()}function updateMode(e){const t=globalThis,n=document.body;if(!n)return e;if(!e)return getMode();"auto"===e&&(e=isDark()?"dark":"light"),n.classList.remove("light","dark"),n.classList.add(e);const o="light"===e?_lastTheme.light:_lastTheme.dark;return t.materialDynamicColors&&n.setAttribute("style",o),getMode()}const _dialogs=[];function onKeydownDialog(e){if("Escape"===e.key){const t=e.currentTarget;updateDialog(t,t)}}function focusOnDialogOrElement(e){(query("[autofocus]",e)??e).focus()}function closeDialog(e,t){removeClass(queryAllDataUi(e.id),"active"),removeClass(e,"active"),removeClass(t,"active"),e.close(),_dialogs.pop();const n=_dialogs[_dialogs.length-1];n&&n.focus()}async function openDialog(e,t,n,o){hasTag(o,"button")||hasClass(o,"button")||hasClass(o,"chip")||addClass(o,"active"),addClass(t,"active"),addClass(e,"active"),n?e.showModal():e.show(),await wait(90),n||on(e,"keydown",onKeydownDialog,!1),_dialogs.push(e),focusOnDialogOrElement(e)}function onClickOverlay(e){const t=e.currentTarget,n=next(t);hasTag(n,"dialog")&&closeDialog(n,t)}async function updateDialog(e,t){blurActiveElement();let n=prev(t);const o=hasClass(t,"active")||t.open,a=hasClass(t,"modal");a||off(t,"keydown",onKeydownDialog,!1),hasClass(n,"overlay")||(n=create({class:"overlay"}),insertBefore(n,t),await wait(90)),a||onWeak(n,"click",onClickOverlay,!1),o?closeDialog(t,n):openDialog(t,n,a,e)}let _timeoutMenu,_timeoutSnackbar;function onClickDocument(e){off(document.body,"click",onClickDocument);const t=e.target,n=queryAll("menu.active");for(let o=0;o<n.length;o++)updateMenu(t,n[o],e)}function focusOnMenuOrInput(e){setTimeout(()=>{const t=query(".field > input",e);t?t.focus():e.focus()},90)}function updateMenu(e,t,n){_timeoutMenu&&clearTimeout(_timeoutMenu),_timeoutMenu=setTimeout(()=>{on(document.body,"click",onClickDocument),hasTag(document.activeElement,"input")||blurActiveElement();const o=hasClass(t,"active"),a=(null==n?void 0:n.target)===e,i=!!e.closest("menu");!o&&i||o&&a?removeClass(t,"active"):(removeClass(queryAll("menu.active"),"active"),addClass(t,"active"),focusOnMenuOrInput(t))},90)}function onClickSnackbar(e){removeClass(e.currentTarget,"active"),_timeoutSnackbar&&clearTimeout(_timeoutSnackbar)}function updateSnackbar(e,t){blurActiveElement();const n=queryAll(".snackbar.active");for(let e=0;e<n.length;e++)removeClass(n[e],"active");addClass(e,"active"),onWeak(e,"click",onClickSnackbar),_timeoutSnackbar&&clearTimeout(_timeoutSnackbar),-1!==t&&(_timeoutSnackbar=setTimeout(()=>{removeClass(e,"active")},t??6e3))}function updatePage(e){const t=parent(e);t&&removeClass(queryAll(":scope > .page",t),"active"),addClass(e,"active")}function onMousedownRipple(e){updateRipple(e)}function onKeydownRipple(e){" "===(null==e?void 0:e.key)&&updateRipple(e)}function updateRipple(e){const t=e instanceof MouseEvent,n=e.currentTarget,o=n.getBoundingClientRect(),a=Math.max(o.width,o.height),i=a/2,r=t?e.clientX-o.left-i:o.width/2-i,s=t?e.clientY-o.top-i:o.height/2-i,l=document.createElement("div");l.className="ripple-js";const c=document.createElement("div");c.style.inlineSize=c.style.blockSize=`${a}px`,c.style.left=`${r}px`,c.style.top=`${s}px`,onWeak(c,"animationend",()=>{l.remove()}),l.appendChild(c),n.appendChild(l)}function updateAllRipples(){const e=queryAll(".slow-ripple, .ripple, .fast-ripple");for(let t=0;t<e.length;t++)onWeak(e[t],"mousedown",onMousedownRipple),onWeak(e[t],"keydown",onKeydownRipple)}function onInputDocument(e){const t=e.target;hasTag(t,"progress")?updateProgress(t):updateAllProgress()}function updateProgress(e){requestAnimationFrame(()=>{if(e.hasAttribute("value")||e.hasAttribute("max"))e.style.setProperty("--_value",String(e.value));else{const t=hasClass(e,"circle")?"50":"100";e.style.setProperty("--_value",t),e.setAttribute("value",t),e.setAttribute("max","100"),e.classList.add("indeterminate")}})}function updateAllProgress(){if(isChrome&&!isMac&&!isIOS)return;const e=document.body,t=queryAll("progress");t.length?on(e,"input",onInputDocument,!1):off(e,"input",onInputDocument,!1);for(let e=0;e<t.length;e++)updateProgress(t[e])}const _context=globalThis;let _timeoutMutation,_mutation;function onMutation(){_timeoutMutation&&clearTimeout(_timeoutMutation),_timeoutMutation=setTimeout(async()=>await _ui(),180)}async function run(e,t,n,o){if(t||(t=query(e.getAttribute("data-ui"))))if(updateAllClickable(e),hasTag(t,"dialog"))requestAnimationFrame(()=>updateDialog(e,t));else if(hasTag(t,"menu"))requestAnimationFrame(()=>updateMenu(e,t,o));else if(hasClass(t,"snackbar"))requestAnimationFrame(()=>updateSnackbar(t,n));else{if(!hasClass(t,"page"))return hasClass(t,"active")?(removeClass(e,"active"),void removeClass(t,"active")):void addClass(t,"active");requestAnimationFrame(()=>updatePage(t))}else e.classList.toggle("active")}function onClickElement(e){run(e.currentTarget,null,null,e)}function onKeydownElement(e){"Enter"===e.key&&run(e.currentTarget,null,null,e)}function setup(){_context.ui||_mutation||!_context.MutationObserver||(_mutation=new MutationObserver(onMutation),_mutation.observe(document.body,{childList:!0,subtree:!0}),onMutation())}function updateAllDataUis(){const e=queryAll("[data-ui]");for(let t=0,n=e.length;t<n;t++)onWeak(e[t],"click",onClickElement),hasTag(e[t],"a")&&!e[t].getAttribute("href")&&onWeak(e[t],"keydown",onKeydownElement)}function _ui(e,t){if(e){if("setup"===e)return void setup();if("guid"===e)return guid();if("mode"===e)return updateMode(t);if("theme"===e)return updateTheme(t);const n=query(e);if(!n)return;run(n,n,t)}updateAllDataUis(),updateAllFields(),updateAllRipples(),updateAllSliders(),updateAllProgress()}function start(){var e;if(_context.ui)return;const t=null==(e=_context.document)?void 0:e.body;!t||t.classList.contains("dark")||t.classList.contains("light")||updateMode("auto"),setup(),_context.ui=_ui}start();const ui=_context.ui;!function(e){"use strict";const t={init:function(e={}){const t={sidebarSelector:e.sidebarSelector||".kds-sidebar"},n=document.querySelector(t.sidebarSelector);n?(!function(e){if(!e)return;const t=e.querySelector(".kds-sidebar-header"),n=e.querySelector(".kds-sidebar-header-dropdown");if(!t||!n)return;t.addEventListener("click",function(e){e.stopPropagation(),n.classList.toggle("kds-dropdown-open");const o=t.querySelector(".kds-sidebar-dropdown-icon");o&&(o.style.transform=n.classList.contains("kds-dropdown-open")?"rotate(180deg)":"rotate(0deg)")}),document.addEventListener("click",function(o){if(!e.contains(o.target)){n.classList.remove("kds-dropdown-open");const e=t.querySelector(".kds-sidebar-dropdown-icon");e&&(e.style.transform="rotate(0deg)")}}),n.querySelectorAll("a").forEach(e=>{e.addEventListener("click",function(){n.classList.remove("kds-dropdown-open");const e=t.querySelector(".kds-sidebar-dropdown-icon");e&&(e.style.transform="rotate(0deg)")})})}(n),function(e){if(!e)return;const t=e.querySelectorAll(".kds-sidebar-nav-item");t.forEach(n=>{n.addEventListener("click",function(n){"#"===this.getAttribute("href")&&n.preventDefault(),t.forEach(e=>{e.classList.remove("active")}),this.classList.add("active");const o=new CustomEvent("kds-sidebar-nav-change",{detail:{item:this,text:this.querySelector("span")?.textContent||""},bubbles:!0});e.dispatchEvent(o)})})}(n),function(){const e=document.querySelector(".kds-hamburger-btn"),t=document.querySelector(".kds-sidebar-close-btn"),n=document.querySelector(".kds-sidebar");e&&n&&(e.addEventListener("click",function(){n.classList.toggle("kds-sidebar-open")}),t&&t.addEventListener("click",function(){n.classList.remove("kds-sidebar-open")}),document.addEventListener("keydown",function(e){"Escape"===e.key&&n.classList.contains("kds-sidebar-open")&&n.classList.remove("kds-sidebar-open")}))}(),console.log("[Khipu Sidebar] Initialized successfully")):console.warn("[Khipu Sidebar] Sidebar not found with selector:",t.sidebarSelector)}};"function"==typeof define&&define.amd?define(function(){return t}):"object"==typeof module&&module.exports?module.exports=t:e.KhipuSidebar=t}("undefined"!=typeof window?window:this),function(){"use strict";function e(){console.log("Initializing Khipu Material Design components..."),void 0!==window.KhipuSidebar&&window.KhipuSidebar.init(),function(){const e=document.getElementById("menu-toggle"),t=document.getElementById("material-sidenav");e&&t&&(e.addEventListener("click",function(){t.classList.toggle("active")}),document.addEventListener("click",function(n){if(t.classList.contains("active")){t.contains(n.target)||e.contains(n.target)||t.classList.remove("active")}}))}(),document.querySelectorAll('.snackbar[data-auto-dismiss="true"]').forEach(function(e){setTimeout(function(){e.classList.remove("active")},5e3)}),window.closeModal=function(e){const t=document.getElementById(e);t&&t.classList.remove("active")},t(),n(),o(),a(),c(),u(),d(),i(),r(),l(),s(),console.log("Material Design initialization complete!")}function t(e){(e=e||document).querySelectorAll(".kds-invoice-sticky").forEach(function(e){if(!e.querySelector(".kds-brand-inner")){var t=e.closest(".kds-screen")||e.parentElement,n=t?t.querySelector(".kds-brand-row"):null,o=n?n.querySelector("svg, img"):null;if(o){var a=document.createElement("div");a.className="kds-brand-inner",a.appendChild(o.cloneNode(!0)),e.insertBefore(a,e.firstChild)}}})}function n(e){(e=e||document).querySelectorAll(".kds-screen").forEach(function(e){var t=e.querySelector(".kds-secure-footer");if(t){var n=e.querySelectorAll(".kds-card-elevated:not(.kds-invoice-sticky)");if(n.length){var o=n[n.length-1];t.classList.add("inside"),o.appendChild(t)}}})}function o(e){(e=e||document).addEventListener("click",function(e){var t=e.target.closest("[data-expand-toggle]");if(t){var n="true"===t.getAttribute("aria-expanded");t.setAttribute("aria-expanded",String(!n));var o=t.getAttribute("aria-controls"),a=o?document.getElementById(o):t.parentElement.querySelector("[data-expand-panel]");a&&(n?a.classList.remove("open"):a.classList.add("open"))}})}function a(e){(e=e||document).addEventListener("click",function(e){var t=e.target.closest(".kds-copy-row[data-copy]");if(t)navigator.clipboard.writeText(t.dataset.copy).then(function(){t.classList.add("copied"),setTimeout(function(){t.classList.remove("copied")},1200)});else{var n=e.target.closest(".kds-copy-all[data-copy-all]");if(n){var o=n.dataset.copyAll,a=o?document.querySelector(o):n.closest(".kds-copy-header").nextElementSibling;if(!a)return;var i=a.querySelectorAll("[data-copy]"),r=[];i.forEach(function(e){r.push(e.dataset.copy)}),navigator.clipboard.writeText(r.join("\n")).then(function(){i.forEach(function(e){e.classList.add("copied"),setTimeout(function(){e.classList.remove("copied")},1200)})})}}})}function i(e){(e=e||document).querySelectorAll(".kds-countdown[data-deadline]").forEach(function(e){var t=new Date(e.dataset.deadline).getTime(),n=e.dataset.serverNow?new Date(e.dataset.serverNow).getTime():Date.now(),o=Date.now()-n,a=e.querySelector("[data-h]"),i=e.querySelector("[data-m]"),r=e.querySelector("[data-s]");function s(e){return e<10?"0"+e:String(e)}function l(){var n=Date.now()-o,l=Math.max(0,t-n),u=Math.floor(l/1e3),d=Math.floor(u/3600),p=Math.floor(u%3600/60),f=u%60;a&&(a.textContent=s(d)),i&&(i.textContent=s(p)),r&&(r.textContent=s(f)),l<3e5&&e.classList.add("urgent"),l<=0&&(clearInterval(c),e.dispatchEvent(new CustomEvent("kds:countdown:expired",{bubbles:!0})))}l();var c=setInterval(l,1e3)})}function r(e){(e=e||document).querySelectorAll(".kds-segmented-tabs").forEach(function(e){var t=e.querySelectorAll("button");e.style.setProperty("--_tab-count",t.length);var n=0;t.forEach(function(e,t){(e.classList.contains("active")||"true"===e.getAttribute("aria-selected"))&&(n=t)}),e.style.setProperty("--_active-idx",n);var o=e.parentElement;o&&o.querySelectorAll("[data-kds-tab-panel]").forEach(function(e,t){e.hidden=t!==n})}),e.addEventListener("click",function(e){var t=e.target.closest(".kds-segmented-tabs button");if(t){var n=t.closest(".kds-segmented-tabs"),o=n.querySelectorAll("button");o.forEach(function(e){e.classList.remove("active"),e.setAttribute("aria-selected","false")}),t.classList.add("active"),t.setAttribute("aria-selected","true");var a=Array.prototype.indexOf.call(o,t);n.style.setProperty("--_active-idx",a);var i=n.parentElement;i&&i.querySelectorAll("[data-kds-tab-panel]").forEach(function(e,t){e.hidden=t!==a}),n.dispatchEvent(new CustomEvent("kds:tab:change",{bubbles:!0,detail:{index:a,button:t}}))}})}function s(e){var t=(e=e||document).querySelector("#bankModal"),n=e.querySelector("#bankSearch"),o=e.querySelector("#bankModalList"),a=e.querySelector("#bankNoResults");function i(e){if(o){var t=e.toLowerCase().trim(),n=o.querySelectorAll(".kds-bank-row"),i=0;n.forEach(function(e){var n=e.querySelector(".kds-bank-row-name");if(n){var o=n.textContent.toLowerCase(),a=!t||-1!==o.indexOf(t);e.style.display=a?"":"none",a&&i++}}),a&&a.classList.toggle("visible",0===i)}}t&&(e.addEventListener("click",function(e){e.target.closest("[data-open-bank-modal]")&&(t.classList.add("open"),n&&(n.value="",n.focus()),i(""))}),e.addEventListener("click",function(e){e.target.closest("[data-close-bank-modal]")&&t.classList.remove("open")}),o&&o.addEventListener("click",function(e){var n=e.target.closest(".kds-bank-row");if(n){var o=n.dataset.bankId||n.dataset.bank||"",a=n.querySelector(".kds-bank-row-name");t.dispatchEvent(new CustomEvent("kds:bank:selected",{bubbles:!0,detail:{id:o,name:a?a.textContent:"",element:n}})),t.classList.remove("open")}}),n&&n.addEventListener("input",function(e){i(e.target.value)}),window.Khipu||(window.Khipu={}),window.Khipu.filterBanks=i)}function l(e){e=e||document;var t=!1;function n(){return window.innerWidth<768}function o(){var o=e.querySelector(".kds-screen.active");if(o&&o.querySelector(".kds-invoice-sticky"))return n()?void(t||(t=!0,requestAnimationFrame(function(){t=!1;var n=e.querySelector(".kds-screen.active");if(n){var o=n.querySelector(".kds-invoice-sticky");if(o){var a=window.scrollY||window.pageYOffset,i=Math.min(Math.max((a-0)/150,0),1);if(!n.style.getPropertyValue("--collapse-collapsible-h")){var r=o.querySelector(".kds-invoice-collapsible");r&&n.style.setProperty("--collapse-collapsible-h",r.offsetHeight+"px")}n.style.setProperty("--collapse-progress",i)}}}))):(o.style.removeProperty("--collapse-progress"),void o.style.removeProperty("--collapse-collapsible-h"))}window.addEventListener("resize",function(){n()||e.querySelectorAll(".kds-screen").forEach(function(e){e.style.removeProperty("--collapse-progress"),e.style.removeProperty("--collapse-collapsible-h")})}),window.addEventListener("scroll",o,{passive:!0}),o()}function c(e){(e=e||document).addEventListener("click",function(e){var t=e.target.closest(".kds-copyable-table-row[data-copy]");t&&navigator.clipboard.writeText(t.dataset.copy).then(function(){t.classList.add("copied"),setTimeout(function(){t.classList.remove("copied")},1200)})})}function u(e){(e=e||document).addEventListener("click",function(e){var t=e.target.closest(".kds-copy-all-btn[data-copy-all]");if(t){var n=t.dataset.copyAll,o=n?document.querySelector(n):t.previousElementSibling;if(o){var a=o.querySelectorAll(".kds-copyable-table-row[data-copy]"),i=[];a.forEach(function(e){var t=e.querySelector(".k"),n=e.dataset.copy;t?i.push(t.textContent.trim()+": "+n):i.push(n)}),navigator.clipboard.writeText(i.join("\n")).then(function(){t.classList.add("copied");var e=t.querySelector("span:not(.kds-icon)"),n=e?e.textContent:"";e&&(e.textContent="Copiado"),a.forEach(function(e){e.classList.add("copied")}),setTimeout(function(){t.classList.remove("copied"),e&&(e.textContent=n),a.forEach(function(e){e.classList.remove("copied")})},1400)})}}})}function d(e){(e=e||document).querySelectorAll(".kds-info-tip[data-tip]").forEach(function(e){if(!e.querySelector(".kds-tip-bubble")){var t=document.createElement("span");t.className="kds-tip-bubble",t.setAttribute("role","tooltip"),t.textContent=e.dataset.tip,e.appendChild(t)}}),e.addEventListener("click",function(e){var t=e.target.closest(".kds-info-tip");if(t){e.preventDefault(),e.stopPropagation();var n="true"===t.getAttribute("aria-expanded");return document.querySelectorAll('.kds-info-tip[aria-expanded="true"]').forEach(function(e){e.setAttribute("aria-expanded","false")}),void t.setAttribute("aria-expanded",String(!n))}document.querySelectorAll('.kds-info-tip[aria-expanded="true"]').forEach(function(e){e.setAttribute("aria-expanded","false")})})}function p(e,t,n){t=t||"info",n=n||5e3;const o=document.createElement("div");o.className="snackbar active "+t;const a=document.createElement("i");a.className="material-symbols-outlined",a.textContent="success"===t?"check_circle":"error"===t?"error":"info";const i=document.createElement("span");i.textContent=e;const r=document.createElement("button");r.className="transparent circle",r.innerHTML='<i class="material-symbols-outlined">close</i>',r.onclick=function(){o.classList.remove("active"),setTimeout(function(){o.remove()},300)},o.appendChild(a),o.appendChild(i),o.appendChild(r),document.body.appendChild(o),setTimeout(function(){o.classList.remove("active"),setTimeout(function(){o.remove()},300)},n)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e(),window.Khipu||(window.Khipu={}),window.Khipu.showSnackbar=p,window.Khipu.closeModal=window.closeModal,window.Khipu.initBrandInner=t,window.Khipu.initSecureFooterInside=n,window.Khipu.initExpandToggle=o,window.Khipu.initCopyRow=a,window.Khipu.initCountdown=i,window.Khipu.initSegmentedTabs=r,window.Khipu.initCopyableTable=c,window.Khipu.initCopyAllBtn=u,window.Khipu.initInfoTip=d,window.Khipu.initBankModal=s,window.Khipu.initStickyInvoice=l,window.showSnackbar=p}();
1
+ const _emptyNodeList=[],_weakElements=new WeakSet,isChrome=navigator.userAgent.includes("Chrome");navigator.userAgent.includes("Firefox"),navigator.userAgent.includes("Safari"),navigator.userAgent.includes("Windows");const isMac=navigator.userAgent.includes("Macintosh");navigator.userAgent.includes("Linux"),navigator.userAgent.includes("Android");const isIOS=/iPad|iPhone|iPod/.test(navigator.userAgent);function isDark(){return null==window?void 0:window.matchMedia("(prefers-color-scheme: dark)").matches}async function wait(e){await new Promise(t=>setTimeout(t,e))}function guid(){return"fxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function query(e,t){try{return"string"==typeof e?(t??document).querySelector(e):e}catch{return null}}function queryAll(e,t){try{return"string"==typeof e?(t??document).querySelectorAll(e):e??_emptyNodeList}catch{return _emptyNodeList}}function hasClass(e,t){return(null==e?void 0:e.classList.contains(t))??!1}function hasTag(e,t){var n;return(null==(n=null==e?void 0:e.tagName)?void 0:n.toLowerCase())===t}function hasType(e,t){var n;return(null==(n=null==e?void 0:e.type)?void 0:n.toLowerCase())===t}function addClass(e,t){if(e instanceof NodeList)for(let n=0;n<e.length;n++)e[n].classList.add(t);else null==e||e.classList.add(t)}function removeClass(e,t){if(e instanceof NodeList)for(let n=0;n<e.length;n++)e[n].classList.remove(t);else null==e||e.classList.remove(t)}function on(e,t,n,o=!0){(null==e?void 0:e.addEventListener)&&e.addEventListener(t,n,o)}function onWeak(e,t,n,o=!0){addWeakElement(e),on(e,t,n,o)}function off(e,t,n,o=!0){(null==e?void 0:e.removeEventListener)&&e.removeEventListener(t,n,o)}function insertBefore(e,t){var n;null==(n=null==t?void 0:t.parentNode)||n.insertBefore(e,t)}function prev(e){return null==e?void 0:e.previousElementSibling}function next(e){return null==e?void 0:e.nextElementSibling}function parent(e){return null==e?void 0:e.parentElement}function create(e){const t=document.createElement("div");for(let n=0,o=Object.keys(e),a=o.length;n<a;n++){const a=o[n],i=e[a];t.setAttribute(a,i)}return t}function blurActiveElement(){var e;null==(e=document.activeElement)||e.blur()}function queryAllDataUi(e){return queryAll('[data-ui="#'+e+'"]')}function queryDataUi(e){return query('[data-ui="#'+e+'"]')}function updateAllClickable(e){e.id&&hasClass(e,"page")&&(e=queryDataUi(e.id)??e);const t=parent(e);if(!hasClass(t,"tabs")&&!hasClass(t,"tabbed")&&!hasTag(t,"nav"))return;const n=queryAll("a",t);for(let e=0;e<n.length;e++)removeClass(n[e],"active");hasTag(e,"button")||hasClass(e,"button")||hasClass(e,"chip")||addClass(e,"active")}function addWeakElement(e){_weakElements.has(e)||_weakElements.add(e)}function rootSizeInPixels(){const e=getComputedStyle(document.documentElement).getPropertyValue("--size")||"16px";return e.includes("%")?16*parseInt(e)/100:e.includes("em")?16*parseInt(e):parseInt(e)}function updatePlaceholder(e){e.placeholder||(e.placeholder=" ")}function onClickLabel(e){const t=query("input:not([type=file], [type=checkbox], [type=radio]), select, textarea",parent(e.currentTarget));t&&t.focus()}function onFocusInput(e){updateInput(e.currentTarget)}function onBlurInput(e){updateInput(e.currentTarget)}function onChangeFile(e){updateFile(e.currentTarget)}function onChangeColor(e){updateColor(e.currentTarget)}function onKeydownFile(e){updateFile(e.currentTarget,e)}function onKeydownColor(e){updateColor(e.currentTarget,e)}function onPasswordIconClick(e){var t;const n=e.currentTarget,o=query("input",parent(n));o&&(null==(t=n.textContent)?void 0:t.includes("visibility"))&&("password"===o.type?(o.type="text",n.textContent="visibility_off"):(o.type="password",n.textContent="visibility"))}function onInputTextarea(e){updateTextarea(e.currentTarget)}function updateAllLabels(){const e=queryAll(".field > label");for(let t=0;t<e.length;t++)onWeak(e[t],"click",onClickLabel)}function updateAllInputs(){const e=queryAll(".field > input:not([type=file], [type=color], [type=range])");for(let t=0;t<e.length;t++)onWeak(e[t],"focus",onFocusInput),onWeak(e[t],"blur",onBlurInput),updateInput(e[t])}function updateAllSelects(){const e=queryAll(".field > select");for(let t=0;t<e.length;t++)onWeak(e[t],"focus",onFocusInput),onWeak(e[t],"blur",onBlurInput)}function updateAllFiles(){const e=queryAll(".field > input[type=file]");for(let t=0;t<e.length;t++)onWeak(e[t],"change",onChangeFile),updateFile(e[t])}function updateAllColors(){const e=queryAll(".field > input[type=color]");for(let t=0;t<e.length;t++)onWeak(e[t],"change",onChangeColor),updateColor(e[t])}function updateAllTextareas(){const e=queryAll(".field > textarea");for(let t=0;t<e.length;t++)onWeak(e[t],"focus",onFocusInput),onWeak(e[t],"blur",onBlurInput),updatePlaceholder(e[t]),(!isChrome||isMac||isIOS)&&(onWeak(e[t],"input",onInputTextarea),updateTextarea(e[t]))}function updateAllPasswordIcons(){const e=queryAll(".field:has(> input[type=password]) > i, a");for(let t=0;t<e.length;t++)onWeak(e[t],"click",onPasswordIconClick)}function updateInput(e){hasType(e,"number")&&!e.value&&(e.value=""),updatePlaceholder(e)}function updateFile(e,t){if("Enter"===(null==t?void 0:t.key)){const t=prev(e);if(!hasType(t,"file"))return;return void t.click()}const n=next(e);hasType(n,"text")&&(n.value=e.files?Array.from(e.files).map(e=>e.name).join(", "):"",n.readOnly=!0,onWeak(n,"keydown",onKeydownFile,!1),updateInput(n))}function updateColor(e,t){if("Enter"===(null==t?void 0:t.key)){const t=prev(e);if(!hasType(t,"color"))return;return void t.click()}const n=next(e);hasType(n,"text")&&(n.readOnly=!0,n.value=e.value,onWeak(n,"keydown",onKeydownColor,!1),updateInput(n))}function updateTextarea(e){if(updatePlaceholder(e),e.hasAttribute("rows"))return;const t=rootSizeInPixels();e.style.blockSize="auto",e.style.blockSize=e.scrollHeight-t+"px"}function updateAllFields(){updateAllLabels(),updateAllInputs(),updateAllSelects(),updateAllFiles(),updateAllColors(),updateAllTextareas(),updateAllPasswordIcons()}function onInputDocument$1(e){const t=e.target;(hasTag(t,"input")||hasTag(t,"select"))&&("range"===t.type?(t.focus(),updateRange(t)):updateAllRanges())}function onChangeInput(e){if(!window.matchMedia("(pointer: coarse)").matches)return;e.target.blur()}function updateAllRanges(){const e=document.body,t=queryAll(".slider > input[type=range]");t.length?on(e,"input",onInputDocument$1,!1):off(e,"input",onInputDocument$1,!1);for(let e=0;e<t.length;e++)updateRange(t[e])}function updateRange(e){onWeak(e,"change",onChangeInput);const t=parent(e),n=query("span",t),o=queryAll("input",t);if(!o.length||!n)return;const a=rootSizeInPixels(),i=hasClass(t,"max")?0:.25*a*100/o[0].offsetWidth,r=[],s=[];for(let e=0,t=o.length;e<t;e++){const t=parseFloat(o[e].min)||0,n=parseFloat(o[e].max)||100,a=parseFloat(o[e].value)||0,l=100*(a-t)/(n-t),c=i/2-i*l/100;r.push(l+c),s.push(a)}let l=r[0],c=0,u=100-c-l,d=s[0],p=s[1]||0;o.length>1&&(l=Math.abs(r[1]-r[0]),c=r[1]>r[0]?r[0]:r[1],u=100-c-l,p>d&&(d=s[1]||0,p=s[0])),requestAnimationFrame(()=>t.style.cssText=`--_start: ${c}%; --_end: ${u}%; --_value1: '${d}'; --_value2: '${p}';`)}function updateAllSliders(){updateAllRanges()}const _lastTheme={light:"",dark:""};function getMode(){var e;return(null==(e=null==document?void 0:document.body)?void 0:e.classList.contains("dark"))?"dark":"light"}function lastTheme(){if(_lastTheme.light&&_lastTheme.dark)return _lastTheme;const e=document.body,t=document.createElement("body");t.className="light",e.appendChild(t);const n=document.createElement("body");n.className="dark",e.appendChild(n);const o=getComputedStyle(t),a=getComputedStyle(n),i=["--primary","--on-primary","--primary-container","--on-primary-container","--secondary","--on-secondary","--secondary-container","--on-secondary-container","--tertiary","--on-tertiary","--tertiary-container","--on-tertiary-container","--error","--on-error","--error-container","--on-error-container","--background","--on-background","--surface","--on-surface","--surface-variant","--on-surface-variant","--outline","--outline-variant","--shadow","--scrim","--inverse-surface","--inverse-on-surface","--inverse-primary","--surface-dim","--surface-bright","--surface-container-lowest","--surface-container-low","--surface-container","--surface-container-high","--surface-container-highest"];for(let e=0,t=i.length;e<t;e++)_lastTheme.light+=i[e]+":"+o.getPropertyValue(i[e])+";",_lastTheme.dark+=i[e]+":"+a.getPropertyValue(i[e])+";";return e.removeChild(t),e.removeChild(n),_lastTheme}async function updateTheme(e){const t=globalThis,n=document.body;return e&&t.materialDynamicColors?e.light&&e.dark?(_lastTheme.light=e.light,_lastTheme.dark=e.dark,n.setAttribute("style",e[getMode()]),e):t.materialDynamicColors(e).then(e=>{const t=e=>{let t="";for(let n=0,o=Object.keys(e),a=o.length;n<a;n++){const a=o[n],i=e[a];t+="--"+a.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()+":"+i+";"}return t};return _lastTheme.light=t(e.light),_lastTheme.dark=t(e.dark),n.setAttribute("style",_lastTheme[getMode()]),_lastTheme}):lastTheme()}function updateMode(e){const t=globalThis,n=document.body;if(!n)return e;if(!e)return getMode();"auto"===e&&(e=isDark()?"dark":"light"),n.classList.remove("light","dark"),n.classList.add(e);const o="light"===e?_lastTheme.light:_lastTheme.dark;return t.materialDynamicColors&&n.setAttribute("style",o),getMode()}const _dialogs=[];function onKeydownDialog(e){if("Escape"===e.key){const t=e.currentTarget;updateDialog(t,t)}}function focusOnDialogOrElement(e){(query("[autofocus]",e)??e).focus()}function closeDialog(e,t){removeClass(queryAllDataUi(e.id),"active"),removeClass(e,"active"),removeClass(t,"active"),e.close(),_dialogs.pop();const n=_dialogs[_dialogs.length-1];n&&n.focus()}async function openDialog(e,t,n,o){hasTag(o,"button")||hasClass(o,"button")||hasClass(o,"chip")||addClass(o,"active"),addClass(t,"active"),addClass(e,"active"),n?e.showModal():e.show(),await wait(90),n||on(e,"keydown",onKeydownDialog,!1),_dialogs.push(e),focusOnDialogOrElement(e)}function onClickOverlay(e){const t=e.currentTarget,n=next(t);hasTag(n,"dialog")&&closeDialog(n,t)}async function updateDialog(e,t){blurActiveElement();let n=prev(t);const o=hasClass(t,"active")||t.open,a=hasClass(t,"modal");a||off(t,"keydown",onKeydownDialog,!1),hasClass(n,"overlay")||(n=create({class:"overlay"}),insertBefore(n,t),await wait(90)),a||onWeak(n,"click",onClickOverlay,!1),o?closeDialog(t,n):openDialog(t,n,a,e)}let _timeoutMenu,_timeoutSnackbar;function onClickDocument(e){off(document.body,"click",onClickDocument);const t=e.target,n=queryAll("menu.active");for(let o=0;o<n.length;o++)updateMenu(t,n[o],e)}function focusOnMenuOrInput(e){setTimeout(()=>{const t=query(".field > input",e);t?t.focus():e.focus()},90)}function updateMenu(e,t,n){_timeoutMenu&&clearTimeout(_timeoutMenu),_timeoutMenu=setTimeout(()=>{on(document.body,"click",onClickDocument),hasTag(document.activeElement,"input")||blurActiveElement();const o=hasClass(t,"active"),a=(null==n?void 0:n.target)===e,i=!!e.closest("menu");!o&&i||o&&a?removeClass(t,"active"):(removeClass(queryAll("menu.active"),"active"),addClass(t,"active"),focusOnMenuOrInput(t))},90)}function onClickSnackbar(e){removeClass(e.currentTarget,"active"),_timeoutSnackbar&&clearTimeout(_timeoutSnackbar)}function updateSnackbar(e,t){blurActiveElement();const n=queryAll(".snackbar.active");for(let e=0;e<n.length;e++)removeClass(n[e],"active");addClass(e,"active"),onWeak(e,"click",onClickSnackbar),_timeoutSnackbar&&clearTimeout(_timeoutSnackbar),-1!==t&&(_timeoutSnackbar=setTimeout(()=>{removeClass(e,"active")},t??6e3))}function updatePage(e){const t=parent(e);t&&removeClass(queryAll(":scope > .page",t),"active"),addClass(e,"active")}function onMousedownRipple(e){updateRipple(e)}function onKeydownRipple(e){" "===(null==e?void 0:e.key)&&updateRipple(e)}function updateRipple(e){const t=e instanceof MouseEvent,n=e.currentTarget,o=n.getBoundingClientRect(),a=Math.max(o.width,o.height),i=a/2,r=t?e.clientX-o.left-i:o.width/2-i,s=t?e.clientY-o.top-i:o.height/2-i,l=document.createElement("div");l.className="ripple-js";const c=document.createElement("div");c.style.inlineSize=c.style.blockSize=`${a}px`,c.style.left=`${r}px`,c.style.top=`${s}px`,onWeak(c,"animationend",()=>{l.remove()}),l.appendChild(c),n.appendChild(l)}function updateAllRipples(){const e=queryAll(".slow-ripple, .ripple, .fast-ripple");for(let t=0;t<e.length;t++)onWeak(e[t],"mousedown",onMousedownRipple),onWeak(e[t],"keydown",onKeydownRipple)}function onInputDocument(e){const t=e.target;hasTag(t,"progress")?updateProgress(t):updateAllProgress()}function updateProgress(e){requestAnimationFrame(()=>{if(e.hasAttribute("value")||e.hasAttribute("max"))e.style.setProperty("--_value",String(e.value));else{const t=hasClass(e,"circle")?"50":"100";e.style.setProperty("--_value",t),e.setAttribute("value",t),e.setAttribute("max","100"),e.classList.add("indeterminate")}})}function updateAllProgress(){if(isChrome&&!isMac&&!isIOS)return;const e=document.body,t=queryAll("progress");t.length?on(e,"input",onInputDocument,!1):off(e,"input",onInputDocument,!1);for(let e=0;e<t.length;e++)updateProgress(t[e])}const _context=globalThis;let _timeoutMutation,_mutation;function onMutation(){_timeoutMutation&&clearTimeout(_timeoutMutation),_timeoutMutation=setTimeout(async()=>await _ui(),180)}async function run(e,t,n,o){if(t||(t=query(e.getAttribute("data-ui"))))if(updateAllClickable(e),hasTag(t,"dialog"))requestAnimationFrame(()=>updateDialog(e,t));else if(hasTag(t,"menu"))requestAnimationFrame(()=>updateMenu(e,t,o));else if(hasClass(t,"snackbar"))requestAnimationFrame(()=>updateSnackbar(t,n));else{if(!hasClass(t,"page"))return hasClass(t,"active")?(removeClass(e,"active"),void removeClass(t,"active")):void addClass(t,"active");requestAnimationFrame(()=>updatePage(t))}else e.classList.toggle("active")}function onClickElement(e){run(e.currentTarget,null,null,e)}function onKeydownElement(e){"Enter"===e.key&&run(e.currentTarget,null,null,e)}function setup(){_context.ui||_mutation||!_context.MutationObserver||(_mutation=new MutationObserver(onMutation),_mutation.observe(document.body,{childList:!0,subtree:!0}),onMutation())}function updateAllDataUis(){const e=queryAll("[data-ui]");for(let t=0,n=e.length;t<n;t++)onWeak(e[t],"click",onClickElement),hasTag(e[t],"a")&&!e[t].getAttribute("href")&&onWeak(e[t],"keydown",onKeydownElement)}function _ui(e,t){if(e){if("setup"===e)return void setup();if("guid"===e)return guid();if("mode"===e)return updateMode(t);if("theme"===e)return updateTheme(t);const n=query(e);if(!n)return;run(n,n,t)}updateAllDataUis(),updateAllFields(),updateAllRipples(),updateAllSliders(),updateAllProgress()}function start(){var e;if(_context.ui)return;const t=null==(e=_context.document)?void 0:e.body;!t||t.classList.contains("dark")||t.classList.contains("light")||updateMode("auto"),setup(),_context.ui=_ui}start();const ui=_context.ui;!function(e){"use strict";const t={init:function(e={}){const t={sidebarSelector:e.sidebarSelector||".kds-sidebar"},n=document.querySelector(t.sidebarSelector);n?(!function(e){if(!e)return;const t=e.querySelector(".kds-sidebar-header"),n=e.querySelector(".kds-sidebar-header-dropdown");if(!t||!n)return;t.addEventListener("click",function(e){e.stopPropagation(),n.classList.toggle("kds-dropdown-open");const o=t.querySelector(".kds-sidebar-dropdown-icon");o&&(o.style.transform=n.classList.contains("kds-dropdown-open")?"rotate(180deg)":"rotate(0deg)")}),document.addEventListener("click",function(o){if(!e.contains(o.target)){n.classList.remove("kds-dropdown-open");const e=t.querySelector(".kds-sidebar-dropdown-icon");e&&(e.style.transform="rotate(0deg)")}}),n.querySelectorAll("a").forEach(e=>{e.addEventListener("click",function(){n.classList.remove("kds-dropdown-open");const e=t.querySelector(".kds-sidebar-dropdown-icon");e&&(e.style.transform="rotate(0deg)")})})}(n),function(e){if(!e)return;const t=e.querySelectorAll(".kds-sidebar-nav-item");t.forEach(n=>{n.addEventListener("click",function(n){"#"===this.getAttribute("href")&&n.preventDefault(),t.forEach(e=>{e.classList.remove("active")}),this.classList.add("active");const o=new CustomEvent("kds-sidebar-nav-change",{detail:{item:this,text:this.querySelector("span")?.textContent||""},bubbles:!0});e.dispatchEvent(o)})})}(n),function(){const e=document.querySelector(".kds-hamburger-btn"),t=document.querySelector(".kds-sidebar-close-btn"),n=document.querySelector(".kds-sidebar");e&&n&&(e.addEventListener("click",function(){n.classList.toggle("kds-sidebar-open")}),t&&t.addEventListener("click",function(){n.classList.remove("kds-sidebar-open")}),document.addEventListener("keydown",function(e){"Escape"===e.key&&n.classList.contains("kds-sidebar-open")&&n.classList.remove("kds-sidebar-open")}))}(),console.log("[Khipu Sidebar] Initialized successfully")):console.warn("[Khipu Sidebar] Sidebar not found with selector:",t.sidebarSelector)}};"function"==typeof define&&define.amd?define(function(){return t}):"object"==typeof module&&module.exports?module.exports=t:e.KhipuSidebar=t}("undefined"!=typeof window?window:this),function(){"use strict";function e(){console.log("Initializing Khipu Material Design components..."),void 0!==window.KhipuSidebar&&window.KhipuSidebar.init(),function(){const e=document.getElementById("menu-toggle"),t=document.getElementById("material-sidenav");e&&t&&(e.addEventListener("click",function(){t.classList.toggle("active")}),document.addEventListener("click",function(n){if(t.classList.contains("active")){t.contains(n.target)||e.contains(n.target)||t.classList.remove("active")}}))}(),document.querySelectorAll('.snackbar[data-auto-dismiss="true"]').forEach(function(e){var n=e.querySelector("span");n&&n.classList.add("max");var o=document.createElement("button");o.className="kds-snackbar-close",o.setAttribute("aria-label","Cerrar"),o.innerHTML='<i class="material-symbols-outlined">close</i>',o.onclick=function(){t(e)},e.appendChild(o),setTimeout(function(){t(e)},5e3)}),window.closeModal=function(e){const t=document.getElementById(e);t&&t.classList.remove("active")},n(),o(),a(),i(),u(),d(),p(),r(),s(),c(),l(),console.log("Material Design initialization complete!")}function t(e){e.classList.remove("active"),setTimeout(function(){e.remove()},300)}function n(e){(e=e||document).querySelectorAll(".kds-invoice-sticky").forEach(function(e){if(!e.querySelector(".kds-brand-inner")){var t=e.closest(".kds-screen")||e.parentElement,n=t?t.querySelector(".kds-brand-row"):null,o=n?n.querySelector("svg, img"):null;if(o){var a=e.querySelector(".kds-invoice-header"),i=a?a.firstElementChild:null;if(i){var r=document.createElement("div");r.className="kds-brand-inner",r.appendChild(o.cloneNode(!0)),i.insertBefore(r,i.firstChild)}}}})}function o(e){(e=e||document).querySelectorAll(".kds-screen").forEach(function(e){var t=e.querySelector(".kds-secure-footer");if(t){var n=e.querySelectorAll(".kds-card-elevated:not(.kds-invoice-sticky)");if(n.length){var o=n[n.length-1];t.classList.add("inside"),o.appendChild(t)}}})}function a(e){(e=e||document).addEventListener("click",function(e){var t=e.target.closest("[data-expand-toggle]");if(t){var n="true"===t.getAttribute("aria-expanded");t.setAttribute("aria-expanded",String(!n));var o=t.getAttribute("aria-controls"),a=o?document.getElementById(o):t.parentElement.querySelector("[data-expand-panel]");a&&(n?a.classList.remove("open"):a.classList.add("open"))}})}function i(e){(e=e||document).addEventListener("click",function(e){var t=e.target.closest(".kds-copy-row[data-copy]");if(t)navigator.clipboard.writeText(t.dataset.copy).then(function(){t.classList.add("copied"),setTimeout(function(){t.classList.remove("copied")},1200)});else{var n=e.target.closest(".kds-copy-all[data-copy-all]");if(n){var o=n.dataset.copyAll,a=o?document.querySelector(o):n.closest(".kds-copy-header").nextElementSibling;if(!a)return;var i=a.querySelectorAll("[data-copy]"),r=[];i.forEach(function(e){r.push(e.dataset.copy)}),navigator.clipboard.writeText(r.join("\n")).then(function(){i.forEach(function(e){e.classList.add("copied"),setTimeout(function(){e.classList.remove("copied")},1200)})})}}})}function r(e){(e=e||document).querySelectorAll(".kds-countdown[data-deadline]").forEach(function(e){var t=new Date(e.dataset.deadline).getTime(),n=e.dataset.serverNow?new Date(e.dataset.serverNow).getTime():Date.now(),o=Date.now()-n,a=e.querySelector("[data-h]"),i=e.querySelector("[data-m]"),r=e.querySelector("[data-s]");function s(e){return e<10?"0"+e:String(e)}function l(){var n=Date.now()-o,l=Math.max(0,t-n),u=Math.floor(l/1e3),d=Math.floor(u/3600),p=Math.floor(u%3600/60),f=u%60;a&&(a.textContent=s(d)),i&&(i.textContent=s(p)),r&&(r.textContent=s(f)),l<3e5&&e.classList.add("urgent"),l<=0&&(clearInterval(c),e.dispatchEvent(new CustomEvent("kds:countdown:expired",{bubbles:!0})))}l();var c=setInterval(l,1e3)})}function s(e){(e=e||document).querySelectorAll(".kds-segmented-tabs").forEach(function(e){var t=e.querySelectorAll("button");e.style.setProperty("--_tab-count",t.length);var n=0;t.forEach(function(e,t){(e.classList.contains("active")||"true"===e.getAttribute("aria-selected"))&&(n=t)}),e.style.setProperty("--_active-idx",n);var o=e.parentElement;o&&o.querySelectorAll("[data-kds-tab-panel]").forEach(function(e,t){e.hidden=t!==n})}),e.addEventListener("click",function(e){var t=e.target.closest(".kds-segmented-tabs button");if(t){var n=t.closest(".kds-segmented-tabs"),o=n.querySelectorAll("button");o.forEach(function(e){e.classList.remove("active"),e.setAttribute("aria-selected","false")}),t.classList.add("active"),t.setAttribute("aria-selected","true");var a=Array.prototype.indexOf.call(o,t);n.style.setProperty("--_active-idx",a);var i=n.parentElement;i&&i.querySelectorAll("[data-kds-tab-panel]").forEach(function(e,t){e.hidden=t!==a}),n.dispatchEvent(new CustomEvent("kds:tab:change",{bubbles:!0,detail:{index:a,button:t}}))}})}function l(e){var t=(e=e||document).querySelector("#bankModal"),n=e.querySelector("#bankSearch"),o=e.querySelector("#bankModalList"),a=e.querySelector("#bankNoResults");function i(e){if(o){var t=e.toLowerCase().trim(),n=o.querySelectorAll(".kds-bank-row"),i=0;n.forEach(function(e){var n=e.querySelector(".kds-bank-row-name");if(n){var o=n.textContent.toLowerCase(),a=!t||-1!==o.indexOf(t);e.style.display=a?"":"none",a&&i++}}),a&&a.classList.toggle("visible",0===i)}}t&&(e.addEventListener("click",function(e){e.target.closest("[data-open-bank-modal]")&&(t.classList.add("open"),n&&(n.value="",n.focus()),i(""))}),e.addEventListener("click",function(e){e.target.closest("[data-close-bank-modal]")&&t.classList.remove("open")}),o&&o.addEventListener("click",function(e){var n=e.target.closest(".kds-bank-row");if(n){var o=n.dataset.bankId||n.dataset.bank||"",a=n.querySelector(".kds-bank-row-name");t.dispatchEvent(new CustomEvent("kds:bank:selected",{bubbles:!0,detail:{id:o,name:a?a.textContent:"",element:n}})),t.classList.remove("open")}}),n&&n.addEventListener("input",function(e){i(e.target.value)}),window.Khipu||(window.Khipu={}),window.Khipu.filterBanks=i)}function c(e){e=e||document;var t=!1;function n(){return window.innerWidth<768}function o(){var o=e.querySelector(".kds-screen.active");if(o&&o.querySelector(".kds-invoice-sticky"))return n()?void(t||(t=!0,requestAnimationFrame(function(){t=!1;var n=e.querySelector(".kds-screen.active");if(n){var o=n.querySelector(".kds-invoice-sticky");if(o){var a=window.scrollY||window.pageYOffset,i=Math.min(Math.max((a-0)/20,0),1);if(!n.style.getPropertyValue("--collapse-collapsible-h")){var r=o.querySelector(".kds-invoice-collapsible");r&&n.style.setProperty("--collapse-collapsible-h",r.offsetHeight+"px")}n.style.setProperty("--collapse-progress",i),o.classList.toggle("is-collapsed",i>=1),i>0&&o.querySelectorAll('[data-expand-toggle][aria-expanded="true"]').forEach(function(e){e.setAttribute("aria-expanded","false");var t=e.getAttribute("aria-controls"),n=t?document.getElementById(t):null;n&&n.classList.remove("open")})}}}))):(o.style.removeProperty("--collapse-progress"),void o.style.removeProperty("--collapse-collapsible-h"))}window.addEventListener("resize",function(){n()||(e.querySelectorAll(".kds-screen").forEach(function(e){e.style.removeProperty("--collapse-progress"),e.style.removeProperty("--collapse-collapsible-h")}),e.querySelectorAll(".kds-invoice-sticky.is-collapsed").forEach(function(e){e.classList.remove("is-collapsed")}))}),window.addEventListener("scroll",o,{passive:!0}),o()}function u(e){(e=e||document).addEventListener("click",function(e){var t=e.target.closest(".kds-copyable-table-row[data-copy]");t&&navigator.clipboard.writeText(t.dataset.copy).then(function(){t.classList.add("copied"),setTimeout(function(){t.classList.remove("copied")},1200)})})}function d(e){(e=e||document).addEventListener("click",function(e){var t=e.target.closest(".kds-copy-all-btn[data-copy-all]");if(t){var n=t.dataset.copyAll,o=n?document.querySelector(n):t.previousElementSibling;if(o){var a=o.querySelectorAll(".kds-copyable-table-row[data-copy]"),i=[];a.forEach(function(e){var t=e.querySelector(".k"),n=e.dataset.copy;t?i.push(t.textContent.trim()+": "+n):i.push(n)}),navigator.clipboard.writeText(i.join("\n")).then(function(){t.classList.add("copied");var e=t.querySelector("span:not(.kds-icon)"),n=e?e.textContent:"";e&&(e.textContent="Copiado"),a.forEach(function(e){e.classList.add("copied")}),setTimeout(function(){t.classList.remove("copied"),e&&(e.textContent=n),a.forEach(function(e){e.classList.remove("copied")})},1400)})}}})}function p(e){(e=e||document).querySelectorAll(".kds-info-tip[data-tip]").forEach(function(e){if(!e.querySelector(".kds-tip-bubble")){var t=document.createElement("span");t.className="kds-tip-bubble",t.setAttribute("role","tooltip"),t.textContent=e.dataset.tip,e.appendChild(t)}}),e.addEventListener("click",function(e){var t=e.target.closest(".kds-info-tip");if(t){e.preventDefault(),e.stopPropagation();var n="true"===t.getAttribute("aria-expanded");return document.querySelectorAll('.kds-info-tip[aria-expanded="true"]').forEach(function(e){e.setAttribute("aria-expanded","false")}),void t.setAttribute("aria-expanded",String(!n))}document.querySelectorAll('.kds-info-tip[aria-expanded="true"]').forEach(function(e){e.setAttribute("aria-expanded","false")})})}function f(e,n,o){n=n||"info",o=o||5e3;var a=document.createElement("div");a.className="snackbar active "+n,a.setAttribute("data-auto-dismiss","true"),a.style.setProperty("--kds-snackbar-duration",o+"ms");var i=document.createElement("i");i.className="material-symbols-outlined",i.textContent="success"===n?"check_circle":"error"===n?"error":"info";var r=document.createElement("span");r.className="max",r.textContent=e;var s=document.createElement("button");s.className="kds-snackbar-close",s.setAttribute("aria-label","Cerrar"),s.innerHTML='<i class="material-symbols-outlined">close</i>',s.onclick=function(){t(a)},a.appendChild(i),a.appendChild(r),a.appendChild(s),document.body.appendChild(a),setTimeout(function(){t(a)},o)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e(),window.Khipu||(window.Khipu={}),window.Khipu.showSnackbar=f,window.Khipu.closeModal=window.closeModal,window.Khipu.initBrandInner=n,window.Khipu.initSecureFooterInside=o,window.Khipu.initExpandToggle=a,window.Khipu.initCopyRow=i,window.Khipu.initCountdown=r,window.Khipu.initSegmentedTabs=s,window.Khipu.initCopyableTable=u,window.Khipu.initCopyAllBtn=d,window.Khipu.initInfoTip=p,window.Khipu.initBankModal=l,window.Khipu.initStickyInvoice=c,window.showSnackbar=f}();
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@khipu/design-system/beercss",
3
- "version": "0.2.0-alpha.2",
3
+ "version": "0.2.0-alpha.21",
4
4
  "description": "Khipu BeerCSS bundle with Material Design 3 and Khipu customizations",
5
- "buildDate": "2026-05-05T20:41:25.782Z",
5
+ "buildDate": "2026-05-25T17:31:42.122Z",
6
6
  "includes": {
7
7
  "beercss": "4.0.1",
8
8
  "khipu-tokens": "latest",
@@ -16,7 +16,7 @@
16
16
  "jsUnminified": "khipu-beercss.js"
17
17
  },
18
18
  "cdn": {
19
- "css": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.2/dist/beercss/khipu-beercss.min.css",
20
- "js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.2/dist/beercss/khipu-beercss.min.js"
19
+ "css": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.21/dist/beercss/khipu-beercss.min.css",
20
+ "js": "https://cdn.jsdelivr.net/npm/@khipu/design-system@0.2.0-alpha.21/dist/beercss/khipu-beercss.min.js"
21
21
  }
22
22
  }
package/dist/index.d.mts CHANGED
@@ -478,8 +478,8 @@ declare const typography: {
478
478
  readonly button: {
479
479
  readonly fontFamily: "\"Public Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
480
480
  readonly fontWeight: 500;
481
- readonly fontSize: "0.9375rem";
482
- readonly lineHeight: "26px";
481
+ readonly fontSize: "0.875rem";
482
+ readonly lineHeight: "1.5";
483
483
  readonly letterSpacing: "0.46px";
484
484
  readonly textTransform: "uppercase";
485
485
  };
@@ -558,10 +558,10 @@ declare const semanticSpacing: {
558
558
  readonly padding: "16px 12px";
559
559
  };
560
560
  readonly button: {
561
- readonly paddingY: "8px";
562
- readonly paddingX: "22px";
563
- readonly padding: "8px 22px";
564
- readonly minHeight: "50px";
561
+ readonly paddingY: "0";
562
+ readonly paddingX: "16px";
563
+ readonly padding: "0 16px";
564
+ readonly minHeight: "44px";
565
565
  readonly iconSize: "20px";
566
566
  };
567
567
  readonly sectionGap: "32px";
@@ -608,7 +608,7 @@ declare const borderRadius: {
608
608
  readonly '2xl': "20px";
609
609
  readonly '3xl': "24px";
610
610
  readonly full: "9999px";
611
- readonly button: "4px";
611
+ readonly button: "10px";
612
612
  readonly input: "4px";
613
613
  readonly card: "14px";
614
614
  readonly modal: "20px";
@@ -933,8 +933,8 @@ declare const tokensByMode: {
933
933
  readonly button: {
934
934
  readonly fontFamily: "\"Public Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
935
935
  readonly fontWeight: 500;
936
- readonly fontSize: "0.9375rem";
937
- readonly lineHeight: "26px";
936
+ readonly fontSize: "0.875rem";
937
+ readonly lineHeight: "1.5";
938
938
  readonly letterSpacing: "0.46px";
939
939
  readonly textTransform: "uppercase";
940
940
  };
@@ -1013,10 +1013,10 @@ declare const tokensByMode: {
1013
1013
  readonly padding: "16px 12px";
1014
1014
  };
1015
1015
  readonly button: {
1016
- readonly paddingY: "8px";
1017
- readonly paddingX: "22px";
1018
- readonly padding: "8px 22px";
1019
- readonly minHeight: "50px";
1016
+ readonly paddingY: "0";
1017
+ readonly paddingX: "16px";
1018
+ readonly padding: "0 16px";
1019
+ readonly minHeight: "44px";
1020
1020
  readonly iconSize: "20px";
1021
1021
  };
1022
1022
  readonly sectionGap: "32px";
@@ -1177,7 +1177,7 @@ declare const tokensByMode: {
1177
1177
  readonly '2xl': "20px";
1178
1178
  readonly '3xl': "24px";
1179
1179
  readonly full: "9999px";
1180
- readonly button: "4px";
1180
+ readonly button: "10px";
1181
1181
  readonly input: "4px";
1182
1182
  readonly card: "14px";
1183
1183
  readonly modal: "20px";
@@ -1522,8 +1522,8 @@ declare const tokensByMode: {
1522
1522
  readonly button: {
1523
1523
  readonly fontFamily: "\"Public Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
1524
1524
  readonly fontWeight: 500;
1525
- readonly fontSize: "0.9375rem";
1526
- readonly lineHeight: "26px";
1525
+ readonly fontSize: "0.875rem";
1526
+ readonly lineHeight: "1.5";
1527
1527
  readonly letterSpacing: "0.46px";
1528
1528
  readonly textTransform: "uppercase";
1529
1529
  };
@@ -1602,10 +1602,10 @@ declare const tokensByMode: {
1602
1602
  readonly padding: "16px 12px";
1603
1603
  };
1604
1604
  readonly button: {
1605
- readonly paddingY: "8px";
1606
- readonly paddingX: "22px";
1607
- readonly padding: "8px 22px";
1608
- readonly minHeight: "50px";
1605
+ readonly paddingY: "0";
1606
+ readonly paddingX: "16px";
1607
+ readonly padding: "0 16px";
1608
+ readonly minHeight: "44px";
1609
1609
  readonly iconSize: "20px";
1610
1610
  };
1611
1611
  readonly sectionGap: "32px";
@@ -1766,7 +1766,7 @@ declare const tokensByMode: {
1766
1766
  readonly '2xl': "20px";
1767
1767
  readonly '3xl': "24px";
1768
1768
  readonly full: "9999px";
1769
- readonly button: "4px";
1769
+ readonly button: "10px";
1770
1770
  readonly input: "4px";
1771
1771
  readonly card: "14px";
1772
1772
  readonly modal: "20px";
@@ -2120,8 +2120,8 @@ declare const tokens: {
2120
2120
  readonly button: {
2121
2121
  readonly fontFamily: "\"Public Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
2122
2122
  readonly fontWeight: 500;
2123
- readonly fontSize: "0.9375rem";
2124
- readonly lineHeight: "26px";
2123
+ readonly fontSize: "0.875rem";
2124
+ readonly lineHeight: "1.5";
2125
2125
  readonly letterSpacing: "0.46px";
2126
2126
  readonly textTransform: "uppercase";
2127
2127
  };
@@ -2200,10 +2200,10 @@ declare const tokens: {
2200
2200
  readonly padding: "16px 12px";
2201
2201
  };
2202
2202
  readonly button: {
2203
- readonly paddingY: "8px";
2204
- readonly paddingX: "22px";
2205
- readonly padding: "8px 22px";
2206
- readonly minHeight: "50px";
2203
+ readonly paddingY: "0";
2204
+ readonly paddingX: "16px";
2205
+ readonly padding: "0 16px";
2206
+ readonly minHeight: "44px";
2207
2207
  readonly iconSize: "20px";
2208
2208
  };
2209
2209
  readonly sectionGap: "32px";
@@ -2364,7 +2364,7 @@ declare const tokens: {
2364
2364
  readonly '2xl': "20px";
2365
2365
  readonly '3xl': "24px";
2366
2366
  readonly full: "9999px";
2367
- readonly button: "4px";
2367
+ readonly button: "10px";
2368
2368
  readonly input: "4px";
2369
2369
  readonly card: "14px";
2370
2370
  readonly modal: "20px";
package/dist/index.d.ts CHANGED
@@ -478,8 +478,8 @@ declare const typography: {
478
478
  readonly button: {
479
479
  readonly fontFamily: "\"Public Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
480
480
  readonly fontWeight: 500;
481
- readonly fontSize: "0.9375rem";
482
- readonly lineHeight: "26px";
481
+ readonly fontSize: "0.875rem";
482
+ readonly lineHeight: "1.5";
483
483
  readonly letterSpacing: "0.46px";
484
484
  readonly textTransform: "uppercase";
485
485
  };
@@ -558,10 +558,10 @@ declare const semanticSpacing: {
558
558
  readonly padding: "16px 12px";
559
559
  };
560
560
  readonly button: {
561
- readonly paddingY: "8px";
562
- readonly paddingX: "22px";
563
- readonly padding: "8px 22px";
564
- readonly minHeight: "50px";
561
+ readonly paddingY: "0";
562
+ readonly paddingX: "16px";
563
+ readonly padding: "0 16px";
564
+ readonly minHeight: "44px";
565
565
  readonly iconSize: "20px";
566
566
  };
567
567
  readonly sectionGap: "32px";
@@ -608,7 +608,7 @@ declare const borderRadius: {
608
608
  readonly '2xl': "20px";
609
609
  readonly '3xl': "24px";
610
610
  readonly full: "9999px";
611
- readonly button: "4px";
611
+ readonly button: "10px";
612
612
  readonly input: "4px";
613
613
  readonly card: "14px";
614
614
  readonly modal: "20px";
@@ -933,8 +933,8 @@ declare const tokensByMode: {
933
933
  readonly button: {
934
934
  readonly fontFamily: "\"Public Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
935
935
  readonly fontWeight: 500;
936
- readonly fontSize: "0.9375rem";
937
- readonly lineHeight: "26px";
936
+ readonly fontSize: "0.875rem";
937
+ readonly lineHeight: "1.5";
938
938
  readonly letterSpacing: "0.46px";
939
939
  readonly textTransform: "uppercase";
940
940
  };
@@ -1013,10 +1013,10 @@ declare const tokensByMode: {
1013
1013
  readonly padding: "16px 12px";
1014
1014
  };
1015
1015
  readonly button: {
1016
- readonly paddingY: "8px";
1017
- readonly paddingX: "22px";
1018
- readonly padding: "8px 22px";
1019
- readonly minHeight: "50px";
1016
+ readonly paddingY: "0";
1017
+ readonly paddingX: "16px";
1018
+ readonly padding: "0 16px";
1019
+ readonly minHeight: "44px";
1020
1020
  readonly iconSize: "20px";
1021
1021
  };
1022
1022
  readonly sectionGap: "32px";
@@ -1177,7 +1177,7 @@ declare const tokensByMode: {
1177
1177
  readonly '2xl': "20px";
1178
1178
  readonly '3xl': "24px";
1179
1179
  readonly full: "9999px";
1180
- readonly button: "4px";
1180
+ readonly button: "10px";
1181
1181
  readonly input: "4px";
1182
1182
  readonly card: "14px";
1183
1183
  readonly modal: "20px";
@@ -1522,8 +1522,8 @@ declare const tokensByMode: {
1522
1522
  readonly button: {
1523
1523
  readonly fontFamily: "\"Public Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
1524
1524
  readonly fontWeight: 500;
1525
- readonly fontSize: "0.9375rem";
1526
- readonly lineHeight: "26px";
1525
+ readonly fontSize: "0.875rem";
1526
+ readonly lineHeight: "1.5";
1527
1527
  readonly letterSpacing: "0.46px";
1528
1528
  readonly textTransform: "uppercase";
1529
1529
  };
@@ -1602,10 +1602,10 @@ declare const tokensByMode: {
1602
1602
  readonly padding: "16px 12px";
1603
1603
  };
1604
1604
  readonly button: {
1605
- readonly paddingY: "8px";
1606
- readonly paddingX: "22px";
1607
- readonly padding: "8px 22px";
1608
- readonly minHeight: "50px";
1605
+ readonly paddingY: "0";
1606
+ readonly paddingX: "16px";
1607
+ readonly padding: "0 16px";
1608
+ readonly minHeight: "44px";
1609
1609
  readonly iconSize: "20px";
1610
1610
  };
1611
1611
  readonly sectionGap: "32px";
@@ -1766,7 +1766,7 @@ declare const tokensByMode: {
1766
1766
  readonly '2xl': "20px";
1767
1767
  readonly '3xl': "24px";
1768
1768
  readonly full: "9999px";
1769
- readonly button: "4px";
1769
+ readonly button: "10px";
1770
1770
  readonly input: "4px";
1771
1771
  readonly card: "14px";
1772
1772
  readonly modal: "20px";
@@ -2120,8 +2120,8 @@ declare const tokens: {
2120
2120
  readonly button: {
2121
2121
  readonly fontFamily: "\"Public Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
2122
2122
  readonly fontWeight: 500;
2123
- readonly fontSize: "0.9375rem";
2124
- readonly lineHeight: "26px";
2123
+ readonly fontSize: "0.875rem";
2124
+ readonly lineHeight: "1.5";
2125
2125
  readonly letterSpacing: "0.46px";
2126
2126
  readonly textTransform: "uppercase";
2127
2127
  };
@@ -2200,10 +2200,10 @@ declare const tokens: {
2200
2200
  readonly padding: "16px 12px";
2201
2201
  };
2202
2202
  readonly button: {
2203
- readonly paddingY: "8px";
2204
- readonly paddingX: "22px";
2205
- readonly padding: "8px 22px";
2206
- readonly minHeight: "50px";
2203
+ readonly paddingY: "0";
2204
+ readonly paddingX: "16px";
2205
+ readonly padding: "0 16px";
2206
+ readonly minHeight: "44px";
2207
2207
  readonly iconSize: "20px";
2208
2208
  };
2209
2209
  readonly sectionGap: "32px";
@@ -2364,7 +2364,7 @@ declare const tokens: {
2364
2364
  readonly '2xl': "20px";
2365
2365
  readonly '3xl': "24px";
2366
2366
  readonly full: "9999px";
2367
- readonly button: "4px";
2367
+ readonly button: "10px";
2368
2368
  readonly input: "4px";
2369
2369
  readonly card: "14px";
2370
2370
  readonly modal: "20px";
package/dist/index.js CHANGED
@@ -620,9 +620,9 @@ var typography = {
620
620
  button: {
621
621
  fontFamily: fontFamilies.secondary,
622
622
  fontWeight: fontWeights.medium,
623
- fontSize: "0.9375rem",
624
- // 15px
625
- lineHeight: "26px",
623
+ fontSize: "0.875rem",
624
+ // 14px
625
+ lineHeight: "1.5",
626
626
  letterSpacing: "0.46px",
627
627
  textTransform: "uppercase"
628
628
  },
@@ -732,10 +732,10 @@ var semanticSpacing = {
732
732
  },
733
733
  // Button spacing
734
734
  button: {
735
- paddingY: "8px",
736
- paddingX: "22px",
737
- padding: "8px 22px",
738
- minHeight: "50px",
735
+ paddingY: "0",
736
+ paddingX: "16px",
737
+ padding: "0 16px",
738
+ minHeight: "44px",
739
739
  // Altura mínima para coincidir con KdsButton
740
740
  iconSize: "20px"
741
741
  // Tamaño de iconos en botones (Material Design medium)
@@ -946,7 +946,7 @@ var borderRadius = {
946
946
  "3xl": "24px",
947
947
  full: "9999px",
948
948
  // Component-specific
949
- button: "4px",
949
+ button: "10px",
950
950
  input: "4px",
951
951
  card: "14px",
952
952
  // Payment card radius (between lg=12px and xl=16px) - Beer CSS Proposal
package/dist/index.mjs CHANGED
@@ -513,9 +513,9 @@ var typography = {
513
513
  button: {
514
514
  fontFamily: fontFamilies.secondary,
515
515
  fontWeight: fontWeights.medium,
516
- fontSize: "0.9375rem",
517
- // 15px
518
- lineHeight: "26px",
516
+ fontSize: "0.875rem",
517
+ // 14px
518
+ lineHeight: "1.5",
519
519
  letterSpacing: "0.46px",
520
520
  textTransform: "uppercase"
521
521
  },
@@ -625,10 +625,10 @@ var semanticSpacing = {
625
625
  },
626
626
  // Button spacing
627
627
  button: {
628
- paddingY: "8px",
629
- paddingX: "22px",
630
- padding: "8px 22px",
631
- minHeight: "50px",
628
+ paddingY: "0",
629
+ paddingX: "16px",
630
+ padding: "0 16px",
631
+ minHeight: "44px",
632
632
  // Altura mínima para coincidir con KdsButton
633
633
  iconSize: "20px"
634
634
  // Tamaño de iconos en botones (Material Design medium)
@@ -839,7 +839,7 @@ var borderRadius = {
839
839
  "3xl": "24px",
840
840
  full: "9999px",
841
841
  // Component-specific
842
- button: "4px",
842
+ button: "10px",
843
843
  input: "4px",
844
844
  card: "14px",
845
845
  // Payment card radius (between lg=12px and xl=16px) - Beer CSS Proposal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@khipu/design-system",
3
- "version": "0.2.0-alpha.2",
3
+ "version": "0.2.0-alpha.21",
4
4
  "description": "Khipu Design System - UI components and design tokens for the Khipu payment platform",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",