@memberjunction/ng-shared-generic 6.3.0-edge.1 → 6.3.0-edge.3

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.
@@ -135,6 +135,7 @@
135
135
 
136
136
  /* Background Colors */
137
137
  --mj-bg-page: var(--mj-color-neutral-50);
138
+ --mj-bg-canvas: var(--mj-color-neutral-100);
138
139
  --mj-bg-surface: var(--mj-color-neutral-0);
139
140
  --mj-bg-surface-elevated: var(--mj-color-neutral-0);
140
141
  --mj-bg-surface-card: var(--mj-color-neutral-50);
@@ -161,6 +162,73 @@
161
162
  --mj-border-focus: var(--mj-color-brand-500);
162
163
  --mj-border-error: var(--mj-color-error-500);
163
164
 
165
+ /* Surface & Elevation Ramp B (Tier 2 role tokens — NAMING.md)
166
+ Four levels: sunken (wells, code blocks; no state tokens), base (default cards,
167
+ panels, form sections, table bodies), elevated (raised above base, still part of
168
+ the page), overlay (floats over the page: dialogs, sheets, popovers, menus, toasts).
169
+ Hover and selected are states at the end of the token name, not elevation changes.
170
+ Border tokens split color (--mj-surface-<level>-border) from width and style
171
+ (--mj-surface-border-width, --mj-surface-border-style) so brands can re-color a
172
+ surface without restating stroke width/style, or set borderless/2px surfaces
173
+ without resetting border-style to initial (none). */
174
+ --mj-surface-border-width: 1px;
175
+ --mj-surface-border-style: solid;
176
+
177
+ --mj-surface-sunken-bg: var(--mj-bg-surface-sunken);
178
+ --mj-surface-sunken-border: var(--mj-border-subtle);
179
+ --mj-surface-sunken-shadow: var(--mj-shadow-inner);
180
+
181
+ --mj-surface-base-bg: var(--mj-bg-surface);
182
+ --mj-surface-base-border: var(--mj-border-default);
183
+ --mj-surface-base-shadow: var(--mj-shadow-none);
184
+ --mj-surface-base-bg-hover: var(--mj-bg-surface-hover);
185
+ --mj-surface-base-bg-selected: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));
186
+ --mj-surface-base-border-selected: var(--mj-brand-primary);
187
+
188
+ --mj-surface-elevated-bg: var(--mj-bg-surface-elevated);
189
+ --mj-surface-elevated-border: var(--mj-border-default);
190
+ --mj-surface-elevated-shadow: var(--mj-shadow-md);
191
+ --mj-surface-elevated-bg-hover: var(--mj-bg-surface-hover);
192
+ --mj-surface-elevated-bg-selected: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface-elevated));
193
+ --mj-surface-elevated-border-selected: var(--mj-brand-primary);
194
+
195
+ --mj-surface-overlay-bg: var(--mj-bg-surface-elevated);
196
+ --mj-surface-overlay-border: var(--mj-border-strong);
197
+ --mj-surface-overlay-shadow: var(--mj-shadow-xl);
198
+ --mj-surface-overlay-bg-hover: var(--mj-bg-surface-hover);
199
+ --mj-surface-overlay-bg-selected: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface-elevated));
200
+ --mj-surface-overlay-border-selected: var(--mj-brand-primary);
201
+
202
+ /* Surface-scoped text re-point tokens (Tier 2 — NAMING.md).
203
+ Point at primitives (never var(--mj-text-*)) so placing a .mj-surface-* class on
204
+ the same element as :root or the dark theme block never creates a custom-property
205
+ cycle. Light sunken (neutral-100) steps one primitive darker so muted (6.92:1)
206
+ and link (5.34:1) clear WCAG AA, mirroring how dark elevated steps brighter.
207
+ Selected surfaces promote muted text to neutral-600 so subtitles stay >= AA on
208
+ the selected tint (6.80:1 on base, 6.61:1 on elevated in light).
209
+ Keep ThemeEngine derive.ts resolveSemantics in lockstep. */
210
+ --mj-surface-text-muted-selected: var(--mj-color-neutral-600);
211
+ --mj-surface-base-text-secondary: var(--mj-color-neutral-600);
212
+ --mj-surface-base-text-muted: var(--mj-color-neutral-500);
213
+ --mj-surface-base-text-link: var(--mj-color-brand-500);
214
+ --mj-surface-base-text-link-hover: var(--mj-color-brand-600);
215
+ --mj-surface-sunken-text-secondary: var(--mj-color-neutral-700);
216
+ --mj-surface-sunken-text-muted: var(--mj-color-neutral-600);
217
+ --mj-surface-sunken-text-link: var(--mj-color-brand-600);
218
+ --mj-surface-sunken-text-link-hover: var(--mj-color-brand-700);
219
+ --mj-surface-elevated-text-secondary: var(--mj-color-neutral-600);
220
+ --mj-surface-elevated-text-muted: var(--mj-color-neutral-500);
221
+ --mj-surface-elevated-text-link: var(--mj-color-brand-500);
222
+ --mj-surface-elevated-text-link-hover: var(--mj-color-brand-600);
223
+ --mj-surface-overlay-text-secondary: var(--mj-surface-elevated-text-secondary);
224
+ --mj-surface-overlay-text-muted: var(--mj-surface-elevated-text-muted);
225
+ --mj-surface-overlay-text-link: var(--mj-surface-elevated-text-link);
226
+ --mj-surface-overlay-text-link-hover: var(--mj-surface-elevated-text-link-hover);
227
+
228
+ /* Ambient Layer — off by default in the stock theme. */
229
+ --mj-ambient: none;
230
+ --mj-ambient-strength: 0;
231
+
164
232
  /* Brand Colors (semantic) */
165
233
  --mj-brand-primary: var(--mj-color-brand-500);
166
234
  --mj-brand-primary-hover: var(--mj-color-brand-600);
@@ -351,8 +419,10 @@
351
419
  TYPOGRAPHY
352
420
  ======================================== */
353
421
 
354
- /* Font Family */
355
- --mj-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
422
+ /* Font Family
423
+ --mj-font-family-display is intentionally unset at :root so container-scoped
424
+ --mj-font-family overrides cascade into headings via _typography.scss's fallback chain. */
425
+ --mj-font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
356
426
  --mj-font-family-mono: 'JetBrains Mono', 'SF Mono', Consolas, 'Liberation Mono', Menlo, monospace;
357
427
 
358
428
  /* Font Sizes */
@@ -416,6 +486,12 @@
416
486
  --mj-space-20: 5rem; /* 80px */
417
487
  --mj-space-24: 6rem; /* 96px */
418
488
 
489
+ /* Control Height Scale (NAMING.md)
490
+ 32 / 40 / 52px on desktop; sm and md become 44px on coarse pointers (WCAG 2.5.5). */
491
+ --mj-control-height-sm: 32px;
492
+ --mj-control-height-md: 40px;
493
+ --mj-control-height-lg: 52px;
494
+
419
495
  /* ========================================
420
496
  EFFECTS
421
497
  ======================================== */
@@ -429,6 +505,12 @@
429
505
  --mj-radius-2xl: 24px;
430
506
  --mj-radius-full: 9999px;
431
507
 
508
+ /* Radius Roles (Tier 2 — NAMING.md) */
509
+ --mj-radius-control: var(--mj-radius-md);
510
+ --mj-radius-surface: var(--mj-radius-lg);
511
+ --mj-radius-overlay: var(--mj-radius-lg);
512
+ --mj-radius-pill: var(--mj-radius-full);
513
+
432
514
  /* Shadows */
433
515
  --mj-shadow-none: none;
434
516
  --mj-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
@@ -533,6 +615,7 @@
533
615
  /* Background Colors */
534
616
 
535
617
  --mj-bg-page: var(--mj-color-neutral-900);
618
+ --mj-bg-canvas: var(--mj-color-neutral-900);
536
619
  --mj-bg-surface: var(--mj-color-neutral-800);
537
620
  /* Card sits between surface (800) and elevated (700). Derived from the neutral
538
621
  primitives (not a literal) so org brand overlays re-tint it in dark mode; the
@@ -562,6 +645,64 @@
562
645
  --mj-border-focus: var(--mj-color-brand-400);
563
646
  --mj-border-error: var(--mj-color-error-400);
564
647
 
648
+ /* Surface & Elevation Ramp B (dark mode)
649
+ Re-declared in [data-theme="dark"] so both document-level and scoped dark
650
+ containers (e.g. Theme Studio preview canvas) resolve the dark surface fills,
651
+ borders, shadows, and per-level text tiers. Shadows point at Tier-1 scale tokens
652
+ (never literals) so theme-level shadow overrides (e.g. Flatter) apply in dark too. */
653
+ --mj-surface-sunken-bg: var(--mj-bg-surface-sunken);
654
+ --mj-surface-sunken-border: var(--mj-border-subtle);
655
+ --mj-surface-sunken-shadow: var(--mj-shadow-none);
656
+
657
+ --mj-surface-base-bg: var(--mj-bg-surface);
658
+ --mj-surface-base-border: var(--mj-border-default);
659
+ --mj-surface-base-shadow: var(--mj-shadow-none);
660
+ --mj-surface-base-bg-hover: var(--mj-bg-surface-hover);
661
+ --mj-surface-base-bg-selected: color-mix(in srgb, var(--mj-brand-primary) 8%, var(--mj-bg-surface));
662
+ --mj-surface-base-border-selected: var(--mj-brand-primary);
663
+
664
+ --mj-surface-elevated-bg: var(--mj-bg-surface-elevated);
665
+ --mj-surface-elevated-border: var(--mj-border-default);
666
+ --mj-surface-elevated-shadow: var(--mj-shadow-md);
667
+ --mj-surface-elevated-bg-hover: var(--mj-bg-surface-hover);
668
+ --mj-surface-elevated-bg-selected: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface-elevated));
669
+ --mj-surface-elevated-border-selected: var(--mj-brand-primary);
670
+
671
+ --mj-surface-overlay-bg: var(--mj-bg-surface-elevated);
672
+ --mj-surface-overlay-border: var(--mj-border-strong);
673
+ --mj-surface-overlay-shadow: var(--mj-shadow-xl);
674
+ --mj-surface-overlay-bg-hover: var(--mj-bg-surface-hover);
675
+ --mj-surface-overlay-bg-selected: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface-elevated));
676
+ --mj-surface-overlay-border-selected: var(--mj-brand-primary);
677
+
678
+ /* Dark text tiers on elevated and overlay surfaces step one primitive brighter
679
+ so they clear WCAG AA against --mj-bg-surface-elevated (neutral-700):
680
+ secondary: neutral-300 -> neutral-200 (6.97:1 -> 8.40:1)
681
+ muted: neutral-400 -> neutral-300 (4.04:1 -> 6.97:1)
682
+ link: brand-300 -> brand-200 (3.99:1 -> 5.33:1)
683
+ link-hover: brand-200 -> brand-100 (5.33:1 -> 7.04:1)
684
+ Base and sunken point directly at primitives (never var(--mj-text-*)) so an
685
+ element carrying both [data-theme="dark"] and .mj-surface-base / .mj-surface-sunken
686
+ never hits a CSS custom-property cycle.
687
+ Keep ThemeEngine derive.ts resolveSemantics in lockstep. */
688
+ --mj-surface-text-muted-selected: var(--mj-color-neutral-300);
689
+ --mj-surface-base-text-secondary: var(--mj-color-neutral-300);
690
+ --mj-surface-base-text-muted: var(--mj-color-neutral-400);
691
+ --mj-surface-base-text-link: var(--mj-color-brand-300);
692
+ --mj-surface-base-text-link-hover: var(--mj-color-brand-200);
693
+ --mj-surface-sunken-text-secondary: var(--mj-surface-base-text-secondary);
694
+ --mj-surface-sunken-text-muted: var(--mj-surface-base-text-muted);
695
+ --mj-surface-sunken-text-link: var(--mj-surface-base-text-link);
696
+ --mj-surface-sunken-text-link-hover: var(--mj-surface-base-text-link-hover);
697
+ --mj-surface-elevated-text-secondary: var(--mj-color-neutral-200);
698
+ --mj-surface-elevated-text-muted: var(--mj-color-neutral-300);
699
+ --mj-surface-elevated-text-link: var(--mj-color-brand-200);
700
+ --mj-surface-elevated-text-link-hover: var(--mj-color-brand-100);
701
+ --mj-surface-overlay-text-secondary: var(--mj-surface-elevated-text-secondary);
702
+ --mj-surface-overlay-text-muted: var(--mj-surface-elevated-text-muted);
703
+ --mj-surface-overlay-text-link: var(--mj-surface-elevated-text-link);
704
+ --mj-surface-overlay-text-link-hover: var(--mj-surface-elevated-text-link-hover);
705
+
565
706
  /* Brand Colors (adjusted for dark) */
566
707
  --mj-brand-primary: var(--mj-color-brand-400);
567
708
  --mj-brand-primary-hover: var(--mj-color-brand-300);
@@ -673,3 +814,103 @@
673
814
  --mj-logo-mark: url('/assets/mj-mark-dark.svg');
674
815
  --mj-logo-color: #4dabd5;
675
816
  }
817
+
818
+ /* ========================================
819
+ TOUCH TARGET FLOOR (WCAG 2.5.5)
820
+ ======================================== */
821
+
822
+ @media (pointer: coarse) {
823
+ :root {
824
+ --mj-control-height-sm: 44px;
825
+ --mj-control-height-md: 44px;
826
+ }
827
+ }
828
+
829
+ /* ========================================
830
+ SURFACE LEVEL CLASSES (Ramp B — NAMING.md)
831
+ ========================================
832
+ Each surface class sets background, border (composing width, style, and color
833
+ tokens), and box-shadow from its level's role tokens and re-points
834
+ --mj-text-{secondary,muted,link,link-hover} so nested surfaces always reset to
835
+ their own contrast tiers. Hover (.is-hover) and selected (.is-selected) states
836
+ exist on base, elevated, and overlay (sunken is a well and has no interactive
837
+ state tokens). */
838
+
839
+ .mj-surface-sunken {
840
+ background: var(--mj-surface-sunken-bg);
841
+ border: var(--mj-surface-sunken-border-width, var(--mj-surface-border-width))
842
+ var(--mj-surface-sunken-border-style, var(--mj-surface-border-style))
843
+ var(--mj-surface-sunken-border);
844
+ box-shadow: var(--mj-surface-sunken-shadow);
845
+ --mj-text-secondary: var(--mj-surface-sunken-text-secondary);
846
+ --mj-text-muted: var(--mj-surface-sunken-text-muted);
847
+ --mj-text-link: var(--mj-surface-sunken-text-link);
848
+ --mj-text-link-hover: var(--mj-surface-sunken-text-link-hover);
849
+ }
850
+
851
+ .mj-surface-base {
852
+ background: var(--mj-surface-base-bg);
853
+ border: var(--mj-surface-base-border-width, var(--mj-surface-border-width))
854
+ var(--mj-surface-base-border-style, var(--mj-surface-border-style))
855
+ var(--mj-surface-base-border);
856
+ box-shadow: var(--mj-surface-base-shadow);
857
+ --mj-text-secondary: var(--mj-surface-base-text-secondary);
858
+ --mj-text-muted: var(--mj-surface-base-text-muted);
859
+ --mj-text-link: var(--mj-surface-base-text-link);
860
+ --mj-text-link-hover: var(--mj-surface-base-text-link-hover);
861
+ }
862
+
863
+ .mj-surface-elevated {
864
+ background: var(--mj-surface-elevated-bg);
865
+ border: var(--mj-surface-elevated-border-width, var(--mj-surface-border-width))
866
+ var(--mj-surface-elevated-border-style, var(--mj-surface-border-style))
867
+ var(--mj-surface-elevated-border);
868
+ box-shadow: var(--mj-surface-elevated-shadow);
869
+ --mj-text-secondary: var(--mj-surface-elevated-text-secondary);
870
+ --mj-text-muted: var(--mj-surface-elevated-text-muted);
871
+ --mj-text-link: var(--mj-surface-elevated-text-link);
872
+ --mj-text-link-hover: var(--mj-surface-elevated-text-link-hover);
873
+ }
874
+
875
+ .mj-surface-overlay {
876
+ background: var(--mj-surface-overlay-bg);
877
+ border: var(--mj-surface-overlay-border-width, var(--mj-surface-border-width))
878
+ var(--mj-surface-overlay-border-style, var(--mj-surface-border-style))
879
+ var(--mj-surface-overlay-border);
880
+ box-shadow: var(--mj-surface-overlay-shadow);
881
+ --mj-text-secondary: var(--mj-surface-overlay-text-secondary);
882
+ --mj-text-muted: var(--mj-surface-overlay-text-muted);
883
+ --mj-text-link: var(--mj-surface-overlay-text-link);
884
+ --mj-text-link-hover: var(--mj-surface-overlay-text-link-hover);
885
+ }
886
+
887
+ .mj-surface-base.is-hover {
888
+ background: var(--mj-surface-base-bg-hover);
889
+ }
890
+
891
+ .mj-surface-elevated.is-hover {
892
+ background: var(--mj-surface-elevated-bg-hover);
893
+ }
894
+
895
+ .mj-surface-overlay.is-hover {
896
+ background: var(--mj-surface-overlay-bg-hover);
897
+ }
898
+
899
+ .mj-surface-base.is-selected {
900
+ background: var(--mj-surface-base-bg-selected);
901
+ border-color: var(--mj-surface-base-border-selected);
902
+ --mj-text-muted: var(--mj-surface-text-muted-selected);
903
+ }
904
+
905
+ .mj-surface-elevated.is-selected {
906
+ background: var(--mj-surface-elevated-bg-selected);
907
+ border-color: var(--mj-surface-elevated-border-selected);
908
+ --mj-text-muted: var(--mj-surface-text-muted-selected);
909
+ }
910
+
911
+ .mj-surface-overlay.is-selected {
912
+ background: var(--mj-surface-overlay-bg-selected);
913
+ border-color: var(--mj-surface-overlay-border-selected);
914
+ --mj-text-muted: var(--mj-surface-text-muted-selected);
915
+ }
916
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-shared-generic",
3
- "version": "6.3.0-edge.1",
3
+ "version": "6.3.0-edge.3",
4
4
  "description": "MemberJunction: Generic Angular Shared Package - utility services and reusable elements used in any Angular application.",
5
5
  "main": "./dist/public-api.js",
6
6
  "typings": "./dist/public-api.d.ts",
@@ -16,7 +16,7 @@
16
16
  "devDependencies": {
17
17
  "@angular/compiler": "21.2.22",
18
18
  "@angular/compiler-cli": "21.2.22",
19
- "@memberjunction/ng-test-utils": "6.3.0-edge.1",
19
+ "@memberjunction/ng-test-utils": "6.3.0-edge.3",
20
20
  "vitest": "^4.0.18"
21
21
  },
22
22
  "peerDependencies": {
@@ -26,12 +26,12 @@
26
26
  "rxjs": "^7.8.2"
27
27
  },
28
28
  "dependencies": {
29
- "@memberjunction/core": "6.3.0-edge.1",
30
- "@memberjunction/ng-base-types": "6.3.0-edge.1",
31
- "@memberjunction/core-entities": "6.3.0-edge.1",
32
- "@memberjunction/global": "6.3.0-edge.1",
33
- "@memberjunction/graphql-dataprovider": "6.3.0-edge.1",
34
- "@memberjunction/theme-engine": "6.3.0-edge.1",
29
+ "@memberjunction/core": "6.3.0-edge.3",
30
+ "@memberjunction/ng-base-types": "6.3.0-edge.3",
31
+ "@memberjunction/core-entities": "6.3.0-edge.3",
32
+ "@memberjunction/global": "6.3.0-edge.3",
33
+ "@memberjunction/graphql-dataprovider": "6.3.0-edge.3",
34
+ "@memberjunction/theme-engine": "6.3.0-edge.3",
35
35
  "dompurify": "^3.3.0",
36
36
  "tslib": "^2.8.1"
37
37
  },