@paperless/core 3.19.3 → 3.19.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hydrate/index.js CHANGED
@@ -100357,6 +100357,10 @@ class Submenu {
100357
100357
  this._showItemIndicator = false;
100358
100358
  return;
100359
100359
  }
100360
+ // set open when active changes
100361
+ if (!this.open && this.active) {
100362
+ this.open = true;
100363
+ }
100360
100364
  this._setItemPosition(this._submenuItems[activeItemIndex]);
100361
100365
  };
100362
100366
  _itemMouseEnterListener = (event) => {
@@ -100398,34 +100402,34 @@ class Submenu {
100398
100402
  const maxHeight = submenuItems.length *
100399
100403
  Number.parseInt(firstItem.height.replace('px', '')) +
100400
100404
  16; // the margin of the content
100401
- return (hAsync(ThemedHost, { key: '98584c2906cf44bfc6d0a6ceeadbeac5decfc5b7' }, hAsync("div", { key: '1ca2652294e276dbee1ad2e8fdde02d1bc758077', class: 'flex w-full flex-col' }, hAsync("div", { key: '3ea18a2afbac997d8f5a4468e4cc725229db5732', class: cn(header$1({
100405
+ return (hAsync(ThemedHost, { key: '9f1be5fc3770c7527bc8be07510fa37d6c0e984c' }, hAsync("div", { key: 'b6afb284861441006879d0bda9d9eb0bf86174f3', class: 'flex w-full flex-col' }, hAsync("div", { key: '5e8e749909c8493486c352a3177b308d4cdfe05a', class: cn(header$1({
100402
100406
  active: this.active,
100403
100407
  open: this.open,
100404
- })), onClick: () => (this.open = !this.open) }, this.showIndex && (hAsync("div", { key: '45181da138600d02b6a5195cf16af0b38bb16041', class: indexContainer({
100408
+ })), onClick: () => (this.open = !this.open) }, this.showIndex && (hAsync("div", { key: '7429d46e05326a60fecf9ad0fd30ecdd03e4c148', class: indexContainer({
100405
100409
  active: this.active,
100406
100410
  open: this.open,
100407
- }) }, this.index)), hAsync("div", { key: 'f01041af66063b671c3418a85dd6bae6092ee869', class: 'flex flex-1 flex-col' }, hAsync("p", { key: '02884dad8820a7e8bb969ca6f69a9d86f65fe07a', class: cn('m-0 text-sm', {
100411
+ }) }, this.index)), hAsync("div", { key: '0940e36702f42da9e076762191d4a11b57c3312c', class: 'flex flex-1 flex-col' }, hAsync("p", { key: '64e34ec4598f4983a03a415c1dc893380413c51c', class: cn('m-0 text-sm', {
100408
100412
  'text-storm-400 dark:text-hurricane-100 dark:group-hover/submenu-header:text-white': !this.active,
100409
100413
  'text-storm-500 dark:text-white': this.active,
100410
- }) }, this.title), hAsync("p", { key: 'ed8e8933f2bdf88b593564ffbd528f30be8e0404', class: cn('m-0 text-xs', {
100414
+ }) }, this.title), hAsync("p", { key: 'd15bb2b7035cc06d2c7f4e6a8a3566a8044ade9d', class: cn('m-0 text-xs', {
100411
100415
  'text-storm-300 dark:text-hurricane-300': !this.active,
100412
100416
  'text-storm-300 dark:text-indigo-200': this.active,
100413
- }) }, this.subtitle)), hAsync("p-icon", { key: 'c4ad449abe6686983031577c6e7eca6e416c43ef', class: cn({
100417
+ }) }, this.subtitle)), hAsync("p-icon", { key: 'cba00a3d1093bb5c565a8b585e3471fe53947d10', class: cn({
100414
100418
  'text-storm-500 dark:text-white': this.active,
100415
100419
  'text-storm-300 dark:text-hurricane-300': !this.active,
100416
- }), rotate: this.open ? 180 : 0, variant: 'caret' })), hAsync("div", { key: '86f1e812ee4da1903cf30f1066e45ff841664645', class: cn('relative flex flex-col overflow-hidden transition-[max-height]'), style: {
100420
+ }), rotate: this.open ? 180 : 0, variant: 'caret' })), hAsync("div", { key: '2199b8bad93526ae33cae769b3c1643614c26b86', class: cn('relative flex flex-col overflow-hidden transition-[max-height]'), style: {
100417
100421
  maxHeight: `${this.open ? maxHeight : 0}px`,
100418
- } }, hAsync("div", { key: 'd8a9819377e081d2dc9a916901e7f6aae0d25bde', class: cn('absolute left-6 top-0 z-0 w-px', {
100422
+ } }, hAsync("div", { key: 'cd7a456eb8ba1bb949e9891146e5260607c45153', class: cn('absolute left-6 top-0 z-0 w-px', {
100419
100423
  'bg-off-white-400 dark:bg-storm-500/30': !this.active,
100420
100424
  'bg-indigo-100 dark:bg-hurricane-400': this.active,
100421
100425
  }), style: {
100422
100426
  height: `${maxHeight}px`,
100423
- } }), hAsync("div", { key: '05e580e7d2cb16b1efbfd7705b0166b54081dea4', class: cn(`absolute left-6 top-0 z-[1] h-8 w-[2px] transform transition-all`, {
100427
+ } }), hAsync("div", { key: 'fc15b0d8cc3764b378c4fc9db70a7e164a9e287a', class: cn(`absolute left-6 top-0 z-[1] h-8 w-[2px] transform transition-all`, {
100424
100428
  'bg-indigo-600': this._showItemIndicator,
100425
100429
  'bg-transparent': !this._showItemIndicator,
100426
100430
  }), style: {
100427
100431
  transform: `translateY(${this._activeItemPosition}px)`,
100428
- } }), hAsync("div", { key: 'b9b1bf668a1965732fe72eb3566eed336c356e29', class: 'z-10 my-2 flex flex-col' }, hAsync("slot", { key: '654f4a19477c696fa01735d11fdd86d5d7efd543', onSlotchange: () => this._slotChanged() }))))));
100432
+ } }), hAsync("div", { key: '027e8f7c958784db540f67331f0577bb13a5a90f', class: 'z-10 my-2 flex flex-col' }, hAsync("slot", { key: 'b3495515c0c0478a7bd4376b6cced01b89400d15', onSlotchange: () => this._slotChanged() }))))));
100429
100433
  }
100430
100434
  onWindowResize() {
100431
100435
  this._calculateHeaderOffset();
package/hydrate/index.mjs CHANGED
@@ -100355,6 +100355,10 @@ class Submenu {
100355
100355
  this._showItemIndicator = false;
100356
100356
  return;
100357
100357
  }
100358
+ // set open when active changes
100359
+ if (!this.open && this.active) {
100360
+ this.open = true;
100361
+ }
100358
100362
  this._setItemPosition(this._submenuItems[activeItemIndex]);
100359
100363
  };
100360
100364
  _itemMouseEnterListener = (event) => {
@@ -100396,34 +100400,34 @@ class Submenu {
100396
100400
  const maxHeight = submenuItems.length *
100397
100401
  Number.parseInt(firstItem.height.replace('px', '')) +
100398
100402
  16; // the margin of the content
100399
- return (hAsync(ThemedHost, { key: '98584c2906cf44bfc6d0a6ceeadbeac5decfc5b7' }, hAsync("div", { key: '1ca2652294e276dbee1ad2e8fdde02d1bc758077', class: 'flex w-full flex-col' }, hAsync("div", { key: '3ea18a2afbac997d8f5a4468e4cc725229db5732', class: cn(header$1({
100403
+ return (hAsync(ThemedHost, { key: '9f1be5fc3770c7527bc8be07510fa37d6c0e984c' }, hAsync("div", { key: 'b6afb284861441006879d0bda9d9eb0bf86174f3', class: 'flex w-full flex-col' }, hAsync("div", { key: '5e8e749909c8493486c352a3177b308d4cdfe05a', class: cn(header$1({
100400
100404
  active: this.active,
100401
100405
  open: this.open,
100402
- })), onClick: () => (this.open = !this.open) }, this.showIndex && (hAsync("div", { key: '45181da138600d02b6a5195cf16af0b38bb16041', class: indexContainer({
100406
+ })), onClick: () => (this.open = !this.open) }, this.showIndex && (hAsync("div", { key: '7429d46e05326a60fecf9ad0fd30ecdd03e4c148', class: indexContainer({
100403
100407
  active: this.active,
100404
100408
  open: this.open,
100405
- }) }, this.index)), hAsync("div", { key: 'f01041af66063b671c3418a85dd6bae6092ee869', class: 'flex flex-1 flex-col' }, hAsync("p", { key: '02884dad8820a7e8bb969ca6f69a9d86f65fe07a', class: cn('m-0 text-sm', {
100409
+ }) }, this.index)), hAsync("div", { key: '0940e36702f42da9e076762191d4a11b57c3312c', class: 'flex flex-1 flex-col' }, hAsync("p", { key: '64e34ec4598f4983a03a415c1dc893380413c51c', class: cn('m-0 text-sm', {
100406
100410
  'text-storm-400 dark:text-hurricane-100 dark:group-hover/submenu-header:text-white': !this.active,
100407
100411
  'text-storm-500 dark:text-white': this.active,
100408
- }) }, this.title), hAsync("p", { key: 'ed8e8933f2bdf88b593564ffbd528f30be8e0404', class: cn('m-0 text-xs', {
100412
+ }) }, this.title), hAsync("p", { key: 'd15bb2b7035cc06d2c7f4e6a8a3566a8044ade9d', class: cn('m-0 text-xs', {
100409
100413
  'text-storm-300 dark:text-hurricane-300': !this.active,
100410
100414
  'text-storm-300 dark:text-indigo-200': this.active,
100411
- }) }, this.subtitle)), hAsync("p-icon", { key: 'c4ad449abe6686983031577c6e7eca6e416c43ef', class: cn({
100415
+ }) }, this.subtitle)), hAsync("p-icon", { key: 'cba00a3d1093bb5c565a8b585e3471fe53947d10', class: cn({
100412
100416
  'text-storm-500 dark:text-white': this.active,
100413
100417
  'text-storm-300 dark:text-hurricane-300': !this.active,
100414
- }), rotate: this.open ? 180 : 0, variant: 'caret' })), hAsync("div", { key: '86f1e812ee4da1903cf30f1066e45ff841664645', class: cn('relative flex flex-col overflow-hidden transition-[max-height]'), style: {
100418
+ }), rotate: this.open ? 180 : 0, variant: 'caret' })), hAsync("div", { key: '2199b8bad93526ae33cae769b3c1643614c26b86', class: cn('relative flex flex-col overflow-hidden transition-[max-height]'), style: {
100415
100419
  maxHeight: `${this.open ? maxHeight : 0}px`,
100416
- } }, hAsync("div", { key: 'd8a9819377e081d2dc9a916901e7f6aae0d25bde', class: cn('absolute left-6 top-0 z-0 w-px', {
100420
+ } }, hAsync("div", { key: 'cd7a456eb8ba1bb949e9891146e5260607c45153', class: cn('absolute left-6 top-0 z-0 w-px', {
100417
100421
  'bg-off-white-400 dark:bg-storm-500/30': !this.active,
100418
100422
  'bg-indigo-100 dark:bg-hurricane-400': this.active,
100419
100423
  }), style: {
100420
100424
  height: `${maxHeight}px`,
100421
- } }), hAsync("div", { key: '05e580e7d2cb16b1efbfd7705b0166b54081dea4', class: cn(`absolute left-6 top-0 z-[1] h-8 w-[2px] transform transition-all`, {
100425
+ } }), hAsync("div", { key: 'fc15b0d8cc3764b378c4fc9db70a7e164a9e287a', class: cn(`absolute left-6 top-0 z-[1] h-8 w-[2px] transform transition-all`, {
100422
100426
  'bg-indigo-600': this._showItemIndicator,
100423
100427
  'bg-transparent': !this._showItemIndicator,
100424
100428
  }), style: {
100425
100429
  transform: `translateY(${this._activeItemPosition}px)`,
100426
- } }), hAsync("div", { key: 'b9b1bf668a1965732fe72eb3566eed336c356e29', class: 'z-10 my-2 flex flex-col' }, hAsync("slot", { key: '654f4a19477c696fa01735d11fdd86d5d7efd543', onSlotchange: () => this._slotChanged() }))))));
100430
+ } }), hAsync("div", { key: '027e8f7c958784db540f67331f0577bb13a5a90f', class: 'z-10 my-2 flex flex-col' }, hAsync("slot", { key: 'b3495515c0c0478a7bd4376b6cced01b89400d15', onSlotchange: () => this._slotChanged() }))))));
100427
100431
  }
100428
100432
  onWindowResize() {
100429
100433
  this._calculateHeaderOffset();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paperless/core",
3
- "version": "3.19.3",
3
+ "version": "3.19.4",
4
4
  "description": "Stencil Component Starter",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
@@ -1 +0,0 @@
1
- import{r as t,d as e,h as r}from"./p-yFtRjnrU.js";import{c as a}from"./p-CBWjHURv.js";import{T as o}from"./p-CSySY6aC.js";import{c as i}from"./p-xs4N_Y-0.js";import"./p-ChV9xqsO.js";import"./p-6XOzWrsN.js";const d=a(["group/submenu-header","flex items-center gap-2","py-1 pl-2 pr-4","rounded-lg","cursor-pointer","transition-colors","relative"],{variants:{open:{true:"\n bg-off-white-300\n dark:bg-storm-500/20\n ",false:""},active:{true:"\n bg-indigo-50\n dark:bg-indigo-600/30\n ",false:"\n hover:bg-indigo-50\n dark:hover:bg-indigo-600/10\n "}},compoundVariants:[]}),s=a(["m-2 size-4 rounded-full p-2","\n text-xs font-semibold text-storm-500\n dark:text-hurricane-500\n ","transition-colors","flex items-center justify-center"],{variants:{open:{true:"bg-indigo-500",false:""},active:{true:"bg-indigo-500",false:""}},compoundVariants:[{open:!1,active:!1,class:"bg-indigo-200"}]}),c=class{constructor(e){t(this,e)}title="";subtitle="";index=0;showIndex=!0;active=!1;open=!1;get _el(){return e(this)}_activeItemPosition=-1;_showItemIndicator=!1;_headerOffset=0;_submenuItems=[];_hoveringItem=void 0;_itemActiveListener=()=>{const t=this._submenuItems.findIndex((t=>!0===t.active));this.active=-1!==t,-1!==t?this._setItemPosition(this._submenuItems[t]):this._showItemIndicator=!1};_itemMouseEnterListener=t=>{this._hoveringItem&&this._hoveringItem===t.target||(this._hoveringItem=t.target,this._setItemPosition(this._hoveringItem))};_itemMouseLeaveListener=t=>{setTimeout((()=>{this._hoveringItem&&this._hoveringItem!==t.target||(this._hoveringItem=void 0,this._itemActiveListener())}),100)};componentDidLoad(){const t=[...this._el.querySelectorAll("p-submenu-item")].some((t=>!0===t.active));!this.active&&t&&(this.active=!0),this.active&&(this.open=!0)}componentDidRender(){this._calculateHeaderOffset()}disconnectedCallback(){this._removeListeners()}render(){const t=this._el.querySelectorAll("p-submenu-item"),e=getComputedStyle(t[0]),a=t.length*Number.parseInt(e.height.replace("px",""))+16;return r(o,{key:"98584c2906cf44bfc6d0a6ceeadbeac5decfc5b7"},r("div",{key:"1ca2652294e276dbee1ad2e8fdde02d1bc758077",class:"flex w-full flex-col"},r("div",{key:"3ea18a2afbac997d8f5a4468e4cc725229db5732",class:i(d({active:this.active,open:this.open})),onClick:()=>this.open=!this.open},this.showIndex&&r("div",{key:"45181da138600d02b6a5195cf16af0b38bb16041",class:s({active:this.active,open:this.open})},this.index),r("div",{key:"f01041af66063b671c3418a85dd6bae6092ee869",class:"flex flex-1 flex-col"},r("p",{key:"02884dad8820a7e8bb969ca6f69a9d86f65fe07a",class:i("m-0 text-sm",{"text-storm-400 dark:text-hurricane-100 dark:group-hover/submenu-header:text-white":!this.active,"text-storm-500 dark:text-white":this.active})},this.title),r("p",{key:"ed8e8933f2bdf88b593564ffbd528f30be8e0404",class:i("m-0 text-xs",{"text-storm-300 dark:text-hurricane-300":!this.active,"text-storm-300 dark:text-indigo-200":this.active})},this.subtitle)),r("p-icon",{key:"c4ad449abe6686983031577c6e7eca6e416c43ef",class:i({"text-storm-500 dark:text-white":this.active,"text-storm-300 dark:text-hurricane-300":!this.active}),rotate:this.open?180:0,variant:"caret"})),r("div",{key:"86f1e812ee4da1903cf30f1066e45ff841664645",class:i("relative flex flex-col overflow-hidden transition-[max-height]"),style:{maxHeight:`${this.open?a:0}px`}},r("div",{key:"d8a9819377e081d2dc9a916901e7f6aae0d25bde",class:i("absolute left-6 top-0 z-0 w-px",{"bg-off-white-400 dark:bg-storm-500/30":!this.active,"bg-indigo-100 dark:bg-hurricane-400":this.active}),style:{height:`${a}px`}}),r("div",{key:"05e580e7d2cb16b1efbfd7705b0166b54081dea4",class:i("absolute left-6 top-0 z-[1] h-8 w-[2px] transform transition-all",{"bg-indigo-600":this._showItemIndicator,"bg-transparent":!this._showItemIndicator}),style:{transform:`translateY(${this._activeItemPosition}px)`}}),r("div",{key:"b9b1bf668a1965732fe72eb3566eed336c356e29",class:"z-10 my-2 flex flex-col"},r("slot",{key:"654f4a19477c696fa01735d11fdd86d5d7efd543",onSlotchange:()=>this._slotChanged()})))))}onWindowResize(){this._calculateHeaderOffset(),this._itemActiveListener()}_calculateHeaderOffset(){const t=this._el.shadowRoot?.querySelector(String.raw`.group\/submenu-header`);t?this._headerOffset=t.getBoundingClientRect().bottom:this._activeItemPosition=-1}_setItemPosition(t){t&&(this._activeItemPosition=t.getBoundingClientRect().top-this._headerOffset,this._showItemIndicator||setTimeout((()=>this._showItemIndicator=!0),50))}_slotChanged(){this._removeListeners();const t=[...this._el.querySelectorAll("p-submenu-item")];for(const e of t)e.addEventListener("activeChange",this._itemActiveListener),e.addEventListener("mouseenter",this._itemMouseEnterListener),e.addEventListener("mouseleave",this._itemMouseLeaveListener);this._submenuItems=t}_removeListeners(){if(this._submenuItems.length>0)for(const t of this._submenuItems)t.removeEventListener("activeChange",this._itemActiveListener),t.removeEventListener("mouseenter",this._itemMouseEnterListener),t.removeEventListener("mouseleave",this._itemMouseLeaveListener)}};c.style="*{box-sizing:border-box}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-6{left:1.5rem}.top-0{top:0}.z-0{z-index:0}.z-10{z-index:10}.z-\\[1\\]{z-index:1}.m-0{margin:0}.m-2{margin:.5rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.flex{display:flex}.size-4{height:1rem;width:1rem}.h-8{height:2rem}.w-\\[2px\\]{width:2px}.w-full{width:100%}.w-px{width:1px}.flex-1{flex:1 1 0%}.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))}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.bg-hurricane-400{--tw-bg-opacity:1;background-color:rgb(70 75 84/var(--tw-bg-opacity,1))}.bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(227 236 254/var(--tw-bg-opacity,1))}.bg-indigo-200{--tw-bg-opacity:1;background-color:rgb(199 217 253/var(--tw-bg-opacity,1))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity,1))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(142 179 251/var(--tw-bg-opacity,1))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(82 138 250/var(--tw-bg-opacity,1))}.bg-off-white-300{--tw-bg-opacity:1;background-color:rgb(248 247 244/var(--tw-bg-opacity,1))}.bg-off-white-400{--tw-bg-opacity:1;background-color:rgb(245 244 241/var(--tw-bg-opacity,1))}.bg-storm-500\\/30{background-color:rgba(24,30,41,.3)}.bg-transparent{background-color:transparent}.p-2{padding:.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.pl-2{padding-left:.5rem}.pr-4{padding-right:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-semibold{font-weight:600}.text-hurricane-300{--tw-text-opacity:1;color:rgb(116 120 127/var(--tw-text-opacity,1))}.text-indigo-200{--tw-text-opacity:1;color:rgb(199 217 253/var(--tw-text-opacity,1))}.text-storm-300{--tw-text-opacity:1;color:rgb(116 120 127/var(--tw-text-opacity,1))}.text-storm-400{--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,1))}.text-storm-500{--tw-text-opacity:1;color:rgb(24 30 41/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.transition-\\[max-height\\]{transition-duration:.15s;transition-property:max-height;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:bg-indigo-50:hover{--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity,1))}.group\\/submenu-header:hover .group-hover\\/submenu-header\\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:bg-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(70 75 84/var(--tw-bg-opacity,1))}.dark\\:bg-indigo-600\\/30:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:rgba(82,138,250,.3)}.dark\\:bg-storm-500\\/20:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:rgba(24,30,41,.2)}.dark\\:bg-storm-500\\/30:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:rgba(24,30,41,.3)}.dark\\:text-hurricane-100:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(209 210 212/var(--tw-text-opacity,1))}.dark\\:text-hurricane-300:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(116 120 127/var(--tw-text-opacity,1))}.dark\\:text-hurricane-500:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(54 60 70/var(--tw-text-opacity,1))}.dark\\:text-indigo-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(199 217 253/var(--tw-text-opacity,1))}.dark\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:hover\\:bg-indigo-600\\/10:hover:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:rgba(82,138,250,.1)}.group\\/submenu-header:hover .dark\\:group-hover\\/submenu-header\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:bg-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(70 75 84/var(--tw-bg-opacity,1))}.dark\\:bg-indigo-600\\/30:where([data-theme=dark],[data-theme=dark] *){background-color:rgba(82,138,250,.3)}.dark\\:bg-storm-500\\/20:where([data-theme=dark],[data-theme=dark] *){background-color:rgba(24,30,41,.2)}.dark\\:bg-storm-500\\/30:where([data-theme=dark],[data-theme=dark] *){background-color:rgba(24,30,41,.3)}.dark\\:text-hurricane-100:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(209 210 212/var(--tw-text-opacity,1))}.dark\\:text-hurricane-300:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(116 120 127/var(--tw-text-opacity,1))}.dark\\:text-hurricane-500:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(54 60 70/var(--tw-text-opacity,1))}.dark\\:text-indigo-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(199 217 253/var(--tw-text-opacity,1))}.dark\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:hover\\:bg-indigo-600\\/10:hover:where([data-theme=dark],[data-theme=dark] *){background-color:rgba(82,138,250,.1)}.group\\/submenu-header:hover .dark\\:group-hover\\/submenu-header\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}";export{c as p_submenu}
@@ -1 +0,0 @@
1
- import{r as t,d as e,h as r}from"./p-yFtRjnrU.js";import{c as a}from"./p-CBWjHURv.js";import{T as o}from"./p-CSySY6aC.js";import{c as i}from"./p-xs4N_Y-0.js";import"./p-ChV9xqsO.js";import"./p-6XOzWrsN.js";const d=a(["group/submenu-header","flex items-center gap-2","py-1 pl-2 pr-4","rounded-lg","cursor-pointer","transition-colors","relative"],{variants:{open:{true:"\n bg-off-white-300\n dark:bg-storm-500/20\n ",false:""},active:{true:"\n bg-indigo-50\n dark:bg-indigo-600/30\n ",false:"\n hover:bg-indigo-50\n dark:hover:bg-indigo-600/10\n "}},compoundVariants:[]}),s=a(["m-2 size-4 rounded-full p-2","\n text-xs font-semibold text-storm-500\n dark:text-hurricane-500\n ","transition-colors","flex items-center justify-center"],{variants:{open:{true:"bg-indigo-500",false:""},active:{true:"bg-indigo-500",false:""}},compoundVariants:[{open:!1,active:!1,class:"bg-indigo-200"}]}),c=class{constructor(e){t(this,e)}title="";subtitle="";index=0;showIndex=!0;active=!1;open=!1;get _el(){return e(this)}_activeItemPosition=-1;_showItemIndicator=!1;_headerOffset=0;_submenuItems=[];_hoveringItem=void 0;_itemActiveListener=()=>{const t=this._submenuItems.findIndex((t=>!0===t.active));this.active=-1!==t,-1!==t?this._setItemPosition(this._submenuItems[t]):this._showItemIndicator=!1};_itemMouseEnterListener=t=>{this._hoveringItem&&this._hoveringItem===t.target||(this._hoveringItem=t.target,this._setItemPosition(this._hoveringItem))};_itemMouseLeaveListener=t=>{setTimeout((()=>{this._hoveringItem&&this._hoveringItem!==t.target||(this._hoveringItem=void 0,this._itemActiveListener())}),100)};componentDidLoad(){const t=[...this._el.querySelectorAll("p-submenu-item")].some((t=>!0===t.active));!this.active&&t&&(this.active=!0),this.active&&(this.open=!0)}componentDidRender(){this._calculateHeaderOffset()}disconnectedCallback(){this._removeListeners()}render(){const t=this._el.querySelectorAll("p-submenu-item"),e=getComputedStyle(t[0]),a=t.length*Number.parseInt(e.height.replace("px",""))+16;return r(o,{key:"98584c2906cf44bfc6d0a6ceeadbeac5decfc5b7"},r("div",{key:"1ca2652294e276dbee1ad2e8fdde02d1bc758077",class:"flex w-full flex-col"},r("div",{key:"3ea18a2afbac997d8f5a4468e4cc725229db5732",class:i(d({active:this.active,open:this.open})),onClick:()=>this.open=!this.open},this.showIndex&&r("div",{key:"45181da138600d02b6a5195cf16af0b38bb16041",class:s({active:this.active,open:this.open})},this.index),r("div",{key:"f01041af66063b671c3418a85dd6bae6092ee869",class:"flex flex-1 flex-col"},r("p",{key:"02884dad8820a7e8bb969ca6f69a9d86f65fe07a",class:i("m-0 text-sm",{"text-storm-400 dark:text-hurricane-100 dark:group-hover/submenu-header:text-white":!this.active,"text-storm-500 dark:text-white":this.active})},this.title),r("p",{key:"ed8e8933f2bdf88b593564ffbd528f30be8e0404",class:i("m-0 text-xs",{"text-storm-300 dark:text-hurricane-300":!this.active,"text-storm-300 dark:text-indigo-200":this.active})},this.subtitle)),r("p-icon",{key:"c4ad449abe6686983031577c6e7eca6e416c43ef",class:i({"text-storm-500 dark:text-white":this.active,"text-storm-300 dark:text-hurricane-300":!this.active}),rotate:this.open?180:0,variant:"caret"})),r("div",{key:"86f1e812ee4da1903cf30f1066e45ff841664645",class:i("relative flex flex-col overflow-hidden transition-[max-height]"),style:{maxHeight:`${this.open?a:0}px`}},r("div",{key:"d8a9819377e081d2dc9a916901e7f6aae0d25bde",class:i("absolute left-6 top-0 z-0 w-px",{"bg-off-white-400 dark:bg-storm-500/30":!this.active,"bg-indigo-100 dark:bg-hurricane-400":this.active}),style:{height:`${a}px`}}),r("div",{key:"05e580e7d2cb16b1efbfd7705b0166b54081dea4",class:i("absolute left-6 top-0 z-[1] h-8 w-[2px] transform transition-all",{"bg-indigo-600":this._showItemIndicator,"bg-transparent":!this._showItemIndicator}),style:{transform:`translateY(${this._activeItemPosition}px)`}}),r("div",{key:"b9b1bf668a1965732fe72eb3566eed336c356e29",class:"z-10 my-2 flex flex-col"},r("slot",{key:"654f4a19477c696fa01735d11fdd86d5d7efd543",onSlotchange:()=>this._slotChanged()})))))}onWindowResize(){this._calculateHeaderOffset(),this._itemActiveListener()}_calculateHeaderOffset(){const t=this._el.shadowRoot?.querySelector(String.raw`.group\/submenu-header`);t?this._headerOffset=t.getBoundingClientRect().bottom:this._activeItemPosition=-1}_setItemPosition(t){t&&(this._activeItemPosition=t.getBoundingClientRect().top-this._headerOffset,this._showItemIndicator||setTimeout((()=>this._showItemIndicator=!0),50))}_slotChanged(){this._removeListeners();const t=[...this._el.querySelectorAll("p-submenu-item")];for(const e of t)e.addEventListener("activeChange",this._itemActiveListener),e.addEventListener("mouseenter",this._itemMouseEnterListener),e.addEventListener("mouseleave",this._itemMouseLeaveListener);this._submenuItems=t}_removeListeners(){if(this._submenuItems.length>0)for(const t of this._submenuItems)t.removeEventListener("activeChange",this._itemActiveListener),t.removeEventListener("mouseenter",this._itemMouseEnterListener),t.removeEventListener("mouseleave",this._itemMouseLeaveListener)}};c.style="*{box-sizing:border-box}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-6{left:1.5rem}.top-0{top:0}.z-0{z-index:0}.z-10{z-index:10}.z-\\[1\\]{z-index:1}.m-0{margin:0}.m-2{margin:.5rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.flex{display:flex}.size-4{height:1rem;width:1rem}.h-8{height:2rem}.w-\\[2px\\]{width:2px}.w-full{width:100%}.w-px{width:1px}.flex-1{flex:1 1 0%}.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))}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.overflow-hidden{overflow:hidden}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.bg-hurricane-400{--tw-bg-opacity:1;background-color:rgb(70 75 84/var(--tw-bg-opacity,1))}.bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(227 236 254/var(--tw-bg-opacity,1))}.bg-indigo-200{--tw-bg-opacity:1;background-color:rgb(199 217 253/var(--tw-bg-opacity,1))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity,1))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(142 179 251/var(--tw-bg-opacity,1))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(82 138 250/var(--tw-bg-opacity,1))}.bg-off-white-300{--tw-bg-opacity:1;background-color:rgb(248 247 244/var(--tw-bg-opacity,1))}.bg-off-white-400{--tw-bg-opacity:1;background-color:rgb(245 244 241/var(--tw-bg-opacity,1))}.bg-storm-500\\/30{background-color:rgba(24,30,41,.3)}.bg-transparent{background-color:transparent}.p-2{padding:.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.pl-2{padding-left:.5rem}.pr-4{padding-right:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-semibold{font-weight:600}.text-hurricane-300{--tw-text-opacity:1;color:rgb(116 120 127/var(--tw-text-opacity,1))}.text-indigo-200{--tw-text-opacity:1;color:rgb(199 217 253/var(--tw-text-opacity,1))}.text-storm-300{--tw-text-opacity:1;color:rgb(116 120 127/var(--tw-text-opacity,1))}.text-storm-400{--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,1))}.text-storm-500{--tw-text-opacity:1;color:rgb(24 30 41/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.transition-\\[max-height\\]{transition-duration:.15s;transition-property:max-height;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:bg-indigo-50:hover{--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity,1))}.group\\/submenu-header:hover .group-hover\\/submenu-header\\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:bg-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-bg-opacity:1;background-color:rgb(70 75 84/var(--tw-bg-opacity,1))}.dark\\:bg-indigo-600\\/30:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:rgba(82,138,250,.3)}.dark\\:bg-storm-500\\/20:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:rgba(24,30,41,.2)}.dark\\:bg-storm-500\\/30:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:rgba(24,30,41,.3)}.dark\\:text-hurricane-100:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(209 210 212/var(--tw-text-opacity,1))}.dark\\:text-hurricane-300:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(116 120 127/var(--tw-text-opacity,1))}.dark\\:text-hurricane-500:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(54 60 70/var(--tw-text-opacity,1))}.dark\\:text-indigo-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(199 217 253/var(--tw-text-opacity,1))}.dark\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:hover\\:bg-indigo-600\\/10:hover:where(:host([data-theme=dark]),:host([data-theme=dark]) *){background-color:rgba(82,138,250,.1)}.group\\/submenu-header:hover .dark\\:group-hover\\/submenu-header\\:text-white:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:bg-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-bg-opacity:1;background-color:rgb(70 75 84/var(--tw-bg-opacity,1))}.dark\\:bg-indigo-600\\/30:where([data-theme=dark],[data-theme=dark] *){background-color:rgba(82,138,250,.3)}.dark\\:bg-storm-500\\/20:where([data-theme=dark],[data-theme=dark] *){background-color:rgba(24,30,41,.2)}.dark\\:bg-storm-500\\/30:where([data-theme=dark],[data-theme=dark] *){background-color:rgba(24,30,41,.3)}.dark\\:text-hurricane-100:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(209 210 212/var(--tw-text-opacity,1))}.dark\\:text-hurricane-300:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(116 120 127/var(--tw-text-opacity,1))}.dark\\:text-hurricane-500:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(54 60 70/var(--tw-text-opacity,1))}.dark\\:text-indigo-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(199 217 253/var(--tw-text-opacity,1))}.dark\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\\:hover\\:bg-indigo-600\\/10:hover:where([data-theme=dark],[data-theme=dark] *){background-color:rgba(82,138,250,.1)}.group\\/submenu-header:hover .dark\\:group-hover\\/submenu-header\\:text-white:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}";export{c as p_submenu}