@webority/theme 0.150.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 (115) hide show
  1. package/README.md +52 -17
  2. package/dist/purge-safelist.json +20 -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 -2
  7. package/scss/_bootstrap-css.scss +40 -0
  8. package/scss/_bootstrap.generated.scss +1 -2
  9. package/scss/_components.scss +157 -55
  10. package/scss/_config.scss +16 -0
  11. package/scss/_marketing.scss +15 -15
  12. package/scss/_tokens.generated.scss +26 -1
  13. package/scss/_tokens.scss +3 -3
  14. package/scss/_variables.scss +13 -35
  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 +8 -6
  21. package/scss/wui/_card-options.scss +2 -0
  22. package/scss/wui/_card.scss +6 -4
  23. package/scss/wui/_carousel.scss +5 -3
  24. package/scss/wui/_cell.scss +2 -0
  25. package/scss/wui/_chart-card.scss +2 -0
  26. package/scss/wui/_chart.scss +6 -4
  27. package/scss/wui/_choice.scss +50 -43
  28. package/scss/wui/_code-block.scss +2 -0
  29. package/scss/wui/_command-palette.scss +4 -2
  30. package/scss/wui/_comment-thread.scss +4 -2
  31. package/scss/wui/_compare-table.scss +29 -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 +53 -51
  35. package/scss/wui/_data.scss +28 -16
  36. package/scss/wui/_detail-pane.scss +2 -0
  37. package/scss/wui/_dialog-motion.scss +6 -4
  38. package/scss/wui/_disclosure.scss +6 -4
  39. package/scss/wui/_display.scss +39 -23
  40. package/scss/wui/_dock.scss +8 -6
  41. package/scss/wui/_drawer.scss +4 -2
  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 +3 -1
  45. package/scss/wui/_field-floor.scss +4 -1
  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 +9 -5
  49. package/scss/wui/_filter-popover.scss +2 -0
  50. package/scss/wui/_floating.scss +2 -0
  51. package/scss/wui/_flow.scss +17 -13
  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 +4 -2
  57. package/scss/wui/_interaction.scss +3 -2
  58. package/scss/wui/_kanban.scss +18 -6
  59. package/scss/wui/_lightbox.scss +4 -2
  60. package/scss/wui/_list-card.scss +2 -0
  61. package/scss/wui/_markdown.scss +4 -1
  62. package/scss/wui/_media.scss +50 -48
  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 +3 -1
  67. package/scss/wui/_money.scss +2 -0
  68. package/scss/wui/_nav-list.scss +2 -0
  69. package/scss/wui/_navigation-menu.scss +3 -1
  70. package/scss/wui/_navigation.scss +70 -18
  71. package/scss/wui/_notification-center.scss +5 -3
  72. package/scss/wui/_onboarding-checklist.scss +3 -1
  73. package/scss/wui/_org-tree.scss +2 -0
  74. package/scss/wui/_overlays.scss +30 -40
  75. package/scss/wui/_page-header-bar.scss +2 -0
  76. package/scss/wui/_pagination.scss +6 -4
  77. package/scss/wui/_pending.scss +2 -0
  78. package/scss/wui/_period-picker.scss +2 -0
  79. package/scss/wui/_rating.scss +3 -1
  80. package/scss/wui/_record-pager.scss +2 -0
  81. package/scss/wui/_relative-time.scss +2 -0
  82. package/scss/wui/_resizable.scss +3 -1
  83. package/scss/wui/_rich-text.scss +13 -7
  84. package/scss/wui/_rolling-number.scss +2 -0
  85. package/scss/wui/_score-scale.scss +5 -3
  86. package/scss/wui/_scrollbar.scss +2 -0
  87. package/scss/wui/_section-lead-capture.scss +2 -0
  88. package/scss/wui/_sections.scss +5 -2
  89. package/scss/wui/_select.scss +2 -0
  90. package/scss/wui/_shell-parts.scss +55 -5
  91. package/scss/wui/_shell.scss +58 -57
  92. package/scss/wui/_shortcuts.scss +2 -0
  93. package/scss/wui/_show-more.scss +2 -0
  94. package/scss/wui/_sortable.scss +4 -2
  95. package/scss/wui/_split-view.scss +4 -2
  96. package/scss/wui/_support.scss +2 -0
  97. package/scss/wui/_table-server.scss +3 -1
  98. package/scss/wui/_theme-toggle.scss +3 -1
  99. package/scss/wui/_tone-pill.scss +2 -0
  100. package/scss/wui/_toolbar.scss +9 -7
  101. package/scss/wui/_tour.scss +9 -9
  102. package/scss/wui/_tree.scss +5 -3
  103. package/scss/wui/_truncate.scss +2 -0
  104. package/scss/wui/_typography.scss +3 -0
  105. package/scss/wui/_utilities.scss +31 -11
  106. package/scss/wui/_whats-new.scss +2 -0
  107. package/scss/wui/_workspace.scss +4 -2
  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 +3 -1
  111. package/scss/wui/tour/_media.scss +2 -0
  112. package/scss/wui/tour/_motion.scss +6 -4
  113. package/scss/wui/tour/_placement.scss +2 -0
  114. package/scss/wui/tour/_progress.scss +2 -0
  115. package/token-meanings.json +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`).
@@ -130,6 +156,15 @@ every component in a product's design language.
130
156
  - Each product serves its file at `/theme/tokens.json` with `Access-Control-Allow-Origin` for the showcase host.
131
157
  - A font the token file names renders only when the page has its face: the theme's own families do.
132
158
 
159
+ ## Sizing the top bar brand
160
+
161
+ With `nav="top"` the shell draws the `brand` node in the top bar, inside `.wui-shell-top-brand`. Two variables size it:
162
+
163
+ - `--wui-shell-top-brand-height`: the brand's height from `md` up. Default `32px`.
164
+ - `--wui-shell-top-brand-height-phone`: the brand's height below `md` (768px). Default `28px`.
165
+
166
+ Set them on any ancestor of the shell, such as `:root` or `.app-shell`. The shell resolves the one for the current width into `--wui-shell-top-brand-size`, which your own brand node reads (`height: var(--wui-shell-top-brand-size)`). A `.wui-brand-logo` or `.wui-brand-mark` image inside the slot takes that height with no further CSS.
167
+
133
168
  ## Forced interaction states
134
169
 
135
170
  The classes `wui-force-hover`, `wui-force-focus` and `wui-force-active` make an element show its hover, focus or
@@ -127,6 +127,7 @@
127
127
  "btn-sm",
128
128
  "btn-soft-primary",
129
129
  "btn-static",
130
+ "btn-xl",
130
131
  "card",
131
132
  "card-accent",
132
133
  "card-body",
@@ -754,6 +755,10 @@
754
755
  "wui-brand-mark",
755
756
  "wui-brand-mark-only",
756
757
  "wui-brand-themed",
758
+ "wui-breadcrumb-collapse",
759
+ "wui-breadcrumb-collapsible",
760
+ "wui-breadcrumb-more",
761
+ "wui-breadcrumb-more-toggle",
757
762
  "wui-btn-group",
758
763
  "wui-btn-group-full",
759
764
  "wui-btn-pin-end",
@@ -905,6 +910,7 @@
905
910
  "wui-compare-group",
906
911
  "wui-compare-group-row",
907
912
  "wui-compare-nowrap",
913
+ "wui-compare-plain",
908
914
  "wui-compare-relaxed",
909
915
  "wui-compare-scroll",
910
916
  "wui-compare-scroll-table",
@@ -953,6 +959,11 @@
953
959
  "wui-crop-zoom",
954
960
  "wui-crop-zoombtn",
955
961
  "wui-dashboard-cell",
962
+ "wui-dashboard-cell-3",
963
+ "wui-dashboard-cell-4",
964
+ "wui-dashboard-cell-6",
965
+ "wui-dashboard-cell-8",
966
+ "wui-dashboard-cell-fifth",
956
967
  "wui-dashboard-grid",
957
968
  "wui-daterange-main",
958
969
  "wui-daterange-pop--presets",
@@ -981,8 +992,14 @@
981
992
  "wui-drawer-title",
982
993
  "wui-drawer-title-ic",
983
994
  "wui-drop-tray",
995
+ "wui-dropdown-empty",
984
996
  "wui-dropdown-form",
997
+ "wui-dropdown-item-body",
998
+ "wui-dropdown-item-desc",
985
999
  "wui-dropdown-item-disabled",
1000
+ "wui-dropdown-menu-searchable",
1001
+ "wui-dropdown-search",
1002
+ "wui-dropdown-search-input",
986
1003
  "wui-dropdown-trigger",
987
1004
  "wui-dropdown-trigger-neutral",
988
1005
  "wui-due-date",
@@ -1488,6 +1505,7 @@
1488
1505
  "wui-show-more",
1489
1506
  "wui-show-more-body",
1490
1507
  "wui-show-more-toggle",
1508
+ "wui-sidebar-foot-links",
1491
1509
  "wui-skeleton-cell",
1492
1510
  "wui-skeleton-lines",
1493
1511
  "wui-skip-link",
@@ -1612,9 +1630,11 @@
1612
1630
  "wui-topsearch-hit-sub",
1613
1631
  "wui-topsearch-hit-text",
1614
1632
  "wui-topsearch-hit-title",
1633
+ "wui-topsearch-host",
1615
1634
  "wui-topsearch-open",
1616
1635
  "wui-topsearch-panel",
1617
1636
  "wui-topsearch-results",
1637
+ "wui-topsearch-row",
1618
1638
  "wui-tour-actions",
1619
1639
  "wui-tour-arrow",
1620
1640
  "wui-tour-back",