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

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
@@ -1,18 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- "use strict";const a=require("./base-CBCg3yyw.cjs"),d=require("./async-directive-BX1T1e1_.cjs"),m=require("./directive-C7oCP5Bh.cjs"),s=["",()=>{}];class l extends d.f{constructor(){super(...arguments),this.start=s,this.streamInside=s,this.end=s,this.streamOutside=s,this.state="off",this.handleStart=e=>{this.clearStream(),this.callHandler(this.start[1],e),!e.defaultPrevented&&(this.removeListeners(),this.addListeners("on"))},this.handleInside=e=>{this.handleStream(this.streamInside[1],e)},this.handleEnd=e=>{this.clearStream(),this.callHandler(this.end[1],e),this.removeListeners(),this.addListeners("off")},this.handleOutside=e=>{this.handleStream(this.streamOutside[1],e)}}render(e){return a.E}update(e,[{start:t,end:i,streamInside:n=s,streamOutside:h=s}]){var r;this.element!==e.element&&(this.element=e.element,this.removeListeners()),this.host=((r=e.options)==null?void 0:r.host)||this.element,this.start=t,this.end=i,this.streamInside=n,this.streamOutside=h,this.addListeners()}addListeners(e){this.state=e||this.state,this.state==="off"?(this.addListener(this.streamOutside[0],this.handleOutside),this.addListener(this.start[0],this.handleStart)):this.state==="on"&&(this.addListener(this.streamInside[0],this.handleInside),this.addListener(this.end[0],this.handleEnd))}callHandler(e,t){typeof e=="function"?e.call(this.host,t):e.handleEvent(t)}handleStream(e,t){this.stream||(this.callHandler(e,t),this.stream=requestAnimationFrame(()=>{this.stream=void 0}))}clearStream(){this.stream!=null&&(cancelAnimationFrame(this.stream),this.stream=void 0)}addListener(e,t){Array.isArray(e)?e.map(i=>{this.element.addEventListener(i,t)}):this.element.addEventListener(e,t)}removeListener(e,t){Array.isArray(e)?e.map(i=>{this.element.removeEventListener(i,t)}):this.element.removeEventListener(e,t)}removeListeners(){this.removeListener(this.start[0],this.handleStart),this.removeListener(this.streamInside[0],this.handleInside),this.removeListener(this.end[0],this.handleEnd),this.removeListener(this.streamOutside[0],this.handleOutside)}disconnected(){this.removeListeners()}reconnected(){this.addListeners()}}const o=m.e(l);exports.streamingListener=o;
@@ -1,91 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- import { E as a } from "./base-WsynuqaS.js";
19
- import { f as d } from "./async-directive-BfcqVjDp.js";
20
- import { e as m } from "./directive-oAbCiebi.js";
21
- const s = ["", () => {
22
- }];
23
- class l extends d {
24
- constructor() {
25
- super(...arguments), this.start = s, this.streamInside = s, this.end = s, this.streamOutside = s, this.state = "off", this.handleStart = (e) => {
26
- this.clearStream(), this.callHandler(this.start[1], e), !e.defaultPrevented && (this.removeListeners(), this.addListeners("on"));
27
- }, this.handleInside = (e) => {
28
- this.handleStream(this.streamInside[1], e);
29
- }, this.handleEnd = (e) => {
30
- this.clearStream(), this.callHandler(this.end[1], e), this.removeListeners(), this.addListeners("off");
31
- }, this.handleOutside = (e) => {
32
- this.handleStream(this.streamOutside[1], e);
33
- };
34
- }
35
- /* c8 ignore next 4 */
36
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
37
- render(e) {
38
- return a;
39
- }
40
- update(e, [
41
- {
42
- start: t,
43
- end: i,
44
- streamInside: n = s,
45
- streamOutside: h = s
46
- }
47
- ]) {
48
- var r;
49
- this.element !== e.element && (this.element = e.element, this.removeListeners()), this.host = ((r = e.options) == null ? void 0 : r.host) || this.element, this.start = t, this.end = i, this.streamInside = n, this.streamOutside = h, this.addListeners();
50
- }
51
- addListeners(e) {
52
- this.state = e || this.state, this.state === "off" ? (this.addListener(this.streamOutside[0], this.handleOutside), this.addListener(this.start[0], this.handleStart)) : this.state === "on" && (this.addListener(this.streamInside[0], this.handleInside), this.addListener(this.end[0], this.handleEnd));
53
- }
54
- callHandler(e, t) {
55
- typeof e == "function" ? e.call(this.host, t) : e.handleEvent(t);
56
- }
57
- handleStream(e, t) {
58
- this.stream || (this.callHandler(e, t), this.stream = requestAnimationFrame(() => {
59
- this.stream = void 0;
60
- }));
61
- }
62
- clearStream() {
63
- this.stream != null && (cancelAnimationFrame(this.stream), this.stream = void 0);
64
- }
65
- addListener(e, t) {
66
- Array.isArray(e) ? e.map((i) => {
67
- this.element.addEventListener(i, t);
68
- }) : this.element.addEventListener(e, t);
69
- }
70
- removeListener(e, t) {
71
- Array.isArray(e) ? e.map((i) => {
72
- this.element.removeEventListener(i, t);
73
- }) : this.element.removeEventListener(e, t);
74
- }
75
- removeListeners() {
76
- this.removeListener(this.start[0], this.handleStart), this.removeListener(this.streamInside[0], this.handleInside), this.removeListener(this.end[0], this.handleEnd), this.removeListener(this.streamOutside[0], this.handleOutside);
77
- }
78
- disconnected() {
79
- this.removeListeners();
80
- }
81
- /* c8 ignore next 3 */
82
- reconnected() {
83
- this.addListeners();
84
- }
85
- }
86
- const u = m(
87
- l
88
- );
89
- export {
90
- u as s
91
- };
@@ -1,22 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- "use strict";const u=require("./base-CBCg3yyw.cjs"),o=require("./directive-C7oCP5Bh.cjs");/**
19
- * @license
20
- * Copyright 2018 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */const c="important",l=" !"+c,d=o.e(class extends o.i{constructor(n){var t;if(super(n),n.type!==o.t.ATTRIBUTE||n.name!=="style"||((t=n.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((t,s)=>{const e=n[s];return e==null?t:t+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${e};`},"")}update(n,[t]){const{style:s}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const e of this.ft)t[e]==null&&(this.ft.delete(e),e.includes("-")?s.removeProperty(e):s[e]=null);for(const e in t){const r=t[e];if(r!=null){this.ft.add(e);const i=typeof r=="string"&&r.endsWith(l);e.includes("-")||i?s.setProperty(e,i?r.slice(0,-11):r,i?c:""):s[e]=r}}return u.T}});exports.o=d;
@@ -1,53 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- import { T as l } from "./base-WsynuqaS.js";
19
- import { e as u, i as c, t as d } from "./directive-oAbCiebi.js";
20
- /**
21
- * @license
22
- * Copyright 2018 Google LLC
23
- * SPDX-License-Identifier: BSD-3-Clause
24
- */
25
- const o = "important", f = " !" + o, p = u(class extends c {
26
- constructor(n) {
27
- var e;
28
- if (super(n), n.type !== d.ATTRIBUTE || n.name !== "style" || ((e = n.strings) == null ? void 0 : e.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
29
- }
30
- render(n) {
31
- return Object.keys(n).reduce((e, s) => {
32
- const t = n[s];
33
- return t == null ? e : e + `${s = s.includes("-") ? s : s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${t};`;
34
- }, "");
35
- }
36
- update(n, [e]) {
37
- const { style: s } = n.element;
38
- if (this.ft === void 0) return this.ft = new Set(Object.keys(e)), this.render(e);
39
- for (const t of this.ft) e[t] == null && (this.ft.delete(t), t.includes("-") ? s.removeProperty(t) : s[t] = null);
40
- for (const t in e) {
41
- const r = e[t];
42
- if (r != null) {
43
- this.ft.add(t);
44
- const i = typeof r == "string" && r.endsWith(f);
45
- t.includes("-") || i ? s.setProperty(t, i ? r.slice(0, -11) : r, i ? o : "") : s[t] = r;
46
- }
47
- }
48
- return l;
49
- }
50
- });
51
- export {
52
- p as o
53
- };
@@ -1,85 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- "use strict";const t=require("./base-CBCg3yyw.cjs"),v=require("./state-D8JEtYqe.cjs"),m=require("./query-BL-TJj7K.cjs"),r=require("./if-defined-C9YGdo33.cjs"),u=require("./directive-C7oCP5Bh.cjs"),c=require("./directive-helpers-DyIRTWwA.cjs"),h=require("./luzmo-icons-D47EGj-3.cjs"),g=require("./focusable-EbipgXRh.cjs"),f=require("./sized-mixin-CPxE5C96.cjs"),$=require("./manage-help-text-DhgARkZX.cjs"),x=require("./text-field.module-DXhFA9G-.cjs");/**
19
- * @license
20
- * Copyright 2020 Google LLC
21
- * SPDX-License-Identifier: BSD-3-Clause
22
- */const b=u.e(class extends u.i{constructor(s){if(super(s),s.type!==u.t.PROPERTY&&s.type!==u.t.ATTRIBUTE&&s.type!==u.t.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!c.f(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[e]){if(e===t.T||e===t.E)return e;const l=s.element,a=s.name;if(s.type===u.t.PROPERTY){if(e===l[a])return t.T}else if(s.type===u.t.BOOLEAN_ATTRIBUTE){if(!!e===l.hasAttribute(a))return t.T}else if(s.type===u.t.ATTRIBUTE&&l.getAttribute(a)===e+"")return t.T;return c.m(s),e}});var E=Object.defineProperty,T=Object.getOwnPropertyDescriptor,n=(s,e,l,a)=>{for(var o=a>1?void 0:a?T(e,l):e,p=s.length-1,d;p>=0;p--)(d=s[p])&&(o=(a?d(e,l,o):d(o))||o);return a&&o&&E(e,l,o),o};const q=["text","url","tel","email","password"];class i extends $.ManageHelpText(f.SizedMixin(g.Focusable,{noDefaultSize:!0})){constructor(){super(...arguments),this.allowedKeys="",this.focused=!1,this.invalid=!1,this.label="",this.placeholder="",this._type="text",this.grows=!1,this.maxlength=-1,this.minlength=-1,this.multiline=!1,this.readonly=!1,this.rows=-1,this.valid=!1,this._value="",this.quiet=!1,this.required=!1}static get styles(){return[t.r(x.textFieldStyles)]}set type(e){const l=this._type;this._type=e,this.requestUpdate("type",l)}get type(){return q.find(e=>e===this._type)??"text"}set value(e){if(e===this.value)return;const l=this._value;this._value=e,this.requestUpdate("value",l)}get value(){return this._value}get focusElement(){return this.inputElement}setSelectionRange(e,l,a="none"){this.inputElement.setSelectionRange(e,l,a)}select(){this.inputElement.select()}handleInput(e){if(this.allowedKeys&&this.inputElement.value&&!new RegExp(`^[${this.allowedKeys}]*$`,"u").test(this.inputElement.value)){const o=this.inputElement.selectionStart-1;this.inputElement.value=this.value.toString(),this.inputElement.setSelectionRange(o,o);return}this.value=this.inputElement.value}handleChange(){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}onFocus(){this.focused=!this.readonly&&!0}onBlur(e){this.focused=!this.readonly&&!1}handleInputElementPointerdown(){}renderStateIcons(){return this.invalid?t.x`
23
- <div id="invalid" class="icon">${h.p3(h.$)}</div>
24
- `:this.valid?t.x`
25
- <div id="valid" class="icon">${h.p3(h.F)}</div>
26
- `:t.E}get displayValue(){return this.value.toString()}get renderMultiline(){return t.x`
27
- ${this.multiline&&this.grows&&this.rows===-1?t.x`
28
- <div id="sizer" class="input" aria-hidden="true">${this.value}&#8203;
29
- </div>
30
- `:t.E}
31
- <!-- @ts-ignore -->
32
- <textarea
33
- name=${r.o(this.name||void 0)}
34
- aria-describedby=${this.helpTextId}
35
- aria-label=${this.label||this.appliedLabel||this.placeholder}
36
- aria-invalid=${r.o(this.invalid||void 0)}
37
- class="input"
38
- maxlength=${r.o(this.maxlength>-1?this.maxlength:void 0)}
39
- minlength=${r.o(this.minlength>-1?this.minlength:void 0)}
40
- title=${this.invalid?"":t.E}
41
- pattern=${r.o(this.pattern)}
42
- placeholder=${this.placeholder}
43
- .value=${this.displayValue}
44
- @change=${this.handleChange}
45
- @input=${this.handleInput}
46
- @focus=${this.onFocus}
47
- @blur=${this.onBlur}
48
- ?disabled=${this.disabled}
49
- ?required=${this.required}
50
- ?readonly=${this.readonly}
51
- rows=${r.o(this.rows>-1?this.rows:void 0)}
52
- autocomplete=${r.o(this.autocomplete)}
53
- ></textarea>
54
- `}get renderInput(){return t.x`
55
- <!-- @ts-ignore -->
56
- <input
57
- name=${r.o(this.name||void 0)}
58
- type=${this.type}
59
- aria-describedby=${this.helpTextId}
60
- aria-label=${this.label||this.appliedLabel||this.placeholder}
61
- aria-invalid=${r.o(this.invalid||void 0)}
62
- class="input"
63
- title=${this.invalid?"":t.E}
64
- maxlength=${r.o(this.maxlength>-1?this.maxlength:void 0)}
65
- minlength=${r.o(this.minlength>-1?this.minlength:void 0)}
66
- pattern=${r.o(this.pattern)}
67
- placeholder=${this.placeholder}
68
- .value=${b(this.displayValue)}
69
- @change=${this.handleChange}
70
- @input=${this.handleInput}
71
- @pointerdown=${this.handleInputElementPointerdown}
72
- @focus=${this.onFocus}
73
- @blur=${this.onBlur}
74
- ?disabled=${this.disabled}
75
- ?required=${this.required}
76
- ?readonly=${this.readonly}
77
- autocomplete=${r.o(this.autocomplete)}
78
- />
79
- `}renderField(){return t.x`
80
- ${this.renderStateIcons()}
81
- ${this.multiline?this.renderMultiline:this.renderInput}
82
- `}render(){return t.x`
83
- <div id="text-field">${this.renderField()}</div>
84
- ${this.renderHelpText(this.invalid)}
85
- `}update(e){(e.has("value")||e.has("required")&&this.required)&&this.updateComplete.then(()=>{this.checkValidity()}),super.update(e)}checkValidity(){let e=this.inputElement.checkValidity();return(this.required||this.value&&this.pattern)&&((this.disabled||this.multiline)&&this.pattern&&(e=new RegExp(`^${this.pattern}$`,"u").test(this.value.toString())),this.minlength!==void 0&&(e=e&&this.value.toString().length>=this.minlength),this.valid=e,this.invalid=!e),e}}n([v.r()],i.prototype,"appliedLabel",2);n([t.n({attribute:"allowed-keys"})],i.prototype,"allowedKeys",2);n([t.n({type:Boolean,reflect:!0})],i.prototype,"focused",2);n([m.e(".input:not(#sizer)")],i.prototype,"inputElement",2);n([t.n({type:Boolean,reflect:!0})],i.prototype,"invalid",2);n([t.n()],i.prototype,"label",2);n([t.n({type:String,reflect:!0})],i.prototype,"name",2);n([t.n()],i.prototype,"placeholder",2);n([v.r()],i.prototype,"type",1);n([t.n({attribute:"type",reflect:!0})],i.prototype,"_type",2);n([t.n()],i.prototype,"pattern",2);n([t.n({type:Boolean,reflect:!0})],i.prototype,"grows",2);n([t.n({type:Number})],i.prototype,"maxlength",2);n([t.n({type:Number})],i.prototype,"minlength",2);n([t.n({type:Boolean,reflect:!0})],i.prototype,"multiline",2);n([t.n({type:Boolean,reflect:!0})],i.prototype,"readonly",2);n([t.n({type:Number})],i.prototype,"rows",2);n([t.n({type:Boolean,reflect:!0})],i.prototype,"valid",2);n([t.n({type:String})],i.prototype,"value",1);n([t.n({type:Boolean,reflect:!0})],i.prototype,"quiet",2);n([t.n({type:Boolean,reflect:!0})],i.prototype,"required",2);n([t.n({type:String,reflect:!0})],i.prototype,"autocomplete",2);class y extends i{constructor(){super(...arguments),this._value=""}set value(e){if(e===this.value)return;const l=this._value;this._value=e,this.requestUpdate("value",l)}get value(){return this._value}}n([t.n({type:String})],y.prototype,"value",1);exports.LuzmoTextField=y;exports.LuzmoTextFieldBase=i;
@@ -1,314 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- import { T as d, E as u, r as f, x as h, n as r } from "./base-WsynuqaS.js";
19
- import { r as v } from "./state-Deh-vKYE.js";
20
- import { e as g } from "./query-D_KR_GUc.js";
21
- import { o as n } from "./if-defined-DOaE2coe.js";
22
- import { e as $, i as x, t as p } from "./directive-oAbCiebi.js";
23
- import { f as b, m as E } from "./directive-helpers-Cm6gitnu.js";
24
- import { p as y, $ as w, F as T } from "./luzmo-icons-NEyaMpEM.js";
25
- import { F as _ } from "./focusable-BxtpnzWp.js";
26
- import { S } from "./sized-mixin-D4ACoVUr.js";
27
- import { M as B } from "./manage-help-text-syYnjKGL.js";
28
- import { t as I } from "./text-field.module-C2KVUJcX.js";
29
- /**
30
- * @license
31
- * Copyright 2020 Google LLC
32
- * SPDX-License-Identifier: BSD-3-Clause
33
- */
34
- const q = $(class extends x {
35
- constructor(l) {
36
- if (super(l), l.type !== p.PROPERTY && l.type !== p.ATTRIBUTE && l.type !== p.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
37
- if (!b(l)) throw Error("`live` bindings can only contain a single expression");
38
- }
39
- render(l) {
40
- return l;
41
- }
42
- update(l, [e]) {
43
- if (e === d || e === u) return e;
44
- const s = l.element, a = l.name;
45
- if (l.type === p.PROPERTY) {
46
- if (e === s[a]) return d;
47
- } else if (l.type === p.BOOLEAN_ATTRIBUTE) {
48
- if (!!e === s.hasAttribute(a)) return d;
49
- } else if (l.type === p.ATTRIBUTE && s.getAttribute(a) === e + "") return d;
50
- return E(l), e;
51
- }
52
- });
53
- var R = Object.defineProperty, F = Object.getOwnPropertyDescriptor, t = (l, e, s, a) => {
54
- for (var o = a > 1 ? void 0 : a ? F(e, s) : e, c = l.length - 1, m; c >= 0; c--)
55
- (m = l[c]) && (o = (a ? m(e, s, o) : m(o)) || o);
56
- return a && o && R(e, s, o), o;
57
- };
58
- const O = ["text", "url", "tel", "email", "password"];
59
- class i extends B(
60
- S(_, {
61
- noDefaultSize: !0
62
- })
63
- ) {
64
- constructor() {
65
- super(...arguments), this.allowedKeys = "", this.focused = !1, this.invalid = !1, this.label = "", this.placeholder = "", this._type = "text", this.grows = !1, this.maxlength = -1, this.minlength = -1, this.multiline = !1, this.readonly = !1, this.rows = -1, this.valid = !1, this._value = "", this.quiet = !1, this.required = !1;
66
- }
67
- static get styles() {
68
- return [f(I)];
69
- }
70
- set type(e) {
71
- const s = this._type;
72
- this._type = e, this.requestUpdate("type", s);
73
- }
74
- get type() {
75
- return O.find((e) => e === this._type) ?? "text";
76
- }
77
- set value(e) {
78
- if (e === this.value)
79
- return;
80
- const s = this._value;
81
- this._value = e, this.requestUpdate("value", s);
82
- }
83
- get value() {
84
- return this._value;
85
- }
86
- get focusElement() {
87
- return this.inputElement;
88
- }
89
- /**
90
- * Sets the start and end positions of the current selection.
91
- *
92
- * @param selectionStart The 0-based index of the first selected character. An index greater than the length of the
93
- * element's value is treated as pointing to the end of the value.
94
- * @param selectionEnd The 0-based index of the character after the last selected character. An index greater than
95
- * the length of the element's value is treated as pointing to the end of the value.
96
- * @param [selectionDirection="none"] A string indicating the direction in which the selection is considered to
97
- * have been performed.
98
- */
99
- setSelectionRange(e, s, a = "none") {
100
- this.inputElement.setSelectionRange(
101
- e,
102
- s,
103
- a
104
- );
105
- }
106
- /**
107
- * Selects all the text.
108
- */
109
- select() {
110
- this.inputElement.select();
111
- }
112
- handleInput(e) {
113
- if (this.allowedKeys && this.inputElement.value && !new RegExp(`^[${this.allowedKeys}]*$`, "u").test(this.inputElement.value)) {
114
- const o = this.inputElement.selectionStart - 1;
115
- this.inputElement.value = this.value.toString(), this.inputElement.setSelectionRange(o, o);
116
- return;
117
- }
118
- this.value = this.inputElement.value;
119
- }
120
- handleChange() {
121
- this.dispatchEvent(
122
- new Event("change", {
123
- bubbles: !0,
124
- composed: !0
125
- })
126
- );
127
- }
128
- onFocus() {
129
- this.focused = !this.readonly && !0;
130
- }
131
- onBlur(e) {
132
- this.focused = !this.readonly && !1;
133
- }
134
- handleInputElementPointerdown() {
135
- }
136
- renderStateIcons() {
137
- return this.invalid ? h`
138
- <div id="invalid" class="icon">${y(w)}</div>
139
- ` : this.valid ? h`
140
- <div id="valid" class="icon">${y(T)}</div>
141
- ` : u;
142
- }
143
- get displayValue() {
144
- return this.value.toString();
145
- }
146
- // prettier-ignore
147
- get renderMultiline() {
148
- return h`
149
- ${this.multiline && this.grows && this.rows === -1 ? h`
150
- <div id="sizer" class="input" aria-hidden="true">${this.value}&#8203;
151
- </div>
152
- ` : u}
153
- <!-- @ts-ignore -->
154
- <textarea
155
- name=${n(this.name || void 0)}
156
- aria-describedby=${this.helpTextId}
157
- aria-label=${this.label || this.appliedLabel || this.placeholder}
158
- aria-invalid=${n(this.invalid || void 0)}
159
- class="input"
160
- maxlength=${n(this.maxlength > -1 ? this.maxlength : void 0)}
161
- minlength=${n(this.minlength > -1 ? this.minlength : void 0)}
162
- title=${this.invalid ? "" : u}
163
- pattern=${n(this.pattern)}
164
- placeholder=${this.placeholder}
165
- .value=${this.displayValue}
166
- @change=${this.handleChange}
167
- @input=${this.handleInput}
168
- @focus=${this.onFocus}
169
- @blur=${this.onBlur}
170
- ?disabled=${this.disabled}
171
- ?required=${this.required}
172
- ?readonly=${this.readonly}
173
- rows=${n(this.rows > -1 ? this.rows : void 0)}
174
- autocomplete=${n(this.autocomplete)}
175
- ></textarea>
176
- `;
177
- }
178
- get renderInput() {
179
- return h`
180
- <!-- @ts-ignore -->
181
- <input
182
- name=${n(this.name || void 0)}
183
- type=${this.type}
184
- aria-describedby=${this.helpTextId}
185
- aria-label=${this.label || this.appliedLabel || this.placeholder}
186
- aria-invalid=${n(this.invalid || void 0)}
187
- class="input"
188
- title=${this.invalid ? "" : u}
189
- maxlength=${n(this.maxlength > -1 ? this.maxlength : void 0)}
190
- minlength=${n(this.minlength > -1 ? this.minlength : void 0)}
191
- pattern=${n(this.pattern)}
192
- placeholder=${this.placeholder}
193
- .value=${q(this.displayValue)}
194
- @change=${this.handleChange}
195
- @input=${this.handleInput}
196
- @pointerdown=${this.handleInputElementPointerdown}
197
- @focus=${this.onFocus}
198
- @blur=${this.onBlur}
199
- ?disabled=${this.disabled}
200
- ?required=${this.required}
201
- ?readonly=${this.readonly}
202
- autocomplete=${n(this.autocomplete)}
203
- />
204
- `;
205
- }
206
- renderField() {
207
- return h`
208
- ${this.renderStateIcons()}
209
- ${this.multiline ? this.renderMultiline : this.renderInput}
210
- `;
211
- }
212
- render() {
213
- return h`
214
- <div id="text-field">${this.renderField()}</div>
215
- ${this.renderHelpText(this.invalid)}
216
- `;
217
- }
218
- update(e) {
219
- (e.has("value") || e.has("required") && this.required) && this.updateComplete.then(() => {
220
- this.checkValidity();
221
- }), super.update(e);
222
- }
223
- checkValidity() {
224
- let e = this.inputElement.checkValidity();
225
- return (this.required || this.value && this.pattern) && ((this.disabled || this.multiline) && this.pattern && (e = new RegExp(`^${this.pattern}$`, "u").test(this.value.toString())), this.minlength !== void 0 && (e = e && this.value.toString().length >= this.minlength), this.valid = e, this.invalid = !e), e;
226
- }
227
- }
228
- t([
229
- v()
230
- ], i.prototype, "appliedLabel", 2);
231
- t([
232
- r({ attribute: "allowed-keys" })
233
- ], i.prototype, "allowedKeys", 2);
234
- t([
235
- r({ type: Boolean, reflect: !0 })
236
- ], i.prototype, "focused", 2);
237
- t([
238
- g(".input:not(#sizer)")
239
- ], i.prototype, "inputElement", 2);
240
- t([
241
- r({ type: Boolean, reflect: !0 })
242
- ], i.prototype, "invalid", 2);
243
- t([
244
- r()
245
- ], i.prototype, "label", 2);
246
- t([
247
- r({ type: String, reflect: !0 })
248
- ], i.prototype, "name", 2);
249
- t([
250
- r()
251
- ], i.prototype, "placeholder", 2);
252
- t([
253
- v()
254
- ], i.prototype, "type", 1);
255
- t([
256
- r({ attribute: "type", reflect: !0 })
257
- ], i.prototype, "_type", 2);
258
- t([
259
- r()
260
- ], i.prototype, "pattern", 2);
261
- t([
262
- r({ type: Boolean, reflect: !0 })
263
- ], i.prototype, "grows", 2);
264
- t([
265
- r({ type: Number })
266
- ], i.prototype, "maxlength", 2);
267
- t([
268
- r({ type: Number })
269
- ], i.prototype, "minlength", 2);
270
- t([
271
- r({ type: Boolean, reflect: !0 })
272
- ], i.prototype, "multiline", 2);
273
- t([
274
- r({ type: Boolean, reflect: !0 })
275
- ], i.prototype, "readonly", 2);
276
- t([
277
- r({ type: Number })
278
- ], i.prototype, "rows", 2);
279
- t([
280
- r({ type: Boolean, reflect: !0 })
281
- ], i.prototype, "valid", 2);
282
- t([
283
- r({ type: String })
284
- ], i.prototype, "value", 1);
285
- t([
286
- r({ type: Boolean, reflect: !0 })
287
- ], i.prototype, "quiet", 2);
288
- t([
289
- r({ type: Boolean, reflect: !0 })
290
- ], i.prototype, "required", 2);
291
- t([
292
- r({ type: String, reflect: !0 })
293
- ], i.prototype, "autocomplete", 2);
294
- class A extends i {
295
- constructor() {
296
- super(...arguments), this._value = "";
297
- }
298
- set value(e) {
299
- if (e === this.value)
300
- return;
301
- const s = this._value;
302
- this._value = e, this.requestUpdate("value", s);
303
- }
304
- get value() {
305
- return this._value;
306
- }
307
- }
308
- t([
309
- r({ type: String })
310
- ], A.prototype, "value", 1);
311
- export {
312
- A as L,
313
- i as a
314
- };