@ngstarter-ui/components 22.2.4 → 22.2.5

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 (82) hide show
  1. package/ai/component-registry.json +75 -8
  2. package/content-editor/BLOCK_FORMAT.md +38 -0
  3. package/data-view/API.md +262 -0
  4. package/fesm2022/ngstarter-ui-components-button.mjs +2 -2
  5. package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
  6. package/fesm2022/{ngstarter-ui-components-content-editor-attachment-block-rzZKJ2JH.mjs → ngstarter-ui-components-content-editor-attachment-block-DZqyCrEK.mjs} +2 -2
  7. package/fesm2022/{ngstarter-ui-components-content-editor-attachment-block-rzZKJ2JH.mjs.map → ngstarter-ui-components-content-editor-attachment-block-DZqyCrEK.mjs.map} +1 -1
  8. package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-DTdApN0r.mjs → ngstarter-ui-components-content-editor-callout-block-CyVPVMXi.mjs} +3 -3
  9. package/fesm2022/{ngstarter-ui-components-content-editor-callout-block-DTdApN0r.mjs.map → ngstarter-ui-components-content-editor-callout-block-CyVPVMXi.mjs.map} +1 -1
  10. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-DpONkTMU.mjs → ngstarter-ui-components-content-editor-code-block.component-Qzsc08aS.mjs} +4 -4
  11. package/fesm2022/{ngstarter-ui-components-content-editor-code-block.component-DpONkTMU.mjs.map → ngstarter-ui-components-content-editor-code-block.component-Qzsc08aS.mjs.map} +1 -1
  12. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-CmhzpaRk.mjs → ngstarter-ui-components-content-editor-embed-block-9EHRGpW_.mjs} +2 -2
  13. package/fesm2022/{ngstarter-ui-components-content-editor-embed-block-CmhzpaRk.mjs.map → ngstarter-ui-components-content-editor-embed-block-9EHRGpW_.mjs.map} +1 -1
  14. package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-gtH7yWd5.mjs → ngstarter-ui-components-content-editor-gallery-block-CBuzrmSH.mjs} +4 -4
  15. package/fesm2022/{ngstarter-ui-components-content-editor-gallery-block-gtH7yWd5.mjs.map → ngstarter-ui-components-content-editor-gallery-block-CBuzrmSH.mjs.map} +1 -1
  16. package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Pb-xV7Pw.mjs → ngstarter-ui-components-content-editor-grid-block-Sy67i4mg.mjs} +5 -5
  17. package/fesm2022/{ngstarter-ui-components-content-editor-grid-block-Pb-xV7Pw.mjs.map → ngstarter-ui-components-content-editor-grid-block-Sy67i4mg.mjs.map} +1 -1
  18. package/fesm2022/{ngstarter-ui-components-content-editor-heading-block.component-BKe9Zy_x.mjs → ngstarter-ui-components-content-editor-heading-block.component-CnDuIpxQ.mjs} +8 -5
  19. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-CnDuIpxQ.mjs.map +1 -0
  20. package/fesm2022/{ngstarter-ui-components-content-editor-image-block.component-DSpBVTu-.mjs → ngstarter-ui-components-content-editor-image-block.component-CqbgVnDh.mjs} +4 -4
  21. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-CqbgVnDh.mjs.map +1 -0
  22. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-BPKPE1uY.mjs → ngstarter-ui-components-content-editor-list-block.component-CHJr_pFf.mjs} +4 -4
  23. package/fesm2022/{ngstarter-ui-components-content-editor-list-block.component-BPKPE1uY.mjs.map → ngstarter-ui-components-content-editor-list-block.component-CHJr_pFf.mjs.map} +1 -1
  24. package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-Dh-p3WMp.mjs → ngstarter-ui-components-content-editor-nested-blocks-fPnU42nP.mjs} +4 -4
  25. package/fesm2022/{ngstarter-ui-components-content-editor-nested-blocks-Dh-p3WMp.mjs.map → ngstarter-ui-components-content-editor-nested-blocks-fPnU42nP.mjs.map} +1 -1
  26. package/fesm2022/{ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CR-NrarE.mjs → ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs} +93 -41
  27. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-dGibIV4n.mjs.map +1 -0
  28. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs → ngstarter-ui-components-content-editor-paragraph-block.component-CqU1XJTo.mjs} +4 -4
  29. package/fesm2022/{ngstarter-ui-components-content-editor-paragraph-block.component-D5wS3m6O.mjs.map → ngstarter-ui-components-content-editor-paragraph-block.component-CqU1XJTo.mjs.map} +1 -1
  30. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs → ngstarter-ui-components-content-editor-quote-block.component-fAUfABVY.mjs} +4 -4
  31. package/fesm2022/{ngstarter-ui-components-content-editor-quote-block.component-C3GFAGKF.mjs.map → ngstarter-ui-components-content-editor-quote-block.component-fAUfABVY.mjs.map} +1 -1
  32. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs → ngstarter-ui-components-content-editor-table-block.component-CqbnMNug.mjs} +4 -4
  33. package/fesm2022/{ngstarter-ui-components-content-editor-table-block.component-DQgs_kyN.mjs.map → ngstarter-ui-components-content-editor-table-block.component-CqbnMNug.mjs.map} +1 -1
  34. package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-Cb67ChE8.mjs → ngstarter-ui-components-content-editor-toggle-block-CHtnu1GQ.mjs} +3 -3
  35. package/fesm2022/{ngstarter-ui-components-content-editor-toggle-block-Cb67ChE8.mjs.map → ngstarter-ui-components-content-editor-toggle-block-CHtnu1GQ.mjs.map} +1 -1
  36. package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-CRa0g9Ez.mjs → ngstarter-ui-components-content-editor-video-block.component-DKcWb54Z.mjs} +2 -2
  37. package/fesm2022/{ngstarter-ui-components-content-editor-video-block.component-CRa0g9Ez.mjs.map → ngstarter-ui-components-content-editor-video-block.component-DKcWb54Z.mjs.map} +1 -1
  38. package/fesm2022/ngstarter-ui-components-content-editor.mjs +1 -1
  39. package/fesm2022/ngstarter-ui-components-core.mjs +46 -1
  40. package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
  41. package/fesm2022/ngstarter-ui-components-data-view.mjs +1011 -90
  42. package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
  43. package/fesm2022/ngstarter-ui-components-datepicker.mjs +45 -19
  44. package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
  45. package/fesm2022/ngstarter-ui-components-filter-builder.mjs +1 -1
  46. package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
  47. package/fesm2022/ngstarter-ui-components-form-builder.mjs +1 -1
  48. package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
  49. package/fesm2022/ngstarter-ui-components-headless-editor.mjs +1 -1
  50. package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
  51. package/fesm2022/ngstarter-ui-components-image-designer.mjs +1 -1
  52. package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
  53. package/fesm2022/ngstarter-ui-components-kanban-board.mjs +1 -1
  54. package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
  55. package/fesm2022/ngstarter-ui-components-menu.mjs +17 -4
  56. package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
  57. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +1 -1
  58. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
  59. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +1 -1
  60. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
  61. package/fesm2022/ngstarter-ui-components-phone-input.mjs +1 -1
  62. package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
  63. package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1 -1
  64. package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
  65. package/fesm2022/ngstarter-ui-components-sort.mjs +9 -2
  66. package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
  67. package/fesm2022/ngstarter-ui-components-table.mjs +10 -0
  68. package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
  69. package/package.json +1 -1
  70. package/styles/_common.scss +2 -1
  71. package/styles/_tokens.scss +32 -1
  72. package/styles/themes/default.scss +1 -1
  73. package/types/ngstarter-ui-components-content-editor.d.ts +6 -1
  74. package/types/ngstarter-ui-components-core.d.ts +4 -1
  75. package/types/ngstarter-ui-components-data-view.d.ts +204 -11
  76. package/types/ngstarter-ui-components-datepicker.d.ts +3 -1
  77. package/types/ngstarter-ui-components-menu.d.ts +5 -1
  78. package/types/ngstarter-ui-components-sort.d.ts +1 -0
  79. package/types/ngstarter-ui-components-table.d.ts +2 -0
  80. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-BKe9Zy_x.mjs.map +0 -1
  81. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-DSpBVTu-.mjs.map +0 -1
  82. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-CR-NrarE.mjs.map +0 -1
@@ -127,7 +127,7 @@ class KanbanBoard {
127
127
  this._itemWidth = targetRect.width;
128
128
  }
129
129
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: KanbanBoard, deps: [], target: i0.ɵɵFactoryTarget.Component });
130
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: KanbanBoard, isStandalone: true, selector: "ngs-kanban-board", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnEdit: "columnEdit", columnDelete: "columnDelete", itemAdd: "itemAdd", itemClick: "itemClick", itemDropped: "itemDropped", itemSorted: "itemSorted", itemTransferred: "itemTransferred" }, host: { properties: { "class.is-dragging-active": "isDraggingActive" }, classAttribute: "ngs-kanban-board" }, queries: [{ propertyName: "_itemTplDef", first: true, predicate: KanbanItemDefDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_headerContainer", first: true, predicate: ["headerContainer"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, read: ElementRef, isSignal: true }], exportAs: ["ngsKanbanBoard"], ngImport: i0, template: "<ngs-panel class=\"h-full\">\n <ngs-panel-header class=\"header\">\n <div class=\"flex flex-nowrap h-full items-center header-container\" #headerContainer>\n @for (column of columns(); track column; let index = $index) {\n <div class=\"h-full header-column relative flex gap-2 items-center justify-between flex-none\">\n <div class=\"flex gap-2 items-center uppercase text-sm\">\n @if (column.color) {\n <div class=\"size-3 rounded-full\" [style.background-color]=\"column.color\"></div>\n }\n {{ column.name }} ({{ column.items.length }})\n </div>\n <div class=\"flex gap-0.5 items-center\">\n <button ngsIconButton (click)=\"itemAdd.emit()\">\n <ngs-icon name=\"fluent:add-24-regular\"/>\n </button>\n <button ngsIconButton [ngsMenuTriggerFor]=\"columnMenu\">\n <ngs-icon name=\"fluent:more-horizontal-24-regular\"/>\n </button>\n </div>\n\n @if (_hasVerticalScroll()) {\n <div class=\"h-px bg-surface-container absolute bottom-0 start-0 end-0\"></div>\n }\n\n <ngs-menu #columnMenu=\"ngsMenu\">\n <button ngs-menu-item (click)=\"columnEdit.emit(column)\">\n <ngs-icon name=\"fluent:share-24-regular\"/>\n <span>Edit</span>\n </button>\n <button ngs-menu-item (click)=\"columnDelete.emit({ column, index })\">\n <ngs-icon name=\"fluent:delete-24-regular\"/>\n <span>Delete</span>\n </button>\n </ngs-menu>\n </div>\n }\n </div>\n </ngs-panel-header>\n <ngs-panel-content class=\"relative overflow-hidden\">\n <div #scrollContainer\n class=\"scroll-container h-full absolute overflow-auto inset-0 flex body items-baseline\">\n <div #scrollContainerContent\n class=\"flex min-h-full flex-nowrap column\" cdkDropListGroup>\n @for (column of columns(); track column) {\n <div class=\"column-container bg-surface-container-low flex-none rounded-2xl p-3 min-h-full flex flex-col gap-3\"\n cdkDropList\n [cdkDropListData]=\"column.items\"\n (cdkDropListDropped)=\"onDropped($event)\">\n @for (item of column.items; track item) {\n <div #element\n class=\"kanban-item bg-surface-container-lowest flex-none rounded-2xl\n p-3 shadow-sm cursor-pointer hover:outline-2 hover:outline-primary\"\n cdkDrag [cdkDragData]=\"item\" ngsRipple\n (mousedown)=\"itemMousedown($event)\"\n (click)=\"itemClick.emit(item)\"\n (cdkDragStarted)=\"onDragStarted($event, element)\"\n (cdkDragMoved)=\"onDragMoved($event)\"\n (cdkDragEnded)=\"onDragEnded($event)\">\n <ng-container [ngTemplateOutlet]=\"_itemTplDef().templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, column }\"/>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </ngs-panel-content>\n</ngs-panel>\n", styles: [":host{--ngs-kanban-board-col-width: calc(var(--spacing, .25rem) * 72);--ngs-kanban-board-padding-x: calc(var(--spacing, .25rem) * 10);--ngs-kanban-board-column-gap: calc(var(--spacing, .25rem) * 5);height:100%}:host .header{padding:0 var(--ngs-kanban-board-padding-x);overflow:hidden}:host .header-container{gap:var(--ngs-kanban-board-column-gap)}:host .header-column{width:var(--ngs-kanban-board-col-width);flex:none}:host .body{gap:var(--ngs-kanban-board-column-gap);padding:0 var(--ngs-kanban-board-padding-x)}:host .column{padding-bottom:var(--ngs-kanban-board-column-gap);gap:var(--ngs-kanban-board-column-gap)}:host .column-container{width:var(--ngs-kanban-board-col-width);flex:none}:host .cdk-drag-placeholder{opacity:60%}:host.is-dragging-active .scroll-container{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host.is-dragging-active .kanban-item:hover{outline:none}.kanban-item.cdk-drag-preview{background:var(--ngs-color-surface-container-lowest);padding:calc(var(--spacing, .25rem) * 3);cursor:pointer;flex:none;box-shadow:var(--ngs-shadow-sm);border-radius:var(--ngs-radius-xl)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "directive", type: Ripple, selector: "[ngsRipple]", inputs: ["ngsRippleColor", "ngsRippleUnbounded", "ngsRippleCentered", "ngsRippleRadius", "ngsRippleAnimation", "ngsRippleDisabled", "ngsRippleTrigger"], outputs: ["ngsRippleCenteredChange", "ngsRippleDisabledChange", "ngsRippleTriggerChange"], exportAs: ["ngsRipple"] }, { kind: "component", type: PanelContent, selector: "ngs-panel-content", exportAs: ["ngsPanelContent"] }, { kind: "component", type: Panel, selector: "ngs-panel", inputs: ["absolute"], exportAs: ["ngsPanel"] }, { kind: "component", type: PanelHeader, selector: "ngs-panel-header", inputs: ["flex", "autoHeight"], exportAs: ["ngsPanelHeader"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: Menu, selector: "ngs-menu", inputs: ["role", "classList", "xPosition", "yPosition", "pushIntoViewport"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
130
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: KanbanBoard, isStandalone: true, selector: "ngs-kanban-board", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, colors: { classPropertyName: "colors", publicName: "colors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnEdit: "columnEdit", columnDelete: "columnDelete", itemAdd: "itemAdd", itemClick: "itemClick", itemDropped: "itemDropped", itemSorted: "itemSorted", itemTransferred: "itemTransferred" }, host: { properties: { "class.is-dragging-active": "isDraggingActive" }, classAttribute: "ngs-kanban-board" }, queries: [{ propertyName: "_itemTplDef", first: true, predicate: KanbanItemDefDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "_headerContainer", first: true, predicate: ["headerContainer"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, read: ElementRef, isSignal: true }], exportAs: ["ngsKanbanBoard"], ngImport: i0, template: "<ngs-panel class=\"h-full\">\n <ngs-panel-header class=\"header\">\n <div class=\"flex flex-nowrap h-full items-center header-container\" #headerContainer>\n @for (column of columns(); track column; let index = $index) {\n <div class=\"h-full header-column relative flex gap-2 items-center justify-between flex-none\">\n <div class=\"flex gap-2 items-center uppercase text-sm\">\n @if (column.color) {\n <div class=\"size-3 rounded-full\" [style.background-color]=\"column.color\"></div>\n }\n {{ column.name }} ({{ column.items.length }})\n </div>\n <div class=\"flex gap-0.5 items-center\">\n <button ngsIconButton (click)=\"itemAdd.emit()\">\n <ngs-icon name=\"fluent:add-24-regular\"/>\n </button>\n <button ngsIconButton [ngsMenuTriggerFor]=\"columnMenu\">\n <ngs-icon name=\"fluent:more-horizontal-24-regular\"/>\n </button>\n </div>\n\n @if (_hasVerticalScroll()) {\n <div class=\"h-px bg-surface-container absolute bottom-0 start-0 end-0\"></div>\n }\n\n <ngs-menu #columnMenu=\"ngsMenu\">\n <button ngs-menu-item (click)=\"columnEdit.emit(column)\">\n <ngs-icon name=\"fluent:share-24-regular\"/>\n <span>Edit</span>\n </button>\n <button ngs-menu-item (click)=\"columnDelete.emit({ column, index })\">\n <ngs-icon name=\"fluent:delete-24-regular\"/>\n <span>Delete</span>\n </button>\n </ngs-menu>\n </div>\n }\n </div>\n </ngs-panel-header>\n <ngs-panel-content class=\"relative overflow-hidden\">\n <div #scrollContainer\n class=\"scroll-container h-full absolute overflow-auto inset-0 flex body items-baseline\">\n <div #scrollContainerContent\n class=\"flex min-h-full flex-nowrap column\" cdkDropListGroup>\n @for (column of columns(); track column) {\n <div class=\"column-container bg-surface-container-low flex-none rounded-2xl p-3 min-h-full flex flex-col gap-3\"\n cdkDropList\n [cdkDropListData]=\"column.items\"\n (cdkDropListDropped)=\"onDropped($event)\">\n @for (item of column.items; track item) {\n <div #element\n class=\"kanban-item bg-surface-container-lowest flex-none rounded-2xl\n p-3 shadow-sm cursor-pointer hover:outline-2 hover:outline-primary\"\n cdkDrag [cdkDragData]=\"item\" ngsRipple\n (mousedown)=\"itemMousedown($event)\"\n (click)=\"itemClick.emit(item)\"\n (cdkDragStarted)=\"onDragStarted($event, element)\"\n (cdkDragMoved)=\"onDragMoved($event)\"\n (cdkDragEnded)=\"onDragEnded($event)\">\n <ng-container [ngTemplateOutlet]=\"_itemTplDef().templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, column }\"/>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </ngs-panel-content>\n</ngs-panel>\n", styles: [":host{--ngs-kanban-board-col-width: calc(var(--spacing, .25rem) * 72);--ngs-kanban-board-padding-x: calc(var(--spacing, .25rem) * 10);--ngs-kanban-board-column-gap: calc(var(--spacing, .25rem) * 5);height:100%}:host .header{padding:0 var(--ngs-kanban-board-padding-x);overflow:hidden}:host .header-container{gap:var(--ngs-kanban-board-column-gap)}:host .header-column{width:var(--ngs-kanban-board-col-width);flex:none}:host .body{gap:var(--ngs-kanban-board-column-gap);padding:0 var(--ngs-kanban-board-padding-x)}:host .column{padding-bottom:var(--ngs-kanban-board-column-gap);gap:var(--ngs-kanban-board-column-gap)}:host .column-container{width:var(--ngs-kanban-board-col-width);flex:none}:host .cdk-drag-placeholder{opacity:60%}:host.is-dragging-active .scroll-container{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:host.is-dragging-active .kanban-item:hover{outline:none}.kanban-item.cdk-drag-preview{background:var(--ngs-color-surface-container-lowest);padding:calc(var(--spacing, .25rem) * 3);cursor:pointer;flex:none;box-shadow:var(--ngs-shadow-sm);border-radius:var(--ngs-radius-xl)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDropListGroup, selector: "[cdkDropListGroup]", inputs: ["cdkDropListGroupDisabled"], exportAs: ["cdkDropListGroup"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }, { kind: "directive", type: Ripple, selector: "[ngsRipple]", inputs: ["ngsRippleColor", "ngsRippleUnbounded", "ngsRippleCentered", "ngsRippleRadius", "ngsRippleAnimation", "ngsRippleDisabled", "ngsRippleTrigger"], outputs: ["ngsRippleCenteredChange", "ngsRippleDisabledChange", "ngsRippleTriggerChange"], exportAs: ["ngsRipple"] }, { kind: "component", type: PanelContent, selector: "ngs-panel-content", exportAs: ["ngsPanelContent"] }, { kind: "component", type: Panel, selector: "ngs-panel", inputs: ["absolute"], exportAs: ["ngsPanel"] }, { kind: "component", type: PanelHeader, selector: "ngs-panel-header", inputs: ["flex", "autoHeight"], exportAs: ["ngsPanelHeader"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: Menu, selector: "ngs-menu", inputs: ["themeSource", "role", "classList", "xPosition", "yPosition", "pushIntoViewport"], outputs: ["closed"], exportAs: ["ngsMenu"] }, { kind: "component", type: MenuItem, selector: "ngs-menu-item, [ngs-menu-item]", inputs: ["disabled", "role", "selected"], outputs: ["_triggered"], exportAs: ["ngsMenuItem"] }, { kind: "directive", type: MenuTrigger, selector: "[ngsMenuTriggerFor]", inputs: ["ngsMenuTriggerFor", "ngsMenuTriggerData", "ngsMenuDisabled", "xPosition", "yPosition", "ngsMenuTriggerRestoreFocus"], outputs: ["menuOpened", "menuClosed"], exportAs: ["ngsMenuTrigger"] }, { kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
131
131
  }
132
132
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: KanbanBoard, decorators: [{
133
133
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"ngstarter-ui-components-kanban-board.mjs","sources":["../../../projects/components/kanban-board/src/kanban-item-def.directive.ts","../../../projects/components/kanban-board/src/kanban-board/kanban-board.ts","../../../projects/components/kanban-board/src/kanban-board/kanban-board.html","../../../projects/components/kanban-board/ngstarter-ui-components-kanban-board.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[ngsKanbanItemDef]'\n})\nexport class KanbanItemDefDirective {\n readonly templateRef = inject(TemplateRef);\n}\n","import {\n Component,\n contentChild, DestroyRef,\n ElementRef,\n inject,\n input, OnInit,\n output,\n Renderer2,\n signal,\n viewChild,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport {\n CdkDrag,\n CdkDragDrop, CdkDragEnd, CdkDragMove, CdkDragStart,\n CdkDropList,\n CdkDropListGroup,\n moveItemInArray,\n transferArrayItem\n} from '@angular/cdk/drag-drop';\nimport { Icon } from '@ngstarter-ui/components/icon';\nimport { Ripple } from '@ngstarter-ui/components/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Menu, MenuItem, MenuTrigger } from '@ngstarter-ui/components/menu';\nimport { PanelContent, Panel, PanelHeader } from '@ngstarter-ui/components/panel';\nimport { KanbanColumn, KanbanItem, KanbanItemSortedEvent, KanbanItemTransferredEvent } from '../types';\nimport { KanbanItemDefDirective } from '../kanban-item-def.directive';\nimport { fromEvent } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Button } from '@ngstarter-ui/components/button';\n\n@Component({\n selector: 'ngs-kanban-board',\n exportAs: 'ngsKanbanBoard',\n imports: [\n CdkDrag,\n CdkDropList,\n CdkDropListGroup,\n Icon,\n\n Ripple,\n PanelContent,\n Panel,\n PanelHeader,\n NgTemplateOutlet,\n FormsModule,\n Menu,\n MenuItem,\n MenuTrigger,\n Button\n ],\n templateUrl: './kanban-board.html',\n styleUrl: './kanban-board.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-kanban-board',\n '[class.is-dragging-active]': 'isDraggingActive'\n }\n})\nexport class KanbanBoard<T extends KanbanColumn<K>, K extends KanbanItem> implements OnInit {\n protected _itemTplDef = contentChild.required(KanbanItemDefDirective);\n private _headerContainer = viewChild.required('headerContainer', { read: ElementRef });\n private _scrollContainer = viewChild.required('scrollContainer', { read: ElementRef });\n private _renderer = inject(Renderer2);\n private _destroyRef = inject(DestroyRef);\n\n columns = input<T[]>([]);\n colors = input<string[]>([]);\n\n protected _hasVerticalScroll = signal(false);\n\n readonly columnEdit = output<T>();\n readonly columnDelete = output<{ column: T, index: number }>();\n readonly itemAdd = output<void>();\n readonly itemClick = output<K>();\n readonly itemDropped = output<CdkDragDrop<K[]>>();\n readonly itemSorted = output<KanbanItemSortedEvent>();\n readonly itemTransferred = output<KanbanItemTransferredEvent<K>>();\n\n private _startContainerXOffset = 0;\n private _itemXOffset = 0;\n private _itemWidth = 0;\n protected isDraggingActive = false;\n private _autoScrollStarted = false;\n\n ngOnInit() {\n fromEvent(this._scrollContainer().nativeElement, 'scroll')\n .pipe(\n takeUntilDestroyed(this._destroyRef)\n )\n .subscribe((event: any) => {\n this.onScroll(event);\n });\n }\n\n onDropped(event: CdkDragDrop<K[]>) {\n this.itemDropped.emit(event);\n\n if (event.previousContainer === event.container) {\n this.itemSorted.emit({\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex\n });\n moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);\n } else {\n this.itemTransferred.emit({\n previousContainerData: event.previousContainer.data,\n currentContainerData: event.container.data,\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex\n });\n transferArrayItem(\n event.previousContainer.data,\n event.container.data,\n event.previousIndex,\n event.currentIndex,\n );\n }\n }\n\n onScroll(event: Event) {\n const target = event.target as HTMLElement;\n const headerContainerElement = this._headerContainer().nativeElement as HTMLElement;\n this._renderer.setStyle(headerContainerElement, 'transform', `translate(-${target.scrollLeft}px, 0)`);\n this._hasVerticalScroll.set(target.scrollTop > 0);\n }\n\n onDragStarted(event: CdkDragStart, element: HTMLElement) {\n this.isDraggingActive = true;\n }\n\n onDragMoved(event: CdkDragMove<K>) {\n const space = 100;\n const scrollContainer = this._scrollContainer().nativeElement as HTMLElement;\n const scrollContainerWidth = scrollContainer.getBoundingClientRect().width;\n const itemOffsetXStart = this._startContainerXOffset + event.distance.x;\n const itemOffsetXEnd = this._startContainerXOffset + event.distance.x + this._itemWidth;\n\n if (!this._autoScrollStarted) {\n if (itemOffsetXEnd + space >= scrollContainerWidth) {\n this._autoScrollStarted = true;\n scrollContainer.scroll({\n left: scrollContainer.scrollLeft + this._itemWidth * 2,\n behavior: 'smooth'\n });\n setTimeout(() => {\n this._autoScrollStarted = false;\n }, 500);\n } else if (itemOffsetXStart <= space && scrollContainer.scrollLeft > 0) {\n this._autoScrollStarted = true;\n scrollContainer.scroll({\n left: scrollContainer.scrollLeft - this._itemWidth * 2,\n behavior: 'smooth'\n });\n setTimeout(() => {\n this._autoScrollStarted = false;\n }, 500);\n }\n }\n }\n\n onDragEnded(event: CdkDragEnd) {\n this.isDraggingActive = false;\n }\n\n protected itemMousedown(event: MouseEvent) {\n const scrollContainerElement = this._scrollContainer().nativeElement as HTMLElement;\n let targetElement = event.target as Element;\n\n if (!targetElement.classList.contains('kanban-item')) {\n targetElement = targetElement.closest('.kanban-item') as HTMLElement;\n }\n\n const targetRect = targetElement.getBoundingClientRect();\n this._startContainerXOffset = targetRect.x - scrollContainerElement.getBoundingClientRect().x;\n this._itemXOffset = event.clientX - targetRect.x;\n this._itemWidth = targetRect.width;\n }\n}\n","<ngs-panel class=\"h-full\">\n <ngs-panel-header class=\"header\">\n <div class=\"flex flex-nowrap h-full items-center header-container\" #headerContainer>\n @for (column of columns(); track column; let index = $index) {\n <div class=\"h-full header-column relative flex gap-2 items-center justify-between flex-none\">\n <div class=\"flex gap-2 items-center uppercase text-sm\">\n @if (column.color) {\n <div class=\"size-3 rounded-full\" [style.background-color]=\"column.color\"></div>\n }\n {{ column.name }} ({{ column.items.length }})\n </div>\n <div class=\"flex gap-0.5 items-center\">\n <button ngsIconButton (click)=\"itemAdd.emit()\">\n <ngs-icon name=\"fluent:add-24-regular\"/>\n </button>\n <button ngsIconButton [ngsMenuTriggerFor]=\"columnMenu\">\n <ngs-icon name=\"fluent:more-horizontal-24-regular\"/>\n </button>\n </div>\n\n @if (_hasVerticalScroll()) {\n <div class=\"h-px bg-surface-container absolute bottom-0 start-0 end-0\"></div>\n }\n\n <ngs-menu #columnMenu=\"ngsMenu\">\n <button ngs-menu-item (click)=\"columnEdit.emit(column)\">\n <ngs-icon name=\"fluent:share-24-regular\"/>\n <span>Edit</span>\n </button>\n <button ngs-menu-item (click)=\"columnDelete.emit({ column, index })\">\n <ngs-icon name=\"fluent:delete-24-regular\"/>\n <span>Delete</span>\n </button>\n </ngs-menu>\n </div>\n }\n </div>\n </ngs-panel-header>\n <ngs-panel-content class=\"relative overflow-hidden\">\n <div #scrollContainer\n class=\"scroll-container h-full absolute overflow-auto inset-0 flex body items-baseline\">\n <div #scrollContainerContent\n class=\"flex min-h-full flex-nowrap column\" cdkDropListGroup>\n @for (column of columns(); track column) {\n <div class=\"column-container bg-surface-container-low flex-none rounded-2xl p-3 min-h-full flex flex-col gap-3\"\n cdkDropList\n [cdkDropListData]=\"column.items\"\n (cdkDropListDropped)=\"onDropped($event)\">\n @for (item of column.items; track item) {\n <div #element\n class=\"kanban-item bg-surface-container-lowest flex-none rounded-2xl\n p-3 shadow-sm cursor-pointer hover:outline-2 hover:outline-primary\"\n cdkDrag [cdkDragData]=\"item\" ngsRipple\n (mousedown)=\"itemMousedown($event)\"\n (click)=\"itemClick.emit(item)\"\n (cdkDragStarted)=\"onDragStarted($event, element)\"\n (cdkDragMoved)=\"onDragMoved($event)\"\n (cdkDragEnded)=\"onDragEnded($event)\">\n <ng-container [ngTemplateOutlet]=\"_itemTplDef().templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, column }\"/>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </ngs-panel-content>\n</ngs-panel>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAKa,sBAAsB,CAAA;AACxB,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;uGAD/B,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAA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QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE/DvF;;AAEG;;;;"}
1
+ {"version":3,"file":"ngstarter-ui-components-kanban-board.mjs","sources":["../../../projects/components/kanban-board/src/kanban-item-def.directive.ts","../../../projects/components/kanban-board/src/kanban-board/kanban-board.ts","../../../projects/components/kanban-board/src/kanban-board/kanban-board.html","../../../projects/components/kanban-board/ngstarter-ui-components-kanban-board.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[ngsKanbanItemDef]'\n})\nexport class KanbanItemDefDirective {\n readonly templateRef = inject(TemplateRef);\n}\n","import {\n Component,\n contentChild, DestroyRef,\n ElementRef,\n inject,\n input, OnInit,\n output,\n Renderer2,\n signal,\n viewChild,\n ChangeDetectionStrategy\n} from '@angular/core';\nimport {\n CdkDrag,\n CdkDragDrop, CdkDragEnd, CdkDragMove, CdkDragStart,\n CdkDropList,\n CdkDropListGroup,\n moveItemInArray,\n transferArrayItem\n} from '@angular/cdk/drag-drop';\nimport { Icon } from '@ngstarter-ui/components/icon';\nimport { Ripple } from '@ngstarter-ui/components/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { Menu, MenuItem, MenuTrigger } from '@ngstarter-ui/components/menu';\nimport { PanelContent, Panel, PanelHeader } from '@ngstarter-ui/components/panel';\nimport { KanbanColumn, KanbanItem, KanbanItemSortedEvent, KanbanItemTransferredEvent } from '../types';\nimport { KanbanItemDefDirective } from '../kanban-item-def.directive';\nimport { fromEvent } from 'rxjs';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Button } from '@ngstarter-ui/components/button';\n\n@Component({\n selector: 'ngs-kanban-board',\n exportAs: 'ngsKanbanBoard',\n imports: [\n CdkDrag,\n CdkDropList,\n CdkDropListGroup,\n Icon,\n\n Ripple,\n PanelContent,\n Panel,\n PanelHeader,\n NgTemplateOutlet,\n FormsModule,\n Menu,\n MenuItem,\n MenuTrigger,\n Button\n ],\n templateUrl: './kanban-board.html',\n styleUrl: './kanban-board.scss',\n changeDetection: ChangeDetectionStrategy.Eager,\n host: {\n 'class': 'ngs-kanban-board',\n '[class.is-dragging-active]': 'isDraggingActive'\n }\n})\nexport class KanbanBoard<T extends KanbanColumn<K>, K extends KanbanItem> implements OnInit {\n protected _itemTplDef = contentChild.required(KanbanItemDefDirective);\n private _headerContainer = viewChild.required('headerContainer', { read: ElementRef });\n private _scrollContainer = viewChild.required('scrollContainer', { read: ElementRef });\n private _renderer = inject(Renderer2);\n private _destroyRef = inject(DestroyRef);\n\n columns = input<T[]>([]);\n colors = input<string[]>([]);\n\n protected _hasVerticalScroll = signal(false);\n\n readonly columnEdit = output<T>();\n readonly columnDelete = output<{ column: T, index: number }>();\n readonly itemAdd = output<void>();\n readonly itemClick = output<K>();\n readonly itemDropped = output<CdkDragDrop<K[]>>();\n readonly itemSorted = output<KanbanItemSortedEvent>();\n readonly itemTransferred = output<KanbanItemTransferredEvent<K>>();\n\n private _startContainerXOffset = 0;\n private _itemXOffset = 0;\n private _itemWidth = 0;\n protected isDraggingActive = false;\n private _autoScrollStarted = false;\n\n ngOnInit() {\n fromEvent(this._scrollContainer().nativeElement, 'scroll')\n .pipe(\n takeUntilDestroyed(this._destroyRef)\n )\n .subscribe((event: any) => {\n this.onScroll(event);\n });\n }\n\n onDropped(event: CdkDragDrop<K[]>) {\n this.itemDropped.emit(event);\n\n if (event.previousContainer === event.container) {\n this.itemSorted.emit({\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex\n });\n moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);\n } else {\n this.itemTransferred.emit({\n previousContainerData: event.previousContainer.data,\n currentContainerData: event.container.data,\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex\n });\n transferArrayItem(\n event.previousContainer.data,\n event.container.data,\n event.previousIndex,\n event.currentIndex,\n );\n }\n }\n\n onScroll(event: Event) {\n const target = event.target as HTMLElement;\n const headerContainerElement = this._headerContainer().nativeElement as HTMLElement;\n this._renderer.setStyle(headerContainerElement, 'transform', `translate(-${target.scrollLeft}px, 0)`);\n this._hasVerticalScroll.set(target.scrollTop > 0);\n }\n\n onDragStarted(event: CdkDragStart, element: HTMLElement) {\n this.isDraggingActive = true;\n }\n\n onDragMoved(event: CdkDragMove<K>) {\n const space = 100;\n const scrollContainer = this._scrollContainer().nativeElement as HTMLElement;\n const scrollContainerWidth = scrollContainer.getBoundingClientRect().width;\n const itemOffsetXStart = this._startContainerXOffset + event.distance.x;\n const itemOffsetXEnd = this._startContainerXOffset + event.distance.x + this._itemWidth;\n\n if (!this._autoScrollStarted) {\n if (itemOffsetXEnd + space >= scrollContainerWidth) {\n this._autoScrollStarted = true;\n scrollContainer.scroll({\n left: scrollContainer.scrollLeft + this._itemWidth * 2,\n behavior: 'smooth'\n });\n setTimeout(() => {\n this._autoScrollStarted = false;\n }, 500);\n } else if (itemOffsetXStart <= space && scrollContainer.scrollLeft > 0) {\n this._autoScrollStarted = true;\n scrollContainer.scroll({\n left: scrollContainer.scrollLeft - this._itemWidth * 2,\n behavior: 'smooth'\n });\n setTimeout(() => {\n this._autoScrollStarted = false;\n }, 500);\n }\n }\n }\n\n onDragEnded(event: CdkDragEnd) {\n this.isDraggingActive = false;\n }\n\n protected itemMousedown(event: MouseEvent) {\n const scrollContainerElement = this._scrollContainer().nativeElement as HTMLElement;\n let targetElement = event.target as Element;\n\n if (!targetElement.classList.contains('kanban-item')) {\n targetElement = targetElement.closest('.kanban-item') as HTMLElement;\n }\n\n const targetRect = targetElement.getBoundingClientRect();\n this._startContainerXOffset = targetRect.x - scrollContainerElement.getBoundingClientRect().x;\n this._itemXOffset = event.clientX - targetRect.x;\n this._itemWidth = targetRect.width;\n }\n}\n","<ngs-panel class=\"h-full\">\n <ngs-panel-header class=\"header\">\n <div class=\"flex flex-nowrap h-full items-center header-container\" #headerContainer>\n @for (column of columns(); track column; let index = $index) {\n <div class=\"h-full header-column relative flex gap-2 items-center justify-between flex-none\">\n <div class=\"flex gap-2 items-center uppercase text-sm\">\n @if (column.color) {\n <div class=\"size-3 rounded-full\" [style.background-color]=\"column.color\"></div>\n }\n {{ column.name }} ({{ column.items.length }})\n </div>\n <div class=\"flex gap-0.5 items-center\">\n <button ngsIconButton (click)=\"itemAdd.emit()\">\n <ngs-icon name=\"fluent:add-24-regular\"/>\n </button>\n <button ngsIconButton [ngsMenuTriggerFor]=\"columnMenu\">\n <ngs-icon name=\"fluent:more-horizontal-24-regular\"/>\n </button>\n </div>\n\n @if (_hasVerticalScroll()) {\n <div class=\"h-px bg-surface-container absolute bottom-0 start-0 end-0\"></div>\n }\n\n <ngs-menu #columnMenu=\"ngsMenu\">\n <button ngs-menu-item (click)=\"columnEdit.emit(column)\">\n <ngs-icon name=\"fluent:share-24-regular\"/>\n <span>Edit</span>\n </button>\n <button ngs-menu-item (click)=\"columnDelete.emit({ column, index })\">\n <ngs-icon name=\"fluent:delete-24-regular\"/>\n <span>Delete</span>\n </button>\n </ngs-menu>\n </div>\n }\n </div>\n </ngs-panel-header>\n <ngs-panel-content class=\"relative overflow-hidden\">\n <div #scrollContainer\n class=\"scroll-container h-full absolute overflow-auto inset-0 flex body items-baseline\">\n <div #scrollContainerContent\n class=\"flex min-h-full flex-nowrap column\" cdkDropListGroup>\n @for (column of columns(); track column) {\n <div class=\"column-container bg-surface-container-low flex-none rounded-2xl p-3 min-h-full flex flex-col gap-3\"\n cdkDropList\n [cdkDropListData]=\"column.items\"\n (cdkDropListDropped)=\"onDropped($event)\">\n @for (item of column.items; track item) {\n <div #element\n class=\"kanban-item bg-surface-container-lowest flex-none rounded-2xl\n p-3 shadow-sm cursor-pointer hover:outline-2 hover:outline-primary\"\n cdkDrag [cdkDragData]=\"item\" ngsRipple\n (mousedown)=\"itemMousedown($event)\"\n (click)=\"itemClick.emit(item)\"\n (cdkDragStarted)=\"onDragStarted($event, element)\"\n (cdkDragMoved)=\"onDragMoved($event)\"\n (cdkDragEnded)=\"onDragEnded($event)\">\n <ng-container [ngTemplateOutlet]=\"_itemTplDef().templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: item, column }\"/>\n </div>\n }\n </div>\n }\n </div>\n </div>\n </ngs-panel-content>\n</ngs-panel>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAKa,sBAAsB,CAAA;AACxB,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;uGAD/B,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAA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,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE/DvF;;AAEG;;;;"}
@@ -3,6 +3,7 @@ import { InjectionToken, inject, Injector, input, booleanAttribute, output, Elem
3
3
  import { NgTemplateOutlet } from '@angular/common';
4
4
  import { outputToObservable, takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
5
5
  import { Subject, Subscription, merge, fromEvent, EMPTY, startWith, switchMap } from 'rxjs';
6
+ import { bindNgsOverlayTheme } from '@ngstarter-ui/components/core';
6
7
  import { Overlay, OverlayConfig } from '@angular/cdk/overlay';
7
8
  import { TemplatePortal } from '@angular/cdk/portal';
8
9
  import { filter } from 'rxjs/operators';
@@ -94,6 +95,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
94
95
  }] });
95
96
 
96
97
  class Menu {
98
+ /** Optional scope whose tokens should follow this detached overlay. */
99
+ themeSource = input(null, /* @ts-ignore */
100
+ ...(ngDevMode ? [{ debugName: "themeSource" }] : /* istanbul ignore next */ []));
97
101
  role = input('menu', /* @ts-ignore */
98
102
  ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
99
103
  classList = input('', /* @ts-ignore */
@@ -117,6 +121,7 @@ class Menu {
117
121
  ...(ngDevMode ? [{ debugName: "_isNested" }] : /* istanbul ignore next */ []));
118
122
  _context = signal(undefined, /* @ts-ignore */
119
123
  ...(ngDevMode ? [{ debugName: "_context" }] : /* istanbul ignore next */ []));
124
+ context = this._context.asReadonly();
120
125
  _parentMenu = inject(Menu, { optional: true, skipSelf: true });
121
126
  _parentMenuTrigger = inject(MENU_TRIGGER, { optional: true });
122
127
  _itemSubscription = Subscription.EMPTY;
@@ -167,7 +172,7 @@ class Menu {
167
172
  return !!this._openedTrigger && this._openedTrigger.menuOpen();
168
173
  }
169
174
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Menu, deps: [], target: i0.ɵɵFactoryTarget.Component });
170
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: Menu, isStandalone: true, selector: "ngs-menu", inputs: { role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, classList: { classPropertyName: "classList", publicName: "classList", isSignal: true, isRequired: false, transformFunction: null }, xPosition: { classPropertyName: "xPosition", publicName: "xPosition", isSignal: true, isRequired: false, transformFunction: null }, yPosition: { classPropertyName: "yPosition", publicName: "yPosition", isSignal: true, isRequired: false, transformFunction: null }, pushIntoViewport: { classPropertyName: "pushIntoViewport", publicName: "pushIntoViewport", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.role": "role()", "class.ngs-menu": "true" } }, queries: [{ propertyName: "content", first: true, predicate: MenuContent, descendants: true, isSignal: true }, { propertyName: "items", predicate: MenuItem, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], exportAs: ["ngsMenu"], ngImport: i0, template: "<ng-template>\n <div\n class=\"ngs-menu-panel\"\n [class]=\"classList()\"\n [class.ngs-menu-before]=\"_panelClasses().includes('ngs-menu-before')\"\n [class.ngs-menu-after]=\"_panelClasses().includes('ngs-menu-after')\"\n [class.ngs-menu-above]=\"_panelClasses().includes('ngs-menu-above')\"\n [class.ngs-menu-below]=\"_panelClasses().includes('ngs-menu-below')\"\n tabindex=\"-1\"\n role=\"menu\"\n >\n <ng-content select=\"ngs-menu-header,[ngs-menu-header]\"/>\n <div class=\"ngs-menu-content\">\n @if (content()) {\n <ng-container [ngTemplateOutlet]=\"content()!.templateRef\" [ngTemplateOutletContext]=\"_context()\" />\n } @else {\n <ng-content />\n }\n </div>\n <ng-content select=\"ngs-menu-footer,[ngs-menu-footer]\"/>\n </div>\n</ng-template>\n", styles: [":host{display:contents}.ngs-menu-panel{background:var(--ngs-menu-background, var(--ngs-dropdown-bg));box-shadow:var(--ngs-menu-shadow, var(--ngs-dropdown-shadow));border-radius:var(--ngs-dropdown-radius);max-height:var(--ngs-menu-max-height, var(--ngs-dropdown-max-height, 16rem));display:flex;flex-direction:column;min-width:var(--ngs-menu-min-width, 112px);max-width:var(--ngs-menu-max-width, 280px);outline:var(--ngs-menu-border, var(--ngs-dropdown-border));overflow:hidden;animation-name:ngs-menu-panel-showing;animation-duration:.15s;animation-timing-function:cubic-bezier(0,0,.2,1)}.ngs-menu-panel.ngs-menu-below{transform-origin:top}.ngs-menu-panel.ngs-menu-below.ngs-menu-before{transform-origin:top right}.ngs-menu-panel.ngs-menu-below.ngs-menu-after{transform-origin:top left}.ngs-menu-panel.ngs-menu-above{transform-origin:bottom}.ngs-menu-panel.ngs-menu-above.ngs-menu-before{transform-origin:bottom right}.ngs-menu-panel.ngs-menu-above.ngs-menu-after{transform-origin:bottom left}@keyframes ngs-menu-panel-showing{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}.ngs-menu-content{overflow:auto;max-height:inherit;padding:var(--ngs-menu-padding, var(--ngs-dropdown-padding, calc(var(--spacing, .25rem) * 2)))}ngs-menu-header,ngs-menu-footer,[ngs-menu-header],[ngs-menu-footer]{flex:none;z-index:1}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
175
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: Menu, isStandalone: true, selector: "ngs-menu", inputs: { themeSource: { classPropertyName: "themeSource", publicName: "themeSource", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, classList: { classPropertyName: "classList", publicName: "classList", isSignal: true, isRequired: false, transformFunction: null }, xPosition: { classPropertyName: "xPosition", publicName: "xPosition", isSignal: true, isRequired: false, transformFunction: null }, yPosition: { classPropertyName: "yPosition", publicName: "yPosition", isSignal: true, isRequired: false, transformFunction: null }, pushIntoViewport: { classPropertyName: "pushIntoViewport", publicName: "pushIntoViewport", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "attr.role": "role()", "class.ngs-menu": "true" } }, queries: [{ propertyName: "content", first: true, predicate: MenuContent, descendants: true, isSignal: true }, { propertyName: "items", predicate: MenuItem, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], exportAs: ["ngsMenu"], ngImport: i0, template: "<ng-template>\n <div\n class=\"ngs-menu-panel\"\n [class]=\"classList()\"\n [class.ngs-menu-before]=\"_panelClasses().includes('ngs-menu-before')\"\n [class.ngs-menu-after]=\"_panelClasses().includes('ngs-menu-after')\"\n [class.ngs-menu-above]=\"_panelClasses().includes('ngs-menu-above')\"\n [class.ngs-menu-below]=\"_panelClasses().includes('ngs-menu-below')\"\n tabindex=\"-1\"\n role=\"menu\"\n >\n <ng-content select=\"ngs-menu-header,[ngs-menu-header]\"/>\n <div class=\"ngs-menu-content\">\n @if (content()) {\n <ng-container [ngTemplateOutlet]=\"content()!.templateRef\" [ngTemplateOutletContext]=\"_context()\" />\n } @else {\n <ng-content />\n }\n </div>\n <ng-content select=\"ngs-menu-footer,[ngs-menu-footer]\"/>\n </div>\n</ng-template>\n", styles: [":host{display:contents}.ngs-menu-panel{background:var(--ngs-menu-background, var(--ngs-dropdown-bg));box-shadow:var(--ngs-menu-shadow, var(--ngs-dropdown-shadow));border-radius:var(--ngs-dropdown-radius);max-height:var(--ngs-menu-max-height, var(--ngs-dropdown-max-height, 16rem));display:flex;flex-direction:column;min-width:var(--ngs-menu-min-width, 112px);max-width:var(--ngs-menu-max-width, 280px);outline:var(--ngs-menu-border, var(--ngs-dropdown-border));overflow:hidden;animation-name:ngs-menu-panel-showing;animation-duration:.15s;animation-timing-function:cubic-bezier(0,0,.2,1)}.ngs-menu-panel.ngs-menu-below{transform-origin:top}.ngs-menu-panel.ngs-menu-below.ngs-menu-before{transform-origin:top right}.ngs-menu-panel.ngs-menu-below.ngs-menu-after{transform-origin:top left}.ngs-menu-panel.ngs-menu-above{transform-origin:bottom}.ngs-menu-panel.ngs-menu-above.ngs-menu-before{transform-origin:bottom right}.ngs-menu-panel.ngs-menu-above.ngs-menu-after{transform-origin:bottom left}@keyframes ngs-menu-panel-showing{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}.ngs-menu-content{overflow:auto;max-height:inherit;padding:var(--ngs-menu-padding, var(--ngs-dropdown-padding, calc(var(--spacing, .25rem) * 2)))}ngs-menu-header,ngs-menu-footer,[ngs-menu-header],[ngs-menu-footer]{flex:none;z-index:1}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
171
176
  }
172
177
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Menu, decorators: [{
173
178
  type: Component,
@@ -177,7 +182,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
177
182
  '[attr.role]': 'role()',
178
183
  '[class.ngs-menu]': 'true',
179
184
  }, template: "<ng-template>\n <div\n class=\"ngs-menu-panel\"\n [class]=\"classList()\"\n [class.ngs-menu-before]=\"_panelClasses().includes('ngs-menu-before')\"\n [class.ngs-menu-after]=\"_panelClasses().includes('ngs-menu-after')\"\n [class.ngs-menu-above]=\"_panelClasses().includes('ngs-menu-above')\"\n [class.ngs-menu-below]=\"_panelClasses().includes('ngs-menu-below')\"\n tabindex=\"-1\"\n role=\"menu\"\n >\n <ng-content select=\"ngs-menu-header,[ngs-menu-header]\"/>\n <div class=\"ngs-menu-content\">\n @if (content()) {\n <ng-container [ngTemplateOutlet]=\"content()!.templateRef\" [ngTemplateOutletContext]=\"_context()\" />\n } @else {\n <ng-content />\n }\n </div>\n <ng-content select=\"ngs-menu-footer,[ngs-menu-footer]\"/>\n </div>\n</ng-template>\n", styles: [":host{display:contents}.ngs-menu-panel{background:var(--ngs-menu-background, var(--ngs-dropdown-bg));box-shadow:var(--ngs-menu-shadow, var(--ngs-dropdown-shadow));border-radius:var(--ngs-dropdown-radius);max-height:var(--ngs-menu-max-height, var(--ngs-dropdown-max-height, 16rem));display:flex;flex-direction:column;min-width:var(--ngs-menu-min-width, 112px);max-width:var(--ngs-menu-max-width, 280px);outline:var(--ngs-menu-border, var(--ngs-dropdown-border));overflow:hidden;animation-name:ngs-menu-panel-showing;animation-duration:.15s;animation-timing-function:cubic-bezier(0,0,.2,1)}.ngs-menu-panel.ngs-menu-below{transform-origin:top}.ngs-menu-panel.ngs-menu-below.ngs-menu-before{transform-origin:top right}.ngs-menu-panel.ngs-menu-below.ngs-menu-after{transform-origin:top left}.ngs-menu-panel.ngs-menu-above{transform-origin:bottom}.ngs-menu-panel.ngs-menu-above.ngs-menu-before{transform-origin:bottom right}.ngs-menu-panel.ngs-menu-above.ngs-menu-after{transform-origin:bottom left}@keyframes ngs-menu-panel-showing{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}.ngs-menu-content{overflow:auto;max-height:inherit;padding:var(--ngs-menu-padding, var(--ngs-dropdown-padding, calc(var(--spacing, .25rem) * 2)))}ngs-menu-header,ngs-menu-footer,[ngs-menu-header],[ngs-menu-footer]{flex:none;z-index:1}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
180
- }], ctorParameters: () => [], propDecorators: { role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], classList: [{ type: i0.Input, args: [{ isSignal: true, alias: "classList", required: false }] }], xPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "xPosition", required: false }] }], yPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "yPosition", required: false }] }], pushIntoViewport: [{ type: i0.Input, args: [{ isSignal: true, alias: "pushIntoViewport", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], templateRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], content: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MenuContent), { isSignal: true }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => MenuItem), { ...{ descendants: true }, isSignal: true }] }] } });
185
+ }], ctorParameters: () => [], propDecorators: { themeSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "themeSource", required: false }] }], role: [{ type: i0.Input, args: [{ isSignal: true, alias: "role", required: false }] }], classList: [{ type: i0.Input, args: [{ isSignal: true, alias: "classList", required: false }] }], xPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "xPosition", required: false }] }], yPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "yPosition", required: false }] }], pushIntoViewport: [{ type: i0.Input, args: [{ isSignal: true, alias: "pushIntoViewport", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], templateRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }], content: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MenuContent), { isSignal: true }] }], items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => MenuItem), { ...{ descendants: true }, isSignal: true }] }] } });
181
186
 
182
187
  class MenuDivider {
183
188
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MenuDivider, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -190,11 +195,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
190
195
 
191
196
  class MenuHeading {
192
197
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MenuHeading, deps: [], target: i0.ɵɵFactoryTarget.Component });
193
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: MenuHeading, isStandalone: true, selector: "ngs-menu-heading", ngImport: i0, template: "<ng-content/>\n", styles: [":host{display:block;font-size:var(--ngs-font-size-xs);margin:calc(var(--spacing, .25rem) * 2) 0;padding:0 calc(var(--spacing, .25rem) * 3);color:var(--ngs-color-neutral-700)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.Eager });
198
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", type: MenuHeading, isStandalone: true, selector: "ngs-menu-heading", ngImport: i0, template: "<ng-content/>\n", styles: [":host{display:block;font-size:var(--ngs-font-size-xs);margin:calc(var(--spacing, .25rem) * 2) 0;padding:0 calc(var(--spacing, .25rem) * 3);color:var(--ngs-menu-heading-color, var(--ngs-color-on-surface-variant))}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], changeDetection: i0.ChangeDetectionStrategy.Eager });
194
199
  }
195
200
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: MenuHeading, decorators: [{
196
201
  type: Component,
197
- args: [{ selector: 'ngs-menu-heading', imports: [], changeDetection: ChangeDetectionStrategy.Eager, template: "<ng-content/>\n", styles: [":host{display:block;font-size:var(--ngs-font-size-xs);margin:calc(var(--spacing, .25rem) * 2) 0;padding:0 calc(var(--spacing, .25rem) * 3);color:var(--ngs-color-neutral-700)}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
202
+ args: [{ selector: 'ngs-menu-heading', imports: [], changeDetection: ChangeDetectionStrategy.Eager, template: "<ng-content/>\n", styles: [":host{display:block;font-size:var(--ngs-font-size-xs);margin:calc(var(--spacing, .25rem) * 2) 0;padding:0 calc(var(--spacing, .25rem) * 3);color:var(--ngs-menu-heading-color, var(--ngs-color-on-surface-variant))}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
198
203
  }] });
199
204
 
200
205
  class MenuTrigger {
@@ -225,6 +230,8 @@ class MenuTrigger {
225
230
  menuOpen = signal(false, /* @ts-ignore */
226
231
  ...(ngDevMode ? [{ debugName: "menuOpen" }] : /* istanbul ignore next */ []));
227
232
  ngOnDestroy() {
233
+ this.themeCleanup?.();
234
+ this.themeCleanup = null;
228
235
  if (this._overlayRef) {
229
236
  this._overlayRef.dispose();
230
237
  this._overlayRef = null;
@@ -261,6 +268,7 @@ class MenuTrigger {
261
268
  this.menuOpen() ? this.closeMenu('click') : this.openMenu();
262
269
  }
263
270
  }
271
+ themeCleanup = null;
264
272
  openMenu() {
265
273
  const menu = this.menu();
266
274
  if (this.menuOpen() || !menu) {
@@ -275,6 +283,9 @@ class MenuTrigger {
275
283
  menu._setContext(this.menuData());
276
284
  this._portal = new TemplatePortal(menu.templateRef(), this._viewContainerRef, this._viewContainerRef.injector);
277
285
  overlayRef.attach(this._portal);
286
+ this.themeCleanup?.();
287
+ const themeSource = menu.themeSource();
288
+ this.themeCleanup = themeSource ? bindNgsOverlayTheme(themeSource, overlayRef.overlayElement) : null;
278
289
  if (overlayRef.hasAttached()) {
279
290
  this._setIsMenuOpen(true);
280
291
  const overlayElement = overlayRef.overlayElement;
@@ -313,6 +324,8 @@ class MenuTrigger {
313
324
  if (this._menu) {
314
325
  this._menu._triggerClosed(this);
315
326
  }
327
+ this.themeCleanup?.();
328
+ this.themeCleanup = null;
316
329
  this._overlayRef.detach();
317
330
  this._closingSubscription.unsubscribe();
318
331
  this._hoverSubscription.unsubscribe();