@webority/theme 0.82.1 → 0.83.0

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": "@webority/theme",
3
- "version": "0.82.1",
3
+ "version": "0.83.0",
4
4
  "description": "Webority shared design system — Bootstrap 5.3 SCSS overrides, --wui-* tokens, and shared component CSS. The single source of brand chrome for React portals and Razor sites.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -13,6 +13,7 @@
13
13
  "fonts",
14
14
  "dist",
15
15
  "logos",
16
+ "token-meanings.json",
16
17
  "!dist/**/__tests__",
17
18
  "!dist/**/*.test.*",
18
19
  "!dist/**/*.map"
@@ -31,6 +32,7 @@
31
32
  "./css/brand-signal": "./dist/webority-brand-signal.css",
32
33
  "./css/runtime-brand": "./dist/webority-runtime-brand.css",
33
34
  "./purge-safelist.json": "./dist/purge-safelist.json",
35
+ "./token-meanings.json": "./token-meanings.json",
34
36
  "./logos/*": "./logos/*",
35
37
  "./package.json": "./package.json"
36
38
  },
@@ -49,6 +51,6 @@
49
51
  "vite": "^8.0.12"
50
52
  },
51
53
  "scripts": {
52
- "build": "sass index.scss dist/webority-theme.css --load-path=node_modules --style=compressed --no-source-map --quiet-deps --silence-deprecation=if-function && sass scss/_flags.scss dist/webority-flags.css --style=compressed --no-source-map --quiet && sass scss/_brand-signal.scss dist/webority-brand-signal.css --style=compressed --no-source-map --quiet && sass scss/_runtime-brand.scss dist/webority-runtime-brand.css --style=compressed --no-source-map --quiet && node ../../scripts/gen-purge-safelist.mjs && node ../../scripts/sync-rcl-assets.mjs theme && vite build --config vite.cli.config.js"
54
+ "build": "sass index.scss dist/webority-theme.css --load-path=node_modules --style=compressed --no-source-map --quiet-deps --silence-deprecation=if-function && sass scss/_flags.scss dist/webority-flags.css --style=compressed --no-source-map --quiet && sass scss/_brand-signal.scss dist/webority-brand-signal.css --style=compressed --no-source-map --quiet && sass scss/_runtime-brand.scss dist/webority-runtime-brand.css --style=compressed --no-source-map --quiet && node ../../scripts/force-state-selectors.mjs dist/webority-theme.css dist/webority-brand-signal.css && node ../../scripts/gen-purge-safelist.mjs && node ../../scripts/sync-rcl-assets.mjs theme && vite build --config vite.cli.config.js"
53
55
  }
54
56
  }
@@ -20,7 +20,7 @@
20
20
  }
21
21
 
22
22
  :root {
23
- // Named brand constants for consumers; the library CSS does not read these.
23
+ // Named brand constants; the dark fills below read --wui-signal-dark-fill and --wui-signal-dark-fill-hover.
24
24
  --wui-signal-violet: #4A0FBF;
25
25
  --wui-signal-violet-hover: #3D0CA0;
26
26
  --wui-signal-tint: #F1EBFF;
@@ -47,7 +47,7 @@
47
47
  --wui-primary-5: #F8F5FF;
48
48
  --wui-primary-text: #FFFFFF;
49
49
  // Violet clears 4.5:1 as text on every light surface and its tint, so it is its own ink.
50
- --wui-primary-ink: #4A0FBF;
50
+ --wui-primary-ink: var(--wui-primary, #4A0FBF);
51
51
  --wui-accent-dark: #340A88;
52
52
  --wui-surface-soft: #F1EBFF;
53
53
  --wui-surface-violet: #E6DCFD;
@@ -94,40 +94,42 @@
94
94
  // Values the theme compiles as literals rather than tokens.
95
95
  --bs-primary: #4A0FBF;
96
96
  --bs-primary-rgb: 74, 15, 191;
97
- --bs-link-color: #4A0FBF;
98
- --bs-link-color-rgb: 74, 15, 191;
99
- --bs-link-hover-color: #3D0CA0;
100
- --bs-link-hover-color-rgb: 61, 12, 160;
97
+ // Each link value reads the token a product re-points; a triplet cannot be derived from a hex at
98
+ // runtime, so it reads its own -rgb token and a product sets the pair together.
99
+ --bs-link-color: var(--wui-primary-ink, #4A0FBF);
100
+ --bs-link-color-rgb: var(--wui-primary-ink-rgb, 74, 15, 191);
101
+ --bs-link-hover-color: var(--wui-primary-hover, #3D0CA0);
102
+ --bs-link-hover-color-rgb: var(--wui-primary-hover-rgb, 61, 12, 160);
101
103
  --bs-focus-ring-color: rgba(74, 15, 191, 0.3);
102
104
  }
103
105
 
104
106
  // Bootstrap compiles its button variables to literal indigo; re-point them on the classes.
105
107
  .btn-primary {
106
- --bs-btn-color: #fff;
107
- --bs-btn-bg: #4A0FBF;
108
- --bs-btn-border-color: #4A0FBF;
109
- --bs-btn-hover-color: #fff;
110
- --bs-btn-hover-bg: #3D0CA0;
111
- --bs-btn-hover-border-color: #3D0CA0;
112
- --bs-btn-focus-shadow-rgb: 74, 15, 191;
113
- --bs-btn-active-color: #fff;
114
- --bs-btn-active-bg: #340A88;
115
- --bs-btn-active-border-color: #340A88;
116
- --bs-btn-disabled-color: #fff;
117
- --bs-btn-disabled-bg: #4A0FBF;
118
- --bs-btn-disabled-border-color: #4A0FBF;
108
+ --bs-btn-color: var(--wui-primary-text, #fff);
109
+ --bs-btn-bg: var(--wui-primary, #4A0FBF);
110
+ --bs-btn-border-color: var(--wui-primary, #4A0FBF);
111
+ --bs-btn-hover-color: var(--wui-primary-text, #fff);
112
+ --bs-btn-hover-bg: var(--wui-primary-hover, #3D0CA0);
113
+ --bs-btn-hover-border-color: var(--wui-primary-hover, #3D0CA0);
114
+ --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb, 74, 15, 191);
115
+ --bs-btn-active-color: var(--wui-primary-text, #fff);
116
+ --bs-btn-active-bg: var(--wui-primary-pressed, #340A88);
117
+ --bs-btn-active-border-color: var(--wui-primary-pressed, #340A88);
118
+ --bs-btn-disabled-color: var(--wui-primary-text, #fff);
119
+ --bs-btn-disabled-bg: var(--wui-primary, #4A0FBF);
120
+ --bs-btn-disabled-border-color: var(--wui-primary, #4A0FBF);
119
121
  }
120
122
 
121
123
  .btn-outline-primary {
122
124
  --bs-btn-color: var(--color-primary-ink);
123
125
  --bs-btn-border-color: var(--color-primary);
124
- --bs-btn-hover-color: #fff;
125
- --bs-btn-hover-bg: #4A0FBF;
126
- --bs-btn-hover-border-color: #4A0FBF;
127
- --bs-btn-active-color: #fff;
128
- --bs-btn-active-bg: #340A88;
129
- --bs-btn-active-border-color: #340A88;
130
- --bs-btn-focus-shadow-rgb: 74, 15, 191;
126
+ --bs-btn-hover-color: var(--wui-primary-text, #fff);
127
+ --bs-btn-hover-bg: var(--wui-primary, #4A0FBF);
128
+ --bs-btn-hover-border-color: var(--wui-primary, #4A0FBF);
129
+ --bs-btn-active-color: var(--wui-primary-text, #fff);
130
+ --bs-btn-active-bg: var(--wui-primary-pressed, #340A88);
131
+ --bs-btn-active-border-color: var(--wui-primary-pressed, #340A88);
132
+ --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb, 74, 15, 191);
131
133
  }
132
134
 
133
135
  .form-check-input:checked {
@@ -156,9 +158,12 @@
156
158
  // Selected, hover and highlight fills are a neutral lift; the violet stays on the text, border
157
159
  // or edge that marks the state. check-contrast.mjs mirrors the 8%; change them together.
158
160
  --color-primary-soft: color-mix(in srgb, #FFFFFF 8%, transparent);
159
- // Ink on the lilac fill (--color-primary): 8:1 or better.
160
- --color-primary-text: #16093A;
161
- --color-progress-label: #16093A;
161
+ // The published primary pair is the one the primary button paints: deep violet with a white label.
162
+ // The lilac --wui-dark-primary stays the ink for text, links and focus on the dark surfaces.
163
+ --color-primary: var(--wui-signal-dark-fill, #5A22D6);
164
+ --color-primary-hover: var(--wui-signal-dark-fill-hover, #6B35E6);
165
+ --color-primary-text: var(--wui-dark-primary-text, #FFFFFF);
166
+ --color-primary-hover-text: var(--wui-dark-primary-text, #FFFFFF);
162
167
  --bs-body-bg-rgb: 0, 0, 0;
163
168
  --bs-body-color-rgb: 237, 237, 237;
164
169
  --bs-emphasis-color-rgb: 237, 237, 237;
@@ -167,36 +172,42 @@
167
172
  --bs-secondary-bg-rgb: 22, 22, 22;
168
173
  --bs-tertiary-bg-rgb: 30, 30, 30;
169
174
  --bs-border-color-rgb: 42, 42, 42;
170
- --bs-link-color: #A98BFF;
171
- --bs-link-color-rgb: 169, 139, 255;
172
- --bs-link-hover-color: #BFA6FF;
173
- --bs-link-hover-color-rgb: 191, 166, 255;
175
+ --bs-link-color: var(--wui-dark-primary, #A98BFF);
176
+ --bs-link-color-rgb: var(--wui-dark-primary-rgb, 169, 139, 255);
177
+ --bs-link-hover-color: var(--wui-dark-primary-hover, #BFA6FF);
178
+ --bs-link-hover-color-rgb: var(--wui-dark-primary-hover-rgb, 191, 166, 255);
174
179
  --bs-focus-ring-color: rgba(169, 139, 255, 0.4);
175
180
 
176
181
  .btn-primary {
177
- --bs-btn-bg: #5A22D6;
178
- --bs-btn-border-color: #5A22D6;
179
- --bs-btn-hover-bg: #6B35E6;
180
- --bs-btn-hover-border-color: #6B35E6;
181
- --bs-btn-active-bg: #4A0FBF;
182
- --bs-btn-active-border-color: #4A0FBF;
183
- --bs-btn-disabled-bg: #5A22D6;
184
- --bs-btn-disabled-border-color: #5A22D6;
182
+ --bs-btn-bg: var(--wui-signal-dark-fill, #5A22D6);
183
+ --bs-btn-border-color: var(--wui-signal-dark-fill, #5A22D6);
184
+ --bs-btn-hover-bg: var(--wui-signal-dark-fill-hover, #6B35E6);
185
+ --bs-btn-hover-border-color: var(--wui-signal-dark-fill-hover, #6B35E6);
186
+ --bs-btn-active-bg: var(--wui-primary, #4A0FBF);
187
+ --bs-btn-active-border-color: var(--wui-primary, #4A0FBF);
188
+ --bs-btn-disabled-bg: var(--wui-signal-dark-fill, #5A22D6);
189
+ --bs-btn-disabled-border-color: var(--wui-signal-dark-fill, #5A22D6);
185
190
  }
186
191
 
187
192
  .btn-outline-primary {
188
- --bs-btn-hover-bg: #5A22D6;
189
- --bs-btn-hover-border-color: #5A22D6;
193
+ --bs-btn-hover-bg: var(--wui-signal-dark-fill, #5A22D6);
194
+ --bs-btn-hover-border-color: var(--wui-signal-dark-fill, #5A22D6);
190
195
  }
191
196
 
192
197
  .form-check-input:checked {
193
- background-color: #5A22D6;
194
- border-color: #5A22D6;
198
+ background-color: var(--wui-signal-dark-fill, #5A22D6);
199
+ border-color: var(--wui-signal-dark-fill, #5A22D6);
195
200
  }
196
201
 
197
- // The active step's number sits on a light violet fill; the theme's white ink is 2.68:1 there.
202
+ // The untoned bar fills with the deep violet --bs-primary, where the dark-mode label ink fails. The tone
203
+ // bars and the count badges sit on the light dark-mode fills and keep --color-progress-label.
204
+ :where(&) .progress-bar:not([class*="wui-progress-"]) {
205
+ color: var(--wui-dark-primary-text, #FFFFFF);
206
+ }
207
+
208
+ // The active step's number sits on the lilac ink fill (--wui-step-accent); white is 2.68:1 there.
198
209
  :where(.stepper:not(.wizard-stepper)) {
199
- --wui-step-accent-fg: #16093A;
210
+ --wui-step-accent-fg: var(--wui-signal-ink, #16093A);
200
211
  }
201
212
 
202
213
  // Components that mix their violet fill inline rather than through --color-primary-soft.