ps-helix 7.0.0 → 7.0.2
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/CONFIGURATION.md +1 -1
- package/README.md +3 -3
- package/TOKENS.md +3 -2
- package/fesm2022/ps-helix.mjs +152 -143
- package/fesm2022/ps-helix.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/styles/themes/dark-auto.css +4 -1
- package/src/lib/styles/themes/dark.css +4 -1
- package/src/lib/styles/tokens/sizing.tokens.css +10 -0
- package/types/ps-helix.d.ts +30 -16
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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;
|
|
@@ -99,6 +99,16 @@
|
|
|
99
99
|
*/
|
|
100
100
|
--psh-touch-target-min: 2.75rem; /* 44px */
|
|
101
101
|
|
|
102
|
+
/**
|
|
103
|
+
* The AA floor, for a control that lives *inside* a compact component.
|
|
104
|
+
*
|
|
105
|
+
* 44px is right for a standalone control. It is wrong for the close button of a tag: the
|
|
106
|
+
* tag would either grow to 44px, or its hit area would spill over the neighbouring tag and
|
|
107
|
+
* swallow clicks meant for it — and 2.5.8 is only met when targets do not overlap. 24px
|
|
108
|
+
* clears the floor without either.
|
|
109
|
+
*/
|
|
110
|
+
--psh-touch-target-compact: 1.5rem; /* 24px */
|
|
111
|
+
|
|
102
112
|
/* Scrollbar width compensation */
|
|
103
113
|
--psh-scrollbar-width: 0;
|
|
104
114
|
|
package/types/ps-helix.d.ts
CHANGED
|
@@ -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
|
|
@@ -3015,7 +3024,6 @@ declare class PshModalComponent implements AfterViewInit, OnDestroy {
|
|
|
3015
3024
|
private readonly overlay;
|
|
3016
3025
|
private readonly renderer;
|
|
3017
3026
|
private readonly platformId;
|
|
3018
|
-
private readonly zone;
|
|
3019
3027
|
private readonly document;
|
|
3020
3028
|
/** Elements this modal marked `inert`, so it only ever undoes its own. */
|
|
3021
3029
|
private inertedByThisModal;
|
|
@@ -3026,9 +3034,17 @@ declare class PshModalComponent implements AfterViewInit, OnDestroy {
|
|
|
3026
3034
|
protected readonly zIndex: _angular_core.WritableSignal<number | null>;
|
|
3027
3035
|
private modalElement?;
|
|
3028
3036
|
private isAttachedToBody;
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3037
|
+
/**
|
|
3038
|
+
* Read from the shared `matchMedia`, on the same `md` step the stylesheet uses.
|
|
3039
|
+
*
|
|
3040
|
+
* It was `innerWidth < 768` behind a resize listener per modal — a pixel breakpoint written
|
|
3041
|
+
* in TypeScript, which no amount of `verify:breakpoints` could see because that script reads
|
|
3042
|
+
* stylesheets. It also did not follow browser zoom: at 150% the stylesheet switched at an
|
|
3043
|
+
* effective 1150px while this stayed at 768, so the modal was in its mobile layout while
|
|
3044
|
+
* `isMobileScreen()` still said no, and a consumer binding it — the demo does, for full-width
|
|
3045
|
+
* footer buttons — got desktop buttons in a mobile dialog.
|
|
3046
|
+
*/
|
|
3047
|
+
private readonly isMobile;
|
|
3032
3048
|
/**
|
|
3033
3049
|
* Controls the visibility of the modal (two-way binding)
|
|
3034
3050
|
*/
|
|
@@ -3175,18 +3191,6 @@ declare class PshModalComponent implements AfterViewInit, OnDestroy {
|
|
|
3175
3191
|
private releaseBackgroundInert;
|
|
3176
3192
|
/** Releases this modal's overlay layer and clears its z-index. */
|
|
3177
3193
|
private releaseOverlay;
|
|
3178
|
-
/**
|
|
3179
|
-
* Checks if the current screen size is mobile
|
|
3180
|
-
*/
|
|
3181
|
-
private checkScreenSize;
|
|
3182
|
-
/**
|
|
3183
|
-
* Sets up resize listener to detect screen size changes
|
|
3184
|
-
*/
|
|
3185
|
-
private setupResizeListener;
|
|
3186
|
-
/**
|
|
3187
|
-
* Removes resize listener
|
|
3188
|
-
*/
|
|
3189
|
-
private removeResizeListener;
|
|
3190
3194
|
/**
|
|
3191
3195
|
* Adds keyboard event listeners
|
|
3192
3196
|
*/
|
|
@@ -3502,6 +3506,16 @@ declare class PshSidebarComponent implements OnDestroy {
|
|
|
3502
3506
|
readonly mode: _angular_core.InputSignal<SidebarMode>;
|
|
3503
3507
|
readonly position: _angular_core.InputSignal<SidebarPosition>;
|
|
3504
3508
|
readonly width: _angular_core.InputSignal<string>;
|
|
3509
|
+
/**
|
|
3510
|
+
* The width below which the sidebar becomes an overlay.
|
|
3511
|
+
*
|
|
3512
|
+
* Defaults to the `md` step of the library's scale, in `em` like every media query it ships:
|
|
3513
|
+
* a px breakpoint does not follow browser zoom, so at 150% the rest of the page had switched
|
|
3514
|
+
* to its narrow layout while the sidebar was still docked. It is also exclusive — `768px` was
|
|
3515
|
+
* true at exactly 768px, where a `min-width: 48em` rule is true as well.
|
|
3516
|
+
*
|
|
3517
|
+
* Any CSS length is still accepted, so `'768px'` keeps working.
|
|
3518
|
+
*/
|
|
3505
3519
|
readonly breakpoint: _angular_core.InputSignal<string>;
|
|
3506
3520
|
readonly autoFocus: _angular_core.InputSignal<boolean>;
|
|
3507
3521
|
readonly ariaLabelInput: _angular_core.InputSignal<string | undefined>;
|