@ojiepermana/angular 22.2.7 → 22.2.11

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 (109) hide show
  1. package/chart/README.md +3 -0
  2. package/component/icon/README.md +17 -0
  3. package/fesm2022/ojiepermana-angular-chart-area.mjs +3 -3
  4. package/fesm2022/ojiepermana-angular-chart-bar.mjs +3 -3
  5. package/fesm2022/ojiepermana-angular-chart-core.mjs +71 -34
  6. package/fesm2022/ojiepermana-angular-chart-line.mjs +3 -3
  7. package/fesm2022/ojiepermana-angular-chart-pie.mjs +14 -7
  8. package/fesm2022/ojiepermana-angular-chart-primitives.mjs +33 -33
  9. package/fesm2022/ojiepermana-angular-chart-radar.mjs +3 -3
  10. package/fesm2022/ojiepermana-angular-chart-radial.mjs +3 -3
  11. package/fesm2022/ojiepermana-angular-chart-scatter.mjs +3 -3
  12. package/fesm2022/ojiepermana-angular-component-accordion.mjs +15 -15
  13. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +27 -27
  14. package/fesm2022/ojiepermana-angular-component-alert.mjs +12 -12
  15. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +3 -3
  16. package/fesm2022/ojiepermana-angular-component-avatar.mjs +18 -18
  17. package/fesm2022/ojiepermana-angular-component-badge.mjs +3 -3
  18. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +21 -21
  19. package/fesm2022/ojiepermana-angular-component-button-group.mjs +9 -9
  20. package/fesm2022/ojiepermana-angular-component-button.mjs +3 -3
  21. package/fesm2022/ojiepermana-angular-component-calendar.mjs +3 -3
  22. package/fesm2022/ojiepermana-angular-component-card.mjs +21 -21
  23. package/fesm2022/ojiepermana-angular-component-carousel.mjs +18 -18
  24. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +3 -3
  25. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +12 -12
  26. package/fesm2022/ojiepermana-angular-component-combobox.mjs +3 -3
  27. package/fesm2022/ojiepermana-angular-component-command.mjs +27 -27
  28. package/fesm2022/ojiepermana-angular-component-composer.mjs +21 -21
  29. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +3 -3
  30. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +3 -3
  31. package/fesm2022/ojiepermana-angular-component-dialog.mjs +21 -21
  32. package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -2
  33. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +39 -39
  34. package/fesm2022/ojiepermana-angular-component-editor.mjs +18 -18
  35. package/fesm2022/ojiepermana-angular-component-empty.mjs +18 -18
  36. package/fesm2022/ojiepermana-angular-component-form.mjs +36 -36
  37. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +9 -9
  38. package/fesm2022/ojiepermana-angular-component-icon.mjs +6 -6
  39. package/fesm2022/ojiepermana-angular-component-input-group.mjs +18 -18
  40. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +15 -15
  41. package/fesm2022/ojiepermana-angular-component-input.mjs +3 -3
  42. package/fesm2022/ojiepermana-angular-component-item.mjs +30 -30
  43. package/fesm2022/ojiepermana-angular-component-kanban.mjs +27 -27
  44. package/fesm2022/ojiepermana-angular-component-kbd.mjs +6 -6
  45. package/fesm2022/ojiepermana-angular-component-label.mjs +3 -3
  46. package/fesm2022/ojiepermana-angular-component-menubar.mjs +12 -12
  47. package/fesm2022/ojiepermana-angular-component-native-select.mjs +9 -9
  48. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +21 -21
  49. package/fesm2022/ojiepermana-angular-component-pagination.mjs +3 -3
  50. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +15 -15
  51. package/fesm2022/ojiepermana-angular-component-popover.mjs +6 -6
  52. package/fesm2022/ojiepermana-angular-component-progress.mjs +3 -3
  53. package/fesm2022/ojiepermana-angular-component-radio.mjs +6 -6
  54. package/fesm2022/ojiepermana-angular-component-resizable.mjs +12 -12
  55. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +3 -3
  56. package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +3 -3
  57. package/fesm2022/ojiepermana-angular-component-select.mjs +6 -6
  58. package/fesm2022/ojiepermana-angular-component-separator.mjs +3 -3
  59. package/fesm2022/ojiepermana-angular-component-sheet.mjs +32 -24
  60. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +3 -3
  61. package/fesm2022/ojiepermana-angular-component-slider.mjs +6 -6
  62. package/fesm2022/ojiepermana-angular-component-spinner.mjs +3 -3
  63. package/fesm2022/ojiepermana-angular-component-switch.mjs +3 -3
  64. package/fesm2022/ojiepermana-angular-component-table.mjs +24 -24
  65. package/fesm2022/ojiepermana-angular-component-tabs.mjs +18 -18
  66. package/fesm2022/ojiepermana-angular-component-textarea.mjs +3 -3
  67. package/fesm2022/ojiepermana-angular-component-timeline.mjs +18 -18
  68. package/fesm2022/ojiepermana-angular-component-toast.mjs +3 -3
  69. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +9 -9
  70. package/fesm2022/ojiepermana-angular-component-toggle.mjs +3 -3
  71. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +15 -15
  72. package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +3 -3
  73. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +3 -3
  74. package/fesm2022/{ojiepermana-angular-navigation-navigation-badge-count.component-D-WgBF6d.mjs → ojiepermana-angular-navigation-navigation-badge-count.component-BxWVj145.mjs} +3 -3
  75. package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-DqomVKM3.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-Q6Ef4ut3.mjs} +17 -9
  76. package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-nge3WGLa.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-XxQv3yxu.mjs} +15 -7
  77. package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-CeoyWTbP.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-BBz0IwXv.mjs} +24 -8
  78. package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-BhE_XVog.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-aFxLw5XV.mjs} +6 -6
  79. package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-2R9tPqQK.mjs → ojiepermana-angular-navigation-navigation-item.component-DlazoaD2.mjs} +21 -13
  80. package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-DO_eoMWG.mjs → ojiepermana-angular-navigation-navigation-list.component-Cgj0SLHr.mjs} +4 -4
  81. package/fesm2022/ojiepermana-angular-navigation-service.mjs +3 -3
  82. package/fesm2022/ojiepermana-angular-navigation.mjs +91 -67
  83. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +261 -80
  84. package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +6 -6
  85. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +59 -35
  86. package/fesm2022/ojiepermana-angular-theme-layout.mjs +24 -24
  87. package/fesm2022/ojiepermana-angular-theme-on-fill.mjs +89 -0
  88. package/fesm2022/ojiepermana-angular-theme-page-core.mjs +3 -3
  89. package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +6 -6
  90. package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +3 -3
  91. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +14 -6
  92. package/fesm2022/ojiepermana-angular-theme-page-side.mjs +6 -6
  93. package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +12 -12
  94. package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +3 -3
  95. package/fesm2022/ojiepermana-angular-theme-shell.mjs +20 -12
  96. package/fesm2022/ojiepermana-angular-theme-styles.mjs +77 -44
  97. package/package.json +7 -2
  98. package/theme/README.md +5 -0
  99. package/theme/styles/README.md +52 -3
  100. package/theme/styles/css/base/on-fill.css +153 -0
  101. package/theme/styles/css/base/package.css +1 -0
  102. package/theme/styles/css/base/prefers-dark.css +0 -5
  103. package/theme/styles/css/base/theme.css +4 -51
  104. package/theme/styles/css/color/emerald.css +1 -1
  105. package/types/ojiepermana-angular-chart-core.d.ts +3 -1
  106. package/types/ojiepermana-angular-chart-pie.d.ts +5 -0
  107. package/types/ojiepermana-angular-theme-component-settings.d.ts +2 -2
  108. package/types/ojiepermana-angular-theme-on-fill.d.ts +45 -0
  109. package/types/ojiepermana-angular-theme-styles.d.ts +37 -4
package/chart/README.md CHANGED
@@ -218,6 +218,9 @@ type ChartConfig = Readonly<
218
218
  - Prefer CSS variables such as `var(--chart-1)` and `var(--chart-2)` in `ChartConfig`. This matches the current shadcn guidance and the theme tokens shipped by this library.
219
219
  - `Chart` scopes generated `--color-<series>` variables to the chart instance, so tooltip rows, legends, and series shapes stay aligned.
220
220
  - Use `theme: { light, dark }` on a series config entry when the chart needs different values per color scheme.
221
+ - Beside each `--color-<series>`, `Chart` writes `--color-<series>-foreground`, the text colour for that fill in each mode (spec 0011, the foreground-on-fill contract). A theme token with a partner (`hsl(var(--chart-3))`, `var(--primary)`, and the other `chart-1..5`, `secondary`, `accent`, `success`, `warning`, `info`, `destructive`, `brand` tokens) maps to `hsl(var(--<token>-foreground))`; an HSL triplet, `hsl(<triplet>)`, or a 6-digit hex is measured with `foregroundFor` from `@ojiepermana/angular/theme/styles`. Forms with alpha, `rgb()`, `oklch()`, and unknown `var()` references get no foreground.
222
+ - Pie slice labels read `var(--color-<series>-foreground, hsl(var(--foreground)))` and always carry a halo in `--background`, so a label stays readable on series colours that get no computed foreground.
223
+ - The theme exposes `--theme-chart-N` and `--theme-chart-N-foreground` to override series N. Override them in pairs: a new fill without its foreground keeps the default foreground, which may not suit it, and the build cannot see consumer CSS.
221
224
  - Keep the parent container responsible for width, and use the `aspect` input when the default `aspect-video` does not match the layout.
222
225
  - Use `colorKey` only when the dataset should override per-series colors with a row-specific token such as `fill`.
223
226
 
@@ -41,6 +41,23 @@ export const appConfig = {
41
41
  - `IconRegistry` (root) menyediakan `resolve(name)` dan `names()`, daftar nama kanonis terurut untuk galeri.
42
42
  - Komponen library yang merender ikon tetap (navigasi, theme settings, layout) mendaftarkannya sendiri; consumer hanya mendaftarkan ikon yang dipakai data aplikasinya, seperti `item.icon` di navigasi.
43
43
 
44
+ Untuk registrasi yang hanya memerlukan data SVG, gunakan named import dari `lucide`:
45
+
46
+ ```ts
47
+ import { Braces, Sun } from 'lucide';
48
+
49
+ provideIcons(
50
+ { name: 'sun', size: 24, node: Sun },
51
+ { name: 'braces', size: 24, aliases: ['curly-braces'], node: Braces },
52
+ );
53
+ ```
54
+
55
+ Sejak 22.2.11, seluruh ikon tetap milik library memakai bentuk ringan ini. Data SVG dapat
56
+ dihapus oleh tree shaking bila entry point pemiliknya tidak digunakan. `@lucide/angular`
57
+ tetap menjadi peer wajib karena `<Icon>` memakai `LucideDynamicIcon` untuk merender SVG,
58
+ dan registrasi kelas seperti `provideIcons(LucideHouse)` tetap didukung. `lucide` tersedia
59
+ sebagai dependency paket dengan rentang versi `^1.69.0`, tanpa patch atau pin versi persis.
60
+
44
61
  ## Migrasi dari Material Symbols
45
62
 
46
63
  Rilis ini menghapus Material Symbols (pengecualian tercatat terhadap kebijakan versi spec 0001; lihat spec 0010).
@@ -69,7 +69,7 @@ var AreaChart = class AreaChart {
69
69
  }
70
70
  static ɵfac = i0.ɵɵngDeclareFactory({
71
71
  minVersion: "12.0.0",
72
- version: "22.2.3",
72
+ version: "22.2.4",
73
73
  ngImport: i0,
74
74
  type: AreaChart,
75
75
  deps: [],
@@ -77,7 +77,7 @@ var AreaChart = class AreaChart {
77
77
  });
78
78
  static ɵcmp = i0.ɵɵngDeclareComponent({
79
79
  minVersion: "17.0.0",
80
- version: "22.2.3",
80
+ version: "22.2.4",
81
81
  type: AreaChart,
82
82
  isStandalone: true,
83
83
  selector: "ChartArea",
@@ -294,7 +294,7 @@ var AreaChart = class AreaChart {
294
294
  };
295
295
  i0.ɵɵngDeclareClassMetadata({
296
296
  minVersion: "12.0.0",
297
- version: "22.2.3",
297
+ version: "22.2.4",
298
298
  ngImport: i0,
299
299
  type: AreaChart,
300
300
  decorators: [{
@@ -387,7 +387,7 @@ var BarChart = class BarChart {
387
387
  }
388
388
  static ɵfac = i0.ɵɵngDeclareFactory({
389
389
  minVersion: "12.0.0",
390
- version: "22.2.3",
390
+ version: "22.2.4",
391
391
  ngImport: i0,
392
392
  type: BarChart,
393
393
  deps: [],
@@ -395,7 +395,7 @@ var BarChart = class BarChart {
395
395
  });
396
396
  static ɵcmp = i0.ɵɵngDeclareComponent({
397
397
  minVersion: "17.0.0",
398
- version: "22.2.3",
398
+ version: "22.2.4",
399
399
  type: BarChart,
400
400
  isStandalone: true,
401
401
  selector: "ChartBar",
@@ -669,7 +669,7 @@ var BarChart = class BarChart {
669
669
  };
670
670
  i0.ɵɵngDeclareClassMetadata({
671
671
  minVersion: "12.0.0",
672
- version: "22.2.3",
672
+ version: "22.2.4",
673
673
  ngImport: i0,
674
674
  type: BarChart,
675
675
  decorators: [{
@@ -1,3 +1,4 @@
1
+ import { foregroundFor } from "@ojiepermana/angular/theme/styles";
1
2
  import * as i0 from "@angular/core";
2
3
  import { Component, DestroyRef, Directive, ElementRef, NgZone, PLATFORM_ID, Renderer2, Service, afterNextRender, computed, effect, inject, input, signal, viewChild } from "@angular/core";
3
4
  import { DOCUMENT, isPlatformBrowser } from "@angular/common";
@@ -44,6 +45,39 @@ function isSafeCssColorValue(value) {
44
45
  for (const match of trimmed.matchAll(/([a-zA-Z][a-zA-Z0-9-]*)\s*\(/g)) if (!ALLOWED_COLOR_FUNCTIONS.has(match[1].toLowerCase())) return false;
45
46
  return true;
46
47
  }
48
+ const PAIRED_THEME_TOKENS = /* @__PURE__ */ new Set([
49
+ "chart-1",
50
+ "chart-2",
51
+ "chart-3",
52
+ "chart-4",
53
+ "chart-5",
54
+ "primary",
55
+ "secondary",
56
+ "accent",
57
+ "success",
58
+ "warning",
59
+ "info",
60
+ "destructive",
61
+ "brand"
62
+ ]);
63
+ const TOKEN_REFERENCE = /^(?:hsl\(\s*var\(\s*--([\w-]+)\s*\)\s*\)|var\(\s*--([\w-]+)\s*\))$/i;
64
+ const HSL_FUNCTION = /^hsl\(\s*([^()/]+?)\s*\)$/i;
65
+ const HEX_6 = /^#[0-9a-f]{6}$/i;
66
+ function seriesForegroundValue(value, mode) {
67
+ const trimmed = value.trim();
68
+ const reference = TOKEN_REFERENCE.exec(trimmed);
69
+ if (reference) {
70
+ const token = (reference[1] ?? reference[2]).toLowerCase();
71
+ return PAIRED_THEME_TOKENS.has(token) ? `hsl(var(--${token}-foreground))` : null;
72
+ }
73
+ const inner = HSL_FUNCTION.exec(trimmed)?.[1];
74
+ const candidate = inner ?? trimmed;
75
+ if (inner !== void 0 || HEX_6.test(trimmed) || !/[(#]/.test(trimmed)) {
76
+ const foreground = foregroundFor(candidate, mode);
77
+ return foreground ? `hsl(${foreground})` : null;
78
+ }
79
+ return null;
80
+ }
47
81
  function buildChartCss(chartId, config) {
48
82
  const entries = Object.entries(config).filter(([, cfg]) => cfg.color || cfg.theme);
49
83
  if (entries.length === 0) return "";
@@ -52,7 +86,10 @@ function buildChartCss(chartId, config) {
52
86
  const vars = entries.map(([seriesKey, cfg]) => {
53
87
  const value = cfg.theme?.[key] ?? cfg.color;
54
88
  if (!value || !isSafeCssColorValue(value)) return "";
55
- return ` --color-${escapeCssIdent(seriesKey)}: ${value.trim()};`;
89
+ const ident = escapeCssIdent(seriesKey);
90
+ const declaration = ` --color-${ident}: ${value.trim()};`;
91
+ const foreground = seriesForegroundValue(value, key);
92
+ return foreground ? `${declaration}\n --color-${ident}-foreground: ${foreground};` : declaration;
56
93
  }).filter(Boolean).join("\n");
57
94
  if (!vars) return "";
58
95
  return `${selector ? `${selector} [${CHART_DATA_ATTRIBUTE}="${scopeId}"]` : `[${CHART_DATA_ATTRIBUTE}="${scopeId}"]`} {\n${vars}\n}`;
@@ -104,7 +141,7 @@ var ChartContext = class ChartContext {
104
141
  }
105
142
  static ɵfac = i0.ɵɵngDeclareFactory({
106
143
  minVersion: "12.0.0",
107
- version: "22.2.3",
144
+ version: "22.2.4",
108
145
  ngImport: i0,
109
146
  type: ChartContext,
110
147
  deps: [],
@@ -112,7 +149,7 @@ var ChartContext = class ChartContext {
112
149
  });
113
150
  static ɵprov = i0.ɵɵngDeclareService({
114
151
  minVersion: "22.0.0",
115
- version: "22.2.3",
152
+ version: "22.2.4",
116
153
  ngImport: i0,
117
154
  type: ChartContext,
118
155
  autoProvided: false
@@ -120,7 +157,7 @@ var ChartContext = class ChartContext {
120
157
  };
121
158
  i0.ɵɵngDeclareClassMetadata({
122
159
  minVersion: "12.0.0",
123
- version: "22.2.3",
160
+ version: "22.2.4",
124
161
  ngImport: i0,
125
162
  type: ChartContext,
126
163
  decorators: [{
@@ -334,7 +371,7 @@ var ChartStyle = class ChartStyle {
334
371
  }
335
372
  static ɵfac = i0.ɵɵngDeclareFactory({
336
373
  minVersion: "12.0.0",
337
- version: "22.2.3",
374
+ version: "22.2.4",
338
375
  ngImport: i0,
339
376
  type: ChartStyle,
340
377
  deps: [],
@@ -342,7 +379,7 @@ var ChartStyle = class ChartStyle {
342
379
  });
343
380
  static ɵcmp = i0.ɵɵngDeclareComponent({
344
381
  minVersion: "14.0.0",
345
- version: "22.2.3",
382
+ version: "22.2.4",
346
383
  type: ChartStyle,
347
384
  isStandalone: true,
348
385
  selector: "ChartStyle",
@@ -353,7 +390,7 @@ var ChartStyle = class ChartStyle {
353
390
  };
354
391
  i0.ɵɵngDeclareClassMetadata({
355
392
  minVersion: "12.0.0",
356
- version: "22.2.3",
393
+ version: "22.2.4",
357
394
  ngImport: i0,
358
395
  type: ChartStyle,
359
396
  decorators: [{
@@ -413,7 +450,7 @@ var ChartContainer = class ChartContainer {
413
450
  }
414
451
  static ɵfac = i0.ɵɵngDeclareFactory({
415
452
  minVersion: "12.0.0",
416
- version: "22.2.3",
453
+ version: "22.2.4",
417
454
  ngImport: i0,
418
455
  type: ChartContainer,
419
456
  deps: [],
@@ -421,7 +458,7 @@ var ChartContainer = class ChartContainer {
421
458
  });
422
459
  static ɵcmp = i0.ɵɵngDeclareComponent({
423
460
  minVersion: "17.2.0",
424
- version: "22.2.3",
461
+ version: "22.2.4",
425
462
  type: ChartContainer,
426
463
  isStandalone: true,
427
464
  selector: "Chart",
@@ -478,7 +515,7 @@ var ChartContainer = class ChartContainer {
478
515
  };
479
516
  i0.ɵɵngDeclareClassMetadata({
480
517
  minVersion: "12.0.0",
481
- version: "22.2.3",
518
+ version: "22.2.4",
482
519
  ngImport: i0,
483
520
  type: ChartContainer,
484
521
  decorators: [{
@@ -539,7 +576,7 @@ var ChartDataTable = class ChartDataTable {
539
576
  rowHeaderKey = input(null, ...ngDevMode ? [{ debugName: "rowHeaderKey" }] : /* istanbul ignore next */ []);
540
577
  static ɵfac = i0.ɵɵngDeclareFactory({
541
578
  minVersion: "12.0.0",
542
- version: "22.2.3",
579
+ version: "22.2.4",
543
580
  ngImport: i0,
544
581
  type: ChartDataTable,
545
582
  deps: [],
@@ -547,7 +584,7 @@ var ChartDataTable = class ChartDataTable {
547
584
  });
548
585
  static ɵcmp = i0.ɵɵngDeclareComponent({
549
586
  minVersion: "17.0.0",
550
- version: "22.2.3",
587
+ version: "22.2.4",
551
588
  type: ChartDataTable,
552
589
  isStandalone: true,
553
590
  selector: "ChartDataTable",
@@ -611,7 +648,7 @@ var ChartDataTable = class ChartDataTable {
611
648
  };
612
649
  i0.ɵɵngDeclareClassMetadata({
613
650
  minVersion: "12.0.0",
614
- version: "22.2.3",
651
+ version: "22.2.4",
615
652
  ngImport: i0,
616
653
  type: ChartDataTable,
617
654
  decorators: [{
@@ -732,7 +769,7 @@ var ChartRovingFocus = class ChartRovingFocus {
732
769
  }
733
770
  static ɵfac = i0.ɵɵngDeclareFactory({
734
771
  minVersion: "12.0.0",
735
- version: "22.2.3",
772
+ version: "22.2.4",
736
773
  ngImport: i0,
737
774
  type: ChartRovingFocus,
738
775
  deps: [],
@@ -740,7 +777,7 @@ var ChartRovingFocus = class ChartRovingFocus {
740
777
  });
741
778
  static ɵdir = i0.ɵɵngDeclareDirective({
742
779
  minVersion: "14.0.0",
743
- version: "22.2.3",
780
+ version: "22.2.4",
744
781
  type: ChartRovingFocus,
745
782
  isStandalone: true,
746
783
  selector: "svg[ChartRovingFocus]",
@@ -753,7 +790,7 @@ var ChartRovingFocus = class ChartRovingFocus {
753
790
  };
754
791
  i0.ɵɵngDeclareClassMetadata({
755
792
  minVersion: "12.0.0",
756
- version: "22.2.3",
793
+ version: "22.2.4",
757
794
  ngImport: i0,
758
795
  type: ChartRovingFocus,
759
796
  decorators: [{
@@ -771,7 +808,7 @@ i0.ɵɵngDeclareClassMetadata({
771
808
  var ChartMarkFocus = class ChartMarkFocus {
772
809
  static ɵfac = i0.ɵɵngDeclareFactory({
773
810
  minVersion: "12.0.0",
774
- version: "22.2.3",
811
+ version: "22.2.4",
775
812
  ngImport: i0,
776
813
  type: ChartMarkFocus,
777
814
  deps: [],
@@ -779,7 +816,7 @@ var ChartMarkFocus = class ChartMarkFocus {
779
816
  });
780
817
  static ɵdir = i0.ɵɵngDeclareDirective({
781
818
  minVersion: "14.0.0",
782
- version: "22.2.3",
819
+ version: "22.2.4",
783
820
  type: ChartMarkFocus,
784
821
  isStandalone: true,
785
822
  selector: "[ChartMarkFocus]",
@@ -789,7 +826,7 @@ var ChartMarkFocus = class ChartMarkFocus {
789
826
  };
790
827
  i0.ɵɵngDeclareClassMetadata({
791
828
  minVersion: "12.0.0",
792
- version: "22.2.3",
829
+ version: "22.2.4",
793
830
  ngImport: i0,
794
831
  type: ChartMarkFocus,
795
832
  decorators: [{
@@ -846,7 +883,7 @@ var CartesianContext = class CartesianContext {
846
883
  categories = signal([], ...ngDevMode ? [{ debugName: "categories" }] : /* istanbul ignore next */ []);
847
884
  static ɵfac = i0.ɵɵngDeclareFactory({
848
885
  minVersion: "12.0.0",
849
- version: "22.2.3",
886
+ version: "22.2.4",
850
887
  ngImport: i0,
851
888
  type: CartesianContext,
852
889
  deps: [],
@@ -854,7 +891,7 @@ var CartesianContext = class CartesianContext {
854
891
  });
855
892
  static ɵprov = i0.ɵɵngDeclareService({
856
893
  minVersion: "22.0.0",
857
- version: "22.2.3",
894
+ version: "22.2.4",
858
895
  ngImport: i0,
859
896
  type: CartesianContext,
860
897
  autoProvided: false
@@ -862,7 +899,7 @@ var CartesianContext = class CartesianContext {
862
899
  };
863
900
  i0.ɵɵngDeclareClassMetadata({
864
901
  minVersion: "12.0.0",
865
- version: "22.2.3",
902
+ version: "22.2.4",
866
903
  ngImport: i0,
867
904
  type: CartesianContext,
868
905
  decorators: [{
@@ -903,7 +940,7 @@ var CategoricalViewportContext = class CategoricalViewportContext {
903
940
  }
904
941
  static ɵfac = i0.ɵɵngDeclareFactory({
905
942
  minVersion: "12.0.0",
906
- version: "22.2.3",
943
+ version: "22.2.4",
907
944
  ngImport: i0,
908
945
  type: CategoricalViewportContext,
909
946
  deps: [],
@@ -911,7 +948,7 @@ var CategoricalViewportContext = class CategoricalViewportContext {
911
948
  });
912
949
  static ɵprov = i0.ɵɵngDeclareService({
913
950
  minVersion: "22.0.0",
914
- version: "22.2.3",
951
+ version: "22.2.4",
915
952
  ngImport: i0,
916
953
  type: CategoricalViewportContext,
917
954
  autoProvided: false
@@ -919,7 +956,7 @@ var CategoricalViewportContext = class CategoricalViewportContext {
919
956
  };
920
957
  i0.ɵɵngDeclareClassMetadata({
921
958
  minVersion: "12.0.0",
922
- version: "22.2.3",
959
+ version: "22.2.4",
923
960
  ngImport: i0,
924
961
  type: CategoricalViewportContext,
925
962
  decorators: [{
@@ -943,7 +980,7 @@ var ScatterViewportContext = class ScatterViewportContext {
943
980
  }
944
981
  static ɵfac = i0.ɵɵngDeclareFactory({
945
982
  minVersion: "12.0.0",
946
- version: "22.2.3",
983
+ version: "22.2.4",
947
984
  ngImport: i0,
948
985
  type: ScatterViewportContext,
949
986
  deps: [],
@@ -951,7 +988,7 @@ var ScatterViewportContext = class ScatterViewportContext {
951
988
  });
952
989
  static ɵprov = i0.ɵɵngDeclareService({
953
990
  minVersion: "22.0.0",
954
- version: "22.2.3",
991
+ version: "22.2.4",
955
992
  ngImport: i0,
956
993
  type: ScatterViewportContext,
957
994
  autoProvided: false
@@ -959,7 +996,7 @@ var ScatterViewportContext = class ScatterViewportContext {
959
996
  };
960
997
  i0.ɵɵngDeclareClassMetadata({
961
998
  minVersion: "12.0.0",
962
- version: "22.2.3",
999
+ version: "22.2.4",
963
1000
  ngImport: i0,
964
1001
  type: ScatterViewportContext,
965
1002
  decorators: [{
@@ -1202,7 +1239,7 @@ var ChartThemeRadius = class ChartThemeRadius {
1202
1239
  }
1203
1240
  static ɵfac = i0.ɵɵngDeclareFactory({
1204
1241
  minVersion: "12.0.0",
1205
- version: "22.2.3",
1242
+ version: "22.2.4",
1206
1243
  ngImport: i0,
1207
1244
  type: ChartThemeRadius,
1208
1245
  deps: [],
@@ -1210,14 +1247,14 @@ var ChartThemeRadius = class ChartThemeRadius {
1210
1247
  });
1211
1248
  static ɵprov = i0.ɵɵngDeclareService({
1212
1249
  minVersion: "22.0.0",
1213
- version: "22.2.3",
1250
+ version: "22.2.4",
1214
1251
  ngImport: i0,
1215
1252
  type: ChartThemeRadius
1216
1253
  });
1217
1254
  };
1218
1255
  i0.ɵɵngDeclareClassMetadata({
1219
1256
  minVersion: "12.0.0",
1220
- version: "22.2.3",
1257
+ version: "22.2.4",
1221
1258
  ngImport: i0,
1222
1259
  type: ChartThemeRadius,
1223
1260
  decorators: [{ type: Service }],
@@ -1258,7 +1295,7 @@ var ChartThemeSpace = class ChartThemeSpace {
1258
1295
  }
1259
1296
  static ɵfac = i0.ɵɵngDeclareFactory({
1260
1297
  minVersion: "12.0.0",
1261
- version: "22.2.3",
1298
+ version: "22.2.4",
1262
1299
  ngImport: i0,
1263
1300
  type: ChartThemeSpace,
1264
1301
  deps: [],
@@ -1266,14 +1303,14 @@ var ChartThemeSpace = class ChartThemeSpace {
1266
1303
  });
1267
1304
  static ɵprov = i0.ɵɵngDeclareService({
1268
1305
  minVersion: "22.0.0",
1269
- version: "22.2.3",
1306
+ version: "22.2.4",
1270
1307
  ngImport: i0,
1271
1308
  type: ChartThemeSpace
1272
1309
  });
1273
1310
  };
1274
1311
  i0.ɵɵngDeclareClassMetadata({
1275
1312
  minVersion: "12.0.0",
1276
- version: "22.2.3",
1313
+ version: "22.2.4",
1277
1314
  ngImport: i0,
1278
1315
  type: ChartThemeSpace,
1279
1316
  decorators: [{ type: Service }],
@@ -81,7 +81,7 @@ var LineChart = class LineChart {
81
81
  }
82
82
  static ɵfac = i0.ɵɵngDeclareFactory({
83
83
  minVersion: "12.0.0",
84
- version: "22.2.3",
84
+ version: "22.2.4",
85
85
  ngImport: i0,
86
86
  type: LineChart,
87
87
  deps: [],
@@ -89,7 +89,7 @@ var LineChart = class LineChart {
89
89
  });
90
90
  static ɵcmp = i0.ɵɵngDeclareComponent({
91
91
  minVersion: "17.0.0",
92
- version: "22.2.3",
92
+ version: "22.2.4",
93
93
  type: LineChart,
94
94
  isStandalone: true,
95
95
  selector: "ChartLine",
@@ -317,7 +317,7 @@ var LineChart = class LineChart {
317
317
  };
318
318
  i0.ɵɵngDeclareClassMetadata({
319
319
  minVersion: "12.0.0",
320
- version: "22.2.3",
320
+ version: "22.2.4",
321
321
  ngImport: i0,
322
322
  type: LineChart,
323
323
  decorators: [{
@@ -1,5 +1,5 @@
1
1
  import { arc, pie } from "d3-shape";
2
- import { ChartContext, ChartDataTable, ChartMarkFocus, ChartRovingFocus, ChartThemeRadius, ChartThemeSpace, DEFAULT_POLAR_MARGIN_UNITS, readNumber, resolveChartMargin, resolveChartStyle, seriesColorVar, setupPolarChart } from "@ojiepermana/angular/chart/core";
2
+ import { ChartContext, ChartDataTable, ChartMarkFocus, ChartRovingFocus, ChartThemeRadius, ChartThemeSpace, DEFAULT_POLAR_MARGIN_UNITS, escapeCssIdent, readNumber, resolveChartMargin, resolveChartStyle, seriesColorVar, setupPolarChart } from "@ojiepermana/angular/chart/core";
3
3
  import * as i0 from "@angular/core";
4
4
  import { Component, computed, inject, input, output } from "@angular/core";
5
5
  function computePieLayout(input) {
@@ -90,6 +90,9 @@ var PieChart = class PieChart {
90
90
  sliceAriaLabel(s) {
91
91
  return `${s.name}: ${s.value}`;
92
92
  }
93
+ labelFill(s) {
94
+ return `var(--color-${escapeCssIdent(s.seriesKey)}-foreground, hsl(var(--foreground)))`;
95
+ }
93
96
  sliceTransform(s) {
94
97
  return s.translateX || s.translateY ? `translate(${s.translateX}, ${s.translateY})` : null;
95
98
  }
@@ -105,7 +108,7 @@ var PieChart = class PieChart {
105
108
  }
106
109
  static ɵfac = i0.ɵɵngDeclareFactory({
107
110
  minVersion: "12.0.0",
108
- version: "22.2.3",
111
+ version: "22.2.4",
109
112
  ngImport: i0,
110
113
  type: PieChart,
111
114
  deps: [],
@@ -113,7 +116,7 @@ var PieChart = class PieChart {
113
116
  });
114
117
  static ɵcmp = i0.ɵɵngDeclareComponent({
115
118
  minVersion: "17.0.0",
116
- version: "22.2.3",
119
+ version: "22.2.4",
117
120
  type: PieChart,
118
121
  isStandalone: true,
119
122
  selector: "ChartPie",
@@ -264,7 +267,8 @@ var PieChart = class PieChart {
264
267
  @if (showLabels()) {
265
268
  @for (s of layout().slices; track s.seriesKey) {
266
269
  <svg:text
267
- class="chart-slice-label fill-foreground text-2xs-plus"
270
+ class="chart-slice-label text-2xs-plus"
271
+ [style.fill]="labelFill(s)"
268
272
  text-anchor="middle"
269
273
  dominant-baseline="middle"
270
274
  [attr.x]="s.centroid[0] + s.translateX"
@@ -290,6 +294,7 @@ var PieChart = class PieChart {
290
294
  />
291
295
  `,
292
296
  isInline: true,
297
+ styles: [".chart-slice-label{stroke:hsl(var(--background));stroke-width:calc(var(--border-width) * 3);stroke-linejoin:round;paint-order:stroke}\n"],
293
298
  dependencies: [
294
299
  {
295
300
  kind: "directive",
@@ -317,7 +322,7 @@ var PieChart = class PieChart {
317
322
  };
318
323
  i0.ɵɵngDeclareClassMetadata({
319
324
  minVersion: "12.0.0",
320
- version: "22.2.3",
325
+ version: "22.2.4",
321
326
  ngImport: i0,
322
327
  type: PieChart,
323
328
  decorators: [{
@@ -367,7 +372,8 @@ i0.ɵɵngDeclareClassMetadata({
367
372
  @if (showLabels()) {
368
373
  @for (s of layout().slices; track s.seriesKey) {
369
374
  <svg:text
370
- class="chart-slice-label fill-foreground text-2xs-plus"
375
+ class="chart-slice-label text-2xs-plus"
376
+ [style.fill]="labelFill(s)"
371
377
  text-anchor="middle"
372
378
  dominant-baseline="middle"
373
379
  [attr.x]="s.centroid[0] + s.translateX"
@@ -391,7 +397,8 @@ i0.ɵɵngDeclareClassMetadata({
391
397
  [rowHeaderKey]="nameKey()"
392
398
  [label]="ariaSummary()"
393
399
  />
394
- `
400
+ `,
401
+ styles: [".chart-slice-label{stroke:hsl(var(--background));stroke-width:calc(var(--border-width) * 3);stroke-linejoin:round;paint-order:stroke}\n"]
395
402
  }]
396
403
  }],
397
404
  propDecorators: {