@paperless/core 0.1.0-alpha.185 → 0.1.0-alpha.187

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/build/p-089bc4e8.entry.js +1 -0
  3. package/dist/build/p-37eac991.entry.js +1 -0
  4. package/dist/build/p-38542cd3.entry.js +1 -0
  5. package/dist/build/p-6bf8c6e0.entry.js +1 -0
  6. package/dist/build/p-9e78f612.entry.js +1 -0
  7. package/dist/build/p-c1eb8756.entry.js +1 -0
  8. package/dist/{paperless/p-639afc96.entry.js → build/p-d3ed0174.entry.js} +1 -1
  9. package/dist/build/p-f2cead01.entry.js +1 -0
  10. package/dist/build/p-fcdd7b83.entry.js +1 -0
  11. package/dist/build/paperless.css +19 -3
  12. package/dist/build/paperless.esm.js +1 -1
  13. package/dist/cjs/index-cf92051a.js +12 -8
  14. package/dist/cjs/loader.cjs.js +1 -1
  15. package/dist/cjs/p-button_3.cjs.entry.js +3 -3
  16. package/dist/cjs/p-divider.cjs.entry.js +1 -1
  17. package/dist/cjs/p-dropdown_3.cjs.entry.js +201 -0
  18. package/dist/cjs/p-helper_2.cjs.entry.js +160 -0
  19. package/dist/cjs/p-input-group_4.cjs.entry.js +132 -0
  20. package/dist/cjs/p-page-size-select_3.cjs.entry.js +251 -0
  21. package/dist/cjs/p-select.cjs.entry.js +149 -0
  22. package/dist/cjs/p-table-column_5.cjs.entry.js +5 -5
  23. package/dist/cjs/p-table.cjs.entry.js +1 -1
  24. package/dist/cjs/paperless.cjs.js +1 -1
  25. package/dist/collection/collection-manifest.json +1 -0
  26. package/dist/collection/components/atoms/button/button.component.css +1 -1
  27. package/dist/collection/components/atoms/divider/divider.component.css +1 -1
  28. package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.css +4 -2
  29. package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js +28 -2
  30. package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css +1 -1
  31. package/dist/collection/components/atoms/helper/helper.component.css +1 -1
  32. package/dist/collection/components/atoms/icon/icon.component.css +1 -1
  33. package/dist/collection/components/atoms/label/label.component.css +1 -1
  34. package/dist/collection/components/atoms/loader/loader.component.css +1 -1
  35. package/dist/collection/components/atoms/pagination-item/pagination-item.component.css +1 -1
  36. package/dist/collection/components/atoms/segment-container/segment-container.component.css +1 -1
  37. package/dist/collection/components/atoms/segment-item/segment-item.component.css +1 -1
  38. package/dist/collection/components/atoms/table-container/table-container.component.css +1 -1
  39. package/dist/collection/components/atoms/tooltip/tooltip.component.css +1 -1
  40. package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -1
  41. package/dist/collection/components/molecules/dropdown/dropdown.component.js +49 -13
  42. package/dist/collection/components/molecules/input-group/input-group.component.css +23 -5
  43. package/dist/collection/components/molecules/input-group/input-group.component.js +28 -3
  44. package/dist/collection/components/molecules/pagination/pagination.component.css +1 -1
  45. package/dist/collection/components/molecules/select/select.component.css +3 -0
  46. package/dist/collection/components/molecules/select/select.component.js +366 -0
  47. package/dist/collection/components/molecules/table-column/table-column.component.css +1 -1
  48. package/dist/collection/components/molecules/table-footer/table-footer.component.css +1 -1
  49. package/dist/collection/components/molecules/table-header/table-header.component.css +1 -1
  50. package/dist/collection/components/molecules/table-row/table-row.component.css +1 -1
  51. package/dist/collection/components/organisms/table/table.component.css +1 -1
  52. package/dist/components/button.component.js +1 -1
  53. package/dist/components/divider.component.js +1 -1
  54. package/dist/components/dropdown-menu-container.component.js +9 -3
  55. package/dist/components/dropdown-menu-item.component.js +1 -1
  56. package/dist/components/dropdown.component.js +30 -12
  57. package/dist/components/helper.component.js +1 -1
  58. package/dist/components/icon.component.js +1 -1
  59. package/dist/components/index.d.ts +1 -0
  60. package/dist/components/index.js +1 -0
  61. package/dist/components/input-group.component.js +11 -3
  62. package/dist/components/label.component.js +1 -1
  63. package/dist/components/loader.component.js +1 -1
  64. package/dist/components/p-select.d.ts +11 -0
  65. package/dist/components/p-select.js +216 -0
  66. package/dist/components/p-table.js +1 -1
  67. package/dist/components/pagination-item.component.js +1 -1
  68. package/dist/components/pagination.component.js +1 -1
  69. package/dist/components/segment-container.component.js +1 -1
  70. package/dist/components/segment-item.component.js +1 -1
  71. package/dist/components/table-column.component.js +1 -1
  72. package/dist/components/table-container.component.js +1 -1
  73. package/dist/components/table-footer.component.js +1 -1
  74. package/dist/components/table-header.component.js +1 -1
  75. package/dist/components/table-row.component.js +1 -1
  76. package/dist/components/tooltip.component.js +1 -1
  77. package/dist/esm/index-7c99f044.js +12 -8
  78. package/dist/esm/loader.js +1 -1
  79. package/dist/esm/p-button_3.entry.js +3 -3
  80. package/dist/esm/p-divider.entry.js +1 -1
  81. package/dist/esm/p-dropdown_3.entry.js +195 -0
  82. package/dist/esm/p-helper_2.entry.js +155 -0
  83. package/dist/esm/p-input-group_4.entry.js +125 -0
  84. package/dist/esm/p-page-size-select_3.entry.js +245 -0
  85. package/dist/esm/p-select.entry.js +145 -0
  86. package/dist/esm/p-table-column_5.entry.js +5 -5
  87. package/dist/esm/p-table.entry.js +1 -1
  88. package/dist/esm/paperless.js +1 -1
  89. package/dist/index.html +1 -1
  90. package/dist/paperless/p-089bc4e8.entry.js +1 -0
  91. package/dist/paperless/p-37eac991.entry.js +1 -0
  92. package/dist/paperless/p-38542cd3.entry.js +1 -0
  93. package/dist/paperless/p-6bf8c6e0.entry.js +1 -0
  94. package/dist/paperless/p-9e78f612.entry.js +1 -0
  95. package/dist/paperless/p-c1eb8756.entry.js +1 -0
  96. package/dist/{build/p-639afc96.entry.js → paperless/p-d3ed0174.entry.js} +1 -1
  97. package/dist/paperless/p-f2cead01.entry.js +1 -0
  98. package/dist/paperless/p-fcdd7b83.entry.js +1 -0
  99. package/dist/paperless/paperless.css +19 -3
  100. package/dist/paperless/paperless.esm.js +1 -1
  101. package/dist/sw.js +1 -1
  102. package/dist/sw.js.map +1 -1
  103. package/dist/types/components/atoms/dropdown-menu-container/dropdown-menu-container.component.d.ts +4 -0
  104. package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +8 -2
  105. package/dist/types/components/molecules/input-group/input-group.component.d.ts +4 -0
  106. package/dist/types/components/molecules/select/select.component.d.ts +74 -0
  107. package/dist/types/components.d.ts +129 -0
  108. package/package.json +1 -1
  109. package/dist/build/p-007de3c2.entry.js +0 -1
  110. package/dist/build/p-7ddefd1f.entry.js +0 -1
  111. package/dist/build/p-aae4caab.entry.js +0 -1
  112. package/dist/build/p-be4b9c2b.entry.js +0 -1
  113. package/dist/build/p-c74206e0.entry.js +0 -1
  114. package/dist/build/p-d2afd9a5.entry.js +0 -1
  115. package/dist/build/p-da1f5577.entry.js +0 -1
  116. package/dist/cjs/p-dropdown-menu-item_4.cjs.entry.js +0 -268
  117. package/dist/cjs/p-dropdown_2.cjs.entry.js +0 -163
  118. package/dist/cjs/p-helper_5.cjs.entry.js +0 -142
  119. package/dist/cjs/p-tooltip.cjs.entry.js +0 -143
  120. package/dist/esm/p-dropdown-menu-item_4.entry.js +0 -261
  121. package/dist/esm/p-dropdown_2.entry.js +0 -158
  122. package/dist/esm/p-helper_5.entry.js +0 -134
  123. package/dist/esm/p-tooltip.entry.js +0 -139
  124. package/dist/paperless/p-007de3c2.entry.js +0 -1
  125. package/dist/paperless/p-7ddefd1f.entry.js +0 -1
  126. package/dist/paperless/p-aae4caab.entry.js +0 -1
  127. package/dist/paperless/p-be4b9c2b.entry.js +0 -1
  128. package/dist/paperless/p-c74206e0.entry.js +0 -1
  129. package/dist/paperless/p-d2afd9a5.entry.js +0 -1
  130. package/dist/paperless/p-da1f5577.entry.js +0 -1
@@ -1,261 +0,0 @@
1
- import { r as registerInstance, h, H as Host, c as createEvent, g as getElement } from './index-7c99f044.js';
2
- import { f as formatTranslation, g as getLocaleComponentStrings } from './localization-abb97f67.js';
3
- import { d as defaultSize, a as defaultSizeOptions } from './constants-826f9460.js';
4
-
5
- const dropdownMenuItemComponentCss = ".visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.m-0{margin:0!important}.ml-1{margin-left:.25rem!important}.block{display:block!important}.flex{display:flex!important}.table{display:table!important}.hidden{display:none!important}.h-8{height:2rem!important}.h-6{height:1.5rem!important}.w-full{width:100%!important}.w-1{width:.25rem!important}.w-2{width:.5rem!important}.w-3{width:.75rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-6{width:1.5rem!important}.w-7{width:1.75rem!important}.w-8{width:2rem!important}.w-9{width:2.25rem!important}.w-10{width:2.5rem!important}.w-11{width:2.75rem!important}.w-auto{width:auto!important}.flex-1{flex:1 1 0%!important}.rotate-0{--tw-rotate:0deg!important}.rotate-0,.rotate-25{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-25{--tw-rotate:25deg!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.rotate-135{--tw-rotate:135deg!important}.rotate-135,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-180{--tw-rotate:180deg!important}.rotate-225{--tw-rotate:225deg!important}.rotate-225,.rotate-270{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-270{--tw-rotate:270deg!important}.rotate-315{--tw-rotate:315deg!important}.-rotate-0,.rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-0{--tw-rotate:-0deg!important}.-rotate-25{--tw-rotate:-25deg!important}.-rotate-25,.-rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-45{--tw-rotate:-45deg!important}.-rotate-90{--tw-rotate:-90deg!important}.-rotate-135,.-rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-135{--tw-rotate:-135deg!important}.-rotate-180{--tw-rotate:-180deg!important}.-rotate-180,.-rotate-225{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-225{--tw-rotate:-225deg!important}.-rotate-270{--tw-rotate:-270deg!important}.-rotate-270,.-rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-315{--tw-rotate:-315deg!important}.scale-x-flip{--tw-scale-x:-1!important}.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-y-flip{--tw-scale-y:-1!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.gap-4{gap:1rem!important}.justify-self-end{justify-self:end!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xxs{font-size:.6875rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important}.text-lg,.text-xl{line-height:1.75rem!important}.text-xl{font-size:1.25rem!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.font-semibold{font-weight:600!important}.text-storm{--tw-text-opacity:1!important;color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-indigo{color:rgb(82 138 250/var(--tw-text-opacity))!important}.text-indigo,.text-storm-dark{--tw-text-opacity:1!important}.text-storm-dark{color:rgb(39 40 56/var(--tw-text-opacity))!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{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}*{box-sizing:border-box}:host{--tw-text-opacity:1;align-items:center;border-radius:.25rem;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;font-weight:600;gap:.5rem;height:2rem;line-height:1.25rem;padding-left:.5rem;padding-right:.5rem;width:100%}:host(:hover){--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(81 83 107/var(--tw-text-opacity))}:host(.active){--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(82 138 250/var(--tw-text-opacity))}.w-1\\/12{width:8.333333%!important}.w-2\\/12{width:16.666667%!important}.w-3\\/12{width:25%!important}.w-4\\/12{width:33.333333%!important}.w-5\\/12{width:41.666667%!important}.w-6\\/12{width:50%!important}.w-7\\/12{width:58.333333%!important}.w-8\\/12{width:66.666667%!important}.w-9\\/12{width:75%!important}.w-10\\/12{width:83.333333%!important}.w-11\\/12{width:91.666667%!important}@media (min-width:40rem){.tablet\\:w-1\\/12{width:8.333333%!important}.tablet\\:w-2\\/12{width:16.666667%!important}.tablet\\:w-3\\/12{width:25%!important}.tablet\\:w-4\\/12{width:33.333333%!important}.tablet\\:w-5\\/12{width:41.666667%!important}.tablet\\:w-6\\/12{width:50%!important}.tablet\\:w-7\\/12{width:58.333333%!important}.tablet\\:w-8\\/12{width:66.666667%!important}.tablet\\:w-9\\/12{width:75%!important}.tablet\\:w-10\\/12{width:83.333333%!important}.tablet\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:w-1\\/12{width:8.333333%!important}.desktop-xs\\:w-2\\/12{width:16.666667%!important}.desktop-xs\\:w-3\\/12{width:25%!important}.desktop-xs\\:w-4\\/12{width:33.333333%!important}.desktop-xs\\:w-5\\/12{width:41.666667%!important}.desktop-xs\\:w-6\\/12{width:50%!important}.desktop-xs\\:w-7\\/12{width:58.333333%!important}.desktop-xs\\:w-8\\/12{width:66.666667%!important}.desktop-xs\\:w-9\\/12{width:75%!important}.desktop-xs\\:w-10\\/12{width:83.333333%!important}.desktop-xs\\:w-11\\/12{width:91.666667%!important}}@media (min-width:80rem){.desktop-sm\\:w-1\\/12{width:8.333333%!important}.desktop-sm\\:w-2\\/12{width:16.666667%!important}.desktop-sm\\:w-3\\/12{width:25%!important}.desktop-sm\\:w-4\\/12{width:33.333333%!important}.desktop-sm\\:w-5\\/12{width:41.666667%!important}.desktop-sm\\:w-6\\/12{width:50%!important}.desktop-sm\\:w-7\\/12{width:58.333333%!important}.desktop-sm\\:w-8\\/12{width:66.666667%!important}.desktop-sm\\:w-9\\/12{width:75%!important}.desktop-sm\\:w-10\\/12{width:83.333333%!important}.desktop-sm\\:w-11\\/12{width:91.666667%!important}}@media (min-width:85.375rem){.desktop\\:w-1\\/12{width:8.333333%!important}.desktop\\:w-2\\/12{width:16.666667%!important}.desktop\\:w-3\\/12{width:25%!important}.desktop\\:w-4\\/12{width:33.333333%!important}.desktop\\:w-5\\/12{width:41.666667%!important}.desktop\\:w-6\\/12{width:50%!important}.desktop\\:w-7\\/12{width:58.333333%!important}.desktop\\:w-8\\/12{width:66.666667%!important}.desktop\\:w-9\\/12{width:75%!important}.desktop\\:w-10\\/12{width:83.333333%!important}.desktop\\:w-11\\/12{width:91.666667%!important}}@media (min-width:90rem){.desktop-lg\\:w-1\\/12{width:8.333333%!important}.desktop-lg\\:w-2\\/12{width:16.666667%!important}.desktop-lg\\:w-3\\/12{width:25%!important}.desktop-lg\\:w-4\\/12{width:33.333333%!important}.desktop-lg\\:w-5\\/12{width:41.666667%!important}.desktop-lg\\:w-6\\/12{width:50%!important}.desktop-lg\\:w-7\\/12{width:58.333333%!important}.desktop-lg\\:w-8\\/12{width:66.666667%!important}.desktop-lg\\:w-9\\/12{width:75%!important}.desktop-lg\\:w-10\\/12{width:83.333333%!important}.desktop-lg\\:w-11\\/12{width:91.666667%!important}}@media (min-width:120rem){.desktop-xl\\:w-1\\/12{width:8.333333%!important}.desktop-xl\\:w-2\\/12{width:16.666667%!important}.desktop-xl\\:w-3\\/12{width:25%!important}.desktop-xl\\:w-4\\/12{width:33.333333%!important}.desktop-xl\\:w-5\\/12{width:41.666667%!important}.desktop-xl\\:w-6\\/12{width:50%!important}.desktop-xl\\:w-7\\/12{width:58.333333%!important}.desktop-xl\\:w-8\\/12{width:66.666667%!important}.desktop-xl\\:w-9\\/12{width:75%!important}.desktop-xl\\:w-10\\/12{width:83.333333%!important}.desktop-xl\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:flex{display:flex!important}.desktop-xs\\:hidden{display:none!important}.desktop-xs\\:w-auto{width:auto!important}.desktop-xs\\:flex-row{flex-direction:row!important}}.-rotate-0,.-rotate-135,.-rotate-180,.-rotate-225,.-rotate-25,.-rotate-270,.-rotate-315,.-rotate-45,.-rotate-90,.rotate-0,.rotate-135,.rotate-180,.rotate-225,.rotate-25,.rotate-270,.rotate-315,.rotate-45,.rotate-90,.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.filter{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}";
6
-
7
- const DropdownMenuItem = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- /**
11
- * Wether the dropdown menu item is active
12
- */
13
- this.active = false;
14
- }
15
- render() {
16
- return (h(Host, { class: `p-dropdown-menu-item ${this.active && 'active'}` }, this.icon && h("p-icon", { variant: this.icon }), h("slot", null)));
17
- }
18
- };
19
- DropdownMenuItem.style = dropdownMenuItemComponentCss;
20
-
21
- const PageSizeSelect = class {
22
- constructor(hostRef) {
23
- registerInstance(this, hostRef);
24
- this.sizeChange = createEvent(this, "sizeChange", 7);
25
- /**
26
- * The current page
27
- */
28
- this.size = defaultSize;
29
- /**
30
- * The available sizes
31
- */
32
- this.sizeOptions = defaultSizeOptions;
33
- /**
34
- * Chevron position
35
- */
36
- this.chevronPosition = 'start';
37
- /**
38
- * The size of the button
39
- */
40
- this.buttonSize = 'small';
41
- /**
42
- * The template for the data view
43
- */
44
- this.buttonTemplate = (size) => formatTranslation(this._locales.button, { size });
45
- /**
46
- * The template for the data view
47
- */
48
- this.itemTemplate = (size) => formatTranslation(this._locales.item, { size });
49
- /**
50
- * Wether to hide when there is only 1 page available
51
- */
52
- this.hidden = false;
53
- /**
54
- * Locales used for this component
55
- */
56
- this._locales = {};
57
- }
58
- componentWillLoad() {
59
- this._setLocales();
60
- }
61
- render() {
62
- return (h(Host, { class: `p-page-size-select ${this.hidden && 'hidden'}` }, h("p-dropdown", { placement: "top-start", chevronPosition: this.chevronPosition, chevronDirection: "down" }, h("p-button", { variant: "secondary", slot: "trigger", size: this.buttonSize }, this.buttonTemplate(this.size)), h("slot", { slot: "items" }, this.sizeOptions.map((option) => (h("p-dropdown-menu-item", { active: option === this.size, onClick: () => this._changeSize(option) }, this.itemTemplate(option))))))));
63
- }
64
- async _setLocales() {
65
- this._locales = await getLocaleComponentStrings(this._el);
66
- }
67
- _changeSize(s) {
68
- if (!s) {
69
- return;
70
- }
71
- this.size = s;
72
- this.sizeChange.emit(this.size);
73
- }
74
- get _el() { return getElement(this); }
75
- };
76
-
77
- const paginationComponentCss = ".visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.m-0{margin:0!important}.ml-1{margin-left:.25rem!important}.block{display:block!important}.flex{display:flex!important}.table{display:table!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-1{width:.25rem!important}.w-2{width:.5rem!important}.w-3{width:.75rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-6{width:1.5rem!important}.w-7{width:1.75rem!important}.w-8{width:2rem!important}.w-9{width:2.25rem!important}.w-10{width:2.5rem!important}.w-11{width:2.75rem!important}.w-full{width:100%!important}.w-auto{width:auto!important}.flex-1{flex:1 1 0%!important}.flex-col{flex-direction:column!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.gap-4{gap:1rem!important}.justify-self-end{justify-self:end!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}.font-semibold{font-weight:600!important}.text-storm-dark{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{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}*{box-sizing:border-box}p-pagination{display:flex}.w-1\\/12{width:8.333333%!important}.w-2\\/12{width:16.666667%!important}.w-3\\/12{width:25%!important}.w-4\\/12{width:33.333333%!important}.w-5\\/12{width:41.666667%!important}.w-6\\/12{width:50%!important}.w-7\\/12{width:58.333333%!important}.w-8\\/12{width:66.666667%!important}.w-9\\/12{width:75%!important}.w-10\\/12{width:83.333333%!important}.w-11\\/12{width:91.666667%!important}@media (min-width:40rem){.tablet\\:w-1\\/12{width:8.333333%!important}.tablet\\:w-2\\/12{width:16.666667%!important}.tablet\\:w-3\\/12{width:25%!important}.tablet\\:w-4\\/12{width:33.333333%!important}.tablet\\:w-5\\/12{width:41.666667%!important}.tablet\\:w-6\\/12{width:50%!important}.tablet\\:w-7\\/12{width:58.333333%!important}.tablet\\:w-8\\/12{width:66.666667%!important}.tablet\\:w-9\\/12{width:75%!important}.tablet\\:w-10\\/12{width:83.333333%!important}.tablet\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:w-1\\/12{width:8.333333%!important}.desktop-xs\\:w-2\\/12{width:16.666667%!important}.desktop-xs\\:w-3\\/12{width:25%!important}.desktop-xs\\:w-4\\/12{width:33.333333%!important}.desktop-xs\\:w-5\\/12{width:41.666667%!important}.desktop-xs\\:w-6\\/12{width:50%!important}.desktop-xs\\:w-7\\/12{width:58.333333%!important}.desktop-xs\\:w-8\\/12{width:66.666667%!important}.desktop-xs\\:w-9\\/12{width:75%!important}.desktop-xs\\:w-10\\/12{width:83.333333%!important}.desktop-xs\\:w-11\\/12{width:91.666667%!important}}@media (min-width:80rem){.desktop-sm\\:w-1\\/12{width:8.333333%!important}.desktop-sm\\:w-2\\/12{width:16.666667%!important}.desktop-sm\\:w-3\\/12{width:25%!important}.desktop-sm\\:w-4\\/12{width:33.333333%!important}.desktop-sm\\:w-5\\/12{width:41.666667%!important}.desktop-sm\\:w-6\\/12{width:50%!important}.desktop-sm\\:w-7\\/12{width:58.333333%!important}.desktop-sm\\:w-8\\/12{width:66.666667%!important}.desktop-sm\\:w-9\\/12{width:75%!important}.desktop-sm\\:w-10\\/12{width:83.333333%!important}.desktop-sm\\:w-11\\/12{width:91.666667%!important}}@media (min-width:85.375rem){.desktop\\:w-1\\/12{width:8.333333%!important}.desktop\\:w-2\\/12{width:16.666667%!important}.desktop\\:w-3\\/12{width:25%!important}.desktop\\:w-4\\/12{width:33.333333%!important}.desktop\\:w-5\\/12{width:41.666667%!important}.desktop\\:w-6\\/12{width:50%!important}.desktop\\:w-7\\/12{width:58.333333%!important}.desktop\\:w-8\\/12{width:66.666667%!important}.desktop\\:w-9\\/12{width:75%!important}.desktop\\:w-10\\/12{width:83.333333%!important}.desktop\\:w-11\\/12{width:91.666667%!important}}@media (min-width:90rem){.desktop-lg\\:w-1\\/12{width:8.333333%!important}.desktop-lg\\:w-2\\/12{width:16.666667%!important}.desktop-lg\\:w-3\\/12{width:25%!important}.desktop-lg\\:w-4\\/12{width:33.333333%!important}.desktop-lg\\:w-5\\/12{width:41.666667%!important}.desktop-lg\\:w-6\\/12{width:50%!important}.desktop-lg\\:w-7\\/12{width:58.333333%!important}.desktop-lg\\:w-8\\/12{width:66.666667%!important}.desktop-lg\\:w-9\\/12{width:75%!important}.desktop-lg\\:w-10\\/12{width:83.333333%!important}.desktop-lg\\:w-11\\/12{width:91.666667%!important}}@media (min-width:120rem){.desktop-xl\\:w-1\\/12{width:8.333333%!important}.desktop-xl\\:w-2\\/12{width:16.666667%!important}.desktop-xl\\:w-3\\/12{width:25%!important}.desktop-xl\\:w-4\\/12{width:33.333333%!important}.desktop-xl\\:w-5\\/12{width:41.666667%!important}.desktop-xl\\:w-6\\/12{width:50%!important}.desktop-xl\\:w-7\\/12{width:58.333333%!important}.desktop-xl\\:w-8\\/12{width:66.666667%!important}.desktop-xl\\:w-9\\/12{width:75%!important}.desktop-xl\\:w-10\\/12{width:83.333333%!important}.desktop-xl\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:flex{display:flex!important}.desktop-xs\\:hidden{display:none!important}.desktop-xs\\:w-auto{width:auto!important}.desktop-xs\\:flex-row{flex-direction:row!important}}.filter{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}";
78
-
79
- const Pagination = class {
80
- constructor(hostRef) {
81
- registerInstance(this, hostRef);
82
- this.pageChange = createEvent(this, "pageChange", 7);
83
- /**
84
- * The current page
85
- */
86
- this.page = 1;
87
- /**
88
- * The amount of items per page
89
- */
90
- this.pageSize = 12;
91
- /**
92
- * Wether to hide when there is only 1 page available
93
- */
94
- this.hideOnSinglePage = false;
95
- this._pages = [];
96
- this._set = [];
97
- this._nextClick = () => {
98
- const nextPage = this.page + 1;
99
- if (nextPage > this._pages[this._pages.length - 1]) {
100
- return;
101
- }
102
- this._changePage(nextPage);
103
- };
104
- this._pageClick = (p) => this._changePage(p);
105
- this._generateSet = (range = 1, enableBoundaries = true) => {
106
- const totalPages = this._pages.length;
107
- if (!totalPages) {
108
- return [];
109
- }
110
- let start = this.page - range;
111
- let end = this.page + range;
112
- if (end > totalPages) {
113
- end = totalPages;
114
- start = totalPages - range * 2;
115
- start = start < 1 ? 1 : start;
116
- }
117
- if (start <= 1) {
118
- start = 1;
119
- end = Math.min(range * 2 + 1, totalPages);
120
- }
121
- const set = [];
122
- const previous = {
123
- type: 'previous',
124
- value: h("p-icon", { variant: "chevron", rotate: 90 }),
125
- };
126
- const next = {
127
- type: 'next',
128
- value: h("p-icon", { variant: "chevron", rotate: -90 }),
129
- };
130
- // Disable page range, display all the pages
131
- if (range === null) {
132
- const p = this._pages.map((p) => ({
133
- type: 'page',
134
- value: p,
135
- }));
136
- return enableBoundaries ? [previous, ...p, next] : p;
137
- }
138
- if (enableBoundaries) {
139
- set.push(previous);
140
- }
141
- if (start <= 3) {
142
- for (let i = 1; i < start; i++) {
143
- set.push({
144
- type: 'page',
145
- value: this._pages[i - 1],
146
- });
147
- }
148
- }
149
- else {
150
- set.push({
151
- type: 'page',
152
- value: 1,
153
- });
154
- set.push({
155
- type: 'ellipsis',
156
- value: 'ellipsis',
157
- });
158
- }
159
- for (let i = start; i <= end; i++) {
160
- set.push({
161
- type: 'page',
162
- value: this._pages[i - 1],
163
- });
164
- }
165
- if (end >= totalPages - 2) {
166
- for (let i = end + 1; i <= totalPages; i++) {
167
- set.push({
168
- type: 'page',
169
- value: this._pages[i - 1],
170
- });
171
- }
172
- }
173
- else {
174
- set.push({
175
- type: 'ellipsis',
176
- });
177
- set.push({
178
- type: 'page',
179
- value: this._pages[this._pages.length - 1],
180
- });
181
- }
182
- if (enableBoundaries) {
183
- set.push(next);
184
- }
185
- return set;
186
- };
187
- }
188
- componentWillRender() {
189
- this._generate();
190
- }
191
- render() {
192
- var _a, _b;
193
- return (h(Host, { class: `p-pagination ${this.hideOnSinglePage && ((_a = this._set) === null || _a === void 0 ? void 0 : _a.length) === 3 && 'hidden'}` }, (_b = this._set) === null || _b === void 0 ? void 0 : _b.map((p) => {
194
- if (p.type === 'previous' || p.type === 'next') {
195
- return (h("p-pagination-item", { onClick: () => p.type === 'previous'
196
- ? this._previousClick()
197
- : this._nextClick() }, p.value));
198
- }
199
- if (p.type === 'ellipsis') {
200
- return h("p-pagination-item", null, "...");
201
- }
202
- return (h("p-pagination-item", { active: p.value === this.page, onClick: () => this._pageClick(p.value) }, p.value));
203
- })));
204
- }
205
- pageChangeHandler() {
206
- this._generate();
207
- }
208
- _generate() {
209
- var _a;
210
- this._pages = this._generatePages();
211
- this._set = this._generateSet();
212
- if (this.page > ((_a = this._pages) === null || _a === void 0 ? void 0 : _a.length)) {
213
- this._changePage(this._pages.length);
214
- }
215
- }
216
- _changePage(p) {
217
- if (!p) {
218
- return;
219
- }
220
- this.page = p;
221
- this.pageChange.emit(this.page);
222
- }
223
- _previousClick() {
224
- const previousPage = this.page - 1;
225
- if (previousPage < this._pages[0]) {
226
- return;
227
- }
228
- this._changePage(previousPage);
229
- }
230
- _generatePages() {
231
- if (!this.total || !this.pageSize) {
232
- return [];
233
- }
234
- const pages = Math.ceil(this.total / this.pageSize);
235
- return new Array(pages).fill(undefined).map((_, i) => i + 1);
236
- }
237
- static get watchers() { return {
238
- "page": ["pageChangeHandler"],
239
- "pageSize": ["pageChangeHandler"],
240
- "total": ["pageChangeHandler"]
241
- }; }
242
- };
243
- Pagination.style = paginationComponentCss;
244
-
245
- const paginationItemComponentCss = ".visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.m-0{margin:0!important}.ml-1{margin-left:.25rem!important}.block{display:block!important}.flex{display:flex!important}.table{display:table!important}.hidden{display:none!important}.h-8{height:2rem!important}.h-6{height:1.5rem!important}.w-1{width:.25rem!important}.w-2{width:.5rem!important}.w-3{width:.75rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-6{width:1.5rem!important}.w-7{width:1.75rem!important}.w-8{width:2rem!important}.w-9{width:2.25rem!important}.w-10{width:2.5rem!important}.w-11{width:2.75rem!important}.w-full{width:100%!important}.w-auto{width:auto!important}.flex-1{flex:1 1 0%!important}.flex-col{flex-direction:column!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.gap-4{gap:1rem!important}.justify-self-end{justify-self:end!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}.font-semibold{font-weight:600!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.text-indigo{color:rgb(82 138 250/var(--tw-text-opacity))!important}.text-indigo,.text-storm-dark{--tw-text-opacity:1!important}.text-storm-dark{color:rgb(39 40 56/var(--tw-text-opacity))!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{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}*{box-sizing:border-box}:host{--tw-text-opacity:1;align-items:center;border-radius:.25rem;color:rgb(128 130 158/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;font-weight:600;height:2rem;justify-content:center;line-height:1.25rem;width:2rem}:host(:focus),:host(:hover){--tw-text-opacity:1;color:rgb(81 83 107/var(--tw-text-opacity))}:host(.active){--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(82 138 250/var(--tw-text-opacity))}.w-1\\/12{width:8.333333%!important}.w-2\\/12{width:16.666667%!important}.w-3\\/12{width:25%!important}.w-4\\/12{width:33.333333%!important}.w-5\\/12{width:41.666667%!important}.w-6\\/12{width:50%!important}.w-7\\/12{width:58.333333%!important}.w-8\\/12{width:66.666667%!important}.w-9\\/12{width:75%!important}.w-10\\/12{width:83.333333%!important}.w-11\\/12{width:91.666667%!important}@media (min-width:40rem){.tablet\\:w-1\\/12{width:8.333333%!important}.tablet\\:w-2\\/12{width:16.666667%!important}.tablet\\:w-3\\/12{width:25%!important}.tablet\\:w-4\\/12{width:33.333333%!important}.tablet\\:w-5\\/12{width:41.666667%!important}.tablet\\:w-6\\/12{width:50%!important}.tablet\\:w-7\\/12{width:58.333333%!important}.tablet\\:w-8\\/12{width:66.666667%!important}.tablet\\:w-9\\/12{width:75%!important}.tablet\\:w-10\\/12{width:83.333333%!important}.tablet\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:w-1\\/12{width:8.333333%!important}.desktop-xs\\:w-2\\/12{width:16.666667%!important}.desktop-xs\\:w-3\\/12{width:25%!important}.desktop-xs\\:w-4\\/12{width:33.333333%!important}.desktop-xs\\:w-5\\/12{width:41.666667%!important}.desktop-xs\\:w-6\\/12{width:50%!important}.desktop-xs\\:w-7\\/12{width:58.333333%!important}.desktop-xs\\:w-8\\/12{width:66.666667%!important}.desktop-xs\\:w-9\\/12{width:75%!important}.desktop-xs\\:w-10\\/12{width:83.333333%!important}.desktop-xs\\:w-11\\/12{width:91.666667%!important}}@media (min-width:80rem){.desktop-sm\\:w-1\\/12{width:8.333333%!important}.desktop-sm\\:w-2\\/12{width:16.666667%!important}.desktop-sm\\:w-3\\/12{width:25%!important}.desktop-sm\\:w-4\\/12{width:33.333333%!important}.desktop-sm\\:w-5\\/12{width:41.666667%!important}.desktop-sm\\:w-6\\/12{width:50%!important}.desktop-sm\\:w-7\\/12{width:58.333333%!important}.desktop-sm\\:w-8\\/12{width:66.666667%!important}.desktop-sm\\:w-9\\/12{width:75%!important}.desktop-sm\\:w-10\\/12{width:83.333333%!important}.desktop-sm\\:w-11\\/12{width:91.666667%!important}}@media (min-width:85.375rem){.desktop\\:w-1\\/12{width:8.333333%!important}.desktop\\:w-2\\/12{width:16.666667%!important}.desktop\\:w-3\\/12{width:25%!important}.desktop\\:w-4\\/12{width:33.333333%!important}.desktop\\:w-5\\/12{width:41.666667%!important}.desktop\\:w-6\\/12{width:50%!important}.desktop\\:w-7\\/12{width:58.333333%!important}.desktop\\:w-8\\/12{width:66.666667%!important}.desktop\\:w-9\\/12{width:75%!important}.desktop\\:w-10\\/12{width:83.333333%!important}.desktop\\:w-11\\/12{width:91.666667%!important}}@media (min-width:90rem){.desktop-lg\\:w-1\\/12{width:8.333333%!important}.desktop-lg\\:w-2\\/12{width:16.666667%!important}.desktop-lg\\:w-3\\/12{width:25%!important}.desktop-lg\\:w-4\\/12{width:33.333333%!important}.desktop-lg\\:w-5\\/12{width:41.666667%!important}.desktop-lg\\:w-6\\/12{width:50%!important}.desktop-lg\\:w-7\\/12{width:58.333333%!important}.desktop-lg\\:w-8\\/12{width:66.666667%!important}.desktop-lg\\:w-9\\/12{width:75%!important}.desktop-lg\\:w-10\\/12{width:83.333333%!important}.desktop-lg\\:w-11\\/12{width:91.666667%!important}}@media (min-width:120rem){.desktop-xl\\:w-1\\/12{width:8.333333%!important}.desktop-xl\\:w-2\\/12{width:16.666667%!important}.desktop-xl\\:w-3\\/12{width:25%!important}.desktop-xl\\:w-4\\/12{width:33.333333%!important}.desktop-xl\\:w-5\\/12{width:41.666667%!important}.desktop-xl\\:w-6\\/12{width:50%!important}.desktop-xl\\:w-7\\/12{width:58.333333%!important}.desktop-xl\\:w-8\\/12{width:66.666667%!important}.desktop-xl\\:w-9\\/12{width:75%!important}.desktop-xl\\:w-10\\/12{width:83.333333%!important}.desktop-xl\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:flex{display:flex!important}.desktop-xs\\:hidden{display:none!important}.desktop-xs\\:w-auto{width:auto!important}.desktop-xs\\:flex-row{flex-direction:row!important}}.filter{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}";
246
-
247
- const PaginationItem = class {
248
- constructor(hostRef) {
249
- registerInstance(this, hostRef);
250
- /**
251
- * Wether the pagination item is active
252
- */
253
- this.active = false;
254
- }
255
- render() {
256
- return (h(Host, { class: `p-pagination-item ${this.active && 'active'}` }, h("slot", null)));
257
- }
258
- };
259
- PaginationItem.style = paginationItemComponentCss;
260
-
261
- export { DropdownMenuItem as p_dropdown_menu_item, PageSizeSelect as p_page_size_select, Pagination as p_pagination, PaginationItem as p_pagination_item };
@@ -1,158 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7c99f044.js';
2
- import { c as childOf } from './child-of-90a8c4b5.js';
3
- import { c as createPopper } from './popper-41c6f9cd.js';
4
-
5
- const dropdownComponentCss = ".visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.m-0{margin:0!important}.ml-auto{margin-left:auto!important}.ml-1{margin-left:.25rem!important}.block{display:block!important}.flex{display:flex!important}.table{display:table!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-auto{width:auto!important}.w-1{width:.25rem!important}.w-2{width:.5rem!important}.w-3{width:.75rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-6{width:1.5rem!important}.w-7{width:1.75rem!important}.w-8{width:2rem!important}.w-9{width:2.25rem!important}.w-10{width:2.5rem!important}.w-11{width:2.75rem!important}.w-full{width:100%!important}.min-w-0{min-width:0!important}.flex-1{flex:1 1 0%!important}.flex-col{flex-direction:column!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.gap-4{gap:1rem!important}.justify-self-end{justify-self:end!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}.font-semibold{font-weight:600!important}.text-storm-dark{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{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}*{box-sizing:border-box}:host{position:relative}:host .trigger{height:auto;width:auto}:host p-dropdown-menu-container{display:none}:host p-dropdown-menu-container[data-show]{display:flex}.w-1\\/12{width:8.333333%!important}.w-2\\/12{width:16.666667%!important}.w-3\\/12{width:25%!important}.w-4\\/12{width:33.333333%!important}.w-5\\/12{width:41.666667%!important}.w-6\\/12{width:50%!important}.w-7\\/12{width:58.333333%!important}.w-8\\/12{width:66.666667%!important}.w-9\\/12{width:75%!important}.w-10\\/12{width:83.333333%!important}.w-11\\/12{width:91.666667%!important}@media (min-width:40rem){.tablet\\:w-1\\/12{width:8.333333%!important}.tablet\\:w-2\\/12{width:16.666667%!important}.tablet\\:w-3\\/12{width:25%!important}.tablet\\:w-4\\/12{width:33.333333%!important}.tablet\\:w-5\\/12{width:41.666667%!important}.tablet\\:w-6\\/12{width:50%!important}.tablet\\:w-7\\/12{width:58.333333%!important}.tablet\\:w-8\\/12{width:66.666667%!important}.tablet\\:w-9\\/12{width:75%!important}.tablet\\:w-10\\/12{width:83.333333%!important}.tablet\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:w-1\\/12{width:8.333333%!important}.desktop-xs\\:w-2\\/12{width:16.666667%!important}.desktop-xs\\:w-3\\/12{width:25%!important}.desktop-xs\\:w-4\\/12{width:33.333333%!important}.desktop-xs\\:w-5\\/12{width:41.666667%!important}.desktop-xs\\:w-6\\/12{width:50%!important}.desktop-xs\\:w-7\\/12{width:58.333333%!important}.desktop-xs\\:w-8\\/12{width:66.666667%!important}.desktop-xs\\:w-9\\/12{width:75%!important}.desktop-xs\\:w-10\\/12{width:83.333333%!important}.desktop-xs\\:w-11\\/12{width:91.666667%!important}}@media (min-width:80rem){.desktop-sm\\:w-1\\/12{width:8.333333%!important}.desktop-sm\\:w-2\\/12{width:16.666667%!important}.desktop-sm\\:w-3\\/12{width:25%!important}.desktop-sm\\:w-4\\/12{width:33.333333%!important}.desktop-sm\\:w-5\\/12{width:41.666667%!important}.desktop-sm\\:w-6\\/12{width:50%!important}.desktop-sm\\:w-7\\/12{width:58.333333%!important}.desktop-sm\\:w-8\\/12{width:66.666667%!important}.desktop-sm\\:w-9\\/12{width:75%!important}.desktop-sm\\:w-10\\/12{width:83.333333%!important}.desktop-sm\\:w-11\\/12{width:91.666667%!important}}@media (min-width:85.375rem){.desktop\\:w-1\\/12{width:8.333333%!important}.desktop\\:w-2\\/12{width:16.666667%!important}.desktop\\:w-3\\/12{width:25%!important}.desktop\\:w-4\\/12{width:33.333333%!important}.desktop\\:w-5\\/12{width:41.666667%!important}.desktop\\:w-6\\/12{width:50%!important}.desktop\\:w-7\\/12{width:58.333333%!important}.desktop\\:w-8\\/12{width:66.666667%!important}.desktop\\:w-9\\/12{width:75%!important}.desktop\\:w-10\\/12{width:83.333333%!important}.desktop\\:w-11\\/12{width:91.666667%!important}}@media (min-width:90rem){.desktop-lg\\:w-1\\/12{width:8.333333%!important}.desktop-lg\\:w-2\\/12{width:16.666667%!important}.desktop-lg\\:w-3\\/12{width:25%!important}.desktop-lg\\:w-4\\/12{width:33.333333%!important}.desktop-lg\\:w-5\\/12{width:41.666667%!important}.desktop-lg\\:w-6\\/12{width:50%!important}.desktop-lg\\:w-7\\/12{width:58.333333%!important}.desktop-lg\\:w-8\\/12{width:66.666667%!important}.desktop-lg\\:w-9\\/12{width:75%!important}.desktop-lg\\:w-10\\/12{width:83.333333%!important}.desktop-lg\\:w-11\\/12{width:91.666667%!important}}@media (min-width:120rem){.desktop-xl\\:w-1\\/12{width:8.333333%!important}.desktop-xl\\:w-2\\/12{width:16.666667%!important}.desktop-xl\\:w-3\\/12{width:25%!important}.desktop-xl\\:w-4\\/12{width:33.333333%!important}.desktop-xl\\:w-5\\/12{width:41.666667%!important}.desktop-xl\\:w-6\\/12{width:50%!important}.desktop-xl\\:w-7\\/12{width:58.333333%!important}.desktop-xl\\:w-8\\/12{width:66.666667%!important}.desktop-xl\\:w-9\\/12{width:75%!important}.desktop-xl\\:w-10\\/12{width:83.333333%!important}.desktop-xl\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:flex{display:flex!important}.desktop-xs\\:hidden{display:none!important}.desktop-xs\\:w-auto{width:auto!important}.desktop-xs\\:flex-row{flex-direction:row!important}}.filter{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}";
6
-
7
- const Dropdown = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.isOpen = createEvent(this, "isOpen", 7);
11
- /**
12
- * The content of the dropdown menu
13
- */
14
- this.placement = 'bottom-start';
15
- /**
16
- * The strategy of the popover placement
17
- */
18
- this.strategy = 'fixed';
19
- /**
20
- * Wether to show the dropdown menu
21
- */
22
- this.show = false;
23
- /**
24
- * Wether to automatically close the dropdown menu after clicking inside
25
- */
26
- this.insideClick = false;
27
- /**
28
- * Wether to automatically close the dropdown menu after clicking inside
29
- */
30
- this.disableTriggerClick = false;
31
- /**
32
- * Chevron position
33
- */
34
- this.chevronPosition = 'end';
35
- this._loaded = false;
36
- }
37
- componentShouldUpdate() {
38
- this._setOptions();
39
- if (this._loaded && this.show) {
40
- this._show();
41
- }
42
- }
43
- render() {
44
- return (h(Host, { class: "p-dropdown" }, h("div", { class: "trigger", onClick: () => this._triggerClickHandler() }, h("slot", { onSlotchange: (ev) => this._checkButton(ev), name: "trigger" })), h("p-dropdown-menu-container", { role: "popover", ref: (el) => this._load(el), onClick: () => this._containerClickHandler() }, h("slot", { name: "items" }))));
45
- }
46
- _checkButton({ target }) {
47
- const slot = target;
48
- const children = slot.assignedElements();
49
- for (let child of children) {
50
- if (child.nodeName === 'P-BUTTON') {
51
- child.chevronPosition = this.chevronPosition;
52
- child.chevron = this.chevronDirection
53
- ? this.chevronDirection
54
- : this.placement.indexOf('top') >= 0
55
- ? 'up'
56
- : 'down';
57
- }
58
- }
59
- }
60
- _containerClickHandler() {
61
- if (this.insideClick) {
62
- return;
63
- }
64
- if (this._menu.hasAttribute('data-show')) {
65
- this._hide();
66
- }
67
- }
68
- _triggerClickHandler() {
69
- if (this.disableTriggerClick) {
70
- return;
71
- }
72
- if (this._menu.hasAttribute('data-show')) {
73
- this._hide();
74
- return;
75
- }
76
- this._show();
77
- }
78
- documentClickHandler({ target }) {
79
- if (!this._menu.hasAttribute('data-show') ||
80
- childOf(target, this._el)) {
81
- return;
82
- }
83
- this._hide();
84
- }
85
- _load(popover) {
86
- this._menu = popover;
87
- if (popover) {
88
- this._popper = createPopper(this._el, popover, {
89
- strategy: this.strategy,
90
- });
91
- this._setOptions();
92
- this._loaded = true;
93
- if (this.show) {
94
- setTimeout(() => this._show(), 100);
95
- }
96
- }
97
- }
98
- _setOptions() {
99
- if (!this._popper) {
100
- return;
101
- }
102
- this._popper.setOptions({
103
- placement: this.placement,
104
- modifiers: [
105
- {
106
- name: 'offset',
107
- options: {
108
- offset: [0, 8],
109
- },
110
- },
111
- ],
112
- });
113
- }
114
- _show() {
115
- if (!this._loaded) {
116
- return;
117
- }
118
- // Make the popover visible
119
- this._menu.setAttribute('data-show', '');
120
- this.isOpen.emit(true);
121
- // Enable the event listeners
122
- this._popper.setOptions((options) => (Object.assign(Object.assign({}, options), { modifiers: [
123
- ...options.modifiers,
124
- { name: 'eventListeners', enabled: true },
125
- ] })));
126
- // Update its position
127
- this._popper.update();
128
- }
129
- _hide() {
130
- if (!this._loaded || this.show) {
131
- return;
132
- }
133
- // Hide the popover
134
- this._menu.removeAttribute('data-show');
135
- this.isOpen.emit(false);
136
- // Disable the event listeners
137
- this._popper.setOptions((options) => (Object.assign(Object.assign({}, options), { modifiers: [
138
- ...options.modifiers,
139
- { name: 'eventListeners', enabled: false },
140
- ] })));
141
- }
142
- get _el() { return getElement(this); }
143
- };
144
- Dropdown.style = dropdownComponentCss;
145
-
146
- const dropdownMenuContainerComponentCss = ".visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.m-0{margin:0!important}.ml-auto{margin-left:auto!important}.ml-1{margin-left:.25rem!important}.block{display:block!important}.flex{display:flex!important}.table{display:table!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-1{width:.25rem!important}.w-2{width:.5rem!important}.w-3{width:.75rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-6{width:1.5rem!important}.w-7{width:1.75rem!important}.w-8{width:2rem!important}.w-9{width:2.25rem!important}.w-10{width:2.5rem!important}.w-11{width:2.75rem!important}.w-full{width:100%!important}.w-auto{width:auto!important}.min-w-0{min-width:0!important}.max-w-\\[222px\\]{max-width:222px!important}.flex-1{flex:1 1 0%!important}.flex-col{flex-direction:column!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.gap-\\[1px\\]{gap:1px!important}.gap-4{gap:1rem!important}.justify-self-end{justify-self:end!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-2{padding:.5rem!important}.p-4{padding:1rem!important}.font-semibold{font-weight:600!important}.text-storm-dark{--tw-text-opacity:1!important;color:rgb(39 40 56/var(--tw-text-opacity))!important}.blur{--tw-blur:blur(8px)!important}.blur,.drop-shadow-4{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-4{--tw-drop-shadow:drop-shadow(0px 0.3125rem 1rem rgba(0,24,98,.08)) drop-shadow(0px 0.0625rem 0.1875rem rgba(0,24,98,.13))!important}.filter{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}*{box-sizing:border-box}p-dropdown-menu-container{--tw-bg-opacity:1;--tw-drop-shadow:drop-shadow(0px 0.3125rem 1rem rgba(0,24,98,.08)) drop-shadow(0px 0.0625rem 0.1875rem rgba(0,24,98,.13));background-color:rgb(255 255 255/var(--tw-bg-opacity));border-radius:.75rem;display:flex;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);flex-direction:column;gap:1px;max-width:222px;padding:.5rem;width:100%;z-index:10}.w-1\\/12{width:8.333333%!important}.w-2\\/12{width:16.666667%!important}.w-3\\/12{width:25%!important}.w-4\\/12{width:33.333333%!important}.w-5\\/12{width:41.666667%!important}.w-6\\/12{width:50%!important}.w-7\\/12{width:58.333333%!important}.w-8\\/12{width:66.666667%!important}.w-9\\/12{width:75%!important}.w-10\\/12{width:83.333333%!important}.w-11\\/12{width:91.666667%!important}@media (min-width:40rem){.tablet\\:w-1\\/12{width:8.333333%!important}.tablet\\:w-2\\/12{width:16.666667%!important}.tablet\\:w-3\\/12{width:25%!important}.tablet\\:w-4\\/12{width:33.333333%!important}.tablet\\:w-5\\/12{width:41.666667%!important}.tablet\\:w-6\\/12{width:50%!important}.tablet\\:w-7\\/12{width:58.333333%!important}.tablet\\:w-8\\/12{width:66.666667%!important}.tablet\\:w-9\\/12{width:75%!important}.tablet\\:w-10\\/12{width:83.333333%!important}.tablet\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:w-1\\/12{width:8.333333%!important}.desktop-xs\\:w-2\\/12{width:16.666667%!important}.desktop-xs\\:w-3\\/12{width:25%!important}.desktop-xs\\:w-4\\/12{width:33.333333%!important}.desktop-xs\\:w-5\\/12{width:41.666667%!important}.desktop-xs\\:w-6\\/12{width:50%!important}.desktop-xs\\:w-7\\/12{width:58.333333%!important}.desktop-xs\\:w-8\\/12{width:66.666667%!important}.desktop-xs\\:w-9\\/12{width:75%!important}.desktop-xs\\:w-10\\/12{width:83.333333%!important}.desktop-xs\\:w-11\\/12{width:91.666667%!important}}@media (min-width:80rem){.desktop-sm\\:w-1\\/12{width:8.333333%!important}.desktop-sm\\:w-2\\/12{width:16.666667%!important}.desktop-sm\\:w-3\\/12{width:25%!important}.desktop-sm\\:w-4\\/12{width:33.333333%!important}.desktop-sm\\:w-5\\/12{width:41.666667%!important}.desktop-sm\\:w-6\\/12{width:50%!important}.desktop-sm\\:w-7\\/12{width:58.333333%!important}.desktop-sm\\:w-8\\/12{width:66.666667%!important}.desktop-sm\\:w-9\\/12{width:75%!important}.desktop-sm\\:w-10\\/12{width:83.333333%!important}.desktop-sm\\:w-11\\/12{width:91.666667%!important}}@media (min-width:85.375rem){.desktop\\:w-1\\/12{width:8.333333%!important}.desktop\\:w-2\\/12{width:16.666667%!important}.desktop\\:w-3\\/12{width:25%!important}.desktop\\:w-4\\/12{width:33.333333%!important}.desktop\\:w-5\\/12{width:41.666667%!important}.desktop\\:w-6\\/12{width:50%!important}.desktop\\:w-7\\/12{width:58.333333%!important}.desktop\\:w-8\\/12{width:66.666667%!important}.desktop\\:w-9\\/12{width:75%!important}.desktop\\:w-10\\/12{width:83.333333%!important}.desktop\\:w-11\\/12{width:91.666667%!important}}@media (min-width:90rem){.desktop-lg\\:w-1\\/12{width:8.333333%!important}.desktop-lg\\:w-2\\/12{width:16.666667%!important}.desktop-lg\\:w-3\\/12{width:25%!important}.desktop-lg\\:w-4\\/12{width:33.333333%!important}.desktop-lg\\:w-5\\/12{width:41.666667%!important}.desktop-lg\\:w-6\\/12{width:50%!important}.desktop-lg\\:w-7\\/12{width:58.333333%!important}.desktop-lg\\:w-8\\/12{width:66.666667%!important}.desktop-lg\\:w-9\\/12{width:75%!important}.desktop-lg\\:w-10\\/12{width:83.333333%!important}.desktop-lg\\:w-11\\/12{width:91.666667%!important}}@media (min-width:120rem){.desktop-xl\\:w-1\\/12{width:8.333333%!important}.desktop-xl\\:w-2\\/12{width:16.666667%!important}.desktop-xl\\:w-3\\/12{width:25%!important}.desktop-xl\\:w-4\\/12{width:33.333333%!important}.desktop-xl\\:w-5\\/12{width:41.666667%!important}.desktop-xl\\:w-6\\/12{width:50%!important}.desktop-xl\\:w-7\\/12{width:58.333333%!important}.desktop-xl\\:w-8\\/12{width:66.666667%!important}.desktop-xl\\:w-9\\/12{width:75%!important}.desktop-xl\\:w-10\\/12{width:83.333333%!important}.desktop-xl\\:w-11\\/12{width:91.666667%!important}}@media (min-width:64rem){.desktop-xs\\:flex{display:flex!important}.desktop-xs\\:hidden{display:none!important}.desktop-xs\\:w-auto{width:auto!important}.desktop-xs\\:flex-row{flex-direction:row!important}}";
147
-
148
- const DropdownMenuContainer = class {
149
- constructor(hostRef) {
150
- registerInstance(this, hostRef);
151
- }
152
- render() {
153
- return (h(Host, { class: "p-dropdown-menu-container" }, h("slot", null)));
154
- }
155
- };
156
- DropdownMenuContainer.style = dropdownMenuContainerComponentCss;
157
-
158
- export { Dropdown as p_dropdown, DropdownMenuContainer as p_dropdown_menu_container };