@luzmo/lucero 2.5.2 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/components/action-menu/index.cjs +1 -1
  2. package/components/action-menu/index.js +1 -1
  3. package/components/{action-menu-LnXQ7reF.js → action-menu-Bv9EA7__.js} +1 -1
  4. package/components/{action-menu-BW-XpCVO.cjs → action-menu-DphCCjvX.cjs} +1 -1
  5. package/components/checkbox/index.cjs +1 -1
  6. package/components/checkbox/index.js +1 -1
  7. package/components/{checkbox-CVi4GMoo.cjs → checkbox-NSSgVzJg.cjs} +1 -1
  8. package/components/{checkbox-CvRvgRzh.js → checkbox-fW7WI915.js} +1 -1
  9. package/components/color-area/color-area.d.ts +15 -0
  10. package/components/color-area/index.cjs +1 -1
  11. package/components/color-area/index.d.ts +1 -0
  12. package/components/color-area/index.js +1 -1
  13. package/components/color-area-CFBE-rG3.cjs +80 -0
  14. package/components/{color-area-qlEAp8ZN.js → color-area-GGa8KJyd.js} +85 -44
  15. package/components/color-field/index.cjs +1 -1
  16. package/components/color-field/index.js +1 -1
  17. package/components/{color-field-CVyDNZ4b.js → color-field-BZljmVHt.js} +1 -1
  18. package/components/{color-field-CN8shDl_.cjs → color-field-l-aJ6O4a.cjs} +1 -1
  19. package/components/color-handle/index.cjs +1 -1
  20. package/components/color-handle/index.js +1 -1
  21. package/components/{color-handle-Dc0uLgkf.js → color-handle-Ya92rdpA.js} +5 -2
  22. package/components/{color-handle-BE0Z1gTU.cjs → color-handle-hJ7Kblh4.cjs} +1 -1
  23. package/components/color-menu/color-menu.d.ts +11 -0
  24. package/components/color-menu/index.cjs +1 -1
  25. package/components/color-menu/index.d.ts +1 -0
  26. package/components/color-menu/index.js +1 -1
  27. package/components/{color-menu-Cus3S-Re.cjs → color-menu-C56xj5Oe.cjs} +1 -1
  28. package/components/{color-menu-BxFQnH79.js → color-menu-CEtmpeN7.js} +7 -4
  29. package/components/color-picker/color-picker.d.ts +13 -0
  30. package/components/color-picker/index.cjs +1 -1
  31. package/components/color-picker/index.d.ts +1 -0
  32. package/components/color-picker/index.js +1 -1
  33. package/components/{color-picker-orFSIqoZ.js → color-picker-BDqJodTR.js} +5 -2
  34. package/components/{color-picker-BTT1O-76.cjs → color-picker-CLGNQIkK.cjs} +1 -1
  35. package/components/color-slider/color-slider.d.ts +17 -0
  36. package/components/color-slider/index.cjs +1 -1
  37. package/components/color-slider/index.d.ts +1 -0
  38. package/components/color-slider/index.js +1 -1
  39. package/components/{color-slider-X1EArAnx.js → color-slider-DNd_ZrD6.js} +95 -56
  40. package/components/color-slider-IYBn2DL7.cjs +58 -0
  41. package/components/index.cjs +1 -1
  42. package/components/index.js +22 -22
  43. package/components/interaction-BjXWVy_C.cjs +18 -0
  44. package/components/interaction-BpCLJ1OV.js +83 -0
  45. package/components/menu/index.cjs +1 -1
  46. package/components/menu/index.js +1 -1
  47. package/components/{menu-BKwt6rnv.cjs → menu-CoJ5oERs.cjs} +1 -1
  48. package/components/{menu-L5qYivn6.js → menu-f2S0m6h9.js} +1 -1
  49. package/components/multi-language-field/index.cjs +1 -1
  50. package/components/multi-language-field/index.js +1 -1
  51. package/components/{multi-language-field-NY2XwK2M.js → multi-language-field-SZObnneZ.js} +1 -1
  52. package/components/{multi-language-field-djoM4Okc.cjs → multi-language-field-nJmWDtPL.cjs} +1 -1
  53. package/components/number-field/index.cjs +1 -1
  54. package/components/number-field/index.js +1 -1
  55. package/components/number-field/number-field.d.ts +39 -0
  56. package/components/{number-field-D9UqpqpW.js → number-field-BEt0cfcB.js} +45 -17
  57. package/components/{number-field-Ceeli_mh.cjs → number-field-DrarDCm4.cjs} +3 -2
  58. package/components/options/index.cjs +1 -1
  59. package/components/options/index.js +1 -1
  60. package/components/{options-BHDesKbF.js → options-BrpagtL6.js} +1 -1
  61. package/components/{options-Dk1uFeUT.cjs → options-DE7SelUz.cjs} +1 -1
  62. package/components/picker/index.cjs +1 -1
  63. package/components/picker/index.js +1 -1
  64. package/components/{picker-CQCAt4Mx.cjs → picker-Dd25S3rP.cjs} +1 -1
  65. package/components/{picker-C5eX5WBl.js → picker-JhsRAtSd.js} +1 -1
  66. package/components/prompt-box/index.cjs +1 -1
  67. package/components/prompt-box/index.js +1 -1
  68. package/components/{prompt-box-D7owyhfG.cjs → prompt-box-B1rmo4DX.cjs} +2 -2
  69. package/components/{prompt-box-CrtFGmjm.js → prompt-box-CL0ld3Na.js} +2 -2
  70. package/components/question-box/index.cjs +1 -1
  71. package/components/question-box/index.js +1 -1
  72. package/components/{question-box-BJYYLghb.js → question-box-BAyRPZ8j.js} +2 -2
  73. package/components/{question-box-ym1eakXA.cjs → question-box-D7s2xNAD.cjs} +1 -1
  74. package/components/search/index.cjs +1 -1
  75. package/components/search/index.js +1 -1
  76. package/components/{search-DiCwSHFf.cjs → search-1KUNWKWg.cjs} +1 -1
  77. package/components/{search-C5uFmm6S.js → search-_NUUJLz0.js} +1 -1
  78. package/components/select/index.cjs +1 -1
  79. package/components/select/index.js +1 -1
  80. package/components/{select-HqF3tcHz.js → select-BWTeIJdP.js} +1 -1
  81. package/components/{select-2Fvb7tpj.cjs → select-Ch8KCcDr.cjs} +1 -1
  82. package/components/slider/index.cjs +1 -1
  83. package/components/slider/index.d.ts +1 -0
  84. package/components/slider/index.js +1 -1
  85. package/components/slider/slider.d.ts +18 -0
  86. package/components/slider-B1cCAj1x.cjs +136 -0
  87. package/components/{slider-Ch7OgTdj.js → slider-CD-aGN9I.js} +167 -151
  88. package/components/{streaming-listener-Bfyk6Fsx.cjs → streaming-listener-BzGZUHkj.cjs} +1 -1
  89. package/components/{streaming-listener-B6mDl4pZ.js → streaming-listener-DyS3scAi.js} +1 -1
  90. package/components/table/index.cjs +1 -1
  91. package/components/table/index.js +1 -1
  92. package/components/{table-CLMLGloR.cjs → table-Bf-00FYb.cjs} +1 -1
  93. package/components/{table-DlOWqm5C.js → table-CfFwBCp1.js} +1 -1
  94. package/components/text-field/index.cjs +1 -1
  95. package/components/text-field/index.js +2 -2
  96. package/components/{text-field-DpvP_tCP.js → text-field-CBsx1CVo.js} +1 -1
  97. package/components/{text-field-DCcOZSvY.cjs → text-field-CZixBD87.cjs} +1 -1
  98. package/components/{text-field-BVl-HWzb.cjs → text-field-DwvDSctG.cjs} +1 -1
  99. package/components/{text-field-D49lAD7L.js → text-field-SNbvQYOj.js} +1 -1
  100. package/components/utils.cjs +1 -1
  101. package/components/utils.js +1 -1
  102. package/custom-elements.json +1 -1
  103. package/package.json +2 -2
  104. package/standalone/accordion.js +2 -2
  105. package/standalone/action-bar.js +1 -1
  106. package/standalone/action-button.js +1 -1
  107. package/standalone/action-menu.js +3 -3
  108. package/standalone/avatar.js +1 -1
  109. package/standalone/calendar.js +1 -1
  110. package/standalone/checkbox.js +1 -1
  111. package/standalone/chunks/action-button-C946JGIA.js +6 -0
  112. package/standalone/chunks/button-COqfQNJv.js +2 -0
  113. package/standalone/chunks/calendar-BVrT8uqP.js +122 -0
  114. package/standalone/chunks/checkbox-4PoS7Uft.js +9 -0
  115. package/standalone/chunks/clear-button-qIMg8hR4.js +2 -0
  116. package/standalone/chunks/close-button-DEiL5kEh.js +2 -0
  117. package/standalone/chunks/color-area-D-AVcZza.js +66 -0
  118. package/standalone/chunks/{color-field-BaVvupq0.js → color-field-BKDaLJQo.js} +1 -1
  119. package/standalone/chunks/{color-handle-BLQiuRSS.js → color-handle-DO7dxFGx.js} +1 -1
  120. package/standalone/chunks/color-menu-6LhE-qWn.js +73 -0
  121. package/standalone/chunks/color-slider-MSADvkPC.js +50 -0
  122. package/standalone/chunks/icon-D69mOw1X.js +2 -0
  123. package/standalone/chunks/interaction-BQyflxg-.js +2 -0
  124. package/standalone/chunks/luzmo-icon-markup-DaKoHMY8.js +13 -0
  125. package/standalone/chunks/luzmoAlert-lLzK3UPQ.js +2 -0
  126. package/standalone/chunks/luzmoAlertOutline-C7rw3G3h.js +2 -0
  127. package/standalone/chunks/luzmoAngleDown-PNrItYzK.js +2 -0
  128. package/standalone/chunks/luzmoAngleLeft-ebJO7ROy.js +2 -0
  129. package/standalone/chunks/luzmoAngleRight-B-rZQuxv.js +2 -0
  130. package/standalone/chunks/luzmoAngleUp-BQ2D4OjY.js +2 -0
  131. package/standalone/chunks/luzmoArrowUp-Bz_z0IO5.js +2 -0
  132. package/standalone/chunks/luzmoCheckCircleOutline-B8qAhKxa.js +2 -0
  133. package/standalone/chunks/luzmoCheckHeavy-JAzxJeXk.js +2 -0
  134. package/standalone/chunks/luzmoClose14-CpeGUk1z.js +2 -0
  135. package/standalone/chunks/luzmoDash-oXMu8wBK.js +2 -0
  136. package/standalone/chunks/luzmoInfoCircleOutline-EEKa5x7I.js +2 -0
  137. package/standalone/chunks/luzmoSearch-WSfXYol0.js +2 -0
  138. package/standalone/chunks/{menu-CefrRBIS.js → menu-DtUgXalL.js} +4 -4
  139. package/standalone/chunks/number-field-aOOuxxRh.js +42 -0
  140. package/standalone/chunks/options-CMRXQfIE.js +89 -0
  141. package/standalone/chunks/picker-5IvNnimu.js +108 -0
  142. package/standalone/chunks/picker-button-BIqlIkET.js +21 -0
  143. package/standalone/chunks/segments-factory-DWNY1AUE.js +2 -0
  144. package/standalone/chunks/{streaming-listener-DbMoHlSj.js → streaming-listener-0FSzb9QY.js} +1 -1
  145. package/standalone/chunks/{swatch-DivHeYOK.js → swatch-zFOV4NtM.js} +2 -2
  146. package/standalone/chunks/text-field-C4D5FNRe.js +5 -0
  147. package/standalone/chunks/{text-field-DXzpM1Qn.js → text-field-DwD97PEo.js} +3 -3
  148. package/standalone/clear-button.js +1 -1
  149. package/standalone/close-button.js +1 -1
  150. package/standalone/color-area.js +1 -1
  151. package/standalone/color-field.js +1 -1
  152. package/standalone/color-handle.js +1 -1
  153. package/standalone/color-menu.js +1 -1
  154. package/standalone/color-picker.js +1 -1
  155. package/standalone/color-slider.js +1 -1
  156. package/standalone/date-range-picker.js +8 -8
  157. package/standalone/date-time-picker.js +9 -9
  158. package/standalone/icon.js +1 -1
  159. package/standalone/manifest.json +37 -23
  160. package/standalone/menu.js +1 -1
  161. package/standalone/multi-language-field.js +1 -1
  162. package/standalone/notice.js +1 -1
  163. package/standalone/number-field.js +1 -1
  164. package/standalone/options.js +1 -1
  165. package/standalone/picker-button.js +1 -1
  166. package/standalone/picker.js +1 -1
  167. package/standalone/progress-steps.js +6 -6
  168. package/standalone/prompt-box.js +19 -19
  169. package/standalone/question-box.js +20 -20
  170. package/standalone/search.js +1 -1
  171. package/standalone/select.js +9 -9
  172. package/standalone/slider.js +11 -10
  173. package/standalone/swatch.js +1 -1
  174. package/standalone/table.js +25 -25
  175. package/standalone/tabs.js +3 -3
  176. package/standalone/tags.js +1 -1
  177. package/standalone/text-field.js +1 -1
  178. package/standalone/toast.js +3 -3
  179. package/standalone/utils.js +1 -1
  180. package/utils/reactive-controllers/interaction.d.ts +85 -0
  181. package/components/color-area-D1fRozE0.cjs +0 -80
  182. package/components/color-slider-9Ck28Qdk.cjs +0 -57
  183. package/components/slider-C1AdDTfB.cjs +0 -135
  184. package/standalone/chunks/action-button-0d4u0dWv.js +0 -6
  185. package/standalone/chunks/button-Bgc3zdEa.js +0 -2
  186. package/standalone/chunks/calendar-BxARYymw.js +0 -122
  187. package/standalone/chunks/checkbox-Cl6YBcGA.js +0 -9
  188. package/standalone/chunks/clear-button-B4r_oxfc.js +0 -2
  189. package/standalone/chunks/close-button-DVCeu3_f.js +0 -2
  190. package/standalone/chunks/color-area-BCI2oMGd.js +0 -66
  191. package/standalone/chunks/color-menu-BDZh85nX.js +0 -73
  192. package/standalone/chunks/color-slider-Bipcekrc.js +0 -49
  193. package/standalone/chunks/icon-6P1RsbD1.js +0 -2
  194. package/standalone/chunks/luzmo-icons-vtQE0BSI.js +0 -13
  195. package/standalone/chunks/number-field-Dc4nBa6l.js +0 -41
  196. package/standalone/chunks/options-rb_zaAJ6.js +0 -89
  197. package/standalone/chunks/picker-HoERLlkx.js +0 -108
  198. package/standalone/chunks/picker-button-DbamPU-T.js +0 -21
  199. package/standalone/chunks/segments-factory-B6oGyosS.js +0 -2
  200. package/standalone/chunks/text-field-D5ncaa2n.js +0 -5
@@ -15,4 +15,4 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- let e=require("lit"),t=require("lit/async-directive.js");var n=[``,()=>{}],r=class extends t.AsyncDirective{constructor(...e){super(...e),this.start=n,this.streamInside=n,this.end=n,this.streamOutside=n,this.state=`off`,this.handleStart=e=>{this.clearStream(),this.callHandler(this.start[1],e),!e.defaultPrevented&&(this.removeListeners(),this.addListeners(`on`))},this.handleInside=e=>{this.handleStream(this.streamInside[1],e)},this.handleEnd=e=>{this.clearStream(),this.callHandler(this.end[1],e),this.removeListeners(),this.addListeners(`off`)},this.handleOutside=e=>{this.handleStream(this.streamOutside[1],e)}}render(t){return e.nothing}update(e,[{start:t,end:r,streamInside:i=n,streamOutside:a=n}]){this.element!==e.element&&(this.element=e.element,this.removeListeners()),this.host=e.options?.host||this.element,this.start=t,this.end=r,this.streamInside=i,this.streamOutside=a,this.addListeners()}addListeners(e){this.state=e||this.state,this.state===`off`?(this.addListener(this.streamOutside[0],this.handleOutside),this.addListener(this.start[0],this.handleStart)):this.state===`on`&&(this.addListener(this.streamInside[0],this.handleInside),this.addListener(this.end[0],this.handleEnd))}callHandler(e,t){typeof e==`function`?e.call(this.host,t):e.handleEvent(t)}handleStream(e,t){this.stream||=(this.callHandler(e,t),requestAnimationFrame(()=>{this.stream=void 0}))}clearStream(){this.stream!=null&&(cancelAnimationFrame(this.stream),this.stream=void 0)}addListener(e,t){Array.isArray(e)?e.map(e=>{this.element.addEventListener(e,t)}):this.element.addEventListener(e,t)}removeListener(e,t){Array.isArray(e)?e.map(e=>{this.element.removeEventListener(e,t)}):this.element.removeEventListener(e,t)}removeListeners(){this.removeListener(this.start[0],this.handleStart),this.removeListener(this.streamInside[0],this.handleInside),this.removeListener(this.end[0],this.handleEnd),this.removeListener(this.streamOutside[0],this.handleOutside)}disconnected(){this.removeListeners()}reconnected(){this.addListeners()}},i=(0,t.directive)(r);Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
18
+ let e=require("lit"),t=require("lit/async-directive.js");var n=[``,()=>{}],r=class extends t.AsyncDirective{constructor(...e){super(...e),this.start=n,this.streamInside=n,this.end=n,this.streamOutside=n,this.state=`off`,this.handleStart=e=>{this.clearStream(),this.callHandler(this.start[1],e),!e.defaultPrevented&&(this.removeListeners(),this.addListeners(`on`))},this.handleInside=e=>{this.handleStream(this.streamInside[1],e)},this.handleEnd=e=>{this.clearStream(),this.callHandler(this.end[1],e),this.removeListeners(),this.addListeners(`off`)},this.handleOutside=e=>{this.handleStream(this.streamOutside[1],e)}}render(t){return e.nothing}update(e,[{start:t,end:r,streamInside:i=n,streamOutside:a=n}]){this.element!==e.element&&(this.element=e.element,this.removeListeners()),this.host=e.options?.host||this.element,this.start=t,this.end=r,this.streamInside=i,this.streamOutside=a,this.addListeners()}addListeners(e){this.state=e||this.state,this.state===`off`?(this.addListener(this.streamOutside[0],this.handleOutside),this.addListener(this.start[0],this.handleStart)):this.state===`on`&&(this.addListener(this.streamInside[0],this.handleInside),this.addListener(this.end[0],this.handleEnd))}callHandler(e,t){typeof e==`function`?e.call(this.host,t):e.handleEvent(t)}handleStream(e,t){this.stream||=(this.callHandler(e,t),requestAnimationFrame(()=>{this.stream=void 0}))}clearStream(){this.stream!=null&&(cancelAnimationFrame(this.stream),this.stream=void 0)}addListener(e,t){Array.isArray(e)?e.map(e=>{this.element.addEventListener(e,t)}):this.element.addEventListener(e,t)}removeListener(e,t){Array.isArray(e)?e.map(e=>{this.element.removeEventListener(e,t)}):this.element.removeEventListener(e,t)}removeListeners(){this.removeListener(this.start[0],this.handleStart),this.removeListener(this.streamInside[0],this.handleInside),this.removeListener(this.end[0],this.handleEnd),this.removeListener(this.streamOutside[0],this.handleOutside)}disconnected(){this.removeListeners(),this.clearStream(),this.state=`off`}reconnected(){this.addListeners()}},i=(0,t.directive)(r);Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
@@ -66,7 +66,7 @@ var r = ["", () => {}], i = n(class extends t {
66
66
  this.removeListener(this.start[0], this.handleStart), this.removeListener(this.streamInside[0], this.handleInside), this.removeListener(this.end[0], this.handleEnd), this.removeListener(this.streamOutside[0], this.handleOutside);
67
67
  }
68
68
  disconnected() {
69
- this.removeListeners();
69
+ this.removeListeners(), this.clearStream(), this.state = "off";
70
70
  }
71
71
  /* c8 ignore next 3 */
72
72
  reconnected() {
@@ -15,4 +15,4 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../table-CLMLGloR.cjs");exports.DEFAULT_TABLE_LABELS=e.u,exports.LuzmoTable=e.c,exports.LuzmoTableBody=e.s,exports.LuzmoTableCell=e.o,exports.LuzmoTableCheckboxCell=e.a,exports.LuzmoTableDisclosureCell=e.n,exports.LuzmoTableHead=e.i,exports.LuzmoTableHeadCell=e.r,exports.LuzmoTableRow=e.t,exports.LuzmoTableRowDetails=e.l;
18
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../table-Bf-00FYb.cjs");exports.DEFAULT_TABLE_LABELS=e.u,exports.LuzmoTable=e.c,exports.LuzmoTableBody=e.s,exports.LuzmoTableCell=e.o,exports.LuzmoTableCheckboxCell=e.a,exports.LuzmoTableDisclosureCell=e.n,exports.LuzmoTableHead=e.i,exports.LuzmoTableHeadCell=e.r,exports.LuzmoTableRow=e.t,exports.LuzmoTableRowDetails=e.l;
@@ -16,4 +16,4 @@
16
16
  * SOFTWARE.
17
17
  * */
18
18
  import "../tokens.js";
19
- export { u as DEFAULT_TABLE_LABELS, c as LuzmoTable, s as LuzmoTableBody, o as LuzmoTableCell, a as LuzmoTableCheckboxCell, n as LuzmoTableDisclosureCell, i as LuzmoTableHead, r as LuzmoTableHeadCell, t as LuzmoTableRow, l as LuzmoTableRowDetails } from "../table-DlOWqm5C.js";
19
+ export { u as DEFAULT_TABLE_LABELS, c as LuzmoTable, s as LuzmoTableBody, o as LuzmoTableCell, a as LuzmoTableCheckboxCell, n as LuzmoTableDisclosureCell, i as LuzmoTableHead, r as LuzmoTableHeadCell, t as LuzmoTableRow, l as LuzmoTableRowDetails } from "../table-CfFwBCp1.js";
@@ -15,7 +15,7 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-CSajkMro.cjs"),n=require("./roving-tabindex-BUFR8hPH.cjs"),r=require("./language-resolution-B7D3hQ6_.cjs"),i=require("./match-media-B_0cVVtk.cjs");require("./checkbox-CVi4GMoo.cjs");const a=require("./template-property-yhcAmPXk.cjs");let o=require("lit"),s=require("lit/decorators.js"),c=require("@luzmo/icons"),l=require("lit/directives/if-defined.js"),u=require("lit/directives/class-map.js"),d=require("lit/directives/style-map.js"),f=require("lit/directives/repeat.js"),p=require("@tanstack/table-core"),m=require("@tanstack/virtual-core");var h=`data-luzmo-table-announcer`,g,_=0,v=0,ee=()=>{let e=document.createElement(`div`);return e.setAttribute(h,``),e.setAttribute(`aria-live`,`polite`),e.setAttribute(`aria-atomic`,`true`),Object.assign(e.style,{position:`absolute`,inlineSize:`1px`,blockSize:`1px`,margin:`-1px`,padding:`0`,border:`0`,overflow:`hidden`,clipPath:`inset(50%)`,whiteSpace:`nowrap`}),e},te=class{constructor(e){e.addController(this)}announce(e){if(typeof document>`u`||!v)return;g??=ee(),g.isConnected||document.body.append(g);let t=g;t.textContent=``,cancelAnimationFrame(_),_=requestAnimationFrame(()=>{t.textContent=e})}hostConnected(){v+=1}hostDisconnected(){--v,v===0&&(cancelAnimationFrame(_),g?.remove(),g=void 0)}},y=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,b=e=>`luzmo-table-details-${[...e].map(e=>/^[A-Za-z0-9]$/.test(e)?e:`_${e.codePointAt(0).toString(16)}_`).join(``)}`,x=e=>y(e.minWidth)??(e.resizable?48:0),S=e=>y(e.maxWidth)??1e4,C=(e,t)=>Math.min(S(t),Math.max(x(t),Math.round(e))),ne=(e,t)=>{let n=y(t)??y(e.width);if(n!==void 0)return`${C(n,e)}px`;let r=y(e.minWidth)??(e.resizable?48:0),i=y(e.maxWidth);return i===void 0?r>0?`minmax(${r}px, 1fr)`:`minmax(0px, 1fr)`:`minmax(${r}px, ${i}px)`},re=(e,t,n)=>{let r=[];n.selects&&r.push(`var(--table-checkbox-cell-inline-size)`),n.expandable&&r.push(`var(--table-disclosure-cell-inline-size)`);for(let n of e)r.push(ne(n,y(t[n.id])));return r.join(` `)},w=(e,t)=>{let n=y(t)??y(e.width);return n===void 0?y(e.minWidth)??(e.resizable?48:0):C(n,e)},ie=(e,t,n)=>{let r=[];n.selects&&r.push(`var(--table-checkbox-cell-inline-size)`),n.expandable&&r.push(`var(--table-disclosure-cell-inline-size)`);let i=e.reduce((e,n)=>e+w(n,y(t[n.id])),0);return r.push(`${i}px`),`calc(${r.join(` + `)})`},ae=e=>({id:e.id,header:typeof e.header==`string`?e.header:e.id,width:y(e.width),minWidth:y(e.minWidth),maxWidth:y(e.maxWidth),resizable:e.resizable!==!1,lineClamp:y(e.lineClamp)}),oe=(e,t)=>{let n=e===`PageDown`||e===`PageUp`;switch(e){case`ArrowRight`:case`PageDown`:return{action:t?`increase`:`decrease`,amount:n?64:16};case`ArrowLeft`:case`PageUp`:return{action:t?`decrease`:`increase`,amount:n?64:16};case`Home`:return{action:`min`,amount:0};case`End`:return{action:`max`,amount:0};default:return}},se=(e,t,n)=>t.action===`min`?x(n):t.action===`max`?S(n):C(e+(t.action===`increase`?1:-1)*t.amount,n),T={selectAll:`Select All`,selectRow:`Select row {index}`,sortAscending:`Sorted by {column}, ascending`,sortDescending:`Sorted by {column}, descending`,expandRow:`Expand {label}`,collapseRow:`Collapse {label}`,resizeColumn:`Resize {column}`,columnWidth:`{column}, {width} pixels`},ce=e=>e.rowType===`information`||e._$rowType$===1,le=e=>e===`asc`?`ascending`:e===`desc`?`descending`:`none`,ue=e=>e===`asc`?`desc`:`asc`,E=(e={},t)=>{let n=Object.fromEntries(Object.entries(e).filter(([,e])=>typeof e==`string`&&e!==``)),r={...T,...n};return t&&(r.selectAll=t),r},D=(e,t)=>{let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`{${e}}`,r);return n},de=(e,t)=>e.map((e,n)=>({item:e,value:t?t(e,n):String(n),index:n,information:ce(e)})),fe=(e,t)=>typeof e==`function`?e(t):e,pe=class{constructor(){this.records=[],this.sorting=[],this.manualSorting=!1,this.rowSelection={},this.selectedOrder=[],this.columns=[],this.table=(0,p.createTable)({data:[],columns:[],state:{},onStateChange:()=>{},renderFallbackValue:null,getCoreRowModel:(0,p.getCoreRowModel)(),getSortedRowModel:(0,p.getSortedRowModel)(),getRowId:e=>e.value,enableRowSelection:e=>!!this.selects&&!e.original.information,enableMultiRowSelection:()=>this.selects===`multiple`,onRowSelectionChange:e=>{this.pendingSelection=fe(e,this.rowSelection)}}),this.compare=(e,t)=>typeof e==`number`&&typeof t==`number`?e-t:(this.collator&&this.collatorLocale===this.locale||(this.collatorLocale=this.locale,this.collator=new Intl.Collator(this.locale,{numeric:!0,sensitivity:`base`})),this.collator.compare(String(e),String(t)))}setRecords(e){this.records=e}setSelected(e){this.selectedOrder=[...e],this.rowSelection=Object.fromEntries(e.map(e=>[e,!0]))}setSorting(e,t=!1){this.manualSorting=t,e?(this.columns.some(t=>t.id===e.key)||(this.columns=[...this.columns,this.createSortColumn(e.key)]),this.sorting=[{id:e.key,desc:e.direction===`desc`}]):this.sorting=[]}get rows(){this.sync();let e=this.table.getRowModel().rows.map(e=>e.original).filter(e=>!e.information);return e.length===this.records.length?e:this.records.map(t=>t.information?t:e.shift())}isSelected(e){return!!this.rowSelection[e]}get allSelected(){let e=this.selectableRecords;return e.length>0&&e.every(e=>this.isSelected(e.value))}get someSelected(){return this.selectableRecords.some(e=>this.isSelected(e.value))}toggle(e){this.sync();let t=this.findRow(e);if(t?.getCanSelect())return this.capture(()=>t.toggleSelected())}toggleAll(e){return this.sync(),this.capture(()=>this.table.toggleAllRowsSelected(e))}get selectableRecords(){return this.selects?this.records.filter(e=>!e.information):[]}findRow(e){return this.table.getCoreRowModel().rows.find(t=>t.original.value===e)}capture(e){this.pendingSelection=void 0,e();let t=this.pendingSelection??this.rowSelection;this.pendingSelection=void 0;let n=this.selectedOrder.filter(e=>t[e]),r=[...new Set([...this.records.map(e=>e.value),...Object.keys(t)])].filter(e=>t[e]&&!n.includes(e));return[...n,...r]}createSortColumn(e){return{id:e,accessorFn:t=>t.item[e],sortUndefined:`last`,sortingFn:(e,t,n)=>this.compare(e.getValue(n),t.getValue(n))}}sync(){this.table.setOptions(e=>({...e,data:this.records,columns:this.columns,manualSorting:this.manualSorting,state:{...this.table.initialState,sorting:this.sorting,rowSelection:this.rowSelection}}))}},me=new Set([`luzmo-table-cell`,`luzmo-table-head-cell`,`luzmo-table-checkbox-cell`]),O=e=>e.find(e=>e instanceof HTMLElement&&e.classList.contains(`resize-handle`)),k=class{constructor(e,t){this.handlePointerDown=e=>{if(!this.options.owns(e)||e.button!==0)return;let t=e.composedPath(),n=O(t),r=this.cellFromPath(t);if(!n||r?.localName!==`luzmo-table-head-cell`||!r.resizable)return;let i=r;e.preventDefault();let a=this.options.headCells().indexOf(i),o=i.toLayout(Math.max(a,0));this.drag={id:o.id,pointerId:e.pointerId,startWidth:i.getBoundingClientRect().width,startX:e.clientX};try{n.setPointerCapture(e.pointerId)}catch{}},this.handlePointerMove=e=>{let t=this.drag;if(!t||e.pointerId!==t.pointerId)return;let n=this.options.layouts().find(e=>e.id===t.id);if(!n)return;let r=(e.clientX-t.startX)*(this.options.isLTR()?1:-1);this.setColumnWidth(n,t.startWidth+r,!1)},this.handlePointerUp=e=>{let t=this.drag;if(!t||e.pointerId!==t.pointerId)return;let n=this.options.layouts().find(e=>e.id===t.id);if(this.drag=void 0,!n)return;let r=(e.clientX-t.startX)*(this.options.isLTR()?1:-1);this.setColumnWidth(n,t.startWidth+r,!0)},this.host=e,this.options=t,e.addController(this)}hostConnected(){this.host.addEventListener(`pointerdown`,this.handlePointerDown),this.host.addEventListener(`pointermove`,this.handlePointerMove),this.host.addEventListener(`pointerup`,this.handlePointerUp),this.host.addEventListener(`pointercancel`,this.handlePointerUp)}hostDisconnected(){this.host.removeEventListener(`pointerdown`,this.handlePointerDown),this.host.removeEventListener(`pointermove`,this.handlePointerMove),this.host.removeEventListener(`pointerup`,this.handlePointerUp),this.host.removeEventListener(`pointercancel`,this.handlePointerUp),this.drag=void 0}handleKeydown(e){if(e.defaultPrevented||!this.options.owns(e))return;let t=e.composedPath();if(!O(t))return;let n=oe(e.code,this.options.isLTR()),r=this.cellFromPath(t);n&&r?.localName===`luzmo-table-head-cell`&&(e.preventDefault(),e.stopPropagation(),this.resizeColumn(r,n))}resizeColumn(e,t){let n=this.options.headCells().indexOf(e),r=e.toLayout(Math.max(n,0)),i=e.currentWidth||Math.round(e.getBoundingClientRect().width);this.setColumnWidth(r,se(i,t,r),!0)}setColumnWidth(e,t,n){let r=C(t,e),i={...this.host.columnWidths,[e.id]:r};this.host.columnWidths=i;let a=this.options.headCells().find((t,n)=>t.toLayout(n).id===e.id);if(a&&(a.currentWidth=r),!n)return;let o=E(this.options.labels(),this.options.selectAllLabel());this.host.dispatchEvent(new CustomEvent(`luzmo-column-resized`,{bubbles:!0,composed:!0,detail:{columnId:e.id,width:r,columnWidths:{...i}}})),this.options.announce(D(o.columnWidth,{column:e.header,width:this.formatWidth(r)}))}formatWidth(e){let t=this.options.language();return this.widthFormatter&&this.formatterLanguage===t||(this.formatterLanguage=t,this.widthFormatter=new Intl.NumberFormat(t)),this.widthFormatter.format(e)}cellFromPath(e){return e.find(e=>e instanceof HTMLElement&&me.has(e.localName))}},he=`textarea, select, [contenteditable=""], [contenteditable="true"], input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"])`,ge=class extends n.t{constructor(e,{rows:t,isLTR:n,...r}){super(e,r),this.handleFocusout=e=>{let t=e.relatedTarget;t instanceof HTMLElement&&(this.elements.includes(t)||this.elements.some(e=>e.contains(t)))||queueMicrotask(()=>{this.activeGridCell()||this.hostNoLongerContainsFocus()})},this.handleKeydown=e=>{if(e.defaultPrevented||!this.acceptsEventCode(e.code)||!this.owns(e))return;let t=e.composedPath()[0];if(t instanceof HTMLElement&&t.matches(he))return;let n=this.cellFromPath(e.composedPath());if(!n)return;let r=this.navigationTarget(n,e);r&&(e.preventDefault(),this.focusElement(r))},this.rows=t,this.isLTR=n}acceptsEventCode(e){return e===`ArrowLeft`||e===`ArrowRight`||e===`ArrowUp`||e===`ArrowDown`||e===`Home`||e===`End`}focusElement(e,t){let n=this.elements.indexOf(e);if(n===-1)return;let r=this.elements[this.currentIndex];r&&r!==e&&(r.tabIndex=-1),this.currentIndex=n,this.focus(t)}owns(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.localName===`luzmo-table`)return t===this.host;return!0}cellFromPath(e){let t=new Set(this.rows().flat());return e.find(e=>e instanceof HTMLElement&&t.has(e))}activeGridCell(){let e=this.host.ownerDocument.activeElement;for(;e instanceof HTMLElement&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e instanceof HTMLElement&&this.rows().flat().includes(e)?e:void 0}navigationTarget(e,t){let n=this.rows(),r=n.findIndex(t=>t.includes(e));if(r===-1)return;let i=n[r].indexOf(e),a=n.length-1,o=(e,t)=>{let r=n[Math.min(Math.max(e,0),a)];return r[Math.min(Math.max(t,0),r.length-1)]},s=t=>{let i=n[Math.min(Math.max(t,0),a)];return this.cellForKey(i,this.columnKey(n[r],e))},c=this.isLTR()?1:-1,l=t.ctrlKey||t.metaKey;switch(t.code){case`ArrowRight`:return o(r,i+c);case`ArrowLeft`:return o(r,i-c);case`ArrowDown`:return s(r+1);case`ArrowUp`:return s(r-1);case`Home`:return o(l?0:r,0);case`End`:return l?o(a,n[a].length-1):o(r,n[r].length-1);default:return}}columnKey(e,t){if(t.classList.contains(`resize-handle`)){let n=e[e.indexOf(t)-1];return n?this.columnKey(e,n):`data:0`}if(t.localName===`luzmo-table-checkbox-cell`)return`select`;if(t.localName===`luzmo-table-disclosure-cell`)return`expand`;if(t.classList.contains(`cell`))return`details`;let n=e.filter(e=>e.localName===`luzmo-table-cell`||e.localName===`luzmo-table-head-cell`);return`data:${Math.max(n.indexOf(t),0)}`}cellForKey(e,t){return t===`expand`?e.find(e=>e.localName===`luzmo-table-disclosure-cell`)??this.cellForKey(e,`data:0`):t===`details`?this.cellForKey(e,`data:0`):e.find(n=>!n.classList.contains(`resize-handle`)&&this.columnKey(e,n)===t)??e[0]}},A=Symbol(`table-details-closing`),j=e=>{let t=e.nextElementSibling;return t?.localName===`luzmo-table-row-details`?t:null},M=e=>e instanceof HTMLElement,_e=class{constructor(e,t){this.closingDetails=new Set,this.handleDetailsCollapsed=e=>{if(!this.options.owns(e))return;let t=e.target,n=[...this.closingDetails].find(e=>b(e)===t?.id);if(!n)return;let r=new Set(this.closingDetails);r.delete(n),this.closingDetails=r,this.host.requestUpdate(A)},this.host=e,this.options=t,e.addController(this)}get closing(){return this.closingDetails}hostConnected(){this.host.addEventListener(`luzmo-table-details-collapsed`,this.handleDetailsCollapsed)}hostDisconnected(){this.host.removeEventListener(`luzmo-table-details-collapsed`,this.handleDetailsCollapsed)}clear(){this.closingDetails=new Set,this.host.requestUpdate(A)}toggle(e){if(!e.expandable&&!j(e))return;let t=this.isDataMode(),n=t?e.value:e.value||String(this.declarativeRows().indexOf(e)),r=t?!this.host.expanded.includes(n):!e.expanded;if(t){let e=this.host.expanded;this.setClosing(n,!r),this.host.expanded=r?[...e,n]:e.filter(e=>e!==n),this.dispatchToggle(n,r)||(this.host.expanded=e,this.setClosing(n,!1));return}if(e.expanded=r,!this.dispatchToggle(n,r)){e.expanded=!r;return}let i=j(e);i&&(i.open=r),e.disclosureLabel=this.expandLabel(n,e.checkboxLabel||e.querySelector(`:scope > luzmo-table-cell`)?.textContent?.trim()||n,this.declarativeRows().indexOf(e))}collapseFromPath(e){let t=e.find(e=>M(e)&&e.localName===`luzmo-table-row-details`),n=(t?.previousElementSibling?.localName===`luzmo-table-row`?t.previousElementSibling:void 0)??e.find(e=>M(e)&&e.localName===`luzmo-table-row`);if(!n?.expanded)return;this.toggle(n);let r=n.shadowRoot?.querySelector(`luzmo-table-disclosure-cell`);r&&this.options.focusDisclosure(r)}setClosing(e,t){let n=new Set([...this.closingDetails].filter(t=>t!==e));t&&n.add(e),this.closingDetails=n,this.host.requestUpdate(A)}dispatchToggle(e,t){return this.host.dispatchEvent(new CustomEvent(`luzmo-table-row-toggle`,{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e,expanded:t}}))}expandLabel(e,t,n){let r=E(this.host.labels,this.host.selectAllLabel);return D(this.host.expanded.includes(e)||this.rowByValue(e)?.expanded?r.collapseRow:r.expandRow,{label:t,index:String(n+1)})}rowByValue(e){return this.rows().find(t=>t.value===e)}isDataMode(){return Array.isArray(this.host.items)}declarativeRows(){return[...this.host.querySelectorAll(`:scope > luzmo-table-body > luzmo-table-row`)]}rows(){return this.isDataMode()?[...this.host.shadowRoot?.querySelectorAll(`luzmo-table-row`)??[]]:this.declarativeRows()}},N=e=>e instanceof HTMLElement,P=class{constructor(e,t){this.handleBodyScroll=e=>{this.options.owns(e)&&e.composedPath().find(e=>N(e)&&e.localName===`luzmo-table-body`)&&this.host.requestUpdate()},this.host=e,this.options=t,e.addController(this)}hostConnected(){this.host.addEventListener(`luzmo-table-body-scroll`,this.handleBodyScroll)}hostDisconnected(){this.host.removeEventListener(`luzmo-table-body-scroll`,this.handleBodyScroll),this.bodyObserver?.disconnect(),this.observedBody=void 0}hostUpdated(){this.syncHeadScroll(),this.watchBodyScrollbar()}hasExpansion(){return this.isDataMode()?typeof this.host.renderDetails==`function`:this.declarativeRows().some(e=>e.nextElementSibling?.localName===`luzmo-table-row-details`)}layouts(){return this.isDataMode()&&!this.slottedHead()?this.host.columns.map(ae):this.headCells().map((e,t)=>e.toLayout(t))}headCells(){return[...this.head()?.querySelectorAll(`:scope > luzmo-table-head-cell`)??[]]}applyGridMetrics(){let e={selects:!!this.host.selects,expandable:this.hasExpansion()},t=this.layouts();this.host.style.setProperty(`--table-grid-columns`,re(t,this.host.columnWidths,e)||`none`),this.host.style.setProperty(`--table-min-inline-size`,ie(t,this.host.columnWidths,e))}syncPresentation(){this.syncHead(),this.syncColumns(),this.isDataMode()||this.syncDeclarativeRows()}syncHeadTabStops(){let e=this.head();if(!e)return;let t=e.shadowRoot?.querySelector(`luzmo-table-checkbox-cell`);t&&t.getAttribute(`aria-hidden`)!==`true`&&t.tabIndex!==0&&(t.tabIndex=0);for(let e of this.headCells())e.tabIndex!==0&&(e.tabIndex=0)}syncHead(){let e=this.body();e&&this.syncGridColumns(e);let t=this.head();if(!t)return;this.syncGridColumns(t),this.syncHeadScroll(e,t);let n=E(this.host.labels,this.host.selectAllLabel),r=this.options.model.allSelected,i=this.options.model.someSelected,a=this.host.selects===`multiple`;t.selects=this.host.selects,t.checked=a&&r,t.indeterminate=a&&i&&!r,t.selected=i,t.emphasized=this.host.emphasized,t.checkboxLabel=n.selectAll,t.checkboxSize=this.host.size,t.expandable=this.hasExpansion()}watchBodyScrollbar(){let e=this.body();e&&e!==this.observedBody&&(this.bodyObserver?.disconnect(),this.observedBody=e,this.bodyObserver??=new ResizeObserver(()=>{this.syncHeadScroll()}),this.bodyObserver.observe(e,{box:`content-box`}))}syncHeadScroll(e=this.body(),t=this.head()){if(!e||!t)return;let n=Math.max(0,e.offsetWidth-e.clientWidth),r=e.scrollWidth>e.clientWidth+1;t.style.paddingInlineEnd=n>0&&!r?`${n}px`:``,t.style.transform=`translateX(${-e.scrollLeft}px)`}syncColumns(){let e=this.layouts(),t=E(this.host.labels,this.host.selectAllLabel);this.headCells().forEach((n,r)=>{let i=e[r];if(!i)return;let a=n.textContent?.trim()||i.header;if(n.resizeLabel=D(t.resizeColumn,{column:a}),!n.resizable)return;let o=y(this.host.columnWidths[i.id])??i.width,s=Math.round(n.getBoundingClientRect().width),c=o??s;c>0&&n.currentWidth!==c&&(n.currentWidth=c)});for(let t of this.rows()){this.syncGridColumns(t);let n=j(t);n&&this.syncGridColumns(n),!t.spanAll&&[...t.children].filter(e=>N(e)&&e.localName===`luzmo-table-cell`).forEach((t,n)=>{let r=e[n]?.lineClamp;t.columnLineClamp!==r&&(t.columnLineClamp=r)})}}syncDeclarativeRows(){let e=this.host.selects,t=E(this.host.labels,this.host.selectAllLabel),n=this.hasExpansion(),r=this.declarativeRows();r.forEach((i,a)=>{this.syncGridColumns(i);let o=i.value||String(a),s=j(i),c=a===r.length-1;i.toggleAttribute(`data-last-row`,c),s&&(this.syncGridColumns(s),s.toggleAttribute(`data-last-row`,c));let l=i.querySelector(`:scope > luzmo-table-cell`)?.textContent?.trim()||o;i.selectable=!!e,i.selectionColumn=!!e,i.selected=!!e&&this.options.model.isSelected(o),i.selectsSingle=e===`single`,i.emphasized=this.host.emphasized,i.checkboxSize=this.host.size,i.checkboxLabel=l,i.expandable=!!s,i.expansionColumn=n&&!s,i.detailsId=s?.id??``,i.disclosureLabel=D(i.expanded?t.collapseRow:t.expandRow,{label:l,index:String(a+1)}),s&&(s.id||(s.id=b(o),i.detailsId=s.id),s.open=i.expanded)})}syncGridColumns(e){for(let t of[`--table-grid-columns`,`--table-min-inline-size`])e.style.setProperty(t,this.host.style.getPropertyValue(t))}isDataMode(){return Array.isArray(this.host.items)}slottedHead(){return this.host.querySelector(`:scope > luzmo-table-head`)}head(){return this.slottedHead()??(this.isDataMode()?this.host.shadowRoot?.querySelector(`luzmo-table-head`)??null:null)}body(){return this.isDataMode()?this.host.shadowRoot?.querySelector(`luzmo-table-body`)??null:this.host.querySelector(`:scope > luzmo-table-body`)}declarativeRows(){return[...this.host.querySelectorAll(`:scope > luzmo-table-body > luzmo-table-row`)]}rows(){return this.isDataMode()?[...this.host.shadowRoot?.querySelectorAll(`luzmo-table-row`)??[]]:this.declarativeRows()}},F=Symbol(`table-virtual-range-updated`),I=40,ve=4,L=e=>e.getBoundingClientRect().height,ye=class{constructor(e,t){this.connected=!1,this.keys=[],this.estimatedSize=I,this.host=e,this.options=t,e.addController(this)}get enabled(){return!!this.virtualizer}set enabled(e){e!==this.enabled&&(e?(this.virtualizer=new m.Virtualizer(this.createOptions()),this.connected&&(this.cleanup=this.virtualizer._didMount())):(this.cleanup?.(),this.cleanup=void 0,this.virtualizer=void 0,this.range=void 0))}sync(e){return this.virtualizer?(e!==this.keys&&(this.keys=e,this.virtualizer.setOptions(this.createOptions())),this.virtualizer.getVirtualItems()):[]}get totalSize(){return this.virtualizer?.getTotalSize()??0}scrollToIndex(e){this.virtualizer?.scrollToIndex(e,{align:`start`})}hostConnected(){this.connected=!0,this.virtualizer&&!this.cleanup&&(this.cleanup=this.virtualizer._didMount())}hostUpdated(){if(!this.virtualizer)return;this.virtualizer._willUpdate();let e=this.options.getRowElements();this.syncEstimate(e);for(let t of e)this.virtualizer.measureElement(t)}hostDisconnected(){this.connected=!1,this.cleanup?.(),this.cleanup=void 0}syncEstimate(e){let t=e.filter(e=>this.options.isRendered(e)).map(e=>L(e)).filter(Boolean).sort((e,t)=>e-t);if(t.length===0)return;let n=t[Math.floor(t.length/2)];Math.abs(n-this.estimatedSize)>=.5&&(this.estimatedSize=n,this.virtualizer?.measure())}createOptions(){return{count:this.keys.length,getScrollElement:this.options.getScrollElement,estimateSize:()=>this.estimatedSize,getItemKey:e=>this.keys[e]??e,overscan:ve,useAnimationFrameWithResizeObserver:!0,scrollToFn:m.elementScroll,observeElementRect:m.observeElementRect,observeElementOffset:m.observeElementOffset,measureElement:e=>this.options.isRendered(e)&&L(e)||this.estimatedSize,onChange:e=>{let t=this.reportRange(e);queueMicrotask(()=>{t?this.host.requestUpdate(F,!1):this.host.requestUpdate()})}}}reportRange(e){let t=e.range;if(!t||t.endIndex<t.startIndex)return!1;let n=t.startIndex,r=t.endIndex;return this.range?.first===n&&this.range.last===r?!1:(this.range={first:n,last:r},this.options.onRangeChanged({first:n,last:r}),!0)}},be=`:host{grid-template-columns:var(--table-grid-columns);min-inline-size:var(--table-min-inline-size,0);box-sizing:border-box;display:grid;overflow:hidden;border-block-start:none!important;border-inline:none!important;border-block-end-width:var(--table-row-divider-width)!important;border-block-end-style:solid!important;border-block-end-color:var(--highcontrast-table-row-divider-color,var(--luzmo-table-border-color,var(--table-row-divider-color)))!important}:host([data-last-row]){border-block-end-width:0!important}:host([hidden]){display:none!important}.cell{outline:none;grid-column:1/-1;grid-template-rows:1fr;min-inline-size:0;display:grid;overflow:hidden}:host([data-last-row]) .cell{--table-focus-end-start-radius:var(--table-corner-radius);--table-focus-end-end-radius:var(--table-corner-radius)}.cell:focus-visible{outline:var(--luzmo-indicator-width,2px) solid var(--highcontrast-table-details-focus-indicator-color,var(--luzmo-indicator-color,currentColor));outline-offset:calc(var(--luzmo-indicator-width,2px) * -1);border-start-start-radius:var(--table-focus-start-start-radius,0);border-start-end-radius:var(--table-focus-start-end-radius,0);border-end-end-radius:var(--table-focus-end-end-radius,0);border-end-start-radius:var(--table-focus-end-start-radius,0)}.content{padding-block:var(--table-details-padding-block);padding-inline:var(--table-details-padding-inline);overflow:hidden}:host([opening]) .content,:host([closing]) .content{min-block-size:0}:host([opening]) .cell{animation:table-details-open var(--luzmo-animation-duration) ease-out}:host([closing]) .cell{animation:table-details-close var(--luzmo-animation-duration) ease-in}@keyframes table-details-open{0%{opacity:0;grid-template-rows:0fr}}@keyframes table-details-close{to{opacity:0;grid-template-rows:0fr}}@media (prefers-reduced-motion:reduce){:host([opening]) .cell,:host([closing]) .cell{animation:none}}:host{--table-row-divider-color:var(--luzmo-border-color);--table-row-divider-width:var(--luzmo-border-width);--table-details-padding-block:var(--luzmo-spacing-4);--table-details-padding-inline:var(--luzmo-table-cell-padding-inline,var(--table-cell-padding-inline))}@media (forced-colors:active){:host{--highcontrast-table-row-divider-color:CanvasText;--highcontrast-table-details-focus-indicator-color:Highlight}}`;function R(e,t){return[...Array.isArray(e)?e:e?[e]:[],(0,o.unsafeCSS)(t)]}var z=class extends e.n{constructor(...e){super(...e),this.role=`row`,this.open=!1,this._phase=`closed`,this.reducedMotion=new i.r(this,`(prefers-reduced-motion: reduce)`),this.handleAnimationEnd=e=>{e.target===this.renderRoot.querySelector(`.cell`)&&(this._phase===`closing`?this._finishClosing():this._phase===`opening`&&(this._phase=`open`),this.requestUpdate())},this._finishClosing=()=>{this._phase===`closing`&&(window.clearTimeout(this._closeFallback),this._phase=`closed`,this.hidden=!0,this.dispatchEvent(new Event(`luzmo-table-details-collapsed`,{bubbles:!0,composed:!0})),this.requestUpdate())}}static get styles(){return R(super.styles,be)}disconnectedCallback(){window.clearTimeout(this._closeFallback),super.disconnectedCallback()}willUpdate(e){super.willUpdate(e),(e.has(`open`)||!this.hasUpdated)&&(this.open?(this.hidden=!1,this._phase=this.hasUpdated&&!this.reducedMotion.matches?`opening`:`open`):!this.hasUpdated||this.reducedMotion.matches||this._phase===`closed`?(this._phase=`closed`,this.hidden=!0):this._phase=`closing`)}render(){return o.html`
18
+ require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-CSajkMro.cjs"),n=require("./roving-tabindex-BUFR8hPH.cjs"),r=require("./language-resolution-B7D3hQ6_.cjs"),i=require("./match-media-B_0cVVtk.cjs");require("./checkbox-NSSgVzJg.cjs");const a=require("./template-property-yhcAmPXk.cjs");let o=require("lit"),s=require("lit/decorators.js"),c=require("@luzmo/icons"),l=require("lit/directives/if-defined.js"),u=require("lit/directives/class-map.js"),d=require("lit/directives/style-map.js"),f=require("lit/directives/repeat.js"),p=require("@tanstack/table-core"),m=require("@tanstack/virtual-core");var h=`data-luzmo-table-announcer`,g,_=0,v=0,ee=()=>{let e=document.createElement(`div`);return e.setAttribute(h,``),e.setAttribute(`aria-live`,`polite`),e.setAttribute(`aria-atomic`,`true`),Object.assign(e.style,{position:`absolute`,inlineSize:`1px`,blockSize:`1px`,margin:`-1px`,padding:`0`,border:`0`,overflow:`hidden`,clipPath:`inset(50%)`,whiteSpace:`nowrap`}),e},te=class{constructor(e){e.addController(this)}announce(e){if(typeof document>`u`||!v)return;g??=ee(),g.isConnected||document.body.append(g);let t=g;t.textContent=``,cancelAnimationFrame(_),_=requestAnimationFrame(()=>{t.textContent=e})}hostConnected(){v+=1}hostDisconnected(){--v,v===0&&(cancelAnimationFrame(_),g?.remove(),g=void 0)}},y=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,b=e=>`luzmo-table-details-${[...e].map(e=>/^[A-Za-z0-9]$/.test(e)?e:`_${e.codePointAt(0).toString(16)}_`).join(``)}`,x=e=>y(e.minWidth)??(e.resizable?48:0),S=e=>y(e.maxWidth)??1e4,C=(e,t)=>Math.min(S(t),Math.max(x(t),Math.round(e))),ne=(e,t)=>{let n=y(t)??y(e.width);if(n!==void 0)return`${C(n,e)}px`;let r=y(e.minWidth)??(e.resizable?48:0),i=y(e.maxWidth);return i===void 0?r>0?`minmax(${r}px, 1fr)`:`minmax(0px, 1fr)`:`minmax(${r}px, ${i}px)`},re=(e,t,n)=>{let r=[];n.selects&&r.push(`var(--table-checkbox-cell-inline-size)`),n.expandable&&r.push(`var(--table-disclosure-cell-inline-size)`);for(let n of e)r.push(ne(n,y(t[n.id])));return r.join(` `)},w=(e,t)=>{let n=y(t)??y(e.width);return n===void 0?y(e.minWidth)??(e.resizable?48:0):C(n,e)},ie=(e,t,n)=>{let r=[];n.selects&&r.push(`var(--table-checkbox-cell-inline-size)`),n.expandable&&r.push(`var(--table-disclosure-cell-inline-size)`);let i=e.reduce((e,n)=>e+w(n,y(t[n.id])),0);return r.push(`${i}px`),`calc(${r.join(` + `)})`},ae=e=>({id:e.id,header:typeof e.header==`string`?e.header:e.id,width:y(e.width),minWidth:y(e.minWidth),maxWidth:y(e.maxWidth),resizable:e.resizable!==!1,lineClamp:y(e.lineClamp)}),oe=(e,t)=>{let n=e===`PageDown`||e===`PageUp`;switch(e){case`ArrowRight`:case`PageDown`:return{action:t?`increase`:`decrease`,amount:n?64:16};case`ArrowLeft`:case`PageUp`:return{action:t?`decrease`:`increase`,amount:n?64:16};case`Home`:return{action:`min`,amount:0};case`End`:return{action:`max`,amount:0};default:return}},se=(e,t,n)=>t.action===`min`?x(n):t.action===`max`?S(n):C(e+(t.action===`increase`?1:-1)*t.amount,n),T={selectAll:`Select All`,selectRow:`Select row {index}`,sortAscending:`Sorted by {column}, ascending`,sortDescending:`Sorted by {column}, descending`,expandRow:`Expand {label}`,collapseRow:`Collapse {label}`,resizeColumn:`Resize {column}`,columnWidth:`{column}, {width} pixels`},ce=e=>e.rowType===`information`||e._$rowType$===1,le=e=>e===`asc`?`ascending`:e===`desc`?`descending`:`none`,ue=e=>e===`asc`?`desc`:`asc`,E=(e={},t)=>{let n=Object.fromEntries(Object.entries(e).filter(([,e])=>typeof e==`string`&&e!==``)),r={...T,...n};return t&&(r.selectAll=t),r},D=(e,t)=>{let n=e;for(let[e,r]of Object.entries(t))n=n.replaceAll(`{${e}}`,r);return n},de=(e,t)=>e.map((e,n)=>({item:e,value:t?t(e,n):String(n),index:n,information:ce(e)})),fe=(e,t)=>typeof e==`function`?e(t):e,pe=class{constructor(){this.records=[],this.sorting=[],this.manualSorting=!1,this.rowSelection={},this.selectedOrder=[],this.columns=[],this.table=(0,p.createTable)({data:[],columns:[],state:{},onStateChange:()=>{},renderFallbackValue:null,getCoreRowModel:(0,p.getCoreRowModel)(),getSortedRowModel:(0,p.getSortedRowModel)(),getRowId:e=>e.value,enableRowSelection:e=>!!this.selects&&!e.original.information,enableMultiRowSelection:()=>this.selects===`multiple`,onRowSelectionChange:e=>{this.pendingSelection=fe(e,this.rowSelection)}}),this.compare=(e,t)=>typeof e==`number`&&typeof t==`number`?e-t:(this.collator&&this.collatorLocale===this.locale||(this.collatorLocale=this.locale,this.collator=new Intl.Collator(this.locale,{numeric:!0,sensitivity:`base`})),this.collator.compare(String(e),String(t)))}setRecords(e){this.records=e}setSelected(e){this.selectedOrder=[...e],this.rowSelection=Object.fromEntries(e.map(e=>[e,!0]))}setSorting(e,t=!1){this.manualSorting=t,e?(this.columns.some(t=>t.id===e.key)||(this.columns=[...this.columns,this.createSortColumn(e.key)]),this.sorting=[{id:e.key,desc:e.direction===`desc`}]):this.sorting=[]}get rows(){this.sync();let e=this.table.getRowModel().rows.map(e=>e.original).filter(e=>!e.information);return e.length===this.records.length?e:this.records.map(t=>t.information?t:e.shift())}isSelected(e){return!!this.rowSelection[e]}get allSelected(){let e=this.selectableRecords;return e.length>0&&e.every(e=>this.isSelected(e.value))}get someSelected(){return this.selectableRecords.some(e=>this.isSelected(e.value))}toggle(e){this.sync();let t=this.findRow(e);if(t?.getCanSelect())return this.capture(()=>t.toggleSelected())}toggleAll(e){return this.sync(),this.capture(()=>this.table.toggleAllRowsSelected(e))}get selectableRecords(){return this.selects?this.records.filter(e=>!e.information):[]}findRow(e){return this.table.getCoreRowModel().rows.find(t=>t.original.value===e)}capture(e){this.pendingSelection=void 0,e();let t=this.pendingSelection??this.rowSelection;this.pendingSelection=void 0;let n=this.selectedOrder.filter(e=>t[e]),r=[...new Set([...this.records.map(e=>e.value),...Object.keys(t)])].filter(e=>t[e]&&!n.includes(e));return[...n,...r]}createSortColumn(e){return{id:e,accessorFn:t=>t.item[e],sortUndefined:`last`,sortingFn:(e,t,n)=>this.compare(e.getValue(n),t.getValue(n))}}sync(){this.table.setOptions(e=>({...e,data:this.records,columns:this.columns,manualSorting:this.manualSorting,state:{...this.table.initialState,sorting:this.sorting,rowSelection:this.rowSelection}}))}},me=new Set([`luzmo-table-cell`,`luzmo-table-head-cell`,`luzmo-table-checkbox-cell`]),O=e=>e.find(e=>e instanceof HTMLElement&&e.classList.contains(`resize-handle`)),k=class{constructor(e,t){this.handlePointerDown=e=>{if(!this.options.owns(e)||e.button!==0)return;let t=e.composedPath(),n=O(t),r=this.cellFromPath(t);if(!n||r?.localName!==`luzmo-table-head-cell`||!r.resizable)return;let i=r;e.preventDefault();let a=this.options.headCells().indexOf(i),o=i.toLayout(Math.max(a,0));this.drag={id:o.id,pointerId:e.pointerId,startWidth:i.getBoundingClientRect().width,startX:e.clientX};try{n.setPointerCapture(e.pointerId)}catch{}},this.handlePointerMove=e=>{let t=this.drag;if(!t||e.pointerId!==t.pointerId)return;let n=this.options.layouts().find(e=>e.id===t.id);if(!n)return;let r=(e.clientX-t.startX)*(this.options.isLTR()?1:-1);this.setColumnWidth(n,t.startWidth+r,!1)},this.handlePointerUp=e=>{let t=this.drag;if(!t||e.pointerId!==t.pointerId)return;let n=this.options.layouts().find(e=>e.id===t.id);if(this.drag=void 0,!n)return;let r=(e.clientX-t.startX)*(this.options.isLTR()?1:-1);this.setColumnWidth(n,t.startWidth+r,!0)},this.host=e,this.options=t,e.addController(this)}hostConnected(){this.host.addEventListener(`pointerdown`,this.handlePointerDown),this.host.addEventListener(`pointermove`,this.handlePointerMove),this.host.addEventListener(`pointerup`,this.handlePointerUp),this.host.addEventListener(`pointercancel`,this.handlePointerUp)}hostDisconnected(){this.host.removeEventListener(`pointerdown`,this.handlePointerDown),this.host.removeEventListener(`pointermove`,this.handlePointerMove),this.host.removeEventListener(`pointerup`,this.handlePointerUp),this.host.removeEventListener(`pointercancel`,this.handlePointerUp),this.drag=void 0}handleKeydown(e){if(e.defaultPrevented||!this.options.owns(e))return;let t=e.composedPath();if(!O(t))return;let n=oe(e.code,this.options.isLTR()),r=this.cellFromPath(t);n&&r?.localName===`luzmo-table-head-cell`&&(e.preventDefault(),e.stopPropagation(),this.resizeColumn(r,n))}resizeColumn(e,t){let n=this.options.headCells().indexOf(e),r=e.toLayout(Math.max(n,0)),i=e.currentWidth||Math.round(e.getBoundingClientRect().width);this.setColumnWidth(r,se(i,t,r),!0)}setColumnWidth(e,t,n){let r=C(t,e),i={...this.host.columnWidths,[e.id]:r};this.host.columnWidths=i;let a=this.options.headCells().find((t,n)=>t.toLayout(n).id===e.id);if(a&&(a.currentWidth=r),!n)return;let o=E(this.options.labels(),this.options.selectAllLabel());this.host.dispatchEvent(new CustomEvent(`luzmo-column-resized`,{bubbles:!0,composed:!0,detail:{columnId:e.id,width:r,columnWidths:{...i}}})),this.options.announce(D(o.columnWidth,{column:e.header,width:this.formatWidth(r)}))}formatWidth(e){let t=this.options.language();return this.widthFormatter&&this.formatterLanguage===t||(this.formatterLanguage=t,this.widthFormatter=new Intl.NumberFormat(t)),this.widthFormatter.format(e)}cellFromPath(e){return e.find(e=>e instanceof HTMLElement&&me.has(e.localName))}},he=`textarea, select, [contenteditable=""], [contenteditable="true"], input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"])`,ge=class extends n.t{constructor(e,{rows:t,isLTR:n,...r}){super(e,r),this.handleFocusout=e=>{let t=e.relatedTarget;t instanceof HTMLElement&&(this.elements.includes(t)||this.elements.some(e=>e.contains(t)))||queueMicrotask(()=>{this.activeGridCell()||this.hostNoLongerContainsFocus()})},this.handleKeydown=e=>{if(e.defaultPrevented||!this.acceptsEventCode(e.code)||!this.owns(e))return;let t=e.composedPath()[0];if(t instanceof HTMLElement&&t.matches(he))return;let n=this.cellFromPath(e.composedPath());if(!n)return;let r=this.navigationTarget(n,e);r&&(e.preventDefault(),this.focusElement(r))},this.rows=t,this.isLTR=n}acceptsEventCode(e){return e===`ArrowLeft`||e===`ArrowRight`||e===`ArrowUp`||e===`ArrowDown`||e===`Home`||e===`End`}focusElement(e,t){let n=this.elements.indexOf(e);if(n===-1)return;let r=this.elements[this.currentIndex];r&&r!==e&&(r.tabIndex=-1),this.currentIndex=n,this.focus(t)}owns(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&t.localName===`luzmo-table`)return t===this.host;return!0}cellFromPath(e){let t=new Set(this.rows().flat());return e.find(e=>e instanceof HTMLElement&&t.has(e))}activeGridCell(){let e=this.host.ownerDocument.activeElement;for(;e instanceof HTMLElement&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e instanceof HTMLElement&&this.rows().flat().includes(e)?e:void 0}navigationTarget(e,t){let n=this.rows(),r=n.findIndex(t=>t.includes(e));if(r===-1)return;let i=n[r].indexOf(e),a=n.length-1,o=(e,t)=>{let r=n[Math.min(Math.max(e,0),a)];return r[Math.min(Math.max(t,0),r.length-1)]},s=t=>{let i=n[Math.min(Math.max(t,0),a)];return this.cellForKey(i,this.columnKey(n[r],e))},c=this.isLTR()?1:-1,l=t.ctrlKey||t.metaKey;switch(t.code){case`ArrowRight`:return o(r,i+c);case`ArrowLeft`:return o(r,i-c);case`ArrowDown`:return s(r+1);case`ArrowUp`:return s(r-1);case`Home`:return o(l?0:r,0);case`End`:return l?o(a,n[a].length-1):o(r,n[r].length-1);default:return}}columnKey(e,t){if(t.classList.contains(`resize-handle`)){let n=e[e.indexOf(t)-1];return n?this.columnKey(e,n):`data:0`}if(t.localName===`luzmo-table-checkbox-cell`)return`select`;if(t.localName===`luzmo-table-disclosure-cell`)return`expand`;if(t.classList.contains(`cell`))return`details`;let n=e.filter(e=>e.localName===`luzmo-table-cell`||e.localName===`luzmo-table-head-cell`);return`data:${Math.max(n.indexOf(t),0)}`}cellForKey(e,t){return t===`expand`?e.find(e=>e.localName===`luzmo-table-disclosure-cell`)??this.cellForKey(e,`data:0`):t===`details`?this.cellForKey(e,`data:0`):e.find(n=>!n.classList.contains(`resize-handle`)&&this.columnKey(e,n)===t)??e[0]}},A=Symbol(`table-details-closing`),j=e=>{let t=e.nextElementSibling;return t?.localName===`luzmo-table-row-details`?t:null},M=e=>e instanceof HTMLElement,_e=class{constructor(e,t){this.closingDetails=new Set,this.handleDetailsCollapsed=e=>{if(!this.options.owns(e))return;let t=e.target,n=[...this.closingDetails].find(e=>b(e)===t?.id);if(!n)return;let r=new Set(this.closingDetails);r.delete(n),this.closingDetails=r,this.host.requestUpdate(A)},this.host=e,this.options=t,e.addController(this)}get closing(){return this.closingDetails}hostConnected(){this.host.addEventListener(`luzmo-table-details-collapsed`,this.handleDetailsCollapsed)}hostDisconnected(){this.host.removeEventListener(`luzmo-table-details-collapsed`,this.handleDetailsCollapsed)}clear(){this.closingDetails=new Set,this.host.requestUpdate(A)}toggle(e){if(!e.expandable&&!j(e))return;let t=this.isDataMode(),n=t?e.value:e.value||String(this.declarativeRows().indexOf(e)),r=t?!this.host.expanded.includes(n):!e.expanded;if(t){let e=this.host.expanded;this.setClosing(n,!r),this.host.expanded=r?[...e,n]:e.filter(e=>e!==n),this.dispatchToggle(n,r)||(this.host.expanded=e,this.setClosing(n,!1));return}if(e.expanded=r,!this.dispatchToggle(n,r)){e.expanded=!r;return}let i=j(e);i&&(i.open=r),e.disclosureLabel=this.expandLabel(n,e.checkboxLabel||e.querySelector(`:scope > luzmo-table-cell`)?.textContent?.trim()||n,this.declarativeRows().indexOf(e))}collapseFromPath(e){let t=e.find(e=>M(e)&&e.localName===`luzmo-table-row-details`),n=(t?.previousElementSibling?.localName===`luzmo-table-row`?t.previousElementSibling:void 0)??e.find(e=>M(e)&&e.localName===`luzmo-table-row`);if(!n?.expanded)return;this.toggle(n);let r=n.shadowRoot?.querySelector(`luzmo-table-disclosure-cell`);r&&this.options.focusDisclosure(r)}setClosing(e,t){let n=new Set([...this.closingDetails].filter(t=>t!==e));t&&n.add(e),this.closingDetails=n,this.host.requestUpdate(A)}dispatchToggle(e,t){return this.host.dispatchEvent(new CustomEvent(`luzmo-table-row-toggle`,{bubbles:!0,composed:!0,cancelable:!0,detail:{value:e,expanded:t}}))}expandLabel(e,t,n){let r=E(this.host.labels,this.host.selectAllLabel);return D(this.host.expanded.includes(e)||this.rowByValue(e)?.expanded?r.collapseRow:r.expandRow,{label:t,index:String(n+1)})}rowByValue(e){return this.rows().find(t=>t.value===e)}isDataMode(){return Array.isArray(this.host.items)}declarativeRows(){return[...this.host.querySelectorAll(`:scope > luzmo-table-body > luzmo-table-row`)]}rows(){return this.isDataMode()?[...this.host.shadowRoot?.querySelectorAll(`luzmo-table-row`)??[]]:this.declarativeRows()}},N=e=>e instanceof HTMLElement,P=class{constructor(e,t){this.handleBodyScroll=e=>{this.options.owns(e)&&e.composedPath().find(e=>N(e)&&e.localName===`luzmo-table-body`)&&this.host.requestUpdate()},this.host=e,this.options=t,e.addController(this)}hostConnected(){this.host.addEventListener(`luzmo-table-body-scroll`,this.handleBodyScroll)}hostDisconnected(){this.host.removeEventListener(`luzmo-table-body-scroll`,this.handleBodyScroll),this.bodyObserver?.disconnect(),this.observedBody=void 0}hostUpdated(){this.syncHeadScroll(),this.watchBodyScrollbar()}hasExpansion(){return this.isDataMode()?typeof this.host.renderDetails==`function`:this.declarativeRows().some(e=>e.nextElementSibling?.localName===`luzmo-table-row-details`)}layouts(){return this.isDataMode()&&!this.slottedHead()?this.host.columns.map(ae):this.headCells().map((e,t)=>e.toLayout(t))}headCells(){return[...this.head()?.querySelectorAll(`:scope > luzmo-table-head-cell`)??[]]}applyGridMetrics(){let e={selects:!!this.host.selects,expandable:this.hasExpansion()},t=this.layouts();this.host.style.setProperty(`--table-grid-columns`,re(t,this.host.columnWidths,e)||`none`),this.host.style.setProperty(`--table-min-inline-size`,ie(t,this.host.columnWidths,e))}syncPresentation(){this.syncHead(),this.syncColumns(),this.isDataMode()||this.syncDeclarativeRows()}syncHeadTabStops(){let e=this.head();if(!e)return;let t=e.shadowRoot?.querySelector(`luzmo-table-checkbox-cell`);t&&t.getAttribute(`aria-hidden`)!==`true`&&t.tabIndex!==0&&(t.tabIndex=0);for(let e of this.headCells())e.tabIndex!==0&&(e.tabIndex=0)}syncHead(){let e=this.body();e&&this.syncGridColumns(e);let t=this.head();if(!t)return;this.syncGridColumns(t),this.syncHeadScroll(e,t);let n=E(this.host.labels,this.host.selectAllLabel),r=this.options.model.allSelected,i=this.options.model.someSelected,a=this.host.selects===`multiple`;t.selects=this.host.selects,t.checked=a&&r,t.indeterminate=a&&i&&!r,t.selected=i,t.emphasized=this.host.emphasized,t.checkboxLabel=n.selectAll,t.checkboxSize=this.host.size,t.expandable=this.hasExpansion()}watchBodyScrollbar(){let e=this.body();e&&e!==this.observedBody&&(this.bodyObserver?.disconnect(),this.observedBody=e,this.bodyObserver??=new ResizeObserver(()=>{this.syncHeadScroll()}),this.bodyObserver.observe(e,{box:`content-box`}))}syncHeadScroll(e=this.body(),t=this.head()){if(!e||!t)return;let n=Math.max(0,e.offsetWidth-e.clientWidth),r=e.scrollWidth>e.clientWidth+1;t.style.paddingInlineEnd=n>0&&!r?`${n}px`:``,t.style.transform=`translateX(${-e.scrollLeft}px)`}syncColumns(){let e=this.layouts(),t=E(this.host.labels,this.host.selectAllLabel);this.headCells().forEach((n,r)=>{let i=e[r];if(!i)return;let a=n.textContent?.trim()||i.header;if(n.resizeLabel=D(t.resizeColumn,{column:a}),!n.resizable)return;let o=y(this.host.columnWidths[i.id])??i.width,s=Math.round(n.getBoundingClientRect().width),c=o??s;c>0&&n.currentWidth!==c&&(n.currentWidth=c)});for(let t of this.rows()){this.syncGridColumns(t);let n=j(t);n&&this.syncGridColumns(n),!t.spanAll&&[...t.children].filter(e=>N(e)&&e.localName===`luzmo-table-cell`).forEach((t,n)=>{let r=e[n]?.lineClamp;t.columnLineClamp!==r&&(t.columnLineClamp=r)})}}syncDeclarativeRows(){let e=this.host.selects,t=E(this.host.labels,this.host.selectAllLabel),n=this.hasExpansion(),r=this.declarativeRows();r.forEach((i,a)=>{this.syncGridColumns(i);let o=i.value||String(a),s=j(i),c=a===r.length-1;i.toggleAttribute(`data-last-row`,c),s&&(this.syncGridColumns(s),s.toggleAttribute(`data-last-row`,c));let l=i.querySelector(`:scope > luzmo-table-cell`)?.textContent?.trim()||o;i.selectable=!!e,i.selectionColumn=!!e,i.selected=!!e&&this.options.model.isSelected(o),i.selectsSingle=e===`single`,i.emphasized=this.host.emphasized,i.checkboxSize=this.host.size,i.checkboxLabel=l,i.expandable=!!s,i.expansionColumn=n&&!s,i.detailsId=s?.id??``,i.disclosureLabel=D(i.expanded?t.collapseRow:t.expandRow,{label:l,index:String(a+1)}),s&&(s.id||(s.id=b(o),i.detailsId=s.id),s.open=i.expanded)})}syncGridColumns(e){for(let t of[`--table-grid-columns`,`--table-min-inline-size`])e.style.setProperty(t,this.host.style.getPropertyValue(t))}isDataMode(){return Array.isArray(this.host.items)}slottedHead(){return this.host.querySelector(`:scope > luzmo-table-head`)}head(){return this.slottedHead()??(this.isDataMode()?this.host.shadowRoot?.querySelector(`luzmo-table-head`)??null:null)}body(){return this.isDataMode()?this.host.shadowRoot?.querySelector(`luzmo-table-body`)??null:this.host.querySelector(`:scope > luzmo-table-body`)}declarativeRows(){return[...this.host.querySelectorAll(`:scope > luzmo-table-body > luzmo-table-row`)]}rows(){return this.isDataMode()?[...this.host.shadowRoot?.querySelectorAll(`luzmo-table-row`)??[]]:this.declarativeRows()}},F=Symbol(`table-virtual-range-updated`),I=40,ve=4,L=e=>e.getBoundingClientRect().height,ye=class{constructor(e,t){this.connected=!1,this.keys=[],this.estimatedSize=I,this.host=e,this.options=t,e.addController(this)}get enabled(){return!!this.virtualizer}set enabled(e){e!==this.enabled&&(e?(this.virtualizer=new m.Virtualizer(this.createOptions()),this.connected&&(this.cleanup=this.virtualizer._didMount())):(this.cleanup?.(),this.cleanup=void 0,this.virtualizer=void 0,this.range=void 0))}sync(e){return this.virtualizer?(e!==this.keys&&(this.keys=e,this.virtualizer.setOptions(this.createOptions())),this.virtualizer.getVirtualItems()):[]}get totalSize(){return this.virtualizer?.getTotalSize()??0}scrollToIndex(e){this.virtualizer?.scrollToIndex(e,{align:`start`})}hostConnected(){this.connected=!0,this.virtualizer&&!this.cleanup&&(this.cleanup=this.virtualizer._didMount())}hostUpdated(){if(!this.virtualizer)return;this.virtualizer._willUpdate();let e=this.options.getRowElements();this.syncEstimate(e);for(let t of e)this.virtualizer.measureElement(t)}hostDisconnected(){this.connected=!1,this.cleanup?.(),this.cleanup=void 0}syncEstimate(e){let t=e.filter(e=>this.options.isRendered(e)).map(e=>L(e)).filter(Boolean).sort((e,t)=>e-t);if(t.length===0)return;let n=t[Math.floor(t.length/2)];Math.abs(n-this.estimatedSize)>=.5&&(this.estimatedSize=n,this.virtualizer?.measure())}createOptions(){return{count:this.keys.length,getScrollElement:this.options.getScrollElement,estimateSize:()=>this.estimatedSize,getItemKey:e=>this.keys[e]??e,overscan:ve,useAnimationFrameWithResizeObserver:!0,scrollToFn:m.elementScroll,observeElementRect:m.observeElementRect,observeElementOffset:m.observeElementOffset,measureElement:e=>this.options.isRendered(e)&&L(e)||this.estimatedSize,onChange:e=>{let t=this.reportRange(e);queueMicrotask(()=>{t?this.host.requestUpdate(F,!1):this.host.requestUpdate()})}}}reportRange(e){let t=e.range;if(!t||t.endIndex<t.startIndex)return!1;let n=t.startIndex,r=t.endIndex;return this.range?.first===n&&this.range.last===r?!1:(this.range={first:n,last:r},this.options.onRangeChanged({first:n,last:r}),!0)}},be=`:host{grid-template-columns:var(--table-grid-columns);min-inline-size:var(--table-min-inline-size,0);box-sizing:border-box;display:grid;overflow:hidden;border-block-start:none!important;border-inline:none!important;border-block-end-width:var(--table-row-divider-width)!important;border-block-end-style:solid!important;border-block-end-color:var(--highcontrast-table-row-divider-color,var(--luzmo-table-border-color,var(--table-row-divider-color)))!important}:host([data-last-row]){border-block-end-width:0!important}:host([hidden]){display:none!important}.cell{outline:none;grid-column:1/-1;grid-template-rows:1fr;min-inline-size:0;display:grid;overflow:hidden}:host([data-last-row]) .cell{--table-focus-end-start-radius:var(--table-corner-radius);--table-focus-end-end-radius:var(--table-corner-radius)}.cell:focus-visible{outline:var(--luzmo-indicator-width,2px) solid var(--highcontrast-table-details-focus-indicator-color,var(--luzmo-indicator-color,currentColor));outline-offset:calc(var(--luzmo-indicator-width,2px) * -1);border-start-start-radius:var(--table-focus-start-start-radius,0);border-start-end-radius:var(--table-focus-start-end-radius,0);border-end-end-radius:var(--table-focus-end-end-radius,0);border-end-start-radius:var(--table-focus-end-start-radius,0)}.content{padding-block:var(--table-details-padding-block);padding-inline:var(--table-details-padding-inline);overflow:hidden}:host([opening]) .content,:host([closing]) .content{min-block-size:0}:host([opening]) .cell{animation:table-details-open var(--luzmo-animation-duration) ease-out}:host([closing]) .cell{animation:table-details-close var(--luzmo-animation-duration) ease-in}@keyframes table-details-open{0%{opacity:0;grid-template-rows:0fr}}@keyframes table-details-close{to{opacity:0;grid-template-rows:0fr}}@media (prefers-reduced-motion:reduce){:host([opening]) .cell,:host([closing]) .cell{animation:none}}:host{--table-row-divider-color:var(--luzmo-border-color);--table-row-divider-width:var(--luzmo-border-width);--table-details-padding-block:var(--luzmo-spacing-4);--table-details-padding-inline:var(--luzmo-table-cell-padding-inline,var(--table-cell-padding-inline))}@media (forced-colors:active){:host{--highcontrast-table-row-divider-color:CanvasText;--highcontrast-table-details-focus-indicator-color:Highlight}}`;function R(e,t){return[...Array.isArray(e)?e:e?[e]:[],(0,o.unsafeCSS)(t)]}var z=class extends e.n{constructor(...e){super(...e),this.role=`row`,this.open=!1,this._phase=`closed`,this.reducedMotion=new i.r(this,`(prefers-reduced-motion: reduce)`),this.handleAnimationEnd=e=>{e.target===this.renderRoot.querySelector(`.cell`)&&(this._phase===`closing`?this._finishClosing():this._phase===`opening`&&(this._phase=`open`),this.requestUpdate())},this._finishClosing=()=>{this._phase===`closing`&&(window.clearTimeout(this._closeFallback),this._phase=`closed`,this.hidden=!0,this.dispatchEvent(new Event(`luzmo-table-details-collapsed`,{bubbles:!0,composed:!0})),this.requestUpdate())}}static get styles(){return R(super.styles,be)}disconnectedCallback(){window.clearTimeout(this._closeFallback),super.disconnectedCallback()}willUpdate(e){super.willUpdate(e),(e.has(`open`)||!this.hasUpdated)&&(this.open?(this.hidden=!1,this._phase=this.hasUpdated&&!this.reducedMotion.matches?`opening`:`open`):!this.hasUpdated||this.reducedMotion.matches||this._phase===`closed`?(this._phase=`closed`,this.hidden=!0):this._phase=`closing`)}render(){return o.html`
19
19
  <div
20
20
  class="cell"
21
21
  role="gridcell"
@@ -21,7 +21,7 @@ import { n } from "./sized-mixin-BmxIAuoH.js";
21
21
  import { t as r } from "./roving-tabindex-BKMkfzY0.js";
22
22
  import { r as i, t as a } from "./language-resolution-7rc0khIK.js";
23
23
  import { r as o } from "./match-media-UNh23w4s.js";
24
- import "./checkbox-CvRvgRzh.js";
24
+ import "./checkbox-fW7WI915.js";
25
25
  import { n as s } from "./template-property-Bks4Db5C.js";
26
26
  import { html as c, nothing as l, unsafeCSS as u } from "lit";
27
27
  import { property as d, query as f, state as p } from "lit/decorators.js";
@@ -15,4 +15,4 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../text-field-BVl-HWzb.cjs"),t=require("../text-field-DCcOZSvY.cjs");exports.LuzmoHelpText=t.t,exports.LuzmoTextField=e.t;
18
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../text-field-DwvDSctG.cjs"),t=require("../text-field-CZixBD87.cjs");exports.LuzmoHelpText=t.t,exports.LuzmoTextField=e.t;
@@ -16,6 +16,6 @@
16
16
  * SOFTWARE.
17
17
  * */
18
18
  import "../tokens.js";
19
- import { t as e } from "../text-field-DpvP_tCP.js";
20
- import { t } from "../text-field-D49lAD7L.js";
19
+ import { t as e } from "../text-field-CBsx1CVo.js";
20
+ import { t } from "../text-field-SNbvQYOj.js";
21
21
  export { t as LuzmoHelpText, e as LuzmoTextField };
@@ -22,7 +22,7 @@ import { t as r } from "./manage-help-text-CFUaqINN.js";
22
22
  import { t as i } from "./text-field.module-hEHhPVFf.js";
23
23
  import { html as a, nothing as o, unsafeCSS as s } from "lit";
24
24
  import { property as c, query as l, state as u } from "lit/decorators.js";
25
- import { luzmoAlert as d, luzmoCheck as f, luzmoIcon as p } from "@luzmo/icons";
25
+ import { luzmoAlert as d, luzmoCheckHeavy as f, luzmoIcon as p } from "@luzmo/icons";
26
26
  import { ifDefined as m } from "lit/directives/if-defined.js";
27
27
  import { live as h } from "lit/directives/live.js";
28
28
  // src/components/text-field/text-field.ts
@@ -15,7 +15,7 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-CSajkMro.cjs"),n=require("./text-field-BVl-HWzb.cjs");let r=require("lit"),i=require("lit/decorators.js"),a=require("@luzmo/icons");var o=`@media (forced-colors:active){:host{--highcontrast-helptext-content-color-default:CanvasText;--highcontrast-helptext-icon-color-default:CanvasText}:host,.text,.icon{forced-color-adjust:none}}:host{--helptext-bottom-to-workflow-icon:3px;color:var(--highcontrast-helptext-content-color-default,var(--luzmo-helptext-content-color-default,var(--helptext-content-color-default)));font-family:var(--luzmo-helptext-font-family,var(--luzmo-font-family));font-weight:var(--luzmo-helptext-font-weight,var(--luzmo-font-weight));font-size:var(--luzmo-helptext-font-size,var(--helptext-font-size,var(--luzmo-font-size-s)));min-block-size:var(--luzmo-helptext-min-height,var(--helptext-min-height,24px));display:flex}.icon{block-size:var(--luzmo-helptext-icon-size,var(--helptext-icon-size,18px));inline-size:var(--luzmo-helptext-icon-size,var(--helptext-icon-size,18px));flex-shrink:0;margin-inline-end:var(--luzmo-helptext-text-to-visual,var(--helptext-text-to-visual,7px));padding-block-start:var(--luzmo-helptext-top-to-workflow-icon,var(--helptext-top-to-workflow-icon,3px));padding-block-end:var(--luzmo-helptext-bottom-to-workflow-icon,var(--helptext-bottom-to-workflow-icon,3px))}.text{line-height:var(--luzmo-helptext-line-height,var(--helptext-line-height,1.3));padding-block-start:var(--luzmo-helptext-top-to-text,var(--helptext-top-to-text,4px));padding-block-end:var(--luzmo-helptext-bottom-to-text,var(--helptext-bottom-to-text,5px))}:host(:lang(ja)) .text,:host(:lang(ko)) .text,:host(:lang(zh)) .text{line-height:var(--luzmo-helptext-line-height-cjk,var(--helptext-line-height-cjk,1.4))}:host([variant=neutral]) .text{color:var(--highcontrast-helptext-content-color-default,var(--luzmo-helptext-content-color-default,var(--helptext-content-color-default)))}:host([variant=neutral]) .icon{color:var(--highcontrast-helptext-icon-color-default,var(--luzmo-helptext-icon-color-default,var(--helptext-icon-color-default)))}:host([variant=negative]) .text{color:var(--highcontrast-helptext-content-color-default,var(--luzmo-helptext-content-color-default,var(--luzmo-negative-color-down)))}:host([variant=negative]) .icon{color:var(--highcontrast-helptext-icon-color-default,var(--luzmo-helptext-icon-color-default,var(--helptext-icon-color-default)))}:host([disabled]) .text{color:var(--highcontrast-helptext-content-color-default,var(--luzmo-helptext-content-color-default,var(--luzmo-font-color)))}:host([disabled]) .icon{color:var(--highcontrast-helptext-icon-color-default,var(--luzmo-helptext-icon-color-default,var(--helptext-icon-color-default)))}:host{--helptext-line-height:1.3;--helptext-content-color-default:var(--luzmo-font-color);--helptext-icon-color-default:var(--luzmo-font-color);--helptext-disabled-content-color:var(--luzmo-font-color-disabled)}:host([variant=neutral]){--helptext-content-color-default:var(--luzmo-font-color);--helptext-icon-color-default:var(--luzmo-font-color)}:host([variant=negative]){--helptext-content-color-default:var(--luzmo-negative-color);--helptext-icon-color-default:var(--luzmo-negative-color)}:host([disabled]){--helptext-content-color-default:var(--luzmo-font-color-disabled);--helptext-icon-color-default:var(--luzmo-font-color-disabled)}:host(:lang(ja)),:host(:lang(zh)),:host(:lang(ko)){--helptext-line-height-cjk:1.4}:host([size=s]){--helptext-min-height:24px;--helptext-icon-size:16px;--helptext-font-size:12px;--helptext-text-to-visual:7px;--helptext-top-to-workflow-icon:4px;--helptext-top-to-text:4px;--helptext-bottom-to-text:5px}:host{--helptext-min-height:24px;--helptext-icon-size:18px;--helptext-font-size:12px;--helptext-text-to-visual:7px;--helptext-top-to-workflow-icon:3px;--helptext-top-to-text:4px;--helptext-bottom-to-text:5px}:host([size=l]){--helptext-min-height:32px;--helptext-icon-size:20px;--helptext-font-size:14px;--helptext-text-to-visual:8px;--helptext-top-to-workflow-icon:6px;--helptext-top-to-text:6px;--helptext-bottom-to-text:5px}:host([size=xl]){--helptext-min-height:40px;--helptext-icon-size:22px;--helptext-font-size:16px;--helptext-text-to-visual:9px;--helptext-top-to-workflow-icon:9px;--helptext-top-to-text:9px;--helptext-bottom-to-text:12px}`,s=class extends t.n(e.n,{noDefaultSize:!0}){constructor(...e){super(...e),this.icon=!1,this.variant=`neutral`}static get styles(){return[(0,r.unsafeCSS)(o)]}render(){return r.html`
18
+ require("./tokens.cjs");const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-CSajkMro.cjs"),n=require("./text-field-DwvDSctG.cjs");let r=require("lit"),i=require("lit/decorators.js"),a=require("@luzmo/icons");var o=`@media (forced-colors:active){:host{--highcontrast-helptext-content-color-default:CanvasText;--highcontrast-helptext-icon-color-default:CanvasText}:host,.text,.icon{forced-color-adjust:none}}:host{--helptext-bottom-to-workflow-icon:3px;color:var(--highcontrast-helptext-content-color-default,var(--luzmo-helptext-content-color-default,var(--helptext-content-color-default)));font-family:var(--luzmo-helptext-font-family,var(--luzmo-font-family));font-weight:var(--luzmo-helptext-font-weight,var(--luzmo-font-weight));font-size:var(--luzmo-helptext-font-size,var(--helptext-font-size,var(--luzmo-font-size-s)));min-block-size:var(--luzmo-helptext-min-height,var(--helptext-min-height,24px));display:flex}.icon{block-size:var(--luzmo-helptext-icon-size,var(--helptext-icon-size,18px));inline-size:var(--luzmo-helptext-icon-size,var(--helptext-icon-size,18px));flex-shrink:0;margin-inline-end:var(--luzmo-helptext-text-to-visual,var(--helptext-text-to-visual,7px));padding-block-start:var(--luzmo-helptext-top-to-workflow-icon,var(--helptext-top-to-workflow-icon,3px));padding-block-end:var(--luzmo-helptext-bottom-to-workflow-icon,var(--helptext-bottom-to-workflow-icon,3px))}.text{line-height:var(--luzmo-helptext-line-height,var(--helptext-line-height,1.3));padding-block-start:var(--luzmo-helptext-top-to-text,var(--helptext-top-to-text,4px));padding-block-end:var(--luzmo-helptext-bottom-to-text,var(--helptext-bottom-to-text,5px))}:host(:lang(ja)) .text,:host(:lang(ko)) .text,:host(:lang(zh)) .text{line-height:var(--luzmo-helptext-line-height-cjk,var(--helptext-line-height-cjk,1.4))}:host([variant=neutral]) .text{color:var(--highcontrast-helptext-content-color-default,var(--luzmo-helptext-content-color-default,var(--helptext-content-color-default)))}:host([variant=neutral]) .icon{color:var(--highcontrast-helptext-icon-color-default,var(--luzmo-helptext-icon-color-default,var(--helptext-icon-color-default)))}:host([variant=negative]) .text{color:var(--highcontrast-helptext-content-color-default,var(--luzmo-helptext-content-color-default,var(--luzmo-negative-color-down)))}:host([variant=negative]) .icon{color:var(--highcontrast-helptext-icon-color-default,var(--luzmo-helptext-icon-color-default,var(--helptext-icon-color-default)))}:host([disabled]) .text{color:var(--highcontrast-helptext-content-color-default,var(--luzmo-helptext-content-color-default,var(--luzmo-font-color)))}:host([disabled]) .icon{color:var(--highcontrast-helptext-icon-color-default,var(--luzmo-helptext-icon-color-default,var(--helptext-icon-color-default)))}:host{--helptext-line-height:1.3;--helptext-content-color-default:var(--luzmo-font-color);--helptext-icon-color-default:var(--luzmo-font-color);--helptext-disabled-content-color:var(--luzmo-font-color-disabled)}:host([variant=neutral]){--helptext-content-color-default:var(--luzmo-font-color);--helptext-icon-color-default:var(--luzmo-font-color)}:host([variant=negative]){--helptext-content-color-default:var(--luzmo-negative-color);--helptext-icon-color-default:var(--luzmo-negative-color)}:host([disabled]){--helptext-content-color-default:var(--luzmo-font-color-disabled);--helptext-icon-color-default:var(--luzmo-font-color-disabled)}:host(:lang(ja)),:host(:lang(zh)),:host(:lang(ko)){--helptext-line-height-cjk:1.4}:host([size=s]){--helptext-min-height:24px;--helptext-icon-size:16px;--helptext-font-size:12px;--helptext-text-to-visual:7px;--helptext-top-to-workflow-icon:4px;--helptext-top-to-text:4px;--helptext-bottom-to-text:5px}:host{--helptext-min-height:24px;--helptext-icon-size:18px;--helptext-font-size:12px;--helptext-text-to-visual:7px;--helptext-top-to-workflow-icon:3px;--helptext-top-to-text:4px;--helptext-bottom-to-text:5px}:host([size=l]){--helptext-min-height:32px;--helptext-icon-size:20px;--helptext-font-size:14px;--helptext-text-to-visual:8px;--helptext-top-to-workflow-icon:6px;--helptext-top-to-text:6px;--helptext-bottom-to-text:5px}:host([size=xl]){--helptext-min-height:40px;--helptext-icon-size:22px;--helptext-font-size:16px;--helptext-text-to-visual:9px;--helptext-top-to-workflow-icon:9px;--helptext-top-to-text:9px;--helptext-bottom-to-text:12px}`,s=class extends t.n(e.n,{noDefaultSize:!0}){constructor(...e){super(...e),this.icon=!1,this.variant=`neutral`}static get styles(){return[(0,r.unsafeCSS)(o)]}render(){return r.html`
19
19
  ${this.variant===`negative`&&this.icon?r.html` ${(0,a.luzmoIcon)(a.luzmoClose14)} `:r.nothing}
20
20
  <div class="text"><slot></slot></div>
21
21
  `}};e.t([(0,i.property)({type:Boolean,reflect:!0})],s.prototype,`icon`,void 0),e.t([(0,i.property)({reflect:!0})],s.prototype,`variant`,void 0),customElements.get(`luzmo-text-field`)||customElements.define(`luzmo-text-field`,n.t),customElements.get(`luzmo-help-text`)||customElements.define(`luzmo-help-text`,s),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
@@ -18,7 +18,7 @@
18
18
  const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-CSajkMro.cjs"),n=require("./focusable-BIHTrJd6.cjs"),r=require("./manage-help-text-DtFJsl0k.cjs"),i=require("./text-field.module-l8CaTCwE.cjs");let a=require("lit"),o=require("lit/decorators.js"),s=require("@luzmo/icons"),c=require("lit/directives/if-defined.js"),l=require("lit/directives/live.js");var u=[`text`,`url`,`tel`,`email`,`password`],d=class extends r.t(t.n(n.t,{noDefaultSize:!0})){constructor(...e){super(...e),this.allowedKeys=``,this.focused=!1,this.invalid=!1,this.label=``,this.placeholder=``,this._type=`text`,this.grows=!1,this.maxlength=-1,this.minlength=-1,this.multiline=!1,this.readonly=!1,this.rows=-1,this.maxRows=-1,this.valid=!1,this.hideValidationIcons=!1,this._value=``,this.quiet=!1,this.required=!1}static get styles(){return[(0,a.unsafeCSS)(i.t)]}applyFocusElementLabel(e){this.appliedLabel=e}set type(e){let t=this._type;this._type=e,this.requestUpdate(`type`,t)}get type(){return u.find(e=>e===this._type)??`text`}set value(e){if(e===this.value)return;let t=this._value;this._value=e,this.requestUpdate(`value`,t)}get value(){return this._value}get focusElement(){return this.inputElement}setSelectionRange(e,t,n=`none`){this.inputElement.setSelectionRange(e,t,n)}select(){this.inputElement.select()}handleInput(e){if(this.allowedKeys&&this.inputElement.value&&!RegExp(`^[${this.allowedKeys}]*$`,`u`).test(this.inputElement.value)){let e=this.inputElement.selectionStart-1;this.inputElement.value=this.value.toString(),this.inputElement.setSelectionRange(e,e)}else this.value=this.inputElement.value}handleChange(){this.dispatchEvent(new Event(`change`,{bubbles:!0,composed:!0}))}onFocus(){this.focused=!this.readonly&&!0}onBlur(e){this.focused=!this.readonly&&!1}handleInputElementPointerdown(){}renderStateIcons(){return this.hideValidationIcons?a.nothing:this.invalid?a.html`
19
19
  <div id="invalid" class="icon">${(0,s.luzmoIcon)(s.luzmoAlert)}</div>
20
20
  `:this.valid?a.html`
21
- <div id="valid" class="icon">${(0,s.luzmoIcon)(s.luzmoCheck)}</div>
21
+ <div id="valid" class="icon">${(0,s.luzmoIcon)(s.luzmoCheckHeavy)}</div>
22
22
  `:a.nothing}get displayValue(){return this.value.toString()}calculateMaxHeight(){if(this.maxRows<1||!this.multiline||!this.grows||!this.inputElement)return;let e=window.getComputedStyle(this.inputElement),t=Number.parseFloat(e.lineHeight),n=Number.parseFloat(e.paddingTop),r=Number.parseFloat(e.paddingBottom),i=Number.parseFloat(e.borderTopWidth),a=Number.parseFloat(e.borderBottomWidth),o=Number.parseFloat(e.fontSize),s=Number.isNaN(t)||t===0?o*1.2:t;return this.maxRows*s+n+r+i+a}get renderMultiline(){let e=``;return this.calculatedMaxHeight!==void 0&&(e=`max-height: ${this.calculatedMaxHeight}px;`),a.html`
23
23
  ${this.multiline&&this.grows?a.html`
24
24
  <div id="sizer" class="input" aria-hidden="true" style=${e}>${this.value}&#8203;
@@ -18,7 +18,7 @@
18
18
  import "./tokens.js";
19
19
  import { n as e, t } from "./decorate-CpKsOs9z.js";
20
20
  import { n } from "./sized-mixin-BmxIAuoH.js";
21
- import { t as r } from "./text-field-DpvP_tCP.js";
21
+ import { t as r } from "./text-field-CBsx1CVo.js";
22
22
  import { html as i, nothing as a, unsafeCSS as o } from "lit";
23
23
  import { property as s } from "lit/decorators.js";
24
24
  import { luzmoClose14 as c, luzmoIcon as l } from "@luzmo/icons";
@@ -15,4 +15,4 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-CSajkMro.cjs"),n=require("./focus-visible-BQAhwoxi.cjs"),r=require("./focusable-BIHTrJd6.cjs"),i=require("./platform-BAjeJp2W.cjs"),a=require("./streaming-listener-Bfyk6Fsx.cjs"),o=require("./voice-recorder-B1tBrGTV.cjs"),s=require("./template-property-yhcAmPXk.cjs");exports.ElementSizes=t.t,exports.FocusVisiblePolyfillMixin=n.t,exports.Focusable=r.t,exports.LuzmoElement=e.n,exports.LuzmoMixin=e.r,exports.SizedMixin=t.n,exports.VoiceRecorder=o.t,exports.createTemplateRenderer=s.t,exports.isAndroid=i.t,exports.isAppleDevice=i.n,exports.isChrome=i.r,exports.isFirefox=i.i,exports.isIOS=i.a,exports.isIPad=i.o,exports.isIPhone=i.s,exports.isMac=i.c,exports.isSeamonkey=i.l,exports.isWebKit=i.u,exports.streamingListener=a.t,exports.templateProperty=s.n;
18
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./decorate-SO02l0A6.cjs"),t=require("./sized-mixin-CSajkMro.cjs"),n=require("./focus-visible-BQAhwoxi.cjs"),r=require("./focusable-BIHTrJd6.cjs"),i=require("./platform-BAjeJp2W.cjs"),a=require("./streaming-listener-BzGZUHkj.cjs"),o=require("./voice-recorder-B1tBrGTV.cjs"),s=require("./template-property-yhcAmPXk.cjs");exports.ElementSizes=t.t,exports.FocusVisiblePolyfillMixin=n.t,exports.Focusable=r.t,exports.LuzmoElement=e.n,exports.LuzmoMixin=e.r,exports.SizedMixin=t.n,exports.VoiceRecorder=o.t,exports.createTemplateRenderer=s.t,exports.isAndroid=i.t,exports.isAppleDevice=i.n,exports.isChrome=i.r,exports.isFirefox=i.i,exports.isIOS=i.a,exports.isIPad=i.o,exports.isIPhone=i.s,exports.isMac=i.c,exports.isSeamonkey=i.l,exports.isWebKit=i.u,exports.streamingListener=a.t,exports.templateProperty=s.n;
@@ -20,7 +20,7 @@ import { n, t as r } from "./sized-mixin-BmxIAuoH.js";
20
20
  import { t as i } from "./focus-visible-D6TRtUd7.js";
21
21
  import { t as a } from "./focusable-xjv79E40.js";
22
22
  import { a as o, c as s, i as c, l, n as u, o as d, r as f, s as p, t as m, u as h } from "./platform-CDW-WdXN.js";
23
- import { t as g } from "./streaming-listener-B6mDl4pZ.js";
23
+ import { t as g } from "./streaming-listener-DyS3scAi.js";
24
24
  import { t as _ } from "./voice-recorder-BXY_l_78.js";
25
25
  import { n as v, t as y } from "./template-property-Bks4Db5C.js";
26
26
  export { r as ElementSizes, i as FocusVisiblePolyfillMixin, a as Focusable, e as LuzmoElement, t as LuzmoMixin, n as SizedMixin, _ as VoiceRecorder, y as createTemplateRenderer, m as isAndroid, u as isAppleDevice, f as isChrome, c as isFirefox, o as isIOS, d as isIPad, p as isIPhone, s as isMac, l as isSeamonkey, h as isWebKit, g as streamingListener, v as templateProperty };