@nanoporetech-digital/components 8.7.2 → 8.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/cjs/{fade-NeUskjyB.js → fade-DBKqk3wh.js} +1 -1
  2. package/dist/cjs/{fullscreen-D5cgtwoy.js → fullscreen-lcdCtrG6.js} +1 -1
  3. package/dist/cjs/index-DGttnXif.js +4 -0
  4. package/dist/cjs/{lazyload-Dm1NcTJ1.js → lazyload-BjSSEx9f.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/nano-avatar_5.cjs.entry.js +7 -7
  7. package/dist/cjs/nano-components.cjs.js +1 -1
  8. package/dist/cjs/nano-icon-button_2.cjs.entry.js +2 -2
  9. package/dist/cjs/nano-input-otp.cjs.entry.js +710 -0
  10. package/dist/cjs/nano-intersection-observe.cjs.entry.js +1 -1
  11. package/dist/cjs/nano-masked-overflow.cjs.entry.js +3 -3
  12. package/dist/cjs/nano-menu-drawer.cjs.entry.js +2 -2
  13. package/dist/cjs/nano-more-less.cjs.entry.js +2 -2
  14. package/dist/cjs/nano-rating.cjs.entry.js +4 -4
  15. package/dist/cjs/nano-resize-observe.cjs.entry.js +2 -2
  16. package/dist/cjs/nano-slide.cjs.entry.js +1 -1
  17. package/dist/cjs/{nano-slides-ycRcUf0g.js → nano-slides-CryCLfsK.js} +7 -7
  18. package/dist/cjs/nano-slides.cjs.entry.js +1 -1
  19. package/dist/cjs/nano-sortable.cjs.entry.js +1 -1
  20. package/dist/cjs/nano-step-accordion.cjs.entry.js +1 -1
  21. package/dist/cjs/nano-step-breadcrumb.cjs.entry.js +2 -2
  22. package/dist/cjs/nano-sticker.cjs.entry.js +2 -2
  23. package/dist/cjs/nano-tab-content.cjs.entry.js +2 -2
  24. package/dist/cjs/nano-tab.cjs.entry.js +2 -2
  25. package/dist/cjs/nano-table.cjs.entry.js +2 -2
  26. package/dist/cjs/{page-dots--38yVfTZ.js → page-dots-DR1fLjRi.js} +1 -1
  27. package/dist/collection/collection-manifest.json +1 -0
  28. package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
  29. package/dist/collection/components/input-otp/input-otp-interface.js +1 -0
  30. package/dist/collection/components/input-otp/input-otp.css +184 -0
  31. package/dist/collection/components/input-otp/input-otp.js +1044 -0
  32. package/dist/collection/components/intersection-observe/intersection-observe.js +1 -1
  33. package/dist/collection/components/masked-overflow/masked-overflow.js +3 -3
  34. package/dist/collection/components/menu-drawer/menu-drawer.js +2 -2
  35. package/dist/collection/components/more-less/more-less.js +2 -2
  36. package/dist/collection/components/rating/rating.js +4 -4
  37. package/dist/collection/components/resize-observe/resize-observe.js +2 -2
  38. package/dist/collection/components/select/select.js +7 -7
  39. package/dist/collection/components/slides/slide.js +1 -1
  40. package/dist/collection/components/slides/slides.js +3 -3
  41. package/dist/collection/components/sortable/sortable.js +1 -1
  42. package/dist/collection/components/step-accordion/step-accordion.js +1 -1
  43. package/dist/collection/components/step-breadcrumb/step-breadcrumb.js +2 -2
  44. package/dist/collection/components/sticker/sticker.js +2 -2
  45. package/dist/collection/components/table/table.js +2 -2
  46. package/dist/collection/components/tabs/tab-content.js +2 -2
  47. package/dist/collection/components/tabs/tab.js +2 -2
  48. package/dist/collection/components/tooltip/tooltip.js +2 -2
  49. package/dist/components/masked-overflow.js +3 -3
  50. package/dist/components/nano-input-otp.d.ts +11 -0
  51. package/dist/components/nano-input-otp.js +749 -0
  52. package/dist/components/nano-intersection-observe.js +1 -1
  53. package/dist/components/nano-menu-drawer.js +2 -2
  54. package/dist/components/nano-more-less.js +2 -2
  55. package/dist/components/nano-rating.js +4 -4
  56. package/dist/components/nano-slide.js +1 -1
  57. package/dist/components/nano-sortable.js +1 -1
  58. package/dist/components/nano-step-accordion.js +1 -1
  59. package/dist/components/nano-step-breadcrumb.js +2 -2
  60. package/dist/components/nano-tab-content.js +2 -2
  61. package/dist/components/nano-tab.js +2 -2
  62. package/dist/components/nano-table.js +2 -2
  63. package/dist/components/resize-observe.js +2 -2
  64. package/dist/components/select.js +7 -7
  65. package/dist/components/slides.js +3 -3
  66. package/dist/components/sticker.js +2 -2
  67. package/dist/components/tooltip.js +2 -2
  68. package/dist/esm/{fade-BA6b-Fk9.js → fade-D980mOvm.js} +1 -1
  69. package/dist/esm/{fullscreen-De_yN4cg.js → fullscreen-CjInlYb9.js} +1 -1
  70. package/dist/esm/index-BM3Om9WE.js +4 -0
  71. package/dist/esm/{lazyload-Cl8k3tPs.js → lazyload-B9B4e3ZI.js} +1 -1
  72. package/dist/esm/loader.js +1 -1
  73. package/dist/esm/nano-avatar_5.entry.js +7 -7
  74. package/dist/esm/nano-components.js +1 -1
  75. package/dist/esm/nano-icon-button_2.entry.js +2 -2
  76. package/dist/esm/nano-input-otp.entry.js +708 -0
  77. package/dist/esm/nano-intersection-observe.entry.js +1 -1
  78. package/dist/esm/nano-masked-overflow.entry.js +3 -3
  79. package/dist/esm/nano-menu-drawer.entry.js +2 -2
  80. package/dist/esm/nano-more-less.entry.js +2 -2
  81. package/dist/esm/nano-rating.entry.js +4 -4
  82. package/dist/esm/nano-resize-observe.entry.js +2 -2
  83. package/dist/esm/nano-slide.entry.js +1 -1
  84. package/dist/esm/{nano-slides-GrbOydfa.js → nano-slides-xbY6lXX9.js} +7 -7
  85. package/dist/esm/nano-slides.entry.js +1 -1
  86. package/dist/esm/nano-sortable.entry.js +1 -1
  87. package/dist/esm/nano-step-accordion.entry.js +1 -1
  88. package/dist/esm/nano-step-breadcrumb.entry.js +2 -2
  89. package/dist/esm/nano-sticker.entry.js +2 -2
  90. package/dist/esm/nano-tab-content.entry.js +2 -2
  91. package/dist/esm/nano-tab.entry.js +2 -2
  92. package/dist/esm/nano-table.entry.js +2 -2
  93. package/dist/esm/{page-dots-CSf81OuJ.js → page-dots-CCfERISy.js} +1 -1
  94. package/dist/nano-components/{fade-BA6b-Fk9.js → fade-D980mOvm.js} +1 -1
  95. package/dist/nano-components/{fullscreen-De_yN4cg.js → fullscreen-CjInlYb9.js} +1 -1
  96. package/dist/nano-components/lazyload-B9B4e3ZI.js +4 -0
  97. package/dist/nano-components/nano-avatar_5.entry.js +1 -1
  98. package/dist/nano-components/nano-components.esm.js +1 -1
  99. package/dist/nano-components/nano-icon-button_2.entry.js +1 -1
  100. package/dist/nano-components/nano-input-otp.entry.js +4 -0
  101. package/dist/nano-components/nano-intersection-observe.entry.js +1 -1
  102. package/dist/nano-components/nano-masked-overflow.entry.js +1 -1
  103. package/dist/nano-components/nano-menu-drawer.entry.js +1 -1
  104. package/dist/nano-components/nano-more-less.entry.js +1 -1
  105. package/dist/nano-components/nano-rating.entry.js +1 -1
  106. package/dist/nano-components/nano-resize-observe.entry.js +1 -1
  107. package/dist/nano-components/nano-slide.entry.js +1 -1
  108. package/dist/nano-components/{nano-slides-GrbOydfa.js → nano-slides-xbY6lXX9.js} +3 -3
  109. package/dist/nano-components/nano-slides.entry.js +1 -1
  110. package/dist/nano-components/nano-sortable.entry.js +1 -1
  111. package/dist/nano-components/nano-step-accordion.entry.js +1 -1
  112. package/dist/nano-components/nano-step-breadcrumb.entry.js +1 -1
  113. package/dist/nano-components/nano-sticker.entry.js +1 -1
  114. package/dist/nano-components/nano-tab-content.entry.js +1 -1
  115. package/dist/nano-components/nano-tab.entry.js +1 -1
  116. package/dist/nano-components/nano-table.entry.js +1 -1
  117. package/dist/nano-components/{page-dots-CSf81OuJ.js → page-dots-CCfERISy.js} +1 -1
  118. package/dist/types/components/input-otp/input-otp-interface.d.ts +24 -0
  119. package/dist/types/components/input-otp/input-otp.d.ts +281 -0
  120. package/dist/types/components.d.ts +179 -0
  121. package/docs-json.json +614 -2
  122. package/docs-vscode.json +79 -0
  123. package/hydrate/index.js +779 -43
  124. package/hydrate/index.mjs +779 -43
  125. package/package.json +2 -2
  126. package/dist/nano-components/lazyload-Cl8k3tPs.js +0 -4
  127. /package/dist/types/builds/{QrfEi4pt → sxrVAURy}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/generate-vue-component.d.ts +0 -0
  128. /package/dist/types/builds/{QrfEi4pt → sxrVAURy}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
  129. /package/dist/types/builds/{QrfEi4pt → sxrVAURy}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/output-vue.d.ts +0 -0
  130. /package/dist/types/builds/{QrfEi4pt → sxrVAURy}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +0 -0
  131. /package/dist/types/builds/{QrfEi4pt → sxrVAURy}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/types.d.ts +0 -0
  132. /package/dist/types/builds/{QrfEi4pt → sxrVAURy}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/utils.d.ts +0 -0
  133. /package/dist/types/builds/{QrfEi4pt → sxrVAURy}/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -0
  134. /package/dist/types/builds/{QrfEi4pt → sxrVAURy}/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
  135. /package/dist/types/builds/{QrfEi4pt → sxrVAURy}/0/Digital/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
  136. /package/dist/types/builds/{QrfEi4pt → sxrVAURy}/0/Digital/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{g as t,r as e,a as o}from"./index-BM3Om9WE.js";import{d as n}from"./throttle-C93FMm2Z.js";import{t as a,h as s}from"./renderer-DasB4P10.js";const i=class{get host(){return t(this)}propsReady=!1;compact="auto";handleCompactChange(){this.setupProperties()}scrollable=!0;hideCaption=!1;handleHideCaptionChange(){const t=this.caption;t&&t.classList.toggle("visually-hidden",this.hideCaption)}disableClickableRows=!1;resizeObserver;mutationObserver;intersectionObserver;settingUp=!1;get table(){return this.host.querySelector("table")}get caption(){return this.host.querySelector("caption")||(console.error("nano-table: No caption found. For better a11y, please add a <caption> element to the table."),null)}setupProperties=()=>{const t=this.table;if(!t||this.settingUp)return;if(this.settingUp=!0,!this.disableClickableRows){const t=Array.from(this.host.querySelectorAll("tr"));for(const e of t)1===this.getRowClickElements(e).length?(e.setAttribute("clickable","true"),e.addEventListener("click",this.rowClickHandler)):(e.removeAttribute("clickable"),e.removeEventListener("click",this.rowClickHandler))}const e=t.querySelectorAll("thead, tbody, tfoot");let o=0;if(t.querySelector("[sticky=start], [sticky=end]")){for(const t of e)t.style.setProperty("--section-height",`${t.offsetHeight}px`);const t=Array.from(this.host.querySelectorAll("thead th, thead td"));for(const e of t)e.matches("[sticky=start]")&&(this.makeCellsSticky(e,"start",o),o>0&&e.style.setProperty("--sticky-start",`${o}px`),o+=e.offsetWidth-1);o=0;for(const e of[...t].reverse())e.matches("[sticky=end]")&&(this.makeCellsSticky(e,"end",o),o>0&&e.style.setProperty("--sticky-end",`${o}px`),o+=e.offsetWidth-1)}if(t.querySelector("[sticky=top]")){o=0;for(const t of e){const e=Array.from(t.querySelectorAll("tr[sticky]"));for(const[t,n]of e.entries())n.matches("[sticky=top]")&&o>0&&n.style.setProperty("--sticky-top",`${o}px`),t===e.length-1&&(o+=n.offsetHeight-1)}}this.settingUp=!1,this.propsReady=!0};getRowClickElements(t){const e=t.querySelectorAll("a"),o=t.querySelectorAll("button"),n=Array.from(t.querySelectorAll('input[type="checkbox"]')).filter((t=>!t.closest("nano-checkbox"))),a=Array.from(t.querySelectorAll('input[type="radio"]')).filter((t=>!t.closest("nano-checkbox")));return[...e,...o,...t.querySelectorAll("nano-checkbox"),...n,...a]}rowClickHandler=t=>{const e=t.target,o=e.closest("tr");if(!o)return;const n=this.getRowClickElements(o);1===n.length&&e.closest(n[0].tagName)!==n[0]&&n[0].click()};makeCellsSticky(t,e,o=0){const n=t.closest("table"),a=t.closest("tr"),s=Array.from(a.cells);let i=0;for(const e of s){if(e===t)break;i+=e.colSpan||1}for(const t of n.tBodies)for(const n of t.rows){let t=0;for(const a of n.cells){const n=a.colSpan||1;if(t<=i&&i<t+n){a.setAttribute("sticky",e),o>0&&a.style.setProperty("--sticky-"+e,`${o}px`);break}t+=n}}}addObservers(){this.resizeObserver=new ResizeObserver((()=>{this.setupProperties()})),this.resizeObserver.observe(this.host),this.mutationObserver=new MutationObserver((()=>{this.setupProperties()}));const t=this.table;this.mutationObserver.observe(t,{childList:!0,subtree:!0}),this.intersectionObserver=new IntersectionObserver((()=>{this.setupProperties(),this.intersectionObserver.disconnect()}),{threshold:1}),this.intersectionObserver.observe(t)}cleanUpObservers(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null)}constructor(t){e(this,t),this.setupProperties=n(this.setupProperties,100)}connectedCallback(){this.addObservers(),this.handleHideCaptionChange()}componentDidRender(){!1!==this.scrollable&&this.table&&customElements.whenDefined(a("nano-masked-overflow")).then((()=>{this.host.querySelector(".nano-table__overflow")?.appendChild(this.table)}))}disconnectedCallback(){this.cleanUpObservers()}render(){return s(o,{key:"dfcda7c6604792e025f1ed4997395857ad786be3",class:{"nano-table":!0,"nano-table--props-ready":this.propsReady}},this.scrollable&&s("nano-masked-overflow",{key:"2ef0536af50f22134e4c0d295172817287c46196",hideScrollbars:!1,scrollControls:!1,label:this.caption?.textContent||void 0,class:"nano-table__overflow-container"},s("div",{key:"1b9ba48be1ccf92ac46f9873ac08b43a51cfcabc",class:"nano-table__overflow"})),s("slot",{key:"ab86c4eab83b69cb4ba31b22ae18f9cb0c31033a"}))}static get watchers(){return{compact:["handleCompactChange"],hideCaption:["handleHideCaptionChange"]}}};i.style=".sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{box-sizing:border-box}[hidden].sc-nano-table{display:none !important}@media (prefers-reduced-motion: reduce){.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{box-sizing:border-box}[hidden].sc-nano-table{display:none !important}@media (prefers-reduced-motion: reduce){.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}";export{i as nano_table}
4
+ import{g as t,r as e,a as o}from"./index-BM3Om9WE.js";import{d as a}from"./throttle-C93FMm2Z.js";import{t as n,h as s}from"./renderer-DasB4P10.js";const i=class{get host(){return t(this)}propsReady=!1;compact="auto";handleCompactChange(){this.setupProperties()}scrollable=!0;hideCaption=!1;handleHideCaptionChange(){const t=this.caption;t&&t.classList.toggle("visually-hidden",this.hideCaption)}disableClickableRows=!1;resizeObserver;mutationObserver;intersectionObserver;settingUp=!1;get table(){return this.host.querySelector("table")}get caption(){return this.host.querySelector("caption")||(console.error("nano-table: No caption found. For better a11y, please add a <caption> element to the table."),null)}setupProperties=()=>{const t=this.table;if(!t||this.settingUp)return;if(this.settingUp=!0,!this.disableClickableRows){const t=Array.from(this.host.querySelectorAll("tr"));for(const e of t)1===this.getRowClickElements(e).length?(e.setAttribute("clickable","true"),e.addEventListener("click",this.rowClickHandler)):(e.removeAttribute("clickable"),e.removeEventListener("click",this.rowClickHandler))}const e=t.querySelectorAll("thead, tbody, tfoot");let o=0;if(t.querySelector("[sticky=start], [sticky=end]")){for(const t of e)t.style.setProperty("--section-height",`${t.offsetHeight}px`);const t=Array.from(this.host.querySelectorAll("thead th, thead td"));for(const e of t)e.matches("[sticky=start]")&&(this.makeCellsSticky(e,"start",o),o>0&&e.style.setProperty("--sticky-start",`${o}px`),o+=e.offsetWidth-1);o=0;for(const e of[...t].reverse())e.matches("[sticky=end]")&&(this.makeCellsSticky(e,"end",o),o>0&&e.style.setProperty("--sticky-end",`${o}px`),o+=e.offsetWidth-1)}if(t.querySelector("[sticky=top]")){o=0;for(const t of e){const e=Array.from(t.querySelectorAll("tr[sticky]"));for(const[t,a]of e.entries())a.matches("[sticky=top]")&&o>0&&a.style.setProperty("--sticky-top",`${o}px`),t===e.length-1&&(o+=a.offsetHeight-1)}}this.settingUp=!1,this.propsReady=!0};getRowClickElements(t){const e=t.querySelectorAll("a"),o=t.querySelectorAll("button"),a=Array.from(t.querySelectorAll('input[type="checkbox"]')).filter((t=>!t.closest("nano-checkbox"))),n=Array.from(t.querySelectorAll('input[type="radio"]')).filter((t=>!t.closest("nano-checkbox")));return[...e,...o,...t.querySelectorAll("nano-checkbox"),...a,...n]}rowClickHandler=t=>{const e=t.target,o=e.closest("tr");if(!o)return;const a=this.getRowClickElements(o);1===a.length&&e.closest(a[0].tagName)!==a[0]&&a[0].click()};makeCellsSticky(t,e,o=0){const a=t.closest("table"),n=t.closest("tr"),s=Array.from(n.cells);let i=0;for(const e of s){if(e===t)break;i+=e.colSpan||1}for(const t of a.tBodies)for(const a of t.rows){let t=0;for(const n of a.cells){const a=n.colSpan||1;if(t<=i&&i<t+a){n.setAttribute("sticky",e),o>0&&n.style.setProperty("--sticky-"+e,`${o}px`);break}t+=a}}}addObservers(){this.resizeObserver=new ResizeObserver((()=>{this.setupProperties()})),this.resizeObserver.observe(this.host),this.mutationObserver=new MutationObserver((()=>{this.setupProperties()}));const t=this.table;this.mutationObserver.observe(t,{childList:!0,subtree:!0}),this.intersectionObserver=new IntersectionObserver((()=>{this.setupProperties(),this.intersectionObserver.disconnect()}),{threshold:1}),this.intersectionObserver.observe(t)}cleanUpObservers(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null)}constructor(t){e(this,t),this.setupProperties=a(this.setupProperties,100)}connectedCallback(){this.addObservers(),this.handleHideCaptionChange()}componentDidRender(){!1!==this.scrollable&&this.table&&customElements.whenDefined(n("nano-masked-overflow")).then((()=>{this.host.querySelector(".nano-table__overflow")?.appendChild(this.table)}))}disconnectedCallback(){this.cleanUpObservers()}render(){return s(o,{key:"75c4089a6d670a16eea3fca8d079ac9a827c4cfa",class:{"nano-table":!0,"nano-table--props-ready":this.propsReady}},this.scrollable&&s("nano-masked-overflow",{key:"90a1e07d2daa97047c3be1381717a8ae3b53b5e1",hideScrollbars:!1,scrollControls:!1,label:this.caption?.textContent||void 0,class:"nano-table__overflow-container"},s("div",{key:"badc595c9931fb6198ab38b4e09cdf4201fcc064",class:"nano-table__overflow"})),s("slot",{key:"d3fd5902fccc42b3412e9cb1950b054b5a69a525"}))}static get watchers(){return{compact:["handleCompactChange"],hideCaption:["handleHideCaptionChange"]}}};i.style=".sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{box-sizing:border-box}[hidden].sc-nano-table{display:none !important}@media (prefers-reduced-motion: reduce){.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{box-sizing:border-box}[hidden].sc-nano-table{display:none !important}@media (prefers-reduced-motion: reduce){.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}";export{i as nano_table}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{F as t,u as i,U as s}from"./nano-slides-GrbOydfa.js";import"./index-BM3Om9WE.js";import"./renderer-DasB4P10.js";function h(t){this.parent=t,this.parentElement=this.parent.element.shadowRoot||this.parent.element,this.containingEl=this.parentElement.parentNode||this.parentElement,this._create()}(h.prototype=Object.create(s.prototype))._create=function(){this.holder=document.createElement("div"),this.holder.className="flickity-page-dots",this.holder.part.add("pagination"),this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},h.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.containingEl.appendChild(this.holder)},h.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.containingEl.removeChild(this.holder)},h.prototype.setDots=function(){const t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},h.prototype.addDots=function(t){const i=document.createDocumentFragment(),s=[],h=this.dots.length,n=h+t;for(let t=h;t<n;t++){const h=document.createElement("button");h.classList.add("dot"),h.innerText=`Go to slide ${t+1}`,i.appendChild(h),s.push(h)}this.holder.appendChild(i),this.dots=this.dots.concat(s)},h.prototype.removeDots=function(t){this.dots.splice(this.dots.length-t,t).forEach((function(t){this.holder.removeChild(t)}),this)},h.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.classList.remove("is-selected"),this.selectedDot.part.remove("pagination-item--active"),this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.classList.add("is-selected"),this.selectedDot.part.add("pagination-item--active"),this.selectedDot.setAttribute("aria-current","step"))},h.prototype.onTap=h.prototype.onClick=function(t){const i=t.target;if("BUTTON"!=i.nodeName)return;this.parent.uiChange();const s=this.dots.indexOf(i);this.parent.select(s)},h.prototype.destroy=function(){this.deactivate(),this.allOff()},t.PageDots=h,i.extend(t.defaults,{pageDots:!0}),t.createMethods.push("_createPageDots");const n=t.prototype;n._createPageDots=function(){this.options.pageDots&&(this.pageDots=new h(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},n.activatePageDots=function(){this.pageDots.activate()},n.updateSelectedPageDots=function(){this.pageDots.updateSelected()},n.updatePageDots=function(){this.pageDots.setDots()},n.deactivatePageDots=function(){this.pageDots.deactivate()},t.PageDots=h;
4
+ import{F as t,u as i,U as s}from"./nano-slides-xbY6lXX9.js";import"./index-BM3Om9WE.js";import"./renderer-DasB4P10.js";function h(t){this.parent=t,this.parentElement=this.parent.element.shadowRoot||this.parent.element,this.containingEl=this.parentElement.parentNode||this.parentElement,this._create()}(h.prototype=Object.create(s.prototype))._create=function(){this.holder=document.createElement("div"),this.holder.className="flickity-page-dots",this.holder.part.add("pagination"),this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},h.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.containingEl.appendChild(this.holder)},h.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.containingEl.removeChild(this.holder)},h.prototype.setDots=function(){const t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},h.prototype.addDots=function(t){const i=document.createDocumentFragment(),s=[],h=this.dots.length,n=h+t;for(let t=h;t<n;t++){const h=document.createElement("button");h.classList.add("dot"),h.innerText=`Go to slide ${t+1}`,i.appendChild(h),s.push(h)}this.holder.appendChild(i),this.dots=this.dots.concat(s)},h.prototype.removeDots=function(t){this.dots.splice(this.dots.length-t,t).forEach((function(t){this.holder.removeChild(t)}),this)},h.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.classList.remove("is-selected"),this.selectedDot.part.remove("pagination-item--active"),this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.classList.add("is-selected"),this.selectedDot.part.add("pagination-item--active"),this.selectedDot.setAttribute("aria-current","step"))},h.prototype.onTap=h.prototype.onClick=function(t){const i=t.target;if("BUTTON"!=i.nodeName)return;this.parent.uiChange();const s=this.dots.indexOf(i);this.parent.select(s)},h.prototype.destroy=function(){this.deactivate(),this.allOff()},t.PageDots=h,i.extend(t.defaults,{pageDots:!0}),t.createMethods.push("_createPageDots");const n=t.prototype;n._createPageDots=function(){this.options.pageDots&&(this.pageDots=new h(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},n.activatePageDots=function(){this.pageDots.activate()},n.updateSelectedPageDots=function(){this.pageDots.updateSelected()},n.updatePageDots=function(){this.pageDots.setDots()},n.deactivatePageDots=function(){this.pageDots.deactivate()},t.PageDots=h;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Values are converted to strings when emitted which is
3
+ * why we do not have a `number` type here even though the
4
+ * `value` prop accepts a `number` type.
5
+ */
6
+ export interface InputOtpInputEventDetail {
7
+ value?: string | null;
8
+ valid?: boolean;
9
+ event?: Event;
10
+ }
11
+ export interface InputOtpChangeEventDetail {
12
+ value?: string | null;
13
+ valid?: boolean;
14
+ event?: Event;
15
+ }
16
+ export interface InputOtpCompleteEventDetail {
17
+ value?: string | null;
18
+ valid?: boolean;
19
+ event?: Event;
20
+ }
21
+ export interface InputOtpCustomEvent<T = InputOtpChangeEventDetail> extends CustomEvent {
22
+ detail: T;
23
+ target: HTMLNanoInputOtpElement;
24
+ }
@@ -0,0 +1,281 @@
1
+ import type { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
2
+ import type { InputOtpChangeEventDetail, InputOtpCompleteEventDetail, InputOtpInputEventDetail } from './input-otp-interface.js';
3
+ /**
4
+ * A component for entering one-time passwords (OTP) with multiple input fields.
5
+ *
6
+ * @version 8.7.2
7
+ * @status new
8
+ *
9
+ * @slot - The default slot for the input description.
10
+ * @slot validity-icon - A slot for a custom validity icon. If not provided, a default icon will be used.
11
+ */
12
+ export declare class InputOTP implements ComponentInterface {
13
+ private inputRefs;
14
+ private inputId;
15
+ /**
16
+ * Stores the initial value of the input when it receives focus.
17
+ * Used to determine if the value changed during the focus session
18
+ * to avoid emitting unnecessary change events on blur.
19
+ */
20
+ private focusedValue?;
21
+ /**
22
+ * Tracks whether the user is navigating through input boxes using keyboard navigation
23
+ * (arrow keys, tab) versus mouse clicks. This is used to determine the appropriate
24
+ * focus behavior when an input box is focused.
25
+ */
26
+ private isKeyboardNavigation;
27
+ el: HTMLNanoInputOtpElement;
28
+ private inputValues;
29
+ hasFocus: boolean;
30
+ private previousInputValues;
31
+ private invalid;
32
+ private valid;
33
+ /**
34
+ * If `true`, the user cannot interact with the input.
35
+ */
36
+ disabled: boolean;
37
+ /**
38
+ * A hint to the browser for which keyboard to display.
39
+ * Possible values: `"none"`, `"text"`, `"tel"`, `"url"`,
40
+ * `"email"`, `"numeric"`, `"decimal"`, and `"search"`.
41
+ *
42
+ * For numbers (type="number"): "numeric"
43
+ * For text (type="text"): "text"
44
+ */
45
+ inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
46
+ /**
47
+ * The number of input boxes to display.
48
+ */
49
+ length: number;
50
+ /**
51
+ * A regex pattern string for allowed characters. Defaults based on type.
52
+ *
53
+ * For numbers (`type="number"`): `"[\p{N}]"`
54
+ * For text (`type="text"`): `"[\p{L}\p{N}]"`
55
+ */
56
+ pattern?: string;
57
+ /**
58
+ * If `true`, the user cannot modify the value.
59
+ */
60
+ readonly: boolean;
61
+ /**
62
+ * The type of input allowed in the input boxes.
63
+ */
64
+ type: 'text' | 'number';
65
+ /**
66
+ * The value of the input group.
67
+ */
68
+ value?: string | number | null;
69
+ /**
70
+ * If `true`, allows the input to be completely filled with invalid values.
71
+ * By default, if any input box contains an invalid value, the entire input group
72
+ * is marked as invalid.
73
+ * Default is `false`.
74
+ */
75
+ allowInvalid: boolean;
76
+ /**
77
+ * If `true`, shows a validity icon when all input boxes are filled.
78
+ * A check icon is shown if all values are valid, and an X icon is shown if any value is invalid.
79
+ * This does not affect the `invalid` or `valid` states of the input group.
80
+ * Default is `false`.
81
+ * */
82
+ showValidity: boolean;
83
+ /**
84
+ * The `nanoInput` event is fired each time the user modifies the input's value.
85
+ * Unlike the `nanoChange` event, the `nanoInput` event is fired for each alteration
86
+ * to the input's value. This typically happens for each keystroke as the user types.
87
+ *
88
+ * For elements that accept text input (`type=text`, `type=tel`, etc.), the interface
89
+ * is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others,
90
+ * the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If
91
+ * the input is cleared on edit, the type is `null`.
92
+ */
93
+ nanoInput: EventEmitter<InputOtpInputEventDetail>;
94
+ /**
95
+ * The `nanoChange` event is fired when the user modifies the input's value.
96
+ * Unlike the `nanoInput` event, the `nanoChange` event is only fired when changes
97
+ * are committed, not as the user types.
98
+ *
99
+ * The `nanoChange` event fires when the `<nano-input-otp>` component loses
100
+ * focus after its value has changed.
101
+ *
102
+ * This event will not emit when programmatically setting the `value` property.
103
+ */
104
+ nanoChange: EventEmitter<InputOtpChangeEventDetail>;
105
+ /**
106
+ * Emitted when all input boxes have been filled with valid values.
107
+ */
108
+ nanoComplete: EventEmitter<InputOtpCompleteEventDetail>;
109
+ /**
110
+ * Emitted when the input group loses focus.
111
+ */
112
+ nanoBlur: EventEmitter<FocusEvent>;
113
+ /**
114
+ * Emitted when the input group has focus.
115
+ */
116
+ nanoFocus: EventEmitter<FocusEvent>;
117
+ /**
118
+ * Sets focus to an input box.
119
+ * @param index - The index of the input box to focus (0-based).
120
+ * If provided and the input box has a value, the input box at that index will be focused.
121
+ * Otherwise, the first empty input box or the last input if all are filled will be focused.
122
+ */
123
+ setFocus(index?: number): Promise<void>;
124
+ valueChanged(): void;
125
+ componentWillLoad(): void;
126
+ componentDidLoad(): void;
127
+ /**
128
+ * Get the regex pattern for allowed characters.
129
+ * If a pattern is provided, use it to create a regex pattern
130
+ * Otherwise, use the default regex pattern based on type
131
+ */
132
+ private get validKeyPattern();
133
+ private get specialCharsPattern();
134
+ /**
135
+ * Gets the string pattern to pass to the input element
136
+ * and use in the regex for allowed characters.
137
+ * @returns {string} The regex pattern string for allowed characters.
138
+ */
139
+ private getPattern;
140
+ /**
141
+ * Get the default value for inputmode.
142
+ * If inputmode is provided, use it.
143
+ * Otherwise, use the default inputmode based on type
144
+ * @returns {string} The inputmode to use for the input boxes.
145
+ */
146
+ private getInputmode;
147
+ /**
148
+ * Initializes the input values array based on the current value prop.
149
+ * This splits the value into individual characters and validates them against
150
+ * the allowed pattern. The values are then used as the values in the native
151
+ * input boxes and the value of the input group is updated.
152
+ */
153
+ private initializeValues;
154
+ /**
155
+ * Returns `true` if the document or host element
156
+ * has a `dir` set to `rtl`. The host value will always
157
+ * take priority over the root document value.
158
+ * @returns {boolean} True if RTL direction is set, false otherwise.
159
+ */
160
+ private isRTL;
161
+ /**
162
+ * Updates the value of the input group.
163
+ * This updates the value of the input group and emits an `nanoChange` event.
164
+ * If all of the input boxes are filled, it emits an `nanoComplete` event.
165
+ */
166
+ private updateValue;
167
+ /**
168
+ * Emits an `nanoChange` event.
169
+ * This API should be called for user committed changes.
170
+ * This API should not be used for external value changes.
171
+ */
172
+ private emitNanoChange;
173
+ /**
174
+ * Emits an `nanoInput` event.
175
+ * This is used to emit the input value when the user types,
176
+ * backspaces, or pastes.
177
+ */
178
+ private emitNanoInput;
179
+ /**
180
+ * Handles the focus behavior for the input OTP component.
181
+ *
182
+ * Focus behavior:
183
+ * 1. Keyboard navigation: Allow normal focus movement
184
+ * 2. Mouse click:
185
+ * - If clicked box has value: Focus that box
186
+ * - If clicked box is empty: Focus first empty box
187
+ *
188
+ * Emits the `nanoFocus` event when the input group gains focus.
189
+ * @returns {(event: FocusEvent) => void} Event handler for focus events.
190
+ */
191
+ private onFocus;
192
+ /**
193
+ * Handles the blur behavior for the input OTP component.
194
+ * Emits the `nanoBlur` event when the input group loses focus.
195
+ */
196
+ private onBlur;
197
+ /**
198
+ * Focuses the next input box.
199
+ */
200
+ private focusNext;
201
+ /**
202
+ * Focuses the previous input box.
203
+ */
204
+ private focusPrevious;
205
+ /**
206
+ * Searches through the input values and returns the index
207
+ * of the first empty input.
208
+ * Returns -1 if all inputs are filled.
209
+ * @returns {number} The index of the first empty input, or -1 if all are filled.
210
+ */
211
+ private getFirstEmptyIndex;
212
+ /**
213
+ * Returns the index of the input that should be tabbed to.
214
+ * If all inputs are filled, returns the last input's index.
215
+ * Otherwise, returns the index of the first empty input.
216
+ * @returns {number} The index to tab to.
217
+ */
218
+ private getTabbableIndex;
219
+ /**
220
+ * Updates the tabIndexes for the input boxes.
221
+ * This is used to ensure that the correct input is
222
+ * focused when the user navigates using the tab key.
223
+ */
224
+ private updateTabIndexes;
225
+ /**
226
+ * Handles keyboard navigation for the OTP component.
227
+ *
228
+ * Navigation:
229
+ * - Backspace: Clears current input and moves to previous box if empty
230
+ * - Arrow Left/Right: Moves focus between input boxes
231
+ * - Tab: Allows normal tab navigation between components
232
+ * @returns {(event: KeyboardEvent) => void} Event handler for keydown events.
233
+ */
234
+ private onKeyDown;
235
+ /**
236
+ * Processes all input scenarios for each input box.
237
+ *
238
+ * This function manages:
239
+ * 1. Autofill handling
240
+ * 2. Input validation
241
+ * 3. Full selection replacement or typing in an empty box
242
+ * 4. Inserting in the middle with available space (shifting)
243
+ * 5. Single character replacement
244
+ * @returns {(event: InputEvent) => void} Event handler for input events.
245
+ */
246
+ private onInput;
247
+ /**
248
+ * Handles pasting text into the input OTP component.
249
+ * This function prevents the default paste behavior and
250
+ * validates the pasted text against the allowed pattern.
251
+ * It then updates the value of the input group and focuses
252
+ * the next empty input after pasting.
253
+ */
254
+ private onPaste;
255
+ /**
256
+ * Determines if a separator should be shown for a given index by:
257
+ * - Checking if the total length is even (no separator for odd lengths)
258
+ * - If even, showing a separator after the middle index
259
+ *
260
+ * @param index - The index to check for a separator.
261
+ * @returns {boolean} True if a separator should be shown after the given index, false otherwise.
262
+ */
263
+ private showSeparator;
264
+ /**
265
+ * Filters the input string to only include valid characters based on the
266
+ * `validKeyPattern` regex. If `allowInvalid` is true, it will also
267
+ * exclude special characters. The resulting array is sliced to the
268
+ * maximum length of the input OTP.
269
+ * @param str - The input string to filter.
270
+ * @returns {string[]} An array of valid characters.
271
+ */
272
+ private getValidChars;
273
+ /**
274
+ * Computes the validity of the input group based on the current input values.
275
+ * Sets the following `invalid` and `valid` states:
276
+ * - `invalid` is true if `allowInvalid` is true and any input value is invalid.
277
+ * - `valid` is true if all input boxes are filled with valid values.
278
+ */
279
+ private computeValidity;
280
+ render(): any;
281
+ }
@@ -26,6 +26,7 @@ import { FileInputChangeEventDetail, FileWithUrl } from "./components/file-uploa
26
26
  import { AlgoliaNetworkError, MyAccountData } from "./components/global-nav/global-nav-interface";
27
27
  import { NanoDatePicker } from "./components/date-picker/date-picker";
28
28
  import { InputChangeEventDetail } from "./components/input/input-interface";
29
+ import { InputOtpChangeEventDetail, InputOtpCompleteEventDetail, InputOtpInputEventDetail } from "./components/input-otp/input-otp-interface.js";
29
30
  import { NavItemEventDetail } from "./components/nav-item/nav-item-interface";
30
31
  import { RangeChangeEventDetail, RangeValue } from "./components/range/range-interface";
31
32
  import { ResizeStateChangeEventDetail } from "./components/resize-observe/resize-observe-interface";
@@ -52,6 +53,7 @@ export { FileInputChangeEventDetail, FileWithUrl } from "./components/file-uploa
52
53
  export { AlgoliaNetworkError, MyAccountData } from "./components/global-nav/global-nav-interface";
53
54
  export { NanoDatePicker } from "./components/date-picker/date-picker";
54
55
  export { InputChangeEventDetail } from "./components/input/input-interface";
56
+ export { InputOtpChangeEventDetail, InputOtpCompleteEventDetail, InputOtpInputEventDetail } from "./components/input-otp/input-otp-interface.js";
55
57
  export { NavItemEventDetail } from "./components/nav-item/nav-item-interface";
56
58
  export { RangeChangeEventDetail, RangeValue } from "./components/range/range-interface";
57
59
  export { ResizeStateChangeEventDetail } from "./components/resize-observe/resize-observe-interface";
@@ -2183,6 +2185,68 @@ export namespace Components {
2183
2185
  */
2184
2186
  "valueAsNumber": number;
2185
2187
  }
2188
+ /**
2189
+ * A component for entering one-time passwords (OTP) with multiple input fields.
2190
+ * @version 8.7.2
2191
+ * @status new
2192
+ */
2193
+ interface NanoInputOtp {
2194
+ /**
2195
+ * If `true`, allows the input to be completely filled with invalid values. By default, if any input box contains an invalid value, the entire input group is marked as invalid. Default is `false`.
2196
+ * @default false
2197
+ */
2198
+ "allowInvalid": boolean;
2199
+ /**
2200
+ * If `true`, the user cannot interact with the input.
2201
+ * @default false
2202
+ */
2203
+ "disabled": boolean;
2204
+ /**
2205
+ * A hint to the browser for which keyboard to display. Possible values: `"none"`, `"text"`, `"tel"`, `"url"`, `"email"`, `"numeric"`, `"decimal"`, and `"search"`. For numbers (type="number"): "numeric" For text (type="text"): "text"
2206
+ */
2207
+ "inputmode"?: | 'none'
2208
+ | 'text'
2209
+ | 'tel'
2210
+ | 'url'
2211
+ | 'email'
2212
+ | 'numeric'
2213
+ | 'decimal'
2214
+ | 'search';
2215
+ /**
2216
+ * The number of input boxes to display.
2217
+ * @default 6
2218
+ */
2219
+ "length": number;
2220
+ /**
2221
+ * A regex pattern string for allowed characters. Defaults based on type. For numbers (`type="number"`): `"[\p{N}]"` For text (`type="text"`): `"[\p{L}\p{N}]"`
2222
+ */
2223
+ "pattern"?: string;
2224
+ /**
2225
+ * If `true`, the user cannot modify the value.
2226
+ * @default false
2227
+ */
2228
+ "readonly": boolean;
2229
+ /**
2230
+ * Sets focus to an input box.
2231
+ * @param index - The index of the input box to focus (0-based). If provided and the input box has a value, the input box at that index will be focused. Otherwise, the first empty input box or the last input if all are filled will be focused.
2232
+ */
2233
+ "setFocus": (index?: number) => Promise<void>;
2234
+ /**
2235
+ * If `true`, shows a validity icon when all input boxes are filled. A check icon is shown if all values are valid, and an X icon is shown if any value is invalid. This does not affect the `invalid` or `valid` states of the input group. Default is `false`.
2236
+ * @default false
2237
+ */
2238
+ "showValidity": boolean;
2239
+ /**
2240
+ * The type of input allowed in the input boxes.
2241
+ * @default 'number'
2242
+ */
2243
+ "type": 'text' | 'number';
2244
+ /**
2245
+ * The value of the input group.
2246
+ * @default ''
2247
+ */
2248
+ "value"?: string | number | null;
2249
+ }
2186
2250
  /**
2187
2251
  * A thin, declarative interface to the [IntersectionObserver API](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver).
2188
2252
  * @version 6.0.0
@@ -3502,6 +3566,10 @@ export interface NanoInputCustomEvent<T> extends CustomEvent<T> {
3502
3566
  detail: T;
3503
3567
  target: HTMLNanoInputElement;
3504
3568
  }
3569
+ export interface NanoInputOtpCustomEvent<T> extends CustomEvent<T> {
3570
+ detail: T;
3571
+ target: HTMLNanoInputOtpElement;
3572
+ }
3505
3573
  export interface NanoIntersectionObserveCustomEvent<T> extends CustomEvent<T> {
3506
3574
  detail: T;
3507
3575
  target: HTMLNanoIntersectionObserveElement;
@@ -4391,6 +4459,32 @@ declare global {
4391
4459
  prototype: HTMLNanoInputElement;
4392
4460
  new (): HTMLNanoInputElement;
4393
4461
  };
4462
+ interface HTMLNanoInputOtpElementEventMap {
4463
+ "nanoInput": InputOtpInputEventDetail;
4464
+ "nanoChange": InputOtpChangeEventDetail;
4465
+ "nanoComplete": InputOtpCompleteEventDetail;
4466
+ "nanoBlur": FocusEvent;
4467
+ "nanoFocus": FocusEvent;
4468
+ }
4469
+ /**
4470
+ * A component for entering one-time passwords (OTP) with multiple input fields.
4471
+ * @version 8.7.2
4472
+ * @status new
4473
+ */
4474
+ interface HTMLNanoInputOtpElement extends Components.NanoInputOtp, HTMLStencilElement {
4475
+ addEventListener<K extends keyof HTMLNanoInputOtpElementEventMap>(type: K, listener: (this: HTMLNanoInputOtpElement, ev: NanoInputOtpCustomEvent<HTMLNanoInputOtpElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
4476
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
4477
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
4478
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
4479
+ removeEventListener<K extends keyof HTMLNanoInputOtpElementEventMap>(type: K, listener: (this: HTMLNanoInputOtpElement, ev: NanoInputOtpCustomEvent<HTMLNanoInputOtpElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
4480
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
4481
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
4482
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
4483
+ }
4484
+ var HTMLNanoInputOtpElement: {
4485
+ prototype: HTMLNanoInputOtpElement;
4486
+ new (): HTMLNanoInputOtpElement;
4487
+ };
4394
4488
  interface HTMLNanoIntersectionObserveElementEventMap {
4395
4489
  "nanoIntersectionChange": IntersectionObserverEntry;
4396
4490
  "nanoIntersecting": IntersectionObserverEntry;
@@ -4999,6 +5093,7 @@ declare global {
4999
5093
  "nano-in-page-nav": HTMLNanoInPageNavElement;
5000
5094
  "nano-increment": HTMLNanoIncrementElement;
5001
5095
  "nano-input": HTMLNanoInputElement;
5096
+ "nano-input-otp": HTMLNanoInputOtpElement;
5002
5097
  "nano-intersection-observe": HTMLNanoIntersectionObserveElement;
5003
5098
  "nano-masked-overflow": HTMLNanoMaskedOverflowElement;
5004
5099
  "nano-menu": HTMLNanoMenuElement;
@@ -7241,6 +7336,83 @@ declare namespace LocalJSX {
7241
7336
  */
7242
7337
  "valueAsNumber"?: number;
7243
7338
  }
7339
+ /**
7340
+ * A component for entering one-time passwords (OTP) with multiple input fields.
7341
+ * @version 8.7.2
7342
+ * @status new
7343
+ */
7344
+ interface NanoInputOtp {
7345
+ /**
7346
+ * If `true`, allows the input to be completely filled with invalid values. By default, if any input box contains an invalid value, the entire input group is marked as invalid. Default is `false`.
7347
+ * @default false
7348
+ */
7349
+ "allowInvalid"?: boolean;
7350
+ /**
7351
+ * If `true`, the user cannot interact with the input.
7352
+ * @default false
7353
+ */
7354
+ "disabled"?: boolean;
7355
+ /**
7356
+ * A hint to the browser for which keyboard to display. Possible values: `"none"`, `"text"`, `"tel"`, `"url"`, `"email"`, `"numeric"`, `"decimal"`, and `"search"`. For numbers (type="number"): "numeric" For text (type="text"): "text"
7357
+ */
7358
+ "inputmode"?: | 'none'
7359
+ | 'text'
7360
+ | 'tel'
7361
+ | 'url'
7362
+ | 'email'
7363
+ | 'numeric'
7364
+ | 'decimal'
7365
+ | 'search';
7366
+ /**
7367
+ * The number of input boxes to display.
7368
+ * @default 6
7369
+ */
7370
+ "length"?: number;
7371
+ /**
7372
+ * Emitted when the input group loses focus.
7373
+ */
7374
+ "onNanoBlur"?: (event: NanoInputOtpCustomEvent<FocusEvent>) => void;
7375
+ /**
7376
+ * The `nanoChange` event is fired when the user modifies the input's value. Unlike the `nanoInput` event, the `nanoChange` event is only fired when changes are committed, not as the user types. The `nanoChange` event fires when the `<nano-input-otp>` component loses focus after its value has changed. This event will not emit when programmatically setting the `value` property.
7377
+ */
7378
+ "onNanoChange"?: (event: NanoInputOtpCustomEvent<InputOtpChangeEventDetail>) => void;
7379
+ /**
7380
+ * Emitted when all input boxes have been filled with valid values.
7381
+ */
7382
+ "onNanoComplete"?: (event: NanoInputOtpCustomEvent<InputOtpCompleteEventDetail>) => void;
7383
+ /**
7384
+ * Emitted when the input group has focus.
7385
+ */
7386
+ "onNanoFocus"?: (event: NanoInputOtpCustomEvent<FocusEvent>) => void;
7387
+ /**
7388
+ * The `nanoInput` event is fired each time the user modifies the input's value. Unlike the `nanoChange` event, the `nanoInput` event is fired for each alteration to the input's value. This typically happens for each keystroke as the user types. For elements that accept text input (`type=text`, `type=tel`, etc.), the interface is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others, the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If the input is cleared on edit, the type is `null`.
7389
+ */
7390
+ "onNanoInput"?: (event: NanoInputOtpCustomEvent<InputOtpInputEventDetail>) => void;
7391
+ /**
7392
+ * A regex pattern string for allowed characters. Defaults based on type. For numbers (`type="number"`): `"[\p{N}]"` For text (`type="text"`): `"[\p{L}\p{N}]"`
7393
+ */
7394
+ "pattern"?: string;
7395
+ /**
7396
+ * If `true`, the user cannot modify the value.
7397
+ * @default false
7398
+ */
7399
+ "readonly"?: boolean;
7400
+ /**
7401
+ * If `true`, shows a validity icon when all input boxes are filled. A check icon is shown if all values are valid, and an X icon is shown if any value is invalid. This does not affect the `invalid` or `valid` states of the input group. Default is `false`.
7402
+ * @default false
7403
+ */
7404
+ "showValidity"?: boolean;
7405
+ /**
7406
+ * The type of input allowed in the input boxes.
7407
+ * @default 'number'
7408
+ */
7409
+ "type"?: 'text' | 'number';
7410
+ /**
7411
+ * The value of the input group.
7412
+ * @default ''
7413
+ */
7414
+ "value"?: string | number | null;
7415
+ }
7244
7416
  /**
7245
7417
  * A thin, declarative interface to the [IntersectionObserver API](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver).
7246
7418
  * @version 6.0.0
@@ -8562,6 +8734,7 @@ declare namespace LocalJSX {
8562
8734
  "nano-in-page-nav": NanoInPageNav;
8563
8735
  "nano-increment": NanoIncrement;
8564
8736
  "nano-input": NanoInput;
8737
+ "nano-input-otp": NanoInputOtp;
8565
8738
  "nano-intersection-observe": NanoIntersectionObserve;
8566
8739
  "nano-masked-overflow": NanoMaskedOverflow;
8567
8740
  "nano-menu": NanoMenu;
@@ -8852,6 +9025,12 @@ declare module "@stencil/core" {
8852
9025
  * @version 1.0.0
8853
9026
  */
8854
9027
  "nano-input": LocalJSX.NanoInput & JSXBase.HTMLAttributes<HTMLNanoInputElement>;
9028
+ /**
9029
+ * A component for entering one-time passwords (OTP) with multiple input fields.
9030
+ * @version 8.7.2
9031
+ * @status new
9032
+ */
9033
+ "nano-input-otp": LocalJSX.NanoInputOtp & JSXBase.HTMLAttributes<HTMLNanoInputOtpElement>;
8855
9034
  /**
8856
9035
  * A thin, declarative interface to the [IntersectionObserver API](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver).
8857
9036
  * @version 6.0.0