@webority/theme 0.7.3 → 0.7.5
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 +108 -6
- package/dist/webority-theme.css +1 -1
- package/package.json +1 -1
- package/scss/_components.scss +158 -547
- package/scss/_marketing.scss +337 -0
- package/scss/_tokens.scss +119 -108
- package/scss/_variables.scss +126 -132
- package/scss/_wui-aliases.scss +103 -102
- package/scss/wui/_choice.scss +4 -4
- package/scss/wui/_controls.scss +167 -251
- package/scss/wui/_data.scss +39 -0
- package/scss/wui/_display.scss +88 -0
- package/scss/wui/_navigation.scss +27 -0
- package/scss/wui/_overlays.scss +2 -2
- package/scss/wui/_scrollbar.scss +13 -11
- package/scss/wui/_shell.scss +3 -3
- package/scss/wui/_utilities.scss +139 -1
package/README.md
CHANGED
|
@@ -6,6 +6,9 @@ shared component CSS. Consumed by `@webority/ui-react` and `Webority.Ui.Razor`.
|
|
|
6
6
|
Published publicly so `npm install` needs no private registry. Built for Webority
|
|
7
7
|
products; no support commitment outside them.
|
|
8
8
|
|
|
9
|
+
**Bias:** thin layer on Bootstrap. Shared identity + control language + hard gaps — not a
|
|
10
|
+
second framework and not every product's marketing site.
|
|
11
|
+
|
|
9
12
|
## Use
|
|
10
13
|
|
|
11
14
|
Compile the partials with your brand values, in this order — **the order is
|
|
@@ -17,13 +20,112 @@ load-bearing**:
|
|
|
17
20
|
@import "bootstrap/scss/bootstrap";
|
|
18
21
|
@import "@webority/theme/scss/tokens"; // --wui-* tokens
|
|
19
22
|
@import "@webority/theme/scss/wui-aliases"; // --color-* / --radius-* aliases
|
|
20
|
-
@import "@webority/theme/scss/components";
|
|
23
|
+
@import "@webority/theme/scss/components"; // portal / control chrome
|
|
21
24
|
@import "@webority/theme/scss/wui-components";
|
|
22
|
-
|
|
25
|
+
// Optional — marketing sites only (heroes, section-y, pill CTAs, reveal motion):
|
|
26
|
+
// @import "@webority/theme/scss/marketing";
|
|
23
27
|
```
|
|
24
28
|
|
|
25
|
-
Importing part of the chain is a bug: skipping `wui-aliases` leaves every
|
|
26
|
-
reference unresolved
|
|
29
|
+
Importing part of the core chain is a bug: skipping `wui-aliases` leaves every
|
|
30
|
+
`--color-*` reference unresolved. Country flags are pulled by `wui-components`
|
|
31
|
+
for the phone control — do not import `flags` a second time (legacy `@import`
|
|
32
|
+
does not dedupe).
|
|
33
|
+
|
|
34
|
+
**`$secondary`** is quiet grey (de-emphasised text/buttons), not a second brand
|
|
35
|
+
colour — intentional shared semantics (see `_variables.scss`).
|
|
36
|
+
|
|
37
|
+
`dist/webority-theme.css` is a precompiled default-brand **portal** build (no
|
|
38
|
+
marketing partial). Prefer the SCSS chain above for brand-exact output.
|
|
39
|
+
|
|
40
|
+
## Library vs product ownership
|
|
41
|
+
|
|
42
|
+
Three layers. Do not collapse product art direction into the shared package.
|
|
43
|
+
|
|
44
|
+
| Layer | Owner | What |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| **A — Bootstrap** | Bootstrap | Grid, utilities, reboot, structure of `.btn` / `.form-control` / `.modal` / offcanvas |
|
|
47
|
+
| **B — Shared UI system** | **this package + App\*** | Brandable tokens, one field/selection skin, portal shell/table/modal, hard interactive, React↔Razor parity |
|
|
48
|
+
| **C — Product / marketing** | **Each product** | Brand hexes, page layouts, heroes/motion, domain components, router/auth/content |
|
|
49
|
+
|
|
50
|
+
### Products own (do not re-implement in the library)
|
|
51
|
+
|
|
52
|
+
- **Brand values** — `$primary` / `--wui-primary*` (and related) via pre-bootstrap variables or runtime CSS; use `wui-brand-primary` when setting primary once
|
|
53
|
+
- **Marketing art direction** — heroes, section rhythm, marquee, scroll reveals, page entry fades, marketing-only button shapes (pill / ghost-dark), wide marketing canvas
|
|
54
|
+
- **Screens and domain UI** — feature layouts, status→label maps, RoleBadge-style domain components
|
|
55
|
+
- **App infrastructure** — routing, auth, i18n copy, charts, rich text, API
|
|
56
|
+
|
|
57
|
+
### Products must not own (deviation)
|
|
58
|
+
|
|
59
|
+
- Forked `AppButton` / `AppSelect` / theme hex tables
|
|
60
|
+
- A second select/date/phone kit (Radix, react-day-picker, etc.)
|
|
61
|
+
- A second styling system (Tailwind, MUI, hand-rolled `.btn` kit)
|
|
62
|
+
- Per-product copies of shell/table/modal chrome
|
|
63
|
+
|
|
64
|
+
### Ship rule for new PRs into this package
|
|
65
|
+
|
|
66
|
+
| Proposed change | Put it **here** if… | Put it in the **product** if… |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| Bootstrap `$` or class restyle | Fixes shared a11y, alignment, or rebrand | Looks cool on one landing page |
|
|
69
|
+
| New CSS in theme | Both React and Razor portals need the same look | Marketing-only motion or section art |
|
|
70
|
+
| New `App*` / `<app-*>` | ≥2 products need it, **or** Bootstrap fails, **or** parity requires it | One screen / one domain |
|
|
71
|
+
| New token | Shared semantic meaning (status, surface, control height) | One brand's one-off hex |
|
|
72
|
+
|
|
73
|
+
## What stays in the library (do not move to products)
|
|
74
|
+
|
|
75
|
+
Anti-over-correction checklist. When thinning the package (e.g. marketing extract), **keep**:
|
|
76
|
+
|
|
77
|
+
### Tokens & system (`scss/_variables`, `_tokens`, `_wui-aliases`)
|
|
78
|
+
|
|
79
|
+
- Theme colors + `wui-brand-primary`; body/text/surface/border ramps (incl. AA tertiary)
|
|
80
|
+
- Radius ladder that differs from Bootstrap; spacer map extensions (6+)
|
|
81
|
+
- Status ramps: fills **and** `-text` / danger-strong for AA
|
|
82
|
+
- Control heights (`--wui-control-height*`); flat in-page elevation; overlay shadows only
|
|
83
|
+
- Z-index scale (`--wui-z-*`); dark-mode `--bs-*` / RGB bridges
|
|
84
|
+
- Focus: no input glow (`$input-focus-box-shadow: none`); brand border as focus cue in post-CSS
|
|
85
|
+
|
|
86
|
+
### One skin on Bootstrap classes (not a second kit)
|
|
87
|
+
|
|
88
|
+
- **Fields:** `.form-control` / `.form-select` chrome; `.input` / `.select` / `.textarea` are **aliases** for size/shell hooks
|
|
89
|
+
- **Selection:** `.form-check-input` glyph; `.wui-check` / `.wui-radio` are **aliases** (table select compact under `.wui-select-cell` only)
|
|
90
|
+
- **Buttons:** tokenized primary / danger / outline / ghost / disabled; shared control height on default size
|
|
91
|
+
- **Dropdown, card surface/radius, table cell padding** via SCSS vars where specificity requires it
|
|
92
|
+
|
|
93
|
+
### Hard interactive & portal patterns (packages outside this folder, same monorepo)
|
|
94
|
+
|
|
95
|
+
- `@webority/ui-elements` + App\* wrappers: select, multiselect, autocomplete, phone, date, daterange, OTP
|
|
96
|
+
- Portal: `AppShell`, `AppDataTable` / ledger, `AppModal` / `AppConfirmDialog`, toast contract, `AppSidebarMenu`
|
|
97
|
+
- React↔Razor parity gates and unit tests for catalogue components
|
|
98
|
+
|
|
99
|
+
### Marketing (opt-in — not default)
|
|
100
|
+
|
|
101
|
+
Editorial helpers live in **`scss/_marketing.scss`**, imported as
|
|
102
|
+
`@webority/theme/scss/marketing` **after** the core chain. Includes section-y,
|
|
103
|
+
eyebrow, h-display, hero/CTA gradients, btn-pill / btn-ghost-dark, link-wipe,
|
|
104
|
+
container-cloves, hero-wash, page/stagger/reveal motion, marquee, section
|
|
105
|
+
content-visibility. **Portals omit this import.** Marketing sites that used
|
|
106
|
+
these classes must add the import.
|
|
107
|
+
|
|
108
|
+
### Catalogue tiers
|
|
109
|
+
|
|
110
|
+
Keep shipping all of these; classify for **when to use**, not for removal:
|
|
111
|
+
|
|
112
|
+
| Tier | Components | Library? | Notes |
|
|
113
|
+
|---|---|---|---|
|
|
114
|
+
| **Portal core** | Shell, DataTable, fields/selects, Modal, Confirm, Tabs, Card, Alert, Badge, StatusBadge, Stepper, File*, Date*, Phone, OTP, Toast, Empty/Skeleton/Spinner | **Yes — never product-fork** | Daily product UI |
|
|
115
|
+
| **Portal display** | `AppKpiTile`, `AppInfoList`, `AppTimeline`, `AppCallout`, `AppSplash`, `AppBanner`, `AppBreadcrumbs`, `AppProgress`, `AppMeter` | **Yes** | Shared across portals |
|
|
116
|
+
| **Commercial / plan UI** | `AppPricingCard`, `AppCompareTable`, `AppResourceCard` | **Yes — keep** | Pricing pages **and** in-app plan/billing. Editorial shape, not a second design system. Moving them to products would break React↔Razor parity. |
|
|
117
|
+
| **CSS marketing only** | section-y, btn-pill, reveal, marquee, … | **Opt-in partial** | Not App*; see marketing import above |
|
|
118
|
+
|
|
119
|
+
**Do not remove** PricingCard / CompareTable / ResourceCard without a multi-product usage audit **outside** this monorepo. Inventory conclusion: **keep in library**, document tier.
|
|
120
|
+
|
|
121
|
+
### Squircle policy
|
|
122
|
+
|
|
123
|
+
`corner-shape: squircle` is applied on many controls (buttons, fields, chips, menus, shell) as **progressive enhancement**:
|
|
124
|
+
|
|
125
|
+
- Supporting browsers get slightly smoother corners; others keep plain `border-radius`.
|
|
126
|
+
- Not a cross-browser design contract; not a WCAG requirement.
|
|
127
|
+
- Missing squircle is **not** a bug.
|
|
128
|
+
|
|
129
|
+
**Policy:** keep on shared control surfaces for consistent geometry; do **not** strip globally. Optional `.rounded-squircle` remains an opt-in utility. Products that want pure arcs only override locally — do not fork App*.
|
|
130
|
+
|
|
27
131
|
|
|
28
|
-
`dist/webority-theme.css` is a precompiled default-brand build for when there is no SCSS
|
|
29
|
-
toolchain. It is not pixel-exact on every Bootstrap utility — prefer the chain above.
|