@mhmo91/schmancy 0.2.186 → 0.2.187

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 (257) hide show
  1. package/dist/{animated-text-Dqv6rpjx.cjs → animated-text-Bna1XsEc.cjs} +2 -2
  2. package/dist/{animated-text-Dqv6rpjx.cjs.map → animated-text-Bna1XsEc.cjs.map} +1 -1
  3. package/dist/{animated-text-C9KbPsxA.js → animated-text-CgxDEni2.js} +3 -3
  4. package/dist/{animated-text-C9KbPsxA.js.map → animated-text-CgxDEni2.js.map} +1 -1
  5. package/dist/animated-text.cjs +1 -1
  6. package/dist/animated-text.js +1 -1
  7. package/dist/area.cjs +1 -1
  8. package/dist/{area.component-RBMgDabC.cjs → area.component-DUEJtikV.cjs} +2 -2
  9. package/dist/{area.component-RBMgDabC.cjs.map → area.component-DUEJtikV.cjs.map} +1 -1
  10. package/dist/{area.component-C2gLQPX9.js → area.component-DuMDGrWd.js} +3 -3
  11. package/dist/{area.component-C2gLQPX9.js.map → area.component-DuMDGrWd.js.map} +1 -1
  12. package/dist/area.js +1 -1
  13. package/dist/{autocomplete-CQt8eGDe.js → autocomplete-BEZJBy1r.js} +3 -3
  14. package/dist/{autocomplete-CQt8eGDe.js.map → autocomplete-BEZJBy1r.js.map} +1 -1
  15. package/dist/{autocomplete-CXM7C5kt.cjs → autocomplete-DzCIeHuW.cjs} +2 -2
  16. package/dist/{autocomplete-CXM7C5kt.cjs.map → autocomplete-DzCIeHuW.cjs.map} +1 -1
  17. package/dist/autocomplete.cjs +1 -1
  18. package/dist/autocomplete.js +1 -1
  19. package/dist/{avatar-DW9wFq-g.cjs → avatar-B8hvLZNd.cjs} +2 -2
  20. package/dist/{avatar-DW9wFq-g.cjs.map → avatar-B8hvLZNd.cjs.map} +1 -1
  21. package/dist/{avatar-B6dsjbHq.js → avatar-Cknps9ZV.js} +40 -40
  22. package/dist/{avatar-B6dsjbHq.js.map → avatar-Cknps9ZV.js.map} +1 -1
  23. package/dist/badge.cjs +1 -1
  24. package/dist/badge.js +1 -1
  25. package/dist/busy.cjs +1 -1
  26. package/dist/busy.js +1 -1
  27. package/dist/button.cjs +1 -1
  28. package/dist/button.js +1 -1
  29. package/dist/card.cjs +1 -1
  30. package/dist/card.js +1 -1
  31. package/dist/{checkbox-_BsWWi0g.cjs → checkbox-BtGb6gGN.cjs} +2 -2
  32. package/dist/{checkbox-_BsWWi0g.cjs.map → checkbox-BtGb6gGN.cjs.map} +1 -1
  33. package/dist/{checkbox-bWsZHlfK.js → checkbox-Db67O1Bh.js} +2 -2
  34. package/dist/{checkbox-bWsZHlfK.js.map → checkbox-Db67O1Bh.js.map} +1 -1
  35. package/dist/checkbox.cjs +1 -1
  36. package/dist/checkbox.js +1 -1
  37. package/dist/{chips-CAKQnBTK.js → chips-B2gYT4uW.js} +3 -3
  38. package/dist/{chips-CAKQnBTK.js.map → chips-B2gYT4uW.js.map} +1 -1
  39. package/dist/{chips-BB5RkDNP.cjs → chips-CKgjZuwb.cjs} +2 -2
  40. package/dist/{chips-BB5RkDNP.cjs.map → chips-CKgjZuwb.cjs.map} +1 -1
  41. package/dist/chips.cjs +1 -1
  42. package/dist/chips.js +1 -1
  43. package/dist/components.cjs +1 -1
  44. package/dist/components.js +1 -1
  45. package/dist/content-drawer.cjs +1 -1
  46. package/dist/content-drawer.js +1 -1
  47. package/dist/{date-range-CFgw3_Jj.js → date-range-3mp_HdkF.js} +3 -3
  48. package/dist/{date-range-CFgw3_Jj.js.map → date-range-3mp_HdkF.js.map} +1 -1
  49. package/dist/{date-range-Dzb8-7V-.cjs → date-range-BBIJ0kvh.cjs} +2 -2
  50. package/dist/{date-range-Dzb8-7V-.cjs.map → date-range-BBIJ0kvh.cjs.map} +1 -1
  51. package/dist/date-range.cjs +1 -1
  52. package/dist/date-range.js +1 -1
  53. package/dist/{delay-B5O-8Hyn.js → delay-BlGr2JnU.js} +2 -2
  54. package/dist/{delay-B5O-8Hyn.js.map → delay-BlGr2JnU.js.map} +1 -1
  55. package/dist/{delay-B4d5oJbV.cjs → delay-DwLLPpTz.cjs} +2 -2
  56. package/dist/{delay-B4d5oJbV.cjs.map → delay-DwLLPpTz.cjs.map} +1 -1
  57. package/dist/delay.cjs +1 -1
  58. package/dist/delay.js +1 -1
  59. package/dist/dialog.cjs +1 -1
  60. package/dist/{dialog.component-D2ZvZ0Wu.js → dialog.component-B6E5SlZk.js} +3 -3
  61. package/dist/{dialog.component-D2ZvZ0Wu.js.map → dialog.component-B6E5SlZk.js.map} +1 -1
  62. package/dist/{dialog.component-DPKCPwf9.cjs → dialog.component-Cxen6yCU.cjs} +2 -2
  63. package/dist/{dialog.component-DPKCPwf9.cjs.map → dialog.component-Cxen6yCU.cjs.map} +1 -1
  64. package/dist/dialog.js +1 -1
  65. package/dist/{divider-Clk5mtqJ.js → divider-C5KbJnNJ.js} +3 -3
  66. package/dist/{divider-Clk5mtqJ.js.map → divider-C5KbJnNJ.js.map} +1 -1
  67. package/dist/{divider-8veioiIO.cjs → divider-CIMJK_rP.cjs} +2 -2
  68. package/dist/{divider-8veioiIO.cjs.map → divider-CIMJK_rP.cjs.map} +1 -1
  69. package/dist/divider.cjs +1 -1
  70. package/dist/divider.js +1 -1
  71. package/dist/{dropdown-content-_NNVH-E_.cjs → dropdown-content-Db-wdS2s.cjs} +2 -2
  72. package/dist/{dropdown-content-_NNVH-E_.cjs.map → dropdown-content-Db-wdS2s.cjs.map} +1 -1
  73. package/dist/{dropdown-content-BVf0TP49.js → dropdown-content-Q9VLVb2F.js} +3 -3
  74. package/dist/{dropdown-content-BVf0TP49.js.map → dropdown-content-Q9VLVb2F.js.map} +1 -1
  75. package/dist/dropdown.cjs +1 -1
  76. package/dist/dropdown.js +1 -1
  77. package/dist/extra.cjs +1 -1
  78. package/dist/extra.js +1 -1
  79. package/dist/{flex-CO3HsYk1.js → flex-8XEPqr9b.js} +2 -2
  80. package/dist/{flex-CO3HsYk1.js.map → flex-8XEPqr9b.js.map} +1 -1
  81. package/dist/{flex-YqKkPuzv.cjs → flex-BxlGk9pA.cjs} +2 -2
  82. package/dist/{flex-YqKkPuzv.cjs.map → flex-BxlGk9pA.cjs.map} +1 -1
  83. package/dist/{form-B1sbw-GA.cjs → form-CYMHfAG_.cjs} +2 -2
  84. package/dist/{form-B1sbw-GA.cjs.map → form-CYMHfAG_.cjs.map} +1 -1
  85. package/dist/{form-CttPpKe3.js → form-CyEVtx-V.js} +2 -2
  86. package/dist/{form-CttPpKe3.js.map → form-CyEVtx-V.js.map} +1 -1
  87. package/dist/form.cjs +1 -1
  88. package/dist/form.js +1 -1
  89. package/dist/{icon-pyoUHA2c.js → icon-C-lt8a8h.js} +3 -3
  90. package/dist/{icon-pyoUHA2c.js.map → icon-C-lt8a8h.js.map} +1 -1
  91. package/dist/{icon-bIL7C6LJ.cjs → icon-DfXEFS7C.cjs} +2 -2
  92. package/dist/{icon-bIL7C6LJ.cjs.map → icon-DfXEFS7C.cjs.map} +1 -1
  93. package/dist/{icon-button-aro-is51.js → icon-button-BLJ1x_1w.js} +3 -3
  94. package/dist/{icon-button-aro-is51.js.map → icon-button-BLJ1x_1w.js.map} +1 -1
  95. package/dist/{icon-button-D2y82BxG.cjs → icon-button-ChHwSu3H.cjs} +2 -2
  96. package/dist/{icon-button-D2y82BxG.cjs.map → icon-button-ChHwSu3H.cjs.map} +1 -1
  97. package/dist/icons.cjs +1 -1
  98. package/dist/icons.js +1 -1
  99. package/dist/index.cjs +1 -1
  100. package/dist/index.js +38 -38
  101. package/dist/{input-DKCuuzOz.js → input-C6m5Q-wB.js} +2 -2
  102. package/dist/{input-DKCuuzOz.js.map → input-C6m5Q-wB.js.map} +1 -1
  103. package/dist/{input-7GfGRMcH.cjs → input-Co_W4xBr.cjs} +2 -2
  104. package/dist/{input-7GfGRMcH.cjs.map → input-Co_W4xBr.cjs.map} +1 -1
  105. package/dist/input.cjs +1 -1
  106. package/dist/input.js +1 -1
  107. package/dist/layout.cjs +1 -1
  108. package/dist/layout.js +1 -1
  109. package/dist/{list-BZLjwNki.cjs → list-6wM5ZEpq.cjs} +2 -2
  110. package/dist/{list-BZLjwNki.cjs.map → list-6wM5ZEpq.cjs.map} +1 -1
  111. package/dist/{list-Dfvg2IpT.js → list-BPWFlqaM.js} +2 -2
  112. package/dist/{list-Dfvg2IpT.js.map → list-BPWFlqaM.js.map} +1 -1
  113. package/dist/list.cjs +1 -1
  114. package/dist/list.js +1 -1
  115. package/dist/{litElement.mixin-Cq04iWwZ.js → litElement.mixin-CkrfRzHl.js} +2 -2
  116. package/dist/{litElement.mixin-Cq04iWwZ.js.map → litElement.mixin-CkrfRzHl.js.map} +1 -1
  117. package/dist/{litElement.mixin-BLxKs_2o.cjs → litElement.mixin-Ct7SS5n6.cjs} +2 -2
  118. package/dist/{litElement.mixin-BLxKs_2o.cjs.map → litElement.mixin-Ct7SS5n6.cjs.map} +1 -1
  119. package/dist/{menu-BYzDXef5.js → menu-5jqKvFvl.js} +3 -3
  120. package/dist/{menu-BYzDXef5.js.map → menu-5jqKvFvl.js.map} +1 -1
  121. package/dist/{menu-CzYskZXe.cjs → menu-DMVl6G87.cjs} +2 -2
  122. package/dist/{menu-CzYskZXe.cjs.map → menu-DMVl6G87.cjs.map} +1 -1
  123. package/dist/menu.cjs +1 -1
  124. package/dist/menu.js +1 -1
  125. package/dist/mixins/formField.mixin.ts +3 -3
  126. package/dist/nav-drawer.cjs +1 -1
  127. package/dist/nav-drawer.js +1 -1
  128. package/dist/{notification-service-D9x31QLb.js → notification-service-C5yDuHNM.js} +3 -3
  129. package/dist/{notification-service-D9x31QLb.js.map → notification-service-C5yDuHNM.js.map} +1 -1
  130. package/dist/{notification-service-DeeKawZA.cjs → notification-service-DFT169-h.cjs} +2 -2
  131. package/dist/{notification-service-DeeKawZA.cjs.map → notification-service-DFT169-h.cjs.map} +1 -1
  132. package/dist/notification.cjs +1 -1
  133. package/dist/notification.js +1 -1
  134. package/dist/{option-CRvJKhL8.js → option-BMYmJ0O3.js} +2 -2
  135. package/dist/{option-CRvJKhL8.js.map → option-BMYmJ0O3.js.map} +1 -1
  136. package/dist/{option-BczkUVWO.cjs → option-DQgu3g8M.cjs} +2 -2
  137. package/dist/{option-BczkUVWO.cjs.map → option-DQgu3g8M.cjs.map} +1 -1
  138. package/dist/option.cjs +1 -1
  139. package/dist/option.js +1 -1
  140. package/dist/{payment-card-form-SnUn6B45.cjs → payment-card-form-BR0xtD5P.cjs} +2 -2
  141. package/dist/{payment-card-form-SnUn6B45.cjs.map → payment-card-form-BR0xtD5P.cjs.map} +1 -1
  142. package/dist/{payment-card-form-Bzqxj5Be.js → payment-card-form-s42SWQGf.js} +3 -3
  143. package/dist/{payment-card-form-Bzqxj5Be.js.map → payment-card-form-s42SWQGf.js.map} +1 -1
  144. package/dist/radio-button-BFnxLdD0.cjs +41 -0
  145. package/dist/radio-button-BFnxLdD0.cjs.map +1 -0
  146. package/dist/radio-button-CXFI0kDZ.js +157 -0
  147. package/dist/radio-button-CXFI0kDZ.js.map +1 -0
  148. package/dist/radio-group.cjs +1 -1
  149. package/dist/radio-group.js +1 -1
  150. package/dist/{schmancy-steps-container-xE_kT_VV.cjs → schmancy-steps-container-BrLuO3on.cjs} +2 -2
  151. package/dist/{schmancy-steps-container-xE_kT_VV.cjs.map → schmancy-steps-container-BrLuO3on.cjs.map} +1 -1
  152. package/dist/{schmancy-steps-container-NNEHYKjy.js → schmancy-steps-container-Qv81sQOz.js} +2 -2
  153. package/dist/{schmancy-steps-container-NNEHYKjy.js.map → schmancy-steps-container-Qv81sQOz.js.map} +1 -1
  154. package/dist/{select-7n98GQY4.cjs → select-Bw7syOVV.cjs} +2 -2
  155. package/dist/{select-7n98GQY4.cjs.map → select-Bw7syOVV.cjs.map} +1 -1
  156. package/dist/{select-XB_yxUzT.js → select-DJk5ly1k.js} +3 -3
  157. package/dist/{select-XB_yxUzT.js.map → select-DJk5ly1k.js.map} +1 -1
  158. package/dist/select.cjs +1 -1
  159. package/dist/select.js +1 -1
  160. package/dist/{sheet-C1gD4JHq.js → sheet-D6DVCs5j.js} +3 -3
  161. package/dist/{sheet-C1gD4JHq.js.map → sheet-D6DVCs5j.js.map} +1 -1
  162. package/dist/{sheet-CgCZMutu.cjs → sheet-Dmb3v-aK.cjs} +2 -2
  163. package/dist/{sheet-CgCZMutu.cjs.map → sheet-Dmb3v-aK.cjs.map} +1 -1
  164. package/dist/sheet.cjs +1 -1
  165. package/dist/sheet.js +1 -1
  166. package/dist/{slider-CLEk8JzU.cjs → slider-CHmuf4HT.cjs} +2 -2
  167. package/dist/{slider-CLEk8JzU.cjs.map → slider-CHmuf4HT.cjs.map} +1 -1
  168. package/dist/{slider-BU4EGa3i.js → slider-D4CoWWKa.js} +3 -3
  169. package/dist/{slider-BU4EGa3i.js.map → slider-D4CoWWKa.js.map} +1 -1
  170. package/dist/slider.cjs +1 -1
  171. package/dist/slider.js +1 -1
  172. package/dist/{spinner-Cyd4rgTb.js → spinner-3R0GSI2j.js} +3 -3
  173. package/dist/{spinner-Cyd4rgTb.js.map → spinner-3R0GSI2j.js.map} +1 -1
  174. package/dist/{spinner-DETBBL3Y.cjs → spinner-BGJUiS3l.cjs} +2 -2
  175. package/dist/{spinner-DETBBL3Y.cjs.map → spinner-BGJUiS3l.cjs.map} +1 -1
  176. package/dist/steps.cjs +1 -1
  177. package/dist/steps.js +1 -1
  178. package/dist/{surface-Bm1tp3KX.js → surface-BIN3T7GX.js} +2 -2
  179. package/dist/{surface-Bm1tp3KX.js.map → surface-BIN3T7GX.js.map} +1 -1
  180. package/dist/{surface-NR2xI7z4.cjs → surface-DEUoZLC-.cjs} +2 -2
  181. package/dist/{surface-NR2xI7z4.cjs.map → surface-DEUoZLC-.cjs.map} +1 -1
  182. package/dist/surface.cjs +1 -1
  183. package/dist/surface.js +1 -1
  184. package/dist/{table-C6cAu2jZ.js → table-B0WjFwYR.js} +2 -2
  185. package/dist/{table-C6cAu2jZ.js.map → table-B0WjFwYR.js.map} +1 -1
  186. package/dist/{table-j7yBzTxq.cjs → table-G5t_zSE3.cjs} +2 -2
  187. package/dist/{table-j7yBzTxq.cjs.map → table-G5t_zSE3.cjs.map} +1 -1
  188. package/dist/table.cjs +1 -1
  189. package/dist/table.js +1 -1
  190. package/dist/{tabs-group-v70JS-5w.js → tabs-group-BnENONbM.js} +2 -2
  191. package/dist/{tabs-group-v70JS-5w.js.map → tabs-group-BnENONbM.js.map} +1 -1
  192. package/dist/{tabs-group-DSKt0Vcs.cjs → tabs-group-DaN-b4t-.cjs} +2 -2
  193. package/dist/{tabs-group-DSKt0Vcs.cjs.map → tabs-group-DaN-b4t-.cjs.map} +1 -1
  194. package/dist/tabs.cjs +1 -1
  195. package/dist/tabs.js +1 -1
  196. package/dist/tailwind.mixin-CGefB_52.js +43 -0
  197. package/dist/{tailwind.mixin-BT7PRaoD.js.map → tailwind.mixin-CGefB_52.js.map} +1 -1
  198. package/dist/tailwind.mixin-Cezttl4Z.cjs +2 -0
  199. package/dist/{tailwind.mixin-BwZ9FobB.cjs.map → tailwind.mixin-Cezttl4Z.cjs.map} +1 -1
  200. package/dist/teleport.cjs +1 -1
  201. package/dist/teleport.js +1 -1
  202. package/dist/{textarea-XwnzdSsj.cjs → textarea-50MqOr7P.cjs} +2 -2
  203. package/dist/{textarea-XwnzdSsj.cjs.map → textarea-50MqOr7P.cjs.map} +1 -1
  204. package/dist/{textarea-ChuThtoI.js → textarea-DtPqk9Yo.js} +2 -2
  205. package/dist/{textarea-ChuThtoI.js.map → textarea-DtPqk9Yo.js.map} +1 -1
  206. package/dist/textarea.cjs +1 -1
  207. package/dist/textarea.js +1 -1
  208. package/dist/{theme-button-CGmT7gWT.cjs → theme-button-D8ZX9eB0.cjs} +2 -2
  209. package/dist/{theme-button-CGmT7gWT.cjs.map → theme-button-D8ZX9eB0.cjs.map} +1 -1
  210. package/dist/{theme-button-DCFqITVb.js → theme-button-DFs9YHG7.js} +2 -2
  211. package/dist/{theme-button-DCFqITVb.js.map → theme-button-DFs9YHG7.js.map} +1 -1
  212. package/dist/theme-button.cjs +1 -1
  213. package/dist/theme-button.js +1 -1
  214. package/dist/theme.cjs +1 -1
  215. package/dist/{theme.component-B_lVr2OP.js → theme.component-DA9XsDeK.js} +2 -2
  216. package/dist/{theme.component-B_lVr2OP.js.map → theme.component-DA9XsDeK.js.map} +1 -1
  217. package/dist/{theme.component-BLiyj5Vg.cjs → theme.component-P7PV3uAy.cjs} +2 -2
  218. package/dist/{theme.component-BLiyj5Vg.cjs.map → theme.component-P7PV3uAy.cjs.map} +1 -1
  219. package/dist/theme.js +1 -1
  220. package/dist/{timezone-BqW_NjUB.js → timezone-Daso_7IH.js} +3 -3
  221. package/dist/{timezone-BqW_NjUB.js.map → timezone-Daso_7IH.js.map} +1 -1
  222. package/dist/{timezone-DqTDisFn.cjs → timezone-Q3p0zSV9.cjs} +2 -2
  223. package/dist/{timezone-DqTDisFn.cjs.map → timezone-Q3p0zSV9.cjs.map} +1 -1
  224. package/dist/{tooltip-DxS61e9K.cjs → tooltip-BS1mKwk8.cjs} +2 -2
  225. package/dist/{tooltip-DxS61e9K.cjs.map → tooltip-BS1mKwk8.cjs.map} +1 -1
  226. package/dist/{tooltip-Bs-8nXSN.js → tooltip-BeU9Mezf.js} +2 -2
  227. package/dist/{tooltip-Bs-8nXSN.js.map → tooltip-BeU9Mezf.js.map} +1 -1
  228. package/dist/tooltip.cjs +1 -1
  229. package/dist/tooltip.js +1 -1
  230. package/dist/{tree-Cay3LEH4.js → tree--U0E-8Fy.js} +2 -2
  231. package/dist/{tree-Cay3LEH4.js.map → tree--U0E-8Fy.js.map} +1 -1
  232. package/dist/{tree-_OiUqRN0.cjs → tree-D5_hm7jx.cjs} +2 -2
  233. package/dist/{tree-_OiUqRN0.cjs.map → tree-D5_hm7jx.cjs.map} +1 -1
  234. package/dist/tree.cjs +1 -1
  235. package/dist/tree.js +1 -1
  236. package/dist/{typewriter-BtrUcDgk.js → typewriter-BCPu6644.js} +4 -4
  237. package/dist/{typewriter-BtrUcDgk.js.map → typewriter-BCPu6644.js.map} +1 -1
  238. package/dist/{typewriter-DJyhQ6JQ.cjs → typewriter-CADkp3ZN.cjs} +2 -2
  239. package/dist/{typewriter-DJyhQ6JQ.cjs.map → typewriter-CADkp3ZN.cjs.map} +1 -1
  240. package/dist/typewriter.cjs +1 -1
  241. package/dist/typewriter.js +1 -1
  242. package/dist/{typography-CW_1JfM8.js → typography-B26O1Ju9.js} +2 -2
  243. package/dist/{typography-CW_1JfM8.js.map → typography-B26O1Ju9.js.map} +1 -1
  244. package/dist/{typography-Bw0eoeEa.cjs → typography-Bi3yr7pq.cjs} +2 -2
  245. package/dist/{typography-Bw0eoeEa.cjs.map → typography-Bi3yr7pq.cjs.map} +1 -1
  246. package/dist/typography.cjs +1 -1
  247. package/dist/typography.js +1 -1
  248. package/package.json +1 -1
  249. package/types/mixins/formField.mixin.d.ts +3 -3
  250. package/types/src/radio-group/radio-button.d.ts +1 -1
  251. package/types/src/radio-group/radio-group.d.ts +1 -1
  252. package/dist/radio-button-CTPznzSj.js +0 -115
  253. package/dist/radio-button-CTPznzSj.js.map +0 -1
  254. package/dist/radio-button-CbxNrSSE.cjs +0 -41
  255. package/dist/radio-button-CbxNrSSE.cjs.map +0 -1
  256. package/dist/tailwind.mixin-BT7PRaoD.js +0 -43
  257. package/dist/tailwind.mixin-BwZ9FobB.cjs +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.component-DPKCPwf9.cjs","sources":["../src/dialog/dailog.ts","../src/dialog/dialog-service.ts","../src/dialog/dialog.component.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\n\n/**\n * A confirm dialog web component with custom content support\n *\n * @element confirm-dialog\n * @slot content - Optional slot for custom content\n */\n@customElement('confirm-dialog')\nexport class ConfirmDialog extends $LitElement(css`\n\t:host {\n\t\tposition: fixed;\n\t\tz-index: 10000;\n\t\tinset: 0;\n\t\tdisplay: none;\n\t\t--dialog-width: 360px;\n\t}\n\n\t:host([active]) {\n\t\tdisplay: block;\n\t}\n\n\t.overlay {\n\t\tposition: fixed;\n\t\tinset: 0;\n\t\tbackground: rgba(0, 0, 0, 0.4);\n\t}\n\n\t.dialog {\n\t\tposition: absolute;\n\t\tmax-width: var(--dialog-width);\n\t\twidth: max-content;\n\t\tmax-height: calc(100vh - 40px); /* Prevent exceeding viewport height */\n\t\t/* Center initially */\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, -55%); /* Slight upward shift looks better */\n\t\toverflow: auto; /* Allow scrolling for oversized content */\n\t}\n`) {\n\t/**\n\t * Dialog title\n\t */\n\t@property({ type: String })\n\ttitle = undefined\n\n\t/**\n\t * Dialog message\n\t */\n\t@property({ type: String })\n\tmessage = undefined\n\n\t/**\n\t * Text for confirm button\n\t */\n\t@property({ type: String, attribute: 'confirm-text' })\n\tconfirmText = 'Confirm'\n\n\t/**\n\t * Text for cancel button\n\t */\n\t@property({ type: String, attribute: 'cancel-text' })\n\tcancelText = 'Cancel'\n\n\t/**\n\t * Dialog variant (affects button colors)\n\t */\n\t@property({ type: String })\n\tvariant: 'default' | 'danger' = 'default'\n\n\t/**\n\t * Current position of the dialog\n\t */\n\tprivate position = { x: 0, y: 0 }\n\n\t/**\n\t * Current active promise resolver\n\t */\n\tprivate resolvePromise?: (value: boolean) => void\n\n\t/**\n\t * Simple API: Show the dialog at a specific position\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tasync show(positionOrEvent?: { x: number; y: number } | MouseEvent | TouchEvent): Promise<boolean> {\n\t\t// Extract position from event or use direct coordinates\n\t\tlet x: number, y: number\n\n\t\tif (!positionOrEvent) {\n\t\t\t// Default to center of viewport if no position provided\n\t\t\tx = window.innerWidth / 2\n\t\t\ty = window.innerHeight / 2\n\t\t} else if ('clientX' in positionOrEvent) {\n\t\t\t// It's a mouse event\n\t\t\tx = positionOrEvent.clientX\n\t\t\ty = positionOrEvent.clientY\n\t\t} else if ('touches' in positionOrEvent && positionOrEvent.touches.length) {\n\t\t\t// It's a touch event\n\t\t\tx = positionOrEvent.touches[0].clientX\n\t\t\ty = positionOrEvent.touches[0].clientY\n\t\t} else {\n\t\t\t// It's a position object with x,y coordinates\n\t\t\tconst pos = positionOrEvent as { x: number; y: number }\n\t\t\tx = pos.x\n\t\t\ty = pos.y\n\t\t}\n\n\t\t// Pre-calculate position before showing dialog\n\t\tthis.position = this.calculatePosition(x, y)\n\n\t\t// Make dialog active but ensure position is calculated first\n\t\t// to prevent visual bouncing\n\t\tthis.setAttribute('active', '')\n\n\t\t// Return a promise that resolves when the user makes a choice\n\t\treturn new Promise<boolean>(resolve => {\n\t\t\tthis.resolvePromise = resolve\n\t\t})\n\t}\n\n\t/**\n\t * Simple API: Hide the dialog\n\t */\n\thide(confirmed = false) {\n\t\tthis.removeAttribute('active')\n\n\t\t// Resolve any pending promise\n\t\tif (this.resolvePromise) {\n\t\t\tthis.resolvePromise(confirmed)\n\t\t\tthis.resolvePromise = undefined\n\t\t}\n\t}\n\n\t/**\n\t * Calculate optimal position based on click coordinates\n\t * with viewport boundary checks to prevent dialogs from appearing off-screen\n\t */\n\tprivate calculatePosition(x: number, y: number) {\n\t\t// We can't know the exact dimensions until the dialog is rendered\n\t\t// But we can make an initial adjustment to improve positioning\n\t\t// For more accurate positioning, we'll do a second adjustment in firstUpdated\n\n\t\t// Provide some margin from edges\n\t\tconst margin = 20\n\n\t\t// Get viewport dimensions\n\t\tconst viewportWidth = window.innerWidth\n\t\tconst viewportHeight = window.innerHeight\n\n\t\t// Ensure initial x is within viewport bounds\n\t\tx = Math.max(margin, Math.min(x, viewportWidth - margin))\n\n\t\t// Ensure initial y is within viewport bounds\n\t\ty = Math.max(margin, Math.min(y, viewportHeight - margin))\n\n\t\treturn { x, y }\n\t}\n\n\t/**\n\t * Handle lifecycle callback when dialog is first rendered\n\t */\n\tfirstUpdated() {\n\t\t// Immediate positioning without animations\n\t\tconst dialog = this.shadowRoot?.querySelector('.dialog') as HTMLElement\n\t\tif (!dialog) return\n\n\t\t// Run synchronously to ensure immediate positioning\n\t\t// Get dialog dimensions\n\t\tconst width = dialog.offsetWidth\n\t\tconst height = dialog.offsetHeight\n\n\t\t// Get viewport dimensions\n\t\tconst viewportWidth = window.innerWidth\n\t\tconst viewportHeight = window.innerHeight\n\n\t\t// Standard margin from edges\n\t\tconst margin = 20\n\n\t\t// Get dialog initial position\n\t\tlet { x, y } = this.position\n\n\t\t// Check if this is a centered dialog (default case or explicitly centered)\n\t\tconst isCentered = Math.abs(x - viewportWidth / 2) < 10 && Math.abs(y - viewportHeight / 2) < 10\n\n\t\tif (isCentered) {\n\t\t\t// For centered dialogs, keep using the CSS transform-based centering\n\t\t\treturn\n\t\t}\n\n\t\t// For non-centered dialogs, calculate the ideal position\n\t\t// HORIZONTAL POSITIONING\n\t\t// First check if dialog extends beyond right edge\n\t\tif (x + width > viewportWidth - margin) {\n\t\t\t// Try to align to right edge with margin\n\t\t\tx = viewportWidth - width - margin\n\t\t}\n\n\t\t// Make sure it's not off the left edge either\n\t\tif (x < margin) {\n\t\t\tx = margin\n\t\t}\n\n\t\t// If dialog is wider than viewport, center it\n\t\tif (width > viewportWidth - margin * 2) {\n\t\t\tx = (viewportWidth - width) / 2\n\t\t}\n\n\t\t// VERTICAL POSITIONING\n\t\t// Check if the dialog extends beyond bottom edge\n\t\tif (y + height > viewportHeight - margin) {\n\t\t\t// Try to position above the click point if there's space\n\t\t\tif (y > height + margin) {\n\t\t\t\t// Position above the click point\n\t\t\t\ty = y - height - margin\n\t\t\t} else {\n\t\t\t\t// Otherwise, try to center vertically\n\t\t\t\ty = Math.max(margin, (viewportHeight - height) / 2)\n\t\t\t}\n\t\t}\n\n\t\t// Make sure it's not off the top edge\n\t\tif (y < margin) {\n\t\t\ty = margin\n\t\t}\n\n\t\t// If dialog is taller than viewport, align to top with margin\n\t\tif (height > viewportHeight - margin * 2) {\n\t\t\ty = margin\n\t\t}\n\n\t\t// Apply position immediately without animations\n\t\tdialog.style.transform = 'none' // Remove transform-based centering\n\t\tdialog.style.left = `${Math.max(0, Math.round(x))}px`\n\t\tdialog.style.top = `${Math.max(0, Math.round(y))}px`\n\t}\n\n\t/**\n\t * Handle confirm action\n\t */\n\tprivate handleConfirm() {\n\t\tthis.hide(true)\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('confirm', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\t/**\n\t * Handle cancel action\n\t */\n\tprivate handleCancel() {\n\t\tthis.hide(false)\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('cancel', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\trender() {\n\t\t// For initial rendering, use transform-based centering from CSS\n\t\t// firstUpdated will handle precise positioning after measuring\n\t\tconst hasCustomContent = this.querySelectorAll('[slot=\"content\"]').length > 0\n\t\tconst showButtons = this.confirmText && this.cancelText\n\n\t\treturn html`\n\t\t\t<div class=\"overlay\" @click=${this.handleCancel}></div>\n\n\t\t\t<div class=\"dialog\" role=\"alertdialog\" aria-modal=\"true\">\n\t\t\t\t<schmancy-surface rounded=\"all\" elevation=\"3\" type=\"containerHigh\">\n\t\t\t\t\t<schmancy-form @submit=${this.handleConfirm} class=\"p-4\">\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\tthis.title,\n\t\t\t\t\t\t\t() =>\n\t\t\t\t\t\t\t\thtml` <schmancy-typography type=\"title\" token=\"md\" class=\"mb-2\"> ${this.title} </schmancy-typography>`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t${hasCustomContent\n\t\t\t\t\t\t\t? html`<div class=\"${showButtons ? 'mb-4' : ''}\"><slot name=\"content\"></slot></div>`\n\t\t\t\t\t\t\t: html`<schmancy-typography type=\"body\" class=\"mb-4\"> ${this.message} </schmancy-typography>`}\n\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\tshowButtons,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<div class=\"flex justify-end gap-3\">\n\t\t\t\t\t\t\t\t\t<schmancy-button variant=\"outlined\" @click=${this.handleCancel}> ${this.cancelText} </schmancy-button>\n\t\t\t\t\t\t\t\t\t<schmancy-button type=\"submit\" variant=\"filled\"> ${this.confirmText} </schmancy-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t`\n\t\t\t\t\t\t)}\n\t\t\t\t\t</schmancy-form>\n\t\t\t\t</schmancy-surface>\n\t\t\t</div>\n\t\t`\n\t}\n\n\t/**\n\t * Static helper for even simpler API\n\t */\n\tstatic async confirm(options: {\n\t\ttitle?: string\n\t\tmessage?: string\n\t\tconfirmText?: string\n\t\tcancelText?: string\n\t\tvariant?: 'default' | 'danger'\n\t\tposition?: { x: number; y: number } | MouseEvent | TouchEvent\n\t\twidth?: string\n\t}): Promise<boolean> {\n\t\t// Create dialog if it doesn't exist\n\t\tlet dialog = document.querySelector('confirm-dialog') as ConfirmDialog\n\n\t\tif (!dialog) {\n\t\t\tdialog = document.createElement('confirm-dialog') as ConfirmDialog\n\t\t\tdocument.body.appendChild(dialog)\n\t\t}\n\n\t\t// Set options\n\t\tif (options.title) dialog.title = options.title\n\t\tif (options.message) dialog.message = options.message\n\t\tif (options.confirmText) dialog.confirmText = options.confirmText\n\t\tif (options.cancelText) dialog.cancelText = options.cancelText\n\t\tif (options.variant) dialog.variant = options.variant\n\t\tif (options.width) dialog.style.setProperty('--dialog-width', options.width)\n\n\t\t// Show dialog and return promise\n\t\treturn dialog.show(options.position)\n\t}\n\n\t/**\n\t * Even simpler shorthand method - just pass message and optionally an event\n\t */\n\tstatic async ask(message: string, event?: MouseEvent | TouchEvent): Promise<boolean> {\n\t\treturn this.confirm({\n\t\t\tmessage,\n\t\t\tposition: event,\n\t\t})\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'confirm-dialog': ConfirmDialog\n\t}\n}\n","import { render, TemplateResult } from 'lit'\nimport { ConfirmDialog } from './dailog'\n\n/**\n * Dialog service options interface with component support\n */\nexport interface DialogOptions {\n\ttitle?: string\n\tmessage?: string\n\tconfirmText?: string\n\tcancelText?: string\n\tvariant?: 'default' | 'danger'\n\tposition?: { x: number; y: number } | MouseEvent | TouchEvent\n\n\t// New options for component rendering\n\tcontent?: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult)\n\twidth?: string\n\tonConfirm?: () => void\n\tonCancel?: () => void\n\thideActions?: boolean // Set to true to hide all buttons and title\n}\n\n/**\n * Dialog service for centralized dialog management.\n * Provides a simple API for showing dialogs with optional custom components.\n */\nexport class DialogService {\n\tprivate static instance: DialogService\n\n\t// Default dialog options\n\tprivate static DEFAULT_OPTIONS: Partial<DialogOptions> = {\n\t\ttitle: undefined,\n\t\tconfirmText: undefined,\n\t\tcancelText: 'Cancel',\n\t\tvariant: 'default',\n\t\twidth: '360px',\n\t}\n\n\t// Track active dialogs to handle dismissing the most recent one\n\tprivate activeDialogs: ConfirmDialog[] = []\n\n\t// Private constructor for singleton pattern\n\tprivate constructor() {}\n\n\t/**\n\t * Get the singleton instance\n\t */\n\tpublic static getInstance(): DialogService {\n\t\tif (!DialogService.instance) {\n\t\t\tDialogService.instance = new DialogService()\n\t\t}\n\t\treturn DialogService.instance\n\t}\n\n\t/**\n\t * Show a confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic confirm(options: DialogOptions): Promise<boolean> {\n\t\t// Apply default options\n\t\tconst completeOptions = {\n\t\t\t...DialogService.DEFAULT_OPTIONS,\n\t\t\t...options,\n\t\t}\n\n\t\t// If no position is provided, center the dialog\n\t\tif (!completeOptions.position) {\n\t\t\tcompleteOptions.position = this.getCenteredPosition()\n\t\t}\n\n\t\t// Create or find the dialog\n\t\tlet dialog = document.querySelector('confirm-dialog') as ConfirmDialog\n\t\tif (!dialog) {\n\t\t\tdialog = document.createElement('confirm-dialog') as ConfirmDialog\n\t\t\tdocument.body.appendChild(dialog)\n\t\t}\n\n\t\t// Set basic options\n\t\tif (completeOptions.title) dialog.title = completeOptions.title\n\t\tif (completeOptions.message) dialog.message = completeOptions.message\n\t\tif (completeOptions.confirmText) dialog.confirmText = completeOptions.confirmText\n\t\tif (completeOptions.cancelText) dialog.cancelText = completeOptions.cancelText\n\t\tif (completeOptions.variant) dialog.variant = completeOptions.variant\n\t\tif (completeOptions.width) dialog.style.setProperty('--dialog-width', completeOptions.width)\n\n\t\t// Handle custom content if provided\n\t\tif (completeOptions.content) {\n\t\t\tconst contentContainer = document.createElement('div')\n\t\t\tcontentContainer.slot = 'content'\n\n\t\t\tif (typeof completeOptions.content === 'function') {\n\t\t\t\tconst result = completeOptions.content()\n\t\t\t\tif (result instanceof HTMLElement) {\n\t\t\t\t\tcontentContainer.appendChild(result)\n\t\t\t\t} else {\n\t\t\t\t\trender(result, contentContainer)\n\t\t\t\t}\n\t\t\t} else if (completeOptions.content instanceof HTMLElement) {\n\t\t\t\tcontentContainer.appendChild(completeOptions.content)\n\t\t\t} else {\n\t\t\t\trender(completeOptions.content, contentContainer)\n\t\t\t}\n\n\t\t\tdialog.appendChild(contentContainer)\n\t\t}\n\n\t\t// Set up event listeners for optional callbacks\n\t\tif (completeOptions.onConfirm) {\n\t\t\tconst onConfirm = (_e: Event) => {\n\t\t\t\tcompleteOptions.onConfirm!()\n\t\t\t\tdialog.removeEventListener('confirm', onConfirm)\n\t\t\t}\n\t\t\tdialog.addEventListener('confirm', onConfirm)\n\t\t}\n\n\t\tif (completeOptions.onCancel) {\n\t\t\tconst onCancel = (_e: Event) => {\n\t\t\t\tcompleteOptions.onCancel!()\n\t\t\t\tdialog.removeEventListener('cancel', onCancel)\n\t\t\t}\n\t\t\tdialog.addEventListener('cancel', onCancel)\n\t\t}\n\n\t\t// Add this dialog to active dialogs\n\t\tthis.activeDialogs.push(dialog)\n\n\t\t// Show dialog and return promise\n\t\treturn dialog.show(completeOptions.position).finally(() => {\n\t\t\t// Remove from active dialogs when closed\n\t\t\tconst index = this.activeDialogs.indexOf(dialog)\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.activeDialogs.splice(index, 1)\n\t\t\t}\n\n\t\t\t// Clean up the content when dialog closes\n\t\t\tif (completeOptions.content) {\n\t\t\t\tconst contentEl = dialog.querySelector('[slot=\"content\"]')\n\t\t\t\tif (contentEl) {\n\t\t\t\t\tdialog.removeChild(contentEl)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Dismiss the most recently opened dialog\n\t * @returns true if a dialog was dismissed, false if no dialogs were open\n\t */\n\tpublic dismiss(): boolean {\n\t\tif (this.activeDialogs.length === 0) {\n\t\t\treturn false\n\t\t}\n\n\t\t// Get the most recently opened dialog (last in the array)\n\t\tconst dialog = this.activeDialogs[this.activeDialogs.length - 1]\n\n\t\t// Hide the dialog (with cancel result)\n\t\tdialog.hide(false)\n\n\t\treturn true\n\t}\n\n\t/**\n\t * Show a simple confirmation dialog with just a message\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic ask(message: string, event?: MouseEvent | TouchEvent): Promise<boolean> {\n\t\treturn this.confirm({\n\t\t\tmessage,\n\t\t\tposition: event,\n\t\t})\n\t}\n\n\t/**\n\t * Show a danger confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic danger(options: Omit<DialogOptions, 'variant'>): Promise<boolean> {\n\t\treturn this.confirm({\n\t\t\t...options,\n\t\t\tvariant: 'danger',\n\t\t})\n\t}\n\n\t/**\n\t * Show a dialog with custom component content\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic component(\n\t\tcontent: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult),\n\t\toptions: Omit<DialogOptions, 'content' | 'message'> = {},\n\t): Promise<boolean> {\n\t\t// By default, component dialogs have hideActions=true\n\t\tconst useActions = options.hideActions === false;\n\t\t\n\t\tif (!useActions) {\n\t\t\treturn this.confirm({\n\t\t\t\t...options,\n\t\t\t\tcontent,\n\t\t\t\ttitle: undefined,\n\t\t\t\tmessage: undefined,\n\t\t\t\tconfirmText: '', // Hide buttons by setting empty text\n\t\t\t\tcancelText: '',\n\t\t\t})\n\t\t}\n\t\t\n\t\treturn this.confirm({\n\t\t\t...options,\n\t\t\tcontent,\n\t\t\t// Clear message if content is provided\n\t\t\ttitle: undefined,\n\t\t\tmessage: undefined,\n\t\t})\n\t}\n\n\t/**\n\t * Get a centered position for the dialog\n\t */\n\tprivate getCenteredPosition(): { x: number; y: number } {\n\t\treturn {\n\t\t\tx: window.innerWidth / 2,\n\t\t\ty: window.innerHeight / 2,\n\t\t}\n\t}\n\n}\n\n/**\n * Global dialog utility - provides a quick way to show dialogs\n */\nexport const $dialog = {\n\t/**\n\t * Show a confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tconfirm: (options: DialogOptions): Promise<boolean> => {\n\t\treturn DialogService.getInstance().confirm(options)\n\t},\n\n\t/**\n\t * Show a simple confirmation dialog with just a message\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\task: (message: string, event?: MouseEvent | TouchEvent): Promise<boolean> => {\n\t\treturn DialogService.getInstance().ask(message, event)\n\t},\n\n\t/**\n\t * Show a danger confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tdanger: (options: Omit<DialogOptions, 'variant'>): Promise<boolean> => {\n\t\treturn DialogService.getInstance().danger(options)\n\t},\n\n\t/**\n\t * Show a dialog with custom component content\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tcomponent: (\n\t\tcontent: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult),\n\t\toptions?: Omit<DialogOptions, 'content' | 'message'>,\n\t): Promise<boolean> => {\n\t\treturn DialogService.getInstance().component(content, options)\n\t},\n\n\t/**\n\t * Show a simple dialog without title or actions, just content\n\t * @returns Promise that resolves when dialog is closed\n\t */\n\tsimple: (\n\t\tcontent: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult),\n\t\toptions?: Omit<DialogOptions, 'content' | 'message' | 'title' | 'confirmText' | 'cancelText'>,\n\t): Promise<boolean> => {\n\t\treturn DialogService.getInstance().component(content, options)\n\t},\n\n\t/**\n\t * Dismiss the most recently opened dialog\n\t * @returns true if a dialog was dismissed, false if no dialogs were open\n\t */\n\tdismiss: (): boolean => {\n\t\treturn DialogService.getInstance().dismiss()\n\t},\n}\n\nexport default DialogService\n","import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * A basic dialog web component without title or actions\n *\n * @element schmancy-dialog\n * @slot default - Content slot for dialog body\n */\n@customElement('schmancy-dialog')\nexport class SchmancyDialog extends $LitElement(css`\n\t:host {\n\t\tposition: fixed;\n\t\tz-index: 10000;\n\t\tinset: 0;\n\t\tdisplay: none;\n\t\t--dialog-width: 360px;\n\t}\n\n\t:host([active]) {\n\t\tdisplay: block;\n\t}\n\n\t.overlay {\n\t\tposition: fixed;\n\t\tinset: 0;\n\t\tbackground: rgba(0, 0, 0, 0.4);\n\t}\n\n\t.dialog {\n\t\tposition: absolute;\n\t\tmax-width: var(--dialog-width);\n\t\twidth: max-content;\n\t\tmax-height: calc(100vh - 40px); /* Prevent exceeding viewport height */\n\t\t/* Center initially */\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, -55%); /* Slight upward shift looks better */\n\t\toverflow: auto; /* Allow scrolling for oversized content */\n\t}\n`) {\n\t/**\n\t * Current position of the dialog\n\t */\n\tprivate position = { x: 0, y: 0 }\n\n\t/**\n\t * Current active promise resolver\n\t */\n\tprivate resolvePromise?: (value: boolean) => void\n\n\t/**\n\t * Simple API: Show the dialog at a specific position\n\t * @returns Promise that resolves when dialog is closed\n\t */\n\tasync show(positionOrEvent?: { x: number; y: number } | MouseEvent | TouchEvent): Promise<boolean> {\n\t\t// Extract position from event or use direct coordinates\n\t\tlet x: number, y: number\n\n\t\tif (!positionOrEvent) {\n\t\t\t// Default to center of viewport if no position provided\n\t\t\tx = window.innerWidth / 2\n\t\t\ty = window.innerHeight / 2\n\t\t} else if ('clientX' in positionOrEvent) {\n\t\t\t// It's a mouse event\n\t\t\tx = positionOrEvent.clientX\n\t\t\ty = positionOrEvent.clientY\n\t\t} else if ('touches' in positionOrEvent && positionOrEvent.touches.length) {\n\t\t\t// It's a touch event\n\t\t\tx = positionOrEvent.touches[0].clientX\n\t\t\ty = positionOrEvent.touches[0].clientY\n\t\t} else {\n\t\t\t// It's a position object with x,y coordinates\n\t\t\tconst pos = positionOrEvent as { x: number; y: number }\n\t\t\tx = pos.x\n\t\t\ty = pos.y\n\t\t}\n\n\t\t// Pre-calculate position before showing dialog\n\t\tthis.position = this.calculatePosition(x, y)\n\n\t\t// Make dialog active but ensure position is calculated first\n\t\t// to prevent visual bouncing\n\t\tthis.setAttribute('active', '')\n\n\t\t// Return a promise that resolves when the user makes a choice\n\t\treturn new Promise<boolean>(resolve => {\n\t\t\tthis.resolvePromise = resolve\n\t\t})\n\t}\n\n\t/**\n\t * Simple API: Hide the dialog\n\t */\n\thide(result = false) {\n\t\tthis.removeAttribute('active')\n\n\t\t// Resolve any pending promise\n\t\tif (this.resolvePromise) {\n\t\t\tthis.resolvePromise(result)\n\t\t\tthis.resolvePromise = undefined\n\t\t}\n\t}\n\n\t/**\n\t * Calculate optimal position based on click coordinates\n\t * with viewport boundary checks to prevent dialogs from appearing off-screen\n\t */\n\tprivate calculatePosition(x: number, y: number) {\n\t\t// We can't know the exact dimensions until the dialog is rendered\n\t\t// But we can make an initial adjustment to improve positioning\n\t\t// For more accurate positioning, we'll do a second adjustment in firstUpdated\n\n\t\t// Provide some margin from edges\n\t\tconst margin = 20\n\n\t\t// Get viewport dimensions\n\t\tconst viewportWidth = window.innerWidth\n\t\tconst viewportHeight = window.innerHeight\n\n\t\t// Ensure initial x is within viewport bounds\n\t\tx = Math.max(margin, Math.min(x, viewportWidth - margin))\n\n\t\t// Ensure initial y is within viewport bounds\n\t\ty = Math.max(margin, Math.min(y, viewportHeight - margin))\n\n\t\treturn { x, y }\n\t}\n\n\t/**\n\t * Handle lifecycle callback when dialog is first rendered\n\t */\n\tfirstUpdated() {\n\t\t// Immediate positioning without animations\n\t\tconst dialog = this.shadowRoot?.querySelector('.dialog') as HTMLElement\n\t\tif (!dialog) return\n\n\t\t// Run synchronously to ensure immediate positioning\n\t\t// Get dialog dimensions\n\t\tconst width = dialog.offsetWidth\n\t\tconst height = dialog.offsetHeight\n\n\t\t// Get viewport dimensions\n\t\tconst viewportWidth = window.innerWidth\n\t\tconst viewportHeight = window.innerHeight\n\n\t\t// Standard margin from edges\n\t\tconst margin = 20\n\n\t\t// Get dialog initial position\n\t\tlet { x, y } = this.position\n\n\t\t// Check if this is a centered dialog (default case or explicitly centered)\n\t\tconst isCentered = Math.abs(x - viewportWidth / 2) < 10 && Math.abs(y - viewportHeight / 2) < 10\n\n\t\tif (isCentered) {\n\t\t\t// For centered dialogs, keep using the CSS transform-based centering\n\t\t\treturn\n\t\t}\n\n\t\t// For non-centered dialogs, calculate the ideal position\n\t\t// HORIZONTAL POSITIONING\n\t\t// First check if dialog extends beyond right edge\n\t\tif (x + width > viewportWidth - margin) {\n\t\t\t// Try to align to right edge with margin\n\t\t\tx = viewportWidth - width - margin\n\t\t}\n\n\t\t// Make sure it's not off the left edge either\n\t\tif (x < margin) {\n\t\t\tx = margin\n\t\t}\n\n\t\t// If dialog is wider than viewport, center it\n\t\tif (width > viewportWidth - margin * 2) {\n\t\t\tx = (viewportWidth - width) / 2\n\t\t}\n\n\t\t// VERTICAL POSITIONING\n\t\t// Check if the dialog extends beyond bottom edge\n\t\tif (y + height > viewportHeight - margin) {\n\t\t\t// Try to position above the click point if there's space\n\t\t\tif (y > height + margin) {\n\t\t\t\t// Position above the click point\n\t\t\t\ty = y - height - margin\n\t\t\t} else {\n\t\t\t\t// Otherwise, try to center vertically\n\t\t\t\ty = Math.max(margin, (viewportHeight - height) / 2)\n\t\t\t}\n\t\t}\n\n\t\t// Make sure it's not off the top edge\n\t\tif (y < margin) {\n\t\t\ty = margin\n\t\t}\n\n\t\t// If dialog is taller than viewport, align to top with margin\n\t\tif (height > viewportHeight - margin * 2) {\n\t\t\ty = margin\n\t\t}\n\n\t\t// Apply position immediately without animations\n\t\tdialog.style.transform = 'none' // Remove transform-based centering\n\t\tdialog.style.left = `${Math.max(0, Math.round(x))}px`\n\t\tdialog.style.top = `${Math.max(0, Math.round(y))}px`\n\t}\n\n\t/**\n\t * Handle close action\n\t */\n\tprivate handleClose() {\n\t\tthis.hide(false)\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('close', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"overlay\" @click=${this.handleClose}></div>\n\n\t\t\t<div class=\"dialog\" role=\"dialog\" aria-modal=\"true\">\n\t\t\t\t<schmancy-surface rounded=\"all\" elevation=\"3\" type=\"containerHigh\">\n\t\t\t\t\t<div class=\"p-4\">\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</div>\n\t\t\t\t</schmancy-surface>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-dialog': SchmancyDialog\n\t}\n}"],"names":["ConfirmDialog","$LitElement","css","super","arguments","this","title","message","confirmText","cancelText","variant","position","x","y","positionOrEvent","clientX","clientY","touches","length","pos","window","innerWidth","innerHeight","calculatePosition","setAttribute","Promise","resolve","resolvePromise","confirmed","removeAttribute","viewportWidth","viewportHeight","Math","max","min","dialog","shadowRoot","querySelector","width","offsetWidth","height","offsetHeight","margin","abs","style","transform","left","round","top","handleConfirm","hide","dispatchEvent","CustomEvent","bubbles","composed","hasCustomContent","querySelectorAll","showButtons","html","handleCancel","when","confirm","options","document","createElement","body","appendChild","setProperty","show","ask","event","__decorateClass","property","type","String","prototype","attribute","customElement","DialogService","constructor","activeDialogs","getInstance","instance","completeOptions","DEFAULT_OPTIONS","getCenteredPosition","content","contentContainer","slot","result","HTMLElement","render","onConfirm","_e","removeEventListener","addEventListener","onCancel","push","finally","index","indexOf","splice","contentEl","removeChild","dismiss","hideActions","_r","$dialog","danger","component","simple","SchmancyDialog","handleClose"],"mappings":"ieAYaA,QAAAA,cAAN,cAA4BC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAAxC,CAAA,CAAA,aAAAC,CAAAA,MAAAA,GAAAC,SAmCEC,EAAAA,KAAAC,aAMED,KAAAE,QAAA,OAMIF,KAAAG,YAAA,UAMDH,KAAAI,WAAA,SAMmBJ,KAAAK,QAAA,UAKhCL,KAAQM,SAAW,CAAEC,EAAG,EAAGC,EAAG,EAAE,CAWhC,MAAA,KAAWC,EAAAA,CAEV,IAAIF,EAAWC,EAEf,GAAKC,EAIL,GAAW,YAAaA,EAEvBF,EAAIE,EAAgBC,QACpBF,EAAIC,EAAgBE,gBACV,YAAaF,GAAmBA,EAAgBG,QAAQC,OAE9DN,EAAAE,EAAgBG,QAAQ,CAAA,EAAGF,QAC3BF,EAAAC,EAAgBG,QAAQ,CAAA,EAAGD,YACzB,CAEN,MAAMG,EAAML,EACZF,EAAIO,EAAIP,EACRC,EAAIM,EAAIN,CAAA,MAdRD,EAAIQ,OAAOC,WAAa,EACxBR,EAAIO,OAAOE,YAAc,EAwBnB,OAPPjB,KAAKM,SAAWN,KAAKkB,kBAAkBX,EAAGC,CAAAA,EAIrCR,KAAAmB,aAAa,SAAU,EAGrB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BY,KAC3B9B,GAAKkB,EAAgBQ,GAAS,GAK3BzB,EAAI2B,EAAST,EAAiBW,IAIhC7B,EAFGA,EAAI2B,EAASE,EAEZ7B,EAAI2B,EAASE,EAGbV,KAAKC,IAAIS,GAASX,EAAiBS,GAAU,CAAA,GAK/C3B,EAAI6B,IACH7B,EAAA6B,GAIDF,EAAST,EAAiBW,KACzB7B,EAAA6B,GAILP,EAAOS,MAAMC,UAAY,OAClBV,EAAAS,MAAME,KAAO,GAAGd,KAAKC,IAAI,EAAGD,KAAKe,MAAMnC,CACvCuB,CAAAA,CAAAA,KAAAA,EAAAS,MAAMI,IAAM,GAAGhB,KAAKC,IAAI,EAAGD,KAAKe,MAAMlC,CAAG,CAAA,CAAA,KAAA,CAMzC,aAAAmG,CACP3G,KAAK6C,KAAK,EAAA,EACL7C,KAAA8C,cACJ,IAAIC,YAAY,QAAS,CACxBC,QAAS,GACTC,SAAU,EAAA,CAAA,CAAA,CAEZ,CAGD,QACQ,CAAA,OAAAI,EAAAA;AAAAA,iCACwBrD,KAAK2G,WAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GAAW,CApNpCD,EAAAA,QAANA,qHAAA,CADNlC,EAAAA,cAAc,iBACFkC,CAAAA,EAAAA"}
1
+ {"version":3,"file":"dialog.component-Cxen6yCU.cjs","sources":["../src/dialog/dailog.ts","../src/dialog/dialog-service.ts","../src/dialog/dialog.component.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\n\n/**\n * A confirm dialog web component with custom content support\n *\n * @element confirm-dialog\n * @slot content - Optional slot for custom content\n */\n@customElement('confirm-dialog')\nexport class ConfirmDialog extends $LitElement(css`\n\t:host {\n\t\tposition: fixed;\n\t\tz-index: 10000;\n\t\tinset: 0;\n\t\tdisplay: none;\n\t\t--dialog-width: 360px;\n\t}\n\n\t:host([active]) {\n\t\tdisplay: block;\n\t}\n\n\t.overlay {\n\t\tposition: fixed;\n\t\tinset: 0;\n\t\tbackground: rgba(0, 0, 0, 0.4);\n\t}\n\n\t.dialog {\n\t\tposition: absolute;\n\t\tmax-width: var(--dialog-width);\n\t\twidth: max-content;\n\t\tmax-height: calc(100vh - 40px); /* Prevent exceeding viewport height */\n\t\t/* Center initially */\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, -55%); /* Slight upward shift looks better */\n\t\toverflow: auto; /* Allow scrolling for oversized content */\n\t}\n`) {\n\t/**\n\t * Dialog title\n\t */\n\t@property({ type: String })\n\ttitle = undefined\n\n\t/**\n\t * Dialog message\n\t */\n\t@property({ type: String })\n\tmessage = undefined\n\n\t/**\n\t * Text for confirm button\n\t */\n\t@property({ type: String, attribute: 'confirm-text' })\n\tconfirmText = 'Confirm'\n\n\t/**\n\t * Text for cancel button\n\t */\n\t@property({ type: String, attribute: 'cancel-text' })\n\tcancelText = 'Cancel'\n\n\t/**\n\t * Dialog variant (affects button colors)\n\t */\n\t@property({ type: String })\n\tvariant: 'default' | 'danger' = 'default'\n\n\t/**\n\t * Current position of the dialog\n\t */\n\tprivate position = { x: 0, y: 0 }\n\n\t/**\n\t * Current active promise resolver\n\t */\n\tprivate resolvePromise?: (value: boolean) => void\n\n\t/**\n\t * Simple API: Show the dialog at a specific position\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tasync show(positionOrEvent?: { x: number; y: number } | MouseEvent | TouchEvent): Promise<boolean> {\n\t\t// Extract position from event or use direct coordinates\n\t\tlet x: number, y: number\n\n\t\tif (!positionOrEvent) {\n\t\t\t// Default to center of viewport if no position provided\n\t\t\tx = window.innerWidth / 2\n\t\t\ty = window.innerHeight / 2\n\t\t} else if ('clientX' in positionOrEvent) {\n\t\t\t// It's a mouse event\n\t\t\tx = positionOrEvent.clientX\n\t\t\ty = positionOrEvent.clientY\n\t\t} else if ('touches' in positionOrEvent && positionOrEvent.touches.length) {\n\t\t\t// It's a touch event\n\t\t\tx = positionOrEvent.touches[0].clientX\n\t\t\ty = positionOrEvent.touches[0].clientY\n\t\t} else {\n\t\t\t// It's a position object with x,y coordinates\n\t\t\tconst pos = positionOrEvent as { x: number; y: number }\n\t\t\tx = pos.x\n\t\t\ty = pos.y\n\t\t}\n\n\t\t// Pre-calculate position before showing dialog\n\t\tthis.position = this.calculatePosition(x, y)\n\n\t\t// Make dialog active but ensure position is calculated first\n\t\t// to prevent visual bouncing\n\t\tthis.setAttribute('active', '')\n\n\t\t// Return a promise that resolves when the user makes a choice\n\t\treturn new Promise<boolean>(resolve => {\n\t\t\tthis.resolvePromise = resolve\n\t\t})\n\t}\n\n\t/**\n\t * Simple API: Hide the dialog\n\t */\n\thide(confirmed = false) {\n\t\tthis.removeAttribute('active')\n\n\t\t// Resolve any pending promise\n\t\tif (this.resolvePromise) {\n\t\t\tthis.resolvePromise(confirmed)\n\t\t\tthis.resolvePromise = undefined\n\t\t}\n\t}\n\n\t/**\n\t * Calculate optimal position based on click coordinates\n\t * with viewport boundary checks to prevent dialogs from appearing off-screen\n\t */\n\tprivate calculatePosition(x: number, y: number) {\n\t\t// We can't know the exact dimensions until the dialog is rendered\n\t\t// But we can make an initial adjustment to improve positioning\n\t\t// For more accurate positioning, we'll do a second adjustment in firstUpdated\n\n\t\t// Provide some margin from edges\n\t\tconst margin = 20\n\n\t\t// Get viewport dimensions\n\t\tconst viewportWidth = window.innerWidth\n\t\tconst viewportHeight = window.innerHeight\n\n\t\t// Ensure initial x is within viewport bounds\n\t\tx = Math.max(margin, Math.min(x, viewportWidth - margin))\n\n\t\t// Ensure initial y is within viewport bounds\n\t\ty = Math.max(margin, Math.min(y, viewportHeight - margin))\n\n\t\treturn { x, y }\n\t}\n\n\t/**\n\t * Handle lifecycle callback when dialog is first rendered\n\t */\n\tfirstUpdated() {\n\t\t// Immediate positioning without animations\n\t\tconst dialog = this.shadowRoot?.querySelector('.dialog') as HTMLElement\n\t\tif (!dialog) return\n\n\t\t// Run synchronously to ensure immediate positioning\n\t\t// Get dialog dimensions\n\t\tconst width = dialog.offsetWidth\n\t\tconst height = dialog.offsetHeight\n\n\t\t// Get viewport dimensions\n\t\tconst viewportWidth = window.innerWidth\n\t\tconst viewportHeight = window.innerHeight\n\n\t\t// Standard margin from edges\n\t\tconst margin = 20\n\n\t\t// Get dialog initial position\n\t\tlet { x, y } = this.position\n\n\t\t// Check if this is a centered dialog (default case or explicitly centered)\n\t\tconst isCentered = Math.abs(x - viewportWidth / 2) < 10 && Math.abs(y - viewportHeight / 2) < 10\n\n\t\tif (isCentered) {\n\t\t\t// For centered dialogs, keep using the CSS transform-based centering\n\t\t\treturn\n\t\t}\n\n\t\t// For non-centered dialogs, calculate the ideal position\n\t\t// HORIZONTAL POSITIONING\n\t\t// First check if dialog extends beyond right edge\n\t\tif (x + width > viewportWidth - margin) {\n\t\t\t// Try to align to right edge with margin\n\t\t\tx = viewportWidth - width - margin\n\t\t}\n\n\t\t// Make sure it's not off the left edge either\n\t\tif (x < margin) {\n\t\t\tx = margin\n\t\t}\n\n\t\t// If dialog is wider than viewport, center it\n\t\tif (width > viewportWidth - margin * 2) {\n\t\t\tx = (viewportWidth - width) / 2\n\t\t}\n\n\t\t// VERTICAL POSITIONING\n\t\t// Check if the dialog extends beyond bottom edge\n\t\tif (y + height > viewportHeight - margin) {\n\t\t\t// Try to position above the click point if there's space\n\t\t\tif (y > height + margin) {\n\t\t\t\t// Position above the click point\n\t\t\t\ty = y - height - margin\n\t\t\t} else {\n\t\t\t\t// Otherwise, try to center vertically\n\t\t\t\ty = Math.max(margin, (viewportHeight - height) / 2)\n\t\t\t}\n\t\t}\n\n\t\t// Make sure it's not off the top edge\n\t\tif (y < margin) {\n\t\t\ty = margin\n\t\t}\n\n\t\t// If dialog is taller than viewport, align to top with margin\n\t\tif (height > viewportHeight - margin * 2) {\n\t\t\ty = margin\n\t\t}\n\n\t\t// Apply position immediately without animations\n\t\tdialog.style.transform = 'none' // Remove transform-based centering\n\t\tdialog.style.left = `${Math.max(0, Math.round(x))}px`\n\t\tdialog.style.top = `${Math.max(0, Math.round(y))}px`\n\t}\n\n\t/**\n\t * Handle confirm action\n\t */\n\tprivate handleConfirm() {\n\t\tthis.hide(true)\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('confirm', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\t/**\n\t * Handle cancel action\n\t */\n\tprivate handleCancel() {\n\t\tthis.hide(false)\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('cancel', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\trender() {\n\t\t// For initial rendering, use transform-based centering from CSS\n\t\t// firstUpdated will handle precise positioning after measuring\n\t\tconst hasCustomContent = this.querySelectorAll('[slot=\"content\"]').length > 0\n\t\tconst showButtons = this.confirmText && this.cancelText\n\n\t\treturn html`\n\t\t\t<div class=\"overlay\" @click=${this.handleCancel}></div>\n\n\t\t\t<div class=\"dialog\" role=\"alertdialog\" aria-modal=\"true\">\n\t\t\t\t<schmancy-surface rounded=\"all\" elevation=\"3\" type=\"containerHigh\">\n\t\t\t\t\t<schmancy-form @submit=${this.handleConfirm} class=\"p-4\">\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\tthis.title,\n\t\t\t\t\t\t\t() =>\n\t\t\t\t\t\t\t\thtml` <schmancy-typography type=\"title\" token=\"md\" class=\"mb-2\"> ${this.title} </schmancy-typography>`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t${hasCustomContent\n\t\t\t\t\t\t\t? html`<div class=\"${showButtons ? 'mb-4' : ''}\"><slot name=\"content\"></slot></div>`\n\t\t\t\t\t\t\t: html`<schmancy-typography type=\"body\" class=\"mb-4\"> ${this.message} </schmancy-typography>`}\n\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\tshowButtons,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<div class=\"flex justify-end gap-3\">\n\t\t\t\t\t\t\t\t\t<schmancy-button variant=\"outlined\" @click=${this.handleCancel}> ${this.cancelText} </schmancy-button>\n\t\t\t\t\t\t\t\t\t<schmancy-button type=\"submit\" variant=\"filled\"> ${this.confirmText} </schmancy-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t`\n\t\t\t\t\t\t)}\n\t\t\t\t\t</schmancy-form>\n\t\t\t\t</schmancy-surface>\n\t\t\t</div>\n\t\t`\n\t}\n\n\t/**\n\t * Static helper for even simpler API\n\t */\n\tstatic async confirm(options: {\n\t\ttitle?: string\n\t\tmessage?: string\n\t\tconfirmText?: string\n\t\tcancelText?: string\n\t\tvariant?: 'default' | 'danger'\n\t\tposition?: { x: number; y: number } | MouseEvent | TouchEvent\n\t\twidth?: string\n\t}): Promise<boolean> {\n\t\t// Create dialog if it doesn't exist\n\t\tlet dialog = document.querySelector('confirm-dialog') as ConfirmDialog\n\n\t\tif (!dialog) {\n\t\t\tdialog = document.createElement('confirm-dialog') as ConfirmDialog\n\t\t\tdocument.body.appendChild(dialog)\n\t\t}\n\n\t\t// Set options\n\t\tif (options.title) dialog.title = options.title\n\t\tif (options.message) dialog.message = options.message\n\t\tif (options.confirmText) dialog.confirmText = options.confirmText\n\t\tif (options.cancelText) dialog.cancelText = options.cancelText\n\t\tif (options.variant) dialog.variant = options.variant\n\t\tif (options.width) dialog.style.setProperty('--dialog-width', options.width)\n\n\t\t// Show dialog and return promise\n\t\treturn dialog.show(options.position)\n\t}\n\n\t/**\n\t * Even simpler shorthand method - just pass message and optionally an event\n\t */\n\tstatic async ask(message: string, event?: MouseEvent | TouchEvent): Promise<boolean> {\n\t\treturn this.confirm({\n\t\t\tmessage,\n\t\t\tposition: event,\n\t\t})\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'confirm-dialog': ConfirmDialog\n\t}\n}\n","import { render, TemplateResult } from 'lit'\nimport { ConfirmDialog } from './dailog'\n\n/**\n * Dialog service options interface with component support\n */\nexport interface DialogOptions {\n\ttitle?: string\n\tmessage?: string\n\tconfirmText?: string\n\tcancelText?: string\n\tvariant?: 'default' | 'danger'\n\tposition?: { x: number; y: number } | MouseEvent | TouchEvent\n\n\t// New options for component rendering\n\tcontent?: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult)\n\twidth?: string\n\tonConfirm?: () => void\n\tonCancel?: () => void\n\thideActions?: boolean // Set to true to hide all buttons and title\n}\n\n/**\n * Dialog service for centralized dialog management.\n * Provides a simple API for showing dialogs with optional custom components.\n */\nexport class DialogService {\n\tprivate static instance: DialogService\n\n\t// Default dialog options\n\tprivate static DEFAULT_OPTIONS: Partial<DialogOptions> = {\n\t\ttitle: undefined,\n\t\tconfirmText: undefined,\n\t\tcancelText: 'Cancel',\n\t\tvariant: 'default',\n\t\twidth: '360px',\n\t}\n\n\t// Track active dialogs to handle dismissing the most recent one\n\tprivate activeDialogs: ConfirmDialog[] = []\n\n\t// Private constructor for singleton pattern\n\tprivate constructor() {}\n\n\t/**\n\t * Get the singleton instance\n\t */\n\tpublic static getInstance(): DialogService {\n\t\tif (!DialogService.instance) {\n\t\t\tDialogService.instance = new DialogService()\n\t\t}\n\t\treturn DialogService.instance\n\t}\n\n\t/**\n\t * Show a confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic confirm(options: DialogOptions): Promise<boolean> {\n\t\t// Apply default options\n\t\tconst completeOptions = {\n\t\t\t...DialogService.DEFAULT_OPTIONS,\n\t\t\t...options,\n\t\t}\n\n\t\t// If no position is provided, center the dialog\n\t\tif (!completeOptions.position) {\n\t\t\tcompleteOptions.position = this.getCenteredPosition()\n\t\t}\n\n\t\t// Create or find the dialog\n\t\tlet dialog = document.querySelector('confirm-dialog') as ConfirmDialog\n\t\tif (!dialog) {\n\t\t\tdialog = document.createElement('confirm-dialog') as ConfirmDialog\n\t\t\tdocument.body.appendChild(dialog)\n\t\t}\n\n\t\t// Set basic options\n\t\tif (completeOptions.title) dialog.title = completeOptions.title\n\t\tif (completeOptions.message) dialog.message = completeOptions.message\n\t\tif (completeOptions.confirmText) dialog.confirmText = completeOptions.confirmText\n\t\tif (completeOptions.cancelText) dialog.cancelText = completeOptions.cancelText\n\t\tif (completeOptions.variant) dialog.variant = completeOptions.variant\n\t\tif (completeOptions.width) dialog.style.setProperty('--dialog-width', completeOptions.width)\n\n\t\t// Handle custom content if provided\n\t\tif (completeOptions.content) {\n\t\t\tconst contentContainer = document.createElement('div')\n\t\t\tcontentContainer.slot = 'content'\n\n\t\t\tif (typeof completeOptions.content === 'function') {\n\t\t\t\tconst result = completeOptions.content()\n\t\t\t\tif (result instanceof HTMLElement) {\n\t\t\t\t\tcontentContainer.appendChild(result)\n\t\t\t\t} else {\n\t\t\t\t\trender(result, contentContainer)\n\t\t\t\t}\n\t\t\t} else if (completeOptions.content instanceof HTMLElement) {\n\t\t\t\tcontentContainer.appendChild(completeOptions.content)\n\t\t\t} else {\n\t\t\t\trender(completeOptions.content, contentContainer)\n\t\t\t}\n\n\t\t\tdialog.appendChild(contentContainer)\n\t\t}\n\n\t\t// Set up event listeners for optional callbacks\n\t\tif (completeOptions.onConfirm) {\n\t\t\tconst onConfirm = (_e: Event) => {\n\t\t\t\tcompleteOptions.onConfirm!()\n\t\t\t\tdialog.removeEventListener('confirm', onConfirm)\n\t\t\t}\n\t\t\tdialog.addEventListener('confirm', onConfirm)\n\t\t}\n\n\t\tif (completeOptions.onCancel) {\n\t\t\tconst onCancel = (_e: Event) => {\n\t\t\t\tcompleteOptions.onCancel!()\n\t\t\t\tdialog.removeEventListener('cancel', onCancel)\n\t\t\t}\n\t\t\tdialog.addEventListener('cancel', onCancel)\n\t\t}\n\n\t\t// Add this dialog to active dialogs\n\t\tthis.activeDialogs.push(dialog)\n\n\t\t// Show dialog and return promise\n\t\treturn dialog.show(completeOptions.position).finally(() => {\n\t\t\t// Remove from active dialogs when closed\n\t\t\tconst index = this.activeDialogs.indexOf(dialog)\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.activeDialogs.splice(index, 1)\n\t\t\t}\n\n\t\t\t// Clean up the content when dialog closes\n\t\t\tif (completeOptions.content) {\n\t\t\t\tconst contentEl = dialog.querySelector('[slot=\"content\"]')\n\t\t\t\tif (contentEl) {\n\t\t\t\t\tdialog.removeChild(contentEl)\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Dismiss the most recently opened dialog\n\t * @returns true if a dialog was dismissed, false if no dialogs were open\n\t */\n\tpublic dismiss(): boolean {\n\t\tif (this.activeDialogs.length === 0) {\n\t\t\treturn false\n\t\t}\n\n\t\t// Get the most recently opened dialog (last in the array)\n\t\tconst dialog = this.activeDialogs[this.activeDialogs.length - 1]\n\n\t\t// Hide the dialog (with cancel result)\n\t\tdialog.hide(false)\n\n\t\treturn true\n\t}\n\n\t/**\n\t * Show a simple confirmation dialog with just a message\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic ask(message: string, event?: MouseEvent | TouchEvent): Promise<boolean> {\n\t\treturn this.confirm({\n\t\t\tmessage,\n\t\t\tposition: event,\n\t\t})\n\t}\n\n\t/**\n\t * Show a danger confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic danger(options: Omit<DialogOptions, 'variant'>): Promise<boolean> {\n\t\treturn this.confirm({\n\t\t\t...options,\n\t\t\tvariant: 'danger',\n\t\t})\n\t}\n\n\t/**\n\t * Show a dialog with custom component content\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic component(\n\t\tcontent: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult),\n\t\toptions: Omit<DialogOptions, 'content' | 'message'> = {},\n\t): Promise<boolean> {\n\t\t// By default, component dialogs have hideActions=true\n\t\tconst useActions = options.hideActions === false;\n\t\t\n\t\tif (!useActions) {\n\t\t\treturn this.confirm({\n\t\t\t\t...options,\n\t\t\t\tcontent,\n\t\t\t\ttitle: undefined,\n\t\t\t\tmessage: undefined,\n\t\t\t\tconfirmText: '', // Hide buttons by setting empty text\n\t\t\t\tcancelText: '',\n\t\t\t})\n\t\t}\n\t\t\n\t\treturn this.confirm({\n\t\t\t...options,\n\t\t\tcontent,\n\t\t\t// Clear message if content is provided\n\t\t\ttitle: undefined,\n\t\t\tmessage: undefined,\n\t\t})\n\t}\n\n\t/**\n\t * Get a centered position for the dialog\n\t */\n\tprivate getCenteredPosition(): { x: number; y: number } {\n\t\treturn {\n\t\t\tx: window.innerWidth / 2,\n\t\t\ty: window.innerHeight / 2,\n\t\t}\n\t}\n\n}\n\n/**\n * Global dialog utility - provides a quick way to show dialogs\n */\nexport const $dialog = {\n\t/**\n\t * Show a confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tconfirm: (options: DialogOptions): Promise<boolean> => {\n\t\treturn DialogService.getInstance().confirm(options)\n\t},\n\n\t/**\n\t * Show a simple confirmation dialog with just a message\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\task: (message: string, event?: MouseEvent | TouchEvent): Promise<boolean> => {\n\t\treturn DialogService.getInstance().ask(message, event)\n\t},\n\n\t/**\n\t * Show a danger confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tdanger: (options: Omit<DialogOptions, 'variant'>): Promise<boolean> => {\n\t\treturn DialogService.getInstance().danger(options)\n\t},\n\n\t/**\n\t * Show a dialog with custom component content\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tcomponent: (\n\t\tcontent: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult),\n\t\toptions?: Omit<DialogOptions, 'content' | 'message'>,\n\t): Promise<boolean> => {\n\t\treturn DialogService.getInstance().component(content, options)\n\t},\n\n\t/**\n\t * Show a simple dialog without title or actions, just content\n\t * @returns Promise that resolves when dialog is closed\n\t */\n\tsimple: (\n\t\tcontent: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult),\n\t\toptions?: Omit<DialogOptions, 'content' | 'message' | 'title' | 'confirmText' | 'cancelText'>,\n\t): Promise<boolean> => {\n\t\treturn DialogService.getInstance().component(content, options)\n\t},\n\n\t/**\n\t * Dismiss the most recently opened dialog\n\t * @returns true if a dialog was dismissed, false if no dialogs were open\n\t */\n\tdismiss: (): boolean => {\n\t\treturn DialogService.getInstance().dismiss()\n\t},\n}\n\nexport default DialogService\n","import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * A basic dialog web component without title or actions\n *\n * @element schmancy-dialog\n * @slot default - Content slot for dialog body\n */\n@customElement('schmancy-dialog')\nexport class SchmancyDialog extends $LitElement(css`\n\t:host {\n\t\tposition: fixed;\n\t\tz-index: 10000;\n\t\tinset: 0;\n\t\tdisplay: none;\n\t\t--dialog-width: 360px;\n\t}\n\n\t:host([active]) {\n\t\tdisplay: block;\n\t}\n\n\t.overlay {\n\t\tposition: fixed;\n\t\tinset: 0;\n\t\tbackground: rgba(0, 0, 0, 0.4);\n\t}\n\n\t.dialog {\n\t\tposition: absolute;\n\t\tmax-width: var(--dialog-width);\n\t\twidth: max-content;\n\t\tmax-height: calc(100vh - 40px); /* Prevent exceeding viewport height */\n\t\t/* Center initially */\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, -55%); /* Slight upward shift looks better */\n\t\toverflow: auto; /* Allow scrolling for oversized content */\n\t}\n`) {\n\t/**\n\t * Current position of the dialog\n\t */\n\tprivate position = { x: 0, y: 0 }\n\n\t/**\n\t * Current active promise resolver\n\t */\n\tprivate resolvePromise?: (value: boolean) => void\n\n\t/**\n\t * Simple API: Show the dialog at a specific position\n\t * @returns Promise that resolves when dialog is closed\n\t */\n\tasync show(positionOrEvent?: { x: number; y: number } | MouseEvent | TouchEvent): Promise<boolean> {\n\t\t// Extract position from event or use direct coordinates\n\t\tlet x: number, y: number\n\n\t\tif (!positionOrEvent) {\n\t\t\t// Default to center of viewport if no position provided\n\t\t\tx = window.innerWidth / 2\n\t\t\ty = window.innerHeight / 2\n\t\t} else if ('clientX' in positionOrEvent) {\n\t\t\t// It's a mouse event\n\t\t\tx = positionOrEvent.clientX\n\t\t\ty = positionOrEvent.clientY\n\t\t} else if ('touches' in positionOrEvent && positionOrEvent.touches.length) {\n\t\t\t// It's a touch event\n\t\t\tx = positionOrEvent.touches[0].clientX\n\t\t\ty = positionOrEvent.touches[0].clientY\n\t\t} else {\n\t\t\t// It's a position object with x,y coordinates\n\t\t\tconst pos = positionOrEvent as { x: number; y: number }\n\t\t\tx = pos.x\n\t\t\ty = pos.y\n\t\t}\n\n\t\t// Pre-calculate position before showing dialog\n\t\tthis.position = this.calculatePosition(x, y)\n\n\t\t// Make dialog active but ensure position is calculated first\n\t\t// to prevent visual bouncing\n\t\tthis.setAttribute('active', '')\n\n\t\t// Return a promise that resolves when the user makes a choice\n\t\treturn new Promise<boolean>(resolve => {\n\t\t\tthis.resolvePromise = resolve\n\t\t})\n\t}\n\n\t/**\n\t * Simple API: Hide the dialog\n\t */\n\thide(result = false) {\n\t\tthis.removeAttribute('active')\n\n\t\t// Resolve any pending promise\n\t\tif (this.resolvePromise) {\n\t\t\tthis.resolvePromise(result)\n\t\t\tthis.resolvePromise = undefined\n\t\t}\n\t}\n\n\t/**\n\t * Calculate optimal position based on click coordinates\n\t * with viewport boundary checks to prevent dialogs from appearing off-screen\n\t */\n\tprivate calculatePosition(x: number, y: number) {\n\t\t// We can't know the exact dimensions until the dialog is rendered\n\t\t// But we can make an initial adjustment to improve positioning\n\t\t// For more accurate positioning, we'll do a second adjustment in firstUpdated\n\n\t\t// Provide some margin from edges\n\t\tconst margin = 20\n\n\t\t// Get viewport dimensions\n\t\tconst viewportWidth = window.innerWidth\n\t\tconst viewportHeight = window.innerHeight\n\n\t\t// Ensure initial x is within viewport bounds\n\t\tx = Math.max(margin, Math.min(x, viewportWidth - margin))\n\n\t\t// Ensure initial y is within viewport bounds\n\t\ty = Math.max(margin, Math.min(y, viewportHeight - margin))\n\n\t\treturn { x, y }\n\t}\n\n\t/**\n\t * Handle lifecycle callback when dialog is first rendered\n\t */\n\tfirstUpdated() {\n\t\t// Immediate positioning without animations\n\t\tconst dialog = this.shadowRoot?.querySelector('.dialog') as HTMLElement\n\t\tif (!dialog) return\n\n\t\t// Run synchronously to ensure immediate positioning\n\t\t// Get dialog dimensions\n\t\tconst width = dialog.offsetWidth\n\t\tconst height = dialog.offsetHeight\n\n\t\t// Get viewport dimensions\n\t\tconst viewportWidth = window.innerWidth\n\t\tconst viewportHeight = window.innerHeight\n\n\t\t// Standard margin from edges\n\t\tconst margin = 20\n\n\t\t// Get dialog initial position\n\t\tlet { x, y } = this.position\n\n\t\t// Check if this is a centered dialog (default case or explicitly centered)\n\t\tconst isCentered = Math.abs(x - viewportWidth / 2) < 10 && Math.abs(y - viewportHeight / 2) < 10\n\n\t\tif (isCentered) {\n\t\t\t// For centered dialogs, keep using the CSS transform-based centering\n\t\t\treturn\n\t\t}\n\n\t\t// For non-centered dialogs, calculate the ideal position\n\t\t// HORIZONTAL POSITIONING\n\t\t// First check if dialog extends beyond right edge\n\t\tif (x + width > viewportWidth - margin) {\n\t\t\t// Try to align to right edge with margin\n\t\t\tx = viewportWidth - width - margin\n\t\t}\n\n\t\t// Make sure it's not off the left edge either\n\t\tif (x < margin) {\n\t\t\tx = margin\n\t\t}\n\n\t\t// If dialog is wider than viewport, center it\n\t\tif (width > viewportWidth - margin * 2) {\n\t\t\tx = (viewportWidth - width) / 2\n\t\t}\n\n\t\t// VERTICAL POSITIONING\n\t\t// Check if the dialog extends beyond bottom edge\n\t\tif (y + height > viewportHeight - margin) {\n\t\t\t// Try to position above the click point if there's space\n\t\t\tif (y > height + margin) {\n\t\t\t\t// Position above the click point\n\t\t\t\ty = y - height - margin\n\t\t\t} else {\n\t\t\t\t// Otherwise, try to center vertically\n\t\t\t\ty = Math.max(margin, (viewportHeight - height) / 2)\n\t\t\t}\n\t\t}\n\n\t\t// Make sure it's not off the top edge\n\t\tif (y < margin) {\n\t\t\ty = margin\n\t\t}\n\n\t\t// If dialog is taller than viewport, align to top with margin\n\t\tif (height > viewportHeight - margin * 2) {\n\t\t\ty = margin\n\t\t}\n\n\t\t// Apply position immediately without animations\n\t\tdialog.style.transform = 'none' // Remove transform-based centering\n\t\tdialog.style.left = `${Math.max(0, Math.round(x))}px`\n\t\tdialog.style.top = `${Math.max(0, Math.round(y))}px`\n\t}\n\n\t/**\n\t * Handle close action\n\t */\n\tprivate handleClose() {\n\t\tthis.hide(false)\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('close', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"overlay\" @click=${this.handleClose}></div>\n\n\t\t\t<div class=\"dialog\" role=\"dialog\" aria-modal=\"true\">\n\t\t\t\t<schmancy-surface rounded=\"all\" elevation=\"3\" type=\"containerHigh\">\n\t\t\t\t\t<div class=\"p-4\">\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</div>\n\t\t\t\t</schmancy-surface>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-dialog': SchmancyDialog\n\t}\n}"],"names":["ConfirmDialog","$LitElement","css","super","arguments","this","title","message","confirmText","cancelText","variant","position","x","y","positionOrEvent","clientX","clientY","touches","length","pos","window","innerWidth","innerHeight","calculatePosition","setAttribute","Promise","resolve","resolvePromise","confirmed","removeAttribute","viewportWidth","viewportHeight","Math","max","min","dialog","shadowRoot","querySelector","width","offsetWidth","height","offsetHeight","margin","abs","style","transform","left","round","top","handleConfirm","hide","dispatchEvent","CustomEvent","bubbles","composed","hasCustomContent","querySelectorAll","showButtons","html","handleCancel","when","confirm","options","document","createElement","body","appendChild","setProperty","show","ask","event","__decorateClass","property","type","String","prototype","attribute","customElement","DialogService","constructor","activeDialogs","getInstance","instance","completeOptions","DEFAULT_OPTIONS","getCenteredPosition","content","contentContainer","slot","result","HTMLElement","render","onConfirm","_e","removeEventListener","addEventListener","onCancel","push","finally","index","indexOf","splice","contentEl","removeChild","dismiss","hideActions","_r","$dialog","danger","component","simple","SchmancyDialog","handleClose"],"mappings":"ieAYaA,QAAAA,cAAN,cAA4BC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAAxC,CAAA,CAAA,aAAAC,CAAAA,MAAAA,GAAAC,SAmCEC,EAAAA,KAAAC,aAMED,KAAAE,QAAA,OAMIF,KAAAG,YAAA,UAMDH,KAAAI,WAAA,SAMmBJ,KAAAK,QAAA,UAKhCL,KAAQM,SAAW,CAAEC,EAAG,EAAGC,EAAG,EAAE,CAWhC,MAAA,KAAWC,EAAAA,CAEV,IAAIF,EAAWC,EAEf,GAAKC,EAIL,GAAW,YAAaA,EAEvBF,EAAIE,EAAgBC,QACpBF,EAAIC,EAAgBE,gBACV,YAAaF,GAAmBA,EAAgBG,QAAQC,OAE9DN,EAAAE,EAAgBG,QAAQ,CAAA,EAAGF,QAC3BF,EAAAC,EAAgBG,QAAQ,CAAA,EAAGD,YACzB,CAEN,MAAMG,EAAML,EACZF,EAAIO,EAAIP,EACRC,EAAIM,EAAIN,CAAA,MAdRD,EAAIQ,OAAOC,WAAa,EACxBR,EAAIO,OAAOE,YAAc,EAwBnB,OAPPjB,KAAKM,SAAWN,KAAKkB,kBAAkBX,EAAGC,CAAAA,EAIrCR,KAAAmB,aAAa,SAAU,EAGrB,EAAA,IAAIC,QAA4BC,GAAAA,CACtCrB,KAAKsB,e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AAI2B,EAAST,EAAiBW,IAIhC7B,EAFGA,EAAI2B,EAASE,EAEZ7B,EAAI2B,EAASE,EAGbV,KAAKC,IAAIS,GAASX,EAAiBS,GAAU,CAAA,GAK/C3B,EAAI6B,IACH7B,EAAA6B,GAIDF,EAAST,EAAiBW,KACzB7B,EAAA6B,GAILP,EAAOS,MAAMC,UAAY,OAClBV,EAAAS,MAAME,KAAO,GAAGd,KAAKC,IAAI,EAAGD,KAAKe,MAAMnC,CACvCuB,CAAAA,CAAAA,KAAAA,EAAAS,MAAMI,IAAM,GAAGhB,KAAKC,IAAI,EAAGD,KAAKe,MAAMlC,CAAG,CAAA,CAAA,KAAA,CAMzC,aAAAmG,CACP3G,KAAK6C,KAAK,EAAA,EACL7C,KAAA8C,cACJ,IAAIC,YAAY,QAAS,CACxBC,QAAS,GACTC,SAAU,EAAA,CAAA,CAAA,CAEZ,CAGD,QACQ,CAAA,OAAAI,EAAAA;AAAAA,iCACwBrD,KAAK2G,WAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GAAW,CApNpCD,EAAAA,QAANA,qHAAA,CADNlC,EAAAA,cAAc,iBACFkC,CAAAA,EAAAA"}
package/dist/dialog.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as i, C as g, D as l, S as r } from "./dialog.component-D2ZvZ0Wu.js";
1
+ import { $ as i, C as g, D as l, S as r } from "./dialog.component-B6E5SlZk.js";
2
2
  export {
3
3
  i as $dialog,
4
4
  g as ConfirmDialog,
@@ -1,8 +1,8 @@
1
1
  import "rxjs";
2
2
  import { classMap as m } from "lit/directives/class-map.js";
3
3
  import "lit/directives/style-map.js";
4
- import { $ as c } from "./litElement.mixin-Cq04iWwZ.js";
5
- import "./tailwind.mixin-BT7PRaoD.js";
4
+ import { $ as c } from "./litElement.mixin-CkrfRzHl.js";
5
+ import "./tailwind.mixin-CGefB_52.js";
6
6
  import { css as h, html as f } from "lit";
7
7
  import { property as d, customElement as w } from "lit/decorators.js";
8
8
  var v = Object.defineProperty, g = Object.getOwnPropertyDescriptor, n = (t, i, e, a) => {
@@ -100,4 +100,4 @@ let o = class extends c(h`
100
100
  }
101
101
  };
102
102
  n([d({ type: String })], o.prototype, "outline", 2), n([d({ reflect: !0, type: String })], o.prototype, "orientation", 2), n([d({ type: String })], o.prototype, "grow", 2), o = n([w("schmancy-divider")], o);
103
- //# sourceMappingURL=divider-Clk5mtqJ.js.map
103
+ //# sourceMappingURL=divider-C5KbJnNJ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider-Clk5mtqJ.js","sources":["../src/divider/divider.ts"],"sourcesContent":["// divider.ts\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\n\n@customElement('schmancy-divider')\nexport default class SchmancyDivider extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\toverflow: hidden; /* Ensure the animation is clipped */\n\t}\n\t.divider {\n\t\t/* Maintain existing border-based color logic */\n\t\tborder-color: var(--divider-color, currentColor);\n\t}\n\t/* Horizontal Divider */\n\t.horizontal {\n\t\twidth: 100%;\n\t\theight: 1px;\n\t\tborder-top: 1px solid;\n\t\ttransform: scaleX(0);\n\t\ttransform-origin: var(--transform-origin, left);\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\t/* Vertical Divider */\n\t.vertical {\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tborder-left: 1px solid;\n\t\ttransform: scaleY(0);\n\t\ttransform-origin: var(--transform-origin, top);\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n\t/* Outline Variants */\n\t.border-outlineVariant {\n\t\t/* Utilize existing outline variant styles */\n\t\tborder-color: var(--schmancy-sys-color-outlineVariant, #555);\n\t}\n\t.border-outline {\n\t\t/* Utilize existing default outline styles */\n\t\tborder-color: var(--schmancy-sys-color-outline, #000);\n\t}\n\t/* RTL Support for Horizontal Dividers */\n\t:host([dir='rtl']) .horizontal.grow-start {\n\t\t--transform-origin: right;\n\t}\n\t:host([dir='rtl']) .horizontal.grow-end {\n\t\t--transform-origin: left;\n\t}\n\t/* Center Growth for Horizontal and Vertical Dividers */\n\t.horizontal.grow-both {\n\t\t--transform-origin: center;\n\t}\n\t.vertical.grow-both {\n\t\t--transform-origin: center;\n\t}\n\t/* Define Keyframes */\n\t@keyframes drawHorizontal {\n\t\tto {\n\t\t\ttransform: scaleX(1);\n\t\t}\n\t}\n\t@keyframes drawVertical {\n\t\tto {\n\t\t\ttransform: scaleY(1);\n\t\t}\n\t}\n\t/* Assign Animations Based on Grow Direction */\n\t.horizontal.grow-start {\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\t.horizontal.grow-end {\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\t.horizontal.grow-both {\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\n\t.vertical.grow-start {\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n\t.vertical.grow-end {\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n\t.vertical.grow-both {\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n`) {\n\t@property({ type: String }) outline: 'default' | 'variant' = 'variant'\n\t@property({ reflect: true, type: String }) orientation: 'horizontal' | 'vertical' = 'horizontal'\n\t@property({ type: String }) grow: 'start' | 'end' | 'both' = 'start'\n\n\tprotected render() {\n\t\tconst classes = {\n\t\t\tdivider: true,\n\t\t\thorizontal: this.orientation === 'horizontal',\n\t\t\tvertical: this.orientation === 'vertical',\n\t\t\t'border-outlineVariant': this.outline === 'variant',\n\t\t\t'border-outline': this.outline === 'default',\n\t\t\t[`grow-${this.grow}`]: true, // e.g., grow-start, grow-end, grow-both\n\t\t}\n\t\treturn html`<div class=\"${classMap(classes)}\"></div>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-divider': SchmancyDivider\n\t}\n}\n"],"names":["SchmancyDivider","$LitElement","css","super","arguments","this","outline","orientation","grow","classes","divider","horizontal","vertical","html","classMap","__decorateClass","property","type","String","prototype","reflect","customElement"],"mappings":";;;;;;;;;;;AAOA,IAAqBA,IAArB,cAA6CC,EAAYC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAAzD,EAAA;AAAA,EAAA;AAAAC,UAAAC,GAAAA,SAAAA,GAkF8DC,KAAAC,UAAA,WACuBD,KAAAE,cAAA,cACvBF,KAAAG,OAAA;AAAA,EAAA;AAAA,EAEnD,SACT;AAAA,UAAMC,IAAU,EACfC,SAAAA,IACAC,YAAYN,KAAKE,gBAAgB,cACjCK,UAAUP,KAAKE,gBAAgB,YAC/B,yBAAyBF,KAAKC,YAAY,WAC1C,kBAAkBD,KAAKC,YAAY,WACnC,CAAC,QAAQD,KAAKG,IAAS,EAAA,GAAA,GAAA;AAEjB,WAAAK,gBAAmBC,EAASL,CAAAA,CAAAA;AAAAA,EAAQ;;AAbhBM,EAAA,CAA3BC,EAAS,EAAEC,MAAMC,OAlFElB,CAAAA,CAAAA,GAAAA,EAkFQmB,WAAA,WAAA,CAAA,GACeJ,EAAA,CAA1CC,EAAS,EAAEI,SAAS,IAAMH,MAAMC,OAAAA,CAAAA,CAAAA,GAnFblB,EAmFuBmB,WAAA,eAAA,IACfJ,EAAA,CAA3BC,EAAS,EAAEC,MAAMC,OApFElB,CAAAA,CAAAA,GAAAA,EAoFQmB,WAAA,QAAA,CAAA,GApFRnB,IAArBe,EAAA,CADCM,EAAc,kBACMrB,CAAAA,GAAAA,CAAAA;"}
1
+ {"version":3,"file":"divider-C5KbJnNJ.js","sources":["../src/divider/divider.ts"],"sourcesContent":["// divider.ts\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\n\n@customElement('schmancy-divider')\nexport default class SchmancyDivider extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\toverflow: hidden; /* Ensure the animation is clipped */\n\t}\n\t.divider {\n\t\t/* Maintain existing border-based color logic */\n\t\tborder-color: var(--divider-color, currentColor);\n\t}\n\t/* Horizontal Divider */\n\t.horizontal {\n\t\twidth: 100%;\n\t\theight: 1px;\n\t\tborder-top: 1px solid;\n\t\ttransform: scaleX(0);\n\t\ttransform-origin: var(--transform-origin, left);\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\t/* Vertical Divider */\n\t.vertical {\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tborder-left: 1px solid;\n\t\ttransform: scaleY(0);\n\t\ttransform-origin: var(--transform-origin, top);\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n\t/* Outline Variants */\n\t.border-outlineVariant {\n\t\t/* Utilize existing outline variant styles */\n\t\tborder-color: var(--schmancy-sys-color-outlineVariant, #555);\n\t}\n\t.border-outline {\n\t\t/* Utilize existing default outline styles */\n\t\tborder-color: var(--schmancy-sys-color-outline, #000);\n\t}\n\t/* RTL Support for Horizontal Dividers */\n\t:host([dir='rtl']) .horizontal.grow-start {\n\t\t--transform-origin: right;\n\t}\n\t:host([dir='rtl']) .horizontal.grow-end {\n\t\t--transform-origin: left;\n\t}\n\t/* Center Growth for Horizontal and Vertical Dividers */\n\t.horizontal.grow-both {\n\t\t--transform-origin: center;\n\t}\n\t.vertical.grow-both {\n\t\t--transform-origin: center;\n\t}\n\t/* Define Keyframes */\n\t@keyframes drawHorizontal {\n\t\tto {\n\t\t\ttransform: scaleX(1);\n\t\t}\n\t}\n\t@keyframes drawVertical {\n\t\tto {\n\t\t\ttransform: scaleY(1);\n\t\t}\n\t}\n\t/* Assign Animations Based on Grow Direction */\n\t.horizontal.grow-start {\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\t.horizontal.grow-end {\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\t.horizontal.grow-both {\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\n\t.vertical.grow-start {\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n\t.vertical.grow-end {\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n\t.vertical.grow-both {\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n`) {\n\t@property({ type: String }) outline: 'default' | 'variant' = 'variant'\n\t@property({ reflect: true, type: String }) orientation: 'horizontal' | 'vertical' = 'horizontal'\n\t@property({ type: String }) grow: 'start' | 'end' | 'both' = 'start'\n\n\tprotected render() {\n\t\tconst classes = {\n\t\t\tdivider: true,\n\t\t\thorizontal: this.orientation === 'horizontal',\n\t\t\tvertical: this.orientation === 'vertical',\n\t\t\t'border-outlineVariant': this.outline === 'variant',\n\t\t\t'border-outline': this.outline === 'default',\n\t\t\t[`grow-${this.grow}`]: true, // e.g., grow-start, grow-end, grow-both\n\t\t}\n\t\treturn html`<div class=\"${classMap(classes)}\"></div>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-divider': SchmancyDivider\n\t}\n}\n"],"names":["SchmancyDivider","$LitElement","css","super","arguments","this","outline","orientation","grow","classes","divider","horizontal","vertical","html","classMap","__decorateClass","property","type","String","prototype","reflect","customElement"],"mappings":";;;;;;;;;;;AAOA,IAAqBA,IAArB,cAA6CC,EAAYC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAAzD,EAAA;AAAA,EAAA;AAAAC,UAAAC,GAAAA,SAAAA,GAkF8DC,KAAAC,UAAA,WACuBD,KAAAE,cAAA,cACvBF,KAAAG,OAAA;AAAA,EAAA;AAAA,EAEnD,SACT;AAAA,UAAMC,IAAU,EACfC,SAAAA,IACAC,YAAYN,KAAKE,gBAAgB,cACjCK,UAAUP,KAAKE,gBAAgB,YAC/B,yBAAyBF,KAAKC,YAAY,WAC1C,kBAAkBD,KAAKC,YAAY,WACnC,CAAC,QAAQD,KAAKG,IAAS,EAAA,GAAA,GAAA;AAEjB,WAAAK,gBAAmBC,EAASL,CAAAA,CAAAA;AAAAA,EAAQ;;AAbhBM,EAAA,CAA3BC,EAAS,EAAEC,MAAMC,OAlFElB,CAAAA,CAAAA,GAAAA,EAkFQmB,WAAA,WAAA,CAAA,GACeJ,EAAA,CAA1CC,EAAS,EAAEI,SAAS,IAAMH,MAAMC,OAAAA,CAAAA,CAAAA,GAnFblB,EAmFuBmB,WAAA,eAAA,IACfJ,EAAA,CAA3BC,EAAS,EAAEC,MAAMC,OApFElB,CAAAA,CAAAA,GAAAA,EAoFQmB,WAAA,QAAA,CAAA,GApFRnB,IAArBe,EAAA,CADCM,EAAc,kBACMrB,CAAAA,GAAAA,CAAAA;"}
@@ -1,4 +1,4 @@
1
- "use strict";require("rxjs");const m=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const h=require("./litElement.mixin-BLxKs_2o.cjs");require("./tailwind.mixin-BwZ9FobB.cjs");const c=require("lit"),n=require("lit/decorators.js");var u=Object.defineProperty,w=Object.getOwnPropertyDescriptor,e=(t,i,s,a)=>{for(var l,r=a>1?void 0:a?w(i,s):i,d=t.length-1;d>=0;d--)(l=t[d])&&(r=(a?l(i,s,r):l(r))||r);return a&&r&&u(i,s,r),r};let o=class extends h.$LitElement(c.css`
1
+ "use strict";require("rxjs");const m=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const h=require("./litElement.mixin-Ct7SS5n6.cjs");require("./tailwind.mixin-Cezttl4Z.cjs");const c=require("lit"),n=require("lit/decorators.js");var u=Object.defineProperty,w=Object.getOwnPropertyDescriptor,e=(t,i,s,a)=>{for(var l,r=a>1?void 0:a?w(i,s):i,d=t.length-1;d>=0;d--)(l=t[d])&&(r=(a?l(i,s,r):l(r))||r);return a&&r&&u(i,s,r),r};let o=class extends h.$LitElement(c.css`
2
2
  :host {
3
3
  display: block;
4
4
  overflow: hidden; /* Ensure the animation is clipped */
@@ -80,4 +80,4 @@
80
80
  animation: drawVertical var(--animation-duration, 1s) forwards;
81
81
  }
82
82
  `){constructor(){super(...arguments),this.outline="variant",this.orientation="horizontal",this.grow="start"}render(){const t={divider:!0,horizontal:this.orientation==="horizontal",vertical:this.orientation==="vertical","border-outlineVariant":this.outline==="variant","border-outline":this.outline==="default",[`grow-${this.grow}`]:!0};return c.html`<div class="${m.classMap(t)}"></div>`}};e([n.property({type:String})],o.prototype,"outline",2),e([n.property({reflect:!0,type:String})],o.prototype,"orientation",2),e([n.property({type:String})],o.prototype,"grow",2),o=e([n.customElement("schmancy-divider")],o);
83
- //# sourceMappingURL=divider-8veioiIO.cjs.map
83
+ //# sourceMappingURL=divider-CIMJK_rP.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"divider-8veioiIO.cjs","sources":["../src/divider/divider.ts"],"sourcesContent":["// divider.ts\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\n\n@customElement('schmancy-divider')\nexport default class SchmancyDivider extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\toverflow: hidden; /* Ensure the animation is clipped */\n\t}\n\t.divider {\n\t\t/* Maintain existing border-based color logic */\n\t\tborder-color: var(--divider-color, currentColor);\n\t}\n\t/* Horizontal Divider */\n\t.horizontal {\n\t\twidth: 100%;\n\t\theight: 1px;\n\t\tborder-top: 1px solid;\n\t\ttransform: scaleX(0);\n\t\ttransform-origin: var(--transform-origin, left);\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\t/* Vertical Divider */\n\t.vertical {\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tborder-left: 1px solid;\n\t\ttransform: scaleY(0);\n\t\ttransform-origin: var(--transform-origin, top);\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n\t/* Outline Variants */\n\t.border-outlineVariant {\n\t\t/* Utilize existing outline variant styles */\n\t\tborder-color: var(--schmancy-sys-color-outlineVariant, #555);\n\t}\n\t.border-outline {\n\t\t/* Utilize existing default outline styles */\n\t\tborder-color: var(--schmancy-sys-color-outline, #000);\n\t}\n\t/* RTL Support for Horizontal Dividers */\n\t:host([dir='rtl']) .horizontal.grow-start {\n\t\t--transform-origin: right;\n\t}\n\t:host([dir='rtl']) .horizontal.grow-end {\n\t\t--transform-origin: left;\n\t}\n\t/* Center Growth for Horizontal and Vertical Dividers */\n\t.horizontal.grow-both {\n\t\t--transform-origin: center;\n\t}\n\t.vertical.grow-both {\n\t\t--transform-origin: center;\n\t}\n\t/* Define Keyframes */\n\t@keyframes drawHorizontal {\n\t\tto {\n\t\t\ttransform: scaleX(1);\n\t\t}\n\t}\n\t@keyframes drawVertical {\n\t\tto {\n\t\t\ttransform: scaleY(1);\n\t\t}\n\t}\n\t/* Assign Animations Based on Grow Direction */\n\t.horizontal.grow-start {\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\t.horizontal.grow-end {\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\t.horizontal.grow-both {\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\n\t.vertical.grow-start {\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n\t.vertical.grow-end {\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n\t.vertical.grow-both {\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n`) {\n\t@property({ type: String }) outline: 'default' | 'variant' = 'variant'\n\t@property({ reflect: true, type: String }) orientation: 'horizontal' | 'vertical' = 'horizontal'\n\t@property({ type: String }) grow: 'start' | 'end' | 'both' = 'start'\n\n\tprotected render() {\n\t\tconst classes = {\n\t\t\tdivider: true,\n\t\t\thorizontal: this.orientation === 'horizontal',\n\t\t\tvertical: this.orientation === 'vertical',\n\t\t\t'border-outlineVariant': this.outline === 'variant',\n\t\t\t'border-outline': this.outline === 'default',\n\t\t\t[`grow-${this.grow}`]: true, // e.g., grow-start, grow-end, grow-both\n\t\t}\n\t\treturn html`<div class=\"${classMap(classes)}\"></div>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-divider': SchmancyDivider\n\t}\n}\n"],"names":["SchmancyDivider","$LitElement","css","super","arguments","this","outline","orientation","grow","render","classes","divider","horizontal","vertical","html","classMap","__decorateClass","property","type","String","prototype","reflect","customElement"],"mappings":"qcAOA,IAAqBA,EAArB,cAA6CC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAAzD,CAAA,CAAA,cAAAC,MAAAC,GAAAA,SAAAA,EAkF8DC,KAAAC,QAAA,UACuBD,KAAAE,YAAA,aACvBF,KAAAG,KAAA,OAAA,CAEnD,QAAAC,CACT,MAAMC,EAAU,CACfC,WACAC,WAAYP,KAAKE,cAAgB,aACjCM,SAAUR,KAAKE,cAAgB,WAC/B,wBAAyBF,KAAKC,UAAY,UAC1C,iBAAkBD,KAAKC,UAAY,UACnC,CAAC,QAAQD,KAAKG,IAAS,EAAA,EAAA,EAAA,EAEjB,OAAAM,EAAAA,mBAAmBC,EAASA,SAAAL,CAAQ,CAAA,UAAA,CAAA,EAbhBM,EAAA,CAA3BC,WAAS,CAAEC,KAAMC,UAlFEnB,EAkFQoB,UAAA,UAAA,CACeJ,EAAAA,EAAA,CAA1CC,EAAAA,SAAS,CAAEI,QAAS,GAAMH,KAAMC,MAnFbnB,CAAAA,CAAAA,EAAAA,EAmFuBoB,UAAA,cAAA,CAAA,EACfJ,EAAA,CAA3BC,WAAS,CAAEC,KAAMC,UApFEnB,EAoFQoB,UAAA,OAAA,CApFRpB,EAAAA,EAArBgB,EAAA,CADCM,EAAAA,cAAc,kBACMtB,CAAAA,EAAAA,CAAAA"}
1
+ {"version":3,"file":"divider-CIMJK_rP.cjs","sources":["../src/divider/divider.ts"],"sourcesContent":["// divider.ts\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\n\n@customElement('schmancy-divider')\nexport default class SchmancyDivider extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\toverflow: hidden; /* Ensure the animation is clipped */\n\t}\n\t.divider {\n\t\t/* Maintain existing border-based color logic */\n\t\tborder-color: var(--divider-color, currentColor);\n\t}\n\t/* Horizontal Divider */\n\t.horizontal {\n\t\twidth: 100%;\n\t\theight: 1px;\n\t\tborder-top: 1px solid;\n\t\ttransform: scaleX(0);\n\t\ttransform-origin: var(--transform-origin, left);\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\t/* Vertical Divider */\n\t.vertical {\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tborder-left: 1px solid;\n\t\ttransform: scaleY(0);\n\t\ttransform-origin: var(--transform-origin, top);\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n\t/* Outline Variants */\n\t.border-outlineVariant {\n\t\t/* Utilize existing outline variant styles */\n\t\tborder-color: var(--schmancy-sys-color-outlineVariant, #555);\n\t}\n\t.border-outline {\n\t\t/* Utilize existing default outline styles */\n\t\tborder-color: var(--schmancy-sys-color-outline, #000);\n\t}\n\t/* RTL Support for Horizontal Dividers */\n\t:host([dir='rtl']) .horizontal.grow-start {\n\t\t--transform-origin: right;\n\t}\n\t:host([dir='rtl']) .horizontal.grow-end {\n\t\t--transform-origin: left;\n\t}\n\t/* Center Growth for Horizontal and Vertical Dividers */\n\t.horizontal.grow-both {\n\t\t--transform-origin: center;\n\t}\n\t.vertical.grow-both {\n\t\t--transform-origin: center;\n\t}\n\t/* Define Keyframes */\n\t@keyframes drawHorizontal {\n\t\tto {\n\t\t\ttransform: scaleX(1);\n\t\t}\n\t}\n\t@keyframes drawVertical {\n\t\tto {\n\t\t\ttransform: scaleY(1);\n\t\t}\n\t}\n\t/* Assign Animations Based on Grow Direction */\n\t.horizontal.grow-start {\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\t.horizontal.grow-end {\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\t.horizontal.grow-both {\n\t\tanimation: drawHorizontal var(--animation-duration, 1s) forwards;\n\t}\n\n\t.vertical.grow-start {\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n\t.vertical.grow-end {\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n\t.vertical.grow-both {\n\t\tanimation: drawVertical var(--animation-duration, 1s) forwards;\n\t}\n`) {\n\t@property({ type: String }) outline: 'default' | 'variant' = 'variant'\n\t@property({ reflect: true, type: String }) orientation: 'horizontal' | 'vertical' = 'horizontal'\n\t@property({ type: String }) grow: 'start' | 'end' | 'both' = 'start'\n\n\tprotected render() {\n\t\tconst classes = {\n\t\t\tdivider: true,\n\t\t\thorizontal: this.orientation === 'horizontal',\n\t\t\tvertical: this.orientation === 'vertical',\n\t\t\t'border-outlineVariant': this.outline === 'variant',\n\t\t\t'border-outline': this.outline === 'default',\n\t\t\t[`grow-${this.grow}`]: true, // e.g., grow-start, grow-end, grow-both\n\t\t}\n\t\treturn html`<div class=\"${classMap(classes)}\"></div>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-divider': SchmancyDivider\n\t}\n}\n"],"names":["SchmancyDivider","$LitElement","css","super","arguments","this","outline","orientation","grow","render","classes","divider","horizontal","vertical","html","classMap","__decorateClass","property","type","String","prototype","reflect","customElement"],"mappings":"qcAOA,IAAqBA,EAArB,cAA6CC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAAzD,CAAA,CAAA,cAAAC,MAAAC,GAAAA,SAAAA,EAkF8DC,KAAAC,QAAA,UACuBD,KAAAE,YAAA,aACvBF,KAAAG,KAAA,OAAA,CAEnD,QAAAC,CACT,MAAMC,EAAU,CACfC,WACAC,WAAYP,KAAKE,cAAgB,aACjCM,SAAUR,KAAKE,cAAgB,WAC/B,wBAAyBF,KAAKC,UAAY,UAC1C,iBAAkBD,KAAKC,UAAY,UACnC,CAAC,QAAQD,KAAKG,IAAS,EAAA,EAAA,EAAA,EAEjB,OAAAM,EAAAA,mBAAmBC,EAASA,SAAAL,CAAQ,CAAA,UAAA,CAAA,EAbhBM,EAAA,CAA3BC,WAAS,CAAEC,KAAMC,UAlFEnB,EAkFQoB,UAAA,UAAA,CACeJ,EAAAA,EAAA,CAA1CC,EAAAA,SAAS,CAAEI,QAAS,GAAMH,KAAMC,MAnFbnB,CAAAA,CAAAA,EAAAA,EAmFuBoB,UAAA,cAAA,CAAA,EACfJ,EAAA,CAA3BC,WAAS,CAAEC,KAAMC,UApFEnB,EAoFQoB,UAAA,OAAA,CApFRpB,EAAAA,EAArBgB,EAAA,CADCM,EAAAA,cAAc,kBACMtB,CAAAA,EAAAA,CAAAA"}
package/dist/divider.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";require("./divider-8veioiIO.cjs");
1
+ "use strict";require("./divider-CIMJK_rP.cjs");
2
2
  //# sourceMappingURL=divider.cjs.map
package/dist/divider.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./divider-Clk5mtqJ.js";
1
+ import "./divider-C5KbJnNJ.js";
2
2
  //# sourceMappingURL=divider.js.map
@@ -1,4 +1,4 @@
1
- "use strict";const l=require("@floating-ui/dom"),p=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const m=require("./litElement.mixin-BLxKs_2o.cjs"),y=require("./tailwind.mixin-BwZ9FobB.cjs"),h=require("lit"),n=require("lit/decorators.js");var u=Object.defineProperty,g=Object.getOwnPropertyDescriptor,a=(t,e,s,r)=>{for(var i,o=r>1?void 0:r?g(e,s):e,c=t.length-1;c>=0;c--)(i=t[c])&&(o=(r?i(e,s,o):i(o))||o);return r&&o&&u(e,s,o),o};exports.SchmancyDropdown=class extends m.$LitElement(h.css`
1
+ "use strict";const l=require("@floating-ui/dom"),p=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const m=require("./litElement.mixin-Ct7SS5n6.cjs"),y=require("./tailwind.mixin-Cezttl4Z.cjs"),h=require("lit"),n=require("lit/decorators.js");var u=Object.defineProperty,g=Object.getOwnPropertyDescriptor,a=(t,e,s,r)=>{for(var i,o=r>1?void 0:r?g(e,s):e,c=t.length-1;c>=0;c--)(i=t[c])&&(o=(r?i(e,s,o):i(o))||o);return r&&o&&u(e,s,o),o};exports.SchmancyDropdown=class extends m.$LitElement(h.css`
2
2
  :host {
3
3
  display: inline-block;
4
4
  position: relative;
@@ -60,4 +60,4 @@
60
60
  <slot></slot>
61
61
  </div>
62
62
  `}},d([n.property({type:String})],exports.SchmancyDropdownContent.prototype,"width",2),d([n.property({type:String})],exports.SchmancyDropdownContent.prototype,"maxHeight",2),d([n.property({type:Boolean})],exports.SchmancyDropdownContent.prototype,"shadow",2),d([n.property({type:String})],exports.SchmancyDropdownContent.prototype,"radius",2),exports.SchmancyDropdownContent=d([n.customElement("schmancy-dropdown-content")],exports.SchmancyDropdownContent);
63
- //# sourceMappingURL=dropdown-content-_NNVH-E_.cjs.map
63
+ //# sourceMappingURL=dropdown-content-Db-wdS2s.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-content-_NNVH-E_.cjs","sources":["../src/dropdown/dropdown-component.ts","../src/dropdown/dropdown-content.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { filter, fromEvent, takeUntil } from 'rxjs'\n\n/**\n * A dropdown component that displays content when triggered.\n *\n * @element schmancy-dropdown\n * @slot trigger - The element that triggers the dropdown\n * @slot - Default slot for the dropdown content\n */\n@customElement('schmancy-dropdown')\nexport class SchmancyDropdown extends $LitElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\tposition: relative;\n\t}\n`) {\n\t/**\n\t * Whether the dropdown is currently open\n\t */\n\t@property({ type: Boolean, reflect: true })\n\topen = false\n\n\t/**\n\t * Placement of the dropdown relative to the trigger\n\t */\n\t@property({ type: String })\n\tplacement:\n\t\t| 'top'\n\t\t| 'top-start'\n\t\t| 'top-end'\n\t\t| 'right'\n\t\t| 'right-start'\n\t\t| 'right-end'\n\t\t| 'bottom'\n\t\t| 'bottom-start'\n\t\t| 'bottom-end'\n\t\t| 'left'\n\t\t| 'left-start'\n\t\t| 'left-end' = 'bottom-start'\n\n\t/**\n\t * Offset distance in pixels\n\t */\n\t@property({ type: Number })\n\tdistance = 8\n\n\t@query('.trigger-container') triggerContainer!: HTMLElement\n\t@query('.dropdown-content-container') contentContainer!: HTMLElement\n\t@queryAssignedElements({ flatten: true }) contentElements!: HTMLElement[]\n\t@state() private portal: HTMLElement | null = null\n\n\t@queryAssignedElements({ slot: 'trigger', flatten: true })\n\ttriggerElements!: Array<HTMLElement>\n\n\tprivate cleanupPositioner?: () => void\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Create portal container for teleporting content to document body\n\t\tthis.setupPortal()\n\n\t\t// Listen for document clicks to close dropdown when clicking outside\n\t\tfromEvent<MouseEvent>(document, 'click')\n\t\t\t.pipe(\n\t\t\t\tfilter(event => this.open && !this.isEventFromSelf(event)),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.open = false\n\t\t\t})\n\n\t\t// Listen for escape key to close dropdown\n\t\tfromEvent<KeyboardEvent>(document, 'keydown')\n\t\t\t.pipe(\n\t\t\t\tfilter(event => this.open && event.key === 'Escape'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.open = false\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up the portal element for teleporting content\n\t */\n\tprivate setupPortal() {\n\t\t// Check if portal container exists\n\t\tlet portalContainer = document.getElementById('schmancy-portal-container')\n\n\t\t// Create portal container if it doesn't exist\n\t\tif (!portalContainer) {\n\t\t\tportalContainer = document.createElement('div')\n\t\t\tportalContainer.id = 'schmancy-portal-container'\n\t\t\tportalContainer.style.position = 'fixed'\n\t\t\tportalContainer.style.zIndex = '10000'\n\t\t\tportalContainer.style.top = '0'\n\t\t\tportalContainer.style.left = '0'\n\t\t\tportalContainer.style.pointerEvents = 'none'\n\t\t\tdocument.body.appendChild(portalContainer)\n\t\t}\n\n\t\t// Create portal for this specific dropdown\n\t\tconst portal = document.createElement('div')\n\t\tportal.className = 'schmancy-dropdown-portal'\n\t\tportal.style.position = 'absolute'\n\t\tportal.style.pointerEvents = 'auto'\n\t\tportal.style.display = 'none'\n\t\tportalContainer.appendChild(portal)\n\n\t\tthis.portal = portal\n\t}\n\n\t/**\n\t * Check if an event originated from within this component\n\t */\n\tprivate isEventFromSelf(event: Event): boolean {\n\t\treturn event.composedPath().some(el => el === this)\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.cleanupPositioner?.()\n\n\t\t// Remove portal when component is disconnected\n\t\tif (this.portal) {\n\t\t\tthis.portal.remove()\n\t\t\tthis.portal = null\n\t\t}\n\n\t\tsuper.disconnectedCallback()\n\t}\n\n\t/**\n\t * Toggle the dropdown open state\n\t */\n\ttoggle() {\n\t\tthis.open = !this.open\n\t}\n\n\tupdated(changedProps: Map<string, any>) {\n\t\tsuper.updated(changedProps)\n\n\t\tif (changedProps.has('open')) {\n\t\t\tif (this.open) {\n\t\t\t\tthis.setupPositioner()\n\t\t\t} else {\n\t\t\t\tthis.cleanupPositioner?.()\n\n\t\t\t\t// Hide portal when dropdown is closed\n\t\t\t\tif (this.portal) {\n\t\t\t\t\tthis.portal.style.display = 'none'\n\t\t\t\t\tthis.portal.innerHTML = ''\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Setup floating UI positioning with teleportation\n\t */\n\tprivate setupPositioner() {\n\t\tif (!this.triggerContainer || !this.portal) return\n\n\t\t// Show the portal\n\t\tthis.portal.style.display = 'block'\n\n\t\t// Move content to portal\n\t\tthis.teleportContentToPortal()\n\n\t\t// Setup positioning\n\t\tthis.cleanupPositioner = autoUpdate(this.triggerContainer, this.portal, () => {\n\t\t\tcomputePosition(this.triggerContainer, this.portal, {\n\t\t\t\tplacement: this.placement,\n\t\t\t\tmiddleware: [\n\t\t\t\t\toffset(this.distance),\n\t\t\t\t\tflip({\n\t\t\t\t\t\tfallbackPlacements: ['top-start', 'bottom-start'],\n\t\t\t\t\t}),\n\t\t\t\t\tshift({ padding: 0 }),\n\t\t\t\t],\n\t\t\t}).then(({ x, y }) => {\n\t\t\t\t// Update portal position\n\t\t\t\tObject.assign(this.portal.style, {\n\t\t\t\t\tleft: `${x}px`,\n\t\t\t\t\ttop: `${y - 8}px`,\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t}\n\n\t/**\n\t * Move slotted content to the portal\n\t */\n\tprivate teleportContentToPortal() {\n\t\tif (!this.portal) return\n\n\t\t// Clear existing content\n\t\tthis.portal.innerHTML = ''\n\n\t\t// Clone and move slotted content to portal\n\t\tthis.contentElements.forEach(element => {\n\t\t\t// Get computed styles to ensure portal content matches original styling\n\t\t\tconst clonedElement = element.cloneNode(true) as HTMLElement\n\n\t\t\t// Ensure dropdown-content elements maintain their styles when teleported\n\t\t\tif (element.tagName.toLowerCase() === 'schmancy-dropdown-content') {\n\t\t\t\tclonedElement.addEventListener('slotchange', () => {\n\t\t\t\t\t// Propagate any slot changes to class changes on children\n\t\t\t\t\tconst contentDiv = clonedElement.shadowRoot?.querySelector('[part=\"content\"]')\n\t\t\t\t\tif (contentDiv) {\n\t\t\t\t\t\tcontentDiv.classList.add('schmancy-dropdown-content')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.portal?.appendChild(clonedElement)\n\t\t})\n\t}\n\n\t/**\n\t * Handle trigger click to toggle dropdown\n\t */\n\tprivate handleTriggerClick(e: Event) {\n\t\te.stopPropagation()\n\t\tthis.toggle()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"trigger-container\" @click=${this.handleTriggerClick}>\n\t\t\t\t<slot name=\"trigger\"></slot>\n\t\t\t</div>\n\n\t\t\t<div class=\"dropdown-content-container\" ?hidden=${!this.open}>\n\t\t\t\t<slot\n\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\tif (this.open) {\n\t\t\t\t\t\t\tthis.teleportContentToPortal()\n\t\t\t\t\t\t\tthis.setupPositioner()\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-dropdown': SchmancyDropdown\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Content container for the schmancy-dropdown component.\n *\n * @element schmancy-dropdown-content\n * @slot - Default slot for dropdown content\n */\n@customElement('schmancy-dropdown-content')\nexport class SchmancyDropdownContent extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tz-index: 1000;\n\t\tmin-width: 10rem;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\tlist-style: none;\n\t\tbackground-color: var(--schmancy-sys-color-surface-container);\n\t\tbackground-clip: padding-box;\n\t\tborder-radius: 0.375rem;\n\t\tbox-shadow: var(--schmancy-sys-elevation-3);\n\t\twill-change: transform;\n\t\ttransform-origin: top left;\n\t\tanimation: dropdownAnimation 0.1s ease-out forwards;\n\t}\n\n\t:host([hidden]) {\n\t\tdisplay: none;\n\t}\n\n\t@keyframes dropdownAnimation {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.95);\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n\n\t/* Apply styles to content both in the component and when teleported to the portal */\n\t.schmancy-dropdown-content {\n\t\tbackground-color: var(--schmancy-sys-color-surface-container);\n\t\tborder-radius: 0.375rem;\n\t\tbox-shadow: var(--schmancy-sys-elevation-3);\n\t\twill-change: transform;\n\t\ttransform-origin: top left;\n\t\tanimation: dropdownAnimation 0.1s ease-out forwards;\n\t}\n`) {\n\t/**\n\t * Width of the dropdown content\n\t */\n\t@property({ type: String })\n\twidth: string = 'auto'\n\n\t/**\n\t * Maximum height of the dropdown content\n\t */\n\t@property({ type: String })\n\tmaxHeight: string = '80vh'\n\n\t/**\n\t * Whether to render with a shadow\n\t */\n\t@property({ type: Boolean })\n\tshadow: boolean = true\n\n\t/**\n\t * Border radius style\n\t */\n\t@property({ type: String })\n\tradius: 'none' | 'sm' | 'md' | 'lg' | 'full' = 'md'\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'schmancy-dropdown-content': true,\n\t\t\t'overflow-auto': true,\n\t\t\t'shadow-none': !this.shadow,\n\t\t\t'rounded-none': this.radius === 'none',\n\t\t\t'rounded-sm': this.radius === 'sm',\n\t\t\t'rounded-md': this.radius === 'md',\n\t\t\t'rounded-lg': this.radius === 'lg',\n\t\t\t'rounded-full': this.radius === 'full',\n\t\t}\n\n\t\tconst styles = {\n\t\t\twidth: this.width,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=${this.classMap(classes)} style=${this.styleMap(styles)} part=\"content\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-dropdown-content': SchmancyDropdownContent\n\t}\n}\n"],"names":["SchmancyDropdown","$LitElement","css","super","arguments","this","open","placement","distance","portal","connectedCallback","setupPortal","fromEvent","document","pipe","filter","isEventFromSelf","event","takeUntil","disconnecting","subscribe","key","portalContainer","getElementById","createElement","id","style","position","zIndex","top","left","pointerEvents","body","appendChild","className","display","composedPath","some","el","cleanupPositioner","remove","disconnectedCallback","changedProps","updated","has","setupPositioner","innerHTML","triggerContainer","teleportContentToPortal","autoUpdate","computePosition","middleware","offset","flip","fallbackPlacements","shift","padding","then","x","y","Object","assign","contentElements","forEach","element","clonedElement","cloneNode","tagName","toLowerCase","addEventListener","contentDiv","shadowRoot","querySelector","classList","add","e","stopPropagation","toggle","html","handleTriggerClick","__decorateClass","property","type","Boolean","reflect","prototype","String","Number","query","queryAssignedElements","flatten","state","slot","customElement","SchmancyDropdownContent","TailwindElement","constructor","width","maxHeight","shadow","radius","classes","styles","classMap","styleMap"],"mappings":"+dAcaA,QAAAA,iBAAN,cAA+BC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA3C,CAAA,CAAA,cAAAC,MAAAC,GAAAA,SAAAA,EAUCC,KAAAC,KAAAA,GAkBSD,KAAAE,UAAA,eAMLF,KAAAG,SAAA,EAKFH,KAAQI,OAA6B,IAAA,CAO9C,mBAAAC,CACCP,MAAMO,kBAAAA,EAGNL,KAAKM,YAGiBC,EAAAA,YAAAC,SAAU,SAC9BC,KACAC,YAAgBV,KAAKC,MAASD,CAAAA,KAAKW,gBAAgBC,CAAAA,CAAAA,EACnDC,EAAAA,UAAUb,KAAKc,aAEfC,CAAAA,EAAAA,UAAU,KACVf,KAAKC,KAAAA,EAAO,CAAA,EAIWM,YAAAC,SAAU,SACjCC,EAAAA,KACAC,SAAgBE,GAAAZ,KAAKC,MAAQW,EAAMI,MAAQ,QAARA,EACnCH,EAAAA,UAAUb,KAAKc,aAEfC,CAAAA,EAAAA,UAAU,IACVf,CAAAA,KAAKC,OAAO,CAAA,CACZ,CAMK,cAEH,IAAAgB,EAAkBT,SAASU,eAAe,2BAAA,EAGzCD,IACcA,EAAAT,SAASW,cAAc,KAAA,EACzCF,EAAgBG,GAAK,4BACrBH,EAAgBI,MAAMC,SAAW,QACjCL,EAAgBI,MAAME,OAAS,QAC/BN,EAAgBI,MAAMG,IAAM,IAC5BP,EAAgBI,MAAMI,KAAO,IAC7BR,EAAgBI,MAAMK,cAAgB,OAC7BlB,SAAAmB,KAAKC,YAAYX,CAIrB,GAAA,MAAAb,EAASI,SAASW,cAAc,KACtCf,EAAAA,EAAOyB,UAAY,2BACnBzB,EAAOiB,MAAMC,SAAW,WACxBlB,EAAOiB,MAAMK,cAAgB,OAC7BtB,EAAOiB,MA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AA,KAAKmG,SAASF,CAAAA,CAAAA;AAAAA;AAAAA;AAAAA,GAAO,CAtCpEtB,EAAAA,EAAA,CADCC,WAAS,CAAEC,KAAMI,MA9CNQ,CAAAA,CAAAA,EAAAA,gCA+CZT,UAAA,QAAA,CAAA,EAMAL,EAAA,CADCC,WAAS,CAAEC,KAAMI,MAAAA,CAAAA,CAAAA,EApDNQ,gCAqDZT,UAAA,YAAA,CAMAL,EAAAA,EAAA,CADCC,WAAS,CAAEC,KAAMC,OA1DNW,CAAAA,CAAAA,EAAAA,gCA2DZT,UAAA,SAAA,CAAA,EAMAL,EAAA,CADCC,WAAS,CAAEC,KAAMI,UAhENQ,gCAiEZT,UAAA,SAAA,CAjEYS,EAAAA,QAANA,wBAAAd,EAAA,CADNa,EAAAA,cAAc,2BAAA,CAAA,EACFC"}
1
+ {"version":3,"file":"dropdown-content-Db-wdS2s.cjs","sources":["../src/dropdown/dropdown-component.ts","../src/dropdown/dropdown-content.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { filter, fromEvent, takeUntil } from 'rxjs'\n\n/**\n * A dropdown component that displays content when triggered.\n *\n * @element schmancy-dropdown\n * @slot trigger - The element that triggers the dropdown\n * @slot - Default slot for the dropdown content\n */\n@customElement('schmancy-dropdown')\nexport class SchmancyDropdown extends $LitElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\tposition: relative;\n\t}\n`) {\n\t/**\n\t * Whether the dropdown is currently open\n\t */\n\t@property({ type: Boolean, reflect: true })\n\topen = false\n\n\t/**\n\t * Placement of the dropdown relative to the trigger\n\t */\n\t@property({ type: String })\n\tplacement:\n\t\t| 'top'\n\t\t| 'top-start'\n\t\t| 'top-end'\n\t\t| 'right'\n\t\t| 'right-start'\n\t\t| 'right-end'\n\t\t| 'bottom'\n\t\t| 'bottom-start'\n\t\t| 'bottom-end'\n\t\t| 'left'\n\t\t| 'left-start'\n\t\t| 'left-end' = 'bottom-start'\n\n\t/**\n\t * Offset distance in pixels\n\t */\n\t@property({ type: Number })\n\tdistance = 8\n\n\t@query('.trigger-container') triggerContainer!: HTMLElement\n\t@query('.dropdown-content-container') contentContainer!: HTMLElement\n\t@queryAssignedElements({ flatten: true }) contentElements!: HTMLElement[]\n\t@state() private portal: HTMLElement | null = null\n\n\t@queryAssignedElements({ slot: 'trigger', flatten: true })\n\ttriggerElements!: Array<HTMLElement>\n\n\tprivate cleanupPositioner?: () => void\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Create portal container for teleporting content to document body\n\t\tthis.setupPortal()\n\n\t\t// Listen for document clicks to close dropdown when clicking outside\n\t\tfromEvent<MouseEvent>(document, 'click')\n\t\t\t.pipe(\n\t\t\t\tfilter(event => this.open && !this.isEventFromSelf(event)),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.open = false\n\t\t\t})\n\n\t\t// Listen for escape key to close dropdown\n\t\tfromEvent<KeyboardEvent>(document, 'keydown')\n\t\t\t.pipe(\n\t\t\t\tfilter(event => this.open && event.key === 'Escape'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.open = false\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up the portal element for teleporting content\n\t */\n\tprivate setupPortal() {\n\t\t// Check if portal container exists\n\t\tlet portalContainer = document.getElementById('schmancy-portal-container')\n\n\t\t// Create portal container if it doesn't exist\n\t\tif (!portalContainer) {\n\t\t\tportalContainer = document.createElement('div')\n\t\t\tportalContainer.id = 'schmancy-portal-container'\n\t\t\tportalContainer.style.position = 'fixed'\n\t\t\tportalContainer.style.zIndex = '10000'\n\t\t\tportalContainer.style.top = '0'\n\t\t\tportalContainer.style.left = '0'\n\t\t\tportalContainer.style.pointerEvents = 'none'\n\t\t\tdocument.body.appendChild(portalContainer)\n\t\t}\n\n\t\t// Create portal for this specific dropdown\n\t\tconst portal = document.createElement('div')\n\t\tportal.className = 'schmancy-dropdown-portal'\n\t\tportal.style.position = 'absolute'\n\t\tportal.style.pointerEvents = 'auto'\n\t\tportal.style.display = 'none'\n\t\tportalContainer.appendChild(portal)\n\n\t\tthis.portal = portal\n\t}\n\n\t/**\n\t * Check if an event originated from within this component\n\t */\n\tprivate isEventFromSelf(event: Event): boolean {\n\t\treturn event.composedPath().some(el => el === this)\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.cleanupPositioner?.()\n\n\t\t// Remove portal when component is disconnected\n\t\tif (this.portal) {\n\t\t\tthis.portal.remove()\n\t\t\tthis.portal = null\n\t\t}\n\n\t\tsuper.disconnectedCallback()\n\t}\n\n\t/**\n\t * Toggle the dropdown open state\n\t */\n\ttoggle() {\n\t\tthis.open = !this.open\n\t}\n\n\tupdated(changedProps: Map<string, any>) {\n\t\tsuper.updated(changedProps)\n\n\t\tif (changedProps.has('open')) {\n\t\t\tif (this.open) {\n\t\t\t\tthis.setupPositioner()\n\t\t\t} else {\n\t\t\t\tthis.cleanupPositioner?.()\n\n\t\t\t\t// Hide portal when dropdown is closed\n\t\t\t\tif (this.portal) {\n\t\t\t\t\tthis.portal.style.display = 'none'\n\t\t\t\t\tthis.portal.innerHTML = ''\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Setup floating UI positioning with teleportation\n\t */\n\tprivate setupPositioner() {\n\t\tif (!this.triggerContainer || !this.portal) return\n\n\t\t// Show the portal\n\t\tthis.portal.style.display = 'block'\n\n\t\t// Move content to portal\n\t\tthis.teleportContentToPortal()\n\n\t\t// Setup positioning\n\t\tthis.cleanupPositioner = autoUpdate(this.triggerContainer, this.portal, () => {\n\t\t\tcomputePosition(this.triggerContainer, this.portal, {\n\t\t\t\tplacement: this.placement,\n\t\t\t\tmiddleware: [\n\t\t\t\t\toffset(this.distance),\n\t\t\t\t\tflip({\n\t\t\t\t\t\tfallbackPlacements: ['top-start', 'bottom-start'],\n\t\t\t\t\t}),\n\t\t\t\t\tshift({ padding: 0 }),\n\t\t\t\t],\n\t\t\t}).then(({ x, y }) => {\n\t\t\t\t// Update portal position\n\t\t\t\tObject.assign(this.portal.style, {\n\t\t\t\t\tleft: `${x}px`,\n\t\t\t\t\ttop: `${y - 8}px`,\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t}\n\n\t/**\n\t * Move slotted content to the portal\n\t */\n\tprivate teleportContentToPortal() {\n\t\tif (!this.portal) return\n\n\t\t// Clear existing content\n\t\tthis.portal.innerHTML = ''\n\n\t\t// Clone and move slotted content to portal\n\t\tthis.contentElements.forEach(element => {\n\t\t\t// Get computed styles to ensure portal content matches original styling\n\t\t\tconst clonedElement = element.cloneNode(true) as HTMLElement\n\n\t\t\t// Ensure dropdown-content elements maintain their styles when teleported\n\t\t\tif (element.tagName.toLowerCase() === 'schmancy-dropdown-content') {\n\t\t\t\tclonedElement.addEventListener('slotchange', () => {\n\t\t\t\t\t// Propagate any slot changes to class changes on children\n\t\t\t\t\tconst contentDiv = clonedElement.shadowRoot?.querySelector('[part=\"content\"]')\n\t\t\t\t\tif (contentDiv) {\n\t\t\t\t\t\tcontentDiv.classList.add('schmancy-dropdown-content')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.portal?.appendChild(clonedElement)\n\t\t})\n\t}\n\n\t/**\n\t * Handle trigger click to toggle dropdown\n\t */\n\tprivate handleTriggerClick(e: Event) {\n\t\te.stopPropagation()\n\t\tthis.toggle()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"trigger-container\" @click=${this.handleTriggerClick}>\n\t\t\t\t<slot name=\"trigger\"></slot>\n\t\t\t</div>\n\n\t\t\t<div class=\"dropdown-content-container\" ?hidden=${!this.open}>\n\t\t\t\t<slot\n\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\tif (this.open) {\n\t\t\t\t\t\t\tthis.teleportContentToPortal()\n\t\t\t\t\t\t\tthis.setupPositioner()\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-dropdown': SchmancyDropdown\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Content container for the schmancy-dropdown component.\n *\n * @element schmancy-dropdown-content\n * @slot - Default slot for dropdown content\n */\n@customElement('schmancy-dropdown-content')\nexport class SchmancyDropdownContent extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tz-index: 1000;\n\t\tmin-width: 10rem;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\tlist-style: none;\n\t\tbackground-color: var(--schmancy-sys-color-surface-container);\n\t\tbackground-clip: padding-box;\n\t\tborder-radius: 0.375rem;\n\t\tbox-shadow: var(--schmancy-sys-elevation-3);\n\t\twill-change: transform;\n\t\ttransform-origin: top left;\n\t\tanimation: dropdownAnimation 0.1s ease-out forwards;\n\t}\n\n\t:host([hidden]) {\n\t\tdisplay: none;\n\t}\n\n\t@keyframes dropdownAnimation {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.95);\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n\n\t/* Apply styles to content both in the component and when teleported to the portal */\n\t.schmancy-dropdown-content {\n\t\tbackground-color: var(--schmancy-sys-color-surface-container);\n\t\tborder-radius: 0.375rem;\n\t\tbox-shadow: var(--schmancy-sys-elevation-3);\n\t\twill-change: transform;\n\t\ttransform-origin: top left;\n\t\tanimation: dropdownAnimation 0.1s ease-out forwards;\n\t}\n`) {\n\t/**\n\t * Width of the dropdown content\n\t */\n\t@property({ type: String })\n\twidth: string = 'auto'\n\n\t/**\n\t * Maximum height of the dropdown content\n\t */\n\t@property({ type: String })\n\tmaxHeight: string = '80vh'\n\n\t/**\n\t * Whether to render with a shadow\n\t */\n\t@property({ type: Boolean })\n\tshadow: boolean = true\n\n\t/**\n\t * Border radius style\n\t */\n\t@property({ type: String })\n\tradius: 'none' | 'sm' | 'md' | 'lg' | 'full' = 'md'\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'schmancy-dropdown-content': true,\n\t\t\t'overflow-auto': true,\n\t\t\t'shadow-none': !this.shadow,\n\t\t\t'rounded-none': this.radius === 'none',\n\t\t\t'rounded-sm': this.radius === 'sm',\n\t\t\t'rounded-md': this.radius === 'md',\n\t\t\t'rounded-lg': this.radius === 'lg',\n\t\t\t'rounded-full': this.radius === 'full',\n\t\t}\n\n\t\tconst styles = {\n\t\t\twidth: this.width,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=${this.classMap(classes)} style=${this.styleMap(styles)} part=\"content\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-dropdown-content': SchmancyDropdownContent\n\t}\n}\n"],"names":["SchmancyDropdown","$LitElement","css","super","arguments","this","open","placement","distance","portal","connectedCallback","setupPortal","fromEvent","document","pipe","filter","isEventFromSelf","event","takeUntil","disconnecting","subscribe","key","portalContainer","getElementById","createElement","id","style","position","zIndex","top","left","pointerEvents","body","appendChild","className","display","composedPath","some","el","cleanupPositioner","remove","disconnectedCallback","changedProps","updated","has","setupPositioner","innerHTML","triggerContainer","teleportContentToPortal","autoUpdate","computePosition","middleware","offset","flip","fallbackPlacements","shift","padding","then","x","y","Object","assign","contentElements","forEach","element","clonedElement","cloneNode","tagName","toLowerCase","addEventListener","contentDiv","shadowRoot","querySelector","classList","add","e","stopPropagation","toggle","html","handleTriggerClick","__decorateClass","property","type","Boolean","reflect","prototype","String","Number","query","queryAssignedElements","flatten","state","slot","customElement","SchmancyDropdownContent","TailwindElement","constructor","width","maxHeight","shadow","radius","classes","styles","classMap","styleMap"],"mappings":"+dAcaA,QAAAA,iBAAN,cAA+BC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA3C,CAAA,CAAA,cAAAC,MAAAC,GAAAA,SAAAA,EAUCC,KAAAC,KAAAA,GAkBSD,KAAAE,UAAA,eAMLF,KAAAG,SAAA,EAKFH,KAAQI,OAA6B,IAAA,CAO9C,mBAAAC,CACCP,MAAMO,kBAAAA,EAGNL,KAAKM,YAGiBC,EAAAA,YAAAC,SAAU,SAC9BC,KACAC,YAAgBV,KAAKC,MAASD,CAAAA,KAAKW,gBAAgBC,CAAAA,CAAAA,EACnDC,EAAAA,UAAUb,KAAKc,aAEfC,CAAAA,EAAAA,UAAU,KACVf,KAAKC,KAAAA,EAAO,CAAA,EAIWM,YAAAC,SAAU,SACjCC,EAAAA,KACAC,SAAgBE,GAAAZ,KAAKC,MAAQW,EAAMI,MAAQ,QAARA,EACnCH,EAAAA,UAAUb,KAAKc,aAEfC,CAAAA,EAAAA,UAAU,IACVf,CAAAA,KAAKC,OAAO,CAAA,CACZ,CAMK,cAEH,IAAAgB,EAAkBT,SAASU,eAAe,2BAAA,EAGzCD,IACcA,EAAAT,SAASW,cAAc,KAAA,EACzCF,EAAgBG,GAAK,4BACrBH,EAAgBI,MAAMC,SAAW,QACjCL,EAAgBI,MAAME,OAAS,QAC/BN,EAAgBI,MAAMG,IAAM,IAC5BP,EAAgBI,MAAMI,KAAO,IAC7BR,EAAgBI,MAAMK,cAAgB,OAC7BlB,SAAAmB,KAAKC,YAAYX,CAIrB,GAAA,MAAAb,EAASI,SAASW,cAAc,KACtCf,EAAAA,EAAOyB,UAAY,2BACnBzB,EAAOiB,MAAMC,SAAW,WACxBlB,EAAOiB,MAAMK,cAAgB,OAC7BtB,EAAOiB,MAAMS,QAAU,OACvBb,EAAgBW,YAAYxB,CAA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;AAAAA;AAAAA,GAAO,CAtCpEtB,EAAAA,EAAA,CADCC,WAAS,CAAEC,KAAMI,MA9CNQ,CAAAA,CAAAA,EAAAA,gCA+CZT,UAAA,QAAA,CAAA,EAMAL,EAAA,CADCC,WAAS,CAAEC,KAAMI,MAAAA,CAAAA,CAAAA,EApDNQ,gCAqDZT,UAAA,YAAA,CAMAL,EAAAA,EAAA,CADCC,WAAS,CAAEC,KAAMC,OA1DNW,CAAAA,CAAAA,EAAAA,gCA2DZT,UAAA,SAAA,CAAA,EAMAL,EAAA,CADCC,WAAS,CAAEC,KAAMI,UAhENQ,gCAiEZT,UAAA,SAAA,CAjEYS,EAAAA,QAANA,wBAAAd,EAAA,CADNa,EAAAA,cAAc,2BAAA,CAAA,EACFC"}
@@ -2,8 +2,8 @@ import { autoUpdate as v, computePosition as k, offset as P, flip as x, shift as
2
2
  import { fromEvent as h, filter as m, takeUntil as y } from "rxjs";
3
3
  import "lit/directives/class-map.js";
4
4
  import "lit/directives/style-map.js";
5
- import { $ as E } from "./litElement.mixin-Cq04iWwZ.js";
6
- import { T as S } from "./tailwind.mixin-BT7PRaoD.js";
5
+ import { $ as E } from "./litElement.mixin-CkrfRzHl.js";
6
+ import { T as S } from "./tailwind.mixin-CGefB_52.js";
7
7
  import { css as f, html as w } from "lit";
8
8
  import { property as l, query as u, queryAssignedElements as g, state as T, customElement as b } from "lit/decorators.js";
9
9
  var $ = Object.defineProperty, O = Object.getOwnPropertyDescriptor, i = (t, e, s, n) => {
@@ -148,4 +148,4 @@ export {
148
148
  a as S,
149
149
  c as a
150
150
  };
151
- //# sourceMappingURL=dropdown-content-BVf0TP49.js.map
151
+ //# sourceMappingURL=dropdown-content-Q9VLVb2F.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-content-BVf0TP49.js","sources":["../src/dropdown/dropdown-component.ts","../src/dropdown/dropdown-content.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { filter, fromEvent, takeUntil } from 'rxjs'\n\n/**\n * A dropdown component that displays content when triggered.\n *\n * @element schmancy-dropdown\n * @slot trigger - The element that triggers the dropdown\n * @slot - Default slot for the dropdown content\n */\n@customElement('schmancy-dropdown')\nexport class SchmancyDropdown extends $LitElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\tposition: relative;\n\t}\n`) {\n\t/**\n\t * Whether the dropdown is currently open\n\t */\n\t@property({ type: Boolean, reflect: true })\n\topen = false\n\n\t/**\n\t * Placement of the dropdown relative to the trigger\n\t */\n\t@property({ type: String })\n\tplacement:\n\t\t| 'top'\n\t\t| 'top-start'\n\t\t| 'top-end'\n\t\t| 'right'\n\t\t| 'right-start'\n\t\t| 'right-end'\n\t\t| 'bottom'\n\t\t| 'bottom-start'\n\t\t| 'bottom-end'\n\t\t| 'left'\n\t\t| 'left-start'\n\t\t| 'left-end' = 'bottom-start'\n\n\t/**\n\t * Offset distance in pixels\n\t */\n\t@property({ type: Number })\n\tdistance = 8\n\n\t@query('.trigger-container') triggerContainer!: HTMLElement\n\t@query('.dropdown-content-container') contentContainer!: HTMLElement\n\t@queryAssignedElements({ flatten: true }) contentElements!: HTMLElement[]\n\t@state() private portal: HTMLElement | null = null\n\n\t@queryAssignedElements({ slot: 'trigger', flatten: true })\n\ttriggerElements!: Array<HTMLElement>\n\n\tprivate cleanupPositioner?: () => void\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Create portal container for teleporting content to document body\n\t\tthis.setupPortal()\n\n\t\t// Listen for document clicks to close dropdown when clicking outside\n\t\tfromEvent<MouseEvent>(document, 'click')\n\t\t\t.pipe(\n\t\t\t\tfilter(event => this.open && !this.isEventFromSelf(event)),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.open = false\n\t\t\t})\n\n\t\t// Listen for escape key to close dropdown\n\t\tfromEvent<KeyboardEvent>(document, 'keydown')\n\t\t\t.pipe(\n\t\t\t\tfilter(event => this.open && event.key === 'Escape'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.open = false\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up the portal element for teleporting content\n\t */\n\tprivate setupPortal() {\n\t\t// Check if portal container exists\n\t\tlet portalContainer = document.getElementById('schmancy-portal-container')\n\n\t\t// Create portal container if it doesn't exist\n\t\tif (!portalContainer) {\n\t\t\tportalContainer = document.createElement('div')\n\t\t\tportalContainer.id = 'schmancy-portal-container'\n\t\t\tportalContainer.style.position = 'fixed'\n\t\t\tportalContainer.style.zIndex = '10000'\n\t\t\tportalContainer.style.top = '0'\n\t\t\tportalContainer.style.left = '0'\n\t\t\tportalContainer.style.pointerEvents = 'none'\n\t\t\tdocument.body.appendChild(portalContainer)\n\t\t}\n\n\t\t// Create portal for this specific dropdown\n\t\tconst portal = document.createElement('div')\n\t\tportal.className = 'schmancy-dropdown-portal'\n\t\tportal.style.position = 'absolute'\n\t\tportal.style.pointerEvents = 'auto'\n\t\tportal.style.display = 'none'\n\t\tportalContainer.appendChild(portal)\n\n\t\tthis.portal = portal\n\t}\n\n\t/**\n\t * Check if an event originated from within this component\n\t */\n\tprivate isEventFromSelf(event: Event): boolean {\n\t\treturn event.composedPath().some(el => el === this)\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.cleanupPositioner?.()\n\n\t\t// Remove portal when component is disconnected\n\t\tif (this.portal) {\n\t\t\tthis.portal.remove()\n\t\t\tthis.portal = null\n\t\t}\n\n\t\tsuper.disconnectedCallback()\n\t}\n\n\t/**\n\t * Toggle the dropdown open state\n\t */\n\ttoggle() {\n\t\tthis.open = !this.open\n\t}\n\n\tupdated(changedProps: Map<string, any>) {\n\t\tsuper.updated(changedProps)\n\n\t\tif (changedProps.has('open')) {\n\t\t\tif (this.open) {\n\t\t\t\tthis.setupPositioner()\n\t\t\t} else {\n\t\t\t\tthis.cleanupPositioner?.()\n\n\t\t\t\t// Hide portal when dropdown is closed\n\t\t\t\tif (this.portal) {\n\t\t\t\t\tthis.portal.style.display = 'none'\n\t\t\t\t\tthis.portal.innerHTML = ''\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Setup floating UI positioning with teleportation\n\t */\n\tprivate setupPositioner() {\n\t\tif (!this.triggerContainer || !this.portal) return\n\n\t\t// Show the portal\n\t\tthis.portal.style.display = 'block'\n\n\t\t// Move content to portal\n\t\tthis.teleportContentToPortal()\n\n\t\t// Setup positioning\n\t\tthis.cleanupPositioner = autoUpdate(this.triggerContainer, this.portal, () => {\n\t\t\tcomputePosition(this.triggerContainer, this.portal, {\n\t\t\t\tplacement: this.placement,\n\t\t\t\tmiddleware: [\n\t\t\t\t\toffset(this.distance),\n\t\t\t\t\tflip({\n\t\t\t\t\t\tfallbackPlacements: ['top-start', 'bottom-start'],\n\t\t\t\t\t}),\n\t\t\t\t\tshift({ padding: 0 }),\n\t\t\t\t],\n\t\t\t}).then(({ x, y }) => {\n\t\t\t\t// Update portal position\n\t\t\t\tObject.assign(this.portal.style, {\n\t\t\t\t\tleft: `${x}px`,\n\t\t\t\t\ttop: `${y - 8}px`,\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t}\n\n\t/**\n\t * Move slotted content to the portal\n\t */\n\tprivate teleportContentToPortal() {\n\t\tif (!this.portal) return\n\n\t\t// Clear existing content\n\t\tthis.portal.innerHTML = ''\n\n\t\t// Clone and move slotted content to portal\n\t\tthis.contentElements.forEach(element => {\n\t\t\t// Get computed styles to ensure portal content matches original styling\n\t\t\tconst clonedElement = element.cloneNode(true) as HTMLElement\n\n\t\t\t// Ensure dropdown-content elements maintain their styles when teleported\n\t\t\tif (element.tagName.toLowerCase() === 'schmancy-dropdown-content') {\n\t\t\t\tclonedElement.addEventListener('slotchange', () => {\n\t\t\t\t\t// Propagate any slot changes to class changes on children\n\t\t\t\t\tconst contentDiv = clonedElement.shadowRoot?.querySelector('[part=\"content\"]')\n\t\t\t\t\tif (contentDiv) {\n\t\t\t\t\t\tcontentDiv.classList.add('schmancy-dropdown-content')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.portal?.appendChild(clonedElement)\n\t\t})\n\t}\n\n\t/**\n\t * Handle trigger click to toggle dropdown\n\t */\n\tprivate handleTriggerClick(e: Event) {\n\t\te.stopPropagation()\n\t\tthis.toggle()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"trigger-container\" @click=${this.handleTriggerClick}>\n\t\t\t\t<slot name=\"trigger\"></slot>\n\t\t\t</div>\n\n\t\t\t<div class=\"dropdown-content-container\" ?hidden=${!this.open}>\n\t\t\t\t<slot\n\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\tif (this.open) {\n\t\t\t\t\t\t\tthis.teleportContentToPortal()\n\t\t\t\t\t\t\tthis.setupPositioner()\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-dropdown': SchmancyDropdown\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Content container for the schmancy-dropdown component.\n *\n * @element schmancy-dropdown-content\n * @slot - Default slot for dropdown content\n */\n@customElement('schmancy-dropdown-content')\nexport class SchmancyDropdownContent extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tz-index: 1000;\n\t\tmin-width: 10rem;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\tlist-style: none;\n\t\tbackground-color: var(--schmancy-sys-color-surface-container);\n\t\tbackground-clip: padding-box;\n\t\tborder-radius: 0.375rem;\n\t\tbox-shadow: var(--schmancy-sys-elevation-3);\n\t\twill-change: transform;\n\t\ttransform-origin: top left;\n\t\tanimation: dropdownAnimation 0.1s ease-out forwards;\n\t}\n\n\t:host([hidden]) {\n\t\tdisplay: none;\n\t}\n\n\t@keyframes dropdownAnimation {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.95);\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n\n\t/* Apply styles to content both in the component and when teleported to the portal */\n\t.schmancy-dropdown-content {\n\t\tbackground-color: var(--schmancy-sys-color-surface-container);\n\t\tborder-radius: 0.375rem;\n\t\tbox-shadow: var(--schmancy-sys-elevation-3);\n\t\twill-change: transform;\n\t\ttransform-origin: top left;\n\t\tanimation: dropdownAnimation 0.1s ease-out forwards;\n\t}\n`) {\n\t/**\n\t * Width of the dropdown content\n\t */\n\t@property({ type: String })\n\twidth: string = 'auto'\n\n\t/**\n\t * Maximum height of the dropdown content\n\t */\n\t@property({ type: String })\n\tmaxHeight: string = '80vh'\n\n\t/**\n\t * Whether to render with a shadow\n\t */\n\t@property({ type: Boolean })\n\tshadow: boolean = true\n\n\t/**\n\t * Border radius style\n\t */\n\t@property({ type: String })\n\tradius: 'none' | 'sm' | 'md' | 'lg' | 'full' = 'md'\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'schmancy-dropdown-content': true,\n\t\t\t'overflow-auto': true,\n\t\t\t'shadow-none': !this.shadow,\n\t\t\t'rounded-none': this.radius === 'none',\n\t\t\t'rounded-sm': this.radius === 'sm',\n\t\t\t'rounded-md': this.radius === 'md',\n\t\t\t'rounded-lg': this.radius === 'lg',\n\t\t\t'rounded-full': this.radius === 'full',\n\t\t}\n\n\t\tconst styles = {\n\t\t\twidth: this.width,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=${this.classMap(classes)} style=${this.styleMap(styles)} part=\"content\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-dropdown-content': SchmancyDropdownContent\n\t}\n}\n"],"names":["SchmancyDropdown","$LitElement","css","super","arguments","this","open","placement","distance","portal","connectedCallback","setupPortal","fromEvent","document","pipe","filter","isEventFromSelf","event","takeUntil","disconnecting","subscribe","key","portalContainer","getElementById","createElement","id","style","position","zIndex","top","left","pointerEvents","body","appendChild","className","display","composedPath","some","el","cleanupPositioner","remove","disconnectedCallback","changedProps","updated","has","setupPositioner","innerHTML","triggerContainer","teleportContentToPortal","autoUpdate","computePosition","middleware","offset","flip","fallbackPlacements","shift","padding","then","x","y","Object","assign","contentElements","forEach","element","clonedElement","cloneNode","tagName","toLowerCase","addEventListener","contentDiv","shadowRoot","querySelector","classList","add","e","stopPropagation","toggle","render","html","handleTriggerClick","__decorateClass","property","type","Boolean","reflect","prototype","String","Number","query","queryAssignedElements","flatten","state","slot","customElement","SchmancyDropdownContent","TailwindElement","constructor","width","maxHeight","shadow","radius","classes","styles","classMap","styleMap"],"mappings":";;;;;;;;;;;;AAca,IAAAA,IAAN,cAA+BC,EAAYC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA3C,EAAA;AAAA,EAAA,cAAAC;AAAAA,UAAAA,GAAAC,SAUCC,GAAAA,KAAAC,WAkBSD,KAAAE,YAAA,gBAMLF,KAAAG,WAAA,GAKFH,KAAQI,SAA6B;AAAA,EAAA;AAAA,EAO9C,oBACCN;AAAAA,UAAMO,qBAGNL,KAAKM,YAAAA,GAGiBC,EAAAC,UAAU,SAC9BC,KACAC,SAAgBV,KAAKC,SAASD,KAAKW,gBAAgBC,CACnDC,CAAAA,GAAAA,EAAUb,KAAKc,aAEfC,CAAAA,EAAAA,UAAU,MACVf;AAAAA,WAAKC,OAAO;AAAA,IAAA,CAIWM,GAAAA,EAAAC,UAAU,SACjCC,EAAAA,KACAC,EAAgBE,OAAAZ,KAAKC,QAAQW,EAAMI,QAAQ,QAARA,GACnCH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down/dropdown-component.ts","../src/dropdown/dropdown-content.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { filter, fromEvent, takeUntil } from 'rxjs'\n\n/**\n * A dropdown component that displays content when triggered.\n *\n * @element schmancy-dropdown\n * @slot trigger - The element that triggers the dropdown\n * @slot - Default slot for the dropdown content\n */\n@customElement('schmancy-dropdown')\nexport class SchmancyDropdown extends $LitElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\tposition: relative;\n\t}\n`) {\n\t/**\n\t * Whether the dropdown is currently open\n\t */\n\t@property({ type: Boolean, reflect: true })\n\topen = false\n\n\t/**\n\t * Placement of the dropdown relative to the trigger\n\t */\n\t@property({ type: String })\n\tplacement:\n\t\t| 'top'\n\t\t| 'top-start'\n\t\t| 'top-end'\n\t\t| 'right'\n\t\t| 'right-start'\n\t\t| 'right-end'\n\t\t| 'bottom'\n\t\t| 'bottom-start'\n\t\t| 'bottom-end'\n\t\t| 'left'\n\t\t| 'left-start'\n\t\t| 'left-end' = 'bottom-start'\n\n\t/**\n\t * Offset distance in pixels\n\t */\n\t@property({ type: Number })\n\tdistance = 8\n\n\t@query('.trigger-container') triggerContainer!: HTMLElement\n\t@query('.dropdown-content-container') contentContainer!: HTMLElement\n\t@queryAssignedElements({ flatten: true }) contentElements!: HTMLElement[]\n\t@state() private portal: HTMLElement | null = null\n\n\t@queryAssignedElements({ slot: 'trigger', flatten: true })\n\ttriggerElements!: Array<HTMLElement>\n\n\tprivate cleanupPositioner?: () => void\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Create portal container for teleporting content to document body\n\t\tthis.setupPortal()\n\n\t\t// Listen for document clicks to close dropdown when clicking outside\n\t\tfromEvent<MouseEvent>(document, 'click')\n\t\t\t.pipe(\n\t\t\t\tfilter(event => this.open && !this.isEventFromSelf(event)),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.open = false\n\t\t\t})\n\n\t\t// Listen for escape key to close dropdown\n\t\tfromEvent<KeyboardEvent>(document, 'keydown')\n\t\t\t.pipe(\n\t\t\t\tfilter(event => this.open && event.key === 'Escape'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.open = false\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up the portal element for teleporting content\n\t */\n\tprivate setupPortal() {\n\t\t// Check if portal container exists\n\t\tlet portalContainer = document.getElementById('schmancy-portal-container')\n\n\t\t// Create portal container if it doesn't exist\n\t\tif (!portalContainer) {\n\t\t\tportalContainer = document.createElement('div')\n\t\t\tportalContainer.id = 'schmancy-portal-container'\n\t\t\tportalContainer.style.position = 'fixed'\n\t\t\tportalContainer.style.zIndex = '10000'\n\t\t\tportalContainer.style.top = '0'\n\t\t\tportalContainer.style.left = '0'\n\t\t\tportalContainer.style.pointerEvents = 'none'\n\t\t\tdocument.body.appendChild(portalContainer)\n\t\t}\n\n\t\t// Create portal for this specific dropdown\n\t\tconst portal = document.createElement('div')\n\t\tportal.className = 'schmancy-dropdown-portal'\n\t\tportal.style.position = 'absolute'\n\t\tportal.style.pointerEvents = 'auto'\n\t\tportal.style.display = 'none'\n\t\tportalContainer.appendChild(portal)\n\n\t\tthis.portal = portal\n\t}\n\n\t/**\n\t * Check if an event originated from within this component\n\t */\n\tprivate isEventFromSelf(event: Event): boolean {\n\t\treturn event.composedPath().some(el => el === this)\n\t}\n\n\tdisconnectedCallback() {\n\t\tthis.cleanupPositioner?.()\n\n\t\t// Remove portal when component is disconnected\n\t\tif (this.portal) {\n\t\t\tthis.portal.remove()\n\t\t\tthis.portal = null\n\t\t}\n\n\t\tsuper.disconnectedCallback()\n\t}\n\n\t/**\n\t * Toggle the dropdown open state\n\t */\n\ttoggle() {\n\t\tthis.open = !this.open\n\t}\n\n\tupdated(changedProps: Map<string, any>) {\n\t\tsuper.updated(changedProps)\n\n\t\tif (changedProps.has('open')) {\n\t\t\tif (this.open) {\n\t\t\t\tthis.setupPositioner()\n\t\t\t} else {\n\t\t\t\tthis.cleanupPositioner?.()\n\n\t\t\t\t// Hide portal when dropdown is closed\n\t\t\t\tif (this.portal) {\n\t\t\t\t\tthis.portal.style.display = 'none'\n\t\t\t\t\tthis.portal.innerHTML = ''\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Setup floating UI positioning with teleportation\n\t */\n\tprivate setupPositioner() {\n\t\tif (!this.triggerContainer || !this.portal) return\n\n\t\t// Show the portal\n\t\tthis.portal.style.display = 'block'\n\n\t\t// Move content to portal\n\t\tthis.teleportContentToPortal()\n\n\t\t// Setup positioning\n\t\tthis.cleanupPositioner = autoUpdate(this.triggerContainer, this.portal, () => {\n\t\t\tcomputePosition(this.triggerContainer, this.portal, {\n\t\t\t\tplacement: this.placement,\n\t\t\t\tmiddleware: [\n\t\t\t\t\toffset(this.distance),\n\t\t\t\t\tflip({\n\t\t\t\t\t\tfallbackPlacements: ['top-start', 'bottom-start'],\n\t\t\t\t\t}),\n\t\t\t\t\tshift({ padding: 0 }),\n\t\t\t\t],\n\t\t\t}).then(({ x, y }) => {\n\t\t\t\t// Update portal position\n\t\t\t\tObject.assign(this.portal.style, {\n\t\t\t\t\tleft: `${x}px`,\n\t\t\t\t\ttop: `${y - 8}px`,\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t}\n\n\t/**\n\t * Move slotted content to the portal\n\t */\n\tprivate teleportContentToPortal() {\n\t\tif (!this.portal) return\n\n\t\t// Clear existing content\n\t\tthis.portal.innerHTML = ''\n\n\t\t// Clone and move slotted content to portal\n\t\tthis.contentElements.forEach(element => {\n\t\t\t// Get computed styles to ensure portal content matches original styling\n\t\t\tconst clonedElement = element.cloneNode(true) as HTMLElement\n\n\t\t\t// Ensure dropdown-content elements maintain their styles when teleported\n\t\t\tif (element.tagName.toLowerCase() === 'schmancy-dropdown-content') {\n\t\t\t\tclonedElement.addEventListener('slotchange', () => {\n\t\t\t\t\t// Propagate any slot changes to class changes on children\n\t\t\t\t\tconst contentDiv = clonedElement.shadowRoot?.querySelector('[part=\"content\"]')\n\t\t\t\t\tif (contentDiv) {\n\t\t\t\t\t\tcontentDiv.classList.add('schmancy-dropdown-content')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tthis.portal?.appendChild(clonedElement)\n\t\t})\n\t}\n\n\t/**\n\t * Handle trigger click to toggle dropdown\n\t */\n\tprivate handleTriggerClick(e: Event) {\n\t\te.stopPropagation()\n\t\tthis.toggle()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"trigger-container\" @click=${this.handleTriggerClick}>\n\t\t\t\t<slot name=\"trigger\"></slot>\n\t\t\t</div>\n\n\t\t\t<div class=\"dropdown-content-container\" ?hidden=${!this.open}>\n\t\t\t\t<slot\n\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\tif (this.open) {\n\t\t\t\t\t\t\tthis.teleportContentToPortal()\n\t\t\t\t\t\t\tthis.setupPositioner()\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-dropdown': SchmancyDropdown\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Content container for the schmancy-dropdown component.\n *\n * @element schmancy-dropdown-content\n * @slot - Default slot for dropdown content\n */\n@customElement('schmancy-dropdown-content')\nexport class SchmancyDropdownContent extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tz-index: 1000;\n\t\tmin-width: 10rem;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\tlist-style: none;\n\t\tbackground-color: var(--schmancy-sys-color-surface-container);\n\t\tbackground-clip: padding-box;\n\t\tborder-radius: 0.375rem;\n\t\tbox-shadow: var(--schmancy-sys-elevation-3);\n\t\twill-change: transform;\n\t\ttransform-origin: top left;\n\t\tanimation: dropdownAnimation 0.1s ease-out forwards;\n\t}\n\n\t:host([hidden]) {\n\t\tdisplay: none;\n\t}\n\n\t@keyframes dropdownAnimation {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: scale(0.95);\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n\n\t/* Apply styles to content both in the component and when teleported to the portal */\n\t.schmancy-dropdown-content {\n\t\tbackground-color: var(--schmancy-sys-color-surface-container);\n\t\tborder-radius: 0.375rem;\n\t\tbox-shadow: var(--schmancy-sys-elevation-3);\n\t\twill-change: transform;\n\t\ttransform-origin: top left;\n\t\tanimation: dropdownAnimation 0.1s ease-out forwards;\n\t}\n`) {\n\t/**\n\t * Width of the dropdown content\n\t */\n\t@property({ type: String })\n\twidth: string = 'auto'\n\n\t/**\n\t * Maximum height of the dropdown content\n\t */\n\t@property({ type: String })\n\tmaxHeight: string = '80vh'\n\n\t/**\n\t * Whether to render with a shadow\n\t */\n\t@property({ type: Boolean })\n\tshadow: boolean = true\n\n\t/**\n\t * Border radius style\n\t */\n\t@property({ type: String })\n\tradius: 'none' | 'sm' | 'md' | 'lg' | 'full' = 'md'\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'schmancy-dropdown-content': true,\n\t\t\t'overflow-auto': true,\n\t\t\t'shadow-none': !this.shadow,\n\t\t\t'rounded-none': this.radius === 'none',\n\t\t\t'rounded-sm': this.radius === 'sm',\n\t\t\t'rounded-md': this.radius === 'md',\n\t\t\t'rounded-lg': this.radius === 'lg',\n\t\t\t'rounded-full': this.radius === 'full',\n\t\t}\n\n\t\tconst styles = {\n\t\t\twidth: this.width,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=${this.classMap(classes)} style=${this.styleMap(styles)} part=\"content\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-dropdown-content': SchmancyDropdownContent\n\t}\n}\n"],"names":["SchmancyDropdown","$LitElement","css","super","arguments","this","open","placement","distance","portal","connectedCallback","setupPortal","fromEvent","document","pipe","filter","isEventFromSelf","event","takeUntil","disconnecting","subscribe","key","portalContainer","getElementById","createElement","id","style","position","zIndex","top","left","pointerEvents","body","appendChild","className","display","composedPath","some","el","cleanupPositioner","remove","disconnectedCallback","changedProps","updated","has","setupPositioner","innerHTML","triggerContainer","teleportContentToPortal","autoUpdate","computePosition","middleware","offset","flip","fallbackPlacements","shift","padding","then","x","y","Object","assign","contentElements","forEach","element","clonedElement","cloneNode","tagName","toLowerCase","addEventListener","contentDiv","shadowRoot","querySelector","classList","add","e","stopPropagation","toggle","render","html","handleTriggerClick","__decorateClass","property","type","Boolean","reflect","prototype","String","Number","query","queryAssignedElements","flatten","state","slot","customElement","SchmancyDropdownContent","TailwindElement","constructor","width","maxHeight","shadow","radius","classes","styles","classMap","styleMap"],"mappings":";;;;;;;;;;;;AAca,IAAAA,IAAN,cAA+BC,EAAYC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA3C,EAAA;AAAA,EAAA,cAAAC;AAAAA,UAAAA,GAAAC,SAUCC,GAAAA,KAAAC,WAkBSD,KAAAE,YAAA,gBAMLF,KAAAG,WAAA,GAKFH,KAAQI,SAA6B;AAAA,EAAA;AAAA,EAO9C,oBACCN;AAAAA,UAAMO,qBAGNL,KAAKM,YAAAA,GAGiBC,EAAAC,UAAU,SAC9BC,KACAC,SAAgBV,KAAKC,SAASD,KAAKW,gBAAgBC,CACnDC,CAAAA,GAAAA,EAAUb,KAAKc,aAEfC,CAAAA,EAAAA,UAAU,MACVf;AAAAA,WAAKC,OAAO;AAAA,IAAA,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AANd,EAAA,CADNa,EAAc,2BACFC,CAAAA,GAAAA,CAAAA;"}
package/dist/dropdown.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./dropdown-content-_NNVH-E_.cjs");Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>e.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>e.SchmancyDropdownContent});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./dropdown-content-Db-wdS2s.cjs");Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>e.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>e.SchmancyDropdownContent});
2
2
  //# sourceMappingURL=dropdown.cjs.map
package/dist/dropdown.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as a, a as c } from "./dropdown-content-BVf0TP49.js";
1
+ import { S as a, a as c } from "./dropdown-content-Q9VLVb2F.js";
2
2
  export {
3
3
  a as SchmancyDropdown,
4
4
  c as SchmancyDropdownContent
package/dist/extra.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./timezone-DqTDisFn.cjs");Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>e.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>e.SchmancyTimezonesSelect});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./timezone-Q3p0zSV9.cjs");Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>e.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>e.SchmancyTimezonesSelect});
2
2
  //# sourceMappingURL=extra.cjs.map
package/dist/extra.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as a, a as S } from "./timezone-BqW_NjUB.js";
1
+ import { S as a, a as S } from "./timezone-Daso_7IH.js";
2
2
  export {
3
3
  a as SchmancyCountriesSelect,
4
4
  S as SchmancyTimezonesSelect
@@ -3,7 +3,7 @@ import { property as t, customElement as v, queryAssignedElements as $, query as
3
3
  import { classMap as I } from "lit/directives/class-map.js";
4
4
  import { styleMap as L } from "lit/directives/style-map.js";
5
5
  import { fromEvent as k, map as S, startWith as D, distinctUntilChanged as U, takeUntil as x, debounceTime as H, filter as A } from "rxjs";
6
- import { T as R } from "./tailwind.mixin-BT7PRaoD.js";
6
+ import { T as R } from "./tailwind.mixin-CGefB_52.js";
7
7
  var F = Object.defineProperty, i = (r, o, p, l) => {
8
8
  for (var n, e = void 0, a = r.length - 1; a >= 0; a--) (n = r[a]) && (e = n(o, p, e) || e);
9
9
  return e && F(o, p, e), e;
@@ -235,4 +235,4 @@ export {
235
235
  f as b,
236
236
  y as c
237
237
  };
238
- //# sourceMappingURL=flex-CO3HsYk1.js.map
238
+ //# sourceMappingURL=flex-8XEPqr9b.js.map