@africanies/angular-web-sdk 0.1.3 → 0.1.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 (77) hide show
  1. package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/README.md +68 -0
  2. package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
  3. package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
  4. package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +5 -0
  5. package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/assets/carriers/dhl.svg +7 -0
  6. package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +19375 -0
  7. package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
  8. package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/package.json +35 -0
  9. package/.nx/cache/14876618240301288353/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +5490 -0
  10. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/README.md +68 -0
  11. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/assets/brand/africanies-logo-mini.png +0 -0
  12. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/assets/brand/africanies-logo.png +0 -0
  13. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/assets/brand/africanies-logo.svg +5 -0
  14. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/assets/carriers/dhl.svg +7 -0
  15. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +19375 -0
  16. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -0
  17. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/package.json +35 -0
  18. package/.nx/cache/17499961385238663835/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +5490 -0
  19. package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/README.md +46 -0
  20. package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +221 -0
  21. package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -0
  22. package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/package.json +35 -0
  23. package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/tailwind-preset.cjs +253 -0
  24. package/.nx/cache/17626862048742598274/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +166 -0
  25. package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/README.md +46 -0
  26. package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +221 -0
  27. package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -0
  28. package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/package.json +35 -0
  29. package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/tailwind-preset.cjs +253 -0
  30. package/.nx/cache/4082520855419352840/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +166 -0
  31. package/.nx/cache/9040451482998546630/dist/libs/africanies-core/README.md +85 -0
  32. package/.nx/cache/9040451482998546630/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +4511 -0
  33. package/.nx/cache/9040451482998546630/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -0
  34. package/.nx/cache/9040451482998546630/dist/libs/africanies-core/package.json +31 -0
  35. package/.nx/cache/9040451482998546630/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +2741 -0
  36. package/.nx/cache/run.json +35 -35
  37. package/.nx/cache/terminalOutputs/13555699813138069787 +6 -0
  38. package/.nx/cache/terminalOutputs/14061940909886036014 +173 -0
  39. package/.nx/cache/terminalOutputs/14876618240301288353 +21 -0
  40. package/.nx/cache/terminalOutputs/16279119293212733518 +6 -0
  41. package/.nx/cache/terminalOutputs/17499961385238663835 +21 -0
  42. package/.nx/cache/terminalOutputs/17626862048742598274 +21 -0
  43. package/.nx/cache/terminalOutputs/4082520855419352840 +21 -0
  44. package/.nx/cache/terminalOutputs/7126777490381568487 +32 -0
  45. package/.nx/cache/terminalOutputs/7978448102466861029 +32 -0
  46. package/.nx/cache/terminalOutputs/9040451482998546630 +21 -0
  47. package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db +0 -0
  48. package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db-shm +0 -0
  49. package/.nx/workspace-data/0091ABA9-5C90-580D-953C-8C94E763ADB5-v3.db-wal +0 -0
  50. package/.nx/workspace-data/d/daemon.log +3155 -0
  51. package/.nx/workspace-data/d/server-process.json +2 -2
  52. package/.nx/workspace-data/file-map.json +3340 -3375
  53. package/.nx/workspace-data/nx_files.nxt +0 -0
  54. package/.nx/workspace-data/project-graph.json +2 -2
  55. package/apps/playground/src/app/app.routes.ts +15 -4
  56. package/apps/playground/src/app/app.ts +2 -2
  57. package/apps/playground/src/app/pages/home-page.ts +14 -14
  58. package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs +8 -43
  59. package/dist/libs/africanies-core/fesm2022/africanies-africanies-core.mjs.map +1 -1
  60. package/dist/libs/africanies-core/types/africanies-africanies-core.d.ts +6 -5
  61. package/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs +6 -0
  62. package/dist/libs/africanies-theme/fesm2022/africanies-africanies-theme.mjs.map +1 -1
  63. package/dist/libs/africanies-theme/tailwind-preset.cjs +15 -7
  64. package/dist/libs/africanies-theme/types/africanies-africanies-theme.d.ts +10 -1
  65. package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs +138 -54
  66. package/dist/libs/africanies-ui/fesm2022/africanies-africanies-ui.mjs.map +1 -1
  67. package/dist/libs/africanies-ui/types/africanies-africanies-ui.d.ts +32 -25
  68. package/libs/africanies-core/src/lib/http/api-client.ts +4 -18
  69. package/libs/africanies-core/src/lib/http/is-retryable-get-error.ts +8 -4
  70. package/libs/africanies-core/src/lib/query/provide-africanies-query-defaults.ts +5 -6
  71. package/libs/africanies-theme/src/lib/mode-color.safelist.ts +4 -0
  72. package/libs/africanies-theme/src/lib/mode-color.service.ts +11 -0
  73. package/libs/africanies-theme/tailwind-preset.cjs +15 -7
  74. package/libs/africanies-ui/src/lib/layout/header-weather.spec.ts +111 -6
  75. package/libs/africanies-ui/src/lib/layout/header-weather.ts +104 -8
  76. package/libs/africanies-ui/src/lib/table/table.component.ts +67 -44
  77. package/package.json +1 -1
@@ -5,6 +5,7 @@ import {
5
5
  Component,
6
6
  computed,
7
7
  contentChildren,
8
+ inject,
8
9
  input,
9
10
  numberAttribute,
10
11
  output,
@@ -14,6 +15,7 @@ import {
14
15
 
15
16
  import { AfricaniesIconComponent } from '@africanies/africanies-icons';
16
17
  import type { PaginationMetaModel } from '@africanies/africanies-models';
18
+ import { ModeColorService } from '@africanies/africanies-theme';
17
19
 
18
20
  import { ButtonComponent } from '../button/button.component';
19
21
  import { EmptyStateComponent } from '../feedback/empty-state.component';
@@ -98,7 +100,8 @@ import { TableColumn, TableSortChange } from './table-column';
98
100
  * **Sticky columns:** a column with `key: 'actions'` stays pinned to the
99
101
  * right while the grid scrolls horizontally. The expand trigger column pins
100
102
  * to the left when rows are expandable. Override with
101
- * {@link TableColumn.sticky}.
103
+ * {@link TableColumn.sticky}. Sticky columns use a slightly thicker bottom
104
+ * border (and opaque fill) so dividers stay visible while scrolling.
102
105
  */
103
106
  @Component({
104
107
  selector: 'africanies-table',
@@ -210,9 +213,7 @@ import { TableColumn, TableSortChange } from './table-column';
210
213
  <table
211
214
  class="w-max min-w-full table-auto border-separate border-spacing-0 bg-inherit text-left text-body text-ink dark:text-white"
212
215
  >
213
- <thead
214
- class="border-b border-border bg-background-welcome dark:border-white/10 dark:bg-ink-950"
215
- >
216
+ <thead [class]="headerRowClass()">
216
217
  <tr>
217
218
  @if (isExpandable()) {
218
219
  <th
@@ -276,14 +277,14 @@ import { TableColumn, TableSortChange } from './table-column';
276
277
  @switch (bodyKind()) {
277
278
  @case ('loading') {
278
279
  <tr>
279
- <td class="px-3 py-6" [attr.colspan]="colSpan()">
280
+ <td class="px-[1.125rem] py-6" [attr.colspan]="colSpan()">
280
281
  <africanies-loading-state [message]="loadingLabel()" />
281
282
  </td>
282
283
  </tr>
283
284
  }
284
285
  @case ('error') {
285
286
  <tr>
286
- <td class="px-3 py-6" [attr.colspan]="colSpan()">
287
+ <td class="px-[1.125rem] py-6" [attr.colspan]="colSpan()">
287
288
  <africanies-error-state
288
289
  [message]="errorMessage()"
289
290
  [refreshing]="refreshing()"
@@ -294,7 +295,7 @@ import { TableColumn, TableSortChange } from './table-column';
294
295
  }
295
296
  @case ('empty') {
296
297
  <tr>
297
- <td class="px-3 py-6" [attr.colspan]="colSpan()">
298
+ <td class="px-[1.125rem] py-6" [attr.colspan]="colSpan()">
298
299
  <africanies-empty-state
299
300
  [message]="emptyMessage()"
300
301
  [refreshing]="refreshing()"
@@ -362,7 +363,7 @@ import { TableColumn, TableSortChange } from './table-column';
362
363
  class="min-h-0 overflow-hidden border-t border-border/70 bg-neutral-50 dark:border-white/10 dark:bg-white/[0.05]"
363
364
  >
364
365
  <dl
365
- class="m-0 grid gap-x-6 gap-y-3 px-3 py-3 transition-opacity duration-200 ease-out motion-reduce:transition-none sm:grid-cols-2 lg:grid-cols-3"
366
+ class="m-0 grid gap-x-6 gap-y-3 px-[1.125rem] py-4 transition-opacity duration-200 ease-out motion-reduce:transition-none sm:grid-cols-2 lg:grid-cols-3"
366
367
  [class.opacity-0]="!isRowExpanded(row, i)"
367
368
  [class.opacity-100]="isRowExpanded(row, i)"
368
369
  >
@@ -409,6 +410,8 @@ import { TableColumn, TableSortChange } from './table-column';
409
410
  `,
410
411
  })
411
412
  export class TableComponent<T = unknown> {
413
+ protected readonly modeColor = inject(ModeColorService);
414
+
412
415
  /**
413
416
  * When false, hides row expansion even if {@link RowDetailDefDirective}
414
417
  * templates are projected. Defaults to true.
@@ -652,6 +655,23 @@ export class TableComponent<T = unknown> {
652
655
  return { $implicit: row };
653
656
  }
654
657
 
658
+ /**
659
+ * Header row chrome. Soft fill lives on each `th` ({@link headerSoftClass})
660
+ * so sticky columns do not double-tint and paint over neighbor labels.
661
+ * @returns Header row class list.
662
+ */
663
+ protected headerRowClass(): string {
664
+ return 'border-b border-border dark:border-white/10';
665
+ }
666
+
667
+ /**
668
+ * Opaque mode soft fill for header cells (sticky-safe in dark mode).
669
+ * @returns Soft solid background utilities.
670
+ */
671
+ protected headerSoftClass(): string {
672
+ return this.modeColor.classes().softSolid;
673
+ }
674
+
655
675
  /**
656
676
  * Body row classes — row marker for hover styles, plus hide cell borders on
657
677
  * the last / expanded row.
@@ -662,7 +682,7 @@ export class TableComponent<T = unknown> {
662
682
  protected bodyRowClass(row: T, index: number): string {
663
683
  if (this.isExpandable() && this.isRowExpanded(row, index)) {
664
684
  // Only the bottom edge — keep the top divider so the row still
665
- // separates from the row above.
685
+ // separates from the row above. Detail panel owns the separator.
666
686
  return 'africanies-table-row group [&>td]:border-b-0';
667
687
  }
668
688
  return 'africanies-table-row group last:[&>td]:border-b-0';
@@ -691,25 +711,31 @@ export class TableComponent<T = unknown> {
691
711
  */
692
712
  protected expandHeaderClass(): string {
693
713
  return (
694
- 'w-10 border-b border-border px-2 py-3.5 dark:border-white/10 ' +
714
+ 'w-10 border-b-[1.5px] border-border px-2 py-4 dark:border-white/10 ' +
715
+ this.headerSoftClass() +
716
+ ' ' +
695
717
  this.stickyPinClass('left', 'head')
696
718
  );
697
719
  }
698
720
 
699
721
  /**
700
722
  * Body classes for the expand/collapse trigger column (pinned left).
701
- * Omits `border-b` like other sticky cells so the opaque fill does not
702
- * double-paint the row divider.
723
+ * Uses a slightly thicker bottom border than scrolling cells so the
724
+ * sticky fill still reads a clear divider (no top-shadow fallback).
703
725
  * @param index - Index within {@link rows}.
704
726
  * @returns Body cell class list.
705
727
  */
706
728
  protected expandBodyClass(index: number): string {
707
- const prev = index > 0 ? this.rowList()[index - 1] : undefined;
708
- const afterExpanded =
709
- prev !== undefined && this.isRowExpanded(prev, index - 1);
729
+ const row = this.rowList()[index];
730
+ const expanded =
731
+ row !== undefined && this.isRowExpanded(row, index);
732
+ const border = expanded
733
+ ? ''
734
+ : 'border-b-[1.5px] border-border dark:border-white/10 ';
710
735
  return (
711
- 'w-10 px-2 py-3.5 align-middle ' +
712
- this.stickyPinClass('left', 'body', index, afterExpanded)
736
+ 'w-10 px-2 py-4 align-middle ' +
737
+ border +
738
+ this.stickyPinClass('left', 'body')
713
739
  );
714
740
  }
715
741
 
@@ -719,37 +745,46 @@ export class TableComponent<T = unknown> {
719
745
  * @returns Header class list.
720
746
  */
721
747
  protected headerCellClass(col: TableColumn<T>): string {
748
+ const sticky = this.stickyEdge(col);
749
+ const border = sticky
750
+ ? 'border-b-[1.5px] '
751
+ : 'border-b ';
722
752
  return (
723
- 'border-b border-border whitespace-normal wrap-break-word px-3 py-3.5 font-medium text-neutral-600 dark:border-white/10 dark:text-neutral-400 ' +
753
+ border +
754
+ 'border-border whitespace-normal wrap-break-word px-[1.125rem] py-4 font-medium text-neutral-600 dark:border-white/10 dark:text-neutral-400 ' +
755
+ this.headerSoftClass() +
756
+ ' ' +
724
757
  this.stickySurfaceClass(col, 'head')
725
758
  );
726
759
  }
727
760
 
728
761
  /**
729
762
  * Body cell classes, including sticky pin when set.
730
- * Sticky cells omit `border-b`: their opaque fill sits in a higher stacking
731
- * context, so a bottom border plus the next row's top shadow paint on the
732
- * same pixel and read brighter (especially in dark mode).
763
+ * Sticky expand/actions columns use a 1.5px bottom border; scrolling cells
764
+ * stay at 1px. Expanded rows drop the bottom border (see {@link bodyRowClass}).
733
765
  * @param col - Column definition.
734
766
  * @param index - Index within {@link rows}.
735
767
  * @returns Body cell class list.
736
768
  */
737
769
  protected bodyCellClass(col: TableColumn<T>, index: number): string {
738
- const rowLine = this.stickyEdge(col)
770
+ const row = this.rowList()[index];
771
+ const expanded =
772
+ row !== undefined && this.isRowExpanded(row, index);
773
+ const sticky = this.stickyEdge(col);
774
+ const rowLine = expanded
739
775
  ? ''
740
- : 'border-b border-border dark:border-white/10 ';
741
- const prev = index > 0 ? this.rowList()[index - 1] : undefined;
742
- const afterExpanded =
743
- prev !== undefined && this.isRowExpanded(prev, index - 1);
776
+ : sticky
777
+ ? 'border-b-[1.5px] border-border dark:border-white/10 '
778
+ : 'border-b border-border dark:border-white/10 ';
744
779
  const wrap =
745
780
  col.key === 'actions'
746
781
  ? 'whitespace-nowrap '
747
782
  : 'whitespace-normal wrap-break-word ';
748
783
  return (
749
784
  rowLine +
750
- 'px-3 py-3.5 align-middle ' +
785
+ 'px-[1.125rem] py-4 align-middle ' +
751
786
  wrap +
752
- this.stickySurfaceClass(col, 'body', index, afterExpanded)
787
+ this.stickySurfaceClass(col, 'body')
753
788
  );
754
789
  }
755
790
 
@@ -757,30 +792,22 @@ export class TableComponent<T = unknown> {
757
792
  * Sticky pin utilities for a known edge (expand column or data column).
758
793
  * @param edge - Left or right pin.
759
794
  * @param surface - Header vs body fill tokens.
760
- * @param index - Body row index; unused for the header.
761
- * @param afterExpanded - Previous row is expanded — skip the top shadow
762
- * divider so the sticky column stays flush under the detail panel.
763
795
  * @returns Sticky utilities.
764
796
  */
765
797
  protected stickyPinClass(
766
798
  edge: 'left' | 'right',
767
799
  surface: 'head' | 'body',
768
- index = 0,
769
- afterExpanded = false,
770
800
  ): string {
771
801
  // Expand (left) sits above scrolling cells; actions (right) match.
772
802
  // Header needs a higher z so it stays above sticky body cells.
773
803
  const side =
774
804
  edge === 'right' ? 'sticky right-0 z-[1]' : 'sticky left-0 z-[1]';
775
805
  if (surface === 'head') {
776
- return `${side} z-[2] bg-background-welcome dark:bg-ink-950`;
806
+ // Fill comes from {@link headerSoftClass} on the cell — do not re-tint.
807
+ return `${side} z-[2]`;
777
808
  }
778
- const rowDivider =
779
- !afterExpanded && index > 0
780
- ? 'shadow-[0_-1px_0_0_#c9d5e1] dark:shadow-[0_-1px_0_0_rgba(255,255,255,0.1)]'
781
- : '';
782
809
  const fill = 'bg-white dark:bg-ink';
783
- return `${side} ${fill} ${rowDivider}`;
810
+ return `${side} ${fill}`;
784
811
  }
785
812
 
786
813
  /**
@@ -788,21 +815,17 @@ export class TableComponent<T = unknown> {
788
815
  * cells do not show through.
789
816
  * @param col - Column definition.
790
817
  * @param surface - Header vs body fill tokens.
791
- * @param index - Body row index; unused for the header.
792
- * @param afterExpanded - Previous row is expanded — skip the top shadow.
793
818
  * @returns Sticky utilities, or empty when the column scrolls.
794
819
  */
795
820
  protected stickySurfaceClass(
796
821
  col: TableColumn<T>,
797
822
  surface: 'head' | 'body',
798
- index = 0,
799
- afterExpanded = false,
800
823
  ): string {
801
824
  const edge = this.stickyEdge(col);
802
825
  if (!edge) {
803
826
  return '';
804
827
  }
805
- return this.stickyPinClass(edge, surface, index, afterExpanded);
828
+ return this.stickyPinClass(edge, surface);
806
829
  }
807
830
 
808
831
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@africanies/angular-web-sdk",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "packageManager": "pnpm@11.24.0",
5
5
  "license": "MIT",
6
6
  "contributors": [