shirkasoft-ui-components 1.0.23 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shirkasoft-ui-components",
3
- "version": "1.0.23",
3
+ "version": "1.0.26",
4
4
  "description": "Angular UI Components Library — themeable via CSS custom properties",
5
5
  "keywords": [
6
6
  "angular",
@@ -19,11 +19,12 @@
19
19
  "bugs": {
20
20
  "url": "https://github.com/Ansem13/shirkasoft-ui-components/issues"
21
21
  },
22
- "homepage": "https://github.com/Ansem13/shirkasoft-ui-components#readme",
22
+ "homepage": "https://ansem13.github.io/shirkasoft-ui-components/",
23
23
  "peerDependencies": {
24
24
  "@angular/common": "^21.2.0",
25
25
  "@angular/core": "^21.2.0",
26
26
  "@angular/forms": "^21.2.0",
27
+ "@angular/router": "^21.2.0",
27
28
  "rxjs": "^7.8.0",
28
29
  "@jsverse/transloco": ">= 8.0.0",
29
30
  "@lucide/angular": "^1.17.0",
package/src/theme.css CHANGED
@@ -144,6 +144,12 @@
144
144
  ._shk-bg-primary-soft { background-color: var(--shk-primary-50); }
145
145
  ._shk-bg-primary-border { background-color: var(--shk-primary-200); }
146
146
 
147
+ /* Active nav child in dark mode (30% primary-900 over transparent).
148
+ Must be a single token (no spaces) so it works with [class.X] bindings. */
149
+ .dark ._shk-bg-primary-soft-dark {
150
+ background-color: color-mix(in srgb, var(--shk-primary-900) 30%, transparent);
151
+ }
152
+
147
153
  ._shk-bg-surface-50 { background-color: var(--shk-surface-50); }
148
154
  ._shk-bg-surface-100 { background-color: var(--shk-surface-100); }
149
155
  ._shk-bg-surface-200 { background-color: var(--shk-surface-200); }
@@ -226,9 +232,30 @@
226
232
  ._shk-gradient-amber { background-image: linear-gradient(to right, var(--shk-amber-400), var(--shk-amber-600)); }
227
233
 
228
234
  /* ============================================================
229
- Scrollbar (table)
235
+ Scrollbar (table, sidebar, dropdowns, …)
230
236
  ============================================================ */
231
- ._shk-scrollbar::-webkit-scrollbar { height: 6px; }
232
- ._shk-scrollbar::-webkit-scrollbar-track { background: transparent; }
233
- ._shk-scrollbar::-webkit-scrollbar-thumb { background: var(--shk-scrollbar-thumb); border-radius: 9999px; }
234
- ._shk-scrollbar::-webkit-scrollbar-thumb:hover { background: var(--shk-scrollbar-thumb-hover); }
237
+ ._shk-scrollbar {
238
+ scrollbar-width: thin;
239
+ scrollbar-color: var(--shk-scrollbar-thumb) transparent;
240
+ }
241
+ ._shk-scrollbar::-webkit-scrollbar {
242
+ width: 8px;
243
+ height: 8px;
244
+ }
245
+ ._shk-scrollbar::-webkit-scrollbar-track {
246
+ background: transparent;
247
+ }
248
+ ._shk-scrollbar::-webkit-scrollbar-thumb {
249
+ background: var(--shk-scrollbar-thumb);
250
+ border-radius: 9999px;
251
+ border: 2px solid transparent;
252
+ background-clip: content-box;
253
+ }
254
+ ._shk-scrollbar::-webkit-scrollbar-thumb:hover {
255
+ background: var(--shk-scrollbar-thumb-hover);
256
+ border: 2px solid transparent;
257
+ background-clip: content-box;
258
+ }
259
+ ._shk-scrollbar::-webkit-scrollbar-corner {
260
+ background: transparent;
261
+ }
@@ -456,7 +456,7 @@ declare class FileUploadComponent {
456
456
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<FileUploadComponent, "shk-file-upload", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "maxFiles": { "alias": "maxFiles"; "required": false; "isSignal": true; }; "fileUploadText": { "alias": "fileUploadText"; "required": false; "isSignal": true; }; "fileRecommendation": { "alias": "fileRecommendation"; "required": false; "isSignal": true; }; "changeFilesText": { "alias": "changeFilesText"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; }, { "fileSelected": "fileSelected"; "fileRemoved": "fileRemoved"; "fileError": "fileError"; "fileWarning": "fileWarning"; }, never, never, true, never>;
457
457
  }
458
458
 
459
- declare function getIcon(name: string): any;
459
+ declare function getIcon$2(name: string): any;
460
460
  interface Column {
461
461
  field: string;
462
462
  header: string;
@@ -509,7 +509,7 @@ declare class TableComponent {
509
509
  private fb;
510
510
  private cdr;
511
511
  private transloco;
512
- protected getIcon: typeof getIcon;
512
+ protected getIcon: typeof getIcon$2;
513
513
  private actionsHeaderLabel;
514
514
  data: _angular_core.InputSignal<any[]>;
515
515
  columns: _angular_core.InputSignal<Column[]>;
@@ -612,6 +612,136 @@ declare class TooltipComponent {
612
612
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<TooltipComponent, "shk-tooltip", never, { "text": { "alias": "text"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
613
613
  }
614
614
 
615
+ declare function getIcon$1(name?: string): any;
616
+ interface SidebarItem {
617
+ id: string;
618
+ label: string;
619
+ icon?: string;
620
+ route?: string;
621
+ children?: SidebarItem[];
622
+ roles?: string[];
623
+ badge?: string | number;
624
+ disabled?: boolean;
625
+ separator?: boolean;
626
+ }
627
+ interface SidebarGroup {
628
+ id?: string;
629
+ label?: string;
630
+ items: SidebarItem[];
631
+ }
632
+ declare class SidebarComponent {
633
+ private platformId;
634
+ items: _angular_core.InputSignal<SidebarItem[]>;
635
+ groups: _angular_core.InputSignal<SidebarGroup[]>;
636
+ title: _angular_core.InputSignal<string>;
637
+ subtitle: _angular_core.InputSignal<string>;
638
+ logo: _angular_core.InputSignal<string>;
639
+ activeItemId: _angular_core.InputSignal<string>;
640
+ userRole: _angular_core.InputSignal<string>;
641
+ collapsible: _angular_core.InputSignal<boolean>;
642
+ showToggle: _angular_core.InputSignal<boolean>;
643
+ responsive: _angular_core.InputSignal<boolean>;
644
+ fixed: _angular_core.InputSignal<boolean>;
645
+ hasShadow: _angular_core.InputSignal<boolean>;
646
+ expandedWidth: _angular_core.InputSignal<string>;
647
+ collapsedWidth: _angular_core.InputSignal<string>;
648
+ defaultExpanded: _angular_core.InputSignal<string[]>;
649
+ labelPipe: _angular_core.InputSignal<(label: string) => string>;
650
+ expandTooltip: _angular_core.InputSignal<string>;
651
+ collapseTooltip: _angular_core.InputSignal<string>;
652
+ collapsed: _angular_core.ModelSignal<boolean>;
653
+ mobileOpen: _angular_core.ModelSignal<boolean>;
654
+ itemClick: _angular_core.OutputEmitterRef<SidebarItem>;
655
+ toggle: _angular_core.OutputEmitterRef<boolean>;
656
+ protected getIcon: typeof getIcon$1;
657
+ protected selectedId: _angular_core.WritableSignal<string>;
658
+ protected expandedGroups: _angular_core.WritableSignal<Set<string>>;
659
+ private isBrowser;
660
+ constructor(platformId: Object);
661
+ protected width: _angular_core.Signal<string>;
662
+ protected navItems: _angular_core.Signal<SidebarItem[]>;
663
+ onResize(_event: Event): void;
664
+ protected label(item: SidebarItem): string;
665
+ protected isItemActive(item: SidebarItem): boolean;
666
+ protected isGroupActive(item: SidebarItem): boolean;
667
+ protected isGroupExpanded(item: SidebarItem): boolean;
668
+ protected toggleGroup(item: SidebarItem): void;
669
+ protected onItemClick(item: SidebarItem): void;
670
+ protected onToggle(): void;
671
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarComponent, never>;
672
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarComponent, "shk-sidebar", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "activeItemId": { "alias": "activeItemId"; "required": false; "isSignal": true; }; "userRole": { "alias": "userRole"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "showToggle": { "alias": "showToggle"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "fixed": { "alias": "fixed"; "required": false; "isSignal": true; }; "hasShadow": { "alias": "hasShadow"; "required": false; "isSignal": true; }; "expandedWidth": { "alias": "expandedWidth"; "required": false; "isSignal": true; }; "collapsedWidth": { "alias": "collapsedWidth"; "required": false; "isSignal": true; }; "defaultExpanded": { "alias": "defaultExpanded"; "required": false; "isSignal": true; }; "labelPipe": { "alias": "labelPipe"; "required": false; "isSignal": true; }; "expandTooltip": { "alias": "expandTooltip"; "required": false; "isSignal": true; }; "collapseTooltip": { "alias": "collapseTooltip"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "mobileOpen": { "alias": "mobileOpen"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; "mobileOpen": "mobileOpenChange"; "itemClick": "itemClick"; "toggle": "toggle"; }, never, ["[sidebarHeader]", "[sidebarContent]", "[sidebarFooter]"], true, never>;
673
+ }
674
+
675
+ declare function getIcon(name?: string): any;
676
+ interface RailSidebarItem {
677
+ id: string;
678
+ label: string;
679
+ icon?: string;
680
+ routerLink?: string;
681
+ children?: RailSidebarItem[];
682
+ roles?: string[];
683
+ badge?: string | number;
684
+ disabled?: boolean;
685
+ separator?: boolean;
686
+ }
687
+ interface RailSidebarSection {
688
+ key: string;
689
+ label: string;
690
+ icon?: string;
691
+ routerLink?: string;
692
+ matchPrefixes?: string[];
693
+ items?: RailSidebarItem[];
694
+ }
695
+ interface RailSidebarSectionEvent {
696
+ key: string;
697
+ routerLink?: string;
698
+ }
699
+ declare class RailSidebarComponent {
700
+ sections: _angular_core.InputSignal<RailSidebarSection[]>;
701
+ activeUrl: _angular_core.InputSignal<string>;
702
+ activeSectionKey: _angular_core.ModelSignal<string>;
703
+ collapsed: _angular_core.ModelSignal<boolean>;
704
+ activeLang: _angular_core.InputSignal<string>;
705
+ langs: _angular_core.InputSignal<string[]>;
706
+ logo: _angular_core.InputSignal<string>;
707
+ appName: _angular_core.InputSignal<string>;
708
+ userRole: _angular_core.InputSignal<string>;
709
+ labelPipe: _angular_core.InputSignal<(label: string) => string>;
710
+ railWidth: _angular_core.InputSignal<string>;
711
+ expandedWidth: _angular_core.InputSignal<string>;
712
+ workspaceTooltip: _angular_core.InputSignal<string>;
713
+ logoutTooltip: _angular_core.InputSignal<string>;
714
+ collapseTooltip: _angular_core.InputSignal<string>;
715
+ expandTooltip: _angular_core.InputSignal<string>;
716
+ sectionSelected: _angular_core.OutputEmitterRef<RailSidebarSectionEvent>;
717
+ itemClick: _angular_core.OutputEmitterRef<RailSidebarItem>;
718
+ setLang: _angular_core.OutputEmitterRef<string>;
719
+ logoutRequested: _angular_core.OutputEmitterRef<void>;
720
+ toggleSidebar: _angular_core.OutputEmitterRef<boolean>;
721
+ workspaceClick: _angular_core.OutputEmitterRef<void>;
722
+ protected getIcon: typeof getIcon;
723
+ protected expandedGroups: _angular_core.WritableSignal<Set<string>>;
724
+ constructor();
725
+ protected width: _angular_core.Signal<string>;
726
+ protected activeSection: _angular_core.Signal<RailSidebarSection | null>;
727
+ protected navItems: _angular_core.Signal<RailSidebarItem[]>;
728
+ protected label(label: string): string;
729
+ protected isSectionActive(section: RailSidebarSection): boolean;
730
+ protected isItemActive(item: RailSidebarItem): boolean;
731
+ protected isGroupActive(item: RailSidebarItem): boolean;
732
+ private matchesUrl;
733
+ private bestMatchItem;
734
+ protected isGroupExpanded(item: RailSidebarItem): boolean;
735
+ protected toggleGroup(item: RailSidebarItem): void;
736
+ protected onSectionClick(section: RailSidebarSection): void;
737
+ protected onItemClick(item: RailSidebarItem): void;
738
+ protected onWorkspace(): void;
739
+ protected onToggleLang(): void;
740
+ protected onToggleSidebar(): void;
741
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RailSidebarComponent, never>;
742
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<RailSidebarComponent, "shk-rail-sidebar", never, { "sections": { "alias": "sections"; "required": false; "isSignal": true; }; "activeUrl": { "alias": "activeUrl"; "required": false; "isSignal": true; }; "activeSectionKey": { "alias": "activeSectionKey"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "activeLang": { "alias": "activeLang"; "required": false; "isSignal": true; }; "langs": { "alias": "langs"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "appName": { "alias": "appName"; "required": false; "isSignal": true; }; "userRole": { "alias": "userRole"; "required": false; "isSignal": true; }; "labelPipe": { "alias": "labelPipe"; "required": false; "isSignal": true; }; "railWidth": { "alias": "railWidth"; "required": false; "isSignal": true; }; "expandedWidth": { "alias": "expandedWidth"; "required": false; "isSignal": true; }; "workspaceTooltip": { "alias": "workspaceTooltip"; "required": false; "isSignal": true; }; "logoutTooltip": { "alias": "logoutTooltip"; "required": false; "isSignal": true; }; "collapseTooltip": { "alias": "collapseTooltip"; "required": false; "isSignal": true; }; "expandTooltip": { "alias": "expandTooltip"; "required": false; "isSignal": true; }; }, { "activeSectionKey": "activeSectionKeyChange"; "collapsed": "collapsedChange"; "sectionSelected": "sectionSelected"; "itemClick": "itemClick"; "setLang": "setLang"; "logoutRequested": "logoutRequested"; "toggleSidebar": "toggleSidebar"; "workspaceClick": "workspaceClick"; }, never, never, true, never>;
743
+ }
744
+
615
745
  declare class ChartComponent implements AfterViewInit, OnDestroy {
616
746
  private static registered;
617
747
  type: _angular_core.InputSignal<"line" | "bar" | "pie" | "doughnut" | "polarArea">;
@@ -620,10 +750,12 @@ declare class ChartComponent implements AfterViewInit, OnDestroy {
620
750
  private canvasRef;
621
751
  private chartInstance;
622
752
  private initialized;
753
+ constructor();
623
754
  ngAfterViewInit(): void;
624
755
  ngOnDestroy(): void;
756
+ private resetCanvas;
625
757
  private initChart;
626
- constructor();
758
+ private deepClone;
627
759
  private updateChart;
628
760
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChartComponent, never>;
629
761
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChartComponent, "shk-chart", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
@@ -639,5 +771,5 @@ declare function readThemeColors(): {
639
771
  border: string;
640
772
  };
641
773
 
642
- export { COLOR_PALETTE, ChartComponent, ConfirmDialogComponent, ConfirmDialogService, DatePickerComponent, FileUploadComponent, ModalComponent, ModalService, NotificationComponent, NotificationService, PriceInputComponent, SelectComponent, TableComponent, TextFieldComponent, ToggleComponent, TooltipComponent, readThemeColors };
643
- export type { Column, ConfirmConfig, DatePickerView, FileUploadError, FilterChangeEvent, ModalConfig, Notification, NotificationPosition, PageChangeEvent, RowAction, TableAction };
774
+ export { COLOR_PALETTE, ChartComponent, ConfirmDialogComponent, ConfirmDialogService, DatePickerComponent, FileUploadComponent, ModalComponent, ModalService, NotificationComponent, NotificationService, PriceInputComponent, RailSidebarComponent, SelectComponent, SidebarComponent, TableComponent, TextFieldComponent, ToggleComponent, TooltipComponent, readThemeColors };
775
+ export type { Column, ConfirmConfig, DatePickerView, FileUploadError, FilterChangeEvent, ModalConfig, Notification, NotificationPosition, PageChangeEvent, RailSidebarItem, RailSidebarSection, RailSidebarSectionEvent, RowAction, SidebarGroup, SidebarItem, TableAction };