@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
@@ -54,7 +54,9 @@ export declare function isSafeCssColorValue(value: string): boolean;
54
54
  /**
55
55
  * Generate the CSS rule-set for a chart instance: one `--color-<key>` per
56
56
  * series, scoped to the owning `[data-chart]` element, with optional dark
57
- * variant via `[data-mode="dark"] [data-chart="…"]`.
57
+ * variant via `[data-mode="dark"] [data-chart="…"]`. Beside each colour sits a
58
+ * `--color-<key>-foreground` for text drawn on it, chosen per mode by
59
+ * {@link seriesForegroundValue} and omitted when no foreground can be promised.
58
60
  *
59
61
  * Series without any color are skipped (consumer can fall back to a default), and
60
62
  * so is any series whose color fails {@link isSafeCssColorValue}: the value never
@@ -117,6 +117,11 @@ export declare class PieChart {
117
117
  protected readonly ariaSummary: import("@angular/core").Signal<string>;
118
118
  protected readonly dataColumns: import("@angular/core").Signal<string[]>;
119
119
  protected sliceAriaLabel(s: PieSliceRect): string;
120
+ /**
121
+ * The label colour for a slice: the series foreground `buildChartCss` wrote
122
+ * for this mode, or the body foreground when the series has none.
123
+ */
124
+ protected labelFill(s: PieSliceRect): string;
120
125
  protected sliceTransform(s: PieSliceRect): string | null;
121
126
  protected emitClick(s: PieSliceRect): void;
122
127
  static ɵfac: i0.ɵɵFactoryDeclaration<PieChart, never>;
@@ -159,7 +159,7 @@ export declare class ThemeSettingsDefaultAdapter implements ThemeSettingsAdapter
159
159
  private readonly storage;
160
160
  private readonly layout;
161
161
  private readonly shell;
162
- readonly surface: import("@angular/core").Signal<"flat" | "grid" | "grid-line" | "honeycomb" | "matrix" | "circuit" | "line-vertical" | "line-horizontal">;
162
+ readonly surface: import("@angular/core").Signal<"grid" | "flat" | "grid-line" | "honeycomb" | "matrix" | "circuit" | "line-vertical" | "line-horizontal">;
163
163
  readonly appearance: import("@angular/core").Signal<"flat" | "border-rail">;
164
164
  readonly width: import("@angular/core").Signal<"fluid" | "full" | "wide" | "container">;
165
165
  private readonly layoutTypeState;
@@ -169,7 +169,7 @@ export declare class ThemeSettingsDefaultAdapter implements ThemeSettingsAdapter
169
169
  readonly navType: import("@angular/core").Signal<ThemeSettingsNavigationType>;
170
170
  readonly navTypeMode: import("@angular/core").Signal<ThemeSettingsNavigationMode>;
171
171
  /** Shell mode the nav-type constraints are resolved against. */
172
- readonly shellMode: import("@angular/core").Signal<"desktop" | "web" | "tablet" | "mobile">;
172
+ readonly shellMode: import("@angular/core").Signal<"tablet" | "desktop" | "web" | "mobile">;
173
173
  constructor();
174
174
  setSurface(surface: LayoutSurface): void;
175
175
  setAppearance(appearance: LayoutAppearance): void;
@@ -0,0 +1,45 @@
1
+ import { ON_FILL_INK, foregroundFor } from "@ojiepermana/angular/theme/styles";
2
+ import * as i0 from "@angular/core";
3
+ /** The painted fill and the text colour chosen for it, or `null` when unreadable. */
4
+ interface OnFillPaint {
5
+ readonly background: string;
6
+ readonly color: string;
7
+ }
8
+ /**
9
+ * Paints an element with a solid fill from data and gives it a readable text
10
+ * colour: white or the theme ink, whichever measures higher, deepened when
11
+ * neither reaches 4.5 to 1 (`foregroundFor`, spec 0011).
12
+ *
13
+ * ```html
14
+ * <span [OnFill]="tag.color">{{ tag.label }}</span>
15
+ * ```
16
+ *
17
+ * `OnFill` takes an HSL triplet (`'221 83% 53%'`) or a hex colour (`'#3b82f6'`).
18
+ * The mode comes from `data-mode` on `<html>`, watched with a
19
+ * `MutationObserver`, so the ink follows a light/dark switch. The directive
20
+ * never injects `ThemeModeService` and never writes to `<html>`: it works with
21
+ * or without `provideUiTheme`. Without a document (SSR) or without the
22
+ * attribute it uses light mode.
23
+ *
24
+ * A value it cannot read paints nothing, so the element keeps its inherited
25
+ * colours, and logs one warning in dev mode.
26
+ */
27
+ export declare class OnFill {
28
+ /** The fill: an HSL triplet or a hex colour. */
29
+ readonly OnFill: import("@angular/core").InputSignal<string>;
30
+ private readonly document;
31
+ private readonly mode;
32
+ /** The style the host gets, or `null` when the fill cannot be read. */
33
+ protected readonly paint: import("@angular/core").Signal<OnFillPaint | null>;
34
+ constructor();
35
+ private readMode;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<OnFill, never>;
37
+ static ɵdir: i0.ɵɵDirectiveDeclaration<OnFill, "[OnFill]", never, {
38
+ "OnFill": {
39
+ "alias": "OnFill";
40
+ "required": true;
41
+ "isSignal": true;
42
+ };
43
+ }, {}, never, never, true, never>;
44
+ }
45
+ export { ON_FILL_INK, foregroundFor };
@@ -126,8 +126,10 @@ export declare class ThemeBrandService {
126
126
  /**
127
127
  * Set the brand color. `color`/`foreground` are HSL triplets (e.g.
128
128
  * `'221 83% 53%'`); a hex color is converted, since that is what a native
129
- * picker hands back. The fill is kept exactly as chosen — `--brand-foreground`
130
- * is moved until text on it clears 4.5 to 1, and the focus ring is solved
129
+ * picker hands back. The fill is kept exactly as chosen. Without `foreground`,
130
+ * `--brand-foreground` is white or the theme ink, whichever measures higher
131
+ * (`foregroundFor`); an explicit `foreground` is kept only when it clears 4.5
132
+ * to 1, otherwise it is replaced by that same choice. The focus ring is solved
131
133
  * separately per mode, so a pale brand can never leave the ring invisible.
132
134
  */
133
135
  setBrand(color: string, foreground?: string): void;
@@ -271,7 +273,13 @@ export declare class ThemeSpaceService {
271
273
  export interface ThemeBrandOptions {
272
274
  /** Brand color, e.g. `'221 83% 53%'`. */
273
275
  readonly color: string;
274
- /** Foreground on solid brand fills. Defaults to white. */
276
+ /**
277
+ * Foreground on solid brand fills. Omit it to get white or the theme ink,
278
+ * whichever measures higher against `color` (`foregroundFor`). An explicit
279
+ * value is kept only when it clears 4.5 to 1; otherwise it is replaced by that
280
+ * same choice. When `color` is a `var()` reference nothing can be measured, so
281
+ * this value (or white) is used as given.
282
+ */
275
283
  readonly foreground?: string;
276
284
  }
277
285
  export interface ThemeOptions {
@@ -292,4 +300,29 @@ export interface ThemeOptions {
292
300
  readonly brand?: string | ThemeBrandOptions;
293
301
  }
294
302
  export declare const THEME_OPTIONS: InjectionToken<Readonly<ThemeOptions>>;
295
- export declare function provideUiTheme(options?: ThemeOptions): EnvironmentProviders;
303
+ export declare function provideUiTheme(options?: ThemeOptions): EnvironmentProviders;
304
+ /**
305
+ * The theme's dark ink per mode: `--foreground` of the base theme, which is what
306
+ * a solid fill falls back to when white does not measure higher against it.
307
+ *
308
+ * Same values as `DARK_INK` in scripts/generators/gen-theme-colors.mjs, so a fill
309
+ * the generator measured and a fill a consumer hands over at runtime get the
310
+ * same answer. Read only.
311
+ */
312
+ export declare const ON_FILL_INK: Readonly<{
313
+ readonly light: string;
314
+ readonly dark: string;
315
+ }>;
316
+ /**
317
+ * The text colour for a solid fill: white or the theme's dark ink
318
+ * ({@link ON_FILL_INK}), whichever gives the higher WCAG ratio, with the ink
319
+ * deepened step by step when neither reaches 4.5 to 1.
320
+ *
321
+ * `fill` is an HSL triplet (`'221 83% 53%'`) or a hex colour (`'#3b82f6'`).
322
+ * Returns an HSL triplet for `hsl(<triplet>)`, or `null` when `fill` cannot be
323
+ * read. The fill itself is never changed; only the foreground is chosen.
324
+ *
325
+ * The result equals the generator's for every canonical `H S% L%` input, which
326
+ * scripts/generators/fixtures/on-fill-parity.json locks.
327
+ */
328
+ export declare function foregroundFor(fill: string, mode?: 'light' | 'dark'): string | null;