@paperless/core 2.3.0 → 2.3.1

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 (47) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/build/{p-33a18d80.js → p-56f711c5.js} +1 -1
  3. package/dist/{paperless/p-fdb85aef.entry.js → build/p-925d7ffc.entry.js} +2 -2
  4. package/dist/build/p-925d7ffc.entry.js.map +1 -0
  5. package/dist/build/p-helper.p-tooltip.entry.esm.js.map +1 -1
  6. package/dist/build/paperless.esm.js +1 -1
  7. package/dist/cjs/p-helper.p-tooltip.entry.cjs.js.map +1 -1
  8. package/dist/cjs/p-helper_2.cjs.entry.js +9 -0
  9. package/dist/cjs/p-helper_2.cjs.entry.js.map +1 -1
  10. package/dist/collection/components/atoms/tooltip/tooltip.component.js +9 -0
  11. package/dist/collection/components/atoms/tooltip/tooltip.component.js.map +1 -1
  12. package/dist/components/{p-CH64wrKS.js → p-BRnY1zdf.js} +11 -2
  13. package/dist/components/p-BRnY1zdf.js.map +1 -0
  14. package/dist/components/{p-Dm9wDTbM.js → p-C01CxOX-.js} +4 -4
  15. package/dist/components/{p-Dm9wDTbM.js.map → p-C01CxOX-.js.map} +1 -1
  16. package/dist/components/{p-PqgdU5A2.js → p-CxB7Mle4.js} +3 -3
  17. package/dist/components/{p-PqgdU5A2.js.map → p-CxB7Mle4.js.map} +1 -1
  18. package/dist/components/{p-Ds64b3s1.js → p-DsIrbX0y.js} +3 -3
  19. package/dist/components/{p-Ds64b3s1.js.map → p-DsIrbX0y.js.map} +1 -1
  20. package/dist/components/{p-HJQA2u2S.js → p-aCVE8yBd.js} +5 -5
  21. package/dist/components/{p-HJQA2u2S.js.map → p-aCVE8yBd.js.map} +1 -1
  22. package/dist/components/p-attachment.js +3 -3
  23. package/dist/components/{p-Di_xEiDn.js → p-c28tJtDm.js} +6 -6
  24. package/dist/components/{p-Di_xEiDn.js.map → p-c28tJtDm.js.map} +1 -1
  25. package/dist/components/p-calendar.js +1 -1
  26. package/dist/components/p-datepicker.js +5 -5
  27. package/dist/components/p-field-container.js +1 -1
  28. package/dist/components/p-field.js +1 -1
  29. package/dist/components/p-helper.js +1 -1
  30. package/dist/components/p-select.js +4 -4
  31. package/dist/components/p-table-header.js +1 -1
  32. package/dist/components/p-table.js +5 -5
  33. package/dist/components/p-tooltip.js +1 -1
  34. package/dist/esm/p-helper.p-tooltip.entry.js.map +1 -1
  35. package/dist/esm/p-helper_2.entry.js +9 -0
  36. package/dist/esm/p-helper_2.entry.js.map +1 -1
  37. package/dist/index.html +1 -1
  38. package/dist/{build/p-fdb85aef.entry.js → paperless/p-925d7ffc.entry.js} +2 -2
  39. package/dist/paperless/p-925d7ffc.entry.js.map +1 -0
  40. package/dist/paperless/p-helper.p-tooltip.entry.esm.js.map +1 -1
  41. package/dist/paperless/paperless.esm.js +1 -1
  42. package/dist/sw.js +1 -1
  43. package/dist/sw.js.map +1 -1
  44. package/package.json +1 -1
  45. package/dist/build/p-fdb85aef.entry.js.map +0 -1
  46. package/dist/components/p-CH64wrKS.js.map +0 -1
  47. package/dist/paperless/p-fdb85aef.entry.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":["helperComponentCss","Helper","strategy","placement","render","h","Host","key","class","this","size","variant","slot","tooltipComponentCss","popover","cva","variants","hover","click","error","fixed","absolute","compoundVariants","Tooltip","content","offset","enableUserInput","show","canManuallyClose","isOpen","_hasContentSlot","_loaded","_popover","_cleanup","componentWillLoad","_el","querySelector","componentShouldUpdate","_update","disconnectedCallback","name","role","ref","el","_load","clickHandler","hasAttribute","_show","documentClickHandler","_hide","mouseEnterHandler","mouseLeaveHandler","onShowChange","onContentChange","length","autoUpdate","setAttribute","classList","remove","add","emit","removeAttribute","setTimeout","computePosition","middleware","flip","shift","then","x","y","dataset","Object","assign","style","top","left"],"sources":["src/components/atoms/helper/helper.component.css?tag=p-helper&encapsulation=shadow","src/components/atoms/helper/helper.component.tsx","src/components/atoms/tooltip/tooltip.component.css?tag=p-tooltip&encapsulation=shadow","src/components/atoms/tooltip/tooltip.component.tsx"],"sourcesContent":[":host {\n\t@apply inline-flex h-[0.875rem] w-[0.875rem];\n}\n","import { Placement, Strategy } from '@floating-ui/dom';\nimport { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-helper',\n\tstyleUrl: 'helper.component.css',\n\tshadow: true,\n})\nexport class Helper {\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * The placement of the helper popover\n\t */\n\t@Prop() placement: Placement = 'top';\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<p-tooltip\n\t\t\t\t\tclass='flex'\n\t\t\t\t\tplacement={this.placement}\n\t\t\t\t\tstrategy={this.strategy}\n\t\t\t\t>\n\t\t\t\t\t<p-icon\n\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\tclass='cursor-pointer text-storm-300 hover:text-storm-500'\n\t\t\t\t\t\tvariant='question-circle'\n\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t/>\n\n\t\t\t\t\t<div slot='content'>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t</p-tooltip>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n",":host {\n\t@apply relative h-inherit w-inherit max-w-full cursor-pointer;\n}\n","import {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\toffset,\n\tPlacement,\n\tshift,\n\tStrategy,\n} from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\n\nconst popover = cva(\n\t[\n\t\t'inline-block px-2',\n\t\t'text-xs',\n\t\t'opacity-0 drop-shadow-3 transition-opacity',\n\t\t'rounded-lg',\n\n\t\t'z-tooltip',\n\t\t'pointer-events-none',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\thover: 'bg-storm-500 text-white py-1 max-w-[14.5rem]',\n\t\t\t\tclick: 'max-w-[18rem]',\n\t\t\t\terror: 'max-w-full w-full',\n\t\t\t},\n\t\t\tstrategy: {\n\t\t\t\tfixed: 'fixed',\n\t\t\t\tabsolute: 'absolute',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tvariant: ['hover', 'click'],\n\t\t\t\tclass: 'w-max',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['click', 'error'],\n\t\t\t\tclass: 'bg-white text-storm-300 py-2',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-tooltip',\n\tstyleUrl: 'tooltip.component.css',\n\tshadow: true,\n})\nexport class Tooltip {\n\t/**\n\t * The variant of the popover\n\t */\n\t@Prop() variant: 'hover' | 'click' | 'error' = 'hover';\n\n\t/**\n\t * The content of the popover\n\t */\n\t@Prop() content: string;\n\n\t/**\n\t * The placement of the popover\n\t */\n\t@Prop() placement: Placement;\n\n\t/**\n\t * The offset of the popover\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether the tooltip can be shown by user input\n\t */\n\t@Prop() enableUserInput: boolean = true;\n\n\t/**\n\t * Wether to show the popover\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to someone can manually close the popover\n\t */\n\t@Prop() canManuallyClose: boolean = true;\n\n\t/**\n\t * Open change event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tisOpen: EventEmitter<boolean>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasContentSlot = false;\n\n\tprivate _loaded = false;\n\tprivate _popover: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentWillLoad() {\n\t\tthis._hasContentSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"content\"]'\n\t\t);\n\t}\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<slot name='trigger' />\n\t\t\t\t<div\n\t\t\t\t\tclass={popover({\n\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\tstrategy: this.strategy,\n\t\t\t\t\t})}\n\t\t\t\t\trole='popover'\n\t\t\t\t\tdata-placement={this.placement}\n\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t>\n\t\t\t\t\t<div class='flex gap-2 whitespace-normal'>\n\t\t\t\t\t\t{this.variant === 'error' && (\n\t\t\t\t\t\t\t<div class='w-[2px] bg-negative-red-500'></div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.content ? this.content : <slot name='content' />}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('click', { capture: true })\n\tprotected clickHandler() {\n\t\tif (this.variant === 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler() {\n\t\tif (this.variant === 'hover' || !this.canManuallyClose || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Listen('mouseenter')\n\t@Listen('focus')\n\tprotected mouseEnterHandler() {\n\t\tif (this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('mouseleave')\n\t@Listen('blur')\n\tprotected mouseLeaveHandler() {\n\t\tif (this.show || this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Watch('show')\n\tonShowChange(show: boolean) {\n\t\tif (show && !this._popover.hasAttribute('data-show')) {\n\t\t\treturn this._show();\n\t\t}\n\n\t\treturn this._hide();\n\t}\n\n\t@Watch('content')\n\tonContentChange(content: string) {\n\t\tif (!content || content.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.content?.length && !this._hasContentSlot) {\n\t\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\t\tthis._hide();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._popover, () => this._update());\n\n\t\t// Make the popover visible\n\t\tthis._popover.setAttribute('data-show', '');\n\n\t\tthis._popover.classList.remove('opacity-0', 'pointer-events-none');\n\t\tthis._popover.classList.add('opacity-100', 'pointer-events-auto');\n\n\t\t// Update its position\n\t\tthis.isOpen.emit(true);\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\t// Hide the popover\n\t\tthis._popover.removeAttribute('data-show');\n\n\t\tthis._popover.classList.remove('opacity-100', 'pointer-events-auto');\n\t\tthis._popover.classList.add('opacity-0', 'pointer-events-none');\n\n\t\tthis.isOpen.emit(false);\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._popover = popover;\n\n\t\tif (popover) {\n\t\t\tthis._update();\n\t\t\tthis._loaded = true;\n\n\t\t\tif (this.show) {\n\t\t\t\tsetTimeout(() => this._show(), 100);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _update() {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._popover, {\n\t\t\tplacement:\n\t\t\t\tthis.variant === 'error' && !this.placement\n\t\t\t\t\t? 'bottom-start'\n\t\t\t\t\t: this.placement ?? 'top',\n\t\t\tstrategy: this.strategy,\n\n\t\t\tmiddleware: [offset(this.offset), flip(), shift()],\n\t\t}).then(({ x, y, placement }) => {\n\t\t\tthis._popover.dataset.placement = placement;\n\t\t\tObject.assign(this._popover.style, {\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tleft: `${x}px`,\n\t\t\t});\n\t\t});\n\t}\n}\n"],"mappings":"uLAAA,MAAMA,EAAqB,6hB,MCQdC,EAAM,M,yBAIVC,SAAqB,WAKrBC,UAAuB,MAE/B,MAAAC,GACC,OACCC,EAACC,EAAI,CAAAC,IAAA,4CACJF,EAAA,aAAAE,IAAA,2CACCC,MAAM,OACNL,UAAWM,KAAKN,UAChBD,SAAUO,KAAKP,UAEfG,EAAA,UAAAE,IAAA,2CACCG,KAAK,KACLF,MAAM,qDACNG,QAAQ,kBACRC,KAAK,YAGNP,EAAK,OAAAE,IAAA,2CAAAK,KAAK,WACTP,EAAA,QAAAE,IAAA,+C,aCnCN,MAAMM,EAAsB,ixECsB5B,MAAMC,EAAUC,EACf,CACC,oBACA,UACA,6CACA,aAEA,YACA,uBAED,CACCC,SAAU,CACTL,QAAS,CACRM,MAAO,+CACPC,MAAO,gBACPC,MAAO,qBAERjB,SAAU,CACTkB,MAAO,QACPC,SAAU,aAGZC,iBAAkB,CACjB,CACCX,QAAS,CAAC,QAAS,SACnBH,MAAO,SAER,CACCG,QAAS,CAAC,QAAS,SACnBH,MAAO,mC,MAWEe,EAAO,M,wDAIXZ,QAAuC,QAKvCa,QAKArB,UAKAsB,OAAiB,EAKjBvB,SAAqB,WAKrBwB,gBAA2B,KAK3BC,KAAgB,MAKhBC,iBAA4B,KAQpCC,O,yBAOQC,gBAAkB,MAElBC,QAAU,MACVC,SACAC,SAER,iBAAAC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,CAAC,OAAO,EAAE;AACd,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AAEnB,YAAA,IAAI,IAAI,CAAC,IAAI,EAAE;gBACd,UAAU,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC;;;;IAK9B,OAAO,GAAA;AACd,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACnB;;QAGD,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE;YACxC,SAAS,EACR,IAAI,CAAC,OAAO,KAAK,OAAO,IAAI,CAAC,IAAI,CAAC;AACjC,kBAAE;AACF,kBAAE,IAAI,CAAC,SAAS,IAAI,KAAK;YAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;AAEvB,YAAA,UAAU,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC;AAClD,SAAA,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,KAAI;YAC/B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS;YAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;gBAClC,GAAG,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;gBACb,IAAI,EAAE,CAAG,EAAA,CAAC,CAAI,EAAA,CAAA;AACd,aAAA,CAAC;AACH,SAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/atoms/tooltip/tooltip.component.css?tag=p-tooltip&encapsulation=shadow","src/components/atoms/tooltip/tooltip.component.tsx"],"sourcesContent":[":host {\n\t@apply relative h-inherit w-inherit max-w-full cursor-pointer;\n}\n","import {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\toffset,\n\tPlacement,\n\tshift,\n\tStrategy,\n} from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\n\nconst popover = cva(\n\t[\n\t\t'inline-block px-2',\n\t\t'text-xs',\n\t\t'opacity-0 drop-shadow-3 transition-opacity',\n\t\t'rounded-lg',\n\n\t\t'z-tooltip',\n\t\t'pointer-events-none',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\thover: 'bg-storm-500 text-white py-1 max-w-[14.5rem]',\n\t\t\t\tclick: 'max-w-[18rem]',\n\t\t\t\terror: 'max-w-full w-full',\n\t\t\t},\n\t\t\tstrategy: {\n\t\t\t\tfixed: 'fixed',\n\t\t\t\tabsolute: 'absolute',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tvariant: ['hover', 'click'],\n\t\t\t\tclass: 'w-max',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['click', 'error'],\n\t\t\t\tclass: 'bg-white text-storm-300 py-2',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-tooltip',\n\tstyleUrl: 'tooltip.component.css',\n\tshadow: true,\n})\nexport class Tooltip {\n\t/**\n\t * The variant of the popover\n\t */\n\t@Prop() variant: 'hover' | 'click' | 'error' = 'hover';\n\n\t/**\n\t * The content of the popover\n\t */\n\t@Prop() content: string;\n\n\t/**\n\t * The placement of the popover\n\t */\n\t@Prop() placement: Placement;\n\n\t/**\n\t * The offset of the popover\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether the tooltip can be shown by user input\n\t */\n\t@Prop() enableUserInput: boolean = true;\n\n\t/**\n\t * Wether to show the popover\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to someone can manually close the popover\n\t */\n\t@Prop() canManuallyClose: boolean = true;\n\n\t/**\n\t * Open change event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tisOpen: EventEmitter<boolean>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasContentSlot = false;\n\n\tprivate _loaded = false;\n\tprivate _popover: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentWillLoad() {\n\t\tthis._hasContentSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"content\"]'\n\t\t);\n\t}\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<slot name='trigger' />\n\t\t\t\t<div\n\t\t\t\t\tclass={popover({\n\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\tstrategy: this.strategy,\n\t\t\t\t\t})}\n\t\t\t\t\trole='popover'\n\t\t\t\t\tdata-placement={this.placement}\n\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t>\n\t\t\t\t\t<div class='flex gap-2 whitespace-normal'>\n\t\t\t\t\t\t{this.variant === 'error' && (\n\t\t\t\t\t\t\t<div class='w-[2px] bg-negative-red-500'></div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.content ? this.content : <slot name='content' />}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('click', { capture: true })\n\tprotected clickHandler() {\n\t\tif (this.variant === 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler() {\n\t\tif (this.variant === 'hover' || !this.canManuallyClose || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Listen('mouseenter')\n\t@Listen('focus')\n\tprotected mouseEnterHandler() {\n\t\tif (this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('mouseleave')\n\t@Listen('blur')\n\tprotected mouseLeaveHandler() {\n\t\tif (this.show || this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Watch('show')\n\tonShowChange(show: boolean) {\n\t\tif (show && !this._popover.hasAttribute('data-show')) {\n\t\t\treturn this._show();\n\t\t}\n\n\t\treturn this._hide();\n\t}\n\n\t@Watch('content')\n\tonContentChange(content: string) {\n\t\tif (!content || content.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.content?.length && !this._hasContentSlot) {\n\t\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\t\tthis._hide();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._popover, () => this._update());\n\n\t\t// Make the popover visible\n\t\tthis._popover.setAttribute('data-show', '');\n\n\t\tthis._popover.classList.remove('opacity-0', 'pointer-events-none');\n\t\tthis._popover.classList.add('opacity-100', 'pointer-events-auto');\n\n\t\t// Update its position\n\t\tthis.isOpen.emit(true);\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\t// Hide the popover\n\t\tthis._popover.removeAttribute('data-show');\n\n\t\tthis._popover.classList.remove('opacity-100', 'pointer-events-auto');\n\t\tthis._popover.classList.add('opacity-0', 'pointer-events-none');\n\n\t\tthis.isOpen.emit(false);\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._popover = popover;\n\n\t\tif (popover) {\n\t\t\tthis._update();\n\t\t\tthis._loaded = true;\n\n\t\t\tif (this.show) {\n\t\t\t\tsetTimeout(() => this._show(), 100);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _update() {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._popover, {\n\t\t\tplacement:\n\t\t\t\tthis.variant === 'error' && !this.placement\n\t\t\t\t\t? 'bottom-start'\n\t\t\t\t\t: this.placement ?? 'top',\n\t\t\tstrategy: this.strategy,\n\n\t\t\tmiddleware: [offset(this.offset), flip(), shift()],\n\t\t}).then(({ x, y, placement }) => {\n\t\t\tthis._popover.dataset.placement = placement;\n\t\t\tObject.assign(this._popover.style, {\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tleft: `${x}px`,\n\t\t\t});\n\t\t});\n\t}\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"version":3,"names":["helperComponentCss","Helper","strategy","placement","render","h","Host","key","class","this","size","variant","slot","tooltipComponentCss","popover","cva","variants","hover","click","error","fixed","absolute","compoundVariants","Tooltip","content","offset","enableUserInput","show","canManuallyClose","isOpen","_hasContentSlot","_loaded","_popover","_cleanup","componentWillLoad","_el","querySelector","componentShouldUpdate","_update","disconnectedCallback","name","role","ref","el","_load","clickHandler","hasAttribute","_show","documentClickHandler","_hide","mouseEnterHandler","mouseLeaveHandler","onShowChange","onContentChange","length","autoUpdate","setAttribute","classList","remove","add","emit","removeAttribute","setTimeout","computePosition","middleware","flip","shift","then","x","y","dataset","Object","assign","style","top","left"],"sources":["src/components/atoms/helper/helper.component.css?tag=p-helper&encapsulation=shadow","src/components/atoms/helper/helper.component.tsx","src/components/atoms/tooltip/tooltip.component.css?tag=p-tooltip&encapsulation=shadow","src/components/atoms/tooltip/tooltip.component.tsx"],"sourcesContent":[":host {\n\t@apply inline-flex h-[0.875rem] w-[0.875rem];\n}\n","import { Placement, Strategy } from '@floating-ui/dom';\nimport { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-helper',\n\tstyleUrl: 'helper.component.css',\n\tshadow: true,\n})\nexport class Helper {\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * The placement of the helper popover\n\t */\n\t@Prop() placement: Placement = 'top';\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<p-tooltip\n\t\t\t\t\tclass='flex'\n\t\t\t\t\tplacement={this.placement}\n\t\t\t\t\tstrategy={this.strategy}\n\t\t\t\t>\n\t\t\t\t\t<p-icon\n\t\t\t\t\t\tsize='sm'\n\t\t\t\t\t\tclass='cursor-pointer text-storm-300 hover:text-storm-500'\n\t\t\t\t\t\tvariant='question-circle'\n\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t/>\n\n\t\t\t\t\t<div slot='content'>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\t\t\t\t</p-tooltip>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n",":host {\n\t@apply relative h-inherit w-inherit max-w-full cursor-pointer;\n}\n","import {\n\tautoUpdate,\n\tcomputePosition,\n\tflip,\n\toffset,\n\tPlacement,\n\tshift,\n\tStrategy,\n} from '@floating-ui/dom';\nimport {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tWatch,\n} from '@stencil/core';\nimport { cva } from 'class-variance-authority';\n\nconst popover = cva(\n\t[\n\t\t'inline-block px-2',\n\t\t'text-xs',\n\t\t'opacity-0 drop-shadow-3 transition-opacity',\n\t\t'rounded-lg',\n\n\t\t'z-tooltip',\n\t\t'pointer-events-none',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\thover: 'bg-storm-500 text-white py-1 max-w-[14.5rem]',\n\t\t\t\tclick: 'max-w-[18rem]',\n\t\t\t\terror: 'max-w-full w-full',\n\t\t\t},\n\t\t\tstrategy: {\n\t\t\t\tfixed: 'fixed',\n\t\t\t\tabsolute: 'absolute',\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tvariant: ['hover', 'click'],\n\t\t\t\tclass: 'w-max',\n\t\t\t},\n\t\t\t{\n\t\t\t\tvariant: ['click', 'error'],\n\t\t\t\tclass: 'bg-white text-storm-300 py-2',\n\t\t\t},\n\t\t],\n\t}\n);\n\n@Component({\n\ttag: 'p-tooltip',\n\tstyleUrl: 'tooltip.component.css',\n\tshadow: true,\n})\nexport class Tooltip {\n\t/**\n\t * The variant of the popover\n\t */\n\t@Prop() variant: 'hover' | 'click' | 'error' = 'hover';\n\n\t/**\n\t * The content of the popover\n\t */\n\t@Prop() content: string;\n\n\t/**\n\t * The placement of the popover\n\t */\n\t@Prop() placement: Placement;\n\n\t/**\n\t * The offset of the popover\n\t */\n\t@Prop() offset: number = 8;\n\n\t/**\n\t * The strategy of the popover placement\n\t */\n\t@Prop() strategy: Strategy = 'absolute';\n\n\t/**\n\t * Wether the tooltip can be shown by user input\n\t */\n\t@Prop() enableUserInput: boolean = true;\n\n\t/**\n\t * Wether to show the popover\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to someone can manually close the popover\n\t */\n\t@Prop() canManuallyClose: boolean = true;\n\n\t/**\n\t * Open change event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tisOpen: EventEmitter<boolean>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasContentSlot = false;\n\n\tprivate _loaded = false;\n\tprivate _popover: HTMLElement;\n\tprivate _cleanup: () => void;\n\n\tcomponentWillLoad() {\n\t\tthis._hasContentSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"content\"]'\n\t\t);\n\t}\n\n\tcomponentShouldUpdate() {\n\t\tthis._update();\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<slot name='trigger' />\n\t\t\t\t<div\n\t\t\t\t\tclass={popover({\n\t\t\t\t\t\tvariant: this.variant,\n\t\t\t\t\t\tstrategy: this.strategy,\n\t\t\t\t\t})}\n\t\t\t\t\trole='popover'\n\t\t\t\t\tdata-placement={this.placement}\n\t\t\t\t\tref={el => this._load(el)}\n\t\t\t\t>\n\t\t\t\t\t<div class='flex gap-2 whitespace-normal'>\n\t\t\t\t\t\t{this.variant === 'error' && (\n\t\t\t\t\t\t\t<div class='w-[2px] bg-negative-red-500'></div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{this.content ? this.content : <slot name='content' />}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('click', { capture: true })\n\tprotected clickHandler() {\n\t\tif (this.variant === 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler() {\n\t\tif (this.variant === 'hover' || !this.canManuallyClose || this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._popover.hasAttribute('data-show')) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Listen('mouseenter')\n\t@Listen('focus')\n\tprotected mouseEnterHandler() {\n\t\tif (this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._show();\n\t}\n\n\t@Listen('mouseleave')\n\t@Listen('blur')\n\tprotected mouseLeaveHandler() {\n\t\tif (this.show || this.variant !== 'hover' || !this.enableUserInput) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\t@Watch('show')\n\tonShowChange(show: boolean) {\n\t\tif (show && !this._popover.hasAttribute('data-show')) {\n\t\t\treturn this._show();\n\t\t}\n\n\t\treturn this._hide();\n\t}\n\n\t@Watch('content')\n\tonContentChange(content: string) {\n\t\tif (!content || content.length > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._hide();\n\t}\n\n\tprivate _show() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this.content?.length && !this._hasContentSlot) {\n\t\t\tif (this._popover.hasAttribute('data-show')) {\n\t\t\t\tthis._hide();\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis._cleanup = autoUpdate(this._el, this._popover, () => this._update());\n\n\t\t// Make the popover visible\n\t\tthis._popover.setAttribute('data-show', '');\n\n\t\tthis._popover.classList.remove('opacity-0', 'pointer-events-none');\n\t\tthis._popover.classList.add('opacity-100', 'pointer-events-auto');\n\n\t\t// Update its position\n\t\tthis.isOpen.emit(true);\n\t}\n\n\tprivate _hide() {\n\t\tif (!this._loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._cleanup) {\n\t\t\tthis._cleanup();\n\t\t\tthis._cleanup = null;\n\t\t}\n\n\t\t// Hide the popover\n\t\tthis._popover.removeAttribute('data-show');\n\n\t\tthis._popover.classList.remove('opacity-100', 'pointer-events-auto');\n\t\tthis._popover.classList.add('opacity-0', 'pointer-events-none');\n\n\t\tthis.isOpen.emit(false);\n\t}\n\n\tprivate _load(popover: HTMLElement) {\n\t\tthis._popover = popover;\n\n\t\tif (popover) {\n\t\t\tthis._update();\n\t\t\tthis._loaded = true;\n\n\t\t\tif (this.show) {\n\t\t\t\tsetTimeout(() => this._show(), 100);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _update() {\n\t\tif (!this._popover) {\n\t\t\treturn;\n\t\t}\n\n\t\tcomputePosition(this._el, this._popover, {\n\t\t\tplacement:\n\t\t\t\tthis.variant === 'error' && !this.placement\n\t\t\t\t\t? 'bottom-start'\n\t\t\t\t\t: this.placement ?? 'top',\n\t\t\tstrategy: this.strategy,\n\n\t\t\tmiddleware: [offset(this.offset), flip(), shift()],\n\t\t}).then(({ x, y, placement }) => {\n\t\t\tthis._popover.dataset.placement = placement;\n\t\t\tObject.assign(this._popover.style, {\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tleft: `${x}px`,\n\t\t\t});\n\t\t});\n\t}\n}\n"],"mappings":"uLAAA,MAAMA,EAAqB,6hB,MCQdC,EAAM,M,yBAIVC,SAAqB,WAKrBC,UAAuB,MAE/B,MAAAC,GACC,OACCC,EAACC,EAAI,CAAAC,IAAA,4CACJF,EAAA,aAAAE,IAAA,2CACCC,MAAM,OACNL,UAAWM,KAAKN,UAChBD,SAAUO,KAAKP,UAEfG,EAAA,UAAAE,IAAA,2CACCG,KAAK,KACLF,MAAM,qDACNG,QAAQ,kBACRC,KAAK,YAGNP,EAAK,OAAAE,IAAA,2CAAAK,KAAK,WACTP,EAAA,QAAAE,IAAA,+C,aCnCN,MAAMM,EAAsB,ixECsB5B,MAAMC,EAAUC,EACf,CACC,oBACA,UACA,6CACA,aAEA,YACA,uBAED,CACCC,SAAU,CACTL,QAAS,CACRM,MAAO,+CACPC,MAAO,gBACPC,MAAO,qBAERjB,SAAU,CACTkB,MAAO,QACPC,SAAU,aAGZC,iBAAkB,CACjB,CACCX,QAAS,CAAC,QAAS,SACnBH,MAAO,SAER,CACCG,QAAS,CAAC,QAAS,SACnBH,MAAO,mC,MAWEe,EAAO,M,wDAIXZ,QAAuC,QAKvCa,QAKArB,UAKAsB,OAAiB,EAKjBvB,SAAqB,WAKrBwB,gBAA2B,KAK3BC,KAAgB,MAKhBC,iBAA4B,KAQpCC,O,yBAOQC,gBAAkB,MAElBC,QAAU,MACVC,SACAC,SAER,iBAAAC,GACCzB,KAAKqB,kBAAoBrB,KA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