@paperless/core 2.0.1-beta.118 → 2.0.1-beta.119

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 (171) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/build/{p-8981247d.entry.js → p-347b3ec3.entry.js} +2 -2
  3. package/dist/build/{p-cc3307b8.entry.js → p-3bd5d63a.entry.js} +2 -2
  4. package/dist/build/{p-cfd2e444.entry.js → p-4afd0801.entry.js} +2 -2
  5. package/dist/build/p-4afd0801.entry.js.map +1 -0
  6. package/dist/build/p-56a401d7.entry.js +2 -0
  7. package/dist/build/{p-2edd87f3.entry.js → p-79ed922f.entry.js} +2 -2
  8. package/dist/{paperless/p-26a3990a.entry.js → build/p-ad08592e.entry.js} +2 -2
  9. package/dist/build/{p-aec29ee9.entry.js → p-aec4f685.entry.js} +2 -2
  10. package/dist/build/{p-e2054751.entry.js → p-b0fc8bea.entry.js} +2 -2
  11. package/dist/build/{p-c4724fb7.entry.js → p-b13d6a2c.entry.js} +2 -2
  12. package/dist/build/p-checkbox.p-dropdown.p-dropdown-menu-container.p-dropdown-menu-item.entry.esm.js.map +1 -1
  13. package/dist/{paperless/p-87981fef.entry.js → build/p-d6adac97.entry.js} +2 -2
  14. package/dist/build/p-d6adac97.entry.js.map +1 -0
  15. package/dist/build/{p-05db72d0.entry.js → p-ddad483b.entry.js} +2 -2
  16. package/dist/build/{p-4a558130.js → p-f6c20d26.js} +1 -1
  17. package/dist/build/p-fc920176.entry.js +2 -0
  18. package/dist/build/p-fc920176.entry.js.map +1 -0
  19. package/dist/build/p-field.p-field-container.entry.esm.js.map +1 -1
  20. package/dist/build/p-select.entry.esm.js.map +1 -1
  21. package/dist/build/paperless.esm.js +1 -1
  22. package/dist/cjs/p-checkbox.p-dropdown.p-dropdown-menu-container.p-dropdown-menu-item.entry.cjs.js.map +1 -1
  23. package/dist/cjs/p-checkbox_4.cjs.entry.js +5 -5
  24. package/dist/cjs/p-checkbox_4.cjs.entry.js.map +1 -1
  25. package/dist/cjs/p-empty-state_9.cjs.entry.js +8 -8
  26. package/dist/cjs/p-field.p-field-container.entry.cjs.js.map +1 -1
  27. package/dist/cjs/p-field_2.cjs.entry.js +10 -7
  28. package/dist/cjs/p-field_2.cjs.entry.js.map +1 -1
  29. package/dist/cjs/p-label.cjs.entry.js +3 -3
  30. package/dist/cjs/p-listing.cjs.entry.js +1 -1
  31. package/dist/cjs/p-navbar.cjs.entry.js +1 -1
  32. package/dist/cjs/p-navigation-item.cjs.entry.js +2 -2
  33. package/dist/cjs/p-navigation-section.cjs.entry.js +1 -1
  34. package/dist/cjs/p-pagination_3.cjs.entry.js +4 -4
  35. package/dist/cjs/p-select.cjs.entry.js +10 -13
  36. package/dist/cjs/p-select.cjs.entry.js.map +1 -1
  37. package/dist/cjs/p-select.entry.cjs.js.map +1 -1
  38. package/dist/cjs/p-stepper.cjs.entry.js +1 -1
  39. package/dist/cjs/p-toast.cjs.entry.js +1 -1
  40. package/dist/collection/components/molecules/dropdown/dropdown.component.js +5 -5
  41. package/dist/collection/components/molecules/dropdown/dropdown.component.js.map +1 -1
  42. package/dist/collection/components/molecules/empty-state/empty-state.component.js +2 -2
  43. package/dist/collection/components/molecules/field/field/field.component.js +11 -8
  44. package/dist/collection/components/molecules/field/field/field.component.js.map +1 -1
  45. package/dist/collection/components/molecules/label/label.component.js +3 -3
  46. package/dist/collection/components/molecules/navigation/item/navigation-item.component.js +2 -2
  47. package/dist/collection/components/molecules/navigation/section/navigation-section.component.js +1 -1
  48. package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js +1 -1
  49. package/dist/collection/components/molecules/pagination/pagination/pagination.component.js +3 -3
  50. package/dist/collection/components/molecules/select/select.component.js +10 -13
  51. package/dist/collection/components/molecules/select/select.component.js.map +1 -1
  52. package/dist/collection/components/molecules/table/cell/table-cell.component.js +1 -1
  53. package/dist/collection/components/molecules/table/footer/table-footer.component.js +2 -2
  54. package/dist/collection/components/molecules/table/row/table-row.component.js +3 -3
  55. package/dist/collection/components/molecules/toast/toast.component.js +1 -1
  56. package/dist/collection/components/organisms/listing/listing.component.js +1 -1
  57. package/dist/collection/components/organisms/navbar/navbar.component.js +1 -1
  58. package/dist/collection/components/organisms/stepper/stepper.component.js +1 -1
  59. package/dist/components/{p-ExfyVPT0.js → p-B76UdgcV.js} +12 -9
  60. package/dist/components/p-B76UdgcV.js.map +1 -0
  61. package/dist/components/{p-Dn38WwJ_.js → p-BUszMY5r.js} +8 -8
  62. package/dist/components/{p-Dn38WwJ_.js.map → p-BUszMY5r.js.map} +1 -1
  63. package/dist/components/{p-Bw6TWc-_.js → p-CMqT3d_m.js} +8 -8
  64. package/dist/components/{p-Bw6TWc-_.js.map → p-CMqT3d_m.js.map} +1 -1
  65. package/dist/components/{p-Dh_4gXYW.js → p-CxhSYJBZ.js} +3 -3
  66. package/dist/components/{p-Dh_4gXYW.js.map → p-CxhSYJBZ.js.map} +1 -1
  67. package/dist/components/{p-YYQ927T-.js → p-D6XuZ7WA.js} +7 -7
  68. package/dist/components/p-D6XuZ7WA.js.map +1 -0
  69. package/dist/components/{p-C5yz-mQE.js → p-DXE1CCit.js} +3 -3
  70. package/dist/components/{p-C5yz-mQE.js.map → p-DXE1CCit.js.map} +1 -1
  71. package/dist/components/{p-CBxUj1bt.js → p-DxtE5ZXb.js} +3 -3
  72. package/dist/components/{p-CBxUj1bt.js.map → p-DxtE5ZXb.js.map} +1 -1
  73. package/dist/components/{p-Bb8uyInh.js → p-DyXjCQd1.js} +5 -5
  74. package/dist/components/{p-Bb8uyInh.js.map → p-DyXjCQd1.js.map} +1 -1
  75. package/dist/components/{p-Cw7TZ18X.js → p-K_ChWG7S.js} +4 -4
  76. package/dist/components/{p-Cw7TZ18X.js.map → p-K_ChWG7S.js.map} +1 -1
  77. package/dist/components/{p-BFXs5OQx.js → p-UP0QWP4I.js} +3 -3
  78. package/dist/components/{p-BFXs5OQx.js.map → p-UP0QWP4I.js.map} +1 -1
  79. package/dist/components/p-datepicker.js +2 -2
  80. package/dist/components/p-dropdown.js +1 -1
  81. package/dist/components/p-empty-state.js +1 -1
  82. package/dist/components/p-field.js +1 -1
  83. package/dist/components/p-label.js +3 -3
  84. package/dist/components/p-listing.js +1 -1
  85. package/dist/components/p-navbar.js +1 -1
  86. package/dist/components/p-navigation-item.js +2 -2
  87. package/dist/components/p-navigation-section.js +1 -1
  88. package/dist/components/p-pagination-pages.js +1 -1
  89. package/dist/components/p-pagination-size.js +1 -1
  90. package/dist/components/p-pagination.js +1 -1
  91. package/dist/components/p-profile.js +1 -1
  92. package/dist/components/p-select.js +12 -15
  93. package/dist/components/p-select.js.map +1 -1
  94. package/dist/components/p-stepper.js +1 -1
  95. package/dist/components/p-table-cell.js +1 -1
  96. package/dist/components/p-table-footer.js +1 -1
  97. package/dist/components/p-table-header.js +1 -1
  98. package/dist/components/p-table-row.js +1 -1
  99. package/dist/components/p-table.js +10 -10
  100. package/dist/components/p-toast.js +1 -1
  101. package/dist/esm/p-checkbox.p-dropdown.p-dropdown-menu-container.p-dropdown-menu-item.entry.js.map +1 -1
  102. package/dist/esm/p-checkbox_4.entry.js +5 -5
  103. package/dist/esm/p-checkbox_4.entry.js.map +1 -1
  104. package/dist/esm/p-empty-state_9.entry.js +8 -8
  105. package/dist/esm/p-field.p-field-container.entry.js.map +1 -1
  106. package/dist/esm/p-field_2.entry.js +10 -7
  107. package/dist/esm/p-field_2.entry.js.map +1 -1
  108. package/dist/esm/p-label.entry.js +3 -3
  109. package/dist/esm/p-listing.entry.js +1 -1
  110. package/dist/esm/p-navbar.entry.js +1 -1
  111. package/dist/esm/p-navigation-item.entry.js +2 -2
  112. package/dist/esm/p-navigation-section.entry.js +1 -1
  113. package/dist/esm/p-pagination_3.entry.js +4 -4
  114. package/dist/esm/p-select.entry.js +10 -13
  115. package/dist/esm/p-select.entry.js.map +1 -1
  116. package/dist/esm/p-stepper.entry.js +1 -1
  117. package/dist/esm/p-toast.entry.js +1 -1
  118. package/dist/index.html +1 -1
  119. package/dist/paperless/{p-8981247d.entry.js → p-347b3ec3.entry.js} +2 -2
  120. package/dist/paperless/{p-cc3307b8.entry.js → p-3bd5d63a.entry.js} +2 -2
  121. package/dist/paperless/{p-cfd2e444.entry.js → p-4afd0801.entry.js} +2 -2
  122. package/dist/paperless/p-4afd0801.entry.js.map +1 -0
  123. package/dist/paperless/p-56a401d7.entry.js +2 -0
  124. package/dist/paperless/{p-2edd87f3.entry.js → p-79ed922f.entry.js} +2 -2
  125. package/dist/{build/p-26a3990a.entry.js → paperless/p-ad08592e.entry.js} +2 -2
  126. package/dist/paperless/{p-aec29ee9.entry.js → p-aec4f685.entry.js} +2 -2
  127. package/dist/paperless/{p-e2054751.entry.js → p-b0fc8bea.entry.js} +2 -2
  128. package/dist/paperless/{p-c4724fb7.entry.js → p-b13d6a2c.entry.js} +2 -2
  129. package/dist/paperless/p-checkbox.p-dropdown.p-dropdown-menu-container.p-dropdown-menu-item.entry.esm.js.map +1 -1
  130. package/dist/{build/p-87981fef.entry.js → paperless/p-d6adac97.entry.js} +2 -2
  131. package/dist/paperless/p-d6adac97.entry.js.map +1 -0
  132. package/dist/paperless/{p-05db72d0.entry.js → p-ddad483b.entry.js} +2 -2
  133. package/dist/paperless/p-fc920176.entry.js +2 -0
  134. package/dist/paperless/p-fc920176.entry.js.map +1 -0
  135. package/dist/paperless/p-field.p-field-container.entry.esm.js.map +1 -1
  136. package/dist/paperless/p-select.entry.esm.js.map +1 -1
  137. package/dist/paperless/paperless.esm.js +1 -1
  138. package/dist/sw.js +1 -1
  139. package/dist/sw.js.map +1 -1
  140. package/dist/types/components/molecules/select/select.component.d.ts +0 -1
  141. package/package.json +1 -1
  142. package/dist/build/p-474a16ab.entry.js +0 -2
  143. package/dist/build/p-87981fef.entry.js.map +0 -1
  144. package/dist/build/p-8a5dcfac.entry.js +0 -2
  145. package/dist/build/p-8a5dcfac.entry.js.map +0 -1
  146. package/dist/build/p-cfd2e444.entry.js.map +0 -1
  147. package/dist/components/p-ExfyVPT0.js.map +0 -1
  148. package/dist/components/p-YYQ927T-.js.map +0 -1
  149. package/dist/paperless/p-474a16ab.entry.js +0 -2
  150. package/dist/paperless/p-87981fef.entry.js.map +0 -1
  151. package/dist/paperless/p-8a5dcfac.entry.js +0 -2
  152. package/dist/paperless/p-8a5dcfac.entry.js.map +0 -1
  153. package/dist/paperless/p-cfd2e444.entry.js.map +0 -1
  154. /package/dist/build/{p-8981247d.entry.js.map → p-347b3ec3.entry.js.map} +0 -0
  155. /package/dist/build/{p-cc3307b8.entry.js.map → p-3bd5d63a.entry.js.map} +0 -0
  156. /package/dist/build/{p-474a16ab.entry.js.map → p-56a401d7.entry.js.map} +0 -0
  157. /package/dist/build/{p-2edd87f3.entry.js.map → p-79ed922f.entry.js.map} +0 -0
  158. /package/dist/build/{p-26a3990a.entry.js.map → p-ad08592e.entry.js.map} +0 -0
  159. /package/dist/build/{p-aec29ee9.entry.js.map → p-aec4f685.entry.js.map} +0 -0
  160. /package/dist/build/{p-e2054751.entry.js.map → p-b0fc8bea.entry.js.map} +0 -0
  161. /package/dist/build/{p-c4724fb7.entry.js.map → p-b13d6a2c.entry.js.map} +0 -0
  162. /package/dist/build/{p-05db72d0.entry.js.map → p-ddad483b.entry.js.map} +0 -0
  163. /package/dist/paperless/{p-8981247d.entry.js.map → p-347b3ec3.entry.js.map} +0 -0
  164. /package/dist/paperless/{p-cc3307b8.entry.js.map → p-3bd5d63a.entry.js.map} +0 -0
  165. /package/dist/paperless/{p-474a16ab.entry.js.map → p-56a401d7.entry.js.map} +0 -0
  166. /package/dist/paperless/{p-2edd87f3.entry.js.map → p-79ed922f.entry.js.map} +0 -0
  167. /package/dist/paperless/{p-26a3990a.entry.js.map → p-ad08592e.entry.js.map} +0 -0
  168. /package/dist/paperless/{p-aec29ee9.entry.js.map → p-aec4f685.entry.js.map} +0 -0
  169. /package/dist/paperless/{p-e2054751.entry.js.map → p-b0fc8bea.entry.js.map} +0 -0
  170. /package/dist/paperless/{p-c4724fb7.entry.js.map → p-b13d6a2c.entry.js.map} +0 -0
  171. /package/dist/paperless/{p-05db72d0.entry.js.map → p-ddad483b.entry.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"names":["checkboxComponentCss","checkbox","cva","variants","disabled","false","true","iconContainer","icon","Checkbox","checked","indeterminate","required","id","name","checkedChange","indeterminateChange","_nonce","nonce","_internals","formResetCallback","this","formDisabledCallback","form","render","length","h","key","htmlFor","class","asBoolean","type","onChange","ev","_onChange","size","variant","preventDefault","target","emit","setFormValue","dropdownComponentCss","dropdownContainerClass","strategy","absolute","fixed","fullWidth","maxWidth","compoundVariants","Dropdown","placement","offset","show","usePortal","calculateWidth","applyMaxWidth","applyFullWidth","allowOverflow","scrollable","insideClick","disableTriggerClick","applyChevron","chevronPosition","chevronDirection","isOpen","_loaded","_trigger","_menu","_cleanup","componentShouldUpdate","_update","componentDidLoad","_checkButtons","disconnectedCallback","remove","componentDidRender","_checkItems","dropdownContainerProps","ref","el","_load","onClick","_containerClickHandler","role","dropdownContainer","itemsSlot","Host","_triggerClickHandler","active","buttons","_el","querySelectorAll","button","iconOnly","chevron","indexOf","items","item","onShowChange","_hide","_show","documentClickHandler","event","hasAttribute","childOfComposed","popover","setTimeout","style","width","clientWidth","autoUpdate","setAttribute","classList","add","removeAttribute","computePosition","middleware","flip","shift","then","x","y","dataset","Object","assign","top","left","dropdownMenuContainerComponentCss","dropdownMenuContainer","default","none","large","xlarge","DropdownMenuContainer","dropdownMenuItemComponentCss","dropdownMenuItem","negative","enableHover","dropdownMenuItemIcon","wave","DropdownMenuItem","iconWave","useContainer"],"sources":["src/components/atoms/checkbox/checkbox.component.css?tag=p-checkbox","src/components/atoms/checkbox/checkbox.component.tsx","src/components/molecules/dropdown/dropdown.component.css?tag=p-dropdown&encapsulation=shadow","src/components/molecules/dropdown/dropdown.component.tsx","src/components/atoms/dropdown-menu/container/dropdown-menu-container.component.css?tag=p-dropdown-menu-container&encapsulation=shadow","src/components/atoms/dropdown-menu/container/dropdown-menu-container.component.tsx","src/components/atoms/dropdown-menu/item/dropdown-menu-item.component.css?tag=p-dropdown-menu-item&encapsulation=shadow","src/components/atoms/dropdown-menu/item/dropdown-menu-item.component.tsx"],"sourcesContent":[null,"import {\n AttachInternals,\n Component,\n Event,\n EventEmitter,\n Prop,\n State,\n h\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { asBoolean } from '../../../utils/as-boolean';\nimport { nonce } from '../../../utils/nonce';\n\nconst checkbox = cva(\n\t[\n\t\t'peer appearance-none m-0 outline-none flex-shrink-0',\n\t\t'border border-inset border-solid ',\n\t\t'rounded w-4 h-4',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tdisabled: {\n\t\t\t\tfalse: [\n\t\t\t\t\t'cursor-pointer shadow-1',\n\t\t\t\t\t'bg-white border-black-teal-100',\n\t\t\t\t\t'hover:bg-supportive-lilac-100 hover:border-black-teal-100',\n\t\t\t\t\t'checked:bg-supportive-lilac checked:border-black-teal/20',\n\t\t\t\t\t'checked:ring-2 checked:ring-supportive-lilac-100',\n\t\t\t\t\t'checked:hover:bg-supportive-lilac-700 checked:hover:border-black-teal/20',\n\t\t\t\t\t'indeterminate:bg-supportive-lilac-700 indeterminate:border-black-teal/20',\n\t\t\t\t\t'indeterminate:ring-2 indeterminate:ring-supportive-lilac-100',\n\t\t\t\t\t'indeterminate:hover:bg-supportive-lilac indeterminate:hover:border-black-teal/20',\n\t\t\t\t],\n\t\t\t\ttrue: 'bg-white-600 border-black-teal-50 cursor-not-allowed ',\n\t\t\t},\n\t\t},\n\t}\n);\n\nconst iconContainer = cva(\n\t[\n\t\t'hidden peer-indeterminate:flex peer-checked:flex',\n\t\t'absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 pointer-events-none',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tdisabled: {\n\t\t\t\tfalse: 'text-white',\n\t\t\t\ttrue: 'text-black-teal-200',\n\t\t\t},\n\t\t},\n\t}\n);\n\nconst icon = cva(['drop-shadow-black-teal-10% text-xs'], {\n\tvariants: {\n\t\tdisabled: {\n\t\t\tfalse: 'group-hover/p-checkbox:text-sm',\n\t\t\ttrue: null,\n\t\t},\n\t},\n});\n\n@Component({\n\ttag: 'p-checkbox',\n\tstyleUrl: 'checkbox.component.css',\n\tformAssociated: true,\n})\nexport class Checkbox {\n\t/**\n\t * Wether the checkbox is checked\n\t */\n\t@Prop() checked: boolean;\n\n\t/**\n\t * Wether the checkbox is in indeterminate state\n\t */\n\t@Prop() indeterminate: boolean;\n\n\t/**\n\t * Wether the checkbox is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the checkbox is required\n\t */\n\t@Prop({ reflect: true }) required: boolean = true;\n\n\t/**\n\t * The id of the checkbox button\n\t */\n\t@Prop({ reflect: true }) id: string;\n\n\t/**\n\t * The name of the checkbox button\n\t */\n\t@Prop({ reflect: true }) name: string;\n\n\t/**\n\t * Event whenever the checked changes\n\t */\n\t@Event() checkedChange: EventEmitter<boolean>;\n\t/**\n\t * Event whenever the indeterminate changes\n\t */\n\t@Event() indeterminateChange: EventEmitter<boolean>;\n\n\t@State() private _nonce = nonce(5);\n\n\t@AttachInternals() _internals: ElementInternals;\n\n\tformResetCallback() {\n\t\tthis.checked = false;\n\t\tthis.indeterminate = false;\n\t}\n\n\tformDisabledCallback(disabled: boolean) {\n\t\tif(!this._internals.form) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.disabled = disabled;\n\t}\n\n\trender() {\n\t\tconst id = this.id?.length ? this.id : this._nonce;\n\n\t\treturn (\n\t\t\t<label\n\t\t\t\thtmlFor={id}\n\t\t\t\tclass='group/p-checkbox flex items-center justify-start gap-2 text-black-teal'\n\t\t\t>\n\t\t\t\t<div class='relative flex flex-shrink-0 items-center'>\n\t\t\t\t\t<input\n\t\t\t\t\t\tclass={checkbox({\n\t\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\t})}\n\t\t\t\t\t\ttype='checkbox'\n\t\t\t\t\t\tid={id}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\trequired={asBoolean(this.required)}\n\t\t\t\t\t\tchecked={asBoolean(this.checked)}\n\t\t\t\t\t\tindeterminate={asBoolean(this.indeterminate)}\n\t\t\t\t\t\tdisabled={asBoolean(this.disabled)}\n\t\t\t\t\t\tonChange={ev => this._onChange(ev)}\n\t\t\t\t\t/>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={iconContainer({\n\t\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\tclass={icon({\n\t\t\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tsize='auto'\n\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\tasBoolean(this.indeterminate) ? 'minus' : 'checkmarkThick'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<slot />\n\t\t\t</label>\n\t\t);\n\t}\n\n\tprivate _onChange(ev: Event) {\n\t\tif (this.disabled) {\n\t\t\tev.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tconst checked = asBoolean((ev.target as HTMLInputElement).checked);\n\t\tconst indeterminate = asBoolean(\n\t\t\t(ev.target as HTMLInputElement).indeterminate\n\t\t);\n\n\t\tif (checked != this.checked) {\n\t\t\tthis.checked = checked;\n\t\t\tthis.checkedChange.emit(checked);\n\t\t}\n\n\t\tif (indeterminate != this.indeterminate) {\n\t\t\tthis.indeterminate = indeterminate;\n\t\t\tthis.indeterminateChange.emit(indeterminate);\n\t\t}\n\n\t\tthis._internals.setFormValue(this.indeterminate ? \"indeterminate\" : this.checked ? \"on\" : \"off\");\n\t}\n\n}\n",null,"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';\n\nconst dropdownContainerClass = cva(['z-dropdown hidden'], {\n\tvariants: {\n\t\tstrategy: {\n\t\t\tabsolute: 'absolute',\n\t\t\tfixed: 'fixed',\n\t\t},\n\t\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},\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' | 'dark-teal' = '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 use a portal for the dropdown container\n\t */\n\t@Prop() usePortal: boolean = false;\n\n\t/**\n\t * Wether to automatically calculate the width of the menu based on the trigger\n\t */\n\t@Prop() calculateWidth: boolean = false;\n\n\t/**\n\t * Wether to apply the max width\n\t */\n\t@Prop() applyMaxWidth: boolean = true;\n\n\t/**\n\t * Wether to apply the full width\n\t */\n\t@Prop() applyFullWidth: boolean = true;\n\n\t/**\n\t * Wether to allow overflow in the container\n\t */\n\t@Prop() allowOverflow: boolean = false;\n\n\t/**\n\t * Wether the dropdown container should be scrollable when the threshold is met.\n\t */\n\t@Prop() scrollable: boolean | 'default' | 'large' = false;\n\n\t/**\n\t * Wether to automatically close the dropdown menu after clicking inside\n\t */\n\t@Prop() insideClick: boolean = false;\n\n\t/**\n\t * Wether to automatically close the dropdown menu after clicking inside\n\t */\n\t@Prop() disableTriggerClick: boolean = false;\n\n\t/**\n\t * Wether to apply chevron automatically\n\t */\n\t@Prop() applyChevron: boolean = true;\n\n\t/**\n\t * Chevron position\n\t */\n\t@Prop() chevronPosition: 'start' | 'end' = 'end';\n\n\t/**\n\t * Chevron direction\n\t */\n\t@Prop() chevronDirection: 'up' | 'down';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t/**\n\t * Open change event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tisOpen: EventEmitter<boolean>;\n\n\tprivate _loaded = false;\n\tprivate _trigger: HTMLElement;\n\tprivate _menu: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\n\t}\n\n\tcomponentDidLoad() {\n\t\tthis._checkButtons();\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\tthis._menu.remove();\n\t}\n\n\tcomponentDidRender() {\n\t\tthis._checkButtons();\n\t\tthis._checkItems();\n\t}\n\n\trender() {\n\t\tconst dropdownContainerProps = {\n\t\t\tclass: dropdownContainerClass({\n\t\t\t\tstrategy: this.strategy,\n\t\t\t\tmaxWidth: !this.calculateWidth && this.applyMaxWidth,\n\t\t\t\tfullWidth: this.applyFullWidth && !this.applyMaxWidth,\n\t\t\t}),\n\t\t\tref: el => this._load(el),\n\t\t\tonClick: () => this._containerClickHandler(),\n\t\t\trole: 'popover',\n\t\t\t'data-placement': this.placement,\n\t\t\t'data-strategy': this.strategy,\n\t\t};\n\n\t\tlet dropdownContainer: HTMLElement;\n\t\tconst itemsSlot = <slot name='items' />;\n\n\t\tif (this.usePortal) {\n\t\t\tdropdownContainer = (\n\t\t\t\t<p-portal {...dropdownContainerProps}>\n\t\t\t\t\t<p-dropdown-menu-container\n\t\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\t\tmaxWidth={!this.calculateWidth && this.applyMaxWidth}\n\t\t\t\t\t\tfullWidth={this.applyFullWidth && !this.applyMaxWidth}\n\t\t\t\t\t\tallowOverflow={this.allowOverflow}\n\t\t\t\t\t\tscrollable={this.scrollable}\n\t\t\t\t\t>\n\t\t\t\t\t\t{itemsSlot}\n\t\t\t\t\t</p-dropdown-menu-container>\n\t\t\t\t</p-portal>\n\t\t\t);\n\t\t} else {\n\t\t\tdropdownContainer = (\n\t\t\t\t<p-dropdown-menu-container\n\t\t\t\t\tvariant={this.variant}\n\t\t\t\t\tmaxWidth={!this.calculateWidth && this.applyMaxWidth}\n\t\t\t\t\tfullWidth={this.applyFullWidth && !this.applyMaxWidth}\n\t\t\t\t\tallowOverflow={this.allowOverflow}\n\t\t\t\t\tscrollable={this.scrollable}\n\t\t\t\t\t{...dropdownContainerProps}\n\t\t\t\t>\n\t\t\t\t\t{itemsSlot}\n\t\t\t\t</p-dropdown-menu-container>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<Host class='relative'>\n\t\t\t\t<div\n\t\t\t\t\tclass='trigger'\n\t\t\t\t\tref={ref => (this._trigger = ref)}\n\t\t\t\t\tonClick={() => this._triggerClickHandler()}\n\t\t\t\t>\n\t\t\t\t\t<slot name='trigger' />\n\t\t\t\t</div>\n\t\t\t\t<div class='relative w-full'>{dropdownContainer}</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\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? '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 (!this._menu.hasAttribute('data-show') || childOfComposed(event, this._menu)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\tprivate _containerClickHandler() {\n\t\tif (this.insideClick) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._menu.hasAttribute('data-show')) {\n\t\t\tthis._hide();\n\t\t}\n\t}\n\n\tprivate _triggerClickHandler() {\n\t\tif (this.disableTriggerClick) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._menu.hasAttribute('data-show')) {\n\t\t\tthis._hide();\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._menu = popover;\n\t\tif (popover) {\n\t\t\tthis._update();\n\t\t\tthis._loaded = true;\n\n\t\t\tif (this.show) {\n\t\t\t\tsetTimeout(() => this._show(), 100);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make the popover visible\n\t\tif (this.calculateWidth) {\n\t\t\tthis._menu.style.width = `${this._trigger.clientWidth}px`;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._menu, () => this._update());\n\n\t\tthis._menu.setAttribute('data-show', '');\n\t\tthis._menu.classList.remove('hidden');\n\t\tthis._menu.classList.add('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",null,"import { Component, h, Prop } from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { asBoolean } from '../../../../utils/as-boolean';\n\nconst dropdownMenuContainer = cva(\n\t['p-dropdown-menu-container', 'p-1', 'rounded-lg z-10', 'border'],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: 'bg-white border-black-teal-100 drop-shadow-2',\n\t\t\t\t'dark-teal': 'bg-dark-teal-400 drop-shadow-3 border-dark-teal-400',\n\t\t\t},\n\t\t\tfullWidth: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'w-full',\n\t\t\t},\n\t\t\tmaxWidth: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: 'max-w-[13.875rem]',\n\t\t\t},\n\t\t\tallowOverflow: {\n\t\t\t\tfalse: 'overflow-y-auto overflow-x-hidden',\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tscrollable: {\n\t\t\t\tnone: null,\n\t\t\t\tdefault: 'max-h-[11.5rem]',\n\t\t\t\tlarge: 'max-h-[13.875rem]',\n\t\t\t\txlarge: 'max-h-[20rem]',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tfullWidth: false,\n\t\t\t\tmaxWidth: true,\n\t\t\t\tclass: 'w-auto',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-dropdown-menu-container',\n\tstyleUrl: 'dropdown-menu-container.component.css',\n\tshadow: true,\n})\nexport class DropdownMenuContainer {\n\t/**\n\t * The variant of the container\n\t */\n\t@Prop() variant: 'default' | 'dark-teal' = 'default';\n\n\t/**\n\t * Wether the container applies it's max width\n\t */\n\t@Prop() maxWidth: boolean = true;\n\n\t/**\n\t * The class of the container passed by parent\n\t */\n\t@Prop() class: string;\n\n\t/**\n\t * Wether the container should all available space\n\t */\n\t@Prop() fullWidth: boolean = true;\n\n\t/**\n\t * Wether to allow overflow\n\t */\n\t@Prop() allowOverflow: boolean = false;\n\n\t/**\n\t * Wether the container should be scrollable when the threshold is met.\n\t */\n\t@Prop() scrollable: boolean | 'default' | 'large' | 'xlarge' = false;\n\n\trender() {\n\t\tconst scrollable =\n\t\t\tthis.scrollable === false\n\t\t\t\t? 'none'\n\t\t\t\t: this.scrollable === true\n\t\t\t\t? 'default'\n\t\t\t\t: this.scrollable;\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass={dropdownMenuContainer({\n\t\t\t\t\tclass: this.class,\n\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\tfullWidth: asBoolean(this.fullWidth, true),\n\t\t\t\t\tallowOverflow: asBoolean(this.allowOverflow),\n\t\t\t\t\tscrollable,\n\t\t\t\t\tmaxWidth: this.maxWidth,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<div class='flex w-full flex-col'>\n\t\t\t\t\t<slot />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n",null,"import { Component, Prop, h } from '@stencil/core';\nimport { cva } from 'class-variance-authority';\nimport { asBoolean } from '../../../../utils/as-boolean';\nimport { IconVariant } from '../../icon/icon.component';\n\nconst dropdownMenuItem = cva(\n\t[\n\t\t'p-dropdown-menu-item flex px-2 py-1 gap-2 text-sm font-medium group rounded-lg items-center h-8 max-w-full',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: null,\n\t\t\t\t'dark-teal': null,\n\t\t\t\tnegative: null,\n\t\t\t},\n\t\t\tactive: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t\tdisabled: {\n\t\t\t\tfalse: 'cursor-pointer',\n\t\t\t\ttrue: 'cursor-not-allowed',\n\t\t\t},\n\t\t\tenableHover: {\n\t\t\t\tfalse: null,\n\t\t\t\ttrue: null,\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tactive: false,\n\t\t\t\tenableHover: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'hover:bg-supportive-lilac-50',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tactive: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'bg-supportive-lilac-100',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'text-black-teal',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'text-black-teal-200',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'default',\n\t\t\t\tdisabled: true,\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'bg-supportive-lilac-100',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: 'dark-teal',\n\t\t\t\tactive: false,\n\t\t\t\tenableHover: true,\n\t\t\t\tclass: 'text-white',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'dark-teal',\n\t\t\t\tactive: false,\n\t\t\t\tenableHover: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'hover:bg-dark-teal-500',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'dark-teal',\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'text-white bg-dark-teal-600',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'dark-teal',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'opacity-40',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tvariant: 'negative',\n\t\t\t\tactive: false,\n\t\t\t\tenableHover: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'text-negative-red hover:bg-negative-red-50',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'negative',\n\t\t\t\tactive: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'bg-negative-red-100 text-negative-red',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'negative',\n\t\t\t\tdisabled: true,\n\t\t\t\tclass: 'text-negative-red-100',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: 'negative',\n\t\t\t\tdisabled: true,\n\t\t\t\tactive: true,\n\t\t\t\tclass: 'bg-negative-red-50',\n\t\t\t},\n\n\t\t\t{\n\t\t\t\tenableHover: true,\n\t\t\t\tdisabled: false,\n\t\t\t\tclass: 'cursor-pointer',\n\t\t\t},\n\t\t],\n\t}\n);\n\nconst dropdownMenuItemIcon = cva(['text-base'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: null,\n\t\t\t'dark-teal': null,\n\t\t\tnegative: null,\n\t\t},\n\t\tactive: {\n\t\t\tfalse: null,\n\t\t\ttrue: null,\n\t\t},\n\t\tdisabled: {\n\t\t\tfalse: null,\n\t\t\ttrue: 'text-black-teal-100',\n\t\t},\n\t\twave: {\n\t\t\ttrue: 'group-hover:animate-wave',\n\t\t\tfalse: null,\n\t\t},\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\tvariant: 'default',\n\t\t\tactive: false,\n\t\t\tdisabled: false,\n\t\t\tclass: 'text-black-teal-300 group-hover:text-black-teal',\n\t\t},\n\n\t\t{\n\t\t\tvariant: 'dark-teal',\n\t\t\tactive: false,\n\t\t\tdisabled: false,\n\t\t\tclass: 'text-dark-teal-100 group-hover:text-white',\n\t\t},\n\n\t\t{\n\t\t\tvariant: 'negative',\n\t\t\tactive: false,\n\t\t\tdisabled: false,\n\t\t\tclass: 'text-negative-red group-hover:text-negative-red-800',\n\t\t},\n\t\t{\n\t\t\tvariant: 'negative',\n\t\t\tactive: true,\n\t\t\tdisabled: false,\n\t\t\tclass: 'text-negative-red-800',\n\t\t},\n\t],\n});\n\n@Component({\n\ttag: 'p-dropdown-menu-item',\n\tstyleUrl: 'dropdown-menu-item.component.css',\n\tshadow: true,\n})\nexport class DropdownMenuItem {\n\t/**\n\t * Wether the dropdown menu item is active\n\t */\n\t@Prop() active: boolean = false;\n\n\t/**\n\t * Wether the dropdown menu item has a checkbox\n\t */\n\t@Prop() checkbox: boolean = false;\n\n\t/**\n\t * The variant of the item\n\t */\n\t@Prop() variant: 'default' | 'dark-teal' | 'negative' = 'default';\n\n\t/**\n\t * Wether to enable the hover state\n\t */\n\t@Prop() enableHover?: boolean = true;\n\n\t/**\n\t * Wether the item is disabled\n\t */\n\t@Prop() disabled: boolean = false;\n\n\t/**\n\t * Icon of the navigation item\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Wether to apply wave animation to icon\n\t */\n\t@Prop() iconWave: boolean = false;\n\n\t/**\n\t * wether to use the container for text\n\t */\n\t@Prop() useContainer = true;\n\n\trender() {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass={dropdownMenuItem({\n\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\tactive: asBoolean(this.active),\n\t\t\t\t\tenableHover: asBoolean(this.enableHover ?? true, true),\n\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{this.icon && (\n\t\t\t\t\t<p-icon\n\t\t\t\t\t\tclass={dropdownMenuItemIcon({\n\t\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\t\tactive: asBoolean(this.active),\n\t\t\t\t\t\t\tdisabled: asBoolean(this.disabled),\n\t\t\t\t\t\t\twave: asBoolean(this.iconWave),\n\t\t\t\t\t\t})}\n\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{this.checkbox && (\n\t\t\t\t\t<p-checkbox\n\t\t\t\t\t\tchecked={this.active}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\n\t\t\t\t{this.useContainer ? (\n\t\t\t\t\t<div class='block w-full overflow-hidden text-ellipsis whitespace-nowrap text-start'>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<slot />\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"],"mappings":"wSAAA,MAAMA,EAAuB,+qKCa7B,MAAMC,EAAWC,EAChB,CACC,sDACA,oCACA,mBAED,CACCC,SAAU,CACTC,SAAU,CACTC,MAAO,CACN,0BACA,iCACA,4DACA,2DACA,mDACA,2EACA,2EACA,+DACA,oFAEDC,KAAM,4DAMV,MAAMC,EAAgBL,EACrB,CACC,mDACA,6FAED,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0B,EAAUT,KAAKjB,UACzBuI,KAAM7G,EAAUT,KAAKwH,YAEtBzG,QAASf,KAAKb,OAIfa,KAAKpB,UACLyB,EAAA,cAAAC,IAAA,2CACCjB,QAASW,KAAKmE,OACdpF,SAAUiB,KAAKjB,WAIhBiB,KAAKyH,aACLpH,EAAA,OAAKG,MAAM,2EACVH,EAAQ,cAGTA,EAAQ,a","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["selectComponentCss","multiContainer","cva","multiItem","textContainer","variants","variant","placeholder","default","Select","items","multi","usePortal","strategy","icon","query","autocompletePlaceholder","value","displayKey","dropdownDisplayKey","selectionDisplayKey","valueKey","avatarKey","iconKey","showIconInSelectedItem","classKey","applyClassOnSelectedItem","avatarLettersKey","identifierKey","queryKey","autoSelectFirst","showChevron","maxDisplayedItems","enableAutocomplete","asyncFilter","loading","enableSelectAll","selectAllText","selectAllIcon","queryChange","valueChange","selectAllChange","dropdownShown","size","prefix","label","helper","required","error","disabled","showAddItem","addItemText","add","emptyStateText","_showDropdown","_selectedItem","_allSelected","_amountHidden","_internals","_inputRef","autocompleteInputRef","_multiContainerRef","_resizeObserver","_resizeDebounceTimer","_checkSelectedItemsTimeout","_items","this","_getParsedItems","_displayValue","h","class","length","ref","map","item","onClick","_selectValue","_getDisplay","_identifierKey","formResetCallback","formDisabledCallback","form","componentDidLoad","Error","_setMultiContainerMaxWidth","ResizeObserver","clearTimeout","setTimeout","_setCheckSelectedItemsTimeout","observe","_el","_valueChange","itemChanges","componentDidRender","disconnectedCallback","disconnect","render","key","disableTriggerClick","calculateWidth","insideClick","scrollable","show","onIsOpen","ev","_onDropdownOpen","slot","errorPlacement","forceShowTooltip","chevron","active","_onClick","_getLoadingItems","_getItems","_getAddItem","documentClickHandler","event","childOfComposed","_preselectItem","_showDropdownChanges","emit","multiChanges","Array","isArray","JSON","parse","filter","i","includes","identifier","parsedValue","stringify","currentValue","currentParsedValue","find","itemIdentifier","parsedItemIdentifier","forceBlur","selectedItem","valueArray","includesIndex","findIndex","push","splice","_onBlur","_findOnClickTarget","target","nodeName","toLowerCase","classList","contains","parentElement","force","_onAutoComplete","detail","_checkvalue","toString","indexOf","useContainer","checkbox","unshift","_selectAllChange","_getAutoCompleteItem","enableHover","onValueChange","onInputRefChange","calced","clientWidth","style","maxWidth","_checkSelectedItems","containerRect","getBoundingClientRect","querySelectorAll","amountHidden","child","remove","childRect","right","extra","querySelector","focus","isSelection","content","src","letters","applyPagination","str","text","slice"],"sources":["src/components/molecules/select/select.component.css?tag=p-select&encapsulation=shadow","src/components/molecules/select/select.component.tsx"],"sourcesContent":[null,"import { Strategy } from '@floating-ui/dom';\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { childOfComposed } from '../../../utils';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\nimport { cva } from 'class-variance-authority';\n\nconst multiContainer = cva([\n\t'flex items-center gap-2',\n\t'flex-1 min-w-0 h-full',\n\t'pointer-events-none overflow-hidden',\n]);\n\nconst multiItem = cva([\n\t'item group/item',\n\t'pointer-events-auto cursor-pointer',\n\t'flex h-[1.625rem] items-center gap-2',\n\t'h-[1.625rem] px-2',\n\t'text-sm font-semibold whitespace-nowrap',\n\t'rounded-lg',\n\t'bg-supportive-lilac-100',\n]);\n\nconst textContainer = cva(\n\t'block w-full overflow-hidden text-ellipsis whitespace-nowrap text-start',\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tplaceholder: 'text-black-teal-400',\n\t\t\t\tdefault: null,\n\t\t\t},\n\t\t},\n\t}\n);\n\n@Component({\n\ttag: 'p-select',\n\tstyleUrl: 'select.component.css',\n\tformAssociated: true,\n\tshadow: true\n})\nexport class Select {\n\t/**\n\t * The items to show in the dropdown\n\t */\n\t@Prop() items: string | any[];\n\n\t/**\n\t * Wether to enable multi select\n\t */\n\t@Prop({ reflect: true }) multi: boolean;\n\n\t/**\n\t * Wether to use a portal for the dropdown container of the select\n\t */\n\t@Prop() usePortal: boolean = false;\n\n\t/**\n\t * The strategy to use for the dropdown placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Icon of the select box\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * The current query\n\t */\n\t@Prop() query: string;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The placeholder of the input used for auto complete\n\t */\n\t@Prop() autocompletePlaceholder: string = 'Search...';\n\n\t/**\n\t * The current value\n\t */\n\t@Prop() value: any;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() displayKey: string = 'text';\n\n\t/**\n\t * The key of the object to display in the dropdown (overwrites displayKey)\n\t */\n\t@Prop() dropdownDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to display in the input (overwrites displayKey)\n\t */\n\t@Prop() selectionDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to return\n\t */\n\t@Prop() valueKey: string;\n\n\t/**\n\t * The key of avatar within an item to show\n\t */\n\t@Prop() avatarKey: string;\n\n\t/**\n\t * The key of icon variant within an item to show\n\t */\n\t@Prop() iconKey: string;\n\n\t/**\n\t * Wether to show the icon also on the selected Item\n\t */\n\t@Prop() showIconInSelectedItem: string;\n\n\t/**\n\t * The key of a class in an item to apply\n\t */\n\t@Prop() classKey: string = 'class';\n\n\t/**\n\t * Wether to apply the item's class also on the selected item\n\t */\n\t@Prop() applyClassOnSelectedItem: string;\n\n\t/**\n\t * The key of avatar letters within an item to show when the avatar url doesn't work\n\t */\n\t@Prop() avatarLettersKey: string;\n\n\t/**\n\t * The key to identify an object\n\t */\n\t@Prop() identifierKey: string;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() queryKey?: string;\n\n\t/**\n\t * Wether to automatically select the first item\n\t */\n\t@Prop() autoSelectFirst: boolean = true;\n\n\t/**\n\t * Wether to show the chevron or not\n\t */\n\t@Prop() showChevron: boolean = true;\n\n\t/**\n\t * The maximum amount of items to display\n\t */\n\t@Prop() maxDisplayedItems: number = 10;\n\n\t/**\n\t * Wether to enable autocomplete\n\t */\n\t@Prop() enableAutocomplete: boolean = true;\n\n\t/**\n\t * Wether the input uses async filtering\n\t */\n\t@Prop() asyncFilter: boolean = false;\n\n\t/**\n\t * Wether to show loading items\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * Wether to show the select all item with multi select\n\t */\n\t@Prop() enableSelectAll: boolean = false;\n\n\t/**\n\t * The text of the select all item\n\t */\n\t@Prop() selectAllText: string = 'Select all';\n\n\t/**\n\t * The icon to prefix for select all\n\t */\n\t@Prop() selectAllIcon: IconVariant | undefined;\n\n\t/**\n\t * Event when the query of the autocomplete changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tqueryChange: EventEmitter<string>;\n\n\t/**\n\t * Event when the value changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tvalueChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the select all item has been selected or not\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tselectAllChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the dropdown shows\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdropdownShown: EventEmitter<any>;\n\n\t/**\n\t * The size of the input group used by the select\n\t */\n\t@Prop() size: 'sm' | 'base' = 'base';\n\n\t/**\n\t * The prefix of the input group used by the select\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The label of the input group used by the select\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean = true;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled used by the select\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether to show a \"add\" item\n\t */\n\t@Prop() showAddItem: boolean = false;\n\n\t/**\n\t * The text to show when add item is being shown\n\t */\n\t@Prop() addItemText: string = 'Add item';\n\n\t/**\n\t * Event when the add item is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tadd: EventEmitter;\n\n\t/**\n\t * The text to show when items is empty\n\t */\n\t@Prop() emptyStateText: string = 'No items available';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _showDropdown: any = false;\n\t@State() private _selectedItem: any = null;\n\n\t@State() private _allSelected: boolean = false;\n\n\t@State() private _amountHidden = 0;\n\n\t@AttachInternals() _internals: ElementInternals;\n\n\tprivate _inputRef: HTMLDivElement;\n\tprivate autocompleteInputRef: HTMLInputElement | HTMLTextAreaElement;\n\tprivate _multiContainerRef: HTMLElement;\n\n\tprivate _resizeObserver: ResizeObserver;\n\tprivate _resizeDebounceTimer: NodeJS.Timeout | undefined;\n\tprivate _checkSelectedItemsTimeout: NodeJS.Timeout | undefined;\n\n\tget _items() {\n\t\treturn this._getParsedItems();\n\t}\n\n\tget _displayValue() {\n\t\tconst placeholder = (\n\t\t\t<div class={textContainer({ variant: 'placeholder' })}>\n\t\t\t\t{this.placeholder}\n\t\t\t</div>\n\t\t);\n\n\t\tif (!this._selectedItem) {\n\t\t\treturn placeholder;\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tif (this._selectedItem?.length === 0) {\n\t\t\t\treturn placeholder;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclass={multiContainer()}\n\t\t\t\t\tref={ref => (this._multiContainerRef = ref)}\n\t\t\t\t>\n\t\t\t\t\t{this._selectedItem.map(item => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass={multiItem()}\n\t\t\t\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{item[this.selectionDisplayKey ?? this.displayKey]}\n\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\tclass='text-xs text-supportive-lilac group-hover/item:text-supportive-lilac-800'\n\t\t\t\t\t\t\t\tvariant='negative'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\n\t\t\t\t\t<div class='extra pointer-events-none hidden text-sm text-black-teal-100'>\n\t\t\t\t\t\t+{this._amountHidden}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn this._getDisplay(this._selectedItem, true);\n\t}\n\n\tget _identifierKey() {\n\t\treturn this.identifierKey ?? this.valueKey ?? 'value';\n\t}\n\n\tformResetCallback() {\n\t\tthis._selectValue(null)\n\t}\n\n\tformDisabledCallback(disabled: boolean) {\n\t\tif(!this._internals.form) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.disabled = disabled;\n\t}\n\n\tcomponentDidLoad() {\n\t\tif (!this.valueKey && !this.identifierKey) {\n\t\t\tthrow new Error('You must provide a valueKey or identifierKey');\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\n\t\t\tthis._resizeObserver = new ResizeObserver(() => {\n\t\t\t\tif (this._resizeDebounceTimer) {\n\t\t\t\t\tclearTimeout(this._resizeDebounceTimer);\n\t\t\t\t\tthis._resizeDebounceTimer = null;\n\t\t\t\t}\n\n\t\t\t\tthis._resizeDebounceTimer = setTimeout(() => {\n\t\t\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\t\t\tthis._setCheckSelectedItemsTimeout();\n\t\t\t\t}, 200);\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._el);\n\t\t}\n\n\t\tif (this.value) {\n\t\t\tthis._valueChange();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.itemChanges();\n\t}\n\n\tcomponentDidRender() {\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this.multi) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<p-dropdown\n\t\t\t\tdisableTriggerClick={true}\n\t\t\t\tcalculateWidth={true}\n\t\t\t\tinsideClick={true}\n\t\t\t\tscrollable={this.enableAutocomplete ? 'large' : true}\n\t\t\t\tshow={this._showDropdown}\n\t\t\t\tonIsOpen={ev => this._onDropdownOpen(ev)}\n\t\t\t\tusePortal={this.usePortal}\n\t\t\t\tstrategy={this.strategy}\n\t\t\t>\n\t\t\t\t<p-field-container\n\t\t\t\t\tslot='trigger'\n\t\t\t\t\tvariant='write'\n\t\t\t\t\tprefix={this.prefix}\n\t\t\t\t\tlabel={this.label}\n\t\t\t\t\thelper={this.helper}\n\t\t\t\t\trequired={this.required}\n\t\t\t\t\terror={this.error}\n\t\t\t\t\terrorPlacement='top-start'\n\t\t\t\t\tforceShowTooltip={this.error?.length && this._showDropdown}\n\t\t\t\t>\n\t\t\t\t\t<p-button\n\t\t\t\t\t\tclass='w-full'\n\t\t\t\t\t\tslot='content'\n\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tchevron={this.showChevron}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tactive={this._showDropdown}\n\t\t\t\t\t\ticon={this.icon}\n\t\t\t\t\t\tonClick={ev => this._onClick(ev)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass='relative min-w-0 flex-1'\n\t\t\t\t\t\t\tref={ref => (this._inputRef = ref)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this._displayValue}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</p-button>\n\t\t\t\t</p-field-container>\n\t\t\t\t{this.loading ? this._getLoadingItems() : this._getItems()}\n\t\t\t\t{this.showAddItem && this._getAddItem()}\n\t\t\t</p-dropdown>\n\t\t);\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler(event) {\n\t\tif (!this._showDropdown || childOfComposed(event, this._el)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\t@Watch('value')\n\tprivate _valueChange() {\n\t\tsetTimeout(() => {\n\t\t\tthis._preselectItem();\n\t\t\tthis._setCheckSelectedItemsTimeout();\n\t\t});\n\t}\n\n\t@Watch('items')\n\tpublic itemChanges() {\n\t\tsetTimeout(() => this._preselectItem());\n\t}\n\n\t@Watch('_showDropdown')\n\tpublic _showDropdownChanges() {\n\t\tthis.dropdownShown.emit({\n\t\t\tvalue: this._showDropdown,\n\t\t\tquery: this.query,\n\t\t});\n\t}\n\n\t@Watch('multi')\n\tpublic multiChanges() {\n\t\tif (this._selectedItem && !Array.isArray(this._selectedItem)) {\n\t\t\tthis._selectedItem = [];\n\t\t}\n\t}\n\n\tprivate _preselectItem() {\n\t\tlet value =\n\t\t\ttypeof this.value === 'string' && this.multi\n\t\t\t\t? JSON.parse(this.value)\n\t\t\t\t: this.value;\n\n\t\tif (this.multi) {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthis.value = [];\n\t\t\t\tthis.valueChange.emit(this.value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t\tif (!value.length) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._selectedItem =\n\t\t\t\t!!this.valueKey && this.valueKey !== 'false'\n\t\t\t\t\t? this._items.filter(i => value.includes(i?.[this.valueKey]))\n\t\t\t\t\t: [...value];\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._selectedItem && !value && this.autoSelectFirst) {\n\t\t\tvalue = this._items[0];\n\t\t}\n\n\t\tconst identifier =\n\t\t\ttypeof value === 'object' && value !== null\n\t\t\t\t? value[this._identifierKey]\n\t\t\t\t: value;\n\t\tconst parsedValue =\n\t\t\ttypeof identifier === 'string' || typeof identifier === 'number'\n\t\t\t\t? identifier\n\t\t\t\t: JSON.stringify(identifier);\n\n\t\tconst currentValue = this._selectedItem\n\t\t\t? this._selectedItem?.[this._identifierKey]\n\t\t\t: null;\n\t\tconst currentParsedValue =\n\t\t\ttypeof currentValue === 'string' || typeof currentValue === 'number'\n\t\t\t\t? currentValue\n\t\t\t\t: JSON.stringify(currentValue);\n\n\t\tif (this._selectedItem && currentParsedValue === parsedValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._items?.length && value) {\n\t\t\tthis._selectValue(value, false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst items = this._getParsedItems(false);\n\t\tconst item = items.find(i => {\n\t\t\tconst itemIdentifier = i?.[this._identifierKey];\n\t\t\tconst parsedItemIdentifier =\n\t\t\t\ttypeof itemIdentifier === 'string' || typeof itemIdentifier === 'number'\n\t\t\t\t\t? itemIdentifier\n\t\t\t\t\t: JSON.stringify(itemIdentifier);\n\n\t\t\treturn parsedItemIdentifier === parsedValue;\n\t\t});\n\n\t\tthis._selectValue(!!item ? item : value, false);\n\t}\n\n\tprivate _selectValue(item, forceBlur = true) {\n\t\tlet value =\n\t\t\t!!this.valueKey && this.valueKey !== 'false' && item !== null\n\t\t\t\t? item?.[this.valueKey]\n\t\t\t\t: item;\n\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem || !Array.isArray(this._selectedItem)) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t}\n\n\t\t\tif (!this.value || !Array.isArray(this.value)) {\n\t\t\t\tthis.value = [];\n\t\t\t}\n\n\t\t\tconst selectedItem = [...this._selectedItem];\n\t\t\tconst valueArray = [...this.value];\n\n\t\t\tconst includesIndex = selectedItem.findIndex(\n\t\t\t\ti => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t);\n\t\t\tif (includesIndex === -1) {\n\t\t\t\tselectedItem.push(item);\n\t\t\t\tvalueArray.push(value);\n\t\t\t} else {\n\t\t\t\tselectedItem.splice(includesIndex, 1);\n\t\t\t\tvalueArray.splice(includesIndex, 1);\n\t\t\t}\n\n\t\t\tthis._selectedItem = selectedItem;\n\t\t\tthis.value = valueArray;\n\t\t\tthis.valueChange.emit(valueArray);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._selectedItem = item;\n\t\tthis.value = value;\n\t\tthis.valueChange.emit(value);\n\n\t\tthis._onBlur(forceBlur);\n\t}\n\n\tprivate _findOnClickTarget(target: HTMLElement) {\n\t\tif (target.nodeName.toLowerCase() === 'p-button') {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (target.classList.contains('item')) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this._findOnClickTarget(target.parentElement);\n\t}\n\n\tprivate _onClick(ev) {\n\t\tif (!this._findOnClickTarget(ev.target as HTMLElement)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = !this._showDropdown;\n\t}\n\n\tprivate _onBlur(force = false) {\n\t\tif (this.enableAutocomplete && !force) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\tprivate _onAutoComplete(ev) {\n\t\tif (!this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = true;\n\n\t\tthis.query = ev.detail;\n\t\tthis.queryChange.emit(ev.detail);\n\t}\n\n\tprivate _checkvalue(key, item) {\n\t\treturn (\n\t\t\titem?.[key]\n\t\t\t\t?.toString()\n\t\t\t\t?.toLowerCase()\n\t\t\t\t.indexOf(this.query?.toLowerCase()) >= 0\n\t\t);\n\t}\n\n\tprivate _getItems() {\n\t\tlet items = this._items.map(item => (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tuseContainer={false}\n\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\tactive={\n\t\t\t\t\tthis.multi &&\n\t\t\t\t\t!!this._selectedItem &&\n\t\t\t\t\tArray.isArray(this._selectedItem)\n\t\t\t\t\t\t? this._selectedItem.findIndex(\n\t\t\t\t\t\t\t\ti => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t\t\t\t ) >= 0\n\t\t\t\t\t\t: item[this._identifierKey] ===\n\t\t\t\t\t\t this._selectedItem?.[this._identifierKey]\n\t\t\t\t}\n\t\t\t\tcheckbox={this.multi ? true : false}\n\t\t\t\tslot='items'\n\t\t\t>\n\t\t\t\t{this._getDisplay(item)}\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (!this._items.length) {\n\t\t\titems = [\n\t\t\t\t<p\n\t\t\t\t\tclass='w-full p-2 text-center text-sm text-black-teal-400'\n\t\t\t\t\tslot='items'\n\t\t\t\t>\n\t\t\t\t\t{this.emptyStateText}\n\t\t\t\t</p>,\n\t\t\t];\n\t\t}\n\n\t\tif (this.enableSelectAll && this._items.length) {\n\t\t\titems.unshift(\n\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\tslot='items'\n\t\t\t\t\tuseContainer={false}\n\t\t\t\t\tcheckbox\n\t\t\t\t\tonClick={() => this._selectAllChange()}\n\t\t\t\t\tactive={this._allSelected}\n\t\t\t\t>\n\t\t\t\t\t{this.selectAllIcon?.length ? (\n\t\t\t\t\t\t<span class='flex items-center gap-2'>\n\t\t\t\t\t\t\t<div class='flex w-6 justify-center text-lg'>\n\t\t\t\t\t\t\t\t<p-icon variant={this.selectAllIcon} />\n\t\t\t\t\t\t\t</div>{' '}\n\t\t\t\t\t\t\t{this.selectAllText}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tthis.selectAllText\n\t\t\t\t\t)}\n\t\t\t\t</p-dropdown-menu-item>\n\t\t\t);\n\t\t}\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAddItem() {\n\t\treturn (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tonClick={() => this.add.emit()}\n\t\t\t\tuseContainer={false}\n\t\t\t\tslot='items'\n\t\t\t>\n\t\t\t\t<span class='flex items-center gap-1 font-semibold text-teal-800'>\n\t\t\t\t\t{this.addItemText}\n\t\t\t\t\t<p-icon variant='plus' />\n\t\t\t\t</span>\n\t\t\t</p-dropdown-menu-item>\n\t\t);\n\t}\n\n\tprivate _getLoadingItems() {\n\t\tconst items = [0, 0, 0].map(() => (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tenableHover={false}\n\t\t\t\tslot='items'\n\t\t\t>\n\t\t\t\t<p-loader\n\t\t\t\t\tvariant='ghost'\n\t\t\t\t\tclass='h-6 w-full rounded'\n\t\t\t\t/>\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAutoCompleteItem() {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass='sticky top-0 mb-3 h-8'\n\t\t\t\tslot='items'\n\t\t\t>\n\t\t\t\t<p-field\n\t\t\t\t\tclass='block'\n\t\t\t\t\tplaceholder={this.autocompletePlaceholder}\n\t\t\t\t\tonValueChange={ev => this._onAutoComplete(ev)}\n\t\t\t\t\tonInputRefChange={ev => (this.autocompleteInputRef = ev.detail)}\n\t\t\t\t\tvalue={this.query}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _setMultiContainerMaxWidth() {\n\t\tif (!this._inputRef || !this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst calced = this._inputRef.clientWidth - 16;\n\t\tthis._multiContainerRef.style.maxWidth = `${calced >= 16 ? calced : 16}px`;\n\t}\n\n\tprivate _setCheckSelectedItemsTimeout() {\n\t\tif (this._checkSelectedItemsTimeout) {\n\t\t\tclearTimeout(this._checkSelectedItemsTimeout);\n\t\t}\n\n\t\tthis._checkSelectedItemsTimeout = setTimeout(\n\t\t\t() => this._checkSelectedItems(),\n\t\t\t50\n\t\t);\n\t}\n\n\tprivate _checkSelectedItems() {\n\t\tif (!this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst containerRect = this._multiContainerRef.getBoundingClientRect();\n\t\tconst items = this._multiContainerRef.querySelectorAll('.item');\n\n\t\tlet amountHidden = 0;\n\n\t\tfor (const child of items) {\n\t\t\tchild.classList.remove('hidden');\n\t\t\tchild.classList.add('flex');\n\n\t\t\tconst childRect = child.getBoundingClientRect();\n\t\t\tif (childRect.right > containerRect.right) {\n\t\t\t\tchild.classList.remove('flex');\n\t\t\t\tchild.classList.add('hidden');\n\t\t\t\tamountHidden++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tthis._amountHidden = amountHidden;\n\t\tconst extra = this._multiContainerRef.querySelector('.extra');\n\t\tif (!extra) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!extra.classList.contains('hidden')) {\n\t\t\textra.classList.add('hidden');\n\t\t}\n\n\t\tif (amountHidden > 0) {\n\t\t\textra.classList.remove('hidden');\n\t\t}\n\t}\n\n\tprivate _onDropdownOpen(ev) {\n\t\tif (!ev.detail || !this.autocompleteInputRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.autocompleteInputRef.focus();\n\t}\n\n\tprivate _selectAllChange() {\n\t\tthis._allSelected = !this._allSelected;\n\t\tthis.selectAllChange.emit(this._allSelected);\n\t}\n\n\tprivate _getDisplay(item, isSelection = false) {\n\t\tlet content = (\n\t\t\t<div class={textContainer({ variant: 'default' })}>\n\t\t\t\t{\n\t\t\t\t\titem[\n\t\t\t\t\t\tisSelection\n\t\t\t\t\t\t\t? this.selectionDisplayKey ?? this.displayKey\n\t\t\t\t\t\t\t: this.displayKey\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t</div>\n\t\t);\n\n\t\tif (this.avatarKey) {\n\t\t\tcontent = (\n\t\t\t\t<span class='flex items-center gap-2'>\n\t\t\t\t\t<p-avatar\n\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\tsrc={item[this.avatarKey]}\n\t\t\t\t\t\tletters={item[this.avatarLettersKey]}\n\t\t\t\t\t></p-avatar>\n\t\t\t\t\t<div class={textContainer({ variant: 'default' })}>\n\t\t\t\t\t\t{item[this.dropdownDisplayKey ?? this.displayKey]}\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\n\t\tif (this.iconKey && (!isSelection || this.showIconInSelectedItem)) {\n\t\t\tcontent = (\n\t\t\t\t<span class='flex items-center gap-2'>\n\t\t\t\t\t<p-icon variant={item[this.iconKey] as IconVariant} />\n\t\t\t\t\t<div class={textContainer({ variant: 'default' })}>\n\t\t\t\t\t\t{item[this.dropdownDisplayKey ?? this.displayKey]}\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\n\t\tif (\n\t\t\t(!isSelection || this.applyClassOnSelectedItem) &&\n\t\t\t!!item?.class?.length\n\t\t) {\n\t\t\treturn <div class={item.class}>{content}</div>;\n\t\t}\n\n\t\treturn content;\n\t}\n\n\tprivate _getParsedItems(applyPagination = true) {\n\t\tif (!this.items || this.loading) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet items =\n\t\t\ttypeof this.items === 'string' ? JSON.parse(this.items) : this.items;\n\n\t\tif (typeof items?.[0] === 'string') {\n\t\t\tthis.displayKey = 'text';\n\t\t\tthis.valueKey = 'value';\n\n\t\t\titems = items.map(str => ({\n\t\t\t\tvalue: str,\n\t\t\t\ttext: str,\n\t\t\t}));\n\t\t}\n\n\t\tif (this.query?.length && !this.asyncFilter) {\n\t\t\titems = items.filter(item => {\n\t\t\t\tif (this.queryKey) {\n\t\t\t\t\treturn this._checkvalue(this.queryKey, item);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tthis._checkvalue(this._identifierKey, item) ||\n\t\t\t\t\tthis._checkvalue(this.displayKey, item)\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\tif (!applyPagination) {\n\t\t\treturn items;\n\t\t}\n\n\t\treturn items?.slice(0, this.maxDisplayedItems);\n\t}\n}\n"],"mappings":"yJAAA,MAAMA,EAAqB,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