@nova-design-system/nova-webcomponents 3.16.0 → 3.17.0

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 (88) hide show
  1. package/dist/cjs/index-93d3b2f8.js +4 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/native.cjs.js +1 -1
  4. package/dist/cjs/nv-button.cjs.entry.js +1 -7
  5. package/dist/cjs/nv-button.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nv-split.cjs.entry.js +339 -0
  7. package/dist/cjs/nv-split.cjs.entry.js.map +1 -0
  8. package/dist/cjs/nv-stack.cjs.entry.js +1 -1
  9. package/dist/cjs/nv-table.cjs.entry.js +1 -1
  10. package/dist/cjs/nv-toggle.cjs.entry.js +2 -2
  11. package/dist/cjs/nv-togglebutton.cjs.entry.js +1 -1
  12. package/dist/cjs/nv-togglebuttongroup.cjs.entry.js +1 -1
  13. package/dist/cjs/nv-tooltip.cjs.entry.js +1 -1
  14. package/dist/collection/collection-manifest.json +1 -0
  15. package/dist/collection/components/nv-button/nv-button.js +1 -13
  16. package/dist/collection/components/nv-button/nv-button.js.map +1 -1
  17. package/dist/collection/components/nv-split/nv-split.docs.js +41 -0
  18. package/dist/collection/components/nv-split/nv-split.docs.js.map +1 -0
  19. package/dist/collection/components/nv-split/nv-split.js +549 -0
  20. package/dist/collection/components/nv-split/nv-split.js.map +1 -0
  21. package/dist/collection/components/nv-split/styles/nv-split.css +96 -0
  22. package/dist/collection/components/nv-stack/nv-stack.js +1 -1
  23. package/dist/collection/components/nv-table/nv-table.js +1 -1
  24. package/dist/collection/components/nv-toggle/nv-toggle.js +2 -2
  25. package/dist/collection/components/nv-togglebutton/nv-togglebutton.js +1 -1
  26. package/dist/collection/components/nv-togglebuttongroup/nv-togglebuttongroup.js +1 -1
  27. package/dist/collection/components/nv-tooltip/nv-tooltip.js +1 -1
  28. package/dist/components/nv-breadcrumb.js +1 -1
  29. package/dist/components/nv-button.js +1 -1
  30. package/dist/components/nv-dialog.js +2 -2
  31. package/dist/components/nv-dialogfooter.js +1 -1
  32. package/dist/components/nv-split.d.ts +11 -0
  33. package/dist/components/nv-split.js +366 -0
  34. package/dist/components/nv-split.js.map +1 -0
  35. package/dist/components/nv-stack.js +1 -1
  36. package/dist/components/nv-table.js +1 -1
  37. package/dist/components/nv-toggle.js +2 -2
  38. package/dist/components/nv-togglebutton.js +1 -1
  39. package/dist/components/nv-togglebuttongroup.js +1 -1
  40. package/dist/components/nv-tooltip.js +1 -1
  41. package/dist/components/{p-9707528d.js → p-6f2b257e.js} +2 -2
  42. package/dist/components/{p-9707528d.js.map → p-6f2b257e.js.map} +1 -1
  43. package/dist/components/{p-a1ef5e37.js → p-7b5102c8.js} +2 -2
  44. package/dist/components/{p-a1ef5e37.js.map → p-7b5102c8.js.map} +1 -1
  45. package/dist/components/{p-2d64749f.js → p-9e7468e3.js} +3 -9
  46. package/dist/components/p-9e7468e3.js.map +1 -0
  47. package/dist/esm/index-dc2723f3.js +4 -0
  48. package/dist/esm/loader.js +1 -1
  49. package/dist/esm/native.js +1 -1
  50. package/dist/esm/nv-button.entry.js +1 -7
  51. package/dist/esm/nv-button.entry.js.map +1 -1
  52. package/dist/esm/nv-split.entry.js +335 -0
  53. package/dist/esm/nv-split.entry.js.map +1 -0
  54. package/dist/esm/nv-stack.entry.js +1 -1
  55. package/dist/esm/nv-table.entry.js +1 -1
  56. package/dist/esm/nv-toggle.entry.js +2 -2
  57. package/dist/esm/nv-togglebutton.entry.js +1 -1
  58. package/dist/esm/nv-togglebuttongroup.entry.js +1 -1
  59. package/dist/esm/nv-tooltip.entry.js +1 -1
  60. package/dist/native/native.css +1 -1
  61. package/dist/native/native.esm.js +1 -1
  62. package/dist/native/native.esm.js.map +1 -1
  63. package/dist/native/{p-445221dc.entry.js → p-14e622e1.entry.js} +2 -2
  64. package/dist/native/p-2364aefa.entry.js +2 -0
  65. package/dist/native/p-2364aefa.entry.js.map +1 -0
  66. package/dist/native/{p-44a78545.entry.js → p-52d2c0ae.entry.js} +2 -2
  67. package/dist/native/{p-a2f58133.entry.js → p-638967bf.entry.js} +2 -2
  68. package/dist/native/{p-075d231e.entry.js → p-91fab6c2.entry.js} +2 -2
  69. package/dist/native/{p-d45ee8e5.entry.js → p-a6fc987a.entry.js} +2 -2
  70. package/dist/native/p-a6fc987a.entry.js.map +1 -0
  71. package/dist/native/{p-dfb6b65e.entry.js → p-cb0293ec.entry.js} +2 -2
  72. package/dist/native/{p-b02c896a.entry.js → p-d94bf052.entry.js} +2 -2
  73. package/dist/types/components/nv-button/nv-button.d.ts +0 -1
  74. package/dist/types/components/nv-split/nv-split.d.ts +128 -0
  75. package/dist/types/components/nv-split/nv-split.docs.d.ts +4 -0
  76. package/dist/types/components.d.ts +107 -0
  77. package/dist/vscode-data.json +25 -0
  78. package/hydrate/index.js +363 -15
  79. package/hydrate/index.mjs +363 -15
  80. package/package.json +5 -1
  81. package/dist/components/p-2d64749f.js.map +0 -1
  82. package/dist/native/p-d45ee8e5.entry.js.map +0 -1
  83. /package/dist/native/{p-445221dc.entry.js.map → p-14e622e1.entry.js.map} +0 -0
  84. /package/dist/native/{p-44a78545.entry.js.map → p-52d2c0ae.entry.js.map} +0 -0
  85. /package/dist/native/{p-a2f58133.entry.js.map → p-638967bf.entry.js.map} +0 -0
  86. /package/dist/native/{p-075d231e.entry.js.map → p-91fab6c2.entry.js.map} +0 -0
  87. /package/dist/native/{p-dfb6b65e.entry.js.map → p-cb0293ec.entry.js.map} +0 -0
  88. /package/dist/native/{p-b02c896a.entry.js.map → p-d94bf052.entry.js.map} +0 -0
@@ -2667,6 +2667,53 @@ export namespace Components {
2667
2667
  }
2668
2668
  interface NvRow {
2669
2669
  }
2670
+ /**
2671
+ * The `nv-split` component is an advanced layout container that enables the creation of interactively resizable panels. It provides a flexible solution for dividing available space between multiple interface sections, with precise control over dimensions and constraints for each panel.
2672
+ */
2673
+ interface NvSplit {
2674
+ /**
2675
+ * Collapse a specific pane to 0 size.
2676
+ * @param index Index of the pane to collapse.
2677
+ * @returns
2678
+ */
2679
+ "collapse": (index: number) => Promise<void>;
2680
+ /**
2681
+ * Destroy the split instance: removes gutters and resets layout state.
2682
+ * @returns
2683
+ */
2684
+ "destroy": () => Promise<void>;
2685
+ /**
2686
+ * Direction of the split layout. - `horizontal`: panes side by side - `vertical`: panes stacked
2687
+ */
2688
+ "direction": 'horizontal' | 'vertical';
2689
+ /**
2690
+ * Returns the current pane sizes.
2691
+ * @returns Array of pane sizes in percentages.
2692
+ */
2693
+ "getSizes": () => Promise<number[]>;
2694
+ /**
2695
+ * Width or height of the gutter (in px) depending on the split direction. Default is 24px to meet WCAG 2.2 target size requirements for touch accessibility.
2696
+ */
2697
+ "gutterSize": number;
2698
+ /**
2699
+ * @deprecated use camelCase instead. Support for dash-casing will be removed in Stencil v5.
2700
+ */
2701
+ "gutter-size"?: number;
2702
+ /**
2703
+ * Minimum sizes (in px) for each pane. Example: `[100, 200]` => first pane min 100px, second min 200px. Explicitly `reflect: false` (array) for framework compatibility.
2704
+ */
2705
+ "minSizes"?: number[];
2706
+ /**
2707
+ * Programmatically set pane sizes.
2708
+ * @param sizes Array of pane sizes in percentages.
2709
+ * @returns
2710
+ */
2711
+ "setSizes": (sizes: number[]) => Promise<void>;
2712
+ /**
2713
+ * Initial sizes of the panes in percentages. Example: `[50, 50]` means two equal panes. Explicitly `reflect: false` (array) for framework compatibility.
2714
+ */
2715
+ "sizes": number[];
2716
+ }
2670
2717
  /**
2671
2718
  * @deprecated Please use tailwind classes instead
2672
2719
  */
@@ -2928,6 +2975,10 @@ export interface NvPopoverCustomEvent<T> extends CustomEvent<T> {
2928
2975
  detail: T;
2929
2976
  target: HTMLNvPopoverElement;
2930
2977
  }
2978
+ export interface NvSplitCustomEvent<T> extends CustomEvent<T> {
2979
+ detail: T;
2980
+ target: HTMLNvSplitElement;
2981
+ }
2931
2982
  export interface NvToggleCustomEvent<T> extends CustomEvent<T> {
2932
2983
  detail: T;
2933
2984
  target: HTMLNvToggleElement;
@@ -3579,6 +3630,26 @@ declare global {
3579
3630
  prototype: HTMLNvRowElement;
3580
3631
  new (): HTMLNvRowElement;
3581
3632
  };
3633
+ interface HTMLNvSplitElementEventMap {
3634
+ "sizesChanged": number[];
3635
+ }
3636
+ /**
3637
+ * The `nv-split` component is an advanced layout container that enables the creation of interactively resizable panels. It provides a flexible solution for dividing available space between multiple interface sections, with precise control over dimensions and constraints for each panel.
3638
+ */
3639
+ interface HTMLNvSplitElement extends Components.NvSplit, HTMLStencilElement {
3640
+ addEventListener<K extends keyof HTMLNvSplitElementEventMap>(type: K, listener: (this: HTMLNvSplitElement, ev: NvSplitCustomEvent<HTMLNvSplitElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
3641
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
3642
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
3643
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
3644
+ removeEventListener<K extends keyof HTMLNvSplitElementEventMap>(type: K, listener: (this: HTMLNvSplitElement, ev: NvSplitCustomEvent<HTMLNvSplitElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
3645
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
3646
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
3647
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
3648
+ }
3649
+ var HTMLNvSplitElement: {
3650
+ prototype: HTMLNvSplitElement;
3651
+ new (): HTMLNvSplitElement;
3652
+ };
3582
3653
  /**
3583
3654
  * @deprecated Please use tailwind classes instead
3584
3655
  */
@@ -3708,6 +3779,7 @@ declare global {
3708
3779
  "nv-notificationcontainer": HTMLNvNotificationcontainerElement;
3709
3780
  "nv-popover": HTMLNvPopoverElement;
3710
3781
  "nv-row": HTMLNvRowElement;
3782
+ "nv-split": HTMLNvSplitElement;
3711
3783
  "nv-stack": HTMLNvStackElement;
3712
3784
  "nv-table": HTMLNvTableElement;
3713
3785
  "nv-toggle": HTMLNvToggleElement;
@@ -6515,6 +6587,36 @@ declare namespace LocalJSX {
6515
6587
  }
6516
6588
  interface NvRow {
6517
6589
  }
6590
+ /**
6591
+ * The `nv-split` component is an advanced layout container that enables the creation of interactively resizable panels. It provides a flexible solution for dividing available space between multiple interface sections, with precise control over dimensions and constraints for each panel.
6592
+ */
6593
+ interface NvSplit {
6594
+ /**
6595
+ * Direction of the split layout. - `horizontal`: panes side by side - `vertical`: panes stacked
6596
+ */
6597
+ "direction"?: 'horizontal' | 'vertical';
6598
+ /**
6599
+ * Width or height of the gutter (in px) depending on the split direction. Default is 24px to meet WCAG 2.2 target size requirements for touch accessibility.
6600
+ */
6601
+ "gutterSize"?: number;
6602
+ /**
6603
+ * @deprecated use camelCase instead. Support for dash-casing will be removed in Stencil v5.
6604
+ */
6605
+ "gutter-size"?: number;
6606
+ /**
6607
+ * Minimum sizes (in px) for each pane. Example: `[100, 200]` => first pane min 100px, second min 200px. Explicitly `reflect: false` (array) for framework compatibility.
6608
+ */
6609
+ "minSizes"?: number[];
6610
+ /**
6611
+ * Emitted when pane sizes are updated (either via dragging or programmatically).
6612
+ * @bind sizes
6613
+ */
6614
+ "onSizesChanged"?: (event: NvSplitCustomEvent<number[]>) => void;
6615
+ /**
6616
+ * Initial sizes of the panes in percentages. Example: `[50, 50]` means two equal panes. Explicitly `reflect: false` (array) for framework compatibility.
6617
+ */
6618
+ "sizes"?: number[];
6619
+ }
6518
6620
  /**
6519
6621
  * @deprecated Please use tailwind classes instead
6520
6622
  */
@@ -6730,6 +6832,7 @@ declare namespace LocalJSX {
6730
6832
  "nv-notificationcontainer": NvNotificationcontainer;
6731
6833
  "nv-popover": NvPopover;
6732
6834
  "nv-row": NvRow;
6835
+ "nv-split": NvSplit;
6733
6836
  "nv-stack": NvStack;
6734
6837
  "nv-table": NvTable;
6735
6838
  "nv-toggle": NvToggle;
@@ -6795,6 +6898,10 @@ declare module "@stencil/core" {
6795
6898
  "nv-notificationcontainer": LocalJSX.NvNotificationcontainer & JSXBase.HTMLAttributes<HTMLNvNotificationcontainerElement>;
6796
6899
  "nv-popover": LocalJSX.NvPopover & JSXBase.HTMLAttributes<HTMLNvPopoverElement>;
6797
6900
  "nv-row": LocalJSX.NvRow & JSXBase.HTMLAttributes<HTMLNvRowElement>;
6901
+ /**
6902
+ * The `nv-split` component is an advanced layout container that enables the creation of interactively resizable panels. It provides a flexible solution for dividing available space between multiple interface sections, with precise control over dimensions and constraints for each panel.
6903
+ */
6904
+ "nv-split": LocalJSX.NvSplit & JSXBase.HTMLAttributes<HTMLNvSplitElement>;
6798
6905
  /**
6799
6906
  * @deprecated Please use tailwind classes instead
6800
6907
  */
@@ -4878,6 +4878,31 @@
4878
4878
  },
4879
4879
  "attributes": []
4880
4880
  },
4881
+ {
4882
+ "name": "nv-split",
4883
+ "description": {
4884
+ "kind": "markdown",
4885
+ "value": "The `nv-split` component is an advanced layout container that enables the creation of interactively resizable panels. It provides a flexible solution for dividing available space between multiple interface sections, with precise control over dimensions and constraints for each panel."
4886
+ },
4887
+ "attributes": [
4888
+ {
4889
+ "name": "direction",
4890
+ "description": "Direction of the split layout.\n- `horizontal`: panes side by side\n- `vertical`: panes stacked",
4891
+ "values": [
4892
+ {
4893
+ "name": "horizontal"
4894
+ },
4895
+ {
4896
+ "name": "vertical"
4897
+ }
4898
+ ]
4899
+ },
4900
+ {
4901
+ "name": "gutter-size",
4902
+ "description": "Width or height of the gutter (in px) depending on the split direction.\nDefault is 24px to meet WCAG 2.2 target size requirements for touch accessibility."
4903
+ }
4904
+ ]
4905
+ },
4881
4906
  {
4882
4907
  "name": "nv-stack",
4883
4908
  "description": {
package/hydrate/index.js CHANGED
@@ -6345,12 +6345,6 @@ class NvButton {
6345
6345
  this.el.click();
6346
6346
  }
6347
6347
  }
6348
- handleTouchStart(event) {
6349
- if (event.touches.length > 1)
6350
- return;
6351
- event.preventDefault();
6352
- this.el.click();
6353
- }
6354
6348
  //#endregion EVENTS
6355
6349
  /****************************************************************************/
6356
6350
  //#region WATCHERS
@@ -6378,7 +6372,7 @@ class NvButton {
6378
6372
  /****************************************************************************/
6379
6373
  //#region RENDER
6380
6374
  render() {
6381
- return (hAsync(Host, { key: '54c0b3351f4d8a180058a03e61a562882fb98498', role: "button", tabindex: "0", onClick: this.handleButtonClick }, this.loading && (hAsync("nv-loader", { key: '21315e4af4111bcf47c67e65a9a58a1d7121a43e', size: this.size === ButtonSize.Large ? 'sm' : 'xs' })), hAsync("slot", { key: 'f37683ddaa2c11c5b7accfc99429c930f5a3dcf6', name: "leading-icon" }), hAsync("slot", { key: 'd17ebe7505d9027c6c58f930a8ea9b097561cead' }), hAsync("slot", { key: '2cd6c9756cc7540417041adf5830b734291b2ab5', name: "trailing-icon" })));
6375
+ return (hAsync(Host, { key: '42488f71ad33233c839cd70b3ea57aee50b143b3', role: "button", tabindex: "0", onClick: this.handleButtonClick }, this.loading && (hAsync("nv-loader", { key: 'a30c71eebb8f0476bcca5acbc8e7ac7f6377740c', size: this.size === ButtonSize.Large ? 'sm' : 'xs' })), hAsync("slot", { key: '4bbcee81ef7236ae35471c649971c122e4b468f3', name: "leading-icon" }), hAsync("slot", { key: '82203f6aed911e61aef2438bba3b3e664ffb9f76' }), hAsync("slot", { key: 'c97a5ce78c15556b8c1a91a4d06eb6bc9a9cd255', name: "trailing-icon" })));
6382
6376
  }
6383
6377
  static get formAssociated() { return true; }
6384
6378
  get el() { return getElement(this); }
@@ -6401,7 +6395,7 @@ class NvButton {
6401
6395
  "type": [513],
6402
6396
  "form": [513]
6403
6397
  },
6404
- "$listeners$": [[0, "keydown", "handleKeyDown"], [0, "touchstart", "handleTouchStart"]],
6398
+ "$listeners$": [[0, "keydown", "handleKeyDown"]],
6405
6399
  "$lazyBundleId$": "-",
6406
6400
  "$attrsToReflect$": [["size", "size"], ["emphasis", "emphasis"], ["active", "active"], ["danger", "danger"], ["loading", "loading"], ["disabled", "disabled"], ["fluid", "fluid"], ["type", "type"], ["form", "form"]]
6407
6401
  }; }
@@ -26945,6 +26939,359 @@ class NvRow {
26945
26939
  }; }
26946
26940
  }
26947
26941
 
26942
+ const nvSplitCss = "nv-split{display:flex;width:100%;height:100%;position:relative}nv-split[direction=horizontal]{flex-direction:row}nv-split[direction=vertical]{flex-direction:column}nv-split .nv-split-gutter{position:absolute;z-index:10;background:transparent;display:flex;align-items:center;justify-content:center;flex:0 0 auto;transition:background-color 0.2s ease}nv-split .nv-split-gutter::after{content:\"\";position:absolute;background:var(--nv-color-neutral-400, #ccc);border-radius:2px;transition:background-color 0.2s ease}nv-split .nv-split-gutter:hover::after{background:var(--nv-color-brand-primary, #0066cc)}nv-split .nv-split-gutter::before{content:\"\";position:absolute;background-repeat:no-repeat;background-position:center;opacity:0.4;transition:opacity 0.2s ease;pointer-events:none}nv-split .nv-split-gutter:hover::before{opacity:0.7}nv-split[direction=horizontal]>.nv-split-gutter{width:var(--nv-split-gutter-size, 24px);top:0;bottom:0;transform:translateX(-50%);cursor:col-resize}nv-split[direction=horizontal]>.nv-split-gutter::after{width:2px;height:60%;left:50%;top:20%;transform:translateX(-50%)}nv-split[direction=horizontal]>.nv-split-gutter::before{width:16px;height:16px}nv-split[direction=vertical]>.nv-split-gutter{height:var(--nv-split-gutter-size, 24px);left:0;right:0;transform:translateY(-50%);cursor:row-resize}nv-split[direction=vertical]>.nv-split-gutter::after{height:2px;width:60%;top:50%;left:20%;transform:translateY(-50%)}nv-split[direction=vertical]>.nv-split-gutter::before{width:16px;height:16px}nv-split[data-dragging=true]>.nv-split-gutter::after{background:var(--nv-color-neutral-500, #9ca3af)}nv-split>[slot=pane]{flex:1 1 auto;overflow:hidden;min-width:0;min-height:0;display:flex;flex-direction:column}nv-split>[slot=pane]>nv-split{flex:1 1 auto;width:100%;height:100%}";
26943
+ var NvSplitStyle0 = nvSplitCss;
26944
+
26945
+ /**
26946
+ * The `nv-split` component is an advanced layout container that enables the creation of interactively resizable panels. It provides a flexible solution for dividing available space between multiple interface sections, with precise control over dimensions and constraints for each panel.
26947
+ * @slot pane - Content of each split pane. Use multiple `<div slot="pane">` elements.
26948
+ * @slot gutter - Optional custom content inside every gutter handle.
26949
+ */
26950
+ class NvSplit {
26951
+ constructor(hostRef) {
26952
+ registerInstance(this, hostRef);
26953
+ this.sizesChanged = createEvent(this, "sizesChanged", 7);
26954
+ /****************************************************************************/
26955
+ //#region PROPERTIES
26956
+ /**
26957
+ * Direction of the split layout.
26958
+ * - `horizontal`: panes side by side
26959
+ * - `vertical`: panes stacked
26960
+ */
26961
+ this.direction = 'horizontal';
26962
+ /**
26963
+ * Initial sizes of the panes in percentages.
26964
+ * Example: `[50, 50]` means two equal panes.
26965
+ * Explicitly `reflect: false` (array) for framework compatibility.
26966
+ */
26967
+ this.sizes = [];
26968
+ /**
26969
+ * Width or height of the gutter (in px) depending on the split direction.
26970
+ * Default is 24px to meet WCAG 2.2 target size requirements for touch accessibility.
26971
+ */
26972
+ this.gutterSize = 24;
26973
+ //#endregion
26974
+ /****************************************************************************/
26975
+ //#region STATE
26976
+ this.isDragging = false;
26977
+ this.dragIndex = -1;
26978
+ this.startPos = 0;
26979
+ this.startSizes = [];
26980
+ // Handlers stored to be able to detach them
26981
+ this.onDocMove = (ev) => this.handleMouseMove(ev);
26982
+ this.onDocUp = () => this.stopDragging();
26983
+ }
26984
+ //#endregion
26985
+ /****************************************************************************/
26986
+ //#region WATCHERS
26987
+ onSizesChanged() {
26988
+ // Re-apply sizes if modified from the outside
26989
+ this.applySizes();
26990
+ }
26991
+ onDirectionChanged() {
26992
+ // Update the orientation and the cursors of the gutters
26993
+ this.ensureGutters();
26994
+ this.applySizes();
26995
+ }
26996
+ //#endregion
26997
+ /****************************************************************************/
26998
+ //#region LIFECYCLE
26999
+ componentDidLoad() {
27000
+ // Initialization (once)
27001
+ this.ensureGutters();
27002
+ this.applySizes();
27003
+ this.positionGutters();
27004
+ // Observer: reposition gutters when resized (nested or parent split changes)
27005
+ this.ro = new ResizeObserver(() => this.positionGutters());
27006
+ this.ro.observe(this.el);
27007
+ window.addEventListener('resize', () => this.positionGutters());
27008
+ }
27009
+ disconnectedCallback() {
27010
+ var _a;
27011
+ // Security cleanup (in case a drag was in progress)
27012
+ this.detachDocumentListeners();
27013
+ (_a = this.ro) === null || _a === void 0 ? void 0 : _a.disconnect();
27014
+ this.ro = undefined;
27015
+ }
27016
+ //#endregion
27017
+ /****************************************************************************/
27018
+ //#region PUBLIC METHODS
27019
+ /**
27020
+ * Programmatically set pane sizes.
27021
+ * @param {Array<number>} sizes Array of pane sizes in percentages.
27022
+ * @returns {Promise<void>}
27023
+ */
27024
+ async setSizes(sizes) {
27025
+ this.sizes = [...sizes];
27026
+ this.applySizes();
27027
+ this.sizesChanged.emit([...this.sizes]);
27028
+ this.positionGutters();
27029
+ }
27030
+ /**
27031
+ * Returns the current pane sizes.
27032
+ * @returns {Promise<number[]>} Array of pane sizes in percentages.
27033
+ */
27034
+ async getSizes() {
27035
+ return [...this.sizes];
27036
+ }
27037
+ /**
27038
+ * Collapse a specific pane to 0 size.
27039
+ * @param {number} index Index of the pane to collapse.
27040
+ * @returns {Promise<void>}
27041
+ */
27042
+ async collapse(index) {
27043
+ const panes = this.getPanes();
27044
+ if (index < 0 || index >= panes.length)
27045
+ return;
27046
+ // Simple strategy: 0% for the index, the rest (100%) for its nearest neighbor
27047
+ const next = new Array(panes.length).fill(0);
27048
+ const target = index < panes.length - 1 ? index + 1 : index - 1;
27049
+ if (target >= 0)
27050
+ next[target] = 100;
27051
+ this.sizes = next;
27052
+ this.applySizes();
27053
+ this.sizesChanged.emit([...this.sizes]);
27054
+ this.positionGutters();
27055
+ }
27056
+ /**
27057
+ * Destroy the split instance: removes gutters and resets layout state.
27058
+ * @returns {Promise<void>}
27059
+ */
27060
+ async destroy() {
27061
+ var _a;
27062
+ this.sizes = [];
27063
+ this.isDragging = false;
27064
+ this.dragIndex = -1;
27065
+ this.removeOwnGutters();
27066
+ this.detachDocumentListeners();
27067
+ (_a = this.ro) === null || _a === void 0 ? void 0 : _a.disconnect();
27068
+ }
27069
+ //#endregion
27070
+ /****************************************************************************/
27071
+ //#region INTERNAL HELPERS
27072
+ /**
27073
+ * Returns the panes of the split.
27074
+ * @returns {HTMLElement[]} The panes of the split.
27075
+ */
27076
+ getPanes() {
27077
+ // Only the direct children slot="pane"
27078
+ return Array.from(this.el.querySelectorAll(':scope > [slot="pane"]'));
27079
+ }
27080
+ /**
27081
+ * Returns the own gutters of the split.
27082
+ * @returns {HTMLElement[]} The own gutters of the split.
27083
+ */
27084
+ getOwnGutters() {
27085
+ // Only the direct gutters of THIS instance
27086
+ return Array.from(this.el.querySelectorAll(':scope > .nv-split-gutter[data-auto="true"]'));
27087
+ }
27088
+ /**
27089
+ * Removes the own gutters of the split.
27090
+ */
27091
+ removeOwnGutters() {
27092
+ this.getOwnGutters().forEach(g => g.remove());
27093
+ }
27094
+ /**
27095
+ * Ensures the gutters of the split.
27096
+ */
27097
+ ensureGutters() {
27098
+ const panes = this.getPanes();
27099
+ // 1) Clean ONLY the old direct gutters of THIS instance
27100
+ this.removeOwnGutters();
27101
+ if (panes.length <= 1)
27102
+ return;
27103
+ // 2) Add the gutters (directs) between the panes
27104
+ panes.forEach((pane, i) => {
27105
+ if (i >= panes.length - 1)
27106
+ return;
27107
+ const g = document.createElement('div');
27108
+ g.className = 'nv-split-gutter';
27109
+ g.setAttribute('data-auto', 'true');
27110
+ if (this.direction === 'horizontal') {
27111
+ g.style.width = `${this.gutterSize}px`;
27112
+ g.style.cursor = 'col-resize';
27113
+ }
27114
+ else {
27115
+ g.style.height = `${this.gutterSize}px`;
27116
+ g.style.cursor = 'row-resize';
27117
+ }
27118
+ // Customizable internal slot
27119
+ const slotEl = document.createElement('slot');
27120
+ slotEl.name = 'gutter';
27121
+ g.appendChild(slotEl);
27122
+ // Listener drag (index = gutter between pane i and i+1)
27123
+ g.addEventListener('mousedown', (ev) => this.startDragging(ev, i));
27124
+ // Insert just after the pane
27125
+ pane.insertAdjacentElement('afterend', g);
27126
+ });
27127
+ this.positionGutters();
27128
+ }
27129
+ /**
27130
+ * Applies the sizes to the panes.
27131
+ */
27132
+ applySizes() {
27133
+ const panes = this.getPanes();
27134
+ const n = panes.length;
27135
+ if (n === 0)
27136
+ return;
27137
+ // Default values if inconsistent
27138
+ if (!this.sizes || this.sizes.length !== n) {
27139
+ this.sizes = Array(n).fill(100 / n);
27140
+ }
27141
+ panes.forEach((pane, i) => {
27142
+ var _a;
27143
+ const size = Math.max(0, (_a = this.sizes[i]) !== null && _a !== void 0 ? _a : 100 / n);
27144
+ // Flex-basis via flex shorthand (https://developer.mozilla.org/en-US/docs/Web/CSS/flex)
27145
+ pane.style.flex = `0 0 ${size}%`;
27146
+ pane.style.minWidth = '0';
27147
+ pane.style.minHeight = '0';
27148
+ pane.style.overflow = 'hidden'; // let a nv-split child extend
27149
+ pane.style.display = 'flex';
27150
+ pane.style.flexDirection = 'column';
27151
+ });
27152
+ this.positionGutters();
27153
+ }
27154
+ /**
27155
+ * Attaches the document listeners.
27156
+ */
27157
+ attachDocumentListeners() {
27158
+ document.addEventListener('mousemove', this.onDocMove);
27159
+ document.addEventListener('mouseup', this.onDocUp);
27160
+ }
27161
+ /**
27162
+ * Detaches the document listeners.
27163
+ */
27164
+ detachDocumentListeners() {
27165
+ document.removeEventListener('mousemove', this.onDocMove);
27166
+ document.removeEventListener('mouseup', this.onDocUp);
27167
+ }
27168
+ /**
27169
+ * Positions the gutters based on the current sizes of the panes.
27170
+ */
27171
+ positionGutters() {
27172
+ var _a, _b;
27173
+ const panes = this.getPanes();
27174
+ const gutters = this.getOwnGutters();
27175
+ if (panes.length <= 1 || gutters.length === 0)
27176
+ return;
27177
+ const horizontal = this.direction === 'horizontal';
27178
+ let cumPct = 0;
27179
+ for (let i = 0; i < gutters.length; i++) {
27180
+ const sizePct = (_b = (_a = this.sizes) === null || _a === void 0 ? void 0 : _a[i]) !== null && _b !== void 0 ? _b : 100 / panes.length;
27181
+ cumPct += sizePct;
27182
+ const g = gutters[i];
27183
+ g.style.position = 'absolute';
27184
+ if (horizontal) {
27185
+ g.style.left = `${cumPct}%`;
27186
+ g.style.top = '0';
27187
+ g.style.bottom = '0';
27188
+ g.style.height = '100%';
27189
+ }
27190
+ else {
27191
+ g.style.top = `${cumPct}%`;
27192
+ g.style.left = '0';
27193
+ g.style.right = '0';
27194
+ g.style.width = '100%';
27195
+ }
27196
+ }
27197
+ }
27198
+ /**
27199
+ * Starts the dragging process.
27200
+ * @param {MouseEvent} ev - The mouse event.
27201
+ * @param {number} index - The index of the gutter.
27202
+ */
27203
+ startDragging(ev, index) {
27204
+ this.isDragging = true;
27205
+ this.dragIndex = index;
27206
+ this.startPos = this.direction === 'horizontal' ? ev.clientX : ev.clientY;
27207
+ this.startSizes = [...this.sizes];
27208
+ this.attachDocumentListeners();
27209
+ }
27210
+ /**
27211
+ * Handles the mouse movement during dragging.
27212
+ * @param {MouseEvent} ev - The mouse event.
27213
+ */
27214
+ handleMouseMove(ev) {
27215
+ var _a, _b, _c, _d;
27216
+ if (!this.isDragging || this.dragIndex < 0)
27217
+ return;
27218
+ const panes = this.getPanes();
27219
+ if (panes.length < 2)
27220
+ return;
27221
+ const rect = this.el.getBoundingClientRect();
27222
+ // Ensure we never divide by zero if the element has zero width/height
27223
+ const rawSize = this.direction === 'horizontal' ? rect.width : rect.height;
27224
+ const totalPx = Math.max(rawSize, 1);
27225
+ const deltaPx = (this.direction === 'horizontal' ? ev.clientX : ev.clientY) -
27226
+ this.startPos;
27227
+ const deltaPct = (deltaPx / totalPx) * 100;
27228
+ const i = this.dragIndex;
27229
+ const j = i + 1;
27230
+ let left = this.startSizes[i] + deltaPct;
27231
+ let right = this.startSizes[j] - deltaPct;
27232
+ // minSizes (px) -> %
27233
+ const minLeftPct = (((_b = (_a = this.minSizes) === null || _a === void 0 ? void 0 : _a[i]) !== null && _b !== void 0 ? _b : 0) / totalPx) * 100;
27234
+ const minRightPct = (((_d = (_c = this.minSizes) === null || _c === void 0 ? void 0 : _c[j]) !== null && _d !== void 0 ? _d : 0) / totalPx) * 100;
27235
+ left = Math.max(left, minLeftPct);
27236
+ right = Math.max(right, minRightPct);
27237
+ // Keep the sum of the pair i/j constant
27238
+ const pairSum = left + right;
27239
+ const targetSum = this.startSizes[i] + this.startSizes[j];
27240
+ if (Math.abs(pairSum - targetSum) > 0.0001) {
27241
+ const k = targetSum / (pairSum || 1);
27242
+ left *= k;
27243
+ right *= k;
27244
+ }
27245
+ const next = [...this.startSizes];
27246
+ next[i] = left;
27247
+ next[j] = right;
27248
+ this.sizes = next;
27249
+ this.applySizes();
27250
+ this.sizesChanged.emit([...this.sizes]);
27251
+ this.positionGutters();
27252
+ }
27253
+ /**
27254
+ * Stops the dragging process.
27255
+ */
27256
+ stopDragging() {
27257
+ if (!this.isDragging)
27258
+ return;
27259
+ this.isDragging = false;
27260
+ this.dragIndex = -1;
27261
+ this.detachDocumentListeners();
27262
+ }
27263
+ //#endregion
27264
+ /****************************************************************************/
27265
+ //#region RENDER
27266
+ render() {
27267
+ return (hAsync(Host, { key: 'e3b158ff1b4f665862079d245c219102d8b8ccda', "data-dragging": this.isDragging.toString() }, hAsync("slot", { key: 'baa8105a05bf8446d7a31a23cd5276edb320ea2f', name: "pane" }), hAsync("slot", { key: '44afe4f4a220aff45f802218f2618e9305141a9f', name: "gutter" })));
27268
+ }
27269
+ get el() { return getElement(this); }
27270
+ static get watchers() { return {
27271
+ "sizes": ["onSizesChanged"],
27272
+ "direction": ["onDirectionChanged"]
27273
+ }; }
27274
+ static get style() { return NvSplitStyle0; }
27275
+ static get cmpMeta() { return {
27276
+ "$flags$": 4,
27277
+ "$tagName$": "nv-split",
27278
+ "$members$": {
27279
+ "direction": [513],
27280
+ "sizes": [1040],
27281
+ "minSizes": [16],
27282
+ "gutterSize": [514, "gutter-size"],
27283
+ "isDragging": [32],
27284
+ "setSizes": [64],
27285
+ "getSizes": [64],
27286
+ "collapse": [64],
27287
+ "destroy": [64]
27288
+ },
27289
+ "$listeners$": undefined,
27290
+ "$lazyBundleId$": "-",
27291
+ "$attrsToReflect$": [["direction", "direction"], ["gutterSize", "gutter-size"]]
27292
+ }; }
27293
+ }
27294
+
26948
27295
  const nvStackCss = "nv-stack{display:flex;align-items:center;justify-content:flex-start;flex-direction:row}nv-stack nv-col{display:flex}nv-stack:not(nv-row){flex-wrap:nowrap}nv-stack>.nv-stack-item-flex{flex-shrink:1;flex-grow:1}nv-stack>.nv-stack-item-lead{margin-right:auto}nv-stack>.nv-stack-item-lead+*{margin-left:0}nv-stack>.nv-stack-item-center{margin-right:auto;margin-left:auto}nv-stack>.nv-stack-item-tail{margin-left:auto}nv-stack>.nv-stack-nowrap{white-space:nowrap}nv-stack.nv-stack-vertical{align-items:stretch;flex-direction:column}nv-stack.nv-stack-vertical>.nv-stack-item-lead{margin-right:0;margin-bottom:auto}nv-stack.nv-stack-vertical>.nv-stack-item-lead+*{margin-top:0}nv-stack.nv-stack-vertical>.nv-stack-item-tail{margin-left:0;margin-top:auto}nv-stack.nv-stack-vertical>.nv-stack-item-center{margin:auto 0}nv-stack.nv-stack-flex>*{flex-shrink:1;flex-grow:1}nv-stack.nv-stack-fill>*{height:100%}nv-stack.nv-stack-fill.nv-stack-vertical>*{height:auto;width:100%}";
26949
27296
  var NvStackStyle0 = nvStackCss;
26950
27297
 
@@ -26967,7 +27314,7 @@ class NvStack {
26967
27314
  /****************************************************************************/
26968
27315
  //#region RENDER
26969
27316
  render() {
26970
- return (hAsync(Host, { key: '8f771805224c769b5a87f5c550ddbcb8f888d002', class: clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, hAsync("slot", { key: '6fcd46cfd74415d2f07c762b065e3aa0f0194764' })));
27317
+ return (hAsync(Host, { key: '5922efd8652a14d73e812e85dd6770101e22fe46', class: clsx(this.fill && 'nv-stack-fill', this.flex && 'nv-stack-flex', this.full && 'w-full', this.gutter && !this.vertical && `gap-x-${this.gutter}`, this.gutter && this.vertical && `gap-y-${this.gutter}`, this.vertical && 'nv-stack-vertical') }, hAsync("slot", { key: '71daf4ee34bd57d785203f98799b6ea7c66ffa3b' })));
26971
27318
  }
26972
27319
  static get style() { return NvStackStyle0; }
26973
27320
  static get cmpMeta() { return {
@@ -27221,7 +27568,7 @@ class NvTable {
27221
27568
  /****************************************************************************/
27222
27569
  //#region RENDER
27223
27570
  render() {
27224
- return (hAsync(Host, { key: 'b63510e2da93a1b98eb3813ba7ac9bed97b81c1f' }, hAsync("slot", { key: '14fb76c397db4da5dfba94bce599d1e4d8992a6b' })));
27571
+ return (hAsync(Host, { key: '16b564cc29e8987d8b3fda3a84c0b19882a733bd' }, hAsync("slot", { key: '1305cbc6d29caa60df55bfa01a39a3417a27ec01' })));
27225
27572
  }
27226
27573
  get host() { return getElement(this); }
27227
27574
  static get style() { return NvTableStyle0; }
@@ -27299,8 +27646,8 @@ class NvToggle {
27299
27646
  /****************************************************************************/
27300
27647
  //#region RENDER
27301
27648
  render() {
27302
- return (hAsync(Host, { key: '65222149af4edb9f8fd2da7efe9a01e15dec4722', class: clsx(this.labelPlacement === 'before' && 'label-placement-before') }, hAsync("div", { key: '7edd5587281b5610269f1ac09826ce379abfae24', class: "input-container" }, hAsync("input", { key: '30d3db3cbdc263259a5ba1bf8e637225c4db3b4a', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), hAsync("div", { key: 'a8a6d3c2774560b7d43cda75882d90cc564f4c54', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: 'fe980a07df4901081fda42df758236da0b8a11d0', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, hAsync("slot", { key: '723cec5914c6c0bed7e14e61e2f64e83c8e8b7b8', name: "label" }, this.label))), (this.description ||
27303
- this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: 'f811065ed06f0816d8f0f1f65d4c659cbde3f683', class: "description" }, hAsync("slot", { key: '541946e3f33a315bf667999c30a44fd93fc5f07f', name: "description" }, this.description))))));
27649
+ return (hAsync(Host, { key: '0f440b59ac0c32d9abe9577668d7045081819b49', class: clsx(this.labelPlacement === 'before' && 'label-placement-before') }, hAsync("div", { key: '4289435e34eb31a8e59e00cefcba2e17e98bd03a', class: "input-container" }, hAsync("input", { key: '1b7d05f77fd32cece9eed2e6cf79c7e2e707f64c', type: "checkbox", id: this.inputId, name: this.name, autocomplete: "off", value: this.value, checked: Boolean(this.checked), disabled: this.disabled || this.readonly, readonly: this.readonly })), hAsync("div", { key: '6d78d7e80eb790bbead21bba6108329f9ded3746', class: "text-container" }, (this.label || this.el.querySelector('[slot="label"]')) && (hAsync("label", { key: '524a2c2542a45945bddb688c5dff6c9426d58570', htmlFor: this.inputId, class: clsx(this.hideLabel && 'visually-hidden') }, hAsync("slot", { key: '59eda4b826602062620e7167acf3c8de0f77ebef', name: "label" }, this.label))), (this.description ||
27650
+ this.el.querySelector('[slot="description"]')) && (hAsync("div", { key: '6e8412879ed60fc6806464432348bd52483e3567', class: "description" }, hAsync("slot", { key: '85a876130569a5a4051e271eaf1cf49593a014a6', name: "description" }, this.description))))));
27304
27651
  }
27305
27652
  static get formAssociated() { return true; }
27306
27653
  get el() { return getElement(this); }
@@ -27376,7 +27723,7 @@ class NvTogglebutton {
27376
27723
  /****************************************************************************/
27377
27724
  //#region RENDER
27378
27725
  render() {
27379
- return (hAsync(Host, { key: 'c4b698b1fb80f0dcca5d7a77bc20d22db1cbf538', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, hAsync("slot", { key: '605385f07f32b989685983cfd1a082525741fba4' })));
27726
+ return (hAsync(Host, { key: 'b9e37fc1cb34272bca476c7b61db173ab2a9d238', role: "button", tabindex: "0", "aria-pressed": String(this.active), onClick: this.handleClick }, hAsync("slot", { key: 'cf9cf3445fd93873def1f9fa9cbec46c35600025' })));
27380
27727
  }
27381
27728
  static get style() { return NvTogglebuttonStyle0; }
27382
27729
  static get cmpMeta() { return {
@@ -27550,7 +27897,7 @@ class NvTogglebuttongroup {
27550
27897
  /****************************************************************************/
27551
27898
  //#region RENDER
27552
27899
  render() {
27553
- return (hAsync(Host, { key: 'ab91ff1817e3388508ed1da7a9ed57a79cf8c4bc' }, hAsync("slot", { key: '4a3280db78c1f0cd120a0cb32d95eabaf69995a6' })));
27900
+ return (hAsync(Host, { key: '7aad0160ae8e093765ba42649293e27d7b93ab75' }, hAsync("slot", { key: '39364122a5e65b1a454bd782a5daacc7edfee8b0' })));
27554
27901
  }
27555
27902
  get el() { return getElement(this); }
27556
27903
  static get watchers() { return {
@@ -27621,7 +27968,7 @@ class NvTooltip {
27621
27968
  /****************************************************************************/
27622
27969
  //#region RENDER
27623
27970
  render() {
27624
- return (hAsync(Host, { key: 'c2fdcd47be909554e31a3a7d77cd94dcb07c0d6e' }, hAsync("slot", { key: '2305f6b7175d0ba84819351f60f2a4d76d117df9' }), hAsync("nv-popover", { key: 'e388730b5858671d08981c6bbf72588a5084edbf', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, hAsync("p", { key: '73f548a1c822f7c6d5a97bb4ef8da0d335cf049e', slot: "content" }, this.message), hAsync("slot", { key: 'abb7a2dfa6a327122732802a867c5d4057fd1616', name: "content" }))));
27971
+ return (hAsync(Host, { key: '5d5facbf2a0487bda4fbae49913a2cb4f69dcf5a' }, hAsync("slot", { key: '91080d347f3473879109f7b0b59b159f5bb5979b' }), hAsync("nv-popover", { key: '876e5e2487d1b2b5182e42909a6edeab5b3e9db2', triggerMode: "hover", hasArrow: true, placement: this.placement, strategy: this.strategy, triggerElement: this.triggerElement, groupName: 'tooltip', enterDelay: this.enterDelay }, hAsync("p", { key: 'e30ce16ed27e41dee7359fb44ccba7a780e72d37', slot: "content" }, this.message), hAsync("slot", { key: '395c75d7f45bab9aaebf979bd75087058b979350', name: "content" }))));
27625
27972
  }
27626
27973
  get el() { return getElement(this); }
27627
27974
  static get style() { return NvTooltipStyle0; }
@@ -27682,6 +28029,7 @@ registerComponents([
27682
28029
  NvNotificationContainer,
27683
28030
  NvPopover,
27684
28031
  NvRow,
28032
+ NvSplit,
27685
28033
  NvStack,
27686
28034
  NvTable,
27687
28035
  NvToggle,