@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.
- package/README.md +45 -17
- package/dist/purge-safelist.json +2 -0
- package/dist/webority-theme.css +1 -1
- package/dist/webority-tokens.css +1 -1
- package/index.scss +11 -13
- package/package.json +3 -3
- package/scss/_bootstrap-css.scss +40 -0
- package/scss/_bootstrap.generated.scss +1 -2
- package/scss/_components.scss +19 -3
- package/scss/_config.scss +16 -0
- package/scss/_marketing.scss +5 -5
- package/scss/_tokens.generated.scss +7 -6
- package/scss/_tokens.scss +3 -3
- package/scss/_variables.scss +14 -36
- package/scss/_wui-components.scss +91 -95
- package/scss/_wui-core.scss +80 -84
- package/scss/wui/_account-switcher.scss +2 -0
- package/scss/wui/_auth-layout.scss +2 -0
- package/scss/wui/_avatar-picker.scss +2 -0
- package/scss/wui/_calendar.scss +2 -0
- package/scss/wui/_card-options.scss +2 -0
- package/scss/wui/_card.scss +3 -1
- package/scss/wui/_carousel.scss +2 -0
- package/scss/wui/_cell.scss +2 -0
- package/scss/wui/_chart-card.scss +2 -0
- package/scss/wui/_chart.scss +2 -0
- package/scss/wui/_choice.scss +2 -0
- package/scss/wui/_code-block.scss +2 -0
- package/scss/wui/_command-palette.scss +2 -0
- package/scss/wui/_comment-thread.scss +2 -0
- package/scss/wui/_compare-table.scss +2 -0
- package/scss/wui/_consent-banner.scss +2 -0
- package/scss/wui/_context-menu.scss +2 -0
- package/scss/wui/_controls.scss +3 -3
- package/scss/wui/_data.scss +2 -0
- package/scss/wui/_detail-pane.scss +2 -0
- package/scss/wui/_dialog-motion.scss +2 -0
- package/scss/wui/_disclosure.scss +2 -0
- package/scss/wui/_display.scss +44 -0
- package/scss/wui/_dock.scss +2 -0
- package/scss/wui/_drawer.scss +2 -0
- package/scss/wui/_due-date.scss +2 -0
- package/scss/wui/_empty-state.scss +2 -0
- package/scss/wui/_field-busy.scss +2 -0
- package/scss/wui/_field-floor.scss +2 -0
- package/scss/wui/_field-sizes.scss +2 -0
- package/scss/wui/_file-tiles.scss +2 -0
- package/scss/wui/_file-viewer.scss +6 -2
- package/scss/wui/_filter-popover.scss +2 -0
- package/scss/wui/_floating.scss +2 -0
- package/scss/wui/_flow.scss +2 -0
- package/scss/wui/_groups.scss +2 -0
- package/scss/wui/_hover-card.scss +2 -0
- package/scss/wui/_illustration.scss +2 -0
- package/scss/wui/_image-crop.scss +2 -0
- package/scss/wui/_inline-edit.scss +2 -0
- package/scss/wui/_interaction.scss +2 -0
- package/scss/wui/_kanban.scss +2 -0
- package/scss/wui/_lightbox.scss +2 -0
- package/scss/wui/_list-card.scss +2 -0
- package/scss/wui/_markdown.scss +4 -1
- package/scss/wui/_media.scss +2 -0
- package/scss/wui/_mention-input.scss +2 -0
- package/scss/wui/_menu-motion.scss +2 -0
- package/scss/wui/_metric-strip.scss +2 -0
- package/scss/wui/_modal-remote.scss +2 -0
- package/scss/wui/_money.scss +2 -0
- package/scss/wui/_nav-list.scss +2 -0
- package/scss/wui/_navigation-menu.scss +2 -0
- package/scss/wui/_navigation.scss +2 -0
- package/scss/wui/_notification-center.scss +2 -0
- package/scss/wui/_onboarding-checklist.scss +2 -0
- package/scss/wui/_org-tree.scss +2 -0
- package/scss/wui/_overlays.scss +2 -0
- package/scss/wui/_page-header-bar.scss +2 -0
- package/scss/wui/_pagination.scss +2 -0
- package/scss/wui/_pending.scss +2 -0
- package/scss/wui/_period-picker.scss +2 -0
- package/scss/wui/_rating.scss +2 -0
- package/scss/wui/_record-pager.scss +2 -0
- package/scss/wui/_relative-time.scss +2 -0
- package/scss/wui/_resizable.scss +2 -0
- package/scss/wui/_rich-text.scss +9 -3
- package/scss/wui/_rolling-number.scss +2 -0
- package/scss/wui/_score-scale.scss +2 -0
- package/scss/wui/_scrollbar.scss +2 -0
- package/scss/wui/_section-lead-capture.scss +2 -0
- package/scss/wui/_sections.scss +3 -0
- package/scss/wui/_select.scss +2 -0
- package/scss/wui/_shell-parts.scss +2 -0
- package/scss/wui/_shell.scss +2 -0
- package/scss/wui/_shortcuts.scss +2 -0
- package/scss/wui/_show-more.scss +2 -0
- package/scss/wui/_sortable.scss +2 -0
- package/scss/wui/_split-view.scss +2 -0
- package/scss/wui/_support.scss +2 -0
- package/scss/wui/_table-server.scss +2 -0
- package/scss/wui/_theme-toggle.scss +2 -0
- package/scss/wui/_tone-pill.scss +2 -0
- package/scss/wui/_toolbar.scss +2 -0
- package/scss/wui/_tour.scss +9 -9
- package/scss/wui/_tree.scss +2 -0
- package/scss/wui/_truncate.scss +2 -0
- package/scss/wui/_typography.scss +3 -0
- package/scss/wui/_utilities.scss +2 -0
- package/scss/wui/_whats-new.scss +2 -0
- package/scss/wui/_workspace.scss +2 -0
- package/scss/wui/tour/_advance.scss +2 -0
- package/scss/wui/tour/_base.scss +2 -0
- package/scss/wui/tour/_end.scss +2 -0
- package/scss/wui/tour/_media.scss +2 -0
- package/scss/wui/tour/_motion.scss +2 -0
- package/scss/wui/tour/_placement.scss +2 -0
- 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
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
// @
|
|
39
|
+
// @use "@webority/theme/scss/flags";
|
|
28
40
|
```
|
|
29
41
|
|
|
30
|
-
|
|
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:** `@
|
|
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
|
-
@
|
|
127
|
+
@use "@webority/theme/scss/wui-core";
|
|
104
128
|
|
|
105
|
-
// In the lazy route entry that renders the widget, once:
|
|
106
|
-
@
|
|
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`).
|
package/dist/purge-safelist.json
CHANGED