@solid-design-system/components 4.6.1 → 4.6.3

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 (243) hide show
  1. package/cdn/chunks/chunk.ETFHHZEV.js +10 -0
  2. package/cdn/chunks/{chunk.NT7FQJJ7.js → chunk.FW57KKQK.js} +1 -1
  3. package/cdn/components/input/input.js +1 -1
  4. package/cdn/components/select/select.js +1 -1
  5. package/cdn/custom-elements.json +3 -2
  6. package/cdn/solid-components.bundle.js +2 -2
  7. package/cdn/solid-components.iife.js +2 -2
  8. package/cdn/solid-components.js +1 -1
  9. package/cdn/web-types.json +1 -1
  10. package/cdn-versioned/_components/menu/menu.js +1 -1
  11. package/cdn-versioned/_components/menu/menu.styles.js +1 -1
  12. package/cdn-versioned/_components/menu-item/menu-item.js +2 -2
  13. package/cdn-versioned/chunks/chunk.2RGRA53Z.js +1 -1
  14. package/cdn-versioned/chunks/chunk.2WXAPGGE.js +1 -1
  15. package/cdn-versioned/chunks/chunk.3AJYYY5A.js +1 -1
  16. package/cdn-versioned/chunks/chunk.4QV2C3W6.js +2 -2
  17. package/cdn-versioned/chunks/chunk.4WOKTDYF.js +4 -4
  18. package/cdn-versioned/chunks/chunk.5A6THIFW.js +1 -1
  19. package/cdn-versioned/chunks/chunk.5HMLFQRB.js +1 -1
  20. package/cdn-versioned/chunks/chunk.65NSSTJE.js +1 -1
  21. package/cdn-versioned/chunks/chunk.6GPQREPR.js +1 -1
  22. package/cdn-versioned/chunks/chunk.6XPWTJEO.js +1 -1
  23. package/cdn-versioned/chunks/chunk.BBNAM6UU.js +1 -1
  24. package/cdn-versioned/chunks/chunk.BI37YYXB.js +1 -1
  25. package/cdn-versioned/chunks/chunk.BMD66TVO.js +1 -1
  26. package/cdn-versioned/chunks/chunk.CASLT6GP.js +1 -1
  27. package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
  28. package/cdn-versioned/chunks/chunk.CMSO45VL.js +1 -1
  29. package/cdn-versioned/chunks/chunk.D46YDQPU.js +1 -1
  30. package/cdn-versioned/chunks/chunk.DVRUURFU.js +1 -1
  31. package/cdn-versioned/chunks/chunk.DYDQ2243.js +1 -1
  32. package/cdn-versioned/chunks/chunk.E7EFDHHO.js +2 -2
  33. package/cdn-versioned/chunks/chunk.EGFNRAGT.js +1 -1
  34. package/cdn-versioned/chunks/chunk.ETFHHZEV.js +10 -0
  35. package/cdn-versioned/chunks/{chunk.NT7FQJJ7.js → chunk.FW57KKQK.js} +4 -4
  36. package/cdn-versioned/chunks/chunk.G2OPAMOQ.js +1 -1
  37. package/cdn-versioned/chunks/chunk.G2ZCGQFT.js +1 -1
  38. package/cdn-versioned/chunks/chunk.GBEVACYL.js +1 -1
  39. package/cdn-versioned/chunks/chunk.GBFIM5QL.js +1 -1
  40. package/cdn-versioned/chunks/chunk.H3OTEEBL.js +1 -1
  41. package/cdn-versioned/chunks/chunk.HYGIHDOD.js +1 -1
  42. package/cdn-versioned/chunks/chunk.JOBOKYRD.js +1 -1
  43. package/cdn-versioned/chunks/chunk.KMM5EXG2.js +3 -3
  44. package/cdn-versioned/chunks/chunk.LXJMGZ7N.js +1 -1
  45. package/cdn-versioned/chunks/chunk.M5IIGUOD.js +1 -1
  46. package/cdn-versioned/chunks/chunk.MC3E2AR6.js +1 -1
  47. package/cdn-versioned/chunks/chunk.NFYYHVW5.js +1 -1
  48. package/cdn-versioned/chunks/chunk.OIWVJGUE.js +1 -1
  49. package/cdn-versioned/chunks/chunk.PQJAYX54.js +1 -1
  50. package/cdn-versioned/chunks/chunk.QBBA2SHL.js +1 -1
  51. package/cdn-versioned/chunks/chunk.SGZKGX4O.js +1 -1
  52. package/cdn-versioned/chunks/chunk.T2LWRJVU.js +1 -1
  53. package/cdn-versioned/chunks/chunk.TDREPTB5.js +1 -1
  54. package/cdn-versioned/chunks/chunk.THMHNOEU.js +1 -1
  55. package/cdn-versioned/chunks/chunk.UCYFSGWV.js +1 -1
  56. package/cdn-versioned/chunks/chunk.V5JHZS5I.js +1 -1
  57. package/cdn-versioned/chunks/chunk.W6X2C6P4.js +1 -1
  58. package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
  59. package/cdn-versioned/chunks/chunk.WEGW2FI2.js +1 -1
  60. package/cdn-versioned/chunks/chunk.XB4NJ3KZ.js +1 -1
  61. package/cdn-versioned/chunks/chunk.XPPEV3KM.js +1 -1
  62. package/cdn-versioned/chunks/chunk.YY5DISTT.js +1 -1
  63. package/cdn-versioned/chunks/chunk.YZFEQRD5.js +1 -1
  64. package/cdn-versioned/chunks/chunk.ZE4SZUMU.js +1 -1
  65. package/cdn-versioned/chunks/chunk.ZFFOAXET.js +1 -1
  66. package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
  67. package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  68. package/cdn-versioned/components/animation/animation.d.ts +1 -1
  69. package/cdn-versioned/components/audio/audio.d.ts +1 -1
  70. package/cdn-versioned/components/badge/badge.d.ts +1 -1
  71. package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
  72. package/cdn-versioned/components/button/button.d.ts +1 -1
  73. package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
  74. package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
  75. package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  76. package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
  77. package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  78. package/cdn-versioned/components/combobox/combobox.d.ts +4 -4
  79. package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
  80. package/cdn-versioned/components/divider/divider.d.ts +1 -1
  81. package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
  82. package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
  83. package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
  84. package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
  85. package/cdn-versioned/components/header/header.d.ts +1 -1
  86. package/cdn-versioned/components/icon/icon.d.ts +1 -1
  87. package/cdn-versioned/components/include/include.d.ts +1 -1
  88. package/cdn-versioned/components/input/input.d.ts +1 -1
  89. package/cdn-versioned/components/input/input.js +1 -1
  90. package/cdn-versioned/components/link/link.d.ts +1 -1
  91. package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
  92. package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  93. package/cdn-versioned/components/notification/notification.d.ts +1 -1
  94. package/cdn-versioned/components/optgroup/optgroup.d.ts +2 -2
  95. package/cdn-versioned/components/option/option.d.ts +1 -1
  96. package/cdn-versioned/components/popup/popup.d.ts +1 -1
  97. package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
  98. package/cdn-versioned/components/radio/radio.d.ts +1 -1
  99. package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
  100. package/cdn-versioned/components/radio-group/radio-group.d.ts +2 -2
  101. package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
  102. package/cdn-versioned/components/select/select.d.ts +4 -4
  103. package/cdn-versioned/components/select/select.js +1 -1
  104. package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
  105. package/cdn-versioned/components/step/step.d.ts +1 -1
  106. package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
  107. package/cdn-versioned/components/switch/switch.d.ts +1 -1
  108. package/cdn-versioned/components/tab/tab.d.ts +1 -1
  109. package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
  110. package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  111. package/cdn-versioned/components/tag/tag.d.ts +1 -1
  112. package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
  113. package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
  114. package/cdn-versioned/components/video/video.d.ts +1 -1
  115. package/cdn-versioned/custom-elements.json +204 -203
  116. package/cdn-versioned/internal/form.js +3 -3
  117. package/cdn-versioned/solid-components.bundle.js +16 -16
  118. package/cdn-versioned/solid-components.css +2 -2
  119. package/cdn-versioned/solid-components.iife.js +16 -16
  120. package/cdn-versioned/solid-components.js +1 -1
  121. package/cdn-versioned/vscode.html-custom-data.json +80 -80
  122. package/cdn-versioned/web-types.json +137 -137
  123. package/dist/chunks/{chunk.LCW6HH3R.js → chunk.WM45G2PF.js} +1 -1
  124. package/dist/chunks/{chunk.5FQR2C3Z.js → chunk.YEOVGDDU.js} +1 -1
  125. package/dist/components/input/input.js +1 -1
  126. package/dist/components/select/select.js +1 -1
  127. package/dist/custom-elements.json +3 -2
  128. package/dist/solid-components.js +2 -2
  129. package/dist/web-types.json +1 -1
  130. package/dist-versioned/_components/menu/menu.js +1 -1
  131. package/dist-versioned/_components/menu/menu.styles.js +1 -1
  132. package/dist-versioned/_components/menu-item/menu-item.js +2 -2
  133. package/dist-versioned/chunks/chunk.2BTNPIIA.js +1 -1
  134. package/dist-versioned/chunks/chunk.2PUHCALR.js +5 -5
  135. package/dist-versioned/chunks/chunk.33Z66RGK.js +1 -1
  136. package/dist-versioned/chunks/chunk.4FGGIABU.js +1 -1
  137. package/dist-versioned/chunks/chunk.55MYJKOZ.js +1 -1
  138. package/dist-versioned/chunks/chunk.5WMLZS55.js +2 -2
  139. package/dist-versioned/chunks/chunk.6BZVWWJH.js +5 -5
  140. package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
  141. package/dist-versioned/chunks/chunk.6GEEKZAO.js +2 -2
  142. package/dist-versioned/chunks/chunk.7LEAXICZ.js +1 -1
  143. package/dist-versioned/chunks/chunk.BPSZYJ7Z.js +3 -3
  144. package/dist-versioned/chunks/chunk.CWDRTJP6.js +4 -4
  145. package/dist-versioned/chunks/chunk.DTROPLWA.js +5 -5
  146. package/dist-versioned/chunks/chunk.DWJJNVK4.js +2 -2
  147. package/dist-versioned/chunks/chunk.DXNE63DE.js +5 -5
  148. package/dist-versioned/chunks/chunk.EEZURJVH.js +1 -1
  149. package/dist-versioned/chunks/chunk.FHD45LNI.js +1 -1
  150. package/dist-versioned/chunks/chunk.G22VBGDU.js +1 -1
  151. package/dist-versioned/chunks/chunk.GE2RNW2L.js +1 -1
  152. package/dist-versioned/chunks/chunk.HGCAGKAN.js +5 -5
  153. package/dist-versioned/chunks/chunk.HGTEA7ZU.js +26 -26
  154. package/dist-versioned/chunks/chunk.HVQFYN4Q.js +3 -3
  155. package/dist-versioned/chunks/chunk.IBGXHO4B.js +3 -3
  156. package/dist-versioned/chunks/chunk.IT5IEST5.js +1 -1
  157. package/dist-versioned/chunks/chunk.J46EMIEI.js +2 -2
  158. package/dist-versioned/chunks/chunk.JFUXDVSP.js +2 -2
  159. package/dist-versioned/chunks/chunk.JOE2FCYM.js +2 -2
  160. package/dist-versioned/chunks/chunk.KNC4IRP2.js +2 -2
  161. package/dist-versioned/chunks/chunk.KVKRZJS7.js +3 -3
  162. package/dist-versioned/chunks/chunk.KZTW7NPR.js +13 -13
  163. package/dist-versioned/chunks/chunk.LC3HWWVO.js +1 -1
  164. package/dist-versioned/chunks/chunk.MONGBDKC.js +2 -2
  165. package/dist-versioned/chunks/chunk.NCWRKGWV.js +2 -2
  166. package/dist-versioned/chunks/chunk.ODT6T47Z.js +2 -2
  167. package/dist-versioned/chunks/chunk.OSFHS5G5.js +2 -2
  168. package/dist-versioned/chunks/chunk.OV6G7CEM.js +6 -6
  169. package/dist-versioned/chunks/chunk.PLE7R7FE.js +3 -3
  170. package/dist-versioned/chunks/chunk.PYP5VT7Q.js +13 -13
  171. package/dist-versioned/chunks/chunk.QI3HLIGL.js +6 -6
  172. package/dist-versioned/chunks/chunk.QTKOFCJ2.js +11 -11
  173. package/dist-versioned/chunks/chunk.RHXSPE3W.js +2 -2
  174. package/dist-versioned/chunks/chunk.RM6FOML7.js +5 -5
  175. package/dist-versioned/chunks/chunk.RQ7H3KYN.js +2 -2
  176. package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
  177. package/dist-versioned/chunks/chunk.UQGHMQG5.js +2 -2
  178. package/dist-versioned/chunks/chunk.VFE45I2T.js +2 -2
  179. package/dist-versioned/chunks/chunk.W4ODHTDG.js +2 -2
  180. package/dist-versioned/chunks/chunk.W4P6W76T.js +1 -1
  181. package/dist-versioned/chunks/chunk.WECFZLMT.js +9 -9
  182. package/dist-versioned/chunks/{chunk.LCW6HH3R.js → chunk.WM45G2PF.js} +3 -3
  183. package/dist-versioned/chunks/{chunk.5FQR2C3Z.js → chunk.YEOVGDDU.js} +30 -30
  184. package/dist-versioned/chunks/chunk.Z7LGSMQC.js +1 -1
  185. package/dist-versioned/chunks/chunk.ZKPN2W3G.js +1 -1
  186. package/dist-versioned/components/accordion/accordion.d.ts +1 -1
  187. package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
  188. package/dist-versioned/components/animation/animation.d.ts +1 -1
  189. package/dist-versioned/components/audio/audio.d.ts +1 -1
  190. package/dist-versioned/components/badge/badge.d.ts +1 -1
  191. package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
  192. package/dist-versioned/components/button/button.d.ts +1 -1
  193. package/dist-versioned/components/button-group/button-group.d.ts +1 -1
  194. package/dist-versioned/components/carousel/carousel.d.ts +1 -1
  195. package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
  196. package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
  197. package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
  198. package/dist-versioned/components/combobox/combobox.d.ts +4 -4
  199. package/dist-versioned/components/dialog/dialog.d.ts +1 -1
  200. package/dist-versioned/components/divider/divider.d.ts +1 -1
  201. package/dist-versioned/components/drawer/drawer.d.ts +1 -1
  202. package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
  203. package/dist-versioned/components/expandable/expandable.d.ts +1 -1
  204. package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
  205. package/dist-versioned/components/header/header.d.ts +1 -1
  206. package/dist-versioned/components/icon/icon.d.ts +1 -1
  207. package/dist-versioned/components/include/include.d.ts +1 -1
  208. package/dist-versioned/components/input/input.d.ts +1 -1
  209. package/dist-versioned/components/input/input.js +1 -1
  210. package/dist-versioned/components/link/link.d.ts +1 -1
  211. package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
  212. package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
  213. package/dist-versioned/components/notification/notification.d.ts +1 -1
  214. package/dist-versioned/components/optgroup/optgroup.d.ts +2 -2
  215. package/dist-versioned/components/option/option.d.ts +1 -1
  216. package/dist-versioned/components/popup/popup.d.ts +1 -1
  217. package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
  218. package/dist-versioned/components/radio/radio.d.ts +1 -1
  219. package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
  220. package/dist-versioned/components/radio-group/radio-group.d.ts +2 -2
  221. package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
  222. package/dist-versioned/components/select/select.d.ts +4 -4
  223. package/dist-versioned/components/select/select.js +1 -1
  224. package/dist-versioned/components/spinner/spinner.d.ts +1 -1
  225. package/dist-versioned/components/step/step.d.ts +1 -1
  226. package/dist-versioned/components/step-group/step-group.d.ts +1 -1
  227. package/dist-versioned/components/switch/switch.d.ts +1 -1
  228. package/dist-versioned/components/tab/tab.d.ts +1 -1
  229. package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
  230. package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
  231. package/dist-versioned/components/tag/tag.d.ts +1 -1
  232. package/dist-versioned/components/textarea/textarea.d.ts +1 -1
  233. package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
  234. package/dist-versioned/components/video/video.d.ts +1 -1
  235. package/dist-versioned/custom-elements.json +204 -203
  236. package/dist-versioned/internal/form.js +3 -3
  237. package/dist-versioned/solid-components.css +2 -2
  238. package/dist-versioned/solid-components.js +2 -2
  239. package/dist-versioned/vscode.html-custom-data.json +80 -80
  240. package/dist-versioned/web-types.json +137 -137
  241. package/package.json +2 -2
  242. package/cdn/chunks/chunk.YYZTCJPO.js +0 -10
  243. package/cdn-versioned/chunks/chunk.YYZTCJPO.js +0 -10
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@solid-design-system/components",
3
3
  "description": "Solid Design System: Components",
4
- "version": "4.6.1",
4
+ "version": "4.6.3",
5
5
  "homepage": "https://solid-design-system.fe.union-investment.de/docs/",
6
6
  "author": "Union Investment",
7
7
  "license": "MIT",
@@ -111,7 +111,7 @@
111
111
  "readme": "README.md",
112
112
  "meta": {
113
113
  "bundleSizeInKb": {
114
- "uncompressed": 416,
114
+ "uncompressed": 417,
115
115
  "gzip": 97
116
116
  }
117
117
  },
@@ -1,10 +0,0 @@
1
- import{a as H,b as U}from"./chunk.5CK64GWQ.js";import{a as B}from"./chunk.D7TMPF3D.js";import{b as N}from"./chunk.65NSSTJE.js";import{a as d}from"./chunk.HE2LNCWW.js";import{a as y,b as C,c as z}from"./chunk.SPDB3L7V.js";import{a as v}from"./chunk.E2DRD2OX.js";import{a as L}from"./chunk.6HO6CE4A.js";import{a as F}from"./chunk.TNPIUMKG.js";import{a as n}from"./chunk.26V4EXHB.js";import{a as M,b as l,c as f,d as x,h as k}from"./chunk.DYDQ2243.js";import{b as T,e as h,h as V,i as _}from"./chunk.IRWHG2Q4.js";import{a as E,e as i}from"./chunk.TJOCV4DC.js";var b=(a,r)=>{var s;let e=a._$AN;if(e===void 0)return!1;for(let o of e)(s=o._$AO)==null||s.call(o,r,!1),b(o,r);return!0},g=a=>{let r,e;do{if((r=a._$AM)===void 0)break;e=r._$AN,e.delete(a),a=r}while((e==null?void 0:e.size)===0)},S=a=>{for(let r;r=a._$AM;a=r){let e=r._$AN;if(e===void 0)r._$AN=e=new Set;else if(e.has(a))break;e.add(a),j(r)}};function R(a){this._$AN!==void 0?(g(this),this._$AM=a,S(this)):this._$AM=a}function J(a,r=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(r)if(Array.isArray(s))for(let p=e;p<s.length;p++)b(s[p],!1),g(s[p]);else s!=null&&(b(s,!1),g(s));else b(this,a)}var j=a=>{var r,e;a.type==y.CHILD&&((r=a._$AP)!=null||(a._$AP=J),(e=a._$AQ)!=null||(a._$AQ=R))},$=class extends z{constructor(){super(...arguments),this._$AN=void 0}_$AT(r,e,s){super._$AT(r,e,s),S(this),this.isConnected=r._$AU}_$AO(r,e=!0){var s,o;r!==this.isConnected&&(this.isConnected=r,r?(s=this.reconnected)==null||s.call(this):(o=this.disconnected)==null||o.call(this)),e&&(b(this,r),g(this))}setValue(r){if(H(this._$Ct))this._$Ct._$AI(r,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=r,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var D=class extends ${constructor(e){super(e);this.handlePointerDown=e=>{e.button!==0||this.host.disabled||this.spinOnLongPressCallback(e)};this.handlePointerUp=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(e.type!==y.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return _}update(e,[s]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=E({},s),this.host.addEventListener("pointerdown",this.handlePointerDown)),V}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(e){var s;e.preventDefault(),e.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(s=this.observer)==null||s.disconnect(),this.observer=new MutationObserver(o=>{o.forEach(p=>{p.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var e;clearInterval(this.interval),clearTimeout(this.timeout),(e=this.observer)==null||e.disconnect()}},A=C(D);var O,Q=(O=navigator.userAgentData)==null?void 0:O.brands.some(a=>a.brand.includes("Chromium")),G=Q?!1:navigator.userAgent.includes("Firefox"),t=class extends k{constructor(){super(...arguments);this.formControlController=new N(this);this.hasSlotController=new L(this,"help-text","label","left","right","message","placeholder");this.localize=new F(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var e,s;return(s=(e=this.input)==null?void 0:e.valueAsDate)!=null?s:null}set valueAsDate(e){let s=document.createElement("input");s.type="date",s.valueAsDate=e,this.value=s.value}get valueAsNumber(){var e,s;return(s=(e=this.input)==null?void 0:e.valueAsNumber)!=null?s:parseFloat(this.value)}set valueAsNumber(e){let s=document.createElement("input");s.type="number",s.valueAsNumber=e,this.value=s.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(e){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),e.stopPropagation()}handleSearchClick(e){this.emit("sd-search"),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleKeyDown(e){let s=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!s&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,s,o="none"){this.input.setSelectionRange(e,s,o)}setRangeText(e,s,o,p){this.input.setRangeText(e,s,o,p),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},s=this.label?!0:!!e.label,o=this.helpText?!0:!!e.helpText,p=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),K=!!e.tooltip,w=this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",P=this.size==="sm"?"text-sm":"text-base",q={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[w],m=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",u={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],c={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return h`<div part="form-control" class="${n(this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${s||K?h`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${n(s?"inline-block":"hidden",P)}" for="input" aria-hidden="${s?"false":"true"}"><slot name="label">${this.label}</slot></label> ${e.tooltip?h`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${n("relative w-full",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${n("absolute w-full h-full pointer-events-none border rounded-default",q)}"></div><div part="base" class="${n("px-4 flex flex-row items-center rounded-default transition-all",this.size==="lg"?"py-2":"py-1",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",w==="disabled"||w==="visuallyDisabled"?"text-neutral-500":"text-black")}">${e.left?h`<slot name="left" part="left" class="${n("inline-flex",this.size==="sm"?"mr-1":"mr-2",m,c)}"></slot>`:""} <input part="input" id="input" class="${n("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder-neutral-500":"placeholder-neutral-700",this.size==="sm"?"h-6":"h-8",P,this.visuallyDisabled&&"cursor-not-allowed")}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${d(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${d(this.placeholder)}" minlength="${d(this.minlength)}" maxlength="${d(this.maxlength)}" min="${d(this.min)}" max="${d(this.max)}" step="${d(this.step)}" .value="${U(this.value)}" autocapitalize="${d(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${d(this.type==="password"?"off":this.autocomplete)}" autocorrect="${d(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${d(this.pattern)}" enterkeyhint="${d(this.enterkeyhint)}" inputmode="${d(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${p?h`<button part="clear-button" class="${n("flex justify-center",u)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${n("icon-fill-neutral-800",c)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?h`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="flex items-center" type="button" @click="${this.handlePasswordToggle}" tabindex="-1">${this.passwordVisible?h`<slot name="show-password-icon"><sd-icon class="${n(m,u,c)}" library="system" name="eye"></sd-icon></slot>`:h`<slot name="hide-password-icon"><sd-icon class="${n(m,u,c)}" library="system" name="eye-crossed-out"></sd-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!G?h`<sd-icon class="${n(m,u,c)}" library="system" name="calendar"></sd-icon>`:""} ${this.type==="time"?h`<sd-icon class="${n(m,u,c)}" library="system" name="clock"></sd-icon>`:""} ${this.type==="search"?h`<button class="${n("flex items-center sd-interactive",u)}" type="button" @click="${this.handleSearchClick}"><sd-icon class="${n(m,c)}" library="system" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:""} ${this.showInvalidStyle?h`<sd-icon part="invalid-icon" class="${n("text-error",u,c)}" library="system" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?h`<sd-icon class="${n("text-success flex-shrink-0",u,c)}" library="system" name="status-check" part="valid-icon"></sd-icon>`:""} ${e.right?h`<slot name="right" part="right" class="${n("inline-flex",m,u,c)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?h`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${A({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-icon name="system/minus-circle" label="Decrease value" class="${n(m,u,c)}"></sd-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${A({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-icon name="system/plus-circle" label="Decrease value" class="${n(m,u,c)}"></sd-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${n("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};t.styles=[...k.styles,T`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],i([x("#input")],t.prototype,"input",2),i([x("#invalid-message")],t.prototype,"invalidMessage",2),i([f()],t.prototype,"hasFocus",2),i([f()],t.prototype,"showValidStyle",2),i([f()],t.prototype,"showInvalidStyle",2),i([l({type:String,reflect:!0})],t.prototype,"type",2),i([l({type:String,reflect:!0})],t.prototype,"size",2),i([l({type:String,reflect:!0})],t.prototype,"inputmode",2),i([l()],t.prototype,"value",2),i([B()],t.prototype,"defaultValue",2),i([l({type:String,reflect:!0})],t.prototype,"placeholder",2),i([l({type:String,reflect:!0})],t.prototype,"label",2),i([l({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),i([l({type:Boolean,reflect:!0})],t.prototype,"clearable",2),i([l({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),i([l({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([l({attribute:"password-toggle",type:Boolean,reflect:!0})],t.prototype,"passwordToggle",2),i([l({attribute:"password-visible",type:Boolean,reflect:!0})],t.prototype,"passwordVisible",2),i([l({attribute:"spin-buttons",type:Boolean,reflect:!0})],t.prototype,"spinButtons",2),i([l({type:Number,reflect:!0})],t.prototype,"minlength",2),i([l({type:Number,reflect:!0})],t.prototype,"maxlength",2),i([l({reflect:!0})],t.prototype,"min",2),i([l({reflect:!0})],t.prototype,"max",2),i([l({type:String,reflect:!0})],t.prototype,"form",2),i([l({type:String,reflect:!0})],t.prototype,"name",2),i([l({type:String,reflect:!0})],t.prototype,"title",2),i([l({type:Boolean,reflect:!0})],t.prototype,"required",2),i([l()],t.prototype,"pattern",2),i([l({reflect:!0})],t.prototype,"step",2),i([l({type:String,reflect:!0})],t.prototype,"autocapitalize",2),i([l({type:String,reflect:!0})],t.prototype,"autocorrect",2),i([l({reflect:!0})],t.prototype,"autocomplete",2),i([l({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),i([l({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),i([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),i([l({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],t.prototype,"spellcheck",2),i([v("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([v("step",{waitUntilFirstUpdate:!0})],t.prototype,"handleStepChange",1),i([v("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=i([M("sd-input")],t);export{t as a};
2
- /*! Bundled license information:
3
-
4
- lit-html/async-directive.js:
5
- (**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- *)
10
- */
@@ -1,10 +0,0 @@
1
- import{a as H,b as U}from"./chunk.5CK64GWQ.js";import{a as B}from"./chunk.D7TMPF3D.js";import{b as N}from"./chunk.65NSSTJE.js";import{a as d}from"./chunk.HE2LNCWW.js";import{a as y,b as C,c as z}from"./chunk.SPDB3L7V.js";import{a as v}from"./chunk.E2DRD2OX.js";import{a as L}from"./chunk.6HO6CE4A.js";import{a as F}from"./chunk.TNPIUMKG.js";import{a as n}from"./chunk.26V4EXHB.js";import{a as M,b as l,c as f,d as x,h as k}from"./chunk.DYDQ2243.js";import{b as T,e as h,h as V,i as _}from"./chunk.IRWHG2Q4.js";import{a as E,e as i}from"./chunk.TJOCV4DC.js";var b=(a,r)=>{var s;let e=a._$AN;if(e===void 0)return!1;for(let o of e)(s=o._$AO)==null||s.call(o,r,!1),b(o,r);return!0},g=a=>{let r,e;do{if((r=a._$AM)===void 0)break;e=r._$AN,e.delete(a),a=r}while((e==null?void 0:e.size)===0)},S=a=>{for(let r;r=a._$AM;a=r){let e=r._$AN;if(e===void 0)r._$AN=e=new Set;else if(e.has(a))break;e.add(a),j(r)}};function R(a){this._$AN!==void 0?(g(this),this._$AM=a,S(this)):this._$AM=a}function J(a,r=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(r)if(Array.isArray(s))for(let p=e;p<s.length;p++)b(s[p],!1),g(s[p]);else s!=null&&(b(s,!1),g(s));else b(this,a)}var j=a=>{var r,e;a.type==y.CHILD&&((r=a._$AP)!=null||(a._$AP=J),(e=a._$AQ)!=null||(a._$AQ=R))},$=class extends z{constructor(){super(...arguments),this._$AN=void 0}_$AT(r,e,s){super._$AT(r,e,s),S(this),this.isConnected=r._$AU}_$AO(r,e=!0){var s,o;r!==this.isConnected&&(this.isConnected=r,r?(s=this.reconnected)==null||s.call(this):(o=this.disconnected)==null||o.call(this)),e&&(b(this,r),g(this))}setValue(r){if(H(this._$Ct))this._$Ct._$AI(r,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=r,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var D=class extends ${constructor(e){super(e);this.handlePointerDown=e=>{e.button!==0||this.host.disabled||this.spinOnLongPressCallback(e)};this.handlePointerUp=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(e.type!==y.ELEMENT||!(e.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(e){return _}update(e,[s]){return this.callbacks===void 0&&this.host===void 0&&(this.host=e.element,this.callbacks=E({},s),this.host.addEventListener("pointerdown",this.handlePointerDown)),V}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(e){var s;e.preventDefault(),e.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(s=this.observer)==null||s.disconnect(),this.observer=new MutationObserver(o=>{o.forEach(p=>{p.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var e;clearInterval(this.interval),clearTimeout(this.timeout),(e=this.observer)==null||e.disconnect()}},A=C(D);var O,Q=(O=navigator.userAgentData)==null?void 0:O.brands.some(a=>a.brand.includes("Chromium")),G=Q?!1:navigator.userAgent.includes("Firefox"),t=class extends k{constructor(){super(...arguments);this.formControlController=new N(this);this.hasSlotController=new L(this,"help-text","label","left","right","message","placeholder");this.localize=new F(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var e,s;return(s=(e=this.input)==null?void 0:e.valueAsDate)!=null?s:null}set valueAsDate(e){let s=document.createElement("input");s.type="date",s.valueAsDate=e,this.value=s.value}get valueAsNumber(){var e,s;return(s=(e=this.input)==null?void 0:e.valueAsNumber)!=null?s:parseFloat(this.value)}set valueAsNumber(e){let s=document.createElement("input");s.type="number",s.valueAsNumber=e,this.value=s.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(e){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),e.stopPropagation()}handleSearchClick(e){this.emit("sd-search"),e.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e),this.invalidMessage.textContent=e.target.validationMessage}handleKeyDown(e){let s=e.metaKey||e.ctrlKey||e.shiftKey||e.altKey;e.key==="Enter"&&!s&&setTimeout(()=>{!e.defaultPrevented&&!e.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let e=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=e}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let e=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=e}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(e){this.input.focus(e)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(e,s,o="none"){this.input.setSelectionRange(e,s,o)}setRangeText(e,s,o,p){this.input.setRangeText(e,s,o,p),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var e;return(e=this.input)==null?void 0:e.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(e){this.input.setCustomValidity(e),this.formControlController.updateValidity()}render(){let e={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},s=this.label?!0:!!e.label,o=this.helpText?!0:!!e.helpText,p=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),K=!!e.tooltip,w=this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",P=this.size==="sm"?"text-sm":"text-base",q={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[w],m=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",u={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],c={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return h`<div part="form-control" class="${n(this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}">${s||K?h`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${n(s?"inline-block":"hidden",P)}" for="input" aria-hidden="${s?"false":"true"}"><slot name="label">${this.label}</slot></label> ${e.tooltip?h`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${n("relative w-full",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${n("absolute w-full h-full pointer-events-none border rounded-default",q)}"></div><div part="base" class="${n("px-4 flex flex-row items-center rounded-default transition-all",this.size==="lg"?"py-2":"py-1",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",w==="disabled"||w==="visuallyDisabled"?"text-neutral-500":"text-black")}">${e.left?h`<slot name="left" part="left" class="${n("inline-flex",this.size==="sm"?"mr-1":"mr-2",m,c)}"></slot>`:""} <input part="input" id="input" class="${n("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder-neutral-500":"placeholder-neutral-700",this.size==="sm"?"h-6":"h-8",P,this.visuallyDisabled&&"cursor-not-allowed")}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${d(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${d(this.placeholder)}" minlength="${d(this.minlength)}" maxlength="${d(this.maxlength)}" min="${d(this.min)}" max="${d(this.max)}" step="${d(this.step)}" .value="${U(this.value)}" autocapitalize="${d(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${d(this.type==="password"?"off":this.autocomplete)}" autocorrect="${d(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${d(this.pattern)}" enterkeyhint="${d(this.enterkeyhint)}" inputmode="${d(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${p?h`<button part="clear-button" class="${n("flex justify-center",u)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-4-6-1-icon class="${n("icon-fill-neutral-800",c)}" library="system" name="closing-round"></sd-4-6-1-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?h`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="flex items-center" type="button" @click="${this.handlePasswordToggle}" tabindex="-1">${this.passwordVisible?h`<slot name="show-password-icon"><sd-4-6-1-icon class="${n(m,u,c)}" library="system" name="eye"></sd-4-6-1-icon></slot>`:h`<slot name="hide-password-icon"><sd-4-6-1-icon class="${n(m,u,c)}" library="system" name="eye-crossed-out"></sd-4-6-1-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!G?h`<sd-4-6-1-icon class="${n(m,u,c)}" library="system" name="calendar"></sd-4-6-1-icon>`:""} ${this.type==="time"?h`<sd-4-6-1-icon class="${n(m,u,c)}" library="system" name="clock"></sd-4-6-1-icon>`:""} ${this.type==="search"?h`<button class="${n("flex items-center sd-interactive",u)}" type="button" @click="${this.handleSearchClick}"><sd-4-6-1-icon class="${n(m,c)}" library="system" name="magnifying-glass" label="${this.localize.term("search")}"></sd-4-6-1-icon></button>`:""} ${this.showInvalidStyle?h`<sd-4-6-1-icon part="invalid-icon" class="${n("text-error",u,c)}" library="system" name="risk"></sd-4-6-1-icon>`:""} ${this.showValidStyle&&this.styleOnValid?h`<sd-4-6-1-icon class="${n("text-success flex-shrink-0",u,c)}" library="system" name="status-check" part="valid-icon"></sd-4-6-1-icon>`:""} ${e.right?h`<slot name="right" part="right" class="${n("inline-flex",m,u,c)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?h`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${A({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-4-6-1-icon name="system/minus-circle" label="Decrease value" class="${n(m,u,c)}"></sd-4-6-1-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${A({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-4-6-1-icon name="system/plus-circle" label="Decrease value" class="${n(m,u,c)}"></sd-4-6-1-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${n("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};t.styles=[...k.styles,T`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-4-6-1-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],i([x("#input")],t.prototype,"input",2),i([x("#invalid-message")],t.prototype,"invalidMessage",2),i([f()],t.prototype,"hasFocus",2),i([f()],t.prototype,"showValidStyle",2),i([f()],t.prototype,"showInvalidStyle",2),i([l({type:String,reflect:!0})],t.prototype,"type",2),i([l({type:String,reflect:!0})],t.prototype,"size",2),i([l({type:String,reflect:!0})],t.prototype,"inputmode",2),i([l()],t.prototype,"value",2),i([B()],t.prototype,"defaultValue",2),i([l({type:String,reflect:!0})],t.prototype,"placeholder",2),i([l({type:String,reflect:!0})],t.prototype,"label",2),i([l({type:String,attribute:"help-text",reflect:!0})],t.prototype,"helpText",2),i([l({type:Boolean,reflect:!0})],t.prototype,"clearable",2),i([l({type:Boolean,reflect:!0})],t.prototype,"disabled",2),i([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],t.prototype,"visuallyDisabled",2),i([l({type:Boolean,reflect:!0})],t.prototype,"readonly",2),i([l({attribute:"password-toggle",type:Boolean,reflect:!0})],t.prototype,"passwordToggle",2),i([l({attribute:"password-visible",type:Boolean,reflect:!0})],t.prototype,"passwordVisible",2),i([l({attribute:"spin-buttons",type:Boolean,reflect:!0})],t.prototype,"spinButtons",2),i([l({type:Number,reflect:!0})],t.prototype,"minlength",2),i([l({type:Number,reflect:!0})],t.prototype,"maxlength",2),i([l({reflect:!0})],t.prototype,"min",2),i([l({reflect:!0})],t.prototype,"max",2),i([l({type:String,reflect:!0})],t.prototype,"form",2),i([l({type:String,reflect:!0})],t.prototype,"name",2),i([l({type:String,reflect:!0})],t.prototype,"title",2),i([l({type:Boolean,reflect:!0})],t.prototype,"required",2),i([l()],t.prototype,"pattern",2),i([l({reflect:!0})],t.prototype,"step",2),i([l({type:String,reflect:!0})],t.prototype,"autocapitalize",2),i([l({type:String,reflect:!0})],t.prototype,"autocorrect",2),i([l({reflect:!0})],t.prototype,"autocomplete",2),i([l({type:Boolean,reflect:!0})],t.prototype,"autofocus",2),i([l({type:String,reflect:!0})],t.prototype,"enterkeyhint",2),i([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],t.prototype,"styleOnValid",2),i([l({type:Boolean,converter:{fromAttribute:e=>!(!e||e==="false"),toAttribute:e=>e?"true":"false"}})],t.prototype,"spellcheck",2),i([v("disabled",{waitUntilFirstUpdate:!0})],t.prototype,"handleDisabledChange",1),i([v("step",{waitUntilFirstUpdate:!0})],t.prototype,"handleStepChange",1),i([v("value",{waitUntilFirstUpdate:!0})],t.prototype,"handleValueChange",1),t=i([M("sd-4-6-1-input")],t);export{t as a};
2
- /*! Bundled license information:
3
-
4
- lit-html/async-directive.js:
5
- (**
6
- * @license
7
- * Copyright 2017 Google LLC
8
- * SPDX-License-Identifier: BSD-3-Clause
9
- *)
10
- */