ps-helix 7.0.0 → 7.0.1

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": "ps-helix",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "description": "Helix Design System - A comprehensive Angular component library",
5
5
  "author": "Fabrice PEREZ - Design Engineer at PACK Solutions",
6
6
  "license": "MIT",
@@ -233,7 +233,10 @@
233
233
  --psh-text-color-disabled: rgba(255, 255, 255, 0.4);
234
234
 
235
235
  /* Text on colored backgrounds */
236
- --psh-text-on-primary: #FFFFFF;
236
+ /* Primary is lightened for this theme so it reads against a dark surface; that same
237
+ lightening put white text on it at 3.52:1, under the 4.5:1 floor. Dark ink, like the
238
+ five semantic fills below already use here. */
239
+ --psh-text-on-primary: #000000;
237
240
  --psh-text-on-secondary: #FFFFFF;
238
241
  --psh-text-on-success: #000000;
239
242
  --psh-text-on-warning: #000000;
@@ -222,7 +222,10 @@
222
222
  --psh-text-color-disabled: rgba(255, 255, 255, 0.4);
223
223
 
224
224
  /* Text on colored backgrounds */
225
- --psh-text-on-primary: #FFFFFF;
225
+ /* Primary is lightened for this theme so it reads against a dark surface; that same
226
+ lightening put white text on it at 3.52:1, under the 4.5:1 floor. Dark ink, like the
227
+ five semantic fills below already use here. */
228
+ --psh-text-on-primary: #000000;
226
229
  --psh-text-on-secondary: #FFFFFF;
227
230
  --psh-text-on-success: #000000;
228
231
  --psh-text-on-warning: #000000;
@@ -45,9 +45,18 @@ declare class ThemeService {
45
45
  lastChange: Date;
46
46
  }>;
47
47
  constructor();
48
+ /**
49
+ * Switches theme *and* remembers the choice — the two halves of what a theme toggle
50
+ * means. They used to be split across two methods: `setDarkTheme` wrote `data-theme`
51
+ * without persisting, `updateTheme` persisted without writing `data-theme`. Whichever
52
+ * one a consumer picked, half the job was missing, and the demo's own toggle reverted
53
+ * on every reload.
54
+ */
48
55
  setDarkTheme(isDark: boolean): void;
49
56
  toggleTheme(): void;
50
57
  updateTheme(name: Theme): void;
58
+ /** The visible half: the attribute the stylesheets read, and the derived palette. */
59
+ private applyTheme;
51
60
  /**
52
61
  * Applies the customer brand colors to CSS variables, automatically
53
62
  * deriving variants in OKLCH and enforcing WCAG contrast against the