@webority/theme 0.148.0 → 0.150.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/css-import.d.ts +2 -0
- package/dist/postcss/forced-states.d.mts +11 -0
- package/dist/postcss/forced-states.mjs +1 -1
- package/dist/purge-safelist.json +4 -1
- package/dist/runtime/index.d.mts +6 -0
- package/dist/runtime/productTheme.d.mts +25 -0
- package/dist/runtime.mjs +2 -2
- package/dist/webority-theme.css +1 -1
- package/package.json +33 -11
- package/scss/_bootstrap.generated.scss +1 -1
- package/scss/_components.scss +1 -0
- package/scss/_tokens.generated.scss +1 -1
- package/scss/wui/_chart-card.scss +33 -1
- package/scss/wui/_controls.scss +4 -0
- package/scss/wui/_display.scss +24 -3
- package/scss/wui/_support.scss +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/theme",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.150.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": {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"dist",
|
|
15
15
|
"logos",
|
|
16
16
|
"token-meanings.json",
|
|
17
|
+
"css-import.d.ts",
|
|
17
18
|
"!dist/**/__tests__",
|
|
18
19
|
"!dist/**/*.test.*",
|
|
19
20
|
"!dist/**/*.map"
|
|
@@ -27,14 +28,32 @@
|
|
|
27
28
|
"./scss/wui/tour/*": "./scss/wui/tour/_*.scss",
|
|
28
29
|
"./scss/wui/*": "./scss/wui/_*.scss",
|
|
29
30
|
"./scss/*": "./scss/_*.scss",
|
|
30
|
-
"./css":
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
"./css": {
|
|
32
|
+
"types": "./css-import.d.ts",
|
|
33
|
+
"default": "./dist/webority-theme.css"
|
|
34
|
+
},
|
|
35
|
+
"./css/flags": {
|
|
36
|
+
"types": "./css-import.d.ts",
|
|
37
|
+
"default": "./dist/webority-flags.css"
|
|
38
|
+
},
|
|
39
|
+
"./css/runtime-brand": {
|
|
40
|
+
"types": "./css-import.d.ts",
|
|
41
|
+
"default": "./dist/webority-runtime-brand.css"
|
|
42
|
+
},
|
|
43
|
+
"./css/tokens": {
|
|
44
|
+
"types": "./css-import.d.ts",
|
|
45
|
+
"default": "./dist/webority-tokens.css"
|
|
46
|
+
},
|
|
34
47
|
"./purge-safelist.json": "./dist/purge-safelist.json",
|
|
35
48
|
"./token-meanings.json": "./token-meanings.json",
|
|
36
|
-
"./postcss/forced-states":
|
|
37
|
-
|
|
49
|
+
"./postcss/forced-states": {
|
|
50
|
+
"types": "./dist/postcss/forced-states.d.mts",
|
|
51
|
+
"default": "./dist/postcss/forced-states.mjs"
|
|
52
|
+
},
|
|
53
|
+
"./runtime": {
|
|
54
|
+
"types": "./dist/runtime/index.d.mts",
|
|
55
|
+
"default": "./dist/runtime.mjs"
|
|
56
|
+
},
|
|
38
57
|
"./logos/*": "./logos/*",
|
|
39
58
|
"./package.json": "./package.json"
|
|
40
59
|
},
|
|
@@ -48,16 +67,19 @@
|
|
|
48
67
|
"postcss": "^8.5.31"
|
|
49
68
|
},
|
|
50
69
|
"devDependencies": {
|
|
51
|
-
"@
|
|
70
|
+
"@types/node": "25.6.0",
|
|
71
|
+
"@webority/tokens": "0.150.0",
|
|
52
72
|
"bootstrap": "5.3.8",
|
|
53
73
|
"country-flag-icons": "^1.6.20",
|
|
54
74
|
"sass-embedded": "^1.108.0",
|
|
75
|
+
"typescript": "^7.0.2",
|
|
55
76
|
"vite": "^8.3.6"
|
|
56
77
|
},
|
|
57
78
|
"scripts": {
|
|
58
|
-
"test": "node --test runtime/productTheme.test.
|
|
59
|
-
"
|
|
79
|
+
"test": "node --test runtime/productTheme.test.mts",
|
|
80
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
81
|
+
"tokens": "node ../../scripts/ensure-tokens-built.mjs && node ../tokens/dist/webority.js brand --library --out ../tokens/dist --web scss/_tokens.generated.scss",
|
|
60
82
|
"tokens:check": "node ../tokens/dist/webority.js brand --library --out ../tokens/dist --web scss/_tokens.generated.scss --check",
|
|
61
|
-
"build": "corepack pnpm run tokens && sass index.scss dist/webority-theme.css --load-path=node_modules --style=compressed --no-source-map --quiet-deps --silence-deprecation=if-function && sass scss/_flags.scss dist/webority-flags.css --style=compressed --no-source-map --quiet && sass scss/_runtime-brand.scss dist/webority-runtime-brand.css --style=compressed --no-source-map --quiet && node ../../scripts/force-state-selectors.mjs dist/webority-theme.css && node ../../scripts/build-tokens-css.mjs dist/webority-theme.css dist/webority-tokens.css && node ../../scripts/gen-purge-safelist.mjs && node ../../scripts/sync-rcl-assets.mjs theme && vite build --config vite.cli.config.
|
|
83
|
+
"build": "tsc -p tsconfig.json && corepack pnpm run tokens && sass index.scss dist/webority-theme.css --load-path=node_modules --style=compressed --no-source-map --quiet-deps --silence-deprecation=if-function && sass scss/_flags.scss dist/webority-flags.css --style=compressed --no-source-map --quiet && sass scss/_runtime-brand.scss dist/webority-runtime-brand.css --style=compressed --no-source-map --quiet && node ../../scripts/force-state-selectors.mjs dist/webority-theme.css && node ../../scripts/build-tokens-css.mjs dist/webority-theme.css dist/webority-tokens.css && node ../../scripts/gen-purge-safelist.mjs && node ../../scripts/sync-rcl-assets.mjs theme && vite build --config vite.cli.config.mts && tsc -p tsconfig.build.json && node scripts/exportCanvasTheme.mts"
|
|
62
84
|
}
|
|
63
85
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by @webority/tokens 0.
|
|
1
|
+
// Generated by @webority/tokens 0.150.0 from its token source. Do not edit; run webority brand --library.
|
|
2
2
|
$body-color: #252f4a !default;
|
|
3
3
|
$body-secondary-color: #4b5675 !default;
|
|
4
4
|
$body-tertiary-color: #626a82 !default;
|
package/scss/_components.scss
CHANGED
|
@@ -1004,6 +1004,7 @@
|
|
|
1004
1004
|
// no lift, and no side padding, so it lines up with the text around it. Hover deepens the colour.
|
|
1005
1005
|
// It pairs with animation="roll", whose label roll and round icon well carry the motion.
|
|
1006
1006
|
// AppButton's `text` variant emits this class on both surfaces.
|
|
1007
|
+
// It differs from Bootstrap's .btn-link on purpose: no side padding and no underline.
|
|
1007
1008
|
.btn-link-primary {
|
|
1008
1009
|
--bs-btn-color: var(--color-primary-text);
|
|
1009
1010
|
--bs-btn-bg: transparent;
|
|
@@ -58,7 +58,7 @@ wui-chart:not(:defined) .wui-chart-table-wrap {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
// ── Dashboard grid ──────────────────────────────────────────────────────────
|
|
61
|
-
// One column on a phone; from 576px a cell spans 3, 4, 6, 8 or 12 of 12 columns.
|
|
61
|
+
// One column on a phone; from 576px a cell spans 3, 4, 6, 8 or 12 of 12 columns, or a fifth (three to a row, five from 992px).
|
|
62
62
|
.wui-dashboard-grid {
|
|
63
63
|
display: grid;
|
|
64
64
|
grid-template-columns: minmax(0, 1fr);
|
|
@@ -91,3 +91,35 @@ wui-chart:not(:defined) .wui-chart-table-wrap {
|
|
|
91
91
|
grid-column: span 8;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
+
// Five to a row needs fifths, which twelve columns cannot hold. A grid holding a fifth cell switches to sixty
|
|
95
|
+
// columns; its 16px gutter moves from the column gap (59 gaps would eat the row) into 8px inline padding on each
|
|
96
|
+
// cell, which gives the same cell widths as the twelve-column grid. Grids without a fifth cell are untouched.
|
|
97
|
+
@media (min-width: 576px) {
|
|
98
|
+
.wui-dashboard-grid:has(> .wui-dashboard-cell-fifth) {
|
|
99
|
+
grid-template-columns: repeat(60, minmax(0, 1fr));
|
|
100
|
+
column-gap: 0;
|
|
101
|
+
margin-inline: calc(-1 * var(--wui-space-sm));
|
|
102
|
+
}
|
|
103
|
+
.wui-dashboard-grid:has(> .wui-dashboard-cell-fifth) > .wui-dashboard-cell {
|
|
104
|
+
grid-column: span 60;
|
|
105
|
+
padding-inline: var(--wui-space-sm);
|
|
106
|
+
}
|
|
107
|
+
.wui-dashboard-grid:has(> .wui-dashboard-cell-fifth) > .wui-dashboard-cell-3 {
|
|
108
|
+
grid-column: span 15;
|
|
109
|
+
}
|
|
110
|
+
.wui-dashboard-grid:has(> .wui-dashboard-cell-fifth) > .wui-dashboard-cell-4,
|
|
111
|
+
.wui-dashboard-grid:has(> .wui-dashboard-cell-fifth) > .wui-dashboard-cell-fifth {
|
|
112
|
+
grid-column: span 20;
|
|
113
|
+
}
|
|
114
|
+
.wui-dashboard-grid:has(> .wui-dashboard-cell-fifth) > .wui-dashboard-cell-6 {
|
|
115
|
+
grid-column: span 30;
|
|
116
|
+
}
|
|
117
|
+
.wui-dashboard-grid:has(> .wui-dashboard-cell-fifth) > .wui-dashboard-cell-8 {
|
|
118
|
+
grid-column: span 40;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
@media (min-width: 992px) {
|
|
122
|
+
.wui-dashboard-grid:has(> .wui-dashboard-cell-fifth) > .wui-dashboard-cell-fifth {
|
|
123
|
+
grid-column: span 12;
|
|
124
|
+
}
|
|
125
|
+
}
|
package/scss/wui/_controls.scss
CHANGED
|
@@ -1651,6 +1651,10 @@ wui-date-range {
|
|
|
1651
1651
|
// so the neutral pill takes the secondary tier instead of a sixth `-text` token.
|
|
1652
1652
|
color: var(--color-text-muted);
|
|
1653
1653
|
}
|
|
1654
|
+
// After the tone rules: their `border-color: transparent` would win at equal specificity.
|
|
1655
|
+
.status-label.wui-bordered {
|
|
1656
|
+
border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
|
|
1657
|
+
}
|
|
1654
1658
|
|
|
1655
1659
|
// ── Choice chip ──
|
|
1656
1660
|
// Inline selectable chip: the native input is hidden and the pill shows its state. The look reads
|
package/scss/wui/_display.scss
CHANGED
|
@@ -152,7 +152,10 @@
|
|
|
152
152
|
// top-right, the value is set large in the product's own font, and an optional caption reads
|
|
153
153
|
// under the number. For the single showcase stat on a marketing/portal surface where the
|
|
154
154
|
// number is the hero.
|
|
155
|
+
// The tile is the size container for the narrow layout below. Containment collapses a flex item
|
|
156
|
+
// with auto width; a tile in .kpi-row, a dashboard cell or a grid column has a definite width.
|
|
155
157
|
.kpi.kpi-spotlight {
|
|
158
|
+
container-type: inline-size;
|
|
156
159
|
display: grid;
|
|
157
160
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
158
161
|
// Rows pack at the top: a tile stretched to a taller neighbour's height puts the spare
|
|
@@ -190,11 +193,26 @@
|
|
|
190
193
|
}
|
|
191
194
|
.kpi.kpi-spotlight .kpi-value {
|
|
192
195
|
margin-top: 14px;
|
|
193
|
-
// The face comes from --wui-kpi-value-font-family on .kpi-value
|
|
194
|
-
//
|
|
195
|
-
//
|
|
196
|
+
// The face comes from --wui-kpi-value-font-family on .kpi-value. Size is --wui-kpi-value-size
|
|
197
|
+
// (36px default, or the tile's valueSize), capped at 18% of the tile's content width so a
|
|
198
|
+
// seven-digit rupee figure fits a narrow tile; overflow-wrap is the backstop for a longer one.
|
|
199
|
+
font-size: min(var(--wui-kpi-value-size), 18cqi);
|
|
196
200
|
line-height: 1;
|
|
197
201
|
font-weight: 600;
|
|
202
|
+
overflow-wrap: anywhere;
|
|
203
|
+
}
|
|
204
|
+
// A narrow tile has no room for the label beside the 48px chip (a 164px tile leaves the label 52px), so the chip moves
|
|
205
|
+
// above the label and the label takes the full width.
|
|
206
|
+
@container (max-width: 160px) {
|
|
207
|
+
.kpi.kpi-spotlight .kpi-icon {
|
|
208
|
+
grid-column: 1;
|
|
209
|
+
justify-self: start;
|
|
210
|
+
margin-bottom: var(--wui-space-sm);
|
|
211
|
+
}
|
|
212
|
+
.kpi.kpi-spotlight .kpi-label {
|
|
213
|
+
grid-column: 1 / -1;
|
|
214
|
+
grid-row: 2;
|
|
215
|
+
}
|
|
198
216
|
}
|
|
199
217
|
// Compact size — dense dashboards and tight cards. Shrinks the value + chrome.
|
|
200
218
|
.kpi.kpi-sm {
|
|
@@ -1501,9 +1519,12 @@ button.wui-link {
|
|
|
1501
1519
|
opacity: var(--wui-disabled-opacity);
|
|
1502
1520
|
pointer-events: none;
|
|
1503
1521
|
}
|
|
1522
|
+
// min-width: 0 lets the label shrink to the link's width, so an AppTruncate inside it can cut
|
|
1523
|
+
// the text instead of running over the content beside the link.
|
|
1504
1524
|
.wui-link__label {
|
|
1505
1525
|
position: relative;
|
|
1506
1526
|
z-index: 0;
|
|
1527
|
+
min-width: 0;
|
|
1507
1528
|
white-space: var(--wui-link-label-white-space, nowrap);
|
|
1508
1529
|
}
|
|
1509
1530
|
// maxLines: the label wraps and stops at that many lines, the clamp drawing the ellipsis. The
|
package/scss/wui/_support.scss
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
// Subject cell: a
|
|
32
|
+
// Subject cell: a link that wraps to five lines inside the column, cut there by AppTruncate, the ticket number and category below.
|
|
33
33
|
.wui-support-subject {
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-direction: column;
|