@paperless/core 2.13.2 → 2.13.4

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 (177) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/build/index.esm.js +1 -1
  3. package/dist/build/index.esm.js.map +1 -1
  4. package/dist/build/{p-caf7588c.js → p-2b4b5267.js} +1 -1
  5. package/dist/build/{p-64ec4159.entry.js → p-2efda14f.entry.js} +2 -2
  6. package/dist/{paperless/p-80f058e5.entry.js → build/p-78e5a085.entry.js} +2 -2
  7. package/dist/build/{p-69fea92c.entry.js → p-93a93d0f.entry.js} +2 -2
  8. package/dist/build/p-93a93d0f.entry.js.map +1 -0
  9. package/dist/build/{p-5fd4c545.entry.js → p-9cf9511c.entry.js} +2 -2
  10. package/dist/build/p-9cf9511c.entry.js.map +1 -0
  11. package/dist/build/p-ad24ad2d.entry.js +2 -0
  12. package/dist/build/p-ad24ad2d.entry.js.map +1 -0
  13. package/dist/build/p-e09980d3.entry.js +2 -0
  14. package/dist/build/p-e09980d3.entry.js.map +1 -0
  15. package/dist/build/p-empty-state.p-floating-menu-container.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.esm.js.map +1 -1
  16. package/dist/build/p-pagination.p-pagination-pages.p-pagination-size.entry.esm.js.map +1 -1
  17. package/dist/build/p-select.entry.esm.js.map +1 -1
  18. package/dist/build/p-table.entry.esm.js.map +1 -1
  19. package/dist/build/p-vyRrSf5s.js +2 -0
  20. package/dist/build/p-vyRrSf5s.js.map +1 -0
  21. package/dist/build/paperless.esm.js +1 -1
  22. package/dist/cjs/constants-1Wc57Pbb.js +14 -0
  23. package/dist/cjs/constants-1Wc57Pbb.js.map +1 -0
  24. package/dist/cjs/index.cjs.js +6 -2
  25. package/dist/cjs/index.cjs.js.map +1 -1
  26. package/dist/cjs/p-checkbox_4.cjs.entry.js +1 -1
  27. package/dist/cjs/p-empty-state.p-floating-menu-container.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.cjs.js.map +1 -1
  28. package/dist/cjs/p-empty-state_8.cjs.entry.js +5 -5
  29. package/dist/cjs/p-empty-state_8.cjs.entry.js.map +1 -1
  30. package/dist/cjs/p-helper_2.cjs.entry.js +1 -1
  31. package/dist/cjs/p-pagination.p-pagination-pages.p-pagination-size.entry.cjs.js.map +1 -1
  32. package/dist/cjs/p-pagination_3.cjs.entry.js +15 -15
  33. package/dist/cjs/p-pagination_3.cjs.entry.js.map +1 -1
  34. package/dist/cjs/p-select.cjs.entry.js +6 -5
  35. package/dist/cjs/p-select.cjs.entry.js.map +1 -1
  36. package/dist/cjs/p-select.entry.cjs.js.map +1 -1
  37. package/dist/cjs/p-table.cjs.entry.js +6 -6
  38. package/dist/cjs/p-table.cjs.entry.js.map +1 -1
  39. package/dist/cjs/p-table.entry.cjs.js.map +1 -1
  40. package/dist/collection/components/atoms/tooltip/tooltip.component.css +1 -1
  41. package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -1
  42. package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js +4 -3
  43. package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js.map +1 -1
  44. package/dist/collection/components/molecules/pagination/pagination/pagination.component.js +8 -8
  45. package/dist/collection/components/molecules/pagination/pagination/pagination.component.js.map +1 -1
  46. package/dist/collection/components/molecules/pagination/size/pagination-size.component.js +10 -10
  47. package/dist/collection/components/molecules/pagination/size/pagination-size.component.js.map +1 -1
  48. package/dist/collection/components/molecules/select/select.component.js +7 -6
  49. package/dist/collection/components/molecules/select/select.component.js.map +1 -1
  50. package/dist/collection/components/molecules/table/footer/table-footer.component.js +7 -7
  51. package/dist/collection/components/molecules/table/footer/table-footer.component.js.map +1 -1
  52. package/dist/collection/components/organisms/table/table.component.js +8 -8
  53. package/dist/collection/components/organisms/table/table.component.js.map +1 -1
  54. package/dist/collection/tailwind/theme/z-index.js +2 -2
  55. package/dist/collection/tailwind/theme/z-index.js.map +1 -1
  56. package/dist/collection/utils/constants.js +6 -0
  57. package/dist/collection/utils/constants.js.map +1 -0
  58. package/dist/collection/utils/index.js +1 -0
  59. package/dist/collection/utils/index.js.map +1 -1
  60. package/dist/components/index.js +3 -2
  61. package/dist/components/index.js.map +1 -1
  62. package/dist/components/{p-D-zWGvwF.js → p-BFQL_bAk.js} +12 -14
  63. package/dist/components/p-BFQL_bAk.js.map +1 -0
  64. package/dist/components/{p-DBg0q8YP.js → p-BWP1J8P7.js} +6 -6
  65. package/dist/components/{p-DBg0q8YP.js.map → p-BWP1J8P7.js.map} +1 -1
  66. package/dist/components/{p-Bg3-_c4v.js → p-ByBq4ZO0.js} +3 -3
  67. package/dist/components/{p-Bg3-_c4v.js.map → p-ByBq4ZO0.js.map} +1 -1
  68. package/dist/components/{p-Ce9I3qVv.js → p-CBjkQAGw.js} +11 -10
  69. package/dist/components/p-CBjkQAGw.js.map +1 -0
  70. package/dist/components/{p-1TpRsovb.js → p-CUPpa-ib.js} +4 -4
  71. package/dist/components/{p-1TpRsovb.js.map → p-CUPpa-ib.js.map} +1 -1
  72. package/dist/components/{p-FkqC-SVE.js → p-CVo3m-zN.js} +11 -10
  73. package/dist/components/p-CVo3m-zN.js.map +1 -0
  74. package/dist/components/{p-DhG7TpID.js → p-CWsTTbrU.js} +5 -4
  75. package/dist/components/p-CWsTTbrU.js.map +1 -0
  76. package/dist/components/{p-CAvUntoE.js → p-CeM-_6CM.js} +3 -3
  77. package/dist/components/{p-CAvUntoE.js.map → p-CeM-_6CM.js.map} +1 -1
  78. package/dist/components/{p-CcbnUOou.js → p-CsS0Qh_I.js} +3 -3
  79. package/dist/components/{p-CcbnUOou.js.map → p-CsS0Qh_I.js.map} +1 -1
  80. package/dist/components/{p-BgJXDL3C.js → p-DRR3gR1w.js} +3 -3
  81. package/dist/components/{p-BgJXDL3C.js.map → p-DRR3gR1w.js.map} +1 -1
  82. package/dist/components/{p-DWSMDsi3.js → p-Hk6_uWf_.js} +5 -5
  83. package/dist/components/{p-DWSMDsi3.js.map → p-Hk6_uWf_.js.map} +1 -1
  84. package/dist/components/p-attachment.js +3 -3
  85. package/dist/components/p-calendar.js +1 -1
  86. package/dist/components/p-datepicker.js +6 -6
  87. package/dist/components/p-dropdown.js +1 -1
  88. package/dist/components/p-field-container.js +1 -1
  89. package/dist/components/p-field.js +1 -1
  90. package/dist/components/p-helper.js +1 -1
  91. package/dist/components/p-pagination-pages.js +1 -1
  92. package/dist/components/p-pagination-size.js +1 -1
  93. package/dist/components/p-pagination.js +1 -1
  94. package/dist/components/p-profile.js +1 -1
  95. package/dist/components/p-select.js +11 -10
  96. package/dist/components/p-select.js.map +1 -1
  97. package/dist/components/p-table-footer.js +1 -1
  98. package/dist/components/p-table-header.js +1 -1
  99. package/dist/components/p-table.js +16 -15
  100. package/dist/components/p-table.js.map +1 -1
  101. package/dist/components/p-tooltip.js +1 -1
  102. package/dist/components/p-vyRrSf5s.js +10 -0
  103. package/dist/components/p-vyRrSf5s.js.map +1 -0
  104. package/dist/esm/constants-vyRrSf5s.js +10 -0
  105. package/dist/esm/constants-vyRrSf5s.js.map +1 -0
  106. package/dist/esm/index.js +3 -2
  107. package/dist/esm/index.js.map +1 -1
  108. package/dist/esm/p-checkbox_4.entry.js +1 -1
  109. package/dist/esm/p-empty-state.p-floating-menu-container.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.js.map +1 -1
  110. package/dist/esm/p-empty-state_8.entry.js +5 -5
  111. package/dist/esm/p-empty-state_8.entry.js.map +1 -1
  112. package/dist/esm/p-helper_2.entry.js +1 -1
  113. package/dist/esm/p-pagination.p-pagination-pages.p-pagination-size.entry.js.map +1 -1
  114. package/dist/esm/p-pagination_3.entry.js +15 -15
  115. package/dist/esm/p-pagination_3.entry.js.map +1 -1
  116. package/dist/esm/p-select.entry.js +6 -5
  117. package/dist/esm/p-select.entry.js.map +1 -1
  118. package/dist/esm/p-table.entry.js +6 -6
  119. package/dist/esm/p-table.entry.js.map +1 -1
  120. package/dist/index.html +1 -1
  121. package/dist/paperless/index.esm.js +1 -1
  122. package/dist/paperless/index.esm.js.map +1 -1
  123. package/dist/paperless/{p-64ec4159.entry.js → p-2efda14f.entry.js} +2 -2
  124. package/dist/{build/p-80f058e5.entry.js → paperless/p-78e5a085.entry.js} +2 -2
  125. package/dist/paperless/{p-69fea92c.entry.js → p-93a93d0f.entry.js} +2 -2
  126. package/dist/paperless/p-93a93d0f.entry.js.map +1 -0
  127. package/dist/paperless/{p-5fd4c545.entry.js → p-9cf9511c.entry.js} +2 -2
  128. package/dist/paperless/p-9cf9511c.entry.js.map +1 -0
  129. package/dist/paperless/p-ad24ad2d.entry.js +2 -0
  130. package/dist/paperless/p-ad24ad2d.entry.js.map +1 -0
  131. package/dist/paperless/p-e09980d3.entry.js +2 -0
  132. package/dist/paperless/p-e09980d3.entry.js.map +1 -0
  133. package/dist/paperless/p-empty-state.p-floating-menu-container.p-table-cell.p-table-container.p-table-footer.p-table-header.p-table-row.p-table-row-actions-container.entry.esm.js.map +1 -1
  134. package/dist/paperless/p-pagination.p-pagination-pages.p-pagination-size.entry.esm.js.map +1 -1
  135. package/dist/paperless/p-select.entry.esm.js.map +1 -1
  136. package/dist/paperless/p-table.entry.esm.js.map +1 -1
  137. package/dist/paperless/p-vyRrSf5s.js +2 -0
  138. package/dist/paperless/p-vyRrSf5s.js.map +1 -0
  139. package/dist/paperless/paperless.esm.js +1 -1
  140. package/dist/sw.js +1 -1
  141. package/dist/sw.js.map +1 -1
  142. package/dist/tailwind/theme/z-index.ts +4 -4
  143. package/dist/types/tailwind/theme/z-index.d.ts +2 -2
  144. package/dist/types/utils/constants.d.ts +3 -0
  145. package/dist/types/utils/index.d.ts +1 -0
  146. package/package.json +1 -1
  147. package/dist/build/p-5fd4c545.entry.js.map +0 -1
  148. package/dist/build/p-69fea92c.entry.js.map +0 -1
  149. package/dist/build/p-7d4ba7b3.entry.js +0 -2
  150. package/dist/build/p-7d4ba7b3.entry.js.map +0 -1
  151. package/dist/build/p-DOp5eUxu.js +0 -2
  152. package/dist/build/p-DOp5eUxu.js.map +0 -1
  153. package/dist/build/p-b6db4300.entry.js +0 -2
  154. package/dist/build/p-b6db4300.entry.js.map +0 -1
  155. package/dist/cjs/constants-BmCCabnv.js +0 -10
  156. package/dist/cjs/constants-BmCCabnv.js.map +0 -1
  157. package/dist/collection/components/molecules/pagination/size/constants.js +0 -3
  158. package/dist/collection/components/molecules/pagination/size/constants.js.map +0 -1
  159. package/dist/components/p-Ce9I3qVv.js.map +0 -1
  160. package/dist/components/p-D-zWGvwF.js.map +0 -1
  161. package/dist/components/p-DhG7TpID.js.map +0 -1
  162. package/dist/components/p-FkqC-SVE.js.map +0 -1
  163. package/dist/esm/constants-DOp5eUxu.js +0 -7
  164. package/dist/esm/constants-DOp5eUxu.js.map +0 -1
  165. package/dist/paperless/p-5fd4c545.entry.js.map +0 -1
  166. package/dist/paperless/p-69fea92c.entry.js.map +0 -1
  167. package/dist/paperless/p-7d4ba7b3.entry.js +0 -2
  168. package/dist/paperless/p-7d4ba7b3.entry.js.map +0 -1
  169. package/dist/paperless/p-DOp5eUxu.js +0 -2
  170. package/dist/paperless/p-DOp5eUxu.js.map +0 -1
  171. package/dist/paperless/p-b6db4300.entry.js +0 -2
  172. package/dist/paperless/p-b6db4300.entry.js.map +0 -1
  173. package/dist/types/components/molecules/pagination/size/constants.d.ts +0 -2
  174. /package/dist/build/{p-64ec4159.entry.js.map → p-2efda14f.entry.js.map} +0 -0
  175. /package/dist/build/{p-80f058e5.entry.js.map → p-78e5a085.entry.js.map} +0 -0
  176. /package/dist/paperless/{p-64ec4159.entry.js.map → p-2efda14f.entry.js.map} +0 -0
  177. /package/dist/paperless/{p-80f058e5.entry.js.map → p-78e5a085.entry.js.map} +0 -0
@@ -1,16 +1,17 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h } from './p-Dgl2kvBS.js';
2
2
  import { c as cva } from './p-CBWjHURv.js';
3
- import { d as defineCustomElement$1, a as defaultSize, b as defaultSizeOptions } from './p-D-zWGvwF.js';
4
3
  import { T as ThemedHost } from './p-7QA93RrV.js';
4
+ import { P as PAGINATION_DEFAULT_PAGE_SIZE, a as PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS } from './p-vyRrSf5s.js';
5
5
  import { d as defineCustomElement$a } from './p-D1ZRTCkT.js';
6
6
  import { d as defineCustomElement$9 } from './p-DzWmipVp.js';
7
- import { d as defineCustomElement$8 } from './p-CcbnUOou.js';
7
+ import { d as defineCustomElement$8 } from './p-CsS0Qh_I.js';
8
8
  import { d as defineCustomElement$7 } from './p-D2igmK5l.js';
9
9
  import { d as defineCustomElement$6 } from './p-CLLXCnKM.js';
10
10
  import { d as defineCustomElement$5 } from './p-BHphGfv6.js';
11
- import { d as defineCustomElement$4 } from './p-FkqC-SVE.js';
12
- import { d as defineCustomElement$3 } from './p-DhG7TpID.js';
11
+ import { d as defineCustomElement$4 } from './p-CVo3m-zN.js';
12
+ import { d as defineCustomElement$3 } from './p-CWsTTbrU.js';
13
13
  import { d as defineCustomElement$2 } from './p-CIRFeGiK.js';
14
+ import { d as defineCustomElement$1 } from './p-BFQL_bAk.js';
14
15
 
15
16
  const tableFooterComponentCss = ".sticky{position:sticky!important}.z-\\[1\\]{z-index:1!important}*{box-sizing:border-box}:host{--tw-content:\"\";position:sticky;z-index:1}.static{position:static!important}.relative{position:relative!important}.z-\\[2\\]{z-index:2!important}.flex{display:flex!important}.hidden{display:none!important}.w-full{width:100%!important}.justify-center{justify-content:center!important}.px-6{padding-left:1.5rem!important;padding-right:1.5rem!important}.py-8{padding-bottom:2rem!important;padding-top:2rem!important}.after\\:absolute:after{content:var(--tw-content)!important;position:absolute!important}.after\\:left-0:after{content:var(--tw-content)!important;left:0!important}.after\\:top-0:after{content:var(--tw-content)!important;top:0!important}.after\\:z-\\[0\\]:after{content:var(--tw-content)!important;z-index:0!important}.after\\:h-full:after{content:var(--tw-content)!important;height:100%!important}.after\\:w-full:after{content:var(--tw-content)!important;width:100%!important}.after\\:bg-gradient-to-t:after{background-image:linear-gradient(to top,var(--tw-gradient-stops))!important;content:var(--tw-content)!important}.after\\:from-white:after{--tw-gradient-from:#fff var(--tw-gradient-from-position)!important;--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position)!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)!important;content:var(--tw-content)!important}.after\\:via-white\\/80:after{--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position)!important;--tw-gradient-stops:var(--tw-gradient-from),hsla(0,0%,100%,.8) var(--tw-gradient-via-position),var(--tw-gradient-to)!important;content:var(--tw-content)!important}.after\\:to-transparent:after{--tw-gradient-to:transparent var(--tw-gradient-to-position)!important;content:var(--tw-content)!important}.after\\:opacity-0:after{content:var(--tw-content)!important;opacity:0!important}.after\\:opacity-100:after{content:var(--tw-content)!important;opacity:1!important}.after\\:transition-opacity:after{content:var(--tw-content)!important;transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.dark\\:after\\:from-hurricane-700:where(:host([data-theme=dark]),:host([data-theme=dark]) *):after{--tw-gradient-from:#232934 var(--tw-gradient-from-position)!important;--tw-gradient-to:rgba(35,41,52,0) var(--tw-gradient-to-position)!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)!important;content:var(--tw-content)!important}.dark\\:after\\:via-hurricane-700\\/80:where(:host([data-theme=dark]),:host([data-theme=dark]) *):after{--tw-gradient-to:rgba(35,41,52,0) var(--tw-gradient-to-position)!important;--tw-gradient-stops:var(--tw-gradient-from),rgba(35,41,52,.8) var(--tw-gradient-via-position),var(--tw-gradient-to)!important;content:var(--tw-content)!important}.dark\\:after\\:from-hurricane-700:where([data-theme=dark],[data-theme=dark] *):after{--tw-gradient-from:#232934 var(--tw-gradient-from-position)!important;--tw-gradient-to:rgba(35,41,52,0) var(--tw-gradient-to-position)!important;--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)!important;content:var(--tw-content)!important}.dark\\:after\\:via-hurricane-700\\/80:where([data-theme=dark],[data-theme=dark] *):after{--tw-gradient-to:rgba(35,41,52,0) var(--tw-gradient-to-position)!important;--tw-gradient-stops:var(--tw-gradient-from),rgba(35,41,52,.8) var(--tw-gradient-via-position),var(--tw-gradient-to)!important;content:var(--tw-content)!important}";
16
17
 
@@ -68,11 +69,11 @@ const TableFooter = /*@__PURE__*/ proxyCustomElement(class TableFooter extends H
68
69
  /**
69
70
  * The amount of items per page
70
71
  */
71
- pageSize = defaultSize;
72
+ pageSize = PAGINATION_DEFAULT_PAGE_SIZE;
72
73
  /**
73
74
  * The options for the page size
74
75
  */
75
- pageSizeOptions = defaultSizeOptions;
76
+ pageSizeOptions = PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS;
76
77
  /**
77
78
  * Event whenever the page changes
78
79
  */
@@ -109,11 +110,11 @@ const TableFooter = /*@__PURE__*/ proxyCustomElement(class TableFooter extends H
109
110
  this._renderCheckTimeout = setTimeout(() => this._checkStuck(), 100);
110
111
  }
111
112
  render() {
112
- return (h(ThemedHost, { key: '40a461aa422e9fa9355b3c80dd2a587921757c97' }, h("div", { key: 'aaaf82bf2a2dee5d27f2347fed248c879e8fd630', class: footer({
113
+ return (h(ThemedHost, { key: '3818bdb2adcf27abd0bddbfefa9af36361a5e440' }, h("div", { key: '79d2e850731244e1f0a798c495338f63a0fef8d0', class: footer({
113
114
  pinned: this._isPinned,
114
115
  hidden: this._hidden,
115
116
  }) }, (this.enablePaginationPages || this.enablePaginationSize) &&
116
- this.total > 0 && (h("p-pagination", { key: '258b98819e5f8737463af4336bf820f427b0acf4', class: 'z-[2]', enablePaginationSize: this.enablePaginationSize, enablePaginationPages: this.enablePaginationPages, pageSize: this.pageSize, pageSizeOptions: this.pageSizeOptions, onPageSizeChange: ({ detail }) => this._changePageSize(detail), page: this.page, hideOnSinglePage: this.hideOnSinglePage, onPageChange: ({ detail }) => this.pageChange.emit(detail), total: this.total, onPagesChange: ({ detail }) => (this._hasPaginationPages = detail > 1) })))));
117
+ this.total > 0 && (h("p-pagination", { key: '0a5bf305304ad88009edf5fd40cb5183788b84c0', class: 'z-[2]', enablePaginationSize: this.enablePaginationSize, enablePaginationPages: this.enablePaginationPages, pageSize: this.pageSize, pageSizeOptions: this.pageSizeOptions, onPageSizeChange: ({ detail }) => this._changePageSize(detail), page: this.page, hideOnSinglePage: this.hideOnSinglePage, onPageChange: ({ detail }) => this.pageChange.emit(detail), total: this.total, onPagesChange: ({ detail }) => (this._hasPaginationPages = detail > 1) })))));
117
118
  }
118
119
  _changePageSize(s) {
119
120
  if (!s) {
@@ -225,6 +226,6 @@ function defineCustomElement() {
225
226
  defineCustomElement();
226
227
 
227
228
  export { TableFooter as T, defineCustomElement as d };
228
- //# sourceMappingURL=p-Ce9I3qVv.js.map
229
+ //# sourceMappingURL=p-CBjkQAGw.js.map
229
230
 
230
- //# sourceMappingURL=p-Ce9I3qVv.js.map
231
+ //# sourceMappingURL=p-CBjkQAGw.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-CBjkQAGw.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,uBAAuB,GAAG,k+GAAk+G;;ACiBlgH,MAAM,MAAM,GAAG,GAAG,CACjB;IACC,yBAAyB;IACzB,kBAAkB;IAClB,sDAAsD;IACtD,oDAAoD;IACpD,+IAA+I;CAC/I,EACD;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,MAAM,EAAE;AACP,YAAA,KAAK,EAAE,iBAAiB;AACxB,YAAA,IAAI,EAAE,mBAAmB;AACzB,SAAA;AACD,QAAA,MAAM,EAAE;AACP,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,IAAI,EAAE,QAAQ;AACd,SAAA;AACD,KAAA;AACD,CAAA,CACD;MAOY,WAAW,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAAC,CAAA,CAAA;;;;;;;;;AACvB;;AAEG;IACK,oBAAoB,GAA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AC,MAAM,IAAI,CAAC;;IAIvD,QAAQ,GAAA;QACP,IAAI,CAAC,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/table/footer/table-footer.component.css?tag=p-table-footer&encapsulation=shadow","src/components/molecules/table/footer/table-footer.component.tsx"],"sourcesContent":[":host {\n\t@apply sticky;\n\t@apply z-[1];\n\n\t--tw-content: '';\n}\n","import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\th,\n\tProp,\n\tElement,\n\tState,\n\tListen,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\nimport {\n\tPAGINATION_DEFAULT_PAGE_SIZE,\n\tPAGINATION_DEFAULT_PAGE_SIZE_OPTIONS,\n} from '../../../../utils/constants';\n\nconst footer = cva(\n\t[\n\t\t'justify-center relative',\n\t\t'w-full py-8 px-6',\n\t\t'after:absolute after:top-0 after:left-0 after:z-[0]',\n\t\t'after:w-full after:h-full after:transition-opacity',\n\t\t'after:bg-gradient-to-t after:from-white dark:after:from-hurricane-700 after:via-white/80 dark:after:via-hurricane-700/80 after:to-transparent',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tpinned: {\n\t\t\t\tfalse: 'after:opacity-0',\n\t\t\t\ttrue: 'after:opacity-100',\n\t\t\t},\n\t\t\thidden: {\n\t\t\t\tfalse: 'flex',\n\t\t\t\ttrue: 'hidden',\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-table-footer',\n\tstyleUrl: 'table-footer.component.css',\n\tshadow: true,\n})\nexport class TableFooter {\n\t/**\n\t * Wether to enable pagination size select\n\t */\n\t@Prop() enablePaginationSize: boolean = true;\n\n\t/**\n\t * Wether to enable pagination pages\n\t */\n\t@Prop() enablePaginationPages: boolean = true;\n\n\t/**\n\t * Wether we want to show loading state\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = PAGINATION_DEFAULT_PAGE_SIZE;\n\n\t/**\n\t * The options for the page size\n\t */\n\t@Prop() pageSizeOptions: number[] = PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageSizeChange: EventEmitter<number>;\n\n\t/**\n\t * Event whenever the footer is hidden or nog\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\thiddenChange: EventEmitter<boolean>;\n\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = true;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _isPinned = false;\n\t@State() private _hasPaginationPages = true;\n\n\tprivate _hidePageSizeSelect = false;\n\tprivate _hidden = false;\n\tprivate _renderCheckTimeout: NodeJS.Timeout;\n\n\tcomponentWillRender() {\n\t\tthis._hidePageSizeSelect =\n\t\t\tthis.hideOnSinglePage && this.total <= this.pageSizeOptions?.[0];\n\n\t\tconst hidden =\n\t\t\t(this._hidePageSizeSelect && !this._hasPaginationPages) ||\n\t\t\t(!this.enablePaginationSize && !this.enablePaginationPages);\n\n\t\tif (hidden !== this._hidden) {\n\t\t\tthis._hidden = hidden;\n\t\t\tthis.hiddenChange.emit(hidden);\n\t\t}\n\t}\n\n\tcomponentDidRender() {\n\t\tif (this._renderCheckTimeout) {\n\t\t\tclearTimeout(this._renderCheckTimeout);\n\t\t\tthis._renderCheckTimeout = null;\n\t\t}\n\n\t\tthis._renderCheckTimeout = setTimeout(() => this._checkStuck(), 100);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<div\n\t\t\t\t\tclass={footer({\n\t\t\t\t\t\tpinned: this._isPinned,\n\t\t\t\t\t\thidden: this._hidden,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{(this.enablePaginationPages || this.enablePaginationSize) &&\n\t\t\t\t\t\tthis.total > 0 && (\n\t\t\t\t\t\t\t<p-pagination\n\t\t\t\t\t\t\t\tclass='z-[2]'\n\t\t\t\t\t\t\t\tenablePaginationSize={this.enablePaginationSize}\n\t\t\t\t\t\t\t\tenablePaginationPages={this.enablePaginationPages}\n\t\t\t\t\t\t\t\tpageSize={this.pageSize}\n\t\t\t\t\t\t\t\tpageSizeOptions={this.pageSizeOptions}\n\t\t\t\t\t\t\t\tonPageSizeChange={({ detail }) => this._changePageSize(detail)}\n\t\t\t\t\t\t\t\tpage={this.page}\n\t\t\t\t\t\t\t\thideOnSinglePage={this.hideOnSinglePage}\n\t\t\t\t\t\t\t\tonPageChange={({ detail }) => this.pageChange.emit(detail)}\n\t\t\t\t\t\t\t\ttotal={this.total}\n\t\t\t\t\t\t\t\tonPagesChange={({ detail }) =>\n\t\t\t\t\t\t\t\t\t(this._hasPaginationPages = detail > 1)\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</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\tprivate _changePageSize(s?: number) {\n\t\tif (!s) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pageSize = s;\n\t\tthis.pageSizeChange.emit(this.pageSize);\n\t}\n\n\tprivate _checkStuck() {\n\t\tconst rect = this._el.getBoundingClientRect();\n\t\tconst modal = this._el.closest('p-modal');\n\t\tconst layout = document.querySelector('p-layout');\n\n\t\tif (modal) {\n\t\t\tconst modalBody = modal.shadowRoot.querySelector('p-modal-body');\n\t\t\tconst innerContent = modalBody.shadowRoot.querySelector('div');\n\n\t\t\tconst innerContentComputed = getComputedStyle(innerContent);\n\n\t\t\tconst modalPaddingBottom = parseInt(\n\t\t\t\tinnerContentComputed.paddingBottom,\n\t\t\t\t10\n\t\t\t);\n\t\t\tthis._el.style.bottom = `-${modalPaddingBottom}px`;\n\t\t\tthis._el.style.marginBottom = `-${modalPaddingBottom - 1}px`;\n\t\t}\n\n\t\tif (layout && !modal) {\n\t\t\tconst innerContent = layout.shadowRoot.querySelector('.content');\n\t\t\tconst innerContentComputed = getComputedStyle(innerContent);\n\n\t\t\tconst layoutPaddingBottom = parseInt(\n\t\t\t\tinnerContentComputed.paddingBottom,\n\t\t\t\t10\n\t\t\t);\n\t\t\tthis._el.style.bottom = `-${layoutPaddingBottom}px`;\n\t\t\tthis._el.style.marginBottom = `-${layoutPaddingBottom - 1}px`;\n\t\t}\n\n\t\tthis._isPinned = window.innerHeight - rect.bottom == 0;\n\t}\n\n\t@Listen('scroll', { target: 'window' })\n\tonScroll() {\n\t\tthis._checkStuck();\n\t}\n}\n"],"version":3}
@@ -4,10 +4,10 @@ import { f as formatTranslation, g as getLocaleComponentStrings } from './p-DiJj
4
4
  import { c as cn } from './p-CT54OXR2.js';
5
5
  import { a as asBoolean } from './p-C5CTp9IA.js';
6
6
  import { T as ThemedHost } from './p-7QA93RrV.js';
7
- import { d as defineCustomElement$4 } from './p-CAvUntoE.js';
7
+ import { d as defineCustomElement$4 } from './p-CeM-_6CM.js';
8
8
  import { d as defineCustomElement$3 } from './p-BHphGfv6.js';
9
9
  import { d as defineCustomElement$2 } from './p-BFbLqg3-.js';
10
- import { d as defineCustomElement$1 } from './p-BgJXDL3C.js';
10
+ import { d as defineCustomElement$1 } from './p-DRR3gR1w.js';
11
11
 
12
12
  const fieldContainerComponentCss = "*{box-sizing:border-box}.ml-auto{margin-left:auto!important}.flex{display:flex!important}.h-4{height:1rem!important}.h-5{height:1.25rem!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.w-full{width:100%!important}.w-inherit{width:inherit!important}.min-w-0{min-width:0!important}.flex-shrink-0{flex-shrink:0!important}.cursor-auto{cursor:auto!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-col{flex-direction:column!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-between{justify-content:space-between!important}.gap-1{gap:.25rem!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.text-ellipsis{text-overflow:ellipsis!important}.rounded-lg{border-radius:.5rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-medium{font-weight:500!important}.font-normal{font-weight:400!important}.text-storm-200{--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.text-storm-300{--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.text-storm-500{color:rgb(24 30 41/var(--tw-text-opacity,1))!important}.text-storm-500,.text-white{--tw-text-opacity:1!important}.text-white{color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.empty\\:hidden:empty{display:none!important}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-hurricane-300:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.dark\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-hurricane-300:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.dark\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(255 255 255/var(--tw-text-opacity,1))!important}";
13
13
 
@@ -210,6 +210,6 @@ function defineCustomElement() {
210
210
  defineCustomElement();
211
211
 
212
212
  export { FieldContainer as F, defineCustomElement as d };
213
- //# sourceMappingURL=p-1TpRsovb.js.map
213
+ //# sourceMappingURL=p-CUPpa-ib.js.map
214
214
 
215
- //# sourceMappingURL=p-1TpRsovb.js.map
215
+ //# sourceMappingURL=p-CUPpa-ib.js.map
@@ -1 +1 @@
1
- {"file":"p-1TpRsovb.js","mappings":";;;;;;;;;;;AAAA,MAAM,0BAA0B,GAAG,2lGAA2lG;;ACoB9nG,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,mBAAmB,CAAC,EAAE;AACzC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,KAAK,EAAE,IAAI;AACX,SAAA;AACD,QAAA,IAAI,EAAE;AACL,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,EAAE,EAAE,IAAI;AACR,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE;AACjB,QAAA;AACC,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,KAAK,EAAE,KAAK;AACZ,SAAA;AACD,QAAA;AACC,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,IAAI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EACC,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,SAAS,EAAA,CACb,CACF,EAEA,WAAW,CACD,CACL,CACI;;AAKP,IAAA,MAAM,WAAW,GAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,MAAM,yBAAyB,CAAC,IAAI,CAAC,GAAG,CAAC;;IAGlD,YAAY,GAAA;AACnB,QAAA,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,0BAA0B,CAAC;AAC1E,QAAA,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,yBAAyB,CAAC;AACxE,QAAA,MAAM,aAAa,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,0BAA0B,CAAC;AAC1E,QAAA,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,yBAAyB,CAAC;QAExE,MAAM,MAAM,GAAG,aAAa,GAAG,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,MAAM;QACnE,MAAM,KAAK,GAAG,YAAY,GAAG,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK;QAE/D,MAAM,yBAAyB,GAC9B,YAAY;AACZ,aAAC,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC;QAExE,OAAO;YACN,aAAa;YACb,YAAY;YACZ,aAAa;YACb,YAAY;YACZ,MAAM;YACN,KAAK;YACL,yBAAyB;SACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/field/container/field-container.component.css?tag=p-field-container&encapsulation=shadow","src/components/molecules/field/container/field-container.component.tsx"],"sourcesContent":["","import { Placement } from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport {\n\tcn,\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n} from '../../../../utils';\nimport { asBoolean } from '../../../../utils/as-boolean';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\n\nconst loader = cva(['rounded-lg w-full'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tread: null,\n\t\t\twrite: null,\n\t\t},\n\t\tsize: {\n\t\t\tbase: null,\n\t\t\tsm: null,\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tvariant: 'read',\n\t\t\tsize: 'base',\n\t\t\tclass: 'h-5',\n\t\t},\n\t\t{\n\t\t\tvariant: 'read',\n\t\t\tsize: 'sm',\n\t\t\tclass: 'h-4',\n\t\t},\n\n\t\t{\n\t\t\tvariant: 'write',\n\t\t\tsize: 'base',\n\t\t\tclass: 'h-8',\n\t\t},\n\t\t{\n\t\t\tvariant: 'write',\n\t\t\tsize: 'sm',\n\t\t\tclass: 'h-6',\n\t\t},\n\t],\n});\n\nexport type templateFunc = () => string;\n\n@Component({\n\ttag: 'p-field-container',\n\tstyleUrl: 'field-container.component.css',\n\tshadow: true,\n})\nexport class FieldContainer {\n\tprivate _defaultOptionalTemplate: templateFunc = () =>\n\t\tformatTranslation(this._locales.optional);\n\t/**\n\t * The id for the label\n\t */\n\t@Prop() id: string;\n\n\t/**\n\t * Align content to the start or end\n\t */\n\t@Prop() align: 'start' | 'end' = 'start';\n\n\t/**\n\t * The label of the input group\n\t */\n\t@Prop() label: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the field container is in loading state\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * The size of the loader\n\t */\n\t@Prop() loadingSize: 'base' | 'sm' = 'base';\n\n\t/**\n\t * The variant of the field container\n\t */\n\t@Prop() variant: 'read' | 'write';\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop() helper: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * Wether to show optional when not required\n\t */\n\t@Prop({ reflect: true }) showOptional: boolean = true;\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 * The placement of the error popover\n\t */\n\t@Prop() errorPlacement: Placement;\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 template for the optional text\n\t */\n\t@Prop() optionalTemplate: templateFunc = this._defaultOptionalTemplate;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@Event() focus: EventEmitter<void>;\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\tcomponentWillLoad() {\n\t\tthis._setLocales();\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t} = this._getSlotInfo();\n\n\t\tlet contentSlot = (\n\t\t\t<slot\n\t\t\t\tslot='trigger'\n\t\t\t\tname='content'\n\t\t\t/>\n\t\t);\n\n\t\tif (this.loading) {\n\t\t\tcontentSlot = (\n\t\t\t\t<p-loader\n\t\t\t\t\tvariant='ghost'\n\t\t\t\t\tclass={loader({ variant: this.variant, size: this.loadingSize })}\n\t\t\t\t\tslot='trigger'\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<label\n\t\t\t\t\thtmlFor={this.id}\n\t\t\t\t\tclass={cn('flex w-inherit flex-col gap-1', {\n\t\t\t\t\t\t'cursor-auto': this.variant === 'read',\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={cn('flex items-end justify-between gap-1 empty:hidden', {\n\t\t\t\t\t\t\t'flex-row-reverse': this.align === 'end',\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{(!!label?.length || !!helper?.length) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass='flex min-w-0 gap-2'\n\t\t\t\t\t\t\t\tonClick={() => this.focus.emit()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class='min-w-0 overflow-hidden text-ellipsis text-xs font-medium text-storm-300 dark:text-hurricane-200'>\n\t\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t{helper && (\n\t\t\t\t\t\t\t\t\t<p-helper\n\t\t\t\t\t\t\t\t\t\tclass='flex flex-shrink-0'\n\t\t\t\t\t\t\t\t\t\tplacement='top'\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{helper}\n\t\t\t\t\t\t\t\t\t</p-helper>\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{((!asBoolean(this.required) && asBoolean(this.showOptional)) ||\n\t\t\t\t\t\t\thasHeaderSlot) && (\n\t\t\t\t\t\t\t<div class='flex items-center gap-1'>\n\t\t\t\t\t\t\t\t{!asBoolean(this.required) &&\n\t\t\t\t\t\t\t\t\tasBoolean(this.showOptional) &&\n\t\t\t\t\t\t\t\t\tthis.variant === 'write' && (\n\t\t\t\t\t\t\t\t\t\t<span class='text-xs font-medium text-storm-200 dark:text-hurricane-300'>\n\t\t\t\t\t\t\t\t\t\t\t{this.optionalTemplate()}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{hasHeaderSlot && <slot name='header' />}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<p-tooltip\n\t\t\t\t\t\tclass={cn({\n\t\t\t\t\t\t\t'w-full': this.variant === 'write' || this.loading,\n\t\t\t\t\t\t\t'ml-auto': this.align === 'end',\n\t\t\t\t\t\t\t'font-normal': this.variant === 'read',\n\t\t\t\t\t\t\t'text-storm-500 dark:text-white': this.variant === 'read',\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\tcontent={this.error}\n\t\t\t\t\t\tshow={\n\t\t\t\t\t\t\terrorAndErrorIsNotBoolean &&\n\t\t\t\t\t\t\tasBoolean(this.forceShowTooltip, false)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tenableUserInput={false}\n\t\t\t\t\t\tplacement={this.errorPlacement}\n\t\t\t\t\t>\n\t\t\t\t\t\t{hasErrorSlot && (\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\tname='error'\n\t\t\t\t\t\t\t\tslot='content'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{contentSlot}\n\t\t\t\t\t</p-tooltip>\n\t\t\t\t</label>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\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 hasHeaderSlot = !!this._el.querySelector(':scope > [slot=\"header\"]');\n\t\tconst hasErrorSlot = !!this._el.querySelector(':scope > [slot=\"error\"]');\n\n\t\tconst helper = hasHelperSlot ? <slot name='helper' /> : this.helper;\n\t\tconst label = hasLabelSlot ? <slot name='label' /> : this.label;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\thasErrorSlot ||\n\t\t\t(this.error && typeof this.error === 'string' && this.error !== 'true');\n\n\t\treturn {\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t};\n\t}\n}\n"],"version":3}
1
+ {"file":"p-CUPpa-ib.js","mappings":";;;;;;;;;;;AAAA,MAAM,0BAA0B,GAAG,2lGAA2lG;;ACoB9nG,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,mBAAmB,CAAC,EAAE;AACzC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,KAAK,EAAE,IAAI;AACX,SAAA;AACD,QAAA,IAAI,EAAE;AACL,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,EAAE,EAAE,IAAI;AACR,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE;AACjB,QAAA;AACC,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,KAAK,EAAE,KAAK;AACZ,SAAA;AACD,QAAA;AACC,YAAA,OAAO,EAAE,MAAM;AACf,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,KAAK,EAAE,KAAK;AACZ,SAAA;AAED,QAAA;AACC,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,KAAK,EAAE,KAAK;AACZ,SAAA;AACD,QAAA;AACC,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,IAAI,EAAE,IAAI;AACV,YAAA,KAAK,EAAE,KAAK;AACZ,SAAA;AACD,KAAA;AACD,CAAA,CAAC;MASW,cAAc,iBAAAA,kBAAA,CAAA,MAAA,cAAA,SAAAC,CAAA,CAAA;;;;;;;AAClB,IAAA,wBAAwB,GAAiB,MAChD,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,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,GAAG,CAAC,aAAa,CAAC,0BAA0B,CAAC;AAC1E,QAAA,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,yBAAyB,CAAC;QAExE,MAAM,MAAM,GAAG,aAAa,GAAG,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,MAAM;QACnE,MAAM,KAAK,GAAG,YAAY,GAAG,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,OAAO,GAAG,GAAG,IAAI,CAAC,KAAK;QAE/D,MAAM,yBAAyB,GAC9B,YAAY;AACZ,aAAC,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC;QAExE,OAAO;YACN,aAAa;YACb,YAAY;YACZ,aAAa;YACb,YAAY;YACZ,MAAM;YACN,KAAK;YACL,yBAAyB;SACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/field/container/field-container.component.css?tag=p-field-container&encapsulation=shadow","src/components/molecules/field/container/field-container.component.tsx"],"sourcesContent":["","import { Placement } from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport {\n\tcn,\n\tformatTranslation,\n\tgetLocaleComponentStrings,\n} from '../../../../utils';\nimport { asBoolean } from '../../../../utils/as-boolean';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\n\nconst loader = cva(['rounded-lg w-full'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tread: null,\n\t\t\twrite: null,\n\t\t},\n\t\tsize: {\n\t\t\tbase: null,\n\t\t\tsm: null,\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tvariant: 'read',\n\t\t\tsize: 'base',\n\t\t\tclass: 'h-5',\n\t\t},\n\t\t{\n\t\t\tvariant: 'read',\n\t\t\tsize: 'sm',\n\t\t\tclass: 'h-4',\n\t\t},\n\n\t\t{\n\t\t\tvariant: 'write',\n\t\t\tsize: 'base',\n\t\t\tclass: 'h-8',\n\t\t},\n\t\t{\n\t\t\tvariant: 'write',\n\t\t\tsize: 'sm',\n\t\t\tclass: 'h-6',\n\t\t},\n\t],\n});\n\nexport type templateFunc = () => string;\n\n@Component({\n\ttag: 'p-field-container',\n\tstyleUrl: 'field-container.component.css',\n\tshadow: true,\n})\nexport class FieldContainer {\n\tprivate _defaultOptionalTemplate: templateFunc = () =>\n\t\tformatTranslation(this._locales.optional);\n\t/**\n\t * The id for the label\n\t */\n\t@Prop() id: string;\n\n\t/**\n\t * Align content to the start or end\n\t */\n\t@Prop() align: 'start' | 'end' = 'start';\n\n\t/**\n\t * The label of the input group\n\t */\n\t@Prop() label: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the field container is in loading state\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * The size of the loader\n\t */\n\t@Prop() loadingSize: 'base' | 'sm' = 'base';\n\n\t/**\n\t * The variant of the field container\n\t */\n\t@Prop() variant: 'read' | 'write';\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop() helper: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * Wether to show optional when not required\n\t */\n\t@Prop({ reflect: true }) showOptional: boolean = true;\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 * The placement of the error popover\n\t */\n\t@Prop() errorPlacement: Placement;\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 template for the optional text\n\t */\n\t@Prop() optionalTemplate: templateFunc = this._defaultOptionalTemplate;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@Event() focus: EventEmitter<void>;\n\n\t/**\n\t * Locales used for this component\n\t */\n\t@State() private _locales: any = {};\n\n\tcomponentWillLoad() {\n\t\tthis._setLocales();\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t} = this._getSlotInfo();\n\n\t\tlet contentSlot = (\n\t\t\t<slot\n\t\t\t\tslot='trigger'\n\t\t\t\tname='content'\n\t\t\t/>\n\t\t);\n\n\t\tif (this.loading) {\n\t\t\tcontentSlot = (\n\t\t\t\t<p-loader\n\t\t\t\t\tvariant='ghost'\n\t\t\t\t\tclass={loader({ variant: this.variant, size: this.loadingSize })}\n\t\t\t\t\tslot='trigger'\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<label\n\t\t\t\t\thtmlFor={this.id}\n\t\t\t\t\tclass={cn('flex w-inherit flex-col gap-1', {\n\t\t\t\t\t\t'cursor-auto': this.variant === 'read',\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={cn('flex items-end justify-between gap-1 empty:hidden', {\n\t\t\t\t\t\t\t'flex-row-reverse': this.align === 'end',\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{(!!label?.length || !!helper?.length) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass='flex min-w-0 gap-2'\n\t\t\t\t\t\t\t\tonClick={() => this.focus.emit()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class='min-w-0 overflow-hidden text-ellipsis text-xs font-medium text-storm-300 dark:text-hurricane-200'>\n\t\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t\t{helper && (\n\t\t\t\t\t\t\t\t\t<p-helper\n\t\t\t\t\t\t\t\t\t\tclass='flex flex-shrink-0'\n\t\t\t\t\t\t\t\t\t\tplacement='top'\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{helper}\n\t\t\t\t\t\t\t\t\t</p-helper>\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{((!asBoolean(this.required) && asBoolean(this.showOptional)) ||\n\t\t\t\t\t\t\thasHeaderSlot) && (\n\t\t\t\t\t\t\t<div class='flex items-center gap-1'>\n\t\t\t\t\t\t\t\t{!asBoolean(this.required) &&\n\t\t\t\t\t\t\t\t\tasBoolean(this.showOptional) &&\n\t\t\t\t\t\t\t\t\tthis.variant === 'write' && (\n\t\t\t\t\t\t\t\t\t\t<span class='text-xs font-medium text-storm-200 dark:text-hurricane-300'>\n\t\t\t\t\t\t\t\t\t\t\t{this.optionalTemplate()}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t\t{hasHeaderSlot && <slot name='header' />}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<p-tooltip\n\t\t\t\t\t\tclass={cn({\n\t\t\t\t\t\t\t'w-full': this.variant === 'write' || this.loading,\n\t\t\t\t\t\t\t'ml-auto': this.align === 'end',\n\t\t\t\t\t\t\t'font-normal': this.variant === 'read',\n\t\t\t\t\t\t\t'text-storm-500 dark:text-white': this.variant === 'read',\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tvariant='error'\n\t\t\t\t\t\tcontent={this.error}\n\t\t\t\t\t\tshow={\n\t\t\t\t\t\t\terrorAndErrorIsNotBoolean &&\n\t\t\t\t\t\t\tasBoolean(this.forceShowTooltip, false)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tenableUserInput={false}\n\t\t\t\t\t\tplacement={this.errorPlacement}\n\t\t\t\t\t>\n\t\t\t\t\t\t{hasErrorSlot && (\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\tname='error'\n\t\t\t\t\t\t\t\tslot='content'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{contentSlot}\n\t\t\t\t\t</p-tooltip>\n\t\t\t\t</label>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('localeChanged', { target: 'body' })\n\tprivate async _setLocales(): Promise<void> {\n\t\tthis._locales = await getLocaleComponentStrings(this._el);\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 hasHeaderSlot = !!this._el.querySelector(':scope > [slot=\"header\"]');\n\t\tconst hasErrorSlot = !!this._el.querySelector(':scope > [slot=\"error\"]');\n\n\t\tconst helper = hasHelperSlot ? <slot name='helper' /> : this.helper;\n\t\tconst label = hasLabelSlot ? <slot name='label' /> : this.label;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\thasErrorSlot ||\n\t\t\t(this.error && typeof this.error === 'string' && this.error !== 'true');\n\n\t\treturn {\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasHeaderSlot,\n\t\t\thasErrorSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t};\n\t}\n}\n"],"version":3}
@@ -1,15 +1,16 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, F as Fragment } from './p-Dgl2kvBS.js';
2
2
  import { c as cva } from './p-CBWjHURv.js';
3
- import { d as defineCustomElement$1, a as defaultSize, b as defaultSizeOptions } from './p-D-zWGvwF.js';
4
3
  import { T as ThemedHost } from './p-7QA93RrV.js';
4
+ import { P as PAGINATION_DEFAULT_PAGE_SIZE, a as PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS } from './p-vyRrSf5s.js';
5
5
  import { d as defineCustomElement$9 } from './p-D1ZRTCkT.js';
6
6
  import { d as defineCustomElement$8 } from './p-DzWmipVp.js';
7
- import { d as defineCustomElement$7 } from './p-CcbnUOou.js';
7
+ import { d as defineCustomElement$7 } from './p-CsS0Qh_I.js';
8
8
  import { d as defineCustomElement$6 } from './p-D2igmK5l.js';
9
9
  import { d as defineCustomElement$5 } from './p-CLLXCnKM.js';
10
10
  import { d as defineCustomElement$4 } from './p-BHphGfv6.js';
11
- import { d as defineCustomElement$3 } from './p-DhG7TpID.js';
11
+ import { d as defineCustomElement$3 } from './p-CWsTTbrU.js';
12
12
  import { d as defineCustomElement$2 } from './p-CIRFeGiK.js';
13
+ import { d as defineCustomElement$1 } from './p-BFQL_bAk.js';
13
14
 
14
15
  const paginationComponentCss = "*{box-sizing:border-box}.static{position:static!important}.mx-0{margin-left:0!important;margin-right:0!important}.flex{display:flex!important}.hidden{display:none!important}.h-4{height:1rem!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.rounded-full{border-radius:9999px!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-off-white-700{--tw-border-opacity:1!important;border-color:rgb(222 219 213/var(--tw-border-opacity,1))!important}.bg-off-white-300{--tw-bg-opacity:1!important;background-color:rgb(248 247 244/var(--tw-bg-opacity,1))!important}.p-1{padding:.25rem!important}.text-off-white-700{--tw-text-opacity:1!important;color:rgb(222 219 213/var(--tw-text-opacity,1))!important}.dark\\:border-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-border-opacity:1!important;border-color:rgb(70 75 84/var(--tw-border-opacity,1))!important}.dark\\:bg-hurricane-500:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(54 60 70/var(--tw-bg-opacity,1))!important}.dark\\:text-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(70 75 84/var(--tw-text-opacity,1))!important}.dark\\:border-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-border-opacity:1!important;border-color:rgb(70 75 84/var(--tw-border-opacity,1))!important}.dark\\:bg-hurricane-500:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(54 60 70/var(--tw-bg-opacity,1))!important}.dark\\:text-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(70 75 84/var(--tw-text-opacity,1))!important}";
15
16
 
@@ -60,11 +61,11 @@ const Pagination = /*@__PURE__*/ proxyCustomElement(class Pagination extends H {
60
61
  /**
61
62
  * The amount of items per page
62
63
  */
63
- pageSize = defaultSize;
64
+ pageSize = PAGINATION_DEFAULT_PAGE_SIZE;
64
65
  /**
65
66
  * The options for the page size
66
67
  */
67
- pageSizeOptions = defaultSizeOptions;
68
+ pageSizeOptions = PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS;
68
69
  /**
69
70
  * Event whenever the page changes
70
71
  */
@@ -80,12 +81,12 @@ const Pagination = /*@__PURE__*/ proxyCustomElement(class Pagination extends H {
80
81
  _hasPaginationPages = true;
81
82
  render() {
82
83
  const hidePageSizeSelect = this.hideOnSinglePage && this.total <= this.pageSizeOptions?.[0];
83
- return (h(ThemedHost, { key: 'a559316eebf880454bea768eba343b67de16b5e7' }, h("div", { key: 'fbabe3134439dc52c661751a79039aecbbebe659', class: pagination({
84
+ return (h(ThemedHost, { key: 'bcde797de60d6429022c715ce087064cf02be38d' }, h("div", { key: '8ec4343e86455080017a71aa0aab3c533ee2af6c', class: pagination({
84
85
  hidden: (hidePageSizeSelect && !this._hasPaginationPages) ||
85
86
  (!this.enablePaginationSize && !this.enablePaginationPages),
86
- }) }, this.enablePaginationPages && this.enablePaginationSize && (h(Fragment, { key: '2c862ee1c1c8ca70a26d040146f0da65d01d714a' }, h("p-pagination-size", { key: '1990fe2b9cbdc90846aacadbf4b73658c7a3064b', hidden: hidePageSizeSelect, size: this.pageSize, sizeOptions: this.pageSizeOptions, onSizeChange: ({ detail }) => this._changePageSize(detail) }), !hidePageSizeSelect &&
87
+ }) }, this.enablePaginationPages && this.enablePaginationSize && (h(Fragment, { key: '8d99901d0bc501b5aa66b40fd2a8c60415049f05' }, h("p-pagination-size", { key: '8a5799ac33e9e84630c9eebc6f1c1a4931b325d5', hidden: hidePageSizeSelect, size: this.pageSize, sizeOptions: this.pageSizeOptions, onSizeChange: ({ detail }) => this._changePageSize(detail) }), !hidePageSizeSelect &&
87
88
  this.hideOnSinglePage &&
88
- this._hasPaginationPages && (h("p-divider", { key: '17b9ef49c977fa90555dd98b0697ef9e056aeb3e', variant: 'vertical', class: 'mx-0 h-4 text-off-white-700 dark:text-hurricane-400' })))), this.enablePaginationPages && (h("p-pagination-pages", { key: '3b06eace9b53c2901e93d35c88ae41b6a04cb7ec', pageSize: this.pageSize, total: this.total, page: this.page, hideOnSinglePage: this.hideOnSinglePage, onPageChange: ({ detail }) => this.pageChange.emit(detail), onPagesChange: ({ detail }) => {
89
+ this._hasPaginationPages && (h("p-divider", { key: '48900c21a0de1af114e4f0c784e8b680c7527d03', variant: 'vertical', class: 'mx-0 h-4 text-off-white-700 dark:text-hurricane-400' })))), this.enablePaginationPages && (h("p-pagination-pages", { key: '9ffb6d5a3c282f14df3adcb99ffa16c0ed147b2c', pageSize: this.pageSize, total: this.total, page: this.page, hideOnSinglePage: this.hideOnSinglePage, onPageChange: ({ detail }) => this.pageChange.emit(detail), onPagesChange: ({ detail }) => {
89
90
  this._hasPaginationPages = detail > 1;
90
91
  this.pagesChange.emit(detail);
91
92
  } })))));
@@ -169,6 +170,6 @@ function defineCustomElement() {
169
170
  defineCustomElement();
170
171
 
171
172
  export { Pagination as P, defineCustomElement as d };
172
- //# sourceMappingURL=p-FkqC-SVE.js.map
173
+ //# sourceMappingURL=p-CVo3m-zN.js.map
173
174
 
174
- //# sourceMappingURL=p-FkqC-SVE.js.map
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D,QAAA,IAAI,CAAC,QAAQ,GAAG,CAAC;QACjB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/pagination/pagination/pagination.component.css?tag=p-pagination&encapsulation=shadow","src/components/molecules/pagination/pagination/pagination.component.tsx"],"sourcesContent":["","import {\n\tComponent,\n\tEvent,\n\tEventEmitter,\n\tFragment,\n\th,\n\tProp,\n\tState,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\nimport {\n\tPAGINATION_DEFAULT_PAGE_SIZE,\n\tPAGINATION_DEFAULT_PAGE_SIZE_OPTIONS,\n} from '../../../../utils/constants';\n\nconst pagination = cva(\n\t[\n\t\t'p-pagination',\n\t\t'items-center gap-2',\n\t\t'rounded-full',\n\t\t'bg-off-white-300 border border-solid border-off-white-700',\n\t\t'dark:bg-hurricane-500 dark:border-hurricane-400',\n\t\t'p-1',\n\t],\n\t{\n\t\tvariants: {\n\t\t\thidden: {\n\t\t\t\tfalse: 'flex',\n\t\t\t\ttrue: 'hidden',\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-pagination',\n\tstyleUrl: 'pagination.component.css',\n\tshadow: true,\n})\nexport class Pagination {\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = true;\n\n\t/**\n\t * Wether to enable pagination size select\n\t */\n\t@Prop() enablePaginationSize: boolean = true;\n\n\t/**\n\t * Wether to enable pagination pages\n\t */\n\t@Prop() enablePaginationPages: boolean = true;\n\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = PAGINATION_DEFAULT_PAGE_SIZE;\n\n\t/**\n\t * The options for the page size\n\t */\n\t@Prop() pageSizeOptions: number[] = PAGINATION_DEFAULT_PAGE_SIZE_OPTIONS;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageSizeChange: EventEmitter<number>;\n\n\t/**\n\t * The pages that were generated\n\t */\n\t@Event({ bubbles: false }) pagesChange: EventEmitter<number>;\n\n\t@State() private _hasPaginationPages = true;\n\n\trender() {\n\t\tconst hidePageSizeSelect =\n\t\t\tthis.hideOnSinglePage && this.total <= this.pageSizeOptions?.[0];\n\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<div\n\t\t\t\t\tclass={pagination({\n\t\t\t\t\t\thidden:\n\t\t\t\t\t\t\t(hidePageSizeSelect && !this._hasPaginationPages) ||\n\t\t\t\t\t\t\t(!this.enablePaginationSize && !this.enablePaginationPages),\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this.enablePaginationPages && this.enablePaginationSize && (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<p-pagination-size\n\t\t\t\t\t\t\t\thidden={hidePageSizeSelect}\n\t\t\t\t\t\t\t\tsize={this.pageSize}\n\t\t\t\t\t\t\t\tsizeOptions={this.pageSizeOptions}\n\t\t\t\t\t\t\t\tonSizeChange={({ detail }) => this._changePageSize(detail)}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t{!hidePageSizeSelect &&\n\t\t\t\t\t\t\t\tthis.hideOnSinglePage &&\n\t\t\t\t\t\t\t\tthis._hasPaginationPages && (\n\t\t\t\t\t\t\t\t\t<p-divider\n\t\t\t\t\t\t\t\t\t\tvariant='vertical'\n\t\t\t\t\t\t\t\t\t\tclass='mx-0 h-4 text-off-white-700 dark:text-hurricane-400'\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</Fragment>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{this.enablePaginationPages && (\n\t\t\t\t\t\t<p-pagination-pages\n\t\t\t\t\t\t\tpageSize={this.pageSize}\n\t\t\t\t\t\t\ttotal={this.total}\n\t\t\t\t\t\t\tpage={this.page}\n\t\t\t\t\t\t\thideOnSinglePage={this.hideOnSinglePage}\n\t\t\t\t\t\t\tonPageChange={({ detail }) => this.pageChange.emit(detail)}\n\t\t\t\t\t\t\tonPagesChange={({ detail }) => {\n\t\t\t\t\t\t\t\tthis._hasPaginationPages = detail > 1;\n\t\t\t\t\t\t\t\tthis.pagesChange.emit(detail);\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</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\tprivate _changePageSize(s?: number) {\n\t\tif (!s) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pageSize = s;\n\t\tthis.pageSizeChange.emit(this.pageSize);\n\t}\n}\n"],"version":3}
@@ -1,6 +1,7 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h } from './p-Dgl2kvBS.js';
2
2
  import { c as cva } from './p-CBWjHURv.js';
3
3
  import { T as ThemedHost } from './p-7QA93RrV.js';
4
+ import { P as PAGINATION_DEFAULT_PAGE_SIZE } from './p-vyRrSf5s.js';
4
5
  import { d as defineCustomElement$2 } from './p-BHphGfv6.js';
5
6
  import { d as defineCustomElement$1 } from './p-CIRFeGiK.js';
6
7
 
@@ -33,7 +34,7 @@ const PaginationPages = /*@__PURE__*/ proxyCustomElement(class PaginationPages e
33
34
  /**
34
35
  * The amount of items per page
35
36
  */
36
- pageSize = 12;
37
+ pageSize = PAGINATION_DEFAULT_PAGE_SIZE;
37
38
  /**
38
39
  * Wether to hide when there is only 1 page available
39
40
  */
@@ -52,7 +53,7 @@ const PaginationPages = /*@__PURE__*/ proxyCustomElement(class PaginationPages e
52
53
  this._generate();
53
54
  }
54
55
  render() {
55
- return (h(ThemedHost, { key: 'fac924cdf7545478c541427ebe8d888e19a01598' }, h("div", { key: '924356249ec8d6ba2ec4d215f122ce3d5f605a17', class: pagination({
56
+ return (h(ThemedHost, { key: '7f04b537b1a42b434a14d76c173630213be357f0' }, h("div", { key: 'b750ba157ea1ea804ec4fd94f519a893e1f4602b', class: pagination({
56
57
  hidden: this.hideOnSinglePage && this._set?.length === 3,
57
58
  }) }, this._set?.map(p => {
58
59
  if (p.type === 'previous' || p.type === 'next') {
@@ -243,6 +244,6 @@ function defineCustomElement() {
243
244
  defineCustomElement();
244
245
 
245
246
  export { PaginationPages as P, defineCustomElement as d };
246
- //# sourceMappingURL=p-DhG7TpID.js.map
247
+ //# sourceMappingURL=p-CWsTTbrU.js.map
247
248
 
248
- //# sourceMappingURL=p-DhG7TpID.js.map
249
+ //# sourceMappingURL=p-CWsTTbrU.js.map
@@ -0,0 +1 @@
1
+ {"file":"p-CWsTTbrU.js","mappings":";;;;;;;AAAA,MAAM,2BAA2B,GAAG,8LAA8L;;ACUlO,MAAM,UAAU,GAAG,GAAG,CAAC,CAAC,cAAc,EAAE,yBAAyB,CAAC,EAAE;AACnE,IAAA,QAAQ,EAAE;AACT,QAAA,MAAM,EAAE;AACP,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,IAAI,EAAE,QAAQ;AACd,SAAA;AACD,KAAA;AACD,CAAA,CAAC;MAOW,eAAe,iBAAAA,kBAAA,CAAA,MAAA,eAAA,SAAAC,CAAA,CAAA;;;;;;;;AAC3B;;AAEG;IACqC,IAAI,GAAW,CAAC;AAExD;;AAEG;AAIH,IAAA,UAAU;AAEV;;AAEG;IACK,QAAQ,GAAW,4BAA4B;AAEvD;;AAEG;IACK,gBAAgB,GAAY,KAAK;AAEzC;;AAEG;AACK,IAAA,KAAK;AAEb;;AAEG;AACwB,IA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,GAAG,CAAC,IAAI,CAAC;AACR,gBAAA,IAAI,EAAE,UAAU;AAChB,gBAAA,KAAK,EAAE,UAAU;AACjB,aAAA,CAAC;;AAGH,QAAA,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,EAAE;YAClC,GAAG,CAAC,IAAI,CAAC;AACR,gBAAA,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;AACzB,aAAA,CAAC;;AAGH,QAAA,IAAI,GAAG,IAAI,UAAU,GAAG,CAAC,EAAE;AAC1B,YAAA,KAAK,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC,IAAI,UAAU,EAAE,CAAC,EAAE,EAAE;gBAC3C,GAAG,CAAC,IAAI,CAAC;AACR,oBAAA,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC;AACzB,iBAAA,CAAC;;;aAEG;YACN,GAAG,CAAC,IAAI,CAAC;AACR,gBAAA,IAAI,EAAE,UAAU;AAChB,aAAA,CAAC;YAEF,GAAG,CAAC,IAAI,CAAC;AACR,gBAAA,IAAI,EAAE,MAAM;AACZ,gBAAA,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;AAC1C,aAAA,CAAC;;QAGH,IAAI,gBAAgB,EAAE;AACrB,YAAA,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;;AAGf,QAAA,OAAO,GAAG;AACX,KAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/pagination/pages/pagination-pages.component.css?tag=p-pagination-pages&encapsulation=shadow","src/components/molecules/pagination/pages/pagination-pages.component.tsx"],"sourcesContent":["","import { Component, Event, EventEmitter, h, Prop, Watch } from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../../internal/themed-host.component';\nimport { PAGINATION_DEFAULT_PAGE_SIZE } from '../../../../utils/constants';\n\ntype PaginationSetItem = {\n\ttype: string;\n\tvalue?: number | Element | JSX.Element | string;\n};\n\nconst pagination = cva(['p-pagination', 'flex gap-2 items-center'], {\n\tvariants: {\n\t\thidden: {\n\t\t\tfalse: 'flex',\n\t\t\ttrue: 'hidden',\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-pagination-pages',\n\tstyleUrl: 'pagination-pages.component.css',\n\tshadow: true,\n})\nexport class PaginationPages {\n\t/**\n\t * The current page\n\t */\n\t@Prop({ mutable: true, reflect: true }) page: number = 1;\n\n\t/**\n\t * Event whenever the page changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tpageChange: EventEmitter<number>;\n\n\t/**\n\t * The amount of items per page\n\t */\n\t@Prop() pageSize: number = PAGINATION_DEFAULT_PAGE_SIZE;\n\n\t/**\n\t * Wether to hide when there is only 1 page available\n\t */\n\t@Prop() hideOnSinglePage: boolean = false;\n\n\t/**\n\t * The total amount of items\n\t */\n\t@Prop() total!: number;\n\n\t/**\n\t * The pages that were generated\n\t */\n\t@Event({ bubbles: false }) pagesChange: EventEmitter<number>;\n\n\tprivate _pages: number[] = [];\n\tprivate _set: PaginationSetItem[] = [];\n\n\tcomponentWillRender() {\n\t\tthis._generate();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<div\n\t\t\t\t\tclass={pagination({\n\t\t\t\t\t\thidden: this.hideOnSinglePage && this._set?.length === 3,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t{this._set?.map(p => {\n\t\t\t\t\t\tif (p.type === 'previous' || p.type === 'next') {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<p-pagination-pages-item\n\t\t\t\t\t\t\t\t\tvariant='carousel'\n\t\t\t\t\t\t\t\t\tdisabled={this._carouselDisabled(p.type)}\n\t\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\t\tp.type === 'previous'\n\t\t\t\t\t\t\t\t\t\t\t? this._previousClick()\n\t\t\t\t\t\t\t\t\t\t\t: this._nextClick()\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\t{p.value}\n\t\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (p.type === 'ellipsis') {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<p-pagination-pages-item hover={false}>\n\t\t\t\t\t\t\t\t\t...\n\t\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<p-pagination-pages-item\n\t\t\t\t\t\t\t\tactive={p.value === this.page}\n\t\t\t\t\t\t\t\tonClick={() => this._pageClick(p.value as number)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{p.value}\n\t\t\t\t\t\t\t</p-pagination-pages-item>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Watch('page')\n\t@Watch('pageSize')\n\t@Watch('total')\n\tprotected pageChangeHandler() {\n\t\tthis._generate();\n\t}\n\n\tprivate _generate() {\n\t\tthis._pages = this._generatePages();\n\t\tthis._set = this._generateSet();\n\n\t\tif (this.page > this._pages?.length) {\n\t\t\tthis._changePage(this._pages.length);\n\t\t}\n\t}\n\n\tprivate _changePage(p?: number) {\n\t\tif (!p) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.page = p;\n\t\tthis.pageChange.emit(this.page);\n\t}\n\n\tprivate _previousClick() {\n\t\tif (this._carouselDisabled('previous')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changePage(this.page - 1);\n\t}\n\n\tprivate _nextClick = () => {\n\t\tif (this._carouselDisabled('next')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._changePage(this.page + 1);\n\t};\n\n\tprivate _carouselDisabled = (type: 'previous' | 'next') => {\n\t\tif (type === 'next') {\n\t\t\tconst nextPage = this.page + 1;\n\t\t\tif (nextPage > this._pages[this._pages.length - 1]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif (type === 'previous') {\n\t\t\tconst previousPage = this.page - 1;\n\t\t\tif (previousPage < this._pages[0]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tprivate _pageClick = (p?: number) => this._changePage(p);\n\n\tprivate _generatePages() {\n\t\tif (!this.total || !this.pageSize) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst pages = Math.ceil(this.total / this.pageSize);\n\t\tthis.pagesChange.emit(pages);\n\t\treturn new Array(pages).fill(undefined).map((_, i) => i + 1);\n\t}\n\n\tprivate _generateSet = (\n\t\trange: number = 1,\n\t\tenableBoundaries: boolean = true\n\t): PaginationSetItem[] => {\n\t\tconst totalPages = this._pages.length;\n\n\t\tif (!totalPages) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet start = this.page - range;\n\t\tlet end = this.page + range;\n\n\t\tif (end > totalPages) {\n\t\t\tend = totalPages;\n\t\t\tstart = totalPages - range * 2;\n\t\t\tstart = start < 1 ? 1 : start;\n\t\t}\n\n\t\tif (start <= 1) {\n\t\t\tstart = 1;\n\t\t\tend = Math.min(range * 2 + 1, totalPages);\n\t\t}\n\n\t\tconst set = [];\n\n\t\tconst previous = {\n\t\t\ttype: 'previous',\n\t\t\tvalue: (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='caret'\n\t\t\t\t\tsize='sm'\n\t\t\t\t\trotate={90}\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\tconst next = {\n\t\t\ttype: 'next',\n\t\t\tvalue: (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='caret'\n\t\t\t\t\tsize='sm'\n\t\t\t\t\trotate={-90}\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\t// Disable page range, display all the pages\n\t\tif (range === null) {\n\t\t\tconst p = this._pages.map(p => ({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: p,\n\t\t\t}));\n\n\t\t\treturn enableBoundaries ? [previous, ...p, next] : p;\n\t\t}\n\n\t\tif (enableBoundaries) {\n\t\t\tset.push(previous);\n\t\t}\n\n\t\tif (start <= 3) {\n\t\t\tfor (let i = 1; i < start; i++) {\n\t\t\t\tset.push({\n\t\t\t\t\ttype: 'page',\n\t\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: 1,\n\t\t\t});\n\n\t\t\tset.push({\n\t\t\t\ttype: 'ellipsis',\n\t\t\t\tvalue: 'ellipsis',\n\t\t\t});\n\t\t}\n\n\t\tfor (let i = start; i <= end; i++) {\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t});\n\t\t}\n\n\t\tif (end >= totalPages - 2) {\n\t\t\tfor (let i = end + 1; i <= totalPages; i++) {\n\t\t\t\tset.push({\n\t\t\t\t\ttype: 'page',\n\t\t\t\t\tvalue: this._pages[i - 1],\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tset.push({\n\t\t\t\ttype: 'ellipsis',\n\t\t\t});\n\n\t\t\tset.push({\n\t\t\t\ttype: 'page',\n\t\t\t\tvalue: this._pages[this._pages.length - 1],\n\t\t\t});\n\t\t}\n\n\t\tif (enableBoundaries) {\n\t\t\tset.push(next);\n\t\t}\n\n\t\treturn set;\n\t};\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-Dgl2kvBS.js';
2
2
  import { T as ThemedHost } from './p-7QA93RrV.js';
3
3
  import { d as defineCustomElement$2 } from './p-BHphGfv6.js';
4
- import { d as defineCustomElement$1 } from './p-BgJXDL3C.js';
4
+ import { d as defineCustomElement$1 } from './p-DRR3gR1w.js';
5
5
 
6
6
  const helperComponentCss = ".inline-flex{display:inline-flex!important}.h-\\[0\\.875rem\\]{height:.875rem!important}.w-\\[0\\.875rem\\]{width:.875rem!important}*{box-sizing:border-box}:host{display:inline-flex;height:.875rem;width:.875rem}.absolute{position:absolute!important}.flex{display:flex!important}.cursor-pointer{cursor:pointer!important}.text-storm-300{--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.hover\\:text-storm-500:hover{--tw-text-opacity:1!important;color:rgb(24 30 41/var(--tw-text-opacity,1))!important}.dark\\:text-hurricane-300:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.dark\\:hover\\:text-hurricane-200:hover:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-hurricane-300:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.dark\\:hover\\:text-hurricane-200:hover:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}";
7
7
 
@@ -53,6 +53,6 @@ function defineCustomElement() {
53
53
  defineCustomElement();
54
54
 
55
55
  export { Helper as H, defineCustomElement as d };
56
- //# sourceMappingURL=p-CAvUntoE.js.map
56
+ //# sourceMappingURL=p-CeM-_6CM.js.map
57
57
 
58
- //# sourceMappingURL=p-CAvUntoE.js.map
58
+ //# sourceMappingURL=p-CeM-_6CM.js.map
@@ -1 +1 @@
1
- {"file":"p-CAvUntoE.js","mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,otCAAotC;;MCSluC,MAAM,iBAAAA,kBAAA,CAAA,MAAA,MAAA,SAAAC,CAAA,CAAA;;;;;;AAClB;;AAEG;IACK,QAAQ,GAAa,UAAU;AAEvC;;AAEG;IACK,SAAS,GAAc,KAAK;IAEpC,MAAM,GAAA;QACL,QACC,EAAC,UAAU,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACV,CAAA,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACC,KAAK,EAAC,MAAM,EACZ,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAA,EAEvB,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACC,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,0GAA0G,EAChH,OAAO,EAAC,iBAAiB,EACzB,IAAI,EAAC,SAAS,EACb,CAAA,EAEF,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,SAAS,EAAA,EAClB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACH,CACK,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/atoms/helper/helper.component.css?tag=p-helper&encapsulation=shadow","src/components/atoms/helper/helper.component.tsx"],"sourcesContent":[":host {\n\t@apply inline-flex h-[0.875rem] w-[0.875rem];\n}\n","import { Placement, Strategy } from '@floating-ui/dom';\nimport { Component, h, Prop } from '@stencil/core';\nimport { ThemedHost } from '../../../internal/themed-host.component';\n\n@Component({\n\ttag: 'p-helper',\n\tstyleUrl: 'helper.component.css',\n\tshadow: true,\n})\nexport class Helper {\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * The placement of the helper popover\n\t */\n\t@Prop() placement: Placement = 'top';\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<p-tooltip\n\t\t\t\t\tclass='flex'\n\t\t\t\t\tplacement={this.placement}\n\t\t\t\t\tstrategy={this.strategy}\n\t\t\t\t>\n\t\t\t\t\t<p-icon\n\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\tclass='cursor-pointer text-storm-300 hover:text-storm-500 dark:text-hurricane-300 dark:hover:text-hurricane-200'\n\t\t\t\t\t\tvariant='question-circle'\n\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t/>\n\n\t\t\t\t\t<div slot='content'>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t</p-tooltip>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n}\n"],"version":3}
1
+ {"file":"p-CeM-_6CM.js","mappings":";;;;;AAAA,MAAM,kBAAkB,GAAG,otCAAotC;;MCSluC,MAAM,iBAAAA,kBAAA,CAAA,MAAA,MAAA,SAAAC,CAAA,CAAA;;;;;;AAClB;;AAEG;IACK,QAAQ,GAAa,UAAU;AAEvC;;AAEG;IACK,SAAS,GAAc,KAAK;IAEpC,MAAM,GAAA;QACL,QACC,EAAC,UAAU,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACV,CAAA,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACC,KAAK,EAAC,MAAM,EACZ,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAA,EAEvB,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACC,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,0GAA0G,EAChH,OAAO,EAAC,iBAAiB,EACzB,IAAI,EAAC,SAAS,EACb,CAAA,EAEF,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,SAAS,EAAA,EAClB,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAQ,CACH,CACK,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/atoms/helper/helper.component.css?tag=p-helper&encapsulation=shadow","src/components/atoms/helper/helper.component.tsx"],"sourcesContent":[":host {\n\t@apply inline-flex h-[0.875rem] w-[0.875rem];\n}\n","import { Placement, Strategy } from '@floating-ui/dom';\nimport { Component, h, Prop } from '@stencil/core';\nimport { ThemedHost } from '../../../internal/themed-host.component';\n\n@Component({\n\ttag: 'p-helper',\n\tstyleUrl: 'helper.component.css',\n\tshadow: true,\n})\nexport class Helper {\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * The placement of the helper popover\n\t */\n\t@Prop() placement: Placement = 'top';\n\n\trender() {\n\t\treturn (\n\t\t\t<ThemedHost>\n\t\t\t\t<p-tooltip\n\t\t\t\t\tclass='flex'\n\t\t\t\t\tplacement={this.placement}\n\t\t\t\t\tstrategy={this.strategy}\n\t\t\t\t>\n\t\t\t\t\t<p-icon\n\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\tclass='cursor-pointer text-storm-300 hover:text-storm-500 dark:text-hurricane-300 dark:hover:text-hurricane-200'\n\t\t\t\t\t\tvariant='question-circle'\n\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t/>\n\n\t\t\t\t\t<div slot='content'>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t</p-tooltip>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n}\n"],"version":3}
@@ -5,7 +5,7 @@ import { a as childOfComposed } from './p-BFSNj6hu.js';
5
5
  import { c as cn } from './p-CT54OXR2.js';
6
6
  import { d as defineCustomElement$1 } from './p-D2igmK5l.js';
7
7
 
8
- const dropdownComponentCss = "*{box-sizing:border-box}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.z-datepicker{z-index:602!important}.z-dropdown{z-index:200!important}.block{display:block!important}.hidden{display:none!important}.w-auto{width:auto!important}.w-full{width:100%!important}.max-w-\\[13\\.875rem\\]{max-width:13.875rem!important}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}";
8
+ const dropdownComponentCss = "*{box-sizing:border-box}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.z-datepicker{z-index:401!important}.z-dropdown{z-index:200!important}.block{display:block!important}.hidden{display:none!important}.w-auto{width:auto!important}.w-full{width:100%!important}.max-w-\\[13\\.875rem\\]{max-width:13.875rem!important}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}";
9
9
 
10
10
  const dropdownContainerClass = cva(['hidden'], {
11
11
  variants: {
@@ -308,6 +308,6 @@ function defineCustomElement() {
308
308
  defineCustomElement();
309
309
 
310
310
  export { Dropdown as D, defineCustomElement as d };
311
- //# sourceMappingURL=p-CcbnUOou.js.map
311
+ //# sourceMappingURL=p-CsS0Qh_I.js.map
312
312
 
313
- //# sourceMappingURL=p-CcbnUOou.js.map
313
+ //# sourceMappingURL=p-CsS0Qh_I.js.map
@@ -1 +1 @@
1
- {"file":"p-CcbnUOou.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,6qCAA6qC;;ACwB1sC,MAAM,sBAAsB,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE;AAC9C,IAAA,QAAQ,EAAE;AACT,QAAA,QAAQ,EAAE;AACT,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,KAAK,EAAE,OAAO;AACd,SAAA;AACD,QAAA,SAAS,EAAE;AACV,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,IAAI,EAAE,QAAQ;AACd,SAAA;AACD,QAAA,QAAQ,EAAE;AACT,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,IAAI,EAAE,mBAAmB;AACzB,SAAA;AACD,QAAA,YAAY,EAAE;AACb,YAAA,KAAK,EAAE,YAAY;AACnB,YAAA,IAAI,EAAE,cAAc;AACpB,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE;AACjB,QAAA;AACC,YAAA,SAAS,EAAE,KAAK;AAChB,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,KAAK,EAAE,QAAQ;AACf,SAAA;AACD,KAAA;AACD,CAAA,CAAC;MAOW,QAAQ,iBAAAA,kBAAA,CAAA,MAAA,QAAA,SAAAC,CAAA,CAAA;;;;;;;AACpB;;AAEG;IACK,OAAO,GAAwB,SAAS;AAEhD;;AAEG;IACsB,SAAS,GAAc,cAAc;AAE9D;;AAEG;IACK,MAAM,GAAW,CAAC;AAE1B;;AAEG;IACK,QAAQ,GAAa,UAAU;AAEvC;;AAEG;IACK,IAAI,GAAY,KAAK;AAE7B;;AAEG;IACK,aAAa,GAAY,IAAI;A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AAG,IAAI;;;AAIrB,QAAA,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,WAAW,CAAC;QACvC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC;QACpC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC;AAElC,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;AACvB,QAAA,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC;;IAGlB,OAAO,GAAA;AACd,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YAChB;;QAGD,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE;YACrC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACvB,YAAA,UAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;AAClD,SAAA,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,KAAI;YAC/B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS;YACxC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;gBAC/B,GAAG,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;gBACb,IAAI,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;AACd,aAAA,CAAC;AACH,SAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/dropdown/dropdown.component.css?tag=p-dropdown&encapsulation=shadow","src/components/molecules/dropdown/dropdown.component.tsx"],"sourcesContent":["","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 { childOfComposed } from '../../../utils/child-of';\nimport { cn } from '../../../utils';\n\nconst dropdownContainerClass = cva(['hidden'], {\n\tvariants: {\n\t\tstrategy: {\n\t\t\tabsolute: 'absolute',\n\t\t\tfixed: 'fixed',\n\t\t},\n\t\tfullWidth: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'w-full',\n\t\t},\n\t\tmaxWidth: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'max-w-[13.875rem]',\n\t\t},\n\t\tisDatepicker: {\n\t\t\tfalse: 'z-dropdown',\n\t\t\ttrue: 'z-datepicker',\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tfullWidth: false,\n\t\t\tmaxWidth: true,\n\t\t\tclass: 'w-auto',\n\t\t},\n\t],\n});\n\n@Component({\n\ttag: 'p-dropdown',\n\tstyleUrl: 'dropdown.component.css',\n\tshadow: true,\n})\nexport class Dropdown {\n\t/**\n\t * The variant of the dropdown\n\t */\n\t@Prop() variant: 'default' | 'storm' = 'default';\n\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 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 open the dropdown manually\n\t */\n\t@Prop() manual: 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 class of the dropdown container\n\t */\n\t@Prop() containerClass: string;\n\n\t/**\n\t * Wether the dropdown container is a datepicker dropdown\n\t */\n\t@Prop() isDatepicker: boolean = false;\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 _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\tthis._checkItems();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='relative'>\n\t\t\t\t<div\n\t\t\t\t\tclass='trigger'\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<div class='relative w-full'>\n\t\t\t\t\t<p-dropdown-menu-container\n\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\tmaxWidth={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\tclass={cn(\n\t\t\t\t\t\t\tdropdownContainerClass({\n\t\t\t\t\t\t\t\tstrategy: this.strategy,\n\t\t\t\t\t\t\t\tmaxWidth: this.applyMaxWidth,\n\t\t\t\t\t\t\t\tfullWidth: this.applyFullWidth && !this.applyMaxWidth,\n\t\t\t\t\t\t\t\tisDatepicker: this.isDatepicker,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tthis.containerClass\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t\t\tonClick={() => this._containerClickHandler()}\n\t\t\t\t\t\trole='popover'\n\t\t\t\t\t\tdata-placement={this.placement}\n\t\t\t\t\t\tdata-strategy={this.strategy}\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</div>\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\tconst isOpen = this._menu.getAttribute('data-show') !== null;\n\n\t\tfor (let button of [...buttons]) {\n\t\t\tbutton.disabled = this.disableTriggerClick;\n\t\t\tbutton.active = active;\n\n\t\t\tif (button.iconOnly) {\n\t\t\t\tcontinue;\n\t\t\t}\n\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? isOpen\n\t\t\t\t\t? 'down'\n\t\t\t\t\t: 'up'\n\t\t\t\t: isOpen\n\t\t\t\t? 'up'\n\t\t\t\t: 'down';\n\t\t}\n\t}\n\n\tprivate _checkItems() {\n\t\tconst items = this._el.querySelectorAll<HTMLPDropdownMenuItemElement>(\n\t\t\t'p-dropdown-menu-item'\n\t\t);\n\n\t\tfor (let item of [...items]) {\n\t\t\titem.variant = this.variant;\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(event) {\n\t\tif (\n\t\t\t!this._menu.hasAttribute('data-show') ||\n\t\t\tchildOfComposed(event, this._menu)\n\t\t) {\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.manual) {\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\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('block');\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('block');\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}
1
+ {"file":"p-CsS0Qh_I.js","mappings":";;;;;;;AAAA,MAAM,oBAAoB,GAAG,6qCAA6qC;;ACwB1sC,MAAM,sBAAsB,GAAG,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE;AAC9C,IAAA,QAAQ,EAAE;AACT,QAAA,QAAQ,EAAE;AACT,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,KAAK,EAAE,OAAO;AACd,SAAA;AACD,QAAA,SAAS,EAAE;AACV,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,IAAI,EAAE,QAAQ;AACd,SAAA;AACD,QAAA,QAAQ,EAAE;AACT,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,IAAI,EAAE,mBAAmB;AACzB,SAAA;AACD,QAAA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CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,KAAI;YAC/B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS;YACxC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE;gBAC/B,GAAG,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;gBACb,IAAI,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;AACd,aAAA,CAAC;AACH,SAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/molecules/dropdown/dropdown.component.css?tag=p-dropdown&encapsulation=shadow","src/components/molecules/dropdown/dropdown.component.tsx"],"sourcesContent":["","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 { childOfComposed } from '../../../utils/child-of';\nimport { cn } from '../../../utils';\n\nconst dropdownContainerClass = cva(['hidden'], {\n\tvariants: {\n\t\tstrategy: {\n\t\t\tabsolute: 'absolute',\n\t\t\tfixed: 'fixed',\n\t\t},\n\t\tfullWidth: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'w-full',\n\t\t},\n\t\tmaxWidth: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'max-w-[13.875rem]',\n\t\t},\n\t\tisDatepicker: {\n\t\t\tfalse: 'z-dropdown',\n\t\t\ttrue: 'z-datepicker',\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tfullWidth: false,\n\t\t\tmaxWidth: true,\n\t\t\tclass: 'w-auto',\n\t\t},\n\t],\n});\n\n@Component({\n\ttag: 'p-dropdown',\n\tstyleUrl: 'dropdown.component.css',\n\tshadow: true,\n})\nexport class Dropdown {\n\t/**\n\t * The variant of the dropdown\n\t */\n\t@Prop() variant: 'default' | 'storm' = 'default';\n\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 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 open the dropdown manually\n\t */\n\t@Prop() manual: 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 class of the dropdown container\n\t */\n\t@Prop() containerClass: string;\n\n\t/**\n\t * Wether the dropdown container is a datepicker dropdown\n\t */\n\t@Prop() isDatepicker: boolean = false;\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 _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\tthis._checkItems();\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='relative'>\n\t\t\t\t<div\n\t\t\t\t\tclass='trigger'\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<div class='relative w-full'>\n\t\t\t\t\t<p-dropdown-menu-container\n\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\tmaxWidth={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\tclass={cn(\n\t\t\t\t\t\t\tdropdownContainerClass({\n\t\t\t\t\t\t\t\tstrategy: this.strategy,\n\t\t\t\t\t\t\t\tmaxWidth: this.applyMaxWidth,\n\t\t\t\t\t\t\t\tfullWidth: this.applyFullWidth && !this.applyMaxWidth,\n\t\t\t\t\t\t\t\tisDatepicker: this.isDatepicker,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tthis.containerClass\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t\t\tonClick={() => this._containerClickHandler()}\n\t\t\t\t\t\trole='popover'\n\t\t\t\t\t\tdata-placement={this.placement}\n\t\t\t\t\t\tdata-strategy={this.strategy}\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</div>\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\tconst isOpen = this._menu.getAttribute('data-show') !== null;\n\n\t\tfor (let button of [...buttons]) {\n\t\t\tbutton.disabled = this.disableTriggerClick;\n\t\t\tbutton.active = active;\n\n\t\t\tif (button.iconOnly) {\n\t\t\t\tcontinue;\n\t\t\t}\n\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? isOpen\n\t\t\t\t\t? 'down'\n\t\t\t\t\t: 'up'\n\t\t\t\t: isOpen\n\t\t\t\t? 'up'\n\t\t\t\t: 'down';\n\t\t}\n\t}\n\n\tprivate _checkItems() {\n\t\tconst items = this._el.querySelectorAll<HTMLPDropdownMenuItemElement>(\n\t\t\t'p-dropdown-menu-item'\n\t\t);\n\n\t\tfor (let item of [...items]) {\n\t\t\titem.variant = this.variant;\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(event) {\n\t\tif (\n\t\t\t!this._menu.hasAttribute('data-show') ||\n\t\t\tchildOfComposed(event, this._menu)\n\t\t) {\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.manual) {\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\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('block');\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('block');\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}
@@ -3,7 +3,7 @@ import { a as autoUpdate, c as computePosition, o as offset, f as flip, s as shi
3
3
  import { c as cva } from './p-CBWjHURv.js';
4
4
  import { T as ThemedHost } from './p-7QA93RrV.js';
5
5
 
6
- const tooltipComponentCss = ".relative{position:relative!important}.h-inherit{height:inherit!important}.w-inherit{width:inherit!important}*{box-sizing:border-box}:host{height:inherit;max-width:100%;position:relative;width:inherit}:host([data-filled]){cursor:pointer}:host(:not([data-filled])){cursor:auto}.pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.z-tooltip{z-index:601!important}.inline-block{display:inline-block!important}.flex{display:flex!important}.w-\\[2px\\]{width:2px!important}.w-full{width:100%!important}.w-max{width:max-content!important}.max-w-\\[14\\.5rem\\]{max-width:14.5rem!important}.max-w-\\[18rem\\]{max-width:18rem!important}.max-w-full{max-width:100%!important}.gap-2{gap:.5rem!important}.whitespace-normal{white-space:normal!important}.rounded-lg{border-radius:.5rem!important}.bg-negative-red-500{--tw-bg-opacity:1!important;background-color:rgb(230 30 30/var(--tw-bg-opacity,1))!important}.bg-storm-500{background-color:rgb(24 30 41/var(--tw-bg-opacity,1))!important}.bg-storm-500,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-storm-300{color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.text-storm-300,.text-white{--tw-text-opacity:1!important}.text-white{color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.blur{--tw-blur:blur(8px)!important}.blur,.drop-shadow-3{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.drop-shadow-3{--tw-drop-shadow:drop-shadow(0 1px 1px rgba(0,2,2,.08)) drop-shadow(0 2px 2px rgba(0,2,2,.08)) drop-shadow(0 4px 4px rgba(0,2,2,.08))!important}.transition-opacity{transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.dark\\:bg-hurricane-800:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(24 30 41/var(--tw-bg-opacity,1))!important}.dark\\:bg-negative-red-alternative:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(255 92 92/var(--tw-bg-opacity,1))!important}.dark\\:bg-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-storm-300:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.dark\\:bg-hurricane-800:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(24 30 41/var(--tw-bg-opacity,1))!important}.dark\\:bg-negative-red-alternative:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(255 92 92/var(--tw-bg-opacity,1))!important}.dark\\:bg-white:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-storm-300:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}";
6
+ const tooltipComponentCss = ".relative{position:relative!important}.h-inherit{height:inherit!important}.w-inherit{width:inherit!important}*{box-sizing:border-box}:host{height:inherit;max-width:100%;position:relative;width:inherit}:host([data-filled]){cursor:pointer}:host(:not([data-filled])){cursor:auto}.pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.z-tooltip{z-index:400!important}.inline-block{display:inline-block!important}.flex{display:flex!important}.w-\\[2px\\]{width:2px!important}.w-full{width:100%!important}.w-max{width:max-content!important}.max-w-\\[14\\.5rem\\]{max-width:14.5rem!important}.max-w-\\[18rem\\]{max-width:18rem!important}.max-w-full{max-width:100%!important}.gap-2{gap:.5rem!important}.whitespace-normal{white-space:normal!important}.rounded-lg{border-radius:.5rem!important}.bg-negative-red-500{--tw-bg-opacity:1!important;background-color:rgb(230 30 30/var(--tw-bg-opacity,1))!important}.bg-storm-500{background-color:rgb(24 30 41/var(--tw-bg-opacity,1))!important}.bg-storm-500,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-1{padding-bottom:.25rem!important;padding-top:.25rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-storm-300{color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.text-storm-300,.text-white{--tw-text-opacity:1!important}.text-white{color:rgb(255 255 255/var(--tw-text-opacity,1))!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.blur{--tw-blur:blur(8px)!important}.blur,.drop-shadow-3{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}.drop-shadow-3{--tw-drop-shadow:drop-shadow(0 1px 1px rgba(0,2,2,.08)) drop-shadow(0 2px 2px rgba(0,2,2,.08)) drop-shadow(0 4px 4px rgba(0,2,2,.08))!important}.transition-opacity{transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.dark\\:bg-hurricane-800:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(24 30 41/var(--tw-bg-opacity,1))!important}.dark\\:bg-negative-red-alternative:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(255 92 92/var(--tw-bg-opacity,1))!important}.dark\\:bg-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-storm-300:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}.dark\\:bg-hurricane-800:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(24 30 41/var(--tw-bg-opacity,1))!important}.dark\\:bg-negative-red-alternative:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(255 92 92/var(--tw-bg-opacity,1))!important}.dark\\:bg-white:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(163 165 169/var(--tw-text-opacity,1))!important}.dark\\:text-storm-300:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1!important;color:rgb(116 120 127/var(--tw-text-opacity,1))!important}";
7
7
 
8
8
  const popover = cva([
9
9
  'inline-block px-2',
@@ -246,6 +246,6 @@ function defineCustomElement() {
246
246
  defineCustomElement();
247
247
 
248
248
  export { Tooltip as T, defineCustomElement as d };
249
- //# sourceMappingURL=p-BgJXDL3C.js.map
249
+ //# sourceMappingURL=p-DRR3gR1w.js.map
250
250
 
251
- //# sourceMappingURL=p-BgJXDL3C.js.map
251
+ //# sourceMappingURL=p-DRR3gR1w.js.map
@@ -1 +1 @@
1
- {"file":"p-BgJXDL3C.js","mappings":";;;;;AAAA,MAAM,mBAAmB,GAAG,o+HAAo+H;;ACsBhgI,MAAM,OAAO,GAAG,GAAG,CAClB;IACC,mBAAmB;IACnB,SAAS;IACT,4CAA4C;IAC5C,YAAY;IAEZ,WAAW;IACX,qBAAqB;CACrB,EACD;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,KAAK,EACJ,gFAAgF;AACjF,YAAA,KAAK,EAAE,eAAe;AACtB,YAAA,KAAK,EAAE,mBAAmB;AAC1B,SAAA;AACD,QAAA,QAAQ,EAAE;AACT,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,QAAQ,EAAE,UAAU;AACpB,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE;AACjB,QAAA;AACC,YAAA,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AAC3B,YAAA,KAAK,EAAE,OAAO;AACd,SAAA;AACD,QAAA;AACC,YAAA,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AAC3B,YAAA,KAAK,EACJ,4EAA4E;AAC7E,SAAA;AACD,KAAA;AACD,CAAA,CACD;MAOY,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;;;;;;;AACnB;;AAEG;IACK,OAAO,GAAgC,OAA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GAAG,SAAS;YAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;gBAClC,GAAG,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;gBACb,IAAI,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;AACd,aAAA,CAAC;AACH,SAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/atoms/tooltip/tooltip.component.css?tag=p-tooltip&encapsulation=shadow","src/components/atoms/tooltip/tooltip.component.tsx"],"sourcesContent":[":host {\n\t@apply relative h-inherit w-inherit max-w-full;\n}\n\n:host([data-filled]) {\n\t@apply cursor-pointer;\n}\n\n:host(:not([data-filled])) {\n\t@apply cursor-auto;\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\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../internal/themed-host.component';\n\nconst popover = cva(\n\t[\n\t\t'inline-block px-2',\n\t\t'text-xs',\n\t\t'opacity-0 drop-shadow-3 transition-opacity',\n\t\t'rounded-lg',\n\n\t\t'z-tooltip',\n\t\t'pointer-events-none',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\thover:\n\t\t\t\t\t'bg-storm-500 dark:bg-white text-white dark:text-storm-300 py-1 max-w-[14.5rem]',\n\t\t\t\tclick: 'max-w-[18rem]',\n\t\t\t\terror: 'max-w-full w-full',\n\t\t\t},\n\t\t\tstrategy: {\n\t\t\t\tfixed: 'fixed',\n\t\t\t\tabsolute: 'absolute',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tvariant: ['hover', 'click'],\n\t\t\t\tclass: 'w-max',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['click', 'error'],\n\t\t\t\tclass:\n\t\t\t\t\t'bg-white dark:bg-hurricane-800 text-storm-300 dark:text-hurricane-200 py-2',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-tooltip',\n\tstyleUrl: 'tooltip.component.css',\n\tshadow: true,\n})\nexport class Tooltip {\n\t/**\n\t * The variant of the popover\n\t */\n\t@Prop() variant: 'hover' | 'click' | 'error' = 'hover';\n\n\t/**\n\t * The content of the popover\n\t */\n\t@Prop() content: string;\n\n\t/**\n\t * The placement of the popover\n\t */\n\t@Prop() placement: Placement;\n\n\t/**\n\t * The offset of the popover\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether the tooltip can be shown by user input\n\t */\n\t@Prop() enableUserInput: boolean = true;\n\n\t/**\n\t * Wether to show the popover\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to someone can manually close the popover\n\t */\n\t@Prop() canManuallyClose: boolean = true;\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\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasContentSlot = false;\n\n\tprivate _loaded = false;\n\tprivate _popover: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentWillLoad() {\n\t\tthis._hasContentSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"content\"]'\n\t\t);\n\t}\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\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<ThemedHost\n\t\t\t\tdata-filled={this.content?.length > 0 || this._hasContentSlot}\n\t\t\t>\n\t\t\t\t<slot name='trigger' />\n\t\t\t\t<div\n\t\t\t\t\tclass={popover({\n\t\t\t\t\t\tvariant: this.variant,\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\tdata-placement={this.placement}\n\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t>\n\t\t\t\t\t<div class='flex gap-2 whitespace-normal'>\n\t\t\t\t\t\t{this.variant === 'error' && (\n\t\t\t\t\t\t\t<div class='w-[2px] bg-negative-red-500 dark:bg-negative-red-alternative'></div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.content ? this.content : <slot name='content' />}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('click', { capture: true })\n\tprotected clickHandler() {\n\t\tif (this.variant === 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._popover.hasAttribute('data-show')) {\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() {\n\t\tif (this.variant === 'hover' || !this.canManuallyClose || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Listen('mouseenter')\n\t@Listen('focus')\n\tprotected mouseEnterHandler() {\n\t\tif (this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('mouseleave')\n\t@Listen('blur')\n\tprotected mouseLeaveHandler() {\n\t\tif (this.show || this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Watch('show')\n\tonShowChange(show: boolean) {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (show && !this._popover.hasAttribute('data-show')) {\n\t\t\treturn this._show();\n\t\t}\n\n\t\treturn this._hide();\n\t}\n\n\t@Watch('content')\n\tonContentChange(content: string) {\n\t\tif (!content || content.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.content?.length && !this._hasContentSlot) {\n\t\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\t\tthis._hide();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._popover, () => this._update());\n\n\t\t// Make the popover visible\n\t\tthis._popover.setAttribute('data-show', '');\n\n\t\tthis._popover.classList.remove('opacity-0', 'pointer-events-none');\n\t\tthis._popover.classList.add('opacity-100', 'pointer-events-auto');\n\n\t\t// Update its position\n\t\tthis.isOpen.emit(true);\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded) {\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._popover.removeAttribute('data-show');\n\n\t\tthis._popover.classList.remove('opacity-100', 'pointer-events-auto');\n\t\tthis._popover.classList.add('opacity-0', 'pointer-events-none');\n\n\t\tthis.isOpen.emit(false);\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._popover = popover;\n\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 _update() {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._popover, {\n\t\t\tplacement:\n\t\t\t\tthis.variant === 'error' && !this.placement\n\t\t\t\t\t? 'bottom-start'\n\t\t\t\t\t: this.placement ?? 'top',\n\t\t\tstrategy: this.strategy,\n\n\t\t\tmiddleware: [offset(this.offset), flip(), shift()],\n\t\t}).then(({ x, y, placement }) => {\n\t\t\tthis._popover.dataset.placement = placement;\n\t\t\tObject.assign(this._popover.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":"p-DRR3gR1w.js","mappings":";;;;;AAAA,MAAM,mBAAmB,GAAG,o+HAAo+H;;ACsBhgI,MAAM,OAAO,GAAG,GAAG,CAClB;IACC,mBAAmB;IACnB,SAAS;IACT,4CAA4C;IAC5C,YAAY;IAEZ,WAAW;IACX,qBAAqB;CACrB,EACD;AACC,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;AACR,YAAA,KAAK,EACJ,gFAAgF;AACjF,YAAA,KAAK,EAAE,eAAe;AACtB,YAAA,KAAK,EAAE,mBAAmB;AAC1B,SAAA;AACD,QAAA,QAAQ,EAAE;AACT,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,QAAQ,EAAE,UAAU;AACpB,SAAA;AACD,KAAA;AACD,IAAA,gBAAgB,EAAE;AACjB,QAAA;AACC,YAAA,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AAC3B,YAAA,KAAK,EAAE,OAAO;AACd,SAAA;AACD,QAAA;AACC,YAAA,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;AAC3B,YAAA,KAAK,EACJ,4EAA4E;AAC7E,SAAA;AACD,KAAA;AACD,CAAA,CACD;MAOY,OAAO,iBAAAA,kBAAA,CAAA,MAAA,OAAA,SAAAC,CAAA,CAAA;;;;;;;AACnB;;AAEG;IACK,OAAO,GAAgC,OAAO;AAEtD;;AAEG;AACK,IAAA,OAAO;AAEf;;AAEG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AI,CAAC,QAAQ,CAAC,KAAK,EAAE;gBAClC,GAAG,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;gBACb,IAAI,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;AACd,aAAA,CAAC;AACH,SAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/atoms/tooltip/tooltip.component.css?tag=p-tooltip&encapsulation=shadow","src/components/atoms/tooltip/tooltip.component.tsx"],"sourcesContent":[":host {\n\t@apply relative h-inherit w-inherit max-w-full;\n}\n\n:host([data-filled]) {\n\t@apply cursor-pointer;\n}\n\n:host(:not([data-filled])) {\n\t@apply cursor-auto;\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\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { ThemedHost } from '../../../internal/themed-host.component';\n\nconst popover = cva(\n\t[\n\t\t'inline-block px-2',\n\t\t'text-xs',\n\t\t'opacity-0 drop-shadow-3 transition-opacity',\n\t\t'rounded-lg',\n\n\t\t'z-tooltip',\n\t\t'pointer-events-none',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\thover:\n\t\t\t\t\t'bg-storm-500 dark:bg-white text-white dark:text-storm-300 py-1 max-w-[14.5rem]',\n\t\t\t\tclick: 'max-w-[18rem]',\n\t\t\t\terror: 'max-w-full w-full',\n\t\t\t},\n\t\t\tstrategy: {\n\t\t\t\tfixed: 'fixed',\n\t\t\t\tabsolute: 'absolute',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tvariant: ['hover', 'click'],\n\t\t\t\tclass: 'w-max',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['click', 'error'],\n\t\t\t\tclass:\n\t\t\t\t\t'bg-white dark:bg-hurricane-800 text-storm-300 dark:text-hurricane-200 py-2',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-tooltip',\n\tstyleUrl: 'tooltip.component.css',\n\tshadow: true,\n})\nexport class Tooltip {\n\t/**\n\t * The variant of the popover\n\t */\n\t@Prop() variant: 'hover' | 'click' | 'error' = 'hover';\n\n\t/**\n\t * The content of the popover\n\t */\n\t@Prop() content: string;\n\n\t/**\n\t * The placement of the popover\n\t */\n\t@Prop() placement: Placement;\n\n\t/**\n\t * The offset of the popover\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether the tooltip can be shown by user input\n\t */\n\t@Prop() enableUserInput: boolean = true;\n\n\t/**\n\t * Wether to show the popover\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to someone can manually close the popover\n\t */\n\t@Prop() canManuallyClose: boolean = true;\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\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasContentSlot = false;\n\n\tprivate _loaded = false;\n\tprivate _popover: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentWillLoad() {\n\t\tthis._hasContentSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"content\"]'\n\t\t);\n\t}\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\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<ThemedHost\n\t\t\t\tdata-filled={this.content?.length > 0 || this._hasContentSlot}\n\t\t\t>\n\t\t\t\t<slot name='trigger' />\n\t\t\t\t<div\n\t\t\t\t\tclass={popover({\n\t\t\t\t\t\tvariant: this.variant,\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\tdata-placement={this.placement}\n\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t>\n\t\t\t\t\t<div class='flex gap-2 whitespace-normal'>\n\t\t\t\t\t\t{this.variant === 'error' && (\n\t\t\t\t\t\t\t<div class='w-[2px] bg-negative-red-500 dark:bg-negative-red-alternative'></div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.content ? this.content : <slot name='content' />}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</ThemedHost>\n\t\t);\n\t}\n\n\t@Listen('click', { capture: true })\n\tprotected clickHandler() {\n\t\tif (this.variant === 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._popover.hasAttribute('data-show')) {\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() {\n\t\tif (this.variant === 'hover' || !this.canManuallyClose || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Listen('mouseenter')\n\t@Listen('focus')\n\tprotected mouseEnterHandler() {\n\t\tif (this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('mouseleave')\n\t@Listen('blur')\n\tprotected mouseLeaveHandler() {\n\t\tif (this.show || this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Watch('show')\n\tonShowChange(show: boolean) {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (show && !this._popover.hasAttribute('data-show')) {\n\t\t\treturn this._show();\n\t\t}\n\n\t\treturn this._hide();\n\t}\n\n\t@Watch('content')\n\tonContentChange(content: string) {\n\t\tif (!content || content.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.content?.length && !this._hasContentSlot) {\n\t\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\t\tthis._hide();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._popover, () => this._update());\n\n\t\t// Make the popover visible\n\t\tthis._popover.setAttribute('data-show', '');\n\n\t\tthis._popover.classList.remove('opacity-0', 'pointer-events-none');\n\t\tthis._popover.classList.add('opacity-100', 'pointer-events-auto');\n\n\t\t// Update its position\n\t\tthis.isOpen.emit(true);\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded) {\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._popover.removeAttribute('data-show');\n\n\t\tthis._popover.classList.remove('opacity-100', 'pointer-events-auto');\n\t\tthis._popover.classList.add('opacity-0', 'pointer-events-none');\n\n\t\tthis.isOpen.emit(false);\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._popover = popover;\n\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 _update() {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._popover, {\n\t\t\tplacement:\n\t\t\t\tthis.variant === 'error' && !this.placement\n\t\t\t\t\t? 'bottom-start'\n\t\t\t\t\t: this.placement ?? 'top',\n\t\t\tstrategy: this.strategy,\n\n\t\t\tmiddleware: [offset(this.offset), flip(), shift()],\n\t\t}).then(({ x, y, placement }) => {\n\t\t\tthis._popover.dataset.placement = placement;\n\t\t\tObject.assign(this._popover.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}