@luzmo/lucero 1.0.1-alpha.18 → 1.0.1-alpha.19

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 (275) hide show
  1. package/components/NumberFormatter-DewVDY5w.cjs +18 -0
  2. package/components/NumberFormatter-DgOUVrge.js +136 -0
  3. package/components/NumberParser-Dik4a0h-.cjs +18 -0
  4. package/components/NumberParser-ci9J5EKv.js +173 -0
  5. package/components/accordion/index.cjs +6 -183
  6. package/components/accordion/index.js +88 -136
  7. package/components/action-bar/index.cjs +4 -85
  8. package/components/action-bar/index.js +50 -72
  9. package/components/action-button/index.cjs +3 -205
  10. package/components/action-button/index.js +93 -167
  11. package/components/action-group/index.cjs +1 -7
  12. package/components/action-group/index.js +8 -12
  13. package/components/action-group-C54IxNZk.cjs +20 -0
  14. package/components/action-group-C9dsPJg-.js +258 -0
  15. package/components/action-menu/index.cjs +11 -91
  16. package/components/action-menu/index.js +47 -66
  17. package/components/async-directive-BwIAw5tB.js +82 -0
  18. package/components/async-directive-DLz6JB0v.cjs +22 -0
  19. package/components/avatar/index.cjs +3 -63
  20. package/components/avatar/index.js +42 -54
  21. package/components/{focusable-selectors-D0t_5P7C.cjs → base-BjTwmyRF.cjs} +5 -16
  22. package/components/base-CFWO09N1.js +684 -0
  23. package/components/base-Cy0MQrPT.cjs +40 -0
  24. package/components/base-D76d76ww.js +26 -0
  25. package/components/button/index.cjs +2 -134
  26. package/components/button/index.js +72 -106
  27. package/components/button-base-B8bWcklV.js +144 -0
  28. package/components/button-base-tf95Lyl4.cjs +25 -0
  29. package/components/button-group/index.cjs +1 -45
  30. package/components/button-group/index.js +25 -37
  31. package/components/calendar/index.cjs +1 -632
  32. package/components/calendar/index.js +7 -637
  33. package/components/checkbox/index.cjs +4 -111
  34. package/components/checkbox/index.js +53 -98
  35. package/components/checkbox-mixin-BOTvuPEu.js +70 -0
  36. package/components/checkbox-mixin-BVPpXtsq.cjs +27 -0
  37. package/components/class-map-CGfNk3Ee.js +51 -0
  38. package/components/class-map-D-Y-hsN5.cjs +22 -0
  39. package/components/clear-button-CuPbWwZY.cjs +18 -0
  40. package/components/clear-button-DzZ5ulBW.js +53 -0
  41. package/components/close-button-BTo4yrFR.cjs +18 -0
  42. package/components/close-button-CuQdsez5.js +51 -0
  43. package/components/color-area/index.cjs +13 -440
  44. package/components/color-area/index.js +187 -322
  45. package/components/color-controller-B0uX6Zso.js +3230 -0
  46. package/components/color-controller-CoUL5f9K.cjs +18 -0
  47. package/components/color-field/index.cjs +2 -95
  48. package/components/color-field/index.js +41 -77
  49. package/components/color-handle/index.cjs +3 -64
  50. package/components/color-handle/index.js +37 -58
  51. package/components/color-loupe/index.cjs +1 -7
  52. package/components/color-loupe/index.js +8 -12
  53. package/components/color-loupe-CrM2DVY3.cjs +56 -0
  54. package/components/color-loupe-DmQe3SpP.js +81 -0
  55. package/components/color-menu/index.cjs +12 -217
  56. package/components/color-menu/index.js +93 -187
  57. package/components/color-palette/index.cjs +1 -89
  58. package/components/color-palette/index.js +51 -78
  59. package/components/color-palette-group/index.cjs +3 -259
  60. package/components/color-palette-group/index.js +105 -193
  61. package/components/color-picker/index.cjs +6 -114
  62. package/components/color-picker/index.js +72 -92
  63. package/components/color-slider/index.cjs +1 -585
  64. package/components/color-slider/index.js +7 -590
  65. package/components/condition-attribute-with-id-DrQYZzFS.cjs +18 -0
  66. package/components/condition-attribute-with-id-Dv4lSRbe.js +31 -0
  67. package/components/date-time-picker/index.cjs +31 -1357
  68. package/components/date-time-picker/index.js +637 -951
  69. package/components/{dependency-manger-XHpQjFgK.js → dependency-manger-CO-VPlqq.js} +14 -24
  70. package/components/dependency-manger-uthev62E.cjs +18 -0
  71. package/components/directive-C7oCP5Bh.cjs +22 -0
  72. package/components/directive-helpers-D4KMv2dC.js +62 -0
  73. package/components/directive-helpers-t-TVum7J.cjs +22 -0
  74. package/components/{slottable-request-event-CANixJnR.cjs → directive-oAbCiebi.js} +25 -14
  75. package/components/divider/index.cjs +1 -54
  76. package/components/divider/index.js +30 -49
  77. package/components/divider.module-DDvBo9zo.cjs +18 -0
  78. package/components/divider.module-DoQWQEIJ.js +21 -0
  79. package/components/element-resolution-BvRLGqIU.cjs +18 -0
  80. package/components/element-resolution-FCUT-wql.js +91 -0
  81. package/components/field-group/index.cjs +1 -7
  82. package/components/field-group/index.js +8 -12
  83. package/components/field-group-5WQMBOk4.cjs +23 -0
  84. package/components/field-group-D4B0IOdA.js +66 -0
  85. package/components/field-label/index.cjs +1 -7
  86. package/components/field-label/index.js +8 -12
  87. package/components/field-label-DxmPiC5p.js +106 -0
  88. package/components/field-label-Dz9kisdW.cjs +25 -0
  89. package/components/flow-D-0MTYCm.js +527 -0
  90. package/components/flow-DM3dNAKs.cjs +30 -0
  91. package/components/focus-group-DHeTq18L.js +218 -0
  92. package/components/focus-group-DnxZUBhQ.cjs +18 -0
  93. package/components/focus-visible-BvScGDCE.js +74 -0
  94. package/components/focus-visible-D4BXb5RB.cjs +18 -0
  95. package/components/focusable-B_KwfEec.cjs +18 -0
  96. package/components/focusable-C5JjRZmT.js +153 -0
  97. package/components/{focusable-selectors-IltOAOd9.js → focusable-selectors-B4YgbghQ.js} +4 -7
  98. package/components/focusable-selectors-BgFlyFcY.cjs +18 -0
  99. package/components/icon/index.cjs +1 -90
  100. package/components/icon/index.js +46 -74
  101. package/components/if-defined-DULpqYwi.js +27 -0
  102. package/components/if-defined-DaXWqfzc.cjs +22 -0
  103. package/components/index-CNK8wHXu.cjs +57 -0
  104. package/components/index-Cf6G4q52.js +1490 -0
  105. package/components/index-D3ICqC7S.js +1174 -0
  106. package/components/index-hqVbNKYy.cjs +113 -0
  107. package/components/index.cjs +1 -174
  108. package/components/index.js +172 -174
  109. package/components/infield-button/index.cjs +2 -46
  110. package/components/infield-button/index.js +30 -41
  111. package/components/label/index.cjs +1 -37
  112. package/components/label/index.js +24 -36
  113. package/components/{language-resolution-BSGJAWiQ.js → language-resolution-B-wjV5bb.js} +17 -21
  114. package/components/language-resolution-EUER43cg.cjs +18 -0
  115. package/components/like-anchor-Bu3pXbjT.cjs +32 -0
  116. package/components/like-anchor-DCFJN0LV.js +69 -0
  117. package/components/luzmo-icons-CiSek5iM.js +229 -0
  118. package/components/luzmo-icons-CtA-TJPd.cjs +29 -0
  119. package/components/manage-help-text-CHfMLzSa.js +92 -0
  120. package/components/manage-help-text-DNqdEkTA.cjs +30 -0
  121. package/components/menu/index.cjs +29 -1297
  122. package/components/menu/index.js +499 -954
  123. package/components/multi-language-field/index.cjs +2 -132
  124. package/components/multi-language-field/index.js +88 -118
  125. package/components/mutation-controller-DH7YOCyj.js +52 -0
  126. package/components/mutation-controller-DkOMCW-c.cjs +22 -0
  127. package/components/number-field/index.cjs +10 -613
  128. package/components/number-field/index.js +243 -442
  129. package/components/observe-slot-presence-CmVi0zTc.js +68 -0
  130. package/components/observe-slot-presence-bc9chhsi.cjs +18 -0
  131. package/components/observe-slot-text-C3moTjwy.js +87 -0
  132. package/components/observe-slot-text-D2VAEFSd.cjs +18 -0
  133. package/components/options/index.cjs +60 -693
  134. package/components/options/index.js +953 -519
  135. package/components/overlay/index.cjs +21 -367
  136. package/components/overlay/index.js +189 -273
  137. package/components/overlay-B3ajDLLq.cjs +47 -0
  138. package/components/overlay-CUKs69yr.js +2745 -0
  139. package/components/{pending-state-CXbe-Xul.js → pending-state-B2wWssTo.js} +13 -28
  140. package/components/pending-state-bJr-nEJl.cjs +26 -0
  141. package/components/picker/index.cjs +1 -9
  142. package/components/picker/index.js +11 -15
  143. package/components/picker-C0LvseZe.cjs +123 -0
  144. package/components/picker-W1qNmtsh.js +461 -0
  145. package/components/picker-button/index.cjs +4 -56
  146. package/components/picker-button/index.js +34 -45
  147. package/components/{condition-attribute-with-id-Cn815e9W.js → platform-BM-uMWpX.js} +49 -24
  148. package/components/platform-BiXhwqk3.cjs +18 -0
  149. package/components/popover/index.cjs +1 -7
  150. package/components/popover/index.js +8 -12
  151. package/components/popover-fwJeZHMQ.cjs +30 -0
  152. package/components/popover-iD8f5Jkp.js +67 -0
  153. package/components/progress-circle/index.cjs +1 -7
  154. package/components/progress-circle/index.js +8 -12
  155. package/components/progress-circle-DZxaMe8L.cjs +33 -0
  156. package/components/progress-circle-USIIU1up.js +97 -0
  157. package/components/query-BL-TJj7K.cjs +22 -0
  158. package/components/query-D_KR_GUc.js +51 -0
  159. package/components/query-assigned-elements-DjfhL1cl.js +36 -0
  160. package/components/query-assigned-elements-DsKsfk7G.cjs +22 -0
  161. package/components/query-assigned-nodes-BcKWmGzy.cjs +22 -0
  162. package/components/query-assigned-nodes-C76XVPWY.js +36 -0
  163. package/components/radio/index.cjs +2 -244
  164. package/components/radio/index.js +110 -192
  165. package/components/{random-id-BEc6QIUL.js → random-id-ByCz1xaq.js} +3 -3
  166. package/components/random-id-CqvckpWe.cjs +18 -0
  167. package/components/roving-tabindex-By_fCy_e.cjs +18 -0
  168. package/components/roving-tabindex-DOg4z6ZU.js +66 -0
  169. package/components/search/index.cjs +8 -115
  170. package/components/search/index.js +66 -96
  171. package/components/select/index.cjs +51 -720
  172. package/components/select/index.js +347 -563
  173. package/components/sized-mixin-CJbBHWRQ.js +63 -0
  174. package/components/sized-mixin-WPHH0a_D.cjs +18 -0
  175. package/components/slider/index.cjs +1 -119
  176. package/components/slider/index.js +1113 -100
  177. package/components/slottable-request-event-BfUUt1Mh.cjs +18 -0
  178. package/components/{slottable-request-event-D9WzrdWv.js → slottable-request-event-DggLA4Rx.js} +9 -12
  179. package/components/state-DwIwYPvt.js +29 -0
  180. package/components/state-vf0PJN3_.cjs +22 -0
  181. package/components/strategies-C6HsQpU2.cjs +18 -0
  182. package/components/strategies-CUMLHtQI.js +195 -0
  183. package/components/streaming-listener-BQ68fKMa.js +91 -0
  184. package/components/streaming-listener-DeGQYM-9.cjs +18 -0
  185. package/components/style-map-Bnhf_mVZ.js +53 -0
  186. package/components/style-map-DuMd5xlY.cjs +22 -0
  187. package/components/swatch/index.cjs +7 -436
  188. package/components/swatch/index.js +205 -350
  189. package/components/switch/index.cjs +2 -61
  190. package/components/switch/index.js +34 -51
  191. package/components/tabs/index.cjs +26 -693
  192. package/components/tabs/index.js +388 -521
  193. package/components/tags/index.cjs +4 -201
  194. package/components/tags/index.js +87 -152
  195. package/components/text-field/index.cjs +3 -49
  196. package/components/text-field/index.js +30 -44
  197. package/components/text-field-BkFPYo7S.cjs +85 -0
  198. package/components/text-field-C2n3rzCK.js +314 -0
  199. package/components/text-field.module-C2KVUJcX.js +21 -0
  200. package/components/text-field.module-DXhFA9G-.cjs +18 -0
  201. package/components/toast/index.cjs +12 -177
  202. package/components/toast/index.js +73 -145
  203. package/components/tooltip/index.cjs +6 -250
  204. package/components/tooltip/index.js +124 -177
  205. package/components/unit-input/index.cjs +8 -232
  206. package/components/unit-input/index.js +108 -201
  207. package/components/utils.cjs +1 -25
  208. package/components/utils.js +22 -22
  209. package/components/{random-id-BE6HA503.cjs → when-CDK1Tt5Y.js} +10 -7
  210. package/components/when-CDZyJPvd.cjs +22 -0
  211. package/package.json +1 -1
  212. package/components/action-group-DHp8RHDf.js +0 -392
  213. package/components/action-group-MPf19RPV.cjs +0 -391
  214. package/components/base-COw9n7UR.cjs +0 -119
  215. package/components/base-DmeVy0cq.js +0 -120
  216. package/components/button-base-7Ak55xFd.cjs +0 -206
  217. package/components/button-base-C3kf6BTK.js +0 -207
  218. package/components/checkbox-mixin-8cL-vfDy.js +0 -84
  219. package/components/checkbox-mixin-CE7dJj3J.cjs +0 -83
  220. package/components/clear-button-Co6oKSgl.js +0 -59
  221. package/components/clear-button-X_HDY2eH.cjs +0 -58
  222. package/components/close-button-DPBK6Kpu.cjs +0 -59
  223. package/components/close-button-Miw9ZjoJ.js +0 -60
  224. package/components/color-controller-BjDZaxhX.js +0 -491
  225. package/components/color-controller-C3c_vb2P.cjs +0 -490
  226. package/components/color-loupe-BQqNR8YD.cjs +0 -88
  227. package/components/color-loupe-B_DDFv8l.js +0 -89
  228. package/components/condition-attribute-with-id-DEc2Yjne.cjs +0 -43
  229. package/components/dependency-manger-CcIE1uvQ.cjs +0 -63
  230. package/components/divider.module-Cm5LcDRV.cjs +0 -20
  231. package/components/divider.module-DauH6k2_.js +0 -21
  232. package/components/element-resolution-DCsrhGZO.cjs +0 -112
  233. package/components/element-resolution-nMlmW4Jy.js +0 -113
  234. package/components/field-group-DNmY8W9v.cjs +0 -86
  235. package/components/field-group-DVdAWCQF.js +0 -87
  236. package/components/field-label-CKH9EXpR.cjs +0 -156
  237. package/components/field-label-Dpsecoc6.js +0 -157
  238. package/components/focus-group-BqDAk9Is.js +0 -337
  239. package/components/focus-group-DFzOlalL.cjs +0 -336
  240. package/components/focus-visible-B-B8-P9R.cjs +0 -104
  241. package/components/focus-visible-BUPRWlsh.js +0 -105
  242. package/components/focusable-BPrTcZPd.cjs +0 -262
  243. package/components/focusable-ChCLg1k4.js +0 -263
  244. package/components/language-resolution-iN9EImbb.cjs +0 -57
  245. package/components/like-anchor-D62faRNG.cjs +0 -79
  246. package/components/like-anchor-v3cJ9RWM.js +0 -80
  247. package/components/manage-help-text-BYx84zZR.cjs +0 -125
  248. package/components/manage-help-text-DOuMTGht.js +0 -126
  249. package/components/observe-slot-presence-9AwLGUQ_.cjs +0 -78
  250. package/components/observe-slot-presence-DcMdoumP.js +0 -79
  251. package/components/observe-slot-text-CSofZeeF.cjs +0 -104
  252. package/components/observe-slot-text-CjnkkBPn.js +0 -105
  253. package/components/overlay-CN8ISP1F.js +0 -2485
  254. package/components/overlay-LViy9VWM.cjs +0 -2484
  255. package/components/pending-state-e4RbXe9u.cjs +0 -75
  256. package/components/picker-DNde3awt.cjs +0 -672
  257. package/components/picker-PfUAF05y.js +0 -673
  258. package/components/platform-CxDar3Dn.cjs +0 -68
  259. package/components/platform-Cxn0WbyT.js +0 -69
  260. package/components/popover-BkbYhl3i.js +0 -74
  261. package/components/popover-BkgUf0kL.cjs +0 -74
  262. package/components/progress-circle-Hu_ivPHf.js +0 -133
  263. package/components/progress-circle-_Etqsj9f.cjs +0 -132
  264. package/components/roving-tabindex-AsmAh2In.cjs +0 -95
  265. package/components/roving-tabindex-DPF9NmrH.js +0 -96
  266. package/components/sized-mixin-DmkrNdWB.js +0 -80
  267. package/components/sized-mixin-UaTVa-AE.cjs +0 -79
  268. package/components/strategies-DlMlaSJR.cjs +0 -317
  269. package/components/strategies-DlPQoTFE.js +0 -318
  270. package/components/streaming-listener-D4sHaMub.cjs +0 -145
  271. package/components/streaming-listener-cAz5zJyk.js +0 -146
  272. package/components/text-field-11tcnftU.cjs +0 -338
  273. package/components/text-field-Chi9J2Cz.js +0 -339
  274. package/components/text-field.module-CMBS0jSL.js +0 -21
  275. package/components/text-field.module-DIJdV_sA.cjs +0 -20
@@ -15,39 +15,30 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- const initializeGlobalLuzmoCSSVariables = () => {
19
- if (typeof document !== "undefined" && !document.querySelector("style[data-luzmo-vars]")) {
20
- const styleElement = document.createElement("style");
21
- styleElement.setAttribute("data-luzmo-vars", "");
22
- styleElement.textContent = `html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}`;
23
- document.head.appendChild(styleElement);
18
+ import { $ as b } from "../NumberFormatter-DgOUVrge.js";
19
+ import { $ as f } from "../NumberParser-ci9J5EKv.js";
20
+ import { T as v, d as y, c as k } from "../luzmo-icons-CiSek5iM.js";
21
+ import { r as C, E as F, x as z, n } from "../base-CFWO09N1.js";
22
+ import { e as _ } from "../query-D_KR_GUc.js";
23
+ import { c as g, a as V, j as N } from "../platform-BM-uMWpX.js";
24
+ import { L as P, l as E } from "../language-resolution-B-wjV5bb.js";
25
+ import { s as q } from "../streaming-listener-BQ68fKMa.js";
26
+ import "../infield-button/index.js";
27
+ import { a as S } from "../text-field-C2n3rzCK.js";
28
+ const w = () => {
29
+ if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
30
+ const p = document.createElement("style");
31
+ p.setAttribute("data-luzmo-vars", ""), p.textContent = 'html{--luzmo-animation-duration: 0.15s;--luzmo-border-color: rgba(var(--luzmo-border-color-rgb), 0.1);--luzmo-border-color-hover: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-down: rgba(var(--luzmo-border-color-rgb), 0.3);--luzmo-border-color-focus: rgba(var(--luzmo-border-color-rgb), 0.15);--luzmo-border-color-rgb: 0, 0, 0;--luzmo-border-color-full: rgb(180, 180, 180);--luzmo-border-color-full-hover: rgb(140, 140, 140);--luzmo-border-color-full-down: rgb(110, 110, 110);--luzmo-border-color-full-focus: rgb(140, 140, 140);--luzmo-border-color-disabled: #dddddd;--luzmo-border-radius: 6px;--luzmo-border-radius-s: 4px;--luzmo-border-radius-l: 8px;--luzmo-border-radius-xl: 12px;--luzmo-border-radius-full: 999rem;--luzmo-background-color: #ffffff;--luzmo-background-color-rgb: 255, 255, 255;--luzmo-background-color-disabled: #eeeeee;--luzmo-background-color-hover: #f0f0fc;--luzmo-background-color-down: #f1f1ff;--luzmo-background-color-focus: #f0f0fc;--luzmo-background-color-highlight: rgb(240, 240, 240);--luzmo-background-color-highlight-disabled: rgb(245, 245, 245);--luzmo-background-color-highlight-hover: rgb(225, 225, 225);--luzmo-background-color-highlight-down: rgb(215, 215, 215);--luzmo-background-color-highlight-focus: rgb(225, 225, 225);--luzmo-border-width: 1px;--luzmo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;--luzmo-font-size-xs: 10px;--luzmo-font-size-s: 12px;--luzmo-font-size-m: 14px;--luzmo-font-size: 14px;--luzmo-font-size-l: 16px;--luzmo-font-size-xl: 18px;--luzmo-font-size-xxl: 20px;--luzmo-font-style: normal;--luzmo-line-height: normal;--luzmo-font-weight: 400;--luzmo-font-weight-semibold: 500;--luzmo-font-weight-bold: 600;--luzmo-font-color: #333;--luzmo-font-color-hard: #000;--luzmo-font-color-disabled: var(--luzmo-disabled-color);--luzmo-font-color-extra-dimmed: #888;--luzmo-font-color-hover: #333;--luzmo-font-color-down: #111;--luzmo-font-color-focus: #333;--luzmo-primary: #4434ff;--luzmo-primary-hover: #4234e4;--luzmo-primary-down: #392cc7;--luzmo-primary-focus: #4234e4;--luzmo-primary-inverse-color: #ffffff;--luzmo-primary-rgb: 68, 52, 255;--luzmo-secondary: #ff00ff;--luzmo-secondary-hover: #e309e3;--luzmo-secondary-down: #c711c7;--luzmo-secondary-focus: #e309e3;--luzmo-secondary-inverse-color: #ffffff;--luzmo-secondary-rgb: 255, 0, 255;--luzmo-negative-color: #ca221c;--luzmo-negative-color-hover: #b3241f;--luzmo-negative-color-down: #9f231f;--luzmo-negative-color-focus: #b3241f;--luzmo-negative-color-rgb: 202, 34, 28;--luzmo-positive-color: rgb(20, 150, 101);--luzmo-positive-color-hover: rgb(17, 128, 86);--luzmo-positive-color-down: rgb(16, 105, 71);--luzmo-positive-color-focus: rgb(17, 128, 86);--luzmo-positive-color-rgb: 20, 150, 101;--luzmo-selected-color: rgb(110, 110, 110);--luzmo-selected-color-hover: rgb(70, 70, 70);--luzmo-selected-color-down: rgb(40, 40, 40);--luzmo-selected-color-focus: rgb(70, 70, 70);--luzmo-selected-color-hard: #1e1e1e;--luzmo-selected-color-hard-hover: rgb(0, 0, 0);--luzmo-selected-color-hard-down: rgb(0, 0, 0);--luzmo-selected-color-hard-focus: rgb(0, 0, 0);--luzmo-informative-color: #1a77e9;--luzmo-informative-color-rgb: 26, 119, 233;--luzmo-disabled-color: #aaaaaa;--luzmo-spacing-1: 2px;--luzmo-spacing-2: 4px;--luzmo-spacing-3: 8px;--luzmo-spacing-4: 12px;--luzmo-spacing-5: 16px;--luzmo-indicator-gap: 2px;--luzmo-indicator-width: 1px;--luzmo-indicator-color: var(--luzmo-primary);--luzmo-component-height-xxs: 20px;--luzmo-component-height-xs: 24px;--luzmo-component-height-s: 28px;--luzmo-component-height: 32px;--luzmo-component-height-l: 40px;--luzmo-component-height-xl: 48px;--luzmo-component-height-xxl: 64px;--luzmo-icon-size-xxs: 12px;--luzmo-icon-size-xs: 14px;--luzmo-icon-size-s: 16px;--luzmo-icon-size-m: 18px;--luzmo-icon-size-l: 20px;--luzmo-icon-size-xl: 22px;--luzmo-icon-size-xxl: 32px}', document.head.appendChild(p);
24
32
  }
25
33
  };
26
- initializeGlobalLuzmoCSSVariables();
27
- import { NumberFormatter, NumberParser } from "@internationalized/number";
28
- import { luzmoIcon, luzmoAngleUp, luzmoAngleDown } from "@luzmo/icons";
29
- import { unsafeCSS, nothing, html } from "lit";
30
- import { query, property } from "lit/decorators.js";
31
- import { c as isIOS, a as isIPhone, j as isAndroid } from "../platform-Cxn0WbyT.js";
32
- import { L as LanguageResolutionController, l as languageResolverUpdatedSymbol } from "../language-resolution-BSGJAWiQ.js";
33
- import { s as streamingListener } from "../streaming-listener-cAz5zJyk.js";
34
- import "../infield-button/index.js";
35
- import { a as LuzmoTextFieldBase } from "../text-field-Chi9J2Cz.js";
36
- const styles = '#text-field{--stepper-width: calc( var(--luzmo-stepper-height, var(--stepper-height)) * var( --luzmo-stepper-min-width-multiplier, var(--stepper-min-width-multiplier) ) + var(--luzmo-stepper-button-width, var(--stepper-button-width)) + var(--luzmo-stepper-border-width, var(--stepper-border-width)) * 2 );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color, var( --luzmo-stepper-buttons-border-color, var(--stepper-buttons-border-color) ) );--luzmo-infield-button-border-width: var( --luzmo-stepper-button-border-width, var(--stepper-button-border-width) );--luzmo-infield-button-border-radius-reset: var( --stepper-button-border-radius-reset );--luzmo-text-field-border-width: var( --luzmo-stepper-border-width, var(--stepper-border-width) );inline-size:var(--luzmo-stepper-width, var(--stepper-width));block-size:var(--luzmo-stepper-height, var(--stepper-height));border-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius));border-color:var(--highcontrast-stepper-border-color, var(--luzmo-stepper-border-color, var(--stepper-border-color)));flex-flow:row;display:inline-flex;position:relative}#text-field:after{content:"";inline-size:100%;block-size:var(--luzmo-stepper-focus-indicator-width, var(--stepper-focus-indicator-width));position:absolute;inset-block-end:calc((var(--luzmo-stepper-focus-indicator-gap, var(--stepper-focus-indicator-gap)) + var(--luzmo-stepper-focus-indicator-width, var(--stepper-focus-indicator-width))) * -1);inset-inline-start:0}:host([focused]) #text-field,#text-field:focus{--luzmo-stepper-border-color: var( --highcontrast-stepper-border-color-focus, var(--luzmo-stepper-border-color-focus, var(--stepper-border-color-focus)) );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-focus, var( --luzmo-stepper-buttons-border-color-focus, var(--stepper-buttons-border-color-focus) ) )}:host([focused]:not([disabled])) #text-field .input,:host(:not([disabled])) #text-field:focus .input{outline:none}:host([focused]:not([disabled])) #text-field .buttons,:host([focused]:not([disabled])) #text-field .input,:host(:not([disabled])) #text-field:focus .buttons,:host(:not([disabled])) #text-field:focus .input{border-color:var(--highcontrast-stepper-border-color-focus, var(--luzmo-stepper-border-color-focus, var(--stepper-border-color-focus)))}:host([keyboard-focused]) #text-field,#text-field:focus-visible{--luzmo-stepper-border-color: var( --highcontrast-stepper-border-color-keyboard-focus, var( --luzmo-stepper-buttons-border-color-keyboard-focus, var(--stepper-buttons-border-color-keyboard-focus) ) );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-keyboard-focus, var( --luzmo-stepper-buttons-border-color-keyboard-focus, var(--stepper-buttons-border-color-keyboard-focus) ) )}:host([keyboard-focused]:not([disabled])) #text-field,:host(:not([disabled])) #text-field:focus-visible{outline:var(--luzmo-stepper-focus-indicator-width, var(--stepper-focus-indicator-width)) solid;outline-color:var(--highcontrast-stepper-focus-indicator-color, var(--luzmo-stepper-focus-indicator-color, var(--stepper-focus-indicator-color)));outline-offset:var(--luzmo-stepper-focus-indicator-gap, var(--stepper-focus-indicator-gap))}:host([keyboard-focused]:not([disabled])) #text-field .input,:host(:not([disabled])) #text-field:focus-visible .input{outline:none}:host([keyboard-focused]:not([disabled])) #text-field .buttons,:host([keyboard-focused]:not([disabled])) #text-field .input,:host(:not([disabled])) #text-field:focus-visible .buttons,:host(:not([disabled])) #text-field:focus-visible .input{border-color:var(--highcontrast-stepper-border-color-keyboard-focus, var(--luzmo-stepper-border-color-keyboard-focus, var(--stepper-border-color-keyboard-focus)))}:host([invalid]:not([disabled])) #text-field{--luzmo-stepper-border-color: var( --luzmo-stepper-border-color-invalid, var(--stepper-border-color-invalid) );--luzmo-stepper-border-color-hover: var( --luzmo-stepper-border-color-hover-invalid, var(--stepper-border-color-hover-invalid) );--luzmo-stepper-border-color-focus: var( --luzmo-stepper-border-color-focus-invalid, var(--stepper-border-color-focus-invalid) );--luzmo-stepper-border-color-focus-hover: var( --luzmo-stepper-border-color-focus-hover-invalid, var(--stepper-border-color-focus-hover-invalid) );--luzmo-stepper-border-color-keyboard-focus: var( --luzmo-stepper-border-color-keyboard-focus-invalid, var(--stepper-border-color-keyboard-focus-invalid) );--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-invalid, var(--stepper-border-color-invalid) );--luzmo-text-field-icon-spacing-inline-start-invalid: 0}:host([invalid][focused]:not([disabled])) #text-field,:host([invalid]:not([disabled])) #text-field:focus{--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-focus-invalid, var(--stepper-border-color-focus-invalid) )}:host([invalid][keyboard-focused]:not([disabled])) #text-field,:host([invalid]:not([disabled])) #text-field:focus-visible{--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-keyboard-focus-invalid, var(--stepper-border-color-keyboard-focus-invalid) )}:host([disabled]) #text-field{--luzmo-stepper-border-color: var(--stepper-button-border-color-disabled);--luzmo-stepper-border-color-hover: var( --stepper-button-border-color-disabled );--luzmo-stepper-border-color-focus: var( --stepper-button-border-color-disabled );--luzmo-stepper-border-color-focus-hover: var( --stepper-button-border-color-disabled );--luzmo-stepper-border-color-keyboard-focus: var( --stepper-button-border-color-disabled );--luzmo-stepper-buttons-background-color: var( --stepper-buttons-background-color-disabled );--luzmo-infield-button-border-width: var( --stepper-button-border-width-disabled );--luzmo-infield-button-border-color: var( --stepper-button-border-color-disabled );--luzmo-text-field-border-color-disabled: var( --stepper-button-border-color-disabled )}#text-field .input{border-color:var(--highcontrast-stepper-border-color, var(--luzmo-stepper-border-color, var(--stepper-border-color)));border-inline-end-width:0;border-start-end-radius:0;border-end-end-radius:0}#text-field.hide-stepper .input{border-inline-end-width:var(--luzmo-stepper-border-width, var(--stepper-border-width));border-start-end-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius));border-end-end-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius))}#text-field .buttons{box-sizing:border-box;font-size:var(--luzmo-stepper-button-font-size, var(--stepper-button-font-size));block-size:var(--luzmo-stepper-height, var(--stepper-height));inline-size:var(--luzmo-stepper-button-width, var(--stepper-button-width));border-color:var(--highcontrast-stepper-border-color, var(--luzmo-stepper-border-color, var(--stepper-border-color)));border-style:var(--luzmo-stepper-buttons-border-style, var(--stepper-buttons-border-style));border-width:var(--highcontrast-stepper-buttons-border-width, var(--luzmo-stepper-buttons-border-width, var(--stepper-buttons-border-width)));background-color:var(--highcontrast-stepper-buttons-background-color, var(--luzmo-stepper-buttons-background-color, var(--stepper-buttons-background-color)));transition:border-color var(--luzmo-stepper-animation-duration, var(--stepper-animation-duration)) ease-in-out;border-inline-start-width:0;border-start-end-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius));border-end-end-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius));flex-direction:column;justify-content:center;display:flex}:host([quiet]) #text-field{border-start-start-radius:0;border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0}:host([quiet]) #text-field .input{--luzmo-text-field-focus-indicator-color: transparent}:host([quiet]) #text-field.hide-stepper .input{border-inline-end-width:0;border-end-end-radius:0}:host([quiet]) #text-field .buttons{--luzmo-infield-button-border-color: transparent;border-width:0;border-block-end-width:var(--luzmo-stepper-border-width, var(--stepper-border-width));border-block-end-color:var(--highcontrast-stepper-border-color, var(--luzmo-stepper-border-color, var(--stepper-border-color)));border-block-end-style:solid;border-end-end-radius:0}:host([quiet]) #text-field .button{--luzmo-infield-button-width-stacked: var( --luzmo-stepper-button-width-quiet, var(--stepper-button-width) );--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-quiet, var(--stepper-button-border-color-quiet) );--luzmo-infield-button-stacked-bottom-border-block-end-width: var( --luzmo-stepper-border-width, var(--stepper-border-width) );--luzmo-infield-button-stacked-bottom-border-radius-end-end: 0;--luzmo-infield-button-stacked-bottom-border-radius-end-start: 0;--luzmo-infield-button-fill-justify-content: flex-end;padding:0}:host([quiet]) #text-field .buttons,:host([quiet]) #text-field .input{background-color:initial}:host([quiet][focused]) #text-field,:host([quiet]) #text-field:focus{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-focus, var(--luzmo-stepper-border-color-focus, var(--stepper-border-color-focus)) )}:host([quiet][keyboard-focused]:not([disabled])) #text-field{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-keyboard-focus, var( --luzmo-stepper-border-color-keyboard-focus, var(--stepper-border-color-keyboard-focus) ) );outline:none}:host([quiet][keyboard-focused]:not([disabled])) #text-field:after{background-color:var(--highcontrast-stepper-focus-indicator-color, var(--luzmo-stepper-focus-indicator-color, var(--stepper-focus-indicator-color)))}@media (hover: hover){:host(:hover:not([disabled])) #text-field{--luzmo-stepper-border-color: var( --highcontrast-stepper-border-color-hover, var(--luzmo-stepper-border-color-hover, var(--stepper-border-color-hover)) );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-hover, var( --luzmo-stepper-buttons-border-color-hover, var(--stepper-buttons-border-color-hover) ) )}:host([focused]:hover) #text-field,:host(:hover) #text-field:focus{--luzmo-stepper-border-color: var( --highcontrast-stepper-border-color-focus-hover, var( --luzmo-stepper-buttons-border-color-focus-hover, var(--stepper-buttons-border-color-focus-hover) ) );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-focus-hover, var( --luzmo-stepper-buttons-border-color-focus-hover, var(--stepper-buttons-border-color-focus-hover) ) )}:host([focused]:hover) #text-field .buttons,:host([focused]:hover) #text-field .input,:host(:hover) #text-field:focus .buttons,:host(:hover) #text-field:focus .input{border-color:var(--highcontrast-stepper-border-color-focus-hover, var(--luzmo-stepper-border-color-focus-hover, var(--stepper-border-color-focus-hover)))}:host([invalid]:not([disabled]):hover) #text-field{--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-hover-invalid, var(--stepper-border-color-hover-invalid) )}:host([invalid][focused]:not([disabled]):hover) #text-field,:host([invalid]:not([disabled]):hover) #text-field:focus{--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-focus-hover-invalid, var(--stepper-border-color-focus-hover-invalid) )}:host([quiet]:not([disabled]):hover) #text-field{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-hover, var(--luzmo-stepper-border-color-hover, var(--stepper-border-color-hover)) )}:host([quiet]:not([disabled]):hover) #text-field .buttons{background-color:initial}:host([quiet][focused]:hover) #text-field,:host([quiet]:hover) #text-field:focus{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-focus-hover, var( --luzmo-stepper-border-color-focus-hover, var(--stepper-border-color-focus-hover) ) )}:host([quiet][keyboard-focused]:not([disabled]):hover) #text-field{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-hover, var(--luzmo-stepper-border-color-hover, var(--stepper-border-color-hover)) )}}:host([invalid]) #text-field .icon,:host([valid]) #text-field .icon{inset-inline-end:calc(var(--stepper-button-width) + var(--luzmo-text-field-icon-spacing-inline-end-invalid, var(--text-field-icon-spacing-inline-end-invalid)))}@media (forced-colors: active){:host{--highcontrast-stepper-border-color: CanvasText;--highcontrast-stepper-border-color-hover: Highlight;--highcontrast-stepper-border-color-focus: Highlight;--highcontrast-stepper-border-color-focus-hover: Highlight;--highcontrast-stepper-border-color-keyboard-focus: CanvasText;--highcontrast-stepper-button-background-color-default: Canvas;--highcontrast-stepper-button-background-color-hover: Canvas;--highcontrast-stepper-button-background-color-focus: Canvas;--highcontrast-stepper-button-background-color-keyboard-focus: Canvas;--highcontrast-stepper-focus-indicator-color: Highlight}:host([invalid]) #text-field{--highcontrast-stepper-border-color: Highlight;--highcontrast-stepper-border-color-hover: Highlight;--highcontrast-stepper-border-color-focus: Highlight;--highcontrast-stepper-border-color-focus-hover: Highlight;--highcontrast-stepper-border-color-keyboard-focus: Highlight;--highcontrast-infield-button-border-color: Highlight}:host([disabled]) #text-field{--highcontrast-stepper-border-color: GrayText;--highcontrast-infield-button-border-color: GrayText;--highcontrast-stepper-buttons-border-width: var( --luzmo-stepper-border-width, var(--stepper-border-width) )}}:host{--text-field-minimum-width-multiplier: 1.75;--stepper-border-width: var(--luzmo-border-width);--stepper-border-color: var(--luzmo-border-color);--stepper-border-color-hover: var(--luzmo-border-color-full-hover);--stepper-border-color-focus: var(--luzmo-border-color-full-focus);--stepper-border-color-focus-hover: var(--luzmo-border-color-full-focus);--stepper-border-color-keyboard-focus: var(--luzmo-border-color-full-focus);--stepper-border-radius: var(--luzmo-border-radius);--stepper-min-width-multiplier: 1.5;--stepper-animation-duration: var(--luzmo-animation-duration);--stepper-buttons-background-color: var(--luzmo-background-color);--stepper-buttons-border-style: none;--stepper-buttons-border-width: 0;--stepper-buttons-border-color: var(--luzmo-border-color);--stepper-buttons-border-color-hover: var(--luzmo-border-color-full-hover);--stepper-buttons-border-color-focus: var(--luzmo-border-color-full-focus);--stepper-buttons-border-color-keyboard-focus: var( --luzmo-border-color-focus );--stepper-button-font-size: var(--luzmo-font-size);--stepper-button-padding: 0px;--stepper-button-border-radius-reset: 0;--stepper-button-border-width: var(--luzmo-border-width);--stepper-button-background-color-focus: var(--luzmo-background-color-focus);--stepper-button-background-color-keyboard-focus: var( --luzmo-background-color-focus );--stepper-border-color-invalid: var(--luzmo-negative-color);--stepper-border-color-hover-invalid: var(--luzmo-negative-color-hover);--stepper-border-color-focus-invalid: var(--luzmo-negative-color-focus);--stepper-border-color-focus-hover-invalid: var(--luzmo-negative-color-focus);--stepper-border-color-keyboard-focus-invalid: var( --luzmo-negative-color-focus );--stepper-focus-indicator-width: var(--luzmo-indicator-width);--stepper-focus-indicator-gap: calc(-1 * var(--luzmo-border-width));--stepper-focus-indicator-color: var(--luzmo-indicator-color);--stepper-button-border-color-quiet: transparent;--stepper-button-border-color-disabled: var(--luzmo-border-color-disabled);--stepper-button-border-width-disabled: var(--luzmo-border-width);--stepper-buttons-background-color-disabled: var( --luzmo-background-color-disabled );--stepper-button-width: 28px;--stepper-height: var(--luzmo-component-height)}:host([size=s]) #text-field{--stepper-button-width: 16px;--stepper-height: var(--luzmo-component-height-s)}:host([size=m]) #text-field{--stepper-button-width: 20px;--stepper-height: var(--luzmo-component-height)}:host([size=l]) #text-field{--stepper-button-width: 28px;--stepper-height: var(--luzmo-component-height-l)}:host([size=xl]) #text-field{--stepper-button-width: 36px;--stepper-height: var(--luzmo-component-height-xl)}:host{inline-size:var(--luzmo-stepper-width, var(--stepper-width));--swc-number-field-width: calc( var(--luzmo-stepper-height, var(--stepper-height)) * var( --luzmo-stepper-min-width-multiplier, var(--text-field-minimum-width-multiplier) ) + var(--luzmo-stepper-button-width, var(--stepper-button-width)) + var(--luzmo-stepper-border-width, var(--stepper-border-width)) * 2 );--luzmo-infield-button-border-width: var(--unset-value-resets-inheritance);--stepper-width: var(--swc-number-field-width)}:host([size=s]){--stepper-width: calc(var(--swc-number-field-width) / 5 * 4);--stepper-button-font-size: var(--luzmo-font-size-s)}:host([size=l]){--stepper-width: calc(var(--swc-number-field-width) * 1.25);--stepper-button-font-size: var(--luzmo-font-size-l)}:host([size=xl]){--stepper-width: calc(var(--swc-number-field-width) * 1.25 * 1.25);--stepper-button-font-size: var(--luzmo-font-size-xl)}#text-field{inline-size:100%}.input{font-variant-numeric:tabular-nums}:host([readonly]) .buttons{pointer-events:none;visibility:hidden}:host([readonly]:not([disabled],[invalid],[focused],[keyboard-focused])) #text-field:hover .input{border-color:transparent}:host([hide-stepper]:not([quiet])) #text-field input{border:var(--luzmo-stepper-border-width, var(--stepper-border-width)) solid var(--luzmo-stepper-border-color, var(--stepper-border-color));border-radius:var(--luzmo-border-radius)}:host([quiet]) #text-field .button{--luzmo-infield-button-border-color: var( --luzmo-infield-border-color-quiet, transparent );--luzmo-infield-button-edge-to-fill: 0;--luzmo-infield-button-border-width: var( --luzmo-infield-button-border-width-quiet, 0 )}';
37
- var __defProp = Object.defineProperty;
38
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
39
- var __decorateClass = (decorators, target, key, kind) => {
40
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
41
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
42
- if (decorator = decorators[i])
43
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
44
- if (kind && result) __defProp(target, key, result);
45
- return result;
34
+ w();
35
+ const D = '#text-field{--stepper-width: calc( var(--luzmo-stepper-height, var(--stepper-height)) * var( --luzmo-stepper-min-width-multiplier, var(--stepper-min-width-multiplier) ) + var(--luzmo-stepper-button-width, var(--stepper-button-width)) + var(--luzmo-stepper-border-width, var(--stepper-border-width)) * 2 );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color, var( --luzmo-stepper-buttons-border-color, var(--stepper-buttons-border-color) ) );--luzmo-infield-button-border-width: var( --luzmo-stepper-button-border-width, var(--stepper-button-border-width) );--luzmo-infield-button-border-radius-reset: var( --stepper-button-border-radius-reset );--luzmo-text-field-border-width: var( --luzmo-stepper-border-width, var(--stepper-border-width) );inline-size:var(--luzmo-stepper-width, var(--stepper-width));block-size:var(--luzmo-stepper-height, var(--stepper-height));border-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius));border-color:var(--highcontrast-stepper-border-color, var(--luzmo-stepper-border-color, var(--stepper-border-color)));flex-flow:row;display:inline-flex;position:relative}#text-field:after{content:"";inline-size:100%;block-size:var(--luzmo-stepper-focus-indicator-width, var(--stepper-focus-indicator-width));position:absolute;inset-block-end:calc((var(--luzmo-stepper-focus-indicator-gap, var(--stepper-focus-indicator-gap)) + var(--luzmo-stepper-focus-indicator-width, var(--stepper-focus-indicator-width))) * -1);inset-inline-start:0}:host([focused]) #text-field,#text-field:focus{--luzmo-stepper-border-color: var( --highcontrast-stepper-border-color-focus, var(--luzmo-stepper-border-color-focus, var(--stepper-border-color-focus)) );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-focus, var( --luzmo-stepper-buttons-border-color-focus, var(--stepper-buttons-border-color-focus) ) )}:host([focused]:not([disabled])) #text-field .input,:host(:not([disabled])) #text-field:focus .input{outline:none}:host([focused]:not([disabled])) #text-field .buttons,:host([focused]:not([disabled])) #text-field .input,:host(:not([disabled])) #text-field:focus .buttons,:host(:not([disabled])) #text-field:focus .input{border-color:var(--highcontrast-stepper-border-color-focus, var(--luzmo-stepper-border-color-focus, var(--stepper-border-color-focus)))}:host([keyboard-focused]) #text-field,#text-field:focus-visible{--luzmo-stepper-border-color: var( --highcontrast-stepper-border-color-keyboard-focus, var( --luzmo-stepper-buttons-border-color-keyboard-focus, var(--stepper-buttons-border-color-keyboard-focus) ) );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-keyboard-focus, var( --luzmo-stepper-buttons-border-color-keyboard-focus, var(--stepper-buttons-border-color-keyboard-focus) ) )}:host([keyboard-focused]:not([disabled])) #text-field,:host(:not([disabled])) #text-field:focus-visible{outline:var(--luzmo-stepper-focus-indicator-width, var(--stepper-focus-indicator-width)) solid;outline-color:var(--highcontrast-stepper-focus-indicator-color, var(--luzmo-stepper-focus-indicator-color, var(--stepper-focus-indicator-color)));outline-offset:var(--luzmo-stepper-focus-indicator-gap, var(--stepper-focus-indicator-gap))}:host([keyboard-focused]:not([disabled])) #text-field .input,:host(:not([disabled])) #text-field:focus-visible .input{outline:none}:host([keyboard-focused]:not([disabled])) #text-field .buttons,:host([keyboard-focused]:not([disabled])) #text-field .input,:host(:not([disabled])) #text-field:focus-visible .buttons,:host(:not([disabled])) #text-field:focus-visible .input{border-color:var(--highcontrast-stepper-border-color-keyboard-focus, var(--luzmo-stepper-border-color-keyboard-focus, var(--stepper-border-color-keyboard-focus)))}:host([invalid]:not([disabled])) #text-field{--luzmo-stepper-border-color: var( --luzmo-stepper-border-color-invalid, var(--stepper-border-color-invalid) );--luzmo-stepper-border-color-hover: var( --luzmo-stepper-border-color-hover-invalid, var(--stepper-border-color-hover-invalid) );--luzmo-stepper-border-color-focus: var( --luzmo-stepper-border-color-focus-invalid, var(--stepper-border-color-focus-invalid) );--luzmo-stepper-border-color-focus-hover: var( --luzmo-stepper-border-color-focus-hover-invalid, var(--stepper-border-color-focus-hover-invalid) );--luzmo-stepper-border-color-keyboard-focus: var( --luzmo-stepper-border-color-keyboard-focus-invalid, var(--stepper-border-color-keyboard-focus-invalid) );--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-invalid, var(--stepper-border-color-invalid) );--luzmo-text-field-icon-spacing-inline-start-invalid: 0}:host([invalid][focused]:not([disabled])) #text-field,:host([invalid]:not([disabled])) #text-field:focus{--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-focus-invalid, var(--stepper-border-color-focus-invalid) )}:host([invalid][keyboard-focused]:not([disabled])) #text-field,:host([invalid]:not([disabled])) #text-field:focus-visible{--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-keyboard-focus-invalid, var(--stepper-border-color-keyboard-focus-invalid) )}:host([disabled]) #text-field{--luzmo-stepper-border-color: var(--stepper-button-border-color-disabled);--luzmo-stepper-border-color-hover: var( --stepper-button-border-color-disabled );--luzmo-stepper-border-color-focus: var( --stepper-button-border-color-disabled );--luzmo-stepper-border-color-focus-hover: var( --stepper-button-border-color-disabled );--luzmo-stepper-border-color-keyboard-focus: var( --stepper-button-border-color-disabled );--luzmo-stepper-buttons-background-color: var( --stepper-buttons-background-color-disabled );--luzmo-infield-button-border-width: var( --stepper-button-border-width-disabled );--luzmo-infield-button-border-color: var( --stepper-button-border-color-disabled );--luzmo-text-field-border-color-disabled: var( --stepper-button-border-color-disabled )}#text-field .input{border-color:var(--highcontrast-stepper-border-color, var(--luzmo-stepper-border-color, var(--stepper-border-color)));border-inline-end-width:0;border-start-end-radius:0;border-end-end-radius:0}#text-field.hide-stepper .input{border-inline-end-width:var(--luzmo-stepper-border-width, var(--stepper-border-width));border-start-end-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius));border-end-end-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius))}#text-field .buttons{box-sizing:border-box;font-size:var(--luzmo-stepper-button-font-size, var(--stepper-button-font-size));block-size:var(--luzmo-stepper-height, var(--stepper-height));inline-size:var(--luzmo-stepper-button-width, var(--stepper-button-width));border-color:var(--highcontrast-stepper-border-color, var(--luzmo-stepper-border-color, var(--stepper-border-color)));border-style:var(--luzmo-stepper-buttons-border-style, var(--stepper-buttons-border-style));border-width:var(--highcontrast-stepper-buttons-border-width, var(--luzmo-stepper-buttons-border-width, var(--stepper-buttons-border-width)));background-color:var(--highcontrast-stepper-buttons-background-color, var(--luzmo-stepper-buttons-background-color, var(--stepper-buttons-background-color)));transition:border-color var(--luzmo-stepper-animation-duration, var(--stepper-animation-duration)) ease-in-out;border-inline-start-width:0;border-start-end-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius));border-end-end-radius:var(--luzmo-stepper-border-radius, var(--stepper-border-radius));flex-direction:column;justify-content:center;display:flex}:host([quiet]) #text-field{border-start-start-radius:0;border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0}:host([quiet]) #text-field .input{--luzmo-text-field-focus-indicator-color: transparent}:host([quiet]) #text-field.hide-stepper .input{border-inline-end-width:0;border-end-end-radius:0}:host([quiet]) #text-field .buttons{--luzmo-infield-button-border-color: transparent;border-width:0;border-block-end-width:var(--luzmo-stepper-border-width, var(--stepper-border-width));border-block-end-color:var(--highcontrast-stepper-border-color, var(--luzmo-stepper-border-color, var(--stepper-border-color)));border-block-end-style:solid;border-end-end-radius:0}:host([quiet]) #text-field .button{--luzmo-infield-button-width-stacked: var( --luzmo-stepper-button-width-quiet, var(--stepper-button-width) );--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-quiet, var(--stepper-button-border-color-quiet) );--luzmo-infield-button-stacked-bottom-border-block-end-width: var( --luzmo-stepper-border-width, var(--stepper-border-width) );--luzmo-infield-button-stacked-bottom-border-radius-end-end: 0;--luzmo-infield-button-stacked-bottom-border-radius-end-start: 0;--luzmo-infield-button-fill-justify-content: flex-end;padding:0}:host([quiet]) #text-field .buttons,:host([quiet]) #text-field .input{background-color:initial}:host([quiet][focused]) #text-field,:host([quiet]) #text-field:focus{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-focus, var(--luzmo-stepper-border-color-focus, var(--stepper-border-color-focus)) )}:host([quiet][keyboard-focused]:not([disabled])) #text-field{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-keyboard-focus, var( --luzmo-stepper-border-color-keyboard-focus, var(--stepper-border-color-keyboard-focus) ) );outline:none}:host([quiet][keyboard-focused]:not([disabled])) #text-field:after{background-color:var(--highcontrast-stepper-focus-indicator-color, var(--luzmo-stepper-focus-indicator-color, var(--stepper-focus-indicator-color)))}@media (hover: hover){:host(:hover:not([disabled])) #text-field{--luzmo-stepper-border-color: var( --highcontrast-stepper-border-color-hover, var(--luzmo-stepper-border-color-hover, var(--stepper-border-color-hover)) );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-hover, var( --luzmo-stepper-buttons-border-color-hover, var(--stepper-buttons-border-color-hover) ) )}:host([focused]:hover) #text-field,:host(:hover) #text-field:focus{--luzmo-stepper-border-color: var( --highcontrast-stepper-border-color-focus-hover, var( --luzmo-stepper-buttons-border-color-focus-hover, var(--stepper-buttons-border-color-focus-hover) ) );--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-focus-hover, var( --luzmo-stepper-buttons-border-color-focus-hover, var(--stepper-buttons-border-color-focus-hover) ) )}:host([focused]:hover) #text-field .buttons,:host([focused]:hover) #text-field .input,:host(:hover) #text-field:focus .buttons,:host(:hover) #text-field:focus .input{border-color:var(--highcontrast-stepper-border-color-focus-hover, var(--luzmo-stepper-border-color-focus-hover, var(--stepper-border-color-focus-hover)))}:host([invalid]:not([disabled]):hover) #text-field{--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-hover-invalid, var(--stepper-border-color-hover-invalid) )}:host([invalid][focused]:not([disabled]):hover) #text-field,:host([invalid]:not([disabled]):hover) #text-field:focus{--luzmo-infield-button-border-color: var( --luzmo-stepper-border-color-focus-hover-invalid, var(--stepper-border-color-focus-hover-invalid) )}:host([quiet]:not([disabled]):hover) #text-field{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-hover, var(--luzmo-stepper-border-color-hover, var(--stepper-border-color-hover)) )}:host([quiet]:not([disabled]):hover) #text-field .buttons{background-color:initial}:host([quiet][focused]:hover) #text-field,:host([quiet]:hover) #text-field:focus{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-focus-hover, var( --luzmo-stepper-border-color-focus-hover, var(--stepper-border-color-focus-hover) ) )}:host([quiet][keyboard-focused]:not([disabled]):hover) #text-field{--luzmo-infield-button-border-color: var( --highcontrast-stepper-border-color-hover, var(--luzmo-stepper-border-color-hover, var(--stepper-border-color-hover)) )}}:host([invalid]) #text-field .icon,:host([valid]) #text-field .icon{inset-inline-end:calc(var(--stepper-button-width) + var(--luzmo-text-field-icon-spacing-inline-end-invalid, var(--text-field-icon-spacing-inline-end-invalid)))}@media (forced-colors: active){:host{--highcontrast-stepper-border-color: CanvasText;--highcontrast-stepper-border-color-hover: Highlight;--highcontrast-stepper-border-color-focus: Highlight;--highcontrast-stepper-border-color-focus-hover: Highlight;--highcontrast-stepper-border-color-keyboard-focus: CanvasText;--highcontrast-stepper-button-background-color-default: Canvas;--highcontrast-stepper-button-background-color-hover: Canvas;--highcontrast-stepper-button-background-color-focus: Canvas;--highcontrast-stepper-button-background-color-keyboard-focus: Canvas;--highcontrast-stepper-focus-indicator-color: Highlight}:host([invalid]) #text-field{--highcontrast-stepper-border-color: Highlight;--highcontrast-stepper-border-color-hover: Highlight;--highcontrast-stepper-border-color-focus: Highlight;--highcontrast-stepper-border-color-focus-hover: Highlight;--highcontrast-stepper-border-color-keyboard-focus: Highlight;--highcontrast-infield-button-border-color: Highlight}:host([disabled]) #text-field{--highcontrast-stepper-border-color: GrayText;--highcontrast-infield-button-border-color: GrayText;--highcontrast-stepper-buttons-border-width: var( --luzmo-stepper-border-width, var(--stepper-border-width) )}}:host{--text-field-minimum-width-multiplier: 1.75;--stepper-border-width: var(--luzmo-border-width);--stepper-border-color: var(--luzmo-border-color);--stepper-border-color-hover: var(--luzmo-border-color-full-hover);--stepper-border-color-focus: var(--luzmo-border-color-full-focus);--stepper-border-color-focus-hover: var(--luzmo-border-color-full-focus);--stepper-border-color-keyboard-focus: var(--luzmo-border-color-full-focus);--stepper-border-radius: var(--luzmo-border-radius);--stepper-min-width-multiplier: 1.5;--stepper-animation-duration: var(--luzmo-animation-duration);--stepper-buttons-background-color: var(--luzmo-background-color);--stepper-buttons-border-style: none;--stepper-buttons-border-width: 0;--stepper-buttons-border-color: var(--luzmo-border-color);--stepper-buttons-border-color-hover: var(--luzmo-border-color-full-hover);--stepper-buttons-border-color-focus: var(--luzmo-border-color-full-focus);--stepper-buttons-border-color-keyboard-focus: var( --luzmo-border-color-focus );--stepper-button-font-size: var(--luzmo-font-size);--stepper-button-padding: 0px;--stepper-button-border-radius-reset: 0;--stepper-button-border-width: var(--luzmo-border-width);--stepper-button-background-color-focus: var(--luzmo-background-color-focus);--stepper-button-background-color-keyboard-focus: var( --luzmo-background-color-focus );--stepper-border-color-invalid: var(--luzmo-negative-color);--stepper-border-color-hover-invalid: var(--luzmo-negative-color-hover);--stepper-border-color-focus-invalid: var(--luzmo-negative-color-focus);--stepper-border-color-focus-hover-invalid: var(--luzmo-negative-color-focus);--stepper-border-color-keyboard-focus-invalid: var( --luzmo-negative-color-focus );--stepper-focus-indicator-width: var(--luzmo-indicator-width);--stepper-focus-indicator-gap: calc(-1 * var(--luzmo-border-width));--stepper-focus-indicator-color: var(--luzmo-indicator-color);--stepper-button-border-color-quiet: transparent;--stepper-button-border-color-disabled: var(--luzmo-border-color-disabled);--stepper-button-border-width-disabled: var(--luzmo-border-width);--stepper-buttons-background-color-disabled: var( --luzmo-background-color-disabled );--stepper-button-width: 28px;--stepper-height: var(--luzmo-component-height)}:host([size=s]) #text-field{--stepper-button-width: 16px;--stepper-height: var(--luzmo-component-height-s)}:host([size=m]) #text-field{--stepper-button-width: 20px;--stepper-height: var(--luzmo-component-height)}:host([size=l]) #text-field{--stepper-button-width: 28px;--stepper-height: var(--luzmo-component-height-l)}:host([size=xl]) #text-field{--stepper-button-width: 36px;--stepper-height: var(--luzmo-component-height-xl)}:host{inline-size:var(--luzmo-stepper-width, var(--stepper-width));--swc-number-field-width: calc( var(--luzmo-stepper-height, var(--stepper-height)) * var( --luzmo-stepper-min-width-multiplier, var(--text-field-minimum-width-multiplier) ) + var(--luzmo-stepper-button-width, var(--stepper-button-width)) + var(--luzmo-stepper-border-width, var(--stepper-border-width)) * 2 );--luzmo-infield-button-border-width: var(--unset-value-resets-inheritance);--stepper-width: var(--swc-number-field-width)}:host([size=s]){--stepper-width: calc(var(--swc-number-field-width) / 5 * 4);--stepper-button-font-size: var(--luzmo-font-size-s)}:host([size=l]){--stepper-width: calc(var(--swc-number-field-width) * 1.25);--stepper-button-font-size: var(--luzmo-font-size-l)}:host([size=xl]){--stepper-width: calc(var(--swc-number-field-width) * 1.25 * 1.25);--stepper-button-font-size: var(--luzmo-font-size-xl)}#text-field{inline-size:100%}.input{font-variant-numeric:tabular-nums}:host([readonly]) .buttons{pointer-events:none;visibility:hidden}:host([readonly]:not([disabled],[invalid],[focused],[keyboard-focused])) #text-field:hover .input{border-color:transparent}:host([hide-stepper]:not([quiet])) #text-field input{border:var(--luzmo-stepper-border-width, var(--stepper-border-width)) solid var(--luzmo-stepper-border-color, var(--stepper-border-color));border-radius:var(--luzmo-border-radius)}:host([quiet]) #text-field .button{--luzmo-infield-button-border-color: var( --luzmo-infield-border-color-quiet, transparent );--luzmo-infield-button-edge-to-fill: 0;--luzmo-infield-button-border-width: var( --luzmo-infield-button-border-width-quiet, 0 )}';
36
+ var R = Object.defineProperty, I = Object.getOwnPropertyDescriptor, a = (p, e, o, r) => {
37
+ for (var t = r > 1 ? void 0 : r ? I(e, o) : e, i = p.length - 1, u; i >= 0; i--)
38
+ (u = p[i]) && (t = (r ? u(e, o, t) : u(t)) || t);
39
+ return r && t && R(e, o, t), t;
46
40
  };
47
- const FRAMES_PER_CHANGE = 5;
48
- const CHANGE_DEBOUNCE_MS = 100;
49
- const indeterminatePlaceholder = "-";
50
- const remapMultiByteCharacters = {
41
+ const $ = 5, O = 100, h = "-", x = {
51
42
  "1": "1",
52
43
  "2": "2",
53
44
  "3": "3",
@@ -76,43 +67,22 @@ const remapMultiByteCharacters = {
76
67
  九: "9",
77
68
  零: "0"
78
69
  };
79
- class LuzmoNumberField extends LuzmoTextFieldBase {
70
+ class l extends S {
80
71
  constructor() {
81
- super(...arguments);
82
- this.focused = false;
83
- this._forcedUnit = "";
84
- this.formatOptions = {};
85
- this.hideStepper = false;
86
- this.indeterminate = false;
87
- this.keyboardFocused = false;
88
- this.managedInput = false;
89
- this.stepModifier = 10;
90
- this._value = Number.NaN;
91
- this._trackingValue = "";
92
- this.decimalsChars = /* @__PURE__ */ new Set([".", ","]);
93
- this.valueBeforeFocus = "";
94
- this.isIntentDecimal = false;
95
- this.changeCount = 0;
96
- this.languageResolver = new LanguageResolutionController(this);
97
- this.wasIndeterminate = false;
98
- this.hasRecentlyReceivedPointerDown = false;
99
- this.applyFocusElementLabel = (value) => {
100
- this.appliedLabel = value;
101
- };
102
- this.isComposing = false;
72
+ super(...arguments), this.focused = !1, this._forcedUnit = "", this.formatOptions = {}, this.hideStepper = !1, this.indeterminate = !1, this.keyboardFocused = !1, this.managedInput = !1, this.stepModifier = 10, this._value = Number.NaN, this._trackingValue = "", this.decimalsChars = /* @__PURE__ */ new Set([".", ","]), this.valueBeforeFocus = "", this.isIntentDecimal = !1, this.changeCount = 0, this.languageResolver = new P(this), this.wasIndeterminate = !1, this.hasRecentlyReceivedPointerDown = !1, this.applyFocusElementLabel = (e) => {
73
+ this.appliedLabel = e;
74
+ }, this.isComposing = !1;
103
75
  }
104
76
  static get styles() {
105
- return [...super.styles, unsafeCSS(styles)];
77
+ return [...super.styles, C(D)];
106
78
  }
107
- set value(rawValue) {
108
- const value = this.validateInput(rawValue);
109
- if (value === this.value) {
79
+ set value(e) {
80
+ const o = this.validateInput(e);
81
+ if (o === this.value)
110
82
  return;
111
- }
112
- this.lastCommitedValue = value;
113
- const oldValue = this._value;
114
- this._value = value;
115
- this.requestUpdate("value", oldValue);
83
+ this.lastCommitedValue = o;
84
+ const r = this._value;
85
+ this._value = o, this.requestUpdate("value", r);
116
86
  }
117
87
  get value() {
118
88
  return this._value;
@@ -120,14 +90,9 @@ class LuzmoNumberField extends LuzmoTextFieldBase {
120
90
  get inputValue() {
121
91
  return this.indeterminate ? this.formattedValue : this.inputElement.value;
122
92
  }
123
- setValue(newValue = this.value) {
124
- const previousValue = this.lastCommitedValue;
125
- this.value = newValue;
126
- if (previousValue === void 0 || previousValue === this.value) {
127
- return;
128
- }
129
- this.lastCommitedValue = this.value;
130
- this.dispatchEvent(new Event("change", { bubbles: true, composed: true }));
93
+ setValue(e = this.value) {
94
+ const o = this.lastCommitedValue;
95
+ this.value = e, !(o === void 0 || o === this.value) && (this.lastCommitedValue = this.value, this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 })));
131
96
  }
132
97
  /**
133
98
  * Retreive the value of the element parsed to a Number.
@@ -135,344 +100,213 @@ class LuzmoNumberField extends LuzmoTextFieldBase {
135
100
  get valueAsString() {
136
101
  return this._value.toString();
137
102
  }
138
- set valueAsString(value) {
139
- this.value = this.numberParser.parse(value);
103
+ set valueAsString(e) {
104
+ this.value = this.numberParser.parse(e);
140
105
  }
141
106
  get formattedValue() {
142
- if (Number.isNaN(this.value)) {
143
- return "";
144
- }
145
- return this.numberFormatter.format(this.value) + (this.focused ? "" : this._forcedUnit);
146
- }
147
- convertValueToNumber(inputValue) {
148
- let normalizedValue = [...inputValue].map((char) => remapMultiByteCharacters[char] || char).join("");
149
- const separators = [...this.valueBeforeFocus].filter(
150
- (char) => this.decimalsChars.has(char)
151
- );
152
- const uniqueSeparators = new Set(separators);
153
- if (isIOS() && this.inputElement.inputMode === "decimal" && normalizedValue !== this.valueBeforeFocus) {
154
- const parts = this.numberFormatter.formatToParts(1000.1);
155
- const replacementDecimal = parts.find(
156
- (part) => part.type === "decimal"
107
+ return Number.isNaN(this.value) ? "" : this.numberFormatter.format(this.value) + (this.focused ? "" : this._forcedUnit);
108
+ }
109
+ convertValueToNumber(e) {
110
+ let o = [...e].map((i) => x[i] || i).join("");
111
+ const r = [...this.valueBeforeFocus].filter(
112
+ (i) => this.decimalsChars.has(i)
113
+ ), t = new Set(r);
114
+ if (g() && this.inputElement.inputMode === "decimal" && o !== this.valueBeforeFocus) {
115
+ const u = this.numberFormatter.formatToParts(1000.1).find(
116
+ (d) => d.type === "decimal"
157
117
  ).value;
158
- for (const separator of uniqueSeparators) {
159
- const isDecimalSeparator = separator === replacementDecimal;
160
- if (!isDecimalSeparator && !this.isIntentDecimal) {
161
- normalizedValue = normalizedValue.replaceAll(
162
- new RegExp(separator, "g"),
163
- ""
164
- );
165
- }
166
- }
167
- let hasReplacedDecimal = false;
168
- const valueChars = [...normalizedValue];
169
- for (let index = valueChars.length - 1; index >= 0; index--) {
170
- const char = valueChars[index];
171
- if (this.decimalsChars.has(char)) {
172
- if (hasReplacedDecimal) {
173
- valueChars[index] = "";
174
- } else {
175
- valueChars[index] = replacementDecimal;
176
- hasReplacedDecimal = true;
177
- }
178
- }
118
+ for (const d of t)
119
+ !(d === u) && !this.isIntentDecimal && (o = o.replaceAll(
120
+ new RegExp(d, "g"),
121
+ ""
122
+ ));
123
+ let c = !1;
124
+ const s = [...o];
125
+ for (let d = s.length - 1; d >= 0; d--) {
126
+ const m = s[d];
127
+ this.decimalsChars.has(m) && (c ? s[d] = "" : (s[d] = u, c = !0));
179
128
  }
180
- normalizedValue = valueChars.join("");
129
+ o = s.join("");
181
130
  }
182
- return this.numberParser.parse(normalizedValue);
131
+ return this.numberParser.parse(o);
183
132
  }
184
133
  get _step() {
185
- var _a;
186
- if (this.step !== void 0) {
187
- return this.step;
188
- }
189
- if (((_a = this.formatOptions) == null ? void 0 : _a.style) === "percent") {
190
- return 0.01;
191
- }
192
- return 1;
134
+ var e;
135
+ return this.step !== void 0 ? this.step : ((e = this.formatOptions) == null ? void 0 : e.style) === "percent" ? 0.01 : 1;
193
136
  }
194
- handlePointerdown(event) {
195
- if (event.button !== 0) {
196
- event.preventDefault();
137
+ handlePointerdown(e) {
138
+ if (e.button !== 0) {
139
+ e.preventDefault();
197
140
  return;
198
141
  }
199
- this.managedInput = true;
200
- this.buttons.setPointerCapture(event.pointerId);
201
- const stepUpRect = this.buttons.children[0].getBoundingClientRect();
202
- const stepDownRect = this.buttons.children[1].getBoundingClientRect();
203
- this.findChange = (changeEvent) => {
204
- if (changeEvent.clientX >= stepUpRect.x && changeEvent.clientY >= stepUpRect.y && changeEvent.clientX <= stepUpRect.x + stepUpRect.width && changeEvent.clientY <= stepUpRect.y + stepUpRect.height) {
205
- this.change = (incrementChangeEvent) => this.increment(incrementChangeEvent.shiftKey ? this.stepModifier : 1);
206
- } else if (changeEvent.clientX >= stepDownRect.x && changeEvent.clientY >= stepDownRect.y && changeEvent.clientX <= stepDownRect.x + stepDownRect.width && changeEvent.clientY <= stepDownRect.y + stepDownRect.height) {
207
- this.change = (decrementChangeEvent) => this.decrement(decrementChangeEvent.shiftKey ? this.stepModifier : 1);
208
- }
209
- };
210
- this.findChange(event);
211
- this.startChange(event);
212
- }
213
- startChange(event) {
214
- this.changeCount = 0;
215
- this.doChange(event);
216
- this.safty = setTimeout(() => {
217
- this.doNextChange(event);
142
+ this.managedInput = !0, this.buttons.setPointerCapture(e.pointerId);
143
+ const o = this.buttons.children[0].getBoundingClientRect(), r = this.buttons.children[1].getBoundingClientRect();
144
+ this.findChange = (t) => {
145
+ t.clientX >= o.x && t.clientY >= o.y && t.clientX <= o.x + o.width && t.clientY <= o.y + o.height ? this.change = (i) => this.increment(i.shiftKey ? this.stepModifier : 1) : t.clientX >= r.x && t.clientY >= r.y && t.clientX <= r.x + r.width && t.clientY <= r.y + r.height && (this.change = (i) => this.decrement(i.shiftKey ? this.stepModifier : 1));
146
+ }, this.findChange(e), this.startChange(e);
147
+ }
148
+ startChange(e) {
149
+ this.changeCount = 0, this.doChange(e), this.safty = setTimeout(() => {
150
+ this.doNextChange(e);
218
151
  }, 400);
219
152
  }
220
- doChange(event) {
221
- this.change(event);
153
+ doChange(e) {
154
+ this.change(e);
222
155
  }
223
- handlePointermove(event) {
224
- this.findChange(event);
156
+ handlePointermove(e) {
157
+ this.findChange(e);
225
158
  }
226
- handlePointerup(event) {
227
- this.buttons.releasePointerCapture(event.pointerId);
228
- cancelAnimationFrame(this.nextChange);
229
- clearTimeout(this.safty);
230
- this.managedInput = false;
231
- this.setValue();
159
+ handlePointerup(e) {
160
+ this.buttons.releasePointerCapture(e.pointerId), cancelAnimationFrame(this.nextChange), clearTimeout(this.safty), this.managedInput = !1, this.setValue();
232
161
  }
233
- doNextChange(event) {
234
- this.changeCount += 1;
235
- if (this.changeCount % FRAMES_PER_CHANGE === 0) {
236
- this.doChange(event);
237
- }
238
- return requestAnimationFrame(() => {
239
- this.nextChange = this.doNextChange(event);
162
+ doNextChange(e) {
163
+ return this.changeCount += 1, this.changeCount % $ === 0 && this.doChange(e), requestAnimationFrame(() => {
164
+ this.nextChange = this.doNextChange(e);
240
165
  });
241
166
  }
242
- stepBy(count) {
243
- if (this.disabled || this.readonly) {
244
- return;
245
- }
246
- const min = this.min === void 0 ? 0 : this.min;
247
- let value = this.value;
248
- value += count * this._step;
249
- if (Number.isNaN(this.value)) {
250
- value = min;
251
- }
252
- value = this.valueWithLimits(value);
253
- this.requestUpdate();
254
- this._value = this.validateInput(value);
255
- this.inputElement.value = this.numberFormatter.format(value);
256
- this.inputElement.dispatchEvent(
257
- new Event("input", { bubbles: true, composed: true })
258
- );
259
- this.indeterminate = false;
260
- this.focus();
261
- }
262
- increment(factor = 1) {
263
- this.stepBy(1 * factor);
264
- }
265
- decrement(factor = 1) {
266
- this.stepBy(-1 * factor);
267
- }
268
- handleKeydown(event) {
269
- if (this.isComposing) {
167
+ stepBy(e) {
168
+ if (this.disabled || this.readonly)
270
169
  return;
271
- }
272
- switch (event.code) {
273
- case "ArrowUp": {
274
- event.preventDefault();
275
- this.increment(event.shiftKey ? this.stepModifier : 1);
276
- this.setValue();
277
- break;
278
- }
279
- case "ArrowDown": {
280
- event.preventDefault();
281
- this.decrement(event.shiftKey ? this.stepModifier : 1);
282
- this.setValue();
283
- break;
170
+ const o = this.min === void 0 ? 0 : this.min;
171
+ let r = this.value;
172
+ r += e * this._step, Number.isNaN(this.value) && (r = o), r = this.valueWithLimits(r), this.requestUpdate(), this._value = this.validateInput(r), this.inputElement.value = this.numberFormatter.format(r), this.inputElement.dispatchEvent(
173
+ new Event("input", { bubbles: !0, composed: !0 })
174
+ ), this.indeterminate = !1, this.focus();
175
+ }
176
+ increment(e = 1) {
177
+ this.stepBy(1 * e);
178
+ }
179
+ decrement(e = 1) {
180
+ this.stepBy(-1 * e);
181
+ }
182
+ handleKeydown(e) {
183
+ if (!this.isComposing)
184
+ switch (e.code) {
185
+ case "ArrowUp": {
186
+ e.preventDefault(), this.increment(e.shiftKey ? this.stepModifier : 1), this.setValue();
187
+ break;
188
+ }
189
+ case "ArrowDown": {
190
+ e.preventDefault(), this.decrement(e.shiftKey ? this.stepModifier : 1), this.setValue();
191
+ break;
192
+ }
284
193
  }
285
- }
286
194
  }
287
- onScroll(event) {
288
- event.preventDefault();
289
- this.managedInput = true;
290
- const direction = event.shiftKey ? event.deltaX / Math.abs(event.deltaX) : event.deltaY / Math.abs(event.deltaY);
291
- if (direction !== 0 && !Number.isNaN(direction)) {
292
- this.stepBy(direction * (event.shiftKey ? this.stepModifier : 1));
293
- clearTimeout(this.queuedChangeEvent);
294
- this.queuedChangeEvent = setTimeout(() => {
295
- this.setValue();
296
- }, CHANGE_DEBOUNCE_MS);
297
- }
298
- this.managedInput = false;
195
+ onScroll(e) {
196
+ e.preventDefault(), this.managedInput = !0;
197
+ const o = e.shiftKey ? e.deltaX / Math.abs(e.deltaX) : e.deltaY / Math.abs(e.deltaY);
198
+ o !== 0 && !Number.isNaN(o) && (this.stepBy(o * (e.shiftKey ? this.stepModifier : 1)), clearTimeout(this.queuedChangeEvent), this.queuedChangeEvent = setTimeout(() => {
199
+ this.setValue();
200
+ }, O)), this.managedInput = !1;
299
201
  }
300
202
  onFocus() {
301
- super.onFocus();
302
- this._trackingValue = this.inputValue;
303
- this.keyboardFocused = !this.readonly && true;
304
- this.addEventListener("wheel", this.onScroll, { passive: false });
305
- this.valueBeforeFocus = this.inputElement.value;
306
- }
307
- onBlur(_event) {
308
- super.onBlur(_event);
309
- this.keyboardFocused = !this.readonly && false;
310
- this.removeEventListener("wheel", this.onScroll);
311
- this.isIntentDecimal = false;
203
+ super.onFocus(), this._trackingValue = this.inputValue, this.keyboardFocused = !this.readonly && !0, this.addEventListener("wheel", this.onScroll, { passive: !1 }), this.valueBeforeFocus = this.inputElement.value;
204
+ }
205
+ onBlur(e) {
206
+ super.onBlur(e), this.keyboardFocused = !this.readonly && !1, this.removeEventListener("wheel", this.onScroll), this.isIntentDecimal = !1;
312
207
  }
313
208
  handleFocusin() {
314
- this.focused = !this.readonly && true;
315
- this.keyboardFocused = !this.readonly && true;
209
+ this.focused = !this.readonly && !0, this.keyboardFocused = !this.readonly && !0;
316
210
  }
317
211
  handleFocusout() {
318
- this.focused = !this.readonly && false;
319
- this.keyboardFocused = !this.readonly && false;
212
+ this.focused = !this.readonly && !1, this.keyboardFocused = !this.readonly && !1;
320
213
  }
321
214
  handleChange() {
322
- const value = this.convertValueToNumber(this.inputValue);
323
- if (this.wasIndeterminate) {
324
- this.wasIndeterminate = false;
325
- this.indeterminateValue = void 0;
326
- if (Number.isNaN(value)) {
327
- this.indeterminate = true;
328
- return;
329
- }
215
+ const e = this.convertValueToNumber(this.inputValue);
216
+ if (this.wasIndeterminate && (this.wasIndeterminate = !1, this.indeterminateValue = void 0, Number.isNaN(e))) {
217
+ this.indeterminate = !0;
218
+ return;
330
219
  }
331
- this.setValue(value);
332
- this.inputElement.value = this.formattedValue;
220
+ this.setValue(e), this.inputElement.value = this.formattedValue;
333
221
  }
334
222
  handleCompositionStart() {
335
- this.isComposing = true;
223
+ this.isComposing = !0;
336
224
  }
337
225
  handleCompositionEnd() {
338
- this.isComposing = false;
339
- requestAnimationFrame(() => {
226
+ this.isComposing = !1, requestAnimationFrame(() => {
340
227
  this.inputElement.dispatchEvent(
341
228
  new Event("input", {
342
- composed: true,
343
- bubbles: true
229
+ composed: !0,
230
+ bubbles: !0
344
231
  })
345
232
  );
346
233
  });
347
234
  }
348
235
  handleInputElementPointerdown() {
349
- this.hasRecentlyReceivedPointerDown = true;
350
- this.updateComplete.then(() => {
236
+ this.hasRecentlyReceivedPointerDown = !0, this.updateComplete.then(() => {
351
237
  requestAnimationFrame(() => {
352
- this.hasRecentlyReceivedPointerDown = false;
238
+ this.hasRecentlyReceivedPointerDown = !1;
353
239
  });
354
240
  });
355
241
  }
356
- handleInput(event) {
242
+ handleInput(e) {
357
243
  if (this.isComposing) {
358
- if (event.data) {
359
- const partialValue = this.convertValueToNumber(event.data);
360
- if (Number.isNaN(partialValue)) {
361
- this.inputElement.value = this.indeterminate ? indeterminatePlaceholder : this._trackingValue;
362
- this.isComposing = false;
363
- }
244
+ if (e.data) {
245
+ const s = this.convertValueToNumber(e.data);
246
+ Number.isNaN(s) && (this.inputElement.value = this.indeterminate ? h : this._trackingValue, this.isComposing = !1);
364
247
  }
365
- event.stopPropagation();
248
+ e.stopPropagation();
366
249
  return;
367
250
  }
368
- if (this.indeterminate) {
369
- this.wasIndeterminate = true;
370
- this.indeterminateValue = this.value;
371
- this.inputElement.value = this.inputElement.value.replace(
372
- indeterminatePlaceholder,
373
- ""
374
- );
375
- }
376
- if (event.data && this.decimalsChars.has(event.data)) {
377
- this.isIntentDecimal = true;
378
- }
379
- const { value: originalValue, selectionStart } = this.inputElement;
380
- const value = [...originalValue].map((char) => remapMultiByteCharacters[char] || char).join("");
381
- if (this.numberParser.isValidPartialNumber(value)) {
251
+ this.indeterminate && (this.wasIndeterminate = !0, this.indeterminateValue = this.value, this.inputElement.value = this.inputElement.value.replace(
252
+ h,
253
+ ""
254
+ )), e.data && this.decimalsChars.has(e.data) && (this.isIntentDecimal = !0);
255
+ const { value: o, selectionStart: r } = this.inputElement, t = [...o].map((s) => x[s] || s).join("");
256
+ if (this.numberParser.isValidPartialNumber(t)) {
382
257
  this.lastCommitedValue = this.lastCommitedValue ?? this.value;
383
- const valueAsNumber = this.convertValueToNumber(value);
384
- if (!value && this.indeterminateValue) {
385
- this.indeterminate = true;
386
- this._value = this.indeterminateValue;
387
- } else {
388
- this.indeterminate = false;
389
- this._value = this.validateInput(valueAsNumber);
390
- }
391
- this._trackingValue = value;
392
- this.inputElement.value = value;
393
- this.inputElement.setSelectionRange(selectionStart, selectionStart);
258
+ const s = this.convertValueToNumber(t);
259
+ !t && this.indeterminateValue ? (this.indeterminate = !0, this._value = this.indeterminateValue) : (this.indeterminate = !1, this._value = this.validateInput(s)), this._trackingValue = t, this.inputElement.value = t, this.inputElement.setSelectionRange(r, r);
394
260
  return;
395
261
  }
396
- this.inputElement.value = this.indeterminate ? indeterminatePlaceholder : this._trackingValue;
397
- event.stopPropagation();
398
- const currentLength = value.length;
399
- const previousLength = this._trackingValue.length;
400
- const nextSelectStart = (selectionStart || currentLength) - (currentLength - previousLength);
401
- this.inputElement.setSelectionRange(nextSelectStart, nextSelectStart);
402
- }
403
- valueWithLimits(nextValue) {
404
- let value = nextValue;
405
- if (this.min !== void 0) {
406
- value = Math.max(this.min, value);
407
- }
408
- if (this.max !== void 0) {
409
- value = Math.min(this.max, value);
410
- }
411
- return value;
412
- }
413
- validateInput(value) {
414
- value = this.valueWithLimits(value);
415
- const signMultiplier = value < 0 ? -1 : 1;
416
- value *= signMultiplier;
417
- if (this.step) {
418
- const min = this.min === void 0 ? 0 : this.min;
419
- const moduloStep = Number.parseFloat(
420
- this.valueFormatter.format((value - min) % this.step)
262
+ this.inputElement.value = this.indeterminate ? h : this._trackingValue, e.stopPropagation();
263
+ const i = t.length, u = this._trackingValue.length, c = (r || i) - (i - u);
264
+ this.inputElement.setSelectionRange(c, c);
265
+ }
266
+ valueWithLimits(e) {
267
+ let o = e;
268
+ return this.min !== void 0 && (o = Math.max(this.min, o)), this.max !== void 0 && (o = Math.min(this.max, o)), o;
269
+ }
270
+ validateInput(e) {
271
+ e = this.valueWithLimits(e);
272
+ const o = e < 0 ? -1 : 1;
273
+ if (e *= o, this.step) {
274
+ const r = this.min === void 0 ? 0 : this.min, t = Number.parseFloat(
275
+ this.valueFormatter.format((e - r) % this.step)
421
276
  );
422
- const fallsOnStep = moduloStep === 0;
423
- if (!fallsOnStep) {
424
- const overUnder = Math.round(moduloStep / this.step);
425
- if (overUnder === 1) {
426
- value += this.step - moduloStep;
427
- } else {
428
- value -= moduloStep;
429
- }
430
- }
431
- if (this.max !== void 0) {
432
- while (value > this.max) {
433
- value -= this.step;
434
- }
435
- }
436
- value = Number.parseFloat(this.valueFormatter.format(value));
277
+ if (t === 0 || (Math.round(t / this.step) === 1 ? e += this.step - t : e -= t), this.max !== void 0)
278
+ for (; e > this.max; )
279
+ e -= this.step;
280
+ e = Number.parseFloat(this.valueFormatter.format(e));
437
281
  }
438
- value *= signMultiplier;
439
- return value;
282
+ return e *= o, e;
440
283
  }
441
284
  get displayValue() {
442
- const indeterminateValue = this.focused ? "" : indeterminatePlaceholder;
443
- return this.indeterminate ? indeterminateValue : this.formattedValue;
285
+ const e = this.focused ? "" : h;
286
+ return this.indeterminate ? e : this.formattedValue;
444
287
  }
445
288
  clearNumberFormatterCache() {
446
- this._numberFormatter = void 0;
447
- this._numberParser = void 0;
289
+ this._numberFormatter = void 0, this._numberParser = void 0;
448
290
  }
449
291
  get numberFormatter() {
450
292
  if (!this._numberFormatter || !this._numberFormatterFocused) {
451
293
  const {
452
- style,
453
- unit,
454
- unitDisplay,
455
- ...formatOptionsNoUnit
294
+ style: e,
295
+ unit: o,
296
+ unitDisplay: r,
297
+ ...t
456
298
  } = this.formatOptions;
457
- if (style !== "unit") {
458
- formatOptionsNoUnit.style = style;
459
- }
460
- this._numberFormatterFocused = new NumberFormatter(
299
+ e !== "unit" && (t.style = e), this._numberFormatterFocused = new b(
461
300
  this.languageResolver.language,
462
- formatOptionsNoUnit
301
+ t
463
302
  );
464
303
  try {
465
- this._numberFormatter = new NumberFormatter(
304
+ this._numberFormatter = new b(
466
305
  this.languageResolver.language,
467
306
  this.formatOptions
468
- );
469
- this._forcedUnit = "";
470
- this._numberFormatter.format(1);
307
+ ), this._forcedUnit = "", this._numberFormatter.format(1);
471
308
  } catch {
472
- if (style === "unit") {
473
- this._forcedUnit = unit;
474
- }
475
- this._numberFormatter = this._numberFormatterFocused;
309
+ e === "unit" && (this._forcedUnit = o), this._numberFormatter = this._numberFormatterFocused;
476
310
  }
477
311
  }
478
312
  return this.focused ? this._numberFormatterFocused : this._numberFormatter;
@@ -482,10 +316,10 @@ class LuzmoNumberField extends LuzmoTextFieldBase {
482
316
  }
483
317
  get valueFormatter() {
484
318
  if (!this._valueFormatter) {
485
- const digitsAfterDecimal = this.step ? this.step === Math.floor(this.step) ? 0 : this.step.toString().split(".")[1].length : 0;
486
- this._valueFormatter = new NumberFormatter("en", {
487
- useGrouping: false,
488
- maximumFractionDigits: digitsAfterDecimal
319
+ const e = this.step ? this.step === Math.floor(this.step) ? 0 : this.step.toString().split(".")[1].length : 0;
320
+ this._valueFormatter = new b("en", {
321
+ useGrouping: !1,
322
+ maximumFractionDigits: e
489
323
  });
490
324
  }
491
325
  return this._valueFormatter;
@@ -493,44 +327,35 @@ class LuzmoNumberField extends LuzmoTextFieldBase {
493
327
  get numberParser() {
494
328
  if (!this._numberParser || !this._numberParserFocused) {
495
329
  const {
496
- style,
497
- unit,
498
- unitDisplay,
499
- ...formatOptionsNoUnit
330
+ style: e,
331
+ unit: o,
332
+ unitDisplay: r,
333
+ ...t
500
334
  } = this.formatOptions;
501
- if (style !== "unit") {
502
- formatOptionsNoUnit.style = style;
503
- }
504
- this._numberParserFocused = new NumberParser(
335
+ e !== "unit" && (t.style = e), this._numberParserFocused = new f(
505
336
  this.languageResolver.language,
506
- formatOptionsNoUnit
337
+ t
507
338
  );
508
339
  try {
509
- this._numberParser = new NumberParser(
340
+ this._numberParser = new f(
510
341
  this.languageResolver.language,
511
342
  this.formatOptions
512
- );
513
- this._forcedUnit = "";
514
- this._numberParser.parse("0");
343
+ ), this._forcedUnit = "", this._numberParser.parse("0");
515
344
  } catch {
516
- if (style === "unit") {
517
- this._forcedUnit = unit;
518
- }
519
- this._numberParser = this._numberParserFocused;
345
+ e === "unit" && (this._forcedUnit = o), this._numberParser = this._numberParserFocused;
520
346
  }
521
347
  }
522
348
  return this.focused ? this._numberParserFocused : this._numberParser;
523
349
  }
524
350
  renderField() {
525
- this.autocomplete = "off";
526
- return html`
351
+ return this.autocomplete = "off", z`
527
352
  ${super.renderField()}
528
- ${this.hideStepper ? nothing : html`
353
+ ${this.hideStepper ? F : z`
529
354
  <span
530
355
  class="buttons"
531
356
  @focusin=${this.handleFocusin}
532
357
  @focusout=${this.handleFocusout}
533
- ${streamingListener({
358
+ ${q({
534
359
  start: ["pointerdown", this.handlePointerdown],
535
360
  streamInside: [
536
361
  [
@@ -560,7 +385,7 @@ class LuzmoNumberField extends LuzmoTextFieldBase {
560
385
  ?disabled=${this.disabled || this.readonly || this.max !== void 0 && this.value === this.max}
561
386
  ?quiet=${this.quiet}
562
387
  >
563
- ${luzmoIcon(luzmoAngleUp)}
388
+ ${v(y)}
564
389
  </luzmo-infield-button>
565
390
  <luzmo-infield-button
566
391
  inline="end"
@@ -574,96 +399,72 @@ class LuzmoNumberField extends LuzmoTextFieldBase {
574
399
  ?disabled=${this.disabled || this.readonly || this.min !== void 0 && this.value === this.min}
575
400
  ?quiet=${this.quiet}
576
401
  >
577
- ${luzmoIcon(luzmoAngleDown)}
402
+ ${v(k)}
578
403
  </luzmo-infield-button>
579
404
  </span>
580
405
  `}
581
406
  `;
582
407
  }
583
- update(changes) {
584
- if (changes.has("formatOptions") || changes.has("resolvedLanguage")) {
585
- this.clearNumberFormatterCache();
586
- }
587
- if (changes.has("value") || changes.has("max") || changes.has("min") || changes.has("step")) {
588
- const value = this.numberParser.parse(
408
+ update(e) {
409
+ if ((e.has("formatOptions") || e.has("resolvedLanguage")) && this.clearNumberFormatterCache(), e.has("value") || e.has("max") || e.has("min") || e.has("step")) {
410
+ const o = this.numberParser.parse(
589
411
  this.formattedValue.replace(this._forcedUnit, "")
590
412
  );
591
- this.value = value;
592
- this.clearValueFormatterCache();
413
+ this.value = o, this.clearValueFormatterCache();
593
414
  }
594
- super.update(changes);
415
+ super.update(e);
595
416
  }
596
- willUpdate(changes) {
597
- this.multiline = false;
598
- if (changes.has(languageResolverUpdatedSymbol)) {
599
- this.clearNumberFormatterCache();
600
- }
417
+ willUpdate(e) {
418
+ this.multiline = !1, e.has(E) && this.clearNumberFormatterCache();
601
419
  }
602
- firstUpdated(changes) {
603
- super.firstUpdated(changes);
604
- this.addEventListener("keydown", this.handleKeydown);
605
- this.addEventListener("compositionstart", this.handleCompositionStart);
606
- this.addEventListener("compositionend", this.handleCompositionEnd);
420
+ firstUpdated(e) {
421
+ super.firstUpdated(e), this.addEventListener("keydown", this.handleKeydown), this.addEventListener("compositionstart", this.handleCompositionStart), this.addEventListener("compositionend", this.handleCompositionEnd);
607
422
  }
608
- updated(changes) {
609
- if (!this.inputElement || !this.isConnected) {
610
- return;
611
- }
612
- if (changes.has("min") || changes.has("formatOptions")) {
613
- const hasOnlyPositives = this.min !== void 0 && this.min >= 0;
614
- const { maximumFractionDigits } = this.numberFormatter.resolvedOptions();
615
- const hasDecimals = maximumFractionDigits && maximumFractionDigits > 0;
616
- let inputMode = "numeric";
617
- if (isIPhone() && !hasOnlyPositives) {
618
- inputMode = "text";
619
- } else if (isIOS() && hasDecimals) {
620
- inputMode = "decimal";
621
- } else if (isAndroid() && hasDecimals && hasOnlyPositives) {
622
- inputMode = "decimal";
423
+ updated(e) {
424
+ if (!(!this.inputElement || !this.isConnected)) {
425
+ if (e.has("min") || e.has("formatOptions")) {
426
+ const o = this.min !== void 0 && this.min >= 0, { maximumFractionDigits: r } = this.numberFormatter.resolvedOptions(), t = r && r > 0;
427
+ let i = "numeric";
428
+ V() && !o ? i = "text" : (g() && t || N() && t && o) && (i = "decimal"), this.inputElement.inputMode = i;
623
429
  }
624
- this.inputElement.inputMode = inputMode;
625
- }
626
- if (changes.has("focused") && this.focused && !this.hasRecentlyReceivedPointerDown && !!this.formatOptions.unit) {
627
- this.setSelectionRange(0, this.displayValue.length);
430
+ e.has("focused") && this.focused && !this.hasRecentlyReceivedPointerDown && this.formatOptions.unit && this.setSelectionRange(0, this.displayValue.length);
628
431
  }
629
432
  }
630
433
  }
631
- __decorateClass([
632
- query(".buttons")
633
- ], LuzmoNumberField.prototype, "buttons", 2);
634
- __decorateClass([
635
- property({ type: Boolean, reflect: true })
636
- ], LuzmoNumberField.prototype, "focused", 2);
637
- __decorateClass([
638
- property({ type: Object, attribute: "format-options" })
639
- ], LuzmoNumberField.prototype, "formatOptions", 2);
640
- __decorateClass([
641
- property({ type: Boolean, reflect: true, attribute: "hide-stepper" })
642
- ], LuzmoNumberField.prototype, "hideStepper", 2);
643
- __decorateClass([
644
- property({ type: Boolean, reflect: true })
645
- ], LuzmoNumberField.prototype, "indeterminate", 2);
646
- __decorateClass([
647
- property({ type: Boolean, reflect: true, attribute: "keyboard-focused" })
648
- ], LuzmoNumberField.prototype, "keyboardFocused", 2);
649
- __decorateClass([
650
- property({ type: Number })
651
- ], LuzmoNumberField.prototype, "max", 2);
652
- __decorateClass([
653
- property({ type: Number })
654
- ], LuzmoNumberField.prototype, "min", 2);
655
- __decorateClass([
656
- property({ type: Number })
657
- ], LuzmoNumberField.prototype, "step", 2);
658
- __decorateClass([
659
- property({ type: Number, reflect: true, attribute: "step-modifier" })
660
- ], LuzmoNumberField.prototype, "stepModifier", 2);
661
- __decorateClass([
662
- property({ type: Number })
663
- ], LuzmoNumberField.prototype, "value", 1);
664
- if (!customElements.get("luzmo-number-field")) {
665
- customElements.define("luzmo-number-field", LuzmoNumberField);
666
- }
434
+ a([
435
+ _(".buttons")
436
+ ], l.prototype, "buttons", 2);
437
+ a([
438
+ n({ type: Boolean, reflect: !0 })
439
+ ], l.prototype, "focused", 2);
440
+ a([
441
+ n({ type: Object, attribute: "format-options" })
442
+ ], l.prototype, "formatOptions", 2);
443
+ a([
444
+ n({ type: Boolean, reflect: !0, attribute: "hide-stepper" })
445
+ ], l.prototype, "hideStepper", 2);
446
+ a([
447
+ n({ type: Boolean, reflect: !0 })
448
+ ], l.prototype, "indeterminate", 2);
449
+ a([
450
+ n({ type: Boolean, reflect: !0, attribute: "keyboard-focused" })
451
+ ], l.prototype, "keyboardFocused", 2);
452
+ a([
453
+ n({ type: Number })
454
+ ], l.prototype, "max", 2);
455
+ a([
456
+ n({ type: Number })
457
+ ], l.prototype, "min", 2);
458
+ a([
459
+ n({ type: Number })
460
+ ], l.prototype, "step", 2);
461
+ a([
462
+ n({ type: Number, reflect: !0, attribute: "step-modifier" })
463
+ ], l.prototype, "stepModifier", 2);
464
+ a([
465
+ n({ type: Number })
466
+ ], l.prototype, "value", 1);
467
+ customElements.get("luzmo-number-field") || customElements.define("luzmo-number-field", l);
667
468
  export {
668
- LuzmoNumberField
469
+ l as LuzmoNumberField
669
470
  };