@paperless/core 3.19.2 → 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.
Files changed (37) hide show
  1. package/dist/build/p-963e456e.entry.js +1 -0
  2. package/dist/build/p-a001874d.entry.js +1 -0
  3. package/dist/build/p-d81ce8c6.js +1 -0
  4. package/dist/build/paperless.esm.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/p-submenu-item.cjs.entry.js +22 -16
  7. package/dist/cjs/p-submenu.cjs.entry.js +96 -9
  8. package/dist/cjs/paperless.cjs.js +1 -1
  9. package/dist/collection/components/molecules/submenu/item/submenu-item.component.css +1 -1
  10. package/dist/collection/components/molecules/submenu/item/submenu-item.component.js +37 -14
  11. package/dist/collection/components/molecules/submenu/menu/submenu.component.css +1 -1
  12. package/dist/collection/components/molecules/submenu/menu/submenu.component.js +110 -8
  13. package/dist/collection/components/molecules/submenu/menu/submenu.stories.js +8 -2
  14. package/dist/components/p-submenu-item.js +1 -1
  15. package/dist/components/p-submenu.js +1 -1
  16. package/dist/esm/loader.js +1 -1
  17. package/dist/esm/p-submenu-item.entry.js +23 -17
  18. package/dist/esm/p-submenu.entry.js +96 -9
  19. package/dist/esm/paperless.js +1 -1
  20. package/dist/index.html +1 -1
  21. package/dist/paperless/p-963e456e.entry.js +1 -0
  22. package/dist/paperless/p-a001874d.entry.js +1 -0
  23. package/dist/paperless/paperless.esm.js +1 -1
  24. package/dist/sw.js +1 -1
  25. package/dist/sw.js.map +1 -1
  26. package/dist/types/components/molecules/submenu/item/submenu-item.component.d.ts +7 -0
  27. package/dist/types/components/molecules/submenu/menu/submenu.component.d.ts +15 -0
  28. package/dist/types/components/molecules/submenu/menu/submenu.stories.d.ts +8 -1
  29. package/dist/types/components.d.ts +19 -0
  30. package/hydrate/index.js +131 -35
  31. package/hydrate/index.mjs +131 -35
  32. package/package.json +1 -1
  33. package/dist/build/p-5b0fe9d2.entry.js +0 -1
  34. package/dist/build/p-81e96c69.entry.js +0 -1
  35. package/dist/build/p-b344aaa1.js +0 -1
  36. package/dist/paperless/p-5b0fe9d2.entry.js +0 -1
  37. package/dist/paperless/p-81e96c69.entry.js +0 -1
@@ -1,3 +1,4 @@
1
+ import { EventEmitter } from '../../../../stencil-public-runtime';
1
2
  import { IconVariant } from '../../../../types/icon';
2
3
  export declare class SubmenuItem {
3
4
  /**
@@ -8,5 +9,11 @@ export declare class SubmenuItem {
8
9
  * Icon to show on the label
9
10
  */
10
11
  icon: IconVariant;
12
+ /**
13
+ * Event when the active state changes
14
+ */
15
+ activeChange: EventEmitter<boolean>;
16
+ private _lastActiveState;
17
+ componentDidRender(): void;
11
18
  render(): any;
12
19
  }
@@ -27,6 +27,21 @@ export declare class Submenu {
27
27
  * The host element
28
28
  */
29
29
  private _el;
30
+ private _activeItemPosition;
31
+ private _showItemIndicator;
32
+ private _headerOffset;
33
+ private _submenuItems;
34
+ private _hoveringItem;
35
+ private _itemActiveListener;
36
+ private _itemMouseEnterListener;
37
+ private _itemMouseLeaveListener;
30
38
  componentDidLoad(): void;
39
+ componentDidRender(): void;
40
+ disconnectedCallback(): void;
31
41
  render(): any;
42
+ onWindowResize(): void;
43
+ private _calculateHeaderOffset;
44
+ private _setItemPosition;
45
+ private _slotChanged;
46
+ private _removeListeners;
32
47
  }
@@ -5,6 +5,12 @@ declare const meta: {
5
5
  title: string;
6
6
  subtitle: string;
7
7
  index: number;
8
+ activeItem: boolean;
9
+ };
10
+ argTypes: {
11
+ activeItem: {
12
+ type: string;
13
+ };
8
14
  };
9
15
  parameters: {
10
16
  docs: {
@@ -17,8 +23,9 @@ declare const meta: {
17
23
  };
18
24
  export default meta;
19
25
  export declare const Default: {
20
- render: ({ active, open, title, subtitle, index, showIndex }: {
26
+ render: ({ active, activeItem, open, title, subtitle, index, showIndex }: {
21
27
  active: any;
28
+ activeItem: any;
22
29
  open: any;
23
30
  title: any;
24
31
  subtitle: any;
@@ -2796,6 +2796,10 @@ export interface PSelectCustomEvent<T> extends CustomEvent<T> {
2796
2796
  detail: T;
2797
2797
  target: HTMLPSelectElement;
2798
2798
  }
2799
+ export interface PSubmenuItemCustomEvent<T> extends CustomEvent<T> {
2800
+ detail: T;
2801
+ target: HTMLPSubmenuItemElement;
2802
+ }
2799
2803
  export interface PTableCustomEvent<T> extends CustomEvent<T> {
2800
2804
  detail: T;
2801
2805
  target: HTMLPTableElement;
@@ -3528,7 +3532,18 @@ declare global {
3528
3532
  prototype: HTMLPSubmenuElement;
3529
3533
  new (): HTMLPSubmenuElement;
3530
3534
  };
3535
+ interface HTMLPSubmenuItemElementEventMap {
3536
+ "activeChange": boolean;
3537
+ }
3531
3538
  interface HTMLPSubmenuItemElement extends Components.PSubmenuItem, HTMLStencilElement {
3539
+ addEventListener<K extends keyof HTMLPSubmenuItemElementEventMap>(type: K, listener: (this: HTMLPSubmenuItemElement, ev: PSubmenuItemCustomEvent<HTMLPSubmenuItemElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
3540
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
3541
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
3542
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
3543
+ removeEventListener<K extends keyof HTMLPSubmenuItemElementEventMap>(type: K, listener: (this: HTMLPSubmenuItemElement, ev: PSubmenuItemCustomEvent<HTMLPSubmenuItemElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
3544
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
3545
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
3546
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
3532
3547
  }
3533
3548
  var HTMLPSubmenuItemElement: {
3534
3549
  prototype: HTMLPSubmenuItemElement;
@@ -5958,6 +5973,10 @@ declare namespace LocalJSX {
5958
5973
  * @default 'placeholder'
5959
5974
  */
5960
5975
  "icon"?: IconVariant1;
5976
+ /**
5977
+ * Event when the active state changes
5978
+ */
5979
+ "onActiveChange"?: (event: PSubmenuItemCustomEvent<boolean>) => void;
5961
5980
  }
5962
5981
  interface PTabContainer {
5963
5982
  }
package/hydrate/index.js CHANGED
@@ -88670,7 +88670,7 @@ const header$5 = cva(`relative z-[1] inline-flex w-full flex-col justify-start r
88670
88670
  },
88671
88671
  },
88672
88672
  });
88673
- const content$7 = cva('flex items-center gap-2', {
88673
+ const content$6 = cva('flex items-center gap-2', {
88674
88674
  variants: {
88675
88675
  variant: {
88676
88676
  default: 'py-3',
@@ -88713,7 +88713,7 @@ class CardHeader {
88713
88713
  render() {
88714
88714
  return (hAsync(ThemedHost, { key: 'b7eb827631c54142f2a4e3fe2b81271c8144b16a' }, hAsync("div", { key: 'fcb33fb73eb61e36d8c4990b5b27e217221b96a4', class: header$5({
88715
88715
  variant: this.variant,
88716
- }) }, hAsync("div", { key: '1ae832e07095882bb8e46398c30609e12fa4d6eb', class: content$7({
88716
+ }) }, hAsync("div", { key: '1ae832e07095882bb8e46398c30609e12fa4d6eb', class: content$6({
88717
88717
  variant: this.variant,
88718
88718
  }) }, this.icon ? (hAsync("p-icon", { class: '\n text-storm-300\n dark:text-hurricane-200\n ', flip: this.iconFlip, rotate: this.iconRotate, variant: this.icon })) : (hAsync("slot", { name: 'prefix' })), hAsync("div", { key: '2c9394715612b7415aeb065d9575caf755044e5f', class: title$2() }, hAsync("span", { key: '9d8e7178338dd0e4ed218c5a16d5c77486c7f240', class: 'max-w-full overflow-hidden text-ellipsis' }, this.header?.length ? this.header : hAsync("slot", null)), hAsync("slot", { key: '1483bded5220bda03e8b80228135539a8b099033', name: 'content-suffix' })), hAsync("div", { key: '62055fed1277f466d6e70578c12ce51cb9a73272', class: '\n ml-auto flex items-center justify-end gap-4\n empty:hidden\n ' }, hAsync("slot", { key: '73b2c1a055167b6050ec18f2a8b997bea8f39f8e', name: 'suffix' }))), this.variant === 'default' ? (asBoolean(this.divider) && (hAsync("p-divider", { class: '\n text-off-white-700\n dark:text-white/10\n ' }))) : (hAsync("div", { class: '\n pointer-events-none absolute left-0 top-0 z-[-1] h-full w-full\n overflow-hidden rounded-t-2xl\n ' }, hAsync("p-smile", { class: 'dark:text-hurricane-400', variant: 'card' }))))));
88719
88719
  }
@@ -92573,7 +92573,7 @@ class Datepicker {
92573
92573
 
92574
92574
  const dividerComponentCss = () => `*{box-sizing:border-box}p-divider{--tw-content:""}.static{position:static}.flex{display:flex}.h-full{height:100%}.w-full{width:100%}.flex-col{flex-direction:column}.items-center{align-items:center}.px-2{padding-left:.5rem;padding-right:.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-medium{font-weight:500}.text-hurricane-400{--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,1))}.text-off-white-700{--tw-text-opacity:1;color:rgb(222 219 213/var(--tw-text-opacity,1))}.text-storm-400{--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,1))}.before\\:hidden:before{content:var(--tw-content);display:none}.before\\:h-px:before{content:var(--tw-content);height:1px}.before\\:w-px:before{content:var(--tw-content);width:1px}.before\\:flex-1:before{content:var(--tw-content);flex:1 1 0%}.before\\:bg-current:before{background-color:currentColor;content:var(--tw-content)}.before\\:content-\\[\\"\\"\\]:before{--tw-content:"";content:var(--tw-content)}.after\\:hidden:after{content:var(--tw-content);display:none}.after\\:h-px:after{content:var(--tw-content);height:1px}.after\\:w-px:after{content:var(--tw-content);width:1px}.after\\:flex-1:after{content:var(--tw-content);flex:1 1 0%}.after\\:bg-current:after{background-color:currentColor;content:var(--tw-content)}.after\\:content-\\[\\"\\"\\]:after{--tw-content:"";content:var(--tw-content)}.empty\\:px-0:empty{padding-left:0;padding-right:0}.dark\\:text-hurricane-200:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.dark\\:text-hurricane-400:where(:host([data-theme=dark]),:host([data-theme=dark]) *){--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,1))}.dark\\:text-hurricane-200:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(163 165 169/var(--tw-text-opacity,1))}.dark\\:text-hurricane-400:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,1))}`;
92575
92575
 
92576
- const content$6 = cva([
92576
+ const content$5 = cva([
92577
92577
  'flex items-center',
92578
92578
  `
92579
92579
  before:content-[""]
@@ -92628,7 +92628,7 @@ class Divider {
92628
92628
  get _el() { return getElement(this); }
92629
92629
  render() {
92630
92630
  const hasContent = this._el.innerHTML?.length > 0;
92631
- return (hAsync(ThemedHost, { key: 'ff409606cbaf88fec989b154c9c16eb07b60e185' }, hAsync("div", { key: 'bbf08c6ede2f45885372760c28026fa170dd2cd7', class: cn(content$6({
92631
+ return (hAsync(ThemedHost, { key: 'ff409606cbaf88fec989b154c9c16eb07b60e185' }, hAsync("div", { key: 'bbf08c6ede2f45885372760c28026fa170dd2cd7', class: cn(content$5({
92632
92632
  variant: this.variant,
92633
92633
  alignContent: this.alignContent,
92634
92634
  }), {
@@ -92852,7 +92852,7 @@ const header$4 = cva([
92852
92852
  `,
92853
92853
  'inline-flex',
92854
92854
  ]);
92855
- const content$5 = cva(['flex justify-between', 'min-h-12 w-full p-4 pb-0']);
92855
+ const content$4 = cva(['flex justify-between', 'min-h-12 w-full p-4 pb-0']);
92856
92856
  const title$1 = cva([
92857
92857
  'flex-1 text-center',
92858
92858
  `
@@ -92874,7 +92874,7 @@ class DrawerHeader {
92874
92874
  */
92875
92875
  close;
92876
92876
  render() {
92877
- return (hAsync(ThemedHost, { key: 'f0cc21f420fc9ede8f37b703e2bdc05b0494fdfb' }, hAsync("div", { key: 'e90c5f4e51592b3dd5aabddc4cdf394a44afc4d6', class: header$4() }, hAsync("div", { key: '7c34db9d5c88f715dc67663c4bd59292f4d5f465', class: content$5() }, this.showClose && (hAsync("p-button", { key: '65d62aac568049c275aaf0da50927aa162375291', icon: 'negative', iconOnly: true, variant: 'secondary', onClick: ev => this.close.emit(ev) })), hAsync("div", { key: '7e1809baea3e11b781292e5948dcd88de22adcbf', class: title$1() }, hAsync("slot", { key: 'a197919fc325a031824cc187d9f01c02047c3cce' })), this.showClose && hAsync("div", { key: 'a89a2a5c054a83c7998f8e3537294bb0d9a3654a', class: 'size-8' })), hAsync("p-smile", { key: 'b6247f9b0f7dd88fe13b507507a5802bef0b518f', class: 'dark:text-hurricane-400' }))));
92877
+ return (hAsync(ThemedHost, { key: 'f0cc21f420fc9ede8f37b703e2bdc05b0494fdfb' }, hAsync("div", { key: 'e90c5f4e51592b3dd5aabddc4cdf394a44afc4d6', class: header$4() }, hAsync("div", { key: '7c34db9d5c88f715dc67663c4bd59292f4d5f465', class: content$4() }, this.showClose && (hAsync("p-button", { key: '65d62aac568049c275aaf0da50927aa162375291', icon: 'negative', iconOnly: true, variant: 'secondary', onClick: ev => this.close.emit(ev) })), hAsync("div", { key: '7e1809baea3e11b781292e5948dcd88de22adcbf', class: title$1() }, hAsync("slot", { key: 'a197919fc325a031824cc187d9f01c02047c3cce' })), this.showClose && hAsync("div", { key: 'a89a2a5c054a83c7998f8e3537294bb0d9a3654a', class: 'size-8' })), hAsync("p-smile", { key: 'b6247f9b0f7dd88fe13b507507a5802bef0b518f', class: 'dark:text-hurricane-400' }))));
92878
92878
  }
92879
92879
  static get style() { return drawerHeaderComponentCss(); }
92880
92880
  static get cmpMeta() { return {
@@ -97662,7 +97662,7 @@ const header$2 = cva([
97662
97662
  `,
97663
97663
  'inline-flex aspect-[7/1] max-h-28',
97664
97664
  ]);
97665
- const content$4 = cva(['flex justify-end', 'h-12 w-full p-4 pb-0']);
97665
+ const content$3 = cva(['flex justify-end', 'h-12 w-full p-4 pb-0']);
97666
97666
  const title = cva([
97667
97667
  'flex-1 text-center',
97668
97668
  'w-[calc(100%-7rem)]',
@@ -97686,7 +97686,7 @@ class ModalHeader {
97686
97686
  */
97687
97687
  close;
97688
97688
  render() {
97689
- return (hAsync(ThemedHost, { key: '6ff888c25d7455ffd6baf7e1dd046d8446555739' }, hAsync("div", { key: '9b9fa9ee81f4174df2f880965afa9cc72b63e800', class: header$2() }, hAsync("div", { key: 'b58b6b353afa85c5e45f71abf9c4d59b5fa42eeb', class: content$4() }, hAsync("div", { key: '576edc988821e2ae50b8a11c8fc4b81fea137cb8', class: title() }, hAsync("slot", { key: 'b9906b5af7dc8542f3d046d8ca9dccc0f8310e9d' })), this.showClose && (hAsync("p-button", { key: 'c5da895fc9b1e6ef042a5f9d829d6e584ff23ab8', icon: 'negative', iconOnly: true, variant: 'secondary', onClick: ev => this.close.emit(ev) }))), hAsync("p-smile", { key: 'e0390b852e9ae3633185cdb5441d9172a07f7986', class: 'dark:text-hurricane-400' }))));
97689
+ return (hAsync(ThemedHost, { key: '6ff888c25d7455ffd6baf7e1dd046d8446555739' }, hAsync("div", { key: '9b9fa9ee81f4174df2f880965afa9cc72b63e800', class: header$2() }, hAsync("div", { key: 'b58b6b353afa85c5e45f71abf9c4d59b5fa42eeb', class: content$3() }, hAsync("div", { key: '576edc988821e2ae50b8a11c8fc4b81fea137cb8', class: title() }, hAsync("slot", { key: 'b9906b5af7dc8542f3d046d8ca9dccc0f8310e9d' })), this.showClose && (hAsync("p-button", { key: 'c5da895fc9b1e6ef042a5f9d829d6e584ff23ab8', icon: 'negative', iconOnly: true, variant: 'secondary', onClick: ev => this.close.emit(ev) }))), hAsync("p-smile", { key: 'e0390b852e9ae3633185cdb5441d9172a07f7986', class: 'dark:text-hurricane-400' }))));
97690
97690
  }
97691
97691
  static get style() { return modalHeaderComponentCss(); }
97692
97692
  static get cmpMeta() { return {
@@ -100115,7 +100115,7 @@ const circle$1 = cva([
100115
100115
  },
100116
100116
  ],
100117
100117
  });
100118
- const content$3 = cva('mt-[1px] flex-1 text-sm font-medium', {
100118
+ const content$2 = cva('mt-[1px] flex-1 text-sm font-medium', {
100119
100119
  variants: {
100120
100120
  finished: {
100121
100121
  true: null,
@@ -100202,7 +100202,7 @@ class StepperItem {
100202
100202
  direction: this.direction,
100203
100203
  active: asBoolean(this.active),
100204
100204
  finished: asBoolean(this.finished),
100205
- }) }, this.number), hAsync("div", { key: 'faafa708b0f4548661dfeb114fa78530377d896f', class: content$3({
100205
+ }) }, this.number), hAsync("div", { key: 'faafa708b0f4548661dfeb114fa78530377d896f', class: content$2({
100206
100206
  active: asBoolean(this.active),
100207
100207
  finished: asBoolean(this.finished),
100208
100208
  direction: this.direction,
@@ -100257,7 +100257,7 @@ class StepperLine {
100257
100257
  }; }
100258
100258
  }
100259
100259
 
100260
- const submenuComponentCss = () => `*{box-sizing:border-box}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-\\[calc\\(1\\.5rem\\)\\]{left:1.5rem}.top-0{top:0}.z-0{z-index:0}.z-10{z-index:10}.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}.w-full{width:100%}.w-px{width:1px}.flex-1{flex:1 1 0%}.cursor-pointer{cursor:pointer}.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-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)}.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-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))}`;
100260
+ const submenuComponentCss = () => `*{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))}`;
100261
100261
 
100262
100262
  const header$1 = cva([
100263
100263
  'group/submenu-header',
@@ -100266,6 +100266,7 @@ const header$1 = cva([
100266
100266
  'rounded-lg',
100267
100267
  'cursor-pointer',
100268
100268
  'transition-colors',
100269
+ 'relative',
100269
100270
  ], {
100270
100271
  variants: {
100271
100272
  open: {
@@ -100344,6 +100345,40 @@ class Submenu {
100344
100345
  */
100345
100346
  open = false;
100346
100347
  get _el() { return getElement(this); }
100348
+ _activeItemPosition = -1;
100349
+ _showItemIndicator = false;
100350
+ _headerOffset = 0;
100351
+ _submenuItems = [];
100352
+ _hoveringItem = undefined;
100353
+ _itemActiveListener = () => {
100354
+ const activeItemIndex = this._submenuItems.findIndex(i => i.active === true);
100355
+ this.active = activeItemIndex !== -1;
100356
+ if (activeItemIndex === -1) {
100357
+ this._showItemIndicator = false;
100358
+ return;
100359
+ }
100360
+ // set open when active changes
100361
+ if (!this.open && this.active) {
100362
+ this.open = true;
100363
+ }
100364
+ this._setItemPosition(this._submenuItems[activeItemIndex]);
100365
+ };
100366
+ _itemMouseEnterListener = (event) => {
100367
+ if (this._hoveringItem && this._hoveringItem === event.target) {
100368
+ return;
100369
+ }
100370
+ this._hoveringItem = event.target;
100371
+ this._setItemPosition(this._hoveringItem);
100372
+ };
100373
+ _itemMouseLeaveListener = (event) => {
100374
+ setTimeout(() => {
100375
+ if (this._hoveringItem && this._hoveringItem !== event.target) {
100376
+ return;
100377
+ }
100378
+ this._hoveringItem = undefined;
100379
+ this._itemActiveListener();
100380
+ }, 100);
100381
+ };
100347
100382
  componentDidLoad() {
100348
100383
  const submenuItems = this._el.querySelectorAll('p-submenu-item');
100349
100384
  const hasActiveChild = [...submenuItems].some(i => i.active === true);
@@ -100355,35 +100390,87 @@ class Submenu {
100355
100390
  }
100356
100391
  this.open = true;
100357
100392
  }
100393
+ componentDidRender() {
100394
+ this._calculateHeaderOffset();
100395
+ }
100396
+ disconnectedCallback() {
100397
+ this._removeListeners();
100398
+ }
100358
100399
  render() {
100359
100400
  const submenuItems = this._el.querySelectorAll('p-submenu-item');
100360
100401
  const firstItem = getComputedStyle(submenuItems[0]);
100361
100402
  const maxHeight = submenuItems.length *
100362
100403
  Number.parseInt(firstItem.height.replace('px', '')) +
100363
100404
  16; // the margin of the content
100364
- return (hAsync(ThemedHost, { key: '110fad52ce96c4fc855408b422a42956b957d092' }, hAsync("div", { key: '0b8f40db722e7c6f6ba8ded2e33a6776af28f0dc', class: 'flex w-full flex-col' }, hAsync("div", { key: '23aa3cf5a7ece75e3fb6312e2e2173d68b2dcd86', 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({
100365
100406
  active: this.active,
100366
100407
  open: this.open,
100367
- })), onClick: () => (this.open = !this.open) }, this.showIndex && (hAsync("div", { key: 'a24b117f984eb4392a90b47fd8363e7e320cb84a', class: indexContainer({
100408
+ })), onClick: () => (this.open = !this.open) }, this.showIndex && (hAsync("div", { key: '7429d46e05326a60fecf9ad0fd30ecdd03e4c148', class: indexContainer({
100368
100409
  active: this.active,
100369
100410
  open: this.open,
100370
- }) }, this.index)), hAsync("div", { key: '76fb811ac456b88a7f3d3df3b5badfaf9fe6170f', class: 'flex flex-1 flex-col' }, hAsync("p", { key: '0dd533096861b9962eb523ece6a2ad03f34223f0', 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', {
100371
100412
  'text-storm-400 dark:text-hurricane-100 dark:group-hover/submenu-header:text-white': !this.active,
100372
100413
  'text-storm-500 dark:text-white': this.active,
100373
- }) }, this.title), hAsync("p", { key: '0c3624317e71d9519ab6b694e70dbc7024641cef', class: cn('m-0 text-xs', {
100414
+ }) }, this.title), hAsync("p", { key: 'd15bb2b7035cc06d2c7f4e6a8a3566a8044ade9d', class: cn('m-0 text-xs', {
100374
100415
  'text-storm-300 dark:text-hurricane-300': !this.active,
100375
100416
  'text-storm-300 dark:text-indigo-200': this.active,
100376
- }) }, this.subtitle)), hAsync("p-icon", { key: '480e39ea4630c81d13ec24728d7827a3760ebb6f', class: cn({
100417
+ }) }, this.subtitle)), hAsync("p-icon", { key: 'cba00a3d1093bb5c565a8b585e3471fe53947d10', class: cn({
100377
100418
  'text-storm-500 dark:text-white': this.active,
100378
100419
  'text-storm-300 dark:text-hurricane-300': !this.active,
100379
- }), rotate: this.open ? 180 : 0, variant: 'caret' })), hAsync("div", { key: '2613acd0e5e16af70c39b93a1e064423fafa036c', 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: {
100380
100421
  maxHeight: `${this.open ? maxHeight : 0}px`,
100381
- } }, hAsync("div", { key: 'c8d88df1d7b0ffd7e29202655f33f46ec781a15e', class: cn('absolute left-[calc(1.5rem)] top-0 z-0 w-px', {
100422
+ } }, hAsync("div", { key: 'cd7a456eb8ba1bb949e9891146e5260607c45153', class: cn('absolute left-6 top-0 z-0 w-px', {
100382
100423
  'bg-off-white-400 dark:bg-storm-500/30': !this.active,
100383
100424
  'bg-indigo-100 dark:bg-hurricane-400': this.active,
100384
100425
  }), style: {
100385
100426
  height: `${maxHeight}px`,
100386
- } }), hAsync("div", { key: '0e4328a428da51a172b5a5ff7e8adf2a5c840de6', class: 'z-10 my-2 flex flex-col' }, hAsync("slot", { key: '1541aecaf7c8981cd3a56ffe73b542b135cb186a' }))))));
100427
+ } }), hAsync("div", { key: 'fc15b0d8cc3764b378c4fc9db70a7e164a9e287a', class: cn(`absolute left-6 top-0 z-[1] h-8 w-[2px] transform transition-all`, {
100428
+ 'bg-indigo-600': this._showItemIndicator,
100429
+ 'bg-transparent': !this._showItemIndicator,
100430
+ }), style: {
100431
+ transform: `translateY(${this._activeItemPosition}px)`,
100432
+ } }), hAsync("div", { key: '027e8f7c958784db540f67331f0577bb13a5a90f', class: 'z-10 my-2 flex flex-col' }, hAsync("slot", { key: 'b3495515c0c0478a7bd4376b6cced01b89400d15', onSlotchange: () => this._slotChanged() }))))));
100433
+ }
100434
+ onWindowResize() {
100435
+ this._calculateHeaderOffset();
100436
+ this._itemActiveListener();
100437
+ }
100438
+ _calculateHeaderOffset() {
100439
+ const headerEl = this._el.shadowRoot?.querySelector(String.raw `.group\/submenu-header`);
100440
+ if (!headerEl) {
100441
+ this._activeItemPosition = -1;
100442
+ return;
100443
+ }
100444
+ this._headerOffset = headerEl.getBoundingClientRect().bottom;
100445
+ }
100446
+ _setItemPosition(item) {
100447
+ if (!item) {
100448
+ return;
100449
+ }
100450
+ this._activeItemPosition =
100451
+ item.getBoundingClientRect().top - this._headerOffset;
100452
+ if (!this._showItemIndicator) {
100453
+ setTimeout(() => (this._showItemIndicator = true), 50);
100454
+ }
100455
+ }
100456
+ _slotChanged() {
100457
+ this._removeListeners();
100458
+ const submenuItems = [...this._el.querySelectorAll('p-submenu-item')];
100459
+ for (const item of submenuItems) {
100460
+ item.addEventListener('activeChange', this._itemActiveListener);
100461
+ item.addEventListener('mouseenter', this._itemMouseEnterListener);
100462
+ item.addEventListener('mouseleave', this._itemMouseLeaveListener);
100463
+ }
100464
+ this._submenuItems = submenuItems;
100465
+ }
100466
+ _removeListeners() {
100467
+ if (this._submenuItems.length > 0) {
100468
+ for (const item of this._submenuItems) {
100469
+ item.removeEventListener('activeChange', this._itemActiveListener);
100470
+ item.removeEventListener('mouseenter', this._itemMouseEnterListener);
100471
+ item.removeEventListener('mouseleave', this._itemMouseLeaveListener);
100472
+ }
100473
+ }
100387
100474
  }
100388
100475
  static get style() { return submenuComponentCss(); }
100389
100476
  static get cmpMeta() { return {
@@ -100395,27 +100482,22 @@ class Submenu {
100395
100482
  "index": [514],
100396
100483
  "showIndex": [516, "show-index"],
100397
100484
  "active": [516],
100398
- "open": [516]
100485
+ "open": [516],
100486
+ "_activeItemPosition": [32],
100487
+ "_showItemIndicator": [32]
100399
100488
  },
100400
- "$listeners$": undefined,
100489
+ "$listeners$": [[9, "resize", "onWindowResize"]],
100401
100490
  "$lazyBundleId$": "-",
100402
100491
  "$attrsToReflect$": [["title", "title"], ["subtitle", "subtitle"], ["index", "index"], ["showIndex", "show-index"], ["active", "active"], ["open", "open"]]
100403
100492
  }; }
100404
100493
  }
100405
100494
 
100406
- const submenuItemComponentCss = () => `*{box-sizing:border-box}.static{position:static}.flex{display:flex}.h-8{height:2rem}.h-full{height:100%}.w-\\[2px\\]{width:2px}.w-full{width:100%}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.gap-2{gap:.5rem}.gap-6{gap:1.5rem}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(82 138 250/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.pl-6{padding-left:1.5rem}.text-hurricane-100{--tw-text-opacity:1;color:rgb(209 210 212/var(--tw-text-opacity,1))}.text-indigo-600{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity,1))}.text-storm-400{--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,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)}.group\\/submenu-item:hover .group-hover\\/submenu-item\\:bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(82 138 250/var(--tw-bg-opacity,1))}.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-100:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(209 210 212/var(--tw-text-opacity,1))}`;
100495
+ const submenuItemComponentCss = () => `*{box-sizing:border-box}.static{position:static}.flex{display:flex}.h-8{height:2rem}.w-full{width:100%}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.gap-2{gap:.5rem}.pl-\\[calc\\(3rem\\+2px\\)\\]{padding-left:calc(3rem + 2px)}.text-hurricane-100{--tw-text-opacity:1;color:rgb(209 210 212/var(--tw-text-opacity,1))}.text-indigo-600{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity,1))}.text-storm-400{--tw-text-opacity:1;color:rgb(70 75 84/var(--tw-text-opacity,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)}.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-100:where([data-theme=dark],[data-theme=dark] *){--tw-text-opacity:1;color:rgb(209 210 212/var(--tw-text-opacity,1))}`;
100407
100496
 
100408
- const content$2 = cva([
100409
- 'flex items-center gap-6',
100410
- 'h-8 w-full pl-6',
100411
- 'cursor-pointer',
100412
- 'group/submenu-item',
100413
- ], {
100414
- variants: {},
100415
- });
100416
100497
  class SubmenuItem {
100417
100498
  constructor(hostRef) {
100418
100499
  registerInstance(this, hostRef);
100500
+ this.activeChange = createEvent(this, "activeChange", 3);
100419
100501
  }
100420
100502
  /**
100421
100503
  * Wether the submenu is active or not
@@ -100425,14 +100507,28 @@ class SubmenuItem {
100425
100507
  * Icon to show on the label
100426
100508
  */
100427
100509
  icon = 'placeholder';
100510
+ /**
100511
+ * Event when the active state changes
100512
+ */
100513
+ activeChange;
100514
+ _lastActiveState = this.active;
100515
+ componentDidRender() {
100516
+ if (this._lastActiveState === this.active) {
100517
+ return;
100518
+ }
100519
+ this._lastActiveState = this.active;
100520
+ this.activeChange.emit(this.active);
100521
+ }
100428
100522
  render() {
100429
- return (hAsync(ThemedHost, { key: '812bee8d46780d60ed604505b4f8c00e798a9f8f' }, hAsync("div", { key: 'f5a76dd14ccb0559586b01214c6badb3bcf2eef8', class: cn(content$2({}), {}) }, hAsync("div", { key: '97fe0916207dfefd625ae51d911ef4eeb5d6b4cc', class: cn(`h-full w-[2px] transition-colors`, {
100430
- 'bg-indigo-600': this.active,
100431
- 'bg-transparent group-hover/submenu-item:bg-indigo-600': !this.active,
100432
- }) }), hAsync("div", { key: '2c6ab60c2fb19b197d5aabd2368a7eb7406fdcb2', class: cn('flex items-center gap-2 transition-colors', {
100523
+ return (hAsync(ThemedHost, { key: '38bbc84752e1aa8271568aad5c1fd46bfa435d9a' }, hAsync("div", { key: 'a17fb921e57780d1ff572a3d1ba10331b045276e', class: cn([
100524
+ 'flex items-center',
100525
+ 'h-8 w-full pl-[calc(3rem+2px)]',
100526
+ 'cursor-pointer',
100527
+ 'group/submenu-item',
100528
+ ]) }, hAsync("div", { key: 'd9c949c6f467524e0590a19774ae86c06e234fe5', class: cn('flex items-center gap-2 transition-colors', {
100433
100529
  'text-storm-400 dark:text-hurricane-100': !this.active,
100434
100530
  'text-indigo-600': this.active,
100435
- }) }, hAsync("p-icon", { key: '7db15690b67f555a46dc72133be72e5937051658', variant: this.icon }), hAsync("slot", { key: '1a4574d13c012affe2713a034445f636369729c8' })))));
100531
+ }) }, hAsync("p-icon", { key: '8eed69a5fd4cef34ef69d7e5a96993289effc37e', variant: this.icon }), hAsync("slot", { key: '5471376f37afb9566f21599ee0e86af42a00b370' })))));
100436
100532
  }
100437
100533
  static get style() { return submenuItemComponentCss(); }
100438
100534
  static get cmpMeta() { return {