@fuentis/phoenix-ui 0.0.9-alpha.331 → 0.0.9-alpha.332

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.
@@ -1270,21 +1270,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1270
1270
 
1271
1271
  class ShellComponent {
1272
1272
  config;
1273
+ /**
1274
+ * TODO: mark `darkModeSelector` as deprecated
1275
+ * Reason: This wouldn't allow 'system' mode
1276
+ * - It is a better api generally speaking compared to what we have now
1277
+ * //@deprecated
1278
+ */
1273
1279
  darkModeSelector = { mode: 'dark' };
1280
+ /**
1281
+ * TODO: mark `onDarkModeSelect` as deprecated
1282
+ * Reason: the function is too specific and should be handled by the themeChange event
1283
+ * //@deprecated
1284
+ */
1274
1285
  onDarkModeSelect = new EventEmitter();
1275
1286
  onIsSlimSelect = new EventEmitter();
1276
1287
  onUserAction = new EventEmitter();
1277
1288
  sliderClick = new EventEmitter();
1289
+ // Theme
1290
+ theme = { mode: 'system' };
1291
+ themeChange = new EventEmitter();
1278
1292
  isSlim;
1279
1293
  toggleSidebar(isSlim) {
1280
1294
  this.isSlim = isSlim;
1281
1295
  this.onIsSlimSelect.emit(this.isSlim);
1282
1296
  }
1297
+ setTheme(mode) {
1298
+ this.theme = { mode };
1299
+ this.themeChange.emit(this.theme);
1300
+ }
1283
1301
  selectDarkMode() {
1284
1302
  this.onDarkModeSelect.emit(this.darkModeSelector);
1285
1303
  }
1286
1304
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1287
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ShellComponent, isStandalone: true, selector: "pho-shell", inputs: { config: "config", darkModeSelector: "darkModeSelector" }, outputs: { onDarkModeSelect: "onDarkModeSelect", onIsSlimSelect: "onIsSlimSelect", onUserAction: "onUserAction", sliderClick: "sliderClick" }, ngImport: i0, template: "<!-- Sidebar Layout -->\n<div\n [style]=\"{\n 'grid-template-rows': '3.5rem 1fr',\n 'grid-template-columns': 'auto 1fr'\n }\"\n class=\"pho-grid w-full h-screen overflow-hidden m-0 p-0\"\n>\n <!-- Top header -->\n <pho-topbar\n class=\"pho-col-span-2 z-1\"\n [user]=\"config.user\"\n [shortModuleName]=\"config.shortModuleName\"\n [searchConfig]=\"config.searchConfig\"\n [topbarModulesMenu]=\"config.topbarModulesMenu\"\n [darkModeSelector]=\"darkModeSelector\"\n (onDarkModeSelect)=\"selectDarkMode()\"\n (onUserPopoverAction)=\"onUserAction.emit($event)\"\n >\n </pho-topbar>\n <!-- Sidebar -->\n <div class=\"w-max\">\n <pho-sidebar\n [mainItems]=\"config.mainItems\"\n [footerItem]=\"config.footerItem\"\n (toggleSidebar)=\"toggleSidebar($event)\"\n (sliderClick)=\"sliderClick.emit($event)\"\n ></pho-sidebar>\n </div>\n <!-- Main content -->\n <div class=\"overflow-auto surface-50 wrap w-full\">\n <ng-content> </ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: SidebarComponent, selector: "pho-sidebar", inputs: ["classname", "mainItems", "footerItem"], outputs: ["toggleSidebar", "sliderClick"] }, { kind: "component", type: TopbarComponent, selector: "pho-topbar", inputs: ["homeUrl", "user", "shortModuleName", "topbarModulesMenu", "darkModeSelector", "footerConfig", "searchConfig"], outputs: ["onDarkModeSelect", "onUserPopoverAction"] }, { kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
1305
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ShellComponent, isStandalone: true, selector: "pho-shell", inputs: { config: "config", darkModeSelector: "darkModeSelector" }, outputs: { onDarkModeSelect: "onDarkModeSelect", onIsSlimSelect: "onIsSlimSelect", onUserAction: "onUserAction", sliderClick: "sliderClick", themeChange: "themeChange" }, ngImport: i0, template: "<!-- Sidebar Layout -->\n<div\n [style]=\"{\n 'grid-template-rows': '3.5rem 1fr',\n 'grid-template-columns': 'auto 1fr'\n }\"\n class=\"pho-grid w-full h-screen overflow-hidden m-0 p-0\"\n>\n <!-- Top header -->\n <pho-topbar\n class=\"pho-col-span-2 z-1\"\n [user]=\"config.user\"\n [shortModuleName]=\"config.shortModuleName\"\n [searchConfig]=\"config.searchConfig\"\n [topbarModulesMenu]=\"config.topbarModulesMenu\"\n [darkModeSelector]=\"darkModeSelector\"\n (onDarkModeSelect)=\"selectDarkMode()\"\n (onUserPopoverAction)=\"onUserAction.emit($event)\"\n >\n </pho-topbar>\n <!-- Sidebar -->\n <div class=\"w-max\">\n <pho-sidebar\n [mainItems]=\"config.mainItems\"\n [footerItem]=\"config.footerItem\"\n (toggleSidebar)=\"toggleSidebar($event)\"\n (sliderClick)=\"sliderClick.emit($event)\"\n ></pho-sidebar>\n </div>\n <!-- Main content -->\n <div class=\"overflow-auto surface-50 wrap w-full\">\n <ng-content> </ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: SidebarComponent, selector: "pho-sidebar", inputs: ["classname", "mainItems", "footerItem"], outputs: ["toggleSidebar", "sliderClick"] }, { kind: "component", type: TopbarComponent, selector: "pho-topbar", inputs: ["homeUrl", "user", "shortModuleName", "topbarModulesMenu", "darkModeSelector", "footerConfig", "searchConfig"], outputs: ["onDarkModeSelect", "onUserPopoverAction"] }, { kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
1288
1306
  }
1289
1307
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ShellComponent, decorators: [{
1290
1308
  type: Component,
@@ -1301,6 +1319,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1301
1319
  type: Output
1302
1320
  }], sliderClick: [{
1303
1321
  type: Output
1322
+ }], themeChange: [{
1323
+ type: Output
1304
1324
  }] } });
1305
1325
 
1306
1326
  var tableActionType;