@webority/theme 0.2.0 → 0.3.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/dist/webority-theme.css +1 -1
- package/package.json +1 -1
- package/scss/_wui-components.scss +89 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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": {
|
|
@@ -556,9 +556,11 @@ textarea.textarea:focus {
|
|
|
556
556
|
.field > .field-error {
|
|
557
557
|
align-self: stretch;
|
|
558
558
|
}
|
|
559
|
+
// Doubled selectors — see the lg-tier block below: a media query carries no
|
|
560
|
+
// extra specificity, so a consumer's later single-class rule would win.
|
|
559
561
|
@media (max-width: 575.98px) {
|
|
560
|
-
.field-row,
|
|
561
|
-
.field-row-3 {
|
|
562
|
+
.field-row.field-row,
|
|
563
|
+
.field-row-3.field-row-3 {
|
|
562
564
|
grid-template-columns: 1fr;
|
|
563
565
|
}
|
|
564
566
|
}
|
|
@@ -2162,6 +2164,11 @@ textarea.textarea:focus {
|
|
|
2162
2164
|
border-bottom: 1px solid var(--color-border);
|
|
2163
2165
|
overflow-x: auto;
|
|
2164
2166
|
scrollbar-width: none;
|
|
2167
|
+
// Declared explicitly because the React AppTabs renders a react-bootstrap
|
|
2168
|
+
// <Nav>, so the element also carries `.nav` — whose `flex-wrap: wrap` would
|
|
2169
|
+
// otherwise apply unopposed (equal specificity, and we declared nothing),
|
|
2170
|
+
// wrapping the tabs onto a second line instead of scrolling.
|
|
2171
|
+
flex-wrap: nowrap;
|
|
2165
2172
|
}
|
|
2166
2173
|
.app-tabs::-webkit-scrollbar {
|
|
2167
2174
|
display: none;
|
|
@@ -2193,6 +2200,9 @@ textarea.textarea:focus {
|
|
|
2193
2200
|
.app-tab.active {
|
|
2194
2201
|
color: var(--color-primary);
|
|
2195
2202
|
border-bottom-color: var(--color-primary);
|
|
2203
|
+
// The active tab carries weight as well as colour — colour alone is a weak
|
|
2204
|
+
// signal for anyone who reads the strip at a glance or cannot distinguish it.
|
|
2205
|
+
font-weight: 600;
|
|
2196
2206
|
}
|
|
2197
2207
|
.app-tab:disabled {
|
|
2198
2208
|
color: var(--color-text-subtle);
|
|
@@ -2203,10 +2213,21 @@ textarea.textarea:focus {
|
|
|
2203
2213
|
outline-offset: -2px;
|
|
2204
2214
|
border-radius: var(--radius-sm);
|
|
2205
2215
|
}
|
|
2216
|
+
// A destructive tab reads as destructive whether or not it is the active one.
|
|
2217
|
+
.app-tab.danger {
|
|
2218
|
+
color: var(--color-danger);
|
|
2219
|
+
}
|
|
2220
|
+
.app-tab.danger:hover:not(:disabled):not(.active) {
|
|
2221
|
+
color: var(--color-danger-active);
|
|
2222
|
+
}
|
|
2206
2223
|
.app-tab.danger.active {
|
|
2207
2224
|
color: var(--color-danger);
|
|
2208
2225
|
border-bottom-color: var(--color-danger);
|
|
2209
2226
|
}
|
|
2227
|
+
.app-tab.danger .app-tab-count {
|
|
2228
|
+
background: var(--color-danger-soft);
|
|
2229
|
+
color: var(--color-danger-strong);
|
|
2230
|
+
}
|
|
2210
2231
|
// Trailing count pill.
|
|
2211
2232
|
.app-tab-count {
|
|
2212
2233
|
display: inline-flex;
|
|
@@ -2418,8 +2439,22 @@ textarea.textarea:focus {
|
|
|
2418
2439
|
color: var(--color-text);
|
|
2419
2440
|
vertical-align: middle;
|
|
2420
2441
|
border-color: var(--color-border);
|
|
2442
|
+
// `separate` is required for a cell to render a border-radius at all —
|
|
2443
|
+
// Bootstrap reboot sets `collapse`, under which .table-ledger's rounded
|
|
2444
|
+
// header corners silently do nothing. border-spacing 0 keeps cells flush.
|
|
2445
|
+
border-collapse: separate;
|
|
2446
|
+
border-spacing: 0;
|
|
2421
2447
|
}
|
|
2422
|
-
|
|
2448
|
+
|
|
2449
|
+
// The cell rules are wrapped in :where() so they carry ZERO class specificity
|
|
2450
|
+
// — `:where(.table) > thead > tr > th` is (0,0,3), which any single-class
|
|
2451
|
+
// variant selector such as `.table-ledger thead th` (0,1,2) outranks.
|
|
2452
|
+
//
|
|
2453
|
+
// Without this the base out-ranks its own variant: written plainly,
|
|
2454
|
+
// `.table > thead > tr > th` is (0,1,3) and beats `.table-ledger thead th`,
|
|
2455
|
+
// so the ledger lost its own border-bottom/line-height/font-family to the
|
|
2456
|
+
// base. A base layer must always sit *under* the variants built on it.
|
|
2457
|
+
:where(.table) > thead > tr > th {
|
|
2423
2458
|
height: 42px;
|
|
2424
2459
|
padding: 0 12px;
|
|
2425
2460
|
background: var(--color-bg-muted);
|
|
@@ -2431,20 +2466,30 @@ textarea.textarea:focus {
|
|
|
2431
2466
|
color: var(--color-text-subtle);
|
|
2432
2467
|
white-space: nowrap;
|
|
2433
2468
|
vertical-align: middle;
|
|
2469
|
+
transition:
|
|
2470
|
+
background-color 0.12s ease,
|
|
2471
|
+
color 0.12s ease;
|
|
2434
2472
|
}
|
|
2435
|
-
.table > tbody > tr > td {
|
|
2473
|
+
:where(.table) > tbody > tr > td {
|
|
2436
2474
|
padding: 12px;
|
|
2437
2475
|
border-bottom: 1px solid var(--color-border);
|
|
2438
2476
|
font-size: 14px;
|
|
2439
2477
|
color: var(--color-text-muted);
|
|
2440
2478
|
vertical-align: middle;
|
|
2479
|
+
transition: background-color 0.12s ease;
|
|
2441
2480
|
}
|
|
2442
|
-
.table > tbody > tr:last-child > td {
|
|
2481
|
+
:where(.table) > tbody > tr:last-child > td {
|
|
2443
2482
|
border-bottom: 0;
|
|
2444
2483
|
}
|
|
2445
|
-
.table > tbody > tr:hover > td {
|
|
2484
|
+
:where(.table) > tbody > tr:hover > td {
|
|
2446
2485
|
background: var(--color-bg-subtle);
|
|
2447
2486
|
}
|
|
2487
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2488
|
+
:where(.table) > thead > tr > th,
|
|
2489
|
+
:where(.table) > tbody > tr > td {
|
|
2490
|
+
transition: none;
|
|
2491
|
+
}
|
|
2492
|
+
}
|
|
2448
2493
|
// Numeric / action columns align to the trailing edge.
|
|
2449
2494
|
.table .cell-end,
|
|
2450
2495
|
.table thead th.cell-end {
|
|
@@ -2665,8 +2710,33 @@ textarea.textarea:focus {
|
|
|
2665
2710
|
padding-left: 12px;
|
|
2666
2711
|
padding-right: 0;
|
|
2667
2712
|
}
|
|
2668
|
-
|
|
2669
|
-
|
|
2713
|
+
// Selection is a brand-tinted state on the CELLS, not a grey fill on the row:
|
|
2714
|
+
// cells carry their own background (hover sets it too), so a background on the
|
|
2715
|
+
// <tr> is painted over and never shows. Grey also reads as "disabled" rather
|
|
2716
|
+
// than "chosen".
|
|
2717
|
+
.table-ledger tbody tr.is-selected > td {
|
|
2718
|
+
background: var(--color-primary-soft);
|
|
2719
|
+
}
|
|
2720
|
+
.table-ledger tbody tr.is-selected:hover > td {
|
|
2721
|
+
background: color-mix(in srgb, var(--color-primary) 14%, transparent);
|
|
2722
|
+
}
|
|
2723
|
+
|
|
2724
|
+
// Row status affordance — a colour bar on the leading edge, so a row's state is
|
|
2725
|
+
// legible without relying on a tint alone.
|
|
2726
|
+
.table-ledger tbody tr[data-status] > td:first-child {
|
|
2727
|
+
box-shadow: inset 3px 0 0 0 var(--color-border-strong);
|
|
2728
|
+
}
|
|
2729
|
+
.table-ledger tbody tr[data-status="success"] > td:first-child {
|
|
2730
|
+
box-shadow: inset 3px 0 0 0 var(--color-success);
|
|
2731
|
+
}
|
|
2732
|
+
.table-ledger tbody tr[data-status="warning"] > td:first-child {
|
|
2733
|
+
box-shadow: inset 3px 0 0 0 var(--color-warning);
|
|
2734
|
+
}
|
|
2735
|
+
.table-ledger tbody tr[data-status="danger"] > td:first-child {
|
|
2736
|
+
box-shadow: inset 3px 0 0 0 var(--color-danger);
|
|
2737
|
+
}
|
|
2738
|
+
.table-ledger tbody tr[data-status="info"] > td:first-child {
|
|
2739
|
+
box-shadow: inset 3px 0 0 0 var(--color-info);
|
|
2670
2740
|
}
|
|
2671
2741
|
|
|
2672
2742
|
// Row actions — icon-only buttons replacing a kebab dropdown.
|
|
@@ -3273,23 +3343,29 @@ textarea.textarea:focus {
|
|
|
3273
3343
|
// Tablet and below: the masthead stops being a single row — the title block and
|
|
3274
3344
|
// its actions stack, and the actions stretch to the full width rather than
|
|
3275
3345
|
// crowding the title. Bootstrap's lg tier (991.98px), not an invented breakpoint.
|
|
3346
|
+
//
|
|
3347
|
+
// Selectors are DOUBLED (`.page-header.page-header`) on purpose. A media query
|
|
3348
|
+
// adds no specificity, so a consumer's own single-class rule — written later in
|
|
3349
|
+
// the cascade, as a consuming app's stylesheet always is — silently beats the
|
|
3350
|
+
// responsive rule and the layout never collapses. Doubling puts these at (0,2,0)
|
|
3351
|
+
// so they hold, while still leaving a consumer free to override deliberately.
|
|
3276
3352
|
@media (max-width: 991.98px) {
|
|
3277
|
-
.page-header {
|
|
3353
|
+
.page-header.page-header {
|
|
3278
3354
|
flex-direction: column;
|
|
3279
3355
|
align-items: stretch;
|
|
3280
3356
|
gap: 12px;
|
|
3281
3357
|
}
|
|
3282
|
-
.page-actions {
|
|
3358
|
+
.page-actions.page-actions {
|
|
3283
3359
|
flex-wrap: wrap;
|
|
3284
3360
|
width: 100%;
|
|
3285
3361
|
}
|
|
3286
3362
|
// A two-up field row is too tight for a tablet column.
|
|
3287
|
-
.field-row,
|
|
3288
|
-
.field-row-3 {
|
|
3363
|
+
.field-row.field-row,
|
|
3364
|
+
.field-row-3.field-row-3 {
|
|
3289
3365
|
grid-template-columns: 1fr;
|
|
3290
3366
|
}
|
|
3291
3367
|
// A fixed 420px drawer leaves too little of the page visible on a tablet.
|
|
3292
|
-
.drawer {
|
|
3368
|
+
.drawer.drawer {
|
|
3293
3369
|
width: 100vw;
|
|
3294
3370
|
max-width: 420px;
|
|
3295
3371
|
}
|