@paperless/core 2.0.1-beta.13 → 2.0.1-beta.15

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 (412) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/dist/build/{p-60492c98.entry.js → p-04f2c445.entry.js} +2 -2
  3. package/dist/build/{p-2f9e9197.entry.js → p-0b5a9b3b.entry.js} +2 -2
  4. package/dist/{paperless/p-dce95c92.entry.js → build/p-0fb58b95.entry.js} +2 -2
  5. package/dist/{paperless/p-64b53130.entry.js → build/p-12f5d6c1.entry.js} +2 -2
  6. package/dist/build/{p-d81a30f6.entry.js → p-15abe9ab.entry.js} +2 -2
  7. package/dist/build/p-16c8c10d.entry.js +2 -0
  8. package/dist/build/p-16c8c10d.entry.js.map +1 -0
  9. package/dist/build/{p-b8e718c7.entry.js → p-1926e607.entry.js} +2 -2
  10. package/dist/{paperless/p-385943b2.entry.js → build/p-195ede81.entry.js} +2 -2
  11. package/dist/build/{p-32056913.entry.js → p-198b4653.entry.js} +2 -2
  12. package/dist/build/{p-221dbb71.entry.js → p-1c97ddaa.entry.js} +2 -2
  13. package/dist/build/{p-bc46f89a.entry.js → p-285babdd.entry.js} +2 -2
  14. package/dist/build/{p-b9a7e240.entry.js → p-28fee2e1.entry.js} +2 -2
  15. package/dist/build/{p-dd6d3839.entry.js → p-2bedd43c.entry.js} +2 -2
  16. package/dist/build/{p-5e789bb1.entry.js → p-36d0d0e6.entry.js} +2 -2
  17. package/dist/build/{p-e10cf2d3.entry.js → p-3885d19b.entry.js} +2 -2
  18. package/dist/build/{p-bfbab545.entry.js → p-3b9d77dc.entry.js} +2 -2
  19. package/dist/build/{p-7a577384.entry.js → p-3dba9a43.entry.js} +2 -2
  20. package/dist/build/{p-c6bcbcbf.entry.js → p-43cdfda1.entry.js} +2 -2
  21. package/dist/build/{p-fcaa0539.entry.js → p-4c3cdddf.entry.js} +2 -2
  22. package/dist/{paperless/p-6fed974c.entry.js → build/p-51b3884b.entry.js} +2 -2
  23. package/dist/build/{p-ea3bce45.entry.js → p-55752ba9.entry.js} +2 -2
  24. package/dist/build/p-57fd5974.entry.js +2 -0
  25. package/dist/build/p-57fd5974.entry.js.map +1 -0
  26. package/dist/build/{p-6f7721eb.entry.js → p-5a072ae3.entry.js} +2 -2
  27. package/dist/build/{p-3d867690.entry.js → p-5a7c004d.entry.js} +2 -2
  28. package/dist/build/{p-3e9d994a.entry.js → p-5afd99f1.entry.js} +2 -2
  29. package/dist/build/{p-16a18649.entry.js → p-5df485b9.entry.js} +2 -2
  30. package/dist/build/{p-9fa5d08a.entry.js → p-648c33b9.entry.js} +2 -2
  31. package/dist/build/{p-047c1c6f.entry.js → p-6521a730.entry.js} +2 -2
  32. package/dist/{paperless/p-909879e3.entry.js → build/p-6d6bb913.entry.js} +2 -2
  33. package/dist/build/{p-45463125.entry.js → p-75330470.entry.js} +2 -2
  34. package/dist/{paperless/p-a7b8e22f.entry.js → build/p-7eb4689d.entry.js} +2 -2
  35. package/dist/{paperless/p-7beb3401.entry.js → build/p-82c79faa.entry.js} +2 -2
  36. package/dist/build/p-88f72088.entry.js +2 -0
  37. package/dist/build/p-88f72088.entry.js.map +1 -0
  38. package/dist/build/{p-6e71ebca.entry.js → p-9d112705.entry.js} +2 -2
  39. package/dist/build/{p-937b2d74.entry.js → p-a26e1c6d.entry.js} +2 -2
  40. package/dist/build/p-a3853fc7.js +3 -0
  41. package/dist/build/p-a3853fc7.js.map +1 -0
  42. package/dist/build/{p-be0c925e.entry.js → p-a5995873.entry.js} +2 -2
  43. package/dist/build/p-b11136c3.entry.js +2 -0
  44. package/dist/build/p-b11136c3.entry.js.map +1 -0
  45. package/dist/build/{p-a587ff9f.entry.js → p-b18ef00d.entry.js} +2 -2
  46. package/dist/build/{p-190704d1.entry.js → p-b7a45a0a.entry.js} +2 -2
  47. package/dist/build/p-b7a45a0a.entry.js.map +1 -0
  48. package/dist/build/{p-393eba2f.entry.js → p-b9cdcb32.entry.js} +2 -2
  49. package/dist/{paperless/p-aab1cda1.entry.js → build/p-b9e42e93.entry.js} +2 -2
  50. package/dist/build/{p-851a7662.entry.js → p-bf9965ea.entry.js} +2 -2
  51. package/dist/build/p-bf9965ea.entry.js.map +1 -0
  52. package/dist/build/{p-013cd7f9.entry.js → p-cada312c.entry.js} +2 -2
  53. package/dist/{paperless/p-f78afad9.entry.js → build/p-d8498647.entry.js} +2 -2
  54. package/dist/build/p-d8498647.entry.js.map +1 -0
  55. package/dist/{paperless/p-0348e450.entry.js → build/p-dc9bf641.entry.js} +2 -2
  56. package/dist/build/{p-aa058967.entry.js → p-e18e29aa.entry.js} +2 -2
  57. package/dist/build/{p-ece8998b.entry.js → p-e4ab1d73.entry.js} +2 -2
  58. package/dist/build/{p-08ea38ad.entry.js → p-e74bd898.entry.js} +2 -2
  59. package/dist/build/{p-23ca3688.entry.js → p-e78945ad.entry.js} +2 -2
  60. package/dist/build/{p-cb7c509e.entry.js → p-ea329388.entry.js} +2 -2
  61. package/dist/build/paperless.esm.js +1 -1
  62. package/dist/build/paperless.esm.js.map +1 -1
  63. package/dist/cjs/{index-02e05522.js → index-6d3f569b.js} +79 -6
  64. package/dist/cjs/{index-02e05522.js.map → index-6d3f569b.js.map} +1 -1
  65. package/dist/cjs/loader.cjs.js +2 -2
  66. package/dist/cjs/p-accordion.cjs.entry.js +1 -1
  67. package/dist/cjs/p-attachment.cjs.entry.js +1 -1
  68. package/dist/cjs/p-avatar-group.cjs.entry.js +1 -1
  69. package/dist/cjs/p-avatar.cjs.entry.js +3 -3
  70. package/dist/cjs/p-avatar.cjs.entry.js.map +1 -1
  71. package/dist/cjs/p-backdrop.cjs.entry.js +1 -1
  72. package/dist/cjs/p-badge.cjs.entry.js +1 -1
  73. package/dist/cjs/p-button-group.cjs.entry.js +1 -1
  74. package/dist/cjs/p-button_3.cjs.entry.js +40 -2
  75. package/dist/cjs/p-button_3.cjs.entry.js.map +1 -1
  76. package/dist/cjs/p-calendar.cjs.entry.js +1 -1
  77. package/dist/cjs/p-card-body.cjs.entry.js +1 -1
  78. package/dist/cjs/p-card-container.cjs.entry.js +1 -1
  79. package/dist/cjs/p-card-header.cjs.entry.js +1 -1
  80. package/dist/cjs/p-content-slider.cjs.entry.js +1 -1
  81. package/dist/cjs/p-counter.cjs.entry.js +1 -1
  82. package/dist/cjs/p-cropper.cjs.entry.js +1 -1
  83. package/dist/cjs/p-datepicker.cjs.entry.js +1 -1
  84. package/dist/cjs/p-divider.cjs.entry.js +1 -1
  85. package/dist/cjs/p-drawer-body_3.cjs.entry.js +1 -1
  86. package/dist/cjs/p-drawer.cjs.entry.js +1 -1
  87. package/dist/cjs/{p-dropdown-menu-container.cjs.entry.js → p-dropdown-menu-container_2.cjs.entry.js} +24 -2
  88. package/dist/cjs/p-dropdown-menu-container_2.cjs.entry.js.map +1 -0
  89. package/dist/cjs/p-dropdown_2.cjs.entry.js +36 -12
  90. package/dist/cjs/p-dropdown_2.cjs.entry.js.map +1 -1
  91. package/dist/cjs/p-floating-menu-container_8.cjs.entry.js +1 -1
  92. package/dist/cjs/p-helper_3.cjs.entry.js +15 -16
  93. package/dist/cjs/p-helper_3.cjs.entry.js.map +1 -1
  94. package/dist/cjs/p-iban-icon.cjs.entry.js +1 -1
  95. package/dist/cjs/p-icon-deprecated.cjs.entry.js +1 -1
  96. package/dist/cjs/p-info-panel.cjs.entry.js +1 -1
  97. package/dist/cjs/p-label_3.cjs.entry.js +1 -1
  98. package/dist/cjs/p-layout.cjs.entry.js +1 -1
  99. package/dist/cjs/p-modal-body_4.cjs.entry.js +1 -1
  100. package/dist/cjs/p-modal.cjs.entry.js +1 -1
  101. package/dist/cjs/p-navbar.cjs.entry.js +1 -1
  102. package/dist/cjs/p-navigation-item.cjs.entry.js +1 -1
  103. package/dist/cjs/p-navigation-section.cjs.entry.js +1 -1
  104. package/dist/cjs/p-navigation-title.cjs.entry.js +1 -1
  105. package/dist/cjs/p-page-size-select_3.cjs.entry.js +1 -1
  106. package/dist/cjs/p-profile.cjs.entry.js +1 -1
  107. package/dist/cjs/p-profile.cjs.entry.js.map +1 -1
  108. package/dist/cjs/p-select.cjs.entry.js +1 -1
  109. package/dist/cjs/p-select.cjs.entry.js.map +1 -1
  110. package/dist/cjs/p-slider-indicator.cjs.entry.js +1 -1
  111. package/dist/cjs/p-status.cjs.entry.js +1 -1
  112. package/dist/cjs/p-stepper-item.cjs.entry.js +1 -1
  113. package/dist/cjs/p-stepper-line.cjs.entry.js +1 -1
  114. package/dist/cjs/p-stepper.cjs.entry.js +1 -1
  115. package/dist/cjs/p-tab-group.cjs.entry.js +1 -1
  116. package/dist/cjs/p-tab-item.cjs.entry.js +1 -1
  117. package/dist/cjs/p-table-column.cjs.entry.js +1 -1
  118. package/dist/cjs/p-table-row-action.cjs.entry.js +1 -1
  119. package/dist/cjs/p-table.cjs.entry.js +1 -1
  120. package/dist/cjs/p-toast-container.cjs.entry.js +1 -1
  121. package/dist/cjs/p-toast.cjs.entry.js +1 -1
  122. package/dist/cjs/p-tooltip.cjs.entry.js +1 -1
  123. package/dist/cjs/paperless.cjs.js +2 -2
  124. package/dist/collection/collection-manifest.json +1 -0
  125. package/dist/collection/components/atoms/avatar/avatar.component.css +1 -1
  126. package/dist/collection/components/atoms/avatar/avatar.component.js +1 -1
  127. package/dist/collection/components/atoms/avatar/avatar.component.js.map +1 -1
  128. package/dist/collection/components/atoms/portal/portal.component.js +43 -0
  129. package/dist/collection/components/atoms/portal/portal.component.js.map +1 -0
  130. package/dist/collection/components/atoms/portal/test/portal.component.e2e.js +26 -0
  131. package/dist/collection/components/atoms/portal/test/portal.component.e2e.js.map +1 -0
  132. package/dist/collection/components/atoms/portal/test/portal.component.spec.js +17 -0
  133. package/dist/collection/components/atoms/portal/test/portal.component.spec.js.map +1 -0
  134. package/dist/collection/components/molecules/button/button.component.css +1 -1
  135. package/dist/collection/components/molecules/button/button.component.js +38 -0
  136. package/dist/collection/components/molecules/button/button.component.js.map +1 -1
  137. package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -1
  138. package/dist/collection/components/molecules/dropdown/dropdown.component.js +52 -10
  139. package/dist/collection/components/molecules/dropdown/dropdown.component.js.map +1 -1
  140. package/dist/collection/components/molecules/input-group/input-group.component.js +15 -16
  141. package/dist/collection/components/molecules/input-group/input-group.component.js.map +1 -1
  142. package/dist/collection/components/molecules/profile/profile.component.js.map +1 -1
  143. package/dist/collection/components/molecules/select/select.component.js.map +1 -1
  144. package/dist/components/avatar.component.js +2 -2
  145. package/dist/components/avatar.component.js.map +1 -1
  146. package/dist/components/button.component.js +39 -1
  147. package/dist/components/button.component.js.map +1 -1
  148. package/dist/components/dropdown.component.js +44 -13
  149. package/dist/components/dropdown.component.js.map +1 -1
  150. package/dist/components/input-group.component.js +14 -15
  151. package/dist/components/input-group.component.js.map +1 -1
  152. package/dist/components/p-datepicker.js +20 -14
  153. package/dist/components/p-datepicker.js.map +1 -1
  154. package/dist/components/p-portal.d.ts +11 -0
  155. package/dist/components/p-portal.js +8 -0
  156. package/dist/components/p-portal.js.map +1 -0
  157. package/dist/components/p-profile.js +16 -10
  158. package/dist/components/p-profile.js.map +1 -1
  159. package/dist/components/p-select.js +24 -18
  160. package/dist/components/p-select.js.map +1 -1
  161. package/dist/components/p-table.js +40 -34
  162. package/dist/components/p-table.js.map +1 -1
  163. package/dist/components/page-size-select.component.js +18 -12
  164. package/dist/components/page-size-select.component.js.map +1 -1
  165. package/dist/components/portal.component.js +42 -0
  166. package/dist/components/portal.component.js.map +1 -0
  167. package/dist/components/table-footer.component.js +24 -18
  168. package/dist/components/table-footer.component.js.map +1 -1
  169. package/dist/esm/{index-f99096d4.js → index-7f8d27cf.js} +79 -6
  170. package/dist/esm/{index-f99096d4.js.map → index-7f8d27cf.js.map} +1 -1
  171. package/dist/esm/loader.js +3 -3
  172. package/dist/esm/p-accordion.entry.js +1 -1
  173. package/dist/esm/p-attachment.entry.js +1 -1
  174. package/dist/esm/p-avatar-group.entry.js +1 -1
  175. package/dist/esm/p-avatar.entry.js +3 -3
  176. package/dist/esm/p-avatar.entry.js.map +1 -1
  177. package/dist/esm/p-backdrop.entry.js +1 -1
  178. package/dist/esm/p-badge.entry.js +1 -1
  179. package/dist/esm/p-button-group.entry.js +1 -1
  180. package/dist/esm/p-button_3.entry.js +40 -2
  181. package/dist/esm/p-button_3.entry.js.map +1 -1
  182. package/dist/esm/p-calendar.entry.js +1 -1
  183. package/dist/esm/p-card-body.entry.js +1 -1
  184. package/dist/esm/p-card-container.entry.js +1 -1
  185. package/dist/esm/p-card-header.entry.js +1 -1
  186. package/dist/esm/p-content-slider.entry.js +1 -1
  187. package/dist/esm/p-counter.entry.js +1 -1
  188. package/dist/esm/p-cropper.entry.js +1 -1
  189. package/dist/esm/p-datepicker.entry.js +1 -1
  190. package/dist/esm/p-divider.entry.js +1 -1
  191. package/dist/esm/p-drawer-body_3.entry.js +1 -1
  192. package/dist/esm/p-drawer.entry.js +1 -1
  193. package/dist/esm/{p-dropdown-menu-container.entry.js → p-dropdown-menu-container_2.entry.js} +24 -3
  194. package/dist/esm/p-dropdown-menu-container_2.entry.js.map +1 -0
  195. package/dist/esm/p-dropdown_2.entry.js +36 -12
  196. package/dist/esm/p-dropdown_2.entry.js.map +1 -1
  197. package/dist/esm/p-floating-menu-container_8.entry.js +1 -1
  198. package/dist/esm/p-helper_3.entry.js +15 -16
  199. package/dist/esm/p-helper_3.entry.js.map +1 -1
  200. package/dist/esm/p-iban-icon.entry.js +1 -1
  201. package/dist/esm/p-icon-deprecated.entry.js +1 -1
  202. package/dist/esm/p-info-panel.entry.js +1 -1
  203. package/dist/esm/p-label_3.entry.js +1 -1
  204. package/dist/esm/p-layout.entry.js +1 -1
  205. package/dist/esm/p-modal-body_4.entry.js +1 -1
  206. package/dist/esm/p-modal.entry.js +1 -1
  207. package/dist/esm/p-navbar.entry.js +1 -1
  208. package/dist/esm/p-navigation-item.entry.js +1 -1
  209. package/dist/esm/p-navigation-section.entry.js +1 -1
  210. package/dist/esm/p-navigation-title.entry.js +1 -1
  211. package/dist/esm/p-page-size-select_3.entry.js +1 -1
  212. package/dist/esm/p-profile.entry.js +1 -1
  213. package/dist/esm/p-profile.entry.js.map +1 -1
  214. package/dist/esm/p-select.entry.js +1 -1
  215. package/dist/esm/p-select.entry.js.map +1 -1
  216. package/dist/esm/p-slider-indicator.entry.js +1 -1
  217. package/dist/esm/p-status.entry.js +1 -1
  218. package/dist/esm/p-stepper-item.entry.js +1 -1
  219. package/dist/esm/p-stepper-line.entry.js +1 -1
  220. package/dist/esm/p-stepper.entry.js +1 -1
  221. package/dist/esm/p-tab-group.entry.js +1 -1
  222. package/dist/esm/p-tab-item.entry.js +1 -1
  223. package/dist/esm/p-table-column.entry.js +1 -1
  224. package/dist/esm/p-table-row-action.entry.js +1 -1
  225. package/dist/esm/p-table.entry.js +1 -1
  226. package/dist/esm/p-toast-container.entry.js +1 -1
  227. package/dist/esm/p-toast.entry.js +1 -1
  228. package/dist/esm/p-tooltip.entry.js +1 -1
  229. package/dist/esm/paperless.js +3 -3
  230. package/dist/index.html +1 -1
  231. package/dist/paperless/{p-60492c98.entry.js → p-04f2c445.entry.js} +2 -2
  232. package/dist/paperless/{p-2f9e9197.entry.js → p-0b5a9b3b.entry.js} +2 -2
  233. package/dist/{build/p-dce95c92.entry.js → paperless/p-0fb58b95.entry.js} +2 -2
  234. package/dist/{build/p-64b53130.entry.js → paperless/p-12f5d6c1.entry.js} +2 -2
  235. package/dist/paperless/{p-d81a30f6.entry.js → p-15abe9ab.entry.js} +2 -2
  236. package/dist/paperless/p-16c8c10d.entry.js +2 -0
  237. package/dist/paperless/p-16c8c10d.entry.js.map +1 -0
  238. package/dist/paperless/{p-b8e718c7.entry.js → p-1926e607.entry.js} +2 -2
  239. package/dist/{build/p-385943b2.entry.js → paperless/p-195ede81.entry.js} +2 -2
  240. package/dist/paperless/{p-32056913.entry.js → p-198b4653.entry.js} +2 -2
  241. package/dist/paperless/{p-221dbb71.entry.js → p-1c97ddaa.entry.js} +2 -2
  242. package/dist/paperless/{p-bc46f89a.entry.js → p-285babdd.entry.js} +2 -2
  243. package/dist/paperless/{p-b9a7e240.entry.js → p-28fee2e1.entry.js} +2 -2
  244. package/dist/paperless/{p-dd6d3839.entry.js → p-2bedd43c.entry.js} +2 -2
  245. package/dist/paperless/{p-5e789bb1.entry.js → p-36d0d0e6.entry.js} +2 -2
  246. package/dist/paperless/{p-e10cf2d3.entry.js → p-3885d19b.entry.js} +2 -2
  247. package/dist/paperless/{p-bfbab545.entry.js → p-3b9d77dc.entry.js} +2 -2
  248. package/dist/paperless/{p-7a577384.entry.js → p-3dba9a43.entry.js} +2 -2
  249. package/dist/paperless/{p-c6bcbcbf.entry.js → p-43cdfda1.entry.js} +2 -2
  250. package/dist/paperless/{p-fcaa0539.entry.js → p-4c3cdddf.entry.js} +2 -2
  251. package/dist/{build/p-6fed974c.entry.js → paperless/p-51b3884b.entry.js} +2 -2
  252. package/dist/paperless/{p-ea3bce45.entry.js → p-55752ba9.entry.js} +2 -2
  253. package/dist/paperless/p-57fd5974.entry.js +2 -0
  254. package/dist/paperless/p-57fd5974.entry.js.map +1 -0
  255. package/dist/paperless/{p-6f7721eb.entry.js → p-5a072ae3.entry.js} +2 -2
  256. package/dist/paperless/{p-3d867690.entry.js → p-5a7c004d.entry.js} +2 -2
  257. package/dist/paperless/{p-3e9d994a.entry.js → p-5afd99f1.entry.js} +2 -2
  258. package/dist/paperless/{p-16a18649.entry.js → p-5df485b9.entry.js} +2 -2
  259. package/dist/paperless/{p-9fa5d08a.entry.js → p-648c33b9.entry.js} +2 -2
  260. package/dist/paperless/{p-047c1c6f.entry.js → p-6521a730.entry.js} +2 -2
  261. package/dist/{build/p-909879e3.entry.js → paperless/p-6d6bb913.entry.js} +2 -2
  262. package/dist/paperless/{p-45463125.entry.js → p-75330470.entry.js} +2 -2
  263. package/dist/{build/p-a7b8e22f.entry.js → paperless/p-7eb4689d.entry.js} +2 -2
  264. package/dist/{build/p-7beb3401.entry.js → paperless/p-82c79faa.entry.js} +2 -2
  265. package/dist/paperless/p-88f72088.entry.js +2 -0
  266. package/dist/paperless/p-88f72088.entry.js.map +1 -0
  267. package/dist/paperless/{p-6e71ebca.entry.js → p-9d112705.entry.js} +2 -2
  268. package/dist/paperless/{p-937b2d74.entry.js → p-a26e1c6d.entry.js} +2 -2
  269. package/dist/paperless/p-a3853fc7.js +3 -0
  270. package/dist/paperless/p-a3853fc7.js.map +1 -0
  271. package/dist/paperless/{p-be0c925e.entry.js → p-a5995873.entry.js} +2 -2
  272. package/dist/paperless/p-b11136c3.entry.js +2 -0
  273. package/dist/paperless/p-b11136c3.entry.js.map +1 -0
  274. package/dist/paperless/{p-a587ff9f.entry.js → p-b18ef00d.entry.js} +2 -2
  275. package/dist/paperless/{p-190704d1.entry.js → p-b7a45a0a.entry.js} +2 -2
  276. package/dist/paperless/p-b7a45a0a.entry.js.map +1 -0
  277. package/dist/paperless/{p-393eba2f.entry.js → p-b9cdcb32.entry.js} +2 -2
  278. package/dist/{build/p-aab1cda1.entry.js → paperless/p-b9e42e93.entry.js} +2 -2
  279. package/dist/paperless/{p-851a7662.entry.js → p-bf9965ea.entry.js} +2 -2
  280. package/dist/paperless/p-bf9965ea.entry.js.map +1 -0
  281. package/dist/paperless/{p-013cd7f9.entry.js → p-cada312c.entry.js} +2 -2
  282. package/dist/{build/p-f78afad9.entry.js → paperless/p-d8498647.entry.js} +2 -2
  283. package/dist/paperless/p-d8498647.entry.js.map +1 -0
  284. package/dist/{build/p-0348e450.entry.js → paperless/p-dc9bf641.entry.js} +2 -2
  285. package/dist/paperless/{p-aa058967.entry.js → p-e18e29aa.entry.js} +2 -2
  286. package/dist/paperless/{p-ece8998b.entry.js → p-e4ab1d73.entry.js} +2 -2
  287. package/dist/paperless/{p-08ea38ad.entry.js → p-e74bd898.entry.js} +2 -2
  288. package/dist/paperless/{p-23ca3688.entry.js → p-e78945ad.entry.js} +2 -2
  289. package/dist/paperless/{p-cb7c509e.entry.js → p-ea329388.entry.js} +2 -2
  290. package/dist/paperless/paperless.esm.js +1 -1
  291. package/dist/paperless/paperless.esm.js.map +1 -1
  292. package/dist/sw.js +1 -1
  293. package/dist/sw.js.map +1 -1
  294. package/dist/types/components/atoms/portal/portal.component.d.ts +9 -0
  295. package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +6 -1
  296. package/dist/types/components.d.ts +23 -0
  297. package/hydrate/index.js +144 -41
  298. package/package.json +1 -1
  299. package/dist/build/p-190704d1.entry.js.map +0 -1
  300. package/dist/build/p-5ab354bf.entry.js +0 -2
  301. package/dist/build/p-5ab354bf.entry.js.map +0 -1
  302. package/dist/build/p-64b68231.js +0 -3
  303. package/dist/build/p-64b68231.js.map +0 -1
  304. package/dist/build/p-851a7662.entry.js.map +0 -1
  305. package/dist/build/p-cb8a454c.entry.js +0 -2
  306. package/dist/build/p-cb8a454c.entry.js.map +0 -1
  307. package/dist/build/p-cc321a7b.entry.js +0 -2
  308. package/dist/build/p-cc321a7b.entry.js.map +0 -1
  309. package/dist/build/p-d7dbd13e.entry.js +0 -2
  310. package/dist/build/p-d7dbd13e.entry.js.map +0 -1
  311. package/dist/build/p-f78afad9.entry.js.map +0 -1
  312. package/dist/cjs/p-dropdown-menu-container.cjs.entry.js.map +0 -1
  313. package/dist/esm/p-dropdown-menu-container.entry.js.map +0 -1
  314. package/dist/paperless/p-190704d1.entry.js.map +0 -1
  315. package/dist/paperless/p-5ab354bf.entry.js +0 -2
  316. package/dist/paperless/p-5ab354bf.entry.js.map +0 -1
  317. package/dist/paperless/p-64b68231.js +0 -3
  318. package/dist/paperless/p-64b68231.js.map +0 -1
  319. package/dist/paperless/p-851a7662.entry.js.map +0 -1
  320. package/dist/paperless/p-cb8a454c.entry.js +0 -2
  321. package/dist/paperless/p-cb8a454c.entry.js.map +0 -1
  322. package/dist/paperless/p-cc321a7b.entry.js +0 -2
  323. package/dist/paperless/p-cc321a7b.entry.js.map +0 -1
  324. package/dist/paperless/p-d7dbd13e.entry.js +0 -2
  325. package/dist/paperless/p-d7dbd13e.entry.js.map +0 -1
  326. package/dist/paperless/p-f78afad9.entry.js.map +0 -1
  327. /package/dist/build/{p-60492c98.entry.js.map → p-04f2c445.entry.js.map} +0 -0
  328. /package/dist/build/{p-2f9e9197.entry.js.map → p-0b5a9b3b.entry.js.map} +0 -0
  329. /package/dist/build/{p-dce95c92.entry.js.map → p-0fb58b95.entry.js.map} +0 -0
  330. /package/dist/build/{p-64b53130.entry.js.map → p-12f5d6c1.entry.js.map} +0 -0
  331. /package/dist/build/{p-d81a30f6.entry.js.map → p-15abe9ab.entry.js.map} +0 -0
  332. /package/dist/build/{p-b8e718c7.entry.js.map → p-1926e607.entry.js.map} +0 -0
  333. /package/dist/build/{p-385943b2.entry.js.map → p-195ede81.entry.js.map} +0 -0
  334. /package/dist/build/{p-32056913.entry.js.map → p-198b4653.entry.js.map} +0 -0
  335. /package/dist/build/{p-221dbb71.entry.js.map → p-1c97ddaa.entry.js.map} +0 -0
  336. /package/dist/build/{p-bc46f89a.entry.js.map → p-285babdd.entry.js.map} +0 -0
  337. /package/dist/build/{p-b9a7e240.entry.js.map → p-28fee2e1.entry.js.map} +0 -0
  338. /package/dist/build/{p-dd6d3839.entry.js.map → p-2bedd43c.entry.js.map} +0 -0
  339. /package/dist/build/{p-5e789bb1.entry.js.map → p-36d0d0e6.entry.js.map} +0 -0
  340. /package/dist/build/{p-e10cf2d3.entry.js.map → p-3885d19b.entry.js.map} +0 -0
  341. /package/dist/build/{p-bfbab545.entry.js.map → p-3b9d77dc.entry.js.map} +0 -0
  342. /package/dist/build/{p-7a577384.entry.js.map → p-3dba9a43.entry.js.map} +0 -0
  343. /package/dist/build/{p-c6bcbcbf.entry.js.map → p-43cdfda1.entry.js.map} +0 -0
  344. /package/dist/build/{p-fcaa0539.entry.js.map → p-4c3cdddf.entry.js.map} +0 -0
  345. /package/dist/build/{p-6fed974c.entry.js.map → p-51b3884b.entry.js.map} +0 -0
  346. /package/dist/build/{p-ea3bce45.entry.js.map → p-55752ba9.entry.js.map} +0 -0
  347. /package/dist/build/{p-6f7721eb.entry.js.map → p-5a072ae3.entry.js.map} +0 -0
  348. /package/dist/build/{p-3d867690.entry.js.map → p-5a7c004d.entry.js.map} +0 -0
  349. /package/dist/build/{p-3e9d994a.entry.js.map → p-5afd99f1.entry.js.map} +0 -0
  350. /package/dist/build/{p-16a18649.entry.js.map → p-5df485b9.entry.js.map} +0 -0
  351. /package/dist/build/{p-9fa5d08a.entry.js.map → p-648c33b9.entry.js.map} +0 -0
  352. /package/dist/build/{p-047c1c6f.entry.js.map → p-6521a730.entry.js.map} +0 -0
  353. /package/dist/build/{p-909879e3.entry.js.map → p-6d6bb913.entry.js.map} +0 -0
  354. /package/dist/build/{p-45463125.entry.js.map → p-75330470.entry.js.map} +0 -0
  355. /package/dist/build/{p-a7b8e22f.entry.js.map → p-7eb4689d.entry.js.map} +0 -0
  356. /package/dist/build/{p-7beb3401.entry.js.map → p-82c79faa.entry.js.map} +0 -0
  357. /package/dist/build/{p-6e71ebca.entry.js.map → p-9d112705.entry.js.map} +0 -0
  358. /package/dist/build/{p-937b2d74.entry.js.map → p-a26e1c6d.entry.js.map} +0 -0
  359. /package/dist/build/{p-be0c925e.entry.js.map → p-a5995873.entry.js.map} +0 -0
  360. /package/dist/build/{p-a587ff9f.entry.js.map → p-b18ef00d.entry.js.map} +0 -0
  361. /package/dist/build/{p-393eba2f.entry.js.map → p-b9cdcb32.entry.js.map} +0 -0
  362. /package/dist/build/{p-aab1cda1.entry.js.map → p-b9e42e93.entry.js.map} +0 -0
  363. /package/dist/build/{p-013cd7f9.entry.js.map → p-cada312c.entry.js.map} +0 -0
  364. /package/dist/build/{p-0348e450.entry.js.map → p-dc9bf641.entry.js.map} +0 -0
  365. /package/dist/build/{p-aa058967.entry.js.map → p-e18e29aa.entry.js.map} +0 -0
  366. /package/dist/build/{p-ece8998b.entry.js.map → p-e4ab1d73.entry.js.map} +0 -0
  367. /package/dist/build/{p-08ea38ad.entry.js.map → p-e74bd898.entry.js.map} +0 -0
  368. /package/dist/build/{p-23ca3688.entry.js.map → p-e78945ad.entry.js.map} +0 -0
  369. /package/dist/build/{p-cb7c509e.entry.js.map → p-ea329388.entry.js.map} +0 -0
  370. /package/dist/paperless/{p-60492c98.entry.js.map → p-04f2c445.entry.js.map} +0 -0
  371. /package/dist/paperless/{p-2f9e9197.entry.js.map → p-0b5a9b3b.entry.js.map} +0 -0
  372. /package/dist/paperless/{p-dce95c92.entry.js.map → p-0fb58b95.entry.js.map} +0 -0
  373. /package/dist/paperless/{p-64b53130.entry.js.map → p-12f5d6c1.entry.js.map} +0 -0
  374. /package/dist/paperless/{p-d81a30f6.entry.js.map → p-15abe9ab.entry.js.map} +0 -0
  375. /package/dist/paperless/{p-b8e718c7.entry.js.map → p-1926e607.entry.js.map} +0 -0
  376. /package/dist/paperless/{p-385943b2.entry.js.map → p-195ede81.entry.js.map} +0 -0
  377. /package/dist/paperless/{p-32056913.entry.js.map → p-198b4653.entry.js.map} +0 -0
  378. /package/dist/paperless/{p-221dbb71.entry.js.map → p-1c97ddaa.entry.js.map} +0 -0
  379. /package/dist/paperless/{p-bc46f89a.entry.js.map → p-285babdd.entry.js.map} +0 -0
  380. /package/dist/paperless/{p-b9a7e240.entry.js.map → p-28fee2e1.entry.js.map} +0 -0
  381. /package/dist/paperless/{p-dd6d3839.entry.js.map → p-2bedd43c.entry.js.map} +0 -0
  382. /package/dist/paperless/{p-5e789bb1.entry.js.map → p-36d0d0e6.entry.js.map} +0 -0
  383. /package/dist/paperless/{p-e10cf2d3.entry.js.map → p-3885d19b.entry.js.map} +0 -0
  384. /package/dist/paperless/{p-bfbab545.entry.js.map → p-3b9d77dc.entry.js.map} +0 -0
  385. /package/dist/paperless/{p-7a577384.entry.js.map → p-3dba9a43.entry.js.map} +0 -0
  386. /package/dist/paperless/{p-c6bcbcbf.entry.js.map → p-43cdfda1.entry.js.map} +0 -0
  387. /package/dist/paperless/{p-fcaa0539.entry.js.map → p-4c3cdddf.entry.js.map} +0 -0
  388. /package/dist/paperless/{p-6fed974c.entry.js.map → p-51b3884b.entry.js.map} +0 -0
  389. /package/dist/paperless/{p-ea3bce45.entry.js.map → p-55752ba9.entry.js.map} +0 -0
  390. /package/dist/paperless/{p-6f7721eb.entry.js.map → p-5a072ae3.entry.js.map} +0 -0
  391. /package/dist/paperless/{p-3d867690.entry.js.map → p-5a7c004d.entry.js.map} +0 -0
  392. /package/dist/paperless/{p-3e9d994a.entry.js.map → p-5afd99f1.entry.js.map} +0 -0
  393. /package/dist/paperless/{p-16a18649.entry.js.map → p-5df485b9.entry.js.map} +0 -0
  394. /package/dist/paperless/{p-9fa5d08a.entry.js.map → p-648c33b9.entry.js.map} +0 -0
  395. /package/dist/paperless/{p-047c1c6f.entry.js.map → p-6521a730.entry.js.map} +0 -0
  396. /package/dist/paperless/{p-909879e3.entry.js.map → p-6d6bb913.entry.js.map} +0 -0
  397. /package/dist/paperless/{p-45463125.entry.js.map → p-75330470.entry.js.map} +0 -0
  398. /package/dist/paperless/{p-a7b8e22f.entry.js.map → p-7eb4689d.entry.js.map} +0 -0
  399. /package/dist/paperless/{p-7beb3401.entry.js.map → p-82c79faa.entry.js.map} +0 -0
  400. /package/dist/paperless/{p-6e71ebca.entry.js.map → p-9d112705.entry.js.map} +0 -0
  401. /package/dist/paperless/{p-937b2d74.entry.js.map → p-a26e1c6d.entry.js.map} +0 -0
  402. /package/dist/paperless/{p-be0c925e.entry.js.map → p-a5995873.entry.js.map} +0 -0
  403. /package/dist/paperless/{p-a587ff9f.entry.js.map → p-b18ef00d.entry.js.map} +0 -0
  404. /package/dist/paperless/{p-393eba2f.entry.js.map → p-b9cdcb32.entry.js.map} +0 -0
  405. /package/dist/paperless/{p-aab1cda1.entry.js.map → p-b9e42e93.entry.js.map} +0 -0
  406. /package/dist/paperless/{p-013cd7f9.entry.js.map → p-cada312c.entry.js.map} +0 -0
  407. /package/dist/paperless/{p-0348e450.entry.js.map → p-dc9bf641.entry.js.map} +0 -0
  408. /package/dist/paperless/{p-aa058967.entry.js.map → p-e18e29aa.entry.js.map} +0 -0
  409. /package/dist/paperless/{p-ece8998b.entry.js.map → p-e4ab1d73.entry.js.map} +0 -0
  410. /package/dist/paperless/{p-08ea38ad.entry.js.map → p-e74bd898.entry.js.map} +0 -0
  411. /package/dist/paperless/{p-23ca3688.entry.js.map → p-e78945ad.entry.js.map} +0 -0
  412. /package/dist/paperless/{p-cb7c509e.entry.js.map → p-ea329388.entry.js.map} +0 -0
@@ -2,11 +2,12 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
2
2
  import { a as autoUpdate, c as computePosition, o as offset, f as flip, s as shift } from './floating-ui.dom.esm.js';
3
3
  import { c as cva } from './index2.js';
4
4
  import { c as childOf } from './child-of.js';
5
- import { d as defineCustomElement$1 } from './dropdown-menu-container.component.js';
5
+ import { d as defineCustomElement$2 } from './dropdown-menu-container.component.js';
6
+ import { d as defineCustomElement$1 } from './portal.component.js';
6
7
 
7
- const dropdownComponentCss = ".flex{display:flex!important}.hidden{display:none!important}*{box-sizing:border-box}p-dropdown p-dropdown-menu-container{display:none}p-dropdown p-dropdown-menu-container[data-show]{display:flex}.visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.z-dropdown{z-index:200!important}.w-inherit{width:inherit!important}";
8
+ const dropdownComponentCss = ".flex{display:flex!important}.hidden{display:none!important}*{box-sizing:border-box}p-dropdown p-dropdown-menu-container{display:none}p-dropdown p-dropdown-menu-container[data-show]{display:flex}.visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.z-dropdown{z-index:200!important}";
8
9
 
9
- const dropdownContainer = cva(['z-dropdown'], {
10
+ const dropdownContainerClass = cva(['z-dropdown hidden'], {
10
11
  variants: {
11
12
  strategy: {
12
13
  absolute: 'absolute',
@@ -24,6 +25,7 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLEle
24
25
  this.offset = 8;
25
26
  this.strategy = 'absolute';
26
27
  this.show = false;
28
+ this.usePortal = false;
27
29
  this.calculateWidth = false;
28
30
  this.applyMaxWidth = true;
29
31
  this.applyFullWidth = true;
@@ -39,25 +41,44 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLEle
39
41
  this._update();
40
42
  }
41
43
  componentDidLoad() {
42
- this._checkButton();
44
+ this._checkButtons();
43
45
  }
44
46
  disconnectedCallback() {
45
47
  if (this._cleanup) {
46
48
  this._cleanup();
47
49
  this._cleanup = null;
48
50
  }
51
+ this._menu.remove();
52
+ }
53
+ componentDidRender() {
54
+ this._checkButtons();
49
55
  }
50
56
  render() {
51
- return (h(Host, { class: 'p-dropdown relative' }, h("div", { class: 'relative w-inherit', ref: ref => (this._trigger = ref), onClick: () => this._triggerClickHandler() }, h("slot", { name: 'trigger' })), h("p-dropdown-menu-container", { class: dropdownContainer({
57
+ const dropdownContainerProps = {
58
+ class: dropdownContainerClass({
52
59
  strategy: this.strategy,
53
- }), role: 'popover', maxWidth: !this.calculateWidth && this.applyMaxWidth, fullWidth: this.applyFullWidth && !this.applyMaxWidth, allowOverflow: this.allowOverflow, ref: el => this._load(el), "data-placement": this.placement, "data-strategy": this.strategy, onClick: () => this._containerClickHandler(), scrollable: this.scrollable }, h("slot", { name: 'items' }))));
60
+ }),
61
+ ref: el => this._load(el),
62
+ onClick: () => this._containerClickHandler(),
63
+ role: 'popover',
64
+ 'data-placement': this.placement,
65
+ 'data-strategy': this.strategy,
66
+ };
67
+ let dropdownContainer;
68
+ if (this.usePortal) {
69
+ dropdownContainer = (h("p-portal", Object.assign({}, dropdownContainerProps), h("p-dropdown-menu-container", { maxWidth: !this.calculateWidth && this.applyMaxWidth, fullWidth: this.applyFullWidth && !this.applyMaxWidth, allowOverflow: this.allowOverflow, scrollable: this.scrollable }, h("slot", { name: 'items' }))));
70
+ }
71
+ else {
72
+ dropdownContainer = (h("p-dropdown-menu-container", Object.assign({ maxWidth: !this.calculateWidth && this.applyMaxWidth, fullWidth: this.applyFullWidth && !this.applyMaxWidth, allowOverflow: this.allowOverflow, scrollable: this.scrollable }, dropdownContainerProps), h("slot", { name: 'items' })));
73
+ }
74
+ return (h(Host, { class: 'p-dropdown relative' }, h("div", { class: 'trigger', ref: ref => (this._trigger = ref), onClick: () => this._triggerClickHandler() }, h("slot", { name: 'trigger' })), dropdownContainer));
54
75
  }
55
- _checkButton(active = false) {
76
+ _checkButtons(active = false) {
56
77
  if (!this.applyChevron) {
57
78
  return;
58
79
  }
59
- const buttons = this._el.querySelectorAll('p-button');
60
- for (let button of buttons) {
80
+ const buttons = this._el.querySelectorAll('p-button[slot="trigger"]');
81
+ for (let button of [...buttons]) {
61
82
  button.chevronPosition = this.chevronPosition;
62
83
  button.chevron = this.chevronDirection
63
84
  ? this.chevronDirection
@@ -79,7 +100,7 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLEle
79
100
  this._show();
80
101
  }
81
102
  documentClickHandler({ target }) {
82
- if (!this._menu.hasAttribute('data-show') || childOf(target, this._el)) {
103
+ if (!this._menu.hasAttribute('data-show') || childOf(target, this._menu)) {
83
104
  return;
84
105
  }
85
106
  this._hide();
@@ -122,8 +143,10 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLEle
122
143
  }
123
144
  this._cleanup = autoUpdate(this._el, this._menu, () => this._update());
124
145
  this._menu.setAttribute('data-show', '');
146
+ this._menu.classList.remove('hidden');
147
+ this._menu.classList.add('flex');
125
148
  this.isOpen.emit(true);
126
- this._checkButton(true);
149
+ this._checkButtons(true);
127
150
  }
128
151
  _hide() {
129
152
  if (!this._loaded || this.show) {
@@ -135,8 +158,10 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLEle
135
158
  }
136
159
  // Hide the popover
137
160
  this._menu.removeAttribute('data-show');
161
+ this._menu.classList.remove('flex');
162
+ this._menu.classList.add('hidden');
138
163
  this.isOpen.emit(false);
139
- this._checkButton(false);
164
+ this._checkButtons(false);
140
165
  }
141
166
  _update() {
142
167
  if (!this._menu) {
@@ -164,6 +189,7 @@ const Dropdown = /*@__PURE__*/ proxyCustomElement(class Dropdown extends HTMLEle
164
189
  "offset": [2],
165
190
  "strategy": [1],
166
191
  "show": [4],
192
+ "usePortal": [4, "use-portal"],
167
193
  "calculateWidth": [4, "calculate-width"],
168
194
  "applyMaxWidth": [4, "apply-max-width"],
169
195
  "applyFullWidth": [4, "apply-full-width"],
@@ -181,7 +207,7 @@ function defineCustomElement() {
181
207
  if (typeof customElements === "undefined") {
182
208
  return;
183
209
  }
184
- const components = ["p-dropdown", "p-dropdown-menu-container"];
210
+ const components = ["p-dropdown", "p-dropdown-menu-container", "p-portal"];
185
211
  components.forEach(tagName => { switch (tagName) {
186
212
  case "p-dropdown":
187
213
  if (!customElements.get(tagName)) {
@@ -189,6 +215,11 @@ function defineCustomElement() {
189
215
  }
190
216
  break;
191
217
  case "p-dropdown-menu-container":
218
+ if (!customElements.get(tagName)) {
219
+ defineCustomElement$2();
220
+ }
221
+ break;
222
+ case "p-portal":
192
223
  if (!customElements.get(tagName)) {
193
224
  defineCustomElement$1();
194
225
  }
@@ -1 +1 @@
1
- {"file":"dropdown.component.js","mappings":";;;;;;AAAA,MAAM,oBAAoB,GAAG,8bAA8b;;ACuB3d,MAAM,iBAAiB,GAAG,GAAG,CAAC,CAAC,YAAY,CAAC,EAAE;EAC7C,QAAQ,EAAE;IACT,QAAQ,EAAE;MACT,QAAQ,EAAE,UAAU;MACpB,KAAK,EAAE,OAAO;KACd;GACD;CACD,CAAC,CAAC;MAMU,QAAQ;;;;;IAoFZ,YAAO,GAAG,KAAK,CAAC;qBAhFwB,cAAc;kBAKrC,CAAC;oBAKG,UAAU;gBAKf,KAAK;0BAKK,KAAK;yBAKN,IAAI;0BAKH,IAAI;yBAKL,KAAK;sBAKc,KAAK;uBAK1B,KAAK;+BAKG,KAAK;w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,OAAO;IACd,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;MAChB,OAAO;KACP;IAED,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;MACrC,SAAS,EAAE,IAAI,CAAC,SAAS;MACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;MACvB,UAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;KAClD,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE;MAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;MACzC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;QAC/B,GAAG,EAAE,GAAG,CAAC,IAAI;QACb,IAAI,EAAE,GAAG,CAAC,IAAI;OACd,CAAC,CAAC;KACH,CAAC,CAAC;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/molecules/dropdown/dropdown.component.scss?tag=p-dropdown","src/components/molecules/dropdown/dropdown.component.tsx"],"sourcesContent":["p-dropdown {\n\tp-dropdown-menu-container {\n\t\t@apply hidden;\n\n\t\t&[data-show] {\n\t\t\t@apply flex;\n\t\t}\n\t}\n}\n","import {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\toffset,\n\tPlacement,\n\tshift,\n\tStrategy,\n} from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { childOf } from '../../../utils/child-of';\n\nconst dropdownContainer = cva(['z-dropdown'], {\n\tvariants: {\n\t\tstrategy: {\n\t\t\tabsolute: 'absolute',\n\t\t\tfixed: 'fixed',\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-dropdown',\n\tstyleUrl: 'dropdown.component.scss',\n})\nexport class Dropdown {\n\t/**\n\t * The content of the dropdown menu\n\t */\n\t@Prop({ reflect: true }) placement: Placement = 'bottom-start';\n\n\t/**\n\t * The offset of the dropdown menu\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the dropdown placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether to show the dropdown menu\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to automatically calculate the width of the menu based on the trigger\n\t */\n\t@Prop() calculateWidth: boolean = false;\n\n\t/**\n\t * Wether to apply the max width\n\t */\n\t@Prop() applyMaxWidth: boolean = true;\n\n\t/**\n\t * Wether to apply the full width\n\t */\n\t@Prop() applyFullWidth: boolean = true;\n\n\t/**\n\t * Wether to allow overflow in the container\n\t */\n\t@Prop() allowOverflow: boolean = false;\n\n\t/**\n\t * Wether the dropdown container should be scrollable when the threshold is met.\n\t */\n\t@Prop() scrollable: boolean | 'default' | 'large' = false;\n\n\t/**\n\t * Wether to automatically close the dropdown menu after clicking inside\n\t */\n\t@Prop() insideClick: boolean = false;\n\n\t/**\n\t * Wether to automatically close the dropdown menu after clicking inside\n\t */\n\t@Prop() disableTriggerClick: boolean = false;\n\n\t/**\n\t * Wether to apply chevron automatically\n\t */\n\t@Prop() applyChevron: boolean = true;\n\n\t/**\n\t * Chevron position\n\t */\n\t@Prop() chevronPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * Chevron direction\n\t */\n\t@Prop() chevronDirection: 'up' | 'down';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t/**\n\t * Open change event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tisOpen: EventEmitter<boolean>;\n\n\tprivate _loaded = false;\n\tprivate _trigger: HTMLElement;\n\tprivate _menu: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis._checkButton();\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-dropdown relative'>\n\t\t\t\t<div\n\t\t\t\t\tclass='relative w-inherit'\n\t\t\t\t\tref={ref => (this._trigger = ref)}\n\t\t\t\t\tonClick={() => this._triggerClickHandler()}\n\t\t\t\t>\n\t\t\t\t\t<slot name='trigger' />\n\t\t\t\t</div>\n\t\t\t\t<p-dropdown-menu-container\n\t\t\t\t\tclass={dropdownContainer({\n\t\t\t\t\t\tstrategy: this.strategy,\n\t\t\t\t\t})}\n\t\t\t\t\trole='popover'\n\t\t\t\t\tmaxWidth={!this.calculateWidth && this.applyMaxWidth}\n\t\t\t\t\tfullWidth={this.applyFullWidth && !this.applyMaxWidth}\n\t\t\t\t\tallowOverflow={this.allowOverflow}\n\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t\tdata-placement={this.placement}\n\t\t\t\t\tdata-strategy={this.strategy}\n\t\t\t\t\tonClick={() => this._containerClickHandler()}\n\t\t\t\t\tscrollable={this.scrollable}\n\t\t\t\t>\n\t\t\t\t\t<slot name='items' />\n\t\t\t\t</p-dropdown-menu-container>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _checkButton(active: boolean = false) {\n\t\tif (!this.applyChevron) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst buttons = this._el.querySelectorAll<HTMLPButtonElement>('p-button');\n\t\tfor (let button of buttons) {\n\t\t\tbutton.chevronPosition = this.chevronPosition;\n\t\t\tbutton.chevron = this.chevronDirection\n\t\t\t\t? this.chevronDirection\n\t\t\t\t: this.placement.indexOf('top') >= 0\n\t\t\t\t? 'up'\n\t\t\t\t: 'down';\n\t\t\tbutton.disabled = this.disableTriggerClick;\n\t\t\tbutton.active = active;\n\t\t}\n\t}\n\n\t@Watch('show')\n\tprotected onShowChange(show) {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!show) {\n\t\t\tthis._hide();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler({ target }) {\n\t\tif (!this._menu.hasAttribute('data-show') || childOf(target, this._el)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\tprivate _containerClickHandler() {\n\t\tif (this.insideClick) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._menu.hasAttribute('data-show')) {\n\t\t\tthis._hide();\n\t\t}\n\t}\n\n\tprivate _triggerClickHandler() {\n\t\tif (this.disableTriggerClick) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._menu.hasAttribute('data-show')) {\n\t\t\tthis._hide();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._menu = popover;\n\t\tif (popover) {\n\t\t\tthis._update();\n\t\t\tthis._loaded = true;\n\n\t\t\tif (this.show) {\n\t\t\t\tsetTimeout(() => this._show(), 100);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make the popover visible\n\t\tif (this.calculateWidth) {\n\t\t\tthis._menu.style.width = `${this._trigger.clientWidth}px`;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._menu, () => this._update());\n\n\t\tthis._menu.setAttribute('data-show', '');\n\t\tthis.isOpen.emit(true);\n\t\tthis._checkButton(true);\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\t// Hide the popover\n\t\tthis._menu.removeAttribute('data-show');\n\t\tthis.isOpen.emit(false);\n\t\tthis._checkButton(false);\n\t}\n\n\tprivate _update() {\n\t\tif (!this._menu) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._menu, {\n\t\t\tplacement: this.placement,\n\t\t\tstrategy: this.strategy,\n\t\t\tmiddleware: [offset(this.offset), flip(), shift()],\n\t\t}).then(({ x, y, placement }) => {\n\t\t\tthis._menu.dataset.placement = placement;\n\t\t\tObject.assign(this._menu.style, {\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tleft: `${x}px`,\n\t\t\t});\n\t\t});\n\t}\n}\n"],"version":3}
1
+ {"file":"dropdown.component.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,2ZAA2Z;;ACuBxb,MAAM,sBAAsB,GAAG,GAAG,CAAC,CAAC,mBAAmB,CAAC,EAAE;EACzD,QAAQ,EAAE;IACT,QAAQ,EAAE;MACT,QAAQ,EAAE,UAAU;MACpB,KAAK,EAAE,OAAO;KACd;GACD;CACD,CAAC,CAAC;MAMU,QAAQ;;;;;IAyFZ,YAAO,GAAG,KAAK,CAAC;qBArFwB,cAAc;kBAKrC,CAAC;oBAKG,UAAU;gBAKf,KAAK;qBAKA,KAAK;0BAKA,KAAK;yBAKN,IAAI;0BAKH,IAAI;yBAKL,KAAK;sBAKc,KAAK;uBAK1B,KAAK;+BAKG,KAAK;wBAKZ,IAAI;2BAKO,KAAK;;;EAyBhD,qBAAqB;IACpB,IAAI,CAAC,OAAO,EAAE,CAAC;GACf;EAED,gBAAgB;IACf,IAAI,CAAC,aAAa,EAAE,CAAC;GACrB;EAED,oBAAoB;IACnB,IAAI,IAAI,CAAC,QAAQ,EAAE;MAClB,IAAI,CAAC,QAAQ,EAAE,CAAC;MAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;KACrB;IAED,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;GACpB;EAED,kBAAkB;IACjB,IAAI,CAAC,aAAa,EAAE,CAAC;GACrB;E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["src/components/molecules/dropdown/dropdown.component.scss?tag=p-dropdown","src/components/molecules/dropdown/dropdown.component.tsx"],"sourcesContent":["p-dropdown {\n\tp-dropdown-menu-container {\n\t\t@apply hidden;\n\n\t\t&[data-show] {\n\t\t\t@apply flex;\n\t\t}\n\t}\n}\n","import {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\toffset,\n\tPlacement,\n\tshift,\n\tStrategy,\n} from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { childOf } from '../../../utils/child-of';\n\nconst dropdownContainerClass = cva(['z-dropdown hidden'], {\n\tvariants: {\n\t\tstrategy: {\n\t\t\tabsolute: 'absolute',\n\t\t\tfixed: 'fixed',\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-dropdown',\n\tstyleUrl: 'dropdown.component.scss',\n})\nexport class Dropdown {\n\t/**\n\t * The content of the dropdown menu\n\t */\n\t@Prop({ reflect: true }) placement: Placement = 'bottom-start';\n\n\t/**\n\t * The offset of the dropdown menu\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the dropdown placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether to show the dropdown menu\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to use a portal for the dropdown container\n\t */\n\t@Prop() usePortal: boolean = false;\n\n\t/**\n\t * Wether to automatically calculate the width of the menu based on the trigger\n\t */\n\t@Prop() calculateWidth: boolean = false;\n\n\t/**\n\t * Wether to apply the max width\n\t */\n\t@Prop() applyMaxWidth: boolean = true;\n\n\t/**\n\t * Wether to apply the full width\n\t */\n\t@Prop() applyFullWidth: boolean = true;\n\n\t/**\n\t * Wether to allow overflow in the container\n\t */\n\t@Prop() allowOverflow: boolean = false;\n\n\t/**\n\t * Wether the dropdown container should be scrollable when the threshold is met.\n\t */\n\t@Prop() scrollable: boolean | 'default' | 'large' = false;\n\n\t/**\n\t * Wether to automatically close the dropdown menu after clicking inside\n\t */\n\t@Prop() insideClick: boolean = false;\n\n\t/**\n\t * Wether to automatically close the dropdown menu after clicking inside\n\t */\n\t@Prop() disableTriggerClick: boolean = false;\n\n\t/**\n\t * Wether to apply chevron automatically\n\t */\n\t@Prop() applyChevron: boolean = true;\n\n\t/**\n\t * Chevron position\n\t */\n\t@Prop() chevronPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * Chevron direction\n\t */\n\t@Prop() chevronDirection: 'up' | 'down';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t/**\n\t * Open change event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tisOpen: EventEmitter<boolean>;\n\n\tprivate _loaded = false;\n\tprivate _trigger: HTMLElement;\n\tprivate _menu: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis._checkButtons();\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\tthis._menu.remove();\n\t}\n\n\tcomponentDidRender() {\n\t\tthis._checkButtons();\n\t}\n\n\trender() {\n\t\tconst dropdownContainerProps = {\n\t\t\tclass: dropdownContainerClass({\n\t\t\t\tstrategy: this.strategy,\n\t\t\t}),\n\t\t\tref: el => this._load(el),\n\t\t\tonClick: () => this._containerClickHandler(),\n\t\t\trole: 'popover',\n\t\t\t'data-placement': this.placement,\n\t\t\t'data-strategy': this.strategy,\n\t\t};\n\n\t\tlet dropdownContainer: HTMLElement;\n\n\t\tif (this.usePortal) {\n\t\t\tdropdownContainer = (\n\t\t\t\t<p-portal {...dropdownContainerProps}>\n\t\t\t\t\t<p-dropdown-menu-container\n\t\t\t\t\t\tmaxWidth={!this.calculateWidth && this.applyMaxWidth}\n\t\t\t\t\t\tfullWidth={this.applyFullWidth && !this.applyMaxWidth}\n\t\t\t\t\t\tallowOverflow={this.allowOverflow}\n\t\t\t\t\t\tscrollable={this.scrollable}\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name='items' />\n\t\t\t\t\t</p-dropdown-menu-container>\n\t\t\t\t</p-portal>\n\t\t\t);\n\t\t} else {\n\t\t\tdropdownContainer = (\n\t\t\t\t<p-dropdown-menu-container\n\t\t\t\t\tmaxWidth={!this.calculateWidth && this.applyMaxWidth}\n\t\t\t\t\tfullWidth={this.applyFullWidth && !this.applyMaxWidth}\n\t\t\t\t\tallowOverflow={this.allowOverflow}\n\t\t\t\t\tscrollable={this.scrollable}\n\t\t\t\t\t{...dropdownContainerProps}\n\t\t\t\t>\n\t\t\t\t\t<slot name='items' />\n\t\t\t\t</p-dropdown-menu-container>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class='p-dropdown relative'>\n\t\t\t\t<div\n\t\t\t\t\tclass='trigger'\n\t\t\t\t\tref={ref => (this._trigger = ref)}\n\t\t\t\t\tonClick={() => this._triggerClickHandler()}\n\t\t\t\t>\n\t\t\t\t\t<slot name='trigger' />\n\t\t\t\t</div>\n\t\t\t\t{dropdownContainer}\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _checkButtons(active: boolean = false) {\n\t\tif (!this.applyChevron) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst buttons = this._el.querySelectorAll<HTMLPButtonElement>(\n\t\t\t'p-button[slot=\"trigger\"]'\n\t\t);\n\n\t\tfor (let button of [...buttons]) {\n\t\t\tbutton.chevronPosition = this.chevronPosition;\n\t\t\tbutton.chevron = this.chevronDirection\n\t\t\t\t? this.chevronDirection\n\t\t\t\t: this.placement.indexOf('top') >= 0\n\t\t\t\t? 'up'\n\t\t\t\t: 'down';\n\t\t\tbutton.disabled = this.disableTriggerClick;\n\t\t\tbutton.active = active;\n\t\t}\n\t}\n\n\t@Watch('show')\n\tprotected onShowChange(show) {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!show) {\n\t\t\tthis._hide();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler({ target }) {\n\t\tif (!this._menu.hasAttribute('data-show') || childOf(target, this._menu)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\tprivate _containerClickHandler() {\n\t\tif (this.insideClick) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._menu.hasAttribute('data-show')) {\n\t\t\tthis._hide();\n\t\t}\n\t}\n\n\tprivate _triggerClickHandler() {\n\t\tif (this.disableTriggerClick) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._menu.hasAttribute('data-show')) {\n\t\t\tthis._hide();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._menu = popover;\n\t\tif (popover) {\n\t\t\tthis._update();\n\t\t\tthis._loaded = true;\n\n\t\t\tif (this.show) {\n\t\t\t\tsetTimeout(() => this._show(), 100);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make the popover visible\n\t\tif (this.calculateWidth) {\n\t\t\tthis._menu.style.width = `${this._trigger.clientWidth}px`;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._menu, () => this._update());\n\n\t\tthis._menu.setAttribute('data-show', '');\n\t\tthis._menu.classList.remove('hidden');\n\t\tthis._menu.classList.add('flex');\n\n\t\tthis.isOpen.emit(true);\n\t\tthis._checkButtons(true);\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\t// Hide the popover\n\t\tthis._menu.removeAttribute('data-show');\n\t\tthis._menu.classList.remove('flex');\n\t\tthis._menu.classList.add('hidden');\n\n\t\tthis.isOpen.emit(false);\n\t\tthis._checkButtons(false);\n\t}\n\n\tprivate _update() {\n\t\tif (!this._menu) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._menu, {\n\t\t\tplacement: this.placement,\n\t\t\tstrategy: this.strategy,\n\t\t\tmiddleware: [offset(this.offset), flip(), shift()],\n\t\t}).then(({ x, y, placement }) => {\n\t\t\tthis._menu.dataset.placement = placement;\n\t\t\tObject.assign(this._menu.style, {\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tleft: `${x}px`,\n\t\t\t});\n\t\t});\n\t}\n}\n"],"version":3}
@@ -36,14 +36,11 @@ const InputGroup = /*@__PURE__*/ proxyCustomElement(class InputGroup extends HTM
36
36
  render() {
37
37
  var _a;
38
38
  const { hasHeaderSlot, helper, label, prefix, suffix, errorAndErrorIsNotBoolean, errorVariant, } = this._getSlotInfo();
39
- return (h(Host, { class: `p-input-group ${((_a = this.error) === null || _a === void 0 ? void 0 : _a.length) && 'error'} ${this.disabled && 'disabled'} ${this.focused && 'focused'} size-${this.size}` }, h("div", { class: "flex items-end justify-between" }, label && (h("div", { class: "input-label", onClick: () => this._focusInput() }, label, this.required && (h("span", { class: "ml-1 text-negative" }, "*")))), (helper || hasHeaderSlot) && (h("div", { class: "input-header" }, hasHeaderSlot && h("slot", { name: "header" }), helper && (h("p-helper", { class: `flex ${hasHeaderSlot ? 'ml-2' : ''}`, placement: "top-end" }, helper))))), h("p-tooltip", { class: "w-full", variant: "error-element", content: this.error, show: errorAndErrorIsNotBoolean &&
39
+ return (h(Host, { class: `p-input-group ${((_a = this.error) === null || _a === void 0 ? void 0 : _a.length) && 'error'} ${this.disabled && 'disabled'} ${this.focused && 'focused'} size-${this.size}` }, h("div", { class: 'flex items-end justify-between' }, label && (h("div", { class: 'input-label', onClick: () => this._focusInput() }, label, this.required && h("span", { class: 'ml-1 text-negative' }, "*"))), (helper || hasHeaderSlot) && (h("div", { class: 'input-header' }, hasHeaderSlot && h("slot", { name: 'header' }), helper && (h("p-helper", { class: `flex ${hasHeaderSlot ? 'ml-2' : ''}`, placement: 'top-end' }, helper))))), h("p-tooltip", { class: 'w-full', variant: 'error-element', content: this.error, show: errorAndErrorIsNotBoolean &&
40
40
  errorVariant === 'element' &&
41
- (this.forceShowTooltip || this._forceShowTooltip), enableUserInput: false }, h("div", { class: "content", slot: "trigger" }, (prefix ||
42
- (this.icon && this.iconPosition === 'start')) && (h("div", { class: `prefix size-${this.size}`, onClick: () => this._focusInput() }, this.icon && this.iconPosition === 'start' ? (h("p-icon", { class: "flex", variant: this.icon, rotate: this.iconRotate, flip: this.iconFlip })) : (prefix))), (suffix ||
43
- (errorAndErrorIsNotBoolean &&
44
- errorVariant === 'icon') ||
45
- (this.icon && this.iconPosition === 'end')) && (h("div", { class: `suffix size-${this.size}`, onClick: () => this._focusInput() }, errorAndErrorIsNotBoolean &&
46
- errorVariant === 'icon' ? (h("p-input-error", { error: this.error, forceShowTooltip: this.forceShowTooltip || this._forceShowTooltip })) : this.icon && this.iconPosition === 'end' ? (h("p-icon", { class: "flex", variant: this.icon, rotate: this.iconRotate, flip: this.iconFlip })) : (suffix))), h("slot", { name: "input" })))));
41
+ (this.forceShowTooltip || this._forceShowTooltip), enableUserInput: false }, h("div", { class: 'content', slot: 'trigger' }, (prefix || (this.icon && this.iconPosition === 'start')) && (h("div", { class: `prefix size-${this.size}`, onClick: () => this._focusInput() }, this.icon && this.iconPosition === 'start' ? (h("p-icon", { class: 'flex', variant: this.icon, rotate: this.iconRotate, flip: this.iconFlip })) : (prefix))), (suffix ||
42
+ (errorAndErrorIsNotBoolean && errorVariant === 'icon') ||
43
+ (this.icon && this.iconPosition === 'end')) && (h("div", { class: `suffix size-${this.size}`, onClick: () => this._focusInput() }, errorAndErrorIsNotBoolean && errorVariant === 'icon' ? (h("p-input-error", { error: this.error, forceShowTooltip: this.forceShowTooltip || this._forceShowTooltip })) : this.icon && this.iconPosition === 'end' ? (h("p-icon", { class: 'flex', variant: this.icon, rotate: this.iconRotate, flip: this.iconFlip })) : (suffix))), h("slot", { name: 'input' })))));
47
44
  }
48
45
  handleFocusIn() {
49
46
  this._forceShowTooltip = true;
@@ -96,13 +93,11 @@ const InputGroup = /*@__PURE__*/ proxyCustomElement(class InputGroup extends HTM
96
93
  const hasPrefixSlot = !!this._el.querySelector(':scope > [slot="prefix"]');
97
94
  const hasSuffixSlot = !!this._el.querySelector(':scope > [slot="suffix"]');
98
95
  const hasHeaderSlot = !!this._el.querySelector(':scope > [slot="header"]');
99
- const helper = hasHelperSlot ? h("slot", { name: "helper" }) : this.helper;
100
- const label = hasLabelSlot ? h("slot", { name: "label" }) : this.label;
101
- const prefix = hasPrefixSlot ? h("slot", { name: "prefix" }) : this.prefix;
102
- const suffix = hasSuffixSlot ? h("slot", { name: "suffix" }) : this.suffix;
103
- const errorAndErrorIsNotBoolean = this.error &&
104
- typeof this.error === 'string' &&
105
- this.error !== 'true';
96
+ const helper = hasHelperSlot ? h("slot", { name: 'helper' }) : this.helper;
97
+ const label = hasLabelSlot ? h("slot", { name: 'label' }) : this.label;
98
+ const prefix = hasPrefixSlot ? h("slot", { name: 'prefix' }) : this.prefix;
99
+ const suffix = hasSuffixSlot ? h("slot", { name: 'suffix' }) : this.suffix;
100
+ const errorAndErrorIsNotBoolean = this.error && typeof this.error === 'string' && this.error !== 'true';
106
101
  return {
107
102
  hasHelperSlot,
108
103
  hasLabelSlot,
@@ -114,7 +109,11 @@ const InputGroup = /*@__PURE__*/ proxyCustomElement(class InputGroup extends HTM
114
109
  prefix,
115
110
  suffix,
116
111
  errorAndErrorIsNotBoolean,
117
- errorVariant: this.errorVariant === 'auto' ? (this._el.offsetWidth <= 72 ? 'element' : 'icon') : this.errorVariant,
112
+ errorVariant: this.errorVariant === 'auto'
113
+ ? this._el.offsetWidth <= 72
114
+ ? 'element'
115
+ : 'icon'
116
+ : this.errorVariant,
118
117
  };
119
118
  }
120
119
  _focusInput() {
@@ -1 +1 @@
1
- {"file":"input-group.component.js","mappings":";;;;;;AAAA,MAAM,sBAAsB,GAAG,usuDAAusuD;;MCiBztuD,UAAU;;;;;IAwFd,qBAAgB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;gBApFd,QAAQ;;;;;;wBA8BH,OAAO;;;;;oBAyBF,KAAK;mBAKN,KAAK;4BAKI,KAAK;uBAKjB,OAAO;wBAKM,MAAM;6BAOvB,KAAK;;EAI1C,mBAAmB;IAClB,IAAI,CAAC,gBAAgB,EAAE,CAAC;GACxB;EAED,MAAM;;IACL,MAAM,EACL,aAAa,EACb,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM,EACN,yBAAyB,EACzB,YAAY,GACZ,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;IAExB,QACC,EAAC,IAAI,IACJ,KAAK,EAAE,iBAAiB,CAAA,MAAA,IAAI,CAAC,KAAK,0CAAE,MAAM,KAAI,OAAO,IACpD,IAAI,CAAC,QAAQ,IAAI,UAClB,IAAI,IAAI,CAAC,OAAO,IAAI,SAAS,SAAS,IAAI,CAAC,IAAI,EAAE,IAEjD,WAAK,KAAK,EAAC,gCAAgC,IACzC,KAAK,KACL,WACC,KAAK,EAAC,aAAa,EACnB,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,IAEhC,KAAK,EACL,IAAI,CAAC,QAAQ,KACb,YAAM,KAAK,EAAC,oBAAoB,QAAS,CACzC,CACI,CACN,EAEA,CAAC,MAAM,IAAI,aAAa,MACxB,WAAK,KAAK,EAAC,cAAc,IACvB,aAAa,IAAI,YAAM,IAAI,EAAC,QAAQ,GAAG,EACvC,MAAM,KACN,gBACC,KAAK,EAAE,QACN,aAAa,GAAG,MAAM,GAAG,EAC1B,EAAE,EACF,SAAS,EAAC,SAAS,IAElB,MAAM,CACG,CACX,CACI,CACN,CACI,EACN,iBACC,KAAK,E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AAC,KAAK,CAAC;IAChE,MAAM,MAAM,GAAG,aAAa,GAAG,YAAM,IAAI,EAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;IACpE,MAAM,MAAM,GAAG,aAAa,GAAG,YAAM,IAAI,EAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;IAEpE,MAAM,yBAAyB,GAC9B,IAAI,CAAC,KAAK;MACV,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ;MAC9B,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC;IAEvB,OAAO;MACN,aAAa;MACb,YAAY;MACZ,aAAa;MACb,aAAa;MACb,aAAa;MACb,MAAM;MACN,KAAK;MACL,MAAM;MACN,MAAM;MACN,yBAAyB;MACzB,YAAY,EAAE,IAAI,CAAC,YAAY,KAAK,MAAM,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,GAAG,SAAS,GAAG,MAAM,IAAI,IAAI,CAAC,YAAY;KAClH,CAAC;GACF;EAEO,WAAW;IAClB,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAC/D,KAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;GAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/molecules/input-group/input-group.component.scss?tag=p-input-group&encapsulation=shadow","src/components/molecules/input-group/input-group.component.tsx"],"sourcesContent":["@import '../../../style/form/mixins';\n\n@mixin slottedItems($prefix: false) {\n\t@include inputs($prefix, true) {\n\t\t@content;\n\t}\n}\n\n:host {\n\t@apply flex w-full flex-col;\n\t@apply outline-none #{!important};\n\n\t.input-label {\n\t\t@apply mb-[2px] text-xs font-semibold uppercase tracking-wider text-storm-vague;\n\t}\n\n\t.input-header {\n\t\t@apply mb-[2px] flex items-end gap-2;\n\t}\n\n\t.content {\n\t\t@apply flex w-full;\n\n\t\t.prefix,\n\t\t.suffix {\n\t\t\t@include inputDefaultState(false);\n\t\t\t@apply box-border flex-1 text-storm;\n\t\t\t@apply h-full;\n\t\t}\n\n\t\t.prefix {\n\t\t\t@apply rounded-br-none rounded-tr-none;\n\t\t\t@apply border-r-0 #{!important};\n\t\t\t@apply order-1;\n\t\t\t@apply pr-2;\n\t\t}\n\n\t\t.suffix {\n\t\t\t@apply rounded-bl-none rounded-tl-none;\n\t\t\t@apply order-3;\n\t\t\t@apply pl-2;\n\t\t\t@apply border-l-0 #{!important};\n\t\t}\n\n\t\t@include slottedItems() {\n\t\t\t@include inputDefaultState();\n\t\t\t@apply order-2;\n\t\t}\n\n\t\t@include slottedItems('.prefix') {\n\t\t\t@apply rounded-bl-none rounded-tl-none #{!important};\n\t\t\t@apply flex-auto;\n\t\t\t@apply border-l-0 pl-0 #{!important};\n\t\t}\n\n\t\t@include slottedItems('.suffix') {\n\t\t\t@apply rounded-br-none rounded-tr-none #{!important};\n\t\t\t@apply flex-auto;\n\t\t\t@apply border-r-0 pr-0 #{!important};\n\t\t}\n\t}\n}\n\n:host(.focused),\n:host([focused]),\n:host(:focus-within),\n:host(:focus) {\n\t@apply outline-none #{!important};\n\n\t.prefix,\n\t.suffix {\n\t\t@include inputFocusState();\n\t\t@apply text-indigo;\n\t}\n\n\t@include slottedItems() {\n\t\t@include inputFocusState();\n\t}\n}\n\n:host(.error),\n:host([error]) {\n\t.prefix,\n\t.suffix {\n\t\t@include inputErrorState();\n\t\t@apply text-negative;\n\t}\n\n\t.suffix {\n\t\t@apply items-start py-[calc(0.75rem-1px)];\n\t}\n\n\t@include slottedItems() {\n\t\t@include inputErrorState();\n\n\t\t&:focus,\n\t\t&:focus-within,\n\t\t&:focus-visible,\n\t\t&.focus,\n\t\t&[active],\n\t\t&.active {\n\t\t\t@include inputErrorState();\n\t\t}\n\t}\n}\n\n:host(.disabled),\n:host([disabled]) {\n\t.prefix,\n\t.suffix {\n\t\t@include inputDisabledState();\n\t}\n\n\t@include slottedItems() {\n\t\t@include inputDisabledState();\n\t\tpointer-events: none;\n\t}\n}\n\n:host(.size-small) {\n\t@include slottedItems() {\n\t\t@include inputSizeSmall();\n\t}\n}\n\n:host(.size-small.error),\n:host(.size-small[error]) {\n\t.suffix {\n\t\t@apply py-2;\n\t}\n}\n","import {\n Component,\n Element,\n h,\n Host,\n Listen,\n Prop,\n State\n} from '@stencil/core';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { IconFlipOptions, IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-input-group',\n\tstyleUrl: './input-group.component.scss',\n\tshadow: true,\n})\nexport class InputGroup {\n\t/**\n\t * The size of the input group\n\t */\n\t@Prop() size: 'small' | 'medium' = 'medium';\n\n\t/**\n\t * The prefix of the input group\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The suffix of the input group\n\t */\n\t@Prop() suffix: string;\n\n\t/**\n\t * Icon of the input group\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon flip\n\t */\n\t@Prop() iconFlip: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate: RotateOptions;\n\n\t/**\n\t * Icon position\n\t */\n\t@Prop() iconPosition: 'start' | 'end' = 'start';\n\n\t/**\n\t * The label of the input group\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the input group is focused\n\t */\n\t@Prop({ reflect: true }) focused: boolean = false;\n\n\t/**\n\t * Force show the error tooltip\n\t */\n\t@Prop({ reflect: true }) forceShowTooltip: boolean = false;\n\n\t/**\n\t * The method to use when focusing the input\n\t */\n\t@Prop() focusMethod: 'focus' | 'click' = 'focus';\n\n\t/**\n\t * The error variant to use\n\t */\n\t@Prop() errorVariant: 'auto' | 'suffix' | 'element' = 'auto';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _forceShowTooltip = false;\n\n\tprivate _whitelistedTags = ['input', 'textarea'];\n\n\tcomponentWillRender() {\n\t\tthis._setInputClasses();\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\thasHeaderSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t\terrorVariant,\n\t\t} = this._getSlotInfo();\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={`p-input-group ${this.error?.length && 'error'} ${\n\t\t\t\t\tthis.disabled && 'disabled'\n\t\t\t\t} ${this.focused && 'focused'} size-${this.size}`}\n\t\t\t>\n\t\t\t\t<div class=\"flex items-end justify-between\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"input-label\"\n\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t{this.required && (\n\t\t\t\t\t\t\t\t<span class=\"ml-1 text-negative\">*</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{(helper || hasHeaderSlot) && (\n\t\t\t\t\t\t<div class=\"input-header\">\n\t\t\t\t\t\t\t{hasHeaderSlot && <slot name=\"header\" />}\n\t\t\t\t\t\t\t{helper && (\n\t\t\t\t\t\t\t\t<p-helper\n\t\t\t\t\t\t\t\t\tclass={`flex ${\n\t\t\t\t\t\t\t\t\t\thasHeaderSlot ? 'ml-2' : ''\n\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\tplacement=\"top-end\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{helper}\n\t\t\t\t\t\t\t\t</p-helper>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<p-tooltip\n\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\tvariant=\"error-element\"\n\t\t\t\t\tcontent={this.error}\n\t\t\t\t\tshow={\n\t\t\t\t\t\terrorAndErrorIsNotBoolean &&\n\t\t\t\t\t\terrorVariant === 'element' &&\n\t\t\t\t\t\t(this.forceShowTooltip || this._forceShowTooltip)\n\t\t\t\t\t}\n\t\t\t\t\tenableUserInput={false}\n\t\t\t\t>\n\t\t\t\t\t<div class=\"content\" slot=\"trigger\">\n\t\t\t\t\t\t{(prefix ||\n\t\t\t\t\t\t\t(this.icon && this.iconPosition === 'start')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={`prefix size-${this.size}`}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.icon && this.iconPosition === 'start' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass=\"flex\"\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\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\t\tprefix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{(suffix ||\n\t\t\t\t\t\t\t(errorAndErrorIsNotBoolean &&\n\t\t\t\t\t\t\t\terrorVariant === 'icon') ||\n\t\t\t\t\t\t\t(this.icon && this.iconPosition === 'end')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={`suffix size-${this.size}`}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{errorAndErrorIsNotBoolean &&\n\t\t\t\t\t\t\t\terrorVariant === 'icon' ? (\n\t\t\t\t\t\t\t\t\t<p-input-error\n\t\t\t\t\t\t\t\t\t\terror={this.error}\n\t\t\t\t\t\t\t\t\t\tforceShowTooltip={\n\t\t\t\t\t\t\t\t\t\t\tthis.forceShowTooltip || this._forceShowTooltip\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) : this.icon && this.iconPosition === 'end' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass=\"flex\"\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\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\t\tsuffix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<slot name=\"input\" />\n\t\t\t\t\t</div>\n\t\t\t\t</p-tooltip>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('focusin')\n\thandleFocusIn() {\n\t\tthis._forceShowTooltip = true;\n\t}\n\n\t@Listen('focusout')\n\thandleFocusOut() {\n\t\tthis._forceShowTooltip = false;\n\t}\n\t/*\n With this, we shall hack the system in ways no one would ever have thought.\n\n <div class=\"pl-0 pr-0 border-l-0 border-r-0 rounded-tl-none rounded-bl-none rounded-tr-none rounded-br-none\"></div>\n */\n\tprivate _setInputClasses() {\n\t\tconst input = this._el.querySelector(':scope > [slot=\"input\"]');\n\n\t\tif (!input) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst tagName = input.tagName.toLowerCase();\n\t\tif (this._whitelistedTags.indexOf(tagName) === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!input.classList.contains('p-input')) {\n\t\t\tinput.classList.add('p-input');\n\t\t}\n\n\t\tconst { prefix, suffix, errorAndErrorIsNotBoolean, errorVariant } =\n\t\t\tthis._getSlotInfo();\n\n\t\tif (\n\t\t\tsuffix ||\n\t\t\t(errorAndErrorIsNotBoolean && errorVariant === 'icon') ||\n\t\t\t(this.icon && this.iconPosition === 'end')\n\t\t) {\n\t\t\tinput.classList.add(\n\t\t\t\t'border-r-0',\n\t\t\t\t'rounded-tr-none',\n\t\t\t\t'rounded-br-none',\n\t\t\t\t'pr-0'\n\t\t\t);\n\t\t} else {\n\t\t\tinput.classList.remove(\n\t\t\t\t'border-r-0',\n\t\t\t\t'rounded-tr-none',\n\t\t\t\t'rounded-br-none',\n\t\t\t\t'pr-0'\n\t\t\t);\n\t\t}\n\n\t\tif (prefix || (this.icon && this.iconPosition === 'start')) {\n\t\t\tinput.classList.add(\n\t\t\t\t'border-l-0',\n\t\t\t\t'rounded-tl-none',\n\t\t\t\t'rounded-bl-none',\n\t\t\t\t'pl-0'\n\t\t\t);\n\t\t} else {\n\t\t\tinput.classList.remove(\n\t\t\t\t'border-l-0',\n\t\t\t\t'rounded-tl-none',\n\t\t\t\t'rounded-bl-none',\n\t\t\t\t'pl-0'\n\t\t\t);\n\t\t}\n\n\t\tif (this.size === 'small' && !input.classList.contains('size-small')) {\n\t\t\tinput.classList.add('size-small');\n\t\t}\n\n\t\tif (this.size !== 'small' && input.classList.contains('size-small')) {\n\t\t\tinput.classList.remove('size-small');\n\t\t}\n\t}\n\n\tprivate _getSlotInfo() {\n\t\tconst hasHelperSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"helper\"]'\n\t\t);\n\t\tconst hasLabelSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"label\"]'\n\t\t);\n\t\tconst hasPrefixSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"prefix\"]'\n\t\t);\n\t\tconst hasSuffixSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"suffix\"]'\n\t\t);\n\t\tconst hasHeaderSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"header\"]'\n\t\t);\n\n\t\tconst helper = hasHelperSlot ? <slot name=\"helper\" /> : this.helper;\n\t\tconst label = hasLabelSlot ? <slot name=\"label\" /> : this.label;\n\t\tconst prefix = hasPrefixSlot ? <slot name=\"prefix\" /> : this.prefix;\n\t\tconst suffix = hasSuffixSlot ? <slot name=\"suffix\" /> : this.suffix;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\tthis.error &&\n\t\t\ttypeof this.error === 'string' &&\n\t\t\tthis.error !== 'true';\n\n\t\treturn {\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasPrefixSlot,\n\t\t\thasSuffixSlot,\n\t\t\thasHeaderSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t\terrorVariant: this.errorVariant === 'auto' ? (this._el.offsetWidth <= 72 ? 'element' : 'icon') : this.errorVariant,\n\t\t};\n\t}\n\n\tprivate _focusInput() {\n\t\tconst input = this._el.querySelector(':scope > [slot=\"input\"]');\n\t\t(input as HTMLElement)[this.focusMethod]();\n\t}\n}\n"],"version":3}
1
+ {"file":"input-group.component.js","mappings":";;;;;;AAAA,MAAM,sBAAsB,GAAG,usuDAAusuD;;MCiBztuD,UAAU;;;;;IAwFd,qBAAgB,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;gBApFd,QAAQ;;;;;;wBA8BH,OAAO;;;;;oBAyBF,KAAK;mBAKN,KAAK;4BAKI,KAAK;uBAKjB,OAAO;wBAKM,MAAM;6BAOvB,KAAK;;EAI1C,mBAAmB;IAClB,IAAI,CAAC,gBAAgB,EAAE,CAAC;GACxB;EAED,MAAM;;IACL,MAAM,EACL,aAAa,EACb,MAA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AAM;MACN,yBAAyB;MACzB,YAAY,EACX,IAAI,CAAC,YAAY,KAAK,MAAM;UACzB,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE;YACzB,SAAS;YACT,MAAM;UACP,IAAI,CAAC,YAAY;KACrB,CAAC;GACF;EAEO,WAAW;IAClB,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAC/D,KAAqB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;GAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/molecules/input-group/input-group.component.scss?tag=p-input-group&encapsulation=shadow","src/components/molecules/input-group/input-group.component.tsx"],"sourcesContent":["@import '../../../style/form/mixins';\n\n@mixin slottedItems($prefix: false) {\n\t@include inputs($prefix, true) {\n\t\t@content;\n\t}\n}\n\n:host {\n\t@apply flex w-full flex-col;\n\t@apply outline-none #{!important};\n\n\t.input-label {\n\t\t@apply mb-[2px] text-xs font-semibold uppercase tracking-wider text-storm-vague;\n\t}\n\n\t.input-header {\n\t\t@apply mb-[2px] flex items-end gap-2;\n\t}\n\n\t.content {\n\t\t@apply flex w-full;\n\n\t\t.prefix,\n\t\t.suffix {\n\t\t\t@include inputDefaultState(false);\n\t\t\t@apply box-border flex-1 text-storm;\n\t\t\t@apply h-full;\n\t\t}\n\n\t\t.prefix {\n\t\t\t@apply rounded-br-none rounded-tr-none;\n\t\t\t@apply border-r-0 #{!important};\n\t\t\t@apply order-1;\n\t\t\t@apply pr-2;\n\t\t}\n\n\t\t.suffix {\n\t\t\t@apply rounded-bl-none rounded-tl-none;\n\t\t\t@apply order-3;\n\t\t\t@apply pl-2;\n\t\t\t@apply border-l-0 #{!important};\n\t\t}\n\n\t\t@include slottedItems() {\n\t\t\t@include inputDefaultState();\n\t\t\t@apply order-2;\n\t\t}\n\n\t\t@include slottedItems('.prefix') {\n\t\t\t@apply rounded-bl-none rounded-tl-none #{!important};\n\t\t\t@apply flex-auto;\n\t\t\t@apply border-l-0 pl-0 #{!important};\n\t\t}\n\n\t\t@include slottedItems('.suffix') {\n\t\t\t@apply rounded-br-none rounded-tr-none #{!important};\n\t\t\t@apply flex-auto;\n\t\t\t@apply border-r-0 pr-0 #{!important};\n\t\t}\n\t}\n}\n\n:host(.focused),\n:host([focused]),\n:host(:focus-within),\n:host(:focus) {\n\t@apply outline-none #{!important};\n\n\t.prefix,\n\t.suffix {\n\t\t@include inputFocusState();\n\t\t@apply text-indigo;\n\t}\n\n\t@include slottedItems() {\n\t\t@include inputFocusState();\n\t}\n}\n\n:host(.error),\n:host([error]) {\n\t.prefix,\n\t.suffix {\n\t\t@include inputErrorState();\n\t\t@apply text-negative;\n\t}\n\n\t.suffix {\n\t\t@apply items-start py-[calc(0.75rem-1px)];\n\t}\n\n\t@include slottedItems() {\n\t\t@include inputErrorState();\n\n\t\t&:focus,\n\t\t&:focus-within,\n\t\t&:focus-visible,\n\t\t&.focus,\n\t\t&[active],\n\t\t&.active {\n\t\t\t@include inputErrorState();\n\t\t}\n\t}\n}\n\n:host(.disabled),\n:host([disabled]) {\n\t.prefix,\n\t.suffix {\n\t\t@include inputDisabledState();\n\t}\n\n\t@include slottedItems() {\n\t\t@include inputDisabledState();\n\t\tpointer-events: none;\n\t}\n}\n\n:host(.size-small) {\n\t@include slottedItems() {\n\t\t@include inputSizeSmall();\n\t}\n}\n\n:host(.size-small.error),\n:host(.size-small[error]) {\n\t.suffix {\n\t\t@apply py-2;\n\t}\n}\n","import {\n\tComponent,\n\tElement,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { IconFlipOptions, IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-input-group',\n\tstyleUrl: './input-group.component.scss',\n\tshadow: true,\n})\nexport class InputGroup {\n\t/**\n\t * The size of the input group\n\t */\n\t@Prop() size: 'small' | 'medium' = 'medium';\n\n\t/**\n\t * The prefix of the input group\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The suffix of the input group\n\t */\n\t@Prop() suffix: string;\n\n\t/**\n\t * Icon of the input group\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon flip\n\t */\n\t@Prop() iconFlip: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate: RotateOptions;\n\n\t/**\n\t * Icon position\n\t */\n\t@Prop() iconPosition: 'start' | 'end' = 'start';\n\n\t/**\n\t * The label of the input group\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the input group is focused\n\t */\n\t@Prop({ reflect: true }) focused: boolean = false;\n\n\t/**\n\t * Force show the error tooltip\n\t */\n\t@Prop({ reflect: true }) forceShowTooltip: boolean = false;\n\n\t/**\n\t * The method to use when focusing the input\n\t */\n\t@Prop() focusMethod: 'focus' | 'click' = 'focus';\n\n\t/**\n\t * The error variant to use\n\t */\n\t@Prop() errorVariant: 'auto' | 'suffix' | 'element' = 'auto';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _forceShowTooltip = false;\n\n\tprivate _whitelistedTags = ['input', 'textarea'];\n\n\tcomponentWillRender() {\n\t\tthis._setInputClasses();\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\thasHeaderSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t\terrorVariant,\n\t\t} = this._getSlotInfo();\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={`p-input-group ${this.error?.length && 'error'} ${\n\t\t\t\t\tthis.disabled && 'disabled'\n\t\t\t\t} ${this.focused && 'focused'} size-${this.size}`}\n\t\t\t>\n\t\t\t\t<div class='flex items-end justify-between'>\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass='input-label'\n\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t{this.required && <span class='ml-1 text-negative'>*</span>}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{(helper || hasHeaderSlot) && (\n\t\t\t\t\t\t<div class='input-header'>\n\t\t\t\t\t\t\t{hasHeaderSlot && <slot name='header' />}\n\t\t\t\t\t\t\t{helper && (\n\t\t\t\t\t\t\t\t<p-helper\n\t\t\t\t\t\t\t\t\tclass={`flex ${hasHeaderSlot ? 'ml-2' : ''}`}\n\t\t\t\t\t\t\t\t\tplacement='top-end'\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{helper}\n\t\t\t\t\t\t\t\t</p-helper>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<p-tooltip\n\t\t\t\t\tclass='w-full'\n\t\t\t\t\tvariant='error-element'\n\t\t\t\t\tcontent={this.error}\n\t\t\t\t\tshow={\n\t\t\t\t\t\terrorAndErrorIsNotBoolean &&\n\t\t\t\t\t\terrorVariant === 'element' &&\n\t\t\t\t\t\t(this.forceShowTooltip || this._forceShowTooltip)\n\t\t\t\t\t}\n\t\t\t\t\tenableUserInput={false}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass='content'\n\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t>\n\t\t\t\t\t\t{(prefix || (this.icon && this.iconPosition === 'start')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={`prefix size-${this.size}`}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.icon && this.iconPosition === 'start' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass='flex'\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\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\t\tprefix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{(suffix ||\n\t\t\t\t\t\t\t(errorAndErrorIsNotBoolean && errorVariant === 'icon') ||\n\t\t\t\t\t\t\t(this.icon && this.iconPosition === 'end')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={`suffix size-${this.size}`}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{errorAndErrorIsNotBoolean && errorVariant === 'icon' ? (\n\t\t\t\t\t\t\t\t\t<p-input-error\n\t\t\t\t\t\t\t\t\t\terror={this.error}\n\t\t\t\t\t\t\t\t\t\tforceShowTooltip={\n\t\t\t\t\t\t\t\t\t\t\tthis.forceShowTooltip || this._forceShowTooltip\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) : this.icon && this.iconPosition === 'end' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass='flex'\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\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\t\tsuffix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<slot name='input' />\n\t\t\t\t\t</div>\n\t\t\t\t</p-tooltip>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('focusin')\n\thandleFocusIn() {\n\t\tthis._forceShowTooltip = true;\n\t}\n\n\t@Listen('focusout')\n\thandleFocusOut() {\n\t\tthis._forceShowTooltip = false;\n\t}\n\t/*\n With this, we shall hack the system in ways no one would ever have thought.\n\n <div class=\"pl-0 pr-0 border-l-0 border-r-0 rounded-tl-none rounded-bl-none rounded-tr-none rounded-br-none\"></div>\n */\n\tprivate _setInputClasses() {\n\t\tconst input = this._el.querySelector(':scope > [slot=\"input\"]');\n\n\t\tif (!input) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst tagName = input.tagName.toLowerCase();\n\t\tif (this._whitelistedTags.indexOf(tagName) === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!input.classList.contains('p-input')) {\n\t\t\tinput.classList.add('p-input');\n\t\t}\n\n\t\tconst { prefix, suffix, errorAndErrorIsNotBoolean, errorVariant } =\n\t\t\tthis._getSlotInfo();\n\n\t\tif (\n\t\t\tsuffix ||\n\t\t\t(errorAndErrorIsNotBoolean && errorVariant === 'icon') ||\n\t\t\t(this.icon && this.iconPosition === 'end')\n\t\t) {\n\t\t\tinput.classList.add(\n\t\t\t\t'border-r-0',\n\t\t\t\t'rounded-tr-none',\n\t\t\t\t'rounded-br-none',\n\t\t\t\t'pr-0'\n\t\t\t);\n\t\t} else {\n\t\t\tinput.classList.remove(\n\t\t\t\t'border-r-0',\n\t\t\t\t'rounded-tr-none',\n\t\t\t\t'rounded-br-none',\n\t\t\t\t'pr-0'\n\t\t\t);\n\t\t}\n\n\t\tif (prefix || (this.icon && this.iconPosition === 'start')) {\n\t\t\tinput.classList.add(\n\t\t\t\t'border-l-0',\n\t\t\t\t'rounded-tl-none',\n\t\t\t\t'rounded-bl-none',\n\t\t\t\t'pl-0'\n\t\t\t);\n\t\t} else {\n\t\t\tinput.classList.remove(\n\t\t\t\t'border-l-0',\n\t\t\t\t'rounded-tl-none',\n\t\t\t\t'rounded-bl-none',\n\t\t\t\t'pl-0'\n\t\t\t);\n\t\t}\n\n\t\tif (this.size === 'small' && !input.classList.contains('size-small')) {\n\t\t\tinput.classList.add('size-small');\n\t\t}\n\n\t\tif (this.size !== 'small' && input.classList.contains('size-small')) {\n\t\t\tinput.classList.remove('size-small');\n\t\t}\n\t}\n\n\tprivate _getSlotInfo() {\n\t\tconst hasHelperSlot = !!this._el.querySelector(':scope > [slot=\"helper\"]');\n\t\tconst hasLabelSlot = !!this._el.querySelector(':scope > [slot=\"label\"]');\n\t\tconst hasPrefixSlot = !!this._el.querySelector(':scope > [slot=\"prefix\"]');\n\t\tconst hasSuffixSlot = !!this._el.querySelector(':scope > [slot=\"suffix\"]');\n\t\tconst hasHeaderSlot = !!this._el.querySelector(':scope > [slot=\"header\"]');\n\n\t\tconst helper = hasHelperSlot ? <slot name='helper' /> : this.helper;\n\t\tconst label = hasLabelSlot ? <slot name='label' /> : this.label;\n\t\tconst prefix = hasPrefixSlot ? <slot name='prefix' /> : this.prefix;\n\t\tconst suffix = hasSuffixSlot ? <slot name='suffix' /> : this.suffix;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\tthis.error && typeof this.error === 'string' && this.error !== 'true';\n\n\t\treturn {\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasPrefixSlot,\n\t\t\thasSuffixSlot,\n\t\t\thasHeaderSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t\terrorVariant:\n\t\t\t\tthis.errorVariant === 'auto'\n\t\t\t\t\t? this._el.offsetWidth <= 72\n\t\t\t\t\t\t? 'element'\n\t\t\t\t\t\t: 'icon'\n\t\t\t\t\t: this.errorVariant,\n\t\t};\n\t}\n\n\tprivate _focusInput() {\n\t\tconst input = this._el.querySelector(':scope > [slot=\"input\"]');\n\t\t(input as HTMLElement)[this.focusMethod]();\n\t}\n}\n"],"version":3}
@@ -1,12 +1,13 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { c as childOf } from './child-of.js';
3
- import { _ as _typeof, g as getUTCWeekYear, s as startOfUTCWeek, a as startOfUTCISOWeek, r as requiredArgs, t as toDate, b as getUTCWeek, c as toInteger, e as getUTCISOWeek, f as getDefaultOptions, l as longFormatters, h as subMilliseconds, i as getTimezoneOffsetInMilliseconds, j as locale, k as isProtectedWeekYearToken, m as throwProtectedError, n as isProtectedDayOfYearToken, o as isValid, p as isBefore, q as isAfter, u as startOfDay, v as isSameDay, w as format, d as defineCustomElement$9 } from './calendar.component.js';
4
- import { d as defineCustomElement$8 } from './dropdown.component.js';
5
- import { d as defineCustomElement$7 } from './dropdown-menu-container.component.js';
6
- import { d as defineCustomElement$6 } from './helper.component.js';
7
- import { d as defineCustomElement$5 } from './icon.component.js';
8
- import { d as defineCustomElement$4 } from './input-error.component.js';
9
- import { d as defineCustomElement$3 } from './input-group.component.js';
3
+ import { _ as _typeof, g as getUTCWeekYear, s as startOfUTCWeek, a as startOfUTCISOWeek, r as requiredArgs, t as toDate, b as getUTCWeek, c as toInteger, e as getUTCISOWeek, f as getDefaultOptions, l as longFormatters, h as subMilliseconds, i as getTimezoneOffsetInMilliseconds, j as locale, k as isProtectedWeekYearToken, m as throwProtectedError, n as isProtectedDayOfYearToken, o as isValid, p as isBefore, q as isAfter, u as startOfDay, v as isSameDay, w as format, d as defineCustomElement$a } from './calendar.component.js';
4
+ import { d as defineCustomElement$9 } from './dropdown.component.js';
5
+ import { d as defineCustomElement$8 } from './dropdown-menu-container.component.js';
6
+ import { d as defineCustomElement$7 } from './helper.component.js';
7
+ import { d as defineCustomElement$6 } from './icon.component.js';
8
+ import { d as defineCustomElement$5 } from './input-error.component.js';
9
+ import { d as defineCustomElement$4 } from './input-group.component.js';
10
+ import { d as defineCustomElement$3 } from './portal.component.js';
10
11
  import { d as defineCustomElement$2 } from './tooltip.component.js';
11
12
 
12
13
  /**
@@ -3084,7 +3085,7 @@ function defineCustomElement$1() {
3084
3085
  if (typeof customElements === "undefined") {
3085
3086
  return;
3086
3087
  }
3087
- const components = ["p-datepicker", "p-calendar", "p-dropdown", "p-dropdown-menu-container", "p-helper", "p-icon", "p-input-error", "p-input-group", "p-tooltip"];
3088
+ const components = ["p-datepicker", "p-calendar", "p-dropdown", "p-dropdown-menu-container", "p-helper", "p-icon", "p-input-error", "p-input-group", "p-portal", "p-tooltip"];
3088
3089
  components.forEach(tagName => { switch (tagName) {
3089
3090
  case "p-datepicker":
3090
3091
  if (!customElements.get(tagName)) {
@@ -3093,35 +3094,40 @@ function defineCustomElement$1() {
3093
3094
  break;
3094
3095
  case "p-calendar":
3095
3096
  if (!customElements.get(tagName)) {
3096
- defineCustomElement$9();
3097
+ defineCustomElement$a();
3097
3098
  }
3098
3099
  break;
3099
3100
  case "p-dropdown":
3100
3101
  if (!customElements.get(tagName)) {
3101
- defineCustomElement$8();
3102
+ defineCustomElement$9();
3102
3103
  }
3103
3104
  break;
3104
3105
  case "p-dropdown-menu-container":
3105
3106
  if (!customElements.get(tagName)) {
3106
- defineCustomElement$7();
3107
+ defineCustomElement$8();
3107
3108
  }
3108
3109
  break;
3109
3110
  case "p-helper":
3110
3111
  if (!customElements.get(tagName)) {
3111
- defineCustomElement$6();
3112
+ defineCustomElement$7();
3112
3113
  }
3113
3114
  break;
3114
3115
  case "p-icon":
3115
3116
  if (!customElements.get(tagName)) {
3116
- defineCustomElement$5();
3117
+ defineCustomElement$6();
3117
3118
  }
3118
3119
  break;
3119
3120
  case "p-input-error":
3120
3121
  if (!customElements.get(tagName)) {
3121
- defineCustomElement$4();
3122
+ defineCustomElement$5();
3122
3123
  }
3123
3124
  break;
3124
3125
  case "p-input-group":
3126
+ if (!customElements.get(tagName)) {
3127
+ defineCustomElement$4();
3128
+ }
3129
+ break;
3130
+ case "p-portal":
3125
3131
  if (!customElements.get(tagName)) {
3126
3132
  defineCustomElement$3();
3127
3133
  }