@mhmo91/schmancy 0.2.23 → 0.2.27

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 (231) hide show
  1. package/dist/{animated-text-Dj6eM2tE.cjs → animated-text-C5zM-91H.cjs} +2 -2
  2. package/dist/{animated-text-Dj6eM2tE.cjs.map → animated-text-C5zM-91H.cjs.map} +1 -1
  3. package/dist/{animated-text-CUx9CM5O.js → animated-text-IHZ7LNnc.js} +3 -3
  4. package/dist/{animated-text-CUx9CM5O.js.map → animated-text-IHZ7LNnc.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-B3adb0Y6.js → area.component-BrPf_qdG.js} +3 -3
  9. package/dist/{area.component-B3adb0Y6.js.map → area.component-BrPf_qdG.js.map} +1 -1
  10. package/dist/{area.component-Do3Jb3jC.cjs → area.component-DCLLi1YA.cjs} +2 -2
  11. package/dist/{area.component-Do3Jb3jC.cjs.map → area.component-DCLLi1YA.cjs.map} +1 -1
  12. package/dist/area.js +1 -1
  13. package/dist/{autocomplete-BUOnKDbI.js → autocomplete-CcDfKbfJ.js} +3 -3
  14. package/dist/{autocomplete-BUOnKDbI.js.map → autocomplete-CcDfKbfJ.js.map} +1 -1
  15. package/dist/{autocomplete-U3vu-siT.cjs → autocomplete-Dfq-Rhjy.cjs} +2 -2
  16. package/dist/{autocomplete-U3vu-siT.cjs.map → autocomplete-Dfq-Rhjy.cjs.map} +1 -1
  17. package/dist/autocomplete.cjs +1 -1
  18. package/dist/autocomplete.js +1 -1
  19. package/dist/busy.cjs +1 -1
  20. package/dist/busy.js +1 -1
  21. package/dist/button.cjs +1 -1
  22. package/dist/button.js +1 -1
  23. package/dist/card.cjs +1 -1
  24. package/dist/card.js +1 -1
  25. package/dist/{checkbox-FZpN0Mgj.cjs → checkbox-BdsGj_z6.cjs} +2 -2
  26. package/dist/{checkbox-FZpN0Mgj.cjs.map → checkbox-BdsGj_z6.cjs.map} +1 -1
  27. package/dist/{checkbox-BWaWg2Gm.js → checkbox-DV8tPYX0.js} +2 -2
  28. package/dist/{checkbox-BWaWg2Gm.js.map → checkbox-DV8tPYX0.js.map} +1 -1
  29. package/dist/checkbox.cjs +1 -1
  30. package/dist/checkbox.js +1 -1
  31. package/dist/{chips-CRfhI-G7.js → chips-Ca-SY6mg.js} +3 -3
  32. package/dist/{chips-CRfhI-G7.js.map → chips-Ca-SY6mg.js.map} +1 -1
  33. package/dist/{chips-BoxKYOMa.cjs → chips-Z8e_rQtM.cjs} +2 -2
  34. package/dist/{chips-BoxKYOMa.cjs.map → chips-Z8e_rQtM.cjs.map} +1 -1
  35. package/dist/chips.cjs +1 -1
  36. package/dist/chips.js +1 -1
  37. package/dist/components.cjs +1 -1
  38. package/dist/components.js +1 -1
  39. package/dist/content-drawer.cjs +1 -1
  40. package/dist/content-drawer.js +1 -1
  41. package/dist/{date-range-X97ioY-h.cjs → date-range-CDX0VlcK.cjs} +2 -2
  42. package/dist/{date-range-X97ioY-h.cjs.map → date-range-CDX0VlcK.cjs.map} +1 -1
  43. package/dist/{date-range-2Zd4XvrS.js → date-range-DdGaWGVn.js} +3 -3
  44. package/dist/{date-range-2Zd4XvrS.js.map → date-range-DdGaWGVn.js.map} +1 -1
  45. package/dist/date-range.cjs +1 -1
  46. package/dist/date-range.js +1 -1
  47. package/dist/{delay-CwXLGveT.js → delay-BWLlCMKV.js} +2 -2
  48. package/dist/{delay-CwXLGveT.js.map → delay-BWLlCMKV.js.map} +1 -1
  49. package/dist/{delay-BqTo3aLA.cjs → delay-DsFVHHw2.cjs} +2 -2
  50. package/dist/{delay-BqTo3aLA.cjs.map → delay-DsFVHHw2.cjs.map} +1 -1
  51. package/dist/delay.cjs +1 -1
  52. package/dist/delay.js +1 -1
  53. package/dist/{divider-CdV7coS1.js → divider-B7kWs-q5.js} +3 -3
  54. package/dist/{divider-CdV7coS1.js.map → divider-B7kWs-q5.js.map} +1 -1
  55. package/dist/{divider-BfxgNMsI.cjs → divider-CjgOM462.cjs} +2 -2
  56. package/dist/{divider-BfxgNMsI.cjs.map → divider-CjgOM462.cjs.map} +1 -1
  57. package/dist/divider.cjs +1 -1
  58. package/dist/divider.js +1 -1
  59. package/dist/{form-DfGEOLag.js → form-BUV1hUzI.js} +2 -2
  60. package/dist/{form-DfGEOLag.js.map → form-BUV1hUzI.js.map} +1 -1
  61. package/dist/{form-BTnhPK7O.cjs → form-DyYGOlOR.cjs} +2 -2
  62. package/dist/{form-BTnhPK7O.cjs.map → form-DyYGOlOR.cjs.map} +1 -1
  63. package/dist/form.cjs +1 -1
  64. package/dist/form.js +1 -1
  65. package/dist/{icon-B34qm8t_.js → icon-CWvUTBIP.js} +3 -3
  66. package/dist/{icon-B34qm8t_.js.map → icon-CWvUTBIP.js.map} +1 -1
  67. package/dist/{icon-DL24gxLi.cjs → icon-DPN7kWO0.cjs} +2 -2
  68. package/dist/{icon-DL24gxLi.cjs.map → icon-DPN7kWO0.cjs.map} +1 -1
  69. package/dist/{icon-button-yOFOGX0Y.js → icon-button-CbEs8eyS.js} +3 -3
  70. package/dist/{icon-button-yOFOGX0Y.js.map → icon-button-CbEs8eyS.js.map} +1 -1
  71. package/dist/{icon-button-BXlgRBET.cjs → icon-button-DHiO0w8J.cjs} +2 -2
  72. package/dist/{icon-button-BXlgRBET.cjs.map → icon-button-DHiO0w8J.cjs.map} +1 -1
  73. package/dist/icons.cjs +1 -1
  74. package/dist/icons.js +1 -1
  75. package/dist/index.cjs +1 -1
  76. package/dist/index.js +49 -50
  77. package/dist/{input-C5Qe0WzY.cjs → input-2kqgsr0S.cjs} +2 -2
  78. package/dist/{input-C5Qe0WzY.cjs.map → input-2kqgsr0S.cjs.map} +1 -1
  79. package/dist/{input-B63-M9qj.js → input-D3hti5wB.js} +2 -2
  80. package/dist/{input-B63-M9qj.js.map → input-D3hti5wB.js.map} +1 -1
  81. package/dist/input.cjs +1 -1
  82. package/dist/input.js +1 -1
  83. package/dist/layout.cjs +1 -1
  84. package/dist/layout.js +1 -1
  85. package/dist/{list-BDw1aNOH.cjs → list-Cq9RDYF_.cjs} +2 -2
  86. package/dist/{list-BDw1aNOH.cjs.map → list-Cq9RDYF_.cjs.map} +1 -1
  87. package/dist/{list-C9kPT0mr.js → list-D3m-rd6d.js} +2 -2
  88. package/dist/{list-C9kPT0mr.js.map → list-D3m-rd6d.js.map} +1 -1
  89. package/dist/list.cjs +1 -1
  90. package/dist/list.js +1 -1
  91. package/dist/{litElement.mixin-CJYb3izk.js → litElement.mixin-CjxO_zfv.js} +2 -2
  92. package/dist/{litElement.mixin-CJYb3izk.js.map → litElement.mixin-CjxO_zfv.js.map} +1 -1
  93. package/dist/{litElement.mixin-Cw40wOLl.cjs → litElement.mixin-DWxwPXWQ.cjs} +2 -2
  94. package/dist/{litElement.mixin-Cw40wOLl.cjs.map → litElement.mixin-DWxwPXWQ.cjs.map} +1 -1
  95. package/dist/{menu-B-9Sd5xU.js → menu-CCQYHiy2.js} +3 -3
  96. package/dist/{menu-B-9Sd5xU.js.map → menu-CCQYHiy2.js.map} +1 -1
  97. package/dist/{menu-BezCg_ZV.cjs → menu-ifiBMg-F.cjs} +2 -2
  98. package/dist/{menu-BezCg_ZV.cjs.map → menu-ifiBMg-F.cjs.map} +1 -1
  99. package/dist/menu.cjs +1 -1
  100. package/dist/menu.js +1 -1
  101. package/dist/nav-drawer.cjs +1 -1
  102. package/dist/nav-drawer.js +1 -1
  103. package/dist/notification.cjs +1 -1
  104. package/dist/notification.js +1 -1
  105. package/dist/{option-ETcMXlUc.js → option-CM24cDF6.js} +2 -2
  106. package/dist/{option-ETcMXlUc.js.map → option-CM24cDF6.js.map} +1 -1
  107. package/dist/{option-Ds6sb35B.cjs → option-DOBWmGE5.cjs} +2 -2
  108. package/dist/{option-Ds6sb35B.cjs.map → option-DOBWmGE5.cjs.map} +1 -1
  109. package/dist/option.cjs +1 -1
  110. package/dist/option.js +1 -1
  111. package/dist/{outlet-Bc4MC45j.js → outlet-BsrhXTEg.js} +44 -40
  112. package/dist/outlet-BsrhXTEg.js.map +1 -0
  113. package/dist/{outlet-BDkD7_9L.cjs → outlet-u1_Qa8Li.cjs} +4 -4
  114. package/dist/outlet-u1_Qa8Li.cjs.map +1 -0
  115. package/dist/{payment-card-form-BXq6Mxck.cjs → payment-card-form-B7tV2ttW.cjs} +2 -2
  116. package/dist/{payment-card-form-BXq6Mxck.cjs.map → payment-card-form-B7tV2ttW.cjs.map} +1 -1
  117. package/dist/{payment-card-form-yjKqadtl.js → payment-card-form-CTZsSGOB.js} +3 -3
  118. package/dist/{payment-card-form-yjKqadtl.js.map → payment-card-form-CTZsSGOB.js.map} +1 -1
  119. package/dist/{radio-group-SZ7LT0BI.js → radio-group-dN2lWcFu.js} +2 -2
  120. package/dist/{radio-group-SZ7LT0BI.js.map → radio-group-dN2lWcFu.js.map} +1 -1
  121. package/dist/{radio-group-B3jrTLIL.cjs → radio-group-m5Swl5cq.cjs} +2 -2
  122. package/dist/{radio-group-B3jrTLIL.cjs.map → radio-group-m5Swl5cq.cjs.map} +1 -1
  123. package/dist/radio-group.cjs +1 -1
  124. package/dist/radio-group.js +1 -1
  125. package/dist/{scroll-BZXWpgyx.js → scroll-Bl-fR7Vv.js} +2 -2
  126. package/dist/{scroll-BZXWpgyx.js.map → scroll-Bl-fR7Vv.js.map} +1 -1
  127. package/dist/{scroll-DIBR9WHR.cjs → scroll-DnAxN1uS.cjs} +2 -2
  128. package/dist/{scroll-DIBR9WHR.cjs.map → scroll-DnAxN1uS.cjs.map} +1 -1
  129. package/dist/{select-Bfkeb6KP.cjs → select-Bzf5TEob.cjs} +2 -2
  130. package/dist/{select-Bfkeb6KP.cjs.map → select-Bzf5TEob.cjs.map} +1 -1
  131. package/dist/{select-0kZshsvW.js → select-CR2mQf_Q.js} +3 -3
  132. package/dist/{select-0kZshsvW.js.map → select-CR2mQf_Q.js.map} +1 -1
  133. package/dist/select.cjs +1 -1
  134. package/dist/select.js +1 -1
  135. package/dist/sheet-B7UZL0S4.cjs +45 -0
  136. package/dist/sheet-B7UZL0S4.cjs.map +1 -0
  137. package/dist/sheet-Qm3DILOR.js +179 -0
  138. package/dist/sheet-Qm3DILOR.js.map +1 -0
  139. package/dist/sheet.cjs +1 -1
  140. package/dist/sheet.js +5 -6
  141. package/dist/{slider-D4GAHeMx.js → slider-FTwWTvKi.js} +3 -3
  142. package/dist/{slider-D4GAHeMx.js.map → slider-FTwWTvKi.js.map} +1 -1
  143. package/dist/{slider-DEaQC5Qe.cjs → slider-ds6hnN7n.cjs} +2 -2
  144. package/dist/{slider-DEaQC5Qe.cjs.map → slider-ds6hnN7n.cjs.map} +1 -1
  145. package/dist/slider.cjs +1 -1
  146. package/dist/slider.js +1 -1
  147. package/dist/{spinner-BJ5VG2fV.cjs → spinner-8GhT-bLm.cjs} +2 -2
  148. package/dist/{spinner-BJ5VG2fV.cjs.map → spinner-8GhT-bLm.cjs.map} +1 -1
  149. package/dist/{spinner-_aBya_Qc.js → spinner-zxOxMm7j.js} +3 -3
  150. package/dist/{spinner-_aBya_Qc.js.map → spinner-zxOxMm7j.js.map} +1 -1
  151. package/dist/surface-BzSJT7y7.cjs +10 -0
  152. package/dist/surface-BzSJT7y7.cjs.map +1 -0
  153. package/dist/surface-DdbqvBbW.js +43 -0
  154. package/dist/surface-DdbqvBbW.js.map +1 -0
  155. package/dist/surface.cjs +1 -1
  156. package/dist/surface.js +1 -1
  157. package/dist/{table-Ds0ivk4n.js → table-6bRKgCJ9.js} +2 -2
  158. package/dist/{table-Ds0ivk4n.js.map → table-6bRKgCJ9.js.map} +1 -1
  159. package/dist/{table-BmyyQrx8.cjs → table-BDIhXdSA.cjs} +2 -2
  160. package/dist/{table-BmyyQrx8.cjs.map → table-BDIhXdSA.cjs.map} +1 -1
  161. package/dist/table.cjs +1 -1
  162. package/dist/table.js +1 -1
  163. package/dist/{tabs-group-2sFsKJxb.cjs → tabs-group-CHAAr7Wl.cjs} +2 -2
  164. package/dist/{tabs-group-2sFsKJxb.cjs.map → tabs-group-CHAAr7Wl.cjs.map} +1 -1
  165. package/dist/{tabs-group-OdIAitHN.js → tabs-group-DBybIi8n.js} +2 -2
  166. package/dist/{tabs-group-OdIAitHN.js.map → tabs-group-DBybIi8n.js.map} +1 -1
  167. package/dist/tabs.cjs +1 -1
  168. package/dist/tabs.js +1 -1
  169. package/dist/{tailwind.mixin-wwBoa4Jw.js → tailwind.mixin-DtR4DQvn.js} +11 -11
  170. package/dist/{tailwind.mixin-wwBoa4Jw.js.map → tailwind.mixin-DtR4DQvn.js.map} +1 -1
  171. package/dist/{tailwind.mixin-mhYVlkxs.cjs → tailwind.mixin-_mD_GeAp.cjs} +2 -2
  172. package/dist/{tailwind.mixin-mhYVlkxs.cjs.map → tailwind.mixin-_mD_GeAp.cjs.map} +1 -1
  173. package/dist/teleport.cjs +1 -1
  174. package/dist/{teleport.component-J9cOCWCT.cjs → teleport.component-BXIGP3Vs.cjs} +2 -2
  175. package/dist/{teleport.component-J9cOCWCT.cjs.map → teleport.component-BXIGP3Vs.cjs.map} +1 -1
  176. package/dist/{teleport.component-CBMVwlTg.js → teleport.component-Cn1e_GQp.js} +35 -35
  177. package/dist/{teleport.component-CBMVwlTg.js.map → teleport.component-Cn1e_GQp.js.map} +1 -1
  178. package/dist/teleport.js +1 -1
  179. package/dist/{textarea-p0XofIBJ.js → textarea-BchwVUAo.js} +2 -2
  180. package/dist/{textarea-p0XofIBJ.js.map → textarea-BchwVUAo.js.map} +1 -1
  181. package/dist/{textarea-DE-5ySnu.cjs → textarea-CJhi4hDu.cjs} +2 -2
  182. package/dist/{textarea-DE-5ySnu.cjs.map → textarea-CJhi4hDu.cjs.map} +1 -1
  183. package/dist/textarea.cjs +1 -1
  184. package/dist/textarea.js +1 -1
  185. package/dist/{theme-button-HfAO7YLi.cjs → theme-button-DoIFEVSv.cjs} +2 -2
  186. package/dist/{theme-button-HfAO7YLi.cjs.map → theme-button-DoIFEVSv.cjs.map} +1 -1
  187. package/dist/{theme-button-BczCoNKk.js → theme-button-dxTV0k03.js} +2 -2
  188. package/dist/{theme-button-BczCoNKk.js.map → theme-button-dxTV0k03.js.map} +1 -1
  189. package/dist/theme-button.cjs +1 -1
  190. package/dist/theme-button.js +1 -1
  191. package/dist/theme.cjs +1 -1
  192. package/dist/theme.component-Dhm3MpVW.cjs +3 -0
  193. package/dist/{theme.component-78M08LUD.cjs.map → theme.component-Dhm3MpVW.cjs.map} +1 -1
  194. package/dist/{theme.component-CKmrq6vY.js → theme.component-DwZx0sdk.js} +314 -307
  195. package/dist/{theme.component-CKmrq6vY.js.map → theme.component-DwZx0sdk.js.map} +1 -1
  196. package/dist/theme.js +1 -1
  197. package/dist/{tree-C0L22or-.cjs → tree-BkhYPaz6.cjs} +2 -2
  198. package/dist/{tree-C0L22or-.cjs.map → tree-BkhYPaz6.cjs.map} +1 -1
  199. package/dist/{tree-CJueZNtq.js → tree-C7GnGCWU.js} +2 -2
  200. package/dist/{tree-CJueZNtq.js.map → tree-C7GnGCWU.js.map} +1 -1
  201. package/dist/tree.cjs +1 -1
  202. package/dist/tree.js +1 -1
  203. package/dist/{typewriter-n3ITVaff.cjs → typewriter-DGIW1V_b.cjs} +2 -2
  204. package/dist/{typewriter-n3ITVaff.cjs.map → typewriter-DGIW1V_b.cjs.map} +1 -1
  205. package/dist/{typewriter-DOVBdtxY.js → typewriter-DfOKVMWh.js} +4 -4
  206. package/dist/{typewriter-DOVBdtxY.js.map → typewriter-DfOKVMWh.js.map} +1 -1
  207. package/dist/typewriter.cjs +1 -1
  208. package/dist/typewriter.js +1 -1
  209. package/dist/{typography-bMZIS2rJ.cjs → typography-DQHpwRFR.cjs} +2 -2
  210. package/dist/{typography-bMZIS2rJ.cjs.map → typography-DQHpwRFR.cjs.map} +1 -1
  211. package/dist/{typography-BRiJcJhp.js → typography-En0tk2d5.js} +2 -2
  212. package/dist/{typography-BRiJcJhp.js.map → typography-En0tk2d5.js.map} +1 -1
  213. package/dist/typography.cjs +1 -1
  214. package/dist/typography.js +1 -1
  215. package/package.json +8 -8
  216. package/types/src/notification/$notification.d.ts +1 -0
  217. package/types/src/sheet/hook.d.ts +1 -1
  218. package/types/src/sheet/index.d.ts +0 -2
  219. package/types/src/surface/surface.d.ts +1 -0
  220. package/types/src/theme/theme.format.d.ts +7 -1
  221. package/dist/outlet-BDkD7_9L.cjs.map +0 -1
  222. package/dist/outlet-Bc4MC45j.js.map +0 -1
  223. package/dist/sheet-CJ6kO7WG.cjs +0 -48
  224. package/dist/sheet-CJ6kO7WG.cjs.map +0 -1
  225. package/dist/sheet-CoO8bSHc.js +0 -195
  226. package/dist/sheet-CoO8bSHc.js.map +0 -1
  227. package/dist/surface-DKrkxarv.cjs +0 -14
  228. package/dist/surface-DKrkxarv.cjs.map +0 -1
  229. package/dist/surface-DlwQilPV.js +0 -40
  230. package/dist/surface-DlwQilPV.js.map +0 -1
  231. package/dist/theme.component-78M08LUD.cjs +0 -3
@@ -1 +0,0 @@
1
- {"version":3,"file":"outlet-Bc4MC45j.js","sources":["../src/notification/$notification.ts","../src/notification/notification.ts","../src/notification/outlet.ts"],"sourcesContent":["import { Subject, buffer, debounceTime, fromEvent, race, timer } from 'rxjs'\nimport { SchmancyNotification } from './notification'\n\nexport type TNotification = 'success' | 'error' | 'warning' | 'info'\nexport type TNotificationConfig = {\n action?: typeof Function\n duration?: number\n}\n\nfunction createNotificationComponent(message, type) {\n const notificationComponent = document.createElement('schmancy-notification')\n notificationComponent.setAttribute('type', type)\n notificationComponent.innerHTML = message\n return notificationComponent\n}\nconst $notifications = new Subject<{\n component: SchmancyNotification\n config?: TNotificationConfig\n}>()\nexport const $notify = {\n success: (message: string, config?: TNotificationConfig) => {\n const component = createNotificationComponent(message, 'success')\n $notifications.next({ component, config })\n return component\n },\n error: (message: string, config?: TNotificationConfig) => {\n const component = createNotificationComponent(message, 'error')\n $notifications.next({ component, config })\n return component\n },\n warning: (message: string, config?: TNotificationConfig) => {\n const component = createNotificationComponent(message, 'warning')\n $notifications.next({ component, config })\n return component\n },\n info: (message: string, config?: TNotificationConfig) => {\n const component = createNotificationComponent(message, 'info')\n $notifications.next({ component, config })\n return component\n }\n}\n\n$notifications.pipe(buffer($notifications.pipe(debounceTime(1000)))).subscribe((notifications) => {\n if (notifications.length > 1) {\n const notification = notifications[notifications.length - 1]\n $notifications.next({ component: notification.component, config: notification.config })\n }\n})\n$notifications.subscribe(({ component, config }) => {\n document.body?.appendChild(component)\n race(fromEvent(component, 'close'), timer(config?.duration ?? 3000)).subscribe(() => {\n component.remove()\n })\n})\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n@customElement('schmancy-notification')\nexport class SchmancyNotification extends TailwindElement() {\n\t@property({ type: String })\n\ttype: 'success' | 'error' | 'warning' | 'info' = 'success'\n\n\trender() {\n\t\treturn html`\n\t\t\t<div\n\t\t\t\taria-live=\"assertive\"\n\t\t\t\tclass=\"pointer-events-none z-100 fixed inset-0 flex items-end px-4 py-6 sm:items-start sm:p-6\"\n\t\t\t>\n\t\t\t\t<div class=\"flex w-full flex-col items-center space-y-4 sm:items-end\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-surface-container shadow-lg ring-1 ring-outlineVariant ring-opacity-5\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div class=\"p-2\">\n\t\t\t\t\t\t\t<div class=\"flex items-center\">\n\t\t\t\t\t\t\t\t<div class=\"shrink-0\">\n\t\t\t\t\t\t\t\t\t${this.type === 'success'\n\t\t\t\t\t\t\t\t\t\t? html` <svg\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-6 w-6 text-success-default\"\n\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"1.5\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</svg>`\n\t\t\t\t\t\t\t\t\t\t: html` <svg\n\t\t\t\t\t\t\t\t\t\t\t\tclass=\"h-6 w-6 text-error-default\"\n\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"1.5\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</svg>`}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"ml-3 w-0 flex-1 pt-0.5\">\n\t\t\t\t\t\t\t\t\t<p class=\" text-sm \">\n\t\t\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"ml-4 flex shrink-0\">\n\t\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\t\t\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<span class=\"sr-only\">Close</span>\n\t\t\t\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-notification': SchmancyNotification\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-notification-outlet')\nexport class SchmancyNotificationOutlet extends TailwindElement() {\n\trender() {\n\t\treturn html` <slot></slot> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-notification-outlet': SchmancyNotificationOutlet\n\t}\n}\n"],"names":["createNotificationComponent","message","type","notificationComponent","document","createElement","setAttribute","innerHTML","$notifications","Subject","$notify","success","config","component","next","error","warning","info","pipe","buffer","debounceTime","subscribe","notifications","length","notification","body","appendChild","race","fromEvent","timer","duration","remove","SchmancyNotification","TailwindElement","super","arguments","this","html","dispatchEvent","CustomEvent","__decorateClass","property","String","prototype","customElement","SchmancyNotificationOutlet"],"mappings":";;;;;;AASA,SAASA,EAA4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,GAAW,UAAUgB,GAAMjB,KAAAA,gBAAAA,EAAQkB,aAAY,GAAA,CAAA,EAAOT,UAAU,MAAA;AAC7ER,IAAAA,EAAUkB,OAAO;AAAA,EAAA,CAAA;AAClB;;;;;AChDU,IAAAC,IAAN,cAAmCC,EAAnC,EAAA;AAAA,EAAA,cAAAC;AAAAA,UAAAA,GAAAC,SAE2CC,GAAAA,KAAAlC,OAAA;AAAA,EAAA;AAAA,EAEjD,SACQ;AAAA,WAAAmC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,WAYED,KAAKlC,SAAS,YACbmC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,qBAcAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;;;;;;;;;;mBAuBO,MAAA;AACRD,WAAKE,cAAc,IAAIC,YAAY,OAAQ,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAC3C;AAAA;AAvDVC,EAAA,CADCC,EAAS,EAAEvC,MAAMwC,OAAAA,CAAAA,CAAAA,GADNV,EAEZW,WAAA,QAAA,CAFYX,GAAAA,IAANQ,EAAA,CADNI,EAAc,2BACFZ;;ACCA,IAAAa,IAAN,cAAyCZ,EAC/C,EAAA;AAAA,EAAA;AACQ,WAAAI;AAAAA,EAAA;AAAA;AAFIQ;;;GAAN,CADND,EAAc,8BACFC,CAAAA,GAAAA,CAAAA;"}
@@ -1,48 +0,0 @@
1
- "use strict";const s=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const E=require("./tailwind.mixin-mhYVlkxs.cjs"),d=require("lit"),c=require("lit/decorators.js"),S=require("./litElement.mixin-Cw40wOLl.cjs");var k=Object.defineProperty,x=Object.getOwnPropertyDescriptor,f=(t,e,i,n)=>{for(var r,o=n>1?void 0:n?x(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n?r(e,i,o):r(o))||o);return n&&o&&k(e,i,o),o};let y=class extends E.TailwindElement(d.css`
2
- :host {
3
- inset: 0;
4
- display: block;
5
- padding-bottom: 16px;
6
- }
7
- `){render(){const t={absolute:this.title.length===0,relative:this.title.length>0};return d.html`
8
- <schmancy-grid class="${this.classMap(t)}" align="center" justify="stretch" cols="auto 1fr auto">
9
- <slot name="back">
10
- <schmancy-button
11
- @click=${()=>{this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))}}
12
- >
13
- <span class="text-[24px]">&#8592; </span>
14
- </schmancy-button>
15
- </slot>
16
- <schmancy-typography transform="capitalize" type="headline" token="lg"> ${this.title} </schmancy-typography>
17
- <slot name="actions">
18
- <schmancy-button
19
- @click=${()=>{this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))}}
20
- >
21
- <span class="text-[24px]">✕</span>
22
- </schmancy-button>
23
- </slot>
24
- </schmancy-grid>
25
- `}};function g(t,e){return(i,n)=>{const{willUpdate:r}=i;e=Object.assign({waitUntilFirstUpdate:!1},e),i.willUpdate=function(o){if(r.call(this,o),o.has(t)){const a=o.get(t),v=this[t];a!==v&&(e!=null&&e.waitUntilFirstUpdate&&!this.hasUpdated||this[n].call(this,a,v))}}}}f([c.property()],y.prototype,"title",2),y=f([c.customElement("schmancy-sheet-header")],y);var C=Object.defineProperty,F=Object.getOwnPropertyDescriptor;let w=class extends E.TailwindElement(){render(){return d.html`
26
- <div tabindex="0">
27
- <slot></slot>
28
- </div>
29
- `}};w=((t,e,i,n)=>{for(var r,o=n>1?void 0:n?F(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n?r(e,i,o):r(o))||o);return n&&o&&C(e,i,o),o})([c.customElement("schmancy-sheet-content")],w);var b=(t=>(t.Side="side",t.Bottom="bottom",t.BottomCenter="bottom-center",t.TopRight="top-right",t.BottomRight="bottom-right",t))(b||{});const u="are-you-there-sheet",m="yes-here",p=new class{constructor(){this.bottomSheet=new s.Subject,this.$dismiss=new s.Subject,this.bottomSheet.pipe(s.switchMap(t=>s.forkJoin([s.fromEvent(window,m).pipe(s.takeUntil(s.timer(0)),s.map(e=>e.detail.sheet),s.defaultIfEmpty(void 0)),s.of(t).pipe(s.tap(()=>{window.dispatchEvent(new CustomEvent(u,{detail:{uid:t.uid??t.component.tagName}}))}))])),s.map(([t,e])=>(t||(t=document.createElement("schmancy-sheet"),document.body.appendChild(t)),t.setAttribute("uid",e.uid??e.component.tagName),t.setAttribute("position",e.position??"bottom"),t.setAttribute("allowOverlyDismiss",e.allowOverlyDismiss===!1?"false":"true"),e.title&&t.setAttribute("title",e.title),e.persist&&t.setAttribute("persist",e.persist??!1),e.header&&t.setAttribute("header",e.header),document.body.style.overflow="hidden",{target:e,sheet:t})),s.delay(20),s.filter(({target:t,sheet:e})=>{var i,n;return!t.persist||!((n=(i=e==null?void 0:e.shadowRoot)==null?void 0:i.querySelector("slot"))!=null&&n.assignedElements().find(r=>r.tagName===t.component.tagName))||(e==null||e.setAttribute("open","true"),!1)}),s.tap(({target:t,sheet:e})=>{e==null||e.appendChild(t.component)}),s.delay(1),s.tap(({sheet:t})=>{t==null||t.setAttribute("open","true")}),s.tap(({sheet:t})=>{s.fromEvent(t,"close").pipe(s.take(1)).pipe(s.delay(300)).subscribe(e=>{const i=e.target;i!=null&&i.persist||(i==null||i.remove()),document.body.style.overflow="auto"})})).subscribe(),this.$dismiss.pipe(s.mergeMap(t=>s.forkJoin([s.fromEvent(window,m).pipe(s.takeUntil(s.timer(100)),s.map(e=>e.detail.sheet),s.defaultIfEmpty(void 0)),s.of(t).pipe(s.tap(()=>{window.dispatchEvent(new CustomEvent(u,{detail:{uid:t}}))}))])),s.tap(([t])=>{t==null||t.closeSheet()})).subscribe()}dismiss(t){this.$dismiss.next(t)}open(t){this.bottomSheet.next(t)}};var O=Object.defineProperty,A=Object.getOwnPropertyDescriptor,l=(t,e,i,n)=>{for(var r,o=n>1?void 0:n?A(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n?r(e,i,o):r(o))||o);return n&&o&&O(e,i,o),o};let h=class extends S.$LitElement(":host{--overlay-color: var(--schmancy-sys-color-surface-dim);--transition-duration: .2s;--sheet-radius: 0;--max-height: 100vh}.sheet{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;visibility:visible;transition:visibility var(--transition-duration) ease-in-out}.sheet[aria-hidden=true]{visibility:hidden;pointer-events:none}.sheet[aria-hidden=true] .content{transform:translateY(100%)}.sheet[aria-hidden=true] .content[data-position=side]{transform:translate(100%)}.sheet[aria-hidden=true] .overlay{opacity:0}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--overlay-color);opacity:.4;transition:opacity var(--transition-duration) ease-in-out}.content{z-index:1;background-color:var(--schmancy-sys-color-surface-container);transition:transform var(--transition-duration) ease-in-out}.content[data-position=side]{height:100%;margin-left:auto;min-width:320px;max-width:90vw;width:fit-content}.content[data-position=bottom]{width:100%;margin-top:auto;border-radius:16px 16px 0 0;max-height:90vh}"){constructor(){super(...arguments),this.open=!1,this.header="visible",this.position=b.Side,this.persist=!1,this.allowOverlayDismiss=!0,this.title="",this.focusAttribute="autofocus",this.lastFocusedElement=null,this.handleFocusIn=t=>{var e;(e=this.sheet)!=null&&e.contains(t.target)||this.focus()}}onOpenChange(t,e){var i;this.setIsSheetShown(e),e?(this.lastFocusedElement=document.activeElement,this.addFocusTrap(),this.focus()):(this.removeFocusTrap(),(i=this.lastFocusedElement)==null||i.focus(),this.lastFocusedElement=null)}connectedCallback(){super.connectedCallback(),this.setupEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.disconnecting.next(!0)}setupEventListeners(){const t=s.fromEvent(window,"popstate").pipe(s.tap(n=>{n.preventDefault(),this.closeSheet()})),e=s.fromEvent(window,"keyup").pipe(s.tap(n=>{n.key!=="Escape"||this.sheetContainsFocus()||p.dismiss(this.uid)})),i=s.fromEvent(window,u).pipe(s.tap(n=>{n.detail.uid===this.uid&&this.announcePresence()}));s.merge(t,e,i).pipe(s.takeUntil(this.disconnecting)).subscribe()}sheetContainsFocus(){var t;return((t=this.sheet)==null?void 0:t.contains(document.activeElement))??!1}announcePresence(){this.dispatchEvent(new CustomEvent(m,{detail:{sheet:this},bubbles:!0,composed:!0}))}addFocusTrap(){document.addEventListener("focusin",this.handleFocusIn)}removeFocusTrap(){document.removeEventListener("focusin",this.handleFocusIn)}setIsSheetShown(t){var e,i;(e=this.sheet)==null||e.setAttribute("aria-hidden",String(!t)),(i=this.sheet)==null||i.setAttribute("aria-modal",String(t))}closeSheet(){this.open=!1,this.dispatchEvent(new CustomEvent("close"))}getFocusElement(){const t=`[${this.focusAttribute}]`;return this.assignedElements.find(e=>e.matches(t)||e.querySelector(t))??null}focus(){var t;(t=this.getFocusElement())==null||t.focus()}render(){return d.html`
30
- <schmancy-theme>
31
- <div class="sheet" role="dialog" aria-labelledby="sheet-title" aria-hidden="true" aria-modal="false">
32
- <div
33
- class="overlay"
34
- @click=${t=>{t.stopPropagation(),this.allowOverlayDismiss&&p.dismiss(this.uid)}}
35
- ></div>
36
- <schmancy-sheet-content class="content" data-position=${this.position}>
37
- <schmancy-sheet-header
38
- @dismiss=${t=>{t.stopPropagation(),p.dismiss(this.uid)}}
39
- id="sheet-title"
40
- .hidden=${this.header==="hidden"}
41
- title=${this.title}
42
- ></schmancy-sheet-header>
43
- <slot></slot>
44
- </schmancy-sheet-content>
45
- </div>
46
- </schmancy-theme>
47
- `}};l([c.property({type:String,reflect:!0})],h.prototype,"uid",2),l([c.property({type:Boolean,reflect:!0})],h.prototype,"open",2),l([c.property({type:String,reflect:!0})],h.prototype,"header",2),l([c.property({type:String,reflect:!0})],h.prototype,"position",2),l([c.property({type:Boolean,reflect:!0})],h.prototype,"persist",2),l([c.property({type:Boolean,reflect:!0})],h.prototype,"allowOverlayDismiss",2),l([c.property({type:String,reflect:!0})],h.prototype,"title",2),l([c.query(".sheet")],h.prototype,"sheet",2),l([c.queryAssignedElements({flatten:!0})],h.prototype,"assignedElements",2),l([c.property()],h.prototype,"focusAttribute",2),l([g("open")],h.prototype,"onOpenChange",1),h=l([c.customElement("schmancy-sheet")],h),exports.SchmancySheetPosition=b,exports.SheetHereMorty=m,exports.SheetWhereAreYouRicky=u,exports.hook=g,exports.sheet=p;
48
- //# sourceMappingURL=sheet-CJ6kO7WG.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sheet-CJ6kO7WG.cjs","sources":["../src/sheet/header.ts","../src/sheet/hook.ts","../src/sheet/sheet-content.ts","../src/sheet/sheet.service.ts","../src/sheet/sheet.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css`\n\t:host {\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\tpadding-bottom: 16px;\n\t}\n`) {\n\t@property() title: string\n\trender() {\n\t\tconst classes = {\n\t\t\tabsolute: this.title.length === 0,\n\t\t\trelative: this.title.length > 0,\n\t\t}\n\t\treturn html`\n\t\t\t<schmancy-grid class=\"${this.classMap(classes)}\" align=\"center\" justify=\"stretch\" cols=\"auto 1fr auto\">\n\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"text-[24px]\">&#8592; </span>\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</slot>\n\t\t\t\t<schmancy-typography transform=\"capitalize\" type=\"headline\" token=\"lg\"> ${this.title} </schmancy-typography>\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"text-[24px]\">✕</span>\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n waitUntilFirstUpdate?: boolean\n}\n\nexport function hook(propName: string, options?: WatchOptions) {\n return (protoOrDescriptor: any, name: string): any => {\n const { willUpdate } = protoOrDescriptor\n\n options = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n protoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n willUpdate.call(this, changedProps)\n\n if (changedProps.has(propName)) {\n const oldValue = changedProps.get(propName)\n const newValue = this[propName]\n\n if (oldValue !== newValue) {\n if (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n this[name].call(this, oldValue, newValue)\n }\n }\n }\n }\n }\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-content')\nexport default class SchmancySheetContent extends TailwindElement() {\n\trender() {\n\t\treturn html`\n\t\t\t<div tabindex=\"0\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-content': SchmancySheetContent\n\t}\n}\n","import {\n\tdefaultIfEmpty,\n\tdelay,\n\tfilter,\n\tforkJoin,\n\tfromEvent,\n\tmap,\n\tmergeMap,\n\tof,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimer,\n} from 'rxjs'\nimport SchmancySheet from './sheet'\n\nexport enum SchmancySheetPosition {\n\tSide = 'side',\n\tBottom = 'bottom',\n\t/**\n\t * @deprecated use bottom instead\n\t */\n\tBottomCenter = 'bottom-center',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tTopRight = 'top-right',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tBottomRight = 'bottom-right',\n}\n\ntype BottomSheeetTarget = {\n\tcomponent: HTMLElement\n\tuid?: string\n\tposition?: SchmancySheetPosition\n\tpersist?: boolean\n\tclose?: () => void\n\tallowOverlyDismiss?: boolean\n\ttitle?: string\n\theader?: 'hidden' | 'visible'\n}\n\n// Events for communication between bottom-sheet component and bottom-sheet.service\nexport type SheetWhereAreYouRickyEvent = CustomEvent<{\n\tuid: string\n}>\nexport const SheetWhereAreYouRicky = 'are-you-there-sheet'\n\nexport type SheetHereMortyEvent = CustomEvent<{\n\tsheet: SchmancySheet\n}>\nexport const SheetHereMorty = 'yes-here'\nclass BottomSheetService {\n\tbottomSheet = new Subject<BottomSheeetTarget>()\n\t$dismiss = new Subject<string>()\n\tconstructor() {\n\t\tthis.bottomSheet\n\t\t\t.pipe(\n\t\t\t\tswitchMap(target =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(0)),\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(target).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(SheetWhereAreYouRicky, {\n\t\t\t\t\t\t\t\t\t\tdetail: { uid: target.uid ?? target.component.tagName },\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\tmap(([sheet, target]) => {\n\t\t\t\t\tconsole.log(sheet, target)\n\t\t\t\t\tif (!sheet) {\n\t\t\t\t\t\t// if sheet is not found, create it\n\t\t\t\t\t\tsheet = document.createElement('schmancy-sheet')\n\t\t\t\t\t\tdocument.body.appendChild(sheet)\n\t\t\t\t\t}\n\t\t\t\t\tsheet.setAttribute('uid', target.uid ?? target.component.tagName)\n\t\t\t\t\tsheet.setAttribute('position', target.position ?? SchmancySheetPosition.Bottom)\n\t\t\t\t\tsheet.setAttribute('allowOverlyDismiss', target.allowOverlyDismiss === false ? 'false' : 'true')\n\t\t\t\t\ttarget.title && sheet.setAttribute('title', target.title)\n\t\t\t\t\ttarget.persist && sheet.setAttribute('persist', target.persist ?? false)\n\t\t\t\t\ttarget.header && sheet.setAttribute('header', target.header)\n\t\t\t\t\tdocument.body.style.overflow = 'hidden' // lock the scroll of the host\n\t\t\t\t\treturn { target, sheet }\n\t\t\t\t}),\n\t\t\t\tdelay(20),\n\t\t\t\tfilter(({ target, sheet }) => {\n\t\t\t\t\t// if the sheet has already the component, just show it\n\t\t\t\t\tif (\n\t\t\t\t\t\ttarget.persist &&\n\t\t\t\t\t\tsheet?.shadowRoot\n\t\t\t\t\t\t\t?.querySelector('slot')\n\t\t\t\t\t\t\t?.assignedElements()\n\t\t\t\t\t\t\t.find(e => e.tagName === target.component.tagName)\n\t\t\t\t\t) {\n\t\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t\t\treturn false\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true // if the sheet does not have the component, continue to the next step\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\tsheet?.appendChild(target.component)\n\t\t\t\t}),\n\t\t\t\tdelay(1),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t}),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tfromEvent<CustomEvent>(sheet, 'close')\n\t\t\t\t\t\t.pipe(take(1))\n\t\t\t\t\t\t.pipe(delay(300))\n\t\t\t\t\t\t.subscribe(e => {\n\t\t\t\t\t\t\tconst target = e.target as SchmancySheet\n\t\t\t\t\t\t\tconsole.log(target)\n\n\t\t\t\t\t\t\tif (!target?.persist) target?.remove()\n\t\t\t\t\t\t\tdocument.body.style.overflow = 'auto' // unlock the scroll of the host\n\t\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tthis.$dismiss\n\t\t\t.pipe(\n\t\t\t\tmergeMap(uid =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)), // Some people say why 10? I say why not?\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(uid).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(new CustomEvent(SheetWhereAreYouRicky, { detail: { uid } }))\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\ttap(([sheet]) => {\n\t\t\t\t\tsheet?.closeSheet()\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tdismiss(uid: string) {\n\t\tthis.$dismiss.next(uid)\n\t}\n\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n}\nexport const sheet = new BottomSheetService()\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { fromEvent, merge, takeUntil, tap } from 'rxjs'\nimport { hook } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) allowOverlayDismiss = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t@query('.sheet') private sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@hook('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tthis.setIsSheetShown(newValue)\n\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\tthis.addFocusTrap()\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.removeFocusTrap()\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button\n\t\tconst popState$ = fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\ttap(e => {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.closeSheet()\n\t\t\t}),\n\t\t)\n\n\t\t// Handle ESC key\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(window, 'keyup').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.sheetContainsFocus()) {\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid) this.announcePresence()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate sheetContainsFocus(): boolean {\n\t\treturn this.sheet?.contains(document.activeElement) ?? false\n\t}\n\n\tprivate announcePresence() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\tdetail: { sheet: this },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate addFocusTrap() {\n\t\tdocument.addEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate removeFocusTrap() {\n\t\tdocument.removeEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate handleFocusIn = (e: Event) => {\n\t\tif (!this.sheet?.contains(e.target as Node)) {\n\t\t\tthis.focus()\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheet?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheet?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-theme>\n\t\t\t\t<div class=\"sheet\" role=\"dialog\" aria-labelledby=\"sheet-title\" aria-hidden=\"true\" aria-modal=\"false\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"overlay\"\n\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\tif (this.allowOverlayDismiss) sheet.dismiss(this.uid)\n\t\t\t\t\t\t}}\n\t\t\t\t\t></div>\n\t\t\t\t\t<schmancy-sheet-content class=\"content\" data-position=${this.position}>\n\t\t\t\t\t\t<schmancy-sheet-header\n\t\t\t\t\t\t\t@dismiss=${(e: CustomEvent) => {\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t.hidden=${this.header === 'hidden'}\n\t\t\t\t\t\t\ttitle=${this.title}\n\t\t\t\t\t\t></schmancy-sheet-header>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</schmancy-sheet-content>\n\t\t\t\t</div>\n\t\t\t</schmancy-theme>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","classes","absolute","this","title","length","relative","html","classMap","dispatchEvent","CustomEvent","bubbles","composed","hook","propName","options","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","newValue","hasUpdated","__decorateClass","property","prototype","customElement","SchmancySheetContent","SchmancySheetPosition","SheetWhereAreYouRicky","SheetHereMorty","sheet","bottomSheet","Subject","$dismiss","pipe","switchMap","forkJoin","fromEvent","window","takeUntil","timer","map","e","detail","defaultIfEmpty","undefined","of","target","tap","uid","component","tagName","document","createElement","body","appendChild","setAttribute","position","allowOverlyDismiss","persist","header","style","overflow","delay","filter","shadowRoot","querySelector","assignedElements","find","take","subscribe","remove","mergeMap","closeSheet","next","SchmancySheet","$LitElement","super","arguments","open","Side","allowOverlayDismiss","focusAttribute","lastFocusedElement","handleFocusIn","contains","focus","_oldValue","setIsSheetShown","activeElement","addFocusTrap","removeFocusTrap","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","popState$","preventDefault","keyUp$","event","key","sheetContainsFocus","dismiss","rickyComm$","announcePresence","merge","addEventListener","removeEventListener","isShown","String","selector","el","matches","getFocusElement","stopPropagation","type","reflect","Boolean","query","queryAssignedElements","flatten"],"mappings":"icAKA,IAAqBA,EAArB,cAAiDC,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAQhE,CAAA,CAAA,SACC,MAAMC,EAAU,CACfC,SAAUC,KAAKC,MAAMC,SAAW,EAChCC,SAAUH,KAAKC,MAAMC,OAAS,CAExB,EAAA,OAAAE,EAAAA;AAAAA,2BACkBJ,KAAKK,SAASP,CAAAA,CAAAA;AAAAA;AAAAA;AAAAA,eAG1B,IACHE,CAAAA,KAAAM,cACJ,IAAIC,YAAY,UAAW,CAC1BC,QAAAA,GACAC,SAAAA,EAEF,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8EAMuET,KAAKC,KAAAA;AAAAA;AAAAA;AAAAA,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CF,EAAA,CAAXC,EAASA,SAAAA,CAAAA,EAZUoD,EAYRnD,UAAA,iBAAA,CAIZF,EAAAA,EAAA,CADChB,EAAK,SAfcqE,EAgBpBnD,UAAA,eAAA,CAAA,EAhBoBmD,EAArBrD,EAAA,CADCG,EAAAA,cAAc,gBACMkD,CAAAA,EAAAA,CAAAA"}
@@ -1,195 +0,0 @@
1
- import { Subject as x, switchMap as j, forkJoin as S, fromEvent as d, takeUntil as b, timer as k, map as p, defaultIfEmpty as C, of as F, tap as l, delay as u, filter as D, take as U, mergeMap as B, merge as I } from "rxjs";
2
- import "lit/directives/class-map.js";
3
- import "lit/directives/style-map.js";
4
- import { T as $ } from "./tailwind.mixin-wwBoa4Jw.js";
5
- import { css as T, html as f } from "lit";
6
- import { property as h, customElement as w, query as L, queryAssignedElements as q } from "lit/decorators.js";
7
- import { $ as z } from "./litElement.mixin-CJYb3izk.js";
8
- var N = Object.defineProperty, M = Object.getOwnPropertyDescriptor, O = (t, e, s, o) => {
9
- for (var n, i = o > 1 ? void 0 : o ? M(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
10
- return o && i && N(e, s, i), i;
11
- };
12
- let m = class extends $(T`
13
- :host {
14
- inset: 0;
15
- display: block;
16
- padding-bottom: 16px;
17
- }
18
- `) {
19
- render() {
20
- const t = { absolute: this.title.length === 0, relative: this.title.length > 0 };
21
- return f`
22
- <schmancy-grid class="${this.classMap(t)}" align="center" justify="stretch" cols="auto 1fr auto">
23
- <slot name="back">
24
- <schmancy-button
25
- @click=${() => {
26
- this.dispatchEvent(new CustomEvent("dismiss", { bubbles: !0, composed: !0 }));
27
- }}
28
- >
29
- <span class="text-[24px]">&#8592; </span>
30
- </schmancy-button>
31
- </slot>
32
- <schmancy-typography transform="capitalize" type="headline" token="lg"> ${this.title} </schmancy-typography>
33
- <slot name="actions">
34
- <schmancy-button
35
- @click=${() => {
36
- this.dispatchEvent(new CustomEvent("dismiss", { bubbles: !0, composed: !0 }));
37
- }}
38
- >
39
- <span class="text-[24px]">✕</span>
40
- </schmancy-button>
41
- </slot>
42
- </schmancy-grid>
43
- `;
44
- }
45
- };
46
- function R(t, e) {
47
- return (s, o) => {
48
- const { willUpdate: n } = s;
49
- e = Object.assign({ waitUntilFirstUpdate: !1 }, e), s.willUpdate = function(i) {
50
- if (n.call(this, i), i.has(t)) {
51
- const a = i.get(t), E = this[t];
52
- a !== E && (e != null && e.waitUntilFirstUpdate && !this.hasUpdated || this[o].call(this, a, E));
53
- }
54
- };
55
- };
56
- }
57
- O([h()], m.prototype, "title", 2), m = O([w("schmancy-sheet-header")], m);
58
- var J = Object.defineProperty, Y = Object.getOwnPropertyDescriptor;
59
- let A = class extends $() {
60
- render() {
61
- return f`
62
- <div tabindex="0">
63
- <slot></slot>
64
- </div>
65
- `;
66
- }
67
- };
68
- A = ((t, e, s, o) => {
69
- for (var n, i = o > 1 ? void 0 : o ? Y(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
70
- return o && i && J(e, s, i), i;
71
- })([w("schmancy-sheet-content")], A);
72
- var P = ((t) => (t.Side = "side", t.Bottom = "bottom", t.BottomCenter = "bottom-center", t.TopRight = "top-right", t.BottomRight = "bottom-right", t))(P || {});
73
- const v = "are-you-there-sheet", g = "yes-here", y = new class {
74
- constructor() {
75
- this.bottomSheet = new x(), this.$dismiss = new x(), this.bottomSheet.pipe(j((t) => S([d(window, g).pipe(b(k(0)), p((e) => e.detail.sheet), C(void 0)), F(t).pipe(l(() => {
76
- window.dispatchEvent(new CustomEvent(v, { detail: { uid: t.uid ?? t.component.tagName } }));
77
- }))])), p(([t, e]) => (t || (t = document.createElement("schmancy-sheet"), document.body.appendChild(t)), t.setAttribute("uid", e.uid ?? e.component.tagName), t.setAttribute("position", e.position ?? "bottom"), t.setAttribute("allowOverlyDismiss", e.allowOverlyDismiss === !1 ? "false" : "true"), e.title && t.setAttribute("title", e.title), e.persist && t.setAttribute("persist", e.persist ?? !1), e.header && t.setAttribute("header", e.header), document.body.style.overflow = "hidden", { target: e, sheet: t })), u(20), D(({ target: t, sheet: e }) => {
78
- var s, o;
79
- return !t.persist || !((o = (s = e == null ? void 0 : e.shadowRoot) == null ? void 0 : s.querySelector("slot")) != null && o.assignedElements().find((n) => n.tagName === t.component.tagName)) || (e == null || e.setAttribute("open", "true"), !1);
80
- }), l(({ target: t, sheet: e }) => {
81
- e == null || e.appendChild(t.component);
82
- }), u(1), l(({ sheet: t }) => {
83
- t == null || t.setAttribute("open", "true");
84
- }), l(({ sheet: t }) => {
85
- d(t, "close").pipe(U(1)).pipe(u(300)).subscribe((e) => {
86
- const s = e.target;
87
- s != null && s.persist || (s == null || s.remove()), document.body.style.overflow = "auto";
88
- });
89
- })).subscribe(), this.$dismiss.pipe(B((t) => S([d(window, g).pipe(b(k(100)), p((e) => e.detail.sheet), C(void 0)), F(t).pipe(l(() => {
90
- window.dispatchEvent(new CustomEvent(v, { detail: { uid: t } }));
91
- }))])), l(([t]) => {
92
- t == null || t.closeSheet();
93
- })).subscribe();
94
- }
95
- dismiss(t) {
96
- this.$dismiss.next(t);
97
- }
98
- open(t) {
99
- this.bottomSheet.next(t);
100
- }
101
- }();
102
- var G = Object.defineProperty, H = Object.getOwnPropertyDescriptor, c = (t, e, s, o) => {
103
- for (var n, i = o > 1 ? void 0 : o ? H(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
104
- return o && i && G(e, s, i), i;
105
- };
106
- let r = class extends z(":host{--overlay-color: var(--schmancy-sys-color-surface-dim);--transition-duration: .2s;--sheet-radius: 0;--max-height: 100vh}.sheet{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;visibility:visible;transition:visibility var(--transition-duration) ease-in-out}.sheet[aria-hidden=true]{visibility:hidden;pointer-events:none}.sheet[aria-hidden=true] .content{transform:translateY(100%)}.sheet[aria-hidden=true] .content[data-position=side]{transform:translate(100%)}.sheet[aria-hidden=true] .overlay{opacity:0}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--overlay-color);opacity:.4;transition:opacity var(--transition-duration) ease-in-out}.content{z-index:1;background-color:var(--schmancy-sys-color-surface-container);transition:transform var(--transition-duration) ease-in-out}.content[data-position=side]{height:100%;margin-left:auto;min-width:320px;max-width:90vw;width:fit-content}.content[data-position=bottom]{width:100%;margin-top:auto;border-radius:16px 16px 0 0;max-height:90vh}") {
107
- constructor() {
108
- super(...arguments), this.open = !1, this.header = "visible", this.position = P.Side, this.persist = !1, this.allowOverlayDismiss = !0, this.title = "", this.focusAttribute = "autofocus", this.lastFocusedElement = null, this.handleFocusIn = (t) => {
109
- var e;
110
- (e = this.sheet) != null && e.contains(t.target) || this.focus();
111
- };
112
- }
113
- onOpenChange(t, e) {
114
- var s;
115
- this.setIsSheetShown(e), e ? (this.lastFocusedElement = document.activeElement, this.addFocusTrap(), this.focus()) : (this.removeFocusTrap(), (s = this.lastFocusedElement) == null || s.focus(), this.lastFocusedElement = null);
116
- }
117
- connectedCallback() {
118
- super.connectedCallback(), this.setupEventListeners();
119
- }
120
- disconnectedCallback() {
121
- super.disconnectedCallback(), this.disconnecting.next(!0);
122
- }
123
- setupEventListeners() {
124
- const t = d(window, "popstate").pipe(l((o) => {
125
- o.preventDefault(), this.closeSheet();
126
- })), e = d(window, "keyup").pipe(l((o) => {
127
- o.key !== "Escape" || this.sheetContainsFocus() || y.dismiss(this.uid);
128
- })), s = d(window, v).pipe(l((o) => {
129
- o.detail.uid === this.uid && this.announcePresence();
130
- }));
131
- I(t, e, s).pipe(b(this.disconnecting)).subscribe();
132
- }
133
- sheetContainsFocus() {
134
- var t;
135
- return ((t = this.sheet) == null ? void 0 : t.contains(document.activeElement)) ?? !1;
136
- }
137
- announcePresence() {
138
- this.dispatchEvent(new CustomEvent(g, { detail: { sheet: this }, bubbles: !0, composed: !0 }));
139
- }
140
- addFocusTrap() {
141
- document.addEventListener("focusin", this.handleFocusIn);
142
- }
143
- removeFocusTrap() {
144
- document.removeEventListener("focusin", this.handleFocusIn);
145
- }
146
- setIsSheetShown(t) {
147
- var e, s;
148
- (e = this.sheet) == null || e.setAttribute("aria-hidden", String(!t)), (s = this.sheet) == null || s.setAttribute("aria-modal", String(t));
149
- }
150
- closeSheet() {
151
- this.open = !1, this.dispatchEvent(new CustomEvent("close"));
152
- }
153
- getFocusElement() {
154
- const t = `[${this.focusAttribute}]`;
155
- return this.assignedElements.find((e) => e.matches(t) || e.querySelector(t)) ?? null;
156
- }
157
- focus() {
158
- var t;
159
- (t = this.getFocusElement()) == null || t.focus();
160
- }
161
- render() {
162
- return f`
163
- <schmancy-theme>
164
- <div class="sheet" role="dialog" aria-labelledby="sheet-title" aria-hidden="true" aria-modal="false">
165
- <div
166
- class="overlay"
167
- @click=${(t) => {
168
- t.stopPropagation(), this.allowOverlayDismiss && y.dismiss(this.uid);
169
- }}
170
- ></div>
171
- <schmancy-sheet-content class="content" data-position=${this.position}>
172
- <schmancy-sheet-header
173
- @dismiss=${(t) => {
174
- t.stopPropagation(), y.dismiss(this.uid);
175
- }}
176
- id="sheet-title"
177
- .hidden=${this.header === "hidden"}
178
- title=${this.title}
179
- ></schmancy-sheet-header>
180
- <slot></slot>
181
- </schmancy-sheet-content>
182
- </div>
183
- </schmancy-theme>
184
- `;
185
- }
186
- };
187
- c([h({ type: String, reflect: !0 })], r.prototype, "uid", 2), c([h({ type: Boolean, reflect: !0 })], r.prototype, "open", 2), c([h({ type: String, reflect: !0 })], r.prototype, "header", 2), c([h({ type: String, reflect: !0 })], r.prototype, "position", 2), c([h({ type: Boolean, reflect: !0 })], r.prototype, "persist", 2), c([h({ type: Boolean, reflect: !0 })], r.prototype, "allowOverlayDismiss", 2), c([h({ type: String, reflect: !0 })], r.prototype, "title", 2), c([L(".sheet")], r.prototype, "sheet", 2), c([q({ flatten: !0 })], r.prototype, "assignedElements", 2), c([h()], r.prototype, "focusAttribute", 2), c([R("open")], r.prototype, "onOpenChange", 1), r = c([w("schmancy-sheet")], r);
188
- export {
189
- P as S,
190
- v as a,
191
- g as b,
192
- R as h,
193
- y as s
194
- };
195
- //# sourceMappingURL=sheet-CoO8bSHc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sheet-CoO8bSHc.js","sources":["../src/sheet/header.ts","../src/sheet/hook.ts","../src/sheet/sheet-content.ts","../src/sheet/sheet.service.ts","../src/sheet/sheet.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css`\n\t:host {\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\tpadding-bottom: 16px;\n\t}\n`) {\n\t@property() title: string\n\trender() {\n\t\tconst classes = {\n\t\t\tabsolute: this.title.length === 0,\n\t\t\trelative: this.title.length > 0,\n\t\t}\n\t\treturn html`\n\t\t\t<schmancy-grid class=\"${this.classMap(classes)}\" align=\"center\" justify=\"stretch\" cols=\"auto 1fr auto\">\n\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"text-[24px]\">&#8592; </span>\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</slot>\n\t\t\t\t<schmancy-typography transform=\"capitalize\" type=\"headline\" token=\"lg\"> ${this.title} </schmancy-typography>\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"text-[24px]\">✕</span>\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n waitUntilFirstUpdate?: boolean\n}\n\nexport function hook(propName: string, options?: WatchOptions) {\n return (protoOrDescriptor: any, name: string): any => {\n const { willUpdate } = protoOrDescriptor\n\n options = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n protoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n willUpdate.call(this, changedProps)\n\n if (changedProps.has(propName)) {\n const oldValue = changedProps.get(propName)\n const newValue = this[propName]\n\n if (oldValue !== newValue) {\n if (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n this[name].call(this, oldValue, newValue)\n }\n }\n }\n }\n }\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-content')\nexport default class SchmancySheetContent extends TailwindElement() {\n\trender() {\n\t\treturn html`\n\t\t\t<div tabindex=\"0\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-content': SchmancySheetContent\n\t}\n}\n","import {\n\tdefaultIfEmpty,\n\tdelay,\n\tfilter,\n\tforkJoin,\n\tfromEvent,\n\tmap,\n\tmergeMap,\n\tof,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimer,\n} from 'rxjs'\nimport SchmancySheet from './sheet'\n\nexport enum SchmancySheetPosition {\n\tSide = 'side',\n\tBottom = 'bottom',\n\t/**\n\t * @deprecated use bottom instead\n\t */\n\tBottomCenter = 'bottom-center',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tTopRight = 'top-right',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tBottomRight = 'bottom-right',\n}\n\ntype BottomSheeetTarget = {\n\tcomponent: HTMLElement\n\tuid?: string\n\tposition?: SchmancySheetPosition\n\tpersist?: boolean\n\tclose?: () => void\n\tallowOverlyDismiss?: boolean\n\ttitle?: string\n\theader?: 'hidden' | 'visible'\n}\n\n// Events for communication between bottom-sheet component and bottom-sheet.service\nexport type SheetWhereAreYouRickyEvent = CustomEvent<{\n\tuid: string\n}>\nexport const SheetWhereAreYouRicky = 'are-you-there-sheet'\n\nexport type SheetHereMortyEvent = CustomEvent<{\n\tsheet: SchmancySheet\n}>\nexport const SheetHereMorty = 'yes-here'\nclass BottomSheetService {\n\tbottomSheet = new Subject<BottomSheeetTarget>()\n\t$dismiss = new Subject<string>()\n\tconstructor() {\n\t\tthis.bottomSheet\n\t\t\t.pipe(\n\t\t\t\tswitchMap(target =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(0)),\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(target).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(SheetWhereAreYouRicky, {\n\t\t\t\t\t\t\t\t\t\tdetail: { uid: target.uid ?? target.component.tagName },\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\tmap(([sheet, target]) => {\n\t\t\t\t\tconsole.log(sheet, target)\n\t\t\t\t\tif (!sheet) {\n\t\t\t\t\t\t// if sheet is not found, create it\n\t\t\t\t\t\tsheet = document.createElement('schmancy-sheet')\n\t\t\t\t\t\tdocument.body.appendChild(sheet)\n\t\t\t\t\t}\n\t\t\t\t\tsheet.setAttribute('uid', target.uid ?? target.component.tagName)\n\t\t\t\t\tsheet.setAttribute('position', target.position ?? SchmancySheetPosition.Bottom)\n\t\t\t\t\tsheet.setAttribute('allowOverlyDismiss', target.allowOverlyDismiss === false ? 'false' : 'true')\n\t\t\t\t\ttarget.title && sheet.setAttribute('title', target.title)\n\t\t\t\t\ttarget.persist && sheet.setAttribute('persist', target.persist ?? false)\n\t\t\t\t\ttarget.header && sheet.setAttribute('header', target.header)\n\t\t\t\t\tdocument.body.style.overflow = 'hidden' // lock the scroll of the host\n\t\t\t\t\treturn { target, sheet }\n\t\t\t\t}),\n\t\t\t\tdelay(20),\n\t\t\t\tfilter(({ target, sheet }) => {\n\t\t\t\t\t// if the sheet has already the component, just show it\n\t\t\t\t\tif (\n\t\t\t\t\t\ttarget.persist &&\n\t\t\t\t\t\tsheet?.shadowRoot\n\t\t\t\t\t\t\t?.querySelector('slot')\n\t\t\t\t\t\t\t?.assignedElements()\n\t\t\t\t\t\t\t.find(e => e.tagName === target.component.tagName)\n\t\t\t\t\t) {\n\t\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t\t\treturn false\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true // if the sheet does not have the component, continue to the next step\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\tsheet?.appendChild(target.component)\n\t\t\t\t}),\n\t\t\t\tdelay(1),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t}),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tfromEvent<CustomEvent>(sheet, 'close')\n\t\t\t\t\t\t.pipe(take(1))\n\t\t\t\t\t\t.pipe(delay(300))\n\t\t\t\t\t\t.subscribe(e => {\n\t\t\t\t\t\t\tconst target = e.target as SchmancySheet\n\t\t\t\t\t\t\tconsole.log(target)\n\n\t\t\t\t\t\t\tif (!target?.persist) target?.remove()\n\t\t\t\t\t\t\tdocument.body.style.overflow = 'auto' // unlock the scroll of the host\n\t\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tthis.$dismiss\n\t\t\t.pipe(\n\t\t\t\tmergeMap(uid =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)), // Some people say why 10? I say why not?\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(uid).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(new CustomEvent(SheetWhereAreYouRicky, { detail: { uid } }))\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\ttap(([sheet]) => {\n\t\t\t\t\tsheet?.closeSheet()\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tdismiss(uid: string) {\n\t\tthis.$dismiss.next(uid)\n\t}\n\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n}\nexport const sheet = new BottomSheetService()\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { fromEvent, merge, takeUntil, tap } from 'rxjs'\nimport { hook } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) allowOverlayDismiss = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t@query('.sheet') private sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@hook('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tthis.setIsSheetShown(newValue)\n\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\tthis.addFocusTrap()\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.removeFocusTrap()\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button\n\t\tconst popState$ = fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\ttap(e => {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.closeSheet()\n\t\t\t}),\n\t\t)\n\n\t\t// Handle ESC key\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(window, 'keyup').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.sheetContainsFocus()) {\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid) this.announcePresence()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate sheetContainsFocus(): boolean {\n\t\treturn this.sheet?.contains(document.activeElement) ?? false\n\t}\n\n\tprivate announcePresence() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\tdetail: { sheet: this },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate addFocusTrap() {\n\t\tdocument.addEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate removeFocusTrap() {\n\t\tdocument.removeEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate handleFocusIn = (e: Event) => {\n\t\tif (!this.sheet?.contains(e.target as Node)) {\n\t\t\tthis.focus()\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheet?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheet?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-theme>\n\t\t\t\t<div class=\"sheet\" role=\"dialog\" aria-labelledby=\"sheet-title\" aria-hidden=\"true\" aria-modal=\"false\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"overlay\"\n\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\tif (this.allowOverlayDismiss) sheet.dismiss(this.uid)\n\t\t\t\t\t\t}}\n\t\t\t\t\t></div>\n\t\t\t\t\t<schmancy-sheet-content class=\"content\" data-position=${this.position}>\n\t\t\t\t\t\t<schmancy-sheet-header\n\t\t\t\t\t\t\t@dismiss=${(e: CustomEvent) => {\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t.hidden=${this.header === 'hidden'}\n\t\t\t\t\t\t\ttitle=${this.title}\n\t\t\t\t\t\t></schmancy-sheet-header>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</schmancy-sheet-content>\n\t\t\t\t</div>\n\t\t\t</schmancy-theme>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","classes","absolute","this","title","length","relative","html","classMap","dispatchEvent","CustomEvent","bubbles","composed","hook","propName","options","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","newValue","hasUpdated","__decorateClass","property","prototype","customElement","SchmancySheetContent","render","SchmancySheetPosition","SheetWhereAreYouRicky","SheetHereMorty","sheet","bottomSheet","Subject","$dismiss","pipe","switchMap","forkJoin","fromEvent","window","takeUntil","timer","map","e","detail","defaultIfEmpty","of","target","tap","uid","component","tagName","document","createElement","body","appendChild","setAttribute","position","allowOverlyDismiss","persist","header","style","overflow","delay","filter","shadowRoot","querySelector","assignedElements","find","take","subscribe","remove","mergeMap","closeSheet","next","SchmancySheet","$LitElement","constructor","super","arguments","open","Side","allowOverlayDismiss","focusAttribute","lastFocusedElement","handleFocusIn","contains","focus","_oldValue","setIsSheetShown","activeElement","addFocusTrap","removeFocusTrap","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","popState$","preventDefault","keyUp$","event","key","sheetContainsFocus","dismiss","rickyComm$","announcePresence","merge","addEventListener","removeEventListener","isShown","String","selector","el","matches","getFocusElement","stopPropagation","type","reflect","Boolean","query","queryAssignedElements","flatten"],"mappings":";;;;;;;;;;;AAKA,IAAqBA,IAArB,cAAiDC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAQhE,EAAA;AAAA,EAAA,SACC;AAAA,UAAMC,IAAU,EACfC,UAAUC,KAAKC,MAAMC,WAAW,GAChCC,UAAUH,KAAKC,MAAMC,SAAS,EAAA;AAExB,WAAAE;AAAAA,2BACkBJ,KAAKK,SAASP,CAAAA,CAAAA;AAAAA;AAAAA;AAAAA,eAG1B,MACHE;AAAAA,WAAAM,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAEF,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8EAMuET,KAAKC,KAAAA;AAAAA;AAAAA;AAAAA,eAGpE,MACHD;AAAAA,WAAAM,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAEF,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EACA;AAAA;AC1BS,SAAAC,EAAKC,GAAkB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kBAAA,CAAA,GAIZF,EAAA,CADChB,EAAK,MAAA,CAAA,GAfcqE,EAgBpBnD,WAAA,gBAAA,CAAA,GAhBoBmD,IAArBrD,EAAA,CADCG,EAAc,gBACMkD,CAAAA,GAAAA,CAAAA;"}
@@ -1,14 +0,0 @@
1
- "use strict";const u=require("./provide-_VUNOf1R.cjs");require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const l=require("./tailwind.mixin-mhYVlkxs.cjs"),h=require("lit"),t=require("lit/decorators.js"),p=require("./context-BATZj31H.cjs");var d=Object.defineProperty,y=Object.getOwnPropertyDescriptor,r=(c,s,o,i)=>{for(var n,e=i>1?void 0:i?y(s,o):s,a=c.length-1;a>=0;a--)(n=c[a])&&(e=(i?n(s,o,e):n(e))||e);return i&&e&&d(s,o,e),e};exports.SchmancySurface=class extends l.TailwindElement(h.css`
2
- :host {
3
- display: block;
4
- }
5
- :host([fill]) {
6
- height: -webkit-fill-available;
7
- width: -webkit-fill-available;
8
- }
9
- `){constructor(){super(...arguments),this.fill=!1,this.rounded="none",this.type="surface",this.elevation=0}get classes(){return{"relative inset-0 block sha":!0,"rounded-none":this.rounded==="none","rounded-t-[8px]":this.rounded==="top","rounded-l-[8px]":this.rounded==="left","rounded-r-[8px]":this.rounded==="right","rounded-b-[8px]":this.rounded==="bottom","rounded-[8px]":this.rounded==="all","w-full h-full":this.fill,"shadow-xs":this.elevation===1,"shadow-sm":this.elevation===2,"shadow-md":this.elevation===3,"shadow-lg":this.elevation===4,"text-surface-on":this.type==="surface"||this.type==="surfaceDim"||this.type==="surfaceBright"||this.type==="containerLowest"||this.type==="containerLow"||this.type==="container"||this.type==="containerHigh"||this.type==="containerHighest","bg-surface-default":this.type==="surface","bg-surface-dim":this.type==="surfaceDim","bg-surface-bright":this.type==="surfaceBright","bg-surface-lowest":this.type==="containerLowest","bg-surface-low":this.type==="containerLow","bg-surface-container":this.type==="container","bg-surface-high":this.type==="containerHigh","bg-surface-highest":this.type==="containerHighest"}}render(){return h.html`
10
- <div class="${this.classMap(this.classes)}">
11
- <slot></slot>
12
- </div>
13
- `}},r([t.property({type:Boolean})],exports.SchmancySurface.prototype,"fill",2),r([t.property()],exports.SchmancySurface.prototype,"rounded",2),r([u.e({context:p.SchmancySurfaceTypeContext}),t.property()],exports.SchmancySurface.prototype,"type",2),r([t.property({type:Number})],exports.SchmancySurface.prototype,"elevation",2),exports.SchmancySurface=r([t.customElement("schmancy-surface")],exports.SchmancySurface);
14
- //# sourceMappingURL=surface-DKrkxarv.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"surface-DKrkxarv.cjs","sources":["../src/surface/surface.ts"],"sourcesContent":["import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { SchmancySurfaceTypeContext } from './context'\n/**\n * @element schmancy-surface\n * @slot - default content\n */\n@customElement('schmancy-surface')\nexport class SchmancySurface extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n\t:host([fill]) {\n\t\theight: -webkit-fill-available;\n\t\twidth: -webkit-fill-available;\n\t}\n`) {\n\t@property({ type: Boolean }) fill = false\n\t@property() rounded: 'none' | 'top' | 'left' | 'right' | 'bottom' | 'all' = 'none'\n\n\t@provide({ context: SchmancySurfaceTypeContext })\n\t@property()\n\ttype:\n\t\t| 'surface'\n\t\t| 'surfaceDim'\n\t\t| 'surfaceBright'\n\t\t| 'containerLowest'\n\t\t| 'containerLow'\n\t\t| 'container'\n\t\t| 'containerHigh'\n\t\t| 'containerHighest' = 'surface'\n\t@property({ type: Number }) elevation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\n\tget classes(): Record<string, boolean> {\n\t\treturn {\n\t\t\t'relative inset-0 block sha': true,\n\t\t\t'rounded-none': this.rounded === 'none',\n\t\t\t'rounded-t-[8px]': this.rounded === 'top',\n\t\t\t'rounded-l-[8px]': this.rounded === 'left',\n\t\t\t'rounded-r-[8px]': this.rounded === 'right',\n\t\t\t'rounded-b-[8px]': this.rounded === 'bottom',\n\t\t\t'rounded-[8px]': this.rounded === 'all',\n\n\t\t\t'w-full h-full': this.fill,\n\t\t\t'shadow-xs': this.elevation === 1,\n\t\t\t'shadow-sm': this.elevation === 2,\n\t\t\t'shadow-md': this.elevation === 3,\n\t\t\t'shadow-lg': this.elevation === 4,\n\t\t\t'text-surface-on':\n\t\t\t\tthis.type === 'surface' ||\n\t\t\t\tthis.type === 'surfaceDim' ||\n\t\t\t\tthis.type === 'surfaceBright' ||\n\t\t\t\tthis.type === 'containerLowest' ||\n\t\t\t\tthis.type === 'containerLow' ||\n\t\t\t\tthis.type === 'container' ||\n\t\t\t\tthis.type === 'containerHigh' ||\n\t\t\t\tthis.type === 'containerHighest',\n\t\t\t// 'text-surface-onVariant':\n\t\t\t// \tthis.type === 'containerLowest' ||\n\t\t\t// \tthis.type === 'containerLow' ||\n\t\t\t// \tthis.type === 'container' ||\n\t\t\t// \tthis.type === 'containerHigh' ||\n\t\t\t// \tthis.type === 'containerHighest',\n\t\t\t'bg-surface-default': this.type === 'surface',\n\t\t\t'bg-surface-dim': this.type === 'surfaceDim',\n\t\t\t'bg-surface-bright': this.type === 'surfaceBright',\n\t\t\t'bg-surface-lowest': this.type === 'containerLowest',\n\t\t\t'bg-surface-low': this.type === 'containerLow',\n\t\t\t'bg-surface-container': this.type === 'container',\n\t\t\t'bg-surface-high': this.type === 'containerHigh',\n\t\t\t'bg-surface-highest': this.type === 'containerHighest',\n\t\t}\n\t}\n\tprotected render(): unknown {\n\t\treturn html`\n\t\t\t<div class=\"${this.classMap(this.classes)}\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-surface': SchmancySurface\n\t}\n}\n"],"names":["SchmancySurface","TailwindElement","css","super","arguments","this","fill","rounded","type","elevation","classes","html","classMap","__decorateClass","property","Boolean","prototype","provide","context","SchmancySurfa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EAAAA,wBASiBgB,UAAA,OAAA,CAAA,EACjBH,EAAA,CAAXC,EAASA,SAVEd,CAAAA,EAAAA,wBAUAgB,UAAA,UAAA,CAAA,EAIZH,EAAA,CAFCI,IAAQ,CAAEC,QAASC,EAAAA,0BACnBL,CAAAA,EAAAA,EAASA,SAbEd,CAAAA,EAAAA,wBAcZgB,UAAA,OAAA,CAAA,EAS4BH,EAAA,CAA3BC,WAAS,CAAEN,KAAMY,UAvBNpB,wBAuBgBgB,UAAA,YAAA,CAvBhBhB,EAAAA,QAANA,gBAAAa,EAAA,CADNQ,EAAAA,cAAc,kBAAA,CAAA,EACFrB"}
@@ -1,40 +0,0 @@
1
- import { e as p } from "./provide-kj6-udep.js";
2
- import "rxjs";
3
- import "lit/directives/class-map.js";
4
- import "lit/directives/style-map.js";
5
- import { T as c } from "./tailwind.mixin-wwBoa4Jw.js";
6
- import { css as d, html as u } from "lit";
7
- import { property as o, customElement as f } from "lit/decorators.js";
8
- import { S as y } from "./context-5nmahssp.js";
9
- var m = Object.defineProperty, g = Object.getOwnPropertyDescriptor, s = (l, i, a, r) => {
10
- for (var n, t = r > 1 ? void 0 : r ? g(i, a) : i, h = l.length - 1; h >= 0; h--) (n = l[h]) && (t = (r ? n(i, a, t) : n(t)) || t);
11
- return r && t && m(i, a, t), t;
12
- };
13
- let e = class extends c(d`
14
- :host {
15
- display: block;
16
- }
17
- :host([fill]) {
18
- height: -webkit-fill-available;
19
- width: -webkit-fill-available;
20
- }
21
- `) {
22
- constructor() {
23
- super(...arguments), this.fill = !1, this.rounded = "none", this.type = "surface", this.elevation = 0;
24
- }
25
- get classes() {
26
- return { "relative inset-0 block sha": !0, "rounded-none": this.rounded === "none", "rounded-t-[8px]": this.rounded === "top", "rounded-l-[8px]": this.rounded === "left", "rounded-r-[8px]": this.rounded === "right", "rounded-b-[8px]": this.rounded === "bottom", "rounded-[8px]": this.rounded === "all", "w-full h-full": this.fill, "shadow-xs": this.elevation === 1, "shadow-sm": this.elevation === 2, "shadow-md": this.elevation === 3, "shadow-lg": this.elevation === 4, "text-surface-on": this.type === "surface" || this.type === "surfaceDim" || this.type === "surfaceBright" || this.type === "containerLowest" || this.type === "containerLow" || this.type === "container" || this.type === "containerHigh" || this.type === "containerHighest", "bg-surface-default": this.type === "surface", "bg-surface-dim": this.type === "surfaceDim", "bg-surface-bright": this.type === "surfaceBright", "bg-surface-lowest": this.type === "containerLowest", "bg-surface-low": this.type === "containerLow", "bg-surface-container": this.type === "container", "bg-surface-high": this.type === "containerHigh", "bg-surface-highest": this.type === "containerHighest" };
27
- }
28
- render() {
29
- return u`
30
- <div class="${this.classMap(this.classes)}">
31
- <slot></slot>
32
- </div>
33
- `;
34
- }
35
- };
36
- s([o({ type: Boolean })], e.prototype, "fill", 2), s([o()], e.prototype, "rounded", 2), s([p({ context: y }), o()], e.prototype, "type", 2), s([o({ type: Number })], e.prototype, "elevation", 2), e = s([f("schmancy-surface")], e);
37
- export {
38
- e as S
39
- };
40
- //# sourceMappingURL=surface-DlwQilPV.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"surface-DlwQilPV.js","sources":["../src/surface/surface.ts"],"sourcesContent":["import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { SchmancySurfaceTypeContext } from './context'\n/**\n * @element schmancy-surface\n * @slot - default content\n */\n@customElement('schmancy-surface')\nexport class SchmancySurface extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n\t:host([fill]) {\n\t\theight: -webkit-fill-available;\n\t\twidth: -webkit-fill-available;\n\t}\n`) {\n\t@property({ type: Boolean }) fill = false\n\t@property() rounded: 'none' | 'top' | 'left' | 'right' | 'bottom' | 'all' = 'none'\n\n\t@provide({ context: SchmancySurfaceTypeContext })\n\t@property()\n\ttype:\n\t\t| 'surface'\n\t\t| 'surfaceDim'\n\t\t| 'surfaceBright'\n\t\t| 'containerLowest'\n\t\t| 'containerLow'\n\t\t| 'container'\n\t\t| 'containerHigh'\n\t\t| 'containerHighest' = 'surface'\n\t@property({ type: Number }) elevation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\n\tget classes(): Record<string, boolean> {\n\t\treturn {\n\t\t\t'relative inset-0 block sha': true,\n\t\t\t'rounded-none': this.rounded === 'none',\n\t\t\t'rounded-t-[8px]': this.rounded === 'top',\n\t\t\t'rounded-l-[8px]': this.rounded === 'left',\n\t\t\t'rounded-r-[8px]': this.rounded === 'right',\n\t\t\t'rounded-b-[8px]': this.rounded === 'bottom',\n\t\t\t'rounded-[8px]': this.rounded === 'all',\n\n\t\t\t'w-full h-full': this.fill,\n\t\t\t'shadow-xs': this.elevation === 1,\n\t\t\t'shadow-sm': this.elevation === 2,\n\t\t\t'shadow-md': this.elevation === 3,\n\t\t\t'shadow-lg': this.elevation === 4,\n\t\t\t'text-surface-on':\n\t\t\t\tthis.type === 'surface' ||\n\t\t\t\tthis.type === 'surfaceDim' ||\n\t\t\t\tthis.type === 'surfaceBright' ||\n\t\t\t\tthis.type === 'containerLowest' ||\n\t\t\t\tthis.type === 'containerLow' ||\n\t\t\t\tthis.type === 'container' ||\n\t\t\t\tthis.type === 'containerHigh' ||\n\t\t\t\tthis.type === 'containerHighest',\n\t\t\t// 'text-surface-onVariant':\n\t\t\t// \tthis.type === 'containerLowest' ||\n\t\t\t// \tthis.type === 'containerLow' ||\n\t\t\t// \tthis.type === 'container' ||\n\t\t\t// \tthis.type === 'containerHigh' ||\n\t\t\t// \tthis.type === 'containerHighest',\n\t\t\t'bg-surface-default': this.type === 'surface',\n\t\t\t'bg-surface-dim': this.type === 'surfaceDim',\n\t\t\t'bg-surface-bright': this.type === 'surfaceBright',\n\t\t\t'bg-surface-lowest': this.type === 'containerLowest',\n\t\t\t'bg-surface-low': this.type === 'containerLow',\n\t\t\t'bg-surface-container': this.type === 'container',\n\t\t\t'bg-surface-high': this.type === 'containerHigh',\n\t\t\t'bg-surface-highest': this.type === 'containerHighest',\n\t\t}\n\t}\n\tprotected render(): unknown {\n\t\treturn html`\n\t\t\t<div class=\"${this.classMap(this.classes)}\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-surface': SchmancySurface\n\t}\n}\n"],"names":["SchmancySurface","TailwindElement","css","super","arguments","this","fill","rounded","type","elevation","classes","render","html","classMap","__decorateClass","property","Boolean","prototype","provide","context","SchmancySurfaceTypeContext","Number","customElement"],"mappings":";;;;;;;;;;;;AAUa,IAAAA,IAAN,cAA8BC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA9C,EAAA;AAAA,EAAA,cAAAC;AAAAA,UAAAA,GAAAC,SAS8BC,GAAAA,KAAAC,OAAA,IACwCD,KAAAE,UAAA,QAYpDF,KAAAG,OAAA,WACuCH,KAAAI,YAAA;AAAA,EAAA;AAAA,EAE/D,IAAIC,UAAAA;AACI,WAAA,EACN,+BAA+B,IAC/B,gBAAgBL,KAAKE,YAAY,QACjC,mBAAmBF,KAAKE,YAAY,OACpC,mBAAmBF,KAAKE,YAAY,QACpC,mBAAmBF,KAAKE,YAAY,SACpC,mBAAmBF,KAAKE,YAAY,UACpC,iBAAiBF,KAAKE,YAAY,OAElC,iBAAiBF,KAAKC,MACtB,aAAaD,KAAKI,cAAc,GAChC,aAAaJ,KAAKI,cAAc,GAChC,aAAaJ,KAAKI,cAAc,GAChC,aAAaJ,KAAKI,cAAc,GAChC,mBACCJ,KAAKG,SAAS,aACdH,KAAKG,SAAS,gBACdH,KAAKG,SAAS,mBACdH,KAAKG,SAAS,qBACdH,KAAKG,SAAS,kBACdH,KAAKG,SAAS,eACdH,KAAKG,SAAS,mBACdH,KAAKG,SAAS,oBAOf,sBAAsBH,KAAKG,SAAS,WACpC,kBAAkBH,KAAKG,SAAS,cAChC,qBAAqBH,KAAKG,SAAS,iBACnC,qBAAqBH,KAAKG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