@besaitech/ng-design-system 0.0.56 → 0.0.58

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": "@besaitech/ng-design-system",
3
- "version": "0.0.56",
3
+ "version": "0.0.58",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
package/themes/base.css CHANGED
@@ -125,6 +125,19 @@ html.dark {
125
125
  --color-danger: #f2748c;
126
126
  }
127
127
 
128
+ /*
129
+ * Dark fills a brand preset can take over. In dark mode the library's solid primary fills (primary
130
+ * button, toggle "on", tri-state "contains", status-tile check, count badges) invert to `ink` on
131
+ * `surface`, and its selected tints (chip, tertiary button, drop zone) go neutral — right for a
132
+ * monochrome brand, whose dark 600 step reads as disabled. A coloured brand sets these custom properties
133
+ * under `html.dark` in its preset to keep its colour (belvigo-emerald.css does); unset, each falls back to
134
+ * the inverted/neutral look, so saitech.css and belvigo.css are unchanged. Plain properties, not @theme
135
+ * tokens: they are never utilities of their own.
136
+ *
137
+ * --sds-dark-primary, --sds-dark-primary-hover, --sds-dark-primary-active, --sds-dark-on-primary
138
+ * --sds-dark-tint, --sds-dark-tint-hover, --sds-dark-tint-active, --sds-dark-tint-border, --sds-dark-on-tint
139
+ */
140
+
128
141
  /* Honour a reader's reduced-motion setting: the ambient drift is decoration, so it simply stops. */
129
142
  @media (prefers-reduced-motion: reduce) {
130
143
  .animate-sds-ambient {
@@ -51,10 +51,10 @@
51
51
  * 600 fills with white marks (checkbox, selected day, tab underline) — #047857: white 5.48:1,
52
52
  * 3.23:1 against the dark surface
53
53
  * 700 brand TEXT in dark (active tab label, selected option, brand badge) — the mobile dark
54
- * brandText #34d399: 9.22:1 on the surface, 7.98:1 on the 50 tint. Trade-off: a component
55
- * that uses 700 as a fill under white text (the calendar's selected-day hover, the `brand`
56
- * top bar) loses contrast in dark; the library's primary button, toggle and tri-state chip
57
- * already switch to ink fills in dark, and the Belvigo apps use the glass top bar.
54
+ * brandText #34d399: 9.22:1 on the surface, 7.98:1 on the 50 tint. It is NOT a fill in
55
+ * dark: the fill hover the library would take from 700 (calendar day, current page) comes
56
+ * from --sds-dark-primary-hover below instead. The `brand` top bar still uses 700; the
57
+ * Belvigo apps use the glass top bar.
58
58
  * 800 dark brand text on white (the collapsed-rail badge) — #065f46, 7.68:1
59
59
  * 900 brand sidebar rail — #0a1f18, white 17.18:1; the 500 pill on it is 3.65:1
60
60
  */
@@ -70,4 +70,22 @@ html.dark {
70
70
  --color-brand-800: #065f46;
71
71
  --color-brand-900: #0a1f18;
72
72
  --color-brand-950: #03110d;
73
+
74
+ /*
75
+ * Dark fills (see base.css, "Dark fills a brand preset can take over"). The monochrome presets invert
76
+ * the solid primary fill to ink-on-surface in dark, which with a coloured brand turned every primary
77
+ * button, toggle "on" and tri-state "contains" WHITE. Emerald keeps its green instead:
78
+ * solid fill 600 #047857 (white 5.48:1), hover 500 #05845c (4.71:1), pressed 800 #065f46 (7.68:1),
79
+ * white text; selected tints (chip, tertiary button, drop zone) use the 50/100/200 dark tints with
80
+ * the 600 border and the 700 text green (7.98:1 on the 50 tint).
81
+ */
82
+ --sds-dark-primary: var(--color-brand-600);
83
+ --sds-dark-primary-hover: var(--color-brand-500);
84
+ --sds-dark-primary-active: var(--color-brand-800);
85
+ --sds-dark-on-primary: #ffffff;
86
+ --sds-dark-tint: var(--color-brand-50);
87
+ --sds-dark-tint-hover: var(--color-brand-100);
88
+ --sds-dark-tint-active: var(--color-brand-200);
89
+ --sds-dark-tint-border: var(--color-brand-600);
90
+ --sds-dark-on-tint: var(--color-brand-700);
73
91
  }