@webority/theme 0.152.0 → 0.154.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 (114) hide show
  1. package/README.md +45 -17
  2. package/dist/purge-safelist.json +2 -0
  3. package/dist/webority-theme.css +1 -1
  4. package/dist/webority-tokens.css +1 -1
  5. package/index.scss +11 -13
  6. package/package.json +3 -3
  7. package/scss/_bootstrap-css.scss +40 -0
  8. package/scss/_bootstrap.generated.scss +1 -2
  9. package/scss/_components.scss +19 -3
  10. package/scss/_config.scss +16 -0
  11. package/scss/_marketing.scss +5 -5
  12. package/scss/_tokens.generated.scss +7 -6
  13. package/scss/_tokens.scss +3 -3
  14. package/scss/_variables.scss +14 -36
  15. package/scss/_wui-components.scss +91 -95
  16. package/scss/_wui-core.scss +80 -84
  17. package/scss/wui/_account-switcher.scss +2 -0
  18. package/scss/wui/_auth-layout.scss +2 -0
  19. package/scss/wui/_avatar-picker.scss +2 -0
  20. package/scss/wui/_calendar.scss +2 -0
  21. package/scss/wui/_card-options.scss +2 -0
  22. package/scss/wui/_card.scss +3 -1
  23. package/scss/wui/_carousel.scss +2 -0
  24. package/scss/wui/_cell.scss +2 -0
  25. package/scss/wui/_chart-card.scss +2 -0
  26. package/scss/wui/_chart.scss +2 -0
  27. package/scss/wui/_choice.scss +2 -0
  28. package/scss/wui/_code-block.scss +2 -0
  29. package/scss/wui/_command-palette.scss +2 -0
  30. package/scss/wui/_comment-thread.scss +2 -0
  31. package/scss/wui/_compare-table.scss +2 -0
  32. package/scss/wui/_consent-banner.scss +2 -0
  33. package/scss/wui/_context-menu.scss +2 -0
  34. package/scss/wui/_controls.scss +3 -3
  35. package/scss/wui/_data.scss +2 -0
  36. package/scss/wui/_detail-pane.scss +2 -0
  37. package/scss/wui/_dialog-motion.scss +2 -0
  38. package/scss/wui/_disclosure.scss +2 -0
  39. package/scss/wui/_display.scss +44 -0
  40. package/scss/wui/_dock.scss +2 -0
  41. package/scss/wui/_drawer.scss +2 -0
  42. package/scss/wui/_due-date.scss +2 -0
  43. package/scss/wui/_empty-state.scss +2 -0
  44. package/scss/wui/_field-busy.scss +2 -0
  45. package/scss/wui/_field-floor.scss +2 -0
  46. package/scss/wui/_field-sizes.scss +2 -0
  47. package/scss/wui/_file-tiles.scss +2 -0
  48. package/scss/wui/_file-viewer.scss +6 -2
  49. package/scss/wui/_filter-popover.scss +2 -0
  50. package/scss/wui/_floating.scss +2 -0
  51. package/scss/wui/_flow.scss +2 -0
  52. package/scss/wui/_groups.scss +2 -0
  53. package/scss/wui/_hover-card.scss +2 -0
  54. package/scss/wui/_illustration.scss +2 -0
  55. package/scss/wui/_image-crop.scss +2 -0
  56. package/scss/wui/_inline-edit.scss +2 -0
  57. package/scss/wui/_interaction.scss +2 -0
  58. package/scss/wui/_kanban.scss +2 -0
  59. package/scss/wui/_lightbox.scss +2 -0
  60. package/scss/wui/_list-card.scss +2 -0
  61. package/scss/wui/_markdown.scss +4 -1
  62. package/scss/wui/_media.scss +2 -0
  63. package/scss/wui/_mention-input.scss +2 -0
  64. package/scss/wui/_menu-motion.scss +2 -0
  65. package/scss/wui/_metric-strip.scss +2 -0
  66. package/scss/wui/_modal-remote.scss +2 -0
  67. package/scss/wui/_money.scss +2 -0
  68. package/scss/wui/_nav-list.scss +2 -0
  69. package/scss/wui/_navigation-menu.scss +2 -0
  70. package/scss/wui/_navigation.scss +2 -0
  71. package/scss/wui/_notification-center.scss +2 -0
  72. package/scss/wui/_onboarding-checklist.scss +2 -0
  73. package/scss/wui/_org-tree.scss +2 -0
  74. package/scss/wui/_overlays.scss +2 -0
  75. package/scss/wui/_page-header-bar.scss +2 -0
  76. package/scss/wui/_pagination.scss +2 -0
  77. package/scss/wui/_pending.scss +2 -0
  78. package/scss/wui/_period-picker.scss +2 -0
  79. package/scss/wui/_rating.scss +2 -0
  80. package/scss/wui/_record-pager.scss +2 -0
  81. package/scss/wui/_relative-time.scss +2 -0
  82. package/scss/wui/_resizable.scss +2 -0
  83. package/scss/wui/_rich-text.scss +9 -3
  84. package/scss/wui/_rolling-number.scss +2 -0
  85. package/scss/wui/_score-scale.scss +2 -0
  86. package/scss/wui/_scrollbar.scss +2 -0
  87. package/scss/wui/_section-lead-capture.scss +2 -0
  88. package/scss/wui/_sections.scss +3 -0
  89. package/scss/wui/_select.scss +2 -0
  90. package/scss/wui/_shell-parts.scss +2 -0
  91. package/scss/wui/_shell.scss +2 -0
  92. package/scss/wui/_shortcuts.scss +2 -0
  93. package/scss/wui/_show-more.scss +2 -0
  94. package/scss/wui/_sortable.scss +2 -0
  95. package/scss/wui/_split-view.scss +2 -0
  96. package/scss/wui/_support.scss +2 -0
  97. package/scss/wui/_table-server.scss +2 -0
  98. package/scss/wui/_theme-toggle.scss +2 -0
  99. package/scss/wui/_tone-pill.scss +2 -0
  100. package/scss/wui/_toolbar.scss +2 -0
  101. package/scss/wui/_tour.scss +9 -9
  102. package/scss/wui/_tree.scss +2 -0
  103. package/scss/wui/_truncate.scss +2 -0
  104. package/scss/wui/_typography.scss +3 -0
  105. package/scss/wui/_utilities.scss +2 -0
  106. package/scss/wui/_whats-new.scss +2 -0
  107. package/scss/wui/_workspace.scss +2 -0
  108. package/scss/wui/tour/_advance.scss +2 -0
  109. package/scss/wui/tour/_base.scss +2 -0
  110. package/scss/wui/tour/_end.scss +2 -0
  111. package/scss/wui/tour/_media.scss +2 -0
  112. package/scss/wui/tour/_motion.scss +2 -0
  113. package/scss/wui/tour/_placement.scss +2 -0
  114. package/scss/wui/tour/_progress.scss +2 -0
package/README.md CHANGED
@@ -11,23 +11,48 @@ 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
+ It follows a partial loaded by package name (a workspace style package) through `node_modules` and
53
+ the package's `exports`, and names one it cannot find as a `HAND` line.
54
+
55
+ Loading part of the core chain is a bug: skipping `tokens` leaves every
31
56
  `--wui-*` reference unresolved. The names are the 0.89.0 names only; a pre-0.89.0 name is gone and
32
57
  `webority upgrade 0.89.0 --path <folder>` moves a product onto the new ones.
33
58
 
@@ -37,8 +62,7 @@ The 245 `.wui-flag-*` rules are about 187 KB raw (38 KB Brotli) of inlined SVG,
37
62
  `wui-components` does not include them. A site that renders `AppPhoneNumberInput`,
38
63
  `<app-phone-number-input>`, `AppSelect mode="country"` or `<app-select mode="country">` adds them once:
39
64
 
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.
65
+ - **Your own SCSS:** `@use "@webority/theme/scss/flags";` after `wui-components`.
42
66
  - **Precompiled CSS:** link `@webority/theme/css/flags` (`dist/webority-flags.css`). The Razor
43
67
  package serves the same file at `_content/Webority.Ui.Razor/css/webority-flags.css`.
44
68
  - **Per page:** on a site with one phone field, link the flags stylesheet only on the pages that
@@ -100,12 +124,16 @@ layer and the rare ones from the screens that use them:
100
124
 
101
125
  ```scss
102
126
  // Global, in place of wui-components:
103
- @import "@webority/theme/scss/wui-core";
127
+ @use "@webority/theme/scss/wui-core";
104
128
 
105
- // In the lazy route entry that renders the widget, once:
106
- @import "@webority/theme/scss/wui/kanban";
129
+ // In the lazy route entry that renders the widget, once, after your brand configuration:
130
+ @use "your-brand/variables";
131
+ @use "@webority/theme/scss/wui/kanban";
107
132
  ```
108
133
 
134
+ A lazy entry is its own compilation, so it loads your brand variables first; without them the widget
135
+ builds from the library's default brand.
136
+
109
137
  The on-demand partials are `wui/kanban`, `wui/file-viewer`, `wui/workspace`, `wui/calendar`,
110
138
  `wui/rich-text`, `wui/image-crop`, `wui/command-palette`, `wui/tour`, `wui/tree`, `wui/org-tree` and `wui/dock`.
111
139
  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`).
@@ -1464,6 +1464,8 @@
1464
1464
  "wui-section-title",
1465
1465
  "wui-section-title-body",
1466
1466
  "wui-segmented-borderless",
1467
+ "wui-segmented-label-full",
1468
+ "wui-segmented-label-short",
1467
1469
  "wui-segmented-option-count",
1468
1470
  "wui-select",
1469
1471
  "wui-select-caret",