@luzmo/lucero 1.0.1-alpha.15 → 1.0.1-alpha.16

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 (277) hide show
  1. package/components/accordion/index.cjs +183 -6
  2. package/components/accordion/index.js +136 -88
  3. package/components/action-bar/index.cjs +85 -4
  4. package/components/action-bar/index.js +72 -50
  5. package/components/action-button/index.cjs +205 -3
  6. package/components/action-button/index.js +167 -93
  7. package/components/action-group/index.cjs +7 -1
  8. package/components/action-group/index.js +12 -8
  9. package/components/action-group-DHp8RHDf.js +392 -0
  10. package/components/action-group-MPf19RPV.cjs +391 -0
  11. package/components/action-menu/index.cjs +91 -11
  12. package/components/action-menu/index.js +66 -47
  13. package/components/avatar/index.cjs +63 -3
  14. package/components/avatar/index.js +54 -42
  15. package/components/base-COw9n7UR.cjs +119 -0
  16. package/components/base-DmeVy0cq.js +120 -0
  17. package/components/button/index.cjs +134 -2
  18. package/components/button/index.js +106 -72
  19. package/components/button-base-7Ak55xFd.cjs +206 -0
  20. package/components/button-base-C3kf6BTK.js +207 -0
  21. package/components/button-group/index.cjs +45 -1
  22. package/components/button-group/index.js +37 -25
  23. package/components/calendar/index.cjs +632 -1
  24. package/components/calendar/index.js +637 -7
  25. package/components/checkbox/index.cjs +111 -4
  26. package/components/checkbox/index.js +98 -53
  27. package/components/checkbox-mixin-8cL-vfDy.js +84 -0
  28. package/components/checkbox-mixin-CE7dJj3J.cjs +83 -0
  29. package/components/clear-button-Co6oKSgl.js +59 -0
  30. package/components/clear-button-X_HDY2eH.cjs +58 -0
  31. package/components/close-button-DPBK6Kpu.cjs +59 -0
  32. package/components/close-button-Miw9ZjoJ.js +60 -0
  33. package/components/color-area/index.cjs +440 -13
  34. package/components/color-area/index.js +322 -187
  35. package/components/color-controller-BjDZaxhX.js +491 -0
  36. package/components/color-controller-C3c_vb2P.cjs +490 -0
  37. package/components/color-field/index.cjs +95 -2
  38. package/components/color-field/index.js +77 -41
  39. package/components/color-handle/index.cjs +64 -3
  40. package/components/color-handle/index.js +58 -37
  41. package/components/color-loupe/index.cjs +7 -1
  42. package/components/color-loupe/index.js +12 -8
  43. package/components/color-loupe-BQqNR8YD.cjs +88 -0
  44. package/components/color-loupe-B_DDFv8l.js +89 -0
  45. package/components/color-menu/index.cjs +217 -12
  46. package/components/color-menu/index.js +187 -93
  47. package/components/color-palette/index.cjs +89 -1
  48. package/components/color-palette/index.js +78 -51
  49. package/components/color-palette-group/index.cjs +259 -3
  50. package/components/color-palette-group/index.js +193 -105
  51. package/components/color-picker/index.cjs +114 -6
  52. package/components/color-picker/index.js +92 -72
  53. package/components/color-slider/index.cjs +585 -1
  54. package/components/color-slider/index.js +590 -7
  55. package/components/{directive-oAbCiebi.js → condition-attribute-with-id-Cn815e9W.js} +22 -22
  56. package/components/condition-attribute-with-id-DEc2Yjne.cjs +43 -0
  57. package/components/date-time-picker/index.cjs +1357 -31
  58. package/components/date-time-picker/index.js +951 -637
  59. package/components/dependency-manger-CcIE1uvQ.cjs +63 -0
  60. package/components/{dependency-manger-CEXvGQUV.js → dependency-manger-XHpQjFgK.js} +24 -14
  61. package/components/divider/index.cjs +54 -1
  62. package/components/divider/index.js +49 -30
  63. package/components/divider.module-Cm5LcDRV.cjs +20 -0
  64. package/components/divider.module-DauH6k2_.js +21 -0
  65. package/components/element-resolution-DCsrhGZO.cjs +112 -0
  66. package/components/element-resolution-nMlmW4Jy.js +113 -0
  67. package/components/field-group/index.cjs +7 -1
  68. package/components/field-group/index.js +12 -8
  69. package/components/field-group-DNmY8W9v.cjs +86 -0
  70. package/components/field-group-DVdAWCQF.js +87 -0
  71. package/components/field-label/index.cjs +7 -1
  72. package/components/field-label/index.js +12 -8
  73. package/components/field-label-CKH9EXpR.cjs +156 -0
  74. package/components/field-label-Dpsecoc6.js +157 -0
  75. package/components/focus-group-BqDAk9Is.js +337 -0
  76. package/components/focus-group-DFzOlalL.cjs +336 -0
  77. package/components/focus-visible-B-B8-P9R.cjs +104 -0
  78. package/components/focus-visible-BUPRWlsh.js +105 -0
  79. package/components/focusable-BPrTcZPd.cjs +262 -0
  80. package/components/focusable-ChCLg1k4.js +263 -0
  81. package/components/{directive-C7oCP5Bh.cjs → focusable-selectors-D0t_5P7C.cjs} +16 -5
  82. package/components/{focusable-selectors-B4YgbghQ.js → focusable-selectors-IltOAOd9.js} +7 -4
  83. package/components/icon/index.cjs +90 -1
  84. package/components/icon/index.js +74 -46
  85. package/components/index.cjs +174 -1
  86. package/components/index.js +174 -172
  87. package/components/infield-button/index.cjs +46 -2
  88. package/components/infield-button/index.js +41 -30
  89. package/components/label/index.cjs +37 -1
  90. package/components/label/index.js +36 -24
  91. package/components/{language-resolution-8yZa5r_P.js → language-resolution-BSGJAWiQ.js} +21 -16
  92. package/components/language-resolution-iN9EImbb.cjs +57 -0
  93. package/components/like-anchor-D62faRNG.cjs +79 -0
  94. package/components/like-anchor-v3cJ9RWM.js +80 -0
  95. package/components/manage-help-text-BYx84zZR.cjs +125 -0
  96. package/components/manage-help-text-DOuMTGht.js +126 -0
  97. package/components/menu/index.cjs +1297 -29
  98. package/components/menu/index.js +954 -499
  99. package/components/multi-language-field/index.cjs +132 -2
  100. package/components/multi-language-field/index.js +118 -88
  101. package/components/number-field/index.cjs +613 -10
  102. package/components/number-field/index.js +442 -243
  103. package/components/observe-slot-presence-9AwLGUQ_.cjs +78 -0
  104. package/components/observe-slot-presence-DcMdoumP.js +79 -0
  105. package/components/observe-slot-text-CSofZeeF.cjs +104 -0
  106. package/components/observe-slot-text-CjnkkBPn.js +105 -0
  107. package/components/options/index.cjs +693 -60
  108. package/components/options/index.js +519 -953
  109. package/components/overlay/index.cjs +367 -21
  110. package/components/overlay/index.js +273 -189
  111. package/components/overlay-CN8ISP1F.js +2485 -0
  112. package/components/overlay-LViy9VWM.cjs +2484 -0
  113. package/components/{pending-state-DTX7ggyF.js → pending-state-CXbe-Xul.js} +28 -13
  114. package/components/pending-state-e4RbXe9u.cjs +75 -0
  115. package/components/picker/index.cjs +9 -1
  116. package/components/picker/index.js +15 -11
  117. package/components/picker-DNde3awt.cjs +672 -0
  118. package/components/picker-PfUAF05y.js +673 -0
  119. package/components/picker-button/index.cjs +56 -4
  120. package/components/picker-button/index.js +45 -34
  121. package/components/platform-CxDar3Dn.cjs +68 -0
  122. package/components/platform-Cxn0WbyT.js +69 -0
  123. package/components/popover/index.cjs +7 -1
  124. package/components/popover/index.js +12 -8
  125. package/components/popover-BkbYhl3i.js +74 -0
  126. package/components/popover-BkgUf0kL.cjs +74 -0
  127. package/components/progress-circle/index.cjs +7 -1
  128. package/components/progress-circle/index.js +12 -8
  129. package/components/progress-circle-Hu_ivPHf.js +133 -0
  130. package/components/progress-circle-_Etqsj9f.cjs +132 -0
  131. package/components/radio/index.cjs +244 -2
  132. package/components/radio/index.js +192 -110
  133. package/components/{when-CDK1Tt5Y.js → random-id-BE6HA503.cjs} +7 -10
  134. package/components/{random-id-ByCz1xaq.js → random-id-BEc6QIUL.js} +3 -3
  135. package/components/roving-tabindex-AsmAh2In.cjs +95 -0
  136. package/components/roving-tabindex-DPF9NmrH.js +96 -0
  137. package/components/search/index.cjs +115 -8
  138. package/components/search/index.js +96 -66
  139. package/components/select/index.cjs +720 -51
  140. package/components/select/index.js +563 -347
  141. package/components/sized-mixin-DmkrNdWB.js +80 -0
  142. package/components/sized-mixin-UaTVa-AE.cjs +79 -0
  143. package/components/slider/index.cjs +119 -1
  144. package/components/slider/index.js +100 -1113
  145. package/components/{condition-attribute-with-id-Dv4lSRbe.js → slottable-request-event-CANixJnR.cjs} +15 -13
  146. package/components/{slottable-request-event-DggLA4Rx.js → slottable-request-event-D9WzrdWv.js} +12 -9
  147. package/components/strategies-DlMlaSJR.cjs +317 -0
  148. package/components/strategies-DlPQoTFE.js +318 -0
  149. package/components/streaming-listener-D4sHaMub.cjs +145 -0
  150. package/components/streaming-listener-cAz5zJyk.js +146 -0
  151. package/components/swatch/index.cjs +436 -7
  152. package/components/swatch/index.js +350 -205
  153. package/components/switch/index.cjs +61 -2
  154. package/components/switch/index.js +51 -34
  155. package/components/tabs/index.cjs +693 -26
  156. package/components/tabs/index.js +521 -388
  157. package/components/tags/index.cjs +201 -4
  158. package/components/tags/index.js +152 -87
  159. package/components/text-field/index.cjs +49 -3
  160. package/components/text-field/index.js +44 -30
  161. package/components/text-field-11tcnftU.cjs +338 -0
  162. package/components/text-field-Chi9J2Cz.js +339 -0
  163. package/components/text-field.module-CMBS0jSL.js +21 -0
  164. package/components/text-field.module-DIJdV_sA.cjs +20 -0
  165. package/components/toast/index.cjs +177 -12
  166. package/components/toast/index.js +145 -73
  167. package/components/tooltip/index.cjs +221 -6
  168. package/components/tooltip/index.js +155 -131
  169. package/components/tooltip/tooltip.d.ts +1 -12
  170. package/components/unit-input/index.cjs +232 -8
  171. package/components/unit-input/index.js +201 -108
  172. package/components/utils.cjs +25 -1
  173. package/components/utils.js +22 -22
  174. package/custom-elements.json +1 -1
  175. package/package.json +1 -1
  176. package/components/NumberFormatter-DewVDY5w.cjs +0 -18
  177. package/components/NumberFormatter-DgOUVrge.js +0 -136
  178. package/components/NumberParser-Dik4a0h-.cjs +0 -18
  179. package/components/NumberParser-ci9J5EKv.js +0 -173
  180. package/components/action-group-DBImibFn.js +0 -258
  181. package/components/action-group-DJGMcRHb.cjs +0 -20
  182. package/components/async-directive-BX1T1e1_.cjs +0 -22
  183. package/components/async-directive-BfcqVjDp.js +0 -82
  184. package/components/base-BjTwmyRF.cjs +0 -22
  185. package/components/base-CBCg3yyw.cjs +0 -40
  186. package/components/base-D76d76ww.js +0 -26
  187. package/components/base-WsynuqaS.js +0 -677
  188. package/components/button-base-DbkDzb71.js +0 -144
  189. package/components/button-base-XgPLmwP-.cjs +0 -25
  190. package/components/checkbox-mixin-BDN0dBtS.cjs +0 -27
  191. package/components/checkbox-mixin-Do7EgtpQ.js +0 -70
  192. package/components/class-map-Di1D_rCm.cjs +0 -22
  193. package/components/class-map-NbVXqBU0.js +0 -51
  194. package/components/clear-button-BbVqNU-g.js +0 -53
  195. package/components/clear-button-DYdeFsS8.cjs +0 -18
  196. package/components/close-button-CpfKibqg.cjs +0 -18
  197. package/components/close-button-DzOZZmkY.js +0 -51
  198. package/components/color-controller-B0uX6Zso.js +0 -3230
  199. package/components/color-controller-CoUL5f9K.cjs +0 -18
  200. package/components/color-loupe-CaA_Lfkk.cjs +0 -56
  201. package/components/color-loupe-CmMsXbjT.js +0 -81
  202. package/components/condition-attribute-with-id-DrQYZzFS.cjs +0 -18
  203. package/components/dependency-manger-C5HCkMMB.cjs +0 -18
  204. package/components/directive-helpers-Cm6gitnu.js +0 -62
  205. package/components/directive-helpers-DyIRTWwA.cjs +0 -22
  206. package/components/divider.module-DDvBo9zo.cjs +0 -18
  207. package/components/divider.module-DoQWQEIJ.js +0 -21
  208. package/components/element-resolution-BvRLGqIU.cjs +0 -18
  209. package/components/element-resolution-FCUT-wql.js +0 -91
  210. package/components/field-group-DXfBWrkO.js +0 -66
  211. package/components/field-group-DkGst3r5.cjs +0 -23
  212. package/components/field-label-CZ2zzChK.js +0 -106
  213. package/components/field-label-mO1AkUgR.cjs +0 -25
  214. package/components/flow-D-0MTYCm.js +0 -527
  215. package/components/flow-DM3dNAKs.cjs +0 -30
  216. package/components/focus-group-DHeTq18L.js +0 -218
  217. package/components/focus-group-DnxZUBhQ.cjs +0 -18
  218. package/components/focus-visible-B0P9aY_G.cjs +0 -18
  219. package/components/focus-visible-DBlJGoEW.js +0 -74
  220. package/components/focusable-BxtpnzWp.js +0 -153
  221. package/components/focusable-EbipgXRh.cjs +0 -18
  222. package/components/focusable-selectors-BgFlyFcY.cjs +0 -18
  223. package/components/if-defined-C9YGdo33.cjs +0 -22
  224. package/components/if-defined-DOaE2coe.js +0 -27
  225. package/components/index-BQoI8AD3.cjs +0 -113
  226. package/components/index-BwxgAdzi.cjs +0 -57
  227. package/components/index-Cb9zsiz6.js +0 -1490
  228. package/components/index-HjQa8tew.js +0 -1174
  229. package/components/language-resolution-DJzmyzZq.cjs +0 -18
  230. package/components/like-anchor-Bvn_vLQ8.js +0 -69
  231. package/components/like-anchor-sod1C1fR.cjs +0 -32
  232. package/components/luzmo-icons-D47EGj-3.cjs +0 -29
  233. package/components/luzmo-icons-NEyaMpEM.js +0 -229
  234. package/components/manage-help-text-DhgARkZX.cjs +0 -30
  235. package/components/manage-help-text-syYnjKGL.js +0 -92
  236. package/components/mutation-controller-DH7YOCyj.js +0 -52
  237. package/components/mutation-controller-DkOMCW-c.cjs +0 -22
  238. package/components/observe-slot-presence-CmVi0zTc.js +0 -68
  239. package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
  240. package/components/observe-slot-text-BPfIQQtz.js +0 -87
  241. package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
  242. package/components/overlay-Cig9r6uU.js +0 -2747
  243. package/components/overlay-KSKMzzkh.cjs +0 -47
  244. package/components/pending-state-CaH1si5b.cjs +0 -26
  245. package/components/picker-CAYj4hBD.js +0 -461
  246. package/components/picker-apS0Zrly.cjs +0 -123
  247. package/components/platform-BM-uMWpX.js +0 -69
  248. package/components/platform-BiXhwqk3.cjs +0 -18
  249. package/components/popover-DjX0aAnY.js +0 -67
  250. package/components/popover-KFfO0IYL.cjs +0 -30
  251. package/components/progress-circle-BvRJNuNo.cjs +0 -33
  252. package/components/progress-circle-DXH9z8-6.js +0 -97
  253. package/components/query-BL-TJj7K.cjs +0 -22
  254. package/components/query-D_KR_GUc.js +0 -51
  255. package/components/query-assigned-elements-DjfhL1cl.js +0 -36
  256. package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
  257. package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
  258. package/components/query-assigned-nodes-C76XVPWY.js +0 -36
  259. package/components/random-id-CqvckpWe.cjs +0 -18
  260. package/components/roving-tabindex-By_fCy_e.cjs +0 -18
  261. package/components/roving-tabindex-DOg4z6ZU.js +0 -66
  262. package/components/sized-mixin-CPxE5C96.cjs +0 -18
  263. package/components/sized-mixin-D4ACoVUr.js +0 -63
  264. package/components/slottable-request-event-BfUUt1Mh.cjs +0 -18
  265. package/components/state-D8JEtYqe.cjs +0 -22
  266. package/components/state-Deh-vKYE.js +0 -29
  267. package/components/strategies-9indNIEb.js +0 -195
  268. package/components/strategies-BACP6MhR.cjs +0 -18
  269. package/components/streaming-listener-B00MvALi.cjs +0 -18
  270. package/components/streaming-listener-CP-JE6Fa.js +0 -91
  271. package/components/style-map-CeilmSgs.cjs +0 -22
  272. package/components/style-map-IgqIKvlE.js +0 -53
  273. package/components/text-field-BYF2RHY8.cjs +0 -85
  274. package/components/text-field-PYafEYeO.js +0 -314
  275. package/components/text-field.module-C2KVUJcX.js +0 -21
  276. package/components/text-field.module-DXhFA9G-.cjs +0 -18
  277. package/components/when-CDZyJPvd.cjs +0 -22
@@ -15,30 +15,39 @@
15
15
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
16
  * SOFTWARE.
17
17
  * */
18
- import { $ as b } from "../NumberFormatter-DgOUVrge.js";
19
- import { $ as f } from "../NumberParser-ci9J5EKv.js";
20
- import { p as v, b as y, T as k } from "../luzmo-icons-NEyaMpEM.js";
21
- import { r as C, E as F, x as z, n } from "../base-WsynuqaS.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-8yZa5r_P.js";
25
- import { s as q } from "../streaming-listener-CP-JE6Fa.js";
26
- import "../infield-button/index.js";
27
- import { a as S } from "../text-field-PYafEYeO.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);
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);
32
24
  }
33
25
  };
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;
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;
40
46
  };
41
- const $ = 5, O = 100, h = "-", x = {
47
+ const FRAMES_PER_CHANGE = 5;
48
+ const CHANGE_DEBOUNCE_MS = 100;
49
+ const indeterminatePlaceholder = "-";
50
+ const remapMultiByteCharacters = {
42
51
  "1": "1",
43
52
  "2": "2",
44
53
  "3": "3",
@@ -67,22 +76,43 @@ const $ = 5, O = 100, h = "-", x = {
67
76
  九: "9",
68
77
  零: "0"
69
78
  };
70
- class l extends S {
79
+ class LuzmoNumberField extends LuzmoTextFieldBase {
71
80
  constructor() {
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;
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;
75
103
  }
76
104
  static get styles() {
77
- return [...super.styles, C(D)];
105
+ return [...super.styles, unsafeCSS(styles)];
78
106
  }
79
- set value(e) {
80
- const o = this.validateInput(e);
81
- if (o === this.value)
107
+ set value(rawValue) {
108
+ const value = this.validateInput(rawValue);
109
+ if (value === this.value) {
82
110
  return;
83
- this.lastCommitedValue = o;
84
- const r = this._value;
85
- this._value = o, this.requestUpdate("value", r);
111
+ }
112
+ this.lastCommitedValue = value;
113
+ const oldValue = this._value;
114
+ this._value = value;
115
+ this.requestUpdate("value", oldValue);
86
116
  }
87
117
  get value() {
88
118
  return this._value;
@@ -90,9 +120,14 @@ class l extends S {
90
120
  get inputValue() {
91
121
  return this.indeterminate ? this.formattedValue : this.inputElement.value;
92
122
  }
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 })));
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 }));
96
131
  }
97
132
  /**
98
133
  * Retreive the value of the element parsed to a Number.
@@ -100,213 +135,344 @@ class l extends S {
100
135
  get valueAsString() {
101
136
  return this._value.toString();
102
137
  }
103
- set valueAsString(e) {
104
- this.value = this.numberParser.parse(e);
138
+ set valueAsString(value) {
139
+ this.value = this.numberParser.parse(value);
105
140
  }
106
141
  get formattedValue() {
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"
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"
117
157
  ).value;
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));
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
+ }
128
179
  }
129
- o = s.join("");
180
+ normalizedValue = valueChars.join("");
130
181
  }
131
- return this.numberParser.parse(o);
182
+ return this.numberParser.parse(normalizedValue);
132
183
  }
133
184
  get _step() {
134
- var e;
135
- return this.step !== void 0 ? this.step : ((e = this.formatOptions) == null ? void 0 : e.style) === "percent" ? 0.01 : 1;
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;
136
193
  }
137
- handlePointerdown(e) {
138
- if (e.button !== 0) {
139
- e.preventDefault();
194
+ handlePointerdown(event) {
195
+ if (event.button !== 0) {
196
+ event.preventDefault();
140
197
  return;
141
198
  }
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);
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);
151
218
  }, 400);
152
219
  }
153
- doChange(e) {
154
- this.change(e);
220
+ doChange(event) {
221
+ this.change(event);
155
222
  }
156
- handlePointermove(e) {
157
- this.findChange(e);
223
+ handlePointermove(event) {
224
+ this.findChange(event);
158
225
  }
159
- handlePointerup(e) {
160
- this.buttons.releasePointerCapture(e.pointerId), cancelAnimationFrame(this.nextChange), clearTimeout(this.safty), this.managedInput = !1, this.setValue();
226
+ handlePointerup(event) {
227
+ this.buttons.releasePointerCapture(event.pointerId);
228
+ cancelAnimationFrame(this.nextChange);
229
+ clearTimeout(this.safty);
230
+ this.managedInput = false;
231
+ this.setValue();
161
232
  }
162
- doNextChange(e) {
163
- return this.changeCount += 1, this.changeCount % $ === 0 && this.doChange(e), requestAnimationFrame(() => {
164
- this.nextChange = this.doNextChange(e);
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);
165
240
  });
166
241
  }
167
- stepBy(e) {
168
- if (this.disabled || this.readonly)
242
+ stepBy(count) {
243
+ if (this.disabled || this.readonly) {
169
244
  return;
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
- }
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) {
270
+ 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;
193
284
  }
285
+ }
194
286
  }
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;
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;
201
299
  }
202
300
  onFocus() {
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;
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;
207
312
  }
208
313
  handleFocusin() {
209
- this.focused = !this.readonly && !0, this.keyboardFocused = !this.readonly && !0;
314
+ this.focused = !this.readonly && true;
315
+ this.keyboardFocused = !this.readonly && true;
210
316
  }
211
317
  handleFocusout() {
212
- this.focused = !this.readonly && !1, this.keyboardFocused = !this.readonly && !1;
318
+ this.focused = !this.readonly && false;
319
+ this.keyboardFocused = !this.readonly && false;
213
320
  }
214
321
  handleChange() {
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;
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
+ }
219
330
  }
220
- this.setValue(e), this.inputElement.value = this.formattedValue;
331
+ this.setValue(value);
332
+ this.inputElement.value = this.formattedValue;
221
333
  }
222
334
  handleCompositionStart() {
223
- this.isComposing = !0;
335
+ this.isComposing = true;
224
336
  }
225
337
  handleCompositionEnd() {
226
- this.isComposing = !1, requestAnimationFrame(() => {
338
+ this.isComposing = false;
339
+ requestAnimationFrame(() => {
227
340
  this.inputElement.dispatchEvent(
228
341
  new Event("input", {
229
- composed: !0,
230
- bubbles: !0
342
+ composed: true,
343
+ bubbles: true
231
344
  })
232
345
  );
233
346
  });
234
347
  }
235
348
  handleInputElementPointerdown() {
236
- this.hasRecentlyReceivedPointerDown = !0, this.updateComplete.then(() => {
349
+ this.hasRecentlyReceivedPointerDown = true;
350
+ this.updateComplete.then(() => {
237
351
  requestAnimationFrame(() => {
238
- this.hasRecentlyReceivedPointerDown = !1;
352
+ this.hasRecentlyReceivedPointerDown = false;
239
353
  });
240
354
  });
241
355
  }
242
- handleInput(e) {
356
+ handleInput(event) {
243
357
  if (this.isComposing) {
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);
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
+ }
247
364
  }
248
- e.stopPropagation();
365
+ event.stopPropagation();
249
366
  return;
250
367
  }
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)) {
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)) {
257
382
  this.lastCommitedValue = this.lastCommitedValue ?? this.value;
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);
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);
260
394
  return;
261
395
  }
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)
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)
276
421
  );
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));
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));
281
437
  }
282
- return e *= o, e;
438
+ value *= signMultiplier;
439
+ return value;
283
440
  }
284
441
  get displayValue() {
285
- const e = this.focused ? "" : h;
286
- return this.indeterminate ? e : this.formattedValue;
442
+ const indeterminateValue = this.focused ? "" : indeterminatePlaceholder;
443
+ return this.indeterminate ? indeterminateValue : this.formattedValue;
287
444
  }
288
445
  clearNumberFormatterCache() {
289
- this._numberFormatter = void 0, this._numberParser = void 0;
446
+ this._numberFormatter = void 0;
447
+ this._numberParser = void 0;
290
448
  }
291
449
  get numberFormatter() {
292
450
  if (!this._numberFormatter || !this._numberFormatterFocused) {
293
451
  const {
294
- style: e,
295
- unit: o,
296
- unitDisplay: r,
297
- ...t
452
+ style,
453
+ unit,
454
+ unitDisplay,
455
+ ...formatOptionsNoUnit
298
456
  } = this.formatOptions;
299
- e !== "unit" && (t.style = e), this._numberFormatterFocused = new b(
457
+ if (style !== "unit") {
458
+ formatOptionsNoUnit.style = style;
459
+ }
460
+ this._numberFormatterFocused = new NumberFormatter(
300
461
  this.languageResolver.language,
301
- t
462
+ formatOptionsNoUnit
302
463
  );
303
464
  try {
304
- this._numberFormatter = new b(
465
+ this._numberFormatter = new NumberFormatter(
305
466
  this.languageResolver.language,
306
467
  this.formatOptions
307
- ), this._forcedUnit = "", this._numberFormatter.format(1);
468
+ );
469
+ this._forcedUnit = "";
470
+ this._numberFormatter.format(1);
308
471
  } catch {
309
- e === "unit" && (this._forcedUnit = o), this._numberFormatter = this._numberFormatterFocused;
472
+ if (style === "unit") {
473
+ this._forcedUnit = unit;
474
+ }
475
+ this._numberFormatter = this._numberFormatterFocused;
310
476
  }
311
477
  }
312
478
  return this.focused ? this._numberFormatterFocused : this._numberFormatter;
@@ -316,10 +482,10 @@ class l extends S {
316
482
  }
317
483
  get valueFormatter() {
318
484
  if (!this._valueFormatter) {
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
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
323
489
  });
324
490
  }
325
491
  return this._valueFormatter;
@@ -327,35 +493,44 @@ class l extends S {
327
493
  get numberParser() {
328
494
  if (!this._numberParser || !this._numberParserFocused) {
329
495
  const {
330
- style: e,
331
- unit: o,
332
- unitDisplay: r,
333
- ...t
496
+ style,
497
+ unit,
498
+ unitDisplay,
499
+ ...formatOptionsNoUnit
334
500
  } = this.formatOptions;
335
- e !== "unit" && (t.style = e), this._numberParserFocused = new f(
501
+ if (style !== "unit") {
502
+ formatOptionsNoUnit.style = style;
503
+ }
504
+ this._numberParserFocused = new NumberParser(
336
505
  this.languageResolver.language,
337
- t
506
+ formatOptionsNoUnit
338
507
  );
339
508
  try {
340
- this._numberParser = new f(
509
+ this._numberParser = new NumberParser(
341
510
  this.languageResolver.language,
342
511
  this.formatOptions
343
- ), this._forcedUnit = "", this._numberParser.parse("0");
512
+ );
513
+ this._forcedUnit = "";
514
+ this._numberParser.parse("0");
344
515
  } catch {
345
- e === "unit" && (this._forcedUnit = o), this._numberParser = this._numberParserFocused;
516
+ if (style === "unit") {
517
+ this._forcedUnit = unit;
518
+ }
519
+ this._numberParser = this._numberParserFocused;
346
520
  }
347
521
  }
348
522
  return this.focused ? this._numberParserFocused : this._numberParser;
349
523
  }
350
524
  renderField() {
351
- return this.autocomplete = "off", z`
525
+ this.autocomplete = "off";
526
+ return html`
352
527
  ${super.renderField()}
353
- ${this.hideStepper ? F : z`
528
+ ${this.hideStepper ? nothing : html`
354
529
  <span
355
530
  class="buttons"
356
531
  @focusin=${this.handleFocusin}
357
532
  @focusout=${this.handleFocusout}
358
- ${q({
533
+ ${streamingListener({
359
534
  start: ["pointerdown", this.handlePointerdown],
360
535
  streamInside: [
361
536
  [
@@ -385,7 +560,7 @@ class l extends S {
385
560
  ?disabled=${this.disabled || this.readonly || this.max !== void 0 && this.value === this.max}
386
561
  ?quiet=${this.quiet}
387
562
  >
388
- ${v(y)}
563
+ ${luzmoIcon(luzmoAngleUp)}
389
564
  </luzmo-infield-button>
390
565
  <luzmo-infield-button
391
566
  inline="end"
@@ -399,72 +574,96 @@ class l extends S {
399
574
  ?disabled=${this.disabled || this.readonly || this.min !== void 0 && this.value === this.min}
400
575
  ?quiet=${this.quiet}
401
576
  >
402
- ${v(k)}
577
+ ${luzmoIcon(luzmoAngleDown)}
403
578
  </luzmo-infield-button>
404
579
  </span>
405
580
  `}
406
581
  `;
407
582
  }
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(
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(
411
589
  this.formattedValue.replace(this._forcedUnit, "")
412
590
  );
413
- this.value = o, this.clearValueFormatterCache();
591
+ this.value = value;
592
+ this.clearValueFormatterCache();
414
593
  }
415
- super.update(e);
594
+ super.update(changes);
416
595
  }
417
- willUpdate(e) {
418
- this.multiline = !1, e.has(E) && this.clearNumberFormatterCache();
596
+ willUpdate(changes) {
597
+ this.multiline = false;
598
+ if (changes.has(languageResolverUpdatedSymbol)) {
599
+ this.clearNumberFormatterCache();
600
+ }
419
601
  }
420
- firstUpdated(e) {
421
- super.firstUpdated(e), this.addEventListener("keydown", this.handleKeydown), this.addEventListener("compositionstart", this.handleCompositionStart), this.addEventListener("compositionend", this.handleCompositionEnd);
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);
422
607
  }
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;
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";
429
623
  }
430
- e.has("focused") && this.focused && !this.hasRecentlyReceivedPointerDown && this.formatOptions.unit && this.setSelectionRange(0, this.displayValue.length);
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);
431
628
  }
432
629
  }
433
630
  }
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);
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
+ }
468
667
  export {
469
- l as LuzmoNumberField
668
+ LuzmoNumberField
470
669
  };