@webority/theme 0.152.0 → 0.153.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.
Files changed (111) hide show
  1. package/README.md +43 -17
  2. package/index.scss +11 -13
  3. package/package.json +3 -3
  4. package/scss/_bootstrap-css.scss +40 -0
  5. package/scss/_bootstrap.generated.scss +1 -2
  6. package/scss/_components.scss +19 -3
  7. package/scss/_config.scss +16 -0
  8. package/scss/_marketing.scss +5 -5
  9. package/scss/_tokens.generated.scss +1 -1
  10. package/scss/_tokens.scss +3 -3
  11. package/scss/_variables.scss +13 -35
  12. package/scss/_wui-components.scss +91 -95
  13. package/scss/_wui-core.scss +80 -84
  14. package/scss/wui/_account-switcher.scss +2 -0
  15. package/scss/wui/_auth-layout.scss +2 -0
  16. package/scss/wui/_avatar-picker.scss +2 -0
  17. package/scss/wui/_calendar.scss +2 -0
  18. package/scss/wui/_card-options.scss +2 -0
  19. package/scss/wui/_card.scss +3 -1
  20. package/scss/wui/_carousel.scss +2 -0
  21. package/scss/wui/_cell.scss +2 -0
  22. package/scss/wui/_chart-card.scss +2 -0
  23. package/scss/wui/_chart.scss +2 -0
  24. package/scss/wui/_choice.scss +2 -0
  25. package/scss/wui/_code-block.scss +2 -0
  26. package/scss/wui/_command-palette.scss +2 -0
  27. package/scss/wui/_comment-thread.scss +2 -0
  28. package/scss/wui/_compare-table.scss +2 -0
  29. package/scss/wui/_consent-banner.scss +2 -0
  30. package/scss/wui/_context-menu.scss +2 -0
  31. package/scss/wui/_controls.scss +3 -3
  32. package/scss/wui/_data.scss +2 -0
  33. package/scss/wui/_detail-pane.scss +2 -0
  34. package/scss/wui/_dialog-motion.scss +2 -0
  35. package/scss/wui/_disclosure.scss +2 -0
  36. package/scss/wui/_display.scss +2 -0
  37. package/scss/wui/_dock.scss +2 -0
  38. package/scss/wui/_drawer.scss +2 -0
  39. package/scss/wui/_due-date.scss +2 -0
  40. package/scss/wui/_empty-state.scss +2 -0
  41. package/scss/wui/_field-busy.scss +2 -0
  42. package/scss/wui/_field-floor.scss +2 -0
  43. package/scss/wui/_field-sizes.scss +2 -0
  44. package/scss/wui/_file-tiles.scss +2 -0
  45. package/scss/wui/_file-viewer.scss +6 -2
  46. package/scss/wui/_filter-popover.scss +2 -0
  47. package/scss/wui/_floating.scss +2 -0
  48. package/scss/wui/_flow.scss +2 -0
  49. package/scss/wui/_groups.scss +2 -0
  50. package/scss/wui/_hover-card.scss +2 -0
  51. package/scss/wui/_illustration.scss +2 -0
  52. package/scss/wui/_image-crop.scss +2 -0
  53. package/scss/wui/_inline-edit.scss +2 -0
  54. package/scss/wui/_interaction.scss +2 -0
  55. package/scss/wui/_kanban.scss +2 -0
  56. package/scss/wui/_lightbox.scss +2 -0
  57. package/scss/wui/_list-card.scss +2 -0
  58. package/scss/wui/_markdown.scss +4 -1
  59. package/scss/wui/_media.scss +2 -0
  60. package/scss/wui/_mention-input.scss +2 -0
  61. package/scss/wui/_menu-motion.scss +2 -0
  62. package/scss/wui/_metric-strip.scss +2 -0
  63. package/scss/wui/_modal-remote.scss +2 -0
  64. package/scss/wui/_money.scss +2 -0
  65. package/scss/wui/_nav-list.scss +2 -0
  66. package/scss/wui/_navigation-menu.scss +2 -0
  67. package/scss/wui/_navigation.scss +2 -0
  68. package/scss/wui/_notification-center.scss +2 -0
  69. package/scss/wui/_onboarding-checklist.scss +2 -0
  70. package/scss/wui/_org-tree.scss +2 -0
  71. package/scss/wui/_overlays.scss +2 -0
  72. package/scss/wui/_page-header-bar.scss +2 -0
  73. package/scss/wui/_pagination.scss +2 -0
  74. package/scss/wui/_pending.scss +2 -0
  75. package/scss/wui/_period-picker.scss +2 -0
  76. package/scss/wui/_rating.scss +2 -0
  77. package/scss/wui/_record-pager.scss +2 -0
  78. package/scss/wui/_relative-time.scss +2 -0
  79. package/scss/wui/_resizable.scss +2 -0
  80. package/scss/wui/_rich-text.scss +9 -3
  81. package/scss/wui/_rolling-number.scss +2 -0
  82. package/scss/wui/_score-scale.scss +2 -0
  83. package/scss/wui/_scrollbar.scss +2 -0
  84. package/scss/wui/_section-lead-capture.scss +2 -0
  85. package/scss/wui/_sections.scss +3 -0
  86. package/scss/wui/_select.scss +2 -0
  87. package/scss/wui/_shell-parts.scss +2 -0
  88. package/scss/wui/_shell.scss +2 -0
  89. package/scss/wui/_shortcuts.scss +2 -0
  90. package/scss/wui/_show-more.scss +2 -0
  91. package/scss/wui/_sortable.scss +2 -0
  92. package/scss/wui/_split-view.scss +2 -0
  93. package/scss/wui/_support.scss +2 -0
  94. package/scss/wui/_table-server.scss +2 -0
  95. package/scss/wui/_theme-toggle.scss +2 -0
  96. package/scss/wui/_tone-pill.scss +2 -0
  97. package/scss/wui/_toolbar.scss +2 -0
  98. package/scss/wui/_tour.scss +9 -9
  99. package/scss/wui/_tree.scss +2 -0
  100. package/scss/wui/_truncate.scss +2 -0
  101. package/scss/wui/_typography.scss +3 -0
  102. package/scss/wui/_utilities.scss +2 -0
  103. package/scss/wui/_whats-new.scss +2 -0
  104. package/scss/wui/_workspace.scss +2 -0
  105. package/scss/wui/tour/_advance.scss +2 -0
  106. package/scss/wui/tour/_base.scss +2 -0
  107. package/scss/wui/tour/_end.scss +2 -0
  108. package/scss/wui/tour/_media.scss +2 -0
  109. package/scss/wui/tour/_motion.scss +2 -0
  110. package/scss/wui/tour/_placement.scss +2 -0
  111. package/scss/wui/tour/_progress.scss +2 -0
package/README.md CHANGED
@@ -11,23 +11,46 @@ second framework and not every product's marketing site.
11
11
 
12
12
  ## Use
13
13
 
14
- Compile the partials with your brand values, in this order — **the order is
15
- load-bearing**:
14
+ The theme is a set of Sass modules. Your brand configures `scss/config` once, then the entry loads the
15
+ modules in this order; **the order is load-bearing**:
16
16
 
17
17
  ```scss
18
- @import "your-brand/variables"; // your $primary, fonts, etc.
19
- @import "@webority/theme/scss/variables"; // library defaults (yours win)
20
- @import "bootstrap/scss/bootstrap";
21
- @import "@webority/theme/scss/tokens"; // --wui-* and --color-* tokens
22
- @import "@webority/theme/scss/components"; // portal / control chrome
23
- @import "@webority/theme/scss/wui-components";
24
- // Optional — marketing sites only (heroes, section-y, pill CTAs, reveal motion):
25
- // @import "@webority/theme/scss/marketing";
18
+ // your-brand/_variables.scss: your values, then the one configuration of the theme.
19
+ $primary: #0EA5E9;
20
+ $font-family-sans-serif: "Brand Sans", system-ui, sans-serif;
21
+ @use "@webority/theme/scss/config" with (
22
+ $primary: $primary,
23
+ $font-family-sans-serif: $font-family-sans-serif
24
+ );
25
+ ```
26
+
27
+ ```scss
28
+ // The entry stylesheet.
29
+ @use "your-brand/variables"; // first: it configures the theme
30
+ @use "@webority/theme/scss/fonts";
31
+ @use "@webority/theme/scss/bootstrap-css"; // Bootstrap 5.3.8, built from your configuration
32
+ @use "@webority/theme/scss/tokens"; // --wui-* and --color-* tokens
33
+ @use "your-brand/tokens"; // your CSS custom properties
34
+ @use "@webority/theme/scss/components"; // portal / control chrome
35
+ @use "@webority/theme/scss/wui-components";
36
+ // Optional, marketing sites only (heroes, section-y, pill CTAs, reveal motion):
37
+ // @use "@webority/theme/scss/marketing";
26
38
  // Optional, only if the site renders the phone input or country picker (see Country flags):
27
- // @import "@webority/theme/scss/flags";
39
+ // @use "@webority/theme/scss/flags";
28
40
  ```
29
41
 
30
- Importing part of the core chain is a bug: skipping `tokens` leaves every
42
+ - `scss/config` forwards every library variable and Bootstrap's own variables, functions and mixins. A
43
+ name you configure reaches the library, Bootstrap and everything derived from it: `$primary` sets the
44
+ theme colour map, the primary ink, the on-primary label, the dark primary and the link colours. Only a
45
+ name the theme marks `!default` can be configured; Sass names any other one in its error.
46
+ - A project partial that reads a theme value (`$grid-breakpoints`, `media-breakpoint-up`) starts with
47
+ `@use "@webority/theme/scss/config" as *;` and gets the configured values.
48
+ - Bootstrap 5.3.8 ships no Sass modules, so `config` and `bootstrap-css` load it with `@import` inside;
49
+ load Bootstrap only through them, never `bootstrap/scss/bootstrap` yourself.
50
+ - `node scripts/codemods/theme-use.mjs <folder>` (in webority-ui) moves an `@import` chain onto this form
51
+ and turns `@include wui-brand-primary(X)` into `$primary: X;`; `--check` reports without writing.
52
+
53
+ Loading part of the core chain is a bug: skipping `tokens` leaves every
31
54
  `--wui-*` reference unresolved. The names are the 0.89.0 names only; a pre-0.89.0 name is gone and
32
55
  `webority upgrade 0.89.0 --path <folder>` moves a product onto the new ones.
33
56
 
@@ -37,8 +60,7 @@ The 245 `.wui-flag-*` rules are about 187 KB raw (38 KB Brotli) of inlined SVG,
37
60
  `wui-components` does not include them. A site that renders `AppPhoneNumberInput`,
38
61
  `<app-phone-number-input>`, `AppSelect mode="country"` or `<app-select mode="country">` adds them once:
39
62
 
40
- - **Your own SCSS:** `@import "@webority/theme/scss/flags";` after `wui-components`. Import it once;
41
- legacy `@import` does not dedupe, so a second import doubles every flag rule.
63
+ - **Your own SCSS:** `@use "@webority/theme/scss/flags";` after `wui-components`.
42
64
  - **Precompiled CSS:** link `@webority/theme/css/flags` (`dist/webority-flags.css`). The Razor
43
65
  package serves the same file at `_content/Webority.Ui.Razor/css/webority-flags.css`.
44
66
  - **Per page:** on a site with one phone field, link the flags stylesheet only on the pages that
@@ -100,12 +122,16 @@ layer and the rare ones from the screens that use them:
100
122
 
101
123
  ```scss
102
124
  // Global, in place of wui-components:
103
- @import "@webority/theme/scss/wui-core";
125
+ @use "@webority/theme/scss/wui-core";
104
126
 
105
- // In the lazy route entry that renders the widget, once:
106
- @import "@webority/theme/scss/wui/kanban";
127
+ // In the lazy route entry that renders the widget, once, after your brand configuration:
128
+ @use "your-brand/variables";
129
+ @use "@webority/theme/scss/wui/kanban";
107
130
  ```
108
131
 
132
+ A lazy entry is its own compilation, so it loads your brand variables first; without them the widget
133
+ builds from the library's default brand.
134
+
109
135
  The on-demand partials are `wui/kanban`, `wui/file-viewer`, `wui/workspace`, `wui/calendar`,
110
136
  `wui/rich-text`, `wui/image-crop`, `wui/command-palette`, `wui/tour`, `wui/tree`, `wui/org-tree` and `wui/dock`.
111
137
  The full `wui-components` chain stays the default and renders as before. Each on-demand partial owns the classes and elements named after it, and no core partial styles them (`scripts/check-theme-split.mjs`).
package/index.scss CHANGED
@@ -1,17 +1,15 @@
1
- // Default-brand full chain — compiled to dist/webority-theme.css (the RCL static
2
- // asset + the zero-toolchain convenience build). Consumers who want brand-exact
3
- // output import the partials individually with their OWN _variables before bootstrap.
1
+ // Default-brand full chain, compiled to dist/webority-theme.css (the RCL static asset and the zero-toolchain
2
+ // convenience build). A brand configures scss/config first and then loads the same modules (see README.md).
4
3
  //
5
- // Load order is LOAD-BEARING — never reorder:
6
- // fonts -> variables (ends with bootstrap.generated, the !default Bootstrap values from the token source)
7
- // -> bootstrap -> tokens (tokens.generated, then wui-residual) -> components -> wui-components
4
+ // Load order is LOAD-BEARING, never reorder:
5
+ // fonts -> bootstrap-css (Bootstrap built from scss/config: library variables, bootstrap.generated, Bootstrap)
6
+ // -> tokens (tokens.generated, then wui-residual) -> components -> wui-components
8
7
  // The token source generates _tokens.generated.scss and _bootstrap.generated.scss (`corepack pnpm run tokens`,
9
- // run by build). Country flags are NOT imported here, and neither does _wui-components: they are an opt-in
8
+ // run by build). Country flags are not loaded here, nor by _wui-components: they are an opt-in
10
9
  // layer (scss/_flags.scss, compiled on its own to dist/webority-flags.css) for sites that render
11
10
  // the phone input or country picker.
12
- @import "scss/fonts";
13
- @import "scss/variables";
14
- @import "bootstrap/scss/bootstrap";
15
- @import "scss/tokens";
16
- @import "scss/components";
17
- @import "scss/wui-components";
11
+ @use "scss/fonts";
12
+ @use "scss/bootstrap-css";
13
+ @use "scss/tokens";
14
+ @use "scss/components";
15
+ @use "scss/wui-components";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/theme",
3
- "version": "0.152.0",
3
+ "version": "0.153.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": {
@@ -68,8 +68,8 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "@types/node": "25.6.0",
71
- "@webority/biome-config": "0.152.0",
72
- "@webority/tokens": "0.152.0",
71
+ "@webority/biome-config": "0.153.0",
72
+ "@webority/tokens": "0.153.0",
73
73
  "bootstrap": "5.3.8",
74
74
  "country-flag-icons": "^1.6.20",
75
75
  "sass-embedded": "^1.108.0",
@@ -0,0 +1,40 @@
1
+ // Bootstrap's CSS, built from the configured theme. The emitting half of bootstrap/scss/bootstrap in its
2
+ // order; the non-emitting layers come from _config.scss.
3
+ @use "config" as *;
4
+
5
+ @import "bootstrap/scss/mixins/banner";
6
+ @include bsBanner("");
7
+
8
+ @import "bootstrap/scss/root";
9
+ @import "bootstrap/scss/reboot";
10
+ @import "bootstrap/scss/type";
11
+ @import "bootstrap/scss/images";
12
+ @import "bootstrap/scss/containers";
13
+ @import "bootstrap/scss/grid";
14
+ @import "bootstrap/scss/tables";
15
+ @import "bootstrap/scss/forms";
16
+ @import "bootstrap/scss/buttons";
17
+ @import "bootstrap/scss/transitions";
18
+ @import "bootstrap/scss/dropdown";
19
+ @import "bootstrap/scss/button-group";
20
+ @import "bootstrap/scss/nav";
21
+ @import "bootstrap/scss/navbar";
22
+ @import "bootstrap/scss/card";
23
+ @import "bootstrap/scss/accordion";
24
+ @import "bootstrap/scss/breadcrumb";
25
+ @import "bootstrap/scss/pagination";
26
+ @import "bootstrap/scss/badge";
27
+ @import "bootstrap/scss/alert";
28
+ @import "bootstrap/scss/progress";
29
+ @import "bootstrap/scss/list-group";
30
+ @import "bootstrap/scss/close";
31
+ @import "bootstrap/scss/toasts";
32
+ @import "bootstrap/scss/modal";
33
+ @import "bootstrap/scss/tooltip";
34
+ @import "bootstrap/scss/popover";
35
+ @import "bootstrap/scss/carousel";
36
+ @import "bootstrap/scss/spinners";
37
+ @import "bootstrap/scss/offcanvas";
38
+ @import "bootstrap/scss/placeholders";
39
+ @import "bootstrap/scss/helpers";
40
+ @import "bootstrap/scss/utilities/api";
@@ -1,4 +1,4 @@
1
- // Generated by @webority/tokens 0.152.0 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.153.0 from its token source. Do not edit; run webority brand --library.
2
2
  $body-color: #252f4a !default;
3
3
  $body-secondary-color: #4b5675 !default;
4
4
  $body-tertiary-color: #626a82 !default;
@@ -12,7 +12,6 @@ $border-radius-lg: 14px !default;
12
12
  $border-radius-pill: 9999px !default;
13
13
  $wui-shadow-overlay: 0px 8px 28px -6px rgba(7, 20, 55, 0.14) !default;
14
14
  $wui-shadow-overlay-lg: 0px 24px 60px -16px rgba(7, 20, 55, 0.28) !default;
15
- $link-color: #4f46e5 !default;
16
15
  $line-height-base: 1.55 !default;
17
16
  $headings-line-height: 1.2 !default;
18
17
  $display-line-height: 1.05 !default;
@@ -1,3 +1,5 @@
1
+ @use "config" as *;
2
+
1
3
  // =====================================================================
2
4
  // Webority UI — shared portal / control CSS (AFTER Bootstrap).
3
5
  // Marketing section/hero/motion helpers: scss/_marketing.scss (opt-in).
@@ -607,12 +609,14 @@
607
609
  // How far the arrow sits inside its well: (well - icon) / 2, with the 16, 14 and 20px icons.
608
610
  --wui-btn-well-pad: 6px;
609
611
  }
610
- :is(.btn-anim-roll, .wui-btn-pin-end).btn-sm {
612
+ :is(.btn-anim-roll, .wui-btn-pin-end).btn-sm,
613
+ .btn-group-sm > .btn:is(.btn-anim-roll, .wui-btn-pin-end) {
611
614
  --wui-btn-roll-well: 22px;
612
615
  --wui-btn-pin-inset: 6px;
613
616
  --wui-btn-well-pad: 4px;
614
617
  }
615
- :is(.btn-anim-roll, .wui-btn-pin-end).btn-lg {
618
+ :is(.btn-anim-roll, .wui-btn-pin-end).btn-lg,
619
+ .btn-group-lg > .btn:is(.btn-anim-roll, .wui-btn-pin-end) {
616
620
  --wui-btn-roll-well: 34px;
617
621
  --wui-btn-pin-inset: 10px;
618
622
  --wui-btn-well-pad: 7px;
@@ -1250,21 +1254,33 @@
1250
1254
  --wui-btn-text-icon: 14px;
1251
1255
  }
1252
1256
  .btn.btn-link-primary.btn-sm,
1257
+ .btn-group-sm > .btn.btn-link-primary,
1253
1258
  .btn.btn-link-success.btn-sm,
1259
+ .btn-group-sm > .btn.btn-link-success,
1254
1260
  .btn.btn-link-warning.btn-sm,
1261
+ .btn-group-sm > .btn.btn-link-warning,
1255
1262
  .btn.btn-link-danger.btn-sm,
1263
+ .btn-group-sm > .btn.btn-link-danger,
1256
1264
  .btn.btn-link-info.btn-sm,
1257
- .btn.btn-link-neutral.btn-sm {
1265
+ .btn-group-sm > .btn.btn-link-info,
1266
+ .btn.btn-link-neutral.btn-sm,
1267
+ .btn-group-sm > .btn.btn-link-neutral {
1258
1268
  --wui-btn-roll-well: 18px;
1259
1269
  --wui-btn-well-pad: 3px;
1260
1270
  --wui-btn-text-icon: 12px;
1261
1271
  }
1262
1272
  .btn.btn-link-primary.btn-lg,
1273
+ .btn-group-lg > .btn.btn-link-primary,
1263
1274
  .btn.btn-link-success.btn-lg,
1275
+ .btn-group-lg > .btn.btn-link-success,
1264
1276
  .btn.btn-link-warning.btn-lg,
1277
+ .btn-group-lg > .btn.btn-link-warning,
1265
1278
  .btn.btn-link-danger.btn-lg,
1279
+ .btn-group-lg > .btn.btn-link-danger,
1266
1280
  .btn.btn-link-info.btn-lg,
1281
+ .btn-group-lg > .btn.btn-link-info,
1267
1282
  .btn.btn-link-neutral.btn-lg,
1283
+ .btn-group-lg > .btn.btn-link-neutral,
1268
1284
  .btn.btn-link-primary.btn-xl,
1269
1285
  .btn.btn-link-success.btn-xl,
1270
1286
  .btn.btn-link-warning.btn-xl,
@@ -0,0 +1,16 @@
1
+ // The theme's one configurable module: the library variables, then Bootstrap's layers that emit no CSS.
2
+ // A brand configures it once, before anything else loads it:
3
+ // $primary: #0EA5E9;
4
+ // @use "@webority/theme/scss/config" with ($primary: $primary);
5
+ // Every theme partial reads it with `@use "../config" as *`, so the configured values reach all of them.
6
+ // Bootstrap 5.3.8 ships no Sass modules, so its layers are imported inside this module; a configured
7
+ // Bootstrap name ($primary, $grid-breakpoints) reaches them through the nested import.
8
+ @forward "variables";
9
+ @use "variables" as *;
10
+
11
+ @import "bootstrap/scss/functions";
12
+ @import "bootstrap/scss/variables";
13
+ @import "bootstrap/scss/variables-dark";
14
+ @import "bootstrap/scss/maps";
15
+ @import "bootstrap/scss/mixins";
16
+ @import "bootstrap/scss/utilities";
@@ -1,12 +1,12 @@
1
1
  // =====================================================================
2
2
  // Webority UI — marketing / editorial surface helpers (OPT-IN).
3
- // Not part of the default theme chain. Import AFTER core theme when a
3
+ // Not part of the default theme chain. Load it after the core theme when a
4
4
  // marketing site needs section rhythm, hero chrome, pill CTAs, or scroll
5
- // motion — portals should omit this file.
5
+ // motion; portals omit this file.
6
6
  //
7
- // @import "@webority/theme/scss/components";
8
- // @import "@webority/theme/scss/wui-components";
9
- // @import "@webority/theme/scss/marketing";
7
+ // @use "@webority/theme/scss/components";
8
+ // @use "@webority/theme/scss/wui-components";
9
+ // @use "@webority/theme/scss/marketing";
10
10
  // =====================================================================
11
11
 
12
12
  // ---- Section helpers ------------------------------------------------
@@ -1,4 +1,4 @@
1
- // Generated by @webority/tokens 0.152.0 from its token source. Do not edit; run webority brand --library.
1
+ // Generated by @webority/tokens 0.153.0 from its token source. Do not edit; run webority brand --library.
2
2
 
3
3
  :root {
4
4
  --wui-primary: #4F46E5;
package/scss/_tokens.scss CHANGED
@@ -1,4 +1,4 @@
1
- // The library's CSS custom properties, imported after Bootstrap: the names generated from the token
1
+ // The library's CSS custom properties, loaded after Bootstrap: the names generated from the token
2
2
  // source, then the few the token source does not generate.
3
- @import "tokens.generated";
4
- @import "wui-residual";
3
+ @use "tokens.generated";
4
+ @use "wui-residual";
@@ -3,21 +3,26 @@
3
3
  @use "sass:math";
4
4
  @use "sass:string";
5
5
 
6
+ // Bootstrap $ defaults generated from the token source (`corepack pnpm run tokens`). Every value is !default and
7
+ // this file must not reassign them (scripts/check-theme-shadow.mjs), so a brand's configured value wins.
8
+ @forward "bootstrap.generated";
9
+ @use "bootstrap.generated" as *;
10
+
6
11
  // =====================================================================
7
12
  // Webority UI — Bootstrap variable overrides.
8
- // Imported BEFORE `bootstrap/scss/bootstrap` so Bootstrap derives every
13
+ // Loaded through _config.scss BEFORE Bootstrap's own variables, so Bootstrap derives every
9
14
  // utility class (.btn-primary, .bg-info, .text-success, etc.) from these
10
15
  // values. Shared by every product's Razor marketing site and React portal
11
- // so both surfaces stay visually identical. Products override these with
12
- // their own _variables imported before this file.
16
+ // so both surfaces stay visually identical. A product overrides the !default ones by configuring
17
+ // the theme in its brand variables module: @use "@webority/theme/scss/config" with ($primary: …).
13
18
  // =====================================================================
14
19
 
15
20
 
16
21
  // ---- Brand colors ---------------------------------------------------
17
22
  // Neutral indigo default. The full ramp lives in _tokens.scss as CSS
18
23
  // variables since Bootstrap only consumes the named theme colors.
19
- // `!default` so a product that sets these in its own _variables BEFORE importing this file
20
- // (the documented override path) wins — a plain assignment here would clobber the brand.
24
+ // `!default` so a brand's configured value wins; everything derived from $primary below (the theme-colour map,
25
+ // the primary ink, the on-primary label, the dark primary, the link colours) follows it.
21
26
  $primary: #4F46E5 !default;
22
27
  // $secondary is intentional quiet grey (text-2 / foreground-3), NOT a second
23
28
  // brand hue. `.btn-soft-primary`, `.text-secondary`, `.bg-secondary` mean "quiet /
@@ -156,35 +161,6 @@ $wui-dark-primary: wui-dark-primary($primary) !default;
156
161
  $wui-dark-primary-hover: color.mix(#FFFFFF, $wui-dark-primary, 12%) !default;
157
162
  $link-color: $wui-primary-ink !default;
158
163
 
159
- // Brand helper — set a product's primary ONCE and have the theme-colour map
160
- // (so every .btn-primary / .bg-primary / .text-primary utility), $link-color,
161
- // $link-hover-color, the primary ink, the on-primary label and the dark primary follow, instead of
162
- // overriding each in turn. Call it in the product's pre-bootstrap variables,
163
- // BEFORE `bootstrap/scss/bootstrap`, e.g.:
164
- //
165
- // @include wui-brand-primary(#0EA5E9);
166
- // @import "bootstrap/scss/bootstrap";
167
- //
168
- // It rewrites the globals in place, so the whole Bootstrap colour system derives
169
- // from the one value. Runtime CSS tokens (--wui-primary*) are still overridden
170
- // separately, as usual.
171
- @mixin wui-brand-primary($primary) {
172
- $primary: $primary !global;
173
- $theme-colors: map-merge($theme-colors, ("primary": $primary)) !global;
174
- $wui-primary-ink: wui-primary-ink($primary) !global;
175
- $wui-primary-text: wui-on-primary($primary) !global;
176
- $wui-dark-primary: wui-dark-primary($primary) !global;
177
- $wui-dark-primary-hover: color.mix(#FFFFFF, $wui-dark-primary, 12%) !global;
178
- $link-color: $wui-primary-ink !global;
179
- $link-hover-color: mix(black, $wui-primary-ink, 12%) !global;
180
- }
181
-
182
- // Bootstrap $ defaults generated from the token source (`corepack pnpm run tokens`). Imported here, before the first
183
- // read of $body-color, $border-color, $border-radius* and $wui-shadow-overlay* below, because a !default value is
184
- // only visible to lines after it. Every value is !default, so a brand $ set before this file still wins; this file
185
- // must not reassign them (scripts/check-theme-shadow.mjs).
186
- @import "bootstrap.generated";
187
-
188
164
 
189
165
  // ---- Body / text ----------------------------------------------------
190
166
  // $body-bg left at Bootstrap's $white — do not restate pure defaults here.
@@ -289,6 +265,8 @@ $input-padding-x: 0.875rem; // 14px
289
265
  $input-border-radius: $border-radius;
290
266
  // Themed, so it flips in dark mode. The old fixed #99A1B7 was 2.58:1 on white and read as typed text on dark.
291
267
  $input-placeholder-color: var(--color-text-subtle);
268
+ // The trailing error glyph, shared by every field that shows one (the phone shell draws it too).
269
+ $wui-field-error-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F8285A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
292
270
 
293
271
 
294
272
  // ---- Cards ----------------------------------------------------------
@@ -321,7 +299,7 @@ $toast-box-shadow: $wui-shadow-overlay-lg;
321
299
  // ---- Links ----------------------------------------------------------
322
300
  // $link-color is the primary ink (above), so a link clears AA whatever the brand.
323
301
  // Hover is a darkened mix of the ink — never a hard-coded indigo — so a product
324
- // that sets $primary (or calls wui-brand-primary) gets a matching hover. Approximate
302
+ // that configures $primary gets a matching hover. Approximate
325
303
  // of Bootstrap's shift-color($link-color, 20%) without importing BS functions here.
326
304
  $link-hover-color: mix(black, $wui-primary-ink, 12%);
327
305
  $link-decoration: none; // BS default is underline
@@ -18,116 +18,112 @@
18
18
  // This file is now an INDEX. The rules live in ./wui/*.scss, split by domain
19
19
  // because one 5,000-line stylesheet made finding a component a grep.
20
20
  //
21
- // Shared tone-pill mixin — used by .badge, .status-label, and .chip.
22
- // Must be imported before components that use it.
23
- @import "wui/tone-pill";
24
-
25
21
  // The order below is LOAD-BEARING. A later partial may deliberately override an
26
- // earlier one, so reordering these imports silently changes the cascade — and
22
+ // earlier one, so reordering these @use lines silently changes the cascade — and
27
23
  // nothing in the build will complain. `pnpm check:theme` measures the rules that
28
24
  // have to win against Bootstrap; the rest is guarded by review.
29
- @import "wui/controls";
30
- @import "wui/pending";
31
- @import "wui/choice";
32
- @import "wui/select";
33
- @import "wui/media";
34
- @import "wui/file-tiles";
35
- @import "wui/image-crop";
36
- @import "wui/avatar-picker";
37
- @import "wui/navigation";
38
- @import "wui/nav-list";
39
- @import "wui/card";
40
- @import "wui/card-options";
41
- @import "wui/empty-state";
42
- @import "wui/data";
43
- @import "wui/pagination";
44
- @import "wui/illustration";
45
- @import "wui/table-server";
46
- @import "wui/kanban";
47
- @import "wui/inline-edit";
48
- @import "wui/mention-input";
49
- @import "wui/comment-thread";
50
- @import "wui/support";
51
- @import "wui/overlays";
52
- @import "wui/drawer";
53
- @import "wui/modal-remote";
54
- @import "wui/utilities";
55
- @import "wui/typography";
56
- @import "wui/disclosure";
57
- @import "wui/display";
58
- @import "wui/compare-table";
59
- @import "wui/flow";
25
+ @use "wui/controls";
26
+ @use "wui/pending";
27
+ @use "wui/choice";
28
+ @use "wui/select";
29
+ @use "wui/media";
30
+ @use "wui/file-tiles";
31
+ @use "wui/image-crop";
32
+ @use "wui/avatar-picker";
33
+ @use "wui/navigation";
34
+ @use "wui/nav-list";
35
+ @use "wui/card";
36
+ @use "wui/card-options";
37
+ @use "wui/empty-state";
38
+ @use "wui/data";
39
+ @use "wui/pagination";
40
+ @use "wui/illustration";
41
+ @use "wui/table-server";
42
+ @use "wui/kanban";
43
+ @use "wui/inline-edit";
44
+ @use "wui/mention-input";
45
+ @use "wui/comment-thread";
46
+ @use "wui/support";
47
+ @use "wui/overlays";
48
+ @use "wui/drawer";
49
+ @use "wui/modal-remote";
50
+ @use "wui/utilities";
51
+ @use "wui/typography";
52
+ @use "wui/disclosure";
53
+ @use "wui/display";
54
+ @use "wui/compare-table";
55
+ @use "wui/flow";
60
56
  // After `flow`: the pricing section extends its `.plan-grid` rules.
61
- @import "wui/sections";
62
- @import "wui/section-lead-capture";
63
- @import "wui/chart";
64
- @import "wui/chart-card";
65
- @import "wui/calendar";
66
- @import "wui/rich-text";
67
- @import "wui/markdown";
68
- @import "wui/scrollbar";
69
- @import "wui/sortable";
57
+ @use "wui/sections";
58
+ @use "wui/section-lead-capture";
59
+ @use "wui/chart";
60
+ @use "wui/chart-card";
61
+ @use "wui/calendar";
62
+ @use "wui/rich-text";
63
+ @use "wui/markdown";
64
+ @use "wui/scrollbar";
65
+ @use "wui/sortable";
70
66
  // Before `split-view`, which places the legend sheet inside the list column.
71
- @import "wui/record-pager";
72
- @import "wui/shortcuts";
73
- @import "wui/split-view";
74
- @import "wui/detail-pane";
75
- @import "wui/groups";
76
- @import "wui/carousel";
77
- @import "wui/onboarding-checklist";
78
- @import "wui/rating";
79
- @import "wui/score-scale";
80
- @import "wui/list-card";
81
- @import "wui/money";
82
- @import "wui/period-picker";
83
- @import "wui/relative-time";
84
- @import "wui/resizable";
85
- @import "wui/rolling-number";
86
- @import "wui/show-more";
87
- @import "wui/truncate";
67
+ @use "wui/record-pager";
68
+ @use "wui/shortcuts";
69
+ @use "wui/split-view";
70
+ @use "wui/detail-pane";
71
+ @use "wui/groups";
72
+ @use "wui/carousel";
73
+ @use "wui/onboarding-checklist";
74
+ @use "wui/rating";
75
+ @use "wui/score-scale";
76
+ @use "wui/list-card";
77
+ @use "wui/money";
78
+ @use "wui/period-picker";
79
+ @use "wui/relative-time";
80
+ @use "wui/resizable";
81
+ @use "wui/rolling-number";
82
+ @use "wui/show-more";
83
+ @use "wui/truncate";
88
84
  // After `navigation`/`overlays`: the switcher restates dropdown-item chrome those partials
89
85
  // set, so it has to win on equal specificity.
90
- @import "wui/workspace";
91
- @import "wui/page-header-bar";
92
- @import "wui/filter-popover";
93
- @import "wui/metric-strip";
94
- @import "wui/due-date";
95
- @import "wui/cell";
86
+ @use "wui/workspace";
87
+ @use "wui/page-header-bar";
88
+ @use "wui/filter-popover";
89
+ @use "wui/metric-strip";
90
+ @use "wui/due-date";
91
+ @use "wui/cell";
96
92
 
97
93
  // Country flags are NOT part of this aggregate. The 245 `.wui-flag-*` rules are about 187KB raw
98
94
  // (38KB Brotli) of inlined SVG, and most sites never render a phone field or country picker.
99
95
  // A site that does imports `@webority/theme/scss/flags` once, after this file; without it
100
96
  // <wui-phone> and <wui-select mode="country"> show an empty grey box where the flag should be.
101
- @import "wui/shell";
102
- @import "wui/shell-parts";
103
- @import "wui/account-switcher";
104
- @import "wui/dock";
105
- @import "wui/consent-banner";
106
- @import "wui/file-viewer";
107
- @import "wui/lightbox";
108
- @import "wui/toolbar";
109
- @import "wui/theme-toggle";
110
- @import "wui/auth-layout";
111
- @import "wui/tree";
112
- @import "wui/org-tree";
113
- @import "wui/floating";
114
- @import "wui/code-block";
97
+ @use "wui/shell";
98
+ @use "wui/shell-parts";
99
+ @use "wui/account-switcher";
100
+ @use "wui/dock";
101
+ @use "wui/consent-banner";
102
+ @use "wui/file-viewer";
103
+ @use "wui/lightbox";
104
+ @use "wui/toolbar";
105
+ @use "wui/theme-toggle";
106
+ @use "wui/auth-layout";
107
+ @use "wui/tree";
108
+ @use "wui/org-tree";
109
+ @use "wui/floating";
110
+ @use "wui/code-block";
115
111
  // After `overlays`: anchors the shared modal shell to the top when it holds the palette card.
116
- @import "wui/command-palette";
117
- @import "wui/context-menu";
118
- @import "wui/navigation-menu";
119
- @import "wui/tour";
120
- @import "wui/hover-card";
121
- @import "wui/notification-center";
122
- @import "wui/whats-new";
112
+ @use "wui/command-palette";
113
+ @use "wui/context-menu";
114
+ @use "wui/navigation-menu";
115
+ @use "wui/tour";
116
+ @use "wui/hover-card";
117
+ @use "wui/notification-center";
118
+ @use "wui/whats-new";
123
119
  // Before field-floor, which restates the font sizes the size steps set.
124
- @import "wui/field-busy";
125
- @import "wui/field-sizes";
120
+ @use "wui/field-busy";
121
+ @use "wui/field-sizes";
126
122
  // After every component partial: restates each field's own font size with a 16px floor on touch screens.
127
- @import "wui/field-floor";
123
+ @use "wui/field-floor";
128
124
  // After every component partial: the shared focus ring and pressed wash settle ties with their hover rules.
129
- @import "wui/interaction";
125
+ @use "wui/interaction";
130
126
  // Last: restates the settled state of menus other partials style, so it must win.
131
- @import "wui/menu-motion";
127
+ @use "wui/menu-motion";
132
128
  // After menu-motion: reuses its zoom keyframes and must win over the overlay partials' modal rules.
133
- @import "wui/dialog-motion";
129
+ @use "wui/dialog-motion";